Module: IupLib
- Extended by:
- FFI::Library
- Defined in:
- lib/plain/iuplib.rb
Overview
Binding to the libiup shared library. This module can be used to access features not available in Iup.
As an example of using the library:
require 'iup-ffi-plain'
IupLib.IupOpen(0, nil)
IupLib.IupMessage("IupMessage Example", "Press the button")
IupLib.IupClose
For reference, the following functions are bound:
- pango_font_family_get_type, [], :ulong
- pango_font_face_get_type, [], :ulong
- pango_font_description_get_type, [], :ulong
- IupSetAttribute, [:pointer, :string, :string], :void
- IupSetAttributes, [:pointer, :string], :pointer
- IupGetAttribute, [:pointer, :string], :strptr
- IupSetAttributeHandle, [:pointer, :string, :pointer], :void
- IupSetGlobal, [:string, :string], :void
- IupGetGlobal, [:string], :strptr
- IupSetFunction, [:string, :iup_callback], :iup_callback
- IupGetInt, [:pointer, :string], :int
- IupOpen, [:int, :pointer], :int
- IupMainLoop, [], :void
- IupClose, [], :void
- IupDestroy, [:pointer], :void
- IupRedraw, [:pointer], :void
- IupMap, [:pointer], :void
- IupSetCallbackD_I, :IupSetCallback, [:pointer, :string, :iup_callback_d_i], :iup_callback_d_i
- IupSetCallbackFF_I, :IupSetCallback, [:pointer, :string, :iup_callback_ff_i], :iup_callback_ff_i
- IupSetCallbackFIIS_I, :IupSetCallback, [:pointer, :string, :iup_callback_fiis_i], :iup_callback_fiis_i
- IupSetCallbackS_I, :IupSetCallback, [:pointer, :string, :iup_callback_s_i], :iup_callback_s_i
- IupSetCallbackSII_I, :IupSetCallback, [:pointer, :string, :iup_callback_sii_i], :iup_callback_sii_i
- IupSetCallbackI_I, :IupSetCallback, [:pointer, :string, :iup_callback_i_i], :iup_callback_i_i
- IupSetCallbackI_S, :IupSetCallback, [:pointer, :string, :iup_callback_i_s], :iup_callback_i_s
- IupSetCallbackIFF_I, :IupSetCallback, [:pointer, :string, :iup_callback_iff_i], :iup_callback_iff_i
- IupSetCallbackII_I, :IupSetCallback, [:pointer, :string, :iup_callback_ii_i], :iup_callback_ii_i
- IupSetCallbackIIFF_I, :IupSetCallback, [:pointer, :string, :iup_callback_iiff_i], :iup_callback_iiff_i
- IupSetCallbackIIFFI_I, :IupSetCallback, [:pointer, :string, :iup_callback_iiffi_i], :iup_callback_iiffi_i
- IupSetCallbackIIFFFF_I, :IupSetCallback, [:pointer, :string, :iup_callback_iiffff_i], :iup_callback_iiffff_i
- IupSetCallbackIS_I, :IupSetCallback, [:pointer, :string, :iup_callback_is_i], :iup_callback_is_i
- IupSetCallbackIIS_I, :IupSetCallback, [:pointer, :string, :iup_callback_iis_i], :iup_callback_iis_i
- IupSetCallbackIII_I, :IupSetCallback, [:pointer, :string, :iup_callback_iii_i], :iup_callback_iii_i
- IupSetCallbackIIII_I, :IupSetCallback, [:pointer, :string, :iup_callback_iiii_i], :iup_callback_iiii_i
- IupSetCallbackIIS_I, :IupSetCallback, [:pointer, :string, :iup_callback_iis_i], :iup_callback_iis_i
- IupSetCallbackIIIIS_I, :IupSetCallback, [:pointer, :string, :iup_callback_iiiis_i], :iup_callback_iiiis_i
- IupSetCallbackPlain, :IupSetCallback, [:pointer, :string, :iup_callback_plain], :iup_callback_plain
- IupSetCallbackPlain_V, :IupSetCallback, [:pointer, :string, :iup_callback_plain_v], :iup_callback_plain_v
- IupSetCallbackP_I, :IupSetCallback, [:pointer, :string, :iup_callback_p_i], :iup_callback_p_i
- IupSetCallbackPP_I, :IupSetCallback, [:pointer, :string, :iup_callback_pp_i], :iup_callback_pp_i
- IupSetCallbackSS_I, :IupSetCallback, [:pointer, :string, :iup_callback_ss_i], :iup_callback_ss_i
- IupSetCallbackSSI_I, :IupSetCallback, [:pointer, :string, :iup_callback_ssi_i], :iup_callback_ssi_i
- IupSetCallbackSSIII_I, :IupSetCallback, [:pointer, :string, :iup_callback_ssiii_i], :iup_callback_ssiii_i
- IupFill, [], :pointer
- IupGridBox, [:pointer, :varargs], :pointer
- IupVbox, [:pointer, :varargs], :pointer
- IupHbox, [:pointer, :varargs], :pointer
- IupZbox, [:pointer, :varargs], :pointer
- IupRadio, [:pointer], :pointer
- IupNormalizer, [:pointer, :varargs], :pointer
- IupBackgroundBox, [:pointer], :pointer
- IupCbox, [:pointer, :varargs], :pointer
- IupDetachBox, [:pointer], :pointer
- IupExpander, [:pointer], :pointer
- IupSbox, [:pointer], :pointer
- IupScrollBox, [:pointer], :pointer
- IupSplit, [:pointer, :pointer], :pointer
- IupAppend, [:pointer, :pointer], :pointer
- IupDetach, [:pointer], :void
- IupInsert, [:pointer, :pointer, :pointer], :pointer
- IupReparent, [:pointer, :pointer, :pointer], :int
- IupGetParent, [:pointer], :pointer
- IupGetChild, [:pointer, :int], :pointer
- IupGetChildPos, [:pointer, :pointer], :int
- IupGetChildCount, [:pointer], :int
- IupGetNextChild, [:pointer, :pointer], :pointer
- IupGetBrother, [:pointer], :pointer
- IupGetDialog, [:pointer], :pointer
- IupGetDialogChild, [:pointer, :string], :pointer
- IupRefresh, [:pointer], :void
- IupRefreshChildren, [:pointer], :void
- IupUpdate, [:pointer], :void
- IupRedraw, [:pointer, :int], :void
- IupConvertXYToPos, [:pointer, :int, :int], :int
- IupDialog, [:pointer], :pointer
- IupPopup, [:pointer, :int, :int], :int
- IupShow, [:pointer], :void
- IupShowXY, [:pointer, :int, :int], :int
- IupHide, [:pointer], :void
- IupFileDlg, [], :pointer
- IupMessageDlg, [], :pointer
- IupColorDlg, [], :pointer
- IupFontDlg, [], :pointer
- IupProgressDlg, [], :pointer
- IupAlarm, [:string, :string, :string, :string, :string], :int
- IupGetFile, [:string], :int
- IupGetColor, [:int, :int, :pointer, :pointer, :pointer], :int
- IupGetText, [:pointer, :pointer], :int
- IupListDialog, [:int, :string, :int, :pointer, :int, :int, :int, :pointer], :int
- IupMessage, [:string, :string], :void
- IupButton, [:string, :string], :pointer
- IupCanvas, [:string], :pointer
- IupFrame, [:pointer], :pointer
- IupLabel, [:string], :pointer
- IupLink, [:string, :string], :pointer
- IupList, [:string], :pointer
- IupProgressBar, [], :pointer
- IupSpin, [], :pointer
- IupTabs, [:pointer, :varargs], :pointer
- IupText, [:string], :pointer
- IupToggle, [:string, :string], :pointer
- IupTree, [], :pointer
- IupVal, [:string], :pointer
- IupImage, [:int, :int, :pointer], :pointer
- IupImageRGB, [:int, :int, :pointer], :pointer
- IupImageRGBA, [:int, :int, :pointer], :pointer
- IupSaveImageAsText, [:pointer, :string, :string, :string], :int
- IupNextField, [:pointer], :pointer
- IupPreviousField, [:pointer], :pointer
- IupGetFocus, [], :pointer
- IupSetFocus, [:pointer], :pointer
- IupItem, [:string, :string], :pointer
- IupMenu, [:pointer, :varargs], :pointer
- IupSeparator, [], :pointer
- IupSubmenu, [:string, :pointer], :pointer
- IupSetHandle, [:string, :pointer], :void
- IupGetHandle, [:string], :pointer
- IupGetName, [:pointer], :strptr
- IupSetLanguage, [:string], :void
- IupGetLanguage, [], :strptr
- IupClipboard, [], :pointer
- IupTimer, [], :pointer
- IupHelp, [:string], :int
Class Method Summary collapse
-
.pointer_from_chars(array) ⇒ Object
Creates a memory structure from an array.
-
.pointer_from_ints(array) ⇒ Object
Creates a memory structure from an array.
Class Method Details
.pointer_from_chars(array) ⇒ Object
Creates a memory structure from an array.
- Input
an array of chars
- Output
pointer to memory holding array of chars
339 340 341 342 343 |
# File 'lib/plain/iuplib.rb', line 339 def self.pointer_from_chars array ptr = FFI::MemoryPointer.new :char, array.size ptr.write_array_of_char array return ptr end |
.pointer_from_ints(array) ⇒ Object
Creates a memory structure from an array.
- Input
an array of ints
- Output
pointer to memory holding array of ints
348 349 350 351 352 |
# File 'lib/plain/iuplib.rb', line 348 def self.pointer_from_ints array ptr = FFI::MemoryPointer.new :int, array.size ptr.write_array_of_int array return ptr end |