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


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

#include "wx_style.h"
#include "wx_mtype.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_styl.h"

#ifdef MZ_PRECISE_GC
START_XFORM_SKIP;
#endif




class os_wxMultColour : public wxMultColour {
 public:

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

#ifdef MZ_PRECISE_GC
void os_wxMultColour::gcMark() {
  wxMultColour::gcMark();
}
void os_wxMultColour::gcFixup() {
  wxMultColour::gcFixup();
}
#endif

static Scheme_Object *os_wxMultColour_class;
static Scheme_Object *os_wxMultColour_interface;

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

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_float(p[0], "set in mult-color<%>"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_float(p[1], "set in mult-color<%>"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_float(p[2], "set in mult-color<%>"));

  
  WITH_VAR_STACK(((wxMultColour *)((Scheme_Class_Object *)obj)->primdata)->Set(x0, x1, x2));

  
  
  return scheme_void;
}

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

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

  
      *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[0], "get in mult-color<%>")), WITH_VAR_STACK(objscheme_unbundle_float(sbox_tmp, "get in mult-color<%>"", extracting boxed argument")));
      *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[1], "get in mult-color<%>")), WITH_VAR_STACK(objscheme_unbundle_float(sbox_tmp, "get in mult-color<%>"", extracting boxed argument")));
      *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[2], "get in mult-color<%>")), WITH_VAR_STACK(objscheme_unbundle_float(sbox_tmp, "get in mult-color<%>"", extracting boxed argument")));

  
  WITH_VAR_STACK(((wxMultColour *)((Scheme_Class_Object *)obj)->primdata)->Get(x0, x1, x2));

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

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-r in mult-color%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxMultColour *)cobj->primdata)->wxMultColour::r;
  else
    v = ((wxMultColour *)cobj->primdata)->r;

  return WITH_REMEMBERED_STACK(scheme_make_double(v));
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-r in mult-color%", 1, 1, n, p));

  v = WITH_VAR_STACK(objscheme_unbundle_float(p[0], "set-r in mult-color%"));
  ((wxMultColour *)cobj->primdata)->r = v;

  return scheme_void;
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-g in mult-color%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxMultColour *)cobj->primdata)->wxMultColour::g;
  else
    v = ((wxMultColour *)cobj->primdata)->g;

  return WITH_REMEMBERED_STACK(scheme_make_double(v));
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-g in mult-color%", 1, 1, n, p));

  v = WITH_VAR_STACK(objscheme_unbundle_float(p[0], "set-g in mult-color%"));
  ((wxMultColour *)cobj->primdata)->g = v;

  return scheme_void;
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-b in mult-color%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxMultColour *)cobj->primdata)->wxMultColour::b;
  else
    v = ((wxMultColour *)cobj->primdata)->b;

  return WITH_REMEMBERED_STACK(scheme_make_double(v));
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-b in mult-color%", 1, 1, n, p));

  v = WITH_VAR_STACK(objscheme_unbundle_float(p[0], "set-b in mult-color%"));
  ((wxMultColour *)cobj->primdata)->b = v;

  return scheme_void;
}

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

  wxREGGLOB(os_wxMultColour_class);
  wxREGGLOB(os_wxMultColour_interface);

  os_wxMultColour_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "mult-color%", "object%", NULL, 8));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMultColour_class, "set", os_wxMultColourSet, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMultColour_class, "get", os_wxMultColourGet, 3, 3));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMultColour_class,"get-r", objscheme_wxMultColour_Getr, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMultColour_class,"set-r", objscheme_wxMultColour_Setr, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMultColour_class,"get-g", objscheme_wxMultColour_Getg, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMultColour_class,"set-g", objscheme_wxMultColour_Setg, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMultColour_class,"get-b", objscheme_wxMultColour_Getb, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMultColour_class,"set-b", objscheme_wxMultColour_Setb, 1, 1));

  WITH_VAR_STACK(scheme_made_class(os_wxMultColour_class));

  os_wxMultColour_interface = WITH_VAR_STACK(scheme_class_to_interface(os_wxMultColour_class, "mult-color" "<%>"));

  WITH_VAR_STACK(objscheme_add_global_interface(os_wxMultColour_interface, "mult-color" "<%>", env));

}

int objscheme_istype_wxMultColour(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (SAME_TYPE(SCHEME_TYPE(obj), scheme_object_type)
      && scheme_is_subclass(((Scheme_Class_Object *)obj)->sclass,          os_wxMultColour_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "mult-color% object or " XC_NULL_STR: "mult-color% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxMultColour(class wxMultColour *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 ((sobj = WITH_VAR_STACK(objscheme_bundle_by_type(realobj, realobj->__type))))
    return sobj;
  obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxMultColour_class));

  obj->primdata = realobj;
  WITH_VAR_STACK(objscheme_register_primpointer(obj, &obj->primdata));
  obj->primflag = 0;

  realobj->__gc_external = (void *)obj;
  return (Scheme_Object *)obj;
}

class wxMultColour *objscheme_unbundle_wxMultColour(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxMultColour(obj, where, nullOK);
  Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
  WITH_REMEMBERED_STACK(objscheme_check_valid(obj));
  if (o->primflag)
    return (os_wxMultColour *)o->primdata;
  else
    return (wxMultColour *)o->primdata;
}




// short* should really be rshort[-1000|1000]*:

class os_wxAddColour : public wxAddColour {
 public:

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

#ifdef MZ_PRECISE_GC
void os_wxAddColour::gcMark() {
  wxAddColour::gcMark();
}
void os_wxAddColour::gcFixup() {
  wxAddColour::gcFixup();
}
#endif

static Scheme_Object *os_wxAddColour_class;
static Scheme_Object *os_wxAddColour_interface;

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

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[0], -1000, 1000, "set in add-color<%>"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[1], -1000, 1000, "set in add-color<%>"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[2], -1000, 1000, "set in add-color<%>"));

  
  WITH_VAR_STACK(((wxAddColour *)((Scheme_Class_Object *)obj)->primdata)->Set(x0, x1, x2));

  
  
  return scheme_void;
}

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

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

  
      *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[0], "get in add-color<%>")), WITH_VAR_STACK(objscheme_unbundle_integer(sbox_tmp, "get in add-color<%>"", extracting boxed argument")));
      *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[1], "get in add-color<%>")), WITH_VAR_STACK(objscheme_unbundle_integer(sbox_tmp, "get in add-color<%>"", extracting boxed argument")));
      *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[2], "get in add-color<%>")), WITH_VAR_STACK(objscheme_unbundle_integer(sbox_tmp, "get in add-color<%>"", extracting boxed argument")));

  
  WITH_VAR_STACK(((wxAddColour *)((Scheme_Class_Object *)obj)->primdata)->Get(x0, x1, x2));

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

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-r in add-color%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxAddColour *)cobj->primdata)->wxAddColour::r;
  else
    v = ((wxAddColour *)cobj->primdata)->r;

  return scheme_make_integer(v);
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-r in add-color%", 1, 1, n, p));

  v = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[0], -1000, 1000, "set-r in add-color%"));
  ((wxAddColour *)cobj->primdata)->r = v;

  return scheme_void;
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-g in add-color%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxAddColour *)cobj->primdata)->wxAddColour::g;
  else
    v = ((wxAddColour *)cobj->primdata)->g;

  return scheme_make_integer(v);
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-g in add-color%", 1, 1, n, p));

  v = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[0], -1000, 1000, "set-g in add-color%"));
  ((wxAddColour *)cobj->primdata)->g = v;

  return scheme_void;
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-b in add-color%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxAddColour *)cobj->primdata)->wxAddColour::b;
  else
    v = ((wxAddColour *)cobj->primdata)->b;

  return scheme_make_integer(v);
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-b in add-color%", 1, 1, n, p));

  v = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[0], -1000, 1000, "set-b in add-color%"));
  ((wxAddColour *)cobj->primdata)->b = v;

  return scheme_void;
}

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

  wxREGGLOB(os_wxAddColour_class);
  wxREGGLOB(os_wxAddColour_interface);

  os_wxAddColour_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "add-color%", "object%", NULL, 8));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxAddColour_class, "set", os_wxAddColourSet, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxAddColour_class, "get", os_wxAddColourGet, 3, 3));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxAddColour_class,"get-r", objscheme_wxAddColour_Getr, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxAddColour_class,"set-r", objscheme_wxAddColour_Setr, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxAddColour_class,"get-g", objscheme_wxAddColour_Getg, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxAddColour_class,"set-g", objscheme_wxAddColour_Setg, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxAddColour_class,"get-b", objscheme_wxAddColour_Getb, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxAddColour_class,"set-b", objscheme_wxAddColour_Setb, 1, 1));

  WITH_VAR_STACK(scheme_made_class(os_wxAddColour_class));

  os_wxAddColour_interface = WITH_VAR_STACK(scheme_class_to_interface(os_wxAddColour_class, "add-color" "<%>"));

  WITH_VAR_STACK(objscheme_add_global_interface(os_wxAddColour_interface, "add-color" "<%>", env));

}

int objscheme_istype_wxAddColour(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (SAME_TYPE(SCHEME_TYPE(obj), scheme_object_type)
      && scheme_is_subclass(((Scheme_Class_Object *)obj)->sclass,          os_wxAddColour_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "add-color% object or " XC_NULL_STR: "add-color% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxAddColour(class wxAddColour *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 ((sobj = WITH_VAR_STACK(objscheme_bundle_by_type(realobj, realobj->__type))))
    return sobj;
  obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxAddColour_class));

  obj->primdata = realobj;
  WITH_VAR_STACK(objscheme_register_primpointer(obj, &obj->primdata));
  obj->primflag = 0;

  realobj->__gc_external = (void *)obj;
  return (Scheme_Object *)obj;
}

class wxAddColour *objscheme_unbundle_wxAddColour(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxAddColour(obj, where, nullOK);
  Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
  WITH_REMEMBERED_STACK(objscheme_check_valid(obj));
  if (o->primflag)
    return (os_wxAddColour *)o->primdata;
  else
    return (wxAddColour *)o->primdata;
}


static Scheme_Object *family_wxBASE_sym = NULL;
static Scheme_Object *family_wxDEFAULT_sym = NULL;
static Scheme_Object *family_wxDECORATIVE_sym = NULL;
static Scheme_Object *family_wxROMAN_sym = NULL;
static Scheme_Object *family_wxSCRIPT_sym = NULL;
static Scheme_Object *family_wxSWISS_sym = NULL;
static Scheme_Object *family_wxMODERN_sym = NULL;
static Scheme_Object *family_wxSYSTEM_sym = NULL;
static Scheme_Object *family_wxSYMBOL_sym = NULL;

static void init_symset_family(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(family_wxBASE_sym);
  family_wxBASE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("base"));
  wxREGGLOB(family_wxDEFAULT_sym);
  family_wxDEFAULT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("default"));
  wxREGGLOB(family_wxDECORATIVE_sym);
  family_wxDECORATIVE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("decorative"));
  wxREGGLOB(family_wxROMAN_sym);
  family_wxROMAN_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("roman"));
  wxREGGLOB(family_wxSCRIPT_sym);
  family_wxSCRIPT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("script"));
  wxREGGLOB(family_wxSWISS_sym);
  family_wxSWISS_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("swiss"));
  wxREGGLOB(family_wxMODERN_sym);
  family_wxMODERN_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("modern"));
  wxREGGLOB(family_wxSYSTEM_sym);
  family_wxSYSTEM_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("system"));
  wxREGGLOB(family_wxSYMBOL_sym);
  family_wxSYMBOL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("symbol"));
}

static int unbundle_symset_family(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!family_wxSYMBOL_sym) WITH_VAR_STACK(init_symset_family());
  if (0) { }
  else if (v == family_wxBASE_sym) { return wxBASE; }
  else if (v == family_wxDEFAULT_sym) { return wxDEFAULT; }
  else if (v == family_wxDECORATIVE_sym) { return wxDECORATIVE; }
  else if (v == family_wxROMAN_sym) { return wxROMAN; }
  else if (v == family_wxSCRIPT_sym) { return wxSCRIPT; }
  else if (v == family_wxSWISS_sym) { return wxSWISS; }
  else if (v == family_wxMODERN_sym) { return wxMODERN; }
  else if (v == family_wxSYSTEM_sym) { return wxSYSTEM; }
  else if (v == family_wxSYMBOL_sym) { return wxSYMBOL; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "family symbol", -1, 0, &v));
  return 0;
}

static Scheme_Object *bundle_symset_family(int v) {
  if (!family_wxSYMBOL_sym) init_symset_family();
  switch (v) {
  case wxBASE: return family_wxBASE_sym;
  case wxDEFAULT: return family_wxDEFAULT_sym;
  case wxDECORATIVE: return family_wxDECORATIVE_sym;
  case wxROMAN: return family_wxROMAN_sym;
  case wxSCRIPT: return family_wxSCRIPT_sym;
  case wxSWISS: return family_wxSWISS_sym;
  case wxMODERN: return family_wxMODERN_sym;
  case wxSYSTEM: return family_wxSYSTEM_sym;
  case wxSYMBOL: return family_wxSYMBOL_sym;
  default: return NULL;
  }
}


static Scheme_Object *weight_wxBASE_sym = NULL;
static Scheme_Object *weight_wxNORMAL_sym = NULL;
static Scheme_Object *weight_wxLIGHT_sym = NULL;
static Scheme_Object *weight_wxBOLD_sym = NULL;

static void init_symset_weight(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(weight_wxBASE_sym);
  weight_wxBASE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("base"));
  wxREGGLOB(weight_wxNORMAL_sym);
  weight_wxNORMAL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("normal"));
  wxREGGLOB(weight_wxLIGHT_sym);
  weight_wxLIGHT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("light"));
  wxREGGLOB(weight_wxBOLD_sym);
  weight_wxBOLD_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("bold"));
}

static int unbundle_symset_weight(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!weight_wxBOLD_sym) WITH_VAR_STACK(init_symset_weight());
  if (0) { }
  else if (v == weight_wxBASE_sym) { return wxBASE; }
  else if (v == weight_wxNORMAL_sym) { return wxNORMAL; }
  else if (v == weight_wxLIGHT_sym) { return wxLIGHT; }
  else if (v == weight_wxBOLD_sym) { return wxBOLD; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "weight symbol", -1, 0, &v));
  return 0;
}

static Scheme_Object *bundle_symset_weight(int v) {
  if (!weight_wxBOLD_sym) init_symset_weight();
  switch (v) {
  case wxBASE: return weight_wxBASE_sym;
  case wxNORMAL: return weight_wxNORMAL_sym;
  case wxLIGHT: return weight_wxLIGHT_sym;
  case wxBOLD: return weight_wxBOLD_sym;
  default: return NULL;
  }
}


static Scheme_Object *style_wxBASE_sym = NULL;
static Scheme_Object *style_wxNORMAL_sym = NULL;
static Scheme_Object *style_wxITALIC_sym = NULL;
static Scheme_Object *style_wxSLANT_sym = NULL;

static void init_symset_style(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(style_wxBASE_sym);
  style_wxBASE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("base"));
  wxREGGLOB(style_wxNORMAL_sym);
  style_wxNORMAL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("normal"));
  wxREGGLOB(style_wxITALIC_sym);
  style_wxITALIC_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("italic"));
  wxREGGLOB(style_wxSLANT_sym);
  style_wxSLANT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("slant"));
}

static int unbundle_symset_style(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!style_wxSLANT_sym) WITH_VAR_STACK(init_symset_style());
  if (0) { }
  else if (v == style_wxBASE_sym) { return wxBASE; }
  else if (v == style_wxNORMAL_sym) { return wxNORMAL; }
  else if (v == style_wxITALIC_sym) { return wxITALIC; }
  else if (v == style_wxSLANT_sym) { return wxSLANT; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "style symbol", -1, 0, &v));
  return 0;
}

static Scheme_Object *bundle_symset_style(int v) {
  if (!style_wxSLANT_sym) init_symset_style();
  switch (v) {
  case wxBASE: return style_wxBASE_sym;
  case wxNORMAL: return style_wxNORMAL_sym;
  case wxITALIC: return style_wxITALIC_sym;
  case wxSLANT: return style_wxSLANT_sym;
  default: return NULL;
  }
}


static Scheme_Object *align_wxBASE_sym = NULL;
static Scheme_Object *align_wxALIGN_TOP_sym = NULL;
static Scheme_Object *align_wxALIGN_BOTTOM_sym = NULL;
static Scheme_Object *align_wxALIGN_CENTER_sym = NULL;

static void init_symset_align(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(align_wxBASE_sym);
  align_wxBASE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("base"));
  wxREGGLOB(align_wxALIGN_TOP_sym);
  align_wxALIGN_TOP_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("top"));
  wxREGGLOB(align_wxALIGN_BOTTOM_sym);
  align_wxALIGN_BOTTOM_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("bottom"));
  wxREGGLOB(align_wxALIGN_CENTER_sym);
  align_wxALIGN_CENTER_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("center"));
}

static int unbundle_symset_align(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!align_wxALIGN_CENTER_sym) WITH_VAR_STACK(init_symset_align());
  if (0) { }
  else if (v == align_wxBASE_sym) { return wxBASE; }
  else if (v == align_wxALIGN_TOP_sym) { return wxALIGN_TOP; }
  else if (v == align_wxALIGN_BOTTOM_sym) { return wxALIGN_BOTTOM; }
  else if (v == align_wxALIGN_CENTER_sym) { return wxALIGN_CENTER; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "align symbol", -1, 0, &v));
  return 0;
}

static Scheme_Object *bundle_symset_align(int v) {
  if (!align_wxALIGN_CENTER_sym) init_symset_align();
  switch (v) {
  case wxBASE: return align_wxBASE_sym;
  case wxALIGN_TOP: return align_wxALIGN_TOP_sym;
  case wxALIGN_BOTTOM: return align_wxALIGN_BOTTOM_sym;
  case wxALIGN_CENTER: return align_wxALIGN_CENTER_sym;
  default: return NULL;
  }
}


static Scheme_Object *changeNoArg_wxCHANGE_NOTHING_sym = NULL;
static Scheme_Object *changeNoArg_wxCHANGE_NORMAL_sym = NULL;
static Scheme_Object *changeNoArg_wxCHANGE_BOLD_sym = NULL;
static Scheme_Object *changeNoArg_wxCHANGE_ITALIC_sym = NULL;
static Scheme_Object *changeNoArg_wxCHANGE_TOGGLE_UNDERLINE_sym = NULL;
static Scheme_Object *changeNoArg_wxCHANGE_NORMAL_COLOUR_sym = NULL;

static void init_symset_changeNoArg(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(changeNoArg_wxCHANGE_NOTHING_sym);
  changeNoArg_wxCHANGE_NOTHING_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-nothing"));
  wxREGGLOB(changeNoArg_wxCHANGE_NORMAL_sym);
  changeNoArg_wxCHANGE_NORMAL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-normal"));
  wxREGGLOB(changeNoArg_wxCHANGE_BOLD_sym);
  changeNoArg_wxCHANGE_BOLD_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-bold"));
  wxREGGLOB(changeNoArg_wxCHANGE_ITALIC_sym);
  changeNoArg_wxCHANGE_ITALIC_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-italic"));
  wxREGGLOB(changeNoArg_wxCHANGE_TOGGLE_UNDERLINE_sym);
  changeNoArg_wxCHANGE_TOGGLE_UNDERLINE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-toggle-underline"));
  wxREGGLOB(changeNoArg_wxCHANGE_NORMAL_COLOUR_sym);
  changeNoArg_wxCHANGE_NORMAL_COLOUR_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-normal-color"));
}

static int unbundle_symset_changeNoArg(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeNoArg_wxCHANGE_NORMAL_COLOUR_sym) WITH_VAR_STACK(init_symset_changeNoArg());
  if (0) { }
  else if (v == changeNoArg_wxCHANGE_NOTHING_sym) { return wxCHANGE_NOTHING; }
  else if (v == changeNoArg_wxCHANGE_NORMAL_sym) { return wxCHANGE_NORMAL; }
  else if (v == changeNoArg_wxCHANGE_BOLD_sym) { return wxCHANGE_BOLD; }
  else if (v == changeNoArg_wxCHANGE_ITALIC_sym) { return wxCHANGE_ITALIC; }
  else if (v == changeNoArg_wxCHANGE_TOGGLE_UNDERLINE_sym) { return wxCHANGE_TOGGLE_UNDERLINE; }
  else if (v == changeNoArg_wxCHANGE_NORMAL_COLOUR_sym) { return wxCHANGE_NORMAL_COLOUR; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeNoArg symbol", -1, 0, &v));
  return 0;
}

static Scheme_Object *changeFam_wxCHANGE_FAMILY_sym = NULL;

static void init_symset_changeFam(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(changeFam_wxCHANGE_FAMILY_sym);
  changeFam_wxCHANGE_FAMILY_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-family"));
}

static int unbundle_symset_changeFam(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeFam_wxCHANGE_FAMILY_sym) WITH_VAR_STACK(init_symset_changeFam());
  if (0) { }
  else if (v == changeFam_wxCHANGE_FAMILY_sym) { return wxCHANGE_FAMILY; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeFam symbol", -1, 0, &v));
  return 0;
}

static int istype_symset_changeFam(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeFam_wxCHANGE_FAMILY_sym) WITH_VAR_STACK(init_symset_changeFam());
  if (0) { }
  else if (v == changeFam_wxCHANGE_FAMILY_sym) { return 1; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeFam symbol", -1, 0, &v));
  return 0;
}

static Scheme_Object *changeStyle_wxCHANGE_STYLE_sym = NULL;
static Scheme_Object *changeStyle_wxCHANGE_TOGGLE_STYLE_sym = NULL;

static void init_symset_changeStyle(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(changeStyle_wxCHANGE_STYLE_sym);
  changeStyle_wxCHANGE_STYLE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-style"));
  wxREGGLOB(changeStyle_wxCHANGE_TOGGLE_STYLE_sym);
  changeStyle_wxCHANGE_TOGGLE_STYLE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-toggle-style"));
}

static int unbundle_symset_changeStyle(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeStyle_wxCHANGE_TOGGLE_STYLE_sym) WITH_VAR_STACK(init_symset_changeStyle());
  if (0) { }
  else if (v == changeStyle_wxCHANGE_STYLE_sym) { return wxCHANGE_STYLE; }
  else if (v == changeStyle_wxCHANGE_TOGGLE_STYLE_sym) { return wxCHANGE_TOGGLE_STYLE; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeStyle symbol", -1, 0, &v));
  return 0;
}

static int istype_symset_changeStyle(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeStyle_wxCHANGE_TOGGLE_STYLE_sym) WITH_VAR_STACK(init_symset_changeStyle());
  if (0) { }
  else if (v == changeStyle_wxCHANGE_STYLE_sym) { return 1; }
  else if (v == changeStyle_wxCHANGE_TOGGLE_STYLE_sym) { return 1; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeStyle symbol", -1, 0, &v));
  return 0;
}

static Scheme_Object *changeWeight_wxCHANGE_WEIGHT_sym = NULL;
static Scheme_Object *changeWeight_wxCHANGE_TOGGLE_WEIGHT_sym = NULL;

static void init_symset_changeWeight(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(changeWeight_wxCHANGE_WEIGHT_sym);
  changeWeight_wxCHANGE_WEIGHT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-weight"));
  wxREGGLOB(changeWeight_wxCHANGE_TOGGLE_WEIGHT_sym);
  changeWeight_wxCHANGE_TOGGLE_WEIGHT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-toggle-weight"));
}

static int unbundle_symset_changeWeight(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeWeight_wxCHANGE_TOGGLE_WEIGHT_sym) WITH_VAR_STACK(init_symset_changeWeight());
  if (0) { }
  else if (v == changeWeight_wxCHANGE_WEIGHT_sym) { return wxCHANGE_WEIGHT; }
  else if (v == changeWeight_wxCHANGE_TOGGLE_WEIGHT_sym) { return wxCHANGE_TOGGLE_WEIGHT; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeWeight symbol", -1, 0, &v));
  return 0;
}

static int istype_symset_changeWeight(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeWeight_wxCHANGE_TOGGLE_WEIGHT_sym) WITH_VAR_STACK(init_symset_changeWeight());
  if (0) { }
  else if (v == changeWeight_wxCHANGE_WEIGHT_sym) { return 1; }
  else if (v == changeWeight_wxCHANGE_TOGGLE_WEIGHT_sym) { return 1; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeWeight symbol", -1, 0, &v));
  return 0;
}

static Scheme_Object *changeUnderline_wxCHANGE_UNDERLINE_sym = NULL;

static void init_symset_changeUnderline(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(changeUnderline_wxCHANGE_UNDERLINE_sym);
  changeUnderline_wxCHANGE_UNDERLINE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-underline"));
}

static int unbundle_symset_changeUnderline(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeUnderline_wxCHANGE_UNDERLINE_sym) WITH_VAR_STACK(init_symset_changeUnderline());
  if (0) { }
  else if (v == changeUnderline_wxCHANGE_UNDERLINE_sym) { return wxCHANGE_UNDERLINE; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeUnderline symbol", -1, 0, &v));
  return 0;
}

static int istype_symset_changeUnderline(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeUnderline_wxCHANGE_UNDERLINE_sym) WITH_VAR_STACK(init_symset_changeUnderline());
  if (0) { }
  else if (v == changeUnderline_wxCHANGE_UNDERLINE_sym) { return 1; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeUnderline symbol", -1, 0, &v));
  return 0;
}

static Scheme_Object *changeSize_wxCHANGE_SIZE_sym = NULL;
static Scheme_Object *changeSize_wxCHANGE_BIGGER_sym = NULL;
static Scheme_Object *changeSize_wxCHANGE_SMALLER_sym = NULL;

static void init_symset_changeSize(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(changeSize_wxCHANGE_SIZE_sym);
  changeSize_wxCHANGE_SIZE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-size"));
  wxREGGLOB(changeSize_wxCHANGE_BIGGER_sym);
  changeSize_wxCHANGE_BIGGER_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-bigger"));
  wxREGGLOB(changeSize_wxCHANGE_SMALLER_sym);
  changeSize_wxCHANGE_SMALLER_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-smaller"));
}

static int unbundle_symset_changeSize(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeSize_wxCHANGE_SMALLER_sym) WITH_VAR_STACK(init_symset_changeSize());
  if (0) { }
  else if (v == changeSize_wxCHANGE_SIZE_sym) { return wxCHANGE_SIZE; }
  else if (v == changeSize_wxCHANGE_BIGGER_sym) { return wxCHANGE_BIGGER; }
  else if (v == changeSize_wxCHANGE_SMALLER_sym) { return wxCHANGE_SMALLER; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeSize symbol", -1, 0, &v));
  return 0;
}

static int istype_symset_changeSize(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeSize_wxCHANGE_SMALLER_sym) WITH_VAR_STACK(init_symset_changeSize());
  if (0) { }
  else if (v == changeSize_wxCHANGE_SIZE_sym) { return 1; }
  else if (v == changeSize_wxCHANGE_BIGGER_sym) { return 1; }
  else if (v == changeSize_wxCHANGE_SMALLER_sym) { return 1; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeSize symbol", -1, 0, &v));
  return 0;
}

static Scheme_Object *changeAlign_wxCHANGE_ALIGNMENT_sym = NULL;

static void init_symset_changeAlign(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(changeAlign_wxCHANGE_ALIGNMENT_sym);
  changeAlign_wxCHANGE_ALIGNMENT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-alignment"));
}

static int unbundle_symset_changeAlign(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeAlign_wxCHANGE_ALIGNMENT_sym) WITH_VAR_STACK(init_symset_changeAlign());
  if (0) { }
  else if (v == changeAlign_wxCHANGE_ALIGNMENT_sym) { return wxCHANGE_ALIGNMENT; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeAlign symbol", -1, 0, &v));
  return 0;
}

static int istype_symset_changeAlign(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeAlign_wxCHANGE_ALIGNMENT_sym) WITH_VAR_STACK(init_symset_changeAlign());
  if (0) { }
  else if (v == changeAlign_wxCHANGE_ALIGNMENT_sym) { return 1; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeAlign symbol", -1, 0, &v));
  return 0;
}



  






class os_wxStyleDelta : public wxStyleDelta {
 public:

  os_wxStyleDelta CONSTRUCTOR_ARGS((int x0 = wxCHANGE_NOTHING, int x1 = 0));
  ~os_wxStyleDelta();
#ifdef MZ_PRECISE_GC
  void gcMark();
  void gcFixup();
#endif
};

#ifdef MZ_PRECISE_GC
void os_wxStyleDelta::gcMark() {
  wxStyleDelta::gcMark();
}
void os_wxStyleDelta::gcFixup() {
  wxStyleDelta::gcFixup();
}
#endif

static Scheme_Object *os_wxStyleDelta_class;

os_wxStyleDelta::os_wxStyleDelta CONSTRUCTOR_ARGS((int x0, int x1))
CONSTRUCTOR_INIT(: wxStyleDelta(x0, x1))
{
}

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

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyleDelta(p[0], "copy in style-delta%", 0));

  
  WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)obj)->primdata)->Copy(x0));

  
  
  return scheme_void;
}

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyleDelta(p[0], "collapse in style-delta%", 0));

  
  r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)obj)->primdata)->Collapse(x0));

  
  
  return (r ? scheme_true : scheme_false);
}

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyleDelta(p[0], "equal? in style-delta%", 0));

  
  r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)obj)->primdata)->Equal(x0));

  
  
  return (r ? scheme_true : scheme_false);
}

static Scheme_Object *os_wxStyleDeltaSetDeltaForeground(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(2);
  PRE_VAR_STACK_PUSH(0, p);
  PRE_VAR_STACK_PUSH(1, obj);
  REMEMBER_VAR_STACK();
  class wxStyleDelta* r INIT_NULLED_OUT;
  objscheme_check_valid(obj);
  if ((n >= 1) && WITH_REMEMBERED_STACK(objscheme_istype_string(p[0], NULL))) {
    string x0 INIT_NULLED_OUT;

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

    
    if (n != 1) 
      WITH_VAR_STACK(scheme_wrong_count("set-delta-foreground in style-delta% (color name case)", 1, 1, n, p));
    x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[0], "set-delta-foreground in style-delta% (color name case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)obj)->primdata)->SetDeltaForeground(x0));

    
    
  } else  {
    class wxColour* x0 INIT_NULLED_OUT;

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

    
    if (n != 1) 
      WITH_VAR_STACK(scheme_wrong_count("set-delta-foreground in style-delta% (colour% case)", 1, 1, n, p));
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxColour(p[0], "set-delta-foreground in style-delta% (colour% case)", 0));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)obj)->primdata)->SetDeltaForeground(x0));

    
    
  }

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyleDelta(r));
}

static Scheme_Object *os_wxStyleDeltaSetDeltaBackground(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(2);
  PRE_VAR_STACK_PUSH(0, p);
  PRE_VAR_STACK_PUSH(1, obj);
  REMEMBER_VAR_STACK();
  class wxStyleDelta* r INIT_NULLED_OUT;
  objscheme_check_valid(obj);
  if ((n >= 1) && WITH_REMEMBERED_STACK(objscheme_istype_string(p[0], NULL))) {
    string x0 INIT_NULLED_OUT;

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

    
    if (n != 1) 
      WITH_VAR_STACK(scheme_wrong_count("set-delta-background in style-delta% (color name case)", 1, 1, n, p));
    x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[0], "set-delta-background in style-delta% (color name case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)obj)->primdata)->SetDeltaBackground(x0));

    
    
  } else  {
    class wxColour* x0 INIT_NULLED_OUT;

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

    
    if (n != 1) 
      WITH_VAR_STACK(scheme_wrong_count("set-delta-background in style-delta% (colour% case)", 1, 1, n, p));
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxColour(p[0], "set-delta-background in style-delta% (colour% case)", 0));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)obj)->primdata)->SetDeltaBackground(x0));

    
    
  }

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyleDelta(r));
}

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

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

  
  x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[0], "set-delta-face in style-delta%"));
  if (n > 1) {
    x1 = WITH_VAR_STACK(unbundle_symset_family(p[1], "set-delta-face in style-delta%"));
  } else
    x1 = wxDEFAULT;

  
  r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)obj)->primdata)->SetDeltaFace(x0, x1));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyleDelta(r));
}

static Scheme_Object *os_wxStyleDeltaSetDelta(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(2);
  PRE_VAR_STACK_PUSH(0, p);
  PRE_VAR_STACK_PUSH(1, obj);
  REMEMBER_VAR_STACK();
  class wxStyleDelta* r INIT_NULLED_OUT;
  objscheme_check_valid(obj);
  if ((n >= 1) && WITH_REMEMBERED_STACK(istype_symset_changeFam(p[0], NULL))) {
    int x0;
    int x1;

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

    
    if (n != 2) 
      WITH_VAR_STACK(scheme_wrong_count("set-delta in style-delta% (family case)", 2, 2, n, p));
    x0 = WITH_VAR_STACK(unbundle_symset_changeFam(p[0], "set-delta in style-delta% (family case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_family(p[1], "set-delta in style-delta% (family case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)obj)->primdata)->SetDelta(x0, x1));

    
    
  } else if ((n >= 1) && WITH_REMEMBERED_STACK(istype_symset_changeStyle(p[0], NULL))) {
    int x0;
    int x1;

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

    
    if (n != 2) 
      WITH_VAR_STACK(scheme_wrong_count("set-delta in style-delta% (style case)", 2, 2, n, p));
    x0 = WITH_VAR_STACK(unbundle_symset_changeStyle(p[0], "set-delta in style-delta% (style case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_style(p[1], "set-delta in style-delta% (style case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)obj)->primdata)->SetDelta(x0, x1));

    
    
  } else if ((n >= 1) && WITH_REMEMBERED_STACK(istype_symset_changeWeight(p[0], NULL))) {
    int x0;
    int x1;

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

    
    if (n != 2) 
      WITH_VAR_STACK(scheme_wrong_count("set-delta in style-delta% (weight case)", 2, 2, n, p));
    x0 = WITH_VAR_STACK(unbundle_symset_changeWeight(p[0], "set-delta in style-delta% (weight case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_weight(p[1], "set-delta in style-delta% (weight case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)obj)->primdata)->SetDelta(x0, x1));

    
    
  } else if ((n >= 1) && WITH_REMEMBERED_STACK(istype_symset_changeUnderline(p[0], NULL))) {
    int x0;
    Bool x1;

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

    
    if (n != 2) 
      WITH_VAR_STACK(scheme_wrong_count("set-delta in style-delta% (underline case)", 2, 2, n, p));
    x0 = WITH_VAR_STACK(unbundle_symset_changeUnderline(p[0], "set-delta in style-delta% (underline case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[1], "set-delta in style-delta% (underline case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)obj)->primdata)->SetDelta(x0, x1));

    
    
  } else if ((n >= 1) && WITH_REMEMBERED_STACK(istype_symset_changeSize(p[0], NULL))) {
    int x0;
    int x1;

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

    
    if (n != 2) 
      WITH_VAR_STACK(scheme_wrong_count("set-delta in style-delta% (size case)", 2, 2, n, p));
    x0 = WITH_VAR_STACK(unbundle_symset_changeSize(p[0], "set-delta in style-delta% (size case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[1], 0, 255, "set-delta in style-delta% (size case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)obj)->primdata)->SetDelta(x0, x1));

    
    
  } else if ((n >= 1) && WITH_REMEMBERED_STACK(istype_symset_changeAlign(p[0], NULL))) {
    int x0;
    int x1;

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

    
    if (n != 2) 
      WITH_VAR_STACK(scheme_wrong_count("set-delta in style-delta% (size case)", 2, 2, n, p));
    x0 = WITH_VAR_STACK(unbundle_symset_changeAlign(p[0], "set-delta in style-delta% (size case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_align(p[1], "set-delta in style-delta% (size case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)obj)->primdata)->SetDelta(x0, x1));

    
    
  } else  {
    int x0;
    int x1;

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

    
    if ((n > 1)) 
      WITH_VAR_STACK(scheme_wrong_count("set-delta in style-delta% (no change argument case)", 0, 1, n, p));
    if (n > 0) {
      x0 = WITH_VAR_STACK(unbundle_symset_changeNoArg(p[0], "set-delta in style-delta% (no change argument case)"));
    } else
      x0 = wxCHANGE_NOTHING;

    x1 = 0;
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)obj)->primdata)->SetDelta(x0, x1));

    
    
  }

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyleDelta(r));
}

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

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

  return WITH_REMEMBERED_STACK(bundle_symset_family(v));
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-family in style-delta%", 1, 1, n, p));

  v = WITH_VAR_STACK(unbundle_symset_family(p[0], "set-family in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->family = v;

  return scheme_void;
}

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

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

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

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-face in style-delta%", 1, 1, n, p));

  v = (nstring)WITH_VAR_STACK(objscheme_unbundle_nullable_string(p[0], "set-face in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->face = v;

  return scheme_void;
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-size-mult in style-delta%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::sizeMult;
  else
    v = ((wxStyleDelta *)cobj->primdata)->sizeMult;

  return WITH_REMEMBERED_STACK(scheme_make_double(v));
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-size-mult in style-delta%", 1, 1, n, p));

  v = WITH_VAR_STACK(objscheme_unbundle_float(p[0], "set-size-mult in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->sizeMult = v;

  return scheme_void;
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-size-add in style-delta%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::sizeAdd;
  else
    v = ((wxStyleDelta *)cobj->primdata)->sizeAdd;

  return scheme_make_integer(v);
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-size-add in style-delta%", 1, 1, n, p));

  v = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[0], 0, 255, "set-size-add in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->sizeAdd = v;

  return scheme_void;
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-weight-on in style-delta%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::weightOn;
  else
    v = ((wxStyleDelta *)cobj->primdata)->weightOn;

  return WITH_REMEMBERED_STACK(bundle_symset_weight(v));
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-weight-on in style-delta%", 1, 1, n, p));

  v = WITH_VAR_STACK(unbundle_symset_weight(p[0], "set-weight-on in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->weightOn = v;

  return scheme_void;
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-weight-off in style-delta%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::weightOff;
  else
    v = ((wxStyleDelta *)cobj->primdata)->weightOff;

  return WITH_REMEMBERED_STACK(bundle_symset_weight(v));
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-weight-off in style-delta%", 1, 1, n, p));

  v = WITH_VAR_STACK(unbundle_symset_weight(p[0], "set-weight-off in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->weightOff = v;

  return scheme_void;
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-style-on in style-delta%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::styleOn;
  else
    v = ((wxStyleDelta *)cobj->primdata)->styleOn;

  return WITH_REMEMBERED_STACK(bundle_symset_style(v));
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-style-on in style-delta%", 1, 1, n, p));

  v = WITH_VAR_STACK(unbundle_symset_style(p[0], "set-style-on in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->styleOn = v;

  return scheme_void;
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-style-off in style-delta%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::styleOff;
  else
    v = ((wxStyleDelta *)cobj->primdata)->styleOff;

  return WITH_REMEMBERED_STACK(bundle_symset_style(v));
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-style-off in style-delta%", 1, 1, n, p));

  v = WITH_VAR_STACK(unbundle_symset_style(p[0], "set-style-off in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->styleOff = v;

  return scheme_void;
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-underlined-on in style-delta%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::underlinedOn;
  else
    v = ((wxStyleDelta *)cobj->primdata)->underlinedOn;

  return (v ? scheme_true : scheme_false);
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-underlined-on in style-delta%", 1, 1, n, p));

  v = WITH_VAR_STACK(objscheme_unbundle_bool(p[0], "set-underlined-on in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->underlinedOn = v;

  return scheme_void;
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-underlined-off in style-delta%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::underlinedOff;
  else
    v = ((wxStyleDelta *)cobj->primdata)->underlinedOff;

  return (v ? scheme_true : scheme_false);
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-underlined-off in style-delta%", 1, 1, n, p));

  v = WITH_VAR_STACK(objscheme_unbundle_bool(p[0], "set-underlined-off in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->underlinedOff = v;

  return scheme_void;
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-transparent-text-backing-on in style-delta%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::transparentTextBackingOn;
  else
    v = ((wxStyleDelta *)cobj->primdata)->transparentTextBackingOn;

  return (v ? scheme_true : scheme_false);
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-transparent-text-backing-on in style-delta%", 1, 1, n, p));

  v = WITH_VAR_STACK(objscheme_unbundle_bool(p[0], "set-transparent-text-backing-on in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->transparentTextBackingOn = v;

  return scheme_void;
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-transparent-text-backing-off in style-delta%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::transparentTextBackingOff;
  else
    v = ((wxStyleDelta *)cobj->primdata)->transparentTextBackingOff;

  return (v ? scheme_true : scheme_false);
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-transparent-text-backing-off in style-delta%", 1, 1, n, p));

  v = WITH_VAR_STACK(objscheme_unbundle_bool(p[0], "set-transparent-text-backing-off in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->transparentTextBackingOff = v;

  return scheme_void;
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-foreground-mult in style-delta%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::foregroundMult;
  else
    v = ((wxStyleDelta *)cobj->primdata)->foregroundMult;

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxMultColour(v));
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-background-mult in style-delta%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::backgroundMult;
  else
    v = ((wxStyleDelta *)cobj->primdata)->backgroundMult;

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxMultColour(v));
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-foreground-add in style-delta%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::foregroundAdd;
  else
    v = ((wxStyleDelta *)cobj->primdata)->foregroundAdd;

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxAddColour(v));
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-background-add in style-delta%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::backgroundAdd;
  else
    v = ((wxStyleDelta *)cobj->primdata)->backgroundAdd;

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxAddColour(v));
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-alignment-on in style-delta%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::alignmentOn;
  else
    v = ((wxStyleDelta *)cobj->primdata)->alignmentOn;

  return WITH_REMEMBERED_STACK(bundle_symset_align(v));
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-alignment-on in style-delta%", 1, 1, n, p));

  v = WITH_VAR_STACK(unbundle_symset_align(p[0], "set-alignment-on in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->alignmentOn = v;

  return scheme_void;
}

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

  objscheme_check_valid(obj);
  if (n) WITH_REMEMBERED_STACK(scheme_wrong_count("get-alignment-off in style-delta%", 0, 0, n, p));
  cobj = (Scheme_Class_Object *)obj;
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::alignmentOff;
  else
    v = ((wxStyleDelta *)cobj->primdata)->alignmentOff;

  return WITH_REMEMBERED_STACK(bundle_symset_align(v));
}

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

  WITH_VAR_STACK(objscheme_check_valid(obj));
  if (n != 1) WITH_VAR_STACK(scheme_wrong_count("set-alignment-off in style-delta%", 1, 1, n, p));

  v = WITH_VAR_STACK(unbundle_symset_align(p[0], "set-alignment-off in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->alignmentOff = v;

  return scheme_void;
}

static Scheme_Object *os_wxStyleDelta_ConstructScheme(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  SETUP_PRE_VAR_STACK(2);
  PRE_VAR_STACK_PUSH(0, obj);
  PRE_VAR_STACK_PUSH(1, p);
  os_wxStyleDelta *realobj INIT_NULLED_OUT;
  REMEMBER_VAR_STACK();
  if ((n >= 1) && WITH_REMEMBERED_STACK(istype_symset_changeAlign(p[0], NULL))) {
    int x0;
    int x1;

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

    
    if (n != 2) 
      WITH_VAR_STACK(scheme_wrong_count("initialization in style-delta% (size case)", 2, 2, n, p));
    x0 = WITH_VAR_STACK(unbundle_symset_changeAlign(p[0], "initialization in style-delta% (size case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_align(p[1], "initialization in style-delta% (size case)"));

    
    realobj = WITH_VAR_STACK(new os_wxStyleDelta CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxStyleDelta(x0, x1));
#endif
    realobj->__gc_external = (void *)obj;
    objscheme_note_creation(obj);
    
    
  } else if ((n >= 1) && WITH_REMEMBERED_STACK(istype_symset_changeSize(p[0], NULL))) {
    int x0;
    int x1;

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

    
    if (n != 2) 
      WITH_VAR_STACK(scheme_wrong_count("initialization in style-delta% (size case)", 2, 2, n, p));
    x0 = WITH_VAR_STACK(unbundle_symset_changeSize(p[0], "initialization in style-delta% (size case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[1], 0, 255, "initialization in style-delta% (size case)"));

    
    realobj = WITH_VAR_STACK(new os_wxStyleDelta CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxStyleDelta(x0, x1));
#endif
    realobj->__gc_external = (void *)obj;
    objscheme_note_creation(obj);
    
    
  } else if ((n >= 1) && WITH_REMEMBERED_STACK(istype_symset_changeUnderline(p[0], NULL))) {
    int x0;
    Bool x1;

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

    
    if (n != 2) 
      WITH_VAR_STACK(scheme_wrong_count("initialization in style-delta% (underline case)", 2, 2, n, p));
    x0 = WITH_VAR_STACK(unbundle_symset_changeUnderline(p[0], "initialization in style-delta% (underline case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[1], "initialization in style-delta% (underline case)"));

    
    realobj = WITH_VAR_STACK(new os_wxStyleDelta CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxStyleDelta(x0, x1));
#endif
    realobj->__gc_external = (void *)obj;
    objscheme_note_creation(obj);
    
    
  } else if ((n >= 1) && WITH_REMEMBERED_STACK(istype_symset_changeWeight(p[0], NULL))) {
    int x0;
    int x1;

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

    
    if (n != 2) 
      WITH_VAR_STACK(scheme_wrong_count("initialization in style-delta% (weight case)", 2, 2, n, p));
    x0 = WITH_VAR_STACK(unbundle_symset_changeWeight(p[0], "initialization in style-delta% (weight case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_weight(p[1], "initialization in style-delta% (weight case)"));

    
    realobj = WITH_VAR_STACK(new os_wxStyleDelta CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxStyleDelta(x0, x1));
#endif
    realobj->__gc_external = (void *)obj;
    objscheme_note_creation(obj);
    
    
  } else if ((n >= 1) && WITH_REMEMBERED_STACK(istype_symset_changeStyle(p[0], NULL))) {
    int x0;
    int x1;

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

    
    if (n != 2) 
      WITH_VAR_STACK(scheme_wrong_count("initialization in style-delta% (style case)", 2, 2, n, p));
    x0 = WITH_VAR_STACK(unbundle_symset_changeStyle(p[0], "initialization in style-delta% (style case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_style(p[1], "initialization in style-delta% (style case)"));

    
    realobj = WITH_VAR_STACK(new os_wxStyleDelta CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxStyleDelta(x0, x1));
#endif
    realobj->__gc_external = (void *)obj;
    objscheme_note_creation(obj);
    
    
  } else if ((n >= 1) && WITH_REMEMBERED_STACK(istype_symset_changeFam(p[0], NULL))) {
    int x0;
    int x1;

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

    
    if (n != 2) 
      WITH_VAR_STACK(scheme_wrong_count("initialization in style-delta% (family case)", 2, 2, n, p));
    x0 = WITH_VAR_STACK(unbundle_symset_changeFam(p[0], "initialization in style-delta% (family case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_family(p[1], "initialization in style-delta% (family case)"));

    
    realobj = WITH_VAR_STACK(new os_wxStyleDelta CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxStyleDelta(x0, x1));
#endif
    realobj->__gc_external = (void *)obj;
    objscheme_note_creation(obj);
    
    
  } else  {
    int x0;
    int x1;

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

    
    if ((n > 1)) 
      WITH_VAR_STACK(scheme_wrong_count("initialization in style-delta% (no change argument case)", 0, 1, n, p));
    if (n > 0) {
      x0 = WITH_VAR_STACK(unbundle_symset_changeNoArg(p[0], "initialization in style-delta% (no change argument case)"));
    } else
      x0 = wxCHANGE_NOTHING;

    x1 = 0;
    realobj = WITH_VAR_STACK(new os_wxStyleDelta CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxStyleDelta(x0, x1));
#endif
    realobj->__gc_external = (void *)obj;
    objscheme_note_creation(obj);
    
    
  }

  ((Scheme_Class_Object *)obj)->primdata = realobj;
  WITH_REMEMBERED_STACK(objscheme_register_primpointer(obj, &((Scheme_Class_Object *)obj)->primdata));
  ((Scheme_Class_Object *)obj)->primflag = 1;
  return obj;
}

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

  wxREGGLOB(os_wxStyleDelta_class);

  os_wxStyleDelta_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "style-delta%", "object%", os_wxStyleDelta_ConstructScheme, 39));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class, "copy", os_wxStyleDeltaCopy, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class, "collapse", os_wxStyleDeltaCollapse, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class, "equal?", os_wxStyleDeltaEqual, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class, "set-delta-foreground", os_wxStyleDeltaSetDeltaForeground, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class, "set-delta-background", os_wxStyleDeltaSetDeltaBackground, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class, "set-delta-face", os_wxStyleDeltaSetDeltaFace, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class, "set-delta", os_wxStyleDeltaSetDelta, 0, 2));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-family", objscheme_wxStyleDelta_Getfamily, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-family", objscheme_wxStyleDelta_Setfamily, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-face", objscheme_wxStyleDelta_Getface, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-face", objscheme_wxStyleDelta_Setface, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-size-mult", objscheme_wxStyleDelta_GetsizeMult, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-size-mult", objscheme_wxStyleDelta_SetsizeMult, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-size-add", objscheme_wxStyleDelta_GetsizeAdd, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-size-add", objscheme_wxStyleDelta_SetsizeAdd, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-weight-on", objscheme_wxStyleDelta_GetweightOn, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-weight-on", objscheme_wxStyleDelta_SetweightOn, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-weight-off", objscheme_wxStyleDelta_GetweightOff, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-weight-off", objscheme_wxStyleDelta_SetweightOff, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-style-on", objscheme_wxStyleDelta_GetstyleOn, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-style-on", objscheme_wxStyleDelta_SetstyleOn, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-style-off", objscheme_wxStyleDelta_GetstyleOff, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-style-off", objscheme_wxStyleDelta_SetstyleOff, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-underlined-on", objscheme_wxStyleDelta_GetunderlinedOn, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-underlined-on", objscheme_wxStyleDelta_SetunderlinedOn, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-underlined-off", objscheme_wxStyleDelta_GetunderlinedOff, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-underlined-off", objscheme_wxStyleDelta_SetunderlinedOff, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-transparent-text-backing-on", objscheme_wxStyleDelta_GettransparentTextBackingOn, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-transparent-text-backing-on", objscheme_wxStyleDelta_SettransparentTextBackingOn, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-transparent-text-backing-off", objscheme_wxStyleDelta_GettransparentTextBackingOff, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-transparent-text-backing-off", objscheme_wxStyleDelta_SettransparentTextBackingOff, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-foreground-mult", objscheme_wxStyleDelta_GetforegroundMult, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-background-mult", objscheme_wxStyleDelta_GetbackgroundMult, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-foreground-add", objscheme_wxStyleDelta_GetforegroundAdd, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-background-add", objscheme_wxStyleDelta_GetbackgroundAdd, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-alignment-on", objscheme_wxStyleDelta_GetalignmentOn, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-alignment-on", objscheme_wxStyleDelta_SetalignmentOn, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-alignment-off", objscheme_wxStyleDelta_GetalignmentOff, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-alignment-off", objscheme_wxStyleDelta_SetalignmentOff, 1, 1));

  WITH_VAR_STACK(scheme_made_class(os_wxStyleDelta_class));

  WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxStyleDelta, wxTYPE_STYLE_DELTA));

}

int objscheme_istype_wxStyleDelta(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (SAME_TYPE(SCHEME_TYPE(obj), scheme_object_type)
      && scheme_is_subclass(((Scheme_Class_Object *)obj)->sclass,          os_wxStyleDelta_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "style-delta% object or " XC_NULL_STR: "style-delta% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxStyleDelta(class wxStyleDelta *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_STYLE_DELTA) && (sobj = WITH_VAR_STACK(objscheme_bundle_by_type(realobj, realobj->__type))))
    return sobj;
  obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxStyleDelta_class));

  obj->primdata = realobj;
  WITH_VAR_STACK(objscheme_register_primpointer(obj, &obj->primdata));
  obj->primflag = 0;

  realobj->__gc_external = (void *)obj;
  return (Scheme_Object *)obj;
}

class wxStyleDelta *objscheme_unbundle_wxStyleDelta(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxStyleDelta(obj, where, nullOK);
  Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
  WITH_REMEMBERED_STACK(objscheme_check_valid(obj));
  if (o->primflag)
    return (os_wxStyleDelta *)o->primdata;
  else
    return (wxStyleDelta *)o->primdata;
}












class os_wxStyle : public wxStyle {
 public:

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

#ifdef MZ_PRECISE_GC
void os_wxStyle::gcMark() {
  wxStyle::gcMark();
}
void os_wxStyle::gcFixup() {
  wxStyle::gcFixup();
}
#endif

static Scheme_Object *os_wxStyle_class;
static Scheme_Object *os_wxStyle_interface;

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

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "switch-to in style<%>", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[1], "switch-to in style<%>", 1));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("style%","switch-to"), "bad device context: ", p[0]));
  WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->SwitchTo(x0, x1));

  
  
  return scheme_void;
}

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[0], "set-shift-style in style<%>", 0));

  
  WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->SetShiftStyle(x0));

  
  
  return scheme_void;
}

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

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetShiftStyle());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

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

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->IsJoin());

  
  
  return (r ? scheme_true : scheme_false);
}

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyleDelta(p[0], "set-delta in style<%>", 0));

  
  WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->SetDelta(x0));

  
  
  return scheme_void;
}

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyleDelta(p[0], "get-delta in style<%>", 0));

  
  WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetDelta(x0));

  
  
  return scheme_void;
}

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[0], "set-base-style in style<%>", 0));

  
  WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->SetBaseStyle(x0));

  
  
  return scheme_void;
}

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

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetBaseStyle());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "get-text-width in style<%>", 0));

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetTextWidth(x0));

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "get-text-space in style<%>", 0));

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetTextSpace(x0));

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "get-text-descent in style<%>", 0));

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetTextDescent(x0));

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[0], "get-text-height in style<%>", 0));

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetTextHeight(x0));

  
  
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

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

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetTransparentTextBacking());

  
  
  return (r ? scheme_true : scheme_false);
}

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

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetAlignment());

  
  
  return WITH_REMEMBERED_STACK(bundle_symset_align(r));
}

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

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetBackground());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxColour(r));
}

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

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetForeground());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxColour(r));
}

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

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetFont());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxFont(r));
}

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

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetUnderlined());

  
  
  return (r ? scheme_true : scheme_false);
}

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

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetStyle());

  
  
  return WITH_REMEMBERED_STACK(bundle_symset_style(r));
}

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

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetWeight());

  
  
  return WITH_REMEMBERED_STACK(bundle_symset_weight(r));
}

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

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetSize());

  
  
  return scheme_make_integer(r);
}

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

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetFace());

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

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

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetFamily());

  
  
  return WITH_REMEMBERED_STACK(bundle_symset_family(r));
}

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

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)obj)->primdata)->GetName());

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

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

  wxREGGLOB(os_wxStyle_class);
  wxREGGLOB(os_wxStyle_interface);

  os_wxStyle_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "style%", "object%", NULL, 24));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "switch-to", os_wxStyleSwitchTo, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "set-shift-style", os_wxStyleSetShiftStyle, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-shift-style", os_wxStyleGetShiftStyle, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "is-join?", os_wxStyleIsJoin, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "set-delta", os_wxStyleSetDelta, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-delta", os_wxStyleGetDelta, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "set-base-style", os_wxStyleSetBaseStyle, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-base-style", os_wxStyleGetBaseStyle, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-text-width", os_wxStyleGetTextWidth, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-text-space", os_wxStyleGetTextSpace, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-text-descent", os_wxStyleGetTextDescent, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-text-height", os_wxStyleGetTextHeight, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-transparent-text-backing", os_wxStyleGetTransparentTextBacking, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-alignment", os_wxStyleGetAlignment, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-background", os_wxStyleGetBackground, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-foreground", os_wxStyleGetForeground, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-font", os_wxStyleGetFont, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-underlined", os_wxStyleGetUnderlined, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-style", os_wxStyleGetStyle, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-weight", os_wxStyleGetWeight, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-size", os_wxStyleGetSize, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-face", os_wxStyleGetFace, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-family", os_wxStyleGetFamily, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-name", os_wxStyleGetName, 0, 0));


  WITH_VAR_STACK(scheme_made_class(os_wxStyle_class));

  os_wxStyle_interface = WITH_VAR_STACK(scheme_class_to_interface(os_wxStyle_class, "style" "<%>"));

  WITH_VAR_STACK(objscheme_add_global_interface(os_wxStyle_interface, "style" "<%>", env));
  WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxStyle, wxTYPE_STYLE));

}

int objscheme_istype_wxStyle(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (SAME_TYPE(SCHEME_TYPE(obj), scheme_object_type)
      && scheme_is_subclass(((Scheme_Class_Object *)obj)->sclass,          os_wxStyle_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "style% object or " XC_NULL_STR: "style% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxStyle(class wxStyle *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_STYLE) && (sobj = WITH_VAR_STACK(objscheme_bundle_by_type(realobj, realobj->__type))))
    return sobj;
  obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxStyle_class));

  obj->primdata = realobj;
  WITH_VAR_STACK(objscheme_register_primpointer(obj, &obj->primdata));
  obj->primflag = 0;

  realobj->__gc_external = (void *)obj;
  return (Scheme_Object *)obj;
}

class wxStyle *objscheme_unbundle_wxStyle(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxStyle(obj, where, nullOK);
  Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
  WITH_REMEMBERED_STACK(objscheme_check_valid(obj));
  if (o->primflag)
    return (os_wxStyle *)o->primdata;
  else
    return (wxStyle *)o->primdata;
}






// @ "clear" : void Clear();
// @ "copy" : void Copy(wxStyleList!);








static void NotifyCallbackToScheme(wxStyle *, Scheme_Object *f);




class os_wxStyleList : public wxStyleList {
 public:

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

#ifdef MZ_PRECISE_GC
void os_wxStyleList::gcMark() {
  wxStyleList::gcMark();
}
void os_wxStyleList::gcFixup() {
  wxStyleList::gcFixup();
}
#endif

static Scheme_Object *os_wxStyleList_class;

os_wxStyleList::os_wxStyleList CONSTRUCTOR_ARGS(())
CONSTRUCTOR_INIT(: wxStyleList())
{
}

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

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

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

  
  x0 = ((void *)p[0]);

  
  WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)obj)->primdata)->ForgetNotification(x0));

  
  
  return scheme_void;
}

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

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

  
  x0 = (wxStyleNotifyFunc)NotifyCallbackToScheme;
  x1 = (scheme_check_proc_arity(METHODNAME("style-list%","notify-on-change"), 1, 0, 0, p), p[0]);

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)obj)->primdata)->NotifyOnChange(x0, x1));

  
  
  return ((Scheme_Object *)r);
}

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[0], "style-to-index in style-list%", 0));

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)obj)->primdata)->StyleToIndex(x0));

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

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[0], "index-to-style in style-list%"));

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)obj)->primdata)->IndexToStyle(x0));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[0], "convert in style-list%", 0));

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)obj)->primdata)->Convert(x0));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

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

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

  
  x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[0], "replace-named-style in style-list%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[1], "replace-named-style in style-list%", 0));

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)obj)->primdata)->ReplaceNamedStyle(x0, x1));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

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

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

  
  x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[0], "new-named-style in style-list%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[1], "new-named-style in style-list%", 0));

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)obj)->primdata)->NewNamedStyle(x0, x1));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

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

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

  
  x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[0], "find-named-style in style-list%"));

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)obj)->primdata)->FindNamedStyle(x0));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

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

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[0], "find-or-create-join-style in style-list%", 1));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[1], "find-or-create-join-style in style-list%", 0));

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)obj)->primdata)->FindOrCreateJoinStyle(x0, x1));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

static Scheme_Object *os_wxStyleListFindOrCreateStyle(Scheme_Object *obj, int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxStyle* r;
  objscheme_check_valid(obj);
  class wxStyle* x0 INIT_NULLED_OUT;
  class wxStyleDelta* x1 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[0], "find-or-create-style in style-list%", 1));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxStyleDelta(p[1], "find-or-create-style in style-list%", 0));

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)obj)->primdata)->FindOrCreateStyle(x0, x1));

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

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

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

  

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)obj)->primdata)->Number());

  
  
  return scheme_make_integer(r);
}

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

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

  

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)obj)->primdata)->BasicStyle());

  
  
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

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

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

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

  
  realobj = WITH_VAR_STACK(new os_wxStyleList CONSTRUCTOR_ARGS(()));
#ifdef MZ_PRECISE_GC
  WITH_VAR_STACK(realobj->gcInit_wxStyleList());
#endif
  realobj->__gc_external = (void *)obj;
  objscheme_note_creation(obj);
  
  
  ((Scheme_Class_Object *)obj)->primdata = realobj;
  WITH_REMEMBERED_STACK(objscheme_register_primpointer(obj, &((Scheme_Class_Object *)obj)->primdata));
  ((Scheme_Class_Object *)obj)->primflag = 1;
  return obj;
}

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

  wxREGGLOB(os_wxStyleList_class);

  os_wxStyleList_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "style-list%", "object%", os_wxStyleList_ConstructScheme, 12));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "forget-notification", os_wxStyleListForgetNotification, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "notify-on-change", os_wxStyleListNotifyOnChange, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "style-to-index", os_wxStyleListStyleToIndex, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "index-to-style", os_wxStyleListIndexToStyle, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "convert", os_wxStyleListConvert, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "replace-named-style", os_wxStyleListReplaceNamedStyle, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "new-named-style", os_wxStyleListNewNamedStyle, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "find-named-style", os_wxStyleListFindNamedStyle, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "find-or-create-join-style", os_wxStyleListFindOrCreateJoinStyle, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "find-or-create-style", os_wxStyleListFindOrCreateStyle, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "number", os_wxStyleListNumber, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "basic-style", os_wxStyleListBasicStyle, 0, 0));


  WITH_VAR_STACK(scheme_made_class(os_wxStyleList_class));

  WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxStyleList, wxTYPE_STYLE_LIST));

  Scheme_Object *xcconsttmp INIT_NULLED_OUT;
  xcconsttmp = WITH_VAR_STACK(objscheme_bundle_wxStyleList(wxTheStyleList));
  WITH_VAR_STACK(scheme_install_xc_global("the-style-list", xcconsttmp, env));
}

int objscheme_istype_wxStyleList(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (SAME_TYPE(SCHEME_TYPE(obj), scheme_object_type)
      && scheme_is_subclass(((Scheme_Class_Object *)obj)->sclass,          os_wxStyleList_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "style-list% object or " XC_NULL_STR: "style-list% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxStyleList(class wxStyleList *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_STYLE_LIST) && (sobj = WITH_VAR_STACK(objscheme_bundle_by_type(realobj, realobj->__type))))
    return sobj;
  obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxStyleList_class));

  obj->primdata = realobj;
  WITH_VAR_STACK(objscheme_register_primpointer(obj, &obj->primdata));
  obj->primflag = 0;

  realobj->__gc_external = (void *)obj;
  return (Scheme_Object *)obj;
}

class wxStyleList *objscheme_unbundle_wxStyleList(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxStyleList(obj, where, nullOK);
  Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
  WITH_REMEMBERED_STACK(objscheme_check_valid(obj));
  if (o->primflag)
    return (os_wxStyleList *)o->primdata;
  else
    return (wxStyleList *)o->primdata;
}


static void NotifyCallbackToScheme(wxStyle *s, Scheme_Object *f)
{
  Scheme_Object *p[1];
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, f);


  p[0] = s ? WITH_VAR_STACK(objscheme_bundle_wxStyle(s)) : scheme_false;

  WITH_VAR_STACK(scheme_apply_multi(f, 1, p));
}

#ifdef MZ_PRECISE_GC
END_XFORM_SKIP;
#endif
