Ruby  2.1.10p492(2016-04-01revision54464)
Data Structures | Macros | Functions | Variables
tcltklib.c File Reference
#include "ruby.h"
#include "ruby/encoding.h"
#include "rubysig.h"
#include <stdio.h>
#include <varargs.h>
#include <string.h>
#include <tcl.h>
#include <tk.h>
#include "stubs.h"

Go to the source code of this file.

Data Structures

struct  invoke_queue
 
struct  eval_queue
 
struct  call_queue
 
struct  cmd_body_arg
 
struct  tcltkip
 
struct  evloop_params
 
struct  thread_call_proc_arg
 
struct  th_update_param
 
struct  th_vwait_param
 
struct  invoke_info
 

Macros

#define TCLTKLIB_RELEASE_DATE   "2010-08-25"
 
#define RUBY_VERSION   "(unknown version)"
 
#define RUBY_RELEASE_DATE   "unknown release-date"
 
#define rb_thread_check_trap_pending()   (0+rb_trap_pending)
 
#define RbTk_OBJ_UNTRUST(x)   do {OBJ_TAINT(x); OBJ_UNTRUST(x);} while (0)
 
#define RbTk_ALLOC_N(type, n)   (type *)ckalloc((int)(sizeof(type) * (n)))
 
#define va_init_list(a, b)   va_start(a)
 
#define ruby_native_thread_p()   is_ruby_native_thread()
 
#define rb_errinfo()   (ruby_errinfo+0) /* cannot be l-value */
 
#define rb_safe_level()   (ruby_safe_level+0)
 
#define rb_sourcefile()   (ruby_sourcefile+0)
 
#define TCL_ALPHA_RELEASE   0 /* "alpha" */
 
#define TCL_BETA_RELEASE   1 /* "beta" */
 
#define TCL_FINAL_RELEASE   2 /* "final" */
 
#define CONST
 
#define CONST84
 
#define CONST86   CONST84
 
#define TAG_RETURN   0x1
 
#define TAG_BREAK   0x2
 
#define TAG_NEXT   0x3
 
#define TAG_RETRY   0x4
 
#define TAG_REDO   0x5
 
#define TAG_RAISE   0x6
 
#define TAG_THROW   0x7
 
#define TAG_FATAL   0x8
 
#define DUMP1(ARG1)   if (ruby_debug) { fprintf(stderr, "tcltklib: %s\n", ARG1); fflush(stderr); }
 
#define DUMP2(ARG1, ARG2)
 
#define DUMP3(ARG1, ARG2, ARG3)
 
#define rb_hash_lookup   rb_hash_aref
 
#define rb_thread_alive_p(thread)   rb_funcall2((thread), ID_alive_p, 0, NULL)
 
#define Tcl_Eval   tcl_eval
 
#define Tcl_GlobalEval   tcl_global_eval
 
#define Tcl_IncrRefCount(obj)   (1)
 
#define Tcl_DecrRefCount(obj)   (1)
 
#define Tcl_GetStringResult(interp)   ((interp)->result)
 
#define CONTROL_BY_STATUS_OF_RB_THREAD_WAITING_FOR_VALUE   1
 
#define USE_TOGGLE_WINDOW_MODE_FOR_IDLE   0
 
#define DO_THREAD_SCHEDULE_AT_CALLBACK_DONE   0
 
#define DEFAULT_EVENT_LOOP_MAX   800/*counts*/
 
#define DEFAULT_NO_EVENT_TICK   10/*counts*/
 
#define DEFAULT_NO_EVENT_WAIT   20/*milliseconds ( 1 -- 999 ) */
 
#define WATCHDOG_INTERVAL   10/*milliseconds ( 1 -- 999 ) */
 
#define DEFAULT_TIMER_TICK   0/*milliseconds ( 0 -- 999 ) */
 
#define NO_THREAD_INTERRUPT_TIME   100/*milliseconds ( 1 -- 999 ) */
 
#define EVENT_HANDLER_TIMEOUT   100/*milliseconds*/
 
#define TCL_NAMESPACE_DEBUG   0
 
#define USE_RUBY_ALLOC   0
 
#define USE_EVLOOP_THREAD_ALONE_CHECK_FLAG   0
 
#define TRAP_CHECK()
 
#define EVLOOP_WAKEUP_CHANCE   3
 
#define SUPPORT_NESTED_CONST_AS_IP_RUBY_CMD_RECEIVER   1
 
#define TKWAIT_MODE_VISIBILITY   1
 
#define TKWAIT_MODE_DESTROY   2
 
#define TCL_CANCEL_UNWIND   0x100000
 
#define TK_WINDOWING_SYSTEM   "x11"
 
#define DEFAULT_EVENTLOOP_DEPTH   7
 

Functions

static void set_tcltk_version ()
 
static void ip_finalize _ ((Tcl_Interp *))
 
static VALUE create_dummy_encoding_for_tk_core _ ((VALUE, VALUE, VALUE))
 
static VALUE create_dummy_encoding_for_tk _ ((VALUE, VALUE))
 
static VALUE create_encoding_table _ ((VALUE))
 
static VALUE ip_invoke_real _ ((int, VALUE *, VALUE))
 
static VALUE ip_invoke_with_position _ ((int, VALUE *, VALUE, Tcl_QueuePosition))
 
static VALUE tk_funcall _ ((VALUE(), int, VALUE *, VALUE))
 
static int tcl_eval (Tcl_Interp *interp, const char *cmd)
 
static int tcl_global_eval (Tcl_Interp *interp, const char *cmd)
 
int matherr ()
 
void invoke_queue_mark (struct invoke_queue *q)
 
void eval_queue_mark (struct eval_queue *q)
 
void call_queue_mark (struct call_queue *q)
 
static int ip_ruby_eval _ ((ClientData, Tcl_Interp *, int, char **))
 
static struct tcltkipget_ip (VALUE self)
 
static int deleted_ip (struct tcltkip *ptr)
 
static int rbtk_preserve_ip (struct tcltkip *ptr)
 
static int rbtk_release_ip (struct tcltkip *ptr)
 
static VALUE create_ip_exc (interp, VALUE interp:VALUE exc, const char *fmt, va_alist)
 
static void tcl_stubs_check ()
 
static VALUE tcltkip_init_tk (VALUE interp)
 
static int pending_exception_check0 ()
 
static int pending_exception_check1 (int thr_crit_bup, struct tcltkip *ptr)
 
static void call_original_exit (struct tcltkip *ptr, int state)
 
static void _timer_for_tcl _ ((ClientData))
 
static void _timer_for_tcl (ClientData clientData)
 
static VALUE set_eventloop_window_mode (VALUE self, VALUE mode)
 
static VALUE get_eventloop_window_mode (VALUE self)
 
static VALUE set_eventloop_tick (VALUE self, VALUE tick)
 
static VALUE get_eventloop_tick (VALUE self)
 
static VALUE ip_set_eventloop_tick (VALUE self, VALUE tick)
 
static VALUE ip_get_eventloop_tick (VALUE self)
 
static VALUE set_no_event_wait (VALUE self, VALUE wait)
 
static VALUE get_no_event_wait (VALUE self)
 
static VALUE ip_set_no_event_wait (VALUE self, VALUE wait)
 
static VALUE ip_get_no_event_wait (VALUE self)
 
static VALUE set_eventloop_weight (VALUE self, VALUE loop_max, VALUE no_event)
 
static VALUE get_eventloop_weight (VALUE self)
 
static VALUE ip_set_eventloop_weight (VALUE self, VALUE loop_max, VALUE no_event)
 
static VALUE ip_get_eventloop_weight (VALUE self)
 
static VALUE set_max_block_time (VALUE self, VALUE time)
 
static VALUE lib_evloop_thread_p (VALUE self)
 
static VALUE lib_evloop_abort_on_exc (VALUE self)
 
static VALUE ip_evloop_abort_on_exc (VALUE self)
 
static VALUE lib_evloop_abort_on_exc_set (VALUE self, VALUE val)
 
static VALUE ip_evloop_abort_on_exc_set (VALUE self, VALUE val)
 
static VALUE lib_num_of_mainwindows_core (VALUE self, int argc, VALUE *argv)
 
static VALUE lib_num_of_mainwindows (VALUE self)
 
void rbtk_EventSetupProc (ClientData clientData, int flag)
 
void rbtk_EventCheckProc (ClientData clientData, int flag)
 
static VALUE call_DoOneEvent (VALUE flag_val)
 
static int trap_check (int *check_var)
 
static int check_eventloop_interp ()
 
static int lib_eventloop_core (int check_root, int update_flag, int *check_var, Tcl_Interp *interp)
 
VALUE lib_eventloop_main_core (VALUE args)
 
VALUE lib_eventloop_main (VALUE args)
 
VALUE lib_eventloop_ensure (VALUE args)
 
static VALUE lib_eventloop_launcher (int check_root, int update_flag, int *check_var, Tcl_Interp *interp)
 
static VALUE lib_mainloop (int argc, VALUE *argv, VALUE self)
 
static VALUE ip_mainloop (int argc, VALUE *argv, VALUE self)
 
static VALUE watchdog_evloop_launcher (VALUE check_rootwidget)
 
static VALUE lib_watchdog_core (VALUE check_rootwidget)
 
VALUE lib_watchdog_ensure (VALUE arg)
 
static VALUE lib_mainloop_watchdog (int argc, VALUE *argv, VALUE self)
 
static VALUE ip_mainloop_watchdog (int argc, VALUE *argv, VALUE self)
 
void _thread_call_proc_arg_mark (struct thread_call_proc_arg *q)
 
static VALUE _thread_call_proc_core (VALUE arg)
 
static VALUE _thread_call_proc_ensure (VALUE arg)
 
static VALUE _thread_call_proc (VALUE arg)
 
static VALUE _thread_call_proc_value (VALUE th)
 
static VALUE lib_thread_callback (int argc, VALUE *argv, VALUE self)
 
static VALUE lib_do_one_event_core (int argc, VALUE *argv, VALUE self, int is_ip)
 
static VALUE lib_do_one_event (int argc, VALUE *argv, VALUE self)
 
static VALUE ip_do_one_event (int argc, VALUE *argv, VALUE self)
 
static void ip_set_exc_message (Tcl_Interp *interp, VALUE exc)
 
static VALUE TkStringValue (VALUE obj)
 
static int tcl_protect_core (Tcl_Interp *interp, VALUE(*proc)(), VALUE data)
 
static int tcl_protect (Tcl_Interp *interp, VALUE(*proc)(), VALUE data)
 
static int ip_ruby_eval (ClientData clientData, Tcl_Interp *interp, int argc, argv)
 
static VALUE ip_ruby_cmd_core (struct cmd_body_arg *arg)
 
static VALUE ip_ruby_cmd_receiver_const_get (char *name)
 
static VALUE ip_ruby_cmd_receiver_get (char *str)
 
static int ip_ruby_cmd (ClientData clientData, Tcl_Interp *interp, int argc, argv)
 
static int ip_InterpExitCommand (ClientData clientData, Tcl_Interp *interp, int argc, argv)
 
static int ip_RubyExitCommand (ClientData clientData, Tcl_Interp *interp, int argc, argv)
 
static int ip_rbUpdateCommand _ ((ClientData, Tcl_Interp *, int, char *[]))
 
static int ip_rbUpdateCommand (ClientData clientData, Tcl_Interp *interp, int objc, objv)
 
static void rb_threadUpdateProc (ClientData clientData)
 
static int ip_rb_threadUpdateCommand (ClientData clientData, Tcl_Interp *interp, int objc, objv)
 
static char *VwaitVarProc _ ((ClientData, Tcl_Interp *, char *, char *, int))
 
static char * VwaitVarProc (ClientData clientData, Tcl_Interp *interp, char *name1, char *name2, int flags)
 
static int ip_rbVwaitCommand (ClientData clientData, Tcl_Interp *interp, int objc, objv)
 
static char * WaitVariableProc (ClientData clientData, Tcl_Interp *interp, char *name1, char *name2, int flags)
 
static void WaitVisibilityProc _ ((ClientData, XEvent *))
 
static void WaitVisibilityProc (ClientData clientData, XEvent *eventPtr)
 
static void WaitWindowProc (ClientData clientData, XEvent *eventPtr)
 
static int ip_rbTkWaitCommand (ClientData clientData, Tcl_Interp *interp, int objc, objv)
 
static char * rb_threadVwaitProc (ClientData clientData, Tcl_Interp *interp, char *name1, char *name2, int flags)
 
static void rb_threadWaitVisibilityProc (ClientData clientData, XEvent *eventPtr)
 
static void rb_threadWaitWindowProc (ClientData clientData, XEvent *eventPtr)
 
static int ip_rb_threadVwaitCommand (ClientData clientData, Tcl_Interp *interp, int objc, objv)
 
static int ip_rb_threadTkWaitCommand (ClientData clientData, Tcl_Interp *interp, int objc, objv)
 
static VALUE ip_thread_vwait (VALUE self, VALUE var)
 
static VALUE ip_thread_tkwait (VALUE self, VALUE mode, VALUE target)
 
static void delete_slaves (Tcl_Interp *ip)
 
static void lib_mark_at_exit (VALUE self)
 
static int ip_null_proc (ClientData clientData, Tcl_Interp *interp, int argc, argv)
 
static void ip_finalize (Tcl_Interp *ip)
 
static void ip_free (struct tcltkip *ptr)
 
static VALUE ip_alloc (VALUE self)
 
static void ip_replace_wait_commands (Tcl_Interp *interp, Tk_Window mainWin)
 
static int ip_rb_replaceSlaveTkCmdsCommand (ClientData clientData, Tcl_Interp *interp, int objc, objv)
 
static void ip_wrap_namespace_command (Tcl_Interp *interp)
 
static void ip_CallWhenDeleted (ClientData clientData, Tcl_Interp *ip)
 
static VALUE ip_init (int argc, VALUE *argv, VALUE self)
 
static VALUE ip_create_slave_core (VALUE interp, int argc, VALUE *argv)
 
static VALUE ip_create_slave (int argc, VALUE *argv, VALUE self)
 
static VALUE ip_is_slave_of_p (VALUE self, VALUE master)
 
static VALUE ip_create_console_core (VALUE interp, int argc, VALUE *argv)
 
static VALUE ip_create_console (VALUE self)
 
static VALUE ip_make_safe_core (VALUE interp, int argc, VALUE *argv)
 
static VALUE ip_make_safe (VALUE self)
 
static VALUE ip_is_safe_p (VALUE self)
 
static VALUE ip_allow_ruby_exit_p (VALUE self)
 
static VALUE ip_allow_ruby_exit_set (VALUE self, VALUE val)
 
static VALUE ip_delete (VALUE self)
 
static VALUE ip_has_invalid_namespace_p (VALUE self)
 
static VALUE ip_is_deleted_p (VALUE self)
 
static VALUE ip_has_mainwindow_p_core (VALUE self, int argc, VALUE *argv)
 
static VALUE ip_has_mainwindow_p (VALUE self)
 
static VALUE ip_get_result_string_obj (Tcl_Interp *interp)
 
static VALUE callq_safelevel_handler (VALUE arg, VALUE callq)
 
static int call_queue_handler _ ((Tcl_Event *, int))
 
static int call_queue_handler (Tcl_Event *evPtr, int flags)
 
static VALUE tk_funcall (VALUE(*func)(), int argc, VALUE *argv, VALUE obj)
 
static VALUE ip_eval_real (VALUE self, char *cmd_str, int cmd_len)
 
static VALUE evq_safelevel_handler (VALUE arg, VALUE evq)
 
int eval_queue_handler (Tcl_Event *evPtr, int flags)
 
static VALUE ip_eval (VALUE self, VALUE str)
 
static int ip_cancel_eval_core (Tcl_Interp *interp, VALUE msg, int flag)
 
static VALUE ip_cancel_eval (int argc, VALUE *argv, VALUE self)
 
static VALUE ip_cancel_eval_unwind (int argc, VALUE *argv, VALUE self)
 
static VALUE lib_restart_core (VALUE interp, int argc, VALUE *argv)
 
static VALUE lib_restart (VALUE self)
 
static VALUE ip_restart (VALUE self)
 
static VALUE lib_toUTF8_core (VALUE ip_obj, VALUE src, VALUE encodename)
 
static VALUE lib_toUTF8 (int argc, VALUE *argv, VALUE self)
 
static VALUE ip_toUTF8 (int argc, VALUE *argv, VALUE self)
 
static VALUE lib_fromUTF8_core (VALUE ip_obj, VALUE src, VALUE encodename)
 
static VALUE lib_fromUTF8 (int argc, VALUE *argv, VALUE self)
 
static VALUE ip_fromUTF8 (int argc, VALUE *argv, VALUE self)
 
static VALUE lib_UTF_backslash_core (VALUE self, VALUE str, int all_bs)
 
static VALUE lib_UTF_backslash (VALUE self, VALUE str)
 
static VALUE lib_Tcl_backslash (VALUE self, VALUE str)
 
static VALUE lib_get_system_encoding (VALUE self)
 
static VALUE lib_set_system_encoding (VALUE self, VALUE enc_name)
 
static VALUE invoke_tcl_proc (VALUE arg)
 
static VALUE ip_invoke_core (VALUE interp, int argc, char **argv)
 
static char ** alloc_invoke_arguments (int argc, VALUE *argv)
 
static void free_invoke_arguments (int argc, char **av)
 
static VALUE ip_invoke_real (int argc, VALUE *argv, VALUE interp)
 
VALUE ivq_safelevel_handler (VALUE arg, VALUE ivq)
 
int invoke_queue_handler (Tcl_Event *evPtr, int flags)
 
static VALUE ip_invoke_with_position (int argc, VALUE *argv, VALUE obj, Tcl_QueuePosition position)
 
static VALUE ip_retval (VALUE self)
 
static VALUE ip_invoke (int argc, VALUE *argv, VALUE obj)
 
static VALUE ip_invoke_immediate (int argc, VALUE *argv, VALUE obj)
 
static VALUE ip_get_variable2_core (VALUE interp, int argc, VALUE *argv)
 
static VALUE ip_get_variable2 (VALUE self, VALUE varname, VALUE index, VALUE flag)
 
static VALUE ip_get_variable (VALUE self, VALUE varname, VALUE flag)
 
static VALUE ip_set_variable2_core (VALUE interp, int argc, VALUE *argv)
 
static VALUE ip_set_variable2 (VALUE self, VALUE varname, VALUE index, VALUE value, VALUE flag)
 
static VALUE ip_set_variable (VALUE self, VALUE varname, VALUE value, VALUE flag)
 
static VALUE ip_unset_variable2_core (VALUE interp, int argc, VALUE *argv)
 
static VALUE ip_unset_variable2 (VALUE self, VALUE varname, VALUE index, VALUE flag)
 
static VALUE ip_unset_variable (VALUE self, VALUE varname, VALUE flag)
 
static VALUE ip_get_global_var (VALUE self, VALUE varname)
 
static VALUE ip_get_global_var2 (VALUE self, VALUE varname, VALUE index)
 
static VALUE ip_set_global_var (VALUE self, VALUE varname, VALUE value)
 
static VALUE ip_set_global_var2 (VALUE self, VALUE varname, VALUE index, VALUE value)
 
static VALUE ip_unset_global_var (VALUE self, VALUE varname)
 
static VALUE ip_unset_global_var2 (VALUE self, VALUE varname, VALUE index)
 
static VALUE lib_split_tklist_core (VALUE ip_obj, VALUE list_str)
 
static VALUE lib_split_tklist (VALUE self, VALUE list_str)
 
static VALUE ip_split_tklist (VALUE self, VALUE list_str)
 
static VALUE lib_merge_tklist (int argc, VALUE *argv, VALUE obj)
 
static VALUE lib_conv_listelement (VALUE self, VALUE src)
 
static VALUE lib_getversion (VALUE self)
 
static VALUE lib_get_reltype_name (VALUE self)
 
static VALUE tcltklib_compile_info ()
 
static VALUE create_dummy_encoding_for_tk_core (VALUE interp, VALUE name, VALUE error_mode)
 
static VALUE create_dummy_encoding_for_tk (VALUE interp, VALUE name)
 
static int update_encoding_table (VALUE table, VALUE interp, VALUE error_mode)
 
static VALUE encoding_table_get_name_core (VALUE table, VALUE enc_arg, VALUE error_mode)
 
static VALUE encoding_table_get_obj_core (VALUE table, VALUE enc, VALUE error_mode)
 
static VALUE encoding_table_get_name (VALUE table, VALUE enc)
 
static VALUE encoding_table_get_obj (VALUE table, VALUE enc)
 
static VALUE create_encoding_table_core (VALUE arg, VALUE interp)
 
static VALUE create_encoding_table (VALUE interp)
 
static VALUE ip_get_encoding_table (VALUE interp)
 
static VALUE ip_make_menu_embeddable_core (VALUE interp, int argc, VALUE *argv)
 
static VALUE ip_make_menu_embeddable (VALUE interp, VALUE menu_path)
 
void Init_tcltklib ()
 

Variables

struct {
   int   major
 
   int   minor
 
   int   type
 
   int   patchlevel
 
tcltk_version = {0, 0, 0, 0}
 
static const char tcltklib_release_date [] = TCLTKLIB_RELEASE_DATE
 
static const char finalize_hook_name [] = "INTERP_FINALIZE_HOOK"
 
static int at_exit = 0
 
static VALUE cRubyEncoding
 
static int ENCODING_INDEX_UTF8
 
static int ENCODING_INDEX_BINARY
 
static VALUE ENCODING_NAME_UTF8
 
static VALUE ENCODING_NAME_BINARY
 
static VALUE eTkCallbackReturn
 
static VALUE eTkCallbackBreak
 
static VALUE eTkCallbackContinue
 
static VALUE eLocalJumpError
 
static VALUE eTkLocalJumpError
 
static VALUE eTkCallbackRetry
 
static VALUE eTkCallbackRedo
 
static VALUE eTkCallbackThrow
 
static VALUE tcltkip_class
 
static ID ID_at_enc
 
static ID ID_at_interp
 
static ID ID_encoding_name
 
static ID ID_encoding_table
 
static ID ID_stop_p
 
static ID ID_alive_p
 
static ID ID_kill
 
static ID ID_join
 
static ID ID_value
 
static ID ID_call
 
static ID ID_backtrace
 
static ID ID_message
 
static ID ID_at_reason
 
static ID ID_return
 
static ID ID_break
 
static ID ID_next
 
static ID ID_to_s
 
static ID ID_inspect
 
int * tclDummyMathPtr = (int *) matherr
 
static VALUE eventloop_thread
 
static Tcl_Interp * eventloop_interp
 
static VALUE eventloop_stack
 
static int window_event_mode = ~0
 
static VALUE watchdog_thread
 
Tcl_Interp * current_interp
 
static int have_rb_thread_waiting_for_value = 0
 
static int event_loop_max = DEFAULT_EVENT_LOOP_MAX
 
static int no_event_tick = DEFAULT_NO_EVENT_TICK
 
static int no_event_wait = DEFAULT_NO_EVENT_WAIT
 
static int timer_tick = DEFAULT_TIMER_TICK
 
static int req_timer_tick = DEFAULT_TIMER_TICK
 
static int run_timer_flag = 0
 
static int event_loop_wait_event = 0
 
static int event_loop_abort_on_exc = 1
 
static int loop_counter = 0
 
static int check_rootwidget_flag = 0
 
static VALUE rbtk_pending_exception
 
static int rbtk_eventloop_depth = 0
 
static int rbtk_internal_eventloop_handler = 0
 
static Tcl_TimerToken timer_token = (Tcl_TimerToken)NULL
 

Macro Definition Documentation

◆ CONST

#define CONST

◆ CONST84

#define CONST84

◆ CONST86

#define CONST86   CONST84

Definition at line 152 of file tcltklib.c.

◆ CONTROL_BY_STATUS_OF_RB_THREAD_WAITING_FOR_VALUE

#define CONTROL_BY_STATUS_OF_RB_THREAD_WAITING_FOR_VALUE   1

Definition at line 498 of file tcltklib.c.

◆ DEFAULT_EVENT_LOOP_MAX

#define DEFAULT_EVENT_LOOP_MAX   800/*counts*/

Definition at line 522 of file tcltklib.c.

◆ DEFAULT_EVENTLOOP_DEPTH

#define DEFAULT_EVENTLOOP_DEPTH   7

Referenced by Init_tcltklib().

◆ DEFAULT_NO_EVENT_TICK

#define DEFAULT_NO_EVENT_TICK   10/*counts*/

Definition at line 523 of file tcltklib.c.

◆ DEFAULT_NO_EVENT_WAIT

#define DEFAULT_NO_EVENT_WAIT   20/*milliseconds ( 1 -- 999 ) */

Definition at line 524 of file tcltklib.c.

◆ DEFAULT_TIMER_TICK

#define DEFAULT_TIMER_TICK   0/*milliseconds ( 0 -- 999 ) */

Definition at line 526 of file tcltklib.c.

◆ DO_THREAD_SCHEDULE_AT_CALLBACK_DONE

#define DO_THREAD_SCHEDULE_AT_CALLBACK_DONE   0

Definition at line 500 of file tcltklib.c.

◆ DUMP1

#define DUMP1 (   ARG1)    if (ruby_debug) { fprintf(stderr, "tcltklib: %s\n", ARG1); fflush(stderr); }

◆ DUMP2

#define DUMP2 (   ARG1,
  ARG2 
)

◆ DUMP3

#define DUMP3 (   ARG1,
  ARG2,
  ARG3 
)
Value:
if (ruby_debug) { fprintf(stderr, "tcltklib: ");\
fprintf(stderr, ARG1, ARG2, ARG3); fprintf(stderr, "\n"); fflush(stderr); }
#define ruby_debug
Definition: ruby.h:1484

Definition at line 170 of file tcltklib.c.

Referenced by lib_eventloop_launcher().

◆ EVENT_HANDLER_TIMEOUT

#define EVENT_HANDLER_TIMEOUT   100/*milliseconds*/

◆ EVLOOP_WAKEUP_CHANCE

#define EVLOOP_WAKEUP_CHANCE   3

Definition at line 2784 of file tcltklib.c.

Referenced by lib_watchdog_core().

◆ NO_THREAD_INTERRUPT_TIME

#define NO_THREAD_INTERRUPT_TIME   100/*milliseconds ( 1 -- 999 ) */

Definition at line 527 of file tcltklib.c.

Referenced by lib_eventloop_core(), and lib_watchdog_core().

◆ rb_errinfo

#define rb_errinfo (   void)    (ruby_errinfo+0) /* cannot be l-value */

◆ rb_hash_lookup

#define rb_hash_lookup   rb_hash_aref

◆ rb_safe_level

#define rb_safe_level (   void)    (ruby_safe_level+0)

◆ rb_sourcefile

#define rb_sourcefile (   void)    (ruby_sourcefile+0)

◆ rb_thread_alive_p

#define rb_thread_alive_p (   thread)    rb_funcall2((thread), ID_alive_p, 0, NULL)

◆ rb_thread_check_trap_pending

#define rb_thread_check_trap_pending (   void)    (0+rb_trap_pending)

Definition at line 28 of file tcltklib.c.

Referenced by ip_rbTkWaitCommand(), ip_rbUpdateCommand(), ip_rbVwaitCommand(), and trap_check().

◆ RbTk_ALLOC_N

#define RbTk_ALLOC_N (   type,
 
)    (type *)ckalloc((int)(sizeof(type) * (n)))

◆ RbTk_OBJ_UNTRUST

#define RbTk_OBJ_UNTRUST (   x)    do {OBJ_TAINT(x); OBJ_UNTRUST(x);} while (0)

◆ ruby_native_thread_p

#define ruby_native_thread_p (   void)    is_ruby_native_thread()

◆ RUBY_RELEASE_DATE

#define RUBY_RELEASE_DATE   "unknown release-date"

Definition at line 19 of file tcltklib.c.

Referenced by tcltklib_compile_info().

◆ RUBY_VERSION

#define RUBY_VERSION   "(unknown version)"

Definition at line 16 of file tcltklib.c.

Referenced by Init_dl(), and tcltklib_compile_info().

◆ SUPPORT_NESTED_CONST_AS_IP_RUBY_CMD_RECEIVER

#define SUPPORT_NESTED_CONST_AS_IP_RUBY_CMD_RECEIVER   1

Definition at line 3483 of file tcltklib.c.

◆ TAG_BREAK

#define TAG_BREAK   0x2

Definition at line 158 of file tcltklib.c.

Referenced by tcl_protect_core().

◆ TAG_FATAL

#define TAG_FATAL   0x8

◆ TAG_NEXT

#define TAG_NEXT   0x3

Definition at line 159 of file tcltklib.c.

Referenced by tcl_protect_core().

◆ TAG_RAISE

#define TAG_RAISE   0x6

◆ TAG_REDO

#define TAG_REDO   0x5

◆ TAG_RETRY

#define TAG_RETRY   0x4

◆ TAG_RETURN

#define TAG_RETURN   0x1

Definition at line 157 of file tcltklib.c.

Referenced by tcl_protect_core().

◆ TAG_THROW

#define TAG_THROW   0x7

◆ TCL_ALPHA_RELEASE

#define TCL_ALPHA_RELEASE   0 /* "alpha" */

Definition at line 104 of file tcltklib.c.

Referenced by Init_tcltklib(), and lib_get_reltype_name().

◆ TCL_BETA_RELEASE

#define TCL_BETA_RELEASE   1 /* "beta" */

Definition at line 105 of file tcltklib.c.

Referenced by Init_tcltklib(), and lib_get_reltype_name().

◆ TCL_CANCEL_UNWIND

#define TCL_CANCEL_UNWIND   0x100000

Definition at line 7816 of file tcltklib.c.

Referenced by ip_cancel_eval_unwind().

◆ Tcl_DecrRefCount

#define Tcl_DecrRefCount (   obj)    (1)

◆ Tcl_Eval

#define Tcl_Eval   tcl_eval

Definition at line 296 of file tcltklib.c.

Referenced by delete_slaves(), ip_eval_real(), ip_init(), lib_restart_core(), and tcl_eval().

◆ TCL_FINAL_RELEASE

#define TCL_FINAL_RELEASE   2 /* "final" */

Definition at line 106 of file tcltklib.c.

Referenced by Init_tcltklib(), and lib_get_reltype_name().

◆ Tcl_GetStringResult

#define Tcl_GetStringResult (   interp)    ((interp)->result)

◆ Tcl_GlobalEval

#define Tcl_GlobalEval   tcl_global_eval

Definition at line 317 of file tcltklib.c.

Referenced by ip_finalize(), ip_wrap_namespace_command(), and tcl_global_eval().

◆ Tcl_IncrRefCount

#define Tcl_IncrRefCount (   obj)    (1)

◆ TCL_NAMESPACE_DEBUG

#define TCL_NAMESPACE_DEBUG   0

Definition at line 565 of file tcltklib.c.

Referenced by deleted_ip(), and ip_InterpExitCommand().

◆ TCLTKLIB_RELEASE_DATE

#define TCLTKLIB_RELEASE_DATE   "2010-08-25"

Definition at line 7 of file tcltklib.c.

Referenced by tcltklib_compile_info().

◆ TK_WINDOWING_SYSTEM

#define TK_WINDOWING_SYSTEM   "x11"

Referenced by Init_tcltklib().

◆ TKWAIT_MODE_DESTROY

#define TKWAIT_MODE_DESTROY   2

◆ TKWAIT_MODE_VISIBILITY

#define TKWAIT_MODE_VISIBILITY   1

Definition at line 4860 of file tcltklib.c.

Referenced by ip_rb_threadTkWaitCommand(), and rb_threadWaitVisibilityProc().

◆ TRAP_CHECK

#define TRAP_CHECK ( )
Value:
do { \
if (trap_check(check_var) == 0) return 0; \
} while (0)
static int trap_check(int *check_var)
Definition: tcltklib.c:2141

Definition at line 2136 of file tcltklib.c.

Referenced by lib_eventloop_core().

◆ USE_EVLOOP_THREAD_ALONE_CHECK_FLAG

#define USE_EVLOOP_THREAD_ALONE_CHECK_FLAG   0

Definition at line 2098 of file tcltklib.c.

◆ USE_RUBY_ALLOC

#define USE_RUBY_ALLOC   0

◆ USE_TOGGLE_WINDOW_MODE_FOR_IDLE

#define USE_TOGGLE_WINDOW_MODE_FOR_IDLE   0

Definition at line 499 of file tcltklib.c.

◆ va_init_list

#define va_init_list (   a,
 
)    va_start(a)

◆ WATCHDOG_INTERVAL

#define WATCHDOG_INTERVAL   10/*milliseconds ( 1 -- 999 ) */

Definition at line 525 of file tcltklib.c.

Referenced by lib_watchdog_core().

Function Documentation

◆ _() [1/13]

static void ip_finalize _ ( (Tcl_Interp *)  )
static

◆ _() [2/13]

static VALUE encoding_table_get_obj_core _ ( (VALUE, VALUE, VALUE )
static

◆ _() [3/13]

static VALUE callq_safelevel_handler _ ( (VALUE, VALUE )
static

◆ _() [4/13]

static VALUE ip_alloc _ ( (VALUE )
static

◆ _() [5/13]

static VALUE ip_invoke _ ( (int, VALUE *, VALUE )
static

◆ _() [6/13]

static VALUE ip_invoke_with_position _ ( (int, VALUE *, VALUE, Tcl_QueuePosition)  )
static

◆ _() [7/13]

static VALUE tk_funcall _ ( (VALUE(), int, VALUE *, VALUE )
static

◆ _() [8/13]

static int ip_ruby_cmd _ ( (ClientData, Tcl_Interp *, int, char **)  )
static

◆ _() [9/13]

static void rb_threadUpdateProc _ ( (ClientData)  )
static

◆ _() [10/13]

static int ip_rb_threadTkWaitCommand _ ( (ClientData, Tcl_Interp *, int, char *[])  )
static

◆ _() [11/13]

static char *rb_threadVwaitProc _ ( (ClientData, Tcl_Interp *, char *, char *, int)  )
static

◆ _() [12/13]

static void rb_threadWaitWindowProc _ ( (ClientData, XEvent *)  )
static

◆ _() [13/13]

int invoke_queue_handler _ ( (Tcl_Event *, int)  )
static

◆ _thread_call_proc()

static VALUE _thread_call_proc ( VALUE  arg)
static

Definition at line 2930 of file tcltklib.c.

References _thread_call_proc_core(), _thread_call_proc_ensure(), and rb_ensure().

Referenced by lib_thread_callback().

◆ _thread_call_proc_arg_mark()

void _thread_call_proc_arg_mark ( struct thread_call_proc_arg q)

Definition at line 2907 of file tcltklib.c.

References thread_call_proc_arg::proc, and rb_gc_mark().

◆ _thread_call_proc_core()

static VALUE _thread_call_proc_core ( VALUE  arg)
static

Definition at line 2913 of file tcltklib.c.

References ID_call, thread_call_proc_arg::proc, and rb_funcall().

Referenced by _thread_call_proc().

◆ _thread_call_proc_ensure()

static VALUE _thread_call_proc_ensure ( VALUE  arg)
static

Definition at line 2921 of file tcltklib.c.

References thread_call_proc_arg::done, and Qnil.

Referenced by _thread_call_proc().

◆ _thread_call_proc_value()

static VALUE _thread_call_proc_value ( VALUE  th)
static

Definition at line 2943 of file tcltklib.c.

References ID_value, and rb_funcall().

Referenced by lib_thread_callback().

◆ _timer_for_tcl()

static void _timer_for_tcl ( ClientData  clientData)
static

Definition at line 1615 of file tcltklib.c.

References DUMP1, NULL, Qtrue, rb_thread_critical, run_timer_flag, timer_tick, and timer_token.

Referenced by lib_eventloop_core(), and set_eventloop_tick().

◆ alloc_invoke_arguments()

static char** alloc_invoke_arguments ( int  argc,
VALUE argv 
)
static

◆ call_DoOneEvent()

static VALUE call_DoOneEvent ( VALUE  flag_val)
static

Definition at line 2040 of file tcltklib.c.

References FIX2INT, Qfalse, and Qtrue.

Referenced by lib_eventloop_core().

◆ call_original_exit()

static void call_original_exit ( struct tcltkip ptr,
int  state 
)
static

◆ call_queue_handler()

static int call_queue_handler ( Tcl_Event *  evPtr,
int  flags 
)
static

◆ call_queue_mark()

void call_queue_mark ( struct call_queue q)

◆ callq_safelevel_handler()

static VALUE callq_safelevel_handler ( VALUE  arg,
VALUE  callq 
)
static

◆ check_eventloop_interp()

static int check_eventloop_interp ( )
static

Definition at line 2171 of file tcltklib.c.

References DUMP1, DUMP2, eventloop_interp, and NULL.

Referenced by lib_eventloop_core().

◆ create_dummy_encoding_for_tk()

static VALUE create_dummy_encoding_for_tk ( VALUE  interp,
VALUE  name 
)
static

Definition at line 10142 of file tcltklib.c.

References create_dummy_encoding_for_tk_core(), name, and Qtrue.

Referenced by create_encoding_table_core(), and Init_tcltklib().

◆ create_dummy_encoding_for_tk_core()

static VALUE create_dummy_encoding_for_tk_core ( VALUE  interp,
VALUE  name,
VALUE  error_mode 
)
static

◆ create_encoding_table()

static VALUE create_encoding_table ( VALUE  interp)
static

Definition at line 10608 of file tcltklib.c.

References create_encoding_table_core(), ID_call, rb_funcall(), and rb_proc_new().

Referenced by ip_get_encoding_table().

◆ create_encoding_table_core()

static VALUE create_encoding_table_core ( VALUE  arg,
VALUE  interp 
)
static

◆ create_ip_exc()

static VALUE create_ip_exc ( interp  ,
VALUE interp: VALUE  exc,
const char *  fmt,
va_alist   
)
static

◆ delete_slaves()

static void delete_slaves ( Tcl_Interp *  ip)
static

Definition at line 5578 of file tcltklib.c.

References argc, argv, DUMP1, DUMP2, ip_finalize(), NULL, Qtrue, rb_thread_critical, and Tcl_Eval.

Referenced by ip_finalize().

◆ deleted_ip()

static int deleted_ip ( struct tcltkip ptr)
static

◆ encoding_table_get_name()

static VALUE encoding_table_get_name ( VALUE  table,
VALUE  enc 
)
static

Definition at line 10443 of file tcltklib.c.

References encoding_table_get_name_core(), and Qtrue.

Referenced by ip_get_encoding_table().

◆ encoding_table_get_name_core()

static VALUE encoding_table_get_name_core ( VALUE  table,
VALUE  enc_arg,
VALUE  error_mode 
)
static

◆ encoding_table_get_obj()

static VALUE encoding_table_get_obj ( VALUE  table,
VALUE  enc 
)
static

Definition at line 10450 of file tcltklib.c.

References encoding_table_get_obj_core(), and Qtrue.

Referenced by ip_get_encoding_table(), and lib_fromUTF8_core().

◆ encoding_table_get_obj_core()

static VALUE encoding_table_get_obj_core ( VALUE  table,
VALUE  enc,
VALUE  error_mode 
)
static

◆ eval_queue_handler()

int eval_queue_handler ( Tcl_Event *  evPtr,
int  flags 
)

◆ eval_queue_mark()

void eval_queue_mark ( struct eval_queue q)

Definition at line 453 of file tcltklib.c.

References eval_queue::interp, rb_gc_mark(), eval_queue::result, and eval_queue::thread.

Referenced by eval_queue_handler().

◆ evq_safelevel_handler()

static VALUE evq_safelevel_handler ( VALUE  arg,
VALUE  evq 
)
static

◆ free_invoke_arguments()

static void free_invoke_arguments ( int  argc,
char **  av 
)
static

Definition at line 8908 of file tcltklib.c.

References argc, free(), NULL, and Tcl_DecrRefCount.

Referenced by ip_invoke_real(), and ip_invoke_with_position().

◆ get_eventloop_tick()

static VALUE get_eventloop_tick ( VALUE  self)
static

Definition at line 1726 of file tcltklib.c.

References INT2NUM, and timer_tick.

Referenced by Init_tcltklib(), ip_get_eventloop_tick(), and ip_set_eventloop_tick().

◆ get_eventloop_weight()

static VALUE get_eventloop_weight ( VALUE  self)
static

◆ get_eventloop_window_mode()

static VALUE get_eventloop_window_mode ( VALUE  self)
static

Definition at line 1681 of file tcltklib.c.

References Qfalse, Qtrue, and window_event_mode.

Referenced by Init_tcltklib().

◆ get_ip()

static struct tcltkip* get_ip ( VALUE  self)
static

◆ get_no_event_wait()

static VALUE get_no_event_wait ( VALUE  self)
static

Definition at line 1777 of file tcltklib.c.

References INT2NUM, and no_event_wait.

Referenced by Init_tcltklib(), ip_get_no_event_wait(), and ip_set_no_event_wait().

◆ Init_tcltklib()

void Init_tcltklib ( )

Definition at line 10776 of file tcltklib.c.

References call_original_exit(), create_dummy_encoding_for_tk(), cRubyEncoding, DEFAULT_EVENTLOOP_DEPTH, eLocalJumpError, ENCODING_INDEX_BINARY, ENCODING_INDEX_UTF8, ENCODING_NAME_BINARY, ENCODING_NAME_UTF8, eTkCallbackBreak, eTkCallbackContinue, eTkCallbackRedo, eTkCallbackRetry, eTkCallbackReturn, eTkCallbackThrow, eTkLocalJumpError, eventloop_interp, eventloop_stack, eventloop_thread, finalize_hook_name, get_eventloop_tick(), get_eventloop_weight(), get_eventloop_window_mode(), get_no_event_wait(), ID_alive_p, ID_at_enc, ID_at_interp, ID_at_reason, ID_backtrace, ID_break, ID_call, ID_encoding_name, ID_encoding_table, ID_inspect, ID_join, ID_kill, ID_message, ID_next, ID_return, ID_stop_p, ID_to_s, ID_value, INT2FIX, ip_alloc(), ip_allow_ruby_exit_p(), ip_allow_ruby_exit_set(), ip_cancel_eval(), ip_cancel_eval_unwind(), ip_create_console(), ip_create_slave(), ip_delete(), ip_do_one_event(), ip_eval(), ip_evloop_abort_on_exc(), ip_evloop_abort_on_exc_set(), ip_fromUTF8(), ip_get_encoding_table(), ip_get_eventloop_tick(), ip_get_eventloop_weight(), ip_get_global_var(), ip_get_global_var2(), ip_get_no_event_wait(), ip_get_variable(), ip_get_variable2(), ip_has_invalid_namespace_p(), ip_has_mainwindow_p(), ip_init(), ip_invoke(), ip_invoke_immediate(), ip_is_deleted_p(), ip_is_safe_p(), ip_is_slave_of_p(), ip_mainloop(), ip_mainloop_watchdog(), ip_make_menu_embeddable(), ip_make_safe(), ip_restart(), ip_retval(), ip_set_eventloop_tick(), ip_set_eventloop_weight(), ip_set_global_var(), ip_set_global_var2(), ip_set_no_event_wait(), ip_set_variable(), ip_set_variable2(), ip_split_tklist(), ip_thread_tkwait(), ip_thread_vwait(), ip_toUTF8(), ip_unset_global_var(), ip_unset_global_var2(), ip_unset_variable(), ip_unset_variable2(), lib_conv_listelement(), lib_do_one_event(), lib_evloop_abort_on_exc(), lib_evloop_abort_on_exc_set(), lib_evloop_thread_p(), lib_fromUTF8(), lib_get_reltype_name(), lib_get_system_encoding(), lib_getversion(), lib_mainloop(), lib_mainloop_watchdog(), lib_mark_at_exit(), lib_merge_tklist(), lib_num_of_mainwindows(), lib_set_system_encoding(), lib_split_tklist(), lib_Tcl_backslash(), lib_thread_callback(), lib_toUTF8(), lib_UTF_backslash(), NO_FindExecutable, NO_TCL_DLL, NULL, Qnil, rb_argv0, rb_ary_new2, rb_cObject, rb_const_get(), rb_define_alloc_func(), rb_define_class(), rb_define_const(), rb_define_method(), rb_define_module(), rb_define_module_function(), rb_define_module_under(), rb_eLoadError, rb_enc_find_index(), rb_enc_to_index, rb_eStandardError, rb_global_variable(), rb_intern, rb_obj_freeze(), rb_path2class(), rb_raise(), rb_set_end_proc(), rb_str_new2, rb_utf8_encoding(), RbTk_OBJ_UNTRUST, rbtk_pending_exception, RSTRING_PTR, ruby_native_thread_p, ruby_open_tcl_dll(), set_eventloop_tick(), set_eventloop_weight(), set_eventloop_window_mode(), set_max_block_time(), set_no_event_wait(), TCL_ALPHA_RELEASE, TCL_BETA_RELEASE, TCL_FINAL_RELEASE, tcl_stubs_check(), TCLTK_STUBS_OK, tcltkip_class, tcltklib_compile_info(), tcltklib_release_date, TK_WINDOWING_SYSTEM, and watchdog_thread.

◆ invoke_queue_handler()

int invoke_queue_handler ( Tcl_Event *  evPtr,
int  flags 
)

◆ invoke_queue_mark()

void invoke_queue_mark ( struct invoke_queue q)

◆ invoke_tcl_proc()

static VALUE invoke_tcl_proc ( VALUE  arg)
static

Definition at line 8482 of file tcltklib.c.

References argc, argv, CONST84, DUMP1, inf(), NULL, Qnil, and RbTk_ALLOC_N.

Referenced by ip_invoke_core().

◆ ip_alloc()

static VALUE ip_alloc ( VALUE  self)
static

Definition at line 5856 of file tcltklib.c.

References Data_Wrap_Struct, and ip_free().

Referenced by Init_tcltklib().

◆ ip_allow_ruby_exit_p()

static VALUE ip_allow_ruby_exit_p ( VALUE  self)
static

Definition at line 6722 of file tcltklib.c.

References tcltkip::allow_ruby_exit, deleted_ip(), get_ip(), Qfalse, Qtrue, rb_eRuntimeError, and rb_raise().

Referenced by Init_tcltklib().

◆ ip_allow_ruby_exit_set()

static VALUE ip_allow_ruby_exit_set ( VALUE  self,
VALUE  val 
)
static

◆ ip_CallWhenDeleted()

static void ip_CallWhenDeleted ( ClientData  clientData,
Tcl_Interp *  ip 
)
static

Definition at line 6134 of file tcltklib.c.

References DUMP1, tcltkip::ip, ip_finalize(), Qtrue, and rb_thread_critical.

Referenced by ip_create_slave_core(), and ip_init().

◆ ip_cancel_eval()

static VALUE ip_cancel_eval ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 7798 of file tcltklib.c.

References argc, argv, get_ip(), ip_cancel_eval_core(), Qfalse, Qnil, Qtrue, and rb_scan_args().

Referenced by Init_tcltklib().

◆ ip_cancel_eval_core()

static int ip_cancel_eval_core ( Tcl_Interp *  interp,
VALUE  msg,
int  flag 
)
static

◆ ip_cancel_eval_unwind()

static VALUE ip_cancel_eval_unwind ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 7819 of file tcltklib.c.

References argc, argv, get_ip(), ip_cancel_eval_core(), Qfalse, Qnil, Qtrue, rb_scan_args(), and TCL_CANCEL_UNWIND.

Referenced by Init_tcltklib().

◆ ip_create_console()

static VALUE ip_create_console ( VALUE  self)
static

◆ ip_create_console_core()

static VALUE ip_create_console_core ( VALUE  interp,
int  argc,
VALUE argv 
)
static

◆ ip_create_slave()

static VALUE ip_create_slave ( int  argc,
VALUE argv,
VALUE  self 
)
static

◆ ip_create_slave_core()

static VALUE ip_create_slave_core ( VALUE  interp,
int  argc,
VALUE argv 
)
static

◆ ip_delete()

static VALUE ip_delete ( VALUE  self)
static

Definition at line 6796 of file tcltklib.c.

References deleted_ip(), DUMP1, get_ip(), tcltkip::ip, ip_finalize(), Qnil, Qtrue, and rb_thread_critical.

Referenced by Init_tcltklib().

◆ ip_do_one_event()

static VALUE ip_do_one_event ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 3076 of file tcltklib.c.

References argc, argv, and lib_do_one_event_core().

Referenced by Init_tcltklib().

◆ ip_eval()

static VALUE ip_eval ( VALUE  self,
VALUE  str 
)
static

◆ ip_eval_real()

static VALUE ip_eval_real ( VALUE  self,
char *  cmd_str,
int  cmd_len 
)
static

◆ ip_evloop_abort_on_exc()

static VALUE ip_evloop_abort_on_exc ( VALUE  self)
static

Definition at line 1926 of file tcltklib.c.

References lib_evloop_abort_on_exc().

Referenced by Init_tcltklib().

◆ ip_evloop_abort_on_exc_set()

static VALUE ip_evloop_abort_on_exc_set ( VALUE  self,
VALUE  val 
)
static

◆ ip_finalize()

static void ip_finalize ( Tcl_Interp *  ip)
static

◆ ip_free()

static void ip_free ( struct tcltkip ptr)
static

Definition at line 5803 of file tcltklib.c.

References DUMP1, DUMP2, tcltkip::ip, ip_finalize(), NULL, Qtrue, rb_thread_critical, and xfree().

Referenced by ip_alloc(), and ip_create_slave_core().

◆ ip_fromUTF8()

static VALUE ip_fromUTF8 ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 8317 of file tcltklib.c.

References argc, argv, lib_fromUTF8_core(), Qnil, and rb_scan_args().

Referenced by Init_tcltklib().

◆ ip_get_encoding_table()

static VALUE ip_get_encoding_table ( VALUE  interp)
static

◆ ip_get_eventloop_tick()

static VALUE ip_get_eventloop_tick ( VALUE  self)
static

Definition at line 1752 of file tcltklib.c.

References get_eventloop_tick().

Referenced by Init_tcltklib().

◆ ip_get_eventloop_weight()

static VALUE ip_get_eventloop_weight ( VALUE  self)
static

Definition at line 1857 of file tcltklib.c.

References get_eventloop_weight().

Referenced by Init_tcltklib().

◆ ip_get_global_var()

static VALUE ip_get_global_var ( VALUE  self,
VALUE  varname 
)
static

Definition at line 9657 of file tcltklib.c.

References INT2FIX, and ip_get_variable().

Referenced by Init_tcltklib().

◆ ip_get_global_var2()

static VALUE ip_get_global_var2 ( VALUE  self,
VALUE  varname,
VALUE  index 
)
static

Definition at line 9666 of file tcltklib.c.

References INT2FIX, and ip_get_variable2().

Referenced by Init_tcltklib().

◆ ip_get_no_event_wait()

static VALUE ip_get_no_event_wait ( VALUE  self)
static

Definition at line 1803 of file tcltklib.c.

References get_no_event_wait().

Referenced by Init_tcltklib().

◆ ip_get_result_string_obj()

static VALUE ip_get_result_string_obj ( Tcl_Interp *  interp)
static

Definition at line 6974 of file tcltklib.c.

References rb_tainted_str_new2, RbTk_OBJ_UNTRUST, Tcl_DecrRefCount, and Tcl_IncrRefCount.

Referenced by ip_eval_real(), and ip_invoke_core().

◆ ip_get_variable()

static VALUE ip_get_variable ( VALUE  self,
VALUE  varname,
VALUE  flag 
)
static

Definition at line 9434 of file tcltklib.c.

References ip_get_variable2(), and Qnil.

Referenced by Init_tcltklib(), and ip_get_global_var().

◆ ip_get_variable2()

static VALUE ip_get_variable2 ( VALUE  self,
VALUE  varname,
VALUE  index,
VALUE  flag 
)
static

◆ ip_get_variable2_core()

static VALUE ip_get_variable2_core ( VALUE  interp,
int  argc,
VALUE argv 
)
static

◆ ip_has_invalid_namespace_p()

static VALUE ip_has_invalid_namespace_p ( VALUE  self)
static

Definition at line 6828 of file tcltklib.c.

References get_ip(), tcltkip::ip, NULL, Qfalse, and Qtrue.

Referenced by Init_tcltklib().

◆ ip_has_mainwindow_p()

static VALUE ip_has_mainwindow_p ( VALUE  self)
static

Definition at line 6880 of file tcltklib.c.

References ip_has_mainwindow_p_core(), NULL, and tk_funcall().

Referenced by Init_tcltklib().

◆ ip_has_mainwindow_p_core()

static VALUE ip_has_mainwindow_p_core ( VALUE  self,
int  argc,
VALUE argv 
)
static

Definition at line 6863 of file tcltklib.c.

References deleted_ip(), get_ip(), tcltkip::ip, NULL, Qfalse, Qnil, Qtrue, and tk_stubs_init_p().

Referenced by ip_has_mainwindow_p().

◆ ip_init()

static VALUE ip_init ( int  argc,
VALUE argv,
VALUE  self 
)
static

◆ ip_InterpExitCommand()

static int ip_InterpExitCommand ( ClientData  clientData,
Tcl_Interp *  interp,
int  argc,
argv   
)
static

◆ ip_invoke()

static VALUE ip_invoke ( int  argc,
VALUE argv,
VALUE  obj 
)
static

Definition at line 9291 of file tcltklib.c.

References argc, argv, and ip_invoke_with_position().

Referenced by Init_tcltklib().

◆ ip_invoke_core()

static VALUE ip_invoke_core ( VALUE  interp,
int  argc,
char **  argv 
)
static

◆ ip_invoke_immediate()

static VALUE ip_invoke_immediate ( int  argc,
VALUE argv,
VALUE  obj 
)
static

Definition at line 9300 of file tcltklib.c.

References argc, argv, and ip_invoke_with_position().

Referenced by Init_tcltklib().

◆ ip_invoke_real()

static VALUE ip_invoke_real ( int  argc,
VALUE argv,
VALUE  interp 
)
static

◆ ip_invoke_with_position()

static VALUE ip_invoke_with_position ( int  argc,
VALUE argv,
VALUE  obj,
Tcl_QueuePosition  position 
)
static

◆ ip_is_deleted_p()

static VALUE ip_is_deleted_p ( VALUE  self)
static

Definition at line 6850 of file tcltklib.c.

References deleted_ip(), get_ip(), Qfalse, and Qtrue.

Referenced by Init_tcltklib().

◆ ip_is_safe_p()

static VALUE ip_is_safe_p ( VALUE  self)
static

Definition at line 6703 of file tcltklib.c.

References deleted_ip(), get_ip(), tcltkip::ip, Qfalse, Qtrue, rb_eRuntimeError, and rb_raise().

Referenced by Init_tcltklib().

◆ ip_is_slave_of_p()

static VALUE ip_is_slave_of_p ( VALUE  self,
VALUE  master 
)
static

Definition at line 6553 of file tcltklib.c.

References get_ip(), tcltkip::ip, Qfalse, Qtrue, rb_eArgError, rb_obj_is_kind_of(), rb_raise(), and tcltkip_class.

Referenced by Init_tcltklib().

◆ ip_mainloop()

static VALUE ip_mainloop ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 2751 of file tcltklib.c.

References argc, argv, deleted_ip(), eventloop_interp, get_ip(), tcltkip::ip, lib_mainloop(), NULL, and Qnil.

Referenced by Init_tcltklib().

◆ ip_mainloop_watchdog()

static VALUE ip_mainloop_watchdog ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 2880 of file tcltklib.c.

References argc, argv, deleted_ip(), get_ip(), tcltkip::ip, lib_mainloop_watchdog(), NULL, and Qnil.

Referenced by Init_tcltklib().

◆ ip_make_menu_embeddable()

static VALUE ip_make_menu_embeddable ( VALUE  interp,
VALUE  menu_path 
)
static

Definition at line 10761 of file tcltklib.c.

References argv, ip_make_menu_embeddable_core(), and tk_funcall().

Referenced by Init_tcltklib().

◆ ip_make_menu_embeddable_core()

static VALUE ip_make_menu_embeddable_core ( VALUE  interp,
int  argc,
VALUE argv 
)
static

◆ ip_make_safe()

static VALUE ip_make_safe ( VALUE  self)
static

Definition at line 6688 of file tcltklib.c.

References deleted_ip(), get_ip(), ip_make_safe_core(), NULL, rb_eRuntimeError, rb_raise(), and tk_funcall().

Referenced by Init_tcltklib().

◆ ip_make_safe_core()

static VALUE ip_make_safe_core ( VALUE  interp,
int  argc,
VALUE argv 
)
static

◆ ip_null_proc()

static int ip_null_proc ( ClientData  clientData,
Tcl_Interp *  interp,
int  argc,
argv   
)
static

Definition at line 5648 of file tcltklib.c.

Referenced by ip_finalize().

◆ ip_rb_replaceSlaveTkCmdsCommand()

static int ip_rb_replaceSlaveTkCmdsCommand ( ClientData  clientData,
Tcl_Interp *  interp,
int  objc,
objv   
)
static

Definition at line 5944 of file tcltklib.c.

References DUMP1, ip_InterpExitCommand(), ip_replace_wait_commands(), and NULL.

Referenced by ip_create_slave_core(), and ip_init().

◆ ip_rb_threadTkWaitCommand()

static int ip_rb_threadTkWaitCommand ( ClientData  clientData,
Tcl_Interp *  interp,
int  objc,
objv   
)
static

◆ ip_rb_threadUpdateCommand()

static int ip_rb_threadUpdateCommand ( ClientData  clientData,
Tcl_Interp *  interp,
int  objc,
objv   
)
static

◆ ip_rb_threadVwaitCommand()

static int ip_rb_threadVwaitCommand ( ClientData  clientData,
Tcl_Interp *  interp,
int  objc,
objv   
)
static

◆ ip_rbTkWaitCommand()

static int ip_rbTkWaitCommand ( ClientData  clientData,
Tcl_Interp *  interp,
int  objc,
objv   
)
static

◆ ip_rbUpdateCommand()

static int ip_rbUpdateCommand ( ClientData  clientData,
Tcl_Interp *  interp,
int  objc,
objv   
)
static

◆ ip_rbVwaitCommand()

static int ip_rbVwaitCommand ( ClientData  clientData,
Tcl_Interp *  interp,
int  objc,
objv   
)
static

◆ ip_replace_wait_commands()

static void ip_replace_wait_commands ( Tcl_Interp *  interp,
Tk_Window  mainWin 
)
static

◆ ip_restart()

static VALUE ip_restart ( VALUE  self)
static

◆ ip_retval()

static VALUE ip_retval ( VALUE  self)
static

Definition at line 9274 of file tcltklib.c.

References deleted_ip(), get_ip(), INT2FIX, rb_tainted_str_new2, and tcltkip::return_value.

Referenced by Init_tcltklib().

◆ ip_ruby_cmd()

static int ip_ruby_cmd ( ClientData  clientData,
Tcl_Interp *  interp,
int  argc,
argv   
)
static

◆ ip_ruby_cmd_core()

static VALUE ip_ruby_cmd_core ( struct cmd_body_arg arg)
static

◆ ip_ruby_cmd_receiver_const_get()

static VALUE ip_ruby_cmd_receiver_const_get ( char *  name)
static

◆ ip_ruby_cmd_receiver_get()

static VALUE ip_ruby_cmd_receiver_get ( char *  str)
static

◆ ip_ruby_eval()

static int ip_ruby_eval ( ClientData  clientData,
Tcl_Interp *  interp,
int  argc,
argv   
)
static

◆ ip_RubyExitCommand()

static int ip_RubyExitCommand ( ClientData  clientData,
Tcl_Interp *  interp,
int  argc,
argv   
)
static

◆ ip_set_eventloop_tick()

static VALUE ip_set_eventloop_tick ( VALUE  self,
VALUE  tick 
)
static

Definition at line 1733 of file tcltklib.c.

References deleted_ip(), get_eventloop_tick(), get_ip(), tcltkip::ip, NULL, and set_eventloop_tick().

Referenced by Init_tcltklib().

◆ ip_set_eventloop_weight()

static VALUE ip_set_eventloop_weight ( VALUE  self,
VALUE  loop_max,
VALUE  no_event 
)
static

Definition at line 1837 of file tcltklib.c.

References deleted_ip(), get_eventloop_weight(), get_ip(), tcltkip::ip, NULL, and set_eventloop_weight().

Referenced by Init_tcltklib().

◆ ip_set_exc_message()

static void ip_set_exc_message ( Tcl_Interp *  interp,
VALUE  exc 
)
static

◆ ip_set_global_var()

static VALUE ip_set_global_var ( VALUE  self,
VALUE  varname,
VALUE  value 
)
static

Definition at line 9676 of file tcltklib.c.

References INT2FIX, and ip_set_variable().

Referenced by Init_tcltklib().

◆ ip_set_global_var2()

static VALUE ip_set_global_var2 ( VALUE  self,
VALUE  varname,
VALUE  index,
VALUE  value 
)
static

Definition at line 9686 of file tcltklib.c.

References INT2FIX, and ip_set_variable2().

Referenced by Init_tcltklib().

◆ ip_set_no_event_wait()

static VALUE ip_set_no_event_wait ( VALUE  self,
VALUE  wait 
)
static

Definition at line 1784 of file tcltklib.c.

References deleted_ip(), get_ip(), get_no_event_wait(), tcltkip::ip, NULL, set_no_event_wait(), and wait().

Referenced by Init_tcltklib().

◆ ip_set_variable()

static VALUE ip_set_variable ( VALUE  self,
VALUE  varname,
VALUE  value,
VALUE  flag 
)
static

Definition at line 9573 of file tcltklib.c.

References ip_set_variable2(), and Qnil.

Referenced by Init_tcltklib(), and ip_set_global_var().

◆ ip_set_variable2()

static VALUE ip_set_variable2 ( VALUE  self,
VALUE  varname,
VALUE  index,
VALUE  value,
VALUE  flag 
)
static

◆ ip_set_variable2_core()

static VALUE ip_set_variable2_core ( VALUE  interp,
int  argc,
VALUE argv 
)
static

◆ ip_split_tklist()

static VALUE ip_split_tklist ( VALUE  self,
VALUE  list_str 
)
static

Definition at line 9861 of file tcltklib.c.

References lib_split_tklist_core().

Referenced by Init_tcltklib().

◆ ip_thread_tkwait()

static VALUE ip_thread_tkwait ( VALUE  self,
VALUE  mode,
VALUE  target 
)
static

Definition at line 5507 of file tcltklib.c.

References argv, ip_invoke_with_position(), and rb_str_new2.

Referenced by Init_tcltklib().

◆ ip_thread_vwait()

static VALUE ip_thread_vwait ( VALUE  self,
VALUE  var 
)
static

Definition at line 5493 of file tcltklib.c.

References argv, ip_invoke_with_position(), and rb_str_new2.

Referenced by Init_tcltklib().

◆ ip_toUTF8()

static VALUE ip_toUTF8 ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 8115 of file tcltklib.c.

References argc, argv, lib_toUTF8_core(), Qnil, and rb_scan_args().

Referenced by Init_tcltklib().

◆ ip_unset_global_var()

static VALUE ip_unset_global_var ( VALUE  self,
VALUE  varname 
)
static

Definition at line 9697 of file tcltklib.c.

References INT2FIX, and ip_unset_variable().

Referenced by Init_tcltklib().

◆ ip_unset_global_var2()

static VALUE ip_unset_global_var2 ( VALUE  self,
VALUE  varname,
VALUE  index 
)
static

Definition at line 9706 of file tcltklib.c.

References INT2FIX, and ip_unset_variable2().

Referenced by Init_tcltklib().

◆ ip_unset_variable()

static VALUE ip_unset_variable ( VALUE  self,
VALUE  varname,
VALUE  flag 
)
static

Definition at line 9648 of file tcltklib.c.

References ip_unset_variable2(), and Qnil.

Referenced by Init_tcltklib(), and ip_unset_global_var().

◆ ip_unset_variable2()

static VALUE ip_unset_variable2 ( VALUE  self,
VALUE  varname,
VALUE  index,
VALUE  flag 
)
static

◆ ip_unset_variable2_core()

static VALUE ip_unset_variable2_core ( VALUE  interp,
int  argc,
VALUE argv 
)
static

◆ ip_wrap_namespace_command()

static void ip_wrap_namespace_command ( Tcl_Interp *  interp)
static

Definition at line 6096 of file tcltklib.c.

References NULL, and Tcl_GlobalEval.

Referenced by ip_create_slave_core(), and ip_init().

◆ ivq_safelevel_handler()

VALUE ivq_safelevel_handler ( VALUE  arg,
VALUE  ivq 
)

◆ lib_conv_listelement()

static VALUE lib_conv_listelement ( VALUE  self,
VALUE  src 
)
static

◆ lib_do_one_event()

static VALUE lib_do_one_event ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 3067 of file tcltklib.c.

References argc, argv, and lib_do_one_event_core().

Referenced by Init_tcltklib().

◆ lib_do_one_event_core()

static VALUE lib_do_one_event_core ( int  argc,
VALUE argv,
VALUE  self,
int  is_ip 
)
static

◆ lib_eventloop_core()

static int lib_eventloop_core ( int  check_root,
int  update_flag,
int *  check_var,
Tcl_Interp *  interp 
)
static

◆ lib_eventloop_ensure()

VALUE lib_eventloop_ensure ( VALUE  args)

◆ lib_eventloop_launcher()

static VALUE lib_eventloop_launcher ( int  check_root,
int  update_flag,
int *  check_var,
Tcl_Interp *  interp 
)
static

◆ lib_eventloop_main()

VALUE lib_eventloop_main ( VALUE  args)

◆ lib_eventloop_main_core()

VALUE lib_eventloop_main_core ( VALUE  args)

◆ lib_evloop_abort_on_exc()

static VALUE lib_evloop_abort_on_exc ( VALUE  self)
static

◆ lib_evloop_abort_on_exc_set()

static VALUE lib_evloop_abort_on_exc_set ( VALUE  self,
VALUE  val 
)
static

◆ lib_evloop_thread_p()

static VALUE lib_evloop_thread_p ( VALUE  self)
static

Definition at line 1900 of file tcltklib.c.

References eventloop_thread, NIL_P, Qfalse, Qnil, Qtrue, and rb_thread_current().

Referenced by Init_tcltklib().

◆ lib_fromUTF8()

static VALUE lib_fromUTF8 ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 8303 of file tcltklib.c.

References argc, argv, lib_fromUTF8_core(), Qnil, and rb_scan_args().

Referenced by Init_tcltklib().

◆ lib_fromUTF8_core()

static VALUE lib_fromUTF8_core ( VALUE  ip_obj,
VALUE  src,
VALUE  encodename 
)
static

◆ lib_get_reltype_name()

static VALUE lib_get_reltype_name ( VALUE  self)
static

◆ lib_get_system_encoding()

static VALUE lib_get_system_encoding ( VALUE  self)
static

Definition at line 8427 of file tcltklib.c.

References NULL, Qnil, rb_str_new2, and tcl_stubs_check().

Referenced by Init_tcltklib(), and lib_set_system_encoding().

◆ lib_getversion()

static VALUE lib_getversion ( VALUE  self)
static

Definition at line 10004 of file tcltklib.c.

References INT2NUM, rb_ary_new3, set_tcltk_version(), and tcltk_version.

Referenced by Init_tcltklib().

◆ lib_mainloop()

static VALUE lib_mainloop ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 2731 of file tcltklib.c.

References argc, argv, lib_eventloop_launcher(), NULL, Qfalse, Qtrue, rb_scan_args(), and RTEST.

Referenced by Init_tcltklib(), and ip_mainloop().

◆ lib_mainloop_watchdog()

static VALUE lib_mainloop_watchdog ( int  argc,
VALUE argv,
VALUE  self 
)
static

◆ lib_mark_at_exit()

static void lib_mark_at_exit ( VALUE  self)
static

Definition at line 5625 of file tcltklib.c.

References at_exit.

Referenced by Init_tcltklib().

◆ lib_merge_tklist()

static VALUE lib_merge_tklist ( int  argc,
VALUE argv,
VALUE  obj 
)
static

◆ lib_num_of_mainwindows()

static VALUE lib_num_of_mainwindows ( VALUE  self)
static

Definition at line 1979 of file tcltklib.c.

References lib_num_of_mainwindows_core(), NULL, and tk_funcall().

Referenced by Init_tcltklib().

◆ lib_num_of_mainwindows_core()

static VALUE lib_num_of_mainwindows_core ( VALUE  self,
int  argc,
VALUE argv 
)
static

Definition at line 1966 of file tcltklib.c.

References INT2FIX, and tk_stubs_init_p().

Referenced by lib_num_of_mainwindows().

◆ lib_restart()

static VALUE lib_restart ( VALUE  self)
static

◆ lib_restart_core()

static VALUE lib_restart_core ( VALUE  interp,
int  argc,
VALUE argv 
)
static

◆ lib_set_system_encoding()

static VALUE lib_set_system_encoding ( VALUE  self,
VALUE  enc_name 
)
static

◆ lib_split_tklist()

static VALUE lib_split_tklist ( VALUE  self,
VALUE  list_str 
)
static

Definition at line 9852 of file tcltklib.c.

References lib_split_tklist_core(), and Qnil.

Referenced by Init_tcltklib().

◆ lib_split_tklist_core()

static VALUE lib_split_tklist_core ( VALUE  ip_obj,
VALUE  list_str 
)
static

◆ lib_Tcl_backslash()

static VALUE lib_Tcl_backslash ( VALUE  self,
VALUE  str 
)
static

Definition at line 8419 of file tcltklib.c.

References lib_UTF_backslash_core().

Referenced by Init_tcltklib().

◆ lib_thread_callback()

static VALUE lib_thread_callback ( int  argc,
VALUE argv,
VALUE  self 
)
static

◆ lib_toUTF8()

static VALUE lib_toUTF8 ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 8101 of file tcltklib.c.

References argc, argv, lib_toUTF8_core(), Qnil, and rb_scan_args().

Referenced by Init_tcltklib().

◆ lib_toUTF8_core()

static VALUE lib_toUTF8_core ( VALUE  ip_obj,
VALUE  src,
VALUE  encodename 
)
static

◆ lib_UTF_backslash()

static VALUE lib_UTF_backslash ( VALUE  self,
VALUE  str 
)
static

Definition at line 8411 of file tcltklib.c.

References lib_UTF_backslash_core().

Referenced by Init_tcltklib().

◆ lib_UTF_backslash_core()

static VALUE lib_UTF_backslash_core ( VALUE  self,
VALUE  str,
int  all_bs 
)
static

◆ lib_watchdog_core()

static VALUE lib_watchdog_core ( VALUE  check_rootwidget)
static

◆ lib_watchdog_ensure()

VALUE lib_watchdog_ensure ( VALUE  arg)

Definition at line 2844 of file tcltklib.c.

References eventloop_thread, and Qnil.

Referenced by lib_mainloop_watchdog().

◆ matherr()

int matherr ( )

◆ pending_exception_check0()

static int pending_exception_check0 ( )
static

◆ pending_exception_check1()

static int pending_exception_check1 ( int  thr_crit_bup,
struct tcltkip ptr 
)
static

◆ rb_threadUpdateProc()

static void rb_threadUpdateProc ( ClientData  clientData)
static

◆ rb_threadVwaitProc()

static char* rb_threadVwaitProc ( ClientData  clientData,
Tcl_Interp *  interp,
char *  name1,
char *  name2,
int  flags 
)
static

◆ rb_threadWaitVisibilityProc()

static void rb_threadWaitVisibilityProc ( ClientData  clientData,
XEvent *  eventPtr 
)
static

◆ rb_threadWaitWindowProc()

static void rb_threadWaitWindowProc ( ClientData  clientData,
XEvent *  eventPtr 
)
static

◆ rbtk_EventCheckProc()

void rbtk_EventCheckProc ( ClientData  clientData,
int  flag 
)

Definition at line 1999 of file tcltklib.c.

References rb_thread_schedule().

Referenced by lib_eventloop_ensure(), and lib_eventloop_main_core().

◆ rbtk_EventSetupProc()

void rbtk_EventSetupProc ( ClientData  clientData,
int  flag 
)

Definition at line 1990 of file tcltklib.c.

References no_event_tick.

Referenced by lib_eventloop_ensure(), and lib_eventloop_main_core().

◆ rbtk_preserve_ip()

static int rbtk_preserve_ip ( struct tcltkip ptr)
static

◆ rbtk_release_ip()

static int rbtk_release_ip ( struct tcltkip ptr)
static

◆ set_eventloop_tick()

static VALUE set_eventloop_tick ( VALUE  self,
VALUE  tick 
)
static

◆ set_eventloop_weight()

static VALUE set_eventloop_weight ( VALUE  self,
VALUE  loop_max,
VALUE  no_event 
)
static

◆ set_eventloop_window_mode()

static VALUE set_eventloop_window_mode ( VALUE  self,
VALUE  mode 
)
static

Definition at line 1666 of file tcltklib.c.

References RTEST, and window_event_mode.

Referenced by Init_tcltklib().

◆ set_max_block_time()

static VALUE set_max_block_time ( VALUE  self,
VALUE  time 
)
static

◆ set_no_event_wait()

static VALUE set_no_event_wait ( VALUE  self,
VALUE  wait 
)
static

Definition at line 1759 of file tcltklib.c.

References no_event_wait, NUM2INT, rb_eArgError, rb_raise(), and wait().

Referenced by Init_tcltklib(), and ip_set_no_event_wait().

◆ set_tcltk_version()

static void set_tcltk_version ( )
static

Definition at line 117 of file tcltklib.c.

References tcltk_version.

Referenced by lib_get_reltype_name(), and lib_getversion().

◆ tcl_eval()

static int tcl_eval ( Tcl_Interp *  interp,
const char *  cmd 
)
static

Definition at line 281 of file tcltklib.c.

References buf, free(), strdup, and Tcl_Eval.

◆ tcl_global_eval()

static int tcl_global_eval ( Tcl_Interp *  interp,
const char *  cmd 
)
static

Definition at line 302 of file tcltklib.c.

References buf, free(), strdup, and Tcl_GlobalEval.

◆ tcl_protect()

static int tcl_protect ( Tcl_Interp *  interp,
VALUE (*)()  proc,
VALUE  data 
)
static

Definition at line 3357 of file tcltklib.c.

References rb_bug(), ruby_native_thread_p, and tcl_protect_core().

Referenced by ip_ruby_cmd(), and ip_ruby_eval().

◆ tcl_protect_core()

static int tcl_protect_core ( Tcl_Interp *  interp,
VALUE (*)()  proc,
VALUE  data 
)
static

◆ tcl_stubs_check()

static void tcl_stubs_check ( )
static

◆ tcltkip_init_tk()

static VALUE tcltkip_init_tk ( VALUE  interp)
static

◆ tcltklib_compile_info()

static VALUE tcltklib_compile_info ( )
static

◆ tk_funcall()

static VALUE tk_funcall ( VALUE (*)()  func,
int  argc,
VALUE argv,
VALUE  obj 
)
static

◆ TkStringValue()

static VALUE TkStringValue ( VALUE  obj)
static

◆ trap_check()

static int trap_check ( int *  check_var)
static

◆ update_encoding_table()

static int update_encoding_table ( VALUE  table,
VALUE  interp,
VALUE  error_mode 
)
static

◆ VwaitVarProc()

static char* VwaitVarProc ( ClientData  clientData,
Tcl_Interp *  interp,
char *  name1,
char *  name2,
int  flags 
)
static

Definition at line 4196 of file tcltklib.c.

References NULL.

Referenced by ip_rbVwaitCommand().

◆ WaitVariableProc()

static char* WaitVariableProc ( ClientData  clientData,
Tcl_Interp *  interp,
char *  name1,
char *  name2,
int  flags 
)
static

Definition at line 4407 of file tcltklib.c.

References NULL.

Referenced by ip_rbTkWaitCommand().

◆ WaitVisibilityProc()

static void WaitVisibilityProc ( ClientData  clientData,
XEvent *  eventPtr 
)
static

Definition at line 4423 of file tcltklib.c.

Referenced by ip_rbTkWaitCommand().

◆ WaitWindowProc()

static void WaitWindowProc ( ClientData  clientData,
XEvent *  eventPtr 
)
static

Definition at line 4439 of file tcltklib.c.

Referenced by ip_rbTkWaitCommand().

◆ watchdog_evloop_launcher()

static VALUE watchdog_evloop_launcher ( VALUE  check_rootwidget)
static

Definition at line 2777 of file tcltklib.c.

References lib_eventloop_launcher(), NULL, and RTEST.

Referenced by lib_watchdog_core().

Variable Documentation

◆ at_exit

int at_exit = 0
static

Definition at line 186 of file tcltklib.c.

Referenced by ip_finalize(), lib_mark_at_exit(), and ruby_vm_at_exit().

◆ check_rootwidget_flag

int check_rootwidget_flag = 0
static

Definition at line 543 of file tcltklib.c.

Referenced by ip_rbTkWaitCommand(), and lib_eventloop_main_core().

◆ cRubyEncoding

VALUE cRubyEncoding
static

◆ current_interp

Tcl_Interp* current_interp

Definition at line 485 of file tcltklib.c.

Referenced by ip_init().

◆ eLocalJumpError

VALUE eLocalJumpError
static

Definition at line 214 of file tcltklib.c.

Referenced by Init_tcltklib(), and tcl_protect_core().

◆ ENCODING_INDEX_BINARY

int ENCODING_INDEX_BINARY
static

◆ ENCODING_INDEX_UTF8

int ENCODING_INDEX_UTF8
static

◆ ENCODING_NAME_BINARY

VALUE ENCODING_NAME_BINARY
static

◆ ENCODING_NAME_UTF8

VALUE ENCODING_NAME_UTF8
static

Definition at line 195 of file tcltklib.c.

Referenced by Init_tcltklib(), lib_toUTF8_core(), and lib_UTF_backslash_core().

◆ eTkCallbackBreak

VALUE eTkCallbackBreak
static

Definition at line 211 of file tcltklib.c.

Referenced by Init_tcltklib(), ip_eval_real(), ip_invoke_core(), and tcl_protect_core().

◆ eTkCallbackContinue

VALUE eTkCallbackContinue
static

Definition at line 212 of file tcltklib.c.

Referenced by Init_tcltklib(), ip_eval_real(), ip_invoke_core(), and tcl_protect_core().

◆ eTkCallbackRedo

VALUE eTkCallbackRedo
static

◆ eTkCallbackRetry

VALUE eTkCallbackRetry
static

◆ eTkCallbackReturn

VALUE eTkCallbackReturn
static

Definition at line 210 of file tcltklib.c.

Referenced by Init_tcltklib(), ip_eval_real(), ip_invoke_core(), and tcl_protect_core().

◆ eTkCallbackThrow

VALUE eTkCallbackThrow
static

◆ eTkLocalJumpError

VALUE eTkLocalJumpError
static

Definition at line 216 of file tcltklib.c.

Referenced by Init_tcltklib(), and tcl_protect_core().

◆ event_loop_abort_on_exc

int event_loop_abort_on_exc = 1
static

◆ event_loop_max

int event_loop_max = DEFAULT_EVENT_LOOP_MAX
static

Definition at line 532 of file tcltklib.c.

Referenced by get_eventloop_weight(), lib_eventloop_core(), and set_eventloop_weight().

◆ event_loop_wait_event

int event_loop_wait_event = 0
static

Definition at line 539 of file tcltklib.c.

Referenced by lib_eventloop_core(), and lib_watchdog_core().

◆ eventloop_interp

Tcl_Interp* eventloop_interp
static

Definition at line 476 of file tcltklib.c.

Referenced by check_eventloop_interp(), Init_tcltklib(), and ip_mainloop().

◆ eventloop_stack

VALUE eventloop_stack
static

Definition at line 480 of file tcltklib.c.

Referenced by Init_tcltklib(), lib_eventloop_ensure(), and lib_eventloop_launcher().

◆ eventloop_thread

VALUE eventloop_thread
static

◆ finalize_hook_name

const char finalize_hook_name[] = "INTERP_FINALIZE_HOOK"
static

Definition at line 182 of file tcltklib.c.

Referenced by Init_tcltklib(), and ip_finalize().

◆ have_rb_thread_waiting_for_value

int have_rb_thread_waiting_for_value = 0
static

◆ ID_alive_p

ID ID_alive_p
static

Definition at line 230 of file tcltklib.c.

Referenced by Init_tcltklib().

◆ ID_at_enc

ID ID_at_enc
static

◆ ID_at_interp

ID ID_at_interp
static

◆ ID_at_reason

ID ID_at_reason
static

Definition at line 239 of file tcltklib.c.

Referenced by Init_tcltklib(), and tcl_protect_core().

◆ ID_backtrace

ID ID_backtrace
static

Definition at line 236 of file tcltklib.c.

Referenced by Init_tcltklib(), and tcl_protect_core().

◆ ID_break

ID ID_break
static

Definition at line 241 of file tcltklib.c.

Referenced by Init_tcltklib(), and tcl_protect_core().

◆ ID_call

ID ID_call
static

◆ ID_encoding_name

ID ID_encoding_name
static

Definition at line 226 of file tcltklib.c.

Referenced by encoding_table_get_name_core(), and Init_tcltklib().

◆ ID_encoding_table

ID ID_encoding_table
static

Definition at line 227 of file tcltklib.c.

Referenced by create_encoding_table_core(), Init_tcltklib(), and ip_get_encoding_table().

◆ ID_inspect

ID ID_inspect
static

Definition at line 245 of file tcltklib.c.

Referenced by Init_tcltklib(), set_max_block_time(), and TkStringValue().

◆ ID_join

ID ID_join
static

Definition at line 232 of file tcltklib.c.

Referenced by Init_tcltklib(), and TkStringValue().

◆ ID_kill

ID ID_kill
static

Definition at line 231 of file tcltklib.c.

Referenced by Init_tcltklib(), lib_thread_callback(), and lib_watchdog_core().

◆ ID_message

ID ID_message
static

Definition at line 237 of file tcltklib.c.

Referenced by Init_tcltklib(), and ip_set_exc_message().

◆ ID_next

ID ID_next
static

Definition at line 242 of file tcltklib.c.

Referenced by Init_tcltklib(), and tcl_protect_core().

◆ ID_return

ID ID_return
static

Definition at line 240 of file tcltklib.c.

Referenced by Init_tcltklib(), and tcl_protect_core().

◆ ID_stop_p

ID ID_stop_p
static

◆ ID_to_s

ID ID_to_s
static

◆ ID_value

ID ID_value
static

Definition at line 233 of file tcltklib.c.

Referenced by _thread_call_proc_value(), and Init_tcltklib().

◆ loop_counter

int loop_counter = 0
static

Definition at line 541 of file tcltklib.c.

Referenced by lib_eventloop_core(), and lib_watchdog_core().

◆ major

int major

◆ minor

int minor

◆ no_event_tick

int no_event_tick = DEFAULT_NO_EVENT_TICK
static

◆ no_event_wait

int no_event_wait = DEFAULT_NO_EVENT_WAIT
static

Definition at line 534 of file tcltklib.c.

Referenced by get_no_event_wait(), lib_eventloop_core(), and set_no_event_wait().

◆ patchlevel

int patchlevel

Definition at line 113 of file tcltklib.c.

◆ rbtk_eventloop_depth

int rbtk_eventloop_depth = 0
static

◆ rbtk_internal_eventloop_handler

int rbtk_internal_eventloop_handler = 0
static

◆ rbtk_pending_exception

VALUE rbtk_pending_exception
static

◆ req_timer_tick

int req_timer_tick = DEFAULT_TIMER_TICK
static

Definition at line 536 of file tcltklib.c.

Referenced by lib_eventloop_core(), and set_eventloop_tick().

◆ run_timer_flag

int run_timer_flag = 0
static

Definition at line 537 of file tcltklib.c.

Referenced by _timer_for_tcl(), lib_eventloop_core(), and trap_check().

◆ tclDummyMathPtr

int* tclDummyMathPtr = (int *) matherr

Definition at line 400 of file tcltklib.c.

◆ tcltk_version

struct { ... } tcltk_version

◆ tcltkip_class

VALUE tcltkip_class
static

Definition at line 221 of file tcltklib.c.

Referenced by Init_tcltklib(), ip_is_slave_of_p(), and tk_funcall().

◆ tcltklib_release_date

const char tcltklib_release_date[] = TCLTKLIB_RELEASE_DATE
static

Definition at line 179 of file tcltklib.c.

Referenced by Init_tcltklib().

◆ timer_tick

int timer_tick = DEFAULT_TIMER_TICK
static

◆ timer_token

Tcl_TimerToken timer_token = (Tcl_TimerToken)NULL
static

◆ type

int type

Definition at line 112 of file tcltklib.c.

Referenced by big2ulong(), callback(), catch_type(), check_gen_consistency(), check_match(), check_type_tree(), compile_array(), compile_array_(), compile_length_tree(), compile_tree(), count_objects(), count_objects_size(), defined_expr(), encodes(), exception_type2symbol(), find_iid(), fixup_nodes(), fole_type(), function_call(), gc_mark_maybe(), generic_to_value(), get_head_value_node(), init_inetsock_internal(), initialize(), ins_methods_i(), ins_methods_priv_i(), ins_methods_prot_i(), ins_methods_pub_i(), ins_methods_push(), insn_data_to_s_detail(), int_to_ffi_type(), invoke_block_from_c(), iow_inspect(), iseq_build_from_ary_exception(), iseq_compile_each(), iseq_data_to_ary(), iseq_load(), iseq_set_sequence(), loaded_feature_path(), logop_gen(), method_entry_i(), method_entry_set(), must_not_be_anonymous(), new_child_iseq(), next_setup(), next_state_class(), next_state_val(), node_new_ctype(), node_new_enclose(), node_newnode(), objspace_malloc_increase(), ole_method_invoke_kind(), ole_method_return_type(), ole_method_return_type_detail(), ole_ole_type(), ole_param_ole_type(), ole_ptrtype2val(), ole_type_from_itypeinfo(), ole_type_impl_ole_types(), ole_types_from_typelib(), ole_usertype2val(), ole_variable_ole_type(), ole_variable_ole_type_detail(), onig_node_new_anchor(), onig_node_new_enclose(), open_ifs_socket(), optimize_node_left(), ossl_digest_initialize(), ossl_lock_callback(), ossl_pkcs7_set_type(), ossl_x509name_add_entry(), pack_unpack(), parser_set_integer_literal(), parser_set_number_literal(), parser_yylex(), prepare_iseq_build(), r_object0(), r_symbol(), range_op(), rb_add_method(), rb_check_convert_type(), rb_construct_expanded_load_path(), rb_convert_type(), rb_data_typed_object_alloc(), rb_dlcfunc_initialize(), rb_dlcfunc_new(), rb_enc_symname_type(), rb_feature_p(), rb_insn_operand_intern(), rb_invalid_str(), rb_iseq_defined_string(), rb_iseq_new(), rb_iseq_new_with_bopt(), rb_iseq_new_with_bopt_and_opt(), rb_iseq_new_with_opt(), rb_method_entry_make(), rb_node_newnode(), rb_obj_setup(), rb_search_method_entry(), rb_str_symname_type(), rb_type_str(), rb_vm_bugreport(), rb_w32_gethostbyaddr(), rb_w32_socket(), rb_w32_special_folder(), rsock_cmsg_type_arg(), rsock_init_inetsock(), rsock_socket(), rsock_socket0(), rsock_socktype_arg(), search_required(), set_option_encoding_once(), set_relation(), setup_domain_and_type(), setup_subexp_call(), setup_tree(), singleton_class_of(), sock_initialize(), socketpair(), socketpair_internal(), st_init_table(), st_init_table_with_size(), subexp_inf_recursive_check(), subexp_inf_recursive_check_trav(), subexp_recursive_check_trav(), tcl_protect_core(), type2sym(), type_name(), typeinfo_from_ole(), value_to_generic(), vm_exec(), vm_getspecial(), vm_invoke_block(), vm_push_frame(), w_class(), yaml_parser_fetch_anchor(), yaml_parser_fetch_document_indicator(), yaml_parser_fetch_flow_collection_end(), yaml_parser_fetch_flow_collection_start(), yaml_parser_roll_indent(), and yaml_parser_scan_anchor().

◆ watchdog_thread

VALUE watchdog_thread
static

Definition at line 483 of file tcltklib.c.

Referenced by Init_tcltklib(), lib_eventloop_core(), and lib_watchdog_core().

◆ window_event_mode

int window_event_mode = ~0
static