Class: TclTkIp (Ruby 2.3.2)
Description: Class : TclTkIp - Ruby 2.3.2

- Home
- Core 2.3.2
- Std-lib 2.3.2
- Downloads

Support for the Ruby 2.3 series has ended. See here for reference.

### Home Classes Methods

### In Files

- tk/lib/multi-tk.rb
- tk/lib/tk.rb
- tk/tcltklib.c

### Parent

Object

### Methods

- ::__new__
- ::new
- ::new
- #__eval
- #__eval__
- #__fromUTF8
- #__initialize__
- #__invoke
- #__invoke__
- #__toUTF8
- #_cancel_eval
- #_cancel_eval_unwind
- #_conv_listelement
- #_create_console
- #_eval
- #_eval_with_enc
- #_eval_without_enc
- #_fromUTF8
- #_get_global_var
- #_get_global_var2
- #_get_variable
- #_get_variable2
- #_immediate_invoke
- #_invoke
- #_invoke_with_enc
- #_invoke_without_enc
- #_ip_id_
- #_make_menu_embeddable
- #_merge_tklist
- #_return_value
- #_set_global_var
- #_set_global_var2
- #_set_variable
- #_set_variable2
- #_split_tklist
- #_thread_tkwait
- #_thread_vwait
- #_toUTF8
- #_unset_global_var
- #_unset_global_var2
- #_unset_variable
- #_unset_variable2
- #allow_ruby_exit=
- #allow_ruby_exit?
- #create_dummy_encoding_for_tk
- #create_slave
- #default_encoding
- #default_encoding=
- #delete
- #deleted?
- #do_one_event
- #encoding
- #encoding=
- #encoding_name
- #encoding_obj
- #encoding_table
- #force_default_encoding=
- #force_default_encoding?
- #get_eventloop_tick
- #get_eventloop_weight
- #get_no_event_wait
- #has_mainwindow?
- #invalid_namespace?
- #mainloop
- #mainloop_abort_on_exception
- #mainloop_abort_on_exception=
- #mainloop_watchdog
- #make_safe
- #restart
- #safe?
- #set_eventloop_tick
- #set_eventloop_weight
- #set_max_block_time
- #set_no_event_wait
- #slave_of?

### Class/Module Index

Quicksearch

- Arc
- Bitmap
- BitmapImage
- Checkbutton
- CloneMenu
- Font
- Grid
- INTERP
- Labelframe
- Line
- MenuButton
- MultiTkIp
- MultiTkIp::Command_Queue
- MultiTkIp::ThreadGroup
- MultiTkIp_OK
- MultiTkIp_PseudoToplevel_Evaluable
- Object
- Object::TkNamedVirtualEvent
- Object::TkSystemMenu
- Object::Ttk
- OptionMenuButton
- Oval
- Pack
- Panedwindow
- PhotoImage
- Place
- Polygon
- Radiobutton
- Rectangle
- RemoteTkIp
- Selection
- Spinbox
- TclTk
- TclTkCallback
- TclTkCommand
- TclTkImage
- TclTkInterpreter
- TclTkIp
- TclTkLib
- TclTkLib::EventFlag
- TclTkLib::RELEASE_TYPE
- TclTkLib::VarAccessFlag
- TclTkLibCommand
- TclTkObject
- TclTkVariable
- TclTkWidget
- TextItem
- Tk
- Tk::BLT
- Tk::BLT::Barchart
- Tk::BLT::Bitmap
- Tk::BLT::Busy
- Tk::BLT::Busy::Shield
- Tk::BLT::Container
- Tk::BLT::CutBuffer
- Tk::BLT::DnD
- Tk::BLT::DragDrop
- Tk::BLT::DragDrop::DnD_Handle
- Tk::BLT::DragDrop::PackageCommand
- Tk::BLT::DragDrop::PackageCommand::ValidateArgs
- Tk::BLT::DragDrop::SiteCommand
- Tk::BLT::DragDrop::SiteCommand::ValidateArgs
- Tk::BLT::DragDrop::Token
- Tk::BLT::EPS
- Tk::BLT::Graph
- Tk::BLT::GraphCommand
- Tk::BLT::Hiertable
- Tk::BLT::Htext
- Tk::BLT::PlotComponent
- Tk::BLT::PlotComponent::Axis
- Tk::BLT::PlotComponent::Bar
- Tk::BLT::PlotComponent::BitmapMarker
- Tk::BLT::PlotComponent::Crosshairs
- Tk::BLT::PlotComponent::Element
- Tk::BLT::PlotComponent::GridLine
- Tk::BLT::PlotComponent::ImageMarker
- Tk::BLT::PlotComponent::Legend
- Tk::BLT::PlotComponent::Line
- Tk::BLT::PlotComponent::LineMarker
- Tk::BLT::PlotComponent::Marker
- Tk::BLT::PlotComponent::OptKeys
- Tk::BLT::PlotComponent::Pen
- Tk::BLT::PlotComponent::PolygonMarker
- Tk::BLT::PlotComponent::Postscript
- Tk::BLT::PlotComponent::TextMarker
- Tk::BLT::PlotComponent::WindowMarker
- Tk::BLT::Printer
- Tk::BLT::Spline
- Tk::BLT::Stripchart
- Tk::BLT::Table
- Tk::BLT::Table::TableContainer
- Tk::BLT::Tabnotebook
- Tk::BLT::Tabnotebook::Tab
- Tk::BLT::Tabset
- Tk::BLT::Tabset::NamedTab
- Tk::BLT::Tabset::Tab
- Tk::BLT::Ted
- Tk::BLT::Tile
- Tk::BLT::Tile::Button
- Tk::BLT::Tile::CheckButton
- Tk::BLT::Tile::Checkbutton
- Tk::BLT::Tile::Frame
- Tk::BLT::Tile::Label
- Tk::BLT::Tile::RadioButton
- Tk::BLT::Tile::Radiobutton
- Tk::BLT::Tile::Scrollbar
- Tk::BLT::Tile::Toplevel
- Tk::BLT::Tree
- Tk::BLT::Tree::Node
- Tk::BLT::Tree::Notify
- Tk::BLT::Tree::Tag
- Tk::BLT::Tree::Trace
- Tk::BLT::Treeview
- Tk::BLT::Treeview::ConfigMethod
- Tk::BLT::Treeview::FindExecFlagValue
- Tk::BLT::Treeview::FindExecFlagValue::ValidateArgs
- Tk::BLT::Treeview::Node
- Tk::BLT::Treeview::OpenCloseCommand
- Tk::BLT::Treeview::OpenCloseCommand::ValidateArgs
- Tk::BLT::Treeview::Tag
- Tk::BLT::Treeview::TagOrID_Methods
- Tk::BLT::Vector
- Tk::BLT::VectorAccess
- Tk::BLT::Watch
- Tk::BLT::WinOp
- Tk::BLT::Winop
- Tk::BWidget
- Tk::BWidget::ArrowButton
- Tk::BWidget::Bitmap
- Tk::BWidget::Button
- Tk::BWidget::ButtonBox
- Tk::BWidget::ComboBox
- Tk::BWidget::Dialog
- Tk::BWidget::DragSite
- Tk::BWidget::DropSite
- Tk::BWidget::DynamicHelp
- Tk::BWidget::Entry
- Tk::BWidget::Label
- Tk::BWidget::LabelEntry
- Tk::BWidget::LabelFrame
- Tk::BWidget::ListBox
- Tk::BWidget::ListBox::Event_for_Items
- Tk::BWidget::ListBox::Item
- Tk::BWidget::MainFrame
- Tk::BWidget::MessageDlg
- Tk::BWidget::NoteBook
- Tk::BWidget::NoteBook::Event_for_Tabs
- Tk::BWidget::PagesManager
- Tk::BWidget::PanedWindow
- Tk::BWidget::PanelFrame
- Tk::BWidget::PasswdDlg
- Tk::BWidget::ProgressBar
- Tk::BWidget::ProgressDlg
- Tk::BWidget::ScrollView
- Tk::BWidget::ScrollableFrame
- Tk::BWidget::ScrolledWindow
- Tk::BWidget::SelectColor
- Tk::BWidget::SelectColor::Dialog
- Tk::BWidget::SelectColor::MenuButton
- Tk::BWidget::SelectColor::Menubutton
- Tk::BWidget::SelectFont
- Tk::BWidget::SelectFont::Dialog
- Tk::BWidget::SelectFont::Toolbar
- Tk::BWidget::Separator
- Tk::BWidget::SpinBox
- Tk::BWidget::StatusBar
- Tk::BWidget::TitleFrame
- Tk::BWidget::Tree
- Tk::BWidget::Tree::Event_for_Items
- Tk::BWidget::Tree::Node
- Tk::BWidget::Widget
- Tk::BinaryString
- Tk::Busy
- Tk::Button
- Tk::Canvas
- Tk::CheckButton
- Tk::Clock
- Tk::EncodedString
- Tk::Encoding
- Tk::Entry
- Tk::Frame
- Tk::HTML_Widget
- Tk::HTML_Widget::ClippingWindow
- Tk::ICONS
- Tk::Img
- Tk::Img::BMP
- Tk::Img::DTED
- Tk::Img::GIF
- Tk::Img::ICO
- Tk::Img::JPEG
- Tk::Img::PCX
- Tk::Img::PIXMAP
- Tk::Img::PNG
- Tk::Img::PPM
- Tk::Img::PS
- Tk::Img::Raw
- Tk::Img::SGI
- Tk::Img::SUN
- Tk::Img::TGA
- Tk::Img::TIFF
- Tk::Img::WINDOW
- Tk::Img::XBM
- Tk::Img::XPM
- Tk::Itcl
- Tk::Itcl::ItclObject
- Tk::ItemValidateConfigure
- Tk::Itk
- Tk::Itk::Archetype
- Tk::Itk::Component
- Tk::Itk::Toplevel
- Tk::Itk::Widget
- Tk::Iwidgets
- Tk::Iwidgets::Buttonbox
- Tk::Iwidgets::Calendar
- Tk::Iwidgets::Calendar::CalendarCommand
- Tk::Iwidgets::Calendar::CalendarCommand::ValidateArgs
- Tk::Iwidgets::Canvasprintbox
- Tk::Iwidgets::Canvasprintdialog
- Tk::Iwidgets::Checkbox
- Tk::Iwidgets::Combobox
- Tk::Iwidgets::Dateentry
- Tk::Iwidgets::Datefield
- Tk::Iwidgets::Dialog
- Tk::Iwidgets::Dialogshell
- Tk::Iwidgets::Disjointlistbox
- Tk::Iwidgets::Entryfield
- Tk::Iwidgets::Entryfield::EntryfieldValidate
- Tk::Iwidgets::Entryfield::EntryfieldValidate::ValidateArgs
- Tk::Iwidgets::Extbutton
- Tk::Iwidgets::Extfileselectionbox
- Tk::Iwidgets::Extfileselectiondialog
- Tk::Iwidgets::Feedback
- Tk::Iwidgets::Fileselectionbox
- Tk::Iwidgets::Fileselectiondialog
- Tk::Iwidgets::Finddialog
- Tk::Iwidgets::Hierarchy
- Tk::Iwidgets::Hierarchy::IconCommand
- Tk::Iwidgets::Hierarchy::IconCommand::ValidateArgs
- Tk::Iwidgets::Hierarchy::IndicatorCommand
- Tk::Iwidgets::Hierarchy::IndicatorCommand::ValidateArgs
- Tk::Iwidgets::Hierarchy::QueryCommand
- Tk::Iwidgets::Hierarchy::QueryCommand::ValidateArgs
- Tk::Iwidgets::Hyperhelp
- Tk::Iwidgets::Labeledframe
- Tk::Iwidgets::Labeledwidget
- Tk::Iwidgets::Mainwindow
- Tk::Iwidgets::Menubar
- Tk::Iwidgets::Messagebox
- Tk::Iwidgets::Messagedialog
- Tk::Iwidgets::Notebook
- Tk::Iwidgets::Optionmenu
- Tk::Iwidgets::Panedwindow
- Tk::Iwidgets::Promptdialog
- Tk::Iwidgets::Pushbutton
- Tk::Iwidgets::Radiobox
- Tk::Iwidgets::Scopedobject
- Tk::Iwidgets::Scrolledcanvas
- Tk::Iwidgets::Scrolledframe
- Tk::Iwidgets::Scrolledhtml
- Tk::Iwidgets::Scrolledlistbox
- Tk::Iwidgets::Scrolledtext
- Tk::Iwidgets::Scrolledwidget
- Tk::Iwidgets::Selectionbox
- Tk::Iwidgets::Selectiondialog
- Tk::Iwidgets::Shell
- Tk::Iwidgets::Spindate
- Tk::Iwidgets::Spinint
- Tk::Iwidgets::Spinner
- Tk::Iwidgets::Spinner::EntryfieldValidate
- Tk::Iwidgets::Spinner::EntryfieldValidate::ValidateArgs
- Tk::Iwidgets::Spintime
- Tk::Iwidgets::Tabnotebook
- Tk::Iwidgets::Tabset
- Tk::Iwidgets::Timeentry
- Tk::Iwidgets::Timefield
- Tk::Iwidgets::Toolbar
- Tk::Iwidgets::Watch
- Tk::Label
- Tk::LabelFrame
- Tk::Listbox
- Tk::Mac
- Tk::Mac::IconBitmap
- Tk::MacResource
- Tk::Menu
- Tk::Menu::TkInternalFunction
- Tk::MenuClone
- Tk::Menubutton
- Tk::Message
- Tk::OptionMenubutton
- Tk::OptionMenubutton::OptionMenu
- Tk::OptionObj
- Tk::PanedWindow
- Tk::RadioButton
- Tk::Root
- Tk::Scale
- Tk::Scrollable
- Tk::Scrollbar
- Tk::Spinbox
- Tk::Spinbox::SpinCommand
- Tk::Spinbox::SpinCommand::ValidateArgs
- Tk::SysMenu_Apple
- Tk::SysMenu_Help
- Tk::SysMenu_System
- Tk::SystemMenu
- Tk::TOPLEVEL_ALIASES
- Tk::TclX
- Tk::TclX::XPG3_MsgCat
- Tk::Tcllib
- Tk::Tcllib::Autoscroll
- Tk::Tcllib::CText
- Tk::Tcllib::ChatWidget
- Tk::Tcllib::Crosshair
- Tk::Tcllib::Cursor
- Tk::Tcllib::DateField
- Tk::Tcllib::Datefield
- Tk::Tcllib::Diagrams
- Tk::Tcllib::GetString_Dialog
- Tk::Tcllib::History
- Tk::Tcllib::ICO
- Tk::Tcllib::IP6_Entry
- Tk::Tcllib::IPEntry
- Tk::Tcllib::IPEntry6
- Tk::Tcllib::IP_Entry
- Tk::Tcllib::IP_Entry6
- Tk::Tcllib::KHIM
- Tk::Tcllib::KHIM::Help
- Tk::Tcllib::Ntext
- Tk::Tcllib::Plotchart
- Tk::Tcllib::Plotchart::Barchart
- Tk::Tcllib::Plotchart::Barchart3D
- Tk::Tcllib::Plotchart::Boxplot
- Tk::Tcllib::Plotchart::ChartMethod
- Tk::Tcllib::Plotchart::Ganttchart
- Tk::Tcllib::Plotchart::Histogram
- Tk::Tcllib::Plotchart::HorizontalBarchart
- Tk::Tcllib::Plotchart::IsometricPlot
- Tk::Tcllib::Plotchart::Isometricplot
- Tk::Tcllib::Plotchart::Piechart
- Tk::Tcllib::Plotchart::Plot3D
- Tk::Tcllib::Plotchart::PlotSeries
- Tk::Tcllib::Plotchart::PolarPlot
- Tk::Tcllib::Plotchart::Polarplot
- Tk::Tcllib::Plotchart::Radialchart
- Tk::Tcllib::Plotchart::RibbonChart3D
- Tk::Tcllib::Plotchart::RightAxis
- Tk::Tcllib::Plotchart::Stripchart
- Tk::Tcllib::Plotchart::TXPlot
- Tk::Tcllib::Plotchart::Timechart
- Tk::Tcllib::Plotchart::XLogYPlot
- Tk::Tcllib::Plotchart::XYPlot
- Tk::Tcllib::Style
- Tk::Tcllib::Swaplist_Dialog
- Tk::Tcllib::TableList
- Tk::Tcllib::TableList_Tile
- Tk::Tcllib::Tablelist
- Tk::Tcllib::TablelistItemConfig
- Tk::Tcllib::Tablelist_Tile
- Tk::Tcllib::Tkpiechart
- Tk::Tcllib::Tkpiechart::BoxLabeler
- Tk::Tcllib::Tkpiechart::ConfigMethod
- Tk::Tcllib::Tkpiechart::Label
- Tk::Tcllib::Tkpiechart::PeripheralLabeler
- Tk::Tcllib::Tkpiechart::Pie
- Tk::Tcllib::Tkpiechart::PieChartObj
- Tk::Tcllib::Tkpiechart::Slice
- Tk::Tcllib::Tooltip
- Tk::Tcllib::Validator
- Tk::Tcllib::Widget
- Tk::Tcllib::Widget::Calendar
- Tk::Tcllib::Widget::Canvas_Sqmap
- Tk::Tcllib::Widget::Canvas_Zoom
- Tk::Tcllib::Widget::DateEntry
- Tk::Tcllib::Widget::Dateentry
- Tk::Tcllib::Widget::Dialog
- Tk::Tcllib::Widget::MenuEntry
- Tk::Tcllib::Widget::Menuentry
- Tk::Tcllib::Widget::PanelFrame
- Tk::Tcllib::Widget::Panelframe
- Tk::Tcllib::Widget::Ruler
- Tk::Tcllib::Widget::ScreenRuler
- Tk::Tcllib::Widget::Screenruler
- Tk::Tcllib::Widget::ScrolledWindow
- Tk::Tcllib::Widget::Scrolledwindow
- Tk::Tcllib::Widget::Statusbar
- Tk::Tcllib::Widget::SuperFrame
- Tk::Tcllib::Widget::Toolbar
- Tk::Tcllib::Widget::ToolbarItem
- Tk::Tcllib::Widget::ToolbarItemConfig
- Tk::Text
- Tk::Text::IndexModMethods
- Tk::Text::IndexString
- Tk::Text::Peer
- Tk::Tile
- Tk::Tile::Button
- Tk::Tile::CheckButton
- Tk::Tile::Checkbutton
- Tk::Tile::Combobox
- Tk::Tile::Dialog
- Tk::Tile::Entry
- Tk::Tile::Font
- Tk::Tile::Frame
- Tk::Tile::KeyNav
- Tk::Tile::Label
- Tk::Tile::LabelFrame
- Tk::Tile::Labelframe
- Tk::Tile::MenuButton
- Tk::Tile::Menubutton
- Tk::Tile::Notebook
- Tk::Tile::ParseStyleLayout
- Tk::Tile::Progress
- Tk::Tile::Progressbar
- Tk::Tile::RadioButton
- Tk::Tile::Radiobutton
- Tk::Tile::Scale
- Tk::Tile::Scrollbar
- Tk::Tile::Separator
- Tk::Tile::SizeGrip
- Tk::Tile::Sizegrip
- Tk::Tile::Spinbox
- Tk::Tile::Square
- Tk::Tile::Style
- Tk::Tile::TButton
- Tk::Tile::TCheckButton
- Tk::Tile::TCheckbutton
- Tk::Tile::TCombobox
- Tk::Tile::TEntry
- Tk::Tile::TFrame
- Tk::Tile::TLabel
- Tk::Tile::TLabelFrame
- Tk::Tile::TLabelframe
- Tk::Tile::TMenuButton
- Tk::Tile::TMenubutton
- Tk::Tile::TNotebook
- Tk::Tile::TPaned
- Tk::Tile::TProgress
- Tk::Tile::TProgressbar
- Tk::Tile::TRadioButton
- Tk::Tile::TRadiobutton
- Tk::Tile::TScale
- Tk::Tile::TScrollbar
- Tk::Tile::TSeparator
- Tk::Tile::TSpinbox
- Tk::Tile::TSpinbox::SpinCommand
- Tk::Tile::TSpinbox::SpinCommand::ValidateArgs
- Tk::Tile::TSquare
- Tk::Tile::TileWidget
- Tk::Tile::Treeview
- Tk::Tile::Treeview::Item
- Tk::Tile::Treeview::Root
- Tk::Tile::Treeview::Tag
- Tk::Tile::TreeviewConfig
- Tk::Tile::XScrollbar
- Tk::Tile::YScrollbar
- Tk::TkDND
- Tk::TkDND::DND
- Tk::TkDND::DND_Subst
- Tk::TkDND::Shape
- Tk::TkSystemMenu
- Tk::TkTable
- Tk::TkTable::BrowseCommand
- Tk::TkTable::BrowseCommand::ValidateArgs
- Tk::TkTable::CellCommand
- Tk::TkTable::CellCommand::ValidateArgs
- Tk::TkTable::CellTag
- Tk::TkTable::ConfigMethod
- Tk::TkTable::NamedCellTag
- Tk::TkTable::SelectionCommand
- Tk::TkTable::SelectionCommand::ValidateArgs
- Tk::TkTable::ValidateCommand
- Tk::TkTable::ValidateCommand::ValidateArgs
- Tk::TkTrans
- Tk::Toplevel
- Tk::TreeCtrl
- Tk::TreeCtrl::BindCallback
- Tk::TreeCtrl::BitmapElement
- Tk::TreeCtrl::BorderElement
- Tk::TreeCtrl::Column
- Tk::TreeCtrl::ConfigMethod
- Tk::TreeCtrl::Element
- Tk::TreeCtrl::ImageElement
- Tk::TreeCtrl::Item
- Tk::TreeCtrl::NotifyEvent
- Tk::TreeCtrl::RectangleElement
- Tk::TreeCtrl::Style
- Tk::TreeCtrl_Widget
- Tk::Trofs
- Tk::Ttk
- Tk::UTF8_String
- Tk::ValidateConfigure
- Tk::Vu
- Tk::Vu::Bargraph
- Tk::Vu::ChartsConfig
- Tk::Vu::Dial
- Tk::Vu::NamedPieSlice
- Tk::Vu::Pie
- Tk::Vu::PieSlice
- Tk::Vu::PieSliceConfigMethod
- Tk::Vu::TkcBarchart
- Tk::Vu::TkcSticker
- Tk::Vu::TkcStripchart
- Tk::WinDDE
- Tk::WinRegistry
- Tk::Winico
- Tk::Winico::Winico_callback
- Tk::Winico::Winico_callback::ValidateArgs
- Tk::Wm
- Tk::Wm_for_General
- Tk::XScrollable
- Tk::XScrollbar
- Tk::X_Scrollable
- Tk::YScrollable
- Tk::YScrollbar
- Tk::Y_Scrollable
- TkAfter
- TkBgError
- TkBindCore
- TkBindTag
- TkBindTagAll
- TkBitmapImage
- TkCallbackBreak
- TkCallbackContinue
- TkCallbackEntry
- TkCallbackRedo
- TkCallbackRetry
- TkCallbackReturn
- TkCallbackThrow
- TkCanvasItemConfig
- TkClipboard
- TkComm
- TkComposite
- TkConfigMethod
- TkConsole
- TkCore
- TkCore::Tk_OBJECT_TABLE
- TkDatabaseClass
- TkDialog
- TkDialog2
- TkDialogObj
- TkEvent
- TkEvent::Event
- TkEvent::Event::Grp
- TkEvent::Event::StateMask
- TkEvent::Event::TypeNum
- TkFont
- TkFont::Chooser
- TkFont::CoreMethods
- TkFont::DescendantFont
- TkFont::Fontchooser
- TkGrid
- TkImage
- TkItemConfigMethod
- TkItemConfigOptkeys
- TkItemFontOptkeys
- TkKernel
- TkKinput
- TkListItemConfig
- TkLocalJumpError
- TkManageFocus
- TkMenuEntryConfig
- TkMenuSpec
- TkMenubar
- TkMsgCat
- TkMsgCatalog
- TkNamedFont
- TkNamespace
- TkNamespace::Ensemble
- TkNamespace::NsCode
- TkNamespace::ScopeArgs
- TkObject
- TkOption
- TkOptionDB
- TkOptionDB::Priority
- TkPack
- TkPackage
- TkPalette
- TkPhotoImage
- TkPixmapImage
- TkPlace
- TkRTTimer
- TkResourceDB
- TkScrollbox
- TkSelection
- TkTextImage
- TkTextMark
- TkTextMarkAnchor
- TkTextMarkCurrent
- TkTextMarkInsert
- TkTextNamedMark
- TkTextNamedTag
- TkTextTag
- TkTextTagConfig
- TkTextTagSel
- TkTextWin
- TkTextWindow
- TkTimer
- TkTreatFont
- TkTreatItemFont
- TkTreatTagFont
- TkUtil
- TkUtil::CallbackSubst
- TkUtil::CallbackSubst::Info
- TkValidateCommand
- TkValidateCommand::ValidateArgs
- TkValidation
- TkValidation::ValidateCmd
- TkValidation::ValidateCmd::Action
- TkVarAccess
- TkVariable
- TkVirtualEvent
- TkVirtualEvent::PreDefVirtEvent
- TkVirtualEvent::TkNamedVirtualEvent
- TkWarning
- TkWarning2
- TkWarningObj
- TkWidget
- TkWindow
- TkWinfo
- TkXIM
- TkcArc
- TkcBitmap
- TkcGroup
- TkcImage
- TkcItem
- TkcLine
- TkcNamedTag
- TkcOval
- TkcPolygon
- TkcRectangle
- TkcTag
- TkcTagAccess
- TkcTagAll
- TkcTagCurrent
- TkcTagString
- TkcText
- TkcWindow
- TktImage
- TktMark
- TktMarkAnchor
- TktMarkCurrent
- TktMarkInsert
- TktNamedMark
- TktNamedTag
- TktTag
- TktTagSel
- TktWindow
- Variable
- VirtualEvent
- WindowItem
- Winfo
- unknown

No matching classes.

# TclTkIp

add ThreadGroup check to ::new

### Public Class Methods

__new__(*args) click to toggle source
Alias for: new
new(*args) click to toggle source

initialize interpreter

                   # File tk/lib/multi-tk.rb, line 27
    def new(*args)
      if Thread.current.group != ThreadGroup::Default
        raise SecurityError, 'only ThreadGroup::Default can call TclTkIp.new'
      end
      obj = __new__(*args)
      obj.instance_eval{
        @force_default_encoding ||= TkUtil.untrust([false])
        @encoding ||= TkUtil.untrust([nil])
        def @encoding.to_s; self.join(nil); end
      }
      obj
    end

Also aliased as: __new__
new(*args) click to toggle source

                   # File tk/lib/tk.rb, line 30
    def initialize(*args)
      __initialize__(*args)

      @force_default_encoding ||= TkUtil.untrust([false])
      @encoding ||= TkUtil.untrust([nil])
      def @encoding.to_s; self.join(nil); end
    end

Also aliased as: __initialize__

### Public Instance Methods

__eval(cmd) click to toggle source
Alias for: _eval
__eval__(cmd) click to toggle source
Alias for: _eval
__fromUTF8(str, enc = nil) click to toggle source
Alias for: _fromUTF8
__initialize__(*args) click to toggle source
Alias for: new
__invoke(*cmds) click to toggle source
Alias for: _invoke
__invoke__(*cmds) click to toggle source
Alias for: _invoke
__toUTF8(str, enc = nil) click to toggle source
Alias for: _toUTF8
_cancel_eval(p1 = v1) click to toggle source

                   static VALUE
    ip_cancel_eval(argc, argv, self)
        int   argc;
        VALUE *argv;
        VALUE self;
    {
        VALUE retval;

        if (rb_scan_args(argc, argv, "01", &retval) == 0) {
            retval = Qnil;
        }
        if (ip_cancel_eval_core(get_ip(self)->ip, retval, 0) == TCL_OK) {
          return Qtrue;
        } else {
          return Qfalse;
        }
    }

_cancel_eval_unwind(p1 = v1) click to toggle source

                   static VALUE
    ip_cancel_eval_unwind(argc, argv, self)
        int   argc;
        VALUE *argv;
        VALUE self;
    {
        int flag = 0;
        VALUE retval;

        if (rb_scan_args(argc, argv, "01", &retval) == 0) {
            retval = Qnil;
        }

        flag |= TCL_CANCEL_UNWIND;
        if (ip_cancel_eval_core(get_ip(self)->ip, retval, flag) == TCL_OK) {
          return Qtrue;
        } else {
          return Qfalse;
        }
    }

_conv_listelement(p1) click to toggle source

                   static VALUE
    lib_conv_listelement(self, src)
        VALUE self;
        VALUE src;
    {
        int   len, scan_flag;
        volatile VALUE dst;
        int   taint_flag = OBJ_TAINTED(src);
        int thr_crit_bup;

        tcl_stubs_check();

        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

        StringValue(src);

    #if TCL_MAJOR_VERSION >= 8
        len = Tcl_ScanCountedElement(RSTRING_PTR(src), RSTRING_LENINT(src),
                                     &scan_flag);
        dst = rb_str_new(0, len + 1);
        len = Tcl_ConvertCountedElement(RSTRING_PTR(src), RSTRING_LENINT(src),
                                        RSTRING_PTR(dst), scan_flag);
    #else /* TCL_MAJOR_VERSION < 8 */
        len = Tcl_ScanElement(RSTRING_PTR(src), &scan_flag);
        dst = rb_str_new(0, len + 1);
        len = Tcl_ConvertElement(RSTRING_PTR(src), RSTRING_PTR(dst), scan_flag);
    #endif

        rb_str_resize(dst, len);
        if (taint_flag) RbTk_OBJ_UNTRUST(dst);

        rb_thread_critical = thr_crit_bup;

        return dst;
    }

_create_console() click to toggle source

                   static VALUE
    ip_create_console(self)
        VALUE self;
    {
        struct tcltkip *ptr = get_ip(self);

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            rb_raise(rb_eRuntimeError, "interpreter is deleted");
        }

        return tk_funcall(ip_create_console_core, 0, (VALUE*)NULL, self);
    }

_eval(cmd) click to toggle source

                   # File tk/lib/tk.rb, line 3007
    def _eval(cmd)
      _fromUTF8(__eval(_toUTF8(cmd)))
    end

Also aliased as: _eval_without_enc, __eval__, __eval, _eval_with_enc, __eval, _eval_with_enc
_eval_with_enc(cmd) click to toggle source
Alias for: _eval
_eval_without_enc(cmd) click to toggle source

backup original (without encoding) _eval and _invoke

Alias for: _eval
_fromUTF8(str, enc = nil) click to toggle source

                   # File tk/lib/tk.rb, line 2966
    def _fromUTF8(str, enc = nil)
      # str must be UTF-8 or binary.
      enc_name = str.instance_variable_get(:@encoding)
      enc_name ||=
        Tk::Encoding::ENCODING_TABLE.get_name(str.encoding) rescue nil

      # is 'binary' encoding?
      if enc_name == Tk::Encoding::BINARY_NAME
        return str.dup.force_encoding(Tk::Encoding::BINARY_NAME)
      end

      # get target encoding name (if enc == nil, use default encoding)
      begin
        enc_name = Tk::Encoding::ENCODING_TABLE.get_name(enc)
      rescue
        # then, enc != nil
        # unknown encoding for Tk -> try to convert encoding on Ruby
        str = str.dup.force_encoding(Tk::Encoding::UTF8_NAME)
        str.encode!(enc) # modify self !!
        return str  # if no error, probably succeed converting
      end

      encstr = __fromUTF8(str, enc_name)
      encstr.force_encoding(Tk::Encoding::ENCODING_TABLE.get_obj(enc_name))
      encstr
    end

Also aliased as: __fromUTF8
_get_global_var(p1) click to toggle source

                   static VALUE
    ip_get_global_var(self, varname)
        VALUE self;
        VALUE varname;
    {
        return ip_get_variable(self, varname,
                               INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
    }

_get_global_var2(p1, p2) click to toggle source

                   static VALUE
    ip_get_global_var2(self, varname, index)
        VALUE self;
        VALUE varname;
        VALUE index;
    {
        return ip_get_variable2(self, varname, index,
                                INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
    }

_get_variable(p1, p2) click to toggle source

                   static VALUE
    ip_get_variable(self, varname, flag)
        VALUE self;
        VALUE varname;
        VALUE flag;
    {
        return ip_get_variable2(self, varname, Qnil, flag);
    }

_get_variable2(p1, p2, p3) click to toggle source

                   static VALUE
    ip_get_variable2(self, varname, index, flag)
        VALUE self;
        VALUE varname;
        VALUE index;
        VALUE flag;
    {
        VALUE argv[3];
        VALUE retval;

        StringValue(varname);
        if (!NIL_P(index)) StringValue(index);

        argv[0] = varname;
        argv[1] = index;
        argv[2] = flag;

        retval = tk_funcall(ip_get_variable2_core, 3, argv, self);

        if (NIL_P(retval)) {
            return rb_tainted_str_new2("");
        } else {
            return retval;
        }
    }

_immediate_invoke(*args) click to toggle source

                   static VALUE
    ip_invoke_immediate(argc, argv, obj)
        int argc;
        VALUE *argv;
        VALUE obj;
    {
        /* POTENTIALY INSECURE : can create infinite loop */
        return ip_invoke_with_position(argc, argv, obj, TCL_QUEUE_HEAD);
    }

_invoke(*cmds) click to toggle source

                   # File tk/lib/tk.rb, line 3011
    def _invoke(*cmds)
      _fromUTF8(__invoke(*(cmds.collect{|cmd| _toUTF8(cmd)})))
    end

Also aliased as: _invoke_without_enc, __invoke__, __invoke, _invoke_with_enc, __invoke, _invoke_with_enc
_invoke_with_enc(*cmds) click to toggle source
Alias for: _invoke
_invoke_without_enc(*cmds) click to toggle source
Alias for: _invoke
_ip_id_() click to toggle source

                   # File tk/lib/tk.rb, line 22
    def _ip_id_
      # for RemoteTkIp
      ''
    end

_merge_tklist(*args) click to toggle source

                   static VALUE
    lib_merge_tklist(argc, argv, obj)
        int argc;
        VALUE *argv;
        VALUE obj;
    {
        int  num, len;
        int  *flagPtr;
        char *dst, *result;
        volatile VALUE str;
        int taint_flag = 0;
        int thr_crit_bup;
        VALUE old_gc;

        if (argc == 0) return rb_str_new2("");

        tcl_stubs_check();

        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;
        old_gc = rb_gc_disable();

        /* based on Tcl/Tk's Tcl_Merge() */
        /* flagPtr = ALLOC_N(int, argc); */
        flagPtr = RbTk_ALLOC_N(int, argc);
    #if 0 /* use Tcl_Preserve/Release */
        Tcl_Preserve((ClientData)flagPtr); /* XXXXXXXXXX */
    #endif

        /* pass 1 */
        len = 1;
        for(num = 0; num < argc; num++) {
            if (OBJ_TAINTED(argv[num])) taint_flag = 1;
            dst = StringValuePtr(argv[num]);
    #if TCL_MAJOR_VERSION >= 8
            len += Tcl_ScanCountedElement(dst, RSTRING_LENINT(argv[num]),
                                          &flagPtr[num]) + 1;
    #else /* TCL_MAJOR_VERSION < 8 */
            len += Tcl_ScanElement(dst, &flagPtr[num]) + 1;
    #endif
        }

        /* pass 2 */
        /* result = (char *)Tcl_Alloc(len); */
        result = (char *)ckalloc(len);
    #if 0 /* use Tcl_Preserve/Release */
        Tcl_Preserve((ClientData)result);
    #endif
        dst = result;
        for(num = 0; num < argc; num++) {
    #if TCL_MAJOR_VERSION >= 8
            len = Tcl_ConvertCountedElement(RSTRING_PTR(argv[num]),
                                            RSTRING_LENINT(argv[num]),
                                            dst, flagPtr[num]);
    #else /* TCL_MAJOR_VERSION < 8 */
            len = Tcl_ConvertElement(RSTRING_PTR(argv[num]), dst, flagPtr[num]);
    #endif
            dst += len;
            *dst = ' ';
            dst++;
        }
        if (dst == result) {
            *dst = 0;
        } else {
            dst[-1] = 0;
        }

    #if 0 /* use Tcl_EventuallyFree */
        Tcl_EventuallyFree((ClientData)flagPtr, TCL_DYNAMIC); /* XXXXXXXX */
    #else
    #if 0 /* use Tcl_Preserve/Release */
        Tcl_Release((ClientData)flagPtr);
    #else
        /* free(flagPtr); */
        ckfree((char*)flagPtr);
    #endif
    #endif

        /* create object */
        str = rb_str_new(result, dst - result - 1);
        if (taint_flag) RbTk_OBJ_UNTRUST(str);
    #if 0 /* use Tcl_EventuallyFree */
        Tcl_EventuallyFree((ClientData)result, TCL_DYNAMIC); /* XXXXXXXX */
    #else
    #if 0 /* use Tcl_Preserve/Release */
        Tcl_Release((ClientData)result); /* XXXXXXXXXXX */
    #else
        /* Tcl_Free(result); */
        ckfree(result);
    #endif
    #endif

        if (old_gc == Qfalse) rb_gc_enable();
        rb_thread_critical = thr_crit_bup;

        return str;
    }

_return_value() click to toggle source

get return code from Tcl_Eval()

                   static VALUE
    ip_retval(self)
        VALUE self;
    {
        struct tcltkip *ptr;        /* tcltkip data struct */

        /* get the data strcut */
        ptr = get_ip(self);

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            return rb_tainted_str_new2("");
        }

        return (INT2FIX(ptr->return_value));
    }

_set_global_var(p1, p2) click to toggle source

                   static VALUE
    ip_set_global_var(self, varname, value)
        VALUE self;
        VALUE varname;
        VALUE value;
    {
        return ip_set_variable(self, varname, value,
                               INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
    }

_set_global_var2(p1, p2, p3) click to toggle source

                   static VALUE
    ip_set_global_var2(self, varname, index, value)
        VALUE self;
        VALUE varname;
        VALUE index;
        VALUE value;
    {
        return ip_set_variable2(self, varname, index, value,
                                INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
    }

_set_variable(p1, p2, p3) click to toggle source

                   static VALUE
    ip_set_variable(self, varname, value, flag)
        VALUE self;
        VALUE varname;
        VALUE value;
        VALUE flag;
    {
        return ip_set_variable2(self, varname, Qnil, value, flag);
    }

_set_variable2(p1, p2, p3, p4) click to toggle source

                   static VALUE
    ip_set_variable2(self, varname, index, value, flag)
        VALUE self;
        VALUE varname;
        VALUE index;
        VALUE value;
        VALUE flag;
    {
        VALUE argv[4];
        VALUE retval;

        StringValue(varname);
        if (!NIL_P(index)) StringValue(index);
        StringValue(value);

        argv[0] = varname;
        argv[1] = index;
        argv[2] = value;
        argv[3] = flag;

        retval = tk_funcall(ip_set_variable2_core, 4, argv, self);

        if (NIL_P(retval)) {
            return rb_tainted_str_new2("");
        } else {
            return retval;
        }
    }

_split_tklist(p1) click to toggle source

                   static VALUE
    ip_split_tklist(self, list_str)
        VALUE self;
        VALUE list_str;
    {
        return lib_split_tklist_core(self, list_str);
    }

_thread_tkwait(p1, p2) click to toggle source

                   static VALUE
    ip_thread_tkwait(self, mode, target)
        VALUE self;
        VALUE mode;
        VALUE target;
    {
        VALUE argv[3];
        volatile VALUE cmd_str = rb_str_new2("thread_tkwait");

        argv[0] = cmd_str;
        argv[1] = mode;
        argv[2] = target;

        return ip_invoke_with_position(3, argv, self, TCL_QUEUE_TAIL);
    }

_thread_vwait(p1) click to toggle source

                   static VALUE
    ip_thread_vwait(self, var)
        VALUE self;
        VALUE var;
    {
        VALUE argv[2];
        volatile VALUE cmd_str = rb_str_new2("thread_vwait");

        argv[0] = cmd_str;
        argv[1] = var;

        return ip_invoke_with_position(2, argv, self, TCL_QUEUE_TAIL);
    }

_toUTF8(str, enc = nil) click to toggle source

with Encoding (Ruby 1.9+)

use functions on Tcl as default. but when unsupported encoding on Tcl, use methods on Ruby.

                   # File tk/lib/tk.rb, line 2916
    def _toUTF8(str, enc = nil)
      if enc
        # use given encoding
        begin
          enc_name = Tk::Encoding::ENCODING_TABLE.get_name(enc)
        rescue
          # unknown encoding for Tk -> try to convert encoding on Ruby
          str = str.dup.force_encoding(enc)
          str.encode!(Tk::Encoding::UTF8_NAME) # modify self !!
          return str  # if no error, probably succeed converting
        end
      end

      enc_name ||= str.instance_variable_get(:@encoding)

      enc_name ||=
        Tk::Encoding::ENCODING_TABLE.get_name(str.encoding) rescue nil

      if enc_name
        # str has its encoding information
        encstr = __toUTF8(str, enc_name)
        encstr.force_encoding(Tk::Encoding::UTF8_NAME)
        return encstr
      else
        # str.encoding isn't supported by Tk -> try to convert on Ruby
        begin
          return str.encode(Tk::Encoding::UTF8_NAME) # new string
        rescue
          # error -> ignore, try to use default encoding of Ruby/Tk
        end
      end

      #enc_name ||=
      #  Tk::Encoding::ENCODING_TABLE.get_name(Tk.encoding) rescue nil
      enc_name ||= Tk::Encoding::ENCODING_TABLE.get_name(nil)

      # is 'binary' encoding?
      if enc_name == Tk::Encoding::BINARY_NAME
        return str.dup.force_encoding(Tk::Encoding::BINARY_NAME)
      end

      # force default encoding?
      if ! str.kind_of?(Tk::EncodedString) && self.force_default_encoding?
        enc_name = Tk::Encoding::ENCODING_TABLE.get_name(Tk.default_encoding)
      end

      encstr = __toUTF8(str, enc_name)
      encstr.force_encoding(Tk::Encoding::UTF8_NAME)
      encstr
    end

Also aliased as: __toUTF8
_unset_global_var(p1) click to toggle source

                   static VALUE
    ip_unset_global_var(self, varname)
        VALUE self;
        VALUE varname;
    {
        return ip_unset_variable(self, varname,
                                 INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
    }

_unset_global_var2(p1, p2) click to toggle source

                   static VALUE
    ip_unset_global_var2(self, varname, index)
        VALUE self;
        VALUE varname;
        VALUE index;
    {
        return ip_unset_variable2(self, varname, index,
                                  INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
    }

_unset_variable(p1, p2) click to toggle source

                   static VALUE
    ip_unset_variable(self, varname, flag)
        VALUE self;
        VALUE varname;
        VALUE flag;
    {
        return ip_unset_variable2(self, varname, Qnil, flag);
    }

_unset_variable2(p1, p2, p3) click to toggle source

                   static VALUE
    ip_unset_variable2(self, varname, index, flag)
        VALUE self;
        VALUE varname;
        VALUE index;
        VALUE flag;
    {
        VALUE argv[3];
        VALUE retval;

        StringValue(varname);
        if (!NIL_P(index)) StringValue(index);

        argv[0] = varname;
        argv[1] = index;
        argv[2] = flag;

        retval = tk_funcall(ip_unset_variable2_core, 3, argv, self);

        if (NIL_P(retval)) {
            return rb_tainted_str_new2("");
        } else {
            return retval;
        }
    }

allow_ruby_exit=(p1) click to toggle source

allow_ruby_exit = mode

                   static VALUE
    ip_allow_ruby_exit_set(self, val)
        VALUE self, val;
    {
        struct tcltkip *ptr = get_ip(self);
        Tk_Window mainWin;

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            rb_raise(rb_eRuntimeError, "interpreter is deleted");
        }

        if (Tcl_IsSafe(ptr->ip)) {
            rb_raise(rb_eSecurityError,
                     "insecure operation on a safe interpreter");
        }

        /*
         *  Because of cross-threading, the following line may fail to find
         *  the MainWindow, even if the Tcl/Tk interpreter has one or more.
         *  But it has no problem. Current implementation of both type of
         *  the "exit" command don't need maiinWin token.
         */
        mainWin = (tk_stubs_init_p())? Tk_MainWindow(ptr->ip): (Tk_Window)NULL;

        if (RTEST(val)) {
            ptr->allow_ruby_exit = 1;
    #if TCL_MAJOR_VERSION >= 8
            DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"ruby_exit\"");
            Tcl_CreateObjCommand(ptr->ip, "exit", ip_RubyExitObjCmd,
                                 (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
    #else /* TCL_MAJOR_VERSION < 8 */
            DUMP1("Tcl_CreateCommand(\"exit\") --> \"ruby_exit\"");
            Tcl_CreateCommand(ptr->ip, "exit", ip_RubyExitCommand,
                              (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
    #endif
            return Qtrue;

        } else {
            ptr->allow_ruby_exit = 0;
    #if TCL_MAJOR_VERSION >= 8
            DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"interp_exit\"");
            Tcl_CreateObjCommand(ptr->ip, "exit", ip_InterpExitObjCmd,
                                 (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
    #else /* TCL_MAJOR_VERSION < 8 */
            DUMP1("Tcl_CreateCommand(\"exit\") --> \"interp_exit\"");
            Tcl_CreateCommand(ptr->ip, "exit", ip_InterpExitCommand,
                              (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
    #endif
            return Qfalse;
        }
    }

allow_ruby_exit?() click to toggle source

allow_ruby_exit?

                   static VALUE
    ip_allow_ruby_exit_p(self)
        VALUE self;
    {
        struct tcltkip *ptr = get_ip(self);

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            rb_raise(rb_eRuntimeError, "interpreter is deleted");
        }

        if (ptr->allow_ruby_exit) {
            return Qtrue;
        } else {
            return Qfalse;
        }
    }

create_dummy_encoding_for_tk(p1) click to toggle source

                   static VALUE
    create_dummy_encoding_for_tk(interp, name)
         VALUE interp;
         VALUE name;
    {
      return create_dummy_encoding_for_tk_core(interp, name, Qtrue);
    }

create_slave(p1, p2 = v2) click to toggle source

                   static VALUE
    ip_create_slave(argc, argv, self)
        int   argc;
        VALUE *argv;
        VALUE self;
    {
        struct tcltkip *master = get_ip(self);
        VALUE safemode;
        VALUE name;
        VALUE callargv[2];

        /* ip is deleted? */
        if (deleted_ip(master)) {
            rb_raise(rb_eRuntimeError,
                     "deleted master cannot create a new slave interpreter");
        }

        /* argument check */
        if (rb_scan_args(argc, argv, "11", &name, &safemode) == 1) {
            safemode = Qfalse;
        }
        if (Tcl_IsSafe(master->ip) != 1
            && (safemode == Qfalse || NIL_P(safemode))) {
        }

        StringValue(name);
        callargv[0] = name;
        callargv[1] = safemode;

        return tk_funcall(ip_create_slave_core, 2, callargv, self);
    }

default_encoding() click to toggle source
Alias for: encoding_name
default_encoding=(name) click to toggle source

                   # File tk/lib/tk.rb, line 2881
    def default_encoding=(name)
      name = name.name if Tk::WITH_ENCODING && name.kind_of?(::Encoding)
      @encoding[0] = name.to_s.dup
    end

delete() click to toggle source

delete interpreter

                   static VALUE
    ip_delete(self)
        VALUE self;
    {
        int  thr_crit_bup;
        struct tcltkip *ptr = get_ip(self);

        /* if (ptr == (struct tcltkip *)NULL || ptr->ip == (Tcl_Interp*)NULL) { */
        if (deleted_ip(ptr)) {
            DUMP1("delete deleted IP");
            return Qnil;
        }

        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

        DUMP1("delete interp");
        if (!Tcl_InterpDeleted(ptr->ip)) {
          DUMP1("call ip_finalize");
          ip_finalize(ptr->ip);

          Tcl_DeleteInterp(ptr->ip);
          Tcl_Release(ptr->ip);
        }

        rb_thread_critical = thr_crit_bup;

        return Qnil;
    }

deleted?() click to toggle source

                   static VALUE
    ip_is_deleted_p(self)
        VALUE self;
    {
        struct tcltkip *ptr = get_ip(self);

        if (deleted_ip(ptr)) {
            return Qtrue;
        } else {
            return Qfalse;
        }
    }

do_one_event(*args) click to toggle source

                   static VALUE
    ip_do_one_event(argc, argv, self)
        int   argc;
        VALUE *argv;
        VALUE self;
    {
        return lib_do_one_event_core(argc, argv, self, 0);
    }

encoding() click to toggle source
Alias for: encoding_name
encoding=(name) click to toggle source

    from tkencoding.rb by ttate@jaist.ac.jp

attr_accessor :encoding

                   # File tk/lib/tk.rb, line 2888
    def encoding=(name)
      self.force_default_encoding = true  # for comaptibility
      self.default_encoding = name
    end

encoding_name() click to toggle source

                   # File tk/lib/tk.rb, line 2893
    def encoding_name
      (@encoding[0])? @encoding[0].dup: nil
    end

Also aliased as: encoding, default_encoding
encoding_obj() click to toggle source

                   # File tk/lib/tk.rb, line 2899
    def encoding_obj
      if Tk::WITH_ENCODING
        Tk::Encoding.tcl2rb_encoding(@encoding[0])
      else
        (@encoding[0])? @encoding[0].dup: nil
      end
    end

encoding_table() click to toggle source

                   static VALUE
    ip_get_encoding_table(interp)
         VALUE interp;
    {
      volatile VALUE table = Qnil;

      table = rb_ivar_get(interp, ID_encoding_table);

      if (NIL_P(table)) {
        /* initialize encoding_table */
        table = create_encoding_table(interp);
        rb_define_singleton_method(table, "get_name", encoding_table_get_name, 1);
        rb_define_singleton_method(table, "get_obj",  encoding_table_get_obj,  1);
      }

      return table;
    }

force_default_encoding=(mode) click to toggle source

                   # File tk/lib/tk.rb, line 2873
    def force_default_encoding=(mode)
      @force_default_encoding[0] = (mode)? true: false
    end

force_default_encoding?() click to toggle source

                   # File tk/lib/tk.rb, line 2877
    def force_default_encoding?
      @force_default_encoding[0] ||= false
    end

get_eventloop_tick() click to toggle source

                   static VALUE
    ip_get_eventloop_tick(self)
        VALUE self;
    {
        return get_eventloop_tick(self);
    }

get_eventloop_weight() click to toggle source

                   static VALUE
    ip_get_eventloop_weight(self)
        VALUE self;
    {
        return get_eventloop_weight(self);
    }

get_no_event_wait() click to toggle source

                   static VALUE
    ip_get_no_event_wait(self)
        VALUE self;
    {
        return get_no_event_wait(self);
    }

has_mainwindow?() click to toggle source

                   static VALUE
    ip_has_mainwindow_p(self)
        VALUE self;
    {
        return tk_funcall(ip_has_mainwindow_p_core, 0, (VALUE*)NULL, self);
    }

invalid_namespace?() click to toggle source

is deleted?

                   static VALUE
    ip_has_invalid_namespace_p(self)
        VALUE self;
    {
        struct tcltkip *ptr = get_ip(self);

        if (ptr == (struct tcltkip *)NULL || ptr->ip == (Tcl_Interp *)NULL) {
            /* deleted IP */
            return Qtrue;
        }

    #if TCL_NAMESPACE_DEBUG
        if (rbtk_invalid_namespace(ptr)) {
            return Qtrue;
        } else {
            return Qfalse;
        }
    #else
        return Qfalse;
    #endif
    }

mainloop(*args) click to toggle source

                   static VALUE
    ip_mainloop(argc, argv, self)
        int   argc;
        VALUE *argv;
        VALUE self;
    {
        volatile VALUE ret;
        struct tcltkip *ptr = get_ip(self);

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            return Qnil;
        }

        if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
            /* slave IP */
            return Qnil;
        }

        eventloop_interp = ptr->ip;
        ret = lib_mainloop(argc, argv, self);
        eventloop_interp = (Tcl_Interp*)NULL;
        return ret;
    }

mainloop_abort_on_exception() click to toggle source

                   static VALUE
    ip_evloop_abort_on_exc(self)
        VALUE self;
    {
        return lib_evloop_abort_on_exc(self);
    }

mainloop_abort_on_exception=(p1) click to toggle source

                   static VALUE
    ip_evloop_abort_on_exc_set(self, val)
        VALUE self, val;
    {
        struct tcltkip *ptr = get_ip(self);

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            return lib_evloop_abort_on_exc(self);
        }

        if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
            /* slave IP */
            return lib_evloop_abort_on_exc(self);
        }
        return lib_evloop_abort_on_exc_set(self, val);
    }

mainloop_watchdog(*args) click to toggle source

                   static VALUE
    ip_mainloop_watchdog(argc, argv, self)
        int   argc;
        VALUE *argv;
        VALUE self;
    {
        struct tcltkip *ptr = get_ip(self);

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            return Qnil;
        }

        if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
            /* slave IP */
            return Qnil;
        }
        return lib_mainloop_watchdog(argc, argv, self);
    }

make_safe() click to toggle source

                   static VALUE
    ip_make_safe(self)
        VALUE self;
    {
        struct tcltkip *ptr = get_ip(self);

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            rb_raise(rb_eRuntimeError, "interpreter is deleted");
        }

        return tk_funcall(ip_make_safe_core, 0, (VALUE*)NULL, self);
    }

restart() click to toggle source

                   static VALUE
    ip_restart(self)
        VALUE self;
    {
        struct tcltkip *ptr = get_ip(self);

        tcl_stubs_check();

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            rb_raise(rb_eRuntimeError, "interpreter is deleted");
        }

        if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
            /* slave IP */
            return Qnil;
        }
        return lib_restart(self);
    }

safe?() click to toggle source

is safe?

                   static VALUE
    ip_is_safe_p(self)
        VALUE self;
    {
        struct tcltkip *ptr = get_ip(self);

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            rb_raise(rb_eRuntimeError, "interpreter is deleted");
        }

        if (Tcl_IsSafe(ptr->ip)) {
            return Qtrue;
        } else {
            return Qfalse;
        }
    }

set_eventloop_tick(p1) click to toggle source

                   static VALUE
    ip_set_eventloop_tick(self, tick)
        VALUE self;
        VALUE tick;
    {
        struct tcltkip *ptr = get_ip(self);

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            return get_eventloop_tick(self);
        }

        if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
            /* slave IP */
            return get_eventloop_tick(self);
        }
        return set_eventloop_tick(self, tick);
    }

set_eventloop_weight(p1, p2) click to toggle source

                   static VALUE
    ip_set_eventloop_weight(self, loop_max, no_event)
        VALUE self;
        VALUE loop_max;
        VALUE no_event;
    {
        struct tcltkip *ptr = get_ip(self);

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            return get_eventloop_weight(self);
        }

        if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
            /* slave IP */
            return get_eventloop_weight(self);
        }
        return set_eventloop_weight(self, loop_max, no_event);
    }

set_max_block_time(p1) click to toggle source

                   static VALUE
    set_max_block_time(self, time)
        VALUE self;
        VALUE time;
    {
        struct Tcl_Time tcl_time;
        VALUE divmod;

        switch(TYPE(time)) {
        case T_FIXNUM:
        case T_BIGNUM:
            /* time is micro-second value */
            divmod = rb_funcall(time, rb_intern("divmod"), 1, LONG2NUM(1000000));
            tcl_time.sec  = NUM2LONG(RARRAY_AREF(divmod, 0));
            tcl_time.usec = NUM2LONG(RARRAY_AREF(divmod, 1));
            break;

        case T_FLOAT:
            /* time is second value */
            divmod = rb_funcall(time, rb_intern("divmod"), 1, INT2FIX(1));
            tcl_time.sec  = NUM2LONG(RARRAY_AREF(divmod, 0));
            tcl_time.usec = (long)(NUM2DBL(RARRAY_AREF(divmod, 1)) * 1000000);

        default:
            {
                VALUE tmp = rb_funcallv(time, ID_inspect, 0, 0);
                rb_raise(rb_eArgError, "invalid value for time: '%s'",
                         StringValuePtr(tmp));
            }
        }

        Tcl_SetMaxBlockTime(&tcl_time);

        return Qnil;
    }

set_no_event_wait(p1) click to toggle source

                   static VALUE
    ip_set_no_event_wait(self, wait)
        VALUE self;
        VALUE wait;
    {
        struct tcltkip *ptr = get_ip(self);

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            return get_no_event_wait(self);
        }

        if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
            /* slave IP */
            return get_no_event_wait(self);
        }
        return set_no_event_wait(self, wait);
    }

slave_of?(p1) click to toggle source

self is slave of master?

                   static VALUE
    ip_is_slave_of_p(self, master)
        VALUE self, master;
    {
        if (!rb_obj_is_kind_of(master, tcltkip_class)) {
            rb_raise(rb_eArgError, "expected TclTkIp object");
        }

        if (Tcl_GetMaster(get_ip(self)->ip) == get_ip(master)->ip) {
          return Qtrue;
        } else {
          return Qfalse;
        }
    }