Back to index

plt-scheme  4.2.1
wxs_item.cxx
Go to the documentation of this file.
00001 /* DO NOT EDIT THIS FILE. */
00002 /* This file was generated by xctocc from "wxs_item.xc". */
00003 
00004 
00005 #if defined(_MSC_VER)
00006 # include "wx.h"
00007 #endif
00008 #if defined(OS_X)
00009 # include "common.h"
00010 #endif
00011 
00012 #include "wx_item.h"
00013 #include "wx_messg.h"
00014 
00015 
00016 
00017 
00018 #ifdef wx_x
00019 # define BM_SELECTED(map) ((map)->selectedTo)
00020 #endif
00021 #if defined(wx_mac) || defined(wx_msw)
00022 # define BM_SELECTED(map) ((map)->selectedInto)
00023 #endif
00024 # define BM_IN_USE(map) ((map)->selectedIntoDC)
00025 
00026 
00027 
00028 
00029 #define ESCAPE_NO_RET_VAL /*empty*/
00030 
00031 
00032 #include "wxscheme.h"
00033 #include "wxs_item.h"
00034 
00035 #ifdef MZ_PRECISE_GC
00036 START_XFORM_SKIP;
00037 #endif
00038 
00039 
00040 
00041 
00042 // @INCLUDE wxs_icol.xci
00043 
00044 
00045 // @ "set-background-colour" : void SetBackgroundColour(wxColour!);
00046 // @ "set-label-colour" : void SetLabelColour(wxColour!);
00047 // @ "set-button-colour" : void SetButtonColour(wxColour!);
00048 
00049 class os_wxItem : public wxItem {
00050  public:
00051 
00052   ~os_wxItem();
00053 #ifdef MZ_PRECISE_GC
00054   void gcMark();
00055   void gcFixup();
00056 #endif
00057 };
00058 
00059 #ifdef MZ_PRECISE_GC
00060 void os_wxItem::gcMark() {
00061   wxItem::gcMark();
00062 }
00063 void os_wxItem::gcFixup() {
00064   wxItem::gcFixup();
00065 }
00066 #endif
00067 
00068 static Scheme_Object *os_wxItem_class;
00069 
00070 os_wxItem::~os_wxItem()
00071 {
00072     objscheme_destroy(this, (Scheme_Object *) __gc_external);
00073 }
00074 
00075 static Scheme_Object *os_wxItemSetLabel(int n,  Scheme_Object *p[])
00076 {
00077   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00078   REMEMBER_VAR_STACK();
00079   objscheme_check_valid(os_wxItem_class, "set-label in item%", n, p);
00080   string x0 INIT_NULLED_OUT;
00081 
00082   SETUP_VAR_STACK_REMEMBERED(2);
00083   VAR_STACK_PUSH(0, p);
00084   VAR_STACK_PUSH(1, x0);
00085 
00086   
00087   x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+0], "set-label in item%"));
00088 
00089   
00090   WITH_VAR_STACK(((wxItem *)((Scheme_Class_Object *)p[0])->primdata)->SetLabel(x0));
00091 
00092   
00093   
00094   READY_TO_RETURN;
00095   return scheme_void;
00096 }
00097 
00098 static Scheme_Object *os_wxItemGetLabel(int n,  Scheme_Object *p[])
00099 {
00100   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00101   REMEMBER_VAR_STACK();
00102   nstring r;
00103   objscheme_check_valid(os_wxItem_class, "get-label in item%", n, p);
00104 
00105   SETUP_VAR_STACK_REMEMBERED(1);
00106   VAR_STACK_PUSH(0, p);
00107 
00108   
00109 
00110   
00111   r = WITH_VAR_STACK(((wxItem *)((Scheme_Class_Object *)p[0])->primdata)->GetLabel());
00112 
00113   
00114   
00115   READY_TO_RETURN;
00116   return WITH_REMEMBERED_STACK(objscheme_bundle_string((char *)r));
00117 }
00118 
00119 static Scheme_Object *os_wxItemCommand(int n,  Scheme_Object *p[])
00120 {
00121   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00122   REMEMBER_VAR_STACK();
00123   objscheme_check_valid(os_wxItem_class, "command in item%", n, p);
00124   class wxCommandEvent* x0 INIT_NULLED_OUT;
00125 
00126   SETUP_VAR_STACK_REMEMBERED(2);
00127   VAR_STACK_PUSH(0, p);
00128   VAR_STACK_PUSH(1, x0);
00129 
00130   
00131   x0 = WITH_VAR_STACK(objscheme_unbundle_wxCommandEvent(p[POFFSET+0], "command in item%", 0));
00132 
00133   
00134   WITH_VAR_STACK(((wxItem *)((Scheme_Class_Object *)p[0])->primdata)->Command(x0));
00135 
00136   
00137   
00138   READY_TO_RETURN;
00139   return scheme_void;
00140 }
00141 
00142 void objscheme_setup_wxItem(Scheme_Env *env)
00143 {
00144   SETUP_VAR_STACK(1);
00145   VAR_STACK_PUSH(0, env);
00146 
00147   wxREGGLOB(os_wxItem_class);
00148 
00149   os_wxItem_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "item%", "window%", NULL, 3));
00150 
00151   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxItem_class, "set-label" " method", (Scheme_Method_Prim *)os_wxItemSetLabel, 1, 1));
00152   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxItem_class, "get-label" " method", (Scheme_Method_Prim *)os_wxItemGetLabel, 0, 0));
00153   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxItem_class, "command" " method", (Scheme_Method_Prim *)os_wxItemCommand, 1, 1));
00154 
00155 
00156   WITH_VAR_STACK(scheme_made_class(os_wxItem_class));
00157 
00158   WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxItem, wxTYPE_ITEM));
00159 
00160   READY_TO_RETURN;
00161 }
00162 
00163 int objscheme_istype_wxItem(Scheme_Object *obj, const char *stop, int nullOK)
00164 {
00165   REMEMBER_VAR_STACK();
00166   if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
00167   if (objscheme_is_a(obj,  os_wxItem_class))
00168     return 1;
00169   else {
00170     if (!stop)
00171        return 0;
00172     WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "item% object or " XC_NULL_STR: "item% object", -1, 0, &obj));
00173     return 0;
00174   }
00175 }
00176 
00177 Scheme_Object *objscheme_bundle_wxItem(class wxItem *realobj)
00178 {
00179   Scheme_Class_Object *obj INIT_NULLED_OUT;
00180   Scheme_Object *sobj INIT_NULLED_OUT;
00181 
00182   if (!realobj) return XC_SCHEME_NULL;
00183 
00184   if (realobj->__gc_external)
00185     return (Scheme_Object *)realobj->__gc_external;
00186 
00187   SETUP_VAR_STACK(2);
00188   VAR_STACK_PUSH(0, obj);
00189   VAR_STACK_PUSH(1, realobj);
00190 
00191   if ((realobj->__type != wxTYPE_ITEM) && (sobj = WITH_VAR_STACK(objscheme_bundle_by_type(realobj, realobj->__type))))
00192     { READY_TO_RETURN; return sobj; }
00193   obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxItem_class));
00194 
00195   obj->primdata = realobj;
00196   WITH_VAR_STACK(objscheme_register_primpointer(obj, &obj->primdata));
00197   obj->primflag = 0;
00198 
00199   realobj->__gc_external = (void *)obj;
00200   READY_TO_RETURN;
00201   return (Scheme_Object *)obj;
00202 }
00203 
00204 class wxItem *objscheme_unbundle_wxItem(Scheme_Object *obj, const char *where, int nullOK)
00205 {
00206   if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;
00207 
00208   REMEMBER_VAR_STACK();
00209 
00210   (void)objscheme_istype_wxItem(obj, where, nullOK);
00211   Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
00212   WITH_REMEMBERED_STACK(objscheme_check_valid(NULL, NULL, 0, &obj));
00213   if (o->primflag)
00214     return (os_wxItem *)o->primdata;
00215   else
00216     return (wxItem *)o->primdata;
00217 }
00218 
00219 
00220 static Scheme_Object *messageStyle_wxINVISIBLE_sym = NULL;
00221 
00222 static void init_symset_messageStyle(void) {
00223   REMEMBER_VAR_STACK();
00224   wxREGGLOB(messageStyle_wxINVISIBLE_sym);
00225   messageStyle_wxINVISIBLE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("deleted"));
00226 }
00227 
00228 static int unbundle_symset_messageStyle(Scheme_Object *v, const char *where) {
00229   SETUP_VAR_STACK(1);
00230   VAR_STACK_PUSH(0, v);
00231   if (!messageStyle_wxINVISIBLE_sym) WITH_VAR_STACK(init_symset_messageStyle());
00232   Scheme_Object *i INIT_NULLED_OUT, *l = v;
00233   long result = 0;
00234   while (SCHEME_PAIRP(l)) {
00235   i = SCHEME_CAR(l);
00236   if (0) { }
00237   else if (i == messageStyle_wxINVISIBLE_sym) { result = result | wxINVISIBLE; }
00238   else { break; } 
00239   l = SCHEME_CDR(l);
00240   }
00241   if (SCHEME_NULLP(l)) { READY_TO_RETURN; return result; }
00242   if (where) WITH_VAR_STACK(scheme_wrong_type(where, "messageStyle symbol list", -1, 0, &v));
00243   READY_TO_RETURN;
00244   return 0;
00245 }
00246 
00247 static int istype_symset_messageStyle(Scheme_Object *v, const char *where) {
00248   SETUP_VAR_STACK(1);
00249   VAR_STACK_PUSH(0, v);
00250   if (!messageStyle_wxINVISIBLE_sym) WITH_VAR_STACK(init_symset_messageStyle());
00251   Scheme_Object *i INIT_NULLED_OUT, *l = v;
00252   long result = 1;
00253   while (SCHEME_PAIRP(l)) {
00254   i = SCHEME_CAR(l);
00255   if (0) { }
00256   else if (i == messageStyle_wxINVISIBLE_sym) { ; }
00257   else { break; } 
00258   l = SCHEME_CDR(l);
00259   }
00260   if (SCHEME_NULLP(l)) { READY_TO_RETURN; return result; }
00261   if (where) WITH_VAR_STACK(scheme_wrong_type(where, "messageStyle symbol list", -1, 0, &v));
00262   READY_TO_RETURN;
00263   return 0;
00264 }
00265 
00266 
00267 static Scheme_Object *iconID_wxMSGICON_APP_sym = NULL;
00268 static Scheme_Object *iconID_wxMSGICON_WARNING_sym = NULL;
00269 static Scheme_Object *iconID_wxMSGICON_ERROR_sym = NULL;
00270 
00271 static void init_symset_iconID(void) {
00272   REMEMBER_VAR_STACK();
00273   wxREGGLOB(iconID_wxMSGICON_APP_sym);
00274   iconID_wxMSGICON_APP_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("app"));
00275   wxREGGLOB(iconID_wxMSGICON_WARNING_sym);
00276   iconID_wxMSGICON_WARNING_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("caution"));
00277   wxREGGLOB(iconID_wxMSGICON_ERROR_sym);
00278   iconID_wxMSGICON_ERROR_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("stop"));
00279 }
00280 
00281 static int unbundle_symset_iconID(Scheme_Object *v, const char *where) {
00282   SETUP_VAR_STACK(1);
00283   VAR_STACK_PUSH(0, v);
00284   if (!iconID_wxMSGICON_ERROR_sym) WITH_VAR_STACK(init_symset_iconID());
00285   if (0) { }
00286   else if (v == iconID_wxMSGICON_APP_sym) { READY_TO_RETURN; return wxMSGICON_APP; }
00287   else if (v == iconID_wxMSGICON_WARNING_sym) { READY_TO_RETURN; return wxMSGICON_WARNING; }
00288   else if (v == iconID_wxMSGICON_ERROR_sym) { READY_TO_RETURN; return wxMSGICON_ERROR; }
00289   if (where) WITH_VAR_STACK(scheme_wrong_type(where, "iconID symbol", -1, 0, &v));
00290   READY_TO_RETURN;
00291   return 0;
00292 }
00293 
00294 static int istype_symset_iconID(Scheme_Object *v, const char *where) {
00295   SETUP_VAR_STACK(1);
00296   VAR_STACK_PUSH(0, v);
00297   if (!iconID_wxMSGICON_ERROR_sym) WITH_VAR_STACK(init_symset_iconID());
00298   if (0) { }
00299   else if (v == iconID_wxMSGICON_APP_sym) { READY_TO_RETURN; return 1; }
00300   else if (v == iconID_wxMSGICON_WARNING_sym) { READY_TO_RETURN; return 1; }
00301   else if (v == iconID_wxMSGICON_ERROR_sym) { READY_TO_RETURN; return 1; }
00302   if (where) WITH_VAR_STACK(scheme_wrong_type(where, "iconID symbol", -1, 0, &v));
00303   READY_TO_RETURN;
00304   return 0;
00305 }
00306 
00307 
00308 
00309 
00310 
00311 
00312 
00313 
00314 
00315 
00316 
00317 
00318 class os_wxMessage : public wxMessage {
00319  public:
00320 
00321   os_wxMessage CONSTRUCTOR_ARGS((class wxPanel* x0, string x1, int x2 = -1, int x3 = -1, int x4 = 0, class wxFont* x5 = NULL, string x6 = "message"));
00322 #ifndef MZ_PRECISE_GC
00323   os_wxMessage CONSTRUCTOR_ARGS((class wxPanel* x0, class wxBitmap* x1, int x2 = -1, int x3 = -1, int x4 = 0, class wxFont* x5 = NULL, string x6 = "message"));
00324 #endif
00325 #ifndef MZ_PRECISE_GC
00326   os_wxMessage CONSTRUCTOR_ARGS((class wxPanel* x0, int x1, int x2 = -1, int x3 = -1, int x4 = 0, class wxFont* x5 = NULL, string x6 = "message"));
00327 #endif
00328   ~os_wxMessage();
00329   void OnDropFile(epathname x0);
00330   Bool PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1);
00331   Bool PreOnChar(class wxWindow* x0, class wxKeyEvent* x1);
00332   void OnSize(int x0, int x1);
00333   void OnSetFocus();
00334   void OnKillFocus();
00335 #ifdef MZ_PRECISE_GC
00336   void gcMark();
00337   void gcFixup();
00338 #endif
00339 };
00340 
00341 #ifdef MZ_PRECISE_GC
00342 void os_wxMessage::gcMark() {
00343   wxMessage::gcMark();
00344 }
00345 void os_wxMessage::gcFixup() {
00346   wxMessage::gcFixup();
00347 }
00348 #endif
00349 
00350 static Scheme_Object *os_wxMessage_class;
00351 
00352 os_wxMessage::os_wxMessage CONSTRUCTOR_ARGS((class wxPanel* x0, string x1, int x2, int x3, int x4, class wxFont* x5, string x6))
00353 CONSTRUCTOR_INIT(: wxMessage(x0, x1, x2, x3, x4, x5, x6))
00354 {
00355 }
00356 
00357 #ifndef MZ_PRECISE_GC
00358 os_wxMessage::os_wxMessage CONSTRUCTOR_ARGS((class wxPanel* x0, class wxBitmap* x1, int x2, int x3, int x4, class wxFont* x5, string x6))
00359 CONSTRUCTOR_INIT(: wxMessage(x0, x1, x2, x3, x4, x5, x6))
00360 {
00361 }
00362 #endif
00363 
00364 #ifndef MZ_PRECISE_GC
00365 os_wxMessage::os_wxMessage CONSTRUCTOR_ARGS((class wxPanel* x0, int x1, int x2, int x3, int x4, class wxFont* x5, string x6))
00366 CONSTRUCTOR_INIT(: wxMessage(x0, x1, x2, x3, x4, x5, x6))
00367 {
00368 }
00369 #endif
00370 
00371 os_wxMessage::~os_wxMessage()
00372 {
00373     objscheme_destroy(this, (Scheme_Object *) __gc_external);
00374 }
00375 
00376 static Scheme_Object *os_wxMessageOnDropFile(int n, Scheme_Object *p[]);
00377 
00378 void os_wxMessage::OnDropFile(epathname x0)
00379 {
00380   Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
00381   Scheme_Object *v;
00382   Scheme_Object *method INIT_NULLED_OUT;
00383 #ifdef MZ_PRECISE_GC
00384   os_wxMessage *sElF = this;
00385 #endif
00386   static void *mcache = 0;
00387 
00388   SETUP_VAR_STACK(6);
00389   VAR_STACK_PUSH(0, method);
00390   VAR_STACK_PUSH(1, sElF);
00391   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
00392   VAR_STACK_PUSH(5, x0);
00393   SET_VAR_STACK();
00394 
00395   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMessage_class, "on-drop-file", &mcache);
00396   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMessageOnDropFile)) {
00397     SET_VAR_STACK();
00398     READY_TO_RETURN; ASSELF wxMessage::OnDropFile(x0);
00399   } else {
00400   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00401   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
00402   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
00403   p[0] = (Scheme_Object *) ASSELF __gc_external;
00404 
00405   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
00406   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00407   
00408      READY_TO_RETURN;
00409   }
00410 }
00411 
00412 static Scheme_Object *os_wxMessagePreOnEvent(int n, Scheme_Object *p[]);
00413 
00414 Bool os_wxMessage::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
00415 {
00416   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
00417   Scheme_Object *v;
00418   Scheme_Object *method INIT_NULLED_OUT;
00419 #ifdef MZ_PRECISE_GC
00420   os_wxMessage *sElF = this;
00421 #endif
00422   static void *mcache = 0;
00423 
00424   SETUP_VAR_STACK(7);
00425   VAR_STACK_PUSH(0, method);
00426   VAR_STACK_PUSH(1, sElF);
00427   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
00428   VAR_STACK_PUSH(5, x0);
00429   VAR_STACK_PUSH(6, x1);
00430   SET_VAR_STACK();
00431 
00432   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMessage_class, "pre-on-event", &mcache);
00433   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMessagePreOnEvent)) {
00434     SET_VAR_STACK();
00435     return FALSE;
00436   } else {
00437   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00438   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
00439   p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
00440   ESCAPE_BLOCK(1)
00441   p[0] = (Scheme_Object *) ASSELF __gc_external;
00442 
00443   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
00444   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00445   
00446   {
00447      Bool resval;
00448      resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "pre-on-event in message%"", extracting return value"));
00449      READY_TO_RETURN;
00450      return resval;
00451   }
00452   }
00453 }
00454 
00455 static Scheme_Object *os_wxMessagePreOnChar(int n, Scheme_Object *p[]);
00456 
00457 Bool os_wxMessage::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
00458 {
00459   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
00460   Scheme_Object *v;
00461   Scheme_Object *method INIT_NULLED_OUT;
00462 #ifdef MZ_PRECISE_GC
00463   os_wxMessage *sElF = this;
00464 #endif
00465   static void *mcache = 0;
00466 
00467   SETUP_VAR_STACK(7);
00468   VAR_STACK_PUSH(0, method);
00469   VAR_STACK_PUSH(1, sElF);
00470   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
00471   VAR_STACK_PUSH(5, x0);
00472   VAR_STACK_PUSH(6, x1);
00473   SET_VAR_STACK();
00474 
00475   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMessage_class, "pre-on-char", &mcache);
00476   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMessagePreOnChar)) {
00477     SET_VAR_STACK();
00478     return FALSE;
00479   } else {
00480   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00481   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
00482   p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
00483   ESCAPE_BLOCK(1)
00484   p[0] = (Scheme_Object *) ASSELF __gc_external;
00485 
00486   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
00487   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00488   
00489   {
00490      Bool resval;
00491      resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "pre-on-char in message%"", extracting return value"));
00492      READY_TO_RETURN;
00493      return resval;
00494   }
00495   }
00496 }
00497 
00498 static Scheme_Object *os_wxMessageOnSize(int n, Scheme_Object *p[]);
00499 
00500 void os_wxMessage::OnSize(int x0, int x1)
00501 {
00502   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
00503   Scheme_Object *v;
00504   Scheme_Object *method INIT_NULLED_OUT;
00505 #ifdef MZ_PRECISE_GC
00506   os_wxMessage *sElF = this;
00507 #endif
00508   static void *mcache = 0;
00509 
00510   SETUP_VAR_STACK(5);
00511   VAR_STACK_PUSH(0, method);
00512   VAR_STACK_PUSH(1, sElF);
00513   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
00514   SET_VAR_STACK();
00515 
00516   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMessage_class, "on-size", &mcache);
00517   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMessageOnSize)) {
00518     SET_VAR_STACK();
00519     READY_TO_RETURN; ASSELF wxMessage::OnSize(x0, x1);
00520   } else {
00521   
00522   p[POFFSET+0] = scheme_make_integer(x0);
00523   p[POFFSET+1] = scheme_make_integer(x1);
00524   
00525   p[0] = (Scheme_Object *) ASSELF __gc_external;
00526 
00527   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
00528   
00529   
00530      READY_TO_RETURN;
00531   }
00532 }
00533 
00534 static Scheme_Object *os_wxMessageOnSetFocus(int n, Scheme_Object *p[]);
00535 
00536 void os_wxMessage::OnSetFocus()
00537 {
00538   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
00539   Scheme_Object *v;
00540   Scheme_Object *method INIT_NULLED_OUT;
00541 #ifdef MZ_PRECISE_GC
00542   os_wxMessage *sElF = this;
00543 #endif
00544   static void *mcache = 0;
00545 
00546   SETUP_VAR_STACK(5);
00547   VAR_STACK_PUSH(0, method);
00548   VAR_STACK_PUSH(1, sElF);
00549   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
00550   SET_VAR_STACK();
00551 
00552   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMessage_class, "on-set-focus", &mcache);
00553   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMessageOnSetFocus)) {
00554     SET_VAR_STACK();
00555     READY_TO_RETURN; ASSELF wxMessage::OnSetFocus();
00556   } else {
00557   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00558   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
00559   p[0] = (Scheme_Object *) ASSELF __gc_external;
00560 
00561   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
00562   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00563   
00564      READY_TO_RETURN;
00565   }
00566 }
00567 
00568 static Scheme_Object *os_wxMessageOnKillFocus(int n, Scheme_Object *p[]);
00569 
00570 void os_wxMessage::OnKillFocus()
00571 {
00572   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
00573   Scheme_Object *v;
00574   Scheme_Object *method INIT_NULLED_OUT;
00575 #ifdef MZ_PRECISE_GC
00576   os_wxMessage *sElF = this;
00577 #endif
00578   static void *mcache = 0;
00579 
00580   SETUP_VAR_STACK(5);
00581   VAR_STACK_PUSH(0, method);
00582   VAR_STACK_PUSH(1, sElF);
00583   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
00584   SET_VAR_STACK();
00585 
00586   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxMessage_class, "on-kill-focus", &mcache);
00587   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxMessageOnKillFocus)) {
00588     SET_VAR_STACK();
00589     READY_TO_RETURN; ASSELF wxMessage::OnKillFocus();
00590   } else {
00591   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00592   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
00593   p[0] = (Scheme_Object *) ASSELF __gc_external;
00594 
00595   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
00596   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00597   
00598      READY_TO_RETURN;
00599   }
00600 }
00601 
00602 static Scheme_Object *os_wxMessageGetFont(int n,  Scheme_Object *p[])
00603 {
00604   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00605   REMEMBER_VAR_STACK();
00606   class wxFont* r;
00607   objscheme_check_valid(os_wxMessage_class, "get-font in message%", n, p);
00608 
00609   SETUP_VAR_STACK_REMEMBERED(1);
00610   VAR_STACK_PUSH(0, p);
00611 
00612   
00613 
00614   
00615   r = WITH_VAR_STACK(((wxMessage *)((Scheme_Class_Object *)p[0])->primdata)->GetFont());
00616 
00617   
00618   
00619   READY_TO_RETURN;
00620   return WITH_REMEMBERED_STACK(objscheme_bundle_wxFont(r));
00621 }
00622 
00623 static Scheme_Object *os_wxMessageSetLabel(int n,  Scheme_Object *p[])
00624 {
00625   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00626   SETUP_PRE_VAR_STACK(1);
00627   PRE_VAR_STACK_PUSH(0, p);
00628   REMEMBER_VAR_STACK();
00629   objscheme_check_valid(os_wxMessage_class, "set-label in message%", n, p);
00630   if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(objscheme_istype_wxBitmap(p[POFFSET+0], NULL, 0))) {
00631     class wxBitmap* x0 INIT_NULLED_OUT;
00632 
00633     SETUP_VAR_STACK_PRE_REMEMBERED(2);
00634     VAR_STACK_PUSH(0, p);
00635     VAR_STACK_PUSH(1, x0);
00636 
00637     
00638     if (n != (POFFSET+1)) 
00639       WITH_VAR_STACK(scheme_wrong_count_m("set-label in message% (bitmap label case)", POFFSET+1, POFFSET+1, n, p, 1));
00640     x0 = WITH_VAR_STACK(objscheme_unbundle_wxBitmap(p[POFFSET+0], "set-label in message% (bitmap label case)", 0));
00641 
00642     { if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("message%","set-label"), "bad bitmap: ", p[POFFSET+0])); if (x0 && BM_SELECTED(x0)) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("message%","set-label"), "bitmap is currently installed into a bitmap-dc%: ", p[POFFSET+0])); }
00643     WITH_VAR_STACK(((wxMessage *)((Scheme_Class_Object *)p[0])->primdata)->SetLabel(x0));
00644 
00645     
00646     
00647     READY_TO_PRE_RETURN;
00648   } else  {
00649     string x0 INIT_NULLED_OUT;
00650 
00651     SETUP_VAR_STACK_PRE_REMEMBERED(2);
00652     VAR_STACK_PUSH(0, p);
00653     VAR_STACK_PUSH(1, x0);
00654 
00655     
00656     if (n != (POFFSET+1)) 
00657       WITH_VAR_STACK(scheme_wrong_count_m("set-label in message% (string label case)", POFFSET+1, POFFSET+1, n, p, 1));
00658     x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+0], "set-label in message% (string label case)"));
00659 
00660     
00661     WITH_VAR_STACK(((wxMessage *)((Scheme_Class_Object *)p[0])->primdata)->SetLabel(x0));
00662 
00663     
00664     
00665     READY_TO_PRE_RETURN;
00666   }
00667 
00668   return scheme_void;
00669 }
00670 
00671 static Scheme_Object *os_wxMessageOnDropFile(int n,  Scheme_Object *p[])
00672 {
00673   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00674   REMEMBER_VAR_STACK();
00675   objscheme_check_valid(os_wxMessage_class, "on-drop-file in message%", n, p);
00676   epathname x0 INIT_NULLED_OUT;
00677 
00678   SETUP_VAR_STACK_REMEMBERED(2);
00679   VAR_STACK_PUSH(0, p);
00680   VAR_STACK_PUSH(1, x0);
00681 
00682   
00683   x0 = (epathname)WITH_VAR_STACK(objscheme_unbundle_epathname(p[POFFSET+0], "on-drop-file in message%"));
00684 
00685   
00686   if (((Scheme_Class_Object *)p[0])->primflag)
00687     WITH_VAR_STACK(((os_wxMessage *)((Scheme_Class_Object *)p[0])->primdata)->wxMessage::OnDropFile(x0));
00688   else
00689     WITH_VAR_STACK(((wxMessage *)((Scheme_Class_Object *)p[0])->primdata)->OnDropFile(x0));
00690 
00691   
00692   
00693   READY_TO_RETURN;
00694   return scheme_void;
00695 }
00696 
00697 static Scheme_Object *os_wxMessagePreOnEvent(int n,  Scheme_Object *p[])
00698 {
00699   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00700   REMEMBER_VAR_STACK();
00701   Bool r;
00702   objscheme_check_valid(os_wxMessage_class, "pre-on-event in message%", n, p);
00703   class wxWindow* x0 INIT_NULLED_OUT;
00704   class wxMouseEvent* x1 INIT_NULLED_OUT;
00705 
00706   SETUP_VAR_STACK_REMEMBERED(3);
00707   VAR_STACK_PUSH(0, p);
00708   VAR_STACK_PUSH(1, x0);
00709   VAR_STACK_PUSH(2, x1);
00710 
00711   
00712   x0 = WITH_VAR_STACK(objscheme_unbundle_wxWindow(p[POFFSET+0], "pre-on-event in message%", 0));
00713   x1 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+1], "pre-on-event in message%", 0));
00714 
00715   
00716   if (((Scheme_Class_Object *)p[0])->primflag)
00717     r = WITH_VAR_STACK(((os_wxMessage *)((Scheme_Class_Object *)p[0])->primdata)-> wxWindow::PreOnEvent(x0, x1));
00718   else
00719     r = WITH_VAR_STACK(((wxMessage *)((Scheme_Class_Object *)p[0])->primdata)->PreOnEvent(x0, x1));
00720 
00721   
00722   
00723   READY_TO_RETURN;
00724   return (r ? scheme_true : scheme_false);
00725 }
00726 
00727 static Scheme_Object *os_wxMessagePreOnChar(int n,  Scheme_Object *p[])
00728 {
00729   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00730   REMEMBER_VAR_STACK();
00731   Bool r;
00732   objscheme_check_valid(os_wxMessage_class, "pre-on-char in message%", n, p);
00733   class wxWindow* x0 INIT_NULLED_OUT;
00734   class wxKeyEvent* x1 INIT_NULLED_OUT;
00735 
00736   SETUP_VAR_STACK_REMEMBERED(3);
00737   VAR_STACK_PUSH(0, p);
00738   VAR_STACK_PUSH(1, x0);
00739   VAR_STACK_PUSH(2, x1);
00740 
00741   
00742   x0 = WITH_VAR_STACK(objscheme_unbundle_wxWindow(p[POFFSET+0], "pre-on-char in message%", 0));
00743   x1 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[POFFSET+1], "pre-on-char in message%", 0));
00744 
00745   
00746   if (((Scheme_Class_Object *)p[0])->primflag)
00747     r = WITH_VAR_STACK(((os_wxMessage *)((Scheme_Class_Object *)p[0])->primdata)-> wxWindow::PreOnChar(x0, x1));
00748   else
00749     r = WITH_VAR_STACK(((wxMessage *)((Scheme_Class_Object *)p[0])->primdata)->PreOnChar(x0, x1));
00750 
00751   
00752   
00753   READY_TO_RETURN;
00754   return (r ? scheme_true : scheme_false);
00755 }
00756 
00757 static Scheme_Object *os_wxMessageOnSize(int n,  Scheme_Object *p[])
00758 {
00759   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00760   REMEMBER_VAR_STACK();
00761   objscheme_check_valid(os_wxMessage_class, "on-size in message%", n, p);
00762   int x0;
00763   int x1;
00764 
00765   SETUP_VAR_STACK_REMEMBERED(1);
00766   VAR_STACK_PUSH(0, p);
00767 
00768   
00769   x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "on-size in message%"));
00770   x1 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+1], "on-size in message%"));
00771 
00772   
00773   if (((Scheme_Class_Object *)p[0])->primflag)
00774     WITH_VAR_STACK(((os_wxMessage *)((Scheme_Class_Object *)p[0])->primdata)->wxMessage::OnSize(x0, x1));
00775   else
00776     WITH_VAR_STACK(((wxMessage *)((Scheme_Class_Object *)p[0])->primdata)->OnSize(x0, x1));
00777 
00778   
00779   
00780   READY_TO_RETURN;
00781   return scheme_void;
00782 }
00783 
00784 static Scheme_Object *os_wxMessageOnSetFocus(int n,  Scheme_Object *p[])
00785 {
00786   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00787   REMEMBER_VAR_STACK();
00788   objscheme_check_valid(os_wxMessage_class, "on-set-focus in message%", n, p);
00789 
00790   SETUP_VAR_STACK_REMEMBERED(1);
00791   VAR_STACK_PUSH(0, p);
00792 
00793   
00794 
00795   
00796   if (((Scheme_Class_Object *)p[0])->primflag)
00797     WITH_VAR_STACK(((os_wxMessage *)((Scheme_Class_Object *)p[0])->primdata)->wxMessage::OnSetFocus());
00798   else
00799     WITH_VAR_STACK(((wxMessage *)((Scheme_Class_Object *)p[0])->primdata)->OnSetFocus());
00800 
00801   
00802   
00803   READY_TO_RETURN;
00804   return scheme_void;
00805 }
00806 
00807 static Scheme_Object *os_wxMessageOnKillFocus(int n,  Scheme_Object *p[])
00808 {
00809   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00810   REMEMBER_VAR_STACK();
00811   objscheme_check_valid(os_wxMessage_class, "on-kill-focus in message%", n, p);
00812 
00813   SETUP_VAR_STACK_REMEMBERED(1);
00814   VAR_STACK_PUSH(0, p);
00815 
00816   
00817 
00818   
00819   if (((Scheme_Class_Object *)p[0])->primflag)
00820     WITH_VAR_STACK(((os_wxMessage *)((Scheme_Class_Object *)p[0])->primdata)->wxMessage::OnKillFocus());
00821   else
00822     WITH_VAR_STACK(((wxMessage *)((Scheme_Class_Object *)p[0])->primdata)->OnKillFocus());
00823 
00824   
00825   
00826   READY_TO_RETURN;
00827   return scheme_void;
00828 }
00829 
00830 static Scheme_Object *os_wxMessage_ConstructScheme(int n,  Scheme_Object *p[])
00831 {
00832   SETUP_PRE_VAR_STACK(1);
00833   PRE_VAR_STACK_PUSH(0, p);
00834   os_wxMessage *realobj INIT_NULLED_OUT;
00835   REMEMBER_VAR_STACK();
00836   if ((n >= (POFFSET+2)) && WITH_REMEMBERED_STACK(objscheme_istype_wxPanel(p[POFFSET+0], NULL, 0)) && WITH_REMEMBERED_STACK(istype_symset_iconID(p[POFFSET+1], NULL))) {
00837     class wxPanel* x0 INIT_NULLED_OUT;
00838     int x1;
00839     int x2;
00840     int x3;
00841     int x4;
00842     class wxFont* x5 INIT_NULLED_OUT;
00843     string x6 INIT_NULLED_OUT;
00844 
00845     SETUP_VAR_STACK_PRE_REMEMBERED(5);
00846     VAR_STACK_PUSH(0, p);
00847     VAR_STACK_PUSH(1, realobj);
00848     VAR_STACK_PUSH(2, x0);
00849     VAR_STACK_PUSH(3, x5);
00850     VAR_STACK_PUSH(4, x6);
00851 
00852     
00853     if ((n < (POFFSET+2)) || (n > (POFFSET+7))) 
00854       WITH_VAR_STACK(scheme_wrong_count_m("initialization in message% (icon label case)", POFFSET+2, POFFSET+7, n, p, 1));
00855     x0 = WITH_VAR_STACK(objscheme_unbundle_wxPanel(p[POFFSET+0], "initialization in message% (icon label case)", 0));
00856     x1 = WITH_VAR_STACK(unbundle_symset_iconID(p[POFFSET+1], "initialization in message% (icon label case)"));
00857     if (n > (POFFSET+2)) {
00858       x2 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+2], "initialization in message% (icon label case)"));
00859     } else
00860       x2 = -1;
00861     if (n > (POFFSET+3)) {
00862       x3 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+3], "initialization in message% (icon label case)"));
00863     } else
00864       x3 = -1;
00865     if (n > (POFFSET+4)) {
00866       x4 = WITH_VAR_STACK(unbundle_symset_messageStyle(p[POFFSET+4], "initialization in message% (icon label case)"));
00867     } else
00868       x4 = 0;
00869     if (n > (POFFSET+5)) {
00870       x5 = WITH_VAR_STACK(objscheme_unbundle_wxFont(p[POFFSET+5], "initialization in message% (icon label case)", 1));
00871     } else
00872       x5 = NULL;
00873     if (n > (POFFSET+6)) {
00874       x6 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+6], "initialization in message% (icon label case)"));
00875     } else
00876       x6 = "message";
00877 
00878     
00879     realobj = WITH_VAR_STACK(new os_wxMessage CONSTRUCTOR_ARGS((x0, x1, x2, x3, x4, x5, x6)));
00880 #ifdef MZ_PRECISE_GC
00881     WITH_VAR_STACK(realobj->gcInit_wxMessage(x0, x1, x2, x3, x4, x5, x6));
00882 #endif
00883     realobj->__gc_external = (void *)p[0];
00884     
00885     
00886     READY_TO_PRE_RETURN;
00887   } else if ((n >= (POFFSET+2)) && WITH_REMEMBERED_STACK(objscheme_istype_wxPanel(p[POFFSET+0], NULL, 0)) && WITH_REMEMBERED_STACK(objscheme_istype_wxBitmap(p[POFFSET+1], NULL, 0))) {
00888     class wxPanel* x0 INIT_NULLED_OUT;
00889     class wxBitmap* x1 INIT_NULLED_OUT;
00890     int x2;
00891     int x3;
00892     int x4;
00893     class wxFont* x5 INIT_NULLED_OUT;
00894     string x6 INIT_NULLED_OUT;
00895 
00896     SETUP_VAR_STACK_PRE_REMEMBERED(6);
00897     VAR_STACK_PUSH(0, p);
00898     VAR_STACK_PUSH(1, realobj);
00899     VAR_STACK_PUSH(2, x0);
00900     VAR_STACK_PUSH(3, x1);
00901     VAR_STACK_PUSH(4, x5);
00902     VAR_STACK_PUSH(5, x6);
00903 
00904     
00905     if ((n < (POFFSET+2)) || (n > (POFFSET+7))) 
00906       WITH_VAR_STACK(scheme_wrong_count_m("initialization in message% (bitmap label case)", POFFSET+2, POFFSET+7, n, p, 1));
00907     x0 = WITH_VAR_STACK(objscheme_unbundle_wxPanel(p[POFFSET+0], "initialization in message% (bitmap label case)", 0));
00908     x1 = WITH_VAR_STACK(objscheme_unbundle_wxBitmap(p[POFFSET+1], "initialization in message% (bitmap label case)", 0));
00909     if (n > (POFFSET+2)) {
00910       x2 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+2], "initialization in message% (bitmap label case)"));
00911     } else
00912       x2 = -1;
00913     if (n > (POFFSET+3)) {
00914       x3 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+3], "initialization in message% (bitmap label case)"));
00915     } else
00916       x3 = -1;
00917     if (n > (POFFSET+4)) {
00918       x4 = WITH_VAR_STACK(unbundle_symset_messageStyle(p[POFFSET+4], "initialization in message% (bitmap label case)"));
00919     } else
00920       x4 = 0;
00921     if (n > (POFFSET+5)) {
00922       x5 = WITH_VAR_STACK(objscheme_unbundle_wxFont(p[POFFSET+5], "initialization in message% (bitmap label case)", 1));
00923     } else
00924       x5 = NULL;
00925     if (n > (POFFSET+6)) {
00926       x6 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+6], "initialization in message% (bitmap label case)"));
00927     } else
00928       x6 = "message";
00929 
00930     { if (x1 && !x1->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("message%","initialization"), "bad bitmap: ", p[POFFSET+1])); if (x1 && BM_SELECTED(x1)) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("message%","initialization"), "bitmap is currently installed into a bitmap-dc%: ", p[POFFSET+1])); }
00931     realobj = WITH_VAR_STACK(new os_wxMessage CONSTRUCTOR_ARGS((x0, x1, x2, x3, x4, x5, x6)));
00932 #ifdef MZ_PRECISE_GC
00933     WITH_VAR_STACK(realobj->gcInit_wxMessage(x0, x1, x2, x3, x4, x5, x6));
00934 #endif
00935     realobj->__gc_external = (void *)p[0];
00936     
00937     
00938     READY_TO_PRE_RETURN;
00939   } else  {
00940     class wxPanel* x0 INIT_NULLED_OUT;
00941     string x1 INIT_NULLED_OUT;
00942     int x2;
00943     int x3;
00944     int x4;
00945     class wxFont* x5 INIT_NULLED_OUT;
00946     string x6 INIT_NULLED_OUT;
00947 
00948     SETUP_VAR_STACK_PRE_REMEMBERED(6);
00949     VAR_STACK_PUSH(0, p);
00950     VAR_STACK_PUSH(1, realobj);
00951     VAR_STACK_PUSH(2, x0);
00952     VAR_STACK_PUSH(3, x1);
00953     VAR_STACK_PUSH(4, x5);
00954     VAR_STACK_PUSH(5, x6);
00955 
00956     
00957     if ((n < (POFFSET+2)) || (n > (POFFSET+7))) 
00958       WITH_VAR_STACK(scheme_wrong_count_m("initialization in message% (string label case)", POFFSET+2, POFFSET+7, n, p, 1));
00959     x0 = WITH_VAR_STACK(objscheme_unbundle_wxPanel(p[POFFSET+0], "initialization in message% (string label case)", 0));
00960     x1 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+1], "initialization in message% (string label case)"));
00961     if (n > (POFFSET+2)) {
00962       x2 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+2], "initialization in message% (string label case)"));
00963     } else
00964       x2 = -1;
00965     if (n > (POFFSET+3)) {
00966       x3 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+3], "initialization in message% (string label case)"));
00967     } else
00968       x3 = -1;
00969     if (n > (POFFSET+4)) {
00970       x4 = WITH_VAR_STACK(unbundle_symset_messageStyle(p[POFFSET+4], "initialization in message% (string label case)"));
00971     } else
00972       x4 = 0;
00973     if (n > (POFFSET+5)) {
00974       x5 = WITH_VAR_STACK(objscheme_unbundle_wxFont(p[POFFSET+5], "initialization in message% (string label case)", 1));
00975     } else
00976       x5 = NULL;
00977     if (n > (POFFSET+6)) {
00978       x6 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+6], "initialization in message% (string label case)"));
00979     } else
00980       x6 = "message";
00981 
00982     
00983     realobj = WITH_VAR_STACK(new os_wxMessage CONSTRUCTOR_ARGS((x0, x1, x2, x3, x4, x5, x6)));
00984 #ifdef MZ_PRECISE_GC
00985     WITH_VAR_STACK(realobj->gcInit_wxMessage(x0, x1, x2, x3, x4, x5, x6));
00986 #endif
00987     realobj->__gc_external = (void *)p[0];
00988     
00989     
00990     READY_TO_PRE_RETURN;
00991   }
00992 
00993   ((Scheme_Class_Object *)p[0])->primdata = realobj;
00994   ((Scheme_Class_Object *)p[0])->primflag = 1;
00995   WITH_REMEMBERED_STACK(objscheme_register_primpointer(p[0], &((Scheme_Class_Object *)p[0])->primdata));
00996   return scheme_void;
00997 }
00998 
00999 void objscheme_setup_wxMessage(Scheme_Env *env)
01000 {
01001   SETUP_VAR_STACK(1);
01002   VAR_STACK_PUSH(0, env);
01003 
01004   wxREGGLOB(os_wxMessage_class);
01005 
01006   os_wxMessage_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "message%", "item%", (Scheme_Method_Prim *)os_wxMessage_ConstructScheme, 8));
01007 
01008   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMessage_class, "get-font" " method", (Scheme_Method_Prim *)os_wxMessageGetFont, 0, 0));
01009   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMessage_class, "set-label" " method", (Scheme_Method_Prim *)os_wxMessageSetLabel, 1, 1));
01010   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMessage_class, "on-drop-file" " method", (Scheme_Method_Prim *)os_wxMessageOnDropFile, 1, 1));
01011   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMessage_class, "pre-on-event" " method", (Scheme_Method_Prim *)os_wxMessagePreOnEvent, 2, 2));
01012   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMessage_class, "pre-on-char" " method", (Scheme_Method_Prim *)os_wxMessagePreOnChar, 2, 2));
01013   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMessage_class, "on-size" " method", (Scheme_Method_Prim *)os_wxMessageOnSize, 2, 2));
01014   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMessage_class, "on-set-focus" " method", (Scheme_Method_Prim *)os_wxMessageOnSetFocus, 0, 0));
01015   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMessage_class, "on-kill-focus" " method", (Scheme_Method_Prim *)os_wxMessageOnKillFocus, 0, 0));
01016 
01017 
01018   WITH_VAR_STACK(scheme_made_class(os_wxMessage_class));
01019 
01020 
01021   READY_TO_RETURN;
01022 }
01023 
01024 int objscheme_istype_wxMessage(Scheme_Object *obj, const char *stop, int nullOK)
01025 {
01026   REMEMBER_VAR_STACK();
01027   if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
01028   if (objscheme_is_a(obj,  os_wxMessage_class))
01029     return 1;
01030   else {
01031     if (!stop)
01032        return 0;
01033     WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "message% object or " XC_NULL_STR: "message% object", -1, 0, &obj));
01034     return 0;
01035   }
01036 }
01037 
01038 Scheme_Object *objscheme_bundle_wxMessage(class wxMessage *realobj)
01039 {
01040   Scheme_Class_Object *obj INIT_NULLED_OUT;
01041   Scheme_Object *sobj INIT_NULLED_OUT;
01042 
01043   if (!realobj) return XC_SCHEME_NULL;
01044 
01045   if (realobj->__gc_external)
01046     return (Scheme_Object *)realobj->__gc_external;
01047 
01048   SETUP_VAR_STACK(2);
01049   VAR_STACK_PUSH(0, obj);
01050   VAR_STACK_PUSH(1, realobj);
01051 
01052   if ((sobj = WITH_VAR_STACK(objscheme_bundle_by_type(realobj, realobj->__type))))
01053     { READY_TO_RETURN; return sobj; }
01054   obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxMessage_class));
01055 
01056   obj->primdata = realobj;
01057   WITH_VAR_STACK(objscheme_register_primpointer(obj, &obj->primdata));
01058   obj->primflag = 0;
01059 
01060   realobj->__gc_external = (void *)obj;
01061   READY_TO_RETURN;
01062   return (Scheme_Object *)obj;
01063 }
01064 
01065 class wxMessage *objscheme_unbundle_wxMessage(Scheme_Object *obj, const char *where, int nullOK)
01066 {
01067   if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;
01068 
01069   REMEMBER_VAR_STACK();
01070 
01071   (void)objscheme_istype_wxMessage(obj, where, nullOK);
01072   Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
01073   WITH_REMEMBERED_STACK(objscheme_check_valid(NULL, NULL, 0, &obj));
01074   if (o->primflag)
01075     return (os_wxMessage *)o->primdata;
01076   else
01077     return (wxMessage *)o->primdata;
01078 }
01079