1 #include <../../nrnconf.h> 43 void* (*nrnpy_save_thread)();
88 while(pvob->
find(pt, pv, ob)) {
98 for (i=0; i <
n; ++
i) {
107 for (i=0; i <
n; ++
i) {
108 (*
f_list->item(i))((
void*)
p, size);
114 while(pdob->
find(p, size, pp, ob)) {
123 char* cp =
new char[sz];
128 #ifndef MINGW // actual implementation in ivocwin.cpp 141 sprintf(m,
"%s (See terminal window)", mes);
148 #if HAVE_IV // to end of file 154 #include <InterViews/event.h> 155 #include <InterViews/reqerr.h> 156 #include <InterViews/style.h> 157 #include <IV-look/kit.h> 171 extern int hoc_oc(
const char*);
193 extern bool (*IVDialog_setAcceptInput)(bool);
194 bool setAcceptInputCallback(
bool);
195 bool setAcceptInputCallback(
bool b) {
203 if (Session::instance()) {
204 Style*
s = Session::instance()->style();
205 s->remove_attribute(
gargstr(1));
210 if (WidgetKit::instance()->style()->find_attribute(
gargstr(1)+1, s)) {
221 #if !defined(WIN32) && !defined(MAC) && !defined(CYGWIN) && !defined(carbon) 222 class ReqErr1 :
public ReqErr {
225 virtual void Error();
226 virtual int count() {
return count_;}
237 void ReqErr1::Error() {
238 if (!count_ || code != r_) {
242 fprintf(stderr,
"X Error of failed request: %s\n", message);
244 fprintf(stderr,
"Further messages for error code %d will not be shown\n", r_);
250 static ReqErr1* reqerr1;
257 #if defined(WIN32) && !defined(CYGWIN) 259 void winio_key_press() {
274 if (session_)
return;
277 IVDialog_setAcceptInput = setAcceptInputCallback;
281 #if (defined(WIN32) && !defined(CYGWIN)) || defined(MAC) 284 #if !defined(CYGWIN) && !defined(carbon) 285 reqerr1 =
new ReqErr1;
289 Dispatcher::instance().link(0, Dispatcher::ReadMask, handleStdin_);
290 Dispatcher::instance().link(0, Dispatcher::ExceptMask, handleStdin_);
297 if (session_->style()->find_attribute(
"first_instance_message", str)) {
311 if (--refcnt_ == 0) {
312 #if !defined(WIN32) && !defined(MAC) && !defined(CYGWIN) && !defined(carbon) 313 if (reqerr1 && reqerr1->count()) {
314 fprintf(stderr,
"total X Errors: %d\n", reqerr1->count());
328 int Oc::run(
const char*
buf,
bool show_err_mes) {
346 bool old = handleStdin_->acceptInput_;
347 handleStdin_->acceptInput_ = b;
394 #if defined(WIN32) || MAC 398 #if !defined(WIN32) || defined(CYGWIN) 403 #if MAC && !defined(carbon) 404 extern Boolean IVOCGoodLine;
411 #if defined(WIN32) && !defined(CYGWIN) 425 extern bool read_if_pending(
Event&);
426 while ( !session->done() && read_if_pending(e)) {
430 bool dsav = session->done();
432 while (session->pending() && !session->done()) {
441 HocPanel::keep_updated();
443 Session::instance()->screen_update();
449 extern void nrniv_bind_call(
void);
455 if (!nrn_is_gui_thread()) {
476 notify_change_->notify();
481 notify_change_->attach(o);
484 notify_change_->detach(o);
static void dismiss_defer()
virtual int inputReady(int fd)
virtual int exceptionRaised(int fd)
void notify_freed_val_array(double *p, size_t size)
void nrn_notify_when_void_freed(void *p, Observer *ob)
static Session * getSession()
static nrn::tool::bimap< void *, Observer * > * pvob
sprintf(buf," if (secondorder) {\ " int _i;\" " for(_i=0;_i< %d;++_i) {\" " _p[_slist%d[_i]]+=dt *_p[_dlist%d[_i]];\" " }}\", numeqn, listnum, listnum)
void notify_freed(void(*pf)(void *, int))
const char * string() const
int nrn_err_dialog_active_
Symbol * parseExpr(const char *, Symlist **=NULL)
Symbol * hoc_parse_expr(const char *str, Symlist **psymlist)
static double done(void *v)
const char * name(Symbol *)
int const size_t const size_t n
int hoc_execerror_messages
#define TRY_GUI_REDIRECT_DOUBLE(name, obj)
int hoc_print_first_instance
void(* nrnpy_restore_thread)(void *)
void notify_pointer_disconnect(Observer *)
void nrniv_bind_thread(void)
static nrn::tool::bimap< double *, Observer * > * pdob
void notify_detach(Observer *)
void notify_freed(void *p)
static int getStdinSeen()
static Observable * notify_change_
int hoc_oc(const char *buf)
double hoc_run_expr(Symbol *sym)
fprintf(stderr, "Don't know the location of params at %p\, pp)
void notify_pointer_freed(void *pt)
void notify_attach(Observer *)
void nrn_notify_freed(PF pf)
#define MUTCONSTRUCT(mkmut)
char * cxx_char_alloc(size_t sz)
void nrn_notify_when_double_freed(double *p, Observer *ob)
void notify_when_freed(void *p, Observer *)
double(* nrnpy_object_to_double_)(Object *)
void continue_dialog(const char *label, Window *w=NULL, Coord x=400., Coord y=400.)
static bool setAcceptInput(bool)
static void setStdinSeen(bool i)
void nrn_notify_pointer_disconnect(Observer *ob)
int hoc_main1(int, const char **, const char **)
void nrn_err_dialog(const char *mes)
void hoc_main1_init(const char *, const char **)
static const char ** pname(void *v)
int run(int argc, const char **argv)
virtual void update(Observable *)