From b8d1cc35aba00ec87a6cad22498ed936f4729416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C4=81vis=20Mos=C4=81ns?= Date: Mon, 2 Feb 2026 20:12:11 +0200 Subject: [PATCH 1/2] Remove trailing whitespace from comments --- .../generators/from_c_generator/function_or_callback.rb | 4 ++-- .../generators/from_c_generator/struct_or_union.rb | 6 +++--- lib/ffi_generator/generators/from_c_generator/writer.rb | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/ffi_generator/generators/from_c_generator/function_or_callback.rb b/lib/ffi_generator/generators/from_c_generator/function_or_callback.rb index 47a2da1..3eed7b5 100644 --- a/lib/ffi_generator/generators/from_c_generator/function_or_callback.rb +++ b/lib/ffi_generator/generators/from_c_generator/function_or_callback.rb @@ -26,9 +26,9 @@ def write_ruby writer.puts "", "This entry is only for documentation and no real method." if @is_callback writer.puts "", "@method #{@is_callback ? "_callback_#{ruby_name}_" : ruby_name}(#{@parameters.map{ |parameter| parameter[:name].to_ruby_downcase }.join(', ')})" @parameters.each do |parameter| - writer.write_description parameter[:description], false, "@param [#{parameter[:type].ruby_description}] #{parameter[:name].to_ruby_downcase} ", " " + writer.write_description parameter[:description], false, "@param [#{parameter[:type].ruby_description}] #{parameter[:name].to_ruby_downcase}", " " end - writer.write_description @return_value_description, false, "@return [#{@return_type.ruby_description}] ", " " + writer.write_description @return_value_description, false, "@return [#{@return_type.ruby_description}]", " " writer.puts "@scope class" end diff --git a/lib/ffi_generator/generators/from_c_generator/struct_or_union.rb b/lib/ffi_generator/generators/from_c_generator/struct_or_union.rb index 74cc46f..0944afc 100644 --- a/lib/ffi_generator/generators/from_c_generator/struct_or_union.rb +++ b/lib/ffi_generator/generators/from_c_generator/struct_or_union.rb @@ -23,7 +23,7 @@ def write_ruby writer.puts "", "= Fields:" @fields.each do |field| writer.puts ":#{field[:name].to_ruby_downcase} ::" - writer.write_description field[:comment], false, " (#{field[:type].ruby_description}) ", " " + writer.write_description field[:comment], false, " (#{field[:type].ruby_description})", " " end end end @@ -38,10 +38,10 @@ def write_ruby writer.puts "" unless index == 0 writer.comment do function.parameters[1..-1].each do |parameter| - writer.write_description parameter[:description], false, "@param [#{parameter[:type].ruby_description}] #{parameter[:name].to_ruby_downcase} ", " " + writer.write_description parameter[:description], false, "@param [#{parameter[:type].ruby_description}] #{parameter[:name].to_ruby_downcase}", " " end return_type = function.return_type.is_a?(StructOrUnion) ? function.return_type.ruby_name : function.return_type.ruby_description - writer.write_description function.return_value_description, false, "@return [#{return_type}] ", " " + writer.write_description function.return_value_description, false, "@return [#{return_type}]", " " end writer.puts "def #{name.to_ruby_downcase}(#{parameter_names.join(', ')})" writer.indent do diff --git a/lib/ffi_generator/generators/from_c_generator/writer.rb b/lib/ffi_generator/generators/from_c_generator/writer.rb index 2d83fe6..6de48c0 100644 --- a/lib/ffi_generator/generators/from_c_generator/writer.rb +++ b/lib/ffi_generator/generators/from_c_generator/writer.rb @@ -36,7 +36,9 @@ def puts(*lines) def write_array(array, separator = "", first_line_prefix = "", other_lines_prefix = "") array.each_with_index do |entry, index| entry = yield(entry) if block_given? - puts("#{index == 0 ? first_line_prefix : other_lines_prefix}#{entry}#{index < array.size - 1 ? separator : ''}") + prefix = index == 0 ? first_line_prefix : other_lines_prefix + entry = ' ' + entry if !prefix.to_s.empty? && prefix.to_s[-1] != ' ' && !entry.to_s.empty? + puts("#{prefix}#{entry}#{index < array.size - 1 ? separator : ''}") end end From 571f17f3a3707dfe201062d6ec6d5c8e007ac145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C4=81vis=20Mos=C4=81ns?= Date: Mon, 2 Feb 2026 20:17:50 +0200 Subject: [PATCH 2/2] Update test output --- test/output/GL/freeglut_std.rb | 400 +- test/output/GL/gl.rb | 7346 ++++++++--------- test/output/GL/glu.rb | 1069 ++- test/output/cairo-deprecated.rb | 10 +- test/output/cairo-features.rb | 38 +- test/output/cairo-ft.rb | 49 +- test/output/cairo-gobject.rb | 170 +- test/output/cairo-pdf.rb | 82 +- test/output/cairo-ps.rb | 123 +- test/output/cairo-script-interpreter.rb | 275 +- test/output/cairo-svg.rb | 69 +- test/output/cairo-version.rb | 16 +- test/output/cairo-xcb.rb | 90 +- test/output/cairo-xlib-xrender.rb | 34 +- test/output/cairo-xlib.rb | 113 +- test/output/cairo.rb | 4217 +++++----- test/output/clang-c/Index.rb | 1790 ++-- test/output/include/capi/cef_app_capi.rb | 90 +- test/output/include/capi/cef_base_capi.rb | 22 +- test/output/include/capi/cef_browser_capi.rb | 118 +- .../capi/cef_browser_process_handler_capi.rb | 22 +- test/output/include/capi/cef_callback_capi.rb | 20 +- test/output/include/capi/cef_client_capi.rb | 58 +- .../include/capi/cef_command_line_capi.rb | 62 +- .../capi/cef_context_menu_handler_capi.rb | 78 +- test/output/include/capi/cef_cookie_capi.rb | 52 +- .../include/capi/cef_display_handler_capi.rb | 42 +- test/output/include/capi/cef_dom_capi.rb | 148 +- .../include/capi/cef_focus_handler_capi.rb | 28 +- test/output/include/capi/cef_frame_capi.rb | 76 +- .../capi/cef_geolocation_handler_capi.rb | 32 +- .../include/capi/cef_jsdialog_handler_capi.rb | 36 +- .../include/capi/cef_keyboard_handler_capi.rb | 24 +- .../capi/cef_life_span_handler_capi.rb | 38 +- .../include/capi/cef_load_handler_capi.rb | 34 +- .../include/capi/cef_menu_model_capi.rb | 114 +- .../include/capi/cef_origin_whitelist_capi.rb | 51 +- .../include/capi/cef_process_message_capi.rb | 35 +- .../include/capi/cef_proxy_handler_capi.rb | 18 +- .../capi/cef_render_process_handler_capi.rb | 58 +- test/output/include/capi/cef_request_capi.rb | 115 +- .../include/capi/cef_request_handler_capi.rb | 62 +- .../capi/cef_resource_bundle_handler_capi.rb | 20 +- .../include/capi/cef_resource_handler_capi.rb | 36 +- test/output/include/capi/cef_response_capi.rb | 41 +- test/output/include/capi/cef_scheme_capi.rb | 69 +- test/output/include/capi/cef_stream_capi.rb | 121 +- .../include/capi/cef_string_visitor_capi.rb | 18 +- test/output/include/capi/cef_task_capi.rb | 59 +- test/output/include/capi/cef_url_capi.rb | 28 +- .../include/capi/cef_urlrequest_capi.rb | 55 +- test/output/include/capi/cef_v8_capi.rb | 280 +- test/output/include/capi/cef_values_capi.rb | 171 +- .../include/capi/cef_web_plugin_capi.rb | 46 +- .../include/capi/cef_xml_reader_capi.rb | 96 +- .../include/capi/cef_zip_reader_capi.rb | 58 +- test/output/include/internal/cef_build.rb | 18 +- test/output/include/internal/cef_export.rb | 10 +- test/output/include/internal/cef_linux.rb | 10 +- test/output/include/internal/cef_mac.rb | 10 +- test/output/include/internal/cef_ptr.rb | 10 +- test/output/include/internal/cef_string.rb | 12 +- .../include/internal/cef_string_list.rb | 63 +- .../output/include/internal/cef_string_map.rb | 80 +- .../include/internal/cef_string_multimap.rb | 91 +- .../include/internal/cef_string_types.rb | 315 +- .../include/internal/cef_string_wrappers.rb | 48 +- test/output/include/internal/cef_time.rb | 73 +- test/output/include/internal/cef_tuple.rb | 25 +- test/output/include/internal/cef_types.rb | 802 +- .../include/internal/cef_types_linux.rb | 26 +- test/output/include/internal/cef_types_mac.rb | 10 +- test/output/include/internal/cef_types_win.rb | 10 +- .../include/internal/cef_types_wrappers.rb | 76 +- test/output/include/internal/cef_win.rb | 10 +- test/output/libssh2.rb | 1565 ++-- test/output/llvm-c/Analysis.rb | 54 +- test/output/llvm-c/BitReader.rb | 82 +- test/output/llvm-c/BitWriter.rb | 41 +- test/output/llvm-c/Core.rb | 4465 ++++------ test/output/llvm-c/Disassembler.rb | 141 +- test/output/llvm-c/EnhancedDisassembly.rb | 361 +- test/output/llvm-c/ExecutionEngine.rb | 309 +- test/output/llvm-c/Initialization.rb | 80 +- test/output/llvm-c/LinkTimeOptimizer.rb | 66 +- test/output/llvm-c/Object.rb | 81 +- test/output/llvm-c/Target.rb | 188 +- test/output/llvm-c/Transforms/IPO.rb | 110 +- .../llvm-c/Transforms/PassManagerBuilder.rb | 109 +- test/output/llvm-c/Transforms/Scalar.rb | 222 +- test/output/llvm-c/lto.rb | 397 +- test/output/sqlite3.rb | 4073 +++++---- 92 files changed, 14956 insertions(+), 17509 deletions(-) diff --git a/test/output/GL/freeglut_std.rb b/test/output/GL/freeglut_std.rb index 19dfa77..b4195a8 100644 --- a/test/output/GL/freeglut_std.rb +++ b/test/output/GL/freeglut_std.rb @@ -1,10 +1,12 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module GLUT + extend FFI::Library - ffi_lib 'glut' + + ffi_lib ENV["GLUT_PATH"] || "glut" def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e @@ -345,65 +347,58 @@ def self.attach_function(name, *_) GAME_MODE_DISPLAY_CHANGED = 0x0006 # Initialization functions, see fglut_init.c - # + # @method init(pargc, argv) # @param [FFI::Pointer(*Int)] pargc # @param [FFI::Pointer(**CharS)] argv # @return [nil] # @scope class attach_function :init, :glutInit, [:pointer, :pointer], :void - # (Not documented) - # + # @method init_window_position(x, y) # @param [Integer] x # @param [Integer] y # @return [nil] # @scope class attach_function :init_window_position, :glutInitWindowPosition, [:int, :int], :void - # (Not documented) - # + # @method init_window_size(width, height) # @param [Integer] width # @param [Integer] height # @return [nil] # @scope class attach_function :init_window_size, :glutInitWindowSize, [:int, :int], :void - # (Not documented) - # + # @method init_display_mode(display_mode) # @param [Integer] display_mode # @return [nil] # @scope class attach_function :init_display_mode, :glutInitDisplayMode, [:uint], :void - # (Not documented) - # + # @method init_display_string(display_mode) # @param [String] display_mode # @return [nil] # @scope class attach_function :init_display_string, :glutInitDisplayString, [:string], :void - # Process loop function, see freeglut_main.c - # + # @method main_loop() # @return [nil] # @scope class attach_function :main_loop, :glutMainLoop, [], :void - # Window management functions, see freeglut_window.c - # + # @method create_window(title) # @param [String] title # @return [Integer] # @scope class attach_function :create_window, :glutCreateWindow, [:string], :int - # (Not documented) - # + # @method create_sub_window(window, x, y, width, height) # @param [Integer] window # @param [Integer] x @@ -413,247 +408,215 @@ def self.attach_function(name, *_) # @return [Integer] # @scope class attach_function :create_sub_window, :glutCreateSubWindow, [:int, :int, :int, :int, :int], :int - # (Not documented) - # + # @method destroy_window(window) # @param [Integer] window # @return [nil] # @scope class attach_function :destroy_window, :glutDestroyWindow, [:int], :void - # (Not documented) - # + # @method set_window(window) # @param [Integer] window # @return [nil] # @scope class attach_function :set_window, :glutSetWindow, [:int], :void - # (Not documented) - # + # @method get_window() # @return [Integer] # @scope class attach_function :get_window, :glutGetWindow, [], :int - # (Not documented) - # + # @method set_window_title(title) # @param [String] title # @return [nil] # @scope class attach_function :set_window_title, :glutSetWindowTitle, [:string], :void - # (Not documented) - # + # @method set_icon_title(title) # @param [String] title # @return [nil] # @scope class attach_function :set_icon_title, :glutSetIconTitle, [:string], :void - # (Not documented) - # + # @method reshape_window(width, height) # @param [Integer] width # @param [Integer] height # @return [nil] # @scope class attach_function :reshape_window, :glutReshapeWindow, [:int, :int], :void - # (Not documented) - # + # @method position_window(x, y) # @param [Integer] x # @param [Integer] y # @return [nil] # @scope class attach_function :position_window, :glutPositionWindow, [:int, :int], :void - # (Not documented) - # + # @method show_window() # @return [nil] # @scope class attach_function :show_window, :glutShowWindow, [], :void - # (Not documented) - # + # @method hide_window() # @return [nil] # @scope class attach_function :hide_window, :glutHideWindow, [], :void - # (Not documented) - # + # @method iconify_window() # @return [nil] # @scope class attach_function :iconify_window, :glutIconifyWindow, [], :void - # (Not documented) - # + # @method push_window() # @return [nil] # @scope class attach_function :push_window, :glutPushWindow, [], :void - # (Not documented) - # + # @method pop_window() # @return [nil] # @scope class attach_function :pop_window, :glutPopWindow, [], :void - # (Not documented) - # + # @method full_screen() # @return [nil] # @scope class attach_function :full_screen, :glutFullScreen, [], :void - # Display-connected functions, see freeglut_display.c - # + # @method post_window_redisplay(window) # @param [Integer] window # @return [nil] # @scope class attach_function :post_window_redisplay, :glutPostWindowRedisplay, [:int], :void - # (Not documented) - # + # @method post_redisplay() # @return [nil] # @scope class attach_function :post_redisplay, :glutPostRedisplay, [], :void - # (Not documented) - # + # @method swap_buffers() # @return [nil] # @scope class attach_function :swap_buffers, :glutSwapBuffers, [], :void - # Mouse cursor functions, see freeglut_cursor.c - # + # @method warp_pointer(x, y) # @param [Integer] x # @param [Integer] y # @return [nil] # @scope class attach_function :warp_pointer, :glutWarpPointer, [:int, :int], :void - # (Not documented) - # + # @method set_cursor(cursor) # @param [Integer] cursor # @return [nil] # @scope class attach_function :set_cursor, :glutSetCursor, [:int], :void - # Overlay stuff, see freeglut_overlay.c - # + # @method establish_overlay() # @return [nil] # @scope class attach_function :establish_overlay, :glutEstablishOverlay, [], :void - # (Not documented) - # + # @method remove_overlay() # @return [nil] # @scope class attach_function :remove_overlay, :glutRemoveOverlay, [], :void - # (Not documented) - # + # @method use_layer(layer) # @param [Integer] layer # @return [nil] # @scope class attach_function :use_layer, :glutUseLayer, [:uint], :void - # (Not documented) - # + # @method post_overlay_redisplay() # @return [nil] # @scope class attach_function :post_overlay_redisplay, :glutPostOverlayRedisplay, [], :void - # (Not documented) - # + # @method post_window_overlay_redisplay(window) # @param [Integer] window # @return [nil] # @scope class attach_function :post_window_overlay_redisplay, :glutPostWindowOverlayRedisplay, [:int], :void - # (Not documented) - # + # @method show_overlay() # @return [nil] # @scope class attach_function :show_overlay, :glutShowOverlay, [], :void - # (Not documented) - # + # @method hide_overlay() # @return [nil] # @scope class attach_function :hide_overlay, :glutHideOverlay, [], :void - # Menu stuff, see freeglut_menu.c - # + # @method create_menu(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [Integer] # @scope class attach_function :create_menu, :glutCreateMenu, [:pointer], :int - # (Not documented) - # + # @method destroy_menu(menu) # @param [Integer] menu # @return [nil] # @scope class attach_function :destroy_menu, :glutDestroyMenu, [:int], :void - # (Not documented) - # + # @method get_menu() # @return [Integer] # @scope class attach_function :get_menu, :glutGetMenu, [], :int - # (Not documented) - # + # @method set_menu(menu) # @param [Integer] menu # @return [nil] # @scope class attach_function :set_menu, :glutSetMenu, [:int], :void - # (Not documented) - # + # @method add_menu_entry(label, value) # @param [String] label # @param [Integer] value # @return [nil] # @scope class attach_function :add_menu_entry, :glutAddMenuEntry, [:string, :int], :void - # (Not documented) - # + # @method add_sub_menu(label, sub_menu) # @param [String] label # @param [Integer] sub_menu # @return [nil] # @scope class attach_function :add_sub_menu, :glutAddSubMenu, [:string, :int], :void - # (Not documented) - # + # @method change_to_menu_entry(item, label, value) # @param [Integer] item # @param [String] label @@ -661,9 +624,8 @@ def self.attach_function(name, *_) # @return [nil] # @scope class attach_function :change_to_menu_entry, :glutChangeToMenuEntry, [:int, :string, :int], :void - # (Not documented) - # + # @method change_to_sub_menu(item, label, value) # @param [Integer] item # @param [String] label @@ -671,337 +633,296 @@ def self.attach_function(name, *_) # @return [nil] # @scope class attach_function :change_to_sub_menu, :glutChangeToSubMenu, [:int, :string, :int], :void - # (Not documented) - # + # @method remove_menu_item(item) # @param [Integer] item # @return [nil] # @scope class attach_function :remove_menu_item, :glutRemoveMenuItem, [:int], :void - # (Not documented) - # + # @method attach_menu(button) # @param [Integer] button # @return [nil] # @scope class attach_function :attach_menu, :glutAttachMenu, [:int], :void - # (Not documented) - # + # @method detach_menu(button) # @param [Integer] button # @return [nil] # @scope class attach_function :detach_menu, :glutDetachMenu, [:int], :void - # Global callback functions, see freeglut_callbacks.c - # + # @method timer_func(time, callback, value) # @param [Integer] time - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @param [Integer] value # @return [nil] # @scope class attach_function :timer_func, :glutTimerFunc, [:uint, :pointer, :int], :void - # (Not documented) - # + # @method idle_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :idle_func, :glutIdleFunc, [:pointer], :void - # Window-specific callback functions, see freeglut_callbacks.c - # + # @method keyboard_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :keyboard_func, :glutKeyboardFunc, [:pointer], :void - # (Not documented) - # + # @method special_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :special_func, :glutSpecialFunc, [:pointer], :void - # (Not documented) - # + # @method reshape_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :reshape_func, :glutReshapeFunc, [:pointer], :void - # (Not documented) - # + # @method visibility_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :visibility_func, :glutVisibilityFunc, [:pointer], :void - # (Not documented) - # + # @method display_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :display_func, :glutDisplayFunc, [:pointer], :void - # (Not documented) - # + # @method mouse_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :mouse_func, :glutMouseFunc, [:pointer], :void - # (Not documented) - # + # @method motion_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :motion_func, :glutMotionFunc, [:pointer], :void - # (Not documented) - # + # @method passive_motion_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :passive_motion_func, :glutPassiveMotionFunc, [:pointer], :void - # (Not documented) - # + # @method entry_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :entry_func, :glutEntryFunc, [:pointer], :void - # (Not documented) - # + # @method keyboard_up_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :keyboard_up_func, :glutKeyboardUpFunc, [:pointer], :void - # (Not documented) - # + # @method special_up_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :special_up_func, :glutSpecialUpFunc, [:pointer], :void - # (Not documented) - # + # @method joystick_func(callback, poll_interval) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @param [Integer] poll_interval # @return [nil] # @scope class attach_function :joystick_func, :glutJoystickFunc, [:pointer, :int], :void - # (Not documented) - # + # @method menu_state_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :menu_state_func, :glutMenuStateFunc, [:pointer], :void - # (Not documented) - # + # @method menu_status_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :menu_status_func, :glutMenuStatusFunc, [:pointer], :void - # (Not documented) - # + # @method overlay_display_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :overlay_display_func, :glutOverlayDisplayFunc, [:pointer], :void - # (Not documented) - # + # @method window_status_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :window_status_func, :glutWindowStatusFunc, [:pointer], :void - # (Not documented) - # + # @method spaceball_motion_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :spaceball_motion_func, :glutSpaceballMotionFunc, [:pointer], :void - # (Not documented) - # + # @method spaceball_rotate_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :spaceball_rotate_func, :glutSpaceballRotateFunc, [:pointer], :void - # (Not documented) - # + # @method spaceball_button_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :spaceball_button_func, :glutSpaceballButtonFunc, [:pointer], :void - # (Not documented) - # + # @method button_box_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :button_box_func, :glutButtonBoxFunc, [:pointer], :void - # (Not documented) - # + # @method dials_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :dials_func, :glutDialsFunc, [:pointer], :void - # (Not documented) - # + # @method tablet_motion_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :tablet_motion_func, :glutTabletMotionFunc, [:pointer], :void - # (Not documented) - # + # @method tablet_button_func(callback) - # @param [FFI::Pointer(*)] callback + # @param [FFI::Pointer(*FunctionProto)] callback # @return [nil] # @scope class attach_function :tablet_button_func, :glutTabletButtonFunc, [:pointer], :void - # State setting and retrieval functions, see freeglut_state.c - # + # @method get(query) # @param [Integer] query # @return [Integer] # @scope class attach_function :get, :glutGet, [:uint], :int - # (Not documented) - # + # @method device_get(query) # @param [Integer] query # @return [Integer] # @scope class attach_function :device_get, :glutDeviceGet, [:uint], :int - # (Not documented) - # + # @method get_modifiers() # @return [Integer] # @scope class attach_function :get_modifiers, :glutGetModifiers, [], :int - # (Not documented) - # + # @method layer_get(query) # @param [Integer] query # @return [Integer] # @scope class attach_function :layer_get, :glutLayerGet, [:uint], :int - # Font stuff, see freeglut_font.c - # + # @method bitmap_character(font, character) # @param [FFI::Pointer(*Void)] font # @param [Integer] character # @return [nil] # @scope class attach_function :bitmap_character, :glutBitmapCharacter, [:pointer, :int], :void - # (Not documented) - # + # @method bitmap_width(font, character) # @param [FFI::Pointer(*Void)] font # @param [Integer] character # @return [Integer] # @scope class attach_function :bitmap_width, :glutBitmapWidth, [:pointer, :int], :int - # (Not documented) - # + # @method stroke_character(font, character) # @param [FFI::Pointer(*Void)] font # @param [Integer] character # @return [nil] # @scope class attach_function :stroke_character, :glutStrokeCharacter, [:pointer, :int], :void - # (Not documented) - # + # @method stroke_width(font, character) # @param [FFI::Pointer(*Void)] font # @param [Integer] character # @return [Integer] # @scope class attach_function :stroke_width, :glutStrokeWidth, [:pointer, :int], :int - # (Not documented) - # + # @method bitmap_length(font, string) # @param [FFI::Pointer(*Void)] font # @param [FFI::Pointer(*UChar)] string # @return [Integer] # @scope class attach_function :bitmap_length, :glutBitmapLength, [:pointer, :pointer], :int - # (Not documented) - # + # @method stroke_length(font, string) # @param [FFI::Pointer(*Void)] font # @param [FFI::Pointer(*UChar)] string # @return [Integer] # @scope class attach_function :stroke_length, :glutStrokeLength, [:pointer, :pointer], :int - # Geometry functions, see freeglut_geometry.c - # + # @method wire_cube(size) # @param [Float] size # @return [nil] # @scope class attach_function :wire_cube, :glutWireCube, [:double], :void - # (Not documented) - # + # @method solid_cube(size) # @param [Float] size # @return [nil] # @scope class attach_function :solid_cube, :glutSolidCube, [:double], :void - # (Not documented) - # + # @method wire_sphere(radius, slices, stacks) # @param [Float] radius # @param [Integer] slices @@ -1009,9 +930,8 @@ def self.attach_function(name, *_) # @return [nil] # @scope class attach_function :wire_sphere, :glutWireSphere, [:double, :int, :int], :void - # (Not documented) - # + # @method solid_sphere(radius, slices, stacks) # @param [Float] radius # @param [Integer] slices @@ -1019,9 +939,8 @@ def self.attach_function(name, *_) # @return [nil] # @scope class attach_function :solid_sphere, :glutSolidSphere, [:double, :int, :int], :void - # (Not documented) - # + # @method wire_cone(base, height, slices, stacks) # @param [Float] base # @param [Float] height @@ -1030,9 +949,8 @@ def self.attach_function(name, *_) # @return [nil] # @scope class attach_function :wire_cone, :glutWireCone, [:double, :double, :int, :int], :void - # (Not documented) - # + # @method solid_cone(base, height, slices, stacks) # @param [Float] base # @param [Float] height @@ -1041,9 +959,8 @@ def self.attach_function(name, *_) # @return [nil] # @scope class attach_function :solid_cone, :glutSolidCone, [:double, :double, :int, :int], :void - # (Not documented) - # + # @method wire_torus(inner_radius, outer_radius, sides, rings) # @param [Float] inner_radius # @param [Float] outer_radius @@ -1052,9 +969,8 @@ def self.attach_function(name, *_) # @return [nil] # @scope class attach_function :wire_torus, :glutWireTorus, [:double, :double, :int, :int], :void - # (Not documented) - # + # @method solid_torus(inner_radius, outer_radius, sides, rings) # @param [Float] inner_radius # @param [Float] outer_radius @@ -1063,133 +979,115 @@ def self.attach_function(name, *_) # @return [nil] # @scope class attach_function :solid_torus, :glutSolidTorus, [:double, :double, :int, :int], :void - # (Not documented) - # + # @method wire_dodecahedron() # @return [nil] # @scope class attach_function :wire_dodecahedron, :glutWireDodecahedron, [], :void - # (Not documented) - # + # @method solid_dodecahedron() # @return [nil] # @scope class attach_function :solid_dodecahedron, :glutSolidDodecahedron, [], :void - # (Not documented) - # + # @method wire_octahedron() # @return [nil] # @scope class attach_function :wire_octahedron, :glutWireOctahedron, [], :void - # (Not documented) - # + # @method solid_octahedron() # @return [nil] # @scope class attach_function :solid_octahedron, :glutSolidOctahedron, [], :void - # (Not documented) - # + # @method wire_tetrahedron() # @return [nil] # @scope class attach_function :wire_tetrahedron, :glutWireTetrahedron, [], :void - # (Not documented) - # + # @method solid_tetrahedron() # @return [nil] # @scope class attach_function :solid_tetrahedron, :glutSolidTetrahedron, [], :void - # (Not documented) - # + # @method wire_icosahedron() # @return [nil] # @scope class attach_function :wire_icosahedron, :glutWireIcosahedron, [], :void - # (Not documented) - # + # @method solid_icosahedron() # @return [nil] # @scope class attach_function :solid_icosahedron, :glutSolidIcosahedron, [], :void - # Teapot rendering functions, found in freeglut_teapot.c - # + # @method wire_teapot(size) # @param [Float] size # @return [nil] # @scope class attach_function :wire_teapot, :glutWireTeapot, [:double], :void - # (Not documented) - # + # @method solid_teapot(size) # @param [Float] size # @return [nil] # @scope class attach_function :solid_teapot, :glutSolidTeapot, [:double], :void - # Game mode functions, see freeglut_gamemode.c - # + # @method game_mode_string(string) # @param [String] string # @return [nil] # @scope class attach_function :game_mode_string, :glutGameModeString, [:string], :void - # (Not documented) - # + # @method enter_game_mode() # @return [Integer] # @scope class attach_function :enter_game_mode, :glutEnterGameMode, [], :int - # (Not documented) - # + # @method leave_game_mode() # @return [nil] # @scope class attach_function :leave_game_mode, :glutLeaveGameMode, [], :void - # (Not documented) - # + # @method game_mode_get(query) # @param [Integer] query # @return [Integer] # @scope class attach_function :game_mode_get, :glutGameModeGet, [:uint], :int - # Video resize functions, see freeglut_videoresize.c - # + # @method video_resize_get(query) # @param [Integer] query # @return [Integer] # @scope class attach_function :video_resize_get, :glutVideoResizeGet, [:uint], :int - # (Not documented) - # + # @method setup_video_resizing() # @return [nil] # @scope class attach_function :setup_video_resizing, :glutSetupVideoResizing, [], :void - # (Not documented) - # + # @method stop_video_resizing() # @return [nil] # @scope class attach_function :stop_video_resizing, :glutStopVideoResizing, [], :void - # (Not documented) - # + # @method video_resize(x, y, width, height) # @param [Integer] x # @param [Integer] y @@ -1198,9 +1096,8 @@ def self.attach_function(name, *_) # @return [nil] # @scope class attach_function :video_resize, :glutVideoResize, [:int, :int, :int, :int], :void - # (Not documented) - # + # @method video_pan(x, y, width, height) # @param [Integer] x # @param [Integer] y @@ -1209,9 +1106,8 @@ def self.attach_function(name, *_) # @return [nil] # @scope class attach_function :video_pan, :glutVideoPan, [:int, :int, :int, :int], :void - # Colormap functions, see freeglut_misc.c - # + # @method set_color(color, red, green, blue) # @param [Integer] color # @param [Float] red @@ -1220,60 +1116,52 @@ def self.attach_function(name, *_) # @return [nil] # @scope class attach_function :set_color, :glutSetColor, [:int, :float, :float, :float], :void - # (Not documented) - # + # @method get_color(color, component) # @param [Integer] color # @param [Integer] component # @return [Float] # @scope class attach_function :get_color, :glutGetColor, [:int, :int], :float - # (Not documented) - # + # @method copy_colormap(window) # @param [Integer] window # @return [nil] # @scope class attach_function :copy_colormap, :glutCopyColormap, [:int], :void - # Misc keyboard and joystick functions, see freeglut_misc.c - # + # @method ignore_key_repeat(ignore) # @param [Integer] ignore # @return [nil] # @scope class attach_function :ignore_key_repeat, :glutIgnoreKeyRepeat, [:int], :void - # (Not documented) - # + # @method set_key_repeat(repeat_mode) # @param [Integer] repeat_mode # @return [nil] # @scope class attach_function :set_key_repeat, :glutSetKeyRepeat, [:int], :void - # (Not documented) - # + # @method force_joystick_func() # @return [nil] # @scope class attach_function :force_joystick_func, :glutForceJoystickFunc, [], :void - # Misc functions, see freeglut_misc.c - # + # @method extension_supported(extension) # @param [String] extension # @return [Integer] # @scope class attach_function :extension_supported, :glutExtensionSupported, [:string], :int - # (Not documented) - # + # @method report_errors() # @return [nil] # @scope class attach_function :report_errors, :glutReportErrors, [], :void - end diff --git a/test/output/GL/gl.rb b/test/output/GL/gl.rb index 98a46c4..145fd0c 100644 --- a/test/output/GL/gl.rb +++ b/test/output/GL/gl.rb @@ -1,6651 +1,6241 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module GL + extend FFI::Library - ffi_lib 'GL' - + + ffi_lib ENV["GL_PATH"] || "GL" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + VERSION_1_1 = 1 - + VERSION_1_2 = 1 - + VERSION_1_3 = 1 - + ARB_IMAGING = 1 - + FALSE = 0x0 - + TRUE = 0x1 - + BYTE = 0x1400 - + UNSIGNED_BYTE = 0x1401 - + SHORT = 0x1402 - + UNSIGNED_SHORT = 0x1403 - + INT = 0x1404 - + UNSIGNED_INT = 0x1405 - + FLOAT = 0x1406 - + _2_BYTES = 0x1407 - + _3_BYTES = 0x1408 - + _4_BYTES = 0x1409 - + DOUBLE = 0x140A - + POINTS = 0x0000 - + LINES = 0x0001 - + LINE_LOOP = 0x0002 - + LINE_STRIP = 0x0003 - + TRIANGLES = 0x0004 - + TRIANGLE_STRIP = 0x0005 - + TRIANGLE_FAN = 0x0006 - + QUADS = 0x0007 - + QUAD_STRIP = 0x0008 - + POLYGON = 0x0009 - + VERTEX_ARRAY = 0x8074 - + NORMAL_ARRAY = 0x8075 - + COLOR_ARRAY = 0x8076 - + INDEX_ARRAY = 0x8077 - + TEXTURE_COORD_ARRAY = 0x8078 - + EDGE_FLAG_ARRAY = 0x8079 - + VERTEX_ARRAY_SIZE = 0x807A - + VERTEX_ARRAY_TYPE = 0x807B - + VERTEX_ARRAY_STRIDE = 0x807C - + NORMAL_ARRAY_TYPE = 0x807E - + NORMAL_ARRAY_STRIDE = 0x807F - + COLOR_ARRAY_SIZE = 0x8081 - + COLOR_ARRAY_TYPE = 0x8082 - + COLOR_ARRAY_STRIDE = 0x8083 - + INDEX_ARRAY_TYPE = 0x8085 - + INDEX_ARRAY_STRIDE = 0x8086 - + TEXTURE_COORD_ARRAY_SIZE = 0x8088 - + TEXTURE_COORD_ARRAY_TYPE = 0x8089 - + TEXTURE_COORD_ARRAY_STRIDE = 0x808A - + EDGE_FLAG_ARRAY_STRIDE = 0x808C - + VERTEX_ARRAY_POINTER = 0x808E - + NORMAL_ARRAY_POINTER = 0x808F - + COLOR_ARRAY_POINTER = 0x8090 - + INDEX_ARRAY_POINTER = 0x8091 - + TEXTURE_COORD_ARRAY_POINTER = 0x8092 - + EDGE_FLAG_ARRAY_POINTER = 0x8093 - + V2F = 0x2A20 - + V3F = 0x2A21 - + C4UB_V2F = 0x2A22 - + C4UB_V3F = 0x2A23 - + C3F_V3F = 0x2A24 - + N3F_V3F = 0x2A25 - + C4F_N3F_V3F = 0x2A26 - + T2F_V3F = 0x2A27 - + T4F_V4F = 0x2A28 - + T2F_C4UB_V3F = 0x2A29 - + T2F_C3F_V3F = 0x2A2A - + T2F_N3F_V3F = 0x2A2B - + T2F_C4F_N3F_V3F = 0x2A2C - + T4F_C4F_N3F_V4F = 0x2A2D - + MATRIX_MODE = 0x0BA0 - + MODELVIEW = 0x1700 - + PROJECTION = 0x1701 - + TEXTURE = 0x1702 - + POINT_SMOOTH = 0x0B10 - + POINT_SIZE = 0x0B11 - + POINT_SIZE_GRANULARITY = 0x0B13 - + POINT_SIZE_RANGE = 0x0B12 - + LINE_SMOOTH = 0x0B20 - + LINE_STIPPLE = 0x0B24 - + LINE_STIPPLE_PATTERN = 0x0B25 - + LINE_STIPPLE_REPEAT = 0x0B26 - + LINE_WIDTH = 0x0B21 - + LINE_WIDTH_GRANULARITY = 0x0B23 - + LINE_WIDTH_RANGE = 0x0B22 - + POINT = 0x1B00 - + LINE = 0x1B01 - + FILL = 0x1B02 - + CW = 0x0900 - + CCW = 0x0901 - + FRONT = 0x0404 - + BACK = 0x0405 - + POLYGON_MODE = 0x0B40 - + POLYGON_SMOOTH = 0x0B41 - + POLYGON_STIPPLE = 0x0B42 - + EDGE_FLAG = 0x0B43 - + CULL_FACE = 0x0B44 - + CULL_FACE_MODE = 0x0B45 - + FRONT_FACE = 0x0B46 - + POLYGON_OFFSET_FACTOR = 0x8038 - + POLYGON_OFFSET_UNITS = 0x2A00 - + POLYGON_OFFSET_POINT = 0x2A01 - + POLYGON_OFFSET_LINE = 0x2A02 - + POLYGON_OFFSET_FILL = 0x8037 - + COMPILE = 0x1300 - + COMPILE_AND_EXECUTE = 0x1301 - + LIST_BASE = 0x0B32 - + LIST_INDEX = 0x0B33 - + LIST_MODE = 0x0B30 - + NEVER = 0x0200 - + LESS = 0x0201 - + EQUAL = 0x0202 - + LEQUAL = 0x0203 - + GREATER = 0x0204 - + NOTEQUAL = 0x0205 - + GEQUAL = 0x0206 - + ALWAYS = 0x0207 - + DEPTH_TEST = 0x0B71 - + DEPTH_BITS = 0x0D56 - + DEPTH_CLEAR_VALUE = 0x0B73 - + DEPTH_FUNC = 0x0B74 - + DEPTH_RANGE = 0x0B70 - + DEPTH_WRITEMASK = 0x0B72 - + DEPTH_COMPONENT = 0x1902 - + LIGHTING = 0x0B50 - + LIGHT0 = 0x4000 - + LIGHT1 = 0x4001 - + LIGHT2 = 0x4002 - + LIGHT3 = 0x4003 - + LIGHT4 = 0x4004 - + LIGHT5 = 0x4005 - + LIGHT6 = 0x4006 - + LIGHT7 = 0x4007 - + SPOT_EXPONENT = 0x1205 - + SPOT_CUTOFF = 0x1206 - + CONSTANT_ATTENUATION = 0x1207 - + LINEAR_ATTENUATION = 0x1208 - + QUADRATIC_ATTENUATION = 0x1209 - + AMBIENT = 0x1200 - + DIFFUSE = 0x1201 - + SPECULAR = 0x1202 - + SHININESS = 0x1601 - + EMISSION = 0x1600 - + POSITION = 0x1203 - + SPOT_DIRECTION = 0x1204 - + AMBIENT_AND_DIFFUSE = 0x1602 - + COLOR_INDEXES = 0x1603 - + LIGHT_MODEL_TWO_SIDE = 0x0B52 - + LIGHT_MODEL_LOCAL_VIEWER = 0x0B51 - + LIGHT_MODEL_AMBIENT = 0x0B53 - + FRONT_AND_BACK = 0x0408 - + SHADE_MODEL = 0x0B54 - + FLAT = 0x1D00 - + SMOOTH = 0x1D01 - + COLOR_MATERIAL = 0x0B57 - + COLOR_MATERIAL_FACE = 0x0B55 - + COLOR_MATERIAL_PARAMETER = 0x0B56 - + NORMALIZE = 0x0BA1 - + CLIP_PLANE0 = 0x3000 - + CLIP_PLANE1 = 0x3001 - + CLIP_PLANE2 = 0x3002 - + CLIP_PLANE3 = 0x3003 - + CLIP_PLANE4 = 0x3004 - + CLIP_PLANE5 = 0x3005 - + ACCUM_RED_BITS = 0x0D58 - + ACCUM_GREEN_BITS = 0x0D59 - + ACCUM_BLUE_BITS = 0x0D5A - + ACCUM_ALPHA_BITS = 0x0D5B - + ACCUM_CLEAR_VALUE = 0x0B80 - + ACCUM = 0x0100 - + ADD = 0x0104 - + LOAD = 0x0101 - + MULT = 0x0103 - + RETURN = 0x0102 - + ALPHA_TEST = 0x0BC0 - + ALPHA_TEST_REF = 0x0BC2 - + ALPHA_TEST_FUNC = 0x0BC1 - + BLEND = 0x0BE2 - + BLEND_SRC = 0x0BE1 - + BLEND_DST = 0x0BE0 - + ZERO = 0x0 - + ONE = 0x1 - + SRC_COLOR = 0x0300 - + ONE_MINUS_SRC_COLOR = 0x0301 - + SRC_ALPHA = 0x0302 - + ONE_MINUS_SRC_ALPHA = 0x0303 - + DST_ALPHA = 0x0304 - + ONE_MINUS_DST_ALPHA = 0x0305 - + DST_COLOR = 0x0306 - + ONE_MINUS_DST_COLOR = 0x0307 - + SRC_ALPHA_SATURATE = 0x0308 - + FEEDBACK = 0x1C01 - + RENDER = 0x1C00 - + SELECT = 0x1C02 - + _2D = 0x0600 - + _3D = 0x0601 - + _3D_COLOR = 0x0602 - + _3D_COLOR_TEXTURE = 0x0603 - + _4D_COLOR_TEXTURE = 0x0604 - + POINT_TOKEN = 0x0701 - + LINE_TOKEN = 0x0702 - + LINE_RESET_TOKEN = 0x0707 - + POLYGON_TOKEN = 0x0703 - + BITMAP_TOKEN = 0x0704 - + DRAW_PIXEL_TOKEN = 0x0705 - + COPY_PIXEL_TOKEN = 0x0706 - + PASS_THROUGH_TOKEN = 0x0700 - + FEEDBACK_BUFFER_POINTER = 0x0DF0 - + FEEDBACK_BUFFER_SIZE = 0x0DF1 - + FEEDBACK_BUFFER_TYPE = 0x0DF2 - + SELECTION_BUFFER_POINTER = 0x0DF3 - + SELECTION_BUFFER_SIZE = 0x0DF4 - + FOG = 0x0B60 - + FOG_MODE = 0x0B65 - + FOG_DENSITY = 0x0B62 - + FOG_COLOR = 0x0B66 - + FOG_INDEX = 0x0B61 - + FOG_START = 0x0B63 - + FOG_END = 0x0B64 - + LINEAR = 0x2601 - + EXP = 0x0800 - + EXP2 = 0x0801 - + LOGIC_OP = 0x0BF1 - + INDEX_LOGIC_OP = 0x0BF1 - + COLOR_LOGIC_OP = 0x0BF2 - + LOGIC_OP_MODE = 0x0BF0 - + CLEAR = 0x1500 - + SET = 0x150F - + COPY = 0x1503 - + COPY_INVERTED = 0x150C - + NOOP = 0x1505 - + INVERT = 0x150A - + AND = 0x1501 - + NAND = 0x150E - + OR = 0x1507 - + NOR = 0x1508 - + XOR = 0x1506 - + EQUIV = 0x1509 - + AND_REVERSE = 0x1502 - + AND_INVERTED = 0x1504 - + OR_REVERSE = 0x150B - + OR_INVERTED = 0x150D - + STENCIL_BITS = 0x0D57 - + STENCIL_TEST = 0x0B90 - + STENCIL_CLEAR_VALUE = 0x0B91 - + STENCIL_FUNC = 0x0B92 - + STENCIL_VALUE_MASK = 0x0B93 - + STENCIL_FAIL = 0x0B94 - + STENCIL_PASS_DEPTH_FAIL = 0x0B95 - + STENCIL_PASS_DEPTH_PASS = 0x0B96 - + STENCIL_REF = 0x0B97 - + STENCIL_WRITEMASK = 0x0B98 - + STENCIL_INDEX = 0x1901 - + KEEP = 0x1E00 - + REPLACE = 0x1E01 - + INCR = 0x1E02 - + DECR = 0x1E03 - + NONE = 0x0 - + LEFT = 0x0406 - + RIGHT = 0x0407 - + FRONT_LEFT = 0x0400 - + FRONT_RIGHT = 0x0401 - + BACK_LEFT = 0x0402 - + BACK_RIGHT = 0x0403 - + AUX0 = 0x0409 - + AUX1 = 0x040A - + AUX2 = 0x040B - + AUX3 = 0x040C - + COLOR_INDEX = 0x1900 - + RED = 0x1903 - + GREEN = 0x1904 - + BLUE = 0x1905 - + ALPHA = 0x1906 - + LUMINANCE = 0x1909 - + LUMINANCE_ALPHA = 0x190A - + ALPHA_BITS = 0x0D55 - + RED_BITS = 0x0D52 - + GREEN_BITS = 0x0D53 - + BLUE_BITS = 0x0D54 - + INDEX_BITS = 0x0D51 - + SUBPIXEL_BITS = 0x0D50 - + AUX_BUFFERS = 0x0C00 - + READ_BUFFER = 0x0C02 - + DRAW_BUFFER = 0x0C01 - + DOUBLEBUFFER = 0x0C32 - + STEREO = 0x0C33 - + BITMAP = 0x1A00 - + COLOR = 0x1800 - + DEPTH = 0x1801 - + STENCIL = 0x1802 - + DITHER = 0x0BD0 - + RGB = 0x1907 - + RGBA = 0x1908 - + MAX_LIST_NESTING = 0x0B31 - + MAX_EVAL_ORDER = 0x0D30 - + MAX_LIGHTS = 0x0D31 - + MAX_CLIP_PLANES = 0x0D32 - + MAX_TEXTURE_SIZE = 0x0D33 - + MAX_PIXEL_MAP_TABLE = 0x0D34 - + MAX_ATTRIB_STACK_DEPTH = 0x0D35 - + MAX_MODELVIEW_STACK_DEPTH = 0x0D36 - + MAX_NAME_STACK_DEPTH = 0x0D37 - + MAX_PROJECTION_STACK_DEPTH = 0x0D38 - + MAX_TEXTURE_STACK_DEPTH = 0x0D39 - + MAX_VIEWPORT_DIMS = 0x0D3A - + MAX_CLIENT_ATTRIB_STACK_DEPTH = 0x0D3B - + ATTRIB_STACK_DEPTH = 0x0BB0 - + CLIENT_ATTRIB_STACK_DEPTH = 0x0BB1 - + COLOR_CLEAR_VALUE = 0x0C22 - + COLOR_WRITEMASK = 0x0C23 - + CURRENT_INDEX = 0x0B01 - + CURRENT_COLOR = 0x0B00 - + CURRENT_NORMAL = 0x0B02 - + CURRENT_RASTER_COLOR = 0x0B04 - + CURRENT_RASTER_DISTANCE = 0x0B09 - + CURRENT_RASTER_INDEX = 0x0B05 - + CURRENT_RASTER_POSITION = 0x0B07 - + CURRENT_RASTER_TEXTURE_COORDS = 0x0B06 - + CURRENT_RASTER_POSITION_VALID = 0x0B08 - + CURRENT_TEXTURE_COORDS = 0x0B03 - + INDEX_CLEAR_VALUE = 0x0C20 - + INDEX_MODE = 0x0C30 - + INDEX_WRITEMASK = 0x0C21 - + MODELVIEW_MATRIX = 0x0BA6 - + MODELVIEW_STACK_DEPTH = 0x0BA3 - + NAME_STACK_DEPTH = 0x0D70 - + PROJECTION_MATRIX = 0x0BA7 - + PROJECTION_STACK_DEPTH = 0x0BA4 - + RENDER_MODE = 0x0C40 - + RGBA_MODE = 0x0C31 - + TEXTURE_MATRIX = 0x0BA8 - + TEXTURE_STACK_DEPTH = 0x0BA5 - + VIEWPORT = 0x0BA2 - + AUTO_NORMAL = 0x0D80 - + MAP1_COLOR_4 = 0x0D90 - + MAP1_INDEX = 0x0D91 - + MAP1_NORMAL = 0x0D92 - + MAP1_TEXTURE_COORD_1 = 0x0D93 - + MAP1_TEXTURE_COORD_2 = 0x0D94 - + MAP1_TEXTURE_COORD_3 = 0x0D95 - + MAP1_TEXTURE_COORD_4 = 0x0D96 - + MAP1_VERTEX_3 = 0x0D97 - + MAP1_VERTEX_4 = 0x0D98 - + MAP2_COLOR_4 = 0x0DB0 - + MAP2_INDEX = 0x0DB1 - + MAP2_NORMAL = 0x0DB2 - + MAP2_TEXTURE_COORD_1 = 0x0DB3 - + MAP2_TEXTURE_COORD_2 = 0x0DB4 - + MAP2_TEXTURE_COORD_3 = 0x0DB5 - + MAP2_TEXTURE_COORD_4 = 0x0DB6 - + MAP2_VERTEX_3 = 0x0DB7 - + MAP2_VERTEX_4 = 0x0DB8 - + MAP1_GRID_DOMAIN = 0x0DD0 - + MAP1_GRID_SEGMENTS = 0x0DD1 - + MAP2_GRID_DOMAIN = 0x0DD2 - + MAP2_GRID_SEGMENTS = 0x0DD3 - + COEFF = 0x0A00 - + ORDER = 0x0A01 - + DOMAIN = 0x0A02 - + PERSPECTIVE_CORRECTION_HINT = 0x0C50 - + POINT_SMOOTH_HINT = 0x0C51 - + LINE_SMOOTH_HINT = 0x0C52 - + POLYGON_SMOOTH_HINT = 0x0C53 - + FOG_HINT = 0x0C54 - + DONT_CARE = 0x1100 - + FASTEST = 0x1101 - + NICEST = 0x1102 - + SCISSOR_BOX = 0x0C10 - + SCISSOR_TEST = 0x0C11 - + MAP_COLOR = 0x0D10 - + MAP_STENCIL = 0x0D11 - + INDEX_SHIFT = 0x0D12 - + INDEX_OFFSET = 0x0D13 - + RED_SCALE = 0x0D14 - + RED_BIAS = 0x0D15 - + GREEN_SCALE = 0x0D18 - + GREEN_BIAS = 0x0D19 - + BLUE_SCALE = 0x0D1A - + BLUE_BIAS = 0x0D1B - + ALPHA_SCALE = 0x0D1C - + ALPHA_BIAS = 0x0D1D - + DEPTH_SCALE = 0x0D1E - + DEPTH_BIAS = 0x0D1F - + PIXEL_MAP_S_TO_S_SIZE = 0x0CB1 - + PIXEL_MAP_I_TO_I_SIZE = 0x0CB0 - + PIXEL_MAP_I_TO_R_SIZE = 0x0CB2 - + PIXEL_MAP_I_TO_G_SIZE = 0x0CB3 - + PIXEL_MAP_I_TO_B_SIZE = 0x0CB4 - + PIXEL_MAP_I_TO_A_SIZE = 0x0CB5 - + PIXEL_MAP_R_TO_R_SIZE = 0x0CB6 - + PIXEL_MAP_G_TO_G_SIZE = 0x0CB7 - + PIXEL_MAP_B_TO_B_SIZE = 0x0CB8 - + PIXEL_MAP_A_TO_A_SIZE = 0x0CB9 - + PIXEL_MAP_S_TO_S = 0x0C71 - + PIXEL_MAP_I_TO_I = 0x0C70 - + PIXEL_MAP_I_TO_R = 0x0C72 - + PIXEL_MAP_I_TO_G = 0x0C73 - + PIXEL_MAP_I_TO_B = 0x0C74 - + PIXEL_MAP_I_TO_A = 0x0C75 - + PIXEL_MAP_R_TO_R = 0x0C76 - + PIXEL_MAP_G_TO_G = 0x0C77 - + PIXEL_MAP_B_TO_B = 0x0C78 - + PIXEL_MAP_A_TO_A = 0x0C79 - + PACK_ALIGNMENT = 0x0D05 - + PACK_LSB_FIRST = 0x0D01 - + PACK_ROW_LENGTH = 0x0D02 - + PACK_SKIP_PIXELS = 0x0D04 - + PACK_SKIP_ROWS = 0x0D03 - + PACK_SWAP_BYTES = 0x0D00 - + UNPACK_ALIGNMENT = 0x0CF5 - + UNPACK_LSB_FIRST = 0x0CF1 - + UNPACK_ROW_LENGTH = 0x0CF2 - + UNPACK_SKIP_PIXELS = 0x0CF4 - + UNPACK_SKIP_ROWS = 0x0CF3 - + UNPACK_SWAP_BYTES = 0x0CF0 - + ZOOM_X = 0x0D16 - + ZOOM_Y = 0x0D17 - + TEXTURE_ENV = 0x2300 - + TEXTURE_ENV_MODE = 0x2200 - + TEXTURE_1D = 0x0DE0 - + TEXTURE_2D = 0x0DE1 - + TEXTURE_WRAP_S = 0x2802 - + TEXTURE_WRAP_T = 0x2803 - + TEXTURE_MAG_FILTER = 0x2800 - + TEXTURE_MIN_FILTER = 0x2801 - + TEXTURE_ENV_COLOR = 0x2201 - + TEXTURE_GEN_S = 0x0C60 - + TEXTURE_GEN_T = 0x0C61 - + TEXTURE_GEN_R = 0x0C62 - + TEXTURE_GEN_Q = 0x0C63 - + TEXTURE_GEN_MODE = 0x2500 - + TEXTURE_BORDER_COLOR = 0x1004 - + TEXTURE_WIDTH = 0x1000 - + TEXTURE_HEIGHT = 0x1001 - + TEXTURE_BORDER = 0x1005 - + TEXTURE_COMPONENTS = 0x1003 - + TEXTURE_RED_SIZE = 0x805C - + TEXTURE_GREEN_SIZE = 0x805D - + TEXTURE_BLUE_SIZE = 0x805E - + TEXTURE_ALPHA_SIZE = 0x805F - + TEXTURE_LUMINANCE_SIZE = 0x8060 - + TEXTURE_INTENSITY_SIZE = 0x8061 - + NEAREST_MIPMAP_NEAREST = 0x2700 - + NEAREST_MIPMAP_LINEAR = 0x2702 - + LINEAR_MIPMAP_NEAREST = 0x2701 - + LINEAR_MIPMAP_LINEAR = 0x2703 - + OBJECT_LINEAR = 0x2401 - + OBJECT_PLANE = 0x2501 - + EYE_LINEAR = 0x2400 - + EYE_PLANE = 0x2502 - + SPHERE_MAP = 0x2402 - + DECAL = 0x2101 - + MODULATE = 0x2100 - + NEAREST = 0x2600 - + REPEAT = 0x2901 - + CLAMP = 0x2900 - + S = 0x2000 - + T = 0x2001 - + R = 0x2002 - + Q = 0x2003 - + VENDOR = 0x1F00 - + RENDERER = 0x1F01 - + VERSION = 0x1F02 - + EXTENSIONS = 0x1F03 - + NO_ERROR = 0x0 - + INVALID_ENUM = 0x0500 - + INVALID_VALUE = 0x0501 - + INVALID_OPERATION = 0x0502 - + STACK_OVERFLOW = 0x0503 - + STACK_UNDERFLOW = 0x0504 - + OUT_OF_MEMORY = 0x0505 - + CURRENT_BIT = 0x00000001 - + POINT_BIT = 0x00000002 - + LINE_BIT = 0x00000004 - + POLYGON_BIT = 0x00000008 - + POLYGON_STIPPLE_BIT = 0x00000010 - + PIXEL_MODE_BIT = 0x00000020 - + LIGHTING_BIT = 0x00000040 - + FOG_BIT = 0x00000080 - + DEPTH_BUFFER_BIT = 0x00000100 - + ACCUM_BUFFER_BIT = 0x00000200 - + STENCIL_BUFFER_BIT = 0x00000400 - + VIEWPORT_BIT = 0x00000800 - + TRANSFORM_BIT = 0x00001000 - + ENABLE_BIT = 0x00002000 - + COLOR_BUFFER_BIT = 0x00004000 - + HINT_BIT = 0x00008000 - + EVAL_BIT = 0x00010000 - + LIST_BIT = 0x00020000 - + TEXTURE_BIT = 0x00040000 - + SCISSOR_BIT = 0x00080000 - + ALL_ATTRIB_BITS = 0x000FFFFF - + PROXY_TEXTURE_1D = 0x8063 - + PROXY_TEXTURE_2D = 0x8064 - + TEXTURE_PRIORITY = 0x8066 - + TEXTURE_RESIDENT = 0x8067 - + TEXTURE_BINDING_1D = 0x8068 - + TEXTURE_BINDING_2D = 0x8069 - + TEXTURE_INTERNAL_FORMAT = 0x1003 - + ALPHA4 = 0x803B - + ALPHA8 = 0x803C - + ALPHA12 = 0x803D - + ALPHA16 = 0x803E - + LUMINANCE4 = 0x803F - + LUMINANCE8 = 0x8040 - + LUMINANCE12 = 0x8041 - + LUMINANCE16 = 0x8042 - + LUMINANCE4_ALPHA4 = 0x8043 - + LUMINANCE6_ALPHA2 = 0x8044 - + LUMINANCE8_ALPHA8 = 0x8045 - + LUMINANCE12_ALPHA4 = 0x8046 - + LUMINANCE12_ALPHA12 = 0x8047 - + LUMINANCE16_ALPHA16 = 0x8048 - + INTENSITY = 0x8049 - + INTENSITY4 = 0x804A - + INTENSITY8 = 0x804B - + INTENSITY12 = 0x804C - + INTENSITY16 = 0x804D - + R3_G3_B2 = 0x2A10 - + RGB4 = 0x804F - + RGB5 = 0x8050 - + RGB8 = 0x8051 - + RGB10 = 0x8052 - + RGB12 = 0x8053 - + RGB16 = 0x8054 - + RGBA2 = 0x8055 - + RGBA4 = 0x8056 - + RGB5_A1 = 0x8057 - + RGBA8 = 0x8058 - + RGB10_A2 = 0x8059 - + RGBA12 = 0x805A - + RGBA16 = 0x805B - + CLIENT_PIXEL_STORE_BIT = 0x00000001 - + CLIENT_VERTEX_ARRAY_BIT = 0x00000002 - + ALL_CLIENT_ATTRIB_BITS = 0xFFFFFFFF - + CLIENT_ALL_ATTRIB_BITS = 0xFFFFFFFF - + RESCALE_NORMAL = 0x803A - + CLAMP_TO_EDGE = 0x812F - + MAX_ELEMENTS_VERTICES = 0x80E8 - + MAX_ELEMENTS_INDICES = 0x80E9 - + BGR = 0x80E0 - + BGRA = 0x80E1 - + UNSIGNED_BYTE_3_3_2 = 0x8032 - + UNSIGNED_BYTE_2_3_3_REV = 0x8362 - + UNSIGNED_SHORT_5_6_5 = 0x8363 - + UNSIGNED_SHORT_5_6_5_REV = 0x8364 - + UNSIGNED_SHORT_4_4_4_4 = 0x8033 - + UNSIGNED_SHORT_4_4_4_4_REV = 0x8365 - + UNSIGNED_SHORT_5_5_5_1 = 0x8034 - + UNSIGNED_SHORT_1_5_5_5_REV = 0x8366 - + UNSIGNED_INT_8_8_8_8 = 0x8035 - + UNSIGNED_INT_8_8_8_8_REV = 0x8367 - + UNSIGNED_INT_10_10_10_2 = 0x8036 - + UNSIGNED_INT_2_10_10_10_REV = 0x8368 - + LIGHT_MODEL_COLOR_CONTROL = 0x81F8 - + SINGLE_COLOR = 0x81F9 - + SEPARATE_SPECULAR_COLOR = 0x81FA - + TEXTURE_MIN_LOD = 0x813A - + TEXTURE_MAX_LOD = 0x813B - + TEXTURE_BASE_LEVEL = 0x813C - + TEXTURE_MAX_LEVEL = 0x813D - + SMOOTH_POINT_SIZE_RANGE = 0x0B12 - + SMOOTH_POINT_SIZE_GRANULARITY = 0x0B13 - + SMOOTH_LINE_WIDTH_RANGE = 0x0B22 - + SMOOTH_LINE_WIDTH_GRANULARITY = 0x0B23 - + ALIASED_POINT_SIZE_RANGE = 0x846D - + ALIASED_LINE_WIDTH_RANGE = 0x846E - + PACK_SKIP_IMAGES = 0x806B - + PACK_IMAGE_HEIGHT = 0x806C - + UNPACK_SKIP_IMAGES = 0x806D - + UNPACK_IMAGE_HEIGHT = 0x806E - + TEXTURE_3D = 0x806F - + PROXY_TEXTURE_3D = 0x8070 - + TEXTURE_DEPTH = 0x8071 - + TEXTURE_WRAP_R = 0x8072 - + MAX_3D_TEXTURE_SIZE = 0x8073 - + TEXTURE_BINDING_3D = 0x806A - + CONSTANT_COLOR = 0x8001 - + ONE_MINUS_CONSTANT_COLOR = 0x8002 - + CONSTANT_ALPHA = 0x8003 - + ONE_MINUS_CONSTANT_ALPHA = 0x8004 - + COLOR_TABLE = 0x80D0 - + POST_CONVOLUTION_COLOR_TABLE = 0x80D1 - + POST_COLOR_MATRIX_COLOR_TABLE = 0x80D2 - + PROXY_COLOR_TABLE = 0x80D3 - + PROXY_POST_CONVOLUTION_COLOR_TABLE = 0x80D4 - + PROXY_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D5 - + COLOR_TABLE_SCALE = 0x80D6 - + COLOR_TABLE_BIAS = 0x80D7 - + COLOR_TABLE_FORMAT = 0x80D8 - + COLOR_TABLE_WIDTH = 0x80D9 - + COLOR_TABLE_RED_SIZE = 0x80DA - + COLOR_TABLE_GREEN_SIZE = 0x80DB - + COLOR_TABLE_BLUE_SIZE = 0x80DC - + COLOR_TABLE_ALPHA_SIZE = 0x80DD - + COLOR_TABLE_LUMINANCE_SIZE = 0x80DE - + COLOR_TABLE_INTENSITY_SIZE = 0x80DF - + CONVOLUTION_1D = 0x8010 - + CONVOLUTION_2D = 0x8011 - + SEPARABLE_2D = 0x8012 - + CONVOLUTION_BORDER_MODE = 0x8013 - + CONVOLUTION_FILTER_SCALE = 0x8014 - + CONVOLUTION_FILTER_BIAS = 0x8015 - + REDUCE = 0x8016 - + CONVOLUTION_FORMAT = 0x8017 - + CONVOLUTION_WIDTH = 0x8018 - + CONVOLUTION_HEIGHT = 0x8019 - + MAX_CONVOLUTION_WIDTH = 0x801A - + MAX_CONVOLUTION_HEIGHT = 0x801B - + POST_CONVOLUTION_RED_SCALE = 0x801C - + POST_CONVOLUTION_GREEN_SCALE = 0x801D - + POST_CONVOLUTION_BLUE_SCALE = 0x801E - + POST_CONVOLUTION_ALPHA_SCALE = 0x801F - + POST_CONVOLUTION_RED_BIAS = 0x8020 - + POST_CONVOLUTION_GREEN_BIAS = 0x8021 - + POST_CONVOLUTION_BLUE_BIAS = 0x8022 - + POST_CONVOLUTION_ALPHA_BIAS = 0x8023 - + CONSTANT_BORDER = 0x8151 - + REPLICATE_BORDER = 0x8153 - + CONVOLUTION_BORDER_COLOR = 0x8154 - + COLOR_MATRIX = 0x80B1 - + COLOR_MATRIX_STACK_DEPTH = 0x80B2 - + MAX_COLOR_MATRIX_STACK_DEPTH = 0x80B3 - + POST_COLOR_MATRIX_RED_SCALE = 0x80B4 - + POST_COLOR_MATRIX_GREEN_SCALE = 0x80B5 - + POST_COLOR_MATRIX_BLUE_SCALE = 0x80B6 - + POST_COLOR_MATRIX_ALPHA_SCALE = 0x80B7 - + POST_COLOR_MATRIX_RED_BIAS = 0x80B8 - + POST_COLOR_MATRIX_GREEN_BIAS = 0x80B9 - + POST_COLOR_MATRIX_BLUE_BIAS = 0x80BA - + POST_COLOR_MATRIX_ALPHA_BIAS = 0x80BB - + HISTOGRAM = 0x8024 - + PROXY_HISTOGRAM = 0x8025 - + HISTOGRAM_WIDTH = 0x8026 - + HISTOGRAM_FORMAT = 0x8027 - + HISTOGRAM_RED_SIZE = 0x8028 - + HISTOGRAM_GREEN_SIZE = 0x8029 - + HISTOGRAM_BLUE_SIZE = 0x802A - + HISTOGRAM_ALPHA_SIZE = 0x802B - + HISTOGRAM_LUMINANCE_SIZE = 0x802C - + HISTOGRAM_SINK = 0x802D - + MINMAX = 0x802E - + MINMAX_FORMAT = 0x802F - + MINMAX_SINK = 0x8030 - + TABLE_TOO_LARGE = 0x8031 - + BLEND_EQUATION = 0x8009 - + MIN = 0x8007 - + MAX = 0x8008 - + FUNC_ADD = 0x8006 - + FUNC_SUBTRACT = 0x800A - + FUNC_REVERSE_SUBTRACT = 0x800B - + BLEND_COLOR = 0x8005 - + TEXTURE0 = 0x84C0 - + TEXTURE1 = 0x84C1 - + TEXTURE2 = 0x84C2 - + TEXTURE3 = 0x84C3 - + TEXTURE4 = 0x84C4 - + TEXTURE5 = 0x84C5 - + TEXTURE6 = 0x84C6 - + TEXTURE7 = 0x84C7 - + TEXTURE8 = 0x84C8 - + TEXTURE9 = 0x84C9 - + TEXTURE10 = 0x84CA - + TEXTURE11 = 0x84CB - + TEXTURE12 = 0x84CC - + TEXTURE13 = 0x84CD - + TEXTURE14 = 0x84CE - + TEXTURE15 = 0x84CF - + TEXTURE16 = 0x84D0 - + TEXTURE17 = 0x84D1 - + TEXTURE18 = 0x84D2 - + TEXTURE19 = 0x84D3 - + TEXTURE20 = 0x84D4 - + TEXTURE21 = 0x84D5 - + TEXTURE22 = 0x84D6 - + TEXTURE23 = 0x84D7 - + TEXTURE24 = 0x84D8 - + TEXTURE25 = 0x84D9 - + TEXTURE26 = 0x84DA - + TEXTURE27 = 0x84DB - + TEXTURE28 = 0x84DC - + TEXTURE29 = 0x84DD - + TEXTURE30 = 0x84DE - + TEXTURE31 = 0x84DF - + ACTIVE_TEXTURE = 0x84E0 - + CLIENT_ACTIVE_TEXTURE = 0x84E1 - + MAX_TEXTURE_UNITS = 0x84E2 - + NORMAL_MAP = 0x8511 - + REFLECTION_MAP = 0x8512 - + TEXTURE_CUBE_MAP = 0x8513 - + TEXTURE_BINDING_CUBE_MAP = 0x8514 - + TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515 - + TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516 - + TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517 - + TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518 - + TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519 - + TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A - + PROXY_TEXTURE_CUBE_MAP = 0x851B - + MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C - + COMPRESSED_ALPHA = 0x84E9 - + COMPRESSED_LUMINANCE = 0x84EA - + COMPRESSED_LUMINANCE_ALPHA = 0x84EB - + COMPRESSED_INTENSITY = 0x84EC - + COMPRESSED_RGB = 0x84ED - + COMPRESSED_RGBA = 0x84EE - + TEXTURE_COMPRESSION_HINT = 0x84EF - + TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0 - + TEXTURE_COMPRESSED = 0x86A1 - + NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2 - + COMPRESSED_TEXTURE_FORMATS = 0x86A3 - + MULTISAMPLE = 0x809D - + SAMPLE_ALPHA_TO_COVERAGE = 0x809E - + SAMPLE_ALPHA_TO_ONE = 0x809F - + SAMPLE_COVERAGE = 0x80A0 - + SAMPLE_BUFFERS = 0x80A8 - + SAMPLES = 0x80A9 - + SAMPLE_COVERAGE_VALUE = 0x80AA - + SAMPLE_COVERAGE_INVERT = 0x80AB - + MULTISAMPLE_BIT = 0x20000000 - + TRANSPOSE_MODELVIEW_MATRIX = 0x84E3 - + TRANSPOSE_PROJECTION_MATRIX = 0x84E4 - + TRANSPOSE_TEXTURE_MATRIX = 0x84E5 - + TRANSPOSE_COLOR_MATRIX = 0x84E6 - + COMBINE = 0x8570 - + COMBINE_RGB = 0x8571 - + COMBINE_ALPHA = 0x8572 - + SOURCE0_RGB = 0x8580 - + SOURCE1_RGB = 0x8581 - + SOURCE2_RGB = 0x8582 - + SOURCE0_ALPHA = 0x8588 - + SOURCE1_ALPHA = 0x8589 - + SOURCE2_ALPHA = 0x858A - + OPERAND0_RGB = 0x8590 - + OPERAND1_RGB = 0x8591 - + OPERAND2_RGB = 0x8592 - + OPERAND0_ALPHA = 0x8598 - + OPERAND1_ALPHA = 0x8599 - + OPERAND2_ALPHA = 0x859A - + RGB_SCALE = 0x8573 - + ADD_SIGNED = 0x8574 - + INTERPOLATE = 0x8575 - + SUBTRACT = 0x84E7 - + CONSTANT = 0x8576 - + PRIMARY_COLOR = 0x8577 - + PREVIOUS = 0x8578 - + DOT3_RGB = 0x86AE - + DOT3_RGBA = 0x86AF - + CLAMP_TO_BORDER = 0x812D - + ARB_MULTITEXTURE = 1 - + TEXTURE0_ARB = 0x84C0 - + TEXTURE1_ARB = 0x84C1 - + TEXTURE2_ARB = 0x84C2 - + TEXTURE3_ARB = 0x84C3 - + TEXTURE4_ARB = 0x84C4 - + TEXTURE5_ARB = 0x84C5 - + TEXTURE6_ARB = 0x84C6 - + TEXTURE7_ARB = 0x84C7 - + TEXTURE8_ARB = 0x84C8 - + TEXTURE9_ARB = 0x84C9 - + TEXTURE10_ARB = 0x84CA - + TEXTURE11_ARB = 0x84CB - + TEXTURE12_ARB = 0x84CC - + TEXTURE13_ARB = 0x84CD - + TEXTURE14_ARB = 0x84CE - + TEXTURE15_ARB = 0x84CF - + TEXTURE16_ARB = 0x84D0 - + TEXTURE17_ARB = 0x84D1 - + TEXTURE18_ARB = 0x84D2 - + TEXTURE19_ARB = 0x84D3 - + TEXTURE20_ARB = 0x84D4 - + TEXTURE21_ARB = 0x84D5 - + TEXTURE22_ARB = 0x84D6 - + TEXTURE23_ARB = 0x84D7 - + TEXTURE24_ARB = 0x84D8 - + TEXTURE25_ARB = 0x84D9 - + TEXTURE26_ARB = 0x84DA - + TEXTURE27_ARB = 0x84DB - + TEXTURE28_ARB = 0x84DC - + TEXTURE29_ARB = 0x84DD - + TEXTURE30_ARB = 0x84DE - + TEXTURE31_ARB = 0x84DF - + ACTIVE_TEXTURE_ARB = 0x84E0 - + CLIENT_ACTIVE_TEXTURE_ARB = 0x84E1 - + MAX_TEXTURE_UNITS_ARB = 0x84E2 - + MESA_SHADER_DEBUG = 1 - + DEBUG_OBJECT_MESA = 0x8759 - + DEBUG_PRINT_MESA = 0x875A - + DEBUG_ASSERT_MESA = 0x875B - + MESA_PACKED_DEPTH_STENCIL = 1 - + DEPTH_STENCIL_MESA = 0x8750 - + UNSIGNED_INT_24_8_MESA = 0x8751 - + UNSIGNED_INT_8_24_REV_MESA = 0x8752 - + UNSIGNED_SHORT_15_1_MESA = 0x8753 - + UNSIGNED_SHORT_1_15_REV_MESA = 0x8754 - + MESA_PROGRAM_DEBUG = 1 - + FRAGMENT_PROGRAM_POSITION_MESA = 0x8bb0 - + FRAGMENT_PROGRAM_CALLBACK_MESA = 0x8bb1 - + FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA = 0x8bb2 - + FRAGMENT_PROGRAM_CALLBACK_DATA_MESA = 0x8bb3 - + VERTEX_PROGRAM_POSITION_MESA = 0x8bb4 - + VERTEX_PROGRAM_CALLBACK_MESA = 0x8bb5 - + VERTEX_PROGRAM_CALLBACK_FUNC_MESA = 0x8bb6 - + VERTEX_PROGRAM_CALLBACK_DATA_MESA = 0x8bb7 - + MESA_TEXTURE_ARRAY = 1 - + ATI_BLEND_EQUATION_SEPARATE = 1 - + ALPHA_BLEND_EQUATION_ATI = 0x883D - + OES_EGL_IMAGE = 1 - + # Miscellaneous - # + # @method clear_index(c) - # @param [Float] c - # @return [nil] + # @param [Float] c + # @return [nil] # @scope class attach_function :clear_index, :glClearIndex, [:float], :void - # (Not documented) - # + # @method clear_color(red, green, blue, alpha) - # @param [Float] red - # @param [Float] green - # @param [Float] blue - # @param [Float] alpha - # @return [nil] + # @param [Float] red + # @param [Float] green + # @param [Float] blue + # @param [Float] alpha + # @return [nil] # @scope class attach_function :clear_color, :glClearColor, [:float, :float, :float, :float], :void - # (Not documented) - # + # @method clear(mask) - # @param [Integer] mask - # @return [nil] + # @param [Integer] mask + # @return [nil] # @scope class attach_function :clear, :glClear, [:uint], :void - # (Not documented) - # + # @method index_mask(mask) - # @param [Integer] mask - # @return [nil] + # @param [Integer] mask + # @return [nil] # @scope class attach_function :index_mask, :glIndexMask, [:uint], :void - # (Not documented) - # + # @method color_mask(red, green, blue, alpha) - # @param [Integer] red - # @param [Integer] green - # @param [Integer] blue - # @param [Integer] alpha - # @return [nil] + # @param [Integer] red + # @param [Integer] green + # @param [Integer] blue + # @param [Integer] alpha + # @return [nil] # @scope class attach_function :color_mask, :glColorMask, [:uchar, :uchar, :uchar, :uchar], :void - # (Not documented) - # + # @method alpha_func(func, ref) - # @param [Integer] func - # @param [Float] ref - # @return [nil] + # @param [Integer] func + # @param [Float] ref + # @return [nil] # @scope class attach_function :alpha_func, :glAlphaFunc, [:uint, :float], :void - # (Not documented) - # + # @method blend_func(sfactor, dfactor) - # @param [Integer] sfactor - # @param [Integer] dfactor - # @return [nil] + # @param [Integer] sfactor + # @param [Integer] dfactor + # @return [nil] # @scope class attach_function :blend_func, :glBlendFunc, [:uint, :uint], :void - # (Not documented) - # + # @method logic_op(opcode) - # @param [Integer] opcode - # @return [nil] + # @param [Integer] opcode + # @return [nil] # @scope class attach_function :logic_op, :glLogicOp, [:uint], :void - # (Not documented) - # + # @method cull_face(mode) - # @param [Integer] mode - # @return [nil] + # @param [Integer] mode + # @return [nil] # @scope class attach_function :cull_face, :glCullFace, [:uint], :void - # (Not documented) - # + # @method front_face(mode) - # @param [Integer] mode - # @return [nil] + # @param [Integer] mode + # @return [nil] # @scope class attach_function :front_face, :glFrontFace, [:uint], :void - # (Not documented) - # + # @method point_size(size) - # @param [Float] size - # @return [nil] + # @param [Float] size + # @return [nil] # @scope class attach_function :point_size, :glPointSize, [:float], :void - # (Not documented) - # + # @method line_width(width) - # @param [Float] width - # @return [nil] + # @param [Float] width + # @return [nil] # @scope class attach_function :line_width, :glLineWidth, [:float], :void - # (Not documented) - # + # @method line_stipple(factor, pattern) - # @param [Integer] factor - # @param [Integer] pattern - # @return [nil] + # @param [Integer] factor + # @param [Integer] pattern + # @return [nil] # @scope class attach_function :line_stipple, :glLineStipple, [:int, :ushort], :void - # (Not documented) - # + # @method polygon_mode(face, mode) - # @param [Integer] face - # @param [Integer] mode - # @return [nil] + # @param [Integer] face + # @param [Integer] mode + # @return [nil] # @scope class attach_function :polygon_mode, :glPolygonMode, [:uint, :uint], :void - # (Not documented) - # + # @method polygon_offset(factor, units) - # @param [Float] factor - # @param [Float] units - # @return [nil] + # @param [Float] factor + # @param [Float] units + # @return [nil] # @scope class attach_function :polygon_offset, :glPolygonOffset, [:float, :float], :void - # (Not documented) - # + # @method polygon_stipple(mask) - # @param [FFI::Pointer(*GLubyte)] mask - # @return [nil] + # @param [FFI::Pointer(*GLubyte)] mask + # @return [nil] # @scope class attach_function :polygon_stipple, :glPolygonStipple, [:pointer], :void - # (Not documented) - # + # @method get_polygon_stipple(mask) - # @param [FFI::Pointer(*GLubyte)] mask - # @return [nil] + # @param [FFI::Pointer(*GLubyte)] mask + # @return [nil] # @scope class attach_function :get_polygon_stipple, :glGetPolygonStipple, [:pointer], :void - # (Not documented) - # + # @method edge_flag(flag) - # @param [Integer] flag - # @return [nil] + # @param [Integer] flag + # @return [nil] # @scope class attach_function :edge_flag, :glEdgeFlag, [:uchar], :void - # (Not documented) - # + # @method edge_flagv(flag) - # @param [FFI::Pointer(*GLboolean)] flag - # @return [nil] + # @param [FFI::Pointer(*GLboolean)] flag + # @return [nil] # @scope class attach_function :edge_flagv, :glEdgeFlagv, [:pointer], :void - # (Not documented) - # + # @method scissor(x, y, width, height) - # @param [Integer] x - # @param [Integer] y - # @param [Integer] width - # @param [Integer] height - # @return [nil] + # @param [Integer] x + # @param [Integer] y + # @param [Integer] width + # @param [Integer] height + # @return [nil] # @scope class attach_function :scissor, :glScissor, [:int, :int, :int, :int], :void - # (Not documented) - # + # @method clip_plane(plane, equation) - # @param [Integer] plane - # @param [FFI::Pointer(*GLdouble)] equation - # @return [nil] + # @param [Integer] plane + # @param [FFI::Pointer(*GLdouble)] equation + # @return [nil] # @scope class attach_function :clip_plane, :glClipPlane, [:uint, :pointer], :void - # (Not documented) - # + # @method get_clip_plane(plane, equation) - # @param [Integer] plane - # @param [FFI::Pointer(*GLdouble)] equation - # @return [nil] + # @param [Integer] plane + # @param [FFI::Pointer(*GLdouble)] equation + # @return [nil] # @scope class attach_function :get_clip_plane, :glGetClipPlane, [:uint, :pointer], :void - # (Not documented) - # + # @method draw_buffer(mode) - # @param [Integer] mode - # @return [nil] + # @param [Integer] mode + # @return [nil] # @scope class attach_function :draw_buffer, :glDrawBuffer, [:uint], :void - # (Not documented) - # + # @method read_buffer(mode) - # @param [Integer] mode - # @return [nil] + # @param [Integer] mode + # @return [nil] # @scope class attach_function :read_buffer, :glReadBuffer, [:uint], :void - # (Not documented) - # + # @method enable(cap) - # @param [Integer] cap - # @return [nil] + # @param [Integer] cap + # @return [nil] # @scope class attach_function :enable, :glEnable, [:uint], :void - # (Not documented) - # + # @method disable(cap) - # @param [Integer] cap - # @return [nil] + # @param [Integer] cap + # @return [nil] # @scope class attach_function :disable, :glDisable, [:uint], :void - # (Not documented) - # + # @method is_enabled(cap) - # @param [Integer] cap - # @return [Integer] + # @param [Integer] cap + # @return [Integer] # @scope class attach_function :is_enabled, :glIsEnabled, [:uint], :uchar - # (Not documented) - # + # @method enable_client_state(cap) - # @param [Integer] cap - # @return [nil] + # @param [Integer] cap + # @return [nil] # @scope class attach_function :enable_client_state, :glEnableClientState, [:uint], :void - # 1.1 - # + # @method disable_client_state(cap) - # @param [Integer] cap - # @return [nil] + # @param [Integer] cap + # @return [nil] # @scope class attach_function :disable_client_state, :glDisableClientState, [:uint], :void - # 1.1 - # + # @method get_booleanv(pname, params) - # @param [Integer] pname - # @param [FFI::Pointer(*GLboolean)] params - # @return [nil] + # @param [Integer] pname + # @param [FFI::Pointer(*GLboolean)] params + # @return [nil] # @scope class attach_function :get_booleanv, :glGetBooleanv, [:uint, :pointer], :void - # (Not documented) - # + # @method get_doublev(pname, params) - # @param [Integer] pname - # @param [FFI::Pointer(*GLdouble)] params - # @return [nil] + # @param [Integer] pname + # @param [FFI::Pointer(*GLdouble)] params + # @return [nil] # @scope class attach_function :get_doublev, :glGetDoublev, [:uint, :pointer], :void - # (Not documented) - # + # @method get_floatv(pname, params) - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :get_floatv, :glGetFloatv, [:uint, :pointer], :void - # (Not documented) - # + # @method get_integerv(pname, params) - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :get_integerv, :glGetIntegerv, [:uint, :pointer], :void - # (Not documented) - # + # @method push_attrib(mask) - # @param [Integer] mask - # @return [nil] + # @param [Integer] mask + # @return [nil] # @scope class attach_function :push_attrib, :glPushAttrib, [:uint], :void - # (Not documented) - # + # @method pop_attrib() - # @return [nil] + # @return [nil] # @scope class attach_function :pop_attrib, :glPopAttrib, [], :void - # (Not documented) - # + # @method push_client_attrib(mask) - # @param [Integer] mask - # @return [nil] + # @param [Integer] mask + # @return [nil] # @scope class attach_function :push_client_attrib, :glPushClientAttrib, [:uint], :void - # 1.1 - # + # @method pop_client_attrib() - # @return [nil] + # @return [nil] # @scope class attach_function :pop_client_attrib, :glPopClientAttrib, [], :void - # 1.1 - # + # @method render_mode(mode) - # @param [Integer] mode - # @return [Integer] + # @param [Integer] mode + # @return [Integer] # @scope class attach_function :render_mode, :glRenderMode, [:uint], :int - # (Not documented) - # + # @method get_error() - # @return [Integer] + # @return [Integer] # @scope class attach_function :get_error, :glGetError, [], :uint - # (Not documented) - # + # @method get_string(name) - # @param [Integer] name - # @return [FFI::Pointer(*GLubyte)] + # @param [Integer] name + # @return [FFI::Pointer(*GLubyte)] # @scope class attach_function :get_string, :glGetString, [:uint], :pointer - # (Not documented) - # + # @method finish() - # @return [nil] + # @return [nil] # @scope class attach_function :finish, :glFinish, [], :void - # (Not documented) - # + # @method flush() - # @return [nil] + # @return [nil] # @scope class attach_function :flush, :glFlush, [], :void - # (Not documented) - # + # @method hint(target, mode) - # @param [Integer] target - # @param [Integer] mode - # @return [nil] + # @param [Integer] target + # @param [Integer] mode + # @return [nil] # @scope class attach_function :hint, :glHint, [:uint, :uint], :void - # Depth Buffer - # + # @method clear_depth(depth) - # @param [Float] depth - # @return [nil] + # @param [Float] depth + # @return [nil] # @scope class attach_function :clear_depth, :glClearDepth, [:double], :void - # (Not documented) - # + # @method depth_func(func) - # @param [Integer] func - # @return [nil] + # @param [Integer] func + # @return [nil] # @scope class attach_function :depth_func, :glDepthFunc, [:uint], :void - # (Not documented) - # + # @method depth_mask(flag) - # @param [Integer] flag - # @return [nil] + # @param [Integer] flag + # @return [nil] # @scope class attach_function :depth_mask, :glDepthMask, [:uchar], :void - # (Not documented) - # + # @method depth_range(near_val, far_val) - # @param [Float] near_val - # @param [Float] far_val - # @return [nil] + # @param [Float] near_val + # @param [Float] far_val + # @return [nil] # @scope class attach_function :depth_range, :glDepthRange, [:double, :double], :void - # Accumulation Buffer - # + # @method clear_accum(red, green, blue, alpha) - # @param [Float] red - # @param [Float] green - # @param [Float] blue - # @param [Float] alpha - # @return [nil] + # @param [Float] red + # @param [Float] green + # @param [Float] blue + # @param [Float] alpha + # @return [nil] # @scope class attach_function :clear_accum, :glClearAccum, [:float, :float, :float, :float], :void - # (Not documented) - # + # @method accum(op, value) - # @param [Integer] op - # @param [Float] value - # @return [nil] + # @param [Integer] op + # @param [Float] value + # @return [nil] # @scope class attach_function :accum, :glAccum, [:uint, :float], :void - # Transformation - # + # @method matrix_mode(mode) - # @param [Integer] mode - # @return [nil] + # @param [Integer] mode + # @return [nil] # @scope class attach_function :matrix_mode, :glMatrixMode, [:uint], :void - # (Not documented) - # + # @method ortho(left, right, bottom, top, near_val, far_val) - # @param [Float] left - # @param [Float] right - # @param [Float] bottom - # @param [Float] top - # @param [Float] near_val - # @param [Float] far_val - # @return [nil] + # @param [Float] left + # @param [Float] right + # @param [Float] bottom + # @param [Float] top + # @param [Float] near_val + # @param [Float] far_val + # @return [nil] # @scope class attach_function :ortho, :glOrtho, [:double, :double, :double, :double, :double, :double], :void - # (Not documented) - # + # @method frustum(left, right, bottom, top, near_val, far_val) - # @param [Float] left - # @param [Float] right - # @param [Float] bottom - # @param [Float] top - # @param [Float] near_val - # @param [Float] far_val - # @return [nil] + # @param [Float] left + # @param [Float] right + # @param [Float] bottom + # @param [Float] top + # @param [Float] near_val + # @param [Float] far_val + # @return [nil] # @scope class attach_function :frustum, :glFrustum, [:double, :double, :double, :double, :double, :double], :void - # (Not documented) - # + # @method viewport(x, y, width, height) - # @param [Integer] x - # @param [Integer] y - # @param [Integer] width - # @param [Integer] height - # @return [nil] + # @param [Integer] x + # @param [Integer] y + # @param [Integer] width + # @param [Integer] height + # @return [nil] # @scope class attach_function :viewport, :glViewport, [:int, :int, :int, :int], :void - # (Not documented) - # + # @method push_matrix() - # @return [nil] + # @return [nil] # @scope class attach_function :push_matrix, :glPushMatrix, [], :void - # (Not documented) - # + # @method pop_matrix() - # @return [nil] + # @return [nil] # @scope class attach_function :pop_matrix, :glPopMatrix, [], :void - # (Not documented) - # + # @method load_identity() - # @return [nil] + # @return [nil] # @scope class attach_function :load_identity, :glLoadIdentity, [], :void - # (Not documented) - # + # @method load_matrixd(m) - # @param [FFI::Pointer(*GLdouble)] m - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] m + # @return [nil] # @scope class attach_function :load_matrixd, :glLoadMatrixd, [:pointer], :void - # (Not documented) - # + # @method load_matrixf(m) - # @param [FFI::Pointer(*GLfloat)] m - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] m + # @return [nil] # @scope class attach_function :load_matrixf, :glLoadMatrixf, [:pointer], :void - # (Not documented) - # + # @method mult_matrixd(m) - # @param [FFI::Pointer(*GLdouble)] m - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] m + # @return [nil] # @scope class attach_function :mult_matrixd, :glMultMatrixd, [:pointer], :void - # (Not documented) - # + # @method mult_matrixf(m) - # @param [FFI::Pointer(*GLfloat)] m - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] m + # @return [nil] # @scope class attach_function :mult_matrixf, :glMultMatrixf, [:pointer], :void - # (Not documented) - # + # @method rotated(angle, x, y, z) - # @param [Float] angle - # @param [Float] x - # @param [Float] y - # @param [Float] z - # @return [nil] + # @param [Float] angle + # @param [Float] x + # @param [Float] y + # @param [Float] z + # @return [nil] # @scope class attach_function :rotated, :glRotated, [:double, :double, :double, :double], :void - # (Not documented) - # + # @method rotatef(angle, x, y, z) - # @param [Float] angle - # @param [Float] x - # @param [Float] y - # @param [Float] z - # @return [nil] + # @param [Float] angle + # @param [Float] x + # @param [Float] y + # @param [Float] z + # @return [nil] # @scope class attach_function :rotatef, :glRotatef, [:float, :float, :float, :float], :void - # (Not documented) - # + # @method scaled(x, y, z) - # @param [Float] x - # @param [Float] y - # @param [Float] z - # @return [nil] + # @param [Float] x + # @param [Float] y + # @param [Float] z + # @return [nil] # @scope class attach_function :scaled, :glScaled, [:double, :double, :double], :void - # (Not documented) - # + # @method scalef(x, y, z) - # @param [Float] x - # @param [Float] y - # @param [Float] z - # @return [nil] + # @param [Float] x + # @param [Float] y + # @param [Float] z + # @return [nil] # @scope class attach_function :scalef, :glScalef, [:float, :float, :float], :void - # (Not documented) - # + # @method translated(x, y, z) - # @param [Float] x - # @param [Float] y - # @param [Float] z - # @return [nil] + # @param [Float] x + # @param [Float] y + # @param [Float] z + # @return [nil] # @scope class attach_function :translated, :glTranslated, [:double, :double, :double], :void - # (Not documented) - # + # @method translatef(x, y, z) - # @param [Float] x - # @param [Float] y - # @param [Float] z - # @return [nil] + # @param [Float] x + # @param [Float] y + # @param [Float] z + # @return [nil] # @scope class attach_function :translatef, :glTranslatef, [:float, :float, :float], :void - # Display Lists - # + # @method is_list(list) - # @param [Integer] list - # @return [Integer] + # @param [Integer] list + # @return [Integer] # @scope class attach_function :is_list, :glIsList, [:uint], :uchar - # (Not documented) - # + # @method delete_lists(list, range) - # @param [Integer] list - # @param [Integer] range - # @return [nil] + # @param [Integer] list + # @param [Integer] range + # @return [nil] # @scope class attach_function :delete_lists, :glDeleteLists, [:uint, :int], :void - # (Not documented) - # + # @method gen_lists(range) - # @param [Integer] range - # @return [Integer] + # @param [Integer] range + # @return [Integer] # @scope class attach_function :gen_lists, :glGenLists, [:int], :uint - # (Not documented) - # + # @method new_list(list, mode) - # @param [Integer] list - # @param [Integer] mode - # @return [nil] + # @param [Integer] list + # @param [Integer] mode + # @return [nil] # @scope class attach_function :new_list, :glNewList, [:uint, :uint], :void - # (Not documented) - # + # @method end_list() - # @return [nil] + # @return [nil] # @scope class attach_function :end_list, :glEndList, [], :void - # (Not documented) - # + # @method call_list(list) - # @param [Integer] list - # @return [nil] + # @param [Integer] list + # @return [nil] # @scope class attach_function :call_list, :glCallList, [:uint], :void - # (Not documented) - # + # @method call_lists(n, type, lists) - # @param [Integer] n - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] lists - # @return [nil] + # @param [Integer] n + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] lists + # @return [nil] # @scope class attach_function :call_lists, :glCallLists, [:int, :uint, :pointer], :void - # (Not documented) - # + # @method list_base(base) - # @param [Integer] base - # @return [nil] + # @param [Integer] base + # @return [nil] # @scope class attach_function :list_base, :glListBase, [:uint], :void - # Drawing Functions - # + # @method begin_(mode) - # @param [Integer] mode - # @return [nil] + # @param [Integer] mode + # @return [nil] # @scope class attach_function :begin_, :glBegin, [:uint], :void - # (Not documented) - # + # @method end_() - # @return [nil] + # @return [nil] # @scope class attach_function :end_, :glEnd, [], :void - # (Not documented) - # + # @method vertex2d(x, y) - # @param [Float] x - # @param [Float] y - # @return [nil] + # @param [Float] x + # @param [Float] y + # @return [nil] # @scope class attach_function :vertex2d, :glVertex2d, [:double, :double], :void - # (Not documented) - # + # @method vertex2f(x, y) - # @param [Float] x - # @param [Float] y - # @return [nil] + # @param [Float] x + # @param [Float] y + # @return [nil] # @scope class attach_function :vertex2f, :glVertex2f, [:float, :float], :void - # (Not documented) - # + # @method vertex2i(x, y) - # @param [Integer] x - # @param [Integer] y - # @return [nil] + # @param [Integer] x + # @param [Integer] y + # @return [nil] # @scope class attach_function :vertex2i, :glVertex2i, [:int, :int], :void - # (Not documented) - # + # @method vertex2s(x, y) - # @param [Integer] x - # @param [Integer] y - # @return [nil] + # @param [Integer] x + # @param [Integer] y + # @return [nil] # @scope class attach_function :vertex2s, :glVertex2s, [:short, :short], :void - # (Not documented) - # + # @method vertex3d(x, y, z) - # @param [Float] x - # @param [Float] y - # @param [Float] z - # @return [nil] + # @param [Float] x + # @param [Float] y + # @param [Float] z + # @return [nil] # @scope class attach_function :vertex3d, :glVertex3d, [:double, :double, :double], :void - # (Not documented) - # + # @method vertex3f(x, y, z) - # @param [Float] x - # @param [Float] y - # @param [Float] z - # @return [nil] + # @param [Float] x + # @param [Float] y + # @param [Float] z + # @return [nil] # @scope class attach_function :vertex3f, :glVertex3f, [:float, :float, :float], :void - # (Not documented) - # + # @method vertex3i(x, y, z) - # @param [Integer] x - # @param [Integer] y - # @param [Integer] z - # @return [nil] + # @param [Integer] x + # @param [Integer] y + # @param [Integer] z + # @return [nil] # @scope class attach_function :vertex3i, :glVertex3i, [:int, :int, :int], :void - # (Not documented) - # + # @method vertex3s(x, y, z) - # @param [Integer] x - # @param [Integer] y - # @param [Integer] z - # @return [nil] + # @param [Integer] x + # @param [Integer] y + # @param [Integer] z + # @return [nil] # @scope class attach_function :vertex3s, :glVertex3s, [:short, :short, :short], :void - # (Not documented) - # + # @method vertex4d(x, y, z, w) - # @param [Float] x - # @param [Float] y - # @param [Float] z - # @param [Float] w - # @return [nil] + # @param [Float] x + # @param [Float] y + # @param [Float] z + # @param [Float] w + # @return [nil] # @scope class attach_function :vertex4d, :glVertex4d, [:double, :double, :double, :double], :void - # (Not documented) - # + # @method vertex4f(x, y, z, w) - # @param [Float] x - # @param [Float] y - # @param [Float] z - # @param [Float] w - # @return [nil] + # @param [Float] x + # @param [Float] y + # @param [Float] z + # @param [Float] w + # @return [nil] # @scope class attach_function :vertex4f, :glVertex4f, [:float, :float, :float, :float], :void - # (Not documented) - # + # @method vertex4i(x, y, z, w) - # @param [Integer] x - # @param [Integer] y - # @param [Integer] z - # @param [Integer] w - # @return [nil] + # @param [Integer] x + # @param [Integer] y + # @param [Integer] z + # @param [Integer] w + # @return [nil] # @scope class attach_function :vertex4i, :glVertex4i, [:int, :int, :int, :int], :void - # (Not documented) - # + # @method vertex4s(x, y, z, w) - # @param [Integer] x - # @param [Integer] y - # @param [Integer] z - # @param [Integer] w - # @return [nil] + # @param [Integer] x + # @param [Integer] y + # @param [Integer] z + # @param [Integer] w + # @return [nil] # @scope class attach_function :vertex4s, :glVertex4s, [:short, :short, :short, :short], :void - # (Not documented) - # + # @method vertex2dv(v) - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :vertex2dv, :glVertex2dv, [:pointer], :void - # (Not documented) - # + # @method vertex2fv(v) - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :vertex2fv, :glVertex2fv, [:pointer], :void - # (Not documented) - # + # @method vertex2iv(v) - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :vertex2iv, :glVertex2iv, [:pointer], :void - # (Not documented) - # + # @method vertex2sv(v) - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :vertex2sv, :glVertex2sv, [:pointer], :void - # (Not documented) - # + # @method vertex3dv(v) - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :vertex3dv, :glVertex3dv, [:pointer], :void - # (Not documented) - # + # @method vertex3fv(v) - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :vertex3fv, :glVertex3fv, [:pointer], :void - # (Not documented) - # + # @method vertex3iv(v) - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :vertex3iv, :glVertex3iv, [:pointer], :void - # (Not documented) - # + # @method vertex3sv(v) - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :vertex3sv, :glVertex3sv, [:pointer], :void - # (Not documented) - # + # @method vertex4dv(v) - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :vertex4dv, :glVertex4dv, [:pointer], :void - # (Not documented) - # + # @method vertex4fv(v) - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :vertex4fv, :glVertex4fv, [:pointer], :void - # (Not documented) - # + # @method vertex4iv(v) - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :vertex4iv, :glVertex4iv, [:pointer], :void - # (Not documented) - # + # @method vertex4sv(v) - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :vertex4sv, :glVertex4sv, [:pointer], :void - # (Not documented) - # + # @method normal3b(nx, ny, nz) - # @param [Integer] nx - # @param [Integer] ny - # @param [Integer] nz - # @return [nil] + # @param [Integer] nx + # @param [Integer] ny + # @param [Integer] nz + # @return [nil] # @scope class attach_function :normal3b, :glNormal3b, [:char, :char, :char], :void - # (Not documented) - # + # @method normal3d(nx, ny, nz) - # @param [Float] nx - # @param [Float] ny - # @param [Float] nz - # @return [nil] + # @param [Float] nx + # @param [Float] ny + # @param [Float] nz + # @return [nil] # @scope class attach_function :normal3d, :glNormal3d, [:double, :double, :double], :void - # (Not documented) - # + # @method normal3f(nx, ny, nz) - # @param [Float] nx - # @param [Float] ny - # @param [Float] nz - # @return [nil] + # @param [Float] nx + # @param [Float] ny + # @param [Float] nz + # @return [nil] # @scope class attach_function :normal3f, :glNormal3f, [:float, :float, :float], :void - # (Not documented) - # + # @method normal3i(nx, ny, nz) - # @param [Integer] nx - # @param [Integer] ny - # @param [Integer] nz - # @return [nil] + # @param [Integer] nx + # @param [Integer] ny + # @param [Integer] nz + # @return [nil] # @scope class attach_function :normal3i, :glNormal3i, [:int, :int, :int], :void - # (Not documented) - # + # @method normal3s(nx, ny, nz) - # @param [Integer] nx - # @param [Integer] ny - # @param [Integer] nz - # @return [nil] + # @param [Integer] nx + # @param [Integer] ny + # @param [Integer] nz + # @return [nil] # @scope class attach_function :normal3s, :glNormal3s, [:short, :short, :short], :void - # (Not documented) - # + # @method normal3bv(v) - # @param [FFI::Pointer(*GLbyte)] v - # @return [nil] + # @param [FFI::Pointer(*GLbyte)] v + # @return [nil] # @scope class attach_function :normal3bv, :glNormal3bv, [:pointer], :void - # (Not documented) - # + # @method normal3dv(v) - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :normal3dv, :glNormal3dv, [:pointer], :void - # (Not documented) - # + # @method normal3fv(v) - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :normal3fv, :glNormal3fv, [:pointer], :void - # (Not documented) - # + # @method normal3iv(v) - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :normal3iv, :glNormal3iv, [:pointer], :void - # (Not documented) - # + # @method normal3sv(v) - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :normal3sv, :glNormal3sv, [:pointer], :void - # (Not documented) - # + # @method indexd(c) - # @param [Float] c - # @return [nil] + # @param [Float] c + # @return [nil] # @scope class attach_function :indexd, :glIndexd, [:double], :void - # (Not documented) - # + # @method indexf(c) - # @param [Float] c - # @return [nil] + # @param [Float] c + # @return [nil] # @scope class attach_function :indexf, :glIndexf, [:float], :void - # (Not documented) - # + # @method indexi(c) - # @param [Integer] c - # @return [nil] + # @param [Integer] c + # @return [nil] # @scope class attach_function :indexi, :glIndexi, [:int], :void - # (Not documented) - # + # @method indexs(c) - # @param [Integer] c - # @return [nil] + # @param [Integer] c + # @return [nil] # @scope class attach_function :indexs, :glIndexs, [:short], :void - # (Not documented) - # + # @method indexub(c) - # @param [Integer] c - # @return [nil] + # @param [Integer] c + # @return [nil] # @scope class attach_function :indexub, :glIndexub, [:uchar], :void - # 1.1 - # + # @method indexdv(c) - # @param [FFI::Pointer(*GLdouble)] c - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] c + # @return [nil] # @scope class attach_function :indexdv, :glIndexdv, [:pointer], :void - # (Not documented) - # + # @method indexfv(c) - # @param [FFI::Pointer(*GLfloat)] c - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] c + # @return [nil] # @scope class attach_function :indexfv, :glIndexfv, [:pointer], :void - # (Not documented) - # + # @method indexiv(c) - # @param [FFI::Pointer(*GLint)] c - # @return [nil] + # @param [FFI::Pointer(*GLint)] c + # @return [nil] # @scope class attach_function :indexiv, :glIndexiv, [:pointer], :void - # (Not documented) - # + # @method indexsv(c) - # @param [FFI::Pointer(*GLshort)] c - # @return [nil] + # @param [FFI::Pointer(*GLshort)] c + # @return [nil] # @scope class attach_function :indexsv, :glIndexsv, [:pointer], :void - # (Not documented) - # + # @method indexubv(c) - # @param [FFI::Pointer(*GLubyte)] c - # @return [nil] + # @param [FFI::Pointer(*GLubyte)] c + # @return [nil] # @scope class attach_function :indexubv, :glIndexubv, [:pointer], :void - # 1.1 - # + # @method color3b(red, green, blue) - # @param [Integer] red - # @param [Integer] green - # @param [Integer] blue - # @return [nil] + # @param [Integer] red + # @param [Integer] green + # @param [Integer] blue + # @return [nil] # @scope class attach_function :color3b, :glColor3b, [:char, :char, :char], :void - # (Not documented) - # + # @method color3d(red, green, blue) - # @param [Float] red - # @param [Float] green - # @param [Float] blue - # @return [nil] + # @param [Float] red + # @param [Float] green + # @param [Float] blue + # @return [nil] # @scope class attach_function :color3d, :glColor3d, [:double, :double, :double], :void - # (Not documented) - # + # @method color3f(red, green, blue) - # @param [Float] red - # @param [Float] green - # @param [Float] blue - # @return [nil] + # @param [Float] red + # @param [Float] green + # @param [Float] blue + # @return [nil] # @scope class attach_function :color3f, :glColor3f, [:float, :float, :float], :void - # (Not documented) - # + # @method color3i(red, green, blue) - # @param [Integer] red - # @param [Integer] green - # @param [Integer] blue - # @return [nil] + # @param [Integer] red + # @param [Integer] green + # @param [Integer] blue + # @return [nil] # @scope class attach_function :color3i, :glColor3i, [:int, :int, :int], :void - # (Not documented) - # + # @method color3s(red, green, blue) - # @param [Integer] red - # @param [Integer] green - # @param [Integer] blue - # @return [nil] + # @param [Integer] red + # @param [Integer] green + # @param [Integer] blue + # @return [nil] # @scope class attach_function :color3s, :glColor3s, [:short, :short, :short], :void - # (Not documented) - # + # @method color3ub(red, green, blue) - # @param [Integer] red - # @param [Integer] green - # @param [Integer] blue - # @return [nil] + # @param [Integer] red + # @param [Integer] green + # @param [Integer] blue + # @return [nil] # @scope class attach_function :color3ub, :glColor3ub, [:uchar, :uchar, :uchar], :void - # (Not documented) - # + # @method color3ui(red, green, blue) - # @param [Integer] red - # @param [Integer] green - # @param [Integer] blue - # @return [nil] + # @param [Integer] red + # @param [Integer] green + # @param [Integer] blue + # @return [nil] # @scope class attach_function :color3ui, :glColor3ui, [:uint, :uint, :uint], :void - # (Not documented) - # + # @method color3us(red, green, blue) - # @param [Integer] red - # @param [Integer] green - # @param [Integer] blue - # @return [nil] + # @param [Integer] red + # @param [Integer] green + # @param [Integer] blue + # @return [nil] # @scope class attach_function :color3us, :glColor3us, [:ushort, :ushort, :ushort], :void - # (Not documented) - # + # @method color4b(red, green, blue, alpha) - # @param [Integer] red - # @param [Integer] green - # @param [Integer] blue - # @param [Integer] alpha - # @return [nil] + # @param [Integer] red + # @param [Integer] green + # @param [Integer] blue + # @param [Integer] alpha + # @return [nil] # @scope class attach_function :color4b, :glColor4b, [:char, :char, :char, :char], :void - # (Not documented) - # + # @method color4d(red, green, blue, alpha) - # @param [Float] red - # @param [Float] green - # @param [Float] blue - # @param [Float] alpha - # @return [nil] + # @param [Float] red + # @param [Float] green + # @param [Float] blue + # @param [Float] alpha + # @return [nil] # @scope class attach_function :color4d, :glColor4d, [:double, :double, :double, :double], :void - # (Not documented) - # + # @method color4f(red, green, blue, alpha) - # @param [Float] red - # @param [Float] green - # @param [Float] blue - # @param [Float] alpha - # @return [nil] + # @param [Float] red + # @param [Float] green + # @param [Float] blue + # @param [Float] alpha + # @return [nil] # @scope class attach_function :color4f, :glColor4f, [:float, :float, :float, :float], :void - # (Not documented) - # + # @method color4i(red, green, blue, alpha) - # @param [Integer] red - # @param [Integer] green - # @param [Integer] blue - # @param [Integer] alpha - # @return [nil] + # @param [Integer] red + # @param [Integer] green + # @param [Integer] blue + # @param [Integer] alpha + # @return [nil] # @scope class attach_function :color4i, :glColor4i, [:int, :int, :int, :int], :void - # (Not documented) - # + # @method color4s(red, green, blue, alpha) - # @param [Integer] red - # @param [Integer] green - # @param [Integer] blue - # @param [Integer] alpha - # @return [nil] + # @param [Integer] red + # @param [Integer] green + # @param [Integer] blue + # @param [Integer] alpha + # @return [nil] # @scope class attach_function :color4s, :glColor4s, [:short, :short, :short, :short], :void - # (Not documented) - # + # @method color4ub(red, green, blue, alpha) - # @param [Integer] red - # @param [Integer] green - # @param [Integer] blue - # @param [Integer] alpha - # @return [nil] + # @param [Integer] red + # @param [Integer] green + # @param [Integer] blue + # @param [Integer] alpha + # @return [nil] # @scope class attach_function :color4ub, :glColor4ub, [:uchar, :uchar, :uchar, :uchar], :void - # (Not documented) - # + # @method color4ui(red, green, blue, alpha) - # @param [Integer] red - # @param [Integer] green - # @param [Integer] blue - # @param [Integer] alpha - # @return [nil] + # @param [Integer] red + # @param [Integer] green + # @param [Integer] blue + # @param [Integer] alpha + # @return [nil] # @scope class attach_function :color4ui, :glColor4ui, [:uint, :uint, :uint, :uint], :void - # (Not documented) - # + # @method color4us(red, green, blue, alpha) - # @param [Integer] red - # @param [Integer] green - # @param [Integer] blue - # @param [Integer] alpha - # @return [nil] + # @param [Integer] red + # @param [Integer] green + # @param [Integer] blue + # @param [Integer] alpha + # @return [nil] # @scope class attach_function :color4us, :glColor4us, [:ushort, :ushort, :ushort, :ushort], :void - # (Not documented) - # + # @method color3bv(v) - # @param [FFI::Pointer(*GLbyte)] v - # @return [nil] + # @param [FFI::Pointer(*GLbyte)] v + # @return [nil] # @scope class attach_function :color3bv, :glColor3bv, [:pointer], :void - # (Not documented) - # + # @method color3dv(v) - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :color3dv, :glColor3dv, [:pointer], :void - # (Not documented) - # + # @method color3fv(v) - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :color3fv, :glColor3fv, [:pointer], :void - # (Not documented) - # + # @method color3iv(v) - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :color3iv, :glColor3iv, [:pointer], :void - # (Not documented) - # + # @method color3sv(v) - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :color3sv, :glColor3sv, [:pointer], :void - # (Not documented) - # + # @method color3ubv(v) - # @param [FFI::Pointer(*GLubyte)] v - # @return [nil] + # @param [FFI::Pointer(*GLubyte)] v + # @return [nil] # @scope class attach_function :color3ubv, :glColor3ubv, [:pointer], :void - # (Not documented) - # + # @method color3uiv(v) - # @param [FFI::Pointer(*GLuint)] v - # @return [nil] + # @param [FFI::Pointer(*GLuint)] v + # @return [nil] # @scope class attach_function :color3uiv, :glColor3uiv, [:pointer], :void - # (Not documented) - # + # @method color3usv(v) - # @param [FFI::Pointer(*GLushort)] v - # @return [nil] + # @param [FFI::Pointer(*GLushort)] v + # @return [nil] # @scope class attach_function :color3usv, :glColor3usv, [:pointer], :void - # (Not documented) - # + # @method color4bv(v) - # @param [FFI::Pointer(*GLbyte)] v - # @return [nil] + # @param [FFI::Pointer(*GLbyte)] v + # @return [nil] # @scope class attach_function :color4bv, :glColor4bv, [:pointer], :void - # (Not documented) - # + # @method color4dv(v) - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :color4dv, :glColor4dv, [:pointer], :void - # (Not documented) - # + # @method color4fv(v) - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :color4fv, :glColor4fv, [:pointer], :void - # (Not documented) - # + # @method color4iv(v) - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :color4iv, :glColor4iv, [:pointer], :void - # (Not documented) - # + # @method color4sv(v) - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :color4sv, :glColor4sv, [:pointer], :void - # (Not documented) - # + # @method color4ubv(v) - # @param [FFI::Pointer(*GLubyte)] v - # @return [nil] + # @param [FFI::Pointer(*GLubyte)] v + # @return [nil] # @scope class attach_function :color4ubv, :glColor4ubv, [:pointer], :void - # (Not documented) - # + # @method color4uiv(v) - # @param [FFI::Pointer(*GLuint)] v - # @return [nil] + # @param [FFI::Pointer(*GLuint)] v + # @return [nil] # @scope class attach_function :color4uiv, :glColor4uiv, [:pointer], :void - # (Not documented) - # + # @method color4usv(v) - # @param [FFI::Pointer(*GLushort)] v - # @return [nil] + # @param [FFI::Pointer(*GLushort)] v + # @return [nil] # @scope class attach_function :color4usv, :glColor4usv, [:pointer], :void - # (Not documented) - # + # @method tex_coord1d(s) - # @param [Float] s - # @return [nil] + # @param [Float] s + # @return [nil] # @scope class attach_function :tex_coord1d, :glTexCoord1d, [:double], :void - # (Not documented) - # + # @method tex_coord1f(s) - # @param [Float] s - # @return [nil] + # @param [Float] s + # @return [nil] # @scope class attach_function :tex_coord1f, :glTexCoord1f, [:float], :void - # (Not documented) - # + # @method tex_coord1i(s) - # @param [Integer] s - # @return [nil] + # @param [Integer] s + # @return [nil] # @scope class attach_function :tex_coord1i, :glTexCoord1i, [:int], :void - # (Not documented) - # + # @method tex_coord1s(s) - # @param [Integer] s - # @return [nil] + # @param [Integer] s + # @return [nil] # @scope class attach_function :tex_coord1s, :glTexCoord1s, [:short], :void - # (Not documented) - # + # @method tex_coord2d(s, t) - # @param [Float] s - # @param [Float] t - # @return [nil] + # @param [Float] s + # @param [Float] t + # @return [nil] # @scope class attach_function :tex_coord2d, :glTexCoord2d, [:double, :double], :void - # (Not documented) - # + # @method tex_coord2f(s, t) - # @param [Float] s - # @param [Float] t - # @return [nil] + # @param [Float] s + # @param [Float] t + # @return [nil] # @scope class attach_function :tex_coord2f, :glTexCoord2f, [:float, :float], :void - # (Not documented) - # + # @method tex_coord2i(s, t) - # @param [Integer] s - # @param [Integer] t - # @return [nil] + # @param [Integer] s + # @param [Integer] t + # @return [nil] # @scope class attach_function :tex_coord2i, :glTexCoord2i, [:int, :int], :void - # (Not documented) - # + # @method tex_coord2s(s, t) - # @param [Integer] s - # @param [Integer] t - # @return [nil] + # @param [Integer] s + # @param [Integer] t + # @return [nil] # @scope class attach_function :tex_coord2s, :glTexCoord2s, [:short, :short], :void - # (Not documented) - # + # @method tex_coord3d(s, t, r) - # @param [Float] s - # @param [Float] t - # @param [Float] r - # @return [nil] + # @param [Float] s + # @param [Float] t + # @param [Float] r + # @return [nil] # @scope class attach_function :tex_coord3d, :glTexCoord3d, [:double, :double, :double], :void - # (Not documented) - # + # @method tex_coord3f(s, t, r) - # @param [Float] s - # @param [Float] t - # @param [Float] r - # @return [nil] + # @param [Float] s + # @param [Float] t + # @param [Float] r + # @return [nil] # @scope class attach_function :tex_coord3f, :glTexCoord3f, [:float, :float, :float], :void - # (Not documented) - # + # @method tex_coord3i(s, t, r) - # @param [Integer] s - # @param [Integer] t - # @param [Integer] r - # @return [nil] + # @param [Integer] s + # @param [Integer] t + # @param [Integer] r + # @return [nil] # @scope class attach_function :tex_coord3i, :glTexCoord3i, [:int, :int, :int], :void - # (Not documented) - # + # @method tex_coord3s(s, t, r) - # @param [Integer] s - # @param [Integer] t - # @param [Integer] r - # @return [nil] + # @param [Integer] s + # @param [Integer] t + # @param [Integer] r + # @return [nil] # @scope class attach_function :tex_coord3s, :glTexCoord3s, [:short, :short, :short], :void - # (Not documented) - # + # @method tex_coord4d(s, t, r, q) - # @param [Float] s - # @param [Float] t - # @param [Float] r - # @param [Float] q - # @return [nil] + # @param [Float] s + # @param [Float] t + # @param [Float] r + # @param [Float] q + # @return [nil] # @scope class attach_function :tex_coord4d, :glTexCoord4d, [:double, :double, :double, :double], :void - # (Not documented) - # + # @method tex_coord4f(s, t, r, q) - # @param [Float] s - # @param [Float] t - # @param [Float] r - # @param [Float] q - # @return [nil] + # @param [Float] s + # @param [Float] t + # @param [Float] r + # @param [Float] q + # @return [nil] # @scope class attach_function :tex_coord4f, :glTexCoord4f, [:float, :float, :float, :float], :void - # (Not documented) - # + # @method tex_coord4i(s, t, r, q) - # @param [Integer] s - # @param [Integer] t - # @param [Integer] r - # @param [Integer] q - # @return [nil] + # @param [Integer] s + # @param [Integer] t + # @param [Integer] r + # @param [Integer] q + # @return [nil] # @scope class attach_function :tex_coord4i, :glTexCoord4i, [:int, :int, :int, :int], :void - # (Not documented) - # + # @method tex_coord4s(s, t, r, q) - # @param [Integer] s - # @param [Integer] t - # @param [Integer] r - # @param [Integer] q - # @return [nil] + # @param [Integer] s + # @param [Integer] t + # @param [Integer] r + # @param [Integer] q + # @return [nil] # @scope class attach_function :tex_coord4s, :glTexCoord4s, [:short, :short, :short, :short], :void - # (Not documented) - # + # @method tex_coord1dv(v) - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :tex_coord1dv, :glTexCoord1dv, [:pointer], :void - # (Not documented) - # + # @method tex_coord1fv(v) - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :tex_coord1fv, :glTexCoord1fv, [:pointer], :void - # (Not documented) - # + # @method tex_coord1iv(v) - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :tex_coord1iv, :glTexCoord1iv, [:pointer], :void - # (Not documented) - # + # @method tex_coord1sv(v) - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :tex_coord1sv, :glTexCoord1sv, [:pointer], :void - # (Not documented) - # + # @method tex_coord2dv(v) - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :tex_coord2dv, :glTexCoord2dv, [:pointer], :void - # (Not documented) - # + # @method tex_coord2fv(v) - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :tex_coord2fv, :glTexCoord2fv, [:pointer], :void - # (Not documented) - # + # @method tex_coord2iv(v) - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :tex_coord2iv, :glTexCoord2iv, [:pointer], :void - # (Not documented) - # + # @method tex_coord2sv(v) - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :tex_coord2sv, :glTexCoord2sv, [:pointer], :void - # (Not documented) - # + # @method tex_coord3dv(v) - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :tex_coord3dv, :glTexCoord3dv, [:pointer], :void - # (Not documented) - # + # @method tex_coord3fv(v) - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :tex_coord3fv, :glTexCoord3fv, [:pointer], :void - # (Not documented) - # + # @method tex_coord3iv(v) - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :tex_coord3iv, :glTexCoord3iv, [:pointer], :void - # (Not documented) - # + # @method tex_coord3sv(v) - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :tex_coord3sv, :glTexCoord3sv, [:pointer], :void - # (Not documented) - # + # @method tex_coord4dv(v) - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :tex_coord4dv, :glTexCoord4dv, [:pointer], :void - # (Not documented) - # + # @method tex_coord4fv(v) - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :tex_coord4fv, :glTexCoord4fv, [:pointer], :void - # (Not documented) - # + # @method tex_coord4iv(v) - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :tex_coord4iv, :glTexCoord4iv, [:pointer], :void - # (Not documented) - # + # @method tex_coord4sv(v) - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :tex_coord4sv, :glTexCoord4sv, [:pointer], :void - # (Not documented) - # + # @method raster_pos2d(x, y) - # @param [Float] x - # @param [Float] y - # @return [nil] + # @param [Float] x + # @param [Float] y + # @return [nil] # @scope class attach_function :raster_pos2d, :glRasterPos2d, [:double, :double], :void - # (Not documented) - # + # @method raster_pos2f(x, y) - # @param [Float] x - # @param [Float] y - # @return [nil] + # @param [Float] x + # @param [Float] y + # @return [nil] # @scope class attach_function :raster_pos2f, :glRasterPos2f, [:float, :float], :void - # (Not documented) - # + # @method raster_pos2i(x, y) - # @param [Integer] x - # @param [Integer] y - # @return [nil] + # @param [Integer] x + # @param [Integer] y + # @return [nil] # @scope class attach_function :raster_pos2i, :glRasterPos2i, [:int, :int], :void - # (Not documented) - # + # @method raster_pos2s(x, y) - # @param [Integer] x - # @param [Integer] y - # @return [nil] + # @param [Integer] x + # @param [Integer] y + # @return [nil] # @scope class attach_function :raster_pos2s, :glRasterPos2s, [:short, :short], :void - # (Not documented) - # + # @method raster_pos3d(x, y, z) - # @param [Float] x - # @param [Float] y - # @param [Float] z - # @return [nil] + # @param [Float] x + # @param [Float] y + # @param [Float] z + # @return [nil] # @scope class attach_function :raster_pos3d, :glRasterPos3d, [:double, :double, :double], :void - # (Not documented) - # + # @method raster_pos3f(x, y, z) - # @param [Float] x - # @param [Float] y - # @param [Float] z - # @return [nil] + # @param [Float] x + # @param [Float] y + # @param [Float] z + # @return [nil] # @scope class attach_function :raster_pos3f, :glRasterPos3f, [:float, :float, :float], :void - # (Not documented) - # + # @method raster_pos3i(x, y, z) - # @param [Integer] x - # @param [Integer] y - # @param [Integer] z - # @return [nil] + # @param [Integer] x + # @param [Integer] y + # @param [Integer] z + # @return [nil] # @scope class attach_function :raster_pos3i, :glRasterPos3i, [:int, :int, :int], :void - # (Not documented) - # + # @method raster_pos3s(x, y, z) - # @param [Integer] x - # @param [Integer] y - # @param [Integer] z - # @return [nil] + # @param [Integer] x + # @param [Integer] y + # @param [Integer] z + # @return [nil] # @scope class attach_function :raster_pos3s, :glRasterPos3s, [:short, :short, :short], :void - # (Not documented) - # + # @method raster_pos4d(x, y, z, w) - # @param [Float] x - # @param [Float] y - # @param [Float] z - # @param [Float] w - # @return [nil] + # @param [Float] x + # @param [Float] y + # @param [Float] z + # @param [Float] w + # @return [nil] # @scope class attach_function :raster_pos4d, :glRasterPos4d, [:double, :double, :double, :double], :void - # (Not documented) - # + # @method raster_pos4f(x, y, z, w) - # @param [Float] x - # @param [Float] y - # @param [Float] z - # @param [Float] w - # @return [nil] + # @param [Float] x + # @param [Float] y + # @param [Float] z + # @param [Float] w + # @return [nil] # @scope class attach_function :raster_pos4f, :glRasterPos4f, [:float, :float, :float, :float], :void - # (Not documented) - # + # @method raster_pos4i(x, y, z, w) - # @param [Integer] x - # @param [Integer] y - # @param [Integer] z - # @param [Integer] w - # @return [nil] + # @param [Integer] x + # @param [Integer] y + # @param [Integer] z + # @param [Integer] w + # @return [nil] # @scope class attach_function :raster_pos4i, :glRasterPos4i, [:int, :int, :int, :int], :void - # (Not documented) - # + # @method raster_pos4s(x, y, z, w) - # @param [Integer] x - # @param [Integer] y - # @param [Integer] z - # @param [Integer] w - # @return [nil] + # @param [Integer] x + # @param [Integer] y + # @param [Integer] z + # @param [Integer] w + # @return [nil] # @scope class attach_function :raster_pos4s, :glRasterPos4s, [:short, :short, :short, :short], :void - # (Not documented) - # + # @method raster_pos2dv(v) - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :raster_pos2dv, :glRasterPos2dv, [:pointer], :void - # (Not documented) - # + # @method raster_pos2fv(v) - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :raster_pos2fv, :glRasterPos2fv, [:pointer], :void - # (Not documented) - # + # @method raster_pos2iv(v) - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :raster_pos2iv, :glRasterPos2iv, [:pointer], :void - # (Not documented) - # + # @method raster_pos2sv(v) - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :raster_pos2sv, :glRasterPos2sv, [:pointer], :void - # (Not documented) - # + # @method raster_pos3dv(v) - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :raster_pos3dv, :glRasterPos3dv, [:pointer], :void - # (Not documented) - # + # @method raster_pos3fv(v) - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :raster_pos3fv, :glRasterPos3fv, [:pointer], :void - # (Not documented) - # + # @method raster_pos3iv(v) - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :raster_pos3iv, :glRasterPos3iv, [:pointer], :void - # (Not documented) - # + # @method raster_pos3sv(v) - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :raster_pos3sv, :glRasterPos3sv, [:pointer], :void - # (Not documented) - # + # @method raster_pos4dv(v) - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :raster_pos4dv, :glRasterPos4dv, [:pointer], :void - # (Not documented) - # + # @method raster_pos4fv(v) - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :raster_pos4fv, :glRasterPos4fv, [:pointer], :void - # (Not documented) - # + # @method raster_pos4iv(v) - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :raster_pos4iv, :glRasterPos4iv, [:pointer], :void - # (Not documented) - # + # @method raster_pos4sv(v) - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :raster_pos4sv, :glRasterPos4sv, [:pointer], :void - # (Not documented) - # + # @method rectd(x1, y1, x2, y2) - # @param [Float] x1 - # @param [Float] y1 - # @param [Float] x2 - # @param [Float] y2 - # @return [nil] + # @param [Float] x1 + # @param [Float] y1 + # @param [Float] x2 + # @param [Float] y2 + # @return [nil] # @scope class attach_function :rectd, :glRectd, [:double, :double, :double, :double], :void - # (Not documented) - # + # @method rectf(x1, y1, x2, y2) - # @param [Float] x1 - # @param [Float] y1 - # @param [Float] x2 - # @param [Float] y2 - # @return [nil] + # @param [Float] x1 + # @param [Float] y1 + # @param [Float] x2 + # @param [Float] y2 + # @return [nil] # @scope class attach_function :rectf, :glRectf, [:float, :float, :float, :float], :void - # (Not documented) - # + # @method recti(x1, y1, x2, y2) - # @param [Integer] x1 - # @param [Integer] y1 - # @param [Integer] x2 - # @param [Integer] y2 - # @return [nil] + # @param [Integer] x1 + # @param [Integer] y1 + # @param [Integer] x2 + # @param [Integer] y2 + # @return [nil] # @scope class attach_function :recti, :glRecti, [:int, :int, :int, :int], :void - # (Not documented) - # + # @method rects(x1, y1, x2, y2) - # @param [Integer] x1 - # @param [Integer] y1 - # @param [Integer] x2 - # @param [Integer] y2 - # @return [nil] + # @param [Integer] x1 + # @param [Integer] y1 + # @param [Integer] x2 + # @param [Integer] y2 + # @return [nil] # @scope class attach_function :rects, :glRects, [:short, :short, :short, :short], :void - # (Not documented) - # + # @method rectdv(v1, v2) - # @param [FFI::Pointer(*GLdouble)] v1 - # @param [FFI::Pointer(*GLdouble)] v2 - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] v1 + # @param [FFI::Pointer(*GLdouble)] v2 + # @return [nil] # @scope class attach_function :rectdv, :glRectdv, [:pointer, :pointer], :void - # (Not documented) - # + # @method rectfv(v1, v2) - # @param [FFI::Pointer(*GLfloat)] v1 - # @param [FFI::Pointer(*GLfloat)] v2 - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] v1 + # @param [FFI::Pointer(*GLfloat)] v2 + # @return [nil] # @scope class attach_function :rectfv, :glRectfv, [:pointer, :pointer], :void - # (Not documented) - # + # @method rectiv(v1, v2) - # @param [FFI::Pointer(*GLint)] v1 - # @param [FFI::Pointer(*GLint)] v2 - # @return [nil] + # @param [FFI::Pointer(*GLint)] v1 + # @param [FFI::Pointer(*GLint)] v2 + # @return [nil] # @scope class attach_function :rectiv, :glRectiv, [:pointer, :pointer], :void - # (Not documented) - # + # @method rectsv(v1, v2) - # @param [FFI::Pointer(*GLshort)] v1 - # @param [FFI::Pointer(*GLshort)] v2 - # @return [nil] + # @param [FFI::Pointer(*GLshort)] v1 + # @param [FFI::Pointer(*GLshort)] v2 + # @return [nil] # @scope class attach_function :rectsv, :glRectsv, [:pointer, :pointer], :void - # Vertex Arrays (1.1) - # + # @method vertex_pointer(size, type, stride, ptr) - # @param [Integer] size - # @param [Integer] type - # @param [Integer] stride - # @param [FFI::Pointer(*GLvoid)] ptr - # @return [nil] + # @param [Integer] size + # @param [Integer] type + # @param [Integer] stride + # @param [FFI::Pointer(*GLvoid)] ptr + # @return [nil] # @scope class attach_function :vertex_pointer, :glVertexPointer, [:int, :uint, :int, :pointer], :void - # (Not documented) - # + # @method normal_pointer(type, stride, ptr) - # @param [Integer] type - # @param [Integer] stride - # @param [FFI::Pointer(*GLvoid)] ptr - # @return [nil] + # @param [Integer] type + # @param [Integer] stride + # @param [FFI::Pointer(*GLvoid)] ptr + # @return [nil] # @scope class attach_function :normal_pointer, :glNormalPointer, [:uint, :int, :pointer], :void - # (Not documented) - # + # @method color_pointer(size, type, stride, ptr) - # @param [Integer] size - # @param [Integer] type - # @param [Integer] stride - # @param [FFI::Pointer(*GLvoid)] ptr - # @return [nil] + # @param [Integer] size + # @param [Integer] type + # @param [Integer] stride + # @param [FFI::Pointer(*GLvoid)] ptr + # @return [nil] # @scope class attach_function :color_pointer, :glColorPointer, [:int, :uint, :int, :pointer], :void - # (Not documented) - # + # @method index_pointer(type, stride, ptr) - # @param [Integer] type - # @param [Integer] stride - # @param [FFI::Pointer(*GLvoid)] ptr - # @return [nil] + # @param [Integer] type + # @param [Integer] stride + # @param [FFI::Pointer(*GLvoid)] ptr + # @return [nil] # @scope class attach_function :index_pointer, :glIndexPointer, [:uint, :int, :pointer], :void - # (Not documented) - # + # @method tex_coord_pointer(size, type, stride, ptr) - # @param [Integer] size - # @param [Integer] type - # @param [Integer] stride - # @param [FFI::Pointer(*GLvoid)] ptr - # @return [nil] + # @param [Integer] size + # @param [Integer] type + # @param [Integer] stride + # @param [FFI::Pointer(*GLvoid)] ptr + # @return [nil] # @scope class attach_function :tex_coord_pointer, :glTexCoordPointer, [:int, :uint, :int, :pointer], :void - # (Not documented) - # + # @method edge_flag_pointer(stride, ptr) - # @param [Integer] stride - # @param [FFI::Pointer(*GLvoid)] ptr - # @return [nil] + # @param [Integer] stride + # @param [FFI::Pointer(*GLvoid)] ptr + # @return [nil] # @scope class attach_function :edge_flag_pointer, :glEdgeFlagPointer, [:int, :pointer], :void - # (Not documented) - # + # @method get_pointerv(pname, params) - # @param [Integer] pname - # @param [FFI::Pointer(**GLvoid)] params - # @return [nil] + # @param [Integer] pname + # @param [FFI::Pointer(**GLvoid)] params + # @return [nil] # @scope class attach_function :get_pointerv, :glGetPointerv, [:uint, :pointer], :void - # (Not documented) - # + # @method array_element(i) - # @param [Integer] i - # @return [nil] + # @param [Integer] i + # @return [nil] # @scope class attach_function :array_element, :glArrayElement, [:int], :void - # (Not documented) - # + # @method draw_arrays(mode, first, count) - # @param [Integer] mode - # @param [Integer] first - # @param [Integer] count - # @return [nil] + # @param [Integer] mode + # @param [Integer] first + # @param [Integer] count + # @return [nil] # @scope class attach_function :draw_arrays, :glDrawArrays, [:uint, :int, :int], :void - # (Not documented) - # + # @method draw_elements(mode, count, type, indices) - # @param [Integer] mode - # @param [Integer] count - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] indices - # @return [nil] + # @param [Integer] mode + # @param [Integer] count + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] indices + # @return [nil] # @scope class attach_function :draw_elements, :glDrawElements, [:uint, :int, :uint, :pointer], :void - # (Not documented) - # + # @method interleaved_arrays(format, stride, pointer) - # @param [Integer] format - # @param [Integer] stride - # @param [FFI::Pointer(*GLvoid)] pointer - # @return [nil] + # @param [Integer] format + # @param [Integer] stride + # @param [FFI::Pointer(*GLvoid)] pointer + # @return [nil] # @scope class attach_function :interleaved_arrays, :glInterleavedArrays, [:uint, :int, :pointer], :void - # Lighting - # + # @method shade_model(mode) - # @param [Integer] mode - # @return [nil] + # @param [Integer] mode + # @return [nil] # @scope class attach_function :shade_model, :glShadeModel, [:uint], :void - # (Not documented) - # + # @method lightf(light, pname, param) - # @param [Integer] light - # @param [Integer] pname - # @param [Float] param - # @return [nil] + # @param [Integer] light + # @param [Integer] pname + # @param [Float] param + # @return [nil] # @scope class attach_function :lightf, :glLightf, [:uint, :uint, :float], :void - # (Not documented) - # + # @method lighti(light, pname, param) - # @param [Integer] light - # @param [Integer] pname - # @param [Integer] param - # @return [nil] + # @param [Integer] light + # @param [Integer] pname + # @param [Integer] param + # @return [nil] # @scope class attach_function :lighti, :glLighti, [:uint, :uint, :int], :void - # (Not documented) - # + # @method lightfv(light, pname, params) - # @param [Integer] light - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] light + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :lightfv, :glLightfv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method lightiv(light, pname, params) - # @param [Integer] light - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] light + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :lightiv, :glLightiv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_lightfv(light, pname, params) - # @param [Integer] light - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] light + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :get_lightfv, :glGetLightfv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_lightiv(light, pname, params) - # @param [Integer] light - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] light + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :get_lightiv, :glGetLightiv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method light_modelf(pname, param) - # @param [Integer] pname - # @param [Float] param - # @return [nil] + # @param [Integer] pname + # @param [Float] param + # @return [nil] # @scope class attach_function :light_modelf, :glLightModelf, [:uint, :float], :void - # (Not documented) - # + # @method light_modeli(pname, param) - # @param [Integer] pname - # @param [Integer] param - # @return [nil] + # @param [Integer] pname + # @param [Integer] param + # @return [nil] # @scope class attach_function :light_modeli, :glLightModeli, [:uint, :int], :void - # (Not documented) - # + # @method light_modelfv(pname, params) - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :light_modelfv, :glLightModelfv, [:uint, :pointer], :void - # (Not documented) - # + # @method light_modeliv(pname, params) - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :light_modeliv, :glLightModeliv, [:uint, :pointer], :void - # (Not documented) - # + # @method materialf(face, pname, param) - # @param [Integer] face - # @param [Integer] pname - # @param [Float] param - # @return [nil] + # @param [Integer] face + # @param [Integer] pname + # @param [Float] param + # @return [nil] # @scope class attach_function :materialf, :glMaterialf, [:uint, :uint, :float], :void - # (Not documented) - # + # @method materiali(face, pname, param) - # @param [Integer] face - # @param [Integer] pname - # @param [Integer] param - # @return [nil] + # @param [Integer] face + # @param [Integer] pname + # @param [Integer] param + # @return [nil] # @scope class attach_function :materiali, :glMateriali, [:uint, :uint, :int], :void - # (Not documented) - # + # @method materialfv(face, pname, params) - # @param [Integer] face - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] face + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :materialfv, :glMaterialfv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method materialiv(face, pname, params) - # @param [Integer] face - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] face + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :materialiv, :glMaterialiv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_materialfv(face, pname, params) - # @param [Integer] face - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] face + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :get_materialfv, :glGetMaterialfv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_materialiv(face, pname, params) - # @param [Integer] face - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] face + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :get_materialiv, :glGetMaterialiv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method color_material(face, mode) - # @param [Integer] face - # @param [Integer] mode - # @return [nil] + # @param [Integer] face + # @param [Integer] mode + # @return [nil] # @scope class attach_function :color_material, :glColorMaterial, [:uint, :uint], :void - # Raster functions - # + # @method pixel_zoom(xfactor, yfactor) - # @param [Float] xfactor - # @param [Float] yfactor - # @return [nil] + # @param [Float] xfactor + # @param [Float] yfactor + # @return [nil] # @scope class attach_function :pixel_zoom, :glPixelZoom, [:float, :float], :void - # (Not documented) - # + # @method pixel_storef(pname, param) - # @param [Integer] pname - # @param [Float] param - # @return [nil] + # @param [Integer] pname + # @param [Float] param + # @return [nil] # @scope class attach_function :pixel_storef, :glPixelStoref, [:uint, :float], :void - # (Not documented) - # + # @method pixel_storei(pname, param) - # @param [Integer] pname - # @param [Integer] param - # @return [nil] + # @param [Integer] pname + # @param [Integer] param + # @return [nil] # @scope class attach_function :pixel_storei, :glPixelStorei, [:uint, :int], :void - # (Not documented) - # + # @method pixel_transferf(pname, param) - # @param [Integer] pname - # @param [Float] param - # @return [nil] + # @param [Integer] pname + # @param [Float] param + # @return [nil] # @scope class attach_function :pixel_transferf, :glPixelTransferf, [:uint, :float], :void - # (Not documented) - # + # @method pixel_transferi(pname, param) - # @param [Integer] pname - # @param [Integer] param - # @return [nil] + # @param [Integer] pname + # @param [Integer] param + # @return [nil] # @scope class attach_function :pixel_transferi, :glPixelTransferi, [:uint, :int], :void - # (Not documented) - # + # @method pixel_mapfv(map, mapsize, values) - # @param [Integer] map - # @param [Integer] mapsize - # @param [FFI::Pointer(*GLfloat)] values - # @return [nil] + # @param [Integer] map + # @param [Integer] mapsize + # @param [FFI::Pointer(*GLfloat)] values + # @return [nil] # @scope class attach_function :pixel_mapfv, :glPixelMapfv, [:uint, :int, :pointer], :void - # (Not documented) - # + # @method pixel_mapuiv(map, mapsize, values) - # @param [Integer] map - # @param [Integer] mapsize - # @param [FFI::Pointer(*GLuint)] values - # @return [nil] + # @param [Integer] map + # @param [Integer] mapsize + # @param [FFI::Pointer(*GLuint)] values + # @return [nil] # @scope class attach_function :pixel_mapuiv, :glPixelMapuiv, [:uint, :int, :pointer], :void - # (Not documented) - # + # @method pixel_mapusv(map, mapsize, values) - # @param [Integer] map - # @param [Integer] mapsize - # @param [FFI::Pointer(*GLushort)] values - # @return [nil] + # @param [Integer] map + # @param [Integer] mapsize + # @param [FFI::Pointer(*GLushort)] values + # @return [nil] # @scope class attach_function :pixel_mapusv, :glPixelMapusv, [:uint, :int, :pointer], :void - # (Not documented) - # + # @method get_pixel_mapfv(map, values) - # @param [Integer] map - # @param [FFI::Pointer(*GLfloat)] values - # @return [nil] + # @param [Integer] map + # @param [FFI::Pointer(*GLfloat)] values + # @return [nil] # @scope class attach_function :get_pixel_mapfv, :glGetPixelMapfv, [:uint, :pointer], :void - # (Not documented) - # + # @method get_pixel_mapuiv(map, values) - # @param [Integer] map - # @param [FFI::Pointer(*GLuint)] values - # @return [nil] + # @param [Integer] map + # @param [FFI::Pointer(*GLuint)] values + # @return [nil] # @scope class attach_function :get_pixel_mapuiv, :glGetPixelMapuiv, [:uint, :pointer], :void - # (Not documented) - # + # @method get_pixel_mapusv(map, values) - # @param [Integer] map - # @param [FFI::Pointer(*GLushort)] values - # @return [nil] + # @param [Integer] map + # @param [FFI::Pointer(*GLushort)] values + # @return [nil] # @scope class attach_function :get_pixel_mapusv, :glGetPixelMapusv, [:uint, :pointer], :void - # (Not documented) - # + # @method bitmap(width, height, xorig, yorig, xmove, ymove, bitmap) - # @param [Integer] width - # @param [Integer] height - # @param [Float] xorig - # @param [Float] yorig - # @param [Float] xmove - # @param [Float] ymove - # @param [FFI::Pointer(*GLubyte)] bitmap - # @return [nil] + # @param [Integer] width + # @param [Integer] height + # @param [Float] xorig + # @param [Float] yorig + # @param [Float] xmove + # @param [Float] ymove + # @param [FFI::Pointer(*GLubyte)] bitmap + # @return [nil] # @scope class attach_function :bitmap, :glBitmap, [:int, :int, :float, :float, :float, :float, :pointer], :void - # (Not documented) - # + # @method read_pixels(x, y, width, height, format, type, pixels) - # @param [Integer] x - # @param [Integer] y - # @param [Integer] width - # @param [Integer] height - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] pixels - # @return [nil] + # @param [Integer] x + # @param [Integer] y + # @param [Integer] width + # @param [Integer] height + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] pixels + # @return [nil] # @scope class attach_function :read_pixels, :glReadPixels, [:int, :int, :int, :int, :uint, :uint, :pointer], :void - # (Not documented) - # + # @method draw_pixels(width, height, format, type, pixels) - # @param [Integer] width - # @param [Integer] height - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] pixels - # @return [nil] + # @param [Integer] width + # @param [Integer] height + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] pixels + # @return [nil] # @scope class attach_function :draw_pixels, :glDrawPixels, [:int, :int, :uint, :uint, :pointer], :void - # (Not documented) - # + # @method copy_pixels(x, y, width, height, type) - # @param [Integer] x - # @param [Integer] y - # @param [Integer] width - # @param [Integer] height - # @param [Integer] type - # @return [nil] + # @param [Integer] x + # @param [Integer] y + # @param [Integer] width + # @param [Integer] height + # @param [Integer] type + # @return [nil] # @scope class attach_function :copy_pixels, :glCopyPixels, [:int, :int, :int, :int, :uint], :void - # Stenciling - # + # @method stencil_func(func, ref, mask) - # @param [Integer] func - # @param [Integer] ref - # @param [Integer] mask - # @return [nil] + # @param [Integer] func + # @param [Integer] ref + # @param [Integer] mask + # @return [nil] # @scope class attach_function :stencil_func, :glStencilFunc, [:uint, :int, :uint], :void - # (Not documented) - # + # @method stencil_mask(mask) - # @param [Integer] mask - # @return [nil] + # @param [Integer] mask + # @return [nil] # @scope class attach_function :stencil_mask, :glStencilMask, [:uint], :void - # (Not documented) - # + # @method stencil_op(fail, zfail, zpass) - # @param [Integer] fail - # @param [Integer] zfail - # @param [Integer] zpass - # @return [nil] + # @param [Integer] fail + # @param [Integer] zfail + # @param [Integer] zpass + # @return [nil] # @scope class attach_function :stencil_op, :glStencilOp, [:uint, :uint, :uint], :void - # (Not documented) - # + # @method clear_stencil(s) - # @param [Integer] s - # @return [nil] + # @param [Integer] s + # @return [nil] # @scope class attach_function :clear_stencil, :glClearStencil, [:int], :void - # Texture mapping - # + # @method tex_gend(coord, pname, param) - # @param [Integer] coord - # @param [Integer] pname - # @param [Float] param - # @return [nil] + # @param [Integer] coord + # @param [Integer] pname + # @param [Float] param + # @return [nil] # @scope class attach_function :tex_gend, :glTexGend, [:uint, :uint, :double], :void - # (Not documented) - # + # @method tex_genf(coord, pname, param) - # @param [Integer] coord - # @param [Integer] pname - # @param [Float] param - # @return [nil] + # @param [Integer] coord + # @param [Integer] pname + # @param [Float] param + # @return [nil] # @scope class attach_function :tex_genf, :glTexGenf, [:uint, :uint, :float], :void - # (Not documented) - # + # @method tex_geni(coord, pname, param) - # @param [Integer] coord - # @param [Integer] pname - # @param [Integer] param - # @return [nil] + # @param [Integer] coord + # @param [Integer] pname + # @param [Integer] param + # @return [nil] # @scope class attach_function :tex_geni, :glTexGeni, [:uint, :uint, :int], :void - # (Not documented) - # + # @method tex_gendv(coord, pname, params) - # @param [Integer] coord - # @param [Integer] pname - # @param [FFI::Pointer(*GLdouble)] params - # @return [nil] + # @param [Integer] coord + # @param [Integer] pname + # @param [FFI::Pointer(*GLdouble)] params + # @return [nil] # @scope class attach_function :tex_gendv, :glTexGendv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method tex_genfv(coord, pname, params) - # @param [Integer] coord - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] coord + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :tex_genfv, :glTexGenfv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method tex_geniv(coord, pname, params) - # @param [Integer] coord - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] coord + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :tex_geniv, :glTexGeniv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_tex_gendv(coord, pname, params) - # @param [Integer] coord - # @param [Integer] pname - # @param [FFI::Pointer(*GLdouble)] params - # @return [nil] + # @param [Integer] coord + # @param [Integer] pname + # @param [FFI::Pointer(*GLdouble)] params + # @return [nil] # @scope class attach_function :get_tex_gendv, :glGetTexGendv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_tex_genfv(coord, pname, params) - # @param [Integer] coord - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] coord + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :get_tex_genfv, :glGetTexGenfv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_tex_geniv(coord, pname, params) - # @param [Integer] coord - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] coord + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :get_tex_geniv, :glGetTexGeniv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method tex_envf(target, pname, param) - # @param [Integer] target - # @param [Integer] pname - # @param [Float] param - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [Float] param + # @return [nil] # @scope class attach_function :tex_envf, :glTexEnvf, [:uint, :uint, :float], :void - # (Not documented) - # + # @method tex_envi(target, pname, param) - # @param [Integer] target - # @param [Integer] pname - # @param [Integer] param - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [Integer] param + # @return [nil] # @scope class attach_function :tex_envi, :glTexEnvi, [:uint, :uint, :int], :void - # (Not documented) - # + # @method tex_envfv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :tex_envfv, :glTexEnvfv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method tex_enviv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :tex_enviv, :glTexEnviv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_tex_envfv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :get_tex_envfv, :glGetTexEnvfv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_tex_enviv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :get_tex_enviv, :glGetTexEnviv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method tex_parameterf(target, pname, param) - # @param [Integer] target - # @param [Integer] pname - # @param [Float] param - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [Float] param + # @return [nil] # @scope class attach_function :tex_parameterf, :glTexParameterf, [:uint, :uint, :float], :void - # (Not documented) - # + # @method tex_parameteri(target, pname, param) - # @param [Integer] target - # @param [Integer] pname - # @param [Integer] param - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [Integer] param + # @return [nil] # @scope class attach_function :tex_parameteri, :glTexParameteri, [:uint, :uint, :int], :void - # (Not documented) - # + # @method tex_parameterfv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :tex_parameterfv, :glTexParameterfv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method tex_parameteriv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :tex_parameteriv, :glTexParameteriv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_tex_parameterfv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :get_tex_parameterfv, :glGetTexParameterfv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_tex_parameteriv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :get_tex_parameteriv, :glGetTexParameteriv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_tex_level_parameterfv(target, level, pname, params) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :get_tex_level_parameterfv, :glGetTexLevelParameterfv, [:uint, :int, :uint, :pointer], :void - # (Not documented) - # + # @method get_tex_level_parameteriv(target, level, pname, params) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :get_tex_level_parameteriv, :glGetTexLevelParameteriv, [:uint, :int, :uint, :pointer], :void - # (Not documented) - # + # @method tex_image1d(target, level, internal_format, width, border, format, type, pixels) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] internal_format - # @param [Integer] width - # @param [Integer] border - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] pixels - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] internal_format + # @param [Integer] width + # @param [Integer] border + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] pixels + # @return [nil] # @scope class attach_function :tex_image1d, :glTexImage1D, [:uint, :int, :int, :int, :int, :uint, :uint, :pointer], :void - # (Not documented) - # + # @method tex_image2d(target, level, internal_format, width, height, border, format, type, pixels) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] internal_format - # @param [Integer] width - # @param [Integer] height - # @param [Integer] border - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] pixels - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] internal_format + # @param [Integer] width + # @param [Integer] height + # @param [Integer] border + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] pixels + # @return [nil] # @scope class attach_function :tex_image2d, :glTexImage2D, [:uint, :int, :int, :int, :int, :int, :uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_tex_image(target, level, format, type, pixels) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] pixels - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] pixels + # @return [nil] # @scope class attach_function :get_tex_image, :glGetTexImage, [:uint, :int, :uint, :uint, :pointer], :void - # 1.1 functions - # + # @method gen_textures(n, textures) - # @param [Integer] n - # @param [FFI::Pointer(*GLuint)] textures - # @return [nil] + # @param [Integer] n + # @param [FFI::Pointer(*GLuint)] textures + # @return [nil] # @scope class attach_function :gen_textures, :glGenTextures, [:int, :pointer], :void - # (Not documented) - # + # @method delete_textures(n, textures) - # @param [Integer] n - # @param [FFI::Pointer(*GLuint)] textures - # @return [nil] + # @param [Integer] n + # @param [FFI::Pointer(*GLuint)] textures + # @return [nil] # @scope class attach_function :delete_textures, :glDeleteTextures, [:int, :pointer], :void - # (Not documented) - # + # @method bind_texture(target, texture) - # @param [Integer] target - # @param [Integer] texture - # @return [nil] + # @param [Integer] target + # @param [Integer] texture + # @return [nil] # @scope class attach_function :bind_texture, :glBindTexture, [:uint, :uint], :void - # (Not documented) - # + # @method prioritize_textures(n, textures, priorities) - # @param [Integer] n - # @param [FFI::Pointer(*GLuint)] textures - # @param [FFI::Pointer(*GLclampf)] priorities - # @return [nil] + # @param [Integer] n + # @param [FFI::Pointer(*GLuint)] textures + # @param [FFI::Pointer(*GLclampf)] priorities + # @return [nil] # @scope class attach_function :prioritize_textures, :glPrioritizeTextures, [:int, :pointer, :pointer], :void - # (Not documented) - # + # @method are_textures_resident(n, textures, residences) - # @param [Integer] n - # @param [FFI::Pointer(*GLuint)] textures - # @param [FFI::Pointer(*GLboolean)] residences - # @return [Integer] + # @param [Integer] n + # @param [FFI::Pointer(*GLuint)] textures + # @param [FFI::Pointer(*GLboolean)] residences + # @return [Integer] # @scope class attach_function :are_textures_resident, :glAreTexturesResident, [:int, :pointer, :pointer], :uchar - # (Not documented) - # + # @method is_texture(texture) - # @param [Integer] texture - # @return [Integer] + # @param [Integer] texture + # @return [Integer] # @scope class attach_function :is_texture, :glIsTexture, [:uint], :uchar - # (Not documented) - # + # @method tex_sub_image1d(target, level, xoffset, width, format, type, pixels) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] xoffset - # @param [Integer] width - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] pixels - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] xoffset + # @param [Integer] width + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] pixels + # @return [nil] # @scope class attach_function :tex_sub_image1d, :glTexSubImage1D, [:uint, :int, :int, :int, :uint, :uint, :pointer], :void - # (Not documented) - # + # @method tex_sub_image2d(target, level, xoffset, yoffset, width, height, format, type, pixels) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] xoffset - # @param [Integer] yoffset - # @param [Integer] width - # @param [Integer] height - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] pixels - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] xoffset + # @param [Integer] yoffset + # @param [Integer] width + # @param [Integer] height + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] pixels + # @return [nil] # @scope class attach_function :tex_sub_image2d, :glTexSubImage2D, [:uint, :int, :int, :int, :int, :int, :uint, :uint, :pointer], :void - # (Not documented) - # + # @method copy_tex_image1d(target, level, internalformat, x, y, width, border) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] internalformat - # @param [Integer] x - # @param [Integer] y - # @param [Integer] width - # @param [Integer] border - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] internalformat + # @param [Integer] x + # @param [Integer] y + # @param [Integer] width + # @param [Integer] border + # @return [nil] # @scope class attach_function :copy_tex_image1d, :glCopyTexImage1D, [:uint, :int, :uint, :int, :int, :int, :int], :void - # (Not documented) - # + # @method copy_tex_image2d(target, level, internalformat, x, y, width, height, border) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] internalformat - # @param [Integer] x - # @param [Integer] y - # @param [Integer] width - # @param [Integer] height - # @param [Integer] border - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] internalformat + # @param [Integer] x + # @param [Integer] y + # @param [Integer] width + # @param [Integer] height + # @param [Integer] border + # @return [nil] # @scope class attach_function :copy_tex_image2d, :glCopyTexImage2D, [:uint, :int, :uint, :int, :int, :int, :int, :int], :void - # (Not documented) - # + # @method copy_tex_sub_image1d(target, level, xoffset, x, y, width) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] xoffset - # @param [Integer] x - # @param [Integer] y - # @param [Integer] width - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] xoffset + # @param [Integer] x + # @param [Integer] y + # @param [Integer] width + # @return [nil] # @scope class attach_function :copy_tex_sub_image1d, :glCopyTexSubImage1D, [:uint, :int, :int, :int, :int, :int], :void - # (Not documented) - # + # @method copy_tex_sub_image2d(target, level, xoffset, yoffset, x, y, width, height) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] xoffset - # @param [Integer] yoffset - # @param [Integer] x - # @param [Integer] y - # @param [Integer] width - # @param [Integer] height - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] xoffset + # @param [Integer] yoffset + # @param [Integer] x + # @param [Integer] y + # @param [Integer] width + # @param [Integer] height + # @return [nil] # @scope class attach_function :copy_tex_sub_image2d, :glCopyTexSubImage2D, [:uint, :int, :int, :int, :int, :int, :int, :int], :void - # Evaluators - # + # @method map1d(target, u1, u2, stride, order, points) - # @param [Integer] target - # @param [Float] u1 - # @param [Float] u2 - # @param [Integer] stride - # @param [Integer] order - # @param [FFI::Pointer(*GLdouble)] points - # @return [nil] + # @param [Integer] target + # @param [Float] u1 + # @param [Float] u2 + # @param [Integer] stride + # @param [Integer] order + # @param [FFI::Pointer(*GLdouble)] points + # @return [nil] # @scope class attach_function :map1d, :glMap1d, [:uint, :double, :double, :int, :int, :pointer], :void - # (Not documented) - # + # @method map1f(target, u1, u2, stride, order, points) - # @param [Integer] target - # @param [Float] u1 - # @param [Float] u2 - # @param [Integer] stride - # @param [Integer] order - # @param [FFI::Pointer(*GLfloat)] points - # @return [nil] + # @param [Integer] target + # @param [Float] u1 + # @param [Float] u2 + # @param [Integer] stride + # @param [Integer] order + # @param [FFI::Pointer(*GLfloat)] points + # @return [nil] # @scope class attach_function :map1f, :glMap1f, [:uint, :float, :float, :int, :int, :pointer], :void - # (Not documented) - # + # @method map2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points) - # @param [Integer] target - # @param [Float] u1 - # @param [Float] u2 - # @param [Integer] ustride - # @param [Integer] uorder - # @param [Float] v1 - # @param [Float] v2 - # @param [Integer] vstride - # @param [Integer] vorder - # @param [FFI::Pointer(*GLdouble)] points - # @return [nil] + # @param [Integer] target + # @param [Float] u1 + # @param [Float] u2 + # @param [Integer] ustride + # @param [Integer] uorder + # @param [Float] v1 + # @param [Float] v2 + # @param [Integer] vstride + # @param [Integer] vorder + # @param [FFI::Pointer(*GLdouble)] points + # @return [nil] # @scope class attach_function :map2d, :glMap2d, [:uint, :double, :double, :int, :int, :double, :double, :int, :int, :pointer], :void - # (Not documented) - # + # @method map2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points) - # @param [Integer] target - # @param [Float] u1 - # @param [Float] u2 - # @param [Integer] ustride - # @param [Integer] uorder - # @param [Float] v1 - # @param [Float] v2 - # @param [Integer] vstride - # @param [Integer] vorder - # @param [FFI::Pointer(*GLfloat)] points - # @return [nil] + # @param [Integer] target + # @param [Float] u1 + # @param [Float] u2 + # @param [Integer] ustride + # @param [Integer] uorder + # @param [Float] v1 + # @param [Float] v2 + # @param [Integer] vstride + # @param [Integer] vorder + # @param [FFI::Pointer(*GLfloat)] points + # @return [nil] # @scope class attach_function :map2f, :glMap2f, [:uint, :float, :float, :int, :int, :float, :float, :int, :int, :pointer], :void - # (Not documented) - # + # @method get_mapdv(target, query, v) - # @param [Integer] target - # @param [Integer] query - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [Integer] target + # @param [Integer] query + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :get_mapdv, :glGetMapdv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_mapfv(target, query, v) - # @param [Integer] target - # @param [Integer] query - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [Integer] target + # @param [Integer] query + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :get_mapfv, :glGetMapfv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_mapiv(target, query, v) - # @param [Integer] target - # @param [Integer] query - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [Integer] target + # @param [Integer] query + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :get_mapiv, :glGetMapiv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method eval_coord1d(u) - # @param [Float] u - # @return [nil] + # @param [Float] u + # @return [nil] # @scope class attach_function :eval_coord1d, :glEvalCoord1d, [:double], :void - # (Not documented) - # + # @method eval_coord1f(u) - # @param [Float] u - # @return [nil] + # @param [Float] u + # @return [nil] # @scope class attach_function :eval_coord1f, :glEvalCoord1f, [:float], :void - # (Not documented) - # + # @method eval_coord1dv(u) - # @param [FFI::Pointer(*GLdouble)] u - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] u + # @return [nil] # @scope class attach_function :eval_coord1dv, :glEvalCoord1dv, [:pointer], :void - # (Not documented) - # + # @method eval_coord1fv(u) - # @param [FFI::Pointer(*GLfloat)] u - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] u + # @return [nil] # @scope class attach_function :eval_coord1fv, :glEvalCoord1fv, [:pointer], :void - # (Not documented) - # + # @method eval_coord2d(u, v) - # @param [Float] u - # @param [Float] v - # @return [nil] + # @param [Float] u + # @param [Float] v + # @return [nil] # @scope class attach_function :eval_coord2d, :glEvalCoord2d, [:double, :double], :void - # (Not documented) - # + # @method eval_coord2f(u, v) - # @param [Float] u - # @param [Float] v - # @return [nil] + # @param [Float] u + # @param [Float] v + # @return [nil] # @scope class attach_function :eval_coord2f, :glEvalCoord2f, [:float, :float], :void - # (Not documented) - # + # @method eval_coord2dv(u) - # @param [FFI::Pointer(*GLdouble)] u - # @return [nil] + # @param [FFI::Pointer(*GLdouble)] u + # @return [nil] # @scope class attach_function :eval_coord2dv, :glEvalCoord2dv, [:pointer], :void - # (Not documented) - # + # @method eval_coord2fv(u) - # @param [FFI::Pointer(*GLfloat)] u - # @return [nil] + # @param [FFI::Pointer(*GLfloat)] u + # @return [nil] # @scope class attach_function :eval_coord2fv, :glEvalCoord2fv, [:pointer], :void - # (Not documented) - # + # @method map_grid1d(un, u1, u2) - # @param [Integer] un - # @param [Float] u1 - # @param [Float] u2 - # @return [nil] + # @param [Integer] un + # @param [Float] u1 + # @param [Float] u2 + # @return [nil] # @scope class attach_function :map_grid1d, :glMapGrid1d, [:int, :double, :double], :void - # (Not documented) - # + # @method map_grid1f(un, u1, u2) - # @param [Integer] un - # @param [Float] u1 - # @param [Float] u2 - # @return [nil] + # @param [Integer] un + # @param [Float] u1 + # @param [Float] u2 + # @return [nil] # @scope class attach_function :map_grid1f, :glMapGrid1f, [:int, :float, :float], :void - # (Not documented) - # + # @method map_grid2d(un, u1, u2, vn, v1, v2) - # @param [Integer] un - # @param [Float] u1 - # @param [Float] u2 - # @param [Integer] vn - # @param [Float] v1 - # @param [Float] v2 - # @return [nil] + # @param [Integer] un + # @param [Float] u1 + # @param [Float] u2 + # @param [Integer] vn + # @param [Float] v1 + # @param [Float] v2 + # @return [nil] # @scope class attach_function :map_grid2d, :glMapGrid2d, [:int, :double, :double, :int, :double, :double], :void - # (Not documented) - # + # @method map_grid2f(un, u1, u2, vn, v1, v2) - # @param [Integer] un - # @param [Float] u1 - # @param [Float] u2 - # @param [Integer] vn - # @param [Float] v1 - # @param [Float] v2 - # @return [nil] + # @param [Integer] un + # @param [Float] u1 + # @param [Float] u2 + # @param [Integer] vn + # @param [Float] v1 + # @param [Float] v2 + # @return [nil] # @scope class attach_function :map_grid2f, :glMapGrid2f, [:int, :float, :float, :int, :float, :float], :void - # (Not documented) - # + # @method eval_point1(i) - # @param [Integer] i - # @return [nil] + # @param [Integer] i + # @return [nil] # @scope class attach_function :eval_point1, :glEvalPoint1, [:int], :void - # (Not documented) - # + # @method eval_point2(i, j) - # @param [Integer] i - # @param [Integer] j - # @return [nil] + # @param [Integer] i + # @param [Integer] j + # @return [nil] # @scope class attach_function :eval_point2, :glEvalPoint2, [:int, :int], :void - # (Not documented) - # + # @method eval_mesh1(mode, i1, i2) - # @param [Integer] mode - # @param [Integer] i1 - # @param [Integer] i2 - # @return [nil] + # @param [Integer] mode + # @param [Integer] i1 + # @param [Integer] i2 + # @return [nil] # @scope class attach_function :eval_mesh1, :glEvalMesh1, [:uint, :int, :int], :void - # (Not documented) - # + # @method eval_mesh2(mode, i1, i2, j1, j2) - # @param [Integer] mode - # @param [Integer] i1 - # @param [Integer] i2 - # @param [Integer] j1 - # @param [Integer] j2 - # @return [nil] + # @param [Integer] mode + # @param [Integer] i1 + # @param [Integer] i2 + # @param [Integer] j1 + # @param [Integer] j2 + # @return [nil] # @scope class attach_function :eval_mesh2, :glEvalMesh2, [:uint, :int, :int, :int, :int], :void - # Fog - # + # @method fogf(pname, param) - # @param [Integer] pname - # @param [Float] param - # @return [nil] + # @param [Integer] pname + # @param [Float] param + # @return [nil] # @scope class attach_function :fogf, :glFogf, [:uint, :float], :void - # (Not documented) - # + # @method fogi(pname, param) - # @param [Integer] pname - # @param [Integer] param - # @return [nil] + # @param [Integer] pname + # @param [Integer] param + # @return [nil] # @scope class attach_function :fogi, :glFogi, [:uint, :int], :void - # (Not documented) - # + # @method fogfv(pname, params) - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :fogfv, :glFogfv, [:uint, :pointer], :void - # (Not documented) - # + # @method fogiv(pname, params) - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :fogiv, :glFogiv, [:uint, :pointer], :void - # Selection and Feedback - # + # @method feedback_buffer(size, type, buffer) - # @param [Integer] size - # @param [Integer] type - # @param [FFI::Pointer(*GLfloat)] buffer - # @return [nil] + # @param [Integer] size + # @param [Integer] type + # @param [FFI::Pointer(*GLfloat)] buffer + # @return [nil] # @scope class attach_function :feedback_buffer, :glFeedbackBuffer, [:int, :uint, :pointer], :void - # (Not documented) - # + # @method pass_through(token) - # @param [Float] token - # @return [nil] + # @param [Float] token + # @return [nil] # @scope class attach_function :pass_through, :glPassThrough, [:float], :void - # (Not documented) - # + # @method select_buffer(size, buffer) - # @param [Integer] size - # @param [FFI::Pointer(*GLuint)] buffer - # @return [nil] + # @param [Integer] size + # @param [FFI::Pointer(*GLuint)] buffer + # @return [nil] # @scope class attach_function :select_buffer, :glSelectBuffer, [:int, :pointer], :void - # (Not documented) - # + # @method init_names() - # @return [nil] + # @return [nil] # @scope class attach_function :init_names, :glInitNames, [], :void - # (Not documented) - # + # @method load_name(name) - # @param [Integer] name - # @return [nil] + # @param [Integer] name + # @return [nil] # @scope class attach_function :load_name, :glLoadName, [:uint], :void - # (Not documented) - # + # @method push_name(name) - # @param [Integer] name - # @return [nil] + # @param [Integer] name + # @return [nil] # @scope class attach_function :push_name, :glPushName, [:uint], :void - # (Not documented) - # + # @method pop_name() - # @return [nil] + # @return [nil] # @scope class attach_function :pop_name, :glPopName, [], :void - # OpenGL 1.2 - # + # @method draw_range_elements(mode, start, end_, count, type, indices) - # @param [Integer] mode - # @param [Integer] start - # @param [Integer] end_ - # @param [Integer] count - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] indices - # @return [nil] + # @param [Integer] mode + # @param [Integer] start + # @param [Integer] end_ + # @param [Integer] count + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] indices + # @return [nil] # @scope class attach_function :draw_range_elements, :glDrawRangeElements, [:uint, :uint, :uint, :int, :uint, :pointer], :void - # (Not documented) - # + # @method tex_image3d(target, level, internal_format, width, height, depth, border, format, type, pixels) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] internal_format - # @param [Integer] width - # @param [Integer] height - # @param [Integer] depth - # @param [Integer] border - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] pixels - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] internal_format + # @param [Integer] width + # @param [Integer] height + # @param [Integer] depth + # @param [Integer] border + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] pixels + # @return [nil] # @scope class attach_function :tex_image3d, :glTexImage3D, [:uint, :int, :int, :int, :int, :int, :int, :uint, :uint, :pointer], :void - # (Not documented) - # + # @method tex_sub_image3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] xoffset - # @param [Integer] yoffset - # @param [Integer] zoffset - # @param [Integer] width - # @param [Integer] height - # @param [Integer] depth - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] pixels - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] xoffset + # @param [Integer] yoffset + # @param [Integer] zoffset + # @param [Integer] width + # @param [Integer] height + # @param [Integer] depth + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] pixels + # @return [nil] # @scope class attach_function :tex_sub_image3d, :glTexSubImage3D, [:uint, :int, :int, :int, :int, :int, :int, :int, :uint, :uint, :pointer], :void - # (Not documented) - # + # @method copy_tex_sub_image3d(target, level, xoffset, yoffset, zoffset, x, y, width, height) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] xoffset - # @param [Integer] yoffset - # @param [Integer] zoffset - # @param [Integer] x - # @param [Integer] y - # @param [Integer] width - # @param [Integer] height - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] xoffset + # @param [Integer] yoffset + # @param [Integer] zoffset + # @param [Integer] x + # @param [Integer] y + # @param [Integer] width + # @param [Integer] height + # @return [nil] # @scope class attach_function :copy_tex_sub_image3d, :glCopyTexSubImage3D, [:uint, :int, :int, :int, :int, :int, :int, :int, :int], :void - # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfngldrawrangeelementsproc_(start, end_, count, type, indices) - # @param [Integer] start - # @param [Integer] end_ - # @param [Integer] count - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] indices - # @return [Integer] - # @scope class - callback :pfngldrawrangeelementsproc, [:uint, :uint, :int, :uint, :pointer], :uint - - # (Not documented) - # + + # @method _callback_pfngldrawrangeelementsproc_(mode, start, end_, count, type, indices) + # @param [Integer] mode + # @param [Integer] start + # @param [Integer] end_ + # @param [Integer] count + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] indices + # @return [Integer] + # @scope class + callback :pfngldrawrangeelementsproc, [:uint, :uint, :uint, :int, :uint, :pointer], :uint + + # (Not documented) + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglteximage3dproc_(level, internalformat, width, height, depth, border, format, type, pixels) - # @param [Integer] level - # @param [Integer] internalformat - # @param [Integer] width - # @param [Integer] height - # @param [Integer] depth - # @param [Integer] border - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] pixels - # @return [Integer] - # @scope class - callback :pfnglteximage3dproc, [:int, :int, :int, :int, :int, :int, :uint, :uint, :pointer], :uint - - # (Not documented) - # + + # @method _callback_pfnglteximage3dproc_(target, level, internalformat, width, height, depth, border, format, type, pixels) + # @param [Integer] target + # @param [Integer] level + # @param [Integer] internalformat + # @param [Integer] width + # @param [Integer] height + # @param [Integer] depth + # @param [Integer] border + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] pixels + # @return [Integer] + # @scope class + callback :pfnglteximage3dproc, [:uint, :int, :int, :int, :int, :int, :int, :uint, :uint, :pointer], :uint + + # (Not documented) + # This entry is only for documentation and no real method. - # - # @method _callback_pfngltexsubimage3dproc_(level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels) - # @param [Integer] level - # @param [Integer] xoffset - # @param [Integer] yoffset - # @param [Integer] zoffset - # @param [Integer] width - # @param [Integer] height - # @param [Integer] depth - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] pixels - # @return [Integer] - # @scope class - callback :pfngltexsubimage3dproc, [:int, :int, :int, :int, :int, :int, :int, :uint, :uint, :pointer], :uint - - # (Not documented) - # + + # @method _callback_pfngltexsubimage3dproc_(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels) + # @param [Integer] target + # @param [Integer] level + # @param [Integer] xoffset + # @param [Integer] yoffset + # @param [Integer] zoffset + # @param [Integer] width + # @param [Integer] height + # @param [Integer] depth + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] pixels + # @return [Integer] + # @scope class + callback :pfngltexsubimage3dproc, [:uint, :int, :int, :int, :int, :int, :int, :int, :uint, :uint, :pointer], :uint + + # (Not documented) + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglcopytexsubimage3dproc_(level, xoffset, yoffset, zoffset, x, y, width, height) - # @param [Integer] level - # @param [Integer] xoffset - # @param [Integer] yoffset - # @param [Integer] zoffset - # @param [Integer] x - # @param [Integer] y - # @param [Integer] width - # @param [Integer] height - # @return [Integer] - # @scope class - callback :pfnglcopytexsubimage3dproc, [:int, :int, :int, :int, :int, :int, :int, :int], :uint - + + # @method _callback_pfnglcopytexsubimage3dproc_(target, level, xoffset, yoffset, zoffset, x, y, width, height) + # @param [Integer] target + # @param [Integer] level + # @param [Integer] xoffset + # @param [Integer] yoffset + # @param [Integer] zoffset + # @param [Integer] x + # @param [Integer] y + # @param [Integer] width + # @param [Integer] height + # @return [Integer] + # @scope class + callback :pfnglcopytexsubimage3dproc, [:uint, :int, :int, :int, :int, :int, :int, :int, :int], :uint + # GL_ARB_imaging - # + # @method color_table(target, internalformat, width, format, type, table) - # @param [Integer] target - # @param [Integer] internalformat - # @param [Integer] width - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] table - # @return [nil] + # @param [Integer] target + # @param [Integer] internalformat + # @param [Integer] width + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] table + # @return [nil] # @scope class attach_function :color_table, :glColorTable, [:uint, :uint, :int, :uint, :uint, :pointer], :void - # (Not documented) - # + # @method color_sub_table(target, start, count, format, type, data) - # @param [Integer] target - # @param [Integer] start - # @param [Integer] count - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] data - # @return [nil] + # @param [Integer] target + # @param [Integer] start + # @param [Integer] count + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] data + # @return [nil] # @scope class attach_function :color_sub_table, :glColorSubTable, [:uint, :int, :int, :uint, :uint, :pointer], :void - # (Not documented) - # + # @method color_table_parameteriv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :color_table_parameteriv, :glColorTableParameteriv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method color_table_parameterfv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :color_table_parameterfv, :glColorTableParameterfv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method copy_color_sub_table(target, start, x, y, width) - # @param [Integer] target - # @param [Integer] start - # @param [Integer] x - # @param [Integer] y - # @param [Integer] width - # @return [nil] + # @param [Integer] target + # @param [Integer] start + # @param [Integer] x + # @param [Integer] y + # @param [Integer] width + # @return [nil] # @scope class attach_function :copy_color_sub_table, :glCopyColorSubTable, [:uint, :int, :int, :int, :int], :void - # (Not documented) - # + # @method copy_color_table(target, internalformat, x, y, width) - # @param [Integer] target - # @param [Integer] internalformat - # @param [Integer] x - # @param [Integer] y - # @param [Integer] width - # @return [nil] + # @param [Integer] target + # @param [Integer] internalformat + # @param [Integer] x + # @param [Integer] y + # @param [Integer] width + # @return [nil] # @scope class attach_function :copy_color_table, :glCopyColorTable, [:uint, :uint, :int, :int, :int], :void - # (Not documented) - # + # @method get_color_table(target, format, type, table) - # @param [Integer] target - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] table - # @return [nil] + # @param [Integer] target + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] table + # @return [nil] # @scope class attach_function :get_color_table, :glGetColorTable, [:uint, :uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_color_table_parameterfv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :get_color_table_parameterfv, :glGetColorTableParameterfv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_color_table_parameteriv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :get_color_table_parameteriv, :glGetColorTableParameteriv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method blend_equation(mode) - # @param [Integer] mode - # @return [nil] + # @param [Integer] mode + # @return [nil] # @scope class attach_function :blend_equation, :glBlendEquation, [:uint], :void - # (Not documented) - # + # @method blend_color(red, green, blue, alpha) - # @param [Float] red - # @param [Float] green - # @param [Float] blue - # @param [Float] alpha - # @return [nil] + # @param [Float] red + # @param [Float] green + # @param [Float] blue + # @param [Float] alpha + # @return [nil] # @scope class attach_function :blend_color, :glBlendColor, [:float, :float, :float, :float], :void - # (Not documented) - # + # @method histogram(target, width, internalformat, sink) - # @param [Integer] target - # @param [Integer] width - # @param [Integer] internalformat - # @param [Integer] sink - # @return [nil] + # @param [Integer] target + # @param [Integer] width + # @param [Integer] internalformat + # @param [Integer] sink + # @return [nil] # @scope class attach_function :histogram, :glHistogram, [:uint, :int, :uint, :uchar], :void - # (Not documented) - # + # @method reset_histogram(target) - # @param [Integer] target - # @return [nil] + # @param [Integer] target + # @return [nil] # @scope class attach_function :reset_histogram, :glResetHistogram, [:uint], :void - # (Not documented) - # + # @method get_histogram(target, reset, format, type, values) - # @param [Integer] target - # @param [Integer] reset - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] values - # @return [nil] + # @param [Integer] target + # @param [Integer] reset + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] values + # @return [nil] # @scope class attach_function :get_histogram, :glGetHistogram, [:uint, :uchar, :uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_histogram_parameterfv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :get_histogram_parameterfv, :glGetHistogramParameterfv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_histogram_parameteriv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :get_histogram_parameteriv, :glGetHistogramParameteriv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method minmax(target, internalformat, sink) - # @param [Integer] target - # @param [Integer] internalformat - # @param [Integer] sink - # @return [nil] + # @param [Integer] target + # @param [Integer] internalformat + # @param [Integer] sink + # @return [nil] # @scope class attach_function :minmax, :glMinmax, [:uint, :uint, :uchar], :void - # (Not documented) - # + # @method reset_minmax(target) - # @param [Integer] target - # @return [nil] + # @param [Integer] target + # @return [nil] # @scope class attach_function :reset_minmax, :glResetMinmax, [:uint], :void - # (Not documented) - # + # @method get_minmax(target, reset, format, types, values) - # @param [Integer] target - # @param [Integer] reset - # @param [Integer] format - # @param [Integer] types - # @param [FFI::Pointer(*GLvoid)] values - # @return [nil] + # @param [Integer] target + # @param [Integer] reset + # @param [Integer] format + # @param [Integer] types + # @param [FFI::Pointer(*GLvoid)] values + # @return [nil] # @scope class attach_function :get_minmax, :glGetMinmax, [:uint, :uchar, :uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_minmax_parameterfv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :get_minmax_parameterfv, :glGetMinmaxParameterfv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_minmax_parameteriv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :get_minmax_parameteriv, :glGetMinmaxParameteriv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method convolution_filter1d(target, internalformat, width, format, type, image) - # @param [Integer] target - # @param [Integer] internalformat - # @param [Integer] width - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] image - # @return [nil] + # @param [Integer] target + # @param [Integer] internalformat + # @param [Integer] width + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] image + # @return [nil] # @scope class attach_function :convolution_filter1d, :glConvolutionFilter1D, [:uint, :uint, :int, :uint, :uint, :pointer], :void - # (Not documented) - # + # @method convolution_filter2d(target, internalformat, width, height, format, type, image) - # @param [Integer] target - # @param [Integer] internalformat - # @param [Integer] width - # @param [Integer] height - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] image - # @return [nil] + # @param [Integer] target + # @param [Integer] internalformat + # @param [Integer] width + # @param [Integer] height + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] image + # @return [nil] # @scope class attach_function :convolution_filter2d, :glConvolutionFilter2D, [:uint, :uint, :int, :int, :uint, :uint, :pointer], :void - # (Not documented) - # + # @method convolution_parameterf(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [Float] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [Float] params + # @return [nil] # @scope class attach_function :convolution_parameterf, :glConvolutionParameterf, [:uint, :uint, :float], :void - # (Not documented) - # + # @method convolution_parameterfv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :convolution_parameterfv, :glConvolutionParameterfv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method convolution_parameteri(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [Integer] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [Integer] params + # @return [nil] # @scope class attach_function :convolution_parameteri, :glConvolutionParameteri, [:uint, :uint, :int], :void - # (Not documented) - # + # @method convolution_parameteriv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :convolution_parameteriv, :glConvolutionParameteriv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method copy_convolution_filter1d(target, internalformat, x, y, width) - # @param [Integer] target - # @param [Integer] internalformat - # @param [Integer] x - # @param [Integer] y - # @param [Integer] width - # @return [nil] + # @param [Integer] target + # @param [Integer] internalformat + # @param [Integer] x + # @param [Integer] y + # @param [Integer] width + # @return [nil] # @scope class attach_function :copy_convolution_filter1d, :glCopyConvolutionFilter1D, [:uint, :uint, :int, :int, :int], :void - # (Not documented) - # + # @method copy_convolution_filter2d(target, internalformat, x, y, width, height) - # @param [Integer] target - # @param [Integer] internalformat - # @param [Integer] x - # @param [Integer] y - # @param [Integer] width - # @param [Integer] height - # @return [nil] + # @param [Integer] target + # @param [Integer] internalformat + # @param [Integer] x + # @param [Integer] y + # @param [Integer] width + # @param [Integer] height + # @return [nil] # @scope class attach_function :copy_convolution_filter2d, :glCopyConvolutionFilter2D, [:uint, :uint, :int, :int, :int, :int], :void - # (Not documented) - # + # @method get_convolution_filter(target, format, type, image) - # @param [Integer] target - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] image - # @return [nil] + # @param [Integer] target + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] image + # @return [nil] # @scope class attach_function :get_convolution_filter, :glGetConvolutionFilter, [:uint, :uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_convolution_parameterfv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLfloat)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLfloat)] params + # @return [nil] # @scope class attach_function :get_convolution_parameterfv, :glGetConvolutionParameterfv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method get_convolution_parameteriv(target, pname, params) - # @param [Integer] target - # @param [Integer] pname - # @param [FFI::Pointer(*GLint)] params - # @return [nil] + # @param [Integer] target + # @param [Integer] pname + # @param [FFI::Pointer(*GLint)] params + # @return [nil] # @scope class attach_function :get_convolution_parameteriv, :glGetConvolutionParameteriv, [:uint, :uint, :pointer], :void - # (Not documented) - # + # @method separable_filter2d(target, internalformat, width, height, format, type, row, column) - # @param [Integer] target - # @param [Integer] internalformat - # @param [Integer] width - # @param [Integer] height - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] row - # @param [FFI::Pointer(*GLvoid)] column - # @return [nil] + # @param [Integer] target + # @param [Integer] internalformat + # @param [Integer] width + # @param [Integer] height + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] row + # @param [FFI::Pointer(*GLvoid)] column + # @return [nil] # @scope class attach_function :separable_filter2d, :glSeparableFilter2D, [:uint, :uint, :int, :int, :uint, :uint, :pointer, :pointer], :void - # (Not documented) - # + # @method get_separable_filter(target, format, type, row, column, span) - # @param [Integer] target - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*GLvoid)] row - # @param [FFI::Pointer(*GLvoid)] column - # @param [FFI::Pointer(*GLvoid)] span - # @return [nil] + # @param [Integer] target + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*GLvoid)] row + # @param [FFI::Pointer(*GLvoid)] column + # @param [FFI::Pointer(*GLvoid)] span + # @return [nil] # @scope class attach_function :get_separable_filter, :glGetSeparableFilter, [:uint, :uint, :uint, :pointer, :pointer, :pointer], :void - # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglblendcolorproc_(green, blue, alpha) - # @param [Float] green - # @param [Float] blue - # @param [Float] alpha - # @return [Float] - # @scope class - callback :pfnglblendcolorproc, [:float, :float, :float], :float - + + # @method _callback_pfnglblendcolorproc_(red, green, blue, alpha) + # @param [Float] red + # @param [Float] green + # @param [Float] blue + # @param [Float] alpha + # @return [Float] + # @scope class + callback :pfnglblendcolorproc, [:float, :float, :float, :float], :float + # texture_border_clamp - # + # @method active_texture(texture) - # @param [Integer] texture - # @return [nil] + # @param [Integer] texture + # @return [nil] # @scope class attach_function :active_texture, :glActiveTexture, [:uint], :void - # (Not documented) - # + # @method client_active_texture(texture) - # @param [Integer] texture - # @return [nil] + # @param [Integer] texture + # @return [nil] # @scope class attach_function :client_active_texture, :glClientActiveTexture, [:uint], :void - # (Not documented) - # + # @method compressed_tex_image1d(target, level, internalformat, width, border, image_size, data) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] internalformat - # @param [Integer] width - # @param [Integer] border - # @param [Integer] image_size - # @param [FFI::Pointer(*GLvoid)] data - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] internalformat + # @param [Integer] width + # @param [Integer] border + # @param [Integer] image_size + # @param [FFI::Pointer(*GLvoid)] data + # @return [nil] # @scope class attach_function :compressed_tex_image1d, :glCompressedTexImage1D, [:uint, :int, :uint, :int, :int, :int, :pointer], :void - # (Not documented) - # + # @method compressed_tex_image2d(target, level, internalformat, width, height, border, image_size, data) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] internalformat - # @param [Integer] width - # @param [Integer] height - # @param [Integer] border - # @param [Integer] image_size - # @param [FFI::Pointer(*GLvoid)] data - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] internalformat + # @param [Integer] width + # @param [Integer] height + # @param [Integer] border + # @param [Integer] image_size + # @param [FFI::Pointer(*GLvoid)] data + # @return [nil] # @scope class attach_function :compressed_tex_image2d, :glCompressedTexImage2D, [:uint, :int, :uint, :int, :int, :int, :int, :pointer], :void - # (Not documented) - # + # @method compressed_tex_image3d(target, level, internalformat, width, height, depth, border, image_size, data) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] internalformat - # @param [Integer] width - # @param [Integer] height - # @param [Integer] depth - # @param [Integer] border - # @param [Integer] image_size - # @param [FFI::Pointer(*GLvoid)] data - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] internalformat + # @param [Integer] width + # @param [Integer] height + # @param [Integer] depth + # @param [Integer] border + # @param [Integer] image_size + # @param [FFI::Pointer(*GLvoid)] data + # @return [nil] # @scope class attach_function :compressed_tex_image3d, :glCompressedTexImage3D, [:uint, :int, :uint, :int, :int, :int, :int, :int, :pointer], :void - # (Not documented) - # + # @method compressed_tex_sub_image1d(target, level, xoffset, width, format, image_size, data) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] xoffset - # @param [Integer] width - # @param [Integer] format - # @param [Integer] image_size - # @param [FFI::Pointer(*GLvoid)] data - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] xoffset + # @param [Integer] width + # @param [Integer] format + # @param [Integer] image_size + # @param [FFI::Pointer(*GLvoid)] data + # @return [nil] # @scope class attach_function :compressed_tex_sub_image1d, :glCompressedTexSubImage1D, [:uint, :int, :int, :int, :uint, :int, :pointer], :void - # (Not documented) - # + # @method compressed_tex_sub_image2d(target, level, xoffset, yoffset, width, height, format, image_size, data) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] xoffset - # @param [Integer] yoffset - # @param [Integer] width - # @param [Integer] height - # @param [Integer] format - # @param [Integer] image_size - # @param [FFI::Pointer(*GLvoid)] data - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] xoffset + # @param [Integer] yoffset + # @param [Integer] width + # @param [Integer] height + # @param [Integer] format + # @param [Integer] image_size + # @param [FFI::Pointer(*GLvoid)] data + # @return [nil] # @scope class attach_function :compressed_tex_sub_image2d, :glCompressedTexSubImage2D, [:uint, :int, :int, :int, :int, :int, :uint, :int, :pointer], :void - # (Not documented) - # + # @method compressed_tex_sub_image3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, image_size, data) - # @param [Integer] target - # @param [Integer] level - # @param [Integer] xoffset - # @param [Integer] yoffset - # @param [Integer] zoffset - # @param [Integer] width - # @param [Integer] height - # @param [Integer] depth - # @param [Integer] format - # @param [Integer] image_size - # @param [FFI::Pointer(*GLvoid)] data - # @return [nil] + # @param [Integer] target + # @param [Integer] level + # @param [Integer] xoffset + # @param [Integer] yoffset + # @param [Integer] zoffset + # @param [Integer] width + # @param [Integer] height + # @param [Integer] depth + # @param [Integer] format + # @param [Integer] image_size + # @param [FFI::Pointer(*GLvoid)] data + # @return [nil] # @scope class attach_function :compressed_tex_sub_image3d, :glCompressedTexSubImage3D, [:uint, :int, :int, :int, :int, :int, :int, :int, :uint, :int, :pointer], :void - # (Not documented) - # + # @method get_compressed_tex_image(target, lod, img) - # @param [Integer] target - # @param [Integer] lod - # @param [FFI::Pointer(*GLvoid)] img - # @return [nil] + # @param [Integer] target + # @param [Integer] lod + # @param [FFI::Pointer(*GLvoid)] img + # @return [nil] # @scope class attach_function :get_compressed_tex_image, :glGetCompressedTexImage, [:uint, :int, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord1d(target, s) - # @param [Integer] target - # @param [Float] s - # @return [nil] + # @param [Integer] target + # @param [Float] s + # @return [nil] # @scope class attach_function :multi_tex_coord1d, :glMultiTexCoord1d, [:uint, :double], :void - # (Not documented) - # + # @method multi_tex_coord1dv(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :multi_tex_coord1dv, :glMultiTexCoord1dv, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord1f(target, s) - # @param [Integer] target - # @param [Float] s - # @return [nil] + # @param [Integer] target + # @param [Float] s + # @return [nil] # @scope class attach_function :multi_tex_coord1f, :glMultiTexCoord1f, [:uint, :float], :void - # (Not documented) - # + # @method multi_tex_coord1fv(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :multi_tex_coord1fv, :glMultiTexCoord1fv, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord1i(target, s) - # @param [Integer] target - # @param [Integer] s - # @return [nil] + # @param [Integer] target + # @param [Integer] s + # @return [nil] # @scope class attach_function :multi_tex_coord1i, :glMultiTexCoord1i, [:uint, :int], :void - # (Not documented) - # + # @method multi_tex_coord1iv(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :multi_tex_coord1iv, :glMultiTexCoord1iv, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord1s(target, s) - # @param [Integer] target - # @param [Integer] s - # @return [nil] + # @param [Integer] target + # @param [Integer] s + # @return [nil] # @scope class attach_function :multi_tex_coord1s, :glMultiTexCoord1s, [:uint, :short], :void - # (Not documented) - # + # @method multi_tex_coord1sv(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :multi_tex_coord1sv, :glMultiTexCoord1sv, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord2d(target, s, t) - # @param [Integer] target - # @param [Float] s - # @param [Float] t - # @return [nil] + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @return [nil] # @scope class attach_function :multi_tex_coord2d, :glMultiTexCoord2d, [:uint, :double, :double], :void - # (Not documented) - # + # @method multi_tex_coord2dv(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :multi_tex_coord2dv, :glMultiTexCoord2dv, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord2f(target, s, t) - # @param [Integer] target - # @param [Float] s - # @param [Float] t - # @return [nil] + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @return [nil] # @scope class attach_function :multi_tex_coord2f, :glMultiTexCoord2f, [:uint, :float, :float], :void - # (Not documented) - # + # @method multi_tex_coord2fv(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :multi_tex_coord2fv, :glMultiTexCoord2fv, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord2i(target, s, t) - # @param [Integer] target - # @param [Integer] s - # @param [Integer] t - # @return [nil] + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @return [nil] # @scope class attach_function :multi_tex_coord2i, :glMultiTexCoord2i, [:uint, :int, :int], :void - # (Not documented) - # + # @method multi_tex_coord2iv(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :multi_tex_coord2iv, :glMultiTexCoord2iv, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord2s(target, s, t) - # @param [Integer] target - # @param [Integer] s - # @param [Integer] t - # @return [nil] + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @return [nil] # @scope class attach_function :multi_tex_coord2s, :glMultiTexCoord2s, [:uint, :short, :short], :void - # (Not documented) - # + # @method multi_tex_coord2sv(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :multi_tex_coord2sv, :glMultiTexCoord2sv, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord3d(target, s, t, r) - # @param [Integer] target - # @param [Float] s - # @param [Float] t - # @param [Float] r - # @return [nil] + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @param [Float] r + # @return [nil] # @scope class attach_function :multi_tex_coord3d, :glMultiTexCoord3d, [:uint, :double, :double, :double], :void - # (Not documented) - # + # @method multi_tex_coord3dv(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :multi_tex_coord3dv, :glMultiTexCoord3dv, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord3f(target, s, t, r) - # @param [Integer] target - # @param [Float] s - # @param [Float] t - # @param [Float] r - # @return [nil] + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @param [Float] r + # @return [nil] # @scope class attach_function :multi_tex_coord3f, :glMultiTexCoord3f, [:uint, :float, :float, :float], :void - # (Not documented) - # + # @method multi_tex_coord3fv(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :multi_tex_coord3fv, :glMultiTexCoord3fv, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord3i(target, s, t, r) - # @param [Integer] target - # @param [Integer] s - # @param [Integer] t - # @param [Integer] r - # @return [nil] + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @param [Integer] r + # @return [nil] # @scope class attach_function :multi_tex_coord3i, :glMultiTexCoord3i, [:uint, :int, :int, :int], :void - # (Not documented) - # + # @method multi_tex_coord3iv(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :multi_tex_coord3iv, :glMultiTexCoord3iv, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord3s(target, s, t, r) - # @param [Integer] target - # @param [Integer] s - # @param [Integer] t - # @param [Integer] r - # @return [nil] + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @param [Integer] r + # @return [nil] # @scope class attach_function :multi_tex_coord3s, :glMultiTexCoord3s, [:uint, :short, :short, :short], :void - # (Not documented) - # + # @method multi_tex_coord3sv(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :multi_tex_coord3sv, :glMultiTexCoord3sv, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord4d(target, s, t, r, q) - # @param [Integer] target - # @param [Float] s - # @param [Float] t - # @param [Float] r - # @param [Float] q - # @return [nil] + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @param [Float] r + # @param [Float] q + # @return [nil] # @scope class attach_function :multi_tex_coord4d, :glMultiTexCoord4d, [:uint, :double, :double, :double, :double], :void - # (Not documented) - # + # @method multi_tex_coord4dv(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :multi_tex_coord4dv, :glMultiTexCoord4dv, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord4f(target, s, t, r, q) - # @param [Integer] target - # @param [Float] s - # @param [Float] t - # @param [Float] r - # @param [Float] q - # @return [nil] + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @param [Float] r + # @param [Float] q + # @return [nil] # @scope class attach_function :multi_tex_coord4f, :glMultiTexCoord4f, [:uint, :float, :float, :float, :float], :void - # (Not documented) - # + # @method multi_tex_coord4fv(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :multi_tex_coord4fv, :glMultiTexCoord4fv, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord4i(target, s, t, r, q) - # @param [Integer] target - # @param [Integer] s - # @param [Integer] t - # @param [Integer] r - # @param [Integer] q - # @return [nil] + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @param [Integer] r + # @param [Integer] q + # @return [nil] # @scope class attach_function :multi_tex_coord4i, :glMultiTexCoord4i, [:uint, :int, :int, :int, :int], :void - # (Not documented) - # + # @method multi_tex_coord4iv(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :multi_tex_coord4iv, :glMultiTexCoord4iv, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord4s(target, s, t, r, q) - # @param [Integer] target - # @param [Integer] s - # @param [Integer] t - # @param [Integer] r - # @param [Integer] q - # @return [nil] + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @param [Integer] r + # @param [Integer] q + # @return [nil] # @scope class attach_function :multi_tex_coord4s, :glMultiTexCoord4s, [:uint, :short, :short, :short, :short], :void - # (Not documented) - # + # @method multi_tex_coord4sv(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :multi_tex_coord4sv, :glMultiTexCoord4sv, [:uint, :pointer], :void - # (Not documented) - # + # @method load_transpose_matrixd(m) - # @param [Array] m - # @return [nil] + # @param [Array] m + # @return [nil] # @scope class attach_function :load_transpose_matrixd, :glLoadTransposeMatrixd, [:pointer], :void - # (Not documented) - # + # @method load_transpose_matrixf(m) - # @param [Array] m - # @return [nil] + # @param [Array] m + # @return [nil] # @scope class attach_function :load_transpose_matrixf, :glLoadTransposeMatrixf, [:pointer], :void - # (Not documented) - # + # @method mult_transpose_matrixd(m) - # @param [Array] m - # @return [nil] + # @param [Array] m + # @return [nil] # @scope class attach_function :mult_transpose_matrixd, :glMultTransposeMatrixd, [:pointer], :void - # (Not documented) - # + # @method mult_transpose_matrixf(m) - # @param [Array] m - # @return [nil] + # @param [Array] m + # @return [nil] # @scope class attach_function :mult_transpose_matrixf, :glMultTransposeMatrixf, [:pointer], :void - # (Not documented) - # + # @method sample_coverage(value, invert) - # @param [Float] value - # @param [Integer] invert - # @return [nil] + # @param [Float] value + # @param [Integer] invert + # @return [nil] # @scope class attach_function :sample_coverage, :glSampleCoverage, [:float, :uchar], :void - # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglsamplecoverageproc_(invert) - # @param [Integer] invert - # @return [Float] + + # @method _callback_pfnglsamplecoverageproc_(value, invert) + # @param [Float] value + # @param [Integer] invert + # @return [Float] # @scope class - callback :pfnglsamplecoverageproc, [:uchar], :float - + callback :pfnglsamplecoverageproc, [:float, :uchar], :float + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglcompressedteximage3dproc_(level, internalformat, width, height, depth, border, image_size, data) - # @param [Integer] level - # @param [Integer] internalformat - # @param [Integer] width - # @param [Integer] height - # @param [Integer] depth - # @param [Integer] border - # @param [Integer] image_size - # @param [FFI::Pointer(*GLvoid)] data - # @return [Integer] - # @scope class - callback :pfnglcompressedteximage3dproc, [:int, :uint, :int, :int, :int, :int, :int, :pointer], :uint - - # (Not documented) - # + + # @method _callback_pfnglcompressedteximage3dproc_(target, level, internalformat, width, height, depth, border, image_size, data) + # @param [Integer] target + # @param [Integer] level + # @param [Integer] internalformat + # @param [Integer] width + # @param [Integer] height + # @param [Integer] depth + # @param [Integer] border + # @param [Integer] image_size + # @param [FFI::Pointer(*GLvoid)] data + # @return [Integer] + # @scope class + callback :pfnglcompressedteximage3dproc, [:uint, :int, :uint, :int, :int, :int, :int, :int, :pointer], :uint + + # (Not documented) + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglcompressedteximage2dproc_(level, internalformat, width, height, border, image_size, data) - # @param [Integer] level - # @param [Integer] internalformat - # @param [Integer] width - # @param [Integer] height - # @param [Integer] border - # @param [Integer] image_size - # @param [FFI::Pointer(*GLvoid)] data - # @return [Integer] - # @scope class - callback :pfnglcompressedteximage2dproc, [:int, :uint, :int, :int, :int, :int, :pointer], :uint - - # (Not documented) - # + + # @method _callback_pfnglcompressedteximage2dproc_(target, level, internalformat, width, height, border, image_size, data) + # @param [Integer] target + # @param [Integer] level + # @param [Integer] internalformat + # @param [Integer] width + # @param [Integer] height + # @param [Integer] border + # @param [Integer] image_size + # @param [FFI::Pointer(*GLvoid)] data + # @return [Integer] + # @scope class + callback :pfnglcompressedteximage2dproc, [:uint, :int, :uint, :int, :int, :int, :int, :pointer], :uint + + # (Not documented) + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglcompressedteximage1dproc_(level, internalformat, width, border, image_size, data) - # @param [Integer] level - # @param [Integer] internalformat - # @param [Integer] width - # @param [Integer] border - # @param [Integer] image_size - # @param [FFI::Pointer(*GLvoid)] data - # @return [Integer] - # @scope class - callback :pfnglcompressedteximage1dproc, [:int, :uint, :int, :int, :int, :pointer], :uint - - # (Not documented) - # + + # @method _callback_pfnglcompressedteximage1dproc_(target, level, internalformat, width, border, image_size, data) + # @param [Integer] target + # @param [Integer] level + # @param [Integer] internalformat + # @param [Integer] width + # @param [Integer] border + # @param [Integer] image_size + # @param [FFI::Pointer(*GLvoid)] data + # @return [Integer] + # @scope class + callback :pfnglcompressedteximage1dproc, [:uint, :int, :uint, :int, :int, :int, :pointer], :uint + + # (Not documented) + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglcompressedtexsubimage3dproc_(level, xoffset, yoffset, zoffset, width, height, depth, format, image_size, data) - # @param [Integer] level - # @param [Integer] xoffset - # @param [Integer] yoffset - # @param [Integer] zoffset - # @param [Integer] width - # @param [Integer] height - # @param [Integer] depth - # @param [Integer] format - # @param [Integer] image_size - # @param [FFI::Pointer(*GLvoid)] data - # @return [Integer] - # @scope class - callback :pfnglcompressedtexsubimage3dproc, [:int, :int, :int, :int, :int, :int, :int, :uint, :int, :pointer], :uint - - # (Not documented) - # + + # @method _callback_pfnglcompressedtexsubimage3dproc_(target, level, xoffset, yoffset, zoffset, width, height, depth, format, image_size, data) + # @param [Integer] target + # @param [Integer] level + # @param [Integer] xoffset + # @param [Integer] yoffset + # @param [Integer] zoffset + # @param [Integer] width + # @param [Integer] height + # @param [Integer] depth + # @param [Integer] format + # @param [Integer] image_size + # @param [FFI::Pointer(*GLvoid)] data + # @return [Integer] + # @scope class + callback :pfnglcompressedtexsubimage3dproc, [:uint, :int, :int, :int, :int, :int, :int, :int, :uint, :int, :pointer], :uint + + # (Not documented) + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglcompressedtexsubimage2dproc_(level, xoffset, yoffset, width, height, format, image_size, data) - # @param [Integer] level - # @param [Integer] xoffset - # @param [Integer] yoffset - # @param [Integer] width - # @param [Integer] height - # @param [Integer] format - # @param [Integer] image_size - # @param [FFI::Pointer(*GLvoid)] data - # @return [Integer] - # @scope class - callback :pfnglcompressedtexsubimage2dproc, [:int, :int, :int, :int, :int, :uint, :int, :pointer], :uint - - # (Not documented) - # + + # @method _callback_pfnglcompressedtexsubimage2dproc_(target, level, xoffset, yoffset, width, height, format, image_size, data) + # @param [Integer] target + # @param [Integer] level + # @param [Integer] xoffset + # @param [Integer] yoffset + # @param [Integer] width + # @param [Integer] height + # @param [Integer] format + # @param [Integer] image_size + # @param [FFI::Pointer(*GLvoid)] data + # @return [Integer] + # @scope class + callback :pfnglcompressedtexsubimage2dproc, [:uint, :int, :int, :int, :int, :int, :uint, :int, :pointer], :uint + + # (Not documented) + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglcompressedtexsubimage1dproc_(level, xoffset, width, format, image_size, data) - # @param [Integer] level - # @param [Integer] xoffset - # @param [Integer] width - # @param [Integer] format - # @param [Integer] image_size - # @param [FFI::Pointer(*GLvoid)] data - # @return [Integer] - # @scope class - callback :pfnglcompressedtexsubimage1dproc, [:int, :int, :int, :uint, :int, :pointer], :uint - - # (Not documented) - # + + # @method _callback_pfnglcompressedtexsubimage1dproc_(target, level, xoffset, width, format, image_size, data) + # @param [Integer] target + # @param [Integer] level + # @param [Integer] xoffset + # @param [Integer] width + # @param [Integer] format + # @param [Integer] image_size + # @param [FFI::Pointer(*GLvoid)] data + # @return [Integer] + # @scope class + callback :pfnglcompressedtexsubimage1dproc, [:uint, :int, :int, :int, :uint, :int, :pointer], :uint + + # (Not documented) + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglgetcompressedteximageproc_(level, img) - # @param [Integer] level - # @param [FFI::Pointer(*GLvoid)] img - # @return [Integer] - # @scope class - callback :pfnglgetcompressedteximageproc, [:int, :pointer], :uint - + + # @method _callback_pfnglgetcompressedteximageproc_(target, level, img) + # @param [Integer] target + # @param [Integer] level + # @param [FFI::Pointer(*GLvoid)] img + # @return [Integer] + # @scope class + callback :pfnglgetcompressedteximageproc, [:uint, :int, :pointer], :uint + # GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1) - # + # @method active_texture_arb(texture) - # @param [Integer] texture - # @return [nil] + # @param [Integer] texture + # @return [nil] # @scope class attach_function :active_texture_arb, :glActiveTextureARB, [:uint], :void - # (Not documented) - # + # @method client_active_texture_arb(texture) - # @param [Integer] texture - # @return [nil] + # @param [Integer] texture + # @return [nil] # @scope class attach_function :client_active_texture_arb, :glClientActiveTextureARB, [:uint], :void - # (Not documented) - # + # @method multi_tex_coord1d_arb(target, s) - # @param [Integer] target - # @param [Float] s - # @return [nil] + # @param [Integer] target + # @param [Float] s + # @return [nil] # @scope class attach_function :multi_tex_coord1d_arb, :glMultiTexCoord1dARB, [:uint, :double], :void - # (Not documented) - # + # @method multi_tex_coord1dv_arb(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :multi_tex_coord1dv_arb, :glMultiTexCoord1dvARB, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord1f_arb(target, s) - # @param [Integer] target - # @param [Float] s - # @return [nil] + # @param [Integer] target + # @param [Float] s + # @return [nil] # @scope class attach_function :multi_tex_coord1f_arb, :glMultiTexCoord1fARB, [:uint, :float], :void - # (Not documented) - # + # @method multi_tex_coord1fv_arb(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :multi_tex_coord1fv_arb, :glMultiTexCoord1fvARB, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord1i_arb(target, s) - # @param [Integer] target - # @param [Integer] s - # @return [nil] + # @param [Integer] target + # @param [Integer] s + # @return [nil] # @scope class attach_function :multi_tex_coord1i_arb, :glMultiTexCoord1iARB, [:uint, :int], :void - # (Not documented) - # + # @method multi_tex_coord1iv_arb(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :multi_tex_coord1iv_arb, :glMultiTexCoord1ivARB, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord1s_arb(target, s) - # @param [Integer] target - # @param [Integer] s - # @return [nil] + # @param [Integer] target + # @param [Integer] s + # @return [nil] # @scope class attach_function :multi_tex_coord1s_arb, :glMultiTexCoord1sARB, [:uint, :short], :void - # (Not documented) - # + # @method multi_tex_coord1sv_arb(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :multi_tex_coord1sv_arb, :glMultiTexCoord1svARB, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord2d_arb(target, s, t) - # @param [Integer] target - # @param [Float] s - # @param [Float] t - # @return [nil] + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @return [nil] # @scope class attach_function :multi_tex_coord2d_arb, :glMultiTexCoord2dARB, [:uint, :double, :double], :void - # (Not documented) - # + # @method multi_tex_coord2dv_arb(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :multi_tex_coord2dv_arb, :glMultiTexCoord2dvARB, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord2f_arb(target, s, t) - # @param [Integer] target - # @param [Float] s - # @param [Float] t - # @return [nil] + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @return [nil] # @scope class attach_function :multi_tex_coord2f_arb, :glMultiTexCoord2fARB, [:uint, :float, :float], :void - # (Not documented) - # + # @method multi_tex_coord2fv_arb(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :multi_tex_coord2fv_arb, :glMultiTexCoord2fvARB, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord2i_arb(target, s, t) - # @param [Integer] target - # @param [Integer] s - # @param [Integer] t - # @return [nil] + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @return [nil] # @scope class attach_function :multi_tex_coord2i_arb, :glMultiTexCoord2iARB, [:uint, :int, :int], :void - # (Not documented) - # + # @method multi_tex_coord2iv_arb(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :multi_tex_coord2iv_arb, :glMultiTexCoord2ivARB, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord2s_arb(target, s, t) - # @param [Integer] target - # @param [Integer] s - # @param [Integer] t - # @return [nil] + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @return [nil] # @scope class attach_function :multi_tex_coord2s_arb, :glMultiTexCoord2sARB, [:uint, :short, :short], :void - # (Not documented) - # + # @method multi_tex_coord2sv_arb(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :multi_tex_coord2sv_arb, :glMultiTexCoord2svARB, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord3d_arb(target, s, t, r) - # @param [Integer] target - # @param [Float] s - # @param [Float] t - # @param [Float] r - # @return [nil] + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @param [Float] r + # @return [nil] # @scope class attach_function :multi_tex_coord3d_arb, :glMultiTexCoord3dARB, [:uint, :double, :double, :double], :void - # (Not documented) - # + # @method multi_tex_coord3dv_arb(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :multi_tex_coord3dv_arb, :glMultiTexCoord3dvARB, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord3f_arb(target, s, t, r) - # @param [Integer] target - # @param [Float] s - # @param [Float] t - # @param [Float] r - # @return [nil] + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @param [Float] r + # @return [nil] # @scope class attach_function :multi_tex_coord3f_arb, :glMultiTexCoord3fARB, [:uint, :float, :float, :float], :void - # (Not documented) - # + # @method multi_tex_coord3fv_arb(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :multi_tex_coord3fv_arb, :glMultiTexCoord3fvARB, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord3i_arb(target, s, t, r) - # @param [Integer] target - # @param [Integer] s - # @param [Integer] t - # @param [Integer] r - # @return [nil] + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @param [Integer] r + # @return [nil] # @scope class attach_function :multi_tex_coord3i_arb, :glMultiTexCoord3iARB, [:uint, :int, :int, :int], :void - # (Not documented) - # + # @method multi_tex_coord3iv_arb(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :multi_tex_coord3iv_arb, :glMultiTexCoord3ivARB, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord3s_arb(target, s, t, r) - # @param [Integer] target - # @param [Integer] s - # @param [Integer] t - # @param [Integer] r - # @return [nil] + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @param [Integer] r + # @return [nil] # @scope class attach_function :multi_tex_coord3s_arb, :glMultiTexCoord3sARB, [:uint, :short, :short, :short], :void - # (Not documented) - # + # @method multi_tex_coord3sv_arb(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :multi_tex_coord3sv_arb, :glMultiTexCoord3svARB, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord4d_arb(target, s, t, r, q) - # @param [Integer] target - # @param [Float] s - # @param [Float] t - # @param [Float] r - # @param [Float] q - # @return [nil] + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @param [Float] r + # @param [Float] q + # @return [nil] # @scope class attach_function :multi_tex_coord4d_arb, :glMultiTexCoord4dARB, [:uint, :double, :double, :double, :double], :void - # (Not documented) - # + # @method multi_tex_coord4dv_arb(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLdouble)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLdouble)] v + # @return [nil] # @scope class attach_function :multi_tex_coord4dv_arb, :glMultiTexCoord4dvARB, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord4f_arb(target, s, t, r, q) - # @param [Integer] target - # @param [Float] s - # @param [Float] t - # @param [Float] r - # @param [Float] q - # @return [nil] + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @param [Float] r + # @param [Float] q + # @return [nil] # @scope class attach_function :multi_tex_coord4f_arb, :glMultiTexCoord4fARB, [:uint, :float, :float, :float, :float], :void - # (Not documented) - # + # @method multi_tex_coord4fv_arb(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :multi_tex_coord4fv_arb, :glMultiTexCoord4fvARB, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord4i_arb(target, s, t, r, q) - # @param [Integer] target - # @param [Integer] s - # @param [Integer] t - # @param [Integer] r - # @param [Integer] q - # @return [nil] + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @param [Integer] r + # @param [Integer] q + # @return [nil] # @scope class attach_function :multi_tex_coord4i_arb, :glMultiTexCoord4iARB, [:uint, :int, :int, :int, :int], :void - # (Not documented) - # + # @method multi_tex_coord4iv_arb(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLint)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLint)] v + # @return [nil] # @scope class attach_function :multi_tex_coord4iv_arb, :glMultiTexCoord4ivARB, [:uint, :pointer], :void - # (Not documented) - # + # @method multi_tex_coord4s_arb(target, s, t, r, q) - # @param [Integer] target - # @param [Integer] s - # @param [Integer] t - # @param [Integer] r - # @param [Integer] q - # @return [nil] + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @param [Integer] r + # @param [Integer] q + # @return [nil] # @scope class attach_function :multi_tex_coord4s_arb, :glMultiTexCoord4sARB, [:uint, :short, :short, :short, :short], :void - # (Not documented) - # + # @method multi_tex_coord4sv_arb(target, v) - # @param [Integer] target - # @param [FFI::Pointer(*GLshort)] v - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(*GLshort)] v + # @return [nil] # @scope class attach_function :multi_tex_coord4sv_arb, :glMultiTexCoord4svARB, [:uint, :pointer], :void - # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord1darbproc_(s) - # @param [Float] s - # @return [Integer] + + # @method _callback_pfnglmultitexcoord1darbproc_(target, s) + # @param [Integer] target + # @param [Float] s + # @return [Integer] # @scope class - callback :pfnglmultitexcoord1darbproc, [:double], :uint - + callback :pfnglmultitexcoord1darbproc, [:uint, :double], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord1dvarbproc_(v) - # @param [FFI::Pointer(*GLdouble)] v - # @return [Integer] + + # @method _callback_pfnglmultitexcoord1dvarbproc_(target, v) + # @param [Integer] target + # @param [FFI::Pointer(*GLdouble)] v + # @return [Integer] # @scope class - callback :pfnglmultitexcoord1dvarbproc, [:pointer], :uint - + callback :pfnglmultitexcoord1dvarbproc, [:uint, :pointer], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord1farbproc_(s) - # @param [Float] s - # @return [Integer] + + # @method _callback_pfnglmultitexcoord1farbproc_(target, s) + # @param [Integer] target + # @param [Float] s + # @return [Integer] # @scope class - callback :pfnglmultitexcoord1farbproc, [:float], :uint - + callback :pfnglmultitexcoord1farbproc, [:uint, :float], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord1fvarbproc_(v) - # @param [FFI::Pointer(*GLfloat)] v - # @return [Integer] + + # @method _callback_pfnglmultitexcoord1fvarbproc_(target, v) + # @param [Integer] target + # @param [FFI::Pointer(*GLfloat)] v + # @return [Integer] # @scope class - callback :pfnglmultitexcoord1fvarbproc, [:pointer], :uint - + callback :pfnglmultitexcoord1fvarbproc, [:uint, :pointer], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord1iarbproc_(s) - # @param [Integer] s - # @return [Integer] + + # @method _callback_pfnglmultitexcoord1iarbproc_(target, s) + # @param [Integer] target + # @param [Integer] s + # @return [Integer] # @scope class - callback :pfnglmultitexcoord1iarbproc, [:int], :uint - + callback :pfnglmultitexcoord1iarbproc, [:uint, :int], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord1ivarbproc_(v) - # @param [FFI::Pointer(*GLint)] v - # @return [Integer] + + # @method _callback_pfnglmultitexcoord1ivarbproc_(target, v) + # @param [Integer] target + # @param [FFI::Pointer(*GLint)] v + # @return [Integer] # @scope class - callback :pfnglmultitexcoord1ivarbproc, [:pointer], :uint - + callback :pfnglmultitexcoord1ivarbproc, [:uint, :pointer], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord1sarbproc_(s) - # @param [Integer] s - # @return [Integer] + + # @method _callback_pfnglmultitexcoord1sarbproc_(target, s) + # @param [Integer] target + # @param [Integer] s + # @return [Integer] # @scope class - callback :pfnglmultitexcoord1sarbproc, [:short], :uint - + callback :pfnglmultitexcoord1sarbproc, [:uint, :short], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord1svarbproc_(v) - # @param [FFI::Pointer(*GLshort)] v - # @return [Integer] + + # @method _callback_pfnglmultitexcoord1svarbproc_(target, v) + # @param [Integer] target + # @param [FFI::Pointer(*GLshort)] v + # @return [Integer] # @scope class - callback :pfnglmultitexcoord1svarbproc, [:pointer], :uint - + callback :pfnglmultitexcoord1svarbproc, [:uint, :pointer], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord2darbproc_(s, t) - # @param [Float] s - # @param [Float] t - # @return [Integer] + + # @method _callback_pfnglmultitexcoord2darbproc_(target, s, t) + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @return [Integer] # @scope class - callback :pfnglmultitexcoord2darbproc, [:double, :double], :uint - + callback :pfnglmultitexcoord2darbproc, [:uint, :double, :double], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord2dvarbproc_(v) - # @param [FFI::Pointer(*GLdouble)] v - # @return [Integer] + + # @method _callback_pfnglmultitexcoord2dvarbproc_(target, v) + # @param [Integer] target + # @param [FFI::Pointer(*GLdouble)] v + # @return [Integer] # @scope class - callback :pfnglmultitexcoord2dvarbproc, [:pointer], :uint - + callback :pfnglmultitexcoord2dvarbproc, [:uint, :pointer], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord2farbproc_(s, t) - # @param [Float] s - # @param [Float] t - # @return [Integer] + + # @method _callback_pfnglmultitexcoord2farbproc_(target, s, t) + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @return [Integer] # @scope class - callback :pfnglmultitexcoord2farbproc, [:float, :float], :uint - + callback :pfnglmultitexcoord2farbproc, [:uint, :float, :float], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord2fvarbproc_(v) - # @param [FFI::Pointer(*GLfloat)] v - # @return [Integer] + + # @method _callback_pfnglmultitexcoord2fvarbproc_(target, v) + # @param [Integer] target + # @param [FFI::Pointer(*GLfloat)] v + # @return [Integer] # @scope class - callback :pfnglmultitexcoord2fvarbproc, [:pointer], :uint - + callback :pfnglmultitexcoord2fvarbproc, [:uint, :pointer], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord2iarbproc_(s, t) - # @param [Integer] s - # @param [Integer] t - # @return [Integer] + + # @method _callback_pfnglmultitexcoord2iarbproc_(target, s, t) + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @return [Integer] # @scope class - callback :pfnglmultitexcoord2iarbproc, [:int, :int], :uint - + callback :pfnglmultitexcoord2iarbproc, [:uint, :int, :int], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord2ivarbproc_(v) - # @param [FFI::Pointer(*GLint)] v - # @return [Integer] + + # @method _callback_pfnglmultitexcoord2ivarbproc_(target, v) + # @param [Integer] target + # @param [FFI::Pointer(*GLint)] v + # @return [Integer] # @scope class - callback :pfnglmultitexcoord2ivarbproc, [:pointer], :uint - + callback :pfnglmultitexcoord2ivarbproc, [:uint, :pointer], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord2sarbproc_(s, t) - # @param [Integer] s - # @param [Integer] t - # @return [Integer] + + # @method _callback_pfnglmultitexcoord2sarbproc_(target, s, t) + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @return [Integer] # @scope class - callback :pfnglmultitexcoord2sarbproc, [:short, :short], :uint - + callback :pfnglmultitexcoord2sarbproc, [:uint, :short, :short], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord2svarbproc_(v) - # @param [FFI::Pointer(*GLshort)] v - # @return [Integer] + + # @method _callback_pfnglmultitexcoord2svarbproc_(target, v) + # @param [Integer] target + # @param [FFI::Pointer(*GLshort)] v + # @return [Integer] # @scope class - callback :pfnglmultitexcoord2svarbproc, [:pointer], :uint - + callback :pfnglmultitexcoord2svarbproc, [:uint, :pointer], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord3darbproc_(s, t, r) - # @param [Float] s - # @param [Float] t - # @param [Float] r - # @return [Integer] - # @scope class - callback :pfnglmultitexcoord3darbproc, [:double, :double, :double], :uint - + + # @method _callback_pfnglmultitexcoord3darbproc_(target, s, t, r) + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @param [Float] r + # @return [Integer] + # @scope class + callback :pfnglmultitexcoord3darbproc, [:uint, :double, :double, :double], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord3dvarbproc_(v) - # @param [FFI::Pointer(*GLdouble)] v - # @return [Integer] + + # @method _callback_pfnglmultitexcoord3dvarbproc_(target, v) + # @param [Integer] target + # @param [FFI::Pointer(*GLdouble)] v + # @return [Integer] # @scope class - callback :pfnglmultitexcoord3dvarbproc, [:pointer], :uint - + callback :pfnglmultitexcoord3dvarbproc, [:uint, :pointer], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord3farbproc_(s, t, r) - # @param [Float] s - # @param [Float] t - # @param [Float] r - # @return [Integer] - # @scope class - callback :pfnglmultitexcoord3farbproc, [:float, :float, :float], :uint - + + # @method _callback_pfnglmultitexcoord3farbproc_(target, s, t, r) + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @param [Float] r + # @return [Integer] + # @scope class + callback :pfnglmultitexcoord3farbproc, [:uint, :float, :float, :float], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord3fvarbproc_(v) - # @param [FFI::Pointer(*GLfloat)] v - # @return [Integer] + + # @method _callback_pfnglmultitexcoord3fvarbproc_(target, v) + # @param [Integer] target + # @param [FFI::Pointer(*GLfloat)] v + # @return [Integer] # @scope class - callback :pfnglmultitexcoord3fvarbproc, [:pointer], :uint - + callback :pfnglmultitexcoord3fvarbproc, [:uint, :pointer], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord3iarbproc_(s, t, r) - # @param [Integer] s - # @param [Integer] t - # @param [Integer] r - # @return [Integer] - # @scope class - callback :pfnglmultitexcoord3iarbproc, [:int, :int, :int], :uint - + + # @method _callback_pfnglmultitexcoord3iarbproc_(target, s, t, r) + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @param [Integer] r + # @return [Integer] + # @scope class + callback :pfnglmultitexcoord3iarbproc, [:uint, :int, :int, :int], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord3ivarbproc_(v) - # @param [FFI::Pointer(*GLint)] v - # @return [Integer] + + # @method _callback_pfnglmultitexcoord3ivarbproc_(target, v) + # @param [Integer] target + # @param [FFI::Pointer(*GLint)] v + # @return [Integer] # @scope class - callback :pfnglmultitexcoord3ivarbproc, [:pointer], :uint - + callback :pfnglmultitexcoord3ivarbproc, [:uint, :pointer], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord3sarbproc_(s, t, r) - # @param [Integer] s - # @param [Integer] t - # @param [Integer] r - # @return [Integer] - # @scope class - callback :pfnglmultitexcoord3sarbproc, [:short, :short, :short], :uint - + + # @method _callback_pfnglmultitexcoord3sarbproc_(target, s, t, r) + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @param [Integer] r + # @return [Integer] + # @scope class + callback :pfnglmultitexcoord3sarbproc, [:uint, :short, :short, :short], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord3svarbproc_(v) - # @param [FFI::Pointer(*GLshort)] v - # @return [Integer] + + # @method _callback_pfnglmultitexcoord3svarbproc_(target, v) + # @param [Integer] target + # @param [FFI::Pointer(*GLshort)] v + # @return [Integer] # @scope class - callback :pfnglmultitexcoord3svarbproc, [:pointer], :uint - + callback :pfnglmultitexcoord3svarbproc, [:uint, :pointer], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord4darbproc_(s, t, r, q) - # @param [Float] s - # @param [Float] t - # @param [Float] r - # @param [Float] q - # @return [Integer] - # @scope class - callback :pfnglmultitexcoord4darbproc, [:double, :double, :double, :double], :uint - - # (Not documented) - # + + # @method _callback_pfnglmultitexcoord4darbproc_(target, s, t, r, q) + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @param [Float] r + # @param [Float] q + # @return [Integer] + # @scope class + callback :pfnglmultitexcoord4darbproc, [:uint, :double, :double, :double, :double], :uint + + # (Not documented) + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord4dvarbproc_(v) - # @param [FFI::Pointer(*GLdouble)] v - # @return [Integer] + + # @method _callback_pfnglmultitexcoord4dvarbproc_(target, v) + # @param [Integer] target + # @param [FFI::Pointer(*GLdouble)] v + # @return [Integer] # @scope class - callback :pfnglmultitexcoord4dvarbproc, [:pointer], :uint - + callback :pfnglmultitexcoord4dvarbproc, [:uint, :pointer], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord4farbproc_(s, t, r, q) - # @param [Float] s - # @param [Float] t - # @param [Float] r - # @param [Float] q - # @return [Integer] - # @scope class - callback :pfnglmultitexcoord4farbproc, [:float, :float, :float, :float], :uint - - # (Not documented) - # + + # @method _callback_pfnglmultitexcoord4farbproc_(target, s, t, r, q) + # @param [Integer] target + # @param [Float] s + # @param [Float] t + # @param [Float] r + # @param [Float] q + # @return [Integer] + # @scope class + callback :pfnglmultitexcoord4farbproc, [:uint, :float, :float, :float, :float], :uint + + # (Not documented) + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord4fvarbproc_(v) - # @param [FFI::Pointer(*GLfloat)] v - # @return [Integer] + + # @method _callback_pfnglmultitexcoord4fvarbproc_(target, v) + # @param [Integer] target + # @param [FFI::Pointer(*GLfloat)] v + # @return [Integer] # @scope class - callback :pfnglmultitexcoord4fvarbproc, [:pointer], :uint - + callback :pfnglmultitexcoord4fvarbproc, [:uint, :pointer], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord4iarbproc_(s, t, r, q) - # @param [Integer] s - # @param [Integer] t - # @param [Integer] r - # @param [Integer] q - # @return [Integer] - # @scope class - callback :pfnglmultitexcoord4iarbproc, [:int, :int, :int, :int], :uint - - # (Not documented) - # + + # @method _callback_pfnglmultitexcoord4iarbproc_(target, s, t, r, q) + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @param [Integer] r + # @param [Integer] q + # @return [Integer] + # @scope class + callback :pfnglmultitexcoord4iarbproc, [:uint, :int, :int, :int, :int], :uint + + # (Not documented) + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord4ivarbproc_(v) - # @param [FFI::Pointer(*GLint)] v - # @return [Integer] + + # @method _callback_pfnglmultitexcoord4ivarbproc_(target, v) + # @param [Integer] target + # @param [FFI::Pointer(*GLint)] v + # @return [Integer] # @scope class - callback :pfnglmultitexcoord4ivarbproc, [:pointer], :uint - + callback :pfnglmultitexcoord4ivarbproc, [:uint, :pointer], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord4sarbproc_(s, t, r, q) - # @param [Integer] s - # @param [Integer] t - # @param [Integer] r - # @param [Integer] q - # @return [Integer] - # @scope class - callback :pfnglmultitexcoord4sarbproc, [:short, :short, :short, :short], :uint - - # (Not documented) - # + + # @method _callback_pfnglmultitexcoord4sarbproc_(target, s, t, r, q) + # @param [Integer] target + # @param [Integer] s + # @param [Integer] t + # @param [Integer] r + # @param [Integer] q + # @return [Integer] + # @scope class + callback :pfnglmultitexcoord4sarbproc, [:uint, :short, :short, :short, :short], :uint + + # (Not documented) + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglmultitexcoord4svarbproc_(v) - # @param [FFI::Pointer(*GLshort)] v - # @return [Integer] + + # @method _callback_pfnglmultitexcoord4svarbproc_(target, v) + # @param [Integer] target + # @param [FFI::Pointer(*GLshort)] v + # @return [Integer] # @scope class - callback :pfnglmultitexcoord4svarbproc, [:pointer], :uint - + callback :pfnglmultitexcoord4svarbproc, [:uint, :pointer], :uint + # GL_GLEXT_LEGACY - # + # @method create_debug_object_mesa() - # @return [Integer] + # @return [Integer] # @scope class attach_function :create_debug_object_mesa, :glCreateDebugObjectMESA, [], :uint - # (Not documented) - # + # @method clear_debug_log_mesa(obj, log_type, shader_type) - # @param [Integer] obj - # @param [Integer] log_type - # @param [Integer] shader_type - # @return [nil] + # @param [Integer] obj + # @param [Integer] log_type + # @param [Integer] shader_type + # @return [nil] # @scope class attach_function :clear_debug_log_mesa, :glClearDebugLogMESA, [:uint, :uint, :uint], :void - # (Not documented) - # + # @method get_debug_log_mesa(obj, log_type, shader_type, max_length, length, debug_log) - # @param [Integer] obj - # @param [Integer] log_type - # @param [Integer] shader_type - # @param [Integer] max_length - # @param [FFI::Pointer(*GLsizei)] length - # @param [String] debug_log - # @return [nil] + # @param [Integer] obj + # @param [Integer] log_type + # @param [Integer] shader_type + # @param [Integer] max_length + # @param [FFI::Pointer(*GLsizei)] length + # @param [String] debug_log + # @return [nil] # @scope class attach_function :get_debug_log_mesa, :glGetDebugLogMESA, [:uint, :uint, :uint, :int, :pointer, :string], :void - # (Not documented) - # + # @method get_debug_log_length_mesa(obj, log_type, shader_type) - # @param [Integer] obj - # @param [Integer] log_type - # @param [Integer] shader_type - # @return [Integer] + # @param [Integer] obj + # @param [Integer] log_type + # @param [Integer] shader_type + # @return [Integer] # @scope class attach_function :get_debug_log_length_mesa, :glGetDebugLogLengthMESA, [:uint, :uint, :uint], :int - # GL_MESA_packed_depth_stencil - # + # This entry is only for documentation and no real method. - # - # @method _callback_g_lprogramcallback_mesa_(data) - # @param [FFI::Pointer(*GLvoid)] data - # @return [Integer] + + # @method _callback_g_lprogramcallback_mesa_(target, data) + # @param [Integer] target + # @param [FFI::Pointer(*GLvoid)] data + # @return [Integer] # @scope class - callback :g_lprogramcallback_mesa, [:pointer], :uint - + callback :g_lprogramcallback_mesa, [:uint, :pointer], :uint + # (Not documented) - # + # @method program_callback_mesa(target, callback, data) - # @param [Integer] target - # @param [Proc(_callback_g_lprogramcallback_mesa_)] callback - # @param [FFI::Pointer(*GLvoid)] data - # @return [nil] + # @param [Integer] target + # @param [FFI::Pointer(GLprogramcallbackMESA)] callback + # @param [FFI::Pointer(*GLvoid)] data + # @return [nil] # @scope class - attach_function :program_callback_mesa, :glProgramCallbackMESA, [:uint, :g_lprogramcallback_mesa, :pointer], :void - + attach_function :program_callback_mesa, :glProgramCallbackMESA, [:uint, :pointer, :pointer], :void # (Not documented) - # + # @method get_program_registerfv_mesa(target, len, name, v) - # @param [Integer] target - # @param [Integer] len - # @param [FFI::Pointer(*GLubyte)] name - # @param [FFI::Pointer(*GLfloat)] v - # @return [nil] + # @param [Integer] target + # @param [Integer] len + # @param [FFI::Pointer(*GLubyte)] name + # @param [FFI::Pointer(*GLfloat)] v + # @return [nil] # @scope class attach_function :get_program_registerfv_mesa, :glGetProgramRegisterfvMESA, [:uint, :int, :pointer, :pointer], :void - # (temporarily) disabled because of collision with typedef in glext.h # that happens if apps include both gl.h and glext.h - # + # @method blend_equation_separate_ati(mode_rgb, mode_a) - # @param [Integer] mode_rgb - # @param [Integer] mode_a - # @return [nil] + # @param [Integer] mode_rgb + # @param [Integer] mode_a + # @return [nil] # @scope class attach_function :blend_equation_separate_ati, :glBlendEquationSeparateATI, [:uint, :uint], :void - # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfnglblendequationseparateatiproc_(mode_a) - # @param [Integer] mode_a - # @return [Integer] + + # @method _callback_pfnglblendequationseparateatiproc_(mode_rgb, mode_a) + # @param [Integer] mode_rgb + # @param [Integer] mode_a + # @return [Integer] # @scope class - callback :pfnglblendequationseparateatiproc, [:uint], :uint - + callback :pfnglblendequationseparateatiproc, [:uint, :uint], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfngleglimagetargettexture2doesproc_(image) - # @param [FFI::Pointer(GLeglImageOES)] image - # @return [Integer] + + # @method _callback_pfngleglimagetargettexture2doesproc_(target, image) + # @param [Integer] target + # @param [FFI::Pointer(GLeglImageOES)] image + # @return [Integer] # @scope class - callback :pfngleglimagetargettexture2doesproc, [:pointer], :uint - + callback :pfngleglimagetargettexture2doesproc, [:uint, :pointer], :uint + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_pfngleglimagetargetrenderbufferstorageoesproc_(image) - # @param [FFI::Pointer(GLeglImageOES)] image - # @return [Integer] + + # @method _callback_pfngleglimagetargetrenderbufferstorageoesproc_(target, image) + # @param [Integer] target + # @param [FFI::Pointer(GLeglImageOES)] image + # @return [Integer] # @scope class - callback :pfngleglimagetargetrenderbufferstorageoesproc, [:pointer], :uint - + callback :pfngleglimagetargetrenderbufferstorageoesproc, [:uint, :pointer], :uint + end diff --git a/test/output/GL/glu.rb b/test/output/GL/glu.rb index ab8372f..f6899d3 100644 --- a/test/output/GL/glu.rb +++ b/test/output/GL/glu.rb @@ -1,977 +1,920 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module GLU + extend FFI::Library - ffi_lib 'GLU' - + + ffi_lib ENV["GLU_PATH"] || "GLU" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + EXT_OBJECT_SPACE_TESS = 1 - + EXT_NURBS_TESSELLATOR = 1 - + FALSE = 0 - + TRUE = 1 - + VERSION_1_1 = 1 - + VERSION_1_2 = 1 - + VERSION_1_3 = 1 - + VERSION = 100800 - + EXTENSIONS = 100801 - + INVALID_ENUM = 100900 - + INVALID_VALUE = 100901 - + OUT_OF_MEMORY = 100902 - + INCOMPATIBLE_GL_VERSION = 100903 - + INVALID_OPERATION = 100904 - + OUTLINE_POLYGON = 100240 - + OUTLINE_PATCH = 100241 - + NURBS_ERROR = 100103 - + ERROR = 100103 - + NURBS_BEGIN = 100164 - + NURBS_BEGIN_EXT = 100164 - + NURBS_VERTEX = 100165 - + NURBS_VERTEX_EXT = 100165 - + NURBS_NORMAL = 100166 - + NURBS_NORMAL_EXT = 100166 - + NURBS_COLOR = 100167 - + NURBS_COLOR_EXT = 100167 - + NURBS_TEXTURE_COORD = 100168 - + NURBS_TEX_COORD_EXT = 100168 - + NURBS_END = 100169 - + NURBS_END_EXT = 100169 - + NURBS_BEGIN_DATA = 100170 - + NURBS_BEGIN_DATA_EXT = 100170 - + NURBS_VERTEX_DATA = 100171 - + NURBS_VERTEX_DATA_EXT = 100171 - + NURBS_NORMAL_DATA = 100172 - + NURBS_NORMAL_DATA_EXT = 100172 - + NURBS_COLOR_DATA = 100173 - + NURBS_COLOR_DATA_EXT = 100173 - + NURBS_TEXTURE_COORD_DATA = 100174 - + NURBS_TEX_COORD_DATA_EXT = 100174 - + NURBS_END_DATA = 100175 - + NURBS_END_DATA_EXT = 100175 - + NURBS_ERROR1 = 100251 - + NURBS_ERROR2 = 100252 - + NURBS_ERROR3 = 100253 - + NURBS_ERROR4 = 100254 - + NURBS_ERROR5 = 100255 - + NURBS_ERROR6 = 100256 - + NURBS_ERROR7 = 100257 - + NURBS_ERROR8 = 100258 - + NURBS_ERROR9 = 100259 - + NURBS_ERROR10 = 100260 - + NURBS_ERROR11 = 100261 - + NURBS_ERROR12 = 100262 - + NURBS_ERROR13 = 100263 - + NURBS_ERROR14 = 100264 - + NURBS_ERROR15 = 100265 - + NURBS_ERROR16 = 100266 - + NURBS_ERROR17 = 100267 - + NURBS_ERROR18 = 100268 - + NURBS_ERROR19 = 100269 - + NURBS_ERROR20 = 100270 - + NURBS_ERROR21 = 100271 - + NURBS_ERROR22 = 100272 - + NURBS_ERROR23 = 100273 - + NURBS_ERROR24 = 100274 - + NURBS_ERROR25 = 100275 - + NURBS_ERROR26 = 100276 - + NURBS_ERROR27 = 100277 - + NURBS_ERROR28 = 100278 - + NURBS_ERROR29 = 100279 - + NURBS_ERROR30 = 100280 - + NURBS_ERROR31 = 100281 - + NURBS_ERROR32 = 100282 - + NURBS_ERROR33 = 100283 - + NURBS_ERROR34 = 100284 - + NURBS_ERROR35 = 100285 - + NURBS_ERROR36 = 100286 - + NURBS_ERROR37 = 100287 - + AUTO_LOAD_MATRIX = 100200 - + CULLING = 100201 - + SAMPLING_TOLERANCE = 100203 - + DISPLAY_MODE = 100204 - + PARAMETRIC_TOLERANCE = 100202 - + SAMPLING_METHOD = 100205 - + U_STEP = 100206 - + V_STEP = 100207 - + NURBS_MODE = 100160 - + NURBS_MODE_EXT = 100160 - + NURBS_TESSELLATOR = 100161 - + NURBS_TESSELLATOR_EXT = 100161 - + NURBS_RENDERER = 100162 - + NURBS_RENDERER_EXT = 100162 - + OBJECT_PARAMETRIC_ERROR = 100208 - + OBJECT_PARAMETRIC_ERROR_EXT = 100208 - + OBJECT_PATH_LENGTH = 100209 - + OBJECT_PATH_LENGTH_EXT = 100209 - + PATH_LENGTH = 100215 - + PARAMETRIC_ERROR = 100216 - + DOMAIN_DISTANCE = 100217 - + MAP1_TRIM_2 = 100210 - + MAP1_TRIM_3 = 100211 - + POINT = 100010 - + LINE = 100011 - + FILL = 100012 - + SILHOUETTE = 100013 - + SMOOTH = 100000 - + FLAT = 100001 - + NONE = 100002 - + OUTSIDE = 100020 - + INSIDE = 100021 - + TESS_BEGIN = 100100 - + BEGIN_ = 100100 - + TESS_VERTEX = 100101 - + VERTEX = 100101 - + TESS_END = 100102 - + END_ = 100102 - + TESS_ERROR = 100103 - + TESS_EDGE_FLAG = 100104 - + EDGE_FLAG = 100104 - + TESS_COMBINE = 100105 - + TESS_BEGIN_DATA = 100106 - + TESS_VERTEX_DATA = 100107 - + TESS_END_DATA = 100108 - + TESS_ERROR_DATA = 100109 - + TESS_EDGE_FLAG_DATA = 100110 - + TESS_COMBINE_DATA = 100111 - + CW = 100120 - + CCW = 100121 - + INTERIOR = 100122 - + EXTERIOR = 100123 - + UNKNOWN = 100124 - + TESS_WINDING_RULE = 100140 - + TESS_BOUNDARY_ONLY = 100141 - + TESS_TOLERANCE = 100142 - + TESS_ERROR1 = 100151 - + TESS_ERROR2 = 100152 - + TESS_ERROR3 = 100153 - + TESS_ERROR4 = 100154 - + TESS_ERROR5 = 100155 - + TESS_ERROR6 = 100156 - + TESS_ERROR7 = 100157 - + TESS_ERROR8 = 100158 - + TESS_MISSING_BEGIN_POLYGON = 100151 - + TESS_MISSING_BEGIN_CONTOUR = 100152 - + TESS_MISSING_END_POLYGON = 100153 - + TESS_MISSING_END_CONTOUR = 100154 - + TESS_COORD_TOO_LARGE = 100155 - + TESS_NEED_COMBINE_CALLBACK = 100156 - + TESS_WINDING_ODD = 100130 - + TESS_WINDING_NONZERO = 100131 - + TESS_WINDING_POSITIVE = 100132 - + TESS_WINDING_NEGATIVE = 100133 - + TESS_WINDING_ABS_GEQ_TWO = 100134 - + TESS_MAX_COORD = 1.0e150 - + # (Not documented) class GLUnurbs < FFI::Struct layout :dummy, :char end - + # (Not documented) class GLUquadric < FFI::Struct layout :dummy, :char end - + # (Not documented) class GLUtesselator < FFI::Struct layout :dummy, :char end - + # (Not documented) - # + # @method begin_curve(nurb) - # @param [GLUnurbs] nurb - # @return [nil] + # @param [GLUnurbs] nurb + # @return [nil] # @scope class attach_function :begin_curve, :gluBeginCurve, [GLUnurbs], :void - # (Not documented) - # + # @method begin_polygon(tess) - # @param [GLUtesselator] tess - # @return [nil] + # @param [GLUtesselator] tess + # @return [nil] # @scope class attach_function :begin_polygon, :gluBeginPolygon, [GLUtesselator], :void - # (Not documented) - # + # @method begin_surface(nurb) - # @param [GLUnurbs] nurb - # @return [nil] + # @param [GLUnurbs] nurb + # @return [nil] # @scope class attach_function :begin_surface, :gluBeginSurface, [GLUnurbs], :void - # (Not documented) - # + # @method begin_trim(nurb) - # @param [GLUnurbs] nurb - # @return [nil] + # @param [GLUnurbs] nurb + # @return [nil] # @scope class attach_function :begin_trim, :gluBeginTrim, [GLUnurbs], :void - # (Not documented) - # + # @method build1d_mipmap_levels(target, internal_format, width, format, type, level, base, max, data) - # @param [Integer] target - # @param [Integer] internal_format - # @param [Integer] width - # @param [Integer] format - # @param [Integer] type - # @param [Integer] level - # @param [Integer] base - # @param [Integer] max - # @param [FFI::Pointer(*Void)] data - # @return [Integer] + # @param [Integer] target + # @param [Integer] internal_format + # @param [Integer] width + # @param [Integer] format + # @param [Integer] type + # @param [Integer] level + # @param [Integer] base + # @param [Integer] max + # @param [FFI::Pointer(*Void)] data + # @return [Integer] # @scope class attach_function :build1d_mipmap_levels, :gluBuild1DMipmapLevels, [:uint, :int, :int, :uint, :uint, :int, :int, :int, :pointer], :int - # (Not documented) - # + # @method build1d_mipmaps(target, internal_format, width, format, type, data) - # @param [Integer] target - # @param [Integer] internal_format - # @param [Integer] width - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*Void)] data - # @return [Integer] + # @param [Integer] target + # @param [Integer] internal_format + # @param [Integer] width + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*Void)] data + # @return [Integer] # @scope class attach_function :build1d_mipmaps, :gluBuild1DMipmaps, [:uint, :int, :int, :uint, :uint, :pointer], :int - # (Not documented) - # + # @method build2d_mipmap_levels(target, internal_format, width, height, format, type, level, base, max, data) - # @param [Integer] target - # @param [Integer] internal_format - # @param [Integer] width - # @param [Integer] height - # @param [Integer] format - # @param [Integer] type - # @param [Integer] level - # @param [Integer] base - # @param [Integer] max - # @param [FFI::Pointer(*Void)] data - # @return [Integer] + # @param [Integer] target + # @param [Integer] internal_format + # @param [Integer] width + # @param [Integer] height + # @param [Integer] format + # @param [Integer] type + # @param [Integer] level + # @param [Integer] base + # @param [Integer] max + # @param [FFI::Pointer(*Void)] data + # @return [Integer] # @scope class attach_function :build2d_mipmap_levels, :gluBuild2DMipmapLevels, [:uint, :int, :int, :int, :uint, :uint, :int, :int, :int, :pointer], :int - # (Not documented) - # + # @method build2d_mipmaps(target, internal_format, width, height, format, type, data) - # @param [Integer] target - # @param [Integer] internal_format - # @param [Integer] width - # @param [Integer] height - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*Void)] data - # @return [Integer] + # @param [Integer] target + # @param [Integer] internal_format + # @param [Integer] width + # @param [Integer] height + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*Void)] data + # @return [Integer] # @scope class attach_function :build2d_mipmaps, :gluBuild2DMipmaps, [:uint, :int, :int, :int, :uint, :uint, :pointer], :int - # (Not documented) - # + # @method build3d_mipmap_levels(target, internal_format, width, height, depth, format, type, level, base, max, data) - # @param [Integer] target - # @param [Integer] internal_format - # @param [Integer] width - # @param [Integer] height - # @param [Integer] depth - # @param [Integer] format - # @param [Integer] type - # @param [Integer] level - # @param [Integer] base - # @param [Integer] max - # @param [FFI::Pointer(*Void)] data - # @return [Integer] + # @param [Integer] target + # @param [Integer] internal_format + # @param [Integer] width + # @param [Integer] height + # @param [Integer] depth + # @param [Integer] format + # @param [Integer] type + # @param [Integer] level + # @param [Integer] base + # @param [Integer] max + # @param [FFI::Pointer(*Void)] data + # @return [Integer] # @scope class attach_function :build3d_mipmap_levels, :gluBuild3DMipmapLevels, [:uint, :int, :int, :int, :int, :uint, :uint, :int, :int, :int, :pointer], :int - # (Not documented) - # + # @method build3d_mipmaps(target, internal_format, width, height, depth, format, type, data) - # @param [Integer] target - # @param [Integer] internal_format - # @param [Integer] width - # @param [Integer] height - # @param [Integer] depth - # @param [Integer] format - # @param [Integer] type - # @param [FFI::Pointer(*Void)] data - # @return [Integer] + # @param [Integer] target + # @param [Integer] internal_format + # @param [Integer] width + # @param [Integer] height + # @param [Integer] depth + # @param [Integer] format + # @param [Integer] type + # @param [FFI::Pointer(*Void)] data + # @return [Integer] # @scope class attach_function :build3d_mipmaps, :gluBuild3DMipmaps, [:uint, :int, :int, :int, :int, :uint, :uint, :pointer], :int - # (Not documented) - # + # @method check_extension(ext_name, ext_string) - # @param [FFI::Pointer(*GLubyte)] ext_name - # @param [FFI::Pointer(*GLubyte)] ext_string - # @return [Integer] + # @param [FFI::Pointer(*GLubyte)] ext_name + # @param [FFI::Pointer(*GLubyte)] ext_string + # @return [Integer] # @scope class attach_function :check_extension, :gluCheckExtension, [:pointer, :pointer], :uchar - # (Not documented) - # + # @method cylinder(quad, base, top, height, slices, stacks) - # @param [GLUquadric] quad - # @param [Float] base - # @param [Float] top - # @param [Float] height - # @param [Integer] slices - # @param [Integer] stacks - # @return [nil] + # @param [GLUquadric] quad + # @param [Float] base + # @param [Float] top + # @param [Float] height + # @param [Integer] slices + # @param [Integer] stacks + # @return [nil] # @scope class attach_function :cylinder, :gluCylinder, [GLUquadric, :double, :double, :double, :int, :int], :void - # (Not documented) - # + # @method delete_nurbs_renderer(nurb) - # @param [GLUnurbs] nurb - # @return [nil] + # @param [GLUnurbs] nurb + # @return [nil] # @scope class attach_function :delete_nurbs_renderer, :gluDeleteNurbsRenderer, [GLUnurbs], :void - # (Not documented) - # + # @method delete_quadric(quad) - # @param [GLUquadric] quad - # @return [nil] + # @param [GLUquadric] quad + # @return [nil] # @scope class attach_function :delete_quadric, :gluDeleteQuadric, [GLUquadric], :void - # (Not documented) - # + # @method delete_tess(tess) - # @param [GLUtesselator] tess - # @return [nil] + # @param [GLUtesselator] tess + # @return [nil] # @scope class attach_function :delete_tess, :gluDeleteTess, [GLUtesselator], :void - # (Not documented) - # + # @method disk(quad, inner, outer, slices, loops) - # @param [GLUquadric] quad - # @param [Float] inner - # @param [Float] outer - # @param [Integer] slices - # @param [Integer] loops - # @return [nil] + # @param [GLUquadric] quad + # @param [Float] inner + # @param [Float] outer + # @param [Integer] slices + # @param [Integer] loops + # @return [nil] # @scope class attach_function :disk, :gluDisk, [GLUquadric, :double, :double, :int, :int], :void - # (Not documented) - # + # @method end_curve(nurb) - # @param [GLUnurbs] nurb - # @return [nil] + # @param [GLUnurbs] nurb + # @return [nil] # @scope class attach_function :end_curve, :gluEndCurve, [GLUnurbs], :void - # (Not documented) - # + # @method end_polygon(tess) - # @param [GLUtesselator] tess - # @return [nil] + # @param [GLUtesselator] tess + # @return [nil] # @scope class attach_function :end_polygon, :gluEndPolygon, [GLUtesselator], :void - # (Not documented) - # + # @method end_surface(nurb) - # @param [GLUnurbs] nurb - # @return [nil] + # @param [GLUnurbs] nurb + # @return [nil] # @scope class attach_function :end_surface, :gluEndSurface, [GLUnurbs], :void - # (Not documented) - # + # @method end_trim(nurb) - # @param [GLUnurbs] nurb - # @return [nil] + # @param [GLUnurbs] nurb + # @return [nil] # @scope class attach_function :end_trim, :gluEndTrim, [GLUnurbs], :void - # (Not documented) - # + # @method error_string(error) - # @param [Integer] error - # @return [FFI::Pointer(*GLubyte)] + # @param [Integer] error + # @return [FFI::Pointer(*GLubyte)] # @scope class attach_function :error_string, :gluErrorString, [:uint], :pointer - # (Not documented) - # + # @method get_nurbs_property(nurb, property, data) - # @param [GLUnurbs] nurb - # @param [Integer] property - # @param [FFI::Pointer(*GLfloat)] data - # @return [nil] + # @param [GLUnurbs] nurb + # @param [Integer] property + # @param [FFI::Pointer(*GLfloat)] data + # @return [nil] # @scope class attach_function :get_nurbs_property, :gluGetNurbsProperty, [GLUnurbs, :uint, :pointer], :void - # (Not documented) - # + # @method get_string(name) - # @param [Integer] name - # @return [FFI::Pointer(*GLubyte)] + # @param [Integer] name + # @return [FFI::Pointer(*GLubyte)] # @scope class attach_function :get_string, :gluGetString, [:uint], :pointer - # (Not documented) - # + # @method get_tess_property(tess, which, data) - # @param [GLUtesselator] tess - # @param [Integer] which - # @param [FFI::Pointer(*GLdouble)] data - # @return [nil] + # @param [GLUtesselator] tess + # @param [Integer] which + # @param [FFI::Pointer(*GLdouble)] data + # @return [nil] # @scope class attach_function :get_tess_property, :gluGetTessProperty, [GLUtesselator, :uint, :pointer], :void - # (Not documented) - # + # @method load_sampling_matrices(nurb, model, perspective, view) - # @param [GLUnurbs] nurb - # @param [FFI::Pointer(*GLfloat)] model - # @param [FFI::Pointer(*GLfloat)] perspective - # @param [FFI::Pointer(*GLint)] view - # @return [nil] + # @param [GLUnurbs] nurb + # @param [FFI::Pointer(*GLfloat)] model + # @param [FFI::Pointer(*GLfloat)] perspective + # @param [FFI::Pointer(*GLint)] view + # @return [nil] # @scope class attach_function :load_sampling_matrices, :gluLoadSamplingMatrices, [GLUnurbs, :pointer, :pointer, :pointer], :void - # (Not documented) - # + # @method look_at(eye_x, eye_y, eye_z, center_x, center_y, center_z, up_x, up_y, up_z) - # @param [Float] eye_x - # @param [Float] eye_y - # @param [Float] eye_z - # @param [Float] center_x - # @param [Float] center_y - # @param [Float] center_z - # @param [Float] up_x - # @param [Float] up_y - # @param [Float] up_z - # @return [nil] + # @param [Float] eye_x + # @param [Float] eye_y + # @param [Float] eye_z + # @param [Float] center_x + # @param [Float] center_y + # @param [Float] center_z + # @param [Float] up_x + # @param [Float] up_y + # @param [Float] up_z + # @return [nil] # @scope class attach_function :look_at, :gluLookAt, [:double, :double, :double, :double, :double, :double, :double, :double, :double], :void - # (Not documented) - # + # @method new_nurbs_renderer() - # @return [GLUnurbs] + # @return [GLUnurbs] # @scope class attach_function :new_nurbs_renderer, :gluNewNurbsRenderer, [], GLUnurbs - # (Not documented) - # + # @method new_quadric() - # @return [GLUquadric] + # @return [GLUquadric] # @scope class attach_function :new_quadric, :gluNewQuadric, [], GLUquadric - # (Not documented) - # + # @method new_tess() - # @return [GLUtesselator] + # @return [GLUtesselator] # @scope class attach_function :new_tess, :gluNewTess, [], GLUtesselator - # (Not documented) - # + # @method next_contour(tess, type) - # @param [GLUtesselator] tess - # @param [Integer] type - # @return [nil] + # @param [GLUtesselator] tess + # @param [Integer] type + # @return [nil] # @scope class attach_function :next_contour, :gluNextContour, [GLUtesselator, :uint], :void - # (Not documented) - # + # @method nurbs_callback(nurb, which, call_back_func) - # @param [GLUnurbs] nurb - # @param [Integer] which - # @param [FFI::Pointer(GLUfuncptr)] call_back_func - # @return [nil] + # @param [GLUnurbs] nurb + # @param [Integer] which + # @param [FFI::Pointer(GLUfuncptr)] call_back_func + # @return [nil] # @scope class attach_function :nurbs_callback, :gluNurbsCallback, [GLUnurbs, :uint, :pointer], :void - # (Not documented) - # + # @method nurbs_callback_data(nurb, user_data) - # @param [GLUnurbs] nurb - # @param [FFI::Pointer(*GLvoid)] user_data - # @return [nil] + # @param [GLUnurbs] nurb + # @param [FFI::Pointer(*GLvoid)] user_data + # @return [nil] # @scope class attach_function :nurbs_callback_data, :gluNurbsCallbackData, [GLUnurbs, :pointer], :void - # (Not documented) - # + # @method nurbs_callback_data_ext(nurb, user_data) - # @param [GLUnurbs] nurb - # @param [FFI::Pointer(*GLvoid)] user_data - # @return [nil] + # @param [GLUnurbs] nurb + # @param [FFI::Pointer(*GLvoid)] user_data + # @return [nil] # @scope class attach_function :nurbs_callback_data_ext, :gluNurbsCallbackDataEXT, [GLUnurbs, :pointer], :void - # (Not documented) - # + # @method nurbs_curve(nurb, knot_count, knots, stride, control, order, type) - # @param [GLUnurbs] nurb - # @param [Integer] knot_count - # @param [FFI::Pointer(*GLfloat)] knots - # @param [Integer] stride - # @param [FFI::Pointer(*GLfloat)] control - # @param [Integer] order - # @param [Integer] type - # @return [nil] + # @param [GLUnurbs] nurb + # @param [Integer] knot_count + # @param [FFI::Pointer(*GLfloat)] knots + # @param [Integer] stride + # @param [FFI::Pointer(*GLfloat)] control + # @param [Integer] order + # @param [Integer] type + # @return [nil] # @scope class attach_function :nurbs_curve, :gluNurbsCurve, [GLUnurbs, :int, :pointer, :int, :pointer, :int, :uint], :void - # (Not documented) - # + # @method nurbs_property(nurb, property, value) - # @param [GLUnurbs] nurb - # @param [Integer] property - # @param [Float] value - # @return [nil] + # @param [GLUnurbs] nurb + # @param [Integer] property + # @param [Float] value + # @return [nil] # @scope class attach_function :nurbs_property, :gluNurbsProperty, [GLUnurbs, :uint, :float], :void - # (Not documented) - # + # @method nurbs_surface(nurb, s_knot_count, s_knots, t_knot_count, t_knots, s_stride, t_stride, control, s_order, t_order, type) - # @param [GLUnurbs] nurb - # @param [Integer] s_knot_count - # @param [FFI::Pointer(*GLfloat)] s_knots - # @param [Integer] t_knot_count - # @param [FFI::Pointer(*GLfloat)] t_knots - # @param [Integer] s_stride - # @param [Integer] t_stride - # @param [FFI::Pointer(*GLfloat)] control - # @param [Integer] s_order - # @param [Integer] t_order - # @param [Integer] type - # @return [nil] + # @param [GLUnurbs] nurb + # @param [Integer] s_knot_count + # @param [FFI::Pointer(*GLfloat)] s_knots + # @param [Integer] t_knot_count + # @param [FFI::Pointer(*GLfloat)] t_knots + # @param [Integer] s_stride + # @param [Integer] t_stride + # @param [FFI::Pointer(*GLfloat)] control + # @param [Integer] s_order + # @param [Integer] t_order + # @param [Integer] type + # @return [nil] # @scope class attach_function :nurbs_surface, :gluNurbsSurface, [GLUnurbs, :int, :pointer, :int, :pointer, :int, :int, :pointer, :int, :int, :uint], :void - # (Not documented) - # + # @method ortho2d(left, right, bottom, top) - # @param [Float] left - # @param [Float] right - # @param [Float] bottom - # @param [Float] top - # @return [nil] + # @param [Float] left + # @param [Float] right + # @param [Float] bottom + # @param [Float] top + # @return [nil] # @scope class attach_function :ortho2d, :gluOrtho2D, [:double, :double, :double, :double], :void - # (Not documented) - # + # @method partial_disk(quad, inner, outer, slices, loops, start, sweep) - # @param [GLUquadric] quad - # @param [Float] inner - # @param [Float] outer - # @param [Integer] slices - # @param [Integer] loops - # @param [Float] start - # @param [Float] sweep - # @return [nil] + # @param [GLUquadric] quad + # @param [Float] inner + # @param [Float] outer + # @param [Integer] slices + # @param [Integer] loops + # @param [Float] start + # @param [Float] sweep + # @return [nil] # @scope class attach_function :partial_disk, :gluPartialDisk, [GLUquadric, :double, :double, :int, :int, :double, :double], :void - # (Not documented) - # + # @method perspective(fovy, aspect, z_near, z_far) - # @param [Float] fovy - # @param [Float] aspect - # @param [Float] z_near - # @param [Float] z_far - # @return [nil] + # @param [Float] fovy + # @param [Float] aspect + # @param [Float] z_near + # @param [Float] z_far + # @return [nil] # @scope class attach_function :perspective, :gluPerspective, [:double, :double, :double, :double], :void - # (Not documented) - # + # @method pick_matrix(x, y, del_x, del_y, viewport) - # @param [Float] x - # @param [Float] y - # @param [Float] del_x - # @param [Float] del_y - # @param [FFI::Pointer(*GLint)] viewport - # @return [nil] + # @param [Float] x + # @param [Float] y + # @param [Float] del_x + # @param [Float] del_y + # @param [FFI::Pointer(*GLint)] viewport + # @return [nil] # @scope class attach_function :pick_matrix, :gluPickMatrix, [:double, :double, :double, :double, :pointer], :void - # (Not documented) - # + # @method project(obj_x, obj_y, obj_z, model, proj, view, win_x, win_y, win_z) - # @param [Float] obj_x - # @param [Float] obj_y - # @param [Float] obj_z - # @param [FFI::Pointer(*GLdouble)] model - # @param [FFI::Pointer(*GLdouble)] proj - # @param [FFI::Pointer(*GLint)] view - # @param [FFI::Pointer(*GLdouble)] win_x - # @param [FFI::Pointer(*GLdouble)] win_y - # @param [FFI::Pointer(*GLdouble)] win_z - # @return [Integer] + # @param [Float] obj_x + # @param [Float] obj_y + # @param [Float] obj_z + # @param [FFI::Pointer(*GLdouble)] model + # @param [FFI::Pointer(*GLdouble)] proj + # @param [FFI::Pointer(*GLint)] view + # @param [FFI::Pointer(*GLdouble)] win_x + # @param [FFI::Pointer(*GLdouble)] win_y + # @param [FFI::Pointer(*GLdouble)] win_z + # @return [Integer] # @scope class attach_function :project, :gluProject, [:double, :double, :double, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :int - # (Not documented) - # + # @method pwl_curve(nurb, count, data, stride, type) - # @param [GLUnurbs] nurb - # @param [Integer] count - # @param [FFI::Pointer(*GLfloat)] data - # @param [Integer] stride - # @param [Integer] type - # @return [nil] + # @param [GLUnurbs] nurb + # @param [Integer] count + # @param [FFI::Pointer(*GLfloat)] data + # @param [Integer] stride + # @param [Integer] type + # @return [nil] # @scope class attach_function :pwl_curve, :gluPwlCurve, [GLUnurbs, :int, :pointer, :int, :uint], :void - # (Not documented) - # + # @method quadric_callback(quad, which, call_back_func) - # @param [GLUquadric] quad - # @param [Integer] which - # @param [FFI::Pointer(GLUfuncptr)] call_back_func - # @return [nil] + # @param [GLUquadric] quad + # @param [Integer] which + # @param [FFI::Pointer(GLUfuncptr)] call_back_func + # @return [nil] # @scope class attach_function :quadric_callback, :gluQuadricCallback, [GLUquadric, :uint, :pointer], :void - # (Not documented) - # + # @method quadric_draw_style(quad, draw) - # @param [GLUquadric] quad - # @param [Integer] draw - # @return [nil] + # @param [GLUquadric] quad + # @param [Integer] draw + # @return [nil] # @scope class attach_function :quadric_draw_style, :gluQuadricDrawStyle, [GLUquadric, :uint], :void - # (Not documented) - # + # @method quadric_normals(quad, normal) - # @param [GLUquadric] quad - # @param [Integer] normal - # @return [nil] + # @param [GLUquadric] quad + # @param [Integer] normal + # @return [nil] # @scope class attach_function :quadric_normals, :gluQuadricNormals, [GLUquadric, :uint], :void - # (Not documented) - # + # @method quadric_orientation(quad, orientation) - # @param [GLUquadric] quad - # @param [Integer] orientation - # @return [nil] + # @param [GLUquadric] quad + # @param [Integer] orientation + # @return [nil] # @scope class attach_function :quadric_orientation, :gluQuadricOrientation, [GLUquadric, :uint], :void - # (Not documented) - # + # @method quadric_texture(quad, texture) - # @param [GLUquadric] quad - # @param [Integer] texture - # @return [nil] + # @param [GLUquadric] quad + # @param [Integer] texture + # @return [nil] # @scope class attach_function :quadric_texture, :gluQuadricTexture, [GLUquadric, :uchar], :void - # (Not documented) - # + # @method scale_image(format, w_in, h_in, type_in, data_in, w_out, h_out, type_out, data_out) - # @param [Integer] format - # @param [Integer] w_in - # @param [Integer] h_in - # @param [Integer] type_in - # @param [FFI::Pointer(*Void)] data_in - # @param [Integer] w_out - # @param [Integer] h_out - # @param [Integer] type_out - # @param [FFI::Pointer(*GLvoid)] data_out - # @return [Integer] + # @param [Integer] format + # @param [Integer] w_in + # @param [Integer] h_in + # @param [Integer] type_in + # @param [FFI::Pointer(*Void)] data_in + # @param [Integer] w_out + # @param [Integer] h_out + # @param [Integer] type_out + # @param [FFI::Pointer(*GLvoid)] data_out + # @return [Integer] # @scope class attach_function :scale_image, :gluScaleImage, [:uint, :int, :int, :uint, :pointer, :int, :int, :uint, :pointer], :int - # (Not documented) - # + # @method sphere(quad, radius, slices, stacks) - # @param [GLUquadric] quad - # @param [Float] radius - # @param [Integer] slices - # @param [Integer] stacks - # @return [nil] + # @param [GLUquadric] quad + # @param [Float] radius + # @param [Integer] slices + # @param [Integer] stacks + # @return [nil] # @scope class attach_function :sphere, :gluSphere, [GLUquadric, :double, :int, :int], :void - # (Not documented) - # + # @method tess_begin_contour(tess) - # @param [GLUtesselator] tess - # @return [nil] + # @param [GLUtesselator] tess + # @return [nil] # @scope class attach_function :tess_begin_contour, :gluTessBeginContour, [GLUtesselator], :void - # (Not documented) - # + # @method tess_begin_polygon(tess, data) - # @param [GLUtesselator] tess - # @param [FFI::Pointer(*GLvoid)] data - # @return [nil] + # @param [GLUtesselator] tess + # @param [FFI::Pointer(*GLvoid)] data + # @return [nil] # @scope class attach_function :tess_begin_polygon, :gluTessBeginPolygon, [GLUtesselator, :pointer], :void - # (Not documented) - # + # @method tess_callback(tess, which, call_back_func) - # @param [GLUtesselator] tess - # @param [Integer] which - # @param [FFI::Pointer(GLUfuncptr)] call_back_func - # @return [nil] + # @param [GLUtesselator] tess + # @param [Integer] which + # @param [FFI::Pointer(GLUfuncptr)] call_back_func + # @return [nil] # @scope class attach_function :tess_callback, :gluTessCallback, [GLUtesselator, :uint, :pointer], :void - # (Not documented) - # + # @method tess_end_contour(tess) - # @param [GLUtesselator] tess - # @return [nil] + # @param [GLUtesselator] tess + # @return [nil] # @scope class attach_function :tess_end_contour, :gluTessEndContour, [GLUtesselator], :void - # (Not documented) - # + # @method tess_end_polygon(tess) - # @param [GLUtesselator] tess - # @return [nil] + # @param [GLUtesselator] tess + # @return [nil] # @scope class attach_function :tess_end_polygon, :gluTessEndPolygon, [GLUtesselator], :void - # (Not documented) - # + # @method tess_normal(tess, value_x, value_y, value_z) - # @param [GLUtesselator] tess - # @param [Float] value_x - # @param [Float] value_y - # @param [Float] value_z - # @return [nil] + # @param [GLUtesselator] tess + # @param [Float] value_x + # @param [Float] value_y + # @param [Float] value_z + # @return [nil] # @scope class attach_function :tess_normal, :gluTessNormal, [GLUtesselator, :double, :double, :double], :void - # (Not documented) - # + # @method tess_property(tess, which, data) - # @param [GLUtesselator] tess - # @param [Integer] which - # @param [Float] data - # @return [nil] + # @param [GLUtesselator] tess + # @param [Integer] which + # @param [Float] data + # @return [nil] # @scope class attach_function :tess_property, :gluTessProperty, [GLUtesselator, :uint, :double], :void - # (Not documented) - # + # @method tess_vertex(tess, location, data) - # @param [GLUtesselator] tess - # @param [FFI::Pointer(*GLdouble)] location - # @param [FFI::Pointer(*GLvoid)] data - # @return [nil] + # @param [GLUtesselator] tess + # @param [FFI::Pointer(*GLdouble)] location + # @param [FFI::Pointer(*GLvoid)] data + # @return [nil] # @scope class attach_function :tess_vertex, :gluTessVertex, [GLUtesselator, :pointer, :pointer], :void - # (Not documented) - # + # @method un_project(win_x, win_y, win_z, model, proj, view, obj_x, obj_y, obj_z) - # @param [Float] win_x - # @param [Float] win_y - # @param [Float] win_z - # @param [FFI::Pointer(*GLdouble)] model - # @param [FFI::Pointer(*GLdouble)] proj - # @param [FFI::Pointer(*GLint)] view - # @param [FFI::Pointer(*GLdouble)] obj_x - # @param [FFI::Pointer(*GLdouble)] obj_y - # @param [FFI::Pointer(*GLdouble)] obj_z - # @return [Integer] + # @param [Float] win_x + # @param [Float] win_y + # @param [Float] win_z + # @param [FFI::Pointer(*GLdouble)] model + # @param [FFI::Pointer(*GLdouble)] proj + # @param [FFI::Pointer(*GLint)] view + # @param [FFI::Pointer(*GLdouble)] obj_x + # @param [FFI::Pointer(*GLdouble)] obj_y + # @param [FFI::Pointer(*GLdouble)] obj_z + # @return [Integer] # @scope class attach_function :un_project, :gluUnProject, [:double, :double, :double, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :int - # (Not documented) - # + # @method un_project4(win_x, win_y, win_z, clip_w, model, proj, view, near_val, far_val, obj_x, obj_y, obj_z, obj_w) - # @param [Float] win_x - # @param [Float] win_y - # @param [Float] win_z - # @param [Float] clip_w - # @param [FFI::Pointer(*GLdouble)] model - # @param [FFI::Pointer(*GLdouble)] proj - # @param [FFI::Pointer(*GLint)] view - # @param [Float] near_val - # @param [Float] far_val - # @param [FFI::Pointer(*GLdouble)] obj_x - # @param [FFI::Pointer(*GLdouble)] obj_y - # @param [FFI::Pointer(*GLdouble)] obj_z - # @param [FFI::Pointer(*GLdouble)] obj_w - # @return [Integer] + # @param [Float] win_x + # @param [Float] win_y + # @param [Float] win_z + # @param [Float] clip_w + # @param [FFI::Pointer(*GLdouble)] model + # @param [FFI::Pointer(*GLdouble)] proj + # @param [FFI::Pointer(*GLint)] view + # @param [Float] near_val + # @param [Float] far_val + # @param [FFI::Pointer(*GLdouble)] obj_x + # @param [FFI::Pointer(*GLdouble)] obj_y + # @param [FFI::Pointer(*GLdouble)] obj_z + # @param [FFI::Pointer(*GLdouble)] obj_w + # @return [Integer] # @scope class attach_function :un_project4, :gluUnProject4, [:double, :double, :double, :double, :pointer, :pointer, :pointer, :double, :double, :pointer, :pointer, :pointer, :pointer], :int - end diff --git a/test/output/cairo-deprecated.rb b/test/output/cairo-deprecated.rb index dd0623b..358cdb4 100644 --- a/test/output/cairo-deprecated.rb +++ b/test/output/cairo-deprecated.rb @@ -1,15 +1,17 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module Cairo + extend FFI::Library - ffi_lib 'cairo' - + + ffi_lib ENV["CAIRO_PATH"] || "cairo" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + end diff --git a/test/output/cairo-features.rb b/test/output/cairo-features.rb index 715751d..13b92c8 100644 --- a/test/output/cairo-features.rb +++ b/test/output/cairo-features.rb @@ -1,43 +1,45 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module Cairo + extend FFI::Library - ffi_lib 'cairo' - + + ffi_lib ENV["CAIRO_PATH"] || "cairo" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + HAS_FC_FONT = 1 - + HAS_FT_FONT = 1 - + HAS_GOBJECT_FUNCTIONS = 1 - + HAS_IMAGE_SURFACE = 1 - + HAS_PDF_SURFACE = 1 - + HAS_PNG_FUNCTIONS = 1 - + HAS_PS_SURFACE = 1 - + HAS_RECORDING_SURFACE = 1 - + HAS_SVG_SURFACE = 1 - + HAS_USER_FONT = 1 - + HAS_XCB_SHM_FUNCTIONS = 1 - + HAS_XCB_SURFACE = 1 - + HAS_XLIB_SURFACE = 1 - + HAS_XLIB_XRENDER_SURFACE = 1 - + end diff --git a/test/output/cairo-ft.rb b/test/output/cairo-ft.rb index 34bdc89..3631fee 100644 --- a/test/output/cairo-ft.rb +++ b/test/output/cairo-ft.rb @@ -1,57 +1,54 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module Cairo + extend FFI::Library - ffi_lib 'cairo' - + + ffi_lib ENV["CAIRO_PATH"] || "cairo" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Fontconfig/Freetype platform-specific font interface - # + # @method ft_font_face_create_for_ft_face(face, load_flags) - # @param [FFI::Pointer(FTFace)] face - # @param [Integer] load_flags - # @return [FFI::Pointer(*FontFaceT)] + # @param [FFI::Pointer(FTFace)] face + # @param [Integer] load_flags + # @return [FFI::Pointer(*FontFaceT)] # @scope class attach_function :ft_font_face_create_for_ft_face, :cairo_ft_font_face_create_for_ft_face, [:pointer, :int], :pointer - # (Not documented) - # + # @method ft_scaled_font_lock_face(scaled_font) - # @param [FFI::Pointer(*ScaledFontT)] scaled_font - # @return [FFI::Pointer(FTFace)] + # @param [FFI::Pointer(*ScaledFontT)] scaled_font + # @return [FFI::Pointer(FTFace)] # @scope class attach_function :ft_scaled_font_lock_face, :cairo_ft_scaled_font_lock_face, [:pointer], :pointer - # (Not documented) - # + # @method ft_scaled_font_unlock_face(scaled_font) - # @param [FFI::Pointer(*ScaledFontT)] scaled_font - # @return [nil] + # @param [FFI::Pointer(*ScaledFontT)] scaled_font + # @return [nil] # @scope class attach_function :ft_scaled_font_unlock_face, :cairo_ft_scaled_font_unlock_face, [:pointer], :void - # (Not documented) - # + # @method ft_font_face_create_for_pattern(pattern) - # @param [FFI::Pointer(*FcPattern)] pattern - # @return [FFI::Pointer(*FontFaceT)] + # @param [FFI::Pointer(*FcPattern)] pattern + # @return [FFI::Pointer(*FontFaceT)] # @scope class attach_function :ft_font_face_create_for_pattern, :cairo_ft_font_face_create_for_pattern, [:pointer], :pointer - # (Not documented) - # + # @method ft_font_options_substitute(options, pattern) - # @param [FFI::Pointer(*FontOptionsT)] options - # @param [FFI::Pointer(*FcPattern)] pattern - # @return [nil] + # @param [FFI::Pointer(*FontOptionsT)] options + # @param [FFI::Pointer(*FcPattern)] pattern + # @return [nil] # @scope class attach_function :ft_font_options_substitute, :cairo_ft_font_options_substitute, [:pointer, :pointer], :void - end diff --git a/test/output/cairo-gobject.rb b/test/output/cairo-gobject.rb index afce4f3..84c7178 100644 --- a/test/output/cairo-gobject.rb +++ b/test/output/cairo-gobject.rb @@ -1,239 +1,209 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module Cairo + extend FFI::Library - ffi_lib 'cairo' - + + ffi_lib ENV["CAIRO_PATH"] || "cairo" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) - # + # @method gobject_context_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_context_get_type, :cairo_gobject_context_get_type, [], :int - # (Not documented) - # + # @method gobject_device_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_device_get_type, :cairo_gobject_device_get_type, [], :int - # (Not documented) - # + # @method gobject_pattern_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_pattern_get_type, :cairo_gobject_pattern_get_type, [], :int - # (Not documented) - # + # @method gobject_surface_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_surface_get_type, :cairo_gobject_surface_get_type, [], :int - # (Not documented) - # + # @method gobject_rectangle_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_rectangle_get_type, :cairo_gobject_rectangle_get_type, [], :int - # (Not documented) - # + # @method gobject_scaled_font_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_scaled_font_get_type, :cairo_gobject_scaled_font_get_type, [], :int - # (Not documented) - # + # @method gobject_font_face_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_font_face_get_type, :cairo_gobject_font_face_get_type, [], :int - # (Not documented) - # + # @method gobject_font_options_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_font_options_get_type, :cairo_gobject_font_options_get_type, [], :int - # (Not documented) - # + # @method gobject_rectangle_int_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_rectangle_int_get_type, :cairo_gobject_rectangle_int_get_type, [], :int - # (Not documented) - # + # @method gobject_region_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_region_get_type, :cairo_gobject_region_get_type, [], :int - # enums - # + # @method gobject_status_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_status_get_type, :cairo_gobject_status_get_type, [], :int - # (Not documented) - # + # @method gobject_content_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_content_get_type, :cairo_gobject_content_get_type, [], :int - # (Not documented) - # + # @method gobject_operator_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_operator_get_type, :cairo_gobject_operator_get_type, [], :int - # (Not documented) - # + # @method gobject_antialias_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_antialias_get_type, :cairo_gobject_antialias_get_type, [], :int - # (Not documented) - # + # @method gobject_fill_rule_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_fill_rule_get_type, :cairo_gobject_fill_rule_get_type, [], :int - # (Not documented) - # + # @method gobject_line_cap_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_line_cap_get_type, :cairo_gobject_line_cap_get_type, [], :int - # (Not documented) - # + # @method gobject_line_join_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_line_join_get_type, :cairo_gobject_line_join_get_type, [], :int - # (Not documented) - # + # @method gobject_text_cluster_flags_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_text_cluster_flags_get_type, :cairo_gobject_text_cluster_flags_get_type, [], :int - # (Not documented) - # + # @method gobject_font_slant_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_font_slant_get_type, :cairo_gobject_font_slant_get_type, [], :int - # (Not documented) - # + # @method gobject_font_weight_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_font_weight_get_type, :cairo_gobject_font_weight_get_type, [], :int - # (Not documented) - # + # @method gobject_subpixel_order_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_subpixel_order_get_type, :cairo_gobject_subpixel_order_get_type, [], :int - # (Not documented) - # + # @method gobject_hint_style_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_hint_style_get_type, :cairo_gobject_hint_style_get_type, [], :int - # (Not documented) - # + # @method gobject_hint_metrics_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_hint_metrics_get_type, :cairo_gobject_hint_metrics_get_type, [], :int - # (Not documented) - # + # @method gobject_font_type_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_font_type_get_type, :cairo_gobject_font_type_get_type, [], :int - # (Not documented) - # + # @method gobject_path_data_type_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_path_data_type_get_type, :cairo_gobject_path_data_type_get_type, [], :int - # (Not documented) - # + # @method gobject_device_type_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_device_type_get_type, :cairo_gobject_device_type_get_type, [], :int - # (Not documented) - # + # @method gobject_surface_type_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_surface_type_get_type, :cairo_gobject_surface_type_get_type, [], :int - # (Not documented) - # + # @method gobject_format_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_format_get_type, :cairo_gobject_format_get_type, [], :int - # (Not documented) - # + # @method gobject_pattern_type_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_pattern_type_get_type, :cairo_gobject_pattern_type_get_type, [], :int - # (Not documented) - # + # @method gobject_extend_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_extend_get_type, :cairo_gobject_extend_get_type, [], :int - # (Not documented) - # + # @method gobject_filter_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_filter_get_type, :cairo_gobject_filter_get_type, [], :int - # (Not documented) - # + # @method gobject_region_overlap_get_type() - # @return [Integer] + # @return [Integer] # @scope class attach_function :gobject_region_overlap_get_type, :cairo_gobject_region_overlap_get_type, [], :int - end diff --git a/test/output/cairo-pdf.rb b/test/output/cairo-pdf.rb index 3d4bc22..2d7be2b 100644 --- a/test/output/cairo-pdf.rb +++ b/test/output/cairo-pdf.rb @@ -1,32 +1,34 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module Cairo + extend FFI::Library - ffi_lib 'cairo' - + + ffi_lib ENV["CAIRO_PATH"] || "cairo" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # cairo_pdf_version_t: - # + # #cairo_pdf_version_t is used to describe the version number of the PDF # specification that a generated PDF file will conform to. - # + # Since 1.10 - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:pdf_version). - # + # === Options: # :_1_4 :: # The version 1.4 of the PDF specification. # :_1_5 :: # The version 1.5 of the PDF specification. - # + # @method _enum_pdf_version_ # @return [Symbol] # @scope class @@ -34,62 +36,56 @@ def self.attach_function(name, *_) :_1_4, 0, :_1_5, 1 ] - + # (Not documented) - # + # @method pdf_surface_create(filename, width_in_points, height_in_points) - # @param [String] filename - # @param [Float] width_in_points - # @param [Float] height_in_points - # @return [FFI::Pointer(*SurfaceT)] + # @param [String] filename + # @param [Float] width_in_points + # @param [Float] height_in_points + # @return [FFI::Pointer(*SurfaceT)] # @scope class attach_function :pdf_surface_create, :cairo_pdf_surface_create, [:string, :double, :double], :pointer - # (Not documented) - # + # @method pdf_surface_create_for_stream(write_func, closure, width_in_points, height_in_points) - # @param [FFI::Pointer(WriteFuncT)] write_func - # @param [FFI::Pointer(*Void)] closure - # @param [Float] width_in_points - # @param [Float] height_in_points - # @return [FFI::Pointer(*SurfaceT)] + # @param [FFI::Pointer(WriteFuncT)] write_func + # @param [FFI::Pointer(*Void)] closure + # @param [Float] width_in_points + # @param [Float] height_in_points + # @return [FFI::Pointer(*SurfaceT)] # @scope class attach_function :pdf_surface_create_for_stream, :cairo_pdf_surface_create_for_stream, [:pointer, :pointer, :double, :double], :pointer - # (Not documented) - # + # @method pdf_surface_restrict_to_version(surface, version) - # @param [FFI::Pointer(*SurfaceT)] surface - # @param [Symbol from _enum_pdf_version_] version - # @return [nil] + # @param [FFI::Pointer(*SurfaceT)] surface + # @param [Symbol from _enum_pdf_version_] version + # @return [nil] # @scope class attach_function :pdf_surface_restrict_to_version, :cairo_pdf_surface_restrict_to_version, [:pointer, :pdf_version], :void - # (Not documented) - # + # @method pdf_get_versions(versions, num_versions) - # @param [FFI::Pointer(**PdfVersionT)] versions - # @param [FFI::Pointer(*Int)] num_versions - # @return [nil] + # @param [FFI::Pointer(**PdfVersionT)] versions + # @param [FFI::Pointer(*Int)] num_versions + # @return [nil] # @scope class attach_function :pdf_get_versions, :cairo_pdf_get_versions, [:pointer, :pointer], :void - # (Not documented) - # + # @method pdf_version_to_string(version) - # @param [Symbol from _enum_pdf_version_] version - # @return [String] + # @param [Symbol from _enum_pdf_version_] version + # @return [String] # @scope class attach_function :pdf_version_to_string, :cairo_pdf_version_to_string, [:pdf_version], :string - # (Not documented) - # + # @method pdf_surface_set_size(surface, width_in_points, height_in_points) - # @param [FFI::Pointer(*SurfaceT)] surface - # @param [Float] width_in_points - # @param [Float] height_in_points - # @return [nil] + # @param [FFI::Pointer(*SurfaceT)] surface + # @param [Float] width_in_points + # @param [Float] height_in_points + # @return [nil] # @scope class attach_function :pdf_surface_set_size, :cairo_pdf_surface_set_size, [:pointer, :double, :double], :void - end diff --git a/test/output/cairo-ps.rb b/test/output/cairo-ps.rb index df05474..fe72b2b 100644 --- a/test/output/cairo-ps.rb +++ b/test/output/cairo-ps.rb @@ -1,31 +1,33 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module Cairo + extend FFI::Library - ffi_lib 'cairo' - + + ffi_lib ENV["CAIRO_PATH"] || "cairo" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # cairo_ps_level_t: - # + # #cairo_ps_level_t is used to describe the language level of the # PostScript Language Reference that a generated PostScript file will # conform to. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:ps_level). - # + # === Options: # :_2 :: # The language level 2 of the PostScript specification. # :_3 :: # The language level 3 of the PostScript specification. - # + # @method _enum_ps_level_ # @return [Symbol] # @scope class @@ -33,104 +35,93 @@ def self.attach_function(name, *_) :_2, 0, :_3, 1 ] - + # (Not documented) - # + # @method ps_surface_create(filename, width_in_points, height_in_points) - # @param [String] filename - # @param [Float] width_in_points - # @param [Float] height_in_points - # @return [FFI::Pointer(*SurfaceT)] + # @param [String] filename + # @param [Float] width_in_points + # @param [Float] height_in_points + # @return [FFI::Pointer(*SurfaceT)] # @scope class attach_function :ps_surface_create, :cairo_ps_surface_create, [:string, :double, :double], :pointer - # (Not documented) - # + # @method ps_surface_create_for_stream(write_func, closure, width_in_points, height_in_points) - # @param [FFI::Pointer(WriteFuncT)] write_func - # @param [FFI::Pointer(*Void)] closure - # @param [Float] width_in_points - # @param [Float] height_in_points - # @return [FFI::Pointer(*SurfaceT)] + # @param [FFI::Pointer(WriteFuncT)] write_func + # @param [FFI::Pointer(*Void)] closure + # @param [Float] width_in_points + # @param [Float] height_in_points + # @return [FFI::Pointer(*SurfaceT)] # @scope class attach_function :ps_surface_create_for_stream, :cairo_ps_surface_create_for_stream, [:pointer, :pointer, :double, :double], :pointer - # (Not documented) - # + # @method ps_surface_restrict_to_level(surface, level) - # @param [FFI::Pointer(*SurfaceT)] surface - # @param [Symbol from _enum_ps_level_] level - # @return [nil] + # @param [FFI::Pointer(*SurfaceT)] surface + # @param [Integer] level + # @return [nil] # @scope class - attach_function :ps_surface_restrict_to_level, :cairo_ps_surface_restrict_to_level, [:pointer, :ps_level], :void - + attach_function :ps_surface_restrict_to_level, :cairo_ps_surface_restrict_to_level, [:pointer, :int], :void # (Not documented) - # + # @method ps_get_levels(levels, num_levels) - # @param [FFI::Pointer(**PsLevelT)] levels - # @param [FFI::Pointer(*Int)] num_levels - # @return [nil] + # @param [FFI::Pointer(**PsLevelT)] levels + # @param [FFI::Pointer(*Int)] num_levels + # @return [nil] # @scope class attach_function :ps_get_levels, :cairo_ps_get_levels, [:pointer, :pointer], :void - # (Not documented) - # + # @method ps_level_to_string(level) - # @param [Symbol from _enum_ps_level_] level - # @return [String] + # @param [Integer] level + # @return [String] # @scope class - attach_function :ps_level_to_string, :cairo_ps_level_to_string, [:ps_level], :string - + attach_function :ps_level_to_string, :cairo_ps_level_to_string, [:int], :string # (Not documented) - # + # @method ps_surface_set_eps(surface, eps) - # @param [FFI::Pointer(*SurfaceT)] surface - # @param [Integer] eps - # @return [nil] + # @param [FFI::Pointer(*SurfaceT)] surface + # @param [Integer] eps + # @return [nil] # @scope class attach_function :ps_surface_set_eps, :cairo_ps_surface_set_eps, [:pointer, :int], :void - # (Not documented) - # + # @method ps_surface_get_eps(surface) - # @param [FFI::Pointer(*SurfaceT)] surface - # @return [Integer] + # @param [FFI::Pointer(*SurfaceT)] surface + # @return [Integer] # @scope class attach_function :ps_surface_get_eps, :cairo_ps_surface_get_eps, [:pointer], :int - # (Not documented) - # + # @method ps_surface_set_size(surface, width_in_points, height_in_points) - # @param [FFI::Pointer(*SurfaceT)] surface - # @param [Float] width_in_points - # @param [Float] height_in_points - # @return [nil] + # @param [FFI::Pointer(*SurfaceT)] surface + # @param [Float] width_in_points + # @param [Float] height_in_points + # @return [nil] # @scope class attach_function :ps_surface_set_size, :cairo_ps_surface_set_size, [:pointer, :double, :double], :void - # (Not documented) - # + # @method ps_surface_dsc_comment(surface, comment) - # @param [FFI::Pointer(*SurfaceT)] surface - # @param [String] comment - # @return [nil] + # @param [FFI::Pointer(*SurfaceT)] surface + # @param [String] comment + # @return [nil] # @scope class attach_function :ps_surface_dsc_comment, :cairo_ps_surface_dsc_comment, [:pointer, :string], :void - # (Not documented) - # + # @method ps_surface_dsc_begin_setup(surface) - # @param [FFI::Pointer(*SurfaceT)] surface - # @return [nil] + # @param [FFI::Pointer(*SurfaceT)] surface + # @return [nil] # @scope class attach_function :ps_surface_dsc_begin_setup, :cairo_ps_surface_dsc_begin_setup, [:pointer], :void - # (Not documented) - # + # @method ps_surface_dsc_begin_page_setup(surface) - # @param [FFI::Pointer(*SurfaceT)] surface - # @return [nil] + # @param [FFI::Pointer(*SurfaceT)] surface + # @return [nil] # @scope class attach_function :ps_surface_dsc_begin_page_setup, :cairo_ps_surface_dsc_begin_page_setup, [:pointer], :void - end diff --git a/test/output/cairo-script-interpreter.rb b/test/output/cairo-script-interpreter.rb index 5d894be..9d9febe 100644 --- a/test/output/cairo-script-interpreter.rb +++ b/test/output/cairo-script-interpreter.rb @@ -1,236 +1,185 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module Cairo + extend FFI::Library - ffi_lib 'cairo' - + + ffi_lib ENV["CAIRO_PATH"] || "cairo" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) - module ScriptInterpreterWrappers - # @param [FFI::Pointer(*ScriptInterpreterHooks)] hooks - # @return [nil] - def install_hooks(hooks) - Cairo.script_interpreter_install_hooks(self, hooks) - end - - # @param [String] filename - # @return [unknown] - def run(filename) - Cairo.script_interpreter_run(self, filename) - end - - # @param [FFI::Pointer(*FILE)] stream - # @return [unknown] - def feed_stream(stream) - Cairo.script_interpreter_feed_stream(self, stream) - end - - # @param [String] line - # @param [Integer] len - # @return [unknown] - def feed_string(line, len) - Cairo.script_interpreter_feed_string(self, line, len) - end - - # @return [Integer] - def get_line_number() - Cairo.script_interpreter_get_line_number(self) - end - - # @return [ScriptInterpreter] - def reference() - ScriptInterpreter.new Cairo.script_interpreter_reference(self) - end - - # @return [unknown] - def finish() - Cairo.script_interpreter_finish(self) - end - - # @return [unknown] - def destroy() - Cairo.script_interpreter_destroy(self) - end - end - class ScriptInterpreter < FFI::Struct - include ScriptInterpreterWrappers layout :dummy, :char end - + # XXX expose csi_dictionary_t and pass to hooks - # + # This entry is only for documentation and no real method. - # - # @method _callback_csi_destroy_func_t_(ptr) - # @param [FFI::Pointer(*Void)] ptr - # @return [FFI::Pointer(*Void)] + + # @method _callback_csi_destroy_func_t_(closure, ptr) + # @param [FFI::Pointer(*Void)] closure + # @param [FFI::Pointer(*Void)] ptr + # @return [FFI::Pointer(*Void)] # @scope class - callback :csi_destroy_func_t, [:pointer], :pointer - + callback :csi_destroy_func_t, [:pointer, :pointer], :pointer + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_csi_surface_create_func_t_(closure, content, width, height, uid) - # @param [FFI::Pointer(*Void)] closure - # @param [unknown] content - # @param [Float] width - # @param [Float] height - # @param [Integer] uid - # @return [unknown] + + # @method _callback_csi_surface_create_func_t_(surface_t, closure, content, width, height, uid) + # @param [error_unknown] surface_t + # @param [FFI::Pointer(*Void)] closure + # @param [error_unknown] content + # @param [Float] width + # @param [Float] height + # @param [Integer] uid + # @return [error_unknown] # @scope class - callback :csi_surface_create_func_t, [:pointer, :char, :double, :double, :long], :char - + callback :csi_surface_create_func_t, [:char, :pointer, :char, :double, :double, :long], :char + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_csi_context_create_func_t_(closure, surface) - # @param [FFI::Pointer(*Void)] closure - # @param [FFI::Pointer(*SurfaceT)] surface - # @return [unknown] + + # @method _callback_csi_context_create_func_t_(t, closure, surface) + # @param [error_unknown] t + # @param [FFI::Pointer(*Void)] closure + # @param [FFI::Pointer(*SurfaceT)] surface + # @return [error_unknown] # @scope class - callback :csi_context_create_func_t, [:pointer, :pointer], :char - + callback :csi_context_create_func_t, [:char, :pointer, :pointer], :char + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_csi_show_page_func_t_(cr) - # @param [FFI::Pointer(*T)] cr - # @return [FFI::Pointer(*Void)] + + # @method _callback_csi_show_page_func_t_(closure, cr) + # @param [FFI::Pointer(*Void)] closure + # @param [FFI::Pointer(*T)] cr + # @return [FFI::Pointer(*Void)] # @scope class - callback :csi_show_page_func_t, [:pointer], :pointer - + callback :csi_show_page_func_t, [:pointer, :pointer], :pointer + # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_csi_copy_page_func_t_(cr) - # @param [FFI::Pointer(*T)] cr - # @return [FFI::Pointer(*Void)] + + # @method _callback_csi_copy_page_func_t_(closure, cr) + # @param [FFI::Pointer(*Void)] closure + # @param [FFI::Pointer(*T)] cr + # @return [FFI::Pointer(*Void)] # @scope class - callback :csi_copy_page_func_t, [:pointer], :pointer - + callback :csi_copy_page_func_t, [:pointer, :pointer], :pointer + # (Not documented) - # + # = Fields: # :closure :: - # (FFI::Pointer(*Void)) + # (FFI::Pointer(*Void)) # :surface_create :: - # (Proc(_callback_csi_surface_create_func_t_)) + # (FFI::Pointer(CsiSurfaceCreateFuncT)) # :surface_destroy :: - # (Proc(_callback_csi_destroy_func_t_)) + # (FFI::Pointer(CsiDestroyFuncT)) # :context_create :: - # (Proc(_callback_csi_context_create_func_t_)) + # (FFI::Pointer(CsiContextCreateFuncT)) # :context_destroy :: - # (Proc(_callback_csi_destroy_func_t_)) + # (FFI::Pointer(CsiDestroyFuncT)) # :show_page :: - # (Proc(_callback_csi_show_page_func_t_)) + # (FFI::Pointer(CsiShowPageFuncT)) # :copy_page :: - # (Proc(_callback_csi_copy_page_func_t_)) + # (FFI::Pointer(CsiCopyPageFuncT)) class ScriptInterpreterHooks < FFI::Struct layout :closure, :pointer, - :surface_create, :csi_surface_create_func_t, - :surface_destroy, :csi_destroy_func_t, - :context_create, :csi_context_create_func_t, - :context_destroy, :csi_destroy_func_t, - :show_page, :csi_show_page_func_t, - :copy_page, :csi_copy_page_func_t + :surface_create, :pointer, + :surface_destroy, :pointer, + :context_create, :pointer, + :context_destroy, :pointer, + :show_page, :pointer, + :copy_page, :pointer end - + # (Not documented) - # + # @method script_interpreter_create() - # @return [ScriptInterpreter] + # @return [FFI::Pointer(*ScriptInterpreterT)] # @scope class - attach_function :script_interpreter_create, :cairo_script_interpreter_create, [], ScriptInterpreter - + attach_function :script_interpreter_create, :cairo_script_interpreter_create, [], :pointer # (Not documented) - # + # @method script_interpreter_install_hooks(ctx, hooks) - # @param [ScriptInterpreter] ctx - # @param [ScriptInterpreterHooks] hooks - # @return [nil] + # @param [FFI::Pointer(*ScriptInterpreterT)] ctx + # @param [ScriptInterpreterHooks] hooks + # @return [nil] # @scope class - attach_function :script_interpreter_install_hooks, :cairo_script_interpreter_install_hooks, [ScriptInterpreter, ScriptInterpreterHooks], :void - + attach_function :script_interpreter_install_hooks, :cairo_script_interpreter_install_hooks, [:pointer, ScriptInterpreterHooks], :void # (Not documented) - # + # @method script_interpreter_run(ctx, filename) - # @param [ScriptInterpreter] ctx - # @param [String] filename - # @return [unknown] + # @param [FFI::Pointer(*ScriptInterpreterT)] ctx + # @param [String] filename + # @return [error_unknown] # @scope class - attach_function :script_interpreter_run, :cairo_script_interpreter_run, [ScriptInterpreter, :string], :char - + attach_function :script_interpreter_run, :cairo_script_interpreter_run, [:pointer, :string], :char # (Not documented) - # + # @method script_interpreter_feed_stream(ctx, stream) - # @param [ScriptInterpreter] ctx - # @param [FFI::Pointer(*FILE)] stream - # @return [unknown] + # @param [FFI::Pointer(*ScriptInterpreterT)] ctx + # @param [FFI::Pointer(*FILE)] stream + # @return [error_unknown] # @scope class - attach_function :script_interpreter_feed_stream, :cairo_script_interpreter_feed_stream, [ScriptInterpreter, :pointer], :char - + attach_function :script_interpreter_feed_stream, :cairo_script_interpreter_feed_stream, [:pointer, :pointer], :char # (Not documented) - # + # @method script_interpreter_feed_string(ctx, line, len) - # @param [ScriptInterpreter] ctx - # @param [String] line - # @param [Integer] len - # @return [unknown] + # @param [FFI::Pointer(*ScriptInterpreterT)] ctx + # @param [String] line + # @param [Integer] len + # @return [error_unknown] # @scope class - attach_function :script_interpreter_feed_string, :cairo_script_interpreter_feed_string, [ScriptInterpreter, :string, :int], :char - + attach_function :script_interpreter_feed_string, :cairo_script_interpreter_feed_string, [:pointer, :string, :int], :char # (Not documented) - # + # @method script_interpreter_get_line_number(ctx) - # @param [ScriptInterpreter] ctx - # @return [Integer] + # @param [FFI::Pointer(*ScriptInterpreterT)] ctx + # @return [Integer] # @scope class - attach_function :script_interpreter_get_line_number, :cairo_script_interpreter_get_line_number, [ScriptInterpreter], :uint - + attach_function :script_interpreter_get_line_number, :cairo_script_interpreter_get_line_number, [:pointer], :uint # (Not documented) - # + # @method script_interpreter_reference(ctx) - # @param [ScriptInterpreter] ctx - # @return [ScriptInterpreter] + # @param [FFI::Pointer(*ScriptInterpreterT)] ctx + # @return [FFI::Pointer(*ScriptInterpreterT)] # @scope class - attach_function :script_interpreter_reference, :cairo_script_interpreter_reference, [ScriptInterpreter], ScriptInterpreter - + attach_function :script_interpreter_reference, :cairo_script_interpreter_reference, [:pointer], :pointer # (Not documented) - # + # @method script_interpreter_finish(ctx) - # @param [ScriptInterpreter] ctx - # @return [unknown] + # @param [FFI::Pointer(*ScriptInterpreterT)] ctx + # @return [error_unknown] # @scope class - attach_function :script_interpreter_finish, :cairo_script_interpreter_finish, [ScriptInterpreter], :char - + attach_function :script_interpreter_finish, :cairo_script_interpreter_finish, [:pointer], :char # (Not documented) - # + # @method script_interpreter_destroy(ctx) - # @param [ScriptInterpreter] ctx - # @return [unknown] + # @param [FFI::Pointer(*ScriptInterpreterT)] ctx + # @return [error_unknown] # @scope class - attach_function :script_interpreter_destroy, :cairo_script_interpreter_destroy, [ScriptInterpreter], :char - + attach_function :script_interpreter_destroy, :cairo_script_interpreter_destroy, [:pointer], :char # (Not documented) - # + # @method script_interpreter_translate_stream(stream, write_func, closure) - # @param [FFI::Pointer(*FILE)] stream - # @param [FFI::Pointer(WriteFuncT)] write_func - # @param [FFI::Pointer(*Void)] closure - # @return [unknown] + # @param [FFI::Pointer(*FILE)] stream + # @param [FFI::Pointer(WriteFuncT)] write_func + # @param [FFI::Pointer(*Void)] closure + # @return [error_unknown] # @scope class attach_function :script_interpreter_translate_stream, :cairo_script_interpreter_translate_stream, [:pointer, :pointer, :pointer], :char - end diff --git a/test/output/cairo-svg.rb b/test/output/cairo-svg.rb index 21470e6..d0e5221 100644 --- a/test/output/cairo-svg.rb +++ b/test/output/cairo-svg.rb @@ -1,30 +1,32 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module Cairo + extend FFI::Library - ffi_lib 'cairo' - + + ffi_lib ENV["CAIRO_PATH"] || "cairo" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # cairo_svg_version_t: - # + # #cairo_svg_version_t is used to describe the version number of the SVG # specification that a generated SVG file will conform to. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:svg_version). - # + # === Options: # :_1_1 :: # The version 1.1 of the SVG specification. # :_1_2 :: # The version 1.2 of the SVG specification. - # + # @method _enum_svg_version_ # @return [Symbol] # @scope class @@ -32,52 +34,47 @@ def self.attach_function(name, *_) :_1_1, 0, :_1_2, 1 ] - + # (Not documented) - # + # @method svg_surface_create(filename, width_in_points, height_in_points) - # @param [String] filename - # @param [Float] width_in_points - # @param [Float] height_in_points - # @return [FFI::Pointer(*SurfaceT)] + # @param [String] filename + # @param [Float] width_in_points + # @param [Float] height_in_points + # @return [FFI::Pointer(*SurfaceT)] # @scope class attach_function :svg_surface_create, :cairo_svg_surface_create, [:string, :double, :double], :pointer - # (Not documented) - # + # @method svg_surface_create_for_stream(write_func, closure, width_in_points, height_in_points) - # @param [FFI::Pointer(WriteFuncT)] write_func - # @param [FFI::Pointer(*Void)] closure - # @param [Float] width_in_points - # @param [Float] height_in_points - # @return [FFI::Pointer(*SurfaceT)] + # @param [FFI::Pointer(WriteFuncT)] write_func + # @param [FFI::Pointer(*Void)] closure + # @param [Float] width_in_points + # @param [Float] height_in_points + # @return [FFI::Pointer(*SurfaceT)] # @scope class attach_function :svg_surface_create_for_stream, :cairo_svg_surface_create_for_stream, [:pointer, :pointer, :double, :double], :pointer - # (Not documented) - # + # @method svg_surface_restrict_to_version(surface, version) - # @param [FFI::Pointer(*SurfaceT)] surface - # @param [Symbol from _enum_svg_version_] version - # @return [nil] + # @param [FFI::Pointer(*SurfaceT)] surface + # @param [Symbol from _enum_svg_version_] version + # @return [nil] # @scope class attach_function :svg_surface_restrict_to_version, :cairo_svg_surface_restrict_to_version, [:pointer, :svg_version], :void - # (Not documented) - # + # @method svg_get_versions(versions, num_versions) - # @param [FFI::Pointer(**SvgVersionT)] versions - # @param [FFI::Pointer(*Int)] num_versions - # @return [nil] + # @param [FFI::Pointer(**SvgVersionT)] versions + # @param [FFI::Pointer(*Int)] num_versions + # @return [nil] # @scope class attach_function :svg_get_versions, :cairo_svg_get_versions, [:pointer, :pointer], :void - # (Not documented) - # + # @method svg_version_to_string(version) - # @param [Symbol from _enum_svg_version_] version - # @return [String] + # @param [Symbol from _enum_svg_version_] version + # @return [String] # @scope class attach_function :svg_version_to_string, :cairo_svg_version_to_string, [:svg_version], :string - end diff --git a/test/output/cairo-version.rb b/test/output/cairo-version.rb index ce2e062..9f3746e 100644 --- a/test/output/cairo-version.rb +++ b/test/output/cairo-version.rb @@ -1,21 +1,23 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module Cairo + extend FFI::Library - ffi_lib 'cairo' - + + ffi_lib ENV["CAIRO_PATH"] || "cairo" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + VERSION_MAJOR = 1 - + VERSION_MINOR = 10 - + VERSION_MICRO = 2 - + end diff --git a/test/output/cairo-xcb.rb b/test/output/cairo-xcb.rb index 3184ed7..3a76ebc 100644 --- a/test/output/cairo-xcb.rb +++ b/test/output/cairo-xcb.rb @@ -1,82 +1,78 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module Cairo + extend FFI::Library - ffi_lib 'cairo' - + + ffi_lib ENV["CAIRO_PATH"] || "cairo" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) - # + # @method xcb_surface_create(connection, drawable, visual, width, height) - # @param [FFI::Pointer(*XcbConnectionT)] connection - # @param [Integer] drawable - # @param [FFI::Pointer(*XcbVisualtypeT)] visual - # @param [Integer] width - # @param [Integer] height - # @return [FFI::Pointer(*SurfaceT)] + # @param [FFI::Pointer(*XcbConnectionT)] connection + # @param [Integer] drawable + # @param [FFI::Pointer(*XcbVisualtypeT)] visual + # @param [Integer] width + # @param [Integer] height + # @return [FFI::Pointer(*SurfaceT)] # @scope class attach_function :xcb_surface_create, :cairo_xcb_surface_create, [:pointer, :uint, :pointer, :int, :int], :pointer - # (Not documented) - # + # @method xcb_surface_create_for_bitmap(connection, screen, bitmap, width, height) - # @param [FFI::Pointer(*XcbConnectionT)] connection - # @param [FFI::Pointer(*XcbScreenT)] screen - # @param [Integer] bitmap - # @param [Integer] width - # @param [Integer] height - # @return [FFI::Pointer(*SurfaceT)] + # @param [FFI::Pointer(*XcbConnectionT)] connection + # @param [FFI::Pointer(*XcbScreenT)] screen + # @param [Integer] bitmap + # @param [Integer] width + # @param [Integer] height + # @return [FFI::Pointer(*SurfaceT)] # @scope class attach_function :xcb_surface_create_for_bitmap, :cairo_xcb_surface_create_for_bitmap, [:pointer, :pointer, :uint, :int, :int], :pointer - # (Not documented) - # + # @method xcb_surface_create_with_xrender_format(connection, screen, drawable, format, width, height) - # @param [FFI::Pointer(*XcbConnectionT)] connection - # @param [FFI::Pointer(*XcbScreenT)] screen - # @param [Integer] drawable - # @param [FFI::Pointer(*XcbRenderPictforminfoT)] format - # @param [Integer] width - # @param [Integer] height - # @return [FFI::Pointer(*SurfaceT)] + # @param [FFI::Pointer(*XcbConnectionT)] connection + # @param [FFI::Pointer(*XcbScreenT)] screen + # @param [Integer] drawable + # @param [FFI::Pointer(*XcbRenderPictforminfoT)] format + # @param [Integer] width + # @param [Integer] height + # @return [FFI::Pointer(*SurfaceT)] # @scope class attach_function :xcb_surface_create_with_xrender_format, :cairo_xcb_surface_create_with_xrender_format, [:pointer, :pointer, :uint, :pointer, :int, :int], :pointer - # (Not documented) - # + # @method xcb_surface_set_size(surface, width, height) - # @param [FFI::Pointer(*SurfaceT)] surface - # @param [Integer] width - # @param [Integer] height - # @return [nil] + # @param [FFI::Pointer(*SurfaceT)] surface + # @param [Integer] width + # @param [Integer] height + # @return [nil] # @scope class attach_function :xcb_surface_set_size, :cairo_xcb_surface_set_size, [:pointer, :int, :int], :void - # debug interface - # + # @method xcb_device_debug_cap_xshm_version(device, major_version, minor_version) - # @param [FFI::Pointer(*DeviceT)] device - # @param [Integer] major_version - # @param [Integer] minor_version - # @return [nil] + # @param [FFI::Pointer(*DeviceT)] device + # @param [Integer] major_version + # @param [Integer] minor_version + # @return [nil] # @scope class attach_function :xcb_device_debug_cap_xshm_version, :cairo_xcb_device_debug_cap_xshm_version, [:pointer, :int, :int], :void - # (Not documented) - # + # @method xcb_device_debug_cap_xrender_version(device, major_version, minor_version) - # @param [FFI::Pointer(*DeviceT)] device - # @param [Integer] major_version - # @param [Integer] minor_version - # @return [nil] + # @param [FFI::Pointer(*DeviceT)] device + # @param [Integer] major_version + # @param [Integer] minor_version + # @return [nil] # @scope class attach_function :xcb_device_debug_cap_xrender_version, :cairo_xcb_device_debug_cap_xrender_version, [:pointer, :int, :int], :void - end diff --git a/test/output/cairo-xlib-xrender.rb b/test/output/cairo-xlib-xrender.rb index ea26323..9f4f325 100644 --- a/test/output/cairo-xlib-xrender.rb +++ b/test/output/cairo-xlib-xrender.rb @@ -1,36 +1,36 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module Cairo + extend FFI::Library - ffi_lib 'cairo' - + + ffi_lib ENV["CAIRO_PATH"] || "cairo" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) - # + # @method xlib_surface_create_with_xrender_format(dpy, drawable, screen, format, width, height) - # @param [FFI::Pointer(*Display)] dpy - # @param [Integer] drawable - # @param [FFI::Pointer(*Screen)] screen - # @param [FFI::Pointer(*XRenderPictFormat)] format - # @param [Integer] width - # @param [Integer] height - # @return [FFI::Pointer(*SurfaceT)] + # @param [FFI::Pointer(*Display)] dpy + # @param [Integer] drawable + # @param [FFI::Pointer(*Screen)] screen + # @param [FFI::Pointer(*XRenderPictFormat)] format + # @param [Integer] width + # @param [Integer] height + # @return [FFI::Pointer(*SurfaceT)] # @scope class attach_function :xlib_surface_create_with_xrender_format, :cairo_xlib_surface_create_with_xrender_format, [:pointer, :ulong, :pointer, :pointer, :int, :int], :pointer - # (Not documented) - # + # @method xlib_surface_get_xrender_format(surface) - # @param [FFI::Pointer(*SurfaceT)] surface - # @return [FFI::Pointer(*XRenderPictFormat)] + # @param [FFI::Pointer(*SurfaceT)] surface + # @return [FFI::Pointer(*XRenderPictFormat)] # @scope class attach_function :xlib_surface_get_xrender_format, :cairo_xlib_surface_get_xrender_format, [:pointer], :pointer - end diff --git a/test/output/cairo-xlib.rb b/test/output/cairo-xlib.rb index 638316f..71c2a17 100644 --- a/test/output/cairo-xlib.rb +++ b/test/output/cairo-xlib.rb @@ -1,116 +1,107 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module Cairo + extend FFI::Library - ffi_lib 'cairo' - + + ffi_lib ENV["CAIRO_PATH"] || "cairo" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) - # + # @method xlib_surface_create(dpy, drawable, visual, width, height) - # @param [FFI::Pointer(*Display)] dpy - # @param [Integer] drawable - # @param [FFI::Pointer(*Visual)] visual - # @param [Integer] width - # @param [Integer] height - # @return [FFI::Pointer(*SurfaceT)] + # @param [FFI::Pointer(*Display)] dpy + # @param [Integer] drawable + # @param [FFI::Pointer(*Visual)] visual + # @param [Integer] width + # @param [Integer] height + # @return [FFI::Pointer(*SurfaceT)] # @scope class attach_function :xlib_surface_create, :cairo_xlib_surface_create, [:pointer, :ulong, :pointer, :int, :int], :pointer - # (Not documented) - # + # @method xlib_surface_create_for_bitmap(dpy, bitmap, screen, width, height) - # @param [FFI::Pointer(*Display)] dpy - # @param [Integer] bitmap - # @param [FFI::Pointer(*Screen)] screen - # @param [Integer] width - # @param [Integer] height - # @return [FFI::Pointer(*SurfaceT)] + # @param [FFI::Pointer(*Display)] dpy + # @param [Integer] bitmap + # @param [FFI::Pointer(*Screen)] screen + # @param [Integer] width + # @param [Integer] height + # @return [FFI::Pointer(*SurfaceT)] # @scope class attach_function :xlib_surface_create_for_bitmap, :cairo_xlib_surface_create_for_bitmap, [:pointer, :ulong, :pointer, :int, :int], :pointer - # (Not documented) - # + # @method xlib_surface_set_size(surface, width, height) - # @param [FFI::Pointer(*SurfaceT)] surface - # @param [Integer] width - # @param [Integer] height - # @return [nil] + # @param [FFI::Pointer(*SurfaceT)] surface + # @param [Integer] width + # @param [Integer] height + # @return [nil] # @scope class attach_function :xlib_surface_set_size, :cairo_xlib_surface_set_size, [:pointer, :int, :int], :void - # (Not documented) - # + # @method xlib_surface_set_drawable(surface, drawable, width, height) - # @param [FFI::Pointer(*SurfaceT)] surface - # @param [Integer] drawable - # @param [Integer] width - # @param [Integer] height - # @return [nil] + # @param [FFI::Pointer(*SurfaceT)] surface + # @param [Integer] drawable + # @param [Integer] width + # @param [Integer] height + # @return [nil] # @scope class attach_function :xlib_surface_set_drawable, :cairo_xlib_surface_set_drawable, [:pointer, :ulong, :int, :int], :void - # (Not documented) - # + # @method xlib_surface_get_display(surface) - # @param [FFI::Pointer(*SurfaceT)] surface - # @return [FFI::Pointer(*Display)] + # @param [FFI::Pointer(*SurfaceT)] surface + # @return [FFI::Pointer(*Display)] # @scope class attach_function :xlib_surface_get_display, :cairo_xlib_surface_get_display, [:pointer], :pointer - # (Not documented) - # + # @method xlib_surface_get_drawable(surface) - # @param [FFI::Pointer(*SurfaceT)] surface - # @return [Integer] + # @param [FFI::Pointer(*SurfaceT)] surface + # @return [Integer] # @scope class attach_function :xlib_surface_get_drawable, :cairo_xlib_surface_get_drawable, [:pointer], :ulong - # (Not documented) - # + # @method xlib_surface_get_screen(surface) - # @param [FFI::Pointer(*SurfaceT)] surface - # @return [FFI::Pointer(*Screen)] + # @param [FFI::Pointer(*SurfaceT)] surface + # @return [FFI::Pointer(*Screen)] # @scope class attach_function :xlib_surface_get_screen, :cairo_xlib_surface_get_screen, [:pointer], :pointer - # (Not documented) - # + # @method xlib_surface_get_visual(surface) - # @param [FFI::Pointer(*SurfaceT)] surface - # @return [FFI::Pointer(*Visual)] + # @param [FFI::Pointer(*SurfaceT)] surface + # @return [FFI::Pointer(*Visual)] # @scope class attach_function :xlib_surface_get_visual, :cairo_xlib_surface_get_visual, [:pointer], :pointer - # (Not documented) - # + # @method xlib_surface_get_depth(surface) - # @param [FFI::Pointer(*SurfaceT)] surface - # @return [Integer] + # @param [FFI::Pointer(*SurfaceT)] surface + # @return [Integer] # @scope class attach_function :xlib_surface_get_depth, :cairo_xlib_surface_get_depth, [:pointer], :int - # (Not documented) - # + # @method xlib_surface_get_width(surface) - # @param [FFI::Pointer(*SurfaceT)] surface - # @return [Integer] + # @param [FFI::Pointer(*SurfaceT)] surface + # @return [Integer] # @scope class attach_function :xlib_surface_get_width, :cairo_xlib_surface_get_width, [:pointer], :int - # (Not documented) - # + # @method xlib_surface_get_height(surface) - # @param [FFI::Pointer(*SurfaceT)] surface - # @return [Integer] + # @param [FFI::Pointer(*SurfaceT)] surface + # @return [Integer] # @scope class attach_function :xlib_surface_get_height, :cairo_xlib_surface_get_height, [:pointer], :int - end diff --git a/test/output/cairo.rb b/test/output/cairo.rb index 8ddd5e2..b3ac8b4 100644 --- a/test/output/cairo.rb +++ b/test/output/cairo.rb @@ -1,70 +1,70 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module Cairo + extend FFI::Library - ffi_lib 'cairo' - + + ffi_lib ENV["CAIRO_PATH"] || "cairo" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + def version_stringize(major, minor, micro) version_stringize(major, minor, micro) end - + MIME_TYPE_JPEG = "image/jpeg" - + MIME_TYPE_PNG = "image/png" - + MIME_TYPE_JP2 = "image/jp2" - + MIME_TYPE_URI = "text/x-uri" - + # (Not documented) - # + # @method version() - # @return [Integer] + # @return [Integer] # @scope class attach_function :version, :cairo_version, [], :int - # (Not documented) - # + # @method version_string() - # @return [String] + # @return [String] # @scope class attach_function :version_string, :cairo_version_string, [], :string - # cairo_t: - # + # A #cairo_t contains the current state of the rendering device, # including coordinates of yet to be drawn shapes. - # + # Cairo contexts, as #cairo_t objects are named, are central to # cairo and all drawing with cairo is always done to a #cairo_t # object. - # + # Memory management of #cairo_t is done with # cairo_reference() and cairo_destroy(). class Cairo < FFI::Struct layout :dummy, :char end - + # cairo_surface_t: - # + # A #cairo_surface_t represents an image, either as the destination # of a drawing operation or as source when drawing onto another # surface. To draw to a #cairo_surface_t, create a cairo context # with the surface as the target, using cairo_create(). - # + # There are different subtypes of #cairo_surface_t for # different drawing backends; for example, cairo_image_surface_create() # creates a bitmap image in memory. # The type of a surface can be queried with cairo_surface_get_type(). - # + # The initial contents of a surface after creation depend upon the manner # of its creation. If cairo creates the surface and backing storage for # the user, it will be initially cleared; for example, @@ -73,266 +73,266 @@ class Cairo < FFI::Struct # and asks cairo to wrap that in a #cairo_surface_t, then the contents are # not modified; for example, cairo_image_surface_create_for_data() and # cairo_xlib_surface_create(). - # + # Memory management of #cairo_surface_t is done with # cairo_surface_reference() and cairo_surface_destroy(). module SurfaceWrappers - # @param [Symbol from _enum_content_] content - # @param [Integer] width - # @param [Integer] height - # @return [Surface] + # @param [Symbol from _enum_content_] content + # @param [Integer] width + # @param [Integer] height + # @return [Surface] def create_similar(content, width, height) Surface.new Cairo.surface_create_similar(self, content, width, height) end - - # @param [Float] x - # @param [Float] y - # @param [Float] width - # @param [Float] height - # @return [Surface] + + # @param [Float] x + # @param [Float] y + # @param [Float] width + # @param [Float] height + # @return [Surface] def create_for_rectangle(x, y, width, height) Surface.new Cairo.surface_create_for_rectangle(self, x, y, width, height) end - - # @return [Surface] + + # @return [Surface] def reference() Surface.new Cairo.surface_reference(self) end - - # @return [nil] + + # @return [nil] def finish() Cairo.surface_finish(self) end - - # @return [nil] + + # @return [nil] def destroy() Cairo.surface_destroy(self) end - - # @return [Device] + + # @return [Device] def get_device() Device.new Cairo.surface_get_device(self) end - - # @return [Integer] + + # @return [Integer] def get_reference_count() Cairo.surface_get_reference_count(self) end - - # @return [Symbol from _enum_status_] + + # @return [Symbol from _enum_status_] def status() Cairo.surface_status(self) end - - # @return [Symbol from _enum_surface_type_] + + # @return [Symbol from _enum_surface_type_] def get_type() Cairo.surface_get_type(self) end - - # @return [Symbol from _enum_content_] + + # @return [Symbol from _enum_content_] def get_content() Cairo.surface_get_content(self) end - - # @param [String] filename - # @return [Symbol from _enum_status_] + + # @param [String] filename + # @return [Symbol from _enum_status_] def write_to_png(filename) Cairo.surface_write_to_png(self, filename) end - - # @param [Proc(_callback_write_func_t_)] write_func - # @param [FFI::Pointer(*Void)] closure - # @return [Symbol from _enum_status_] + + # @param [FFI::Pointer(WriteFuncT)] write_func + # @param [FFI::Pointer(*Void)] closure + # @return [Symbol from _enum_status_] def write_to_png_stream(write_func, closure) Cairo.surface_write_to_png_stream(self, write_func, closure) end - - # @param [FFI::Pointer(*UserDataKey)] key - # @return [FFI::Pointer(*Void)] + + # @param [FFI::Pointer(*UserDataKey)] key + # @return [FFI::Pointer(*Void)] def get_user_data(key) Cairo.surface_get_user_data(self, key) end - - # @param [FFI::Pointer(*UserDataKey)] key - # @param [FFI::Pointer(*Void)] user_data - # @param [FFI::Pointer(DestroyFuncT)] destroy - # @return [Symbol from _enum_status_] + + # @param [FFI::Pointer(*UserDataKey)] key + # @param [FFI::Pointer(*Void)] user_data + # @param [FFI::Pointer(DestroyFuncT)] destroy + # @return [Symbol from _enum_status_] def set_user_data(key, user_data, destroy) Cairo.surface_set_user_data(self, key, user_data, destroy) end - - # @param [String] mime_type - # @param [FFI::Pointer(**UChar)] data - # @param [FFI::Pointer(*ULong)] length - # @return [nil] + + # @param [String] mime_type + # @param [FFI::Pointer(**UChar)] data + # @param [FFI::Pointer(*ULong)] length + # @return [nil] def get_mime_data(mime_type, data, length) Cairo.surface_get_mime_data(self, mime_type, data, length) end - - # @param [String] mime_type - # @param [FFI::Pointer(*UChar)] data - # @param [Integer] length - # @param [FFI::Pointer(DestroyFuncT)] destroy - # @param [FFI::Pointer(*Void)] closure - # @return [Symbol from _enum_status_] + + # @param [String] mime_type + # @param [FFI::Pointer(*UChar)] data + # @param [Integer] length + # @param [FFI::Pointer(DestroyFuncT)] destroy + # @param [FFI::Pointer(*Void)] closure + # @return [Symbol from _enum_status_] def set_mime_data(mime_type, data, length, destroy, closure) Cairo.surface_set_mime_data(self, mime_type, data, length, destroy, closure) end - - # @param [FFI::Pointer(*FontOptions)] options - # @return [nil] + + # @param [FFI::Pointer(*FontOptions)] options + # @return [nil] def get_font_options(options) Cairo.surface_get_font_options(self, options) end - - # @return [nil] + + # @return [nil] def flush() Cairo.surface_flush(self) end - - # @return [nil] + + # @return [nil] def mark_dirty() Cairo.surface_mark_dirty(self) end - - # @param [Integer] x - # @param [Integer] y - # @param [Integer] width - # @param [Integer] height - # @return [nil] + + # @param [Integer] x + # @param [Integer] y + # @param [Integer] width + # @param [Integer] height + # @return [nil] def mark_dirty_rectangle(x, y, width, height) Cairo.surface_mark_dirty_rectangle(self, x, y, width, height) end - - # @param [Float] x_offset - # @param [Float] y_offset - # @return [nil] + + # @param [Float] x_offset + # @param [Float] y_offset + # @return [nil] def set_device_offset(x_offset, y_offset) Cairo.surface_set_device_offset(self, x_offset, y_offset) end - - # @param [FFI::Pointer(*Double)] x_offset - # @param [FFI::Pointer(*Double)] y_offset - # @return [nil] + + # @param [FFI::Pointer(*Double)] x_offset + # @param [FFI::Pointer(*Double)] y_offset + # @return [nil] def get_device_offset(x_offset, y_offset) Cairo.surface_get_device_offset(self, x_offset, y_offset) end - - # @param [Float] x_pixels_per_inch - # @param [Float] y_pixels_per_inch - # @return [nil] + + # @param [Float] x_pixels_per_inch + # @param [Float] y_pixels_per_inch + # @return [nil] def set_fallback_resolution(x_pixels_per_inch, y_pixels_per_inch) Cairo.surface_set_fallback_resolution(self, x_pixels_per_inch, y_pixels_per_inch) end - - # @param [FFI::Pointer(*Double)] x_pixels_per_inch - # @param [FFI::Pointer(*Double)] y_pixels_per_inch - # @return [nil] + + # @param [FFI::Pointer(*Double)] x_pixels_per_inch + # @param [FFI::Pointer(*Double)] y_pixels_per_inch + # @return [nil] def get_fallback_resolution(x_pixels_per_inch, y_pixels_per_inch) Cairo.surface_get_fallback_resolution(self, x_pixels_per_inch, y_pixels_per_inch) end - - # @return [nil] + + # @return [nil] def copy_page() Cairo.surface_copy_page(self) end - - # @return [nil] + + # @return [nil] def show_page() Cairo.surface_show_page(self) end - - # @return [Integer] + + # @return [Integer] def has_show_text_glyphs() Cairo.surface_has_show_text_glyphs(self) end end - + class Surface < FFI::Struct include SurfaceWrappers layout :dummy, :char end - + # cairo_device_t: - # + # A #cairo_device_t represents the driver interface for drawing # operations to a #cairo_surface_t. There are different subtypes of # #cairo_device_t for different drawing backends; for example, # cairo_xcb_device_create() creates a device that wraps the connection # to an X Windows System using the XCB library. - # + # The type of a device can be queried with cairo_device_get_type(). - # + # Memory management of #cairo_device_t is done with # cairo_device_reference() and cairo_device_destroy(). - # + # Since: 1.10 module DeviceWrappers - # @return [Device] + # @return [Device] def reference() Device.new Cairo.device_reference(self) end - - # @return [Symbol from _enum_device_type_] + + # @return [Symbol from _enum_device_type_] def get_type() Cairo.device_get_type(self) end - - # @return [Symbol from _enum_status_] + + # @return [Symbol from _enum_status_] def status() Cairo.device_status(self) end - - # @return [Symbol from _enum_status_] + + # @return [Symbol from _enum_status_] def acquire() Cairo.device_acquire(self) end - - # @return [nil] + + # @return [nil] def release() Cairo.device_release(self) end - - # @return [nil] + + # @return [nil] def flush() Cairo.device_flush(self) end - - # @return [nil] + + # @return [nil] def finish() Cairo.device_finish(self) end - - # @return [nil] + + # @return [nil] def destroy() Cairo.device_destroy(self) end - - # @return [Integer] + + # @return [Integer] def get_reference_count() Cairo.device_get_reference_count(self) end - - # @param [FFI::Pointer(*UserDataKey)] key - # @return [FFI::Pointer(*Void)] + + # @param [FFI::Pointer(*UserDataKey)] key + # @return [FFI::Pointer(*Void)] def get_user_data(key) Cairo.device_get_user_data(self, key) end - - # @param [FFI::Pointer(*UserDataKey)] key - # @param [FFI::Pointer(*Void)] user_data - # @param [FFI::Pointer(DestroyFuncT)] destroy - # @return [Symbol from _enum_status_] + + # @param [FFI::Pointer(*UserDataKey)] key + # @param [FFI::Pointer(*Void)] user_data + # @param [FFI::Pointer(DestroyFuncT)] destroy + # @return [Symbol from _enum_status_] def set_user_data(key, user_data, destroy) Cairo.device_set_user_data(self, key, user_data, destroy) end end - + class Device < FFI::Struct include DeviceWrappers layout :dummy, :char end - + # cairo_matrix_t: # @xx: xx component of the affine transformation # @yx: yx component of the affine transformation @@ -340,7 +340,7 @@ class Device < FFI::Struct # @yy: yy component of the affine transformation # @x0: X translation component of the affine transformation # @y0: Y translation component of the affine transformation - # + # A #cairo_matrix_t holds an affine transformation, such as a scale, # rotation, shear, or a combination of those. The transformation of # a point (x, y) is given by: @@ -348,104 +348,104 @@ class Device < FFI::Struct # x_new = xx * x + xy * y + x0; # y_new = yx * x + yy * y + y0; # - # + # = Fields: # :xx :: - # (Float) + # (Float) # :yx :: - # (Float) + # (Float) # :xy :: - # (Float) + # (Float) # :yy :: - # (Float) + # (Float) # :x0 :: - # (Float) + # (Float) # :y0 :: - # (Float) + # (Float) module MatrixWrappers - # @param [Float] xx - # @param [Float] yx - # @param [Float] xy - # @param [Float] yy - # @param [Float] x0 - # @param [Float] y0 - # @return [nil] + # @param [Float] xx + # @param [Float] yx + # @param [Float] xy + # @param [Float] yy + # @param [Float] x0 + # @param [Float] y0 + # @return [nil] def init(xx, yx, xy, yy, x0, y0) Cairo.matrix_init(self, xx, yx, xy, yy, x0, y0) end - - # @return [nil] + + # @return [nil] def init_identity() Cairo.matrix_init_identity(self) end - - # @param [Float] tx - # @param [Float] ty - # @return [nil] + + # @param [Float] tx + # @param [Float] ty + # @return [nil] def init_translate(tx, ty) Cairo.matrix_init_translate(self, tx, ty) end - - # @param [Float] sx - # @param [Float] sy - # @return [nil] + + # @param [Float] sx + # @param [Float] sy + # @return [nil] def init_scale(sx, sy) Cairo.matrix_init_scale(self, sx, sy) end - - # @param [Float] radians - # @return [nil] + + # @param [Float] radians + # @return [nil] def init_rotate(radians) Cairo.matrix_init_rotate(self, radians) end - - # @param [Float] tx - # @param [Float] ty - # @return [nil] + + # @param [Float] tx + # @param [Float] ty + # @return [nil] def translate(tx, ty) Cairo.matrix_translate(self, tx, ty) end - - # @param [Float] sx - # @param [Float] sy - # @return [nil] + + # @param [Float] sx + # @param [Float] sy + # @return [nil] def scale(sx, sy) Cairo.matrix_scale(self, sx, sy) end - - # @param [Float] radians - # @return [nil] + + # @param [Float] radians + # @return [nil] def rotate(radians) Cairo.matrix_rotate(self, radians) end - - # @return [Symbol from _enum_status_] + + # @return [Symbol from _enum_status_] def invert() Cairo.matrix_invert(self) end - - # @param [FFI::Pointer(*Matrix)] a - # @param [FFI::Pointer(*Matrix)] b - # @return [nil] + + # @param [FFI::Pointer(*Matrix)] a + # @param [FFI::Pointer(*Matrix)] b + # @return [nil] def multiply(a, b) Cairo.matrix_multiply(self, a, b) end - - # @param [FFI::Pointer(*Double)] dx - # @param [FFI::Pointer(*Double)] dy - # @return [nil] + + # @param [FFI::Pointer(*Double)] dx + # @param [FFI::Pointer(*Double)] dy + # @return [nil] def transform_distance(dx, dy) Cairo.matrix_transform_distance(self, dx, dy) end - - # @param [FFI::Pointer(*Double)] x - # @param [FFI::Pointer(*Double)] y - # @return [nil] + + # @param [FFI::Pointer(*Double)] x + # @param [FFI::Pointer(*Double)] y + # @return [nil] def transform_point(x, y) Cairo.matrix_transform_point(self, x, y) end end - + class Matrix < FFI::Struct include MatrixWrappers layout :xx, :double, @@ -455,203 +455,203 @@ class Matrix < FFI::Struct :x0, :double, :y0, :double end - + # cairo_pattern_t: - # + # A #cairo_pattern_t represents a source when drawing onto a # surface. There are different subtypes of #cairo_pattern_t, # for different types of sources; for example, # cairo_pattern_create_rgb() creates a pattern for a solid # opaque color. - # + # Other than various cairo_pattern_create_type() # functions, some of the pattern types can be implicitly created # using various cairo_set_source_type() functions; # for example cairo_set_source_rgb(). - # + # The type of a pattern can be queried with cairo_pattern_get_type(). - # + # Memory management of #cairo_pattern_t is done with # cairo_pattern_reference() and cairo_pattern_destroy(). module PatternWrappers - # @return [Pattern] + # @return [Pattern] def reference() Pattern.new Cairo.pattern_reference(self) end - - # @return [nil] + + # @return [nil] def destroy() Cairo.pattern_destroy(self) end - - # @return [Integer] + + # @return [Integer] def get_reference_count() Cairo.pattern_get_reference_count(self) end - - # @return [Symbol from _enum_status_] + + # @return [Symbol from _enum_status_] def status() Cairo.pattern_status(self) end - - # @param [FFI::Pointer(*UserDataKey)] key - # @return [FFI::Pointer(*Void)] + + # @param [FFI::Pointer(*UserDataKey)] key + # @return [FFI::Pointer(*Void)] def get_user_data(key) Cairo.pattern_get_user_data(self, key) end - - # @param [FFI::Pointer(*UserDataKey)] key - # @param [FFI::Pointer(*Void)] user_data - # @param [FFI::Pointer(DestroyFuncT)] destroy - # @return [Symbol from _enum_status_] + + # @param [FFI::Pointer(*UserDataKey)] key + # @param [FFI::Pointer(*Void)] user_data + # @param [FFI::Pointer(DestroyFuncT)] destroy + # @return [Symbol from _enum_status_] def set_user_data(key, user_data, destroy) Cairo.pattern_set_user_data(self, key, user_data, destroy) end - - # @return [Symbol from _enum_pattern_type_] + + # @return [Symbol from _enum_pattern_type_] def get_type() Cairo.pattern_get_type(self) end - - # @param [Float] offset - # @param [Float] red - # @param [Float] green - # @param [Float] blue - # @return [nil] + + # @param [Float] offset + # @param [Float] red + # @param [Float] green + # @param [Float] blue + # @return [nil] def add_color_stop_rgb(offset, red, green, blue) Cairo.pattern_add_color_stop_rgb(self, offset, red, green, blue) end - - # @param [Float] offset - # @param [Float] red - # @param [Float] green - # @param [Float] blue - # @param [Float] alpha - # @return [nil] + + # @param [Float] offset + # @param [Float] red + # @param [Float] green + # @param [Float] blue + # @param [Float] alpha + # @return [nil] def add_color_stop_rgba(offset, red, green, blue, alpha) Cairo.pattern_add_color_stop_rgba(self, offset, red, green, blue, alpha) end - - # @param [Matrix] matrix - # @return [nil] + + # @param [Matrix] matrix + # @return [nil] def set_matrix(matrix) Cairo.pattern_set_matrix(self, matrix) end - - # @param [Matrix] matrix - # @return [nil] + + # @param [Matrix] matrix + # @return [nil] def get_matrix(matrix) Cairo.pattern_get_matrix(self, matrix) end - - # @param [Symbol from _enum_extend_] extend - # @return [nil] + + # @param [Symbol from _enum_extend_] extend + # @return [nil] def set_extend(extend) Cairo.pattern_set_extend(self, extend) end - - # @return [Symbol from _enum_extend_] + + # @return [Symbol from _enum_extend_] def get_extend() Cairo.pattern_get_extend(self) end - - # @param [Symbol from _enum_filter_] filter - # @return [nil] + + # @param [Symbol from _enum_filter_] filter + # @return [nil] def set_filter(filter) Cairo.pattern_set_filter(self, filter) end - - # @return [Symbol from _enum_filter_] + + # @return [Symbol from _enum_filter_] def get_filter() Cairo.pattern_get_filter(self) end - - # @param [FFI::Pointer(*Double)] red - # @param [FFI::Pointer(*Double)] green - # @param [FFI::Pointer(*Double)] blue - # @param [FFI::Pointer(*Double)] alpha - # @return [Symbol from _enum_status_] + + # @param [FFI::Pointer(*Double)] red + # @param [FFI::Pointer(*Double)] green + # @param [FFI::Pointer(*Double)] blue + # @param [FFI::Pointer(*Double)] alpha + # @return [Symbol from _enum_status_] def get_rgba(red, green, blue, alpha) Cairo.pattern_get_rgba(self, red, green, blue, alpha) end - - # @param [FFI::Pointer(**SurfaceT)] surface - # @return [Symbol from _enum_status_] + + # @param [FFI::Pointer(**SurfaceT)] surface + # @return [Symbol from _enum_status_] def get_surface(surface) Cairo.pattern_get_surface(self, surface) end - - # @param [Integer] index - # @param [FFI::Pointer(*Double)] offset - # @param [FFI::Pointer(*Double)] red - # @param [FFI::Pointer(*Double)] green - # @param [FFI::Pointer(*Double)] blue - # @param [FFI::Pointer(*Double)] alpha - # @return [Symbol from _enum_status_] + + # @param [Integer] index + # @param [FFI::Pointer(*Double)] offset + # @param [FFI::Pointer(*Double)] red + # @param [FFI::Pointer(*Double)] green + # @param [FFI::Pointer(*Double)] blue + # @param [FFI::Pointer(*Double)] alpha + # @return [Symbol from _enum_status_] def get_color_stop_rgba(index, offset, red, green, blue, alpha) Cairo.pattern_get_color_stop_rgba(self, index, offset, red, green, blue, alpha) end - - # @param [FFI::Pointer(*Int)] count - # @return [Symbol from _enum_status_] + + # @param [FFI::Pointer(*Int)] count + # @return [Symbol from _enum_status_] def get_color_stop_count(count) Cairo.pattern_get_color_stop_count(self, count) end - - # @param [FFI::Pointer(*Double)] x0 - # @param [FFI::Pointer(*Double)] y0 - # @param [FFI::Pointer(*Double)] x1 - # @param [FFI::Pointer(*Double)] y1 - # @return [Symbol from _enum_status_] + + # @param [FFI::Pointer(*Double)] x0 + # @param [FFI::Pointer(*Double)] y0 + # @param [FFI::Pointer(*Double)] x1 + # @param [FFI::Pointer(*Double)] y1 + # @return [Symbol from _enum_status_] def get_linear_points(x0, y0, x1, y1) Cairo.pattern_get_linear_points(self, x0, y0, x1, y1) end - - # @param [FFI::Pointer(*Double)] x0 - # @param [FFI::Pointer(*Double)] y0 - # @param [FFI::Pointer(*Double)] r0 - # @param [FFI::Pointer(*Double)] x1 - # @param [FFI::Pointer(*Double)] y1 - # @param [FFI::Pointer(*Double)] r1 - # @return [Symbol from _enum_status_] + + # @param [FFI::Pointer(*Double)] x0 + # @param [FFI::Pointer(*Double)] y0 + # @param [FFI::Pointer(*Double)] r0 + # @param [FFI::Pointer(*Double)] x1 + # @param [FFI::Pointer(*Double)] y1 + # @param [FFI::Pointer(*Double)] r1 + # @return [Symbol from _enum_status_] def get_radial_circles(x0, y0, r0, x1, y1, r1) Cairo.pattern_get_radial_circles(self, x0, y0, r0, x1, y1, r1) end end - + class Pattern < FFI::Struct include PatternWrappers layout :dummy, :char end - + # cairo_user_data_key_t: # @unused: not used; ignore. - # + # #cairo_user_data_key_t is used for attaching user data to cairo # data structures. The actual contents of the struct is never used, # and there is no need to initialize the object; only the unique # address of a #cairo_data_key_t object is used. Typically, you # would just use the address of a static #cairo_data_key_t object. - # + # = Fields: # :unused :: - # (Integer) + # (Integer) class UserDataKey < FFI::Struct layout :unused, :int end - + # cairo_status_t: - # + # #cairo_status_t is used to indicate errors that can occur when # using Cairo. In some cases it is returned directly by functions. # but when using #cairo_t, the last error, if any, is stored in # the context and can be retrieved with cairo_status(). - # + # New entries may be added in future versions. Use cairo_status_to_string() # to get a human-readable representation of an error message. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:status). - # + # === Options: # :success :: # no error has occurred @@ -730,7 +730,7 @@ class UserDataKey < FFI::Struct # status values defined in this enumeration. When using this value, note # that the version of cairo at run-time may have additional status values # defined than the value of this symbol at compile-time. (Since 1.10) - # + # @method _enum_status_ # @return [Symbol] # @scope class @@ -773,19 +773,19 @@ class UserDataKey < FFI::Struct :device_error, 35, :last_status, 36 ] - + # cairo_content_t: - # + # #cairo_content_t is used to describe the content that a surface will # contain, whether color information, alpha information (translucence # vs. opacity), or both. - # + # Note: The large values here are designed to keep #cairo_content_t # values distinct from #cairo_format_t values so that the # implementation can detect the error if users confuse the two types. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:content). - # + # === Options: # :color :: # The surface will hold color content only. @@ -793,7 +793,7 @@ class UserDataKey < FFI::Struct # The surface will hold alpha content only. # :color_alpha :: # The surface will hold color and alpha content. - # + # @method _enum_content_ # @return [Symbol] # @scope class @@ -802,12 +802,12 @@ class UserDataKey < FFI::Struct :alpha, 8192, :color_alpha, 12288 ] - + # cairo_write_func_t: # @closure: the output closure # @data: the buffer containing the data to write # @length: the amount of data to write - # + # #cairo_write_func_t is the type of function which is called when a # backend needs to write data to an output stream. It is passed the # closure which was specified by the user at the time the write @@ -815,24 +815,25 @@ class UserDataKey < FFI::Struct # data in bytes. The write function should return # %CAIRO_STATUS_SUCCESS if all the data was successfully written, # %CAIRO_STATUS_WRITE_ERROR otherwise. - # + # Returns: the status code of the write operation - # + # This entry is only for documentation and no real method. - # - # @method _callback_write_func_t_(closure, data, length) - # @param [FFI::Pointer(*Void)] closure - # @param [FFI::Pointer(*UChar)] data - # @param [Integer] length - # @return [Symbol from _enum_status_] - # @scope class - callback :write_func_t, [:pointer, :pointer, :uint], :status - + + # @method _callback_write_func_t_(status_t, closure, data, length) + # @param [Symbol from _enum_status_] status_t + # @param [FFI::Pointer(*Void)] closure + # @param [FFI::Pointer(*UChar)] data + # @param [Integer] length + # @return [Symbol from _enum_status_] + # @scope class + callback :write_func_t, [:status, :pointer, :pointer, :uint], :status + # cairo_read_func_t: # @closure: the input closure # @data: the buffer into which to read the data # @length: the amount of data to read - # + # #cairo_read_func_t is the type of function which is called when a # backend needs to read data from an input stream. It is passed the # closure which was specified by the user at the time the read @@ -840,132 +841,121 @@ class UserDataKey < FFI::Struct # length of the data in bytes. The read function should return # %CAIRO_STATUS_SUCCESS if all the data was successfully read, # %CAIRO_STATUS_READ_ERROR otherwise. - # + # Returns: the status code of the read operation - # + # This entry is only for documentation and no real method. - # - # @method _callback_read_func_t_(closure, data, length) - # @param [FFI::Pointer(*Void)] closure - # @param [FFI::Pointer(*UChar)] data - # @param [Integer] length - # @return [Symbol from _enum_status_] - # @scope class - callback :read_func_t, [:pointer, :pointer, :uint], :status - + + # @method _callback_read_func_t_(status_t, closure, data, length) + # @param [Symbol from _enum_status_] status_t + # @param [FFI::Pointer(*Void)] closure + # @param [FFI::Pointer(*UChar)] data + # @param [Integer] length + # @return [Symbol from _enum_status_] + # @scope class + callback :read_func_t, [:status, :pointer, :pointer, :uint], :status + # Functions for manipulating state objects - # + # @method create(target) - # @param [Surface] target - # @return [Cairo] + # @param [Surface] target + # @return [Cairo] # @scope class attach_function :create, :cairo_create, [Surface], Cairo - # (Not documented) - # + # @method reference(cr) - # @param [Cairo] cr - # @return [Cairo] + # @param [Cairo] cr + # @return [Cairo] # @scope class attach_function :reference, :cairo_reference, [Cairo], Cairo - # (Not documented) - # + # @method destroy(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :destroy, :cairo_destroy, [Cairo], :void - # (Not documented) - # + # @method get_reference_count(cr) - # @param [Cairo] cr - # @return [Integer] + # @param [Cairo] cr + # @return [Integer] # @scope class attach_function :get_reference_count, :cairo_get_reference_count, [Cairo], :uint - # (Not documented) - # + # @method get_user_data(cr, key) - # @param [Cairo] cr - # @param [UserDataKey] key - # @return [FFI::Pointer(*Void)] + # @param [Cairo] cr + # @param [UserDataKey] key + # @return [FFI::Pointer(*Void)] # @scope class attach_function :get_user_data, :cairo_get_user_data, [Cairo, UserDataKey], :pointer - # (Not documented) - # + # @method set_user_data(cr, key, user_data, destroy) - # @param [Cairo] cr - # @param [UserDataKey] key - # @param [FFI::Pointer(*Void)] user_data - # @param [FFI::Pointer(DestroyFuncT)] destroy - # @return [Symbol from _enum_status_] + # @param [Cairo] cr + # @param [UserDataKey] key + # @param [FFI::Pointer(*Void)] user_data + # @param [FFI::Pointer(DestroyFuncT)] destroy + # @return [Symbol from _enum_status_] # @scope class attach_function :set_user_data, :cairo_set_user_data, [Cairo, UserDataKey, :pointer, :pointer], :status - # (Not documented) - # + # @method save(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :save, :cairo_save, [Cairo], :void - # (Not documented) - # + # @method restore(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :restore, :cairo_restore, [Cairo], :void - # (Not documented) - # + # @method push_group(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :push_group, :cairo_push_group, [Cairo], :void - # (Not documented) - # + # @method push_group_with_content(cr, content) - # @param [Cairo] cr - # @param [Symbol from _enum_content_] content - # @return [nil] + # @param [Cairo] cr + # @param [Symbol from _enum_content_] content + # @return [nil] # @scope class attach_function :push_group_with_content, :cairo_push_group_with_content, [Cairo, :content], :void - # (Not documented) - # + # @method pop_group(cr) - # @param [Cairo] cr - # @return [Pattern] + # @param [Cairo] cr + # @return [Pattern] # @scope class attach_function :pop_group, :cairo_pop_group, [Cairo], Pattern - # (Not documented) - # + # @method pop_group_to_source(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :pop_group_to_source, :cairo_pop_group_to_source, [Cairo], :void - # cairo_operator_t: - # + # #cairo_operator_t is used to set the compositing operator for all cairo # drawing operations. - # + # The default operator is %CAIRO_OPERATOR_OVER. - # + # The operators marked as unbounded modify their # destination even outside of the mask layer (that is, their effect is not # bound by the mask layer). However, their effect can still be limited by # way of clipping. - # + # To keep things simple, the operator descriptions here # document the behavior for when both source and destination are either fully # transparent or fully opaque. The actual implementation works for @@ -973,9 +963,9 @@ class UserDataKey < FFI::Struct # For a more detailed explanation of the effects of each operator, including # the mathematical definitions, see # http://cairographics.org/operators/. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:operator). - # + # === Options: # :clear :: # clear destination layer (bounded) @@ -1064,7 +1054,7 @@ class UserDataKey < FFI::Struct # Creates a color with the luminosity of # the source and the hue and saturation of the target. This produces an # inverse effect to @CAIRO_OPERATOR_HSL_COLOR. - # + # @method _enum_operator_ # @return [Symbol] # @scope class @@ -1099,74 +1089,68 @@ class UserDataKey < FFI::Struct :hsl_color, 27, :hsl_luminosity, 28 ] - + # (Not documented) - # + # @method set_operator(cr, op) - # @param [Cairo] cr - # @param [Symbol from _enum_operator_] op - # @return [nil] + # @param [Cairo] cr + # @param [Symbol from _enum_operator_] op + # @return [nil] # @scope class attach_function :set_operator, :cairo_set_operator, [Cairo, :operator], :void - # (Not documented) - # + # @method set_source(cr, source) - # @param [Cairo] cr - # @param [Pattern] source - # @return [nil] + # @param [Cairo] cr + # @param [Pattern] source + # @return [nil] # @scope class attach_function :set_source, :cairo_set_source, [Cairo, Pattern], :void - # (Not documented) - # + # @method set_source_rgb(cr, red, green, blue) - # @param [Cairo] cr - # @param [Float] red - # @param [Float] green - # @param [Float] blue - # @return [nil] + # @param [Cairo] cr + # @param [Float] red + # @param [Float] green + # @param [Float] blue + # @return [nil] # @scope class attach_function :set_source_rgb, :cairo_set_source_rgb, [Cairo, :double, :double, :double], :void - # (Not documented) - # + # @method set_source_rgba(cr, red, green, blue, alpha) - # @param [Cairo] cr - # @param [Float] red - # @param [Float] green - # @param [Float] blue - # @param [Float] alpha - # @return [nil] + # @param [Cairo] cr + # @param [Float] red + # @param [Float] green + # @param [Float] blue + # @param [Float] alpha + # @return [nil] # @scope class attach_function :set_source_rgba, :cairo_set_source_rgba, [Cairo, :double, :double, :double, :double], :void - # (Not documented) - # + # @method set_source_surface(cr, surface, x, y) - # @param [Cairo] cr - # @param [Surface] surface - # @param [Float] x - # @param [Float] y - # @return [nil] + # @param [Cairo] cr + # @param [Surface] surface + # @param [Float] x + # @param [Float] y + # @return [nil] # @scope class attach_function :set_source_surface, :cairo_set_source_surface, [Cairo, Surface, :double, :double], :void - # (Not documented) - # + # @method set_tolerance(cr, tolerance) - # @param [Cairo] cr - # @param [Float] tolerance - # @return [nil] + # @param [Cairo] cr + # @param [Float] tolerance + # @return [nil] # @scope class attach_function :set_tolerance, :cairo_set_tolerance, [Cairo, :double], :void - # cairo_antialias_t: - # + # Specifies the type of antialiasing to do when rendering text or shapes. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:antialias). - # + # === Options: # :default :: # Use the default antialiasing for @@ -1180,7 +1164,7 @@ class UserDataKey < FFI::Struct # Perform antialiasing by taking # advantage of the order of subpixel elements on devices # such as LCD panels - # + # @method _enum_antialias_ # @return [Symbol] # @scope class @@ -1190,18 +1174,17 @@ class UserDataKey < FFI::Struct :gray, 2, :subpixel, 3 ] - + # (Not documented) - # + # @method set_antialias(cr, antialias) - # @param [Cairo] cr - # @param [Symbol from _enum_antialias_] antialias - # @return [nil] + # @param [Cairo] cr + # @param [Symbol from _enum_antialias_] antialias + # @return [nil] # @scope class attach_function :set_antialias, :cairo_set_antialias, [Cairo, :antialias], :void - # cairo_fill_rule_t: - # + # #cairo_fill_rule_t is used to select how paths are filled. For both # fill rules, whether or not a point is included in the fill is # determined by taking a ray from that point to infinity and looking @@ -1210,13 +1193,13 @@ class UserDataKey < FFI::Struct # or have a tricky intersection such as intersecting tangent to the path. # (Note that filling is not actually implemented in this way. This # is just a description of the rule that is applied.) - # + # The default fill rule is %CAIRO_FILL_RULE_WINDING. - # + # New entries may be added in future versions. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:fill_rule). - # + # === Options: # :winding :: # If the path crosses the ray from @@ -1229,7 +1212,7 @@ class UserDataKey < FFI::Struct # intersections, without regard to the orientation of the contour. If # the total number of intersections is odd, the point will be # filled. - # + # @method _enum_fill_rule_ # @return [Symbol] # @scope class @@ -1237,33 +1220,31 @@ class UserDataKey < FFI::Struct :winding, 0, :even_odd, 1 ] - + # (Not documented) - # + # @method set_fill_rule(cr, fill_rule) - # @param [Cairo] cr - # @param [Symbol from _enum_fill_rule_] fill_rule - # @return [nil] + # @param [Cairo] cr + # @param [Symbol from _enum_fill_rule_] fill_rule + # @return [nil] # @scope class attach_function :set_fill_rule, :cairo_set_fill_rule, [Cairo, :fill_rule], :void - # (Not documented) - # + # @method set_line_width(cr, width) - # @param [Cairo] cr - # @param [Float] width - # @return [nil] + # @param [Cairo] cr + # @param [Float] width + # @return [nil] # @scope class attach_function :set_line_width, :cairo_set_line_width, [Cairo, :double], :void - # cairo_line_cap_t: - # + # Specifies how to render the endpoints of the path when stroking. - # + # The default line cap style is %CAIRO_LINE_CAP_BUTT. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:line_cap). - # + # === Options: # :butt :: # start(stop) the line exactly at the start(end) point @@ -1271,7 +1252,7 @@ class UserDataKey < FFI::Struct # use a round ending, the center of the circle is the end point # :square :: # use squared ending, the center of the square is the end point - # + # @method _enum_line_cap_ # @return [Symbol] # @scope class @@ -1280,24 +1261,23 @@ class UserDataKey < FFI::Struct :round, 1, :square, 2 ] - + # (Not documented) - # + # @method set_line_cap(cr, line_cap) - # @param [Cairo] cr - # @param [Symbol from _enum_line_cap_] line_cap - # @return [nil] + # @param [Cairo] cr + # @param [Symbol from _enum_line_cap_] line_cap + # @return [nil] # @scope class attach_function :set_line_cap, :cairo_set_line_cap, [Cairo, :line_cap], :void - # cairo_line_join_t: - # + # Specifies how to render the junction of two lines when stroking. - # + # The default line join style is %CAIRO_LINE_JOIN_MITER. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:line_join). - # + # === Options: # :miter :: # use a sharp (angled) corner, see @@ -1308,7 +1288,7 @@ class UserDataKey < FFI::Struct # :bevel :: # use a cut-off join, the join is cut off at half # the line width from the joint point - # + # @method _enum_line_join_ # @return [Symbol] # @scope class @@ -1317,712 +1297,665 @@ class UserDataKey < FFI::Struct :round, 1, :bevel, 2 ] - + # (Not documented) - # + # @method set_line_join(cr, line_join) - # @param [Cairo] cr - # @param [Symbol from _enum_line_join_] line_join - # @return [nil] + # @param [Cairo] cr + # @param [Symbol from _enum_line_join_] line_join + # @return [nil] # @scope class attach_function :set_line_join, :cairo_set_line_join, [Cairo, :line_join], :void - # (Not documented) - # + # @method set_dash(cr, dashes, num_dashes, offset) - # @param [Cairo] cr - # @param [FFI::Pointer(*Double)] dashes - # @param [Integer] num_dashes - # @param [Float] offset - # @return [nil] + # @param [Cairo] cr + # @param [FFI::Pointer(*Double)] dashes + # @param [Integer] num_dashes + # @param [Float] offset + # @return [nil] # @scope class attach_function :set_dash, :cairo_set_dash, [Cairo, :pointer, :int, :double], :void - # (Not documented) - # + # @method set_miter_limit(cr, limit) - # @param [Cairo] cr - # @param [Float] limit - # @return [nil] + # @param [Cairo] cr + # @param [Float] limit + # @return [nil] # @scope class attach_function :set_miter_limit, :cairo_set_miter_limit, [Cairo, :double], :void - # (Not documented) - # + # @method translate(cr, tx, ty) - # @param [Cairo] cr - # @param [Float] tx - # @param [Float] ty - # @return [nil] + # @param [Cairo] cr + # @param [Float] tx + # @param [Float] ty + # @return [nil] # @scope class attach_function :translate, :cairo_translate, [Cairo, :double, :double], :void - # (Not documented) - # + # @method scale(cr, sx, sy) - # @param [Cairo] cr - # @param [Float] sx - # @param [Float] sy - # @return [nil] + # @param [Cairo] cr + # @param [Float] sx + # @param [Float] sy + # @return [nil] # @scope class attach_function :scale, :cairo_scale, [Cairo, :double, :double], :void - # (Not documented) - # + # @method rotate(cr, angle) - # @param [Cairo] cr - # @param [Float] angle - # @return [nil] + # @param [Cairo] cr + # @param [Float] angle + # @return [nil] # @scope class attach_function :rotate, :cairo_rotate, [Cairo, :double], :void - # (Not documented) - # + # @method transform(cr, matrix) - # @param [Cairo] cr - # @param [Matrix] matrix - # @return [nil] + # @param [Cairo] cr + # @param [Matrix] matrix + # @return [nil] # @scope class attach_function :transform, :cairo_transform, [Cairo, Matrix], :void - # (Not documented) - # + # @method set_matrix(cr, matrix) - # @param [Cairo] cr - # @param [Matrix] matrix - # @return [nil] + # @param [Cairo] cr + # @param [Matrix] matrix + # @return [nil] # @scope class attach_function :set_matrix, :cairo_set_matrix, [Cairo, Matrix], :void - # (Not documented) - # + # @method identity_matrix(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :identity_matrix, :cairo_identity_matrix, [Cairo], :void - # (Not documented) - # + # @method user_to_device(cr, x, y) - # @param [Cairo] cr - # @param [FFI::Pointer(*Double)] x - # @param [FFI::Pointer(*Double)] y - # @return [nil] + # @param [Cairo] cr + # @param [FFI::Pointer(*Double)] x + # @param [FFI::Pointer(*Double)] y + # @return [nil] # @scope class attach_function :user_to_device, :cairo_user_to_device, [Cairo, :pointer, :pointer], :void - # (Not documented) - # + # @method user_to_device_distance(cr, dx, dy) - # @param [Cairo] cr - # @param [FFI::Pointer(*Double)] dx - # @param [FFI::Pointer(*Double)] dy - # @return [nil] + # @param [Cairo] cr + # @param [FFI::Pointer(*Double)] dx + # @param [FFI::Pointer(*Double)] dy + # @return [nil] # @scope class attach_function :user_to_device_distance, :cairo_user_to_device_distance, [Cairo, :pointer, :pointer], :void - # (Not documented) - # + # @method device_to_user(cr, x, y) - # @param [Cairo] cr - # @param [FFI::Pointer(*Double)] x - # @param [FFI::Pointer(*Double)] y - # @return [nil] + # @param [Cairo] cr + # @param [FFI::Pointer(*Double)] x + # @param [FFI::Pointer(*Double)] y + # @return [nil] # @scope class attach_function :device_to_user, :cairo_device_to_user, [Cairo, :pointer, :pointer], :void - # (Not documented) - # + # @method device_to_user_distance(cr, dx, dy) - # @param [Cairo] cr - # @param [FFI::Pointer(*Double)] dx - # @param [FFI::Pointer(*Double)] dy - # @return [nil] + # @param [Cairo] cr + # @param [FFI::Pointer(*Double)] dx + # @param [FFI::Pointer(*Double)] dy + # @return [nil] # @scope class attach_function :device_to_user_distance, :cairo_device_to_user_distance, [Cairo, :pointer, :pointer], :void - # Path creation functions - # + # @method new_path(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :new_path, :cairo_new_path, [Cairo], :void - # (Not documented) - # + # @method move_to(cr, x, y) - # @param [Cairo] cr - # @param [Float] x - # @param [Float] y - # @return [nil] + # @param [Cairo] cr + # @param [Float] x + # @param [Float] y + # @return [nil] # @scope class attach_function :move_to, :cairo_move_to, [Cairo, :double, :double], :void - # (Not documented) - # + # @method new_sub_path(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :new_sub_path, :cairo_new_sub_path, [Cairo], :void - # (Not documented) - # + # @method line_to(cr, x, y) - # @param [Cairo] cr - # @param [Float] x - # @param [Float] y - # @return [nil] + # @param [Cairo] cr + # @param [Float] x + # @param [Float] y + # @return [nil] # @scope class attach_function :line_to, :cairo_line_to, [Cairo, :double, :double], :void - # (Not documented) - # + # @method curve_to(cr, x1, y1, x2, y2, x3, y3) - # @param [Cairo] cr - # @param [Float] x1 - # @param [Float] y1 - # @param [Float] x2 - # @param [Float] y2 - # @param [Float] x3 - # @param [Float] y3 - # @return [nil] + # @param [Cairo] cr + # @param [Float] x1 + # @param [Float] y1 + # @param [Float] x2 + # @param [Float] y2 + # @param [Float] x3 + # @param [Float] y3 + # @return [nil] # @scope class attach_function :curve_to, :cairo_curve_to, [Cairo, :double, :double, :double, :double, :double, :double], :void - # (Not documented) - # + # @method arc(cr, xc, yc, radius, angle1, angle2) - # @param [Cairo] cr - # @param [Float] xc - # @param [Float] yc - # @param [Float] radius - # @param [Float] angle1 - # @param [Float] angle2 - # @return [nil] + # @param [Cairo] cr + # @param [Float] xc + # @param [Float] yc + # @param [Float] radius + # @param [Float] angle1 + # @param [Float] angle2 + # @return [nil] # @scope class attach_function :arc, :cairo_arc, [Cairo, :double, :double, :double, :double, :double], :void - # (Not documented) - # + # @method arc_negative(cr, xc, yc, radius, angle1, angle2) - # @param [Cairo] cr - # @param [Float] xc - # @param [Float] yc - # @param [Float] radius - # @param [Float] angle1 - # @param [Float] angle2 - # @return [nil] + # @param [Cairo] cr + # @param [Float] xc + # @param [Float] yc + # @param [Float] radius + # @param [Float] angle1 + # @param [Float] angle2 + # @return [nil] # @scope class attach_function :arc_negative, :cairo_arc_negative, [Cairo, :double, :double, :double, :double, :double], :void - # XXX: NYI # cairo_public void # cairo_arc_to (cairo_t *cr, # double x1, double y1, # double x2, double y2, # double radius); - # + # @method rel_move_to(cr, dx, dy) - # @param [Cairo] cr - # @param [Float] dx - # @param [Float] dy - # @return [nil] + # @param [Cairo] cr + # @param [Float] dx + # @param [Float] dy + # @return [nil] # @scope class attach_function :rel_move_to, :cairo_rel_move_to, [Cairo, :double, :double], :void - # (Not documented) - # + # @method rel_line_to(cr, dx, dy) - # @param [Cairo] cr - # @param [Float] dx - # @param [Float] dy - # @return [nil] + # @param [Cairo] cr + # @param [Float] dx + # @param [Float] dy + # @return [nil] # @scope class attach_function :rel_line_to, :cairo_rel_line_to, [Cairo, :double, :double], :void - # (Not documented) - # + # @method rel_curve_to(cr, dx1, dy1, dx2, dy2, dx3, dy3) - # @param [Cairo] cr - # @param [Float] dx1 - # @param [Float] dy1 - # @param [Float] dx2 - # @param [Float] dy2 - # @param [Float] dx3 - # @param [Float] dy3 - # @return [nil] + # @param [Cairo] cr + # @param [Float] dx1 + # @param [Float] dy1 + # @param [Float] dx2 + # @param [Float] dy2 + # @param [Float] dx3 + # @param [Float] dy3 + # @return [nil] # @scope class attach_function :rel_curve_to, :cairo_rel_curve_to, [Cairo, :double, :double, :double, :double, :double, :double], :void - # (Not documented) - # + # @method rectangle(cr, x, y, width, height) - # @param [Cairo] cr - # @param [Float] x - # @param [Float] y - # @param [Float] width - # @param [Float] height - # @return [nil] + # @param [Cairo] cr + # @param [Float] x + # @param [Float] y + # @param [Float] width + # @param [Float] height + # @return [nil] # @scope class attach_function :rectangle, :cairo_rectangle, [Cairo, :double, :double, :double, :double], :void - # XXX: NYI # cairo_public void # cairo_stroke_to_path (cairo_t *cr); - # + # @method close_path(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :close_path, :cairo_close_path, [Cairo], :void - # (Not documented) - # + # @method path_extents(cr, x1, y1, x2, y2) - # @param [Cairo] cr - # @param [FFI::Pointer(*Double)] x1 - # @param [FFI::Pointer(*Double)] y1 - # @param [FFI::Pointer(*Double)] x2 - # @param [FFI::Pointer(*Double)] y2 - # @return [nil] + # @param [Cairo] cr + # @param [FFI::Pointer(*Double)] x1 + # @param [FFI::Pointer(*Double)] y1 + # @param [FFI::Pointer(*Double)] x2 + # @param [FFI::Pointer(*Double)] y2 + # @return [nil] # @scope class attach_function :path_extents, :cairo_path_extents, [Cairo, :pointer, :pointer, :pointer, :pointer], :void - # Painting functions - # + # @method paint(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :paint, :cairo_paint, [Cairo], :void - # (Not documented) - # + # @method paint_with_alpha(cr, alpha) - # @param [Cairo] cr - # @param [Float] alpha - # @return [nil] + # @param [Cairo] cr + # @param [Float] alpha + # @return [nil] # @scope class attach_function :paint_with_alpha, :cairo_paint_with_alpha, [Cairo, :double], :void - # (Not documented) - # + # @method mask(cr, pattern) - # @param [Cairo] cr - # @param [Pattern] pattern - # @return [nil] + # @param [Cairo] cr + # @param [Pattern] pattern + # @return [nil] # @scope class attach_function :mask, :cairo_mask, [Cairo, Pattern], :void - # (Not documented) - # + # @method mask_surface(cr, surface, surface_x, surface_y) - # @param [Cairo] cr - # @param [Surface] surface - # @param [Float] surface_x - # @param [Float] surface_y - # @return [nil] + # @param [Cairo] cr + # @param [Surface] surface + # @param [Float] surface_x + # @param [Float] surface_y + # @return [nil] # @scope class attach_function :mask_surface, :cairo_mask_surface, [Cairo, Surface, :double, :double], :void - # (Not documented) - # + # @method stroke(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :stroke, :cairo_stroke, [Cairo], :void - # (Not documented) - # + # @method stroke_preserve(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :stroke_preserve, :cairo_stroke_preserve, [Cairo], :void - # (Not documented) - # + # @method fill(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :fill, :cairo_fill, [Cairo], :void - # (Not documented) - # + # @method fill_preserve(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :fill_preserve, :cairo_fill_preserve, [Cairo], :void - # (Not documented) - # + # @method copy_page(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :copy_page, :cairo_copy_page, [Cairo], :void - # (Not documented) - # + # @method show_page(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :show_page, :cairo_show_page, [Cairo], :void - # Insideness testing - # + # @method in_stroke(cr, x, y) - # @param [Cairo] cr - # @param [Float] x - # @param [Float] y - # @return [Integer] + # @param [Cairo] cr + # @param [Float] x + # @param [Float] y + # @return [Integer] # @scope class attach_function :in_stroke, :cairo_in_stroke, [Cairo, :double, :double], :int - # (Not documented) - # + # @method in_fill(cr, x, y) - # @param [Cairo] cr - # @param [Float] x - # @param [Float] y - # @return [Integer] + # @param [Cairo] cr + # @param [Float] x + # @param [Float] y + # @return [Integer] # @scope class attach_function :in_fill, :cairo_in_fill, [Cairo, :double, :double], :int - # (Not documented) - # + # @method in_clip(cr, x, y) - # @param [Cairo] cr - # @param [Float] x - # @param [Float] y - # @return [Integer] + # @param [Cairo] cr + # @param [Float] x + # @param [Float] y + # @return [Integer] # @scope class attach_function :in_clip, :cairo_in_clip, [Cairo, :double, :double], :int - # Rectangular extents - # + # @method stroke_extents(cr, x1, y1, x2, y2) - # @param [Cairo] cr - # @param [FFI::Pointer(*Double)] x1 - # @param [FFI::Pointer(*Double)] y1 - # @param [FFI::Pointer(*Double)] x2 - # @param [FFI::Pointer(*Double)] y2 - # @return [nil] + # @param [Cairo] cr + # @param [FFI::Pointer(*Double)] x1 + # @param [FFI::Pointer(*Double)] y1 + # @param [FFI::Pointer(*Double)] x2 + # @param [FFI::Pointer(*Double)] y2 + # @return [nil] # @scope class attach_function :stroke_extents, :cairo_stroke_extents, [Cairo, :pointer, :pointer, :pointer, :pointer], :void - # (Not documented) - # + # @method fill_extents(cr, x1, y1, x2, y2) - # @param [Cairo] cr - # @param [FFI::Pointer(*Double)] x1 - # @param [FFI::Pointer(*Double)] y1 - # @param [FFI::Pointer(*Double)] x2 - # @param [FFI::Pointer(*Double)] y2 - # @return [nil] + # @param [Cairo] cr + # @param [FFI::Pointer(*Double)] x1 + # @param [FFI::Pointer(*Double)] y1 + # @param [FFI::Pointer(*Double)] x2 + # @param [FFI::Pointer(*Double)] y2 + # @return [nil] # @scope class attach_function :fill_extents, :cairo_fill_extents, [Cairo, :pointer, :pointer, :pointer, :pointer], :void - # Clipping - # + # @method reset_clip(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :reset_clip, :cairo_reset_clip, [Cairo], :void - # (Not documented) - # + # @method clip(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :clip, :cairo_clip, [Cairo], :void - # (Not documented) - # + # @method clip_preserve(cr) - # @param [Cairo] cr - # @return [nil] + # @param [Cairo] cr + # @return [nil] # @scope class attach_function :clip_preserve, :cairo_clip_preserve, [Cairo], :void - # (Not documented) - # + # @method clip_extents(cr, x1, y1, x2, y2) - # @param [Cairo] cr - # @param [FFI::Pointer(*Double)] x1 - # @param [FFI::Pointer(*Double)] y1 - # @param [FFI::Pointer(*Double)] x2 - # @param [FFI::Pointer(*Double)] y2 - # @return [nil] + # @param [Cairo] cr + # @param [FFI::Pointer(*Double)] x1 + # @param [FFI::Pointer(*Double)] y1 + # @param [FFI::Pointer(*Double)] x2 + # @param [FFI::Pointer(*Double)] y2 + # @return [nil] # @scope class attach_function :clip_extents, :cairo_clip_extents, [Cairo, :pointer, :pointer, :pointer, :pointer], :void - # cairo_rectangle_t: # @x: X coordinate of the left side of the rectangle # @y: Y coordinate of the the top side of the rectangle # @width: width of the rectangle # @height: height of the rectangle - # + # A data structure for holding a rectangle. - # + # Since: 1.4 - # + # = Fields: # :x :: - # (Float) + # (Float) # :y :: - # (Float) + # (Float) # :width :: - # (Float) + # (Float) # :height :: - # (Float) + # (Float) class Rectangle < FFI::Struct layout :x, :double, :y, :double, :width, :double, :height, :double end - + # cairo_rectangle_list_t: # @status: Error status of the rectangle list # @rectangles: Array containing the rectangles # @num_rectangles: Number of rectangles in this list - # + # A data structure for holding a dynamically allocated # array of rectangles. - # + # Since: 1.4 - # + # = Fields: # :status :: - # (Symbol from _enum_status_) + # (Symbol from _enum_status_) # :rectangles :: - # (Rectangle) + # (Rectangle) # :num_rectangles :: - # (Integer) + # (Integer) module RectangleListWrappers - # @return [nil] + # @return [nil] def destroy() Cairo.rectangle_list_destroy(self) end end - + class RectangleList < FFI::Struct include RectangleListWrappers layout :status, :status, :rectangles, Rectangle, :num_rectangles, :int end - + # (Not documented) - # + # @method copy_clip_rectangle_list(cr) - # @param [Cairo] cr - # @return [RectangleList] + # @param [Cairo] cr + # @return [RectangleList] # @scope class attach_function :copy_clip_rectangle_list, :cairo_copy_clip_rectangle_list, [Cairo], RectangleList - # (Not documented) - # + # @method rectangle_list_destroy(rectangle_list) - # @param [RectangleList] rectangle_list - # @return [nil] + # @param [RectangleList] rectangle_list + # @return [nil] # @scope class attach_function :rectangle_list_destroy, :cairo_rectangle_list_destroy, [RectangleList], :void - # cairo_scaled_font_t: - # + # A #cairo_scaled_font_t is a font scaled to a particular size and device # resolution. A #cairo_scaled_font_t is most useful for low-level font # usage where a library or application wants to cache a reference # to a scaled font to speed up the computation of metrics. - # + # There are various types of scaled fonts, depending on the # font backend they use. The type of a # scaled font can be queried using cairo_scaled_font_get_type(). - # + # Memory management of #cairo_scaled_font_t is done with # cairo_scaled_font_reference() and cairo_scaled_font_destroy(). module ScaledFontWrappers - # @return [ScaledFont] + # @return [ScaledFont] def reference() ScaledFont.new Cairo.scaled_font_reference(self) end - - # @return [nil] + + # @return [nil] def destroy() Cairo.scaled_font_destroy(self) end - - # @return [Integer] + + # @return [Integer] def get_reference_count() Cairo.scaled_font_get_reference_count(self) end - - # @return [Symbol from _enum_status_] + + # @return [Symbol from _enum_status_] def status() Cairo.scaled_font_status(self) end - - # @return [Symbol from _enum_font_type_] + + # @return [Symbol from _enum_font_type_] def get_type() Cairo.scaled_font_get_type(self) end - - # @param [UserDataKey] key - # @return [FFI::Pointer(*Void)] + + # @param [UserDataKey] key + # @return [FFI::Pointer(*Void)] def get_user_data(key) Cairo.scaled_font_get_user_data(self, key) end - - # @param [UserDataKey] key - # @param [FFI::Pointer(*Void)] user_data - # @param [FFI::Pointer(DestroyFuncT)] destroy - # @return [Symbol from _enum_status_] + + # @param [UserDataKey] key + # @param [FFI::Pointer(*Void)] user_data + # @param [FFI::Pointer(DestroyFuncT)] destroy + # @return [Symbol from _enum_status_] def set_user_data(key, user_data, destroy) Cairo.scaled_font_set_user_data(self, key, user_data, destroy) end - - # @param [FFI::Pointer(*FontExtentsT)] extents - # @return [nil] + + # @param [FFI::Pointer(*FontExtentsT)] extents + # @return [nil] def extents(extents) Cairo.scaled_font_extents(self, extents) end - - # @param [String] utf8 - # @param [FFI::Pointer(*TextExtentsT)] extents - # @return [nil] + + # @param [String] utf8 + # @param [FFI::Pointer(*TextExtentsT)] extents + # @return [nil] def text_extents(utf8, extents) Cairo.scaled_font_text_extents(self, utf8, extents) end - - # @param [FFI::Pointer(*GlyphT)] glyphs - # @param [Integer] num_glyphs - # @param [FFI::Pointer(*TextExtentsT)] extents - # @return [nil] + + # @param [FFI::Pointer(*GlyphT)] glyphs + # @param [Integer] num_glyphs + # @param [FFI::Pointer(*TextExtentsT)] extents + # @return [nil] def glyph_extents(glyphs, num_glyphs, extents) Cairo.scaled_font_glyph_extents(self, glyphs, num_glyphs, extents) end - - # @param [Float] x - # @param [Float] y - # @param [String] utf8 - # @param [Integer] utf8_len - # @param [FFI::Pointer(**GlyphT)] glyphs - # @param [FFI::Pointer(*Int)] num_glyphs - # @param [FFI::Pointer(**TextClusterT)] clusters - # @param [FFI::Pointer(*Int)] num_clusters - # @param [FFI::Pointer(*TextClusterFlagsT)] cluster_flags - # @return [Symbol from _enum_status_] + + # @param [Float] x + # @param [Float] y + # @param [String] utf8 + # @param [Integer] utf8_len + # @param [FFI::Pointer(**GlyphT)] glyphs + # @param [FFI::Pointer(*Int)] num_glyphs + # @param [FFI::Pointer(**TextClusterT)] clusters + # @param [FFI::Pointer(*Int)] num_clusters + # @param [FFI::Pointer(*TextClusterFlagsT)] cluster_flags + # @return [Symbol from _enum_status_] def text_to_glyphs(x, y, utf8, utf8_len, glyphs, num_glyphs, clusters, num_clusters, cluster_flags) Cairo.scaled_font_text_to_glyphs(self, x, y, utf8, utf8_len, glyphs, num_glyphs, clusters, num_clusters, cluster_flags) end - - # @return [FontFace] + + # @return [FontFace] def get_font_face() FontFace.new Cairo.scaled_font_get_font_face(self) end - - # @param [Matrix] font_matrix - # @return [nil] + + # @param [Matrix] font_matrix + # @return [nil] def get_font_matrix(font_matrix) Cairo.scaled_font_get_font_matrix(self, font_matrix) end - - # @param [Matrix] ctm - # @return [nil] + + # @param [Matrix] ctm + # @return [nil] def get_ctm(ctm) Cairo.scaled_font_get_ctm(self, ctm) end - - # @param [Matrix] scale_matrix - # @return [nil] + + # @param [Matrix] scale_matrix + # @return [nil] def get_scale_matrix(scale_matrix) Cairo.scaled_font_get_scale_matrix(self, scale_matrix) end - - # @param [FFI::Pointer(*FontOptions)] options - # @return [nil] + + # @param [FFI::Pointer(*FontOptions)] options + # @return [nil] def get_font_options(options) Cairo.scaled_font_get_font_options(self, options) end end - + class ScaledFont < FFI::Struct include ScaledFontWrappers layout :dummy, :char end - + # cairo_font_face_t: - # + # A #cairo_font_face_t specifies all aspects of a font other # than the size or font matrix (a font matrix is used to distort # a font by sheering it or scaling it unequally in the two # directions) . A font face can be set on a #cairo_t by using # cairo_set_font_face(); the size and font matrix are set with # cairo_set_font_size() and cairo_set_font_matrix(). - # + # There are various types of font faces, depending on the # font backend they use. The type of a # font face can be queried using cairo_font_face_get_type(). - # + # Memory management of #cairo_font_face_t is done with # cairo_font_face_reference() and cairo_font_face_destroy(). module FontFaceWrappers - # @return [FontFace] + # @return [FontFace] def reference() FontFace.new Cairo.font_face_reference(self) end - - # @return [nil] + + # @return [nil] def destroy() Cairo.font_face_destroy(self) end - - # @return [Integer] + + # @return [Integer] def get_reference_count() Cairo.font_face_get_reference_count(self) end - - # @return [Symbol from _enum_status_] + + # @return [Symbol from _enum_status_] def status() Cairo.font_face_status(self) end - - # @return [Symbol from _enum_font_type_] + + # @return [Symbol from _enum_font_type_] def get_type() Cairo.font_face_get_type(self) end - - # @param [UserDataKey] key - # @return [FFI::Pointer(*Void)] + + # @param [UserDataKey] key + # @return [FFI::Pointer(*Void)] def get_user_data(key) Cairo.font_face_get_user_data(self, key) end - - # @param [UserDataKey] key - # @param [FFI::Pointer(*Void)] user_data - # @param [FFI::Pointer(DestroyFuncT)] destroy - # @return [Symbol from _enum_status_] + + # @param [UserDataKey] key + # @param [FFI::Pointer(*Void)] user_data + # @param [FFI::Pointer(DestroyFuncT)] destroy + # @return [Symbol from _enum_status_] def set_user_data(key, user_data, destroy) Cairo.font_face_set_user_data(self, key, user_data, destroy) end end - + class FontFace < FFI::Struct include FontFaceWrappers layout :dummy, :char end - + # cairo_glyph_t: # @index: glyph index in the font. The exact interpretation of the # glyph index depends on the font technology being used. @@ -2030,7 +1963,7 @@ class FontFace < FFI::Struct # drawing or measuring the string and the origin of this glyph. # @y: the offset in the Y direction between the origin used for # drawing or measuring the string and the origin of this glyph. - # + # The #cairo_glyph_t structure holds information about a single glyph # when drawing or measuring text. A font is (in simple terms) a # collection of shapes used to draw text. A glyph is one of these @@ -2041,105 +1974,101 @@ class FontFace < FFI::Struct # into glyphs, so in order to use the Cairo interfaces that take # arrays of glyphs, you must directly access the appropriate # underlying font system. - # + # Note that the offsets given by @x and @y are not cumulative. When # drawing or measuring text, each glyph is individually positioned # with respect to the overall origin - # + # = Fields: # :index :: - # (Integer) + # (Integer) # :x :: - # (Float) + # (Float) # :y :: - # (Float) + # (Float) class GlyphT < FFI::Struct layout :index, :ulong, :x, :double, :y, :double end - + # (Not documented) - # + # @method glyph_allocate(num_glyphs) - # @param [Integer] num_glyphs - # @return [GlyphT] + # @param [Integer] num_glyphs + # @return [GlyphT] # @scope class attach_function :glyph_allocate, :cairo_glyph_allocate, [:int], GlyphT - # (Not documented) - # + # @method glyph_free(glyphs) - # @param [GlyphT] glyphs - # @return [nil] + # @param [GlyphT] glyphs + # @return [nil] # @scope class attach_function :glyph_free, :cairo_glyph_free, [GlyphT], :void - # cairo_text_cluster_t: # @num_bytes: the number of bytes of UTF-8 text covered by cluster # @num_glyphs: the number of glyphs covered by cluster - # + # The #cairo_text_cluster_t structure holds information about a single # text cluster. A text cluster is a minimal # mapping of some glyphs corresponding to some UTF-8 text. - # + # For a cluster to be valid, both @num_bytes and @num_glyphs should # be non-negative, and at least one should be non-zero. # Note that clusters with zero glyphs are not as well supported as # normal clusters. For example, PDF rendering applications typically # ignore those clusters when PDF text is being selected. - # + # See cairo_show_text_glyphs() for how clusters are used in advanced # text operations. - # + # Since: 1.8 - # + # = Fields: # :num_bytes :: - # (Integer) + # (Integer) # :num_glyphs :: - # (Integer) + # (Integer) class TextClusterT < FFI::Struct layout :num_bytes, :int, :num_glyphs, :int end - + # (Not documented) - # + # @method text_cluster_allocate(num_clusters) - # @param [Integer] num_clusters - # @return [TextClusterT] + # @param [Integer] num_clusters + # @return [TextClusterT] # @scope class attach_function :text_cluster_allocate, :cairo_text_cluster_allocate, [:int], TextClusterT - # (Not documented) - # + # @method text_cluster_free(clusters) - # @param [TextClusterT] clusters - # @return [nil] + # @param [TextClusterT] clusters + # @return [nil] # @scope class attach_function :text_cluster_free, :cairo_text_cluster_free, [TextClusterT], :void - # cairo_text_cluster_flags_t: - # + # Specifies properties of a text cluster mapping. - # + # Since: 1.8 - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:text_cluster_flags). - # + # === Options: # :text_cluster_flag_backward :: # The clusters in the cluster array # map to glyphs in the glyph array from end to start. - # + # @method _enum_text_cluster_flags_ # @return [Symbol] # @scope class enum :text_cluster_flags, [ :text_cluster_flag_backward, 1 ] - + # cairo_text_extents_t: # @x_bearing: the horizontal distance from the origin to the # leftmost part of the glyphs as drawn. Positive if the @@ -2155,7 +2084,7 @@ class TextClusterT < FFI::Struct # @y_advance: distance to advance in the Y direction # after drawing these glyphs. Will typically be zero except # for vertical text layout as found in East-Asian languages. - # + # The #cairo_text_extents_t structure stores the extents of a single # glyph or a string of glyphs in user-space coordinates. Because text # extents are in user-space coordinates, they are mostly, but not @@ -2165,20 +2094,20 @@ class TextClusterT < FFI::Struct # doubled. They will change slightly due to hinting (so you can't # assume that metrics are independent of the transformation matrix), # but otherwise will remain unchanged. - # + # = Fields: # :x_bearing :: - # (Float) + # (Float) # :y_bearing :: - # (Float) + # (Float) # :width :: - # (Float) + # (Float) # :height :: - # (Float) + # (Float) # :x_advance :: - # (Float) + # (Float) # :y_advance :: - # (Float) + # (Float) class TextExtentsT < FFI::Struct layout :x_bearing, :double, :y_bearing, :double, @@ -2187,7 +2116,7 @@ class TextExtentsT < FFI::Struct :x_advance, :double, :y_advance, :double end - + # cairo_font_extents_t: # @ascent: the distance that the font extends above the baseline. # Note that this is not always exactly equal to the maximum @@ -2215,11 +2144,11 @@ class TextExtentsT < FFI::Struct # this will be zero for normal fonts used for horizontal # writing. (The scripts of East Asia are sometimes written # vertically.) - # + # The #cairo_font_extents_t structure stores metric information for # a font. Values are given in the current user-space coordinate # system. - # + # Because font metrics are in user-space coordinates, they are # mostly, but not entirely, independent of the current transformation # matrix. If you call cairo_scale(cr, 2.0, 2.0), @@ -2227,18 +2156,18 @@ class TextExtentsT < FFI::Struct # not be doubled. They will change slightly due to hinting (so you # can't assume that metrics are independent of the transformation # matrix), but otherwise will remain unchanged. - # + # = Fields: # :ascent :: - # (Float) + # (Float) # :descent :: - # (Float) + # (Float) # :height :: - # (Float) + # (Float) # :max_x_advance :: - # (Float) + # (Float) # :max_y_advance :: - # (Float) + # (Float) class FontExtentsT < FFI::Struct layout :ascent, :double, :descent, :double, @@ -2246,13 +2175,13 @@ class FontExtentsT < FFI::Struct :max_x_advance, :double, :max_y_advance, :double end - + # cairo_font_slant_t: - # + # Specifies variants of a font face based on their slant. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:font_slant). - # + # === Options: # :normal :: # Upright font style @@ -2260,7 +2189,7 @@ class FontExtentsT < FFI::Struct # Italic font style # :oblique :: # Oblique font style - # + # @method _enum_font_slant_ # @return [Symbol] # @scope class @@ -2269,19 +2198,19 @@ class FontExtentsT < FFI::Struct :italic, 1, :oblique, 2 ] - + # cairo_font_weight_t: - # + # Specifies variants of a font face based on their weight. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:font_weight). - # + # === Options: # :normal :: # Normal font weight # :bold :: # Bold font weight - # + # @method _enum_font_weight_ # @return [Symbol] # @scope class @@ -2289,15 +2218,15 @@ class FontExtentsT < FFI::Struct :normal, 0, :bold, 1 ] - + # cairo_subpixel_order_t: - # + # The subpixel order specifies the order of color elements within # each pixel on the display device when rendering with an # antialiasing mode of %CAIRO_ANTIALIAS_SUBPIXEL. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:subpixel_order). - # + # === Options: # :default :: # Use the default subpixel order for @@ -2314,7 +2243,7 @@ class FontExtentsT < FFI::Struct # :vbgr :: # Subpixel elements are arranged vertically # with blue at the top - # + # @method _enum_subpixel_order_ # @return [Symbol] # @scope class @@ -2325,20 +2254,20 @@ class FontExtentsT < FFI::Struct :vrgb, 3, :vbgr, 4 ] - + # cairo_hint_style_t: - # + # Specifies the type of hinting to do on font outlines. Hinting # is the process of fitting outlines to the pixel grid in order # to improve the appearance of the result. Since hinting outlines # involves distorting them, it also reduces the faithfulness # to the original outline shapes. Not all of the outline hinting # styles are supported by all font backends. - # + # New entries may be added in future versions. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:hint_style). - # + # === Options: # :default :: # Use the default hint style for @@ -2355,7 +2284,7 @@ class FontExtentsT < FFI::Struct # and contrast # :full :: # Hint outlines to maximize contrast - # + # @method _enum_hint_style_ # @return [Symbol] # @scope class @@ -2366,17 +2295,17 @@ class FontExtentsT < FFI::Struct :medium, 3, :full, 4 ] - + # cairo_hint_metrics_t: - # + # Specifies whether to hint font metrics; hinting font metrics # means quantizing them so that they are integer values in # device space. Doing this improves the consistency of # letter and line spacing, however it also means that text # will be laid out differently at different zoom factors. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:hint_metrics). - # + # === Options: # :default :: # Hint metrics in the default @@ -2385,7 +2314,7 @@ class FontExtentsT < FFI::Struct # Do not hint font metrics # :on :: # Hint font metrics - # + # @method _enum_hint_metrics_ # @return [Symbol] # @scope class @@ -2394,19 +2323,19 @@ class FontExtentsT < FFI::Struct :off, 1, :on, 2 ] - + # cairo_font_options_t: - # + # An opaque structure holding all options that are used when # rendering fonts. - # + # Individual features of a #cairo_font_options_t can be set or # accessed using functions named # cairo_font_options_set_feature_name and # cairo_font_options_get_feature_name, like # cairo_font_options_set_antialias() and # cairo_font_options_get_antialias(). - # + # New features may be added to a #cairo_font_options_t in the # future. For this reason, cairo_font_options_copy(), # cairo_font_options_equal(), cairo_font_options_merge(), and @@ -2414,452 +2343,415 @@ class FontExtentsT < FFI::Struct # for equality, merge, or compute a hash value of # #cairo_font_options_t objects. module FontOptionsWrappers - # @return [FontOptions] + # @return [FontOptions] def copy() FontOptions.new Cairo.font_options_copy(self) end - - # @return [nil] + + # @return [nil] def destroy() Cairo.font_options_destroy(self) end - - # @return [Symbol from _enum_status_] + + # @return [Symbol from _enum_status_] def status() Cairo.font_options_status(self) end - - # @param [FFI::Pointer(*FontOptions)] other - # @return [nil] + + # @param [FFI::Pointer(*FontOptions)] other + # @return [nil] def merge(other) Cairo.font_options_merge(self, other) end - - # @param [FFI::Pointer(*FontOptions)] other - # @return [Integer] + + # @param [FFI::Pointer(*FontOptions)] other + # @return [Integer] def equal(other) Cairo.font_options_equal(self, other) end - - # @return [Integer] + + # @return [Integer] def hash() Cairo.font_options_hash(self) end - - # @param [Symbol from _enum_antialias_] antialias - # @return [nil] + + # @param [Symbol from _enum_antialias_] antialias + # @return [nil] def set_antialias(antialias) Cairo.font_options_set_antialias(self, antialias) end - - # @return [Symbol from _enum_antialias_] + + # @return [Symbol from _enum_antialias_] def get_antialias() Cairo.font_options_get_antialias(self) end - - # @param [Symbol from _enum_subpixel_order_] subpixel_order - # @return [nil] + + # @param [Symbol from _enum_subpixel_order_] subpixel_order + # @return [nil] def set_subpixel_order(subpixel_order) Cairo.font_options_set_subpixel_order(self, subpixel_order) end - - # @return [Symbol from _enum_subpixel_order_] + + # @return [Symbol from _enum_subpixel_order_] def get_subpixel_order() Cairo.font_options_get_subpixel_order(self) end - - # @param [Symbol from _enum_hint_style_] hint_style - # @return [nil] + + # @param [Symbol from _enum_hint_style_] hint_style + # @return [nil] def set_hint_style(hint_style) Cairo.font_options_set_hint_style(self, hint_style) end - - # @return [Symbol from _enum_hint_style_] + + # @return [Symbol from _enum_hint_style_] def get_hint_style() Cairo.font_options_get_hint_style(self) end - - # @param [Symbol from _enum_hint_metrics_] hint_metrics - # @return [nil] + + # @param [Symbol from _enum_hint_metrics_] hint_metrics + # @return [nil] def set_hint_metrics(hint_metrics) Cairo.font_options_set_hint_metrics(self, hint_metrics) end - - # @return [Symbol from _enum_hint_metrics_] + + # @return [Symbol from _enum_hint_metrics_] def get_hint_metrics() Cairo.font_options_get_hint_metrics(self) end end - + class FontOptions < FFI::Struct include FontOptionsWrappers layout :dummy, :char end - + # (Not documented) - # + # @method font_options_create() - # @return [FontOptions] + # @return [FontOptions] # @scope class attach_function :font_options_create, :cairo_font_options_create, [], FontOptions - # (Not documented) - # + # @method font_options_copy(original) - # @param [FontOptions] original - # @return [FontOptions] + # @param [FontOptions] original + # @return [FontOptions] # @scope class attach_function :font_options_copy, :cairo_font_options_copy, [FontOptions], FontOptions - # (Not documented) - # + # @method font_options_destroy(options) - # @param [FontOptions] options - # @return [nil] + # @param [FontOptions] options + # @return [nil] # @scope class attach_function :font_options_destroy, :cairo_font_options_destroy, [FontOptions], :void - # (Not documented) - # + # @method font_options_status(options) - # @param [FontOptions] options - # @return [Symbol from _enum_status_] + # @param [FontOptions] options + # @return [Symbol from _enum_status_] # @scope class attach_function :font_options_status, :cairo_font_options_status, [FontOptions], :status - # (Not documented) - # + # @method font_options_merge(options, other) - # @param [FontOptions] options - # @param [FontOptions] other - # @return [nil] + # @param [FontOptions] options + # @param [FontOptions] other + # @return [nil] # @scope class attach_function :font_options_merge, :cairo_font_options_merge, [FontOptions, FontOptions], :void - # (Not documented) - # + # @method font_options_equal(options, other) - # @param [FontOptions] options - # @param [FontOptions] other - # @return [Integer] + # @param [FontOptions] options + # @param [FontOptions] other + # @return [Integer] # @scope class attach_function :font_options_equal, :cairo_font_options_equal, [FontOptions, FontOptions], :int - # (Not documented) - # + # @method font_options_hash(options) - # @param [FontOptions] options - # @return [Integer] + # @param [FontOptions] options + # @return [Integer] # @scope class attach_function :font_options_hash, :cairo_font_options_hash, [FontOptions], :ulong - # (Not documented) - # + # @method font_options_set_antialias(options, antialias) - # @param [FontOptions] options - # @param [Symbol from _enum_antialias_] antialias - # @return [nil] + # @param [FontOptions] options + # @param [Symbol from _enum_antialias_] antialias + # @return [nil] # @scope class attach_function :font_options_set_antialias, :cairo_font_options_set_antialias, [FontOptions, :antialias], :void - # (Not documented) - # + # @method font_options_get_antialias(options) - # @param [FontOptions] options - # @return [Symbol from _enum_antialias_] + # @param [FontOptions] options + # @return [Symbol from _enum_antialias_] # @scope class attach_function :font_options_get_antialias, :cairo_font_options_get_antialias, [FontOptions], :antialias - # (Not documented) - # + # @method font_options_set_subpixel_order(options, subpixel_order) - # @param [FontOptions] options - # @param [Symbol from _enum_subpixel_order_] subpixel_order - # @return [nil] + # @param [FontOptions] options + # @param [Symbol from _enum_subpixel_order_] subpixel_order + # @return [nil] # @scope class attach_function :font_options_set_subpixel_order, :cairo_font_options_set_subpixel_order, [FontOptions, :subpixel_order], :void - # (Not documented) - # + # @method font_options_get_subpixel_order(options) - # @param [FontOptions] options - # @return [Symbol from _enum_subpixel_order_] + # @param [FontOptions] options + # @return [Symbol from _enum_subpixel_order_] # @scope class attach_function :font_options_get_subpixel_order, :cairo_font_options_get_subpixel_order, [FontOptions], :subpixel_order - # (Not documented) - # + # @method font_options_set_hint_style(options, hint_style) - # @param [FontOptions] options - # @param [Symbol from _enum_hint_style_] hint_style - # @return [nil] + # @param [FontOptions] options + # @param [Symbol from _enum_hint_style_] hint_style + # @return [nil] # @scope class attach_function :font_options_set_hint_style, :cairo_font_options_set_hint_style, [FontOptions, :hint_style], :void - # (Not documented) - # + # @method font_options_get_hint_style(options) - # @param [FontOptions] options - # @return [Symbol from _enum_hint_style_] + # @param [FontOptions] options + # @return [Symbol from _enum_hint_style_] # @scope class attach_function :font_options_get_hint_style, :cairo_font_options_get_hint_style, [FontOptions], :hint_style - # (Not documented) - # + # @method font_options_set_hint_metrics(options, hint_metrics) - # @param [FontOptions] options - # @param [Symbol from _enum_hint_metrics_] hint_metrics - # @return [nil] + # @param [FontOptions] options + # @param [Symbol from _enum_hint_metrics_] hint_metrics + # @return [nil] # @scope class attach_function :font_options_set_hint_metrics, :cairo_font_options_set_hint_metrics, [FontOptions, :hint_metrics], :void - # (Not documented) - # + # @method font_options_get_hint_metrics(options) - # @param [FontOptions] options - # @return [Symbol from _enum_hint_metrics_] + # @param [FontOptions] options + # @return [Symbol from _enum_hint_metrics_] # @scope class attach_function :font_options_get_hint_metrics, :cairo_font_options_get_hint_metrics, [FontOptions], :hint_metrics - # This interface is for dealing with text as text, not caring about the # font object inside the the cairo_t. - # + # @method select_font_face(cr, family, slant, weight) - # @param [Cairo] cr - # @param [String] family - # @param [Symbol from _enum_font_slant_] slant - # @param [Symbol from _enum_font_weight_] weight - # @return [nil] + # @param [Cairo] cr + # @param [String] family + # @param [Symbol from _enum_font_slant_] slant + # @param [Symbol from _enum_font_weight_] weight + # @return [nil] # @scope class attach_function :select_font_face, :cairo_select_font_face, [Cairo, :string, :font_slant, :font_weight], :void - # (Not documented) - # + # @method set_font_size(cr, size) - # @param [Cairo] cr - # @param [Float] size - # @return [nil] + # @param [Cairo] cr + # @param [Float] size + # @return [nil] # @scope class attach_function :set_font_size, :cairo_set_font_size, [Cairo, :double], :void - # (Not documented) - # + # @method set_font_matrix(cr, matrix) - # @param [Cairo] cr - # @param [Matrix] matrix - # @return [nil] + # @param [Cairo] cr + # @param [Matrix] matrix + # @return [nil] # @scope class attach_function :set_font_matrix, :cairo_set_font_matrix, [Cairo, Matrix], :void - # (Not documented) - # + # @method get_font_matrix(cr, matrix) - # @param [Cairo] cr - # @param [Matrix] matrix - # @return [nil] + # @param [Cairo] cr + # @param [Matrix] matrix + # @return [nil] # @scope class attach_function :get_font_matrix, :cairo_get_font_matrix, [Cairo, Matrix], :void - # (Not documented) - # + # @method set_font_options(cr, options) - # @param [Cairo] cr - # @param [FontOptions] options - # @return [nil] + # @param [Cairo] cr + # @param [FontOptions] options + # @return [nil] # @scope class attach_function :set_font_options, :cairo_set_font_options, [Cairo, FontOptions], :void - # (Not documented) - # + # @method get_font_options(cr, options) - # @param [Cairo] cr - # @param [FontOptions] options - # @return [nil] + # @param [Cairo] cr + # @param [FontOptions] options + # @return [nil] # @scope class attach_function :get_font_options, :cairo_get_font_options, [Cairo, FontOptions], :void - # (Not documented) - # + # @method set_font_face(cr, font_face) - # @param [Cairo] cr - # @param [FontFace] font_face - # @return [nil] + # @param [Cairo] cr + # @param [FontFace] font_face + # @return [nil] # @scope class attach_function :set_font_face, :cairo_set_font_face, [Cairo, FontFace], :void - # (Not documented) - # + # @method get_font_face(cr) - # @param [Cairo] cr - # @return [FontFace] + # @param [Cairo] cr + # @return [FontFace] # @scope class attach_function :get_font_face, :cairo_get_font_face, [Cairo], FontFace - # (Not documented) - # + # @method set_scaled_font(cr, scaled_font) - # @param [Cairo] cr - # @param [ScaledFont] scaled_font - # @return [nil] + # @param [Cairo] cr + # @param [ScaledFont] scaled_font + # @return [nil] # @scope class attach_function :set_scaled_font, :cairo_set_scaled_font, [Cairo, ScaledFont], :void - # (Not documented) - # + # @method get_scaled_font(cr) - # @param [Cairo] cr - # @return [ScaledFont] + # @param [Cairo] cr + # @return [ScaledFont] # @scope class attach_function :get_scaled_font, :cairo_get_scaled_font, [Cairo], ScaledFont - # (Not documented) - # + # @method show_text(cr, utf8) - # @param [Cairo] cr - # @param [String] utf8 - # @return [nil] + # @param [Cairo] cr + # @param [String] utf8 + # @return [nil] # @scope class attach_function :show_text, :cairo_show_text, [Cairo, :string], :void - # (Not documented) - # + # @method show_glyphs(cr, glyphs, num_glyphs) - # @param [Cairo] cr - # @param [GlyphT] glyphs - # @param [Integer] num_glyphs - # @return [nil] + # @param [Cairo] cr + # @param [GlyphT] glyphs + # @param [Integer] num_glyphs + # @return [nil] # @scope class attach_function :show_glyphs, :cairo_show_glyphs, [Cairo, GlyphT, :int], :void - # (Not documented) - # + # @method show_text_glyphs(cr, utf8, utf8_len, glyphs, num_glyphs, clusters, num_clusters, cluster_flags) - # @param [Cairo] cr - # @param [String] utf8 - # @param [Integer] utf8_len - # @param [GlyphT] glyphs - # @param [Integer] num_glyphs - # @param [TextClusterT] clusters - # @param [Integer] num_clusters - # @param [Symbol from _enum_text_cluster_flags_] cluster_flags - # @return [nil] + # @param [Cairo] cr + # @param [String] utf8 + # @param [Integer] utf8_len + # @param [GlyphT] glyphs + # @param [Integer] num_glyphs + # @param [TextClusterT] clusters + # @param [Integer] num_clusters + # @param [Symbol from _enum_text_cluster_flags_] cluster_flags + # @return [nil] # @scope class attach_function :show_text_glyphs, :cairo_show_text_glyphs, [Cairo, :string, :int, GlyphT, :int, TextClusterT, :int, :text_cluster_flags], :void - # (Not documented) - # + # @method text_path(cr, utf8) - # @param [Cairo] cr - # @param [String] utf8 - # @return [nil] + # @param [Cairo] cr + # @param [String] utf8 + # @return [nil] # @scope class attach_function :text_path, :cairo_text_path, [Cairo, :string], :void - # (Not documented) - # + # @method glyph_path(cr, glyphs, num_glyphs) - # @param [Cairo] cr - # @param [GlyphT] glyphs - # @param [Integer] num_glyphs - # @return [nil] + # @param [Cairo] cr + # @param [GlyphT] glyphs + # @param [Integer] num_glyphs + # @return [nil] # @scope class attach_function :glyph_path, :cairo_glyph_path, [Cairo, GlyphT, :int], :void - # (Not documented) - # + # @method text_extents(cr, utf8, extents) - # @param [Cairo] cr - # @param [String] utf8 - # @param [TextExtentsT] extents - # @return [nil] + # @param [Cairo] cr + # @param [String] utf8 + # @param [TextExtentsT] extents + # @return [nil] # @scope class attach_function :text_extents, :cairo_text_extents, [Cairo, :string, TextExtentsT], :void - # (Not documented) - # + # @method glyph_extents(cr, glyphs, num_glyphs, extents) - # @param [Cairo] cr - # @param [GlyphT] glyphs - # @param [Integer] num_glyphs - # @param [TextExtentsT] extents - # @return [nil] + # @param [Cairo] cr + # @param [GlyphT] glyphs + # @param [Integer] num_glyphs + # @param [TextExtentsT] extents + # @return [nil] # @scope class attach_function :glyph_extents, :cairo_glyph_extents, [Cairo, GlyphT, :int, TextExtentsT], :void - # (Not documented) - # + # @method font_extents(cr, extents) - # @param [Cairo] cr - # @param [FontExtentsT] extents - # @return [nil] + # @param [Cairo] cr + # @param [FontExtentsT] extents + # @return [nil] # @scope class attach_function :font_extents, :cairo_font_extents, [Cairo, FontExtentsT], :void - # Generic identifier for a font style - # + # @method font_face_reference(font_face) - # @param [FontFace] font_face - # @return [FontFace] + # @param [FontFace] font_face + # @return [FontFace] # @scope class attach_function :font_face_reference, :cairo_font_face_reference, [FontFace], FontFace - # (Not documented) - # + # @method font_face_destroy(font_face) - # @param [FontFace] font_face - # @return [nil] + # @param [FontFace] font_face + # @return [nil] # @scope class attach_function :font_face_destroy, :cairo_font_face_destroy, [FontFace], :void - # (Not documented) - # + # @method font_face_get_reference_count(font_face) - # @param [FontFace] font_face - # @return [Integer] + # @param [FontFace] font_face + # @return [Integer] # @scope class attach_function :font_face_get_reference_count, :cairo_font_face_get_reference_count, [FontFace], :uint - # (Not documented) - # + # @method font_face_status(font_face) - # @param [FontFace] font_face - # @return [Symbol from _enum_status_] + # @param [FontFace] font_face + # @return [Symbol from _enum_status_] # @scope class attach_function :font_face_status, :cairo_font_face_status, [FontFace], :status - # cairo_font_type_t: - # + # #cairo_font_type_t is used to describe the type of a given font # face or scaled font. The font types are also known as "font # backends" within cairo. - # + # The type of a font face is determined by the function used to # create it, which will generally be of the form # cairo_type_font_face_create(). The font face type can be queried # with cairo_font_face_get_type() - # + # The various #cairo_font_face_t functions can be used with a font face # of any type. - # + # The type of a scaled font is determined by the type of the font # face passed to cairo_scaled_font_create(). The scaled font type can # be queried with cairo_scaled_font_get_type() - # + # The various #cairo_scaled_font_t functions can be used with scaled # fonts of any type, but some font backends also provide # type-specific functions that must only be called with a scaled font # of the appropriate type. These functions have names that begin with # cairo_type_scaled_font() such as cairo_ft_scaled_font_lock_face(). - # + # The behavior of calling a type-specific function with a scaled font # of the wrong type is undefined. - # + # New entries may be added in future versions. - # + # Since: 1.2 - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:font_type). - # + # === Options: # :toy :: # The font was created using cairo's toy font api @@ -2871,7 +2763,7 @@ class FontOptions < FFI::Struct # The font is of type Quartz (Since: 1.6) # :user :: # The font was create using cairo's user font api (Since: 1.8) - # + # @method _enum_font_type_ # @return [Symbol] # @scope class @@ -2882,288 +2774,264 @@ class FontOptions < FFI::Struct :quartz, 3, :user, 4 ] - + # (Not documented) - # + # @method font_face_get_type(font_face) - # @param [FontFace] font_face - # @return [Symbol from _enum_font_type_] + # @param [FontFace] font_face + # @return [Symbol from _enum_font_type_] # @scope class attach_function :font_face_get_type, :cairo_font_face_get_type, [FontFace], :font_type - # (Not documented) - # + # @method font_face_get_user_data(font_face, key) - # @param [FontFace] font_face - # @param [UserDataKey] key - # @return [FFI::Pointer(*Void)] + # @param [FontFace] font_face + # @param [UserDataKey] key + # @return [FFI::Pointer(*Void)] # @scope class attach_function :font_face_get_user_data, :cairo_font_face_get_user_data, [FontFace, UserDataKey], :pointer - # (Not documented) - # + # @method font_face_set_user_data(font_face, key, user_data, destroy) - # @param [FontFace] font_face - # @param [UserDataKey] key - # @param [FFI::Pointer(*Void)] user_data - # @param [FFI::Pointer(DestroyFuncT)] destroy - # @return [Symbol from _enum_status_] + # @param [FontFace] font_face + # @param [UserDataKey] key + # @param [FFI::Pointer(*Void)] user_data + # @param [FFI::Pointer(DestroyFuncT)] destroy + # @return [Symbol from _enum_status_] # @scope class attach_function :font_face_set_user_data, :cairo_font_face_set_user_data, [FontFace, UserDataKey, :pointer, :pointer], :status - # Portable interface to general font features. - # + # @method scaled_font_create(font_face, font_matrix, ctm, options) - # @param [FontFace] font_face - # @param [Matrix] font_matrix - # @param [Matrix] ctm - # @param [FontOptions] options - # @return [ScaledFont] + # @param [FontFace] font_face + # @param [Matrix] font_matrix + # @param [Matrix] ctm + # @param [FontOptions] options + # @return [ScaledFont] # @scope class attach_function :scaled_font_create, :cairo_scaled_font_create, [FontFace, Matrix, Matrix, FontOptions], ScaledFont - # (Not documented) - # + # @method scaled_font_reference(scaled_font) - # @param [ScaledFont] scaled_font - # @return [ScaledFont] + # @param [ScaledFont] scaled_font + # @return [ScaledFont] # @scope class attach_function :scaled_font_reference, :cairo_scaled_font_reference, [ScaledFont], ScaledFont - # (Not documented) - # + # @method scaled_font_destroy(scaled_font) - # @param [ScaledFont] scaled_font - # @return [nil] + # @param [ScaledFont] scaled_font + # @return [nil] # @scope class attach_function :scaled_font_destroy, :cairo_scaled_font_destroy, [ScaledFont], :void - # (Not documented) - # + # @method scaled_font_get_reference_count(scaled_font) - # @param [ScaledFont] scaled_font - # @return [Integer] + # @param [ScaledFont] scaled_font + # @return [Integer] # @scope class attach_function :scaled_font_get_reference_count, :cairo_scaled_font_get_reference_count, [ScaledFont], :uint - # (Not documented) - # + # @method scaled_font_status(scaled_font) - # @param [ScaledFont] scaled_font - # @return [Symbol from _enum_status_] + # @param [ScaledFont] scaled_font + # @return [Symbol from _enum_status_] # @scope class attach_function :scaled_font_status, :cairo_scaled_font_status, [ScaledFont], :status - # (Not documented) - # + # @method scaled_font_get_type(scaled_font) - # @param [ScaledFont] scaled_font - # @return [Symbol from _enum_font_type_] + # @param [ScaledFont] scaled_font + # @return [Symbol from _enum_font_type_] # @scope class attach_function :scaled_font_get_type, :cairo_scaled_font_get_type, [ScaledFont], :font_type - # (Not documented) - # + # @method scaled_font_get_user_data(scaled_font, key) - # @param [ScaledFont] scaled_font - # @param [UserDataKey] key - # @return [FFI::Pointer(*Void)] + # @param [ScaledFont] scaled_font + # @param [UserDataKey] key + # @return [FFI::Pointer(*Void)] # @scope class attach_function :scaled_font_get_user_data, :cairo_scaled_font_get_user_data, [ScaledFont, UserDataKey], :pointer - # (Not documented) - # + # @method scaled_font_set_user_data(scaled_font, key, user_data, destroy) - # @param [ScaledFont] scaled_font - # @param [UserDataKey] key - # @param [FFI::Pointer(*Void)] user_data - # @param [FFI::Pointer(DestroyFuncT)] destroy - # @return [Symbol from _enum_status_] + # @param [ScaledFont] scaled_font + # @param [UserDataKey] key + # @param [FFI::Pointer(*Void)] user_data + # @param [FFI::Pointer(DestroyFuncT)] destroy + # @return [Symbol from _enum_status_] # @scope class attach_function :scaled_font_set_user_data, :cairo_scaled_font_set_user_data, [ScaledFont, UserDataKey, :pointer, :pointer], :status - # (Not documented) - # + # @method scaled_font_extents(scaled_font, extents) - # @param [ScaledFont] scaled_font - # @param [FontExtentsT] extents - # @return [nil] + # @param [ScaledFont] scaled_font + # @param [FontExtentsT] extents + # @return [nil] # @scope class attach_function :scaled_font_extents, :cairo_scaled_font_extents, [ScaledFont, FontExtentsT], :void - # (Not documented) - # + # @method scaled_font_text_extents(scaled_font, utf8, extents) - # @param [ScaledFont] scaled_font - # @param [String] utf8 - # @param [TextExtentsT] extents - # @return [nil] + # @param [ScaledFont] scaled_font + # @param [String] utf8 + # @param [TextExtentsT] extents + # @return [nil] # @scope class attach_function :scaled_font_text_extents, :cairo_scaled_font_text_extents, [ScaledFont, :string, TextExtentsT], :void - # (Not documented) - # + # @method scaled_font_glyph_extents(scaled_font, glyphs, num_glyphs, extents) - # @param [ScaledFont] scaled_font - # @param [GlyphT] glyphs - # @param [Integer] num_glyphs - # @param [TextExtentsT] extents - # @return [nil] + # @param [ScaledFont] scaled_font + # @param [GlyphT] glyphs + # @param [Integer] num_glyphs + # @param [TextExtentsT] extents + # @return [nil] # @scope class attach_function :scaled_font_glyph_extents, :cairo_scaled_font_glyph_extents, [ScaledFont, GlyphT, :int, TextExtentsT], :void - # (Not documented) - # + # @method scaled_font_text_to_glyphs(scaled_font, x, y, utf8, utf8_len, glyphs, num_glyphs, clusters, num_clusters, cluster_flags) - # @param [ScaledFont] scaled_font - # @param [Float] x - # @param [Float] y - # @param [String] utf8 - # @param [Integer] utf8_len - # @param [FFI::Pointer(**GlyphT)] glyphs - # @param [FFI::Pointer(*Int)] num_glyphs - # @param [FFI::Pointer(**TextClusterT)] clusters - # @param [FFI::Pointer(*Int)] num_clusters - # @param [FFI::Pointer(*TextClusterFlagsT)] cluster_flags - # @return [Symbol from _enum_status_] + # @param [ScaledFont] scaled_font + # @param [Float] x + # @param [Float] y + # @param [String] utf8 + # @param [Integer] utf8_len + # @param [FFI::Pointer(**GlyphT)] glyphs + # @param [FFI::Pointer(*Int)] num_glyphs + # @param [FFI::Pointer(**TextClusterT)] clusters + # @param [FFI::Pointer(*Int)] num_clusters + # @param [FFI::Pointer(*TextClusterFlagsT)] cluster_flags + # @return [Symbol from _enum_status_] # @scope class attach_function :scaled_font_text_to_glyphs, :cairo_scaled_font_text_to_glyphs, [ScaledFont, :double, :double, :string, :int, :pointer, :pointer, :pointer, :pointer, :pointer], :status - # (Not documented) - # + # @method scaled_font_get_font_face(scaled_font) - # @param [ScaledFont] scaled_font - # @return [FontFace] + # @param [ScaledFont] scaled_font + # @return [FontFace] # @scope class attach_function :scaled_font_get_font_face, :cairo_scaled_font_get_font_face, [ScaledFont], FontFace - # (Not documented) - # + # @method scaled_font_get_font_matrix(scaled_font, font_matrix) - # @param [ScaledFont] scaled_font - # @param [Matrix] font_matrix - # @return [nil] + # @param [ScaledFont] scaled_font + # @param [Matrix] font_matrix + # @return [nil] # @scope class attach_function :scaled_font_get_font_matrix, :cairo_scaled_font_get_font_matrix, [ScaledFont, Matrix], :void - # (Not documented) - # + # @method scaled_font_get_ctm(scaled_font, ctm) - # @param [ScaledFont] scaled_font - # @param [Matrix] ctm - # @return [nil] + # @param [ScaledFont] scaled_font + # @param [Matrix] ctm + # @return [nil] # @scope class attach_function :scaled_font_get_ctm, :cairo_scaled_font_get_ctm, [ScaledFont, Matrix], :void - # (Not documented) - # + # @method scaled_font_get_scale_matrix(scaled_font, scale_matrix) - # @param [ScaledFont] scaled_font - # @param [Matrix] scale_matrix - # @return [nil] + # @param [ScaledFont] scaled_font + # @param [Matrix] scale_matrix + # @return [nil] # @scope class attach_function :scaled_font_get_scale_matrix, :cairo_scaled_font_get_scale_matrix, [ScaledFont, Matrix], :void - # (Not documented) - # + # @method scaled_font_get_font_options(scaled_font, options) - # @param [ScaledFont] scaled_font - # @param [FontOptions] options - # @return [nil] + # @param [ScaledFont] scaled_font + # @param [FontOptions] options + # @return [nil] # @scope class attach_function :scaled_font_get_font_options, :cairo_scaled_font_get_font_options, [ScaledFont, FontOptions], :void - # Toy fonts - # + # @method toy_font_face_create(family, slant, weight) - # @param [String] family - # @param [Symbol from _enum_font_slant_] slant - # @param [Symbol from _enum_font_weight_] weight - # @return [FontFace] + # @param [String] family + # @param [Symbol from _enum_font_slant_] slant + # @param [Symbol from _enum_font_weight_] weight + # @return [FontFace] # @scope class attach_function :toy_font_face_create, :cairo_toy_font_face_create, [:string, :font_slant, :font_weight], FontFace - # (Not documented) - # + # @method toy_font_face_get_family(font_face) - # @param [FontFace] font_face - # @return [String] + # @param [FontFace] font_face + # @return [String] # @scope class attach_function :toy_font_face_get_family, :cairo_toy_font_face_get_family, [FontFace], :string - # (Not documented) - # + # @method toy_font_face_get_slant(font_face) - # @param [FontFace] font_face - # @return [Symbol from _enum_font_slant_] + # @param [FontFace] font_face + # @return [Symbol from _enum_font_slant_] # @scope class attach_function :toy_font_face_get_slant, :cairo_toy_font_face_get_slant, [FontFace], :font_slant - # (Not documented) - # + # @method toy_font_face_get_weight(font_face) - # @param [FontFace] font_face - # @return [Symbol from _enum_font_weight_] + # @param [FontFace] font_face + # @return [Symbol from _enum_font_weight_] # @scope class attach_function :toy_font_face_get_weight, :cairo_toy_font_face_get_weight, [FontFace], :font_weight - # User fonts - # + # @method user_font_face_create() - # @return [FontFace] + # @return [FontFace] # @scope class attach_function :user_font_face_create, :cairo_user_font_face_create, [], FontFace - # cairo_user_scaled_font_init_func_t: # @scaled_font: the scaled-font being created # @cr: a cairo context, in font space # @extents: font extents to fill in, in font space - # + # #cairo_user_scaled_font_init_func_t is the type of function which is # called when a scaled-font needs to be created for a user font-face. - # + # The cairo context @cr is not used by the caller, but is prepared in font # space, similar to what the cairo contexts passed to the render_glyph # method will look like. The callback can use this context for extents # computation for example. After the callback is called, @cr is checked # for any error status. - # + # The @extents argument is where the user font sets the font extents for # @scaled_font. It is in font space, which means that for most cases its # ascent and descent members should add to 1.0. @extents is preset to # hold a value of 1.0 for ascent, height, and max_x_advance, and 0.0 for # descent and max_y_advance members. - # + # The callback is optional. If not set, default font extents as described # in the previous paragraph will be used. - # + # Note that @scaled_font is not fully initialized at this # point and trying to use it for text operations in the callback will result # in deadlock. - # + # Returns: %CAIRO_STATUS_SUCCESS upon success, or an error status on error. - # + # Since: 1.8 - # + # This entry is only for documentation and no real method. - # - # @method _callback_user_scaled_font_init_func_t_(scaled_font, cr, extents) - # @param [ScaledFont] scaled_font - # @param [Cairo] cr - # @param [FontExtentsT] extents - # @return [Symbol from _enum_status_] - # @scope class - callback :user_scaled_font_init_func_t, [ScaledFont, Cairo, FontExtentsT], :status - + + # @method _callback_user_scaled_font_init_func_t_(status_t, scaled_font, cr, extents) + # @param [Symbol from _enum_status_] status_t + # @param [ScaledFont] scaled_font + # @param [Cairo] cr + # @param [FontExtentsT] extents + # @return [Symbol from _enum_status_] + # @scope class + callback :user_scaled_font_init_func_t, [:status, ScaledFont, Cairo, FontExtentsT], :status + # cairo_user_scaled_font_render_glyph_func_t: # @scaled_font: user scaled-font # @glyph: glyph code to render # @cr: cairo context to draw to, in font space # @extents: glyph extents to fill in, in font space - # + # #cairo_user_scaled_font_render_glyph_func_t is the type of function which # is called when a user scaled-font needs to render a glyph. - # + # The callback is mandatory, and expected to draw the glyph with code @glyph to # the cairo context @cr. @cr is prepared such that the glyph drawing is done in # font space. That is, the matrix set on @cr is the scale matrix of @scaled_font, @@ -3173,11 +3041,11 @@ class FontOptions < FFI::Struct # to @cr are permitted, however, the result is undefined if any source other # than the default source on @cr is used. That means, glyph bitmaps should # be rendered using cairo_mask() instead of cairo_paint(). - # + # Other non-default settings on @cr include a font size of 1.0 (given that # it is set up to be in font space), and font options corresponding to # @scaled_font. - # + # The @extents argument is preset to have x_bearing, # width, and y_advance of zero, # y_bearing set to -font_extents.ascent, @@ -3191,23 +3059,24 @@ class FontOptions < FFI::Struct # desired behavior is. However, if for any reason the callback sets the # extents, it must be ink extents, and include the extents of all drawing # done to @cr in the callback. - # + # Returns: %CAIRO_STATUS_SUCCESS upon success, or # %CAIRO_STATUS_USER_FONT_ERROR or any other error status on error. - # + # Since: 1.8 - # + # This entry is only for documentation and no real method. - # - # @method _callback_user_scaled_font_render_glyph_func_t_(scaled_font, glyph, cr, extents) - # @param [ScaledFont] scaled_font - # @param [Integer] glyph - # @param [Cairo] cr - # @param [TextExtentsT] extents - # @return [Symbol from _enum_status_] - # @scope class - callback :user_scaled_font_render_glyph_func_t, [ScaledFont, :ulong, Cairo, TextExtentsT], :status - + + # @method _callback_user_scaled_font_render_glyph_func_t_(status_t, scaled_font, glyph, cr, extents) + # @param [Symbol from _enum_status_] status_t + # @param [ScaledFont] scaled_font + # @param [Integer] glyph + # @param [Cairo] cr + # @param [TextExtentsT] extents + # @return [Symbol from _enum_status_] + # @scope class + callback :user_scaled_font_render_glyph_func_t, [:status, ScaledFont, :ulong, Cairo, TextExtentsT], :status + # cairo_user_scaled_font_text_to_glyphs_func_t: # @scaled_font: the scaled-font being created # @utf8: a string of text encoded in UTF-8 @@ -3218,16 +3087,16 @@ class FontOptions < FFI::Struct # @num_clusters: pointer to number of clusters # @cluster_flags: pointer to location to store cluster flags corresponding to the # output @clusters - # + # #cairo_user_scaled_font_text_to_glyphs_func_t is the type of function which # is called to convert input text to an array of glyphs. This is used by the # cairo_show_text() operation. - # + # Using this callback the user-font has full control on glyphs and their # positions. That means, it allows for features like ligatures and kerning, # as well as complex shaping required for scripts like # Arabic and Indic. - # + # The @num_glyphs argument is preset to the number of glyph entries available # in the @glyphs buffer. If the @glyphs buffer is %NULL, the value of # @num_glyphs will be zero. If the provided glyph array is too short for @@ -3238,7 +3107,7 @@ class FontOptions < FFI::Struct # allocated glyph array using cairo_glyph_free(). # The callback should populate the glyph indices and positions (in font space) # assuming that the text is to be shown at the origin. - # + # If @clusters is not %NULL, @num_clusters and @cluster_flags are also # non-%NULL, and cluster mapping should be computed. The semantics of how # cluster array allocation works is similar to the glyph array. That is, @@ -3250,12 +3119,12 @@ class FontOptions < FFI::Struct # @num_clusters should contain the number of generated clusters. # If the value @clusters points at has changed after the call, the caller # will free the allocated cluster array using cairo_text_cluster_free(). - # + # The callback is optional. If @num_glyphs is negative upon # the callback returning or if the return value # is %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED, the unicode_to_glyph callback # is tried. See #cairo_user_scaled_font_unicode_to_glyph_func_t. - # + # Note: While cairo does not impose any limitation on glyph indices, # some applications may assume that a glyph index fits in a 16-bit # unsigned integer. As such, it is advised that user-fonts keep their @@ -3263,37 +3132,38 @@ class FontOptions < FFI::Struct # assume that glyph 0 is a special glyph-not-found glyph. User-fonts # are advised to use glyph 0 for such purposes and do not use that # glyph value for other purposes. - # + # Returns: %CAIRO_STATUS_SUCCESS upon success, # %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED if fallback options should be tried, # or %CAIRO_STATUS_USER_FONT_ERROR or any other error status on error. - # + # Since: 1.8 - # + # This entry is only for documentation and no real method. - # - # @method _callback_user_scaled_font_text_to_glyphs_func_t_(scaled_font, utf8, utf8_len, glyphs, num_glyphs, clusters, num_clusters, cluster_flags) - # @param [ScaledFont] scaled_font - # @param [String] utf8 - # @param [Integer] utf8_len - # @param [FFI::Pointer(**GlyphT)] glyphs - # @param [FFI::Pointer(*Int)] num_glyphs - # @param [FFI::Pointer(**TextClusterT)] clusters - # @param [FFI::Pointer(*Int)] num_clusters - # @param [FFI::Pointer(*TextClusterFlagsT)] cluster_flags - # @return [Symbol from _enum_status_] - # @scope class - callback :user_scaled_font_text_to_glyphs_func_t, [ScaledFont, :string, :int, :pointer, :pointer, :pointer, :pointer, :pointer], :status - + + # @method _callback_user_scaled_font_text_to_glyphs_func_t_(status_t, scaled_font, utf8, utf8_len, glyphs, num_glyphs, clusters, num_clusters, cluster_flags) + # @param [Symbol from _enum_status_] status_t + # @param [ScaledFont] scaled_font + # @param [String] utf8 + # @param [Integer] utf8_len + # @param [FFI::Pointer(**GlyphT)] glyphs + # @param [FFI::Pointer(*Int)] num_glyphs + # @param [FFI::Pointer(**TextClusterT)] clusters + # @param [FFI::Pointer(*Int)] num_clusters + # @param [FFI::Pointer(*TextClusterFlagsT)] cluster_flags + # @return [Symbol from _enum_status_] + # @scope class + callback :user_scaled_font_text_to_glyphs_func_t, [:status, ScaledFont, :string, :int, :pointer, :pointer, :pointer, :pointer, :pointer], :status + # cairo_user_scaled_font_unicode_to_glyph_func_t: # @scaled_font: the scaled-font being created # @unicode: input unicode character code-point # @glyph_index: output glyph index - # + # #cairo_user_scaled_font_unicode_to_glyph_func_t is the type of function which # is called to convert an input Unicode character to a single glyph. # This is used by the cairo_show_text() operation. - # + # This callback is used to provide the same functionality as the # text_to_glyphs callback does (see #cairo_user_scaled_font_text_to_glyphs_func_t) # but has much less control on the output, @@ -3302,12 +3172,12 @@ class FontOptions < FFI::Struct # mapping is context independent. It also assumes that glyphs are positioned # according to their advance width. These mean no ligatures, kerning, or # complex scripts can be implemented using this callback. - # + # The callback is optional, and only used if text_to_glyphs callback is not # set or fails to return glyphs. If this callback is not set or if it returns # %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED, an identity mapping from Unicode # code-points to glyph indices is assumed. - # + # Note: While cairo does not impose any limitation on glyph indices, # some applications may assume that a glyph index fits in a 16-bit # unsigned integer. As such, it is advised that user-fonts keep their @@ -3315,232 +3185,209 @@ class FontOptions < FFI::Struct # assume that glyph 0 is a special glyph-not-found glyph. User-fonts # are advised to use glyph 0 for such purposes and do not use that # glyph value for other purposes. - # + # Returns: %CAIRO_STATUS_SUCCESS upon success, # %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED if fallback options should be tried, # or %CAIRO_STATUS_USER_FONT_ERROR or any other error status on error. - # + # Since: 1.8 - # + # This entry is only for documentation and no real method. - # - # @method _callback_user_scaled_font_unicode_to_glyph_func_t_(scaled_font, unicode, glyph_index) - # @param [ScaledFont] scaled_font - # @param [Integer] unicode - # @param [FFI::Pointer(*ULong)] glyph_index - # @return [Symbol from _enum_status_] - # @scope class - callback :user_scaled_font_unicode_to_glyph_func_t, [ScaledFont, :ulong, :pointer], :status - + + # @method _callback_user_scaled_font_unicode_to_glyph_func_t_(status_t, scaled_font, unicode, glyph_index) + # @param [Symbol from _enum_status_] status_t + # @param [ScaledFont] scaled_font + # @param [Integer] unicode + # @param [FFI::Pointer(*ULong)] glyph_index + # @return [Symbol from _enum_status_] + # @scope class + callback :user_scaled_font_unicode_to_glyph_func_t, [:status, ScaledFont, :ulong, :pointer], :status + # User-font method setters - # + # @method user_font_face_set_init_func(font_face, init_func) - # @param [FontFace] font_face - # @param [Proc(_callback_user_scaled_font_init_func_t_)] init_func - # @return [nil] + # @param [FontFace] font_face + # @param [FFI::Pointer(UserScaledFontInitFuncT)] init_func + # @return [nil] # @scope class - attach_function :user_font_face_set_init_func, :cairo_user_font_face_set_init_func, [FontFace, :user_scaled_font_init_func_t], :void - + attach_function :user_font_face_set_init_func, :cairo_user_font_face_set_init_func, [FontFace, :pointer], :void # (Not documented) - # + # @method user_font_face_set_render_glyph_func(font_face, render_glyph_func) - # @param [FontFace] font_face - # @param [Proc(_callback_user_scaled_font_render_glyph_func_t_)] render_glyph_func - # @return [nil] + # @param [FontFace] font_face + # @param [FFI::Pointer(UserScaledFontRenderGlyphFuncT)] render_glyph_func + # @return [nil] # @scope class - attach_function :user_font_face_set_render_glyph_func, :cairo_user_font_face_set_render_glyph_func, [FontFace, :user_scaled_font_render_glyph_func_t], :void - + attach_function :user_font_face_set_render_glyph_func, :cairo_user_font_face_set_render_glyph_func, [FontFace, :pointer], :void # (Not documented) - # + # @method user_font_face_set_text_to_glyphs_func(font_face, text_to_glyphs_func) - # @param [FontFace] font_face - # @param [Proc(_callback_user_scaled_font_text_to_glyphs_func_t_)] text_to_glyphs_func - # @return [nil] + # @param [FontFace] font_face + # @param [FFI::Pointer(UserScaledFontTextToGlyphsFuncT)] text_to_glyphs_func + # @return [nil] # @scope class - attach_function :user_font_face_set_text_to_glyphs_func, :cairo_user_font_face_set_text_to_glyphs_func, [FontFace, :user_scaled_font_text_to_glyphs_func_t], :void - + attach_function :user_font_face_set_text_to_glyphs_func, :cairo_user_font_face_set_text_to_glyphs_func, [FontFace, :pointer], :void # (Not documented) - # + # @method user_font_face_set_unicode_to_glyph_func(font_face, unicode_to_glyph_func) - # @param [FontFace] font_face - # @param [Proc(_callback_user_scaled_font_unicode_to_glyph_func_t_)] unicode_to_glyph_func - # @return [nil] + # @param [FontFace] font_face + # @param [FFI::Pointer(UserScaledFontUnicodeToGlyphFuncT)] unicode_to_glyph_func + # @return [nil] # @scope class - attach_function :user_font_face_set_unicode_to_glyph_func, :cairo_user_font_face_set_unicode_to_glyph_func, [FontFace, :user_scaled_font_unicode_to_glyph_func_t], :void - + attach_function :user_font_face_set_unicode_to_glyph_func, :cairo_user_font_face_set_unicode_to_glyph_func, [FontFace, :pointer], :void # User-font method getters - # + # @method user_font_face_get_init_func(font_face) - # @param [FontFace] font_face - # @return [Proc(_callback_user_scaled_font_init_func_t_)] + # @param [FontFace] font_face + # @return [FFI::Pointer(UserScaledFontInitFuncT)] # @scope class - attach_function :user_font_face_get_init_func, :cairo_user_font_face_get_init_func, [FontFace], :user_scaled_font_init_func_t - + attach_function :user_font_face_get_init_func, :cairo_user_font_face_get_init_func, [FontFace], :pointer # (Not documented) - # + # @method user_font_face_get_render_glyph_func(font_face) - # @param [FontFace] font_face - # @return [Proc(_callback_user_scaled_font_render_glyph_func_t_)] + # @param [FontFace] font_face + # @return [FFI::Pointer(UserScaledFontRenderGlyphFuncT)] # @scope class - attach_function :user_font_face_get_render_glyph_func, :cairo_user_font_face_get_render_glyph_func, [FontFace], :user_scaled_font_render_glyph_func_t - + attach_function :user_font_face_get_render_glyph_func, :cairo_user_font_face_get_render_glyph_func, [FontFace], :pointer # (Not documented) - # + # @method user_font_face_get_text_to_glyphs_func(font_face) - # @param [FontFace] font_face - # @return [Proc(_callback_user_scaled_font_text_to_glyphs_func_t_)] + # @param [FontFace] font_face + # @return [FFI::Pointer(UserScaledFontTextToGlyphsFuncT)] # @scope class - attach_function :user_font_face_get_text_to_glyphs_func, :cairo_user_font_face_get_text_to_glyphs_func, [FontFace], :user_scaled_font_text_to_glyphs_func_t - + attach_function :user_font_face_get_text_to_glyphs_func, :cairo_user_font_face_get_text_to_glyphs_func, [FontFace], :pointer # (Not documented) - # + # @method user_font_face_get_unicode_to_glyph_func(font_face) - # @param [FontFace] font_face - # @return [Proc(_callback_user_scaled_font_unicode_to_glyph_func_t_)] + # @param [FontFace] font_face + # @return [FFI::Pointer(UserScaledFontUnicodeToGlyphFuncT)] # @scope class - attach_function :user_font_face_get_unicode_to_glyph_func, :cairo_user_font_face_get_unicode_to_glyph_func, [FontFace], :user_scaled_font_unicode_to_glyph_func_t - + attach_function :user_font_face_get_unicode_to_glyph_func, :cairo_user_font_face_get_unicode_to_glyph_func, [FontFace], :pointer # Query functions - # + # @method get_operator(cr) - # @param [Cairo] cr - # @return [Symbol from _enum_operator_] + # @param [Cairo] cr + # @return [Symbol from _enum_operator_] # @scope class attach_function :get_operator, :cairo_get_operator, [Cairo], :operator - # (Not documented) - # + # @method get_source(cr) - # @param [Cairo] cr - # @return [Pattern] + # @param [Cairo] cr + # @return [Pattern] # @scope class attach_function :get_source, :cairo_get_source, [Cairo], Pattern - # (Not documented) - # + # @method get_tolerance(cr) - # @param [Cairo] cr - # @return [Float] + # @param [Cairo] cr + # @return [Float] # @scope class attach_function :get_tolerance, :cairo_get_tolerance, [Cairo], :double - # (Not documented) - # + # @method get_antialias(cr) - # @param [Cairo] cr - # @return [Symbol from _enum_antialias_] + # @param [Cairo] cr + # @return [Symbol from _enum_antialias_] # @scope class attach_function :get_antialias, :cairo_get_antialias, [Cairo], :antialias - # (Not documented) - # + # @method has_current_point(cr) - # @param [Cairo] cr - # @return [Integer] + # @param [Cairo] cr + # @return [Integer] # @scope class attach_function :has_current_point, :cairo_has_current_point, [Cairo], :int - # (Not documented) - # + # @method get_current_point(cr, x, y) - # @param [Cairo] cr - # @param [FFI::Pointer(*Double)] x - # @param [FFI::Pointer(*Double)] y - # @return [nil] + # @param [Cairo] cr + # @param [FFI::Pointer(*Double)] x + # @param [FFI::Pointer(*Double)] y + # @return [nil] # @scope class attach_function :get_current_point, :cairo_get_current_point, [Cairo, :pointer, :pointer], :void - # (Not documented) - # + # @method get_fill_rule(cr) - # @param [Cairo] cr - # @return [Symbol from _enum_fill_rule_] + # @param [Cairo] cr + # @return [Symbol from _enum_fill_rule_] # @scope class attach_function :get_fill_rule, :cairo_get_fill_rule, [Cairo], :fill_rule - # (Not documented) - # + # @method get_line_width(cr) - # @param [Cairo] cr - # @return [Float] + # @param [Cairo] cr + # @return [Float] # @scope class attach_function :get_line_width, :cairo_get_line_width, [Cairo], :double - # (Not documented) - # + # @method get_line_cap(cr) - # @param [Cairo] cr - # @return [Symbol from _enum_line_cap_] + # @param [Cairo] cr + # @return [Symbol from _enum_line_cap_] # @scope class attach_function :get_line_cap, :cairo_get_line_cap, [Cairo], :line_cap - # (Not documented) - # + # @method get_line_join(cr) - # @param [Cairo] cr - # @return [Symbol from _enum_line_join_] + # @param [Cairo] cr + # @return [Symbol from _enum_line_join_] # @scope class attach_function :get_line_join, :cairo_get_line_join, [Cairo], :line_join - # (Not documented) - # + # @method get_miter_limit(cr) - # @param [Cairo] cr - # @return [Float] + # @param [Cairo] cr + # @return [Float] # @scope class attach_function :get_miter_limit, :cairo_get_miter_limit, [Cairo], :double - # (Not documented) - # + # @method get_dash_count(cr) - # @param [Cairo] cr - # @return [Integer] + # @param [Cairo] cr + # @return [Integer] # @scope class attach_function :get_dash_count, :cairo_get_dash_count, [Cairo], :int - # (Not documented) - # + # @method get_dash(cr, dashes, offset) - # @param [Cairo] cr - # @param [FFI::Pointer(*Double)] dashes - # @param [FFI::Pointer(*Double)] offset - # @return [nil] + # @param [Cairo] cr + # @param [FFI::Pointer(*Double)] dashes + # @param [FFI::Pointer(*Double)] offset + # @return [nil] # @scope class attach_function :get_dash, :cairo_get_dash, [Cairo, :pointer, :pointer], :void - # (Not documented) - # + # @method get_matrix(cr, matrix) - # @param [Cairo] cr - # @param [Matrix] matrix - # @return [nil] + # @param [Cairo] cr + # @param [Matrix] matrix + # @return [nil] # @scope class attach_function :get_matrix, :cairo_get_matrix, [Cairo, Matrix], :void - # (Not documented) - # + # @method get_target(cr) - # @param [Cairo] cr - # @return [Surface] + # @param [Cairo] cr + # @return [Surface] # @scope class attach_function :get_target, :cairo_get_target, [Cairo], Surface - # (Not documented) - # + # @method get_group_target(cr) - # @param [Cairo] cr - # @return [Surface] + # @param [Cairo] cr + # @return [Surface] # @scope class attach_function :get_group_target, :cairo_get_group_target, [Cairo], Surface - # cairo_path_data_type_t: - # + # #cairo_path_data_t is used to describe the type of one portion # of a path when represented as a #cairo_path_t. # See #cairo_path_data_t for details. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:path_data_type). - # + # === Options: # :move_to :: # A move-to operation @@ -3550,7 +3397,7 @@ class FontOptions < FFI::Struct # A curve-to operation # :close_path :: # A close-path operation - # + # @method _enum_path_data_type_ # @return [Symbol] # @scope class @@ -3560,59 +3407,59 @@ class FontOptions < FFI::Struct :curve_to, 2, :close_path, 3 ] - + # (Not documented) - # + # = Fields: # :type :: - # (Symbol from _enum_path_data_type_) + # (Symbol from _enum_path_data_type_) # :length :: - # (Integer) - class PathDataTHeader < FFI::Struct + # (Integer) + class PathDataT1212550491 < FFI::Struct layout :type, :path_data_type, :length, :int end - + # (Not documented) - # + # = Fields: # :x :: - # (Float) + # (Float) # :y :: - # (Float) - class PathDataTPoint < FFI::Struct + # (Float) + class PathDataT2575611410 < FFI::Struct layout :x, :double, :y, :double end - + # cairo_path_data_t: - # + # #cairo_path_data_t is used to represent the path data inside a # #cairo_path_t. - # + # The data structure is designed to try to balance the demands of # efficiency and ease-of-use. A path is represented as an array of # #cairo_path_data_t, which is a union of headers and points. - # + # Each portion of the path is represented by one or more elements in # the array, (one header followed by 0 or more points). The length # value of the header is the number of array elements for the current # portion including the header, (ie. length == 1 + # of points), and # where the number of points for each element type is as follows: - # + # # %CAIRO_PATH_MOVE_TO: 1 point # %CAIRO_PATH_LINE_TO: 1 point # %CAIRO_PATH_CURVE_TO: 3 points # %CAIRO_PATH_CLOSE_PATH: 0 points # - # + # The semantics and ordering of the coordinate values are consistent # with cairo_move_to(), cairo_line_to(), cairo_curve_to(), and # cairo_close_path(). - # + # Here is sample code for iterating through a #cairo_path_t: - # + # # int i; # cairo_path_t *path; @@ -3641,7 +3488,7 @@ class PathDataTPoint < FFI::Struct # } # cairo_path_destroy (path); # - # + # As of cairo 1.4, cairo does not mind if there are more elements in # a portion of the path than needed. Such elements can be used by # users of the cairo API to hold extra values in the path data @@ -3649,135 +3496,128 @@ class PathDataTPoint < FFI::Struct # always use data->header.length to # iterate over the path data, instead of hardcoding the number of # elements for each element type. - # + # = Fields: # :header :: - # (PathDataTHeader) + # (PathDataT1212550491) # :point :: - # (PathDataTPoint) + # (PathDataT2575611410) class PathDataT < FFI::Union - layout :header, PathDataTHeader.by_value, - :point, PathDataTPoint.by_value + layout :header, PathDataT1212550491.by_value, + :point, PathDataT2575611410.by_value end - + # cairo_path_t: # @status: the current error status # @data: the elements in the path # @num_data: the number of elements in the data array - # + # A data structure for holding a path. This data structure serves as # the return value for cairo_copy_path() and # cairo_copy_path_flat() as well the input value for # cairo_append_path(). - # + # See #cairo_path_data_t for hints on how to iterate over the # actual data within the path. - # + # The num_data member gives the number of elements in the data # array. This number is larger than the number of independent path # portions (defined in #cairo_path_data_type_t), since the data # includes both headers and coordinates for each portion. - # + # = Fields: # :status :: - # (Symbol from _enum_status_) + # (Symbol from _enum_status_) # :data :: - # (PathDataT) + # (PathDataT) # :num_data :: - # (Integer) + # (Integer) module PathWrappers - # @return [nil] + # @return [nil] def destroy() Cairo.path_destroy(self) end end - + class Path < FFI::Struct include PathWrappers layout :status, :status, :data, PathDataT, :num_data, :int end - + # (Not documented) - # + # @method copy_path(cr) - # @param [Cairo] cr - # @return [Path] + # @param [Cairo] cr + # @return [Path] # @scope class attach_function :copy_path, :cairo_copy_path, [Cairo], Path - # (Not documented) - # + # @method copy_path_flat(cr) - # @param [Cairo] cr - # @return [Path] + # @param [Cairo] cr + # @return [Path] # @scope class attach_function :copy_path_flat, :cairo_copy_path_flat, [Cairo], Path - # (Not documented) - # + # @method append_path(cr, path) - # @param [Cairo] cr - # @param [Path] path - # @return [nil] + # @param [Cairo] cr + # @param [Path] path + # @return [nil] # @scope class attach_function :append_path, :cairo_append_path, [Cairo, Path], :void - # (Not documented) - # + # @method path_destroy(path) - # @param [Path] path - # @return [nil] + # @param [Path] path + # @return [nil] # @scope class attach_function :path_destroy, :cairo_path_destroy, [Path], :void - # Error status queries - # + # @method status(cr) - # @param [Cairo] cr - # @return [Symbol from _enum_status_] + # @param [Cairo] cr + # @return [Symbol from _enum_status_] # @scope class attach_function :status, :cairo_status, [Cairo], :status - # (Not documented) - # + # @method status_to_string(status) - # @param [Symbol from _enum_status_] status - # @return [String] + # @param [Symbol from _enum_status_] status + # @return [String] # @scope class attach_function :status_to_string, :cairo_status_to_string, [:status], :string - # Backend device manipulation - # + # @method device_reference(device) - # @param [Device] device - # @return [Device] + # @param [Device] device + # @return [Device] # @scope class attach_function :device_reference, :cairo_device_reference, [Device], Device - # cairo_device_type_t: - # + # #cairo_device_type_t is used to describe the type of a given # device. The devices types are also known as "backends" within cairo. - # + # The device type can be queried with cairo_device_get_type() - # + # The various #cairo_device_t functions can be used with surfaces of # any type, but some backends also provide type-specific functions # that must only be called with a device of the appropriate # type. These functions have names that begin with # cairo_type_device such as cairo_xcb_device_debug_set_render_version(). - # + # The behavior of calling a type-specific function with a surface of # the wrong type is undefined. - # + # New entries may be added in future versions. - # + # Since: 1.10 - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:device_type). - # + # === Options: # :drm :: # The surface is of type Direct Render Manager @@ -3792,7 +3632,7 @@ class Path < FFI::Struct # :xml :: # The surface is of type XML # cairo_surface_create_for_rectangle() - # + # @method _enum_device_type_ # @return [Symbol] # @scope class @@ -3804,189 +3644,171 @@ class Path < FFI::Struct :xlib, 4, :xml, 5 ] - + # (Not documented) - # + # @method device_get_type(device) - # @param [Device] device - # @return [Symbol from _enum_device_type_] + # @param [Device] device + # @return [Symbol from _enum_device_type_] # @scope class attach_function :device_get_type, :cairo_device_get_type, [Device], :device_type - # (Not documented) - # + # @method device_status(device) - # @param [Device] device - # @return [Symbol from _enum_status_] + # @param [Device] device + # @return [Symbol from _enum_status_] # @scope class attach_function :device_status, :cairo_device_status, [Device], :status - # (Not documented) - # + # @method device_acquire(device) - # @param [Device] device - # @return [Symbol from _enum_status_] + # @param [Device] device + # @return [Symbol from _enum_status_] # @scope class attach_function :device_acquire, :cairo_device_acquire, [Device], :status - # (Not documented) - # + # @method device_release(device) - # @param [Device] device - # @return [nil] + # @param [Device] device + # @return [nil] # @scope class attach_function :device_release, :cairo_device_release, [Device], :void - # (Not documented) - # + # @method device_flush(device) - # @param [Device] device - # @return [nil] + # @param [Device] device + # @return [nil] # @scope class attach_function :device_flush, :cairo_device_flush, [Device], :void - # (Not documented) - # + # @method device_finish(device) - # @param [Device] device - # @return [nil] + # @param [Device] device + # @return [nil] # @scope class attach_function :device_finish, :cairo_device_finish, [Device], :void - # (Not documented) - # + # @method device_destroy(device) - # @param [Device] device - # @return [nil] + # @param [Device] device + # @return [nil] # @scope class attach_function :device_destroy, :cairo_device_destroy, [Device], :void - # (Not documented) - # + # @method device_get_reference_count(device) - # @param [Device] device - # @return [Integer] + # @param [Device] device + # @return [Integer] # @scope class attach_function :device_get_reference_count, :cairo_device_get_reference_count, [Device], :uint - # (Not documented) - # + # @method device_get_user_data(device, key) - # @param [Device] device - # @param [UserDataKey] key - # @return [FFI::Pointer(*Void)] + # @param [Device] device + # @param [UserDataKey] key + # @return [FFI::Pointer(*Void)] # @scope class attach_function :device_get_user_data, :cairo_device_get_user_data, [Device, UserDataKey], :pointer - # (Not documented) - # + # @method device_set_user_data(device, key, user_data, destroy) - # @param [Device] device - # @param [UserDataKey] key - # @param [FFI::Pointer(*Void)] user_data - # @param [FFI::Pointer(DestroyFuncT)] destroy - # @return [Symbol from _enum_status_] + # @param [Device] device + # @param [UserDataKey] key + # @param [FFI::Pointer(*Void)] user_data + # @param [FFI::Pointer(DestroyFuncT)] destroy + # @return [Symbol from _enum_status_] # @scope class attach_function :device_set_user_data, :cairo_device_set_user_data, [Device, UserDataKey, :pointer, :pointer], :status - # Surface manipulation - # + # @method surface_create_similar(other, content, width, height) - # @param [Surface] other - # @param [Symbol from _enum_content_] content - # @param [Integer] width - # @param [Integer] height - # @return [Surface] + # @param [Surface] other + # @param [Symbol from _enum_content_] content + # @param [Integer] width + # @param [Integer] height + # @return [Surface] # @scope class attach_function :surface_create_similar, :cairo_surface_create_similar, [Surface, :content, :int, :int], Surface - # (Not documented) - # + # @method surface_create_for_rectangle(target, x, y, width, height) - # @param [Surface] target - # @param [Float] x - # @param [Float] y - # @param [Float] width - # @param [Float] height - # @return [Surface] + # @param [Surface] target + # @param [Float] x + # @param [Float] y + # @param [Float] width + # @param [Float] height + # @return [Surface] # @scope class attach_function :surface_create_for_rectangle, :cairo_surface_create_for_rectangle, [Surface, :double, :double, :double, :double], Surface - # (Not documented) - # + # @method surface_reference(surface) - # @param [Surface] surface - # @return [Surface] + # @param [Surface] surface + # @return [Surface] # @scope class attach_function :surface_reference, :cairo_surface_reference, [Surface], Surface - # (Not documented) - # + # @method surface_finish(surface) - # @param [Surface] surface - # @return [nil] + # @param [Surface] surface + # @return [nil] # @scope class attach_function :surface_finish, :cairo_surface_finish, [Surface], :void - # (Not documented) - # + # @method surface_destroy(surface) - # @param [Surface] surface - # @return [nil] + # @param [Surface] surface + # @return [nil] # @scope class attach_function :surface_destroy, :cairo_surface_destroy, [Surface], :void - # (Not documented) - # + # @method surface_get_device(surface) - # @param [Surface] surface - # @return [Device] + # @param [Surface] surface + # @return [Device] # @scope class attach_function :surface_get_device, :cairo_surface_get_device, [Surface], Device - # (Not documented) - # + # @method surface_get_reference_count(surface) - # @param [Surface] surface - # @return [Integer] + # @param [Surface] surface + # @return [Integer] # @scope class attach_function :surface_get_reference_count, :cairo_surface_get_reference_count, [Surface], :uint - # (Not documented) - # + # @method surface_status(surface) - # @param [Surface] surface - # @return [Symbol from _enum_status_] + # @param [Surface] surface + # @return [Symbol from _enum_status_] # @scope class attach_function :surface_status, :cairo_surface_status, [Surface], :status - # cairo_surface_type_t: - # + # #cairo_surface_type_t is used to describe the type of a given # surface. The surface types are also known as "backends" or "surface # backends" within cairo. - # + # The type of a surface is determined by the function used to create # it, which will generally be of the form cairo_type_surface_create(), # (though see cairo_surface_create_similar() as well). - # + # The surface type can be queried with cairo_surface_get_type() - # + # The various #cairo_surface_t functions can be used with surfaces of # any type, but some backends also provide type-specific functions # that must only be called with a surface of the appropriate # type. These functions have names that begin with # cairo_type_surface such as cairo_image_surface_get_width(). - # + # The behavior of calling a type-specific function with a surface of # the wrong type is undefined. - # + # New entries may be added in future versions. - # + # Since: 1.2 - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:surface_type). - # + # === Options: # :image :: # The surface is of type image @@ -4037,7 +3859,7 @@ class Path < FFI::Struct # :subsurface :: # The surface is a subsurface created with # cairo_surface_create_for_rectangle(), since 1.10 - # + # @method _enum_surface_type_ # @return [Symbol] # @scope class @@ -4067,196 +3889,177 @@ class Path < FFI::Struct :skia, 22, :subsurface, 23 ] - + # (Not documented) - # + # @method surface_get_type(surface) - # @param [Surface] surface - # @return [Symbol from _enum_surface_type_] + # @param [Surface] surface + # @return [Symbol from _enum_surface_type_] # @scope class attach_function :surface_get_type, :cairo_surface_get_type, [Surface], :surface_type - # (Not documented) - # + # @method surface_get_content(surface) - # @param [Surface] surface - # @return [Symbol from _enum_content_] + # @param [Surface] surface + # @return [Symbol from _enum_content_] # @scope class attach_function :surface_get_content, :cairo_surface_get_content, [Surface], :content - # (Not documented) - # + # @method surface_write_to_png(surface, filename) - # @param [Surface] surface - # @param [String] filename - # @return [Symbol from _enum_status_] + # @param [Surface] surface + # @param [String] filename + # @return [Symbol from _enum_status_] # @scope class attach_function :surface_write_to_png, :cairo_surface_write_to_png, [Surface, :string], :status - # (Not documented) - # + # @method surface_write_to_png_stream(surface, write_func, closure) - # @param [Surface] surface - # @param [Proc(_callback_write_func_t_)] write_func - # @param [FFI::Pointer(*Void)] closure - # @return [Symbol from _enum_status_] + # @param [Surface] surface + # @param [FFI::Pointer(WriteFuncT)] write_func + # @param [FFI::Pointer(*Void)] closure + # @return [Symbol from _enum_status_] # @scope class - attach_function :surface_write_to_png_stream, :cairo_surface_write_to_png_stream, [Surface, :write_func_t, :pointer], :status - + attach_function :surface_write_to_png_stream, :cairo_surface_write_to_png_stream, [Surface, :pointer, :pointer], :status # (Not documented) - # + # @method surface_get_user_data(surface, key) - # @param [Surface] surface - # @param [UserDataKey] key - # @return [FFI::Pointer(*Void)] + # @param [Surface] surface + # @param [UserDataKey] key + # @return [FFI::Pointer(*Void)] # @scope class attach_function :surface_get_user_data, :cairo_surface_get_user_data, [Surface, UserDataKey], :pointer - # (Not documented) - # + # @method surface_set_user_data(surface, key, user_data, destroy) - # @param [Surface] surface - # @param [UserDataKey] key - # @param [FFI::Pointer(*Void)] user_data - # @param [FFI::Pointer(DestroyFuncT)] destroy - # @return [Symbol from _enum_status_] + # @param [Surface] surface + # @param [UserDataKey] key + # @param [FFI::Pointer(*Void)] user_data + # @param [FFI::Pointer(DestroyFuncT)] destroy + # @return [Symbol from _enum_status_] # @scope class attach_function :surface_set_user_data, :cairo_surface_set_user_data, [Surface, UserDataKey, :pointer, :pointer], :status - # (Not documented) - # + # @method surface_get_mime_data(surface, mime_type, data, length) - # @param [Surface] surface - # @param [String] mime_type - # @param [FFI::Pointer(**UChar)] data - # @param [FFI::Pointer(*ULong)] length - # @return [nil] + # @param [Surface] surface + # @param [String] mime_type + # @param [FFI::Pointer(**UChar)] data + # @param [FFI::Pointer(*ULong)] length + # @return [nil] # @scope class attach_function :surface_get_mime_data, :cairo_surface_get_mime_data, [Surface, :string, :pointer, :pointer], :void - # (Not documented) - # + # @method surface_set_mime_data(surface, mime_type, data, length, destroy, closure) - # @param [Surface] surface - # @param [String] mime_type - # @param [FFI::Pointer(*UChar)] data - # @param [Integer] length - # @param [FFI::Pointer(DestroyFuncT)] destroy - # @param [FFI::Pointer(*Void)] closure - # @return [Symbol from _enum_status_] + # @param [Surface] surface + # @param [String] mime_type + # @param [FFI::Pointer(*UChar)] data + # @param [Integer] length + # @param [FFI::Pointer(DestroyFuncT)] destroy + # @param [FFI::Pointer(*Void)] closure + # @return [Symbol from _enum_status_] # @scope class attach_function :surface_set_mime_data, :cairo_surface_set_mime_data, [Surface, :string, :pointer, :ulong, :pointer, :pointer], :status - # (Not documented) - # + # @method surface_get_font_options(surface, options) - # @param [Surface] surface - # @param [FontOptions] options - # @return [nil] + # @param [Surface] surface + # @param [FontOptions] options + # @return [nil] # @scope class attach_function :surface_get_font_options, :cairo_surface_get_font_options, [Surface, FontOptions], :void - # (Not documented) - # + # @method surface_flush(surface) - # @param [Surface] surface - # @return [nil] + # @param [Surface] surface + # @return [nil] # @scope class attach_function :surface_flush, :cairo_surface_flush, [Surface], :void - # (Not documented) - # + # @method surface_mark_dirty(surface) - # @param [Surface] surface - # @return [nil] + # @param [Surface] surface + # @return [nil] # @scope class attach_function :surface_mark_dirty, :cairo_surface_mark_dirty, [Surface], :void - # (Not documented) - # + # @method surface_mark_dirty_rectangle(surface, x, y, width, height) - # @param [Surface] surface - # @param [Integer] x - # @param [Integer] y - # @param [Integer] width - # @param [Integer] height - # @return [nil] + # @param [Surface] surface + # @param [Integer] x + # @param [Integer] y + # @param [Integer] width + # @param [Integer] height + # @return [nil] # @scope class attach_function :surface_mark_dirty_rectangle, :cairo_surface_mark_dirty_rectangle, [Surface, :int, :int, :int, :int], :void - # (Not documented) - # + # @method surface_set_device_offset(surface, x_offset, y_offset) - # @param [Surface] surface - # @param [Float] x_offset - # @param [Float] y_offset - # @return [nil] + # @param [Surface] surface + # @param [Float] x_offset + # @param [Float] y_offset + # @return [nil] # @scope class attach_function :surface_set_device_offset, :cairo_surface_set_device_offset, [Surface, :double, :double], :void - # (Not documented) - # + # @method surface_get_device_offset(surface, x_offset, y_offset) - # @param [Surface] surface - # @param [FFI::Pointer(*Double)] x_offset - # @param [FFI::Pointer(*Double)] y_offset - # @return [nil] + # @param [Surface] surface + # @param [FFI::Pointer(*Double)] x_offset + # @param [FFI::Pointer(*Double)] y_offset + # @return [nil] # @scope class attach_function :surface_get_device_offset, :cairo_surface_get_device_offset, [Surface, :pointer, :pointer], :void - # (Not documented) - # + # @method surface_set_fallback_resolution(surface, x_pixels_per_inch, y_pixels_per_inch) - # @param [Surface] surface - # @param [Float] x_pixels_per_inch - # @param [Float] y_pixels_per_inch - # @return [nil] + # @param [Surface] surface + # @param [Float] x_pixels_per_inch + # @param [Float] y_pixels_per_inch + # @return [nil] # @scope class attach_function :surface_set_fallback_resolution, :cairo_surface_set_fallback_resolution, [Surface, :double, :double], :void - # (Not documented) - # + # @method surface_get_fallback_resolution(surface, x_pixels_per_inch, y_pixels_per_inch) - # @param [Surface] surface - # @param [FFI::Pointer(*Double)] x_pixels_per_inch - # @param [FFI::Pointer(*Double)] y_pixels_per_inch - # @return [nil] + # @param [Surface] surface + # @param [FFI::Pointer(*Double)] x_pixels_per_inch + # @param [FFI::Pointer(*Double)] y_pixels_per_inch + # @return [nil] # @scope class attach_function :surface_get_fallback_resolution, :cairo_surface_get_fallback_resolution, [Surface, :pointer, :pointer], :void - # (Not documented) - # + # @method surface_copy_page(surface) - # @param [Surface] surface - # @return [nil] + # @param [Surface] surface + # @return [nil] # @scope class attach_function :surface_copy_page, :cairo_surface_copy_page, [Surface], :void - # (Not documented) - # + # @method surface_show_page(surface) - # @param [Surface] surface - # @return [nil] + # @param [Surface] surface + # @return [nil] # @scope class attach_function :surface_show_page, :cairo_surface_show_page, [Surface], :void - # (Not documented) - # + # @method surface_has_show_text_glyphs(surface) - # @param [Surface] surface - # @return [Integer] + # @param [Surface] surface + # @return [Integer] # @scope class attach_function :surface_has_show_text_glyphs, :cairo_surface_has_show_text_glyphs, [Surface], :int - # cairo_format_t: - # + # #cairo_format_t is used to identify the memory format of # image data. - # + # New entries may be added in future versions. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:format). - # + # === Options: # :invalid :: # no such format exists or is supported. @@ -4284,7 +4087,7 @@ class Path < FFI::Struct # each pixel is a 16-bit quantity # with red in the upper 5 bits, then green in the middle # 6 bits, and blue in the lower 5 bits. - # + # @method _enum_format_ # @return [Symbol] # @scope class @@ -4296,233 +4099,210 @@ class Path < FFI::Struct :a1, 3, :rgb16_565, 4 ] - + # (Not documented) - # + # @method image_surface_create(format, width, height) - # @param [Symbol from _enum_format_] format - # @param [Integer] width - # @param [Integer] height - # @return [Surface] + # @param [Symbol from _enum_format_] format + # @param [Integer] width + # @param [Integer] height + # @return [Surface] # @scope class attach_function :image_surface_create, :cairo_image_surface_create, [:format, :int, :int], Surface - # (Not documented) - # + # @method format_stride_for_width(format, width) - # @param [Symbol from _enum_format_] format - # @param [Integer] width - # @return [Integer] + # @param [Symbol from _enum_format_] format + # @param [Integer] width + # @return [Integer] # @scope class attach_function :format_stride_for_width, :cairo_format_stride_for_width, [:format, :int], :int - # (Not documented) - # + # @method image_surface_create_for_data(data, format, width, height, stride) - # @param [FFI::Pointer(*UChar)] data - # @param [Symbol from _enum_format_] format - # @param [Integer] width - # @param [Integer] height - # @param [Integer] stride - # @return [Surface] + # @param [FFI::Pointer(*UChar)] data + # @param [Symbol from _enum_format_] format + # @param [Integer] width + # @param [Integer] height + # @param [Integer] stride + # @return [Surface] # @scope class attach_function :image_surface_create_for_data, :cairo_image_surface_create_for_data, [:pointer, :format, :int, :int, :int], Surface - # (Not documented) - # + # @method image_surface_get_data(surface) - # @param [Surface] surface - # @return [FFI::Pointer(*UChar)] + # @param [Surface] surface + # @return [FFI::Pointer(*UChar)] # @scope class attach_function :image_surface_get_data, :cairo_image_surface_get_data, [Surface], :pointer - # (Not documented) - # + # @method image_surface_get_format(surface) - # @param [Surface] surface - # @return [Symbol from _enum_format_] + # @param [Surface] surface + # @return [Symbol from _enum_format_] # @scope class attach_function :image_surface_get_format, :cairo_image_surface_get_format, [Surface], :format - # (Not documented) - # + # @method image_surface_get_width(surface) - # @param [Surface] surface - # @return [Integer] + # @param [Surface] surface + # @return [Integer] # @scope class attach_function :image_surface_get_width, :cairo_image_surface_get_width, [Surface], :int - # (Not documented) - # + # @method image_surface_get_height(surface) - # @param [Surface] surface - # @return [Integer] + # @param [Surface] surface + # @return [Integer] # @scope class attach_function :image_surface_get_height, :cairo_image_surface_get_height, [Surface], :int - # (Not documented) - # + # @method image_surface_get_stride(surface) - # @param [Surface] surface - # @return [Integer] + # @param [Surface] surface + # @return [Integer] # @scope class attach_function :image_surface_get_stride, :cairo_image_surface_get_stride, [Surface], :int - # (Not documented) - # + # @method image_surface_create_from_png(filename) - # @param [String] filename - # @return [Surface] + # @param [String] filename + # @return [Surface] # @scope class attach_function :image_surface_create_from_png, :cairo_image_surface_create_from_png, [:string], Surface - # (Not documented) - # + # @method image_surface_create_from_png_stream(read_func, closure) - # @param [Proc(_callback_read_func_t_)] read_func - # @param [FFI::Pointer(*Void)] closure - # @return [Surface] + # @param [FFI::Pointer(ReadFuncT)] read_func + # @param [FFI::Pointer(*Void)] closure + # @return [Surface] # @scope class - attach_function :image_surface_create_from_png_stream, :cairo_image_surface_create_from_png_stream, [:read_func_t, :pointer], Surface - + attach_function :image_surface_create_from_png_stream, :cairo_image_surface_create_from_png_stream, [:pointer, :pointer], Surface # Recording-surface functions - # + # @method recording_surface_create(content, extents) - # @param [Symbol from _enum_content_] content - # @param [Rectangle] extents - # @return [Surface] + # @param [Symbol from _enum_content_] content + # @param [Rectangle] extents + # @return [Surface] # @scope class attach_function :recording_surface_create, :cairo_recording_surface_create, [:content, Rectangle], Surface - # (Not documented) - # + # @method recording_surface_ink_extents(surface, x0, y0, width, height) - # @param [Surface] surface - # @param [FFI::Pointer(*Double)] x0 - # @param [FFI::Pointer(*Double)] y0 - # @param [FFI::Pointer(*Double)] width - # @param [FFI::Pointer(*Double)] height - # @return [nil] + # @param [Surface] surface + # @param [FFI::Pointer(*Double)] x0 + # @param [FFI::Pointer(*Double)] y0 + # @param [FFI::Pointer(*Double)] width + # @param [FFI::Pointer(*Double)] height + # @return [nil] # @scope class attach_function :recording_surface_ink_extents, :cairo_recording_surface_ink_extents, [Surface, :pointer, :pointer, :pointer, :pointer], :void - # Pattern creation functions - # + # @method pattern_create_rgb(red, green, blue) - # @param [Float] red - # @param [Float] green - # @param [Float] blue - # @return [Pattern] + # @param [Float] red + # @param [Float] green + # @param [Float] blue + # @return [Pattern] # @scope class attach_function :pattern_create_rgb, :cairo_pattern_create_rgb, [:double, :double, :double], Pattern - # (Not documented) - # + # @method pattern_create_rgba(red, green, blue, alpha) - # @param [Float] red - # @param [Float] green - # @param [Float] blue - # @param [Float] alpha - # @return [Pattern] + # @param [Float] red + # @param [Float] green + # @param [Float] blue + # @param [Float] alpha + # @return [Pattern] # @scope class attach_function :pattern_create_rgba, :cairo_pattern_create_rgba, [:double, :double, :double, :double], Pattern - # (Not documented) - # + # @method pattern_create_for_surface(surface) - # @param [Surface] surface - # @return [Pattern] + # @param [Surface] surface + # @return [Pattern] # @scope class attach_function :pattern_create_for_surface, :cairo_pattern_create_for_surface, [Surface], Pattern - # (Not documented) - # + # @method pattern_create_linear(x0, y0, x1, y1) - # @param [Float] x0 - # @param [Float] y0 - # @param [Float] x1 - # @param [Float] y1 - # @return [Pattern] + # @param [Float] x0 + # @param [Float] y0 + # @param [Float] x1 + # @param [Float] y1 + # @return [Pattern] # @scope class attach_function :pattern_create_linear, :cairo_pattern_create_linear, [:double, :double, :double, :double], Pattern - # (Not documented) - # + # @method pattern_create_radial(cx0, cy0, radius0, cx1, cy1, radius1) - # @param [Float] cx0 - # @param [Float] cy0 - # @param [Float] radius0 - # @param [Float] cx1 - # @param [Float] cy1 - # @param [Float] radius1 - # @return [Pattern] + # @param [Float] cx0 + # @param [Float] cy0 + # @param [Float] radius0 + # @param [Float] cx1 + # @param [Float] cy1 + # @param [Float] radius1 + # @return [Pattern] # @scope class attach_function :pattern_create_radial, :cairo_pattern_create_radial, [:double, :double, :double, :double, :double, :double], Pattern - # (Not documented) - # + # @method pattern_reference(pattern) - # @param [Pattern] pattern - # @return [Pattern] + # @param [Pattern] pattern + # @return [Pattern] # @scope class attach_function :pattern_reference, :cairo_pattern_reference, [Pattern], Pattern - # (Not documented) - # + # @method pattern_destroy(pattern) - # @param [Pattern] pattern - # @return [nil] + # @param [Pattern] pattern + # @return [nil] # @scope class attach_function :pattern_destroy, :cairo_pattern_destroy, [Pattern], :void - # (Not documented) - # + # @method pattern_get_reference_count(pattern) - # @param [Pattern] pattern - # @return [Integer] + # @param [Pattern] pattern + # @return [Integer] # @scope class attach_function :pattern_get_reference_count, :cairo_pattern_get_reference_count, [Pattern], :uint - # (Not documented) - # + # @method pattern_status(pattern) - # @param [Pattern] pattern - # @return [Symbol from _enum_status_] + # @param [Pattern] pattern + # @return [Symbol from _enum_status_] # @scope class attach_function :pattern_status, :cairo_pattern_status, [Pattern], :status - # (Not documented) - # + # @method pattern_get_user_data(pattern, key) - # @param [Pattern] pattern - # @param [UserDataKey] key - # @return [FFI::Pointer(*Void)] + # @param [Pattern] pattern + # @param [UserDataKey] key + # @return [FFI::Pointer(*Void)] # @scope class attach_function :pattern_get_user_data, :cairo_pattern_get_user_data, [Pattern, UserDataKey], :pointer - # (Not documented) - # + # @method pattern_set_user_data(pattern, key, user_data, destroy) - # @param [Pattern] pattern - # @param [UserDataKey] key - # @param [FFI::Pointer(*Void)] user_data - # @param [FFI::Pointer(DestroyFuncT)] destroy - # @return [Symbol from _enum_status_] + # @param [Pattern] pattern + # @param [UserDataKey] key + # @param [FFI::Pointer(*Void)] user_data + # @param [FFI::Pointer(DestroyFuncT)] destroy + # @return [Symbol from _enum_status_] # @scope class attach_function :pattern_set_user_data, :cairo_pattern_set_user_data, [Pattern, UserDataKey, :pointer, :pointer], :status - # cairo_pattern_type_t: - # + # #cairo_pattern_type_t is used to describe the type of a given pattern. - # + # The type of a pattern is determined by the function used to create # it. The cairo_pattern_create_rgb() and cairo_pattern_create_rgba() # functions create SOLID patterns. The remaining # cairo_pattern_create functions map to pattern types in obvious # ways. - # + # The pattern type can be queried with cairo_pattern_get_type() - # + # Most #cairo_pattern_t functions can be called with a pattern of any # type, (though trying to change the extend or filter for a solid # pattern will have no effect). A notable exception is @@ -4530,13 +4310,13 @@ class Path < FFI::Struct # cairo_pattern_add_color_stop_rgba() which must only be called with # gradient patterns (either LINEAR or RADIAL). Otherwise the pattern # will be shutdown and put into an error state. - # + # New entries may be added in future versions. - # + # Since: 1.2 - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:pattern_type). - # + # === Options: # :solid :: # The pattern is a solid (uniform) @@ -4547,7 +4327,7 @@ class Path < FFI::Struct # The pattern is a linear gradient. # :radial :: # The pattern is a radial gradient. - # + # @method _enum_pattern_type_ # @return [Symbol] # @scope class @@ -4557,72 +4337,67 @@ class Path < FFI::Struct :linear, 2, :radial, 3 ] - + # (Not documented) - # + # @method pattern_get_type(pattern) - # @param [Pattern] pattern - # @return [Symbol from _enum_pattern_type_] + # @param [Pattern] pattern + # @return [Symbol from _enum_pattern_type_] # @scope class attach_function :pattern_get_type, :cairo_pattern_get_type, [Pattern], :pattern_type - # (Not documented) - # + # @method pattern_add_color_stop_rgb(pattern, offset, red, green, blue) - # @param [Pattern] pattern - # @param [Float] offset - # @param [Float] red - # @param [Float] green - # @param [Float] blue - # @return [nil] + # @param [Pattern] pattern + # @param [Float] offset + # @param [Float] red + # @param [Float] green + # @param [Float] blue + # @return [nil] # @scope class attach_function :pattern_add_color_stop_rgb, :cairo_pattern_add_color_stop_rgb, [Pattern, :double, :double, :double, :double], :void - # (Not documented) - # + # @method pattern_add_color_stop_rgba(pattern, offset, red, green, blue, alpha) - # @param [Pattern] pattern - # @param [Float] offset - # @param [Float] red - # @param [Float] green - # @param [Float] blue - # @param [Float] alpha - # @return [nil] + # @param [Pattern] pattern + # @param [Float] offset + # @param [Float] red + # @param [Float] green + # @param [Float] blue + # @param [Float] alpha + # @return [nil] # @scope class attach_function :pattern_add_color_stop_rgba, :cairo_pattern_add_color_stop_rgba, [Pattern, :double, :double, :double, :double, :double], :void - # (Not documented) - # + # @method pattern_set_matrix(pattern, matrix) - # @param [Pattern] pattern - # @param [Matrix] matrix - # @return [nil] + # @param [Pattern] pattern + # @param [Matrix] matrix + # @return [nil] # @scope class attach_function :pattern_set_matrix, :cairo_pattern_set_matrix, [Pattern, Matrix], :void - # (Not documented) - # + # @method pattern_get_matrix(pattern, matrix) - # @param [Pattern] pattern - # @param [Matrix] matrix - # @return [nil] + # @param [Pattern] pattern + # @param [Matrix] matrix + # @return [nil] # @scope class attach_function :pattern_get_matrix, :cairo_pattern_get_matrix, [Pattern, Matrix], :void - # cairo_extend_t: - # + # #cairo_extend_t is used to describe how pattern color/alpha will be # determined for areas "outside" the pattern's natural area, (for # example, outside the surface bounds or outside the gradient # geometry). - # + # The default extend mode is %CAIRO_EXTEND_NONE for surface patterns # and %CAIRO_EXTEND_PAD for gradient patterns. - # + # New entries may be added in future versions. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:extend). - # + # === Options: # :none :: # pixels outside of the source pattern @@ -4636,7 +4411,7 @@ class Path < FFI::Struct # pixels outside of the pattern copy # the closest pixel from the source (Since 1.2; but only # implemented for surface patterns since 1.6) - # + # @method _enum_extend_ # @return [Symbol] # @scope class @@ -4646,33 +4421,31 @@ class Path < FFI::Struct :reflect, 2, :pad, 3 ] - + # (Not documented) - # + # @method pattern_set_extend(pattern, extend) - # @param [Pattern] pattern - # @param [Symbol from _enum_extend_] extend - # @return [nil] + # @param [Pattern] pattern + # @param [Symbol from _enum_extend_] extend + # @return [nil] # @scope class attach_function :pattern_set_extend, :cairo_pattern_set_extend, [Pattern, :extend], :void - # (Not documented) - # + # @method pattern_get_extend(pattern) - # @param [Pattern] pattern - # @return [Symbol from _enum_extend_] + # @param [Pattern] pattern + # @return [Symbol from _enum_extend_] # @scope class attach_function :pattern_get_extend, :cairo_pattern_get_extend, [Pattern], :extend - # cairo_filter_t: - # + # #cairo_filter_t is used to indicate what filtering should be # applied when reading pixel values from patterns. See # cairo_pattern_set_source() for indicating the desired filter to be # used with a particular pattern. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:filter). - # + # === Options: # :fast :: # A high-performance filter, with quality similar @@ -4690,7 +4463,7 @@ class Path < FFI::Struct # :gaussian :: # This filter value is currently # unimplemented, and should not be used in current code. - # + # @method _enum_filter_ # @return [Symbol] # @scope class @@ -4702,385 +4475,365 @@ class Path < FFI::Struct :bilinear, 4, :gaussian, 5 ] - + # (Not documented) - # + # @method pattern_set_filter(pattern, filter) - # @param [Pattern] pattern - # @param [Symbol from _enum_filter_] filter - # @return [nil] + # @param [Pattern] pattern + # @param [Symbol from _enum_filter_] filter + # @return [nil] # @scope class attach_function :pattern_set_filter, :cairo_pattern_set_filter, [Pattern, :filter], :void - # (Not documented) - # + # @method pattern_get_filter(pattern) - # @param [Pattern] pattern - # @return [Symbol from _enum_filter_] + # @param [Pattern] pattern + # @return [Symbol from _enum_filter_] # @scope class attach_function :pattern_get_filter, :cairo_pattern_get_filter, [Pattern], :filter - # (Not documented) - # + # @method pattern_get_rgba(pattern, red, green, blue, alpha) - # @param [Pattern] pattern - # @param [FFI::Pointer(*Double)] red - # @param [FFI::Pointer(*Double)] green - # @param [FFI::Pointer(*Double)] blue - # @param [FFI::Pointer(*Double)] alpha - # @return [Symbol from _enum_status_] + # @param [Pattern] pattern + # @param [FFI::Pointer(*Double)] red + # @param [FFI::Pointer(*Double)] green + # @param [FFI::Pointer(*Double)] blue + # @param [FFI::Pointer(*Double)] alpha + # @return [Symbol from _enum_status_] # @scope class attach_function :pattern_get_rgba, :cairo_pattern_get_rgba, [Pattern, :pointer, :pointer, :pointer, :pointer], :status - # (Not documented) - # + # @method pattern_get_surface(pattern, surface) - # @param [Pattern] pattern - # @param [FFI::Pointer(**SurfaceT)] surface - # @return [Symbol from _enum_status_] + # @param [Pattern] pattern + # @param [FFI::Pointer(**SurfaceT)] surface + # @return [Symbol from _enum_status_] # @scope class attach_function :pattern_get_surface, :cairo_pattern_get_surface, [Pattern, :pointer], :status - # (Not documented) - # + # @method pattern_get_color_stop_rgba(pattern, index, offset, red, green, blue, alpha) - # @param [Pattern] pattern - # @param [Integer] index - # @param [FFI::Pointer(*Double)] offset - # @param [FFI::Pointer(*Double)] red - # @param [FFI::Pointer(*Double)] green - # @param [FFI::Pointer(*Double)] blue - # @param [FFI::Pointer(*Double)] alpha - # @return [Symbol from _enum_status_] + # @param [Pattern] pattern + # @param [Integer] index + # @param [FFI::Pointer(*Double)] offset + # @param [FFI::Pointer(*Double)] red + # @param [FFI::Pointer(*Double)] green + # @param [FFI::Pointer(*Double)] blue + # @param [FFI::Pointer(*Double)] alpha + # @return [Symbol from _enum_status_] # @scope class attach_function :pattern_get_color_stop_rgba, :cairo_pattern_get_color_stop_rgba, [Pattern, :int, :pointer, :pointer, :pointer, :pointer, :pointer], :status - # (Not documented) - # + # @method pattern_get_color_stop_count(pattern, count) - # @param [Pattern] pattern - # @param [FFI::Pointer(*Int)] count - # @return [Symbol from _enum_status_] + # @param [Pattern] pattern + # @param [FFI::Pointer(*Int)] count + # @return [Symbol from _enum_status_] # @scope class attach_function :pattern_get_color_stop_count, :cairo_pattern_get_color_stop_count, [Pattern, :pointer], :status - # (Not documented) - # + # @method pattern_get_linear_points(pattern, x0, y0, x1, y1) - # @param [Pattern] pattern - # @param [FFI::Pointer(*Double)] x0 - # @param [FFI::Pointer(*Double)] y0 - # @param [FFI::Pointer(*Double)] x1 - # @param [FFI::Pointer(*Double)] y1 - # @return [Symbol from _enum_status_] + # @param [Pattern] pattern + # @param [FFI::Pointer(*Double)] x0 + # @param [FFI::Pointer(*Double)] y0 + # @param [FFI::Pointer(*Double)] x1 + # @param [FFI::Pointer(*Double)] y1 + # @return [Symbol from _enum_status_] # @scope class attach_function :pattern_get_linear_points, :cairo_pattern_get_linear_points, [Pattern, :pointer, :pointer, :pointer, :pointer], :status - # (Not documented) - # + # @method pattern_get_radial_circles(pattern, x0, y0, r0, x1, y1, r1) - # @param [Pattern] pattern - # @param [FFI::Pointer(*Double)] x0 - # @param [FFI::Pointer(*Double)] y0 - # @param [FFI::Pointer(*Double)] r0 - # @param [FFI::Pointer(*Double)] x1 - # @param [FFI::Pointer(*Double)] y1 - # @param [FFI::Pointer(*Double)] r1 - # @return [Symbol from _enum_status_] + # @param [Pattern] pattern + # @param [FFI::Pointer(*Double)] x0 + # @param [FFI::Pointer(*Double)] y0 + # @param [FFI::Pointer(*Double)] r0 + # @param [FFI::Pointer(*Double)] x1 + # @param [FFI::Pointer(*Double)] y1 + # @param [FFI::Pointer(*Double)] r1 + # @return [Symbol from _enum_status_] # @scope class attach_function :pattern_get_radial_circles, :cairo_pattern_get_radial_circles, [Pattern, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :status - # Matrix functions - # + # @method matrix_init(matrix, xx, yx, xy, yy, x0, y0) - # @param [Matrix] matrix - # @param [Float] xx - # @param [Float] yx - # @param [Float] xy - # @param [Float] yy - # @param [Float] x0 - # @param [Float] y0 - # @return [nil] + # @param [Matrix] matrix + # @param [Float] xx + # @param [Float] yx + # @param [Float] xy + # @param [Float] yy + # @param [Float] x0 + # @param [Float] y0 + # @return [nil] # @scope class attach_function :matrix_init, :cairo_matrix_init, [Matrix, :double, :double, :double, :double, :double, :double], :void - # (Not documented) - # + # @method matrix_init_identity(matrix) - # @param [Matrix] matrix - # @return [nil] + # @param [Matrix] matrix + # @return [nil] # @scope class attach_function :matrix_init_identity, :cairo_matrix_init_identity, [Matrix], :void - # (Not documented) - # + # @method matrix_init_translate(matrix, tx, ty) - # @param [Matrix] matrix - # @param [Float] tx - # @param [Float] ty - # @return [nil] + # @param [Matrix] matrix + # @param [Float] tx + # @param [Float] ty + # @return [nil] # @scope class attach_function :matrix_init_translate, :cairo_matrix_init_translate, [Matrix, :double, :double], :void - # (Not documented) - # + # @method matrix_init_scale(matrix, sx, sy) - # @param [Matrix] matrix - # @param [Float] sx - # @param [Float] sy - # @return [nil] + # @param [Matrix] matrix + # @param [Float] sx + # @param [Float] sy + # @return [nil] # @scope class attach_function :matrix_init_scale, :cairo_matrix_init_scale, [Matrix, :double, :double], :void - # (Not documented) - # + # @method matrix_init_rotate(matrix, radians) - # @param [Matrix] matrix - # @param [Float] radians - # @return [nil] + # @param [Matrix] matrix + # @param [Float] radians + # @return [nil] # @scope class attach_function :matrix_init_rotate, :cairo_matrix_init_rotate, [Matrix, :double], :void - # (Not documented) - # + # @method matrix_translate(matrix, tx, ty) - # @param [Matrix] matrix - # @param [Float] tx - # @param [Float] ty - # @return [nil] + # @param [Matrix] matrix + # @param [Float] tx + # @param [Float] ty + # @return [nil] # @scope class attach_function :matrix_translate, :cairo_matrix_translate, [Matrix, :double, :double], :void - # (Not documented) - # + # @method matrix_scale(matrix, sx, sy) - # @param [Matrix] matrix - # @param [Float] sx - # @param [Float] sy - # @return [nil] + # @param [Matrix] matrix + # @param [Float] sx + # @param [Float] sy + # @return [nil] # @scope class attach_function :matrix_scale, :cairo_matrix_scale, [Matrix, :double, :double], :void - # (Not documented) - # + # @method matrix_rotate(matrix, radians) - # @param [Matrix] matrix - # @param [Float] radians - # @return [nil] + # @param [Matrix] matrix + # @param [Float] radians + # @return [nil] # @scope class attach_function :matrix_rotate, :cairo_matrix_rotate, [Matrix, :double], :void - # (Not documented) - # + # @method matrix_invert(matrix) - # @param [Matrix] matrix - # @return [Symbol from _enum_status_] + # @param [Matrix] matrix + # @return [Symbol from _enum_status_] # @scope class attach_function :matrix_invert, :cairo_matrix_invert, [Matrix], :status - # (Not documented) - # + # @method matrix_multiply(result, a, b) - # @param [Matrix] result - # @param [Matrix] a - # @param [Matrix] b - # @return [nil] + # @param [Matrix] result + # @param [Matrix] a + # @param [Matrix] b + # @return [nil] # @scope class attach_function :matrix_multiply, :cairo_matrix_multiply, [Matrix, Matrix, Matrix], :void - # (Not documented) - # + # @method matrix_transform_distance(matrix, dx, dy) - # @param [Matrix] matrix - # @param [FFI::Pointer(*Double)] dx - # @param [FFI::Pointer(*Double)] dy - # @return [nil] + # @param [Matrix] matrix + # @param [FFI::Pointer(*Double)] dx + # @param [FFI::Pointer(*Double)] dy + # @return [nil] # @scope class attach_function :matrix_transform_distance, :cairo_matrix_transform_distance, [Matrix, :pointer, :pointer], :void - # (Not documented) - # + # @method matrix_transform_point(matrix, x, y) - # @param [Matrix] matrix - # @param [FFI::Pointer(*Double)] x - # @param [FFI::Pointer(*Double)] y - # @return [nil] + # @param [Matrix] matrix + # @param [FFI::Pointer(*Double)] x + # @param [FFI::Pointer(*Double)] y + # @return [nil] # @scope class attach_function :matrix_transform_point, :cairo_matrix_transform_point, [Matrix, :pointer, :pointer], :void - # cairo_region_t: - # + # A #cairo_region_t represents a set of integer-aligned rectangles. - # + # It allows set-theoretical operations like cairo_region_union() and # cairo_region_intersect() to be performed on them. - # + # Memory management of #cairo_region_t is done with # cairo_region_reference() and cairo_region_destroy(). - # + # Since: 1.10 module RegionWrappers - # @return [Region] + # @return [Region] def copy() Region.new Cairo.region_copy(self) end - - # @return [Region] + + # @return [Region] def reference() Region.new Cairo.region_reference(self) end - - # @return [nil] + + # @return [nil] def destroy() Cairo.region_destroy(self) end - - # @param [FFI::Pointer(*Region)] b - # @return [Integer] + + # @param [FFI::Pointer(*Region)] b + # @return [Integer] def equal(b) Cairo.region_equal(self, b) end - - # @return [Symbol from _enum_status_] + + # @return [Symbol from _enum_status_] def status() Cairo.region_status(self) end - - # @param [FFI::Pointer(*RectangleInt)] extents - # @return [nil] + + # @param [FFI::Pointer(*RectangleInt)] extents + # @return [nil] def get_extents(extents) Cairo.region_get_extents(self, extents) end - - # @return [Integer] + + # @return [Integer] def num_rectangles() Cairo.region_num_rectangles(self) end - - # @param [Integer] nth - # @param [FFI::Pointer(*RectangleInt)] rectangle - # @return [nil] + + # @param [Integer] nth + # @param [FFI::Pointer(*RectangleInt)] rectangle + # @return [nil] def get_rectangle(nth, rectangle) Cairo.region_get_rectangle(self, nth, rectangle) end - - # @return [Integer] + + # @return [Integer] def is_empty() Cairo.region_is_empty(self) end - - # @param [FFI::Pointer(*RectangleInt)] rectangle - # @return [Symbol from _enum_region_overlap_] + + # @param [FFI::Pointer(*RectangleInt)] rectangle + # @return [Symbol from _enum_region_overlap_] def contains_rectangle(rectangle) Cairo.region_contains_rectangle(self, rectangle) end - - # @param [Integer] x - # @param [Integer] y - # @return [Integer] + + # @param [Integer] x + # @param [Integer] y + # @return [Integer] def contains_point(x, y) Cairo.region_contains_point(self, x, y) end - - # @param [Integer] dx - # @param [Integer] dy - # @return [nil] + + # @param [Integer] dx + # @param [Integer] dy + # @return [nil] def translate(dx, dy) Cairo.region_translate(self, dx, dy) end - - # @param [FFI::Pointer(*Region)] other - # @return [Symbol from _enum_status_] + + # @param [FFI::Pointer(*Region)] other + # @return [Symbol from _enum_status_] def subtract(other) Cairo.region_subtract(self, other) end - - # @param [FFI::Pointer(*RectangleInt)] rectangle - # @return [Symbol from _enum_status_] + + # @param [FFI::Pointer(*RectangleInt)] rectangle + # @return [Symbol from _enum_status_] def subtract_rectangle(rectangle) Cairo.region_subtract_rectangle(self, rectangle) end - - # @param [FFI::Pointer(*Region)] other - # @return [Symbol from _enum_status_] + + # @param [FFI::Pointer(*Region)] other + # @return [Symbol from _enum_status_] def intersect(other) Cairo.region_intersect(self, other) end - - # @param [FFI::Pointer(*RectangleInt)] rectangle - # @return [Symbol from _enum_status_] + + # @param [FFI::Pointer(*RectangleInt)] rectangle + # @return [Symbol from _enum_status_] def intersect_rectangle(rectangle) Cairo.region_intersect_rectangle(self, rectangle) end - - # @param [FFI::Pointer(*Region)] other - # @return [Symbol from _enum_status_] + + # @param [FFI::Pointer(*Region)] other + # @return [Symbol from _enum_status_] def union(other) Cairo.region_union(self, other) end - - # @param [FFI::Pointer(*RectangleInt)] rectangle - # @return [Symbol from _enum_status_] + + # @param [FFI::Pointer(*RectangleInt)] rectangle + # @return [Symbol from _enum_status_] def union_rectangle(rectangle) Cairo.region_union_rectangle(self, rectangle) end - - # @param [FFI::Pointer(*Region)] other - # @return [Symbol from _enum_status_] + + # @param [FFI::Pointer(*Region)] other + # @return [Symbol from _enum_status_] def xor(other) Cairo.region_xor(self, other) end - - # @param [FFI::Pointer(*RectangleInt)] rectangle - # @return [Symbol from _enum_status_] + + # @param [FFI::Pointer(*RectangleInt)] rectangle + # @return [Symbol from _enum_status_] def xor_rectangle(rectangle) Cairo.region_xor_rectangle(self, rectangle) end end - + class Region < FFI::Struct include RegionWrappers layout :dummy, :char end - + # cairo_rectangle_int_t: # @x: X coordinate of the left side of the rectangle # @y: Y coordinate of the the top side of the rectangle # @width: width of the rectangle # @height: height of the rectangle - # + # A data structure for holding a rectangle with integer coordinates. - # + # Since: 1.10 - # + # = Fields: # :x :: - # (Integer) + # (Integer) # :y :: - # (Integer) + # (Integer) # :width :: - # (Integer) + # (Integer) # :height :: - # (Integer) + # (Integer) class RectangleInt < FFI::Struct layout :x, :int, :y, :int, :width, :int, :height, :int end - + # (Not documented) - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:region_overlap). - # + # === Options: # :in_ :: - # + # :out :: # completely inside region # :part :: # completely outside region - # + # @method _enum_region_overlap_ # @return [Symbol] # @scope class @@ -5089,213 +4842,189 @@ class RectangleInt < FFI::Struct :out, 1, :part, 2 ] - + # (Not documented) - # + # @method region_create() - # @return [Region] + # @return [Region] # @scope class attach_function :region_create, :cairo_region_create, [], Region - # (Not documented) - # + # @method region_create_rectangle(rectangle) - # @param [RectangleInt] rectangle - # @return [Region] + # @param [RectangleInt] rectangle + # @return [Region] # @scope class attach_function :region_create_rectangle, :cairo_region_create_rectangle, [RectangleInt], Region - # (Not documented) - # + # @method region_create_rectangles(rects, count) - # @param [RectangleInt] rects - # @param [Integer] count - # @return [Region] + # @param [RectangleInt] rects + # @param [Integer] count + # @return [Region] # @scope class attach_function :region_create_rectangles, :cairo_region_create_rectangles, [RectangleInt, :int], Region - # (Not documented) - # + # @method region_copy(original) - # @param [Region] original - # @return [Region] + # @param [Region] original + # @return [Region] # @scope class attach_function :region_copy, :cairo_region_copy, [Region], Region - # (Not documented) - # + # @method region_reference(region) - # @param [Region] region - # @return [Region] + # @param [Region] region + # @return [Region] # @scope class attach_function :region_reference, :cairo_region_reference, [Region], Region - # (Not documented) - # + # @method region_destroy(region) - # @param [Region] region - # @return [nil] + # @param [Region] region + # @return [nil] # @scope class attach_function :region_destroy, :cairo_region_destroy, [Region], :void - # (Not documented) - # + # @method region_equal(a, b) - # @param [Region] a - # @param [Region] b - # @return [Integer] + # @param [Region] a + # @param [Region] b + # @return [Integer] # @scope class attach_function :region_equal, :cairo_region_equal, [Region, Region], :int - # (Not documented) - # + # @method region_status(region) - # @param [Region] region - # @return [Symbol from _enum_status_] + # @param [Region] region + # @return [Symbol from _enum_status_] # @scope class attach_function :region_status, :cairo_region_status, [Region], :status - # (Not documented) - # + # @method region_get_extents(region, extents) - # @param [Region] region - # @param [RectangleInt] extents - # @return [nil] + # @param [Region] region + # @param [RectangleInt] extents + # @return [nil] # @scope class attach_function :region_get_extents, :cairo_region_get_extents, [Region, RectangleInt], :void - # (Not documented) - # + # @method region_num_rectangles(region) - # @param [Region] region - # @return [Integer] + # @param [Region] region + # @return [Integer] # @scope class attach_function :region_num_rectangles, :cairo_region_num_rectangles, [Region], :int - # (Not documented) - # + # @method region_get_rectangle(region, nth, rectangle) - # @param [Region] region - # @param [Integer] nth - # @param [RectangleInt] rectangle - # @return [nil] + # @param [Region] region + # @param [Integer] nth + # @param [RectangleInt] rectangle + # @return [nil] # @scope class attach_function :region_get_rectangle, :cairo_region_get_rectangle, [Region, :int, RectangleInt], :void - # (Not documented) - # + # @method region_is_empty(region) - # @param [Region] region - # @return [Integer] + # @param [Region] region + # @return [Integer] # @scope class attach_function :region_is_empty, :cairo_region_is_empty, [Region], :int - # (Not documented) - # + # @method region_contains_rectangle(region, rectangle) - # @param [Region] region - # @param [RectangleInt] rectangle - # @return [Symbol from _enum_region_overlap_] + # @param [Region] region + # @param [RectangleInt] rectangle + # @return [Symbol from _enum_region_overlap_] # @scope class attach_function :region_contains_rectangle, :cairo_region_contains_rectangle, [Region, RectangleInt], :region_overlap - # (Not documented) - # + # @method region_contains_point(region, x, y) - # @param [Region] region - # @param [Integer] x - # @param [Integer] y - # @return [Integer] + # @param [Region] region + # @param [Integer] x + # @param [Integer] y + # @return [Integer] # @scope class attach_function :region_contains_point, :cairo_region_contains_point, [Region, :int, :int], :int - # (Not documented) - # + # @method region_translate(region, dx, dy) - # @param [Region] region - # @param [Integer] dx - # @param [Integer] dy - # @return [nil] + # @param [Region] region + # @param [Integer] dx + # @param [Integer] dy + # @return [nil] # @scope class attach_function :region_translate, :cairo_region_translate, [Region, :int, :int], :void - # (Not documented) - # + # @method region_subtract(dst, other) - # @param [Region] dst - # @param [Region] other - # @return [Symbol from _enum_status_] + # @param [Region] dst + # @param [Region] other + # @return [Symbol from _enum_status_] # @scope class attach_function :region_subtract, :cairo_region_subtract, [Region, Region], :status - # (Not documented) - # + # @method region_subtract_rectangle(dst, rectangle) - # @param [Region] dst - # @param [RectangleInt] rectangle - # @return [Symbol from _enum_status_] + # @param [Region] dst + # @param [RectangleInt] rectangle + # @return [Symbol from _enum_status_] # @scope class attach_function :region_subtract_rectangle, :cairo_region_subtract_rectangle, [Region, RectangleInt], :status - # (Not documented) - # + # @method region_intersect(dst, other) - # @param [Region] dst - # @param [Region] other - # @return [Symbol from _enum_status_] + # @param [Region] dst + # @param [Region] other + # @return [Symbol from _enum_status_] # @scope class attach_function :region_intersect, :cairo_region_intersect, [Region, Region], :status - # (Not documented) - # + # @method region_intersect_rectangle(dst, rectangle) - # @param [Region] dst - # @param [RectangleInt] rectangle - # @return [Symbol from _enum_status_] + # @param [Region] dst + # @param [RectangleInt] rectangle + # @return [Symbol from _enum_status_] # @scope class attach_function :region_intersect_rectangle, :cairo_region_intersect_rectangle, [Region, RectangleInt], :status - # (Not documented) - # + # @method region_union(dst, other) - # @param [Region] dst - # @param [Region] other - # @return [Symbol from _enum_status_] + # @param [Region] dst + # @param [Region] other + # @return [Symbol from _enum_status_] # @scope class attach_function :region_union, :cairo_region_union, [Region, Region], :status - # (Not documented) - # + # @method region_union_rectangle(dst, rectangle) - # @param [Region] dst - # @param [RectangleInt] rectangle - # @return [Symbol from _enum_status_] + # @param [Region] dst + # @param [RectangleInt] rectangle + # @return [Symbol from _enum_status_] # @scope class attach_function :region_union_rectangle, :cairo_region_union_rectangle, [Region, RectangleInt], :status - # (Not documented) - # + # @method region_xor(dst, other) - # @param [Region] dst - # @param [Region] other - # @return [Symbol from _enum_status_] + # @param [Region] dst + # @param [Region] other + # @return [Symbol from _enum_status_] # @scope class attach_function :region_xor, :cairo_region_xor, [Region, Region], :status - # (Not documented) - # + # @method region_xor_rectangle(dst, rectangle) - # @param [Region] dst - # @param [RectangleInt] rectangle - # @return [Symbol from _enum_status_] + # @param [Region] dst + # @param [RectangleInt] rectangle + # @return [Symbol from _enum_status_] # @scope class attach_function :region_xor_rectangle, :cairo_region_xor_rectangle, [Region, RectangleInt], :status - # Functions to be used while debugging (not intended for use in production code) - # + # @method debug_reset_static_data() - # @return [nil] + # @return [nil] # @scope class attach_function :debug_reset_static_data, :cairo_debug_reset_static_data, [], :void - end diff --git a/test/output/clang-c/Index.rb b/test/output/clang-c/Index.rb index 41fbe5f..d92a70e 100644 --- a/test/output/clang-c/Index.rb +++ b/test/output/clang-c/Index.rb @@ -1,32 +1,34 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module Clang + extend FFI::Library - ffi_lib 'clang' - + + ffi_lib ENV["CLANG_PATH"] || ["libclang.so.1", "clang"] + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # A single translation unit, which resides in an index. class TranslationUnitImpl < FFI::Struct layout :dummy, :char end - + # Provides the contents of a file that has not yet been saved to disk. - # + # Each CXUnsavedFile instance provides the name of a file on the # system along with the current contents of that file that have not # yet been saved to disk. - # + # = Fields: # :filename :: # (String) The file whose contents have not yet been saved. - # + # This file must already exist in the file system. # :contents :: # (String) A buffer containing the unsaved contents of this file. @@ -37,13 +39,13 @@ class UnsavedFile < FFI::Struct :contents, :string, :length, :ulong end - + # Describes the availability of a particular entity, which indicates # whether the use of this entity will result in a warning or error due to # it being deprecated or unavailable. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:availability_kind). - # + # === Options: # :available :: # The entity is available. @@ -55,7 +57,7 @@ class UnsavedFile < FFI::Struct # :not_accessible :: # The entity is available, but not accessible; any use of it will be # an error. - # + # @method _enum_availability_kind_ # @return [Symbol] # @scope class @@ -65,63 +67,61 @@ class UnsavedFile < FFI::Struct :not_available, 2, :not_accessible, 3 ] - + # A character string. - # + # The \c CXString type is used to return strings from the interface when # the ownership of that string might different from one call to the next. # Use \c clang_getCString() to retrieve the string data and, once finished # with the string data, call \c clang_disposeString() to free the string. - # + # = Fields: # :data :: - # (FFI::Pointer(*Void)) + # (FFI::Pointer(*Void)) # :private_flags :: - # (Integer) + # (Integer) class String < FFI::Struct layout :data, :pointer, :private_flags, :uint end - + # Retrieve the character data associated with the given string. - # + # @method get_c_string(string) - # @param [String] string - # @return [String] + # @param [String] string + # @return [String] # @scope class attach_function :get_c_string, :clang_getCString, [String.by_value], :string - # Free the given string, - # + # @method dispose_string(string) - # @param [String] string - # @return [nil] + # @param [String] string + # @return [nil] # @scope class attach_function :dispose_string, :clang_disposeString, [String.by_value], :void - # clang_createIndex() provides a shared context for creating # translation units. It provides two options: - # + # - excludeDeclarationsFromPCH: When non-zero, allows enumeration of "local" # declarations (when loading any new translation units). A "local" declaration # is one that belongs in the translation unit itself and not in a precompiled # header that was used by the translation unit. If zero, all declarations # will be enumerated. - # + # Here is an example: - # + # // excludeDeclsFromPCH = 1, displayDiagnostics=1 # Idx = clang_createIndex(1, 1); - # + # // IndexTest.pch was produced with the following command: # // "clang -x c IndexTest.h -emit-ast -o IndexTest.pch" # TU = clang_createTranslationUnit(Idx, "IndexTest.pch"); - # + # // This will load all the symbols from 'IndexTest.pch' # clang_visitChildren(clang_getTranslationUnitCursor(TU), # TranslationUnitVisitor, 0); # clang_disposeTranslationUnit(TU); - # + # // This will load all the symbols from 'IndexTest.c', excluding symbols # // from 'IndexTest.pch'. # char *args() = { "-Xclang", "-include-pch=IndexTest.pch" }; @@ -130,58 +130,53 @@ class String < FFI::Struct # clang_visitChildren(clang_getTranslationUnitCursor(TU), # TranslationUnitVisitor, 0); # clang_disposeTranslationUnit(TU); - # + # This process of creating the 'pch', loading it separately, and using it (via # -include-pch) allows 'excludeDeclsFromPCH' to remove redundant callbacks # (which gives the indexer the same performance benefit as the compiler). - # + # @method create_index(exclude_declarations_from_pch, display_diagnostics) - # @param [Integer] exclude_declarations_from_pch - # @param [Integer] display_diagnostics - # @return [FFI::Pointer(Index)] + # @param [Integer] exclude_declarations_from_pch + # @param [Integer] display_diagnostics + # @return [FFI::Pointer(Index)] # @scope class attach_function :create_index, :clang_createIndex, [:int, :int], :pointer - # Destroy the given index. - # + # The index must not be destroyed until all of the translation units created # within that index have been destroyed. - # + # @method dispose_index(index) - # @param [FFI::Pointer(Index)] index - # @return [nil] + # @param [FFI::Pointer(Index)] index + # @return [nil] # @scope class attach_function :dispose_index, :clang_disposeIndex, [:pointer], :void - # Retrieve the complete file and path name of the given file. - # + # @method get_file_name(s_file) - # @param [FFI::Pointer(File)] s_file - # @return [String] + # @param [FFI::Pointer(File)] s_file + # @return [String] # @scope class attach_function :get_file_name, :clang_getFileName, [:pointer], String.by_value - # Retrieve the last modification time of the given file. - # + # @method get_file_time(s_file) - # @param [FFI::Pointer(File)] s_file - # @return [Integer] + # @param [FFI::Pointer(File)] s_file + # @return [Integer] # @scope class - attach_function :get_file_time, :clang_getFileTime, [:pointer], :long - + attach_function :get_file_time, :clang_getFileTime, [:pointer], :int # Determine whether the given header is guarded against # multiple inclusions, either with the conventional # #ifndef/#define/#endif macro guards or with #pragma once. - # + # @method is_file_multiple_include_guarded(tu, file) - # @param [TranslationUnitImpl] tu - # @param [FFI::Pointer(File)] file - # @return [Integer] + # @param [TranslationUnitImpl] tu + # @param [FFI::Pointer(File)] file + # @return [Integer] # @scope class attach_function :is_file_multiple_include_guarded, :clang_isFileMultipleIncludeGuarded, [TranslationUnitImpl, :pointer], :uint - # Retrieve a file handle within the given translation unit. - # + # @method get_file(tu, file_name) # @param [TranslationUnitImpl] tu the translation unit # @param [String] file_name the name of the file. @@ -189,123 +184,114 @@ class String < FFI::Struct # or a NULL file handle if the file was not a part of this translation unit. # @scope class attach_function :get_file, :clang_getFile, [TranslationUnitImpl, :string], :pointer - # Identifies a specific source location within a translation # unit. - # + # Use clang_getExpansionLocation() or clang_getSpellingLocation() # to map a source location to a particular file, line, and column. - # + # = Fields: # :ptr_data :: - # (Array) + # (Array) # :int_data :: - # (Integer) + # (Integer) class SourceLocation < FFI::Struct layout :ptr_data, [:pointer, 2], :int_data, :uint end - + # Identifies a half-open character range in the source code. - # + # Use clang_getRangeStart() and clang_getRangeEnd() to retrieve the # starting and end locations from a source range, respectively. - # + # = Fields: # :ptr_data :: - # (Array) + # (Array) # :begin_int_data :: - # (Integer) + # (Integer) # :end_int_data :: - # (Integer) + # (Integer) class SourceRange < FFI::Struct layout :ptr_data, [:pointer, 2], :begin_int_data, :uint, :end_int_data, :uint end - + # Retrieve a NULL (invalid) source location. - # + # @method get_null_location() - # @return [SourceLocation] + # @return [SourceLocation] # @scope class attach_function :get_null_location, :clang_getNullLocation, [], SourceLocation.by_value - # Determine whether two source locations, which must refer into # the same translation unit, refer to exactly the same point in the source # code. - # + # @method equal_locations(loc1, loc2) - # @param [SourceLocation] loc1 - # @param [SourceLocation] loc2 + # @param [SourceLocation] loc1 + # @param [SourceLocation] loc2 # @return [Integer] non-zero if the source locations refer to the same location, zero # if they refer to different locations. # @scope class attach_function :equal_locations, :clang_equalLocations, [SourceLocation.by_value, SourceLocation.by_value], :uint - # Retrieves the source location associated with a given file/line/column # in a particular translation unit. - # + # @method get_location(tu, file, line, column) - # @param [TranslationUnitImpl] tu - # @param [FFI::Pointer(File)] file - # @param [Integer] line - # @param [Integer] column - # @return [SourceLocation] + # @param [TranslationUnitImpl] tu + # @param [FFI::Pointer(File)] file + # @param [Integer] line + # @param [Integer] column + # @return [SourceLocation] # @scope class attach_function :get_location, :clang_getLocation, [TranslationUnitImpl, :pointer, :uint, :uint], SourceLocation.by_value - # Retrieves the source location associated with a given character offset # in a particular translation unit. - # + # @method get_location_for_offset(tu, file, offset) - # @param [TranslationUnitImpl] tu - # @param [FFI::Pointer(File)] file - # @param [Integer] offset - # @return [SourceLocation] + # @param [TranslationUnitImpl] tu + # @param [FFI::Pointer(File)] file + # @param [Integer] offset + # @return [SourceLocation] # @scope class attach_function :get_location_for_offset, :clang_getLocationForOffset, [TranslationUnitImpl, :pointer, :uint], SourceLocation.by_value - # Retrieve a NULL (invalid) source range. - # + # @method get_null_range() - # @return [SourceRange] + # @return [SourceRange] # @scope class attach_function :get_null_range, :clang_getNullRange, [], SourceRange.by_value - # Retrieve a source range given the beginning and ending source # locations. - # + # @method get_range(begin_, end_) - # @param [SourceLocation] begin_ - # @param [SourceLocation] end_ - # @return [SourceRange] + # @param [SourceLocation] begin_ + # @param [SourceLocation] end_ + # @return [SourceRange] # @scope class attach_function :get_range, :clang_getRange, [SourceLocation.by_value, SourceLocation.by_value], SourceRange.by_value - # Determine whether two ranges are equivalent. - # + # @method equal_ranges(range1, range2) - # @param [SourceRange] range1 - # @param [SourceRange] range2 + # @param [SourceRange] range1 + # @param [SourceRange] range2 # @return [Integer] non-zero if the ranges are the same, zero if they differ. # @scope class attach_function :equal_ranges, :clang_equalRanges, [SourceRange.by_value, SourceRange.by_value], :uint - # Returns non-zero if \arg range is null. - # + # @method range_is_null(range) - # @param [SourceRange] range - # @return [Integer] + # @param [SourceRange] range + # @return [Integer] # @scope class attach_function :range_is_null, :clang_Range_isNull, [SourceRange.by_value], :int - # Retrieve the file, line, column, and offset represented by # the given source location. - # + # If the location refers into a macro expansion, retrieves the # location of the macro expansion. - # + # @method get_expansion_location(location, file, line, column, offset) # @param [SourceLocation] location the location within a source file that will be decomposed # into its parts. @@ -317,30 +303,29 @@ class SourceRange < FFI::Struct # source location points. # @param [FFI::Pointer(*UInt)] offset (out) if non-NULL, will be set to the offset into the # buffer to which the given source location points. - # @return [nil] + # @return [nil] # @scope class attach_function :get_expansion_location, :clang_getExpansionLocation, [SourceLocation.by_value, :pointer, :pointer, :pointer, :pointer], :void - # Retrieve the file, line, column, and offset represented by # the given source location, as specified in a # line directive. - # + # Example: given the following source code in a file somefile.c - # + # #123 "dummy.c" 1 - # + # static int func(void) # { # return 0; # } - # + # the location information returned by this function would be - # + # File: dummy.c Line: 124 Column: 12 - # + # whereas clang_getExpansionLocation would have returned - # + # File: somefile.c Line: 3 Column: 12 - # + # @method get_presumed_location(location, filename, line, column) # @param [SourceLocation] location the location within a source file that will be decomposed # into its parts. @@ -355,33 +340,31 @@ class SourceRange < FFI::Struct # source location. For an invalid source location, zero is returned. # @param [FFI::Pointer(*UInt)] column (out) if non-NULL, will be set to the column number of the # source location. For an invalid source location, zero is returned. - # @return [nil] + # @return [nil] # @scope class attach_function :get_presumed_location, :clang_getPresumedLocation, [SourceLocation.by_value, String, :pointer, :pointer], :void - # Legacy API to retrieve the file, line, column, and offset represented # by the given source location. - # + # This interface has been replaced by the newer interface # \see clang_getExpansionLocation(). See that interface's documentation for # details. - # + # @method get_instantiation_location(location, file, line, column, offset) - # @param [SourceLocation] location - # @param [FFI::Pointer(*File)] file - # @param [FFI::Pointer(*UInt)] line - # @param [FFI::Pointer(*UInt)] column - # @param [FFI::Pointer(*UInt)] offset - # @return [nil] + # @param [SourceLocation] location + # @param [FFI::Pointer(*File)] file + # @param [FFI::Pointer(*UInt)] line + # @param [FFI::Pointer(*UInt)] column + # @param [FFI::Pointer(*UInt)] offset + # @return [nil] # @scope class attach_function :get_instantiation_location, :clang_getInstantiationLocation, [SourceLocation.by_value, :pointer, :pointer, :pointer, :pointer], :void - # Retrieve the file, line, column, and offset represented by # the given source location. - # + # If the location refers into a macro instantiation, return where the # location was originally spelled in the source file. - # + # @method get_spelling_location(location, file, line, column, offset) # @param [SourceLocation] location the location within a source file that will be decomposed # into its parts. @@ -393,32 +376,29 @@ class SourceRange < FFI::Struct # source location points. # @param [FFI::Pointer(*UInt)] offset (out) if non-NULL, will be set to the offset into the # buffer to which the given source location points. - # @return [nil] + # @return [nil] # @scope class attach_function :get_spelling_location, :clang_getSpellingLocation, [SourceLocation.by_value, :pointer, :pointer, :pointer, :pointer], :void - # Retrieve a source location representing the first character within a # source range. - # + # @method get_range_start(range) - # @param [SourceRange] range - # @return [SourceLocation] + # @param [SourceRange] range + # @return [SourceLocation] # @scope class attach_function :get_range_start, :clang_getRangeStart, [SourceRange.by_value], SourceLocation.by_value - # Retrieve a source location representing the last character within a # source range. - # + # @method get_range_end(range) - # @param [SourceRange] range - # @return [SourceLocation] + # @param [SourceRange] range + # @return [SourceLocation] # @scope class attach_function :get_range_end, :clang_getRangeEnd, [SourceRange.by_value], SourceLocation.by_value - # Describes the severity of a particular diagnostic. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:diagnostic_severity). - # + # === Options: # :ignored :: # A diagnostic that has been suppressed, e.g., by a command-line @@ -435,7 +415,7 @@ class SourceRange < FFI::Struct # This diagnostic indicates that the code is ill-formed such # that future parser recovery is unlikely to produce useful # results. - # + # @method _enum_diagnostic_severity_ # @return [Symbol] # @scope class @@ -446,18 +426,17 @@ class SourceRange < FFI::Struct :error, 3, :fatal, 4 ] - + # Determine the number of diagnostics produced for the given # translation unit. - # + # @method get_num_diagnostics(unit) - # @param [TranslationUnitImpl] unit - # @return [Integer] + # @param [TranslationUnitImpl] unit + # @return [Integer] # @scope class attach_function :get_num_diagnostics, :clang_getNumDiagnostics, [TranslationUnitImpl], :uint - # Retrieve a diagnostic associated with the given translation unit. - # + # @method get_diagnostic(unit, index) # @param [TranslationUnitImpl] unit the translation unit to query. # @param [Integer] index the zero-based diagnostic number to retrieve. @@ -465,66 +444,64 @@ class SourceRange < FFI::Struct # via a call to \c clang_disposeDiagnostic(). # @scope class attach_function :get_diagnostic, :clang_getDiagnostic, [TranslationUnitImpl, :uint], :pointer - # Destroy a diagnostic. - # + # @method dispose_diagnostic(diagnostic) - # @param [FFI::Pointer(Diagnostic)] diagnostic - # @return [nil] + # @param [FFI::Pointer(Diagnostic)] diagnostic + # @return [nil] # @scope class attach_function :dispose_diagnostic, :clang_disposeDiagnostic, [:pointer], :void - # Options to control the display of diagnostics. - # + # The values in this enum are meant to be combined to customize the # behavior of \c clang_displayDiagnostic(). - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:diagnostic_display_options). - # + # === Options: # :source_location :: # Display the source-location information where the # diagnostic was located. - # + # When set, diagnostics will be prefixed by the file, line, and # (optionally) column to which the diagnostic refers. For example, - # + # \code # test.c:28: warning: extra tokens at end of #endif directive # \endcode - # + # This option corresponds to the clang flag \c -fshow-source-location. # :column :: # If displaying the source-location information of the # diagnostic, also include the column number. - # + # This option corresponds to the clang flag \c -fshow-column. # :source_ranges :: # If displaying the source-location information of the # diagnostic, also include information about source ranges in a # machine-parsable format. - # + # This option corresponds to the clang flag # \c -fdiagnostics-print-source-range-info. # :option :: # Display the option name associated with this diagnostic, if any. - # + # The option name displayed (e.g., -Wconversion) will be placed in brackets # after the diagnostic text. This option corresponds to the clang flag # \c -fdiagnostics-show-option. # :category_id :: # Display the category number associated with this diagnostic, if any. - # + # The category number is displayed within brackets after the diagnostic text. # This option corresponds to the clang flag # \c -fdiagnostics-show-category=id. # :category_name :: # Display the category name associated with this diagnostic, if any. - # + # The category name is displayed within brackets after the diagnostic text. # This option corresponds to the clang flag # \c -fdiagnostics-show-category=name. - # + # @method _enum_diagnostic_display_options_ # @return [Symbol] # @scope class @@ -536,14 +513,14 @@ class SourceRange < FFI::Struct :category_id, 16, :category_name, 32 ] - + # Format the given diagnostic in a manner that is suitable for display. - # + # This routine will format the given diagnostic to a string, rendering # the diagnostic according to the various options given. The # \c clang_defaultDiagnosticDisplayOptions() function returns the set of # options that most closely mimics the behavior of the clang compiler. - # + # @method format_diagnostic(diagnostic, options) # @param [FFI::Pointer(Diagnostic)] diagnostic The diagnostic to print. # @param [Integer] options A set of options that control the diagnostic display, @@ -551,46 +528,41 @@ class SourceRange < FFI::Struct # @return [String] A new string containing for formatted diagnostic. # @scope class attach_function :format_diagnostic, :clang_formatDiagnostic, [:pointer, :uint], String.by_value - # Retrieve the set of display options most similar to the # default behavior of the clang compiler. - # + # @method default_diagnostic_display_options() # @return [Integer] A set of display options suitable for use with \c # clang_displayDiagnostic(). # @scope class attach_function :default_diagnostic_display_options, :clang_defaultDiagnosticDisplayOptions, [], :uint - # Determine the severity of the given diagnostic. - # + # @method get_diagnostic_severity(diagnostic) - # @param [FFI::Pointer(Diagnostic)] diagnostic - # @return [Symbol from _enum_diagnostic_severity_] + # @param [FFI::Pointer(Diagnostic)] diagnostic + # @return [Symbol from _enum_diagnostic_severity_] # @scope class attach_function :get_diagnostic_severity, :clang_getDiagnosticSeverity, [:pointer], :diagnostic_severity - # Retrieve the source location of the given diagnostic. - # + # This location is where Clang would print the caret ('^') when # displaying the diagnostic on the command line. - # + # @method get_diagnostic_location(diagnostic) - # @param [FFI::Pointer(Diagnostic)] diagnostic - # @return [SourceLocation] + # @param [FFI::Pointer(Diagnostic)] diagnostic + # @return [SourceLocation] # @scope class attach_function :get_diagnostic_location, :clang_getDiagnosticLocation, [:pointer], SourceLocation.by_value - # Retrieve the text of the given diagnostic. - # + # @method get_diagnostic_spelling(diagnostic) - # @param [FFI::Pointer(Diagnostic)] diagnostic - # @return [String] + # @param [FFI::Pointer(Diagnostic)] diagnostic + # @return [String] # @scope class attach_function :get_diagnostic_spelling, :clang_getDiagnosticSpelling, [:pointer], String.by_value - # Retrieve the name of the command-line option that enabled this # diagnostic. - # + # @method get_diagnostic_option(diag, disable) # @param [FFI::Pointer(Diagnostic)] diag The diagnostic to be queried. # @param [String] disable If non-NULL, will be set to the option that disables this @@ -599,62 +571,56 @@ class SourceRange < FFI::Struct # warning, such as "-Wconversion" or "-pedantic". # @scope class attach_function :get_diagnostic_option, :clang_getDiagnosticOption, [:pointer, String], String.by_value - # Retrieve the category number for this diagnostic. - # + # Diagnostics can be categorized into groups along with other, related # diagnostics (e.g., diagnostics under the same warning flag). This routine # retrieves the category number for the given diagnostic. - # + # @method get_diagnostic_category(diagnostic) - # @param [FFI::Pointer(Diagnostic)] diagnostic + # @param [FFI::Pointer(Diagnostic)] diagnostic # @return [Integer] The number of the category that contains this diagnostic, or zero # if this diagnostic is uncategorized. # @scope class attach_function :get_diagnostic_category, :clang_getDiagnosticCategory, [:pointer], :uint - # Retrieve the name of a particular diagnostic category. - # + # @method get_diagnostic_category_name(category) # @param [Integer] category A diagnostic category number, as returned by # \c clang_getDiagnosticCategory(). # @return [String] The name of the given diagnostic category. # @scope class attach_function :get_diagnostic_category_name, :clang_getDiagnosticCategoryName, [:uint], String.by_value - # Determine the number of source ranges associated with the given # diagnostic. - # + # @method get_diagnostic_num_ranges(diagnostic) - # @param [FFI::Pointer(Diagnostic)] diagnostic - # @return [Integer] + # @param [FFI::Pointer(Diagnostic)] diagnostic + # @return [Integer] # @scope class attach_function :get_diagnostic_num_ranges, :clang_getDiagnosticNumRanges, [:pointer], :uint - # Retrieve a source range associated with the diagnostic. - # + # A diagnostic's source ranges highlight important elements in the source # code. On the command line, Clang displays source ranges by # underlining them with '~' characters. - # + # @method get_diagnostic_range(diagnostic, range) # @param [FFI::Pointer(Diagnostic)] diagnostic the diagnostic whose range is being extracted. # @param [Integer] range the zero-based index specifying which range to # @return [SourceRange] the requested source range. # @scope class attach_function :get_diagnostic_range, :clang_getDiagnosticRange, [:pointer, :uint], SourceRange.by_value - # Determine the number of fix-it hints associated with the # given diagnostic. - # + # @method get_diagnostic_num_fix_its(diagnostic) - # @param [FFI::Pointer(Diagnostic)] diagnostic - # @return [Integer] + # @param [FFI::Pointer(Diagnostic)] diagnostic + # @return [Integer] # @scope class attach_function :get_diagnostic_num_fix_its, :clang_getDiagnosticNumFixIts, [:pointer], :uint - # Retrieve the replacement information for a given fix-it. - # + # Fix-its are described in terms of a source range whose contents # should be replaced by a string. This approach generalizes over # three kinds of operations: removal of source code (the range covers @@ -664,7 +630,7 @@ class SourceRange < FFI::Struct # insertion (both the start and end of the range point at the # insertion location, and the replacement string provides the text to # insert). - # + # @method get_diagnostic_fix_it(diagnostic, fix_it, replacement_range) # @param [FFI::Pointer(Diagnostic)] diagnostic The diagnostic whose fix-its are being queried. # @param [Integer] fix_it The zero-based index of the fix-it. @@ -676,30 +642,28 @@ class SourceRange < FFI::Struct # code indicated by the \c ReplacementRange. # @scope class attach_function :get_diagnostic_fix_it, :clang_getDiagnosticFixIt, [:pointer, :uint, SourceRange], String.by_value - # Get the original translation unit source file name. - # + # @method get_translation_unit_spelling(ct_unit) - # @param [TranslationUnitImpl] ct_unit - # @return [String] + # @param [TranslationUnitImpl] ct_unit + # @return [String] # @scope class attach_function :get_translation_unit_spelling, :clang_getTranslationUnitSpelling, [TranslationUnitImpl], String.by_value - # Return the CXTranslationUnit for a given source file and the provided # command line arguments one would pass to the compiler. - # + # Note: The 'source_filename' argument is optional. If the caller provides a # NULL pointer, the name of the source file is expected to reside in the # specified command line arguments. - # + # Note: When encountered in 'clang_command_line_args', the following options # are ignored: - # + # '-c' # '-emit-ast' # '-fsyntax-only' # '-o ' (both '-o' and '' are ignored) - # + # @method create_translation_unit_from_source_file(c_idx, source_filename, num_clang_command_line_args, command_line_args, num_unsaved_files, unsaved_files) # @param [FFI::Pointer(Index)] c_idx The index object with which the translation unit will be # associated. @@ -719,27 +683,25 @@ class SourceRange < FFI::Struct # those files. The contents and name of these files (as specified by # CXUnsavedFile) are copied when necessary, so the client only needs to # guarantee their validity until the call to this function returns. - # @return [TranslationUnitImpl] + # @return [TranslationUnitImpl] # @scope class attach_function :create_translation_unit_from_source_file, :clang_createTranslationUnitFromSourceFile, [:pointer, :string, :int, :pointer, :uint, UnsavedFile], TranslationUnitImpl - # Create a translation unit from an AST file (-emit-ast). - # + # @method create_translation_unit(index, ast_filename) - # @param [FFI::Pointer(Index)] index - # @param [String] ast_filename - # @return [TranslationUnitImpl] + # @param [FFI::Pointer(Index)] index + # @param [String] ast_filename + # @return [TranslationUnitImpl] # @scope class attach_function :create_translation_unit, :clang_createTranslationUnit, [:pointer, :string], TranslationUnitImpl - # Flags that control the creation of translation units. - # + # The enumerators in this enumeration type are meant to be bitwise # ORed together to specify which options should be used when # constructing the translation unit. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:translation_unit_flags). - # + # === Options: # :none :: # Used to indicate that no special translation-unit options are @@ -747,7 +709,7 @@ class SourceRange < FFI::Struct # :detailed_preprocessing_record :: # Used to indicate that the parser should construct a "detailed" # preprocessing record, including all macro definitions and instantiations. - # + # Constructing a detailed preprocessing record requires more memory # and time to parse, since the information contained in the record # is usually not retained. However, it can be useful for @@ -755,7 +717,7 @@ class SourceRange < FFI::Struct # behavior of the preprocessor. # :incomplete :: # Used to indicate that the translation unit is incomplete. - # + # When a translation unit is considered "incomplete", semantic # analysis that is typically performed at the end of the # translation unit will be suppressed. For example, this suppresses @@ -766,7 +728,7 @@ class SourceRange < FFI::Struct # :precompiled_preamble :: # Used to indicate that the translation unit should be built with an # implicit precompiled header for the preamble. - # + # An implicit precompiled header is used as an optimization when a # particular translation unit is likely to be reparsed many times # when the sources aren't changing that often. In this case, an @@ -779,29 +741,29 @@ class SourceRange < FFI::Struct # :cache_completion_results :: # Used to indicate that the translation unit should cache some # code-completion results with each reparse of the source file. - # + # Caching of code-completion results is a performance optimization that # introduces some overhead to reparsing but improves the performance of # code-completion operations. # :cxx_precompiled_preamble :: # DEPRECATED: Enable precompiled preambles in C++. - # + # Note: this is a *temporary* option that is available only while # we are testing C++ precompiled preamble support. It is deprecated. # :cxx_chained_pch :: # DEPRECATED: Enabled chained precompiled preambles in C++. - # + # Note: this is a *temporary* option that is available only while # we are testing C++ precompiled preamble support. It is deprecated. # :nested_macro_expansions :: # Used to indicate that the "detailed" preprocessing record, # if requested, should also contain nested macro expansions. - # + # Nested macro expansions (i.e., macro expansions that occur # inside another macro expansion) can, in some code bases, require # a large amount of storage to due preprocessor metaprogramming. Moreover, # its fairly rare that this information is useful for libclang clients. - # + # @method _enum_translation_unit_flags_ # @return [Symbol] # @scope class @@ -815,10 +777,10 @@ class SourceRange < FFI::Struct :cxx_chained_pch, 32, :nested_macro_expansions, 64 ] - + # Returns the set of flags that is suitable for parsing a translation # unit that is being edited. - # + # The set of flags returned provide options for \c clang_parseTranslationUnit() # to indicate that the translation unit is likely to be reparsed many times, # either explicitly (via \c clang_reparseTranslationUnit()) or implicitly @@ -826,21 +788,20 @@ class SourceRange < FFI::Struct # set contains an unspecified set of optimizations (e.g., the precompiled # preamble) geared toward improving the performance of these routines. The # set of optimizations enabled may change from one version to the next. - # + # @method default_editing_translation_unit_options() - # @return [Integer] + # @return [Integer] # @scope class attach_function :default_editing_translation_unit_options, :clang_defaultEditingTranslationUnitOptions, [], :uint - # Parse the given source file and the translation unit corresponding # to that file. - # + # This routine is the main entry point for the Clang C API, providing the # ability to parse a source file into a translation unit that can then be # queried by other functions in the API. This routine accepts a set of # command-line arguments so that the compilation can be configured in the same # way that the compiler is configured on the command line. - # + # @method parse_translation_unit(c_idx, source_filename, command_line_args, num_command_line_args, unsaved_files, num_unsaved_files, options) # @param [FFI::Pointer(Index)] c_idx The index object with which the translation unit will be # associated. @@ -868,64 +829,62 @@ class SourceRange < FFI::Struct # the compiler cannot recover, returns NULL. # @scope class attach_function :parse_translation_unit, :clang_parseTranslationUnit, [:pointer, :string, :pointer, :int, UnsavedFile, :uint, :uint], TranslationUnitImpl - # Flags that control how translation units are saved. - # + # The enumerators in this enumeration type are meant to be bitwise # ORed together to specify which options should be used when # saving the translation unit. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:save_translation_unit_flags). - # + # === Options: # :save_translation_unit_none :: # Used to indicate that no special saving options are needed. - # + # @method _enum_save_translation_unit_flags_ # @return [Symbol] # @scope class enum :save_translation_unit_flags, [ :save_translation_unit_none, 0 ] - + # Returns the set of flags that is suitable for saving a translation # unit. - # + # The set of flags returned provide options for # \c clang_saveTranslationUnit() by default. The returned flag # set contains an unspecified set of options that save translation units with # the most commonly-requested data. - # + # @method default_save_options(tu) - # @param [TranslationUnitImpl] tu - # @return [Integer] + # @param [TranslationUnitImpl] tu + # @return [Integer] # @scope class attach_function :default_save_options, :clang_defaultSaveOptions, [TranslationUnitImpl], :uint - # Describes the kind of error that occurred (if any) in a call to # \c clang_saveTranslationUnit(). - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:save_error). - # + # === Options: # :none :: # Indicates that no error occurred while saving a translation unit. # :unknown :: # Indicates that an unknown error occurred while attempting to save # the file. - # + # This error typically indicates that file I/O failed when attempting to # write the file. # :translation_errors :: # Indicates that errors during translation prevented this attempt # to save the translation unit. - # + # Errors that prevent the translation unit from being saved can be # extracted using \c clang_getNumDiagnostics() and \c clang_getDiagnostic(). # :invalid_tu :: # Indicates that the translation unit to be saved was somehow # invalid (e.g., NULL). - # + # @method _enum_save_error_ # @return [Symbol] # @scope class @@ -935,17 +894,17 @@ class SourceRange < FFI::Struct :translation_errors, 2, :invalid_tu, 3 ] - + # Saves a translation unit into a serialized representation of # that translation unit on disk. - # + # Any translation unit that was parsed without error can be saved # into a file. The translation unit can then be deserialized into a # new \c CXTranslationUnit with \c clang_createTranslationUnit() or, # if it is an incomplete translation unit that corresponds to a # header, used as a precompiled header when parsing other translation # units. - # + # @method save_translation_unit(tu, file_name, options) # @param [TranslationUnitImpl] tu The translation unit to save. # @param [String] file_name The file to which the translation unit will be saved. @@ -957,64 +916,61 @@ class SourceRange < FFI::Struct # saved successfully, while a non-zero value indicates that a problem occurred. # @scope class attach_function :save_translation_unit, :clang_saveTranslationUnit, [TranslationUnitImpl, :string, :uint], :int - # Destroy the specified CXTranslationUnit object. - # + # @method dispose_translation_unit(translation_unit_impl) - # @param [TranslationUnitImpl] translation_unit_impl - # @return [nil] + # @param [TranslationUnitImpl] translation_unit_impl + # @return [nil] # @scope class attach_function :dispose_translation_unit, :clang_disposeTranslationUnit, [TranslationUnitImpl], :void - # Flags that control the reparsing of translation units. - # + # The enumerators in this enumeration type are meant to be bitwise # ORed together to specify which options should be used when # reparsing the translation unit. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:reparse_flags). - # + # === Options: # :reparse_none :: # Used to indicate that no special reparsing options are needed. - # + # @method _enum_reparse_flags_ # @return [Symbol] # @scope class enum :reparse_flags, [ :reparse_none, 0 ] - + # Returns the set of flags that is suitable for reparsing a translation # unit. - # + # The set of flags returned provide options for # \c clang_reparseTranslationUnit() by default. The returned flag # set contains an unspecified set of optimizations geared toward common uses # of reparsing. The set of optimizations enabled may change from one version # to the next. - # + # @method default_reparse_options(tu) - # @param [TranslationUnitImpl] tu - # @return [Integer] + # @param [TranslationUnitImpl] tu + # @return [Integer] # @scope class attach_function :default_reparse_options, :clang_defaultReparseOptions, [TranslationUnitImpl], :uint - # Reparse the source files that produced this translation unit. - # + # This routine can be used to re-parse the source files that originally # created the given translation unit, for example because those source files # have changed (either on disk or as passed via \p unsaved_files). The # source code will be reparsed with the same command-line options as it # was originally parsed. - # + # Reparsing a translation unit invalidates all cursors and source locations # that refer into that translation unit. This makes reparsing a translation # unit semantically equivalent to destroying the translation unit and then # creating a new translation unit with the same command-line arguments. # However, it may be more efficient to reparse a translation # unit using this routine. - # + # @method reparse_translation_unit(tu, num_unsaved_files, unsaved_files, options) # @param [TranslationUnitImpl] tu The translation unit whose contents will be re-parsed. The # translation unit must originally have been built with @@ -1035,41 +991,40 @@ class SourceRange < FFI::Struct # \c clang_disposeTranslationUnit(TU). # @scope class attach_function :reparse_translation_unit, :clang_reparseTranslationUnit, [TranslationUnitImpl, :uint, UnsavedFile, :uint], :int - # Categorizes how memory is being used by a translation unit. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:tu_resource_usage_kind). - # + # === Options: # :ast :: - # + # :identifiers :: - # + # :selectors :: - # + # :global_completion_results :: - # + # :source_manager_content_cache :: - # + # :ast_side_tables :: - # + # :source_manager_membuffer_malloc :: - # + # :source_manager_membuffer_m_map :: - # + # :external_ast_source_membuffer_malloc :: - # + # :external_ast_source_membuffer_m_map :: - # + # :preprocessor :: - # + # :preprocessing_record :: - # + # :source_manager_data_structures :: - # + # :preprocessor_header_search :: - # - # + + # @method _enum_tu_resource_usage_kind_ # @return [Symbol] # @scope class @@ -1089,18 +1044,17 @@ class SourceRange < FFI::Struct :source_manager_data_structures, 13, :preprocessor_header_search, 14 ] - + # Returns the human-readable null-terminated C string that represents # the name of the memory category. This string should never be freed. - # + # @method get_tu_resource_usage_name(kind) - # @param [Symbol from _enum_tu_resource_usage_kind_] kind - # @return [String] + # @param [Symbol from _enum_tu_resource_usage_kind_] kind + # @return [String] # @scope class attach_function :get_tu_resource_usage_name, :clang_getTUResourceUsageName, [:tu_resource_usage_kind], :string - # (Not documented) - # + # = Fields: # :kind :: # (Symbol from _enum_tu_resource_usage_kind_) The memory usage category. @@ -1111,9 +1065,9 @@ class TUResourceUsageEntry < FFI::Struct layout :kind, :tu_resource_usage_kind, :amount, :ulong end - + # The memory usage of a CXTranslationUnit, broken into categories. - # + # = Fields: # :data :: # (FFI::Pointer(*Void)) Private data member, used for queries. @@ -1127,33 +1081,31 @@ class TUResourceUsage < FFI::Struct :num_entries, :uint, :entries, TUResourceUsageEntry end - + # Return the memory usage of a translation unit. This object # should be released with clang_disposeCXTUResourceUsage(). - # + # @method get_cxtu_resource_usage(tu) - # @param [TranslationUnitImpl] tu - # @return [TUResourceUsage] + # @param [TranslationUnitImpl] tu + # @return [TUResourceUsage] # @scope class attach_function :get_cxtu_resource_usage, :clang_getCXTUResourceUsage, [TranslationUnitImpl], TUResourceUsage.by_value - # (Not documented) - # + # @method dispose_cxtu_resource_usage(usage) - # @param [TUResourceUsage] usage - # @return [nil] + # @param [TUResourceUsage] usage + # @return [nil] # @scope class attach_function :dispose_cxtu_resource_usage, :clang_disposeCXTUResourceUsage, [TUResourceUsage.by_value], :void - # Describes the kind of entity that a cursor refers to. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:cursor_kind). - # + # === Options: # :unexposed_decl :: # A declaration whose specific kind is not exposed via this # interface. - # + # Unexposed declarations have the same operations as any other kind # of declaration; one can extract their location information, # spelling, find their definitions, etc. However, the specific kind @@ -1240,25 +1192,25 @@ class TUResourceUsage < FFI::Struct # :obj_c_super_class_ref :: # Decl references # :obj_c_protocol_ref :: - # + # :obj_c_class_ref :: - # + # :type_ref :: # A reference to a type declaration. - # + # A type reference occurs anywhere where a type is named but not # declared. For example, given: - # + # \code # typedef unsigned size_type; # size_type size; # \endcode - # + # The typedef is a declaration of size_type (CXCursor_TypedefDecl), # while the type of the variable "size" is referenced. The cursor # referenced by the type of size is the typedef for size_type. # :cxx_base_specifier :: - # + # :template_ref :: # A reference to a class template, function template, template # template parameter, or class template partial specialization. @@ -1269,31 +1221,31 @@ class TUResourceUsage < FFI::Struct # some non-expression context, e.g., a designated initializer. # :label_ref :: # A reference to a labeled statement. - # + # This cursor kind is used to describe the jump to "start_over" in the # goto statement in the following example: - # + # \code # start_over: # ++counter; - # + # goto start_over; # \endcode - # + # A label reference cursor refers to a label statement. # :overloaded_decl_ref :: # A reference to a set of overloaded functions or function templates # that has not yet been resolved to a specific function or function template. - # + # An overloaded declaration reference cursor occurs in C++ templates where # a dependent name refers to a function. For example: - # + # \code # template void swap(T&, T&); - # + # struct X { ... }; # void swap(X&, X&); - # + # template # void reverse(T* first, T* last) { # while (first < last - 1) { @@ -1301,37 +1253,37 @@ class TUResourceUsage < FFI::Struct # ++first; # } # } - # + # struct Y { }; # void swap(Y&, Y&); # \endcode - # + # Here, the identifier "swap" is associated with an overloaded declaration # reference. In the template definition, "swap" refers to either of the two # "swap" functions declared above, so both results will be available. At # instantiation time, "swap" may also refer to other functions found via # argument-dependent lookup (e.g., the "swap" function at the end of the # example). - # + # The functions \c clang_getNumOverloadedDecls() and # \c clang_getOverloadedDecl() can be used to retrieve the definitions # referenced by this cursor. # :first_invalid :: # Error conditions # :invalid_file :: - # + # :no_decl_found :: - # + # :not_implemented :: - # + # :invalid_code :: - # + # :first_expr :: # Expressions # :unexposed_expr :: # An expression whose specific kind is not exposed via this # interface. - # + # Unexposed expressions have the same operations as any other kind # of expression; one can extract their location information, # spelling, children, etc. However, the specific kind of the @@ -1361,7 +1313,7 @@ class TUResourceUsage < FFI::Struct # A character literal. # :paren_expr :: # A parenthesized expression, e.g. "(1)". - # + # This AST node is only formed if full location information is requested. # :unary_operator :: # This represents the unary-expression's (except sizeof and @@ -1378,7 +1330,7 @@ class TUResourceUsage < FFI::Struct # :c_style_cast_expr :: # An explicit cast in C (C99 6.5.4) or a C-style cast in C++ # (C++ (expr.cast)), which uses the syntax (Type)expr. - # + # For example: (int)f. # :compound_literal_expr :: # (C99 6.5.2.5) @@ -1394,7 +1346,7 @@ class TUResourceUsage < FFI::Struct # Implements the GNU __null extension, which is a name for a null # pointer constant that has integral type (e.g., int or long) and is the same # size and alignment as a pointer. - # + # The __null extension is typically only used by system headers, which define # NULL as __null in C++ rather than using 0 (which is an integer that may not # match the size of a pointer). @@ -1409,7 +1361,7 @@ class TUResourceUsage < FFI::Struct # :cxx_functional_cast_expr :: # Represents an explicit C++ type conversion that uses "functional" # notion (C++ (expr.type.conv)). - # + # Example: # \code # x = int(0.5); @@ -1424,7 +1376,7 @@ class TUResourceUsage < FFI::Struct # Represents the "this" expression in C++ # :cxx_throw_expr :: # (C++ 15) C++ Throw Expression. - # + # This handles 'throw' and 'throw' assignment-expression. When # assignment-expression isn't present, Op will be null. # :cxx_new_expr :: @@ -1446,17 +1398,17 @@ class TUResourceUsage < FFI::Struct # :obj_c_bridged_cast_expr :: # An Objective-C "bridged" cast expression, which casts between # Objective-C pointers and C pointers, transferring ownership in the process. - # + # \code # NSString *str = (__bridge_transfer NSString *)CFCreateString(); # \endcode # :pack_expansion_expr :: # Represents a C++0x pack expansion that produces a sequence of # expressions. - # + # A pack expansion expression contains a pattern (which itself is an # expression) followed by an ellipsis. For example: - # + # \code # template # void forward(F f, Types &&...args) { @@ -1466,7 +1418,7 @@ class TUResourceUsage < FFI::Struct # :size_of_pack_expr :: # Represents an expression that computes the length of a parameter # pack. - # + # \code # template # struct count { @@ -1478,24 +1430,24 @@ class TUResourceUsage < FFI::Struct # :unexposed_stmt :: # A statement whose specific kind is not exposed via this # interface. - # + # Unexposed statements have the same operations as any other kind of # statement; one can extract their location information, spelling, # children, etc. However, the specific kind of the statement is not # reported. # :label_stmt :: # A labelled statement in a function. - # + # This cursor kind is used to describe the "start_over:" label statement in # the following example: - # + # \code # start_over: # ++counter; # \endcode # :compound_stmt :: # A group of statements like { stmt stmt }. - # + # This cursor kind is used to describe compound statements, e.g. function # bodies. # :case_stmt :: @@ -1552,14 +1504,14 @@ class TUResourceUsage < FFI::Struct # Windows Structured Exception Handling's finally statement. # :null_stmt :: # The null satement ";": C99 6.8.3p3. - # + # This cursor kind is used to describe the null statement. # :decl_stmt :: # Adaptor class for mixing declarations with statements and # expressions. # :translation_unit :: # Cursor that represents the translation unit itself. - # + # The translation unit cursor exists primarily to act as the root # cursor for traversing the contents of a translation unit. # :first_attr :: @@ -1568,26 +1520,26 @@ class TUResourceUsage < FFI::Struct # An attribute whose specific kind is not exposed via this # interface. # :ib_action_attr :: - # + # :ib_outlet_attr :: - # + # :ib_outlet_collection_attr :: - # + # :cxx_final_attr :: - # + # :cxx_override_attr :: - # + # :annotate_attr :: - # + # :preprocessing_directive :: # Preprocessing # :macro_definition :: - # + # :macro_expansion :: - # + # :inclusion_directive :: - # - # + + # @method _enum_cursor_kind_ # @return [Symbol] # @scope class @@ -1738,173 +1690,158 @@ class TUResourceUsage < FFI::Struct :macro_expansion, 502, :inclusion_directive, 503 ] - + # A cursor representing some element in the abstract syntax tree for # a translation unit. - # + # The cursor abstraction unifies the different kinds of entities in a # program--declaration, statements, expressions, references to declarations, # etc.--under a single "cursor" abstraction with a common set of operations. # Common operation for a cursor include: getting the physical location in # a source file where the cursor points, getting the name associated with a # cursor, and retrieving cursors for any child nodes of a particular cursor. - # + # Cursors can be produced in two specific ways. # clang_getTranslationUnitCursor() produces a cursor for a translation unit, # from which one can use clang_visitChildren() to explore the rest of the # translation unit. clang_getCursor() maps from a physical source location # to the entity that resides at that location, allowing one to map from the # source code into the AST. - # + # = Fields: # :kind :: - # (Symbol from _enum_cursor_kind_) + # (Symbol from _enum_cursor_kind_) # :xdata :: - # (Integer) + # (Integer) # :data :: - # (Array) + # (Array) class Cursor < FFI::Struct layout :kind, :cursor_kind, :xdata, :int, :data, [:pointer, 3] end - + # Retrieve the NULL cursor, which represents no entity. - # + # @method get_null_cursor() - # @return [Cursor] + # @return [Cursor] # @scope class attach_function :get_null_cursor, :clang_getNullCursor, [], Cursor.by_value - # Retrieve the cursor that represents the given translation unit. - # + # The translation unit cursor can be used to start traversing the # various declarations within the given translation unit. - # + # @method get_translation_unit_cursor(translation_unit_impl) - # @param [TranslationUnitImpl] translation_unit_impl - # @return [Cursor] + # @param [TranslationUnitImpl] translation_unit_impl + # @return [Cursor] # @scope class attach_function :get_translation_unit_cursor, :clang_getTranslationUnitCursor, [TranslationUnitImpl], Cursor.by_value - # Determine whether two cursors are equivalent. - # + # @method equal_cursors(cursor, cursor) - # @param [Cursor] cursor - # @param [Cursor] cursor - # @return [Integer] + # @param [Cursor] cursor + # @param [Cursor] cursor + # @return [Integer] # @scope class attach_function :equal_cursors, :clang_equalCursors, [Cursor.by_value, Cursor.by_value], :uint - # Returns non-zero if \arg cursor is null. - # + # @method cursor_is_null(cursor) - # @param [Cursor] cursor - # @return [Integer] + # @param [Cursor] cursor + # @return [Integer] # @scope class attach_function :cursor_is_null, :clang_Cursor_isNull, [Cursor.by_value], :int - # Compute a hash value for the given cursor. - # + # @method hash_cursor(cursor) - # @param [Cursor] cursor - # @return [Integer] + # @param [Cursor] cursor + # @return [Integer] # @scope class attach_function :hash_cursor, :clang_hashCursor, [Cursor.by_value], :uint - # Retrieve the kind of the given cursor. - # + # @method get_cursor_kind(cursor) - # @param [Cursor] cursor - # @return [Symbol from _enum_cursor_kind_] + # @param [Cursor] cursor + # @return [Symbol from _enum_cursor_kind_] # @scope class attach_function :get_cursor_kind, :clang_getCursorKind, [Cursor.by_value], :cursor_kind - # Determine whether the given cursor kind represents a declaration. - # + # @method is_declaration(cursor_kind) - # @param [Symbol from _enum_cursor_kind_] cursor_kind - # @return [Integer] + # @param [Symbol from _enum_cursor_kind_] cursor_kind + # @return [Integer] # @scope class attach_function :is_declaration, :clang_isDeclaration, [:cursor_kind], :uint - # Determine whether the given cursor kind represents a simple # reference. - # + # Note that other kinds of cursors (such as expressions) can also refer to # other cursors. Use clang_getCursorReferenced() to determine whether a # particular cursor refers to another entity. - # + # @method is_reference(cursor_kind) - # @param [Symbol from _enum_cursor_kind_] cursor_kind - # @return [Integer] + # @param [Symbol from _enum_cursor_kind_] cursor_kind + # @return [Integer] # @scope class attach_function :is_reference, :clang_isReference, [:cursor_kind], :uint - # Determine whether the given cursor kind represents an expression. - # + # @method is_expression(cursor_kind) - # @param [Symbol from _enum_cursor_kind_] cursor_kind - # @return [Integer] + # @param [Symbol from _enum_cursor_kind_] cursor_kind + # @return [Integer] # @scope class attach_function :is_expression, :clang_isExpression, [:cursor_kind], :uint - # Determine whether the given cursor kind represents a statement. - # + # @method is_statement(cursor_kind) - # @param [Symbol from _enum_cursor_kind_] cursor_kind - # @return [Integer] + # @param [Symbol from _enum_cursor_kind_] cursor_kind + # @return [Integer] # @scope class attach_function :is_statement, :clang_isStatement, [:cursor_kind], :uint - # Determine whether the given cursor kind represents an attribute. - # + # @method is_attribute(cursor_kind) - # @param [Symbol from _enum_cursor_kind_] cursor_kind - # @return [Integer] + # @param [Symbol from _enum_cursor_kind_] cursor_kind + # @return [Integer] # @scope class attach_function :is_attribute, :clang_isAttribute, [:cursor_kind], :uint - # Determine whether the given cursor kind represents an invalid # cursor. - # + # @method is_invalid(cursor_kind) - # @param [Symbol from _enum_cursor_kind_] cursor_kind - # @return [Integer] + # @param [Symbol from _enum_cursor_kind_] cursor_kind + # @return [Integer] # @scope class attach_function :is_invalid, :clang_isInvalid, [:cursor_kind], :uint - # Determine whether the given cursor kind represents a translation # unit. - # + # @method is_translation_unit(cursor_kind) - # @param [Symbol from _enum_cursor_kind_] cursor_kind - # @return [Integer] + # @param [Symbol from _enum_cursor_kind_] cursor_kind + # @return [Integer] # @scope class attach_function :is_translation_unit, :clang_isTranslationUnit, [:cursor_kind], :uint - # Determine whether the given cursor represents a preprocessing # element, such as a preprocessor directive or macro instantiation. - # + # @method is_preprocessing(cursor_kind) - # @param [Symbol from _enum_cursor_kind_] cursor_kind - # @return [Integer] + # @param [Symbol from _enum_cursor_kind_] cursor_kind + # @return [Integer] # @scope class attach_function :is_preprocessing, :clang_isPreprocessing, [:cursor_kind], :uint - # Determine whether the given cursor represents a currently # unexposed piece of the AST (e.g., CXCursor_UnexposedStmt). - # + # @method is_unexposed(cursor_kind) - # @param [Symbol from _enum_cursor_kind_] cursor_kind - # @return [Integer] + # @param [Symbol from _enum_cursor_kind_] cursor_kind + # @return [Integer] # @scope class attach_function :is_unexposed, :clang_isUnexposed, [:cursor_kind], :uint - # Describe the linkage of the entity referred to by a cursor. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:linkage_kind). - # + # === Options: # :invalid :: # This value indicates that no linkage information is available @@ -1919,7 +1856,7 @@ class Cursor < FFI::Struct # in C++ anonymous namespaces. # :external :: # This is the linkage for entities with true, external linkage. - # + # @method _enum_linkage_kind_ # @return [Symbol] # @scope class @@ -1930,38 +1867,36 @@ class Cursor < FFI::Struct :unique_external, 3, :external, 4 ] - + # Determine the linkage of the entity referred to by a given cursor. - # + # @method get_cursor_linkage(cursor) - # @param [Cursor] cursor - # @return [Symbol from _enum_linkage_kind_] + # @param [Cursor] cursor + # @return [Symbol from _enum_linkage_kind_] # @scope class attach_function :get_cursor_linkage, :clang_getCursorLinkage, [Cursor.by_value], :linkage_kind - # Determine the availability of the entity that this cursor refers to. - # + # @method get_cursor_availability(cursor) # @param [Cursor] cursor The cursor to query. # @return [Symbol from _enum_availability_kind_] The availability of the cursor. # @scope class attach_function :get_cursor_availability, :clang_getCursorAvailability, [Cursor.by_value], :availability_kind - # Describe the "language" of the entity referred to by a cursor. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:language_kind). - # + # === Options: # :invalid :: - # + # :c :: - # + # :obj_c :: - # + # :c_plus_plus :: - # - # - # @method _enum_language_kind_ + + + # @method _enum_language_kind_ # @return [Symbol] # @scope class enum :language_kind, [ @@ -1970,77 +1905,71 @@ class Cursor < FFI::Struct :obj_c, 2, :c_plus_plus, 3 ] - + # Determine the "language" of the entity referred to by a given cursor. - # + # @method get_cursor_language(cursor) - # @param [Cursor] cursor - # @return [Symbol from _enum_language_kind_] + # @param [Cursor] cursor + # @return [Symbol from _enum_language_kind_] # @scope class attach_function :get_cursor_language, :clang_getCursorLanguage, [Cursor.by_value], :language_kind - # Returns the translation unit that a cursor originated from. - # + # @method cursor_get_translation_unit(cursor) - # @param [Cursor] cursor - # @return [TranslationUnitImpl] + # @param [Cursor] cursor + # @return [TranslationUnitImpl] # @scope class attach_function :cursor_get_translation_unit, :clang_Cursor_getTranslationUnit, [Cursor.by_value], TranslationUnitImpl - # A fast container representing a set of CXCursors. class CursorSetImpl < FFI::Struct layout :dummy, :char end - + # Creates an empty CXCursorSet. - # + # @method create_cx_cursor_set() - # @return [CursorSetImpl] + # @return [CursorSetImpl] # @scope class attach_function :create_cx_cursor_set, :clang_createCXCursorSet, [], CursorSetImpl - # Disposes a CXCursorSet and releases its associated memory. - # + # @method dispose_cx_cursor_set(cset) - # @param [CursorSetImpl] cset - # @return [nil] + # @param [CursorSetImpl] cset + # @return [nil] # @scope class attach_function :dispose_cx_cursor_set, :clang_disposeCXCursorSet, [CursorSetImpl], :void - # Queries a CXCursorSet to see if it contains a specific CXCursor. - # + # @method cx_cursor_set_contains(cset, cursor) - # @param [CursorSetImpl] cset - # @param [Cursor] cursor + # @param [CursorSetImpl] cset + # @param [Cursor] cursor # @return [Integer] non-zero if the set contains the specified cursor. # @scope class attach_function :cx_cursor_set_contains, :clang_CXCursorSet_contains, [CursorSetImpl, Cursor.by_value], :uint - # Inserts a CXCursor into a CXCursorSet. - # + # @method cx_cursor_set_insert(cset, cursor) - # @param [CursorSetImpl] cset - # @param [Cursor] cursor + # @param [CursorSetImpl] cset + # @param [Cursor] cursor # @return [Integer] zero if the CXCursor was already in the set, and non-zero otherwise. # @scope class attach_function :cx_cursor_set_insert, :clang_CXCursorSet_insert, [CursorSetImpl, Cursor.by_value], :uint - # Determine the semantic parent of the given cursor. - # + # The semantic parent of a cursor is the cursor that semantically contains # the given \p cursor. For many declarations, the lexical and semantic parents # are equivalent (the lexical parent is returned by # \c clang_getCursorLexicalParent()). They diverge when declarations or # definitions are provided out-of-line. For example: - # + # \code # class C { # void f(); # }; - # + # void C::f() { } # \endcode - # + # In the out-of-line definition of \c C::f, the semantic parent is the # the class \c C, of which this function is a member. The lexical parent is # the place where the declaration actually occurs in the source code; in this @@ -2050,35 +1979,34 @@ class CursorSetImpl < FFI::Struct # same entity may be different. Changing the semantic parent of a declaration, # on the other hand, can have a major impact on semantics, and redeclarations # of a particular entity should all have the same semantic context. - # + # In the example above, both declarations of \c C::f have \c C as their # semantic context, while the lexical context of the first \c C::f is \c C # and the lexical context of the second \c C::f is the translation unit. - # + # For global declarations, the semantic parent is the translation unit. - # + # @method get_cursor_semantic_parent(cursor) - # @param [Cursor] cursor - # @return [Cursor] + # @param [Cursor] cursor + # @return [Cursor] # @scope class attach_function :get_cursor_semantic_parent, :clang_getCursorSemanticParent, [Cursor.by_value], Cursor.by_value - # Determine the lexical parent of the given cursor. - # + # The lexical parent of a cursor is the cursor in which the given \p cursor # was actually written. For many declarations, the lexical and semantic parents # are equivalent (the semantic parent is returned by # \c clang_getCursorSemanticParent()). They diverge when declarations or # definitions are provided out-of-line. For example: - # + # \code # class C { # void f(); # }; - # + # void C::f() { } # \endcode - # + # In the out-of-line definition of \c C::f, the semantic parent is the # the class \c C, of which this function is a member. The lexical parent is # the place where the declaration actually occurs in the source code; in this @@ -2088,23 +2016,22 @@ class CursorSetImpl < FFI::Struct # same entity may be different. Changing the semantic parent of a declaration, # on the other hand, can have a major impact on semantics, and redeclarations # of a particular entity should all have the same semantic context. - # + # In the example above, both declarations of \c C::f have \c C as their # semantic context, while the lexical context of the first \c C::f is \c C # and the lexical context of the second \c C::f is the translation unit. - # + # For declarations written in the global scope, the lexical parent is # the translation unit. - # + # @method get_cursor_lexical_parent(cursor) - # @param [Cursor] cursor - # @return [Cursor] + # @param [Cursor] cursor + # @return [Cursor] # @scope class attach_function :get_cursor_lexical_parent, :clang_getCursorLexicalParent, [Cursor.by_value], Cursor.by_value - # Determine the set of methods that are overridden by the given # method. - # + # In both Objective-C and C++, a method (aka virtual member function, # in C++) can override a virtual method in a base class. For # Objective-C, a method is said to override any method in the class's @@ -2113,13 +2040,13 @@ class CursorSetImpl < FFI::Struct # kind (class or instance). If no such method exists, the search # continues to the class's superclass, its protocols, and its # categories, and so on. - # + # For C++, a virtual member function overrides any virtual member # function with the same signature that occurs in its base # classes. With multiple inheritance, a virtual member function can # override several virtual member functions coming from different # base classes. - # + # In all cases, this function determines the immediate overridden # method, rather than all of the overridden methods. For example, if # a method is originally declared in a class A, then overridden in B @@ -2128,7 +2055,7 @@ class CursorSetImpl < FFI::Struct # invoked on C's method will be B's method. The client may then # invoke this function again, given the previously-found overridden # methods, to map out the complete method-override set. - # + # @method get_overridden_cursors(cursor, overridden, num_overridden) # @param [Cursor] cursor A cursor representing an Objective-C or C++ # method. This routine will compute the set of methods that this @@ -2141,31 +2068,28 @@ class CursorSetImpl < FFI::Struct # @param [FFI::Pointer(*UInt)] num_overridden A pointer to the number of overridden # functions, will be set to the number of overridden functions in the # array pointed to by \p overridden. - # @return [nil] + # @return [nil] # @scope class attach_function :get_overridden_cursors, :clang_getOverriddenCursors, [Cursor.by_value, :pointer, :pointer], :void - # Free the set of overridden cursors returned by \c # clang_getOverriddenCursors(). - # + # @method dispose_overridden_cursors(overridden) - # @param [Cursor] overridden - # @return [nil] + # @param [Cursor] overridden + # @return [nil] # @scope class attach_function :dispose_overridden_cursors, :clang_disposeOverriddenCursors, [Cursor], :void - # Retrieve the file that is included by the given inclusion directive # cursor. - # + # @method get_included_file(cursor) - # @param [Cursor] cursor - # @return [FFI::Pointer(File)] + # @param [Cursor] cursor + # @return [FFI::Pointer(File)] # @scope class attach_function :get_included_file, :clang_getIncludedFile, [Cursor.by_value], :pointer - # Map a source location to the cursor that describes the entity at that # location in the source code. - # + # clang_getCursor() maps an arbitrary source location within a translation # unit down to the most specific cursor that describes the entity at that # location. For example, given an expression \c x + y, invoking @@ -2173,50 +2097,47 @@ class CursorSetImpl < FFI::Struct # cursor for "x"; similarly for "y". If the cursor points anywhere between # "x" or "y" (e.g., on the + or the whitespace around it), clang_getCursor() # will return a cursor referring to the "+" expression. - # + # @method get_cursor(translation_unit_impl, source_location) - # @param [TranslationUnitImpl] translation_unit_impl - # @param [SourceLocation] source_location + # @param [TranslationUnitImpl] translation_unit_impl + # @param [SourceLocation] source_location # @return [Cursor] a cursor representing the entity at the given source location, or # a NULL cursor if no such entity can be found. # @scope class attach_function :get_cursor, :clang_getCursor, [TranslationUnitImpl, SourceLocation.by_value], Cursor.by_value - # Retrieve the physical location of the source constructor referenced # by the given cursor. - # + # The location of a declaration is typically the location of the name of that # declaration, where the name of that declaration would occur if it is # unnamed, or some keyword that introduces that particular declaration. # The location of a reference is where that reference occurs within the # source code. - # + # @method get_cursor_location(cursor) - # @param [Cursor] cursor - # @return [SourceLocation] + # @param [Cursor] cursor + # @return [SourceLocation] # @scope class attach_function :get_cursor_location, :clang_getCursorLocation, [Cursor.by_value], SourceLocation.by_value - # Retrieve the physical extent of the source construct referenced by # the given cursor. - # + # The extent of a cursor starts with the file/line/column pointing at the # first character within the source construct that the cursor refers to and # ends with the last character withinin that source construct. For a # declaration, the extent covers the declaration itself. For a reference, # the extent covers the location of the reference (e.g., where the referenced # entity was actually used). - # + # @method get_cursor_extent(cursor) - # @param [Cursor] cursor - # @return [SourceRange] + # @param [Cursor] cursor + # @return [SourceRange] # @scope class attach_function :get_cursor_extent, :clang_getCursorExtent, [Cursor.by_value], SourceRange.by_value - # Describes the kind of type - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:type_kind). - # + # === Options: # :invalid :: # Reprents an invalid type (e.g., where no type is available). @@ -2226,86 +2147,86 @@ class CursorSetImpl < FFI::Struct # :void :: # Builtin types # :bool :: - # + # :char_u :: - # + # :u_char :: - # + # :char16 :: - # + # :char32 :: - # + # :u_short :: - # + # :u_int :: - # + # :u_long :: - # + # :u_long_long :: - # + # :u_int128 :: - # + # :char_s :: - # + # :s_char :: - # + # :w_char :: - # + # :short :: - # + # :int :: - # + # :long :: - # + # :long_long :: - # + # :int128 :: - # + # :float :: - # + # :double :: - # + # :long_double :: - # + # :null_ptr :: - # + # :overload :: - # + # :dependent :: - # + # :obj_c_id :: - # + # :obj_c_class :: - # + # :obj_c_sel :: - # + # :complex :: - # + # :pointer :: - # + # :block_pointer :: - # + # :l_value_reference :: - # + # :r_value_reference :: - # + # :record :: - # + # :enum :: - # + # :typedef :: - # + # :obj_c_interface :: - # + # :obj_c_object_pointer :: - # + # :function_no_proto :: - # + # :function_proto :: - # + # :constant_array :: - # - # + + # @method _enum_type_kind_ # @return [Symbol] # @scope class @@ -2354,179 +2275,163 @@ class CursorSetImpl < FFI::Struct :function_proto, 111, :constant_array, 112 ] - + # The type of an element in the abstract syntax tree. - # + # = Fields: # :kind :: - # (Symbol from _enum_type_kind_) + # (Symbol from _enum_type_kind_) # :data :: - # (Array) + # (Array) class Type < FFI::Struct layout :kind, :type_kind, :data, [:pointer, 2] end - + # Retrieve the type of a CXCursor (if any). - # + # @method get_cursor_type(c) - # @param [Cursor] c - # @return [Type] + # @param [Cursor] c + # @return [Type] # @scope class attach_function :get_cursor_type, :clang_getCursorType, [Cursor.by_value], Type.by_value - # Determine whether two CXTypes represent the same type. - # + # @method equal_types(a, b) - # @param [Type] a - # @param [Type] b + # @param [Type] a + # @param [Type] b # @return [Integer] non-zero if the CXTypes represent the same type and # zero otherwise. # @scope class attach_function :equal_types, :clang_equalTypes, [Type.by_value, Type.by_value], :uint - # Return the canonical type for a CXType. - # + # Clang's type system explicitly models typedefs and all the ways # a specific type can be represented. The canonical type is the underlying # type with all the "sugar" removed. For example, if 'T' is a typedef # for 'int', the canonical type for 'T' would be 'int'. - # + # @method get_canonical_type(t) - # @param [Type] t - # @return [Type] + # @param [Type] t + # @return [Type] # @scope class attach_function :get_canonical_type, :clang_getCanonicalType, [Type.by_value], Type.by_value - # Determine whether a CXType has the "const" qualifier set, # without looking through typedefs that may have added "const" at a different level. - # + # @method is_const_qualified_type(t) - # @param [Type] t - # @return [Integer] + # @param [Type] t + # @return [Integer] # @scope class attach_function :is_const_qualified_type, :clang_isConstQualifiedType, [Type.by_value], :uint - # Determine whether a CXType has the "volatile" qualifier set, # without looking through typedefs that may have added "volatile" at a different level. - # + # @method is_volatile_qualified_type(t) - # @param [Type] t - # @return [Integer] + # @param [Type] t + # @return [Integer] # @scope class attach_function :is_volatile_qualified_type, :clang_isVolatileQualifiedType, [Type.by_value], :uint - # Determine whether a CXType has the "restrict" qualifier set, # without looking through typedefs that may have added "restrict" at a different level. - # + # @method is_restrict_qualified_type(t) - # @param [Type] t - # @return [Integer] + # @param [Type] t + # @return [Integer] # @scope class attach_function :is_restrict_qualified_type, :clang_isRestrictQualifiedType, [Type.by_value], :uint - # For pointer types, returns the type of the pointee. - # + # @method get_pointee_type(t) - # @param [Type] t - # @return [Type] + # @param [Type] t + # @return [Type] # @scope class attach_function :get_pointee_type, :clang_getPointeeType, [Type.by_value], Type.by_value - # Return the cursor for the declaration of the given type. - # + # @method get_type_declaration(t) - # @param [Type] t - # @return [Cursor] + # @param [Type] t + # @return [Cursor] # @scope class attach_function :get_type_declaration, :clang_getTypeDeclaration, [Type.by_value], Cursor.by_value - # Returns the Objective-C type encoding for the specified declaration. - # + # @method get_decl_obj_c_type_encoding(c) - # @param [Cursor] c - # @return [String] + # @param [Cursor] c + # @return [String] # @scope class attach_function :get_decl_obj_c_type_encoding, :clang_getDeclObjCTypeEncoding, [Cursor.by_value], String.by_value - # Retrieve the spelling of a given CXTypeKind. - # + # @method get_type_kind_spelling(k) - # @param [Symbol from _enum_type_kind_] k - # @return [String] + # @param [Symbol from _enum_type_kind_] k + # @return [String] # @scope class attach_function :get_type_kind_spelling, :clang_getTypeKindSpelling, [:type_kind], String.by_value - # Retrieve the result type associated with a function type. - # + # @method get_result_type(t) - # @param [Type] t - # @return [Type] + # @param [Type] t + # @return [Type] # @scope class attach_function :get_result_type, :clang_getResultType, [Type.by_value], Type.by_value - # Retrieve the result type associated with a given cursor. This only # returns a valid type of the cursor refers to a function or method. - # + # @method get_cursor_result_type(c) - # @param [Cursor] c - # @return [Type] + # @param [Cursor] c + # @return [Type] # @scope class attach_function :get_cursor_result_type, :clang_getCursorResultType, [Cursor.by_value], Type.by_value - # Return 1 if the CXType is a POD (plain old data) type, and 0 # otherwise. - # + # @method is_pod_type(t) - # @param [Type] t - # @return [Integer] + # @param [Type] t + # @return [Integer] # @scope class attach_function :is_pod_type, :clang_isPODType, [Type.by_value], :uint - # Return the element type of an array type. - # + # If a non-array type is passed in, an invalid type is returned. - # + # @method get_array_element_type(t) - # @param [Type] t - # @return [Type] + # @param [Type] t + # @return [Type] # @scope class attach_function :get_array_element_type, :clang_getArrayElementType, [Type.by_value], Type.by_value - # Return the the array size of a constant array. - # + # If a non-array type is passed in, -1 is returned. - # + # @method get_array_size(t) - # @param [Type] t - # @return [Integer] + # @param [Type] t + # @return [Integer] # @scope class attach_function :get_array_size, :clang_getArraySize, [Type.by_value], :long_long - # Returns 1 if the base class specified by the cursor with kind # CX_CXXBaseSpecifier is virtual. - # + # @method is_virtual_base(cursor) - # @param [Cursor] cursor - # @return [Integer] + # @param [Cursor] cursor + # @return [Integer] # @scope class attach_function :is_virtual_base, :clang_isVirtualBase, [Cursor.by_value], :uint - # Represents the C++ access control level to a base class for a # cursor with kind CX_CXXBaseSpecifier. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:cxx_access_specifier). - # + # === Options: # :invalid_access_specifier :: - # + # :public :: - # + # :protected :: - # + # :private :: - # - # + + # @method _enum_cxx_access_specifier_ # @return [Symbol] # @scope class @@ -2536,30 +2441,28 @@ class Type < FFI::Struct :protected, 2, :private, 3 ] - + # Returns the access control level for the C++ base specifier # represented by a cursor with kind CXCursor_CXXBaseSpecifier or # CXCursor_AccessSpecifier. - # + # @method get_cxx_access_specifier(cursor) - # @param [Cursor] cursor - # @return [Symbol from _enum_cxx_access_specifier_] + # @param [Cursor] cursor + # @return [Symbol from _enum_cxx_access_specifier_] # @scope class attach_function :get_cxx_access_specifier, :clang_getCXXAccessSpecifier, [Cursor.by_value], :cxx_access_specifier - # Determine the number of overloaded declarations referenced by a # \c CXCursor_OverloadedDeclRef cursor. - # + # @method get_num_overloaded_decls(cursor) # @param [Cursor] cursor The cursor whose overloaded declarations are being queried. # @return [Integer] The number of overloaded declarations referenced by \c cursor. If it # is not a \c CXCursor_OverloadedDeclRef cursor, returns 0. # @scope class attach_function :get_num_overloaded_decls, :clang_getNumOverloadedDecls, [Cursor.by_value], :uint - # Retrieve a cursor for one of the overloaded declarations referenced # by a \c CXCursor_OverloadedDeclRef cursor. - # + # @method get_overloaded_decl(cursor, index) # @param [Cursor] cursor The cursor whose overloaded declarations are being queried. # @param [Integer] index The zero-based index into the set of overloaded declarations in @@ -2570,24 +2473,22 @@ class Type < FFI::Struct # returns \c clang_getNullCursor(); # @scope class attach_function :get_overloaded_decl, :clang_getOverloadedDecl, [Cursor.by_value, :uint], Cursor.by_value - # For cursors representing an iboutletcollection attribute, # this function returns the collection element type. - # + # @method get_ib_outlet_collection_type(cursor) - # @param [Cursor] cursor - # @return [Type] + # @param [Cursor] cursor + # @return [Type] # @scope class attach_function :get_ib_outlet_collection_type, :clang_getIBOutletCollectionType, [Cursor.by_value], Type.by_value - # Describes how the traversal of the children of a particular # cursor should proceed after visiting a particular child cursor. - # + # A value of this enumeration type should be returned by each # \c CXCursorVisitor to indicate how clang_visitChildren() proceed. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:child_visit_result). - # + # === Options: # :break_ :: # Terminates the cursor traversal. @@ -2597,7 +2498,7 @@ class Type < FFI::Struct # :recurse :: # Recursively traverse the children of this cursor, using # the same visitor and client data. - # + # @method _enum_child_visit_result_ # @return [Symbol] # @scope class @@ -2606,170 +2507,160 @@ class Type < FFI::Struct :continue, 1, :recurse, 2 ] - + # Visitor invoked for each cursor found by a traversal. - # + # This visitor function will be invoked for each cursor found by # clang_visitCursorChildren(). Its first argument is the cursor being # visited, its second argument is the parent visitor for that cursor, # and its third argument is the client data provided to # clang_visitCursorChildren(). - # + # The visitor should return one of the \c CXChildVisitResult values # to direct clang_visitCursorChildren(). - # + # This entry is only for documentation and no real method. - # - # @method _callback_cursor_visitor_(cursor, parent, client_data) - # @param [Cursor] cursor - # @param [Cursor] parent - # @param [FFI::Pointer(ClientData)] client_data - # @return [Symbol from _enum_child_visit_result_] - # @scope class - callback :cursor_visitor, [Cursor.by_value, Cursor.by_value, :pointer], :child_visit_result - + + # @method _callback_cursor_visitor_(enum cx_child_visit_result, cursor, parent, client_data) + # @param [Symbol from _enum_child_visit_result_] enum cx_child_visit_result + # @param [Cursor] cursor + # @param [Cursor] parent + # @param [FFI::Pointer(ClientData)] client_data + # @return [Symbol from _enum_child_visit_result_] + # @scope class + callback :cursor_visitor, [:child_visit_result, Cursor.by_value, Cursor.by_value, :pointer], :child_visit_result + # Visit the children of a particular cursor. - # + # This function visits all the direct children of the given cursor, # invoking the given \p visitor function with the cursors of each # visited child. The traversal may be recursive, if the visitor returns # \c CXChildVisit_Recurse. The traversal may also be ended prematurely, if # the visitor returns \c CXChildVisit_Break. - # + # @method visit_children(parent, visitor, client_data) # @param [Cursor] parent the cursor whose child may be visited. All kinds of # cursors can be visited, including invalid cursors (which, by # definition, have no children). - # @param [Proc(_callback_cursor_visitor_)] visitor the visitor function that will be invoked for each + # @param [FFI::Pointer(CursorVisitor)] visitor the visitor function that will be invoked for each # child of \p parent. # @param [FFI::Pointer(ClientData)] client_data pointer data supplied by the client, which will # be passed to the visitor each time it is invoked. # @return [Integer] a non-zero value if the traversal was terminated # prematurely by the visitor returning \c CXChildVisit_Break. # @scope class - attach_function :visit_children, :clang_visitChildren, [Cursor.by_value, :cursor_visitor, :pointer], :uint - + attach_function :visit_children, :clang_visitChildren, [Cursor.by_value, :pointer, :pointer], :uint # Retrieve a Unified Symbol Resolution (USR) for the entity referenced # by the given cursor. - # + # A Unified Symbol Resolution (USR) is a string that identifies a particular # entity (function, class, variable, etc.) within a program. USRs can be # compared across translation units to determine, e.g., when references in # one translation refer to an entity defined in another translation unit. - # + # @method get_cursor_usr(cursor) - # @param [Cursor] cursor - # @return [String] + # @param [Cursor] cursor + # @return [String] # @scope class attach_function :get_cursor_usr, :clang_getCursorUSR, [Cursor.by_value], String.by_value - # Construct a USR for a specified Objective-C class. - # + # @method construct_usr_obj_c_class(class_name) - # @param [String] class_name - # @return [String] + # @param [String] class_name + # @return [String] # @scope class attach_function :construct_usr_obj_c_class, :clang_constructUSR_ObjCClass, [:string], String.by_value - # Construct a USR for a specified Objective-C category. - # + # @method construct_usr_obj_c_category(class_name, category_name) - # @param [String] class_name - # @param [String] category_name - # @return [String] + # @param [String] class_name + # @param [String] category_name + # @return [String] # @scope class attach_function :construct_usr_obj_c_category, :clang_constructUSR_ObjCCategory, [:string, :string], String.by_value - # Construct a USR for a specified Objective-C protocol. - # + # @method construct_usr_obj_c_protocol(protocol_name) - # @param [String] protocol_name - # @return [String] + # @param [String] protocol_name + # @return [String] # @scope class attach_function :construct_usr_obj_c_protocol, :clang_constructUSR_ObjCProtocol, [:string], String.by_value - # Construct a USR for a specified Objective-C instance variable and # the USR for its containing class. - # + # @method construct_usr_obj_c_ivar(name, class_usr) - # @param [String] name - # @param [String] class_usr - # @return [String] + # @param [String] name + # @param [String] class_usr + # @return [String] # @scope class attach_function :construct_usr_obj_c_ivar, :clang_constructUSR_ObjCIvar, [:string, String.by_value], String.by_value - # Construct a USR for a specified Objective-C method and # the USR for its containing class. - # + # @method construct_usr_obj_c_method(name, is_instance_method, class_usr) - # @param [String] name - # @param [Integer] is_instance_method - # @param [String] class_usr - # @return [String] + # @param [String] name + # @param [Integer] is_instance_method + # @param [String] class_usr + # @return [String] # @scope class attach_function :construct_usr_obj_c_method, :clang_constructUSR_ObjCMethod, [:string, :uint, String.by_value], String.by_value - # Construct a USR for a specified Objective-C property and the USR # for its containing class. - # + # @method construct_usr_obj_c_property(property, class_usr) - # @param [String] property - # @param [String] class_usr - # @return [String] + # @param [String] property + # @param [String] class_usr + # @return [String] # @scope class attach_function :construct_usr_obj_c_property, :clang_constructUSR_ObjCProperty, [:string, String.by_value], String.by_value - # Retrieve a name for the entity referenced by this cursor. - # + # @method get_cursor_spelling(cursor) - # @param [Cursor] cursor - # @return [String] + # @param [Cursor] cursor + # @return [String] # @scope class attach_function :get_cursor_spelling, :clang_getCursorSpelling, [Cursor.by_value], String.by_value - # Retrieve the display name for the entity referenced by this cursor. - # + # The display name contains extra information that helps identify the cursor, # such as the parameters of a function or template or the arguments of a # class template specialization. - # + # @method get_cursor_display_name(cursor) - # @param [Cursor] cursor - # @return [String] + # @param [Cursor] cursor + # @return [String] # @scope class attach_function :get_cursor_display_name, :clang_getCursorDisplayName, [Cursor.by_value], String.by_value - # For a cursor that is a reference, retrieve a cursor representing the # entity that it references. - # + # Reference cursors refer to other entities in the AST. For example, an # Objective-C superclass reference cursor refers to an Objective-C class. # This function produces the cursor for the Objective-C class from the # cursor for the superclass reference. If the input cursor is a declaration or # definition, it returns that declaration or definition unchanged. # Otherwise, returns the NULL cursor. - # + # @method get_cursor_referenced(cursor) - # @param [Cursor] cursor - # @return [Cursor] + # @param [Cursor] cursor + # @return [Cursor] # @scope class attach_function :get_cursor_referenced, :clang_getCursorReferenced, [Cursor.by_value], Cursor.by_value - # For a cursor that is either a reference to or a declaration # of some entity, retrieve a cursor that describes the definition of # that entity. - # + # Some entities can be declared multiple times within a translation # unit, but only one of those declarations can also be a # definition. For example, given: - # + # \code # int f(int, int); # int g(int x, int y) { return f(x, y); } # int f(int a, int b) { return a + b; } # int f(int, int); # \endcode - # + # there are three declarations of the function "f", but only the # second one is a definition. The clang_getCursorDefinition() # function will take any cursor pointing to a declaration of "f" @@ -2777,32 +2668,30 @@ class Type < FFI::Struct # that uses "f" (the call to "f' inside "g") and will return a # declaration cursor pointing to the definition (the second "f" # declaration). - # + # If given a cursor for which there is no corresponding definition, # e.g., because there is no definition of that entity within this # translation unit, returns a NULL cursor. - # + # @method get_cursor_definition(cursor) - # @param [Cursor] cursor - # @return [Cursor] + # @param [Cursor] cursor + # @return [Cursor] # @scope class attach_function :get_cursor_definition, :clang_getCursorDefinition, [Cursor.by_value], Cursor.by_value - # Determine whether the declaration pointed to by this cursor # is also a definition of that entity. - # + # @method is_cursor_definition(cursor) - # @param [Cursor] cursor - # @return [Integer] + # @param [Cursor] cursor + # @return [Integer] # @scope class attach_function :is_cursor_definition, :clang_isCursorDefinition, [Cursor.by_value], :uint - # Retrieve the canonical cursor corresponding to the given cursor. - # + # In the C family of languages, many kinds of entities can be declared several # times within a single translation unit. For example, a structure type can # be forward-declared (possibly multiple times) and later defined: - # + # \code # struct X; # struct X; @@ -2810,48 +2699,45 @@ class Type < FFI::Struct # int member; # }; # \endcode - # + # The declarations and the definition of \c X are represented by three # different cursors, all of which are declarations of the same underlying # entity. One of these cursor is considered the "canonical" cursor, which # is effectively the representative for the underlying entity. One can # determine if two cursors are declarations of the same underlying entity by # comparing their canonical cursors. - # + # @method get_canonical_cursor(cursor) - # @param [Cursor] cursor + # @param [Cursor] cursor # @return [Cursor] The canonical cursor for the entity referred to by the given cursor. # @scope class attach_function :get_canonical_cursor, :clang_getCanonicalCursor, [Cursor.by_value], Cursor.by_value - # Determine if a C++ member function or member function template is # declared 'static'. - # + # @method cxx_method_is_static(c) - # @param [Cursor] c - # @return [Integer] + # @param [Cursor] c + # @return [Integer] # @scope class attach_function :cxx_method_is_static, :clang_CXXMethod_isStatic, [Cursor.by_value], :uint - # Determine if a C++ member function or member function template is # explicitly declared 'virtual' or if it overrides a virtual method from # one of the base classes. - # + # @method cxx_method_is_virtual(c) - # @param [Cursor] c - # @return [Integer] + # @param [Cursor] c + # @return [Integer] # @scope class attach_function :cxx_method_is_virtual, :clang_CXXMethod_isVirtual, [Cursor.by_value], :uint - # Given a cursor that represents a template, determine # the cursor kind of the specializations would be generated by instantiating # the template. - # + # This routine can be used to determine what flavor of function template, # class template, or class template partial specialization is stored in the # cursor. For example, it can describe whether a class template cursor is # declared with "struct", "class" or "union". - # + # @method get_template_cursor_kind(c) # @param [Cursor] c The cursor to query. This cursor should represent a template # declaration. @@ -2860,11 +2746,10 @@ class Type < FFI::Struct # \c CXCursor_NoDeclFound. # @scope class attach_function :get_template_cursor_kind, :clang_getTemplateCursorKind, [Cursor.by_value], :cursor_kind - # Given a cursor that may represent a specialization or instantiation # of a template, retrieve the cursor that represents the template that it # specializes or from which it was instantiated. - # + # This routine determines the template involved both for explicit # specializations of templates and for implicit instantiations of the template, # both of which are referred to as "specializations". For a class template @@ -2874,13 +2759,13 @@ class Type < FFI::Struct # partial specialization. For a class template partial specialization and a # function template specialization (including instantiations), this # this routine will return the specialized template. - # + # For members of a class template (e.g., member functions, member classes, or # static data members), returns the specialized or instantiated member. # Although not strictly "templates" in the C++ language, members of class # templates have the same notions of specializations and instantiations that # templates do, so this routine treats them similarly. - # + # @method get_specialized_cursor_template(c) # @param [Cursor] c A cursor that may be a specialization of a template or a member # of a template. @@ -2889,10 +2774,9 @@ class Type < FFI::Struct # from which it was instantiated. Otherwise, returns a NULL cursor. # @scope class attach_function :get_specialized_cursor_template, :clang_getSpecializedCursorTemplate, [Cursor.by_value], Cursor.by_value - # Given a cursor that references something else, return the source range # covering that reference. - # + # @method get_cursor_reference_name_range(c, name_flags, piece_index) # @param [Cursor] c A cursor pointing to a member reference, a declaration reference, or # an operator call. @@ -2908,11 +2792,10 @@ class Type < FFI::Struct # name, or if the PieceIndex is out-of-range, a null-cursor will be returned. # @scope class attach_function :get_cursor_reference_name_range, :clang_getCursorReferenceNameRange, [Cursor.by_value, :uint, :uint], SourceRange.by_value - # (Not documented) - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:name_ref_flags). - # + # === Options: # :range_want_qualifier :: # Include the nested-name-specifier, e.g. Foo:: in x.Foo::y, in the @@ -2922,14 +2805,14 @@ class Type < FFI::Struct # the range. # :range_want_single_piece :: # If the name is non-contiguous, return the full spanning range. - # + # Non-contiguous names occur in Objective-C when a selector with two or more # parameters is used, or in C++ when using an operator: # \code # (object doSomething:here withValue:there); // ObjC # return some_vector(1); // C++ # \endcode - # + # @method _enum_name_ref_flags_ # @return [Symbol] # @scope class @@ -2938,11 +2821,11 @@ class Type < FFI::Struct :range_want_template_args, 2, :range_want_single_piece, 4 ] - + # Describes a kind of token. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:token_kind). - # + # === Options: # :punctuation :: # A token that contains some kind of punctuation. @@ -2954,7 +2837,7 @@ class Type < FFI::Struct # A numeric, string, or character literal. # :comment :: # A comment. - # + # @method _enum_token_kind_ # @return [Symbol] # @scope class @@ -2965,60 +2848,56 @@ class Type < FFI::Struct :literal, 3, :comment, 4 ] - + # Describes a single preprocessing token. - # + # = Fields: # :int_data :: - # (Array) + # (Array) # :ptr_data :: - # (FFI::Pointer(*Void)) + # (FFI::Pointer(*Void)) class Token < FFI::Struct layout :int_data, [:uint, 4], :ptr_data, :pointer end - + # Determine the kind of the given token. - # + # @method get_token_kind(token) - # @param [Token] token - # @return [Symbol from _enum_token_kind_] + # @param [Token] token + # @return [Symbol from _enum_token_kind_] # @scope class attach_function :get_token_kind, :clang_getTokenKind, [Token.by_value], :token_kind - # Determine the spelling of the given token. - # + # The spelling of a token is the textual representation of that token, e.g., # the text of an identifier or keyword. - # + # @method get_token_spelling(translation_unit_impl, token) - # @param [TranslationUnitImpl] translation_unit_impl - # @param [Token] token - # @return [String] + # @param [TranslationUnitImpl] translation_unit_impl + # @param [Token] token + # @return [String] # @scope class attach_function :get_token_spelling, :clang_getTokenSpelling, [TranslationUnitImpl, Token.by_value], String.by_value - # Retrieve the source location of the given token. - # + # @method get_token_location(translation_unit_impl, token) - # @param [TranslationUnitImpl] translation_unit_impl - # @param [Token] token - # @return [SourceLocation] + # @param [TranslationUnitImpl] translation_unit_impl + # @param [Token] token + # @return [SourceLocation] # @scope class attach_function :get_token_location, :clang_getTokenLocation, [TranslationUnitImpl, Token.by_value], SourceLocation.by_value - # Retrieve a source range that covers the given token. - # + # @method get_token_extent(translation_unit_impl, token) - # @param [TranslationUnitImpl] translation_unit_impl - # @param [Token] token - # @return [SourceRange] + # @param [TranslationUnitImpl] translation_unit_impl + # @param [Token] token + # @return [SourceRange] # @scope class attach_function :get_token_extent, :clang_getTokenExtent, [TranslationUnitImpl, Token.by_value], SourceRange.by_value - # Tokenize the source code described by the given range into raw # lexical tokens. - # + # @method tokenize(tu, range, tokens, num_tokens) # @param [TranslationUnitImpl] tu the translation unit whose text is being tokenized. # @param [SourceRange] range the source range in which text should be tokenized. All of the @@ -3028,99 +2907,92 @@ class Token < FFI::Struct # freed with clang_disposeTokens() before the translation unit is destroyed. # @param [FFI::Pointer(*UInt)] num_tokens will be set to the number of tokens in the \c *Tokens # array. - # @return [nil] + # @return [nil] # @scope class attach_function :tokenize, :clang_tokenize, [TranslationUnitImpl, SourceRange.by_value, :pointer, :pointer], :void - # Annotate the given set of tokens by providing cursors for each token # that can be mapped to a specific entity within the abstract syntax tree. - # + # This token-annotation routine is equivalent to invoking # clang_getCursor() for the source locations of each of the # tokens. The cursors provided are filtered, so that only those # cursors that have a direct correspondence to the token are # accepted. For example, given a function call \c f(x), # clang_getCursor() would provide the following cursors: - # + # * when the cursor is over the 'f', a DeclRefExpr cursor referring to 'f'. # * when the cursor is over the '(' or the ')', a CallExpr referring to 'f'. # * when the cursor is over the 'x', a DeclRefExpr cursor referring to 'x'. - # + # Only the first and last of these cursors will occur within the # annotate, since the tokens "f" and "x' directly refer to a function # and a variable, respectively, but the parentheses are just a small # part of the full syntax of the function call expression, which is # not provided as an annotation. - # + # @method annotate_tokens(tu, tokens, num_tokens, cursors) # @param [TranslationUnitImpl] tu the translation unit that owns the given tokens. # @param [Token] tokens the set of tokens to annotate. # @param [Integer] num_tokens the number of tokens in \p Tokens. # @param [Cursor] cursors an array of \p NumTokens cursors, whose contents will be # replaced with the cursors corresponding to each token. - # @return [nil] + # @return [nil] # @scope class attach_function :annotate_tokens, :clang_annotateTokens, [TranslationUnitImpl, Token, :uint, Cursor], :void - # Free the given set of tokens. - # + # @method dispose_tokens(tu, tokens, num_tokens) - # @param [TranslationUnitImpl] tu - # @param [Token] tokens - # @param [Integer] num_tokens - # @return [nil] + # @param [TranslationUnitImpl] tu + # @param [Token] tokens + # @param [Integer] num_tokens + # @return [nil] # @scope class attach_function :dispose_tokens, :clang_disposeTokens, [TranslationUnitImpl, Token, :uint], :void - # for debug/testing - # + # @method get_cursor_kind_spelling(kind) - # @param [Symbol from _enum_cursor_kind_] kind - # @return [String] + # @param [Symbol from _enum_cursor_kind_] kind + # @return [String] # @scope class attach_function :get_cursor_kind_spelling, :clang_getCursorKindSpelling, [:cursor_kind], String.by_value - # (Not documented) - # + # @method get_definition_spelling_and_extent(cursor, start_buf, end_buf, start_line, start_column, end_line, end_column) - # @param [Cursor] cursor - # @param [FFI::Pointer(**CharS)] start_buf - # @param [FFI::Pointer(**CharS)] end_buf - # @param [FFI::Pointer(*UInt)] start_line - # @param [FFI::Pointer(*UInt)] start_column - # @param [FFI::Pointer(*UInt)] end_line - # @param [FFI::Pointer(*UInt)] end_column - # @return [nil] + # @param [Cursor] cursor + # @param [FFI::Pointer(**CharS)] start_buf + # @param [FFI::Pointer(**CharS)] end_buf + # @param [FFI::Pointer(*UInt)] start_line + # @param [FFI::Pointer(*UInt)] start_column + # @param [FFI::Pointer(*UInt)] end_line + # @param [FFI::Pointer(*UInt)] end_column + # @return [nil] # @scope class attach_function :get_definition_spelling_and_extent, :clang_getDefinitionSpellingAndExtent, [Cursor.by_value, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :void - # (Not documented) - # + # @method enable_stack_traces() - # @return [nil] + # @return [nil] # @scope class attach_function :enable_stack_traces, :clang_enableStackTraces, [], :void - # (Not documented) - # + # @method execute_on_thread(fn, user_data, stack_size) - # @param [FFI::Pointer(*)] fn - # @param [FFI::Pointer(*Void)] user_data - # @param [Integer] stack_size - # @return [nil] + # @param [FFI::Pointer(*FunctionProto)] fn + # @param [FFI::Pointer(*Void)] user_data + # @param [Integer] stack_size + # @return [nil] # @scope class attach_function :execute_on_thread, :clang_executeOnThread, [:pointer, :pointer, :uint], :void - # A single result of code completion. - # + # = Fields: # :cursor_kind :: # (Symbol from _enum_cursor_kind_) The kind of entity that this completion refers to. - # + # The cursor kind will be a macro, keyword, or a declaration (one of the # *Decl cursor kinds), describing the entity that the completion is # referring to. - # + # \todo In the future, we would like to provide a full cursor, to allow # the client to extract additional information from declaration. # :completion_string :: @@ -3130,31 +3002,31 @@ class CompletionResult < FFI::Struct layout :cursor_kind, :cursor_kind, :completion_string, :pointer end - + # Describes a single piece of text within a code-completion string. - # + # Each "chunk" within a code-completion string (\c CXCompletionString) is # either a piece of text with a specific "kind" that describes how that text # should be interpreted by the client or is another completion string. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:completion_chunk_kind). - # + # === Options: # :optional :: # A code-completion string that describes "optional" text that # could be a part of the template (but is not required). - # + # The Optional chunk is the only kind of chunk that has a code-completion # string for its representation, which is accessible via # \c clang_getCompletionChunkCompletionString(). The code-completion string # describes an additional part of the template that is completely optional. # For example, optional chunks can be used to describe the placeholders for # arguments that match up with defaulted function parameters, e.g. given: - # + # \code # void f(int x, float y = 3.14, double z = 2.71828); # \endcode - # + # The code-completion string for this function would contain: # - a TypedText chunk for "f". # - a LeftParen chunk for "(". @@ -3166,7 +3038,7 @@ class CompletionResult < FFI::Struct # - a Comma chunk for "," # - a Placeholder chunk for "double z" # - a RightParen chunk for ")" - # + # There are many ways to handle Optional chunks. Two simple approaches are: # - Completely ignore optional chunks, in which case the template for the # function "f" would only include the first parameter ("int x"). @@ -3175,7 +3047,7 @@ class CompletionResult < FFI::Struct # :typed_text :: # Text that a user would be expected to type to get this # code-completion result. - # + # There will be exactly one "typed text" chunk in a semantic string, which # will typically provide the spelling of a keyword or the name of a # declaration that could be used at the current code point. Clients are @@ -3183,13 +3055,13 @@ class CompletionResult < FFI::Struct # chunk. # :text :: # Text that should be inserted as part of a code-completion result. - # + # A "text" chunk represents text that is part of the template to be # inserted into user code should this particular code-completion result # be selected. # :placeholder :: # Placeholder text that should be replaced by the user. - # + # A "placeholder" chunk marks a place where the user should insert text # into the code-completion template. For example, placeholders might mark # the function parameters for a function declaration, to indicate that the @@ -3199,7 +3071,7 @@ class CompletionResult < FFI::Struct # :informative :: # Informative text that should be displayed but never inserted as # part of the template. - # + # An "informative" chunk contains annotations that can be displayed to # help the user decide whether a particular code-completion result is the # right option, but which is not part of the actual template to be inserted @@ -3207,15 +3079,15 @@ class CompletionResult < FFI::Struct # :current_parameter :: # Text that describes the current parameter when code-completion is # referring to function call, message send, or template specialization. - # + # A "current parameter" chunk occurs when code-completion is providing # information about a parameter corresponding to the argument at the # code-completion point. For example, given a function - # + # \code # int add(int x, int y); # \endcode - # + # and the source code \c add(, where the code-completion point is after the # "(", the code-completion string will contain a "current parameter" chunk # for "int x", indicating that the current argument will initialize that @@ -3244,7 +3116,7 @@ class CompletionResult < FFI::Struct # A comma separator (','). # :result_type :: # Text that specifies the result type of a given result. - # + # This special kind of informative chunk is not meant to be inserted into # the text buffer. Rather, it is meant to illustrate the type that an # expression using the given completion string would have. @@ -3259,7 +3131,7 @@ class CompletionResult < FFI::Struct # :vertical_space :: # Vertical space ('\n'), after which it is generally a good idea to # perform indentation. - # + # @method _enum_completion_chunk_kind_ # @return [Symbol] # @scope class @@ -3286,29 +3158,27 @@ class CompletionResult < FFI::Struct :horizontal_space, 19, :vertical_space, 20 ] - + # Determine the kind of a particular chunk within a completion string. - # + # @method get_completion_chunk_kind(completion_string, chunk_number) # @param [FFI::Pointer(CompletionString)] completion_string the completion string to query. # @param [Integer] chunk_number the 0-based index of the chunk in the completion string. # @return [Symbol from _enum_completion_chunk_kind_] the kind of the chunk at the index \c chunk_number. # @scope class attach_function :get_completion_chunk_kind, :clang_getCompletionChunkKind, [:pointer, :uint], :completion_chunk_kind - # Retrieve the text associated with a particular chunk within a # completion string. - # + # @method get_completion_chunk_text(completion_string, chunk_number) # @param [FFI::Pointer(CompletionString)] completion_string the completion string to query. # @param [Integer] chunk_number the 0-based index of the chunk in the completion string. # @return [String] the text associated with the chunk at index \c chunk_number. # @scope class attach_function :get_completion_chunk_text, :clang_getCompletionChunkText, [:pointer, :uint], String.by_value - # Retrieve the completion string associated with a particular chunk # within a completion string. - # + # @method get_completion_chunk_completion_string(completion_string, chunk_number) # @param [FFI::Pointer(CompletionString)] completion_string the completion string to query. # @param [Integer] chunk_number the 0-based index of the chunk in the completion string. @@ -3316,49 +3186,44 @@ class CompletionResult < FFI::Struct # \c chunk_number. # @scope class attach_function :get_completion_chunk_completion_string, :clang_getCompletionChunkCompletionString, [:pointer, :uint], :pointer - # Retrieve the number of chunks in the given code-completion string. - # + # @method get_num_completion_chunks(completion_string) - # @param [FFI::Pointer(CompletionString)] completion_string - # @return [Integer] + # @param [FFI::Pointer(CompletionString)] completion_string + # @return [Integer] # @scope class attach_function :get_num_completion_chunks, :clang_getNumCompletionChunks, [:pointer], :uint - # Determine the priority of this code completion. - # + # The priority of a code completion indicates how likely it is that this # particular completion is the completion that the user will select. The # priority is selected by various internal heuristics. - # + # @method get_completion_priority(completion_string) # @param [FFI::Pointer(CompletionString)] completion_string The completion string to query. # @return [Integer] The priority of this completion string. Smaller values indicate # higher-priority (more likely) completions. # @scope class attach_function :get_completion_priority, :clang_getCompletionPriority, [:pointer], :uint - # Determine the availability of the entity that this code-completion # string refers to. - # + # @method get_completion_availability(completion_string) # @param [FFI::Pointer(CompletionString)] completion_string The completion string to query. # @return [Symbol from _enum_availability_kind_] The availability of the completion string. # @scope class attach_function :get_completion_availability, :clang_getCompletionAvailability, [:pointer], :availability_kind - # Retrieve the number of annotations associated with the given # completion string. - # + # @method get_completion_num_annotations(completion_string) # @param [FFI::Pointer(CompletionString)] completion_string the completion string to query. # @return [Integer] the number of annotations associated with the given completion # string. # @scope class attach_function :get_completion_num_annotations, :clang_getCompletionNumAnnotations, [:pointer], :uint - # Retrieve the annotation associated with the given completion string. - # + # @method get_completion_annotation(completion_string, annotation_number) # @param [FFI::Pointer(CompletionString)] completion_string the completion string to query. # @param [Integer] annotation_number the 0-based index of the annotation of the @@ -3367,23 +3232,21 @@ class CompletionResult < FFI::Struct # \c annotation_number, or a NULL string if that annotation is not available. # @scope class attach_function :get_completion_annotation, :clang_getCompletionAnnotation, [:pointer, :uint], String.by_value - # Retrieve a completion string for an arbitrary declaration or macro # definition cursor. - # + # @method get_cursor_completion_string(cursor) # @param [Cursor] cursor The cursor to query. # @return [FFI::Pointer(CompletionString)] A non-context-sensitive completion string for declaration and macro # definition cursors, or NULL for other kinds of cursors. # @scope class attach_function :get_cursor_completion_string, :clang_getCursorCompletionString, [Cursor.by_value], :pointer - # Contains the results of code-completion. - # + # This data structure contains the results of code completion, as # produced by \c clang_codeCompleteAt(). Its contents must be freed by # \c clang_disposeCodeCompleteResults. - # + # = Fields: # :results :: # (CompletionResult) The code-completion results. @@ -3394,15 +3257,15 @@ class CodeCompleteResults < FFI::Struct layout :results, CompletionResult, :num_results, :uint end - + # Flags that can be passed to \c clang_codeCompleteAt() to # modify its behavior. - # + # The enumerators in this enumeration can be bitwise-OR'd together to # provide multiple options to \c clang_codeCompleteAt(). - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:code_complete_flags). - # + # === Options: # :include_macros :: # Whether to include macros within the set of code @@ -3410,7 +3273,7 @@ class CodeCompleteResults < FFI::Struct # :include_code_patterns :: # Whether to include code patterns for language constructs # within the set of code completions, e.g., for loops. - # + # @method _enum_code_complete_flags_ # @return [Symbol] # @scope class @@ -3418,14 +3281,14 @@ class CodeCompleteResults < FFI::Struct :include_macros, 1, :include_code_patterns, 2 ] - + # Bits that represent the context under which completion is occurring. - # + # The enumerators in this enumeration may be bitwise-OR'd together if multiple # contexts are occurring simultaneously. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:completion_context). - # + # === Options: # :unexposed :: # The context for completions is unexposed, as only Clang results @@ -3492,7 +3355,7 @@ class CodeCompleteResults < FFI::Struct # Natural language completions should be included in the results. # :unknown :: # The current context is unknown, so set all contexts. - # + # @method _enum_completion_context_ # @return [Symbol] # @scope class @@ -3522,17 +3385,16 @@ class CodeCompleteResults < FFI::Struct :natural_language, 2097152, :unknown, 4194303 ] - + # Returns a default set of code-completion options that can be # passed to\c clang_codeCompleteAt(). - # + # @method default_code_complete_options() - # @return [Integer] + # @return [Integer] # @scope class attach_function :default_code_complete_options, :clang_defaultCodeCompleteOptions, [], :uint - # Perform code completion at a given location in a translation unit. - # + # This function performs code completion at a particular file, line, and # column within source code, providing results that suggest potential # code snippets based on the context of the completion. The basic model @@ -3543,7 +3405,7 @@ class CodeCompleteResults < FFI::Struct # current location in the C/Objective-C/C++ grammar and the state of # semantic analysis, what completions to provide. These completions are # returned via a new \c CXCodeCompleteResults structure. - # + # Code completion itself is meant to be triggered by the client when the # user types punctuation characters or whitespace, at which point the # code-completion location will coincide with the cursor. For example, if \c p @@ -3560,7 +3422,7 @@ class CodeCompleteResults < FFI::Struct # is to separate the relatively high-latency acquisition of code-completion # results from the filtering of results on a per-character basis, which must # have a lower latency. - # + # @method code_complete_at(tu, complete_filename, complete_line, complete_column, unsaved_files, num_unsaved_files, options) # @param [TranslationUnitImpl] tu The translation unit in which code-completion should # occur. The source files for this translation unit need not be @@ -3593,36 +3455,32 @@ class CodeCompleteResults < FFI::Struct # completion fails, returns NULL. # @scope class attach_function :code_complete_at, :clang_codeCompleteAt, [TranslationUnitImpl, :string, :uint, :uint, UnsavedFile, :uint, :uint], CodeCompleteResults - # Sort the code-completion results in case-insensitive alphabetical # order. - # + # @method sort_code_completion_results(results, num_results) # @param [CompletionResult] results The set of results to sort. # @param [Integer] num_results The number of results in \p Results. - # @return [nil] + # @return [nil] # @scope class attach_function :sort_code_completion_results, :clang_sortCodeCompletionResults, [CompletionResult, :uint], :void - # Free the given set of code-completion results. - # + # @method dispose_code_complete_results(results) - # @param [CodeCompleteResults] results - # @return [nil] + # @param [CodeCompleteResults] results + # @return [nil] # @scope class attach_function :dispose_code_complete_results, :clang_disposeCodeCompleteResults, [CodeCompleteResults], :void - # Determine the number of diagnostics produced prior to the # location where code completion was performed. - # + # @method code_complete_get_num_diagnostics(results) - # @param [CodeCompleteResults] results - # @return [Integer] + # @param [CodeCompleteResults] results + # @return [Integer] # @scope class attach_function :code_complete_get_num_diagnostics, :clang_codeCompleteGetNumDiagnostics, [CodeCompleteResults], :uint - # Retrieve a diagnostic associated with the given code completion. - # + # @method code_complete_get_diagnostic(results, index) # @param [CodeCompleteResults] results the code completion results to query. # @param [Integer] index the zero-based diagnostic number to retrieve. @@ -3630,23 +3488,21 @@ class CodeCompleteResults < FFI::Struct # via a call to \c clang_disposeDiagnostic(). # @scope class attach_function :code_complete_get_diagnostic, :clang_codeCompleteGetDiagnostic, [CodeCompleteResults, :uint], :pointer - # Determines what compeltions are appropriate for the context # the given code completion. - # + # @method code_complete_get_contexts(results) # @param [CodeCompleteResults] results the code completion results to query # @return [Integer] the kinds of completions that are appropriate for use # along with the given code completion results. # @scope class attach_function :code_complete_get_contexts, :clang_codeCompleteGetContexts, [CodeCompleteResults], :ulong_long - # Returns the cursor kind for the container for the current code # completion context. The container is only guaranteed to be set for # contexts where a container exists (i.e. member accesses or Objective-C # message sends); if there is not a container, this function will return # CXCursor_InvalidCode. - # + # @method code_complete_get_container_kind(results, is_incomplete) # @param [CodeCompleteResults] results the code completion results to query # @param [FFI::Pointer(*UInt)] is_incomplete on return, this value will be false if Clang has complete @@ -3656,128 +3512,119 @@ class CodeCompleteResults < FFI::Struct # container # @scope class attach_function :code_complete_get_container_kind, :clang_codeCompleteGetContainerKind, [CodeCompleteResults, :pointer], :cursor_kind - # Returns the USR for the container for the current code completion # context. If there is not a container for the current context, this # function will return the empty string. - # + # @method code_complete_get_container_usr(results) # @param [CodeCompleteResults] results the code completion results to query # @return [String] the USR for the container # @scope class attach_function :code_complete_get_container_usr, :clang_codeCompleteGetContainerUSR, [CodeCompleteResults], String.by_value - # Returns the currently-entered selector for an Objective-C message # send, formatted like "initWithFoo:bar:". Only guaranteed to return a # non-empty string for CXCompletionContext_ObjCInstanceMessage and # CXCompletionContext_ObjCClassMessage. - # + # @method code_complete_get_obj_c_selector(results) # @param [CodeCompleteResults] results the code completion results to query # @return [String] the selector (or partial selector) that has been entered thus far # for an Objective-C message send. # @scope class attach_function :code_complete_get_obj_c_selector, :clang_codeCompleteGetObjCSelector, [CodeCompleteResults], String.by_value - # Return a version string, suitable for showing to a user, but not # intended to be parsed (the format is not guaranteed to be stable). - # + # @method get_clang_version() - # @return [String] + # @return [String] # @scope class attach_function :get_clang_version, :clang_getClangVersion, [], String.by_value - # Enable/disable crash recovery. - # + # @method toggle_crash_recovery(is_enabled) # @param [Integer] is_enabled to indicate if crash recovery is enabled. A non-zero value # enables crash recovery, while 0 disables it. - # @return [nil] + # @return [nil] # @scope class attach_function :toggle_crash_recovery, :clang_toggleCrashRecovery, [:uint], :void - # Visitor invoked for each file in a translation unit # (used with clang_getInclusions()). - # + # This visitor function will be invoked by clang_getInclusions() for each # file included (either at the top-level or by #include directives) within # a translation unit. The first argument is the file being included, and # the second and third arguments provide the inclusion stack. The # array is sorted in order of immediate inclusion. For example, # the first element refers to the location that included 'included_file'. - # + # This entry is only for documentation and no real method. - # - # @method _callback_inclusion_visitor_(inclusion_stack, include_len, client_data) - # @param [SourceLocation] inclusion_stack - # @param [Integer] include_len - # @param [FFI::Pointer(ClientData)] client_data - # @return [FFI::Pointer(File)] - # @scope class - callback :inclusion_visitor, [SourceLocation, :uint, :pointer], :pointer - + + # @method _callback_inclusion_visitor_(included_file, inclusion_stack, include_len, client_data) + # @param [FFI::Pointer(File)] included_file + # @param [SourceLocation] inclusion_stack + # @param [Integer] include_len + # @param [FFI::Pointer(ClientData)] client_data + # @return [FFI::Pointer(File)] + # @scope class + callback :inclusion_visitor, [:pointer, SourceLocation, :uint, :pointer], :pointer + # Visit the set of preprocessor inclusions in a translation unit. # The visitor function is called with the provided data for every included # file. This does not include headers included by the PCH file (unless one # is inspecting the inclusions in the PCH file itself). - # + # @method get_inclusions(tu, visitor, client_data) - # @param [TranslationUnitImpl] tu - # @param [Proc(_callback_inclusion_visitor_)] visitor - # @param [FFI::Pointer(ClientData)] client_data - # @return [nil] + # @param [TranslationUnitImpl] tu + # @param [FFI::Pointer(InclusionVisitor)] visitor + # @param [FFI::Pointer(ClientData)] client_data + # @return [nil] # @scope class - attach_function :get_inclusions, :clang_getInclusions, [TranslationUnitImpl, :inclusion_visitor, :pointer], :void - + attach_function :get_inclusions, :clang_getInclusions, [TranslationUnitImpl, :pointer, :pointer], :void # Retrieve a remapping. - # + # @method get_remappings(path) # @param [String] path the path that contains metadata about remappings. # @return [FFI::Pointer(Remapping)] the requested remapping. This remapping must be freed # via a call to \c clang_remap_dispose(). Can return NULL if an error occurred. # @scope class attach_function :get_remappings, :clang_getRemappings, [:string], :pointer - # Determine the number of remappings. - # + # @method remap_get_num_files(remapping) - # @param [FFI::Pointer(Remapping)] remapping - # @return [Integer] + # @param [FFI::Pointer(Remapping)] remapping + # @return [Integer] # @scope class attach_function :remap_get_num_files, :clang_remap_getNumFiles, [:pointer], :uint - # Get the original and the associated filename from the remapping. - # + # @method remap_get_filenames(remapping, index, original, transformed) - # @param [FFI::Pointer(Remapping)] remapping - # @param [Integer] index + # @param [FFI::Pointer(Remapping)] remapping + # @param [Integer] index # @param [String] original If non-NULL, will be set to the original filename. # @param [String] transformed If non-NULL, will be set to the filename that the original # is associated with. - # @return [nil] + # @return [nil] # @scope class attach_function :remap_get_filenames, :clang_remap_getFilenames, [:pointer, :uint, String, String], :void - # Dispose the remapping. - # + # @method remap_dispose(remapping) - # @param [FFI::Pointer(Remapping)] remapping - # @return [nil] + # @param [FFI::Pointer(Remapping)] remapping + # @return [nil] # @scope class attach_function :remap_dispose, :clang_remap_dispose, [:pointer], :void - # \defgroup CINDEX_HIGH Higher level API functions - # + # @{ - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:visitor_result). - # + # === Options: # :visit_break :: - # + # :visit_continue :: - # - # + + # @method _enum_visitor_result_ # @return [Symbol] # @scope class @@ -3785,21 +3632,21 @@ class CodeCompleteResults < FFI::Struct :visit_break, 0, :visit_continue, 1 ] - + # (Not documented) - # + # = Fields: # :context :: - # (FFI::Pointer(*Void)) + # (FFI::Pointer(*Void)) # :visit :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) class CursorAndRangeVisitor < FFI::Struct layout :context, :pointer, :visit, :pointer end - + # Find references of a declaration in a specific file. - # + # @method find_references_in_file(cursor, file, visitor) # @param [Cursor] cursor pointing to a declaration or a reference of one. # @param [FFI::Pointer(File)] file to search for references. @@ -3807,8 +3654,7 @@ class CursorAndRangeVisitor < FFI::Struct # each reference found. # The CXSourceRange will point inside the file; if the reference is inside # a macro (and not a macro argument) the CXSourceRange will be invalid. - # @return [nil] + # @return [nil] # @scope class attach_function :find_references_in_file, :clang_findReferencesInFile, [Cursor.by_value, :pointer, CursorAndRangeVisitor.by_value], :void - end diff --git a/test/output/include/capi/cef_app_capi.rb b/test/output/include/capi/cef_app_capi.rb index 1353aa6..5565cd2 100644 --- a/test/output/include/capi/cef_app_capi.rb +++ b/test/output/include/capi/cef_app_capi.rb @@ -1,22 +1,19 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - - # (Not documented) - class App < FFI::Struct - layout :dummy, :char - end - + # This function should be called from the application entry point function to # execute a secondary process. It can be used to run secondary processes from # the browser client executable (default behavior) or from a separate @@ -25,106 +22,95 @@ class App < FFI::Struct # it will return immediately with a value of -1. If called for a recognized # secondary process it will block until the process should exit and then return # the process exit code. The |application| parameter may be NULL. - # + # @method execute_process(args, application) - # @param [FFI::Pointer(*MainArgs)] args - # @param [App] application - # @return [Integer] + # @param [FFI::Pointer(*MainArgs)] args + # @param [FFI::Pointer(*App)] application + # @return [Integer] # @scope class - attach_function :execute_process, :cef_execute_process, [:pointer, App], :int - - # (Not documented) - class App < FFI::Struct - layout :dummy, :char - end - + attach_function :execute_process, :cef_execute_process, [:pointer, :pointer], :int # This function should be called on the main application thread to initialize # the CEF browser process. The |application| parameter may be NULL. A return # value of true (1) indicates that it succeeded and false (0) indicates that it # failed. - # + # @method initialize(args, settings, application) - # @param [FFI::Pointer(*MainArgs)] args - # @param [FFI::Pointer(*Settings)] settings - # @param [App] application - # @return [Integer] + # @param [FFI::Pointer(*MainArgs)] args + # @param [FFI::Pointer(*Settings)] settings + # @param [FFI::Pointer(*App)] application + # @return [Integer] # @scope class - attach_function :initialize, :cef_initialize, [:pointer, :pointer, App], :int - + attach_function :initialize, :cef_initialize, [:pointer, :pointer, :pointer], :int # This function should be called on the main application thread to shut down # the CEF browser process before the application exits. - # + # @method shutdown() - # @return [nil] + # @return [nil] # @scope class attach_function :shutdown, :cef_shutdown, [], :void - # Perform a single iteration of CEF message loop processing. This function is # used to integrate the CEF message loop into an existing application message # loop. Care must be taken to balance performance against excessive CPU usage. # This function should only be called on the main application thread and only # if cef_initialize() is called with a CefSettings.multi_threaded_message_loop # value of false (0). This function will not block. - # + # @method do_message_loop_work() - # @return [nil] + # @return [nil] # @scope class attach_function :do_message_loop_work, :cef_do_message_loop_work, [], :void - # Run the CEF message loop. Use this function instead of an application- # provided message loop to get the best balance between performance and CPU # usage. This function should only be called on the main application thread and # only if cef_initialize() is called with a # CefSettings.multi_threaded_message_loop value of false (0). This function # will block until a quit message is received by the system. - # + # @method run_message_loop() - # @return [nil] + # @return [nil] # @scope class attach_function :run_message_loop, :cef_run_message_loop, [], :void - # Quit the CEF message loop that was started by calling cef_run_message_loop(). # This function should only be called on the main application thread and only # if cef_run_message_loop() was used. - # + # @method quit_message_loop() - # @return [nil] + # @return [nil] # @scope class attach_function :quit_message_loop, :cef_quit_message_loop, [], :void - # (Not documented) class CommandLine < FFI::Struct layout :dummy, :char end - + # (Not documented) class SchemeRegistrar < FFI::Struct layout :dummy, :char end - + # (Not documented) class ResourceBundleHandler < FFI::Struct layout :dummy, :char end - + # (Not documented) class BrowserProcessHandler < FFI::Struct layout :dummy, :char end - + # (Not documented) class RenderProcessHandler < FFI::Struct layout :dummy, :char end - + # Implement this structure to provide handler implementations. Methods will be # called by the process and/or thread indicated. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :on_before_command_line_processing :: - # (FFI::Pointer(*)) Provides an opportunity to view and/or modify command-line arguments before + # (FFI::Pointer(*FunctionProto)) Provides an opportunity to view and/or modify command-line arguments before # processing by CEF and Chromium. The |process_type| value will be NULL for # the browser process. Do not keep a reference to the cef_command_line_t # object passed to this function. The CefSettings.command_line_args_disabled @@ -134,20 +120,20 @@ class RenderProcessHandler < FFI::Struct # modify command-line arguments for non-browser processes as this may result # in undefined behavior including crashes. # :on_register_custom_schemes :: - # (FFI::Pointer(*)) Provides an opportunity to register custom schemes. Do not keep a reference + # (FFI::Pointer(*FunctionProto)) Provides an opportunity to register custom schemes. Do not keep a reference # to the |registrar| object. This function is called on the main thread for # each process and the registered schemes should be the same across all # processes. # :get_resource_bundle_handler :: - # (FFI::Pointer(*)) Return the handler for resource bundle events. If + # (FFI::Pointer(*FunctionProto)) Return the handler for resource bundle events. If # CefSettings.pack_loading_disabled is true (1) a handler must be returned. # If no handler is returned resources will be loaded from pack files. This # function is called by the browser and render processes on multiple threads. # :get_browser_process_handler :: - # (FFI::Pointer(*)) Return the handler for functionality specific to the browser process. This + # (FFI::Pointer(*FunctionProto)) Return the handler for functionality specific to the browser process. This # function is called on multiple threads in the browser process. # :get_render_process_handler :: - # (FFI::Pointer(*)) Return the handler for functionality specific to the render process. This + # (FFI::Pointer(*FunctionProto)) Return the handler for functionality specific to the render process. This # function is called on the render process main thread. class App < FFI::Struct layout :base, :char, @@ -157,5 +143,5 @@ class App < FFI::Struct :get_browser_process_handler, :pointer, :get_render_process_handler, :pointer end - + end diff --git a/test/output/include/capi/cef_base_capi.rb b/test/output/include/capi/cef_base_capi.rb index 86556a9..3ae5fe9 100644 --- a/test/output/include/capi/cef_base_capi.rb +++ b/test/output/include/capi/cef_base_capi.rb @@ -1,35 +1,37 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Structure defining the reference count implementation functions. All # framework structures must include the cef_base_t structure first. - # + # = Fields: # :size :: # (Integer) Size of the data structure. # :add_ref :: - # (FFI::Pointer(*)) Increment the reference count. + # (FFI::Pointer(*FunctionProto)) Increment the reference count. # :release :: - # (FFI::Pointer(*)) Decrement the reference count. Delete this object when no references + # (FFI::Pointer(*FunctionProto)) Decrement the reference count. Delete this object when no references # remain. # :get_refct :: - # (FFI::Pointer(*)) Returns the current number of references. + # (FFI::Pointer(*FunctionProto)) Returns the current number of references. class Base < FFI::Struct - layout :size, :ulong, + layout :size, :int, :add_ref, :pointer, :release, :pointer, :get_refct, :pointer end - + end diff --git a/test/output/include/capi/cef_browser_capi.rb b/test/output/include/capi/cef_browser_capi.rb index aa09e59..8aa264b 100644 --- a/test/output/include/capi/cef_browser_capi.rb +++ b/test/output/include/capi/cef_browser_capi.rb @@ -1,76 +1,78 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) class Frame < FFI::Struct layout :dummy, :char end - + # (Not documented) class ProcessMessage < FFI::Struct layout :dummy, :char end - + # Structure used to represent a browser window. When used in the browser # process the functions of this structure may be called on any thread unless # otherwise indicated in the comments. When used in the render process the # functions of this structure may only be called on the main thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :get_host :: - # (FFI::Pointer(*)) Returns the browser host object. This function can only be called in the + # (FFI::Pointer(*FunctionProto)) Returns the browser host object. This function can only be called in the # browser process. # :can_go_back :: - # (FFI::Pointer(*)) Returns true (1) if the browser can navigate backwards. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the browser can navigate backwards. # :go_back :: - # (FFI::Pointer(*)) Navigate backwards. + # (FFI::Pointer(*FunctionProto)) Navigate backwards. # :can_go_forward :: - # (FFI::Pointer(*)) Returns true (1) if the browser can navigate forwards. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the browser can navigate forwards. # :go_forward :: - # (FFI::Pointer(*)) Navigate forwards. + # (FFI::Pointer(*FunctionProto)) Navigate forwards. # :is_loading :: - # (FFI::Pointer(*)) Returns true (1) if the browser is currently loading. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the browser is currently loading. # :reload :: - # (FFI::Pointer(*)) Reload the current page. + # (FFI::Pointer(*FunctionProto)) Reload the current page. # :reload_ignore_cache :: - # (FFI::Pointer(*)) Reload the current page ignoring any cached data. + # (FFI::Pointer(*FunctionProto)) Reload the current page ignoring any cached data. # :stop_load :: - # (FFI::Pointer(*)) Stop loading the page. + # (FFI::Pointer(*FunctionProto)) Stop loading the page. # :get_identifier :: - # (FFI::Pointer(*)) Returns the globally unique identifier for this browser. + # (FFI::Pointer(*FunctionProto)) Returns the globally unique identifier for this browser. # :is_popup :: - # (FFI::Pointer(*)) Returns true (1) if the window is a popup window. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the window is a popup window. # :has_document :: - # (FFI::Pointer(*)) Returns true (1) if a document has been loaded in the browser. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if a document has been loaded in the browser. # :get_main_frame :: - # (FFI::Pointer(*)) Returns the main (top-level) frame for the browser window. + # (FFI::Pointer(*FunctionProto)) Returns the main (top-level) frame for the browser window. # :get_focused_frame :: - # (FFI::Pointer(*)) Returns the focused frame for the browser window. + # (FFI::Pointer(*FunctionProto)) Returns the focused frame for the browser window. # :get_frame_byident :: - # (FFI::Pointer(*)) Returns the frame with the specified identifier, or NULL if not found. + # (FFI::Pointer(*FunctionProto)) Returns the frame with the specified identifier, or NULL if not found. # :get_frame :: - # (FFI::Pointer(*)) Returns the frame with the specified name, or NULL if not found. - # :get_frame_count :: - # (FFI::Pointer(*)) Returns the number of frames that currently exist. + # (FFI::Pointer(*FunctionProto)) Returns the frame with the specified name, or NULL if not found. + # :size :: + # (error_unknown) Returns the number of frames that currently exist. # :get_frame_identifiers :: - # (FFI::Pointer(*)) Returns the identifiers of all existing frames. + # (FFI::Pointer(*FunctionProto)) Returns the identifiers of all existing frames. # :get_frame_names :: - # (FFI::Pointer(*)) Returns the names of all existing frames. + # (FFI::Pointer(*FunctionProto)) Returns the names of all existing frames. # :send_process_message :: - # (FFI::Pointer(*)) Send a message to the specified |target_process|. Returns true (1) if the + # (FFI::Pointer(*FunctionProto)) Send a message to the specified |target_process|. Returns true (1) if the # message was sent successfully. class Browser < FFI::Struct layout :base, :char, @@ -90,48 +92,48 @@ class Browser < FFI::Struct :get_focused_frame, :pointer, :get_frame_byident, :pointer, :get_frame, :pointer, - :get_frame_count, :pointer, + :size, :char, :get_frame_identifiers, :pointer, :get_frame_names, :pointer, :send_process_message, :pointer end - + # (Not documented) class Client < FFI::Struct layout :dummy, :char end - + # Structure used to represent the browser process aspects of a browser window. # The functions of this structure can only be called in the browser process. # They may be called on any thread in that process unless otherwise indicated # in the comments. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :get_browser :: - # (FFI::Pointer(*)) Returns the hosted browser object. + # (FFI::Pointer(*FunctionProto)) Returns the hosted browser object. # :parent_window_will_close :: - # (FFI::Pointer(*)) Call this function before destroying a contained browser window. This + # (FFI::Pointer(*FunctionProto)) Call this function before destroying a contained browser window. This # function performs any internal cleanup that may be needed before the # browser window is destroyed. # :close_browser :: - # (FFI::Pointer(*)) Closes this browser window. + # (FFI::Pointer(*FunctionProto)) Closes this browser window. # :set_focus :: - # (FFI::Pointer(*)) Set focus for the browser window. If |enable| is true (1) focus will be set + # (FFI::Pointer(*FunctionProto)) Set focus for the browser window. If |enable| is true (1) focus will be set # to the window. Otherwise, focus will be removed. # :get_window_handle :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :get_opener_window_handle :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :get_client :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) Returns the client for this browser. # :get_dev_tools_url :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_zoom_level :: - # (FFI::Pointer(*)) Get the zoom level. This function can only be called on the UI thread. + # (FFI::Pointer(*FunctionProto)) Get the zoom level. This function can only be called on the UI thread. # :set_zoom_level :: - # (FFI::Pointer(*)) Change the zoom level to the specified value. + # (FFI::Pointer(*FunctionProto)) Change the zoom level to the specified value. class BrowserHost < FFI::Struct layout :base, :char, :get_browser, :pointer, @@ -145,32 +147,30 @@ class BrowserHost < FFI::Struct :get_zoom_level, :pointer, :set_zoom_level, :pointer end - + # Create a new browser window using the window parameters specified by # |windowInfo|. All values will be copied internally and the actual window will # be created on the UI thread. This function can be called on any browser # process thread and will not block. - # + # @method browser_host_create_browser(window_info, client, url, settings) - # @param [FFI::Pointer(*WindowInfo)] window_info - # @param [Client] client - # @param [FFI::Pointer(*String)] url - # @param [FFI::Pointer(*BrowserSettings)] settings - # @return [Integer] + # @param [FFI::Pointer(*WindowInfo)] window_info + # @param [Client] client + # @param [FFI::Pointer(*String)] url + # @param [FFI::Pointer(*BrowserSettings)] settings + # @return [Integer] # @scope class attach_function :browser_host_create_browser, :cef_browser_host_create_browser, [:pointer, Client, :pointer, :pointer], :int - # Create a new browser window using the window parameters specified by # |windowInfo|. This function can only be called on the browser process UI # thread. - # + # @method browser_host_create_browser_sync(window_info, client, url, settings) - # @param [FFI::Pointer(*WindowInfo)] window_info - # @param [Client] client - # @param [FFI::Pointer(*String)] url - # @param [FFI::Pointer(*BrowserSettings)] settings - # @return [Browser] + # @param [FFI::Pointer(*WindowInfo)] window_info + # @param [Client] client + # @param [FFI::Pointer(*String)] url + # @param [FFI::Pointer(*BrowserSettings)] settings + # @return [Browser] # @scope class attach_function :browser_host_create_browser_sync, :cef_browser_host_create_browser_sync, [:pointer, Client, :pointer, :pointer], Browser - end diff --git a/test/output/include/capi/cef_browser_process_handler_capi.rb b/test/output/include/capi/cef_browser_process_handler_capi.rb index 981bf4a..2233e17 100644 --- a/test/output/include/capi/cef_browser_process_handler_capi.rb +++ b/test/output/include/capi/cef_browser_process_handler_capi.rb @@ -1,40 +1,42 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) class ProxyHandler < FFI::Struct layout :dummy, :char end - + # Structure used to implement browser process callbacks. The functions of this # structure will be called on the browser process main thread unless otherwise # indicated. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :get_proxy_handler :: - # (FFI::Pointer(*)) Return the handler for proxy events. If no handler is returned the default + # (FFI::Pointer(*FunctionProto)) Return the handler for proxy events. If no handler is returned the default # system handler will be used. This function is called on the browser process # IO thread. # :on_context_initialized :: - # (FFI::Pointer(*)) Called on the browser process UI thread immediately after the CEF context + # (FFI::Pointer(*FunctionProto)) Called on the browser process UI thread immediately after the CEF context # has been initialized. class BrowserProcessHandler < FFI::Struct layout :base, :char, :get_proxy_handler, :pointer, :on_context_initialized, :pointer end - + end diff --git a/test/output/include/capi/cef_callback_capi.rb b/test/output/include/capi/cef_callback_capi.rb index 55417e2..1447d52 100644 --- a/test/output/include/capi/cef_callback_capi.rb +++ b/test/output/include/capi/cef_callback_capi.rb @@ -1,30 +1,32 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Generic callback structure used for asynchronous continuation. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :cont :: - # (FFI::Pointer(*)) Continue processing. + # (FFI::Pointer(*FunctionProto)) Continue processing. # :cancel :: - # (FFI::Pointer(*)) Cancel processing. + # (FFI::Pointer(*FunctionProto)) Cancel processing. class Callback < FFI::Struct layout :base, :char, :cont, :pointer, :cancel, :pointer end - + end diff --git a/test/output/include/capi/cef_client_capi.rb b/test/output/include/capi/cef_client_capi.rb index 4b7931c..cfa6f34 100644 --- a/test/output/include/capi/cef_client_capi.rb +++ b/test/output/include/capi/cef_client_capi.rb @@ -1,100 +1,102 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) class ContextMenuHandler < FFI::Struct layout :dummy, :char end - + # (Not documented) class DisplayHandler < FFI::Struct layout :dummy, :char end - + # (Not documented) class FocusHandler < FFI::Struct layout :dummy, :char end - + # (Not documented) class GeolocationHandler < FFI::Struct layout :dummy, :char end - + # (Not documented) class JsdialogHandler < FFI::Struct layout :dummy, :char end - + # (Not documented) class KeyboardHandler < FFI::Struct layout :dummy, :char end - + # (Not documented) class LifeSpanHandler < FFI::Struct layout :dummy, :char end - + # (Not documented) class LoadHandler < FFI::Struct layout :dummy, :char end - + # (Not documented) class RequestHandler < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class ProcessMessage < FFI::Struct layout :dummy, :char end - + # Implement this structure to provide handler implementations. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :get_context_menu_handler :: - # (FFI::Pointer(*)) Return the handler for context menus. If no handler is provided the default + # (FFI::Pointer(*FunctionProto)) Return the handler for context menus. If no handler is provided the default # implementation will be used. # :get_display_handler :: - # (FFI::Pointer(*)) Return the handler for browser display state events. + # (FFI::Pointer(*FunctionProto)) Return the handler for browser display state events. # :get_focus_handler :: - # (FFI::Pointer(*)) Return the handler for focus events. + # (FFI::Pointer(*FunctionProto)) Return the handler for focus events. # :get_geolocation_handler :: - # (FFI::Pointer(*)) Return the handler for geolocation permissions requests. If no handler is + # (FFI::Pointer(*FunctionProto)) Return the handler for geolocation permissions requests. If no handler is # provided geolocation access will be denied by default. # :get_jsdialog_handler :: - # (FFI::Pointer(*)) Return the handler for JavaScript dialogs. If no handler is provided the + # (FFI::Pointer(*FunctionProto)) Return the handler for JavaScript dialogs. If no handler is provided the # default implementation will be used. # :get_keyboard_handler :: - # (FFI::Pointer(*)) Return the handler for keyboard events. + # (FFI::Pointer(*FunctionProto)) Return the handler for keyboard events. # :get_life_span_handler :: - # (FFI::Pointer(*)) Return the handler for browser life span events. + # (FFI::Pointer(*FunctionProto)) Return the handler for browser life span events. # :get_load_handler :: - # (FFI::Pointer(*)) Return the handler for browser load status events. + # (FFI::Pointer(*FunctionProto)) Return the handler for browser load status events. # :get_request_handler :: - # (FFI::Pointer(*)) Return the handler for browser request events. + # (FFI::Pointer(*FunctionProto)) Return the handler for browser request events. # :on_process_message_received :: - # (FFI::Pointer(*)) Called when a new message is received from a different process. Return true + # (FFI::Pointer(*FunctionProto)) Called when a new message is received from a different process. Return true # (1) if the message was handled or false (0) otherwise. Do not keep a # reference to or attempt to access the message outside of this callback. class Client < FFI::Struct @@ -110,5 +112,5 @@ class Client < FFI::Struct :get_request_handler, :pointer, :on_process_message_received, :pointer end - + end diff --git a/test/output/include/capi/cef_command_line_capi.rb b/test/output/include/capi/cef_command_line_capi.rb index 76b2ba5..fa99ea9 100644 --- a/test/output/include/capi/cef_command_line_capi.rb +++ b/test/output/include/capi/cef_command_line_capi.rb @@ -1,17 +1,19 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Structure used to create and/or parse command line arguments. Arguments with # '--', '-' and, on Windows, '/' prefixes are considered switches. Switches # will always precede any arguments without switch prefixes. Switches can @@ -20,54 +22,54 @@ def self.attach_function(name, *_) # subsequent tokens, regardless of prefix, being interpreted as non-switch # arguments. Switch names are considered case-insensitive. This structure can # be used before cef_initialize() is called. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :is_valid :: - # (FFI::Pointer(*)) Returns true (1) if this object is valid. Do not call any other functions + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is valid. Do not call any other functions # if this function returns false (0). # :is_read_only :: - # (FFI::Pointer(*)) Returns true (1) if the values of this object are read-only. Some APIs may + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the values of this object are read-only. Some APIs may # expose read-only objects. # :copy :: - # (FFI::Pointer(*)) Returns a writable copy of this object. + # (FFI::Pointer(*FunctionProto)) Returns a writable copy of this object. # :init_from_argv :: - # (FFI::Pointer(*)) Initialize the command line with the specified |argc| and |argv| values. + # (FFI::Pointer(*FunctionProto)) Initialize the command line with the specified |argc| and |argv| values. # The first argument must be the name of the program. This function is only # supported on non-Windows platforms. # :init_from_string :: - # (FFI::Pointer(*)) Initialize the command line with the string returned by calling + # (FFI::Pointer(*FunctionProto)) Initialize the command line with the string returned by calling # GetCommandLineW(). This function is only supported on Windows. # :reset :: - # (FFI::Pointer(*)) Reset the command-line switches and arguments but leave the program + # (FFI::Pointer(*FunctionProto)) Reset the command-line switches and arguments but leave the program # component unchanged. # :get_command_line_string :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_program :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :set_program :: - # (FFI::Pointer(*)) Set the program part of the command line string (the first item). + # (FFI::Pointer(*FunctionProto)) Set the program part of the command line string (the first item). # :has_switches :: - # (FFI::Pointer(*)) Returns true (1) if the command line has switches. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the command line has switches. # :has_switch :: - # (FFI::Pointer(*)) Returns true (1) if the command line contains the given switch. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the command line contains the given switch. # :get_switch_value :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_switches :: - # (FFI::Pointer(*)) Returns the map of switch names and values. If a switch has no value an + # (FFI::Pointer(*FunctionProto)) Returns the map of switch names and values. If a switch has no value an # NULL string is returned. # :append_switch :: - # (FFI::Pointer(*)) Add a switch to the end of the command line. If the switch has no value + # (FFI::Pointer(*FunctionProto)) Add a switch to the end of the command line. If the switch has no value # pass an NULL value string. # :append_switch_with_value :: - # (FFI::Pointer(*)) Add a switch with the specified value to the end of the command line. + # (FFI::Pointer(*FunctionProto)) Add a switch with the specified value to the end of the command line. # :has_arguments :: - # (FFI::Pointer(*)) True if there are remaining command line arguments. + # (FFI::Pointer(*FunctionProto)) True if there are remaining command line arguments. # :get_arguments :: - # (FFI::Pointer(*)) Get the remaining command line arguments. + # (FFI::Pointer(*FunctionProto)) Get the remaining command line arguments. # :append_argument :: - # (FFI::Pointer(*)) Add an argument to the end of the command line. + # (FFI::Pointer(*FunctionProto)) Add an argument to the end of the command line. class CommandLine < FFI::Struct layout :base, :char, :is_valid, :pointer, @@ -89,20 +91,18 @@ class CommandLine < FFI::Struct :get_arguments, :pointer, :append_argument, :pointer end - + # Create a new cef_command_line_t instance. - # + # @method command_line_create() - # @return [CommandLine] + # @return [CommandLine] # @scope class attach_function :command_line_create, :cef_command_line_create, [], CommandLine - # Returns the singleton global cef_command_line_t object. The returned object # will be read-only. - # + # @method command_line_get_global() - # @return [CommandLine] + # @return [CommandLine] # @scope class attach_function :command_line_get_global, :cef_command_line_get_global, [], CommandLine - end diff --git a/test/output/include/capi/cef_context_menu_handler_capi.rb b/test/output/include/capi/cef_context_menu_handler_capi.rb index b4e500f..a4341a0 100644 --- a/test/output/include/capi/cef_context_menu_handler_capi.rb +++ b/test/output/include/capi/cef_context_menu_handler_capi.rb @@ -1,76 +1,78 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Frame < FFI::Struct layout :dummy, :char end - + # (Not documented) class ContextMenuParams < FFI::Struct layout :dummy, :char end - + # (Not documented) class MenuModel < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Frame < FFI::Struct layout :dummy, :char end - + # (Not documented) class ContextMenuParams < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Frame < FFI::Struct layout :dummy, :char end - + # Implement this structure to handle context menu events. The functions of this # structure will be called on the UI thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :on_before_context_menu :: - # (FFI::Pointer(*)) Called before a context menu is displayed. |params| provides information + # (FFI::Pointer(*FunctionProto)) Called before a context menu is displayed. |params| provides information # about the context menu state. |model| initially contains the default # context menu. The |model| can be cleared to show no context menu or # modified to show a custom menu. Do not keep references to |params| or # |model| outside of this callback. # :on_context_menu_command :: - # (FFI::Pointer(*)) Called to execute a command selected from the context menu. Return true (1) + # (FFI::Pointer(*FunctionProto)) Called to execute a command selected from the context menu. Return true (1) # if the command was handled or false (0) for the default implementation. See # cef_menu_id_t for the command ids that have default implementations. All # user-defined command ids should be between MENU_ID_USER_FIRST and @@ -78,7 +80,7 @@ class Frame < FFI::Struct # on_before_context_menu(). Do not keep a reference to |params| outside of # this callback. # :on_context_menu_dismissed :: - # (FFI::Pointer(*)) Called when the context menu is dismissed irregardless of whether the menu + # (FFI::Pointer(*FunctionProto)) Called when the context menu is dismissed irregardless of whether the menu # was NULL or a command was selected. class ContextMenuHandler < FFI::Struct layout :base, :char, @@ -86,50 +88,50 @@ class ContextMenuHandler < FFI::Struct :on_context_menu_command, :pointer, :on_context_menu_dismissed, :pointer end - + # Provides information about the context menu state. The ethods of this # structure can only be accessed on browser process the UI thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :get_xcoord :: - # (FFI::Pointer(*)) Returns the X coordinate of the mouse where the context menu was invoked. + # (FFI::Pointer(*FunctionProto)) Returns the X coordinate of the mouse where the context menu was invoked. # Coords are relative to the associated RenderView's origin. # :get_ycoord :: - # (FFI::Pointer(*)) Returns the Y coordinate of the mouse where the context menu was invoked. + # (FFI::Pointer(*FunctionProto)) Returns the Y coordinate of the mouse where the context menu was invoked. # Coords are relative to the associated RenderView's origin. # :get_type_flags :: - # (FFI::Pointer(*)) Returns flags representing the type of node that the context menu was + # (FFI::Pointer(*FunctionProto)) Returns flags representing the type of node that the context menu was # invoked on. # :get_link_url :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_unfiltered_link_url :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_source_url :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :is_image_blocked :: - # (FFI::Pointer(*)) Returns true (1) if the context menu was invoked on a blocked image. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the context menu was invoked on a blocked image. # :get_page_url :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_frame_url :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_frame_charset :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_media_type :: - # (FFI::Pointer(*)) Returns the type of context node that the context menu was invoked on. + # (FFI::Pointer(*FunctionProto)) Returns the type of context node that the context menu was invoked on. # :get_media_state_flags :: - # (FFI::Pointer(*)) Returns flags representing the actions supported by the media element, if + # (FFI::Pointer(*FunctionProto)) Returns flags representing the actions supported by the media element, if # any, that the context menu was invoked on. # :get_selection_text :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :is_editable :: - # (FFI::Pointer(*)) Returns true (1) if the context menu was invoked on an editable node. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the context menu was invoked on an editable node. # :is_speech_input_enabled :: - # (FFI::Pointer(*)) Returns true (1) if the context menu was invoked on an editable node where + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the context menu was invoked on an editable node where # speech-input is enabled. # :get_edit_state_flags :: - # (FFI::Pointer(*)) Returns flags representing the actions supported by the editable node, if + # (FFI::Pointer(*FunctionProto)) Returns flags representing the actions supported by the editable node, if # any, that the context menu was invoked on. class ContextMenuParams < FFI::Struct layout :base, :char, @@ -150,5 +152,5 @@ class ContextMenuParams < FFI::Struct :is_speech_input_enabled, :pointer, :get_edit_state_flags, :pointer end - + end diff --git a/test/output/include/capi/cef_cookie_capi.rb b/test/output/include/capi/cef_cookie_capi.rb index 6a61f4e..5a1015c 100644 --- a/test/output/include/capi/cef_cookie_capi.rb +++ b/test/output/include/capi/cef_cookie_capi.rb @@ -1,55 +1,57 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) class CookieVisitor < FFI::Struct layout :dummy, :char end - + # (Not documented) class CookieVisitor < FFI::Struct layout :dummy, :char end - + # Structure used for managing cookies. The functions of this structure may be # called on any thread unless otherwise indicated. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :set_supported_schemes :: - # (FFI::Pointer(*)) Set the schemes supported by this manager. By default only "http" and + # (FFI::Pointer(*FunctionProto)) Set the schemes supported by this manager. By default only "http" and # "https" schemes are supported. Must be called before any cookies are # accessed. # :visit_all_cookies :: - # (FFI::Pointer(*)) Visit all cookies. The returned cookies are ordered by longest path, then + # (FFI::Pointer(*FunctionProto)) Visit all cookies. The returned cookies are ordered by longest path, then # by earliest creation date. Returns false (0) if cookies cannot be accessed. # :visit_url_cookies :: - # (FFI::Pointer(*)) Visit a subset of cookies. The results are filtered by the given url + # (FFI::Pointer(*FunctionProto)) Visit a subset of cookies. The results are filtered by the given url # scheme, host, domain and path. If |includeHttpOnly| is true (1) HTTP-only # cookies will also be included in the results. The returned cookies are # ordered by longest path, then by earliest creation date. Returns false (0) # if cookies cannot be accessed. # :set_cookie :: - # (FFI::Pointer(*)) Sets a cookie given a valid URL and explicit user-provided cookie + # (FFI::Pointer(*FunctionProto)) Sets a cookie given a valid URL and explicit user-provided cookie # attributes. This function expects each attribute to be well-formed. It will # check for disallowed characters (e.g. the ';' character is disallowed # within the cookie value attribute) and will return false (0) without # setting the cookie if such characters are found. This function must be # called on the IO thread. # :delete_cookies :: - # (FFI::Pointer(*)) Delete all cookies that match the specified parameters. If both |url| and + # (FFI::Pointer(*FunctionProto)) Delete all cookies that match the specified parameters. If both |url| and # values |cookie_name| are specified all host and domain cookies matching # both will be deleted. If only |url| is specified all host cookies (but not # domain cookies) irrespective of path will be deleted. If |url| is NULL all @@ -57,7 +59,7 @@ class CookieVisitor < FFI::Struct # non- NULL invalid URL is specified or if cookies cannot be accessed. This # function must be called on the IO thread. # :set_storage_path :: - # (FFI::Pointer(*)) Sets the directory path that will be used for storing cookie data. If + # (FFI::Pointer(*FunctionProto)) Sets the directory path that will be used for storing cookie data. If # |path| is NULL data will be stored in memory only. Returns false (0) if # cookies cannot be accessed. class CookieManager < FFI::Struct @@ -69,32 +71,30 @@ class CookieManager < FFI::Struct :delete_cookies, :pointer, :set_storage_path, :pointer end - + # Returns the global cookie manager. By default data will be stored at # CefSettings.cache_path if specified or in memory otherwise. - # + # @method cookie_manager_get_global_manager() - # @return [CookieManager] + # @return [CookieManager] # @scope class attach_function :cookie_manager_get_global_manager, :cef_cookie_manager_get_global_manager, [], CookieManager - # Creates a new cookie manager. If |path| is NULL data will be stored in memory # only. Returns NULL if creation fails. - # + # @method cookie_manager_create_manager(path) - # @param [FFI::Pointer(*String)] path - # @return [CookieManager] + # @param [FFI::Pointer(*String)] path + # @return [CookieManager] # @scope class attach_function :cookie_manager_create_manager, :cef_cookie_manager_create_manager, [:pointer], CookieManager - # Structure to implement for visiting cookie values. The functions of this # structure will always be called on the IO thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :visit :: - # (FFI::Pointer(*)) Method that will be called once for each cookie. |count| is the 0-based + # (FFI::Pointer(*FunctionProto)) Method that will be called once for each cookie. |count| is the 0-based # index for the current cookie. |total| is the total number of cookies. Set # |deleteCookie| to true (1) to delete the cookie currently being visited. # Return false (0) to stop visiting cookies. This function may never be @@ -103,5 +103,5 @@ class CookieVisitor < FFI::Struct layout :base, :char, :visit, :pointer end - + end diff --git a/test/output/include/capi/cef_display_handler_capi.rb b/test/output/include/capi/cef_display_handler_capi.rb index 7f7d6fb..fe32246 100644 --- a/test/output/include/capi/cef_display_handler_capi.rb +++ b/test/output/include/capi/cef_display_handler_capi.rb @@ -1,76 +1,78 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Frame < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # Implement this structure to handle events related to browser display state. # The functions of this structure will be called on the UI thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :on_loading_state_change :: - # (FFI::Pointer(*)) Called when the loading state has changed. + # (FFI::Pointer(*FunctionProto)) Called when the loading state has changed. # :on_address_change :: - # (FFI::Pointer(*)) Called when a frame's address has changed. + # (FFI::Pointer(*FunctionProto)) Called when a frame's address has changed. # :on_title_change :: - # (FFI::Pointer(*)) Called when the page title changes. + # (FFI::Pointer(*FunctionProto)) Called when the page title changes. # :on_tooltip :: - # (FFI::Pointer(*)) Called when the browser is about to display a tooltip. |text| contains the + # (FFI::Pointer(*FunctionProto)) Called when the browser is about to display a tooltip. |text| contains the # text that will be displayed in the tooltip. To handle the display of the # tooltip yourself return true (1). Otherwise, you can optionally modify # |text| and then return false (0) to allow the browser to display the # tooltip. # :on_status_message :: - # (FFI::Pointer(*)) Called when the browser receives a status message. |text| contains the text + # (FFI::Pointer(*FunctionProto)) Called when the browser receives a status message. |text| contains the text # that will be displayed in the status message and |type| indicates the # status message type. # :on_console_message :: - # (FFI::Pointer(*)) Called to display a console message. Return true (1) to stop the message + # (FFI::Pointer(*FunctionProto)) Called to display a console message. Return true (1) to stop the message # from being output to the console. class DisplayHandler < FFI::Struct layout :base, :char, @@ -81,5 +83,5 @@ class DisplayHandler < FFI::Struct :on_status_message, :pointer, :on_console_message, :pointer end - + end diff --git a/test/output/include/capi/cef_dom_capi.rb b/test/output/include/capi/cef_dom_capi.rb index 00e9ae8..aebf4ff 100644 --- a/test/output/include/capi/cef_dom_capi.rb +++ b/test/output/include/capi/cef_dom_capi.rb @@ -1,30 +1,32 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) class Domdocument < FFI::Struct layout :dummy, :char end - + # Structure to implement for visiting the DOM. The functions of this structure # will be called on the render process main thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :visit :: - # (FFI::Pointer(*)) Method executed for visiting the DOM. The document object passed to this + # (FFI::Pointer(*FunctionProto)) Method executed for visiting the DOM. The document object passed to this # function represents a snapshot of the DOM at the time this function is # executed. DOM objects are only valid for the scope of this function. Do not # keep references to or attempt to access any DOM objects outside the scope @@ -33,45 +35,45 @@ class Domvisitor < FFI::Struct layout :base, :char, :visit, :pointer end - + # Structure used to represent a DOM document. The functions of this structure # should only be called on the render process main thread thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :get_type :: - # (FFI::Pointer(*)) Returns the document type. + # (FFI::Pointer(*FunctionProto)) Returns the document type. # :get_document :: - # (FFI::Pointer(*)) Returns the root document node. + # (FFI::Pointer(*FunctionProto)) Returns the root document node. # :get_body :: - # (FFI::Pointer(*)) Returns the BODY node of an HTML document. + # (FFI::Pointer(*FunctionProto)) Returns the BODY node of an HTML document. # :get_head :: - # (FFI::Pointer(*)) Returns the HEAD node of an HTML document. + # (FFI::Pointer(*FunctionProto)) Returns the HEAD node of an HTML document. # :get_title :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_element_by_id :: - # (FFI::Pointer(*)) Returns the document element with the specified ID value. + # (FFI::Pointer(*FunctionProto)) Returns the document element with the specified ID value. # :get_focused_node :: - # (FFI::Pointer(*)) Returns the node that currently has keyboard focus. + # (FFI::Pointer(*FunctionProto)) Returns the node that currently has keyboard focus. # :has_selection :: - # (FFI::Pointer(*)) Returns true (1) if a portion of the document is selected. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if a portion of the document is selected. # :get_selection_start_node :: - # (FFI::Pointer(*)) Returns the selection start node. + # (FFI::Pointer(*FunctionProto)) Returns the selection start node. # :get_selection_start_offset :: - # (FFI::Pointer(*)) Returns the selection offset within the start node. + # (FFI::Pointer(*FunctionProto)) Returns the selection offset within the start node. # :get_selection_end_node :: - # (FFI::Pointer(*)) Returns the selection end node. + # (FFI::Pointer(*FunctionProto)) Returns the selection end node. # :get_selection_end_offset :: - # (FFI::Pointer(*)) Returns the selection offset within the end node. + # (FFI::Pointer(*FunctionProto)) Returns the selection offset within the end node. # :get_selection_as_markup :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_selection_as_text :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_base_url :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_complete_url :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). class Domdocument < FFI::Struct layout :base, :char, :get_type, :pointer, @@ -91,57 +93,57 @@ class Domdocument < FFI::Struct :get_base_url, :pointer, :get_complete_url, :pointer end - + # (Not documented) class DomeventListener < FFI::Struct layout :dummy, :char end - + # Structure used to represent a DOM node. The functions of this structure # should only be called on the render process main thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :get_type :: - # (FFI::Pointer(*)) Returns the type for this node. + # (FFI::Pointer(*FunctionProto)) Returns the type for this node. # :is_text :: - # (FFI::Pointer(*)) Returns true (1) if this is a text node. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this is a text node. # :is_element :: - # (FFI::Pointer(*)) Returns true (1) if this is an element node. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this is an element node. # :is_editable :: - # (FFI::Pointer(*)) Returns true (1) if this is an editable node. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this is an editable node. # :is_form_control_element :: - # (FFI::Pointer(*)) Returns true (1) if this is a form control element node. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this is a form control element node. # :get_form_control_element_type :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :is_same :: - # (FFI::Pointer(*)) Returns true (1) if this object is pointing to the same handle as |that| + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is pointing to the same handle as |that| # object. # :get_name :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_value :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :set_value :: - # (FFI::Pointer(*)) Set the value of this node. Returns true (1) on success. + # (FFI::Pointer(*FunctionProto)) Set the value of this node. Returns true (1) on success. # :get_as_markup :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_document :: - # (FFI::Pointer(*)) Returns the document associated with this node. + # (FFI::Pointer(*FunctionProto)) Returns the document associated with this node. # :get_parent :: - # (FFI::Pointer(*)) Returns the parent node. + # (FFI::Pointer(*FunctionProto)) Returns the parent node. # :get_previous_sibling :: - # (FFI::Pointer(*)) Returns the previous sibling node. + # (FFI::Pointer(*FunctionProto)) Returns the previous sibling node. # :get_next_sibling :: - # (FFI::Pointer(*)) Returns the next sibling node. + # (FFI::Pointer(*FunctionProto)) Returns the next sibling node. # :has_children :: - # (FFI::Pointer(*)) Returns true (1) if this node has child nodes. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this node has child nodes. # :get_first_child :: - # (FFI::Pointer(*)) Return the first child node. + # (FFI::Pointer(*FunctionProto)) Return the first child node. # :get_last_child :: - # (FFI::Pointer(*)) Returns the last child node. + # (FFI::Pointer(*FunctionProto)) Returns the last child node. # :add_event_listener :: - # (FFI::Pointer(*)) Add an event listener to this node for the specified event type. If + # (FFI::Pointer(*FunctionProto)) Add an event listener to this node for the specified event type. If # |useCapture| is true (1) then this listener will be considered a capturing # listener. Capturing listeners will recieve all events of the specified type # before the events are dispatched to any other event targets beneath the @@ -150,20 +152,20 @@ class DomeventListener < FFI::Struct # can be used to register the same listener with and without capture. See # WebCore/dom/EventNames.h for the list of supported event types. # :get_element_tag_name :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :has_element_attributes :: - # (FFI::Pointer(*)) Returns true (1) if this element has attributes. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this element has attributes. # :has_element_attribute :: - # (FFI::Pointer(*)) Returns true (1) if this element has an attribute named |attrName|. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this element has an attribute named |attrName|. # :get_element_attribute :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_element_attributes :: - # (FFI::Pointer(*)) Returns a map of all element attributes. + # (FFI::Pointer(*FunctionProto)) Returns a map of all element attributes. # :set_element_attribute :: - # (FFI::Pointer(*)) Set the value for the element attribute named |attrName|. Returns true (1) + # (FFI::Pointer(*FunctionProto)) Set the value for the element attribute named |attrName|. Returns true (1) # on success. # :get_element_inner_text :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). class Domnode < FFI::Struct layout :base, :char, :get_type, :pointer, @@ -193,29 +195,29 @@ class Domnode < FFI::Struct :set_element_attribute, :pointer, :get_element_inner_text, :pointer end - + # Structure used to represent a DOM event. The functions of this structure # should only be called on the render process main thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :get_type :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_category :: - # (FFI::Pointer(*)) Returns the event category. + # (FFI::Pointer(*FunctionProto)) Returns the event category. # :get_phase :: - # (FFI::Pointer(*)) Returns the event processing phase. + # (FFI::Pointer(*FunctionProto)) Returns the event processing phase. # :can_bubble :: - # (FFI::Pointer(*)) Returns true (1) if the event can bubble up the tree. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the event can bubble up the tree. # :can_cancel :: - # (FFI::Pointer(*)) Returns true (1) if the event can be canceled. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the event can be canceled. # :get_document :: - # (FFI::Pointer(*)) Returns the document associated with this event. + # (FFI::Pointer(*FunctionProto)) Returns the document associated with this event. # :get_target :: - # (FFI::Pointer(*)) Returns the target of the event. + # (FFI::Pointer(*FunctionProto)) Returns the target of the event. # :get_current_target :: - # (FFI::Pointer(*)) Returns the current target of the event. + # (FFI::Pointer(*FunctionProto)) Returns the current target of the event. class Domevent < FFI::Struct layout :base, :char, :get_type, :pointer, @@ -227,15 +229,15 @@ class Domevent < FFI::Struct :get_target, :pointer, :get_current_target, :pointer end - + # Structure to implement for handling DOM events. The functions of this # structure will be called on the render process main thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :handle_event :: - # (FFI::Pointer(*)) Called when an event is received. The event object passed to this function + # (FFI::Pointer(*FunctionProto)) Called when an event is received. The event object passed to this function # contains a snapshot of the DOM at the time this function is executed. DOM # objects are only valid for the scope of this function. Do not keep # references to or attempt to access any DOM objects outside the scope of @@ -244,5 +246,5 @@ class DomeventListener < FFI::Struct layout :base, :char, :handle_event, :pointer end - + end diff --git a/test/output/include/capi/cef_focus_handler_capi.rb b/test/output/include/capi/cef_focus_handler_capi.rb index 13f6e43..7358234 100644 --- a/test/output/include/capi/cef_focus_handler_capi.rb +++ b/test/output/include/capi/cef_focus_handler_capi.rb @@ -1,54 +1,56 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # Implement this structure to handle events related to focus. The functions of # this structure will be called on the UI thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :on_take_focus :: - # (FFI::Pointer(*)) Called when the browser component is about to loose focus. For instance, if + # (FFI::Pointer(*FunctionProto)) Called when the browser component is about to loose focus. For instance, if # focus was on the last HTML element and the user pressed the TAB key. |next| # will be true (1) if the browser is giving focus to the next component and # false (0) if the browser is giving focus to the previous component. # :on_set_focus :: - # (FFI::Pointer(*)) Called when the browser component is requesting focus. |source| indicates + # (FFI::Pointer(*FunctionProto)) Called when the browser component is requesting focus. |source| indicates # where the focus request is originating from. Return false (0) to allow the # focus to be set or true (1) to cancel setting the focus. # :on_got_focus :: - # (FFI::Pointer(*)) Called when the browser component has received focus. + # (FFI::Pointer(*FunctionProto)) Called when the browser component has received focus. class FocusHandler < FFI::Struct layout :base, :char, :on_take_focus, :pointer, :on_set_focus, :pointer, :on_got_focus, :pointer end - + end diff --git a/test/output/include/capi/cef_frame_capi.rb b/test/output/include/capi/cef_frame_capi.rb index 7ff0bc8..af0bf41 100644 --- a/test/output/include/capi/cef_frame_capi.rb +++ b/test/output/include/capi/cef_frame_capi.rb @@ -1,113 +1,115 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) class StringVisitor < FFI::Struct layout :dummy, :char end - + # (Not documented) class StringVisitor < FFI::Struct layout :dummy, :char end - + # (Not documented) class Request < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class V8context < FFI::Struct layout :dummy, :char end - + # (Not documented) class Domvisitor < FFI::Struct layout :dummy, :char end - + # Structure used to represent a frame in the browser window. When used in the # browser process the functions of this structure may be called on any thread # unless otherwise indicated in the comments. When used in the render process # the functions of this structure may only be called on the main thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :is_valid :: - # (FFI::Pointer(*)) True if this object is currently attached to a valid frame. + # (FFI::Pointer(*FunctionProto)) True if this object is currently attached to a valid frame. # :undo :: - # (FFI::Pointer(*)) Execute undo in this frame. + # (FFI::Pointer(*FunctionProto)) Execute undo in this frame. # :redo_ :: - # (FFI::Pointer(*)) Execute redo in this frame. + # (FFI::Pointer(*FunctionProto)) Execute redo in this frame. # :cut :: - # (FFI::Pointer(*)) Execute cut in this frame. + # (FFI::Pointer(*FunctionProto)) Execute cut in this frame. # :copy :: - # (FFI::Pointer(*)) Execute copy in this frame. + # (FFI::Pointer(*FunctionProto)) Execute copy in this frame. # :paste :: - # (FFI::Pointer(*)) Execute paste in this frame. + # (FFI::Pointer(*FunctionProto)) Execute paste in this frame. # :del :: - # (FFI::Pointer(*)) Execute delete in this frame. + # (FFI::Pointer(*FunctionProto)) Execute delete in this frame. # :select_all :: - # (FFI::Pointer(*)) Execute select all in this frame. + # (FFI::Pointer(*FunctionProto)) Execute select all in this frame. # :view_source :: - # (FFI::Pointer(*)) Save this frame's HTML source to a temporary file and open it in the + # (FFI::Pointer(*FunctionProto)) Save this frame's HTML source to a temporary file and open it in the # default text viewing application. This function can only be called from the # browser process. # :get_source :: - # (FFI::Pointer(*)) Retrieve this frame's HTML source as a string sent to the specified + # (FFI::Pointer(*FunctionProto)) Retrieve this frame's HTML source as a string sent to the specified # visitor. # :get_text :: - # (FFI::Pointer(*)) Retrieve this frame's display text as a string sent to the specified + # (FFI::Pointer(*FunctionProto)) Retrieve this frame's display text as a string sent to the specified # visitor. # :load_request :: - # (FFI::Pointer(*)) Load the request represented by the |request| object. + # (FFI::Pointer(*FunctionProto)) Load the request represented by the |request| object. # :load_url :: - # (FFI::Pointer(*)) Load the specified |url|. + # (FFI::Pointer(*FunctionProto)) Load the specified |url|. # :load_string :: - # (FFI::Pointer(*)) Load the contents of |string_val| with the optional dummy target |url|. + # (FFI::Pointer(*FunctionProto)) Load the contents of |string_val| with the optional dummy target |url|. # :execute_java_script :: - # (FFI::Pointer(*)) Execute a string of JavaScript code in this frame. The |script_url| + # (FFI::Pointer(*FunctionProto)) Execute a string of JavaScript code in this frame. The |script_url| # parameter is the URL where the script in question can be found, if any. The # renderer may request this URL to show the developer the source of the # error. The |start_line| parameter is the base line number to use for error # reporting. # :is_main :: - # (FFI::Pointer(*)) Returns true (1) if this is the main (top-level) frame. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this is the main (top-level) frame. # :is_focused :: - # (FFI::Pointer(*)) Returns true (1) if this is the focused frame. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this is the focused frame. # :get_name :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_identifier :: - # (FFI::Pointer(*)) Returns the globally unique identifier for this frame. + # (FFI::Pointer(*FunctionProto)) Returns the globally unique identifier for this frame. # :get_parent :: - # (FFI::Pointer(*)) Returns the parent of this frame or NULL if this is the main (top-level) + # (FFI::Pointer(*FunctionProto)) Returns the parent of this frame or NULL if this is the main (top-level) # frame. # :get_url :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_browser :: - # (FFI::Pointer(*)) Returns the browser that this frame belongs to. + # (FFI::Pointer(*FunctionProto)) Returns the browser that this frame belongs to. # :get_v8context :: - # (FFI::Pointer(*)) Get the V8 context associated with the frame. This function can only be + # (FFI::Pointer(*FunctionProto)) Get the V8 context associated with the frame. This function can only be # called from the render process. # :visit_dom :: - # (FFI::Pointer(*)) Visit the DOM document. This function can only be called from the render + # (FFI::Pointer(*FunctionProto)) Visit the DOM document. This function can only be called from the render # process. class Frame < FFI::Struct layout :base, :char, @@ -136,5 +138,5 @@ class Frame < FFI::Struct :get_v8context, :pointer, :visit_dom, :pointer end - + end diff --git a/test/output/include/capi/cef_geolocation_handler_capi.rb b/test/output/include/capi/cef_geolocation_handler_capi.rb index 7d6ccdf..924281f 100644 --- a/test/output/include/capi/cef_geolocation_handler_capi.rb +++ b/test/output/include/capi/cef_geolocation_handler_capi.rb @@ -1,55 +1,57 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Callback structure used for asynchronous continuation of geolocation # permission requests. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :cont :: - # (FFI::Pointer(*)) Call to allow or deny geolocation access. + # (FFI::Pointer(*FunctionProto)) Call to allow or deny geolocation access. class GeolocationCallback < FFI::Struct layout :base, :char, :cont, :pointer end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # Implement this structure to handle events related to geolocation permission # requests. The functions of this structure will be called on the browser # process IO thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :on_request_geolocation_permission :: - # (FFI::Pointer(*)) Called when a page requests permission to access geolocation information. + # (FFI::Pointer(*FunctionProto)) Called when a page requests permission to access geolocation information. # |requesting_url| is the URL requesting permission and |request_id| is the # unique ID for the permission request. Call # cef_geolocation_callback_t::Continue to allow or deny the permission # request. # :on_cancel_geolocation_permission :: - # (FFI::Pointer(*)) Called when a geolocation access request is canceled. |requesting_url| is + # (FFI::Pointer(*FunctionProto)) Called when a geolocation access request is canceled. |requesting_url| is # the URL that originally requested permission and |request_id| is the unique # ID for the permission request. class GeolocationHandler < FFI::Struct @@ -57,5 +59,5 @@ class GeolocationHandler < FFI::Struct :on_request_geolocation_permission, :pointer, :on_cancel_geolocation_permission, :pointer end - + end diff --git a/test/output/include/capi/cef_jsdialog_handler_capi.rb b/test/output/include/capi/cef_jsdialog_handler_capi.rb index f427e9a..b08a130 100644 --- a/test/output/include/capi/cef_jsdialog_handler_capi.rb +++ b/test/output/include/capi/cef_jsdialog_handler_capi.rb @@ -1,54 +1,56 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Callback structure used for asynchronous continuation of JavaScript dialog # requests. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :cont :: - # (FFI::Pointer(*)) Continue the JS dialog request. Set |success| to true (1) if the OK button + # (FFI::Pointer(*FunctionProto)) Continue the JS dialog request. Set |success| to true (1) if the OK button # was pressed. The |user_input| value should be specified for prompt dialogs. class JsdialogCallback < FFI::Struct layout :base, :char, :cont, :pointer end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # Implement this structure to handle events related to JavaScript dialogs. The # functions of this structure will be called on the UI thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :on_jsdialog :: - # (FFI::Pointer(*)) Called to run a JavaScript dialog. The |default_prompt_text| value will be + # (FFI::Pointer(*FunctionProto)) Called to run a JavaScript dialog. The |default_prompt_text| value will be # specified for prompt dialogs only. Set |suppress_message| to true (1) and # return false (0) to suppress the message (suppressing messages is # preferable to immediately executing the callback as this is used to detect @@ -62,14 +64,14 @@ class Browser < FFI::Struct # the application must execute |callback| once the custom dialog is # dismissed. # :on_before_unload_dialog :: - # (FFI::Pointer(*)) Called to run a dialog asking the user if they want to leave a page. Return + # (FFI::Pointer(*FunctionProto)) Called to run a dialog asking the user if they want to leave a page. Return # false (0) to use the default dialog implementation. Return true (1) if the # application will use a custom dialog or if the callback has been executed # immediately. Custom dialogs may be either modal or modeless. If a custom # dialog is used the application must execute |callback| once the custom # dialog is dismissed. # :on_reset_dialog_state :: - # (FFI::Pointer(*)) Called to cancel any pending dialogs and reset any saved dialog state. Will + # (FFI::Pointer(*FunctionProto)) Called to cancel any pending dialogs and reset any saved dialog state. Will # be called due to events like page navigation irregardless of whether any # dialogs are currently pending. class JsdialogHandler < FFI::Struct @@ -78,5 +80,5 @@ class JsdialogHandler < FFI::Struct :on_before_unload_dialog, :pointer, :on_reset_dialog_state, :pointer end - + end diff --git a/test/output/include/capi/cef_keyboard_handler_capi.rb b/test/output/include/capi/cef_keyboard_handler_capi.rb index 2c37192..f96a287 100644 --- a/test/output/include/capi/cef_keyboard_handler_capi.rb +++ b/test/output/include/capi/cef_keyboard_handler_capi.rb @@ -1,37 +1,39 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # Implement this structure to handle events related to keyboard input. The # functions of this structure will be called on the UI thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :on_pre_key_event :: - # (FFI::Pointer(*)) shortcut set |is_keyboard_shortcut| to true (1) and return false (0). + # (FFI::Pointer(*FunctionProto)) shortcut set |is_keyboard_shortcut| to true (1) and return false (0). # :on_key_event :: - # (FFI::Pointer(*)) Called after the renderer and JavaScript in the page has had a chance to + # (FFI::Pointer(*FunctionProto)) Called after the renderer and JavaScript in the page has had a chance to # handle the event. |event| contains information about the keyboard event. # |os_event| is the operating system event message, if any. Return true (1) # if the keyboard event was handled or false (0) otherwise. @@ -40,5 +42,5 @@ class KeyboardHandler < FFI::Struct :on_pre_key_event, :pointer, :on_key_event, :pointer end - + end diff --git a/test/output/include/capi/cef_life_span_handler_capi.rb b/test/output/include/capi/cef_life_span_handler_capi.rb index badb5af..1325f38 100644 --- a/test/output/include/capi/cef_life_span_handler_capi.rb +++ b/test/output/include/capi/cef_life_span_handler_capi.rb @@ -1,55 +1,57 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Client < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # Implement this structure to handle events related to browser life span. The # functions of this structure will be called on the UI thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :on_before_popup :: - # (FFI::Pointer(*)) Called before a new popup window is created. The |parentBrowser| parameter + # (FFI::Pointer(*FunctionProto)) Called before a new popup window is created. The |parentBrowser| parameter # will point to the parent browser window. The |popupFeatures| parameter will # contain information about the style of popup window requested. Return false # (0) to have the framework create the new popup window based on the @@ -59,19 +61,19 @@ class Browser < FFI::Struct # modify the object that |client| points to. To change the settings for the # new window modify the |settings| structure. # :on_after_created :: - # (FFI::Pointer(*)) Called after a new window is created. + # (FFI::Pointer(*FunctionProto)) Called after a new window is created. # :run_modal :: - # (FFI::Pointer(*)) Called when a modal window is about to display and the modal loop should + # (FFI::Pointer(*FunctionProto)) Called when a modal window is about to display and the modal loop should # begin running. Return false (0) to use the default modal loop # implementation or true (1) to use a custom implementation. # :do_close :: - # (FFI::Pointer(*)) Called when a window has recieved a request to close. Return false (0) to + # (FFI::Pointer(*FunctionProto)) Called when a window has recieved a request to close. Return false (0) to # proceed with the window close or true (1) to cancel the window close. If # this is a modal window and a custom modal loop implementation was provided # in run_modal() this callback should be used to restore the opener window to # a usable state. # :on_before_close :: - # (FFI::Pointer(*)) Called just before a window is closed. If this is a modal window and a + # (FFI::Pointer(*FunctionProto)) Called just before a window is closed. If this is a modal window and a # custom modal loop implementation was provided in run_modal() this callback # should be used to exit the custom modal loop. class LifeSpanHandler < FFI::Struct @@ -82,5 +84,5 @@ class LifeSpanHandler < FFI::Struct :do_close, :pointer, :on_before_close, :pointer end - + end diff --git a/test/output/include/capi/cef_load_handler_capi.rb b/test/output/include/capi/cef_load_handler_capi.rb index c32afff..7207380 100644 --- a/test/output/include/capi/cef_load_handler_capi.rb +++ b/test/output/include/capi/cef_load_handler_capi.rb @@ -1,69 +1,71 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Frame < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Frame < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Frame < FFI::Struct layout :dummy, :char end - + # Implement this structure to handle events related to browser load status. The # functions of this structure will be called on the UI thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :on_load_start :: - # (FFI::Pointer(*)) Called when the browser begins loading a frame. The |frame| value will + # (FFI::Pointer(*FunctionProto)) Called when the browser begins loading a frame. The |frame| value will # never be NULL -- call the is_main() function to check if this frame is the # main frame. Multiple frames may be loading at the same time. Sub-frames may # start or continue loading after the main frame load has ended. This # function may not be called for a particular frame if the load request for # that frame fails. # :on_load_end :: - # (FFI::Pointer(*)) Called when the browser is done loading a frame. The |frame| value will + # (FFI::Pointer(*FunctionProto)) Called when the browser is done loading a frame. The |frame| value will # never be NULL -- call the is_main() function to check if this frame is the # main frame. Multiple frames may be loading at the same time. Sub-frames may # start or continue loading after the main frame load has ended. This # function will always be called for all frames irrespective of whether the # request completes successfully. # :on_load_error :: - # (FFI::Pointer(*)) Called when the browser fails to load a resource. |errorCode| is the error + # (FFI::Pointer(*FunctionProto)) Called when the browser fails to load a resource. |errorCode| is the error # code number, |errorText| is the error text and and |failedUrl| is the URL # that failed to load. See net\base\net_error_list.h for complete # descriptions of the error codes. @@ -73,5 +75,5 @@ class LoadHandler < FFI::Struct :on_load_end, :pointer, :on_load_error, :pointer end - + end diff --git a/test/output/include/capi/cef_menu_model_capi.rb b/test/output/include/capi/cef_menu_model_capi.rb index 843a14a..df23fc0 100644 --- a/test/output/include/capi/cef_menu_model_capi.rb +++ b/test/output/include/capi/cef_menu_model_capi.rb @@ -1,149 +1,151 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Supports creation and modification of menus. See cef_menu_id_t for the # command ids that have default implementations. All user-defined command ids # should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. The functions of # this structure can only be accessed on the browser process the UI thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :clear :: - # (FFI::Pointer(*)) Clears the menu. Returns true (1) on success. + # (FFI::Pointer(*FunctionProto)) Clears the menu. Returns true (1) on success. # :get_count :: - # (FFI::Pointer(*)) Returns the number of items in this menu. + # (FFI::Pointer(*FunctionProto)) Returns the number of items in this menu. # :add_separator :: - # (FFI::Pointer(*)) Add a separator to the menu. Returns true (1) on success. + # (FFI::Pointer(*FunctionProto)) Add a separator to the menu. Returns true (1) on success. # :add_item :: - # (FFI::Pointer(*)) Add an item to the menu. Returns true (1) on success. + # (FFI::Pointer(*FunctionProto)) Add an item to the menu. Returns true (1) on success. # :add_check_item :: - # (FFI::Pointer(*)) Add a check item to the menu. Returns true (1) on success. + # (FFI::Pointer(*FunctionProto)) Add a check item to the menu. Returns true (1) on success. # :add_radio_item :: - # (FFI::Pointer(*)) Add a radio item to the menu. Only a single item with the specified + # (FFI::Pointer(*FunctionProto)) Add a radio item to the menu. Only a single item with the specified # |group_id| can be checked at a time. Returns true (1) on success. # :add_sub_menu :: - # (FFI::Pointer(*)) Add a sub-menu to the menu. The new sub-menu is returned. + # (FFI::Pointer(*FunctionProto)) Add a sub-menu to the menu. The new sub-menu is returned. # :insert_separator_at :: - # (FFI::Pointer(*)) Insert a separator in the menu at the specified |index|. Returns true (1) + # (FFI::Pointer(*FunctionProto)) Insert a separator in the menu at the specified |index|. Returns true (1) # on success. # :insert_item_at :: - # (FFI::Pointer(*)) Insert an item in the menu at the specified |index|. Returns true (1) on + # (FFI::Pointer(*FunctionProto)) Insert an item in the menu at the specified |index|. Returns true (1) on # success. # :insert_check_item_at :: - # (FFI::Pointer(*)) Insert a check item in the menu at the specified |index|. Returns true (1) + # (FFI::Pointer(*FunctionProto)) Insert a check item in the menu at the specified |index|. Returns true (1) # on success. # :insert_radio_item_at :: - # (FFI::Pointer(*)) Insert a radio item in the menu at the specified |index|. Only a single + # (FFI::Pointer(*FunctionProto)) Insert a radio item in the menu at the specified |index|. Only a single # item with the specified |group_id| can be checked at a time. Returns true # (1) on success. # :insert_sub_menu_at :: - # (FFI::Pointer(*)) Insert a sub-menu in the menu at the specified |index|. The new sub-menu is + # (FFI::Pointer(*FunctionProto)) Insert a sub-menu in the menu at the specified |index|. The new sub-menu is # returned. # :remove :: - # (FFI::Pointer(*)) Removes the item with the specified |command_id|. Returns true (1) on + # (FFI::Pointer(*FunctionProto)) Removes the item with the specified |command_id|. Returns true (1) on # success. # :remove_at :: - # (FFI::Pointer(*)) Removes the item at the specified |index|. Returns true (1) on success. + # (FFI::Pointer(*FunctionProto)) Removes the item at the specified |index|. Returns true (1) on success. # :get_index_of :: - # (FFI::Pointer(*)) Returns the index associated with the specified |command_id| or -1 if not + # (FFI::Pointer(*FunctionProto)) Returns the index associated with the specified |command_id| or -1 if not # found due to the command id not existing in the menu. # :get_command_id_at :: - # (FFI::Pointer(*)) Returns the command id at the specified |index| or -1 if not found due to + # (FFI::Pointer(*FunctionProto)) Returns the command id at the specified |index| or -1 if not found due to # invalid range or the index being a separator. # :set_command_id_at :: - # (FFI::Pointer(*)) Sets the command id at the specified |index|. Returns true (1) on success. + # (FFI::Pointer(*FunctionProto)) Sets the command id at the specified |index|. Returns true (1) on success. # :get_label :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_label_at :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :set_label :: - # (FFI::Pointer(*)) Sets the label for the specified |command_id|. Returns true (1) on success. + # (FFI::Pointer(*FunctionProto)) Sets the label for the specified |command_id|. Returns true (1) on success. # :set_label_at :: - # (FFI::Pointer(*)) Set the label at the specified |index|. Returns true (1) on success. + # (FFI::Pointer(*FunctionProto)) Set the label at the specified |index|. Returns true (1) on success. # :get_type :: - # (FFI::Pointer(*)) Returns the item type for the specified |command_id|. + # (FFI::Pointer(*FunctionProto)) Returns the item type for the specified |command_id|. # :get_type_at :: - # (FFI::Pointer(*)) Returns the item type at the specified |index|. + # (FFI::Pointer(*FunctionProto)) Returns the item type at the specified |index|. # :get_group_id :: - # (FFI::Pointer(*)) Returns the group id for the specified |command_id| or -1 if invalid. + # (FFI::Pointer(*FunctionProto)) Returns the group id for the specified |command_id| or -1 if invalid. # :get_group_id_at :: - # (FFI::Pointer(*)) Returns the group id at the specified |index| or -1 if invalid. + # (FFI::Pointer(*FunctionProto)) Returns the group id at the specified |index| or -1 if invalid. # :set_group_id :: - # (FFI::Pointer(*)) Sets the group id for the specified |command_id|. Returns true (1) on + # (FFI::Pointer(*FunctionProto)) Sets the group id for the specified |command_id|. Returns true (1) on # success. # :set_group_id_at :: - # (FFI::Pointer(*)) Sets the group id at the specified |index|. Returns true (1) on success. + # (FFI::Pointer(*FunctionProto)) Sets the group id at the specified |index|. Returns true (1) on success. # :get_sub_menu :: - # (FFI::Pointer(*)) Returns the submenu for the specified |command_id| or NULL if invalid. + # (FFI::Pointer(*FunctionProto)) Returns the submenu for the specified |command_id| or NULL if invalid. # :get_sub_menu_at :: - # (FFI::Pointer(*)) Returns the submenu at the specified |index| or NULL if invalid. + # (FFI::Pointer(*FunctionProto)) Returns the submenu at the specified |index| or NULL if invalid. # :is_visible :: - # (FFI::Pointer(*)) Returns true (1) if the specified |command_id| is visible. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the specified |command_id| is visible. # :is_visible_at :: - # (FFI::Pointer(*)) Returns true (1) if the specified |index| is visible. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the specified |index| is visible. # :set_visible :: - # (FFI::Pointer(*)) Change the visibility of the specified |command_id|. Returns true (1) on + # (FFI::Pointer(*FunctionProto)) Change the visibility of the specified |command_id|. Returns true (1) on # success. # :set_visible_at :: - # (FFI::Pointer(*)) Change the visibility at the specified |index|. Returns true (1) on + # (FFI::Pointer(*FunctionProto)) Change the visibility at the specified |index|. Returns true (1) on # success. # :is_enabled :: - # (FFI::Pointer(*)) Returns true (1) if the specified |command_id| is enabled. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the specified |command_id| is enabled. # :is_enabled_at :: - # (FFI::Pointer(*)) Returns true (1) if the specified |index| is enabled. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the specified |index| is enabled. # :set_enabled :: - # (FFI::Pointer(*)) Change the enabled status of the specified |command_id|. Returns true (1) + # (FFI::Pointer(*FunctionProto)) Change the enabled status of the specified |command_id|. Returns true (1) # on success. # :set_enabled_at :: - # (FFI::Pointer(*)) Change the enabled status at the specified |index|. Returns true (1) on + # (FFI::Pointer(*FunctionProto)) Change the enabled status at the specified |index|. Returns true (1) on # success. # :is_checked :: - # (FFI::Pointer(*)) Returns true (1) if the specified |command_id| is checked. Only applies to + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the specified |command_id| is checked. Only applies to # check and radio items. # :is_checked_at :: - # (FFI::Pointer(*)) Returns true (1) if the specified |index| is checked. Only applies to check + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the specified |index| is checked. Only applies to check # and radio items. # :set_checked :: - # (FFI::Pointer(*)) Check the specified |command_id|. Only applies to check and radio items. + # (FFI::Pointer(*FunctionProto)) Check the specified |command_id|. Only applies to check and radio items. # Returns true (1) on success. # :set_checked_at :: - # (FFI::Pointer(*)) Check the specified |index|. Only applies to check and radio items. Returns + # (FFI::Pointer(*FunctionProto)) Check the specified |index|. Only applies to check and radio items. Returns # true (1) on success. # :has_accelerator :: - # (FFI::Pointer(*)) Returns true (1) if the specified |command_id| has a keyboard accelerator + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the specified |command_id| has a keyboard accelerator # assigned. # :has_accelerator_at :: - # (FFI::Pointer(*)) Returns true (1) if the specified |index| has a keyboard accelerator + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the specified |index| has a keyboard accelerator # assigned. # :set_accelerator :: - # (FFI::Pointer(*)) Set the keyboard accelerator for the specified |command_id|. |key_code| can + # (FFI::Pointer(*FunctionProto)) Set the keyboard accelerator for the specified |command_id|. |key_code| can # be any virtual key or character value. Returns true (1) on success. # :set_accelerator_at :: - # (FFI::Pointer(*)) Set the keyboard accelerator at the specified |index|. |key_code| can be + # (FFI::Pointer(*FunctionProto)) Set the keyboard accelerator at the specified |index|. |key_code| can be # any virtual key or character value. Returns true (1) on success. # :remove_accelerator :: - # (FFI::Pointer(*)) Remove the keyboard accelerator for the specified |command_id|. Returns + # (FFI::Pointer(*FunctionProto)) Remove the keyboard accelerator for the specified |command_id|. Returns # true (1) on success. # :remove_accelerator_at :: - # (FFI::Pointer(*)) Remove the keyboard accelerator at the specified |index|. Returns true (1) + # (FFI::Pointer(*FunctionProto)) Remove the keyboard accelerator at the specified |index|. Returns true (1) # on success. # :get_accelerator :: - # (FFI::Pointer(*)) Retrieves the keyboard accelerator for the specified |command_id|. Returns + # (FFI::Pointer(*FunctionProto)) Retrieves the keyboard accelerator for the specified |command_id|. Returns # true (1) on success. # :get_accelerator_at :: - # (FFI::Pointer(*)) Retrieves the keyboard accelerator for the specified |index|. Returns true + # (FFI::Pointer(*FunctionProto)) Retrieves the keyboard accelerator for the specified |index|. Returns true # (1) on success. class MenuModel < FFI::Struct layout :base, :char, @@ -197,5 +199,5 @@ class MenuModel < FFI::Struct :get_accelerator, :pointer, :get_accelerator_at, :pointer end - + end diff --git a/test/output/include/capi/cef_origin_whitelist_capi.rb b/test/output/include/capi/cef_origin_whitelist_capi.rb index f03c3f1..75bf1cf 100644 --- a/test/output/include/capi/cef_origin_whitelist_capi.rb +++ b/test/output/include/capi/cef_origin_whitelist_capi.rb @@ -1,19 +1,21 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Add an entry to the cross-origin access whitelist. - # + # The same-origin policy restricts how scripts hosted from different origins # (scheme + domain + port) can communicate. By default, scripts can only access # resources with the same origin. Scripts hosted on the HTTP and HTTPS schemes @@ -22,13 +24,13 @@ def self.attach_function(name, *_) # XMLHttpRequest requests on http://target.example.com if the # http://target.example.com request returns an "Access-Control-Allow-Origin: # https://source.example.com" response header. - # + # Scripts in separate frames or iframes and hosted from the same protocol and # domain suffix can execute cross-origin JavaScript if both pages set the # document.domain value to the same domain suffix. For example, # scheme://foo.example.com and scheme://bar.example.com can communicate using # JavaScript if both domains set document.domain="example.com". - # + # This function is used to allow access to origins that would otherwise violate # the same-origin policy. Scripts hosted underneath the fully qualified # |source_origin| URL (like http://www.example.com) will be allowed access to @@ -38,41 +40,38 @@ def self.attach_function(name, *_) # |allow_target_subdomains| is true (1) sub-domain matches will be allowed. If # |target_domain| is NULL and |allow_target_subdomains| if true (1) all domains # and IP addresses will be allowed. - # + # This function cannot be used to bypass the restrictions on local or display # isolated schemes. See the comments on CefRegisterCustomScheme for more # information. - # + # This function may be called on any thread. Returns false (0) if # |source_origin| is invalid or the whitelist cannot be accessed. - # + # @method add_cross_origin_whitelist_entry(source_origin, target_protocol, target_domain, allow_target_subdomains) - # @param [FFI::Pointer(*String)] source_origin - # @param [FFI::Pointer(*String)] target_protocol - # @param [FFI::Pointer(*String)] target_domain - # @param [Integer] allow_target_subdomains - # @return [Integer] + # @param [FFI::Pointer(*String)] source_origin + # @param [FFI::Pointer(*String)] target_protocol + # @param [FFI::Pointer(*String)] target_domain + # @param [Integer] allow_target_subdomains + # @return [Integer] # @scope class attach_function :add_cross_origin_whitelist_entry, :cef_add_cross_origin_whitelist_entry, [:pointer, :pointer, :pointer, :int], :int - # Remove an entry from the cross-origin access whitelist. Returns false (0) if # |source_origin| is invalid or the whitelist cannot be accessed. - # + # @method remove_cross_origin_whitelist_entry(source_origin, target_protocol, target_domain, allow_target_subdomains) - # @param [FFI::Pointer(*String)] source_origin - # @param [FFI::Pointer(*String)] target_protocol - # @param [FFI::Pointer(*String)] target_domain - # @param [Integer] allow_target_subdomains - # @return [Integer] + # @param [FFI::Pointer(*String)] source_origin + # @param [FFI::Pointer(*String)] target_protocol + # @param [FFI::Pointer(*String)] target_domain + # @param [Integer] allow_target_subdomains + # @return [Integer] # @scope class attach_function :remove_cross_origin_whitelist_entry, :cef_remove_cross_origin_whitelist_entry, [:pointer, :pointer, :pointer, :int], :int - # Remove all entries from the cross-origin access whitelist. Returns false (0) # if the whitelist cannot be accessed. - # + # @method clear_cross_origin_whitelist() - # @return [Integer] + # @return [Integer] # @scope class attach_function :clear_cross_origin_whitelist, :cef_clear_cross_origin_whitelist, [], :int - end diff --git a/test/output/include/capi/cef_process_message_capi.rb b/test/output/include/capi/cef_process_message_capi.rb index 2958f40..8b0823e 100644 --- a/test/output/include/capi/cef_process_message_capi.rb +++ b/test/output/include/capi/cef_process_message_capi.rb @@ -1,39 +1,41 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) class ListValue < FFI::Struct layout :dummy, :char end - + # Structure representing a message. Can be used on any process and thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :is_valid :: - # (FFI::Pointer(*)) Returns true (1) if this object is valid. Do not call any other functions + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is valid. Do not call any other functions # if this function returns false (0). # :is_read_only :: - # (FFI::Pointer(*)) Returns true (1) if the values of this object are read-only. Some APIs may + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the values of this object are read-only. Some APIs may # expose read-only objects. # :copy :: - # (FFI::Pointer(*)) Returns a writable copy of this object. + # (FFI::Pointer(*FunctionProto)) Returns a writable copy of this object. # :get_name :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_argument_list :: - # (FFI::Pointer(*)) Returns the list of arguments. + # (FFI::Pointer(*FunctionProto)) Returns the list of arguments. class ProcessMessage < FFI::Struct layout :base, :char, :is_valid, :pointer, @@ -42,13 +44,12 @@ class ProcessMessage < FFI::Struct :get_name, :pointer, :get_argument_list, :pointer end - + # Create a new cef_process_message_t object with the specified name. - # + # @method process_message_create(name) - # @param [FFI::Pointer(*String)] name - # @return [ProcessMessage] + # @param [FFI::Pointer(*String)] name + # @return [ProcessMessage] # @scope class attach_function :process_message_create, :cef_process_message_create, [:pointer], ProcessMessage - end diff --git a/test/output/include/capi/cef_proxy_handler_capi.rb b/test/output/include/capi/cef_proxy_handler_capi.rb index 5655cc4..4f0daf7 100644 --- a/test/output/include/capi/cef_proxy_handler_capi.rb +++ b/test/output/include/capi/cef_proxy_handler_capi.rb @@ -1,27 +1,29 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Implement this structure to handle proxy resolution events. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :get_proxy_for_url :: - # (FFI::Pointer(*)) Called to retrieve proxy information for the specified |url|. + # (FFI::Pointer(*FunctionProto)) Called to retrieve proxy information for the specified |url|. class ProxyHandler < FFI::Struct layout :base, :char, :get_proxy_for_url, :pointer end - + end diff --git a/test/output/include/capi/cef_render_process_handler_capi.rb b/test/output/include/capi/cef_render_process_handler_capi.rb index 930f944..3969306 100644 --- a/test/output/include/capi/cef_render_process_handler_capi.rb +++ b/test/output/include/capi/cef_render_process_handler_capi.rb @@ -1,112 +1,114 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Frame < FFI::Struct layout :dummy, :char end - + # (Not documented) class V8context < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Frame < FFI::Struct layout :dummy, :char end - + # (Not documented) class V8context < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Frame < FFI::Struct layout :dummy, :char end - + # (Not documented) class Domnode < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class ProcessMessage < FFI::Struct layout :dummy, :char end - + # Structure used to implement render process callbacks. The functions of this # structure will always be called on the render process main thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :on_render_thread_created :: - # (FFI::Pointer(*)) Called after the render process main thread has been created. + # (FFI::Pointer(*FunctionProto)) Called after the render process main thread has been created. # :on_web_kit_initialized :: - # (FFI::Pointer(*)) Called after WebKit has been initialized. + # (FFI::Pointer(*FunctionProto)) Called after WebKit has been initialized. # :on_browser_created :: - # (FFI::Pointer(*)) Called after a browser has been created. + # (FFI::Pointer(*FunctionProto)) Called after a browser has been created. # :on_browser_destroyed :: - # (FFI::Pointer(*)) Called before a browser is destroyed. + # (FFI::Pointer(*FunctionProto)) Called before a browser is destroyed. # :on_context_created :: - # (FFI::Pointer(*)) Called immediately after the V8 context for a frame has been created. To + # (FFI::Pointer(*FunctionProto)) Called immediately after the V8 context for a frame has been created. To # retrieve the JavaScript 'window' object use the # cef_v8context_t::get_global() function. # :on_context_released :: - # (FFI::Pointer(*)) Called immediately before the V8 context for a frame is released. No + # (FFI::Pointer(*FunctionProto)) Called immediately before the V8 context for a frame is released. No # references to the context should be kept after this function is called. # :on_focused_node_changed :: - # (FFI::Pointer(*)) Called when a new node in the the browser gets focus. The |node| value may + # (FFI::Pointer(*FunctionProto)) Called when a new node in the the browser gets focus. The |node| value may # be NULL if no specific node has gained focus. The node object passed to # this function represents a snapshot of the DOM at the time this function is # executed. DOM objects are only valid for the scope of this function. Do not # keep references to or attempt to access any DOM objects outside the scope # of this function. # :on_process_message_received :: - # (FFI::Pointer(*)) Called when a new message is received from a different process. Return true + # (FFI::Pointer(*FunctionProto)) Called when a new message is received from a different process. Return true # (1) if the message was handled or false (0) otherwise. Do not keep a # reference to or attempt to access the message outside of this callback. class RenderProcessHandler < FFI::Struct @@ -120,5 +122,5 @@ class RenderProcessHandler < FFI::Struct :on_focused_node_changed, :pointer, :on_process_message_received, :pointer end - + end diff --git a/test/output/include/capi/cef_request_capi.rb b/test/output/include/capi/cef_request_capi.rb index 539db5c..1023df7 100644 --- a/test/output/include/capi/cef_request_capi.rb +++ b/test/output/include/capi/cef_request_capi.rb @@ -1,53 +1,55 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Structure used to represent a web request. The functions of this structure # may be called on any thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :is_read_only :: - # (FFI::Pointer(*)) Returns true (1) if this object is read-only. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is read-only. # :get_url :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :set_url :: - # (FFI::Pointer(*)) Set the fully qualified URL. + # (FFI::Pointer(*FunctionProto)) Set the fully qualified URL. # :get_method :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :set_method :: - # (FFI::Pointer(*)) Set the request function type. + # (FFI::Pointer(*FunctionProto)) Set the request function type. # :get_post_data :: - # (FFI::Pointer(*)) Get the post data. + # (FFI::Pointer(*FunctionProto)) Get the post data. # :set_post_data :: - # (FFI::Pointer(*)) Set the post data. + # (FFI::Pointer(*FunctionProto)) Set the post data. # :get_header_map :: - # (FFI::Pointer(*)) Get the header values. + # (FFI::Pointer(*FunctionProto)) Get the header values. # :set_header_map :: - # (FFI::Pointer(*)) Set the header values. + # (FFI::Pointer(*FunctionProto)) Set the header values. # :set :: - # (FFI::Pointer(*)) Set all values at one time. + # (FFI::Pointer(*FunctionProto)) Set all values at one time. # :get_flags :: - # (FFI::Pointer(*)) Get the flags used in combination with cef_urlrequest_t. See + # (FFI::Pointer(*FunctionProto)) Get the flags used in combination with cef_urlrequest_t. See # cef_urlrequest_flags_t for supported values. # :set_flags :: - # (FFI::Pointer(*)) Set the flags used in combination with cef_urlrequest_t. See + # (FFI::Pointer(*FunctionProto)) Set the flags used in combination with cef_urlrequest_t. See # cef_urlrequest_flags_t for supported values. # :get_first_party_for_cookies :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :set_first_party_for_cookies :: - # (FFI::Pointer(*)) Get the URL to the first party for cookies used in combination with + # (FFI::Pointer(*FunctionProto)) Get the URL to the first party for cookies used in combination with # cef_urlrequest_t. class Request < FFI::Struct layout :base, :char, @@ -66,89 +68,84 @@ class Request < FFI::Struct :get_first_party_for_cookies, :pointer, :set_first_party_for_cookies, :pointer end - + # Create a new cef_request_t object. - # + # @method request_create() - # @return [Request] + # @return [Request] # @scope class attach_function :request_create, :cef_request_create, [], Request - # (Not documented) class PostDataElement < FFI::Struct layout :dummy, :char end - + # (Not documented) class PostDataElement < FFI::Struct layout :dummy, :char end - + # (Not documented) class PostDataElement < FFI::Struct layout :dummy, :char end - + # Structure used to represent post data for a web request. The functions of # this structure may be called on any thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :is_read_only :: - # (FFI::Pointer(*)) Returns true (1) if this object is read-only. - # :get_element_count :: - # (FFI::Pointer(*)) Returns the number of existing post data elements. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is read-only. + # :size :: + # (error_unknown) Returns the number of existing post data elements. # :get_elements :: - # (FFI::Pointer(*)) Retrieve the post data elements. + # (FFI::Pointer(*FunctionProto)) Retrieve the post data elements. # :remove_element :: - # (FFI::Pointer(*)) Remove the specified post data element. Returns true (1) if the removal + # (FFI::Pointer(*FunctionProto)) Remove the specified post data element. Returns true (1) if the removal # succeeds. # :add_element :: - # (FFI::Pointer(*)) Add the specified post data element. Returns true (1) if the add succeeds. + # (FFI::Pointer(*FunctionProto)) Add the specified post data element. Returns true (1) if the add succeeds. # :remove_elements :: - # (FFI::Pointer(*)) Remove all existing post data elements. + # (FFI::Pointer(*FunctionProto)) Remove all existing post data elements. class PostData < FFI::Struct layout :base, :char, :is_read_only, :pointer, - :get_element_count, :pointer, + :size, :char, :get_elements, :pointer, :remove_element, :pointer, :add_element, :pointer, :remove_elements, :pointer end - + # Create a new cef_post_data_t object. - # + # @method post_data_create() - # @return [PostData] + # @return [PostData] # @scope class attach_function :post_data_create, :cef_post_data_create, [], PostData - # Structure used to represent a single element in the request post data. The # functions of this structure may be called on any thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :is_read_only :: - # (FFI::Pointer(*)) Returns true (1) if this object is read-only. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is read-only. # :set_to_empty :: - # (FFI::Pointer(*)) Remove all contents from the post data element. + # (FFI::Pointer(*FunctionProto)) Remove all contents from the post data element. # :set_to_file :: - # (FFI::Pointer(*)) The post data element will represent a file. + # (FFI::Pointer(*FunctionProto)) The post data element will represent a file. # :set_to_bytes :: - # (FFI::Pointer(*)) The post data element will represent bytes. The bytes passed in will be + # (FFI::Pointer(*FunctionProto)) The post data element will represent bytes. The bytes passed in will be # copied. # :get_type :: - # (FFI::Pointer(*)) Return the type of this post data element. + # (FFI::Pointer(*FunctionProto)) Return the type of this post data element. # :get_file :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). - # :get_bytes_count :: - # (FFI::Pointer(*)) Return the number of bytes. - # :get_bytes :: - # (FFI::Pointer(*)) Read up to |size| bytes into |bytes| and return the number of bytes - # actually read. + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). + # :size :: + # (error_unknown) Return the number of bytes. class PostDataElement < FFI::Struct layout :base, :char, :is_read_only, :pointer, @@ -157,15 +154,13 @@ class PostDataElement < FFI::Struct :set_to_bytes, :pointer, :get_type, :pointer, :get_file, :pointer, - :get_bytes_count, :pointer, - :get_bytes, :pointer + :size, :char end - + # Create a new cef_post_data_element_t object. - # + # @method post_data_element_create() - # @return [PostDataElement] + # @return [PostDataElement] # @scope class attach_function :post_data_element_create, :cef_post_data_element_create, [], PostDataElement - end diff --git a/test/output/include/capi/cef_request_handler_capi.rb b/test/output/include/capi/cef_request_handler_capi.rb index e4f6895..7e8c002 100644 --- a/test/output/include/capi/cef_request_handler_capi.rb +++ b/test/output/include/capi/cef_request_handler_capi.rb @@ -1,126 +1,128 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Callback structure used for asynchronous continuation of authentication # requests. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :cont :: - # (FFI::Pointer(*)) Continue the authentication request. + # (FFI::Pointer(*FunctionProto)) Continue the authentication request. # :cancel :: - # (FFI::Pointer(*)) Cancel the authentication request. + # (FFI::Pointer(*FunctionProto)) Cancel the authentication request. class AuthCallback < FFI::Struct layout :base, :char, :cont, :pointer, :cancel, :pointer end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Frame < FFI::Struct layout :dummy, :char end - + # (Not documented) class Request < FFI::Struct layout :dummy, :char end - + # (Not documented) class ResourceHandler < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Frame < FFI::Struct layout :dummy, :char end - + # (Not documented) class Request < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Frame < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Frame < FFI::Struct layout :dummy, :char end - + # (Not documented) class CookieManager < FFI::Struct layout :dummy, :char end - + # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # Implement this structure to handle events related to browser requests. The # functions of this structure will be called on the thread indicated. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :on_before_resource_load :: - # (FFI::Pointer(*)) Called on the IO thread before a resource request is loaded. The |request| + # (FFI::Pointer(*FunctionProto)) Called on the IO thread before a resource request is loaded. The |request| # object may be modified. To cancel the request return true (1) otherwise # return false (0). # :get_resource_handler :: - # (FFI::Pointer(*)) Called on the IO thread before a resource is loaded. To allow the resource + # (FFI::Pointer(*FunctionProto)) Called on the IO thread before a resource is loaded. To allow the resource # to load normally return NULL. To specify a handler for the resource return # a cef_resource_handler_t object. The |request| object should not be # modified in this callback. # :on_resource_redirect :: - # (FFI::Pointer(*)) Called on the IO thread when a resource load is redirected. The |old_url| + # (FFI::Pointer(*FunctionProto)) Called on the IO thread when a resource load is redirected. The |old_url| # parameter will contain the old URL. The |new_url| parameter will contain # the new URL and can be changed if desired. # :get_auth_credentials :: - # (FFI::Pointer(*)) Called on the IO thread when the browser needs credentials from the user. + # (FFI::Pointer(*FunctionProto)) Called on the IO thread when the browser needs credentials from the user. # |isProxy| indicates whether the host is a proxy server. |host| contains the # hostname and |port| contains the port number. Return true (1) to continue # the request and call cef_auth_callback_t::Complete() when the # authentication information is available. Return false (0) to cancel the # request. # :get_cookie_manager :: - # (FFI::Pointer(*)) Called on the IO thread to retrieve the cookie manager. |main_url| is the + # (FFI::Pointer(*FunctionProto)) Called on the IO thread to retrieve the cookie manager. |main_url| is the # URL of the top-level frame. Cookies managers can be unique per browser or # shared across multiple browsers. The global cookie manager will be used if # this function returns NULL. @@ -132,5 +134,5 @@ class RequestHandler < FFI::Struct :get_auth_credentials, :pointer, :get_cookie_manager, :pointer end - + end diff --git a/test/output/include/capi/cef_resource_bundle_handler_capi.rb b/test/output/include/capi/cef_resource_bundle_handler_capi.rb index 9a97472..f45a764 100644 --- a/test/output/include/capi/cef_resource_bundle_handler_capi.rb +++ b/test/output/include/capi/cef_resource_bundle_handler_capi.rb @@ -1,30 +1,32 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Structure used to implement a custom resource bundle structure. The functions # of this structure may be called on multiple threads. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :get_localized_string :: - # (FFI::Pointer(*)) Called to retrieve a localized translation for the string specified by + # (FFI::Pointer(*FunctionProto)) Called to retrieve a localized translation for the string specified by # |message_id|. To provide the translation set |string| to the translation # string and return true (1). To use the default translation return false # (0). Supported message IDs are listed in cef_pack_strings.h. # :get_data_resource :: - # (FFI::Pointer(*)) Called to retrieve data for the resource specified by |resource_id|. To + # (FFI::Pointer(*FunctionProto)) Called to retrieve data for the resource specified by |resource_id|. To # provide the resource data set |data| and |data_size| to the data pointer # and size respectively and return true (1). To use the default resource data # return false (0). The resource data will not be copied and must remain @@ -35,5 +37,5 @@ class ResourceBundleHandler < FFI::Struct :get_localized_string, :pointer, :get_data_resource, :pointer end - + end diff --git a/test/output/include/capi/cef_resource_handler_capi.rb b/test/output/include/capi/cef_resource_handler_capi.rb index f00806d..4eaf31f 100644 --- a/test/output/include/capi/cef_resource_handler_capi.rb +++ b/test/output/include/capi/cef_resource_handler_capi.rb @@ -1,51 +1,53 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) class Request < FFI::Struct layout :dummy, :char end - + # (Not documented) class Callback < FFI::Struct layout :dummy, :char end - + # (Not documented) class Response < FFI::Struct layout :dummy, :char end - + # (Not documented) class Callback < FFI::Struct layout :dummy, :char end - + # Structure used to implement a custom request handler structure. The functions # of this structure will always be called on the IO thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :process_request :: - # (FFI::Pointer(*)) Begin processing the request. To handle the request return true (1) and + # (FFI::Pointer(*FunctionProto)) Begin processing the request. To handle the request return true (1) and # call cef_callback_t::cont() once the response header information is # available (cef_callback_t::cont() can also be called from inside this # function if header information is available immediately). To cancel the # request return false (0). # :get_response_headers :: - # (FFI::Pointer(*)) Retrieve response header information. If the response length is not known + # (FFI::Pointer(*FunctionProto)) Retrieve response header information. If the response length is not known # set |response_length| to -1 and read_response() will be called until it # returns false (0). If the response length is known set |response_length| to # a positive value and read_response() will be called until it returns false @@ -54,20 +56,20 @@ class Callback < FFI::Struct # values. To redirect the request to a new URL set |redirectUrl| to the new # URL. # :read_response :: - # (FFI::Pointer(*)) Read response data. If data is available immediately copy up to + # (FFI::Pointer(*FunctionProto)) Read response data. If data is available immediately copy up to # |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of # bytes copied, and return true (1). To read the data at a later time set # |bytes_read| to 0, return true (1) and call cef_callback_t::cont() when the # data is available. To indicate response completion return false (0). # :can_get_cookie :: - # (FFI::Pointer(*)) Return true (1) if the specified cookie can be sent with the request or + # (FFI::Pointer(*FunctionProto)) Return true (1) if the specified cookie can be sent with the request or # false (0) otherwise. If false (0) is returned for any cookie then no # cookies will be sent with the request. # :can_set_cookie :: - # (FFI::Pointer(*)) Return true (1) if the specified cookie returned with the response can be + # (FFI::Pointer(*FunctionProto)) Return true (1) if the specified cookie returned with the response can be # set or false (0) otherwise. # :cancel :: - # (FFI::Pointer(*)) Request processing has been canceled. + # (FFI::Pointer(*FunctionProto)) Request processing has been canceled. class ResourceHandler < FFI::Struct layout :base, :char, :process_request, :pointer, @@ -77,5 +79,5 @@ class ResourceHandler < FFI::Struct :can_set_cookie, :pointer, :cancel, :pointer end - + end diff --git a/test/output/include/capi/cef_response_capi.rb b/test/output/include/capi/cef_response_capi.rb index 7db10be..cf44c7d 100644 --- a/test/output/include/capi/cef_response_capi.rb +++ b/test/output/include/capi/cef_response_capi.rb @@ -1,43 +1,45 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Structure used to represent a web response. The functions of this structure # may be called on any thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :is_read_only :: - # (FFI::Pointer(*)) Returns true (1) if this object is read-only. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is read-only. # :get_status :: - # (FFI::Pointer(*)) Get the response status code. + # (FFI::Pointer(*FunctionProto)) Get the response status code. # :set_status :: - # (FFI::Pointer(*)) Set the response status code. + # (FFI::Pointer(*FunctionProto)) Set the response status code. # :get_status_text :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :set_status_text :: - # (FFI::Pointer(*)) Set the response status text. + # (FFI::Pointer(*FunctionProto)) Set the response status text. # :get_mime_type :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :set_mime_type :: - # (FFI::Pointer(*)) Set the response mime type. + # (FFI::Pointer(*FunctionProto)) Set the response mime type. # :get_header :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_header_map :: - # (FFI::Pointer(*)) Get all response header fields. + # (FFI::Pointer(*FunctionProto)) Get all response header fields. # :set_header_map :: - # (FFI::Pointer(*)) Set all response header fields. + # (FFI::Pointer(*FunctionProto)) Set all response header fields. class Response < FFI::Struct layout :base, :char, :is_read_only, :pointer, @@ -51,12 +53,11 @@ class Response < FFI::Struct :get_header_map, :pointer, :set_header_map, :pointer end - + # Create a new cef_response_t object. - # + # @method response_create() - # @return [Response] + # @return [Response] # @scope class attach_function :response_create, :cef_response_create, [], Response - end diff --git a/test/output/include/capi/cef_scheme_capi.rb b/test/output/include/capi/cef_scheme_capi.rb index ef68d82..6685716 100644 --- a/test/output/include/capi/cef_scheme_capi.rb +++ b/test/output/include/capi/cef_scheme_capi.rb @@ -1,22 +1,19 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - - # (Not documented) - class SchemeHandlerFactory < FFI::Struct - layout :dummy, :char - end - + # Register a scheme handler factory for the specified |scheme_name| and # optional |domain_name|. An NULL |domain_name| value for a standard scheme # will cause the factory to match all domain names. The |domain_name| value @@ -27,37 +24,35 @@ class SchemeHandlerFactory < FFI::Struct # function may be called multiple times to change or remove the factory that # matches the specified |scheme_name| and optional |domain_name|. Returns false # (0) if an error occurs. This function may be called on any thread. - # + # @method register_scheme_handler_factory(scheme_name, domain_name, factory) - # @param [FFI::Pointer(*String)] scheme_name - # @param [FFI::Pointer(*String)] domain_name - # @param [SchemeHandlerFactory] factory - # @return [Integer] + # @param [FFI::Pointer(*String)] scheme_name + # @param [FFI::Pointer(*String)] domain_name + # @param [FFI::Pointer(*SchemeHandlerFactory)] factory + # @return [Integer] # @scope class - attach_function :register_scheme_handler_factory, :cef_register_scheme_handler_factory, [:pointer, :pointer, SchemeHandlerFactory], :int - + attach_function :register_scheme_handler_factory, :cef_register_scheme_handler_factory, [:pointer, :pointer, :pointer], :int # Clear all registered scheme handler factories. Returns false (0) on error. # This function may be called on any thread. - # + # @method clear_scheme_handler_factories() - # @return [Integer] + # @return [Integer] # @scope class attach_function :clear_scheme_handler_factories, :cef_clear_scheme_handler_factories, [], :int - # Structure that manages custom scheme registrations. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :add_custom_scheme :: - # (FFI::Pointer(*)) Register a custom scheme. This function should not be called for the built- + # (FFI::Pointer(*FunctionProto)) Register a custom scheme. This function should not be called for the built- # in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes. - # + # If |is_standard| is true (1) the scheme will be treated as a standard # scheme. Standard schemes are subject to URL canonicalization and parsing # rules as defined in the Common Internet Scheme Syntax RFC 1738 Section 3.1 # available at http://www.ietf.org/rfc/rfc1738.txt - # + # In particular, the syntax for standard scheme URLs must be of the form: #
   #    (scheme)://(username):(password)@(host):(port)/(url-path)
@@ -70,12 +65,12 @@ class SchemeHandlerFactory < FFI::Struct
   #   canonicalized to "scheme://host/path". The origin of a standard scheme URL
   #   is the combination of scheme, host and port (i.e., "scheme://host:port" in
   #   the most explicit case).
-  #   
+
   #   For non-standard scheme URLs only the "scheme:" component is parsed and
   #   canonicalized. The remainder of the URL will be passed to the handler as-
   #   is. For example, "scheme:///some%20text" will remain the same. Non-standard
   #   scheme URLs cannot be used as a target for form submission.
-  #   
+
   #   If |is_local| is true (1) the scheme will be treated as local (i.e., with
   #   the same security rules as those applied to "file" URLs). Normal pages
   #   cannot link to or access local URLs. Also, by default, local URLs can only
@@ -85,12 +80,12 @@ class SchemeHandlerFactory < FFI::Struct
   #   CefSettings.file_access_from_file_urls_allowed value to true (1). To allow
   #   XMLHttpRequest calls from a local URL to all origins set the
   #   CefSettings.universal_access_from_file_urls_allowed value to true (1).
-  #   
+
   #   If |is_display_isolated| is true (1) the scheme will be treated as display-
   #   isolated. This means that pages cannot display these URLs unless they are
   #   from the same scheme. For example, pages in another origin cannot create
   #   iframes or hyperlinks to URLs with this scheme.
-  #   
+
   #   This function may be called on any thread. It should only be called once
   #   per unique |scheme_name| value. If |scheme_name| is already registered or
   #   if an error occurs this function will return false (0).
@@ -98,36 +93,36 @@ class SchemeRegistrar < FFI::Struct
     layout :base, :char,
            :add_custom_scheme, :pointer
   end
-  
+
   # (Not documented)
   class ResourceHandler < FFI::Struct
     layout :dummy, :char
   end
-  
+
   # (Not documented)
   class Browser < FFI::Struct
     layout :dummy, :char
   end
-  
+
   # (Not documented)
   class Frame < FFI::Struct
     layout :dummy, :char
   end
-  
+
   # (Not documented)
   class Request < FFI::Struct
     layout :dummy, :char
   end
-  
+
   # Structure that creates cef_resource_handler_t instances for handling scheme
   # requests. The functions of this structure will always be called on the IO
   # thread.
-  # 
+
   # = Fields:
   # :base ::
-  #   (unknown) Base structure.
+  #   (error_unknown) Base structure.
   # :create ::
-  #   (FFI::Pointer(*)) Return a new resource handler instance to handle the request. |browser| and
+  #   (FFI::Pointer(*FunctionProto)) Return a new resource handler instance to handle the request. |browser| and
   #   |frame| will be the browser window and frame respectively that originated
   #   the request or NULL if the request did not originate from a browser window
   #   (for example, if the request came from cef_urlrequest_t). The |request|
@@ -136,5 +131,5 @@ class SchemeHandlerFactory < FFI::Struct
     layout :base, :char,
            :create, :pointer
   end
-  
+
 end
diff --git a/test/output/include/capi/cef_stream_capi.rb b/test/output/include/capi/cef_stream_capi.rb
index cee0120..769650c 100644
--- a/test/output/include/capi/cef_stream_capi.rb
+++ b/test/output/include/capi/cef_stream_capi.rb
@@ -1,148 +1,145 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
 
 require 'ffi'
 
 module CEF
+
   extend FFI::Library
-  ffi_lib 'cef'
-  
+
+  ffi_lib ENV["CEF_PATH"] || "cef"
+
   def self.attach_function(name, *_)
     begin; super; rescue FFI::NotFoundError => e
       (class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
     end
   end
-  
+
   # Structure the client can implement to provide a custom stream reader. The
   # functions of this structure may be called on any thread.
-  # 
+
   # = Fields:
   # :base ::
-  #   (unknown) Base structure.
-  # :read ::
-  #   (FFI::Pointer(*)) Read raw binary data.
+  #   (error_unknown) Base structure.
+  # :size ::
+  #   (error_unknown) Read raw binary data.
   # :seek ::
-  #   (FFI::Pointer(*)) Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
+  #   (FFI::Pointer(*FunctionProto)) Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
   #   SEEK_END or SEEK_SET. Return zero on success and non-zero on failure.
   # :tell ::
-  #   (FFI::Pointer(*)) Return the current offset position.
+  #   (FFI::Pointer(*FunctionProto)) Return the current offset position.
   # :eof ::
-  #   (FFI::Pointer(*)) Return non-zero if at end of file.
+  #   (FFI::Pointer(*FunctionProto)) Return non-zero if at end of file.
   class ReadHandler < FFI::Struct
     layout :base, :char,
-           :read, :pointer,
+           :size, :char,
            :seek, :pointer,
            :tell, :pointer,
            :eof, :pointer
   end
-  
+
   # Structure used to read data from a stream. The functions of this structure
   # may be called on any thread.
-  # 
+
   # = Fields:
   # :base ::
-  #   (unknown) Base structure.
-  # :read ::
-  #   (FFI::Pointer(*)) Read raw binary data.
+  #   (error_unknown) Base structure.
+  # :size ::
+  #   (error_unknown) Read raw binary data.
   # :seek ::
-  #   (FFI::Pointer(*)) Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
+  #   (FFI::Pointer(*FunctionProto)) Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
   #   SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure.
   # :tell ::
-  #   (FFI::Pointer(*)) Return the current offset position.
+  #   (FFI::Pointer(*FunctionProto)) Return the current offset position.
   # :eof ::
-  #   (FFI::Pointer(*)) Return non-zero if at end of file.
+  #   (FFI::Pointer(*FunctionProto)) Return non-zero if at end of file.
   class StreamReader < FFI::Struct
     layout :base, :char,
-           :read, :pointer,
+           :size, :char,
            :seek, :pointer,
            :tell, :pointer,
            :eof, :pointer
   end
-  
+
   # Create a new cef_stream_reader_t object from a file.
-  # 
+
   # @method stream_reader_create_for_file(file_name)
-  # @param [FFI::Pointer(*String)] file_name 
-  # @return [StreamReader] 
+  # @param [FFI::Pointer(*String)] file_name
+  # @return [StreamReader]
   # @scope class
   attach_function :stream_reader_create_for_file, :cef_stream_reader_create_for_file, [:pointer], StreamReader
-  
   # Create a new cef_stream_reader_t object from data.
-  # 
+
   # @method stream_reader_create_for_data(data, size)
-  # @param [FFI::Pointer(*Void)] data 
-  # @param [Integer] size 
-  # @return [StreamReader] 
+  # @param [FFI::Pointer(*Void)] data
+  # @param [Integer] size
+  # @return [StreamReader]
   # @scope class
-  attach_function :stream_reader_create_for_data, :cef_stream_reader_create_for_data, [:pointer, :ulong], StreamReader
-  
+  attach_function :stream_reader_create_for_data, :cef_stream_reader_create_for_data, [:pointer, :int], StreamReader
   # Create a new cef_stream_reader_t object from a custom handler.
-  # 
+
   # @method stream_reader_create_for_handler(handler)
-  # @param [ReadHandler] handler 
-  # @return [StreamReader] 
+  # @param [ReadHandler] handler
+  # @return [StreamReader]
   # @scope class
   attach_function :stream_reader_create_for_handler, :cef_stream_reader_create_for_handler, [ReadHandler], StreamReader
-  
   # Structure the client can implement to provide a custom stream writer. The
   # functions of this structure may be called on any thread.
-  # 
+
   # = Fields:
   # :base ::
-  #   (unknown) Base structure.
-  # :write ::
-  #   (FFI::Pointer(*)) Write raw binary data.
+  #   (error_unknown) Base structure.
+  # :size ::
+  #   (error_unknown) Write raw binary data.
   # :seek ::
-  #   (FFI::Pointer(*)) Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
+  #   (FFI::Pointer(*FunctionProto)) Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
   #   SEEK_END or SEEK_SET. Return zero on success and non-zero on failure.
   # :tell ::
-  #   (FFI::Pointer(*)) Return the current offset position.
+  #   (FFI::Pointer(*FunctionProto)) Return the current offset position.
   # :flush ::
-  #   (FFI::Pointer(*)) Flush the stream.
+  #   (FFI::Pointer(*FunctionProto)) Flush the stream.
   class WriteHandler < FFI::Struct
     layout :base, :char,
-           :write, :pointer,
+           :size, :char,
            :seek, :pointer,
            :tell, :pointer,
            :flush, :pointer
   end
-  
+
   # Structure used to write data to a stream. The functions of this structure may
   # be called on any thread.
-  # 
+
   # = Fields:
   # :base ::
-  #   (unknown) Base structure.
-  # :write ::
-  #   (FFI::Pointer(*)) Write raw binary data.
+  #   (error_unknown) Base structure.
+  # :size ::
+  #   (error_unknown) Write raw binary data.
   # :seek ::
-  #   (FFI::Pointer(*)) Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
+  #   (FFI::Pointer(*FunctionProto)) Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
   #   SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure.
   # :tell ::
-  #   (FFI::Pointer(*)) Return the current offset position.
+  #   (FFI::Pointer(*FunctionProto)) Return the current offset position.
   # :flush ::
-  #   (FFI::Pointer(*)) Flush the stream.
+  #   (FFI::Pointer(*FunctionProto)) Flush the stream.
   class StreamWriter < FFI::Struct
     layout :base, :char,
-           :write, :pointer,
+           :size, :char,
            :seek, :pointer,
            :tell, :pointer,
            :flush, :pointer
   end
-  
+
   # Create a new cef_stream_writer_t object for a file.
-  # 
+
   # @method stream_writer_create_for_file(file_name)
-  # @param [FFI::Pointer(*String)] file_name 
-  # @return [StreamWriter] 
+  # @param [FFI::Pointer(*String)] file_name
+  # @return [StreamWriter]
   # @scope class
   attach_function :stream_writer_create_for_file, :cef_stream_writer_create_for_file, [:pointer], StreamWriter
-  
   # Create a new cef_stream_writer_t object for a custom handler.
-  # 
+
   # @method stream_writer_create_for_handler(handler)
-  # @param [WriteHandler] handler 
-  # @return [StreamWriter] 
+  # @param [WriteHandler] handler
+  # @return [StreamWriter]
   # @scope class
   attach_function :stream_writer_create_for_handler, :cef_stream_writer_create_for_handler, [WriteHandler], StreamWriter
-  
 end
diff --git a/test/output/include/capi/cef_string_visitor_capi.rb b/test/output/include/capi/cef_string_visitor_capi.rb
index bf3dd97..fc47bea 100644
--- a/test/output/include/capi/cef_string_visitor_capi.rb
+++ b/test/output/include/capi/cef_string_visitor_capi.rb
@@ -1,27 +1,29 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
 
 require 'ffi'
 
 module CEF
+
   extend FFI::Library
-  ffi_lib 'cef'
-  
+
+  ffi_lib ENV["CEF_PATH"] || "cef"
+
   def self.attach_function(name, *_)
     begin; super; rescue FFI::NotFoundError => e
       (class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
     end
   end
-  
+
   # Implement this structure to receive string values asynchronously.
-  # 
+
   # = Fields:
   # :base ::
-  #   (unknown) Base structure.
+  #   (error_unknown) Base structure.
   # :visit ::
-  #   (FFI::Pointer(*)) Method that will be executed.
+  #   (FFI::Pointer(*FunctionProto)) Method that will be executed.
   class StringVisitor < FFI::Struct
     layout :base, :char,
            :visit, :pointer
   end
-  
+
 end
diff --git a/test/output/include/capi/cef_task_capi.rb b/test/output/include/capi/cef_task_capi.rb
index f179c4f..5438bec 100644
--- a/test/output/include/capi/cef_task_capi.rb
+++ b/test/output/include/capi/cef_task_capi.rb
@@ -1,73 +1,62 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
 
 require 'ffi'
 
 module CEF
+
   extend FFI::Library
-  ffi_lib 'cef'
-  
+
+  ffi_lib ENV["CEF_PATH"] || "cef"
+
   def self.attach_function(name, *_)
     begin; super; rescue FFI::NotFoundError => e
       (class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
     end
   end
-  
+
   # CEF maintains multiple internal threads that are used for handling different
   # types of tasks in different processes. See the cef_thread_id_t definitions in
   # cef_types.h for more information. This function will return true (1) if
   # called on the specified thread. It is an error to request a thread from the
   # wrong process.
-  # 
+
   # @method currently_on(thread_id)
-  # @param [unknown] thread_id 
-  # @return [Integer] 
+  # @param [error_unknown] thread_id
+  # @return [Integer]
   # @scope class
   attach_function :currently_on, :cef_currently_on, [:char], :int
-  
-  # (Not documented)
-  class Task < FFI::Struct
-    layout :dummy, :char
-  end
-  
   # Post a task for execution on the specified thread. This function may be
   # called on any thread. It is an error to request a thread from the wrong
   # process.
-  # 
+
   # @method post_task(thread_id, task)
-  # @param [unknown] thread_id 
-  # @param [Task] task 
-  # @return [Integer] 
+  # @param [error_unknown] thread_id
+  # @param [FFI::Pointer(*Task)] task
+  # @return [Integer]
   # @scope class
-  attach_function :post_task, :cef_post_task, [:char, Task], :int
-  
-  # (Not documented)
-  class Task < FFI::Struct
-    layout :dummy, :char
-  end
-  
+  attach_function :post_task, :cef_post_task, [:char, :pointer], :int
   # Post a task for delayed execution on the specified thread. This function may
   # be called on any thread. It is an error to request a thread from the wrong
   # process.
-  # 
+
   # @method post_delayed_task(thread_id, task, delay_ms)
-  # @param [unknown] thread_id 
-  # @param [Task] task 
-  # @param [Integer] delay_ms 
-  # @return [Integer] 
+  # @param [error_unknown] thread_id
+  # @param [FFI::Pointer(*Task)] task
+  # @param [Integer] delay_ms
+  # @return [Integer]
   # @scope class
-  attach_function :post_delayed_task, :cef_post_delayed_task, [:char, Task, :long], :int
-  
+  attach_function :post_delayed_task, :cef_post_delayed_task, [:char, :pointer, :long], :int
   # Implement this structure for task execution. The functions of this structure
   # may be called on any thread.
-  # 
+
   # = Fields:
   # :base ::
-  #   (unknown) Base structure.
+  #   (error_unknown) Base structure.
   # :execute ::
-  #   (FFI::Pointer(*)) Method that will be executed. |threadId| is the thread executing the call.
+  #   (FFI::Pointer(*FunctionProto)) Method that will be executed. |threadId| is the thread executing the call.
   class Task < FFI::Struct
     layout :base, :char,
            :execute, :pointer
   end
-  
+
 end
diff --git a/test/output/include/capi/cef_url_capi.rb b/test/output/include/capi/cef_url_capi.rb
index 8a2c3bb..7ba8984 100644
--- a/test/output/include/capi/cef_url_capi.rb
+++ b/test/output/include/capi/cef_url_capi.rb
@@ -1,36 +1,36 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
 
 require 'ffi'
 
 module CEF
+
   extend FFI::Library
-  ffi_lib 'cef'
-  
+
+  ffi_lib ENV["CEF_PATH"] || "cef"
+
   def self.attach_function(name, *_)
     begin; super; rescue FFI::NotFoundError => e
       (class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
     end
   end
-  
+
   # Parse the specified |url| into its component parts. Returns false (0) if the
   # URL is NULL or invalid.
-  # 
+
   # @method parse_url(url, parts)
-  # @param [FFI::Pointer(*String)] url 
-  # @param [FFI::Pointer(*Urlparts)] parts 
-  # @return [Integer] 
+  # @param [FFI::Pointer(*String)] url
+  # @param [FFI::Pointer(*Urlparts)] parts
+  # @return [Integer]
   # @scope class
   attach_function :parse_url, :cef_parse_url, [:pointer, :pointer], :int
-  
   # Creates a URL from the specified |parts|, which must contain a non-NULL spec
   # or a non-NULL host and path (at a minimum), but not both. Returns false (0)
   # if |parts| isn't initialized as described.
-  # 
+
   # @method create_url(parts, url)
-  # @param [FFI::Pointer(*Urlparts)] parts 
-  # @param [FFI::Pointer(*String)] url 
-  # @return [Integer] 
+  # @param [FFI::Pointer(*Urlparts)] parts
+  # @param [FFI::Pointer(*String)] url
+  # @return [Integer]
   # @scope class
   attach_function :create_url, :cef_create_url, [:pointer, :pointer], :int
-  
 end
diff --git a/test/output/include/capi/cef_urlrequest_capi.rb b/test/output/include/capi/cef_urlrequest_capi.rb
index 80e5f31..50c0641 100644
--- a/test/output/include/capi/cef_urlrequest_capi.rb
+++ b/test/output/include/capi/cef_urlrequest_capi.rb
@@ -1,52 +1,54 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
 
 require 'ffi'
 
 module CEF
+
   extend FFI::Library
-  ffi_lib 'cef'
-  
+
+  ffi_lib ENV["CEF_PATH"] || "cef"
+
   def self.attach_function(name, *_)
     begin; super; rescue FFI::NotFoundError => e
       (class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
     end
   end
-  
+
   # (Not documented)
   class Request < FFI::Struct
     layout :dummy, :char
   end
-  
+
   # (Not documented)
   class Response < FFI::Struct
     layout :dummy, :char
   end
-  
+
   # Structure used to make a URL request. URL requests are not associated with a
   # browser instance so no cef_client_t callbacks will be executed. URL requests
   # can be created on any valid CEF thread in either the browser or render
   # process. Once created the functions of the URL request object must be
   # accessed on the same thread that created it.
-  # 
+
   # = Fields:
   # :base ::
-  #   (unknown) Base structure.
+  #   (error_unknown) Base structure.
   # :get_request ::
-  #   (FFI::Pointer(*)) Returns the request object used to create this URL request. The returned
+  #   (FFI::Pointer(*FunctionProto)) Returns the request object used to create this URL request. The returned
   #   object is read-only and should not be modified.
   # :get_client ::
-  #   (FFI::Pointer(*)) Returns the client.
+  #   (FFI::Pointer(*FunctionProto)) Returns the client.
   # :get_request_status ::
-  #   (FFI::Pointer(*)) Returns the request status.
+  #   (FFI::Pointer(*FunctionProto)) Returns the request status.
   # :get_request_error ::
-  #   (FFI::Pointer(*)) Returns the request error if status is UR_CANCELED or UR_FAILED, or 0
+  #   (FFI::Pointer(*FunctionProto)) Returns the request error if status is UR_CANCELED or UR_FAILED, or 0
   #   otherwise.
   # :get_response ::
-  #   (FFI::Pointer(*)) Returns the response, or NULL if no response information is available.
+  #   (FFI::Pointer(*FunctionProto)) Returns the response, or NULL if no response information is available.
   #   Response information will only be available after the upload has completed.
   #   The returned object is read-only and should not be modified.
   # :cancel ::
-  #   (FFI::Pointer(*)) Cancel the request.
+  #   (FFI::Pointer(*FunctionProto)) Cancel the request.
   class Urlrequest < FFI::Struct
     layout :base, :char,
            :get_request, :pointer,
@@ -56,40 +58,39 @@ class Urlrequest < FFI::Struct
            :get_response, :pointer,
            :cancel, :pointer
   end
-  
+
   # Create a new URL request. Only GET, POST, HEAD, DELETE and PUT request
   # functions are supported. The |request| object will be marked as read-only
   # after calling this function.
-  # 
+
   # @method urlrequest_create(request, client)
-  # @param [Request] request 
-  # @param [FFI::Pointer(*UrlrequestClient)] client 
-  # @return [Urlrequest] 
+  # @param [Request] request
+  # @param [FFI::Pointer(*UrlrequestClient)] client
+  # @return [Urlrequest]
   # @scope class
   attach_function :urlrequest_create, :cef_urlrequest_create, [Request, :pointer], Urlrequest
-  
   # Structure that should be implemented by the cef_urlrequest_t client. The
   # functions of this structure will be called on the same thread that created
   # the request.
-  # 
+
   # = Fields:
   # :base ::
-  #   (unknown) Base structure.
+  #   (error_unknown) Base structure.
   # :on_request_complete ::
-  #   (FFI::Pointer(*)) Notifies the client that the request has completed. Use the
+  #   (FFI::Pointer(*FunctionProto)) Notifies the client that the request has completed. Use the
   #   cef_urlrequest_t::GetRequestStatus function to determine if the request was
   #   successful or not.
   # :on_upload_progress ::
-  #   (FFI::Pointer(*)) Notifies the client of upload progress. |current| denotes the number of
+  #   (FFI::Pointer(*FunctionProto)) Notifies the client of upload progress. |current| denotes the number of
   #   bytes sent so far and |total| is the total size of uploading data (or -1 if
   #   chunked upload is enabled). This function will only be called if the
   #   UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.
   # :on_download_progress ::
-  #   (FFI::Pointer(*)) Notifies the client of download progress. |current| denotes the number of
+  #   (FFI::Pointer(*FunctionProto)) Notifies the client of download progress. |current| denotes the number of
   #   bytes received up to the call and |total| is the expected total size of the
   #   response (or -1 if not determined).
   # :on_download_data ::
-  #   (FFI::Pointer(*)) Called when some part of the response is read. |data| contains the current
+  #   (FFI::Pointer(*FunctionProto)) Called when some part of the response is read. |data| contains the current
   #   bytes received since the last call. This function will not be called if the
   #   UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request.
   class UrlrequestClient < FFI::Struct
@@ -99,5 +100,5 @@ class UrlrequestClient < FFI::Struct
            :on_download_progress, :pointer,
            :on_download_data, :pointer
   end
-  
+
 end
diff --git a/test/output/include/capi/cef_v8_capi.rb b/test/output/include/capi/cef_v8_capi.rb
index 04ffd23..d6937ea 100644
--- a/test/output/include/capi/cef_v8_capi.rb
+++ b/test/output/include/capi/cef_v8_capi.rb
@@ -1,28 +1,25 @@
-# Generated by ffi-gen. Please do not change this file by hand.
+# [generated by ffi_generator] #
 
 require 'ffi'
 
 module CEF
+
   extend FFI::Library
-  ffi_lib 'cef'
-  
+
+  ffi_lib ENV["CEF_PATH"] || "cef"
+
   def self.attach_function(name, *_)
     begin; super; rescue FFI::NotFoundError => e
       (class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
     end
   end
-  
-  # (Not documented)
-  class V8handler < FFI::Struct
-    layout :dummy, :char
-  end
-  
+
   # Register a new V8 extension with the specified JavaScript extension code and
   # handler. Functions implemented by the handler are prototyped using the
   # keyword 'native'. The calling of a native function is restricted to the scope
   # in which the prototype of the native function is defined. This function may
   # only be called on the render process main thread.
-  # 
+
   # Example JavaScript extension code: 
   #   // create the 'example' global object if it doesn't already exist.
   #   if (!example)
@@ -52,7 +49,7 @@ class V8handler < FFI::Struct
   #       native function SetMyParam();
   #       if(b) SetMyParam(b);
   #     });
-  # 
+
   #     // Extension definitions can also contain normal JavaScript variables
   #     // and functions.
   #     var myint = 0;
@@ -71,57 +68,56 @@ class V8handler < FFI::Struct
   #   // Call another function.
   #   example.test.increment();
   # 
- # + # @method register_extension(extension_name, javascript_code, handler) - # @param [FFI::Pointer(*String)] extension_name - # @param [FFI::Pointer(*String)] javascript_code - # @param [V8handler] handler - # @return [Integer] + # @param [FFI::Pointer(*String)] extension_name + # @param [FFI::Pointer(*String)] javascript_code + # @param [FFI::Pointer(*V8handler)] handler + # @return [Integer] # @scope class - attach_function :register_extension, :cef_register_extension, [:pointer, :pointer, V8handler], :int - + attach_function :register_extension, :cef_register_extension, [:pointer, :pointer, :pointer], :int # (Not documented) class Browser < FFI::Struct layout :dummy, :char end - + # (Not documented) class Frame < FFI::Struct layout :dummy, :char end - + # (Not documented) class V8exception < FFI::Struct layout :dummy, :char end - + # Structure that encapsulates a V8 context handle. The functions of this # structure may only be called on the render process main thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :get_browser :: - # (FFI::Pointer(*)) Returns the browser for this context. + # (FFI::Pointer(*FunctionProto)) Returns the browser for this context. # :get_frame :: - # (FFI::Pointer(*)) Returns the frame for this context. + # (FFI::Pointer(*FunctionProto)) Returns the frame for this context. # :get_global :: - # (FFI::Pointer(*)) Returns the global object for this context. The context must be entered + # (FFI::Pointer(*FunctionProto)) Returns the global object for this context. The context must be entered # before calling this function. # :enter :: - # (FFI::Pointer(*)) Enter this context. A context must be explicitly entered before creating a + # (FFI::Pointer(*FunctionProto)) Enter this context. A context must be explicitly entered before creating a # V8 Object, Array, Function or Date asynchronously. exit() must be called # the same number of times as enter() before releasing this context. V8 # objects belong to the context in which they are created. Returns true (1) # if the scope was entered successfully. # :exit :: - # (FFI::Pointer(*)) Exit this context. Call this function only after calling enter(). Returns + # (FFI::Pointer(*FunctionProto)) Exit this context. Call this function only after calling enter(). Returns # true (1) if the scope was exited successfully. # :is_same :: - # (FFI::Pointer(*)) Returns true (1) if this object is pointing to the same handle as |that| + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is pointing to the same handle as |that| # object. # :eval :: - # (FFI::Pointer(*)) Evaluates the specified JavaScript code using this context's global object. + # (FFI::Pointer(*FunctionProto)) Evaluates the specified JavaScript code using this context's global object. # On success |retval| will be set to the return value, if any, and the # function will return true (1). On failure |exception| will be set to the # exception, if any, and the function will return false (0). @@ -135,37 +131,34 @@ class V8context < FFI::Struct :is_same, :pointer, :eval, :pointer end - + # Returns the current (top) context object in the V8 context stack. - # + # @method v8context_get_current_context() - # @return [V8context] + # @return [V8context] # @scope class attach_function :v8context_get_current_context, :cef_v8context_get_current_context, [], V8context - # Returns the entered (bottom) context object in the V8 context stack. - # + # @method v8context_get_entered_context() - # @return [V8context] + # @return [V8context] # @scope class attach_function :v8context_get_entered_context, :cef_v8context_get_entered_context, [], V8context - # Returns true (1) if V8 is currently inside a context. - # + # @method v8context_in_context() - # @return [Integer] + # @return [Integer] # @scope class attach_function :v8context_in_context, :cef_v8context_in_context, [], :int - # Structure that should be implemented to handle V8 function calls. The # functions of this structure will always be called on the render process main # thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :execute :: - # (FFI::Pointer(*)) Handle execution of the function identified by |name|. |object| is the + # (FFI::Pointer(*FunctionProto)) Handle execution of the function identified by |name|. |object| is the # receiver ('this' object) of the function. |arguments| is the list of # arguments passed to the function. If execution succeeds set |retval| to the # function return value. If execution fails set |exception| to the exception @@ -174,23 +167,23 @@ class V8handler < FFI::Struct layout :base, :char, :execute, :pointer end - + # Structure that should be implemented to handle V8 accessor calls. Accessor # identifiers are registered by calling cef_v8value_t::set_value_byaccessor(). # The functions of this structure will always be called on the render process # main thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :get :: - # (FFI::Pointer(*)) Handle retrieval the accessor value identified by |name|. |object| is the + # (FFI::Pointer(*FunctionProto)) Handle retrieval the accessor value identified by |name|. |object| is the # receiver ('this' object) of the accessor. If retrieval succeeds set # |retval| to the return value. If retrieval fails set |exception| to the # exception that will be thrown. Return true (1) if accessor retrieval was # handled. # :set :: - # (FFI::Pointer(*)) Handle assignment of the accessor value identified by |name|. |object| is + # (FFI::Pointer(*FunctionProto)) Handle assignment of the accessor value identified by |name|. |object| is # the receiver ('this' object) of the accessor. |value| is the new value # being assigned to the accessor. If assignment fails set |exception| to the # exception that will be thrown. Return true (1) if accessor assignment was @@ -200,32 +193,32 @@ class V8accessor < FFI::Struct :get, :pointer, :set, :pointer end - + # Structure representing a V8 exception. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :get_message :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_source_line :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_script_resource_name :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_line_number :: - # (FFI::Pointer(*)) Returns the 1-based number of the line where the error occurred or 0 if the + # (FFI::Pointer(*FunctionProto)) Returns the 1-based number of the line where the error occurred or 0 if the # line number is unknown. # :get_start_position :: - # (FFI::Pointer(*)) Returns the index within the script of the first character where the error + # (FFI::Pointer(*FunctionProto)) Returns the index within the script of the first character where the error # occurred. # :get_end_position :: - # (FFI::Pointer(*)) Returns the index within the script of the last character where the error + # (FFI::Pointer(*FunctionProto)) Returns the index within the script of the last character where the error # occurred. # :get_start_column :: - # (FFI::Pointer(*)) Returns the index within the line of the first character where the error + # (FFI::Pointer(*FunctionProto)) Returns the index within the line of the first character where the error # occurred. # :get_end_column :: - # (FFI::Pointer(*)) Returns the index within the line of the last character where the error + # (FFI::Pointer(*FunctionProto)) Returns the index within the line of the last character where the error # occurred. class V8exception < FFI::Struct layout :base, :char, @@ -238,124 +231,124 @@ class V8exception < FFI::Struct :get_start_column, :pointer, :get_end_column, :pointer end - + # Structure representing a V8 value. The functions of this structure may only # be called on the render process main thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :is_undefined :: - # (FFI::Pointer(*)) True if the value type is undefined. + # (FFI::Pointer(*FunctionProto)) True if the value type is undefined. # :is_null :: - # (FFI::Pointer(*)) True if the value type is null. + # (FFI::Pointer(*FunctionProto)) True if the value type is null. # :is_bool :: - # (FFI::Pointer(*)) True if the value type is bool. + # (FFI::Pointer(*FunctionProto)) True if the value type is bool. # :is_int :: - # (FFI::Pointer(*)) True if the value type is int. + # (FFI::Pointer(*FunctionProto)) True if the value type is int. # :is_uint :: - # (FFI::Pointer(*)) True if the value type is unsigned int. + # (FFI::Pointer(*FunctionProto)) True if the value type is unsigned int. # :is_double :: - # (FFI::Pointer(*)) True if the value type is double. + # (FFI::Pointer(*FunctionProto)) True if the value type is double. # :is_date :: - # (FFI::Pointer(*)) True if the value type is Date. + # (FFI::Pointer(*FunctionProto)) True if the value type is Date. # :is_string :: - # (FFI::Pointer(*)) True if the value type is string. + # (FFI::Pointer(*FunctionProto)) True if the value type is string. # :is_object :: - # (FFI::Pointer(*)) True if the value type is object. + # (FFI::Pointer(*FunctionProto)) True if the value type is object. # :is_array :: - # (FFI::Pointer(*)) True if the value type is array. + # (FFI::Pointer(*FunctionProto)) True if the value type is array. # :is_function :: - # (FFI::Pointer(*)) True if the value type is function. + # (FFI::Pointer(*FunctionProto)) True if the value type is function. # :is_same :: - # (FFI::Pointer(*)) Returns true (1) if this object is pointing to the same handle as |that| + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is pointing to the same handle as |that| # object. # :get_bool_value :: - # (FFI::Pointer(*)) Return a bool value. The underlying data will be converted to if + # (FFI::Pointer(*FunctionProto)) Return a bool value. The underlying data will be converted to if # necessary. # :get_int_value :: - # (FFI::Pointer(*)) Return an int value. The underlying data will be converted to if + # (FFI::Pointer(*FunctionProto)) Return an int value. The underlying data will be converted to if # necessary. # :get_uint_value :: - # (FFI::Pointer(*)) Return an unisgned int value. The underlying data will be converted to if + # (FFI::Pointer(*FunctionProto)) Return an unisgned int value. The underlying data will be converted to if # necessary. # :get_double_value :: - # (FFI::Pointer(*)) Return a double value. The underlying data will be converted to if + # (FFI::Pointer(*FunctionProto)) Return a double value. The underlying data will be converted to if # necessary. # :get_date_value :: - # (FFI::Pointer(*)) Return a Date value. The underlying data will be converted to if + # (FFI::Pointer(*FunctionProto)) Return a Date value. The underlying data will be converted to if # necessary. # :get_string_value :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :is_user_created :: - # (FFI::Pointer(*)) Returns true (1) if this is a user created object. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this is a user created object. # :has_exception :: - # (FFI::Pointer(*)) Returns true (1) if the last function call resulted in an exception. This + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the last function call resulted in an exception. This # attribute exists only in the scope of the current CEF value object. # :get_exception :: - # (FFI::Pointer(*)) Returns the exception resulting from the last function call. This attribute + # (FFI::Pointer(*FunctionProto)) Returns the exception resulting from the last function call. This attribute # exists only in the scope of the current CEF value object. # :clear_exception :: - # (FFI::Pointer(*)) Clears the last exception and returns true (1) on success. + # (FFI::Pointer(*FunctionProto)) Clears the last exception and returns true (1) on success. # :will_rethrow_exceptions :: - # (FFI::Pointer(*)) Returns true (1) if this object will re-throw future exceptions. This + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object will re-throw future exceptions. This # attribute exists only in the scope of the current CEF value object. # :set_rethrow_exceptions :: - # (FFI::Pointer(*)) Set whether this object will re-throw future exceptions. By default + # (FFI::Pointer(*FunctionProto)) Set whether this object will re-throw future exceptions. By default # exceptions are not re-thrown. If a exception is re-thrown the current # context should not be accessed again until after the exception has been # caught and not re-thrown. Returns true (1) on success. This attribute # exists only in the scope of the current CEF value object. # :has_value_bykey :: - # (FFI::Pointer(*)) Returns true (1) if the object has a value with the specified identifier. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the object has a value with the specified identifier. # :has_value_byindex :: - # (FFI::Pointer(*)) Returns true (1) if the object has a value with the specified identifier. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the object has a value with the specified identifier. # :delete_value_bykey :: - # (FFI::Pointer(*)) Deletes the value with the specified identifier and returns true (1) on + # (FFI::Pointer(*FunctionProto)) Deletes the value with the specified identifier and returns true (1) on # success. Returns false (0) if this function is called incorrectly or an # exception is thrown. For read-only and don't-delete values this function # will return true (1) even though deletion failed. # :delete_value_byindex :: - # (FFI::Pointer(*)) Deletes the value with the specified identifier and returns true (1) on + # (FFI::Pointer(*FunctionProto)) Deletes the value with the specified identifier and returns true (1) on # success. Returns false (0) if this function is called incorrectly, deletion # fails or an exception is thrown. For read-only and don't-delete values this # function will return true (1) even though deletion failed. # :get_value_bykey :: - # (FFI::Pointer(*)) Returns the value with the specified identifier on success. Returns NULL if + # (FFI::Pointer(*FunctionProto)) Returns the value with the specified identifier on success. Returns NULL if # this function is called incorrectly or an exception is thrown. # :get_value_byindex :: - # (FFI::Pointer(*)) Returns the value with the specified identifier on success. Returns NULL if + # (FFI::Pointer(*FunctionProto)) Returns the value with the specified identifier on success. Returns NULL if # this function is called incorrectly or an exception is thrown. # :set_value_bykey :: - # (FFI::Pointer(*)) Associates a value with the specified identifier and returns true (1) on + # (FFI::Pointer(*FunctionProto)) Associates a value with the specified identifier and returns true (1) on # success. Returns false (0) if this function is called incorrectly or an # exception is thrown. For read-only values this function will return true # (1) even though assignment failed. # :set_value_byindex :: - # (FFI::Pointer(*)) Associates a value with the specified identifier and returns true (1) on + # (FFI::Pointer(*FunctionProto)) Associates a value with the specified identifier and returns true (1) on # success. Returns false (0) if this function is called incorrectly or an # exception is thrown. For read-only values this function will return true # (1) even though assignment failed. # :set_value_byaccessor :: - # (FFI::Pointer(*)) Registers an identifier and returns true (1) on success. Access to the + # (FFI::Pointer(*FunctionProto)) Registers an identifier and returns true (1) on success. Access to the # identifier will be forwarded to the cef_v8accessor_t instance passed to # cef_v8value_t::cef_v8value_create_object(). Returns false (0) if this # function is called incorrectly or an exception is thrown. For read-only # values this function will return true (1) even though assignment failed. # :get_keys :: - # (FFI::Pointer(*)) Read the keys for the object's values into the specified vector. Integer- + # (FFI::Pointer(*FunctionProto)) Read the keys for the object's values into the specified vector. Integer- # based keys will also be returned as strings. # :set_user_data :: - # (FFI::Pointer(*)) Sets the user data for this object and returns true (1) on success. Returns + # (FFI::Pointer(*FunctionProto)) Sets the user data for this object and returns true (1) on success. Returns # false (0) if this function is called incorrectly. This function can only be # called on user created objects. # :get_user_data :: - # (FFI::Pointer(*)) Returns the user data, if any, assigned to this object. + # (FFI::Pointer(*FunctionProto)) Returns the user data, if any, assigned to this object. # :get_externally_allocated_memory :: - # (FFI::Pointer(*)) Returns the amount of externally allocated memory registered for the + # (FFI::Pointer(*FunctionProto)) Returns the amount of externally allocated memory registered for the # object. # :adjust_externally_allocated_memory :: - # (FFI::Pointer(*)) Adjusts the amount of registered external memory for the object. Used to + # (FFI::Pointer(*FunctionProto)) Adjusts the amount of registered external memory for the object. Used to # give V8 an indication of the amount of externally allocated memory that is # kept alive by JavaScript objects. V8 uses this information to decide when # to perform global garbage collection. Each cef_v8value_t tracks the amount @@ -365,13 +358,13 @@ class V8exception < FFI::Struct # returns the number of bytes associated with the object after the # adjustment. This function can only be called on user created objects. # :get_array_length :: - # (FFI::Pointer(*)) Returns the number of elements in the array. + # (FFI::Pointer(*FunctionProto)) Returns the number of elements in the array. # :get_function_name :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_function_handler :: - # (FFI::Pointer(*)) Returns the function handler or NULL if not a CEF-created function. + # (FFI::Pointer(*FunctionProto)) Returns the function handler or NULL if not a CEF-created function. # :execute_function :: - # (FFI::Pointer(*)) Execute the function using the current V8 context. This function should + # (FFI::Pointer(*FunctionProto)) Execute the function using the current V8 context. This function should # only be called from within the scope of a cef_v8handler_t or # cef_v8accessor_t callback, or in combination with calling enter() and # exit() on a stored cef_v8context_t reference. |object| is the receiver @@ -381,7 +374,7 @@ class V8exception < FFI::Struct # Returns NULL if this function is called incorrectly or an exception is # thrown. # :execute_function_with_context :: - # (FFI::Pointer(*)) Execute the function using the specified V8 context. |object| is the + # (FFI::Pointer(*FunctionProto)) Execute the function using the specified V8 context. |object| is the # receiver ('this' object) of the function. If |object| is NULL the specified # context's global object will be used. |arguments| is the list of arguments # that will be passed to the function. Returns the function return value on @@ -433,106 +426,95 @@ class V8value < FFI::Struct :execute_function, :pointer, :execute_function_with_context, :pointer end - + # Create a new cef_v8value_t object of type undefined. - # + # @method v8value_create_undefined() - # @return [V8value] + # @return [V8value] # @scope class attach_function :v8value_create_undefined, :cef_v8value_create_undefined, [], V8value - # Create a new cef_v8value_t object of type null. - # + # @method v8value_create_null() - # @return [V8value] + # @return [V8value] # @scope class attach_function :v8value_create_null, :cef_v8value_create_null, [], V8value - # Create a new cef_v8value_t object of type bool. - # + # @method v8value_create_bool(value) - # @param [Integer] value - # @return [V8value] + # @param [Integer] value + # @return [V8value] # @scope class attach_function :v8value_create_bool, :cef_v8value_create_bool, [:int], V8value - # Create a new cef_v8value_t object of type int. - # + # @method v8value_create_int(value) - # @param [Integer] value - # @return [V8value] + # @param [Integer] value + # @return [V8value] # @scope class attach_function :v8value_create_int, :cef_v8value_create_int, [:int], V8value - # Create a new cef_v8value_t object of type unsigned int. - # + # @method v8value_create_uint(value) - # @param [Integer] value - # @return [V8value] + # @param [Integer] value + # @return [V8value] # @scope class attach_function :v8value_create_uint, :cef_v8value_create_uint, [:uint], V8value - # Create a new cef_v8value_t object of type double. - # + # @method v8value_create_double(value) - # @param [Float] value - # @return [V8value] + # @param [Float] value + # @return [V8value] # @scope class attach_function :v8value_create_double, :cef_v8value_create_double, [:double], V8value - # Create a new cef_v8value_t object of type Date. This function should only be # called from within the scope of a cef_v8context_tHandler, cef_v8handler_t or # cef_v8accessor_t callback, or in combination with calling enter() and exit() # on a stored cef_v8context_t reference. - # + # @method v8value_create_date(date) - # @param [FFI::Pointer(*Time)] date - # @return [V8value] + # @param [FFI::Pointer(*Time)] date + # @return [V8value] # @scope class attach_function :v8value_create_date, :cef_v8value_create_date, [:pointer], V8value - # Create a new cef_v8value_t object of type string. - # + # @method v8value_create_string(value) - # @param [FFI::Pointer(*String)] value - # @return [V8value] + # @param [FFI::Pointer(*String)] value + # @return [V8value] # @scope class attach_function :v8value_create_string, :cef_v8value_create_string, [:pointer], V8value - # Create a new cef_v8value_t object of type object with optional accessor. This # function should only be called from within the scope of a # cef_v8context_tHandler, cef_v8handler_t or cef_v8accessor_t callback, or in # combination with calling enter() and exit() on a stored cef_v8context_t # reference. - # + # @method v8value_create_object(accessor) - # @param [V8accessor] accessor - # @return [V8value] + # @param [V8accessor] accessor + # @return [V8value] # @scope class attach_function :v8value_create_object, :cef_v8value_create_object, [V8accessor], V8value - # Create a new cef_v8value_t object of type array with the specified |length|. # If |length| is negative the returned array will have length 0. This function # should only be called from within the scope of a cef_v8context_tHandler, # cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling # enter() and exit() on a stored cef_v8context_t reference. - # + # @method v8value_create_array(length) - # @param [Integer] length - # @return [V8value] + # @param [Integer] length + # @return [V8value] # @scope class attach_function :v8value_create_array, :cef_v8value_create_array, [:int], V8value - # Create a new cef_v8value_t object of type function. This function should only # be called from within the scope of a cef_v8context_tHandler, cef_v8handler_t # or cef_v8accessor_t callback, or in combination with calling enter() and # exit() on a stored cef_v8context_t reference. - # + # @method v8value_create_function(name, handler) - # @param [FFI::Pointer(*String)] name - # @param [V8handler] handler - # @return [V8value] + # @param [FFI::Pointer(*String)] name + # @param [V8handler] handler + # @return [V8value] # @scope class attach_function :v8value_create_function, :cef_v8value_create_function, [:pointer, V8handler], V8value - end diff --git a/test/output/include/capi/cef_values_capi.rb b/test/output/include/capi/cef_values_capi.rb index 9ad94a9..6dad6d8 100644 --- a/test/output/include/capi/cef_values_capi.rb +++ b/test/output/include/capi/cef_values_capi.rb @@ -1,127 +1,124 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Structure representing a binary value. Can be used on any process and thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :is_valid :: - # (FFI::Pointer(*)) Returns true (1) if this object is valid. Do not call any other functions + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is valid. Do not call any other functions # if this function returns false (0). # :is_owned :: - # (FFI::Pointer(*)) Returns true (1) if this object is currently owned by another object. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is currently owned by another object. # :copy :: - # (FFI::Pointer(*)) Returns a copy of this object. The data in this object will also be copied. - # :get_size :: - # (FFI::Pointer(*)) Returns the data size. - # :get_data :: - # (FFI::Pointer(*)) Read up to |buffer_size| number of bytes into |buffer|. Reading begins at - # the specified byte |data_offset|. Returns the number of bytes read. + # (FFI::Pointer(*FunctionProto)) Returns a copy of this object. The data in this object will also be copied. + # :size :: + # (error_unknown) Returns the data size. class BinaryValue < FFI::Struct layout :base, :char, :is_valid, :pointer, :is_owned, :pointer, :copy, :pointer, - :get_size, :pointer, - :get_data, :pointer + :size, :char end - + # Creates a new object that is not owned by any other object. The specified # |data| will be copied. - # + # @method binary_value_create(data, data_size) - # @param [FFI::Pointer(*Void)] data - # @param [Integer] data_size - # @return [BinaryValue] + # @param [FFI::Pointer(*Void)] data + # @param [Integer] data_size + # @return [BinaryValue] # @scope class - attach_function :binary_value_create, :cef_binary_value_create, [:pointer, :ulong], BinaryValue - + attach_function :binary_value_create, :cef_binary_value_create, [:pointer, :int], BinaryValue # Structure representing a dictionary value. Can be used on any process and # thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :is_valid :: - # (FFI::Pointer(*)) Returns true (1) if this object is valid. Do not call any other functions + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is valid. Do not call any other functions # if this function returns false (0). # :is_owned :: - # (FFI::Pointer(*)) Returns true (1) if this object is currently owned by another object. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is currently owned by another object. # :is_read_only :: - # (FFI::Pointer(*)) Returns true (1) if the values of this object are read-only. Some APIs may + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the values of this object are read-only. Some APIs may # expose read-only objects. # :copy :: - # (FFI::Pointer(*)) Returns a writable copy of this object. If |exclude_NULL_children| is true + # (FFI::Pointer(*FunctionProto)) Returns a writable copy of this object. If |exclude_NULL_children| is true # (1) any NULL dictionaries or lists will be excluded from the copy. - # :get_size :: - # (FFI::Pointer(*)) Returns the number of values. + # :size :: + # (error_unknown) Returns the number of values. # :clear :: - # (FFI::Pointer(*)) Removes all values. Returns true (1) on success. + # (FFI::Pointer(*FunctionProto)) Removes all values. Returns true (1) on success. # :has_key :: - # (FFI::Pointer(*)) Returns true (1) if the current dictionary has a value for the given key. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the current dictionary has a value for the given key. # :get_keys :: - # (FFI::Pointer(*)) Reads all keys for this dictionary into the specified vector. + # (FFI::Pointer(*FunctionProto)) Reads all keys for this dictionary into the specified vector. # :remove :: - # (FFI::Pointer(*)) Removes the value at the specified key. Returns true (1) is the value was + # (FFI::Pointer(*FunctionProto)) Removes the value at the specified key. Returns true (1) is the value was # removed successfully. # :get_type :: - # (FFI::Pointer(*)) Returns the value type for the specified key. + # (FFI::Pointer(*FunctionProto)) Returns the value type for the specified key. # :get_bool :: - # (FFI::Pointer(*)) Returns the value at the specified key as type bool. + # (FFI::Pointer(*FunctionProto)) Returns the value at the specified key as type bool. # :get_int :: - # (FFI::Pointer(*)) Returns the value at the specified key as type int. + # (FFI::Pointer(*FunctionProto)) Returns the value at the specified key as type int. # :get_double :: - # (FFI::Pointer(*)) Returns the value at the specified key as type double. + # (FFI::Pointer(*FunctionProto)) Returns the value at the specified key as type double. # :get_string :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_binary :: - # (FFI::Pointer(*)) Returns the value at the specified key as type binary. + # (FFI::Pointer(*FunctionProto)) Returns the value at the specified key as type binary. # :get_dictionary :: - # (FFI::Pointer(*)) Returns the value at the specified key as type dictionary. + # (FFI::Pointer(*FunctionProto)) Returns the value at the specified key as type dictionary. # :get_list :: - # (FFI::Pointer(*)) Returns the value at the specified key as type list. + # (FFI::Pointer(*FunctionProto)) Returns the value at the specified key as type list. # :set_null :: - # (FFI::Pointer(*)) Sets the value at the specified key as type null. Returns true (1) if the + # (FFI::Pointer(*FunctionProto)) Sets the value at the specified key as type null. Returns true (1) if the # value was set successfully. # :set_bool :: - # (FFI::Pointer(*)) Sets the value at the specified key as type bool. Returns true (1) if the + # (FFI::Pointer(*FunctionProto)) Sets the value at the specified key as type bool. Returns true (1) if the # value was set successfully. # :set_int :: - # (FFI::Pointer(*)) Sets the value at the specified key as type int. Returns true (1) if the + # (FFI::Pointer(*FunctionProto)) Sets the value at the specified key as type int. Returns true (1) if the # value was set successfully. # :set_double :: - # (FFI::Pointer(*)) Sets the value at the specified key as type double. Returns true (1) if the + # (FFI::Pointer(*FunctionProto)) Sets the value at the specified key as type double. Returns true (1) if the # value was set successfully. # :set_string :: - # (FFI::Pointer(*)) Sets the value at the specified key as type string. Returns true (1) if the + # (FFI::Pointer(*FunctionProto)) Sets the value at the specified key as type string. Returns true (1) if the # value was set successfully. # :set_binary :: - # (FFI::Pointer(*)) Sets the value at the specified key as type binary. Returns true (1) if the + # (FFI::Pointer(*FunctionProto)) Sets the value at the specified key as type binary. Returns true (1) if the # value was set successfully. If |value| is currently owned by another object # then the value will be copied and the |value| reference will not change. # Otherwise, ownership will be transferred to this object and the |value| # reference will be invalidated. # :set_dictionary :: - # (FFI::Pointer(*)) Sets the value at the specified key as type dict. Returns true (1) if the + # (FFI::Pointer(*FunctionProto)) Sets the value at the specified key as type dict. Returns true (1) if the # value was set successfully. After calling this function the |value| object # will no longer be valid. If |value| is currently owned by another object # then the value will be copied and the |value| reference will not change. # Otherwise, ownership will be transferred to this object and the |value| # reference will be invalidated. # :set_list :: - # (FFI::Pointer(*)) Sets the value at the specified key as type list. Returns true (1) if the + # (FFI::Pointer(*FunctionProto)) Sets the value at the specified key as type list. Returns true (1) if the # value was set successfully. After calling this function the |value| object # will no longer be valid. If |value| is currently owned by another object # then the value will be copied and the |value| reference will not change. @@ -133,7 +130,7 @@ class DictionaryValue < FFI::Struct :is_owned, :pointer, :is_read_only, :pointer, :copy, :pointer, - :get_size, :pointer, + :size, :char, :clear, :pointer, :has_key, :pointer, :get_keys, :pointer, @@ -155,85 +152,84 @@ class DictionaryValue < FFI::Struct :set_dictionary, :pointer, :set_list, :pointer end - + # Creates a new object that is not owned by any other object. - # + # @method dictionary_value_create() - # @return [DictionaryValue] + # @return [DictionaryValue] # @scope class attach_function :dictionary_value_create, :cef_dictionary_value_create, [], DictionaryValue - # Structure representing a list value. Can be used on any process and thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :is_valid :: - # (FFI::Pointer(*)) Returns true (1) if this object is valid. Do not call any other functions + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is valid. Do not call any other functions # if this function returns false (0). # :is_owned :: - # (FFI::Pointer(*)) Returns true (1) if this object is currently owned by another object. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if this object is currently owned by another object. # :is_read_only :: - # (FFI::Pointer(*)) Returns true (1) if the values of this object are read-only. Some APIs may + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the values of this object are read-only. Some APIs may # expose read-only objects. # :copy :: - # (FFI::Pointer(*)) Returns a writable copy of this object. + # (FFI::Pointer(*FunctionProto)) Returns a writable copy of this object. # :set_size :: - # (FFI::Pointer(*)) Sets the number of values. If the number of values is expanded all new + # (FFI::Pointer(*FunctionProto)) Sets the number of values. If the number of values is expanded all new # value slots will default to type null. Returns true (1) on success. - # :get_size :: - # (FFI::Pointer(*)) Returns the number of values. + # :size :: + # (error_unknown) Returns the number of values. # :clear :: - # (FFI::Pointer(*)) Removes all values. Returns true (1) on success. + # (FFI::Pointer(*FunctionProto)) Removes all values. Returns true (1) on success. # :remove :: - # (FFI::Pointer(*)) Removes the value at the specified index. + # (FFI::Pointer(*FunctionProto)) Removes the value at the specified index. # :get_type :: - # (FFI::Pointer(*)) Returns the value type at the specified index. + # (FFI::Pointer(*FunctionProto)) Returns the value type at the specified index. # :get_bool :: - # (FFI::Pointer(*)) Returns the value at the specified index as type bool. + # (FFI::Pointer(*FunctionProto)) Returns the value at the specified index as type bool. # :get_int :: - # (FFI::Pointer(*)) Returns the value at the specified index as type int. + # (FFI::Pointer(*FunctionProto)) Returns the value at the specified index as type int. # :get_double :: - # (FFI::Pointer(*)) Returns the value at the specified index as type double. + # (FFI::Pointer(*FunctionProto)) Returns the value at the specified index as type double. # :get_string :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_binary :: - # (FFI::Pointer(*)) Returns the value at the specified index as type binary. + # (FFI::Pointer(*FunctionProto)) Returns the value at the specified index as type binary. # :get_dictionary :: - # (FFI::Pointer(*)) Returns the value at the specified index as type dictionary. + # (FFI::Pointer(*FunctionProto)) Returns the value at the specified index as type dictionary. # :get_list :: - # (FFI::Pointer(*)) Returns the value at the specified index as type list. + # (FFI::Pointer(*FunctionProto)) Returns the value at the specified index as type list. # :set_null :: - # (FFI::Pointer(*)) Sets the value at the specified index as type null. Returns true (1) if the + # (FFI::Pointer(*FunctionProto)) Sets the value at the specified index as type null. Returns true (1) if the # value was set successfully. # :set_bool :: - # (FFI::Pointer(*)) Sets the value at the specified index as type bool. Returns true (1) if the + # (FFI::Pointer(*FunctionProto)) Sets the value at the specified index as type bool. Returns true (1) if the # value was set successfully. # :set_int :: - # (FFI::Pointer(*)) Sets the value at the specified index as type int. Returns true (1) if the + # (FFI::Pointer(*FunctionProto)) Sets the value at the specified index as type int. Returns true (1) if the # value was set successfully. # :set_double :: - # (FFI::Pointer(*)) Sets the value at the specified index as type double. Returns true (1) if + # (FFI::Pointer(*FunctionProto)) Sets the value at the specified index as type double. Returns true (1) if # the value was set successfully. # :set_string :: - # (FFI::Pointer(*)) Sets the value at the specified index as type string. Returns true (1) if + # (FFI::Pointer(*FunctionProto)) Sets the value at the specified index as type string. Returns true (1) if # the value was set successfully. # :set_binary :: - # (FFI::Pointer(*)) Sets the value at the specified index as type binary. Returns true (1) if + # (FFI::Pointer(*FunctionProto)) Sets the value at the specified index as type binary. Returns true (1) if # the value was set successfully. After calling this function the |value| # object will no longer be valid. If |value| is currently owned by another # object then the value will be copied and the |value| reference will not # change. Otherwise, ownership will be transferred to this object and the # |value| reference will be invalidated. # :set_dictionary :: - # (FFI::Pointer(*)) Sets the value at the specified index as type dict. Returns true (1) if the + # (FFI::Pointer(*FunctionProto)) Sets the value at the specified index as type dict. Returns true (1) if the # value was set successfully. After calling this function the |value| object # will no longer be valid. If |value| is currently owned by another object # then the value will be copied and the |value| reference will not change. # Otherwise, ownership will be transferred to this object and the |value| # reference will be invalidated. # :set_list :: - # (FFI::Pointer(*)) Sets the value at the specified index as type list. Returns true (1) if the + # (FFI::Pointer(*FunctionProto)) Sets the value at the specified index as type list. Returns true (1) if the # value was set successfully. After calling this function the |value| object # will no longer be valid. If |value| is currently owned by another object # then the value will be copied and the |value| reference will not change. @@ -246,7 +242,7 @@ class ListValue < FFI::Struct :is_read_only, :pointer, :copy, :pointer, :set_size, :pointer, - :get_size, :pointer, + :size, :char, :clear, :pointer, :remove, :pointer, :get_type, :pointer, @@ -266,12 +262,11 @@ class ListValue < FFI::Struct :set_dictionary, :pointer, :set_list, :pointer end - + # Creates a new object that is not owned by any other object. - # + # @method list_value_create() - # @return [ListValue] + # @return [ListValue] # @scope class attach_function :list_value_create, :cef_list_value_create, [], ListValue - end diff --git a/test/output/include/capi/cef_web_plugin_capi.rb b/test/output/include/capi/cef_web_plugin_capi.rb index 2a2d693..8f3ef8e 100644 --- a/test/output/include/capi/cef_web_plugin_capi.rb +++ b/test/output/include/capi/cef_web_plugin_capi.rb @@ -1,43 +1,39 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - - # (Not documented) - class WebPluginInfoVisitor < FFI::Struct - layout :dummy, :char - end - + # Visit web plugin information. - # + # @method visit_web_plugin_info(visitor) - # @param [WebPluginInfoVisitor] visitor - # @return [nil] + # @param [FFI::Pointer(*WebPluginInfoVisitor)] visitor + # @return [nil] # @scope class - attach_function :visit_web_plugin_info, :cef_visit_web_plugin_info, [WebPluginInfoVisitor], :void - + attach_function :visit_web_plugin_info, :cef_visit_web_plugin_info, [:pointer], :void # Information about a specific web plugin. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :get_name :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_path :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_version :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_description :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). class WebPluginInfo < FFI::Struct layout :base, :char, :get_name, :pointer, @@ -45,15 +41,15 @@ class WebPluginInfo < FFI::Struct :get_version, :pointer, :get_description, :pointer end - + # Structure to implement for visiting web plugin information. The functions of # this structure will be called on the UI thread. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :visit :: - # (FFI::Pointer(*)) Method that will be called once for each plugin. |count| is the 0-based + # (FFI::Pointer(*FunctionProto)) Method that will be called once for each plugin. |count| is the 0-based # index for the current plugin. |total| is the total number of plugins. # Return false (0) to stop visiting plugins. This function may never be # called if no plugins are found. @@ -61,5 +57,5 @@ class WebPluginInfoVisitor < FFI::Struct layout :base, :char, :visit, :pointer end - + end diff --git a/test/output/include/capi/cef_xml_reader_capi.rb b/test/output/include/capi/cef_xml_reader_capi.rb index 427d2bd..5757ff7 100644 --- a/test/output/include/capi/cef_xml_reader_capi.rb +++ b/test/output/include/capi/cef_xml_reader_capi.rb @@ -1,92 +1,94 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Structure that supports the reading of XML data via the libxml streaming API. # The functions of this structure should only be called on the thread that # creates the object. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :move_to_next_node :: - # (FFI::Pointer(*)) Moves the cursor to the next node in the document. This function must be + # (FFI::Pointer(*FunctionProto)) Moves the cursor to the next node in the document. This function must be # called at least once to set the current cursor position. Returns true (1) # if the cursor position was set successfully. # :close :: - # (FFI::Pointer(*)) Close the document. This should be called directly to ensure that cleanup + # (FFI::Pointer(*FunctionProto)) Close the document. This should be called directly to ensure that cleanup # occurs on the correct thread. # :has_error :: - # (FFI::Pointer(*)) Returns true (1) if an error has been reported by the XML parser. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if an error has been reported by the XML parser. # :get_error :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_type :: - # (FFI::Pointer(*)) Returns the node type. + # (FFI::Pointer(*FunctionProto)) Returns the node type. # :get_depth :: - # (FFI::Pointer(*)) Returns the node depth. Depth starts at 0 for the root node. + # (FFI::Pointer(*FunctionProto)) Returns the node depth. Depth starts at 0 for the root node. # :get_local_name :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_prefix :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_qualified_name :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_namespace_uri :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_base_uri :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_xml_lang :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :is_empty_element :: - # (FFI::Pointer(*)) Returns true (1) if the node represents an NULL element. is considered + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the node represents an NULL element. is considered # NULL but is not. # :has_value :: - # (FFI::Pointer(*)) Returns true (1) if the node has a text value. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the node has a text value. # :get_value :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :has_attributes :: - # (FFI::Pointer(*)) Returns true (1) if the node has attributes. - # :get_attribute_count :: - # (FFI::Pointer(*)) Returns the number of attributes. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if the node has attributes. + # :size :: + # (error_unknown) Returns the number of attributes. # :get_attribute_byindex :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_attribute_byqname :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_attribute_bylname :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_inner_xml :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_outer_xml :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_line_number :: - # (FFI::Pointer(*)) Returns the line number for the current node. + # (FFI::Pointer(*FunctionProto)) Returns the line number for the current node. # :move_to_attribute_byindex :: - # (FFI::Pointer(*)) Moves the cursor to the attribute at the specified 0-based index. Returns + # (FFI::Pointer(*FunctionProto)) Moves the cursor to the attribute at the specified 0-based index. Returns # true (1) if the cursor position was set successfully. # :move_to_attribute_byqname :: - # (FFI::Pointer(*)) Moves the cursor to the attribute with the specified qualified name. + # (FFI::Pointer(*FunctionProto)) Moves the cursor to the attribute with the specified qualified name. # Returns true (1) if the cursor position was set successfully. # :move_to_attribute_bylname :: - # (FFI::Pointer(*)) Moves the cursor to the attribute with the specified local name and + # (FFI::Pointer(*FunctionProto)) Moves the cursor to the attribute with the specified local name and # namespace URI. Returns true (1) if the cursor position was set # successfully. # :move_to_first_attribute :: - # (FFI::Pointer(*)) Moves the cursor to the first attribute in the current element. Returns + # (FFI::Pointer(*FunctionProto)) Moves the cursor to the first attribute in the current element. Returns # true (1) if the cursor position was set successfully. # :move_to_next_attribute :: - # (FFI::Pointer(*)) Moves the cursor to the next attribute in the current element. Returns true + # (FFI::Pointer(*FunctionProto)) Moves the cursor to the next attribute in the current element. Returns true # (1) if the cursor position was set successfully. # :move_to_carrying_element :: - # (FFI::Pointer(*)) Moves the cursor back to the carrying element. Returns true (1) if the + # (FFI::Pointer(*FunctionProto)) Moves the cursor back to the carrying element. Returns true (1) if the # cursor position was set successfully. class XmlReader < FFI::Struct layout :base, :char, @@ -106,7 +108,7 @@ class XmlReader < FFI::Struct :has_value, :pointer, :get_value, :pointer, :has_attributes, :pointer, - :get_attribute_count, :pointer, + :size, :char, :get_attribute_byindex, :pointer, :get_attribute_byqname, :pointer, :get_attribute_bylname, :pointer, @@ -120,21 +122,15 @@ class XmlReader < FFI::Struct :move_to_next_attribute, :pointer, :move_to_carrying_element, :pointer end - - # (Not documented) - class StreamReader < FFI::Struct - layout :dummy, :char - end - + # Create a new cef_xml_reader_t object. The returned object's functions can # only be called from the thread that created the object. - # + # @method xml_reader_create(stream, encoding_type, uri) - # @param [StreamReader] stream - # @param [unknown] encoding_type - # @param [FFI::Pointer(*String)] uri - # @return [XmlReader] + # @param [FFI::Pointer(*StreamReader)] stream + # @param [error_unknown] encoding_type + # @param [FFI::Pointer(*String)] uri + # @return [XmlReader] # @scope class - attach_function :xml_reader_create, :cef_xml_reader_create, [StreamReader, :char, :pointer], XmlReader - + attach_function :xml_reader_create, :cef_xml_reader_create, [:pointer, :char, :pointer], XmlReader end diff --git a/test/output/include/capi/cef_zip_reader_capi.rb b/test/output/include/capi/cef_zip_reader_capi.rb index 23e3e46..9932564 100644 --- a/test/output/include/capi/cef_zip_reader_capi.rb +++ b/test/output/include/capi/cef_zip_reader_capi.rb @@ -1,55 +1,57 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Structure that supports the reading of zip archives via the zlib unzip API. # The functions of this structure should only be called on the thread that # creates the object. - # + # = Fields: # :base :: - # (unknown) Base structure. + # (error_unknown) Base structure. # :move_to_first_file :: - # (FFI::Pointer(*)) Moves the cursor to the first file in the archive. Returns true (1) if the + # (FFI::Pointer(*FunctionProto)) Moves the cursor to the first file in the archive. Returns true (1) if the # cursor position was set successfully. # :move_to_next_file :: - # (FFI::Pointer(*)) Moves the cursor to the next file in the archive. Returns true (1) if the + # (FFI::Pointer(*FunctionProto)) Moves the cursor to the next file in the archive. Returns true (1) if the # cursor position was set successfully. # :move_to_file :: - # (FFI::Pointer(*)) Moves the cursor to the specified file in the archive. If |caseSensitive| + # (FFI::Pointer(*FunctionProto)) Moves the cursor to the specified file in the archive. If |caseSensitive| # is true (1) then the search will be case sensitive. Returns true (1) if the # cursor position was set successfully. # :close :: - # (FFI::Pointer(*)) Closes the archive. This should be called directly to ensure that cleanup + # (FFI::Pointer(*FunctionProto)) Closes the archive. This should be called directly to ensure that cleanup # occurs on the correct thread. # :get_file_name :: - # (FFI::Pointer(*)) The resulting string must be freed by calling cef_string_userfree_free(). + # (FFI::Pointer(*FunctionProto)) The resulting string must be freed by calling cef_string_userfree_free(). # :get_file_size :: - # (FFI::Pointer(*)) Returns the uncompressed size of the file. - # :get_file_last_modified :: - # (FFI::Pointer(*)) Returns the last modified timestamp for the file. + # (FFI::Pointer(*FunctionProto)) Returns the uncompressed size of the file. + # :time :: + # (error_unknown) Returns the last modified timestamp for the file. # :open_file :: - # (FFI::Pointer(*)) Opens the file for reading of uncompressed data. A read password may + # (FFI::Pointer(*FunctionProto)) Opens the file for reading of uncompressed data. A read password may # optionally be specified. # :close_file :: - # (FFI::Pointer(*)) Closes the file. + # (FFI::Pointer(*FunctionProto)) Closes the file. # :read_file :: - # (FFI::Pointer(*)) Read uncompressed file contents into the specified buffer. Returns < 0 if + # (FFI::Pointer(*FunctionProto)) Read uncompressed file contents into the specified buffer. Returns < 0 if # an error occurred, 0 if at the end of file, or the number of bytes read. # :tell :: - # (FFI::Pointer(*)) Returns the current offset in the uncompressed file contents. + # (FFI::Pointer(*FunctionProto)) Returns the current offset in the uncompressed file contents. # :eof :: - # (FFI::Pointer(*)) Returns true (1) if at end of the file contents. + # (FFI::Pointer(*FunctionProto)) Returns true (1) if at end of the file contents. class ZipReader < FFI::Struct layout :base, :char, :move_to_first_file, :pointer, @@ -58,26 +60,20 @@ class ZipReader < FFI::Struct :close, :pointer, :get_file_name, :pointer, :get_file_size, :pointer, - :get_file_last_modified, :pointer, + :time, :char, :open_file, :pointer, :close_file, :pointer, :read_file, :pointer, :tell, :pointer, :eof, :pointer end - - # (Not documented) - class StreamReader < FFI::Struct - layout :dummy, :char - end - + # Create a new cef_zip_reader_t object. The returned object's functions can # only be called from the thread that created the object. - # + # @method zip_reader_create(stream) - # @param [StreamReader] stream - # @return [ZipReader] + # @param [FFI::Pointer(*StreamReader)] stream + # @return [ZipReader] # @scope class - attach_function :zip_reader_create, :cef_zip_reader_create, [StreamReader], ZipReader - + attach_function :zip_reader_create, :cef_zip_reader_create, [:pointer], ZipReader end diff --git a/test/output/include/internal/cef_build.rb b/test/output/include/internal/cef_build.rb index 6a45af6..a9c0609 100644 --- a/test/output/include/internal/cef_build.rb +++ b/test/output/include/internal/cef_build.rb @@ -1,25 +1,27 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + OS_LINUX = 1 - + OS_POSIX = 1 - + COMPILER_GCC = 1 - + def allow_this_in_initializer_list(code) code end - + end diff --git a/test/output/include/internal/cef_export.rb b/test/output/include/internal/cef_export.rb index 46caee6..f69421e 100644 --- a/test/output/include/internal/cef_export.rb +++ b/test/output/include/internal/cef_export.rb @@ -1,15 +1,17 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + end diff --git a/test/output/include/internal/cef_linux.rb b/test/output/include/internal/cef_linux.rb index 46caee6..f69421e 100644 --- a/test/output/include/internal/cef_linux.rb +++ b/test/output/include/internal/cef_linux.rb @@ -1,15 +1,17 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + end diff --git a/test/output/include/internal/cef_mac.rb b/test/output/include/internal/cef_mac.rb index 46caee6..f69421e 100644 --- a/test/output/include/internal/cef_mac.rb +++ b/test/output/include/internal/cef_mac.rb @@ -1,15 +1,17 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + end diff --git a/test/output/include/internal/cef_ptr.rb b/test/output/include/internal/cef_ptr.rb index 46caee6..f69421e 100644 --- a/test/output/include/internal/cef_ptr.rb +++ b/test/output/include/internal/cef_ptr.rb @@ -1,15 +1,17 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + end diff --git a/test/output/include/internal/cef_string.rb b/test/output/include/internal/cef_string.rb index d00a3b6..d2bbb4c 100644 --- a/test/output/include/internal/cef_string.rb +++ b/test/output/include/internal/cef_string.rb @@ -1,17 +1,19 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + STRING_TYPE_UTF16 = 1 - + end diff --git a/test/output/include/internal/cef_string_list.rb b/test/output/include/internal/cef_string_list.rb index f2f65df..7ff6184 100644 --- a/test/output/include/internal/cef_string_list.rb +++ b/test/output/include/internal/cef_string_list.rb @@ -1,74 +1,69 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Allocate a new string map. - # + # @method string_list_alloc() - # @return [FFI::Pointer(StringList)] + # @return [FFI::Pointer(StringList)] # @scope class attach_function :string_list_alloc, :cef_string_list_alloc, [], :pointer - # Return the number of elements in the string list. - # + # @method string_list_size(list) - # @param [FFI::Pointer(StringList)] list - # @return [Integer] + # @param [FFI::Pointer(StringList)] list + # @return [Integer] # @scope class attach_function :string_list_size, :cef_string_list_size, [:pointer], :int - # Retrieve the value at the specified zero-based string list index. Returns # true (1) if the value was successfully retrieved. - # + # @method string_list_value(list, index, value) - # @param [FFI::Pointer(StringList)] list - # @param [Integer] index - # @param [FFI::Pointer(*String)] value - # @return [Integer] + # @param [FFI::Pointer(StringList)] list + # @param [Integer] index + # @param [FFI::Pointer(*String)] value + # @return [Integer] # @scope class attach_function :string_list_value, :cef_string_list_value, [:pointer, :int, :pointer], :int - # Append a new value at the end of the string list. - # + # @method string_list_append(list, value) - # @param [FFI::Pointer(StringList)] list - # @param [FFI::Pointer(*String)] value - # @return [nil] + # @param [FFI::Pointer(StringList)] list + # @param [FFI::Pointer(*String)] value + # @return [nil] # @scope class attach_function :string_list_append, :cef_string_list_append, [:pointer, :pointer], :void - # Clear the string list. - # + # @method string_list_clear(list) - # @param [FFI::Pointer(StringList)] list - # @return [nil] + # @param [FFI::Pointer(StringList)] list + # @return [nil] # @scope class attach_function :string_list_clear, :cef_string_list_clear, [:pointer], :void - # Free the string list. - # + # @method string_list_free(list) - # @param [FFI::Pointer(StringList)] list - # @return [nil] + # @param [FFI::Pointer(StringList)] list + # @return [nil] # @scope class attach_function :string_list_free, :cef_string_list_free, [:pointer], :void - # Creates a copy of an existing string list. - # + # @method string_list_copy(list) - # @param [FFI::Pointer(StringList)] list - # @return [FFI::Pointer(StringList)] + # @param [FFI::Pointer(StringList)] list + # @return [FFI::Pointer(StringList)] # @scope class attach_function :string_list_copy, :cef_string_list_copy, [:pointer], :pointer - end diff --git a/test/output/include/internal/cef_string_map.rb b/test/output/include/internal/cef_string_map.rb index 0ce2fea..c188bdc 100644 --- a/test/output/include/internal/cef_string_map.rb +++ b/test/output/include/internal/cef_string_map.rb @@ -1,86 +1,80 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Allocate a new string map. - # + # @method string_map_alloc() - # @return [FFI::Pointer(StringMap)] + # @return [FFI::Pointer(StringMap)] # @scope class attach_function :string_map_alloc, :cef_string_map_alloc, [], :pointer - # Return the number of elements in the string map. - # + # @method string_map_size(map) - # @param [FFI::Pointer(StringMap)] map - # @return [Integer] + # @param [FFI::Pointer(StringMap)] map + # @return [Integer] # @scope class attach_function :string_map_size, :cef_string_map_size, [:pointer], :int - # Return the value assigned to the specified key. - # + # @method string_map_find(map, key, value) - # @param [FFI::Pointer(StringMap)] map - # @param [FFI::Pointer(*String)] key - # @param [FFI::Pointer(*String)] value - # @return [Integer] + # @param [FFI::Pointer(StringMap)] map + # @param [FFI::Pointer(*String)] key + # @param [FFI::Pointer(*String)] value + # @return [Integer] # @scope class attach_function :string_map_find, :cef_string_map_find, [:pointer, :pointer, :pointer], :int - # Return the key at the specified zero-based string map index. - # + # @method string_map_key(map, index, key) - # @param [FFI::Pointer(StringMap)] map - # @param [Integer] index - # @param [FFI::Pointer(*String)] key - # @return [Integer] + # @param [FFI::Pointer(StringMap)] map + # @param [Integer] index + # @param [FFI::Pointer(*String)] key + # @return [Integer] # @scope class attach_function :string_map_key, :cef_string_map_key, [:pointer, :int, :pointer], :int - # Return the value at the specified zero-based string map index. - # + # @method string_map_value(map, index, value) - # @param [FFI::Pointer(StringMap)] map - # @param [Integer] index - # @param [FFI::Pointer(*String)] value - # @return [Integer] + # @param [FFI::Pointer(StringMap)] map + # @param [Integer] index + # @param [FFI::Pointer(*String)] value + # @return [Integer] # @scope class attach_function :string_map_value, :cef_string_map_value, [:pointer, :int, :pointer], :int - # Append a new key/value pair at the end of the string map. - # + # @method string_map_append(map, key, value) - # @param [FFI::Pointer(StringMap)] map - # @param [FFI::Pointer(*String)] key - # @param [FFI::Pointer(*String)] value - # @return [Integer] + # @param [FFI::Pointer(StringMap)] map + # @param [FFI::Pointer(*String)] key + # @param [FFI::Pointer(*String)] value + # @return [Integer] # @scope class attach_function :string_map_append, :cef_string_map_append, [:pointer, :pointer, :pointer], :int - # Clear the string map. - # + # @method string_map_clear(map) - # @param [FFI::Pointer(StringMap)] map - # @return [nil] + # @param [FFI::Pointer(StringMap)] map + # @return [nil] # @scope class attach_function :string_map_clear, :cef_string_map_clear, [:pointer], :void - # Free the string map. - # + # @method string_map_free(map) - # @param [FFI::Pointer(StringMap)] map - # @return [nil] + # @param [FFI::Pointer(StringMap)] map + # @return [nil] # @scope class attach_function :string_map_free, :cef_string_map_free, [:pointer], :void - end diff --git a/test/output/include/internal/cef_string_multimap.rb b/test/output/include/internal/cef_string_multimap.rb index cd913c7..4ee54e8 100644 --- a/test/output/include/internal/cef_string_multimap.rb +++ b/test/output/include/internal/cef_string_multimap.rb @@ -1,96 +1,89 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Allocate a new string multimap. - # + # @method string_multimap_alloc() - # @return [FFI::Pointer(StringMultimap)] + # @return [FFI::Pointer(StringMultimap)] # @scope class attach_function :string_multimap_alloc, :cef_string_multimap_alloc, [], :pointer - # Return the number of elements in the string multimap. - # + # @method string_multimap_size(map) - # @param [FFI::Pointer(StringMultimap)] map - # @return [Integer] + # @param [FFI::Pointer(StringMultimap)] map + # @return [Integer] # @scope class attach_function :string_multimap_size, :cef_string_multimap_size, [:pointer], :int - # Return the number of values with the specified key. - # + # @method string_multimap_find_count(map, key) - # @param [FFI::Pointer(StringMultimap)] map - # @param [FFI::Pointer(*String)] key - # @return [Integer] + # @param [FFI::Pointer(StringMultimap)] map + # @param [FFI::Pointer(*String)] key + # @return [Integer] # @scope class attach_function :string_multimap_find_count, :cef_string_multimap_find_count, [:pointer, :pointer], :int - # Return the value_index-th value with the specified key. - # + # @method string_multimap_enumerate(map, key, value_index, value) - # @param [FFI::Pointer(StringMultimap)] map - # @param [FFI::Pointer(*String)] key - # @param [Integer] value_index - # @param [FFI::Pointer(*String)] value - # @return [Integer] + # @param [FFI::Pointer(StringMultimap)] map + # @param [FFI::Pointer(*String)] key + # @param [Integer] value_index + # @param [FFI::Pointer(*String)] value + # @return [Integer] # @scope class attach_function :string_multimap_enumerate, :cef_string_multimap_enumerate, [:pointer, :pointer, :int, :pointer], :int - # Return the key at the specified zero-based string multimap index. - # + # @method string_multimap_key(map, index, key) - # @param [FFI::Pointer(StringMultimap)] map - # @param [Integer] index - # @param [FFI::Pointer(*String)] key - # @return [Integer] + # @param [FFI::Pointer(StringMultimap)] map + # @param [Integer] index + # @param [FFI::Pointer(*String)] key + # @return [Integer] # @scope class attach_function :string_multimap_key, :cef_string_multimap_key, [:pointer, :int, :pointer], :int - # Return the value at the specified zero-based string multimap index. - # + # @method string_multimap_value(map, index, value) - # @param [FFI::Pointer(StringMultimap)] map - # @param [Integer] index - # @param [FFI::Pointer(*String)] value - # @return [Integer] + # @param [FFI::Pointer(StringMultimap)] map + # @param [Integer] index + # @param [FFI::Pointer(*String)] value + # @return [Integer] # @scope class attach_function :string_multimap_value, :cef_string_multimap_value, [:pointer, :int, :pointer], :int - # Append a new key/value pair at the end of the string multimap. - # + # @method string_multimap_append(map, key, value) - # @param [FFI::Pointer(StringMultimap)] map - # @param [FFI::Pointer(*String)] key - # @param [FFI::Pointer(*String)] value - # @return [Integer] + # @param [FFI::Pointer(StringMultimap)] map + # @param [FFI::Pointer(*String)] key + # @param [FFI::Pointer(*String)] value + # @return [Integer] # @scope class attach_function :string_multimap_append, :cef_string_multimap_append, [:pointer, :pointer, :pointer], :int - # Clear the string multimap. - # + # @method string_multimap_clear(map) - # @param [FFI::Pointer(StringMultimap)] map - # @return [nil] + # @param [FFI::Pointer(StringMultimap)] map + # @return [nil] # @scope class attach_function :string_multimap_clear, :cef_string_multimap_clear, [:pointer], :void - # Free the string multimap. - # + # @method string_multimap_free(map) - # @param [FFI::Pointer(StringMultimap)] map - # @return [nil] + # @param [FFI::Pointer(StringMultimap)] map + # @return [nil] # @scope class attach_function :string_multimap_free, :cef_string_multimap_free, [:pointer], :void - end diff --git a/test/output/include/internal/cef_string_types.rb b/test/output/include/internal/cef_string_types.rb index db605ce..352ccd5 100644 --- a/test/output/include/internal/cef_string_types.rb +++ b/test/output/include/internal/cef_string_types.rb @@ -1,332 +1,311 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + def string_wide_copy(src, src_len, output) string_wide_set(src, src_len, output, TRUE) end - + def string_utf8_copy(src, src_len, output) string_utf8_set(src, src_len, output, TRUE) end - + def string_utf16_copy(src, src_len, output) string_utf16_set(src, src_len, output, TRUE) end - + # functions if you want this managed for you. - # + # = Fields: # :str :: - # (FFI::Pointer(*Wchar)) + # (FFI::Pointer(*Int)) # :length :: - # (Integer) + # (Integer) # :dtor :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) module StringWideWrappers - # @return [nil] + # @return [nil] def clear() CEF.string_wide_clear(self) end - - # @param [FFI::Pointer(*StringWide)] str2 - # @return [Integer] + + # @param [FFI::Pointer(*StringWide)] str2 + # @return [Integer] def cmp(str2) CEF.string_wide_cmp(self, str2) end end - + class StringWide < FFI::Struct include StringWideWrappers layout :str, :pointer, - :length, :ulong, + :length, :int, :dtor, :pointer end - + # (Not documented) - # + # = Fields: # :str :: - # (String) + # (String) # :length :: - # (Integer) + # (Integer) # :dtor :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) module StringUtf8Wrappers - # @return [nil] + # @return [nil] def clear() CEF.string_utf8_clear(self) end - - # @param [FFI::Pointer(*StringUtf8)] str2 - # @return [Integer] + + # @param [FFI::Pointer(*StringUtf8)] str2 + # @return [Integer] def cmp(str2) CEF.string_utf8_cmp(self, str2) end end - + class StringUtf8 < FFI::Struct include StringUtf8Wrappers layout :str, :string, - :length, :ulong, + :length, :int, :dtor, :pointer end - + # (Not documented) - # + # = Fields: # :str :: - # (FFI::Pointer(*Char16)) + # (FFI::Pointer(*Char16)) # :length :: - # (Integer) + # (Integer) # :dtor :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) module StringUtf16Wrappers - # @return [nil] + # @return [nil] def clear() CEF.string_utf16_clear(self) end - - # @param [FFI::Pointer(*StringUtf16)] str2 - # @return [Integer] + + # @param [FFI::Pointer(*StringUtf16)] str2 + # @return [Integer] def cmp(str2) CEF.string_utf16_cmp(self, str2) end end - + class StringUtf16 < FFI::Struct include StringUtf16Wrappers layout :str, :pointer, - :length, :ulong, + :length, :int, :dtor, :pointer end - + # These functions set string values. If |copy| is true (1) the value will be # copied instead of referenced. It is up to the user to properly manage # the lifespan of references. - # + # @method string_wide_set(src, src_len, output, copy) - # @param [FFI::Pointer(*Wchar)] src - # @param [Integer] src_len - # @param [StringWide] output - # @param [Integer] copy - # @return [Integer] + # @param [FFI::Pointer(*Int)] src + # @param [Integer] src_len + # @param [StringWide] output + # @param [Integer] copy + # @return [Integer] # @scope class - attach_function :string_wide_set, :cef_string_wide_set, [:pointer, :ulong, StringWide, :int], :int - + attach_function :string_wide_set, :cef_string_wide_set, [:pointer, :int, StringWide, :int], :int # (Not documented) - # + # @method string_utf8_set(src, src_len, output, copy) - # @param [String] src - # @param [Integer] src_len - # @param [StringUtf8] output - # @param [Integer] copy - # @return [Integer] + # @param [String] src + # @param [Integer] src_len + # @param [StringUtf8] output + # @param [Integer] copy + # @return [Integer] # @scope class - attach_function :string_utf8_set, :cef_string_utf8_set, [:string, :ulong, StringUtf8, :int], :int - + attach_function :string_utf8_set, :cef_string_utf8_set, [:string, :int, StringUtf8, :int], :int # (Not documented) - # + # @method string_utf16_set(src, src_len, output, copy) - # @param [FFI::Pointer(*Char16)] src - # @param [Integer] src_len - # @param [StringUtf16] output - # @param [Integer] copy - # @return [Integer] + # @param [FFI::Pointer(*Char16)] src + # @param [Integer] src_len + # @param [StringUtf16] output + # @param [Integer] copy + # @return [Integer] # @scope class - attach_function :string_utf16_set, :cef_string_utf16_set, [:pointer, :ulong, StringUtf16, :int], :int - + attach_function :string_utf16_set, :cef_string_utf16_set, [:pointer, :int, StringUtf16, :int], :int # These functions clear string values. The structure itself is not freed. - # + # @method string_wide_clear(str) - # @param [StringWide] str - # @return [nil] + # @param [StringWide] str + # @return [nil] # @scope class attach_function :string_wide_clear, :cef_string_wide_clear, [StringWide], :void - # (Not documented) - # + # @method string_utf8_clear(str) - # @param [StringUtf8] str - # @return [nil] + # @param [StringUtf8] str + # @return [nil] # @scope class attach_function :string_utf8_clear, :cef_string_utf8_clear, [StringUtf8], :void - # (Not documented) - # + # @method string_utf16_clear(str) - # @param [StringUtf16] str - # @return [nil] + # @param [StringUtf16] str + # @return [nil] # @scope class attach_function :string_utf16_clear, :cef_string_utf16_clear, [StringUtf16], :void - # These functions compare two string values with the same results as strcmp(). - # + # @method string_wide_cmp(str1, str2) - # @param [StringWide] str1 - # @param [StringWide] str2 - # @return [Integer] + # @param [StringWide] str1 + # @param [StringWide] str2 + # @return [Integer] # @scope class attach_function :string_wide_cmp, :cef_string_wide_cmp, [StringWide, StringWide], :int - # (Not documented) - # + # @method string_utf8_cmp(str1, str2) - # @param [StringUtf8] str1 - # @param [StringUtf8] str2 - # @return [Integer] + # @param [StringUtf8] str1 + # @param [StringUtf8] str2 + # @return [Integer] # @scope class attach_function :string_utf8_cmp, :cef_string_utf8_cmp, [StringUtf8, StringUtf8], :int - # (Not documented) - # + # @method string_utf16_cmp(str1, str2) - # @param [StringUtf16] str1 - # @param [StringUtf16] str2 - # @return [Integer] + # @param [StringUtf16] str1 + # @param [StringUtf16] str2 + # @return [Integer] # @scope class attach_function :string_utf16_cmp, :cef_string_utf16_cmp, [StringUtf16, StringUtf16], :int - # These functions convert between UTF-8, -16, and -32 strings. They are # potentially slow so unnecessary conversions should be avoided. The best # possible result will always be written to |output| with the boolean return # value indicating whether the conversion is 100% valid. - # + # @method string_wide_to_utf8(src, src_len, output) - # @param [FFI::Pointer(*Wchar)] src - # @param [Integer] src_len - # @param [StringUtf8] output - # @return [Integer] + # @param [FFI::Pointer(*Int)] src + # @param [Integer] src_len + # @param [StringUtf8] output + # @return [Integer] # @scope class - attach_function :string_wide_to_utf8, :cef_string_wide_to_utf8, [:pointer, :ulong, StringUtf8], :int - + attach_function :string_wide_to_utf8, :cef_string_wide_to_utf8, [:pointer, :int, StringUtf8], :int # (Not documented) - # + # @method string_utf8_to_wide(src, src_len, output) - # @param [String] src - # @param [Integer] src_len - # @param [StringWide] output - # @return [Integer] + # @param [String] src + # @param [Integer] src_len + # @param [StringWide] output + # @return [Integer] # @scope class - attach_function :string_utf8_to_wide, :cef_string_utf8_to_wide, [:string, :ulong, StringWide], :int - + attach_function :string_utf8_to_wide, :cef_string_utf8_to_wide, [:string, :int, StringWide], :int # (Not documented) - # + # @method string_wide_to_utf16(src, src_len, output) - # @param [FFI::Pointer(*Wchar)] src - # @param [Integer] src_len - # @param [StringUtf16] output - # @return [Integer] + # @param [FFI::Pointer(*Int)] src + # @param [Integer] src_len + # @param [StringUtf16] output + # @return [Integer] # @scope class - attach_function :string_wide_to_utf16, :cef_string_wide_to_utf16, [:pointer, :ulong, StringUtf16], :int - + attach_function :string_wide_to_utf16, :cef_string_wide_to_utf16, [:pointer, :int, StringUtf16], :int # (Not documented) - # + # @method string_utf16_to_wide(src, src_len, output) - # @param [FFI::Pointer(*Char16)] src - # @param [Integer] src_len - # @param [StringWide] output - # @return [Integer] + # @param [FFI::Pointer(*Char16)] src + # @param [Integer] src_len + # @param [StringWide] output + # @return [Integer] # @scope class - attach_function :string_utf16_to_wide, :cef_string_utf16_to_wide, [:pointer, :ulong, StringWide], :int - + attach_function :string_utf16_to_wide, :cef_string_utf16_to_wide, [:pointer, :int, StringWide], :int # (Not documented) - # + # @method string_utf8_to_utf16(src, src_len, output) - # @param [String] src - # @param [Integer] src_len - # @param [StringUtf16] output - # @return [Integer] + # @param [String] src + # @param [Integer] src_len + # @param [StringUtf16] output + # @return [Integer] # @scope class - attach_function :string_utf8_to_utf16, :cef_string_utf8_to_utf16, [:string, :ulong, StringUtf16], :int - + attach_function :string_utf8_to_utf16, :cef_string_utf8_to_utf16, [:string, :int, StringUtf16], :int # (Not documented) - # + # @method string_utf16_to_utf8(src, src_len, output) - # @param [FFI::Pointer(*Char16)] src - # @param [Integer] src_len - # @param [StringUtf8] output - # @return [Integer] + # @param [FFI::Pointer(*Char16)] src + # @param [Integer] src_len + # @param [StringUtf8] output + # @return [Integer] # @scope class - attach_function :string_utf16_to_utf8, :cef_string_utf16_to_utf8, [:pointer, :ulong, StringUtf8], :int - + attach_function :string_utf16_to_utf8, :cef_string_utf16_to_utf8, [:pointer, :int, StringUtf8], :int # These functions convert an ASCII string, typically a hardcoded constant, to a # Wide/UTF16 string. Use instead of the UTF8 conversion routines if you know # the string is ASCII. - # + # @method string_ascii_to_wide(src, src_len, output) - # @param [String] src - # @param [Integer] src_len - # @param [StringWide] output - # @return [Integer] + # @param [String] src + # @param [Integer] src_len + # @param [StringWide] output + # @return [Integer] # @scope class - attach_function :string_ascii_to_wide, :cef_string_ascii_to_wide, [:string, :ulong, StringWide], :int - + attach_function :string_ascii_to_wide, :cef_string_ascii_to_wide, [:string, :int, StringWide], :int # (Not documented) - # + # @method string_ascii_to_utf16(src, src_len, output) - # @param [String] src - # @param [Integer] src_len - # @param [StringUtf16] output - # @return [Integer] + # @param [String] src + # @param [Integer] src_len + # @param [StringUtf16] output + # @return [Integer] # @scope class - attach_function :string_ascii_to_utf16, :cef_string_ascii_to_utf16, [:string, :ulong, StringUtf16], :int - + attach_function :string_ascii_to_utf16, :cef_string_ascii_to_utf16, [:string, :int, StringUtf16], :int # These functions allocate a new string structure. They must be freed by # calling the associated free function. - # + # @method string_userfree_wide_alloc() - # @return [StringWide] + # @return [StringWide] # @scope class attach_function :string_userfree_wide_alloc, :cef_string_userfree_wide_alloc, [], StringWide - # (Not documented) - # + # @method string_userfree_utf8_alloc() - # @return [StringUtf8] + # @return [StringUtf8] # @scope class attach_function :string_userfree_utf8_alloc, :cef_string_userfree_utf8_alloc, [], StringUtf8 - # (Not documented) - # + # @method string_userfree_utf16_alloc() - # @return [StringUtf16] + # @return [StringUtf16] # @scope class attach_function :string_userfree_utf16_alloc, :cef_string_userfree_utf16_alloc, [], StringUtf16 - # These functions free the string structure allocated by the associated # alloc function. Any string contents will first be cleared. - # + # @method string_userfree_wide_free(str) - # @param [StringWide] str - # @return [nil] + # @param [StringWide] str + # @return [nil] # @scope class attach_function :string_userfree_wide_free, :cef_string_userfree_wide_free, [StringWide], :void - # (Not documented) - # + # @method string_userfree_utf8_free(str) - # @param [StringUtf8] str - # @return [nil] + # @param [StringUtf8] str + # @return [nil] # @scope class attach_function :string_userfree_utf8_free, :cef_string_userfree_utf8_free, [StringUtf8], :void - # (Not documented) - # + # @method string_userfree_utf16_free(str) - # @param [StringUtf16] str - # @return [nil] + # @param [StringUtf16] str + # @return [nil] # @scope class attach_function :string_userfree_utf16_free, :cef_string_userfree_utf16_free, [StringUtf16], :void - end diff --git a/test/output/include/internal/cef_string_wrappers.rb b/test/output/include/internal/cef_string_wrappers.rb index 36057e9..9fa7c99 100644 --- a/test/output/include/internal/cef_string_wrappers.rb +++ b/test/output/include/internal/cef_string_wrappers.rb @@ -1,69 +1,71 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Traits implementation for wide character strings. - # + # = Fields: # :char_type :: - # (Integer) + # (Integer) # :struct_type :: - # (unknown) + # (error_unknown) # :userfree_struct_type :: - # (FFI::Pointer(StringUserfreeWide)) + # (FFI::Pointer(StringUserfreeWide)) # :clear :: - # (unknown) + # (error_unknown) class CefStringTraitsWide < FFI::Struct layout :char_type, :int, :struct_type, :char, :userfree_struct_type, :pointer, :clear, :char end - + # Traits implementation for utf8 character strings. - # + # = Fields: # :char_type :: - # (Integer) + # (Integer) # :struct_type :: - # (unknown) + # (error_unknown) # :userfree_struct_type :: - # (FFI::Pointer(StringUserfreeUtf8)) + # (FFI::Pointer(StringUserfreeUtf8)) # :clear :: - # (unknown) + # (error_unknown) class CefStringTraitsUTF8 < FFI::Struct layout :char_type, :char, :struct_type, :char, :userfree_struct_type, :pointer, :clear, :char end - + # Traits implementation for utf16 character strings. - # + # = Fields: # :char_type :: - # (Integer) + # (Integer) # :struct_type :: - # (unknown) + # (error_unknown) # :userfree_struct_type :: - # (FFI::Pointer(StringUserfreeUtf16)) + # (FFI::Pointer(StringUserfreeUtf16)) # :clear :: - # (unknown) + # (error_unknown) class CefStringTraitsUTF16 < FFI::Struct - layout :char_type, :ushort, + layout :char_type, :int, :struct_type, :char, :userfree_struct_type, :pointer, :clear, :char end - + end diff --git a/test/output/include/internal/cef_time.rb b/test/output/include/internal/cef_time.rb index 530d538..7b742ad 100644 --- a/test/output/include/internal/cef_time.rb +++ b/test/output/include/internal/cef_time.rb @@ -1,19 +1,21 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Time information. Values should always be in UTC. - # + # = Fields: # :year :: # (Integer) Four digit year "2007" @@ -31,22 +33,7 @@ def self.attach_function(name, *_) # (Integer) Second within the current minute (0-59 plus leap # :millisecond :: # (Integer) Milliseconds within the current second (0-999) - module TimeWrappers - # @param [FFI::Pointer(*Time)] time - # @return [Integer] - def to_timet(time) - CEF.time_to_timet(self, time) - end - - # @param [FFI::Pointer(*Double)] time - # @return [Integer] - def to_doublet(time) - CEF.time_to_doublet(self, time) - end - end - class Time < FFI::Struct - include TimeWrappers layout :year, :int, :month, :int, :day_of_week, :int, @@ -56,45 +43,41 @@ class Time < FFI::Struct :second, :int, :millisecond, :int end - + # Converts cef_time_t to/from time_t. Returns true (1) on success and false (0) # on failure. - # + # @method time_to_timet(time, time) - # @param [Time] time - # @param [FFI::Pointer(*Time)] time - # @return [Integer] + # @param [FFI::Pointer(*Time)] time + # @param [FFI::Pointer(*Int)] time + # @return [Integer] # @scope class - attach_function :time_to_timet, :cef_time_to_timet, [Time, :pointer], :int - + attach_function :time_to_timet, :cef_time_to_timet, [:pointer, :pointer], :int # (Not documented) - # + # @method time_from_timet(time, time) - # @param [Integer] time - # @param [Time] time - # @return [Integer] + # @param [Integer] time + # @param [FFI::Pointer(*Time)] time + # @return [Integer] # @scope class - attach_function :time_from_timet, :cef_time_from_timet, [:long, Time], :int - + attach_function :time_from_timet, :cef_time_from_timet, [:int, :pointer], :int # Converts cef_time_t to/from a double which is the number of seconds since # epoch (Jan 1, 1970). Webkit uses this format to represent time. A value of 0 # means "not initialized". Returns true (1) on success and false (0) on # failure. - # + # @method time_to_doublet(time, time) - # @param [Time] time - # @param [FFI::Pointer(*Double)] time - # @return [Integer] + # @param [FFI::Pointer(*Time)] time + # @param [FFI::Pointer(*Double)] time + # @return [Integer] # @scope class - attach_function :time_to_doublet, :cef_time_to_doublet, [Time, :pointer], :int - + attach_function :time_to_doublet, :cef_time_to_doublet, [:pointer, :pointer], :int # (Not documented) - # + # @method time_from_doublet(time, time) - # @param [Float] time - # @param [Time] time - # @return [Integer] + # @param [Float] time + # @param [FFI::Pointer(*Time)] time + # @return [Integer] # @scope class - attach_function :time_from_doublet, :cef_time_from_doublet, [:double, Time], :int - + attach_function :time_from_doublet, :cef_time_from_doublet, [:double, :pointer], :int end diff --git a/test/output/include/internal/cef_tuple.rb b/test/output/include/internal/cef_tuple.rb index eb3432e..ced27ad 100644 --- a/test/output/include/internal/cef_tuple.rb +++ b/test/output/include/internal/cef_tuple.rb @@ -1,37 +1,38 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # output (a "tier"). See MakeRefTuple and its usages. - # + # = Fields: # :value_tuple :: - # (unknown) + # (error_unknown) # :ref_tuple :: - # (unknown) + # (error_unknown) # :param_tuple :: - # (unknown) + # (error_unknown) class Tuple0 < FFI::Struct layout :value_tuple, :char, :ref_tuple, :char, :param_tuple, :char end - + # argument types. - # + # @method make_tuple() - # @return [Tuple0] + # @return [Tuple0] # @scope class attach_function :make_tuple, :MakeTuple, [], Tuple0.by_value - end diff --git a/test/output/include/internal/cef_types.rb b/test/output/include/internal/cef_types.rb index dbfc7d8..d4ed357 100644 --- a/test/output/include/internal/cef_types.rb +++ b/test/output/include/internal/cef_types.rb @@ -1,35 +1,37 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Log severity levels. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:log_severity). - # + # === Options: # :logseverity_verbose :: - # + # :logseverity_info :: - # + # :logseverity_warning :: - # + # :logseverity_error :: - # + # :logseverity_error_report :: - # + # :logseverity_disable :: # Disables logging completely. - # + # @method _enum_log_severity_ # @return [Symbol] # @scope class @@ -41,10 +43,10 @@ def self.attach_function(name, *_) :logseverity_error_report, 3, :logseverity_disable, 99 ] - + # Initialization settings. Specify NULL or 0 to get the recommended default # values. - # + # = Fields: # :size :: # (Integer) Size of this structure. @@ -53,7 +55,7 @@ def self.attach_function(name, *_) # run mode is not officially supported by Chromium and is less stable than # the multi-process default. # :browser_subprocess_path :: - # (unknown) The path to a separate executable that will be launched for sub-processes. + # (error_unknown) The path to a separate executable that will be launched for sub-processes. # By default the browser process executable is used. See the comments on # CefExecuteProcess() for details. # :multi_threaded_message_loop :: @@ -66,42 +68,42 @@ def self.attach_function(name, *_) # be specified using CEF data structures or via the # CefApp::OnBeforeCommandLineProcessing() method. # :cache_path :: - # (unknown) The location where cache data will be stored on disk. If empty an in-memory + # (error_unknown) The location where cache data will be stored on disk. If empty an in-memory # cache will be used. HTML5 databases such as localStorage will only persist # across sessions if a cache path is specified. # :user_agent :: - # (unknown) Value that will be returned as the User-Agent HTTP header. If empty the + # (error_unknown) Value that will be returned as the User-Agent HTTP header. If empty the # default User-Agent string will be used. # :product_version :: - # (unknown) Value that will be inserted as the product portion of the default + # (error_unknown) Value that will be inserted as the product portion of the default # User-Agent string. If empty the Chromium product version will be used. If # |userAgent| is specified this value will be ignored. # :locale :: - # (unknown) The locale string that will be passed to WebKit. If empty the default + # (error_unknown) The locale string that will be passed to WebKit. If empty the default # locale of "en-US" will be used. This value is ignored on Linux where locale # is determined using environment variable parsing with the precedence order: # LANGUAGE, LC_ALL, LC_MESSAGES and LANG. # :log_file :: - # (unknown) The directory and file name to use for the debug log. If empty, the + # (error_unknown) The directory and file name to use for the debug log. If empty, the # default name of "debug.log" will be used and the file will be written # to the application directory. # :log_severity :: # (Symbol from _enum_log_severity_) The log severity. Only messages of this severity level or higher will be # logged. # :javascript_flags :: - # (unknown) Custom flags that will be used when initializing the V8 JavaScript engine. + # (error_unknown) Custom flags that will be used when initializing the V8 JavaScript engine. # The consequences of using custom flags may not be well tested. # :auto_detect_proxy_settings_enabled :: # (Integer) Set to true (1) to use the system proxy resolver on Windows when # "Automatically detect settings" is checked. This setting is disabled # by default for performance reasons. # :pack_file_path :: - # (unknown) The fully qualified path for the cef.pak file. If this value is empty + # (error_unknown) The fully qualified path for the cef.pak file. If this value is empty # the cef.pak file must be located in the module directory. This value is # ignored on Mac OS X where pack files are always loaded from the app bundle # resource directory. # :locales_dir_path :: - # (unknown) The fully qualified path for the locales directory. If this value is empty + # (error_unknown) The fully qualified path for the locales directory. If this value is empty # the locales directory must be located in the module directory. This value # is ignored on Mac OS X where pack files are always loaded from the app # bundle resource directory. @@ -116,7 +118,7 @@ def self.attach_function(name, *_) # will be http://localhost:8080. CEF can be remotely debugged from any CEF or # Chrome browser window. class Settings < FFI::Struct - layout :size, :ulong, + layout :size, :int, :single_process, :int, :browser_subprocess_path, :char, :multi_threaded_message_loop, :int, @@ -134,38 +136,38 @@ class Settings < FFI::Struct :pack_loading_disabled, :int, :remote_debugging_port, :int end - + # Browser initialization settings. Specify NULL or 0 to get the recommended # default values. The consequences of using custom values may not be well # tested. - # + # = Fields: # :size :: # (Integer) Size of this structure. # :standard_font_family :: - # (unknown) Font settings. + # (error_unknown) Font settings. # :fixed_font_family :: - # (unknown) + # (error_unknown) # :serif_font_family :: - # (unknown) + # (error_unknown) # :sans_serif_font_family :: - # (unknown) + # (error_unknown) # :cursive_font_family :: - # (unknown) + # (error_unknown) # :fantasy_font_family :: - # (unknown) + # (error_unknown) # :default_font_size :: - # (Integer) + # (Integer) # :default_fixed_font_size :: - # (Integer) + # (Integer) # :minimum_font_size :: - # (Integer) + # (Integer) # :minimum_logical_font_size :: - # (Integer) + # (Integer) # :remote_fonts_disabled :: # (Integer) Set to true (1) to disable loading of fonts from remote sources. # :default_encoding :: - # (unknown) Default encoding for Web content. If empty "ISO-8859-1" will be used. + # (error_unknown) Default encoding for Web content. If empty "ISO-8859-1" will be used. # :encoding_detector_enabled :: # (Integer) Set to true (1) to attempt automatic detection of content encoding. # :javascript_disabled :: @@ -212,7 +214,7 @@ class Settings < FFI::Struct # :user_style_sheet_enabled :: # (Integer) Set to true (1) to enable the user style sheet for all pages. # :user_style_sheet_location :: - # (unknown) Location of the user style sheet. This must be a data URL of the form + # (error_unknown) Location of the user style sheet. This must be a data URL of the form # "data:text/css;charset=utf-8;base64,csscontent" where "csscontent" is the # base64 encoded contents of the CSS file. # :author_and_user_styles_disabled :: @@ -245,7 +247,7 @@ class Settings < FFI::Struct # :fullscreen_enabled :: # (Integer) Set to true (1) to enable fullscreen mode. class BrowserSettings < FFI::Struct - layout :size, :ulong, + layout :size, :int, :standard_font_family, :char, :fixed_font_family, :char, :serif_font_family, :char, @@ -295,27 +297,27 @@ class BrowserSettings < FFI::Struct :developer_tools_disabled, :int, :fullscreen_enabled, :int end - + # URL component parts. - # + # = Fields: # :spec :: - # (unknown) The complete URL specification. + # (error_unknown) The complete URL specification. # :scheme :: - # (unknown) Scheme component not including the colon (e.g., "http"). + # (error_unknown) Scheme component not including the colon (e.g., "http"). # :username :: - # (unknown) User name component. + # (error_unknown) User name component. # :password :: - # (unknown) Password component. + # (error_unknown) Password component. # :host :: - # (unknown) Host component. This may be a hostname, an IPv4 address or an IPv6 literal + # (error_unknown) Host component. This may be a hostname, an IPv4 address or an IPv6 literal # surrounded by square brackets (e.g., "(2001:db8::1)"). # :port :: - # (unknown) Port number component. + # (error_unknown) Port number component. # :path :: - # (unknown) Path component including the first slash following the host. + # (error_unknown) Path component including the first slash following the host. # :query :: - # (unknown) Query string component (i.e., everything following the '?'). + # (error_unknown) Query string component (i.e., everything following the '?'). class Urlparts < FFI::Struct layout :spec, :char, :scheme, :char, @@ -326,35 +328,35 @@ class Urlparts < FFI::Struct :path, :char, :query, :char end - + # Cookie information. - # + # = Fields: # :name :: - # (unknown) The cookie name. + # (error_unknown) The cookie name. # :value :: - # (unknown) The cookie value. + # (error_unknown) The cookie value. # :domain :: - # (unknown) If |domain| is empty a host cookie will be created instead of a domain + # (error_unknown) If |domain| is empty a host cookie will be created instead of a domain # cookie. Domain cookies are stored with a leading "." and are visible to # sub-domains whereas host cookies are not. # :path :: - # (unknown) If |path| is non-empty only URLs at or below the path will get the cookie + # (error_unknown) If |path| is non-empty only URLs at or below the path will get the cookie # value. # :secure :: # (Integer) If |secure| is true the cookie will only be sent for HTTPS requests. # :httponly :: # (Integer) If |httponly| is true the cookie will only be sent for HTTP requests. # :creation :: - # (unknown) The cookie creation date. This is automatically populated by the system on + # (Integer) The cookie creation date. This is automatically populated by the system on # cookie creation. # :last_access :: - # (unknown) The cookie last access date. This is automatically populated by the system + # (Integer) The cookie last access date. This is automatically populated by the system # on access. # :has_expires :: # (Integer) The cookie expiration date is only valid if |has_expires| is true. # :expires :: - # (unknown) + # (Integer) class Cookie < FFI::Struct layout :name, :char, :value, :char, @@ -362,22 +364,22 @@ class Cookie < FFI::Struct :path, :char, :secure, :int, :httponly, :int, - :creation, :char, - :last_access, :char, + :creation, :int, + :last_access, :int, :has_expires, :int, - :expires, :char + :expires, :int end - + # Storage types. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:storage_type). - # + # === Options: # :st_localstorage :: - # + # :st_sessionstorage :: - # - # + + # @method _enum_storage_type_ # @return [Symbol] # @scope class @@ -385,112 +387,112 @@ class Cookie < FFI::Struct :st_localstorage, 0, :st_sessionstorage, 1 ] - + # Supported error code values. See net\base\net_error_list.h for complete # descriptions of the error codes. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:errorcode). - # + # === Options: # :err_none :: - # + # :err_failed :: - # + # :err_aborted :: - # + # :err_invalid_argument :: - # + # :err_invalid_handle :: - # + # :err_file_not_found :: - # + # :err_timed_out :: - # + # :err_file_too_big :: - # + # :err_unexpected :: - # + # :err_access_denied :: - # + # :err_not_implemented :: - # + # :err_connection_closed :: - # + # :err_connection_reset :: - # + # :err_connection_refused :: - # + # :err_connection_aborted :: - # + # :err_connection_failed :: - # + # :err_name_not_resolved :: - # + # :err_internet_disconnected :: - # + # :err_ssl_protocol_error :: - # + # :err_address_invalid :: - # + # :err_address_unreachable :: - # + # :err_ssl_client_auth_cert_needed :: - # + # :err_tunnel_connection_failed :: - # + # :err_no_ssl_versions_enabled :: - # + # :err_ssl_version_or_cipher_mismatch :: - # + # :err_ssl_renegotiation_requested :: - # + # :err_cert_common_name_invalid :: - # + # :err_cert_date_invalid :: - # + # :err_cert_authority_invalid :: - # + # :err_cert_contains_errors :: - # + # :err_cert_no_revocation_mechanism :: - # + # :err_cert_unable_to_check_revocation :: - # + # :err_cert_revoked :: - # + # :err_cert_invalid :: - # + # :err_cert_end :: - # + # :err_invalid_url :: - # + # :err_disallowed_url_scheme :: - # + # :err_unknown_url_scheme :: - # + # :err_too_many_redirects :: - # + # :err_unsafe_redirect :: - # + # :err_unsafe_port :: - # + # :err_invalid_response :: - # + # :err_invalid_chunked_encoding :: - # + # :err_method_not_supported :: - # + # :err_unexpected_proxy_auth :: - # + # :err_empty_response :: - # + # :err_response_headers_too_big :: - # + # :err_cache_miss :: - # + # :err_insecure_response :: - # - # + + # @method _enum_errorcode_ # @return [Symbol] # @scope class @@ -545,21 +547,21 @@ class Cookie < FFI::Struct :err_cache_miss, -400, :err_insecure_response, -501 ] - + # V8 access control values. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:v8_accesscontrol). - # + # === Options: # :access_control_default :: - # + # :access_control_all_can_read :: - # + # :access_control_all_can_write :: - # + # :access_control_prohibits_overwriting :: - # - # + + # @method _enum_v8_accesscontrol_ # @return [Symbol] # @scope class @@ -569,21 +571,21 @@ class Cookie < FFI::Struct :access_control_all_can_write, 2, :access_control_prohibits_overwriting, 4 ] - + # V8 property attribute values. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:v8_propertyattribute). - # + # === Options: # :property_attribute_none :: - # + # :property_attribute_readonly :: # Configurable # :property_attribute_dontenum :: # Not writeable # :property_attribute_dontdelete :: # Not enumerable - # + # @method _enum_v8_propertyattribute_ # @return [Symbol] # @scope class @@ -593,19 +595,19 @@ class Cookie < FFI::Struct :property_attribute_dontenum, 2, :property_attribute_dontdelete, 4 ] - + # Post data elements may represent either bytes or files. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:postdataelement_type). - # + # === Options: # :pde_type_empty :: - # + # :pde_type_bytes :: - # + # :pde_type_file :: - # - # + + # @method _enum_postdataelement_type_ # @return [Symbol] # @scope class @@ -614,11 +616,11 @@ class Cookie < FFI::Struct :pde_type_bytes, 1, :pde_type_file, 2 ] - + # Flags used to customize the behavior of CefURLRequest. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:urlrequest_flags). - # + # === Options: # :ur_flag_none :: # Default behavior. @@ -641,7 +643,7 @@ class Cookie < FFI::Struct # If set 5XX redirect errors will be propagated to the observer instead of # automatically re-tried. This currently only applies for requests # originated in the browser process. - # + # @method _enum_urlrequest_flags_ # @return [Symbol] # @scope class @@ -656,11 +658,11 @@ class Cookie < FFI::Struct :ur_flag_no_download_data, 64, :ur_flag_no_retry_on_5xx, 128 ] - + # Flags that represent CefURLRequest status. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:urlrequest_status). - # + # === Options: # :ur_unknown :: # Unknown status. @@ -677,7 +679,7 @@ class Cookie < FFI::Struct # Request was canceled programatically. # :ur_failed :: # Request failed for some reason. - # + # @method _enum_urlrequest_status_ # @return [Symbol] # @scope class @@ -689,35 +691,35 @@ class Cookie < FFI::Struct :ur_canceled, 4, :ur_failed, 5 ] - + # Structure representing a rectangle. - # + # = Fields: # :x :: - # (Integer) + # (Integer) # :y :: - # (Integer) + # (Integer) # :width :: - # (Integer) + # (Integer) # :height :: - # (Integer) + # (Integer) class Rect < FFI::Struct layout :x, :int, :y, :int, :width, :int, :height, :int end - + # Existing process IDs. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:process_id). - # + # === Options: # :pid_browser :: # Browser process. # :pid_renderer :: # Renderer process. - # + # @method _enum_process_id_ # @return [Symbol] # @scope class @@ -725,11 +727,11 @@ class Rect < FFI::Struct :pid_browser, 0, :pid_renderer, 1 ] - + # Existing thread IDs. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:thread_id). - # + # === Options: # :tid_ui :: # The main thread in the browser. This will be the same as the main @@ -750,7 +752,7 @@ class Rect < FFI::Struct # Used to process IPC and network messages. # :tid_renderer :: # The main thread in the renderer. Used for all WebKit and V8 interaction. - # + # @method _enum_thread_id_ # @return [Symbol] # @scope class @@ -764,31 +766,31 @@ class Rect < FFI::Struct :tid_io, 6, :tid_renderer, 7 ] - + # Supported value types. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:value_type). - # + # === Options: # :vtype_invalid :: - # + # :vtype_null :: - # + # :vtype_bool :: - # + # :vtype_int :: - # + # :vtype_double :: - # + # :vtype_string :: - # + # :vtype_binary :: - # + # :vtype_dictionary :: - # + # :vtype_list :: - # - # + + # @method _enum_value_type_ # @return [Symbol] # @scope class @@ -803,19 +805,19 @@ class Rect < FFI::Struct :vtype_dictionary, 7, :vtype_list, 8 ] - + # Supported JavaScript dialog types. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:jsdialog_type). - # + # === Options: # :jsdialogtype_alert :: - # + # :jsdialogtype_confirm :: - # + # :jsdialogtype_prompt :: - # - # + + # @method _enum_jsdialog_type_ # @return [Symbol] # @scope class @@ -824,48 +826,48 @@ class Rect < FFI::Struct :jsdialogtype_confirm, 1, :jsdialogtype_prompt, 2 ] - + # Supported menu IDs. Non-English translations can be provided for the # IDS_MENU_* strings in CefResourceBundleHandler::GetLocalizedString(). - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:menu_id). - # + # === Options: # :back :: # Navigation. # :forward :: - # + # :reload :: - # + # :reload_nocache :: - # + # :stopload :: - # + # :undo :: # Editing. # :redo_ :: - # + # :cut :: - # + # :copy :: - # + # :paste :: - # + # :delete :: - # + # :select_all :: - # + # :find :: # Miscellaneous. # :print :: - # + # :view_source :: - # + # :user_first :: # defined in the tools/gritsettings/resource_ids file. # :user_last :: - # - # + + # @method _enum_menu_id_ # @return [Symbol] # @scope class @@ -888,33 +890,33 @@ class Rect < FFI::Struct :user_first, 26500, :user_last, 28500 ] - + # Supported event bit flags. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:event_flags). - # + # === Options: # :eventflag_none :: - # + # :eventflag_caps_lock_down :: - # + # :eventflag_shift_down :: - # + # :eventflag_control_down :: - # + # :eventflag_alt_down :: - # + # :eventflag_left_mouse_button :: - # + # :eventflag_middle_mouse_button :: - # + # :eventflag_right_mouse_button :: - # + # :eventflag_command_down :: # Mac OS-X command key. # :eventflag_extended :: # Windows extended key (see WM_KEYDOWN doc). - # + # @method _enum_event_flags_ # @return [Symbol] # @scope class @@ -930,25 +932,25 @@ class Rect < FFI::Struct :eventflag_command_down, 128, :eventflag_extended, 256 ] - + # Supported menu item types. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:menu_item_type). - # + # === Options: # :menuitemtype_none :: - # + # :menuitemtype_command :: - # + # :menuitemtype_check :: - # + # :menuitemtype_radio :: - # + # :menuitemtype_separator :: - # + # :menuitemtype_submenu :: - # - # + + # @method _enum_menu_item_type_ # @return [Symbol] # @scope class @@ -960,11 +962,11 @@ class Rect < FFI::Struct :menuitemtype_separator, 4, :menuitemtype_submenu, 5 ] - + # Supported context menu type flags. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:context_menu_type_flags). - # + # === Options: # :cm_typeflag_none :: # No node is selected. @@ -980,7 +982,7 @@ class Rect < FFI::Struct # There is a textual or mixed selection that is selected. # :cm_typeflag_editable :: # An editable element is selected. - # + # @method _enum_context_menu_type_flags_ # @return [Symbol] # @scope class @@ -993,11 +995,11 @@ class Rect < FFI::Struct :cm_typeflag_selection, 16, :cm_typeflag_editable, 32 ] - + # Supported context menu media types. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:context_menu_media_type). - # + # === Options: # :cm_mediatype_none :: # No special node is in context. @@ -1011,7 +1013,7 @@ class Rect < FFI::Struct # A file node is selected. # :cm_mediatype_plugin :: # A plugin node is selected. - # + # @method _enum_context_menu_media_type_ # @return [Symbol] # @scope class @@ -1023,35 +1025,35 @@ class Rect < FFI::Struct :cm_mediatype_file, 4, :cm_mediatype_plugin, 5 ] - + # Supported context menu media state bit flags. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:context_menu_media_state_flags). - # + # === Options: # :cm_mediaflag_none :: - # + # :cm_mediaflag_error :: - # + # :cm_mediaflag_paused :: - # + # :cm_mediaflag_muted :: - # + # :cm_mediaflag_loop :: - # + # :cm_mediaflag_can_save :: - # + # :cm_mediaflag_has_audio :: - # + # :cm_mediaflag_has_video :: - # + # :cm_mediaflag_control_root_element :: - # + # :cm_mediaflag_can_print :: - # + # :cm_mediaflag_can_rotate :: - # - # + + # @method _enum_context_menu_media_state_flags_ # @return [Symbol] # @scope class @@ -1068,31 +1070,31 @@ class Rect < FFI::Struct :cm_mediaflag_can_print, 256, :cm_mediaflag_can_rotate, 512 ] - + # Supported context menu edit state bit flags. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:context_menu_edit_state_flags). - # + # === Options: # :cm_editflag_none :: - # + # :cm_editflag_can_undo :: - # + # :cm_editflag_can_redo :: - # + # :cm_editflag_can_cut :: - # + # :cm_editflag_can_copy :: - # + # :cm_editflag_can_paste :: - # + # :cm_editflag_can_delete :: - # + # :cm_editflag_can_select_all :: - # + # :cm_editflag_can_translate :: - # - # + + # @method _enum_context_menu_edit_state_flags_ # @return [Symbol] # @scope class @@ -1107,21 +1109,21 @@ class Rect < FFI::Struct :cm_editflag_can_select_all, 64, :cm_editflag_can_translate, 128 ] - + # Key event types. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:key_event_type). - # + # === Options: # :keyevent_rawkeydown :: - # + # :keyevent_keydown :: - # + # :keyevent_keyup :: - # + # :keyevent_char :: - # - # + + # @method _enum_key_event_type_ # @return [Symbol] # @scope class @@ -1131,23 +1133,23 @@ class Rect < FFI::Struct :keyevent_keyup, 2, :keyevent_char, 3 ] - + # Key event modifiers. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:key_event_modifiers). - # + # === Options: # :shift :: - # + # :ctrl :: - # + # :alt :: - # + # :meta :: - # + # :keypad :: - # - # + + # @method _enum_key_event_modifiers_ # @return [Symbol] # @scope class @@ -1158,9 +1160,9 @@ class Rect < FFI::Struct :meta, 8, :keypad, 16 ] - + # Structure representing keyboard event information. - # + # = Fields: # :type :: # (Symbol from _enum_key_event_type_) The type of keyboard event. @@ -1196,17 +1198,17 @@ class KeyEvent < FFI::Struct :unmodified_character, :ushort, :focus_on_editable_field, :int end - + # Focus sources. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:focus_source). - # + # === Options: # :navigation :: # The source is explicit navigation via the API (LoadURL(), etc). # :system :: # The source is a system-generated focus event. - # + # @method _enum_focus_source_ # @return [Symbol] # @scope class @@ -1214,26 +1216,26 @@ class KeyEvent < FFI::Struct :navigation, 0, :system, 1 ] - + # Supported XML encoding types. The parser supports ASCII, ISO-8859-1, and # UTF16 (LE and BE) by default. All other types must be translated to UTF8 # before being passed to the parser. If a BOM is detected and the correct # decoder is available then that decoder will be used automatically. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:xml_encoding_type). - # + # === Options: # :none :: - # + # :utf8 :: - # + # :utf16le :: - # + # :utf16be :: - # + # :ascii :: - # - # + + # @method _enum_xml_encoding_type_ # @return [Symbol] # @scope class @@ -1244,35 +1246,35 @@ class KeyEvent < FFI::Struct :utf16be, 3, :ascii, 4 ] - + # XML node types. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:xml_node_type). - # + # === Options: # :unsupported :: - # + # :processing_instruction :: - # + # :document_type :: - # + # :element_start :: - # + # :element_end :: - # + # :attribute :: - # + # :text :: - # + # :cdata :: - # + # :entity_reference :: - # + # :whitespace :: - # + # :comment :: - # - # + + # @method _enum_xml_node_type_ # @return [Symbol] # @scope class @@ -1289,19 +1291,19 @@ class KeyEvent < FFI::Struct :whitespace, 9, :comment, 10 ] - + # Status message types. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:handler_statustype). - # + # === Options: # :text :: - # + # :mouseover_url :: - # + # :keyboard_focus_url :: - # - # + + # @method _enum_handler_statustype_ # @return [Symbol] # @scope class @@ -1310,44 +1312,44 @@ class KeyEvent < FFI::Struct :mouseover_url, 1, :keyboard_focus_url, 2 ] - + # Popup window features. - # + # = Fields: # :x :: - # (Integer) + # (Integer) # :x_set :: - # (Integer) + # (Integer) # :y :: - # (Integer) + # (Integer) # :y_set :: - # (Integer) + # (Integer) # :width :: - # (Integer) + # (Integer) # :width_set :: - # (Integer) + # (Integer) # :height :: - # (Integer) + # (Integer) # :height_set :: - # (Integer) + # (Integer) # :menu_bar_visible :: - # (Integer) + # (Integer) # :status_bar_visible :: - # (Integer) + # (Integer) # :tool_bar_visible :: - # (Integer) + # (Integer) # :location_bar_visible :: - # (Integer) + # (Integer) # :scrollbars_visible :: - # (Integer) + # (Integer) # :resizable :: - # (Integer) + # (Integer) # :fullscreen :: - # (Integer) + # (Integer) # :dialog :: - # (Integer) + # (Integer) # :additional_features :: - # (FFI::Pointer(StringList)) + # (FFI::Pointer(StringList)) class PopupFeatures < FFI::Struct layout :x, :int, :x_set, :int, @@ -1367,19 +1369,19 @@ class PopupFeatures < FFI::Struct :dialog, :int, :additional_features, :pointer end - + # Proxy types. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:proxy_type). - # + # === Options: # :direct :: - # + # :named :: - # + # :pac_string :: - # - # + + # @method _enum_proxy_type_ # @return [Symbol] # @scope class @@ -1388,33 +1390,33 @@ class PopupFeatures < FFI::Struct :named, 1, :pac_string, 2 ] - + # Proxy information. - # + # = Fields: # :proxy_type :: - # (Symbol from _enum_proxy_type_) + # (Symbol from _enum_proxy_type_) # :proxy_list :: - # (unknown) + # (error_unknown) class ProxyInfo < FFI::Struct layout :proxy_type, :proxy_type, :proxy_list, :char end - + # DOM document types. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:dom_document_type). - # + # === Options: # :unknown :: - # + # :html :: - # + # :xhtml :: - # + # :plugin :: - # - # + + # @method _enum_dom_document_type_ # @return [Symbol] # @scope class @@ -1424,53 +1426,53 @@ class ProxyInfo < FFI::Struct :xhtml, 2, :plugin, 3 ] - + # DOM event category flags. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:dom_event_category). - # + # === Options: # :unknown :: - # + # :ui :: - # + # :mouse :: - # + # :mutation :: - # + # :keyboard :: - # + # :text :: - # + # :composition :: - # + # :drag :: - # + # :clipboard :: - # + # :message :: - # + # :wheel :: - # + # :before_text_inserted :: - # + # :overflow :: - # + # :page_transition :: - # + # :popstate :: - # + # :progress :: - # + # :xmlhttprequest_progress :: - # + # :webkit_animation :: - # + # :webkit_transition :: - # + # :before_load :: - # - # + + # @method _enum_dom_event_category_ # @return [Symbol] # @scope class @@ -1496,21 +1498,21 @@ class ProxyInfo < FFI::Struct :webkit_transition, 131072, :before_load, 262144 ] - + # DOM event processing phases. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:dom_event_phase). - # + # === Options: # :unknown :: - # + # :capturing :: - # + # :at_target :: - # + # :bubbling :: - # - # + + # @method _enum_dom_event_phase_ # @return [Symbol] # @scope class @@ -1520,41 +1522,41 @@ class ProxyInfo < FFI::Struct :at_target, 2, :bubbling, 3 ] - + # DOM node types. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:dom_node_type). - # + # === Options: # :unsupported :: - # + # :element :: - # + # :attribute :: - # + # :text :: - # + # :cdata_section :: - # + # :entity_reference :: - # + # :entity :: - # + # :processing_instructions :: - # + # :comment :: - # + # :document :: - # + # :document_type :: - # + # :document_fragment :: - # + # :notation :: - # + # :xpath_namespace :: - # - # + + # @method _enum_dom_node_type_ # @return [Symbol] # @scope class @@ -1574,5 +1576,5 @@ class ProxyInfo < FFI::Struct :notation, 12, :xpath_namespace, 13 ] - + end diff --git a/test/output/include/internal/cef_types_linux.rb b/test/output/include/internal/cef_types_linux.rb index 1e5e295..d62c2c4 100644 --- a/test/output/include/internal/cef_types_linux.rb +++ b/test/output/include/internal/cef_types_linux.rb @@ -1,39 +1,41 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Structure representing CefExecuteProcess arguments. - # + # = Fields: # :argc :: - # (Integer) + # (Integer) # :argv :: - # (FFI::Pointer(**CharS)) + # (FFI::Pointer(**CharS)) class MainArgs < FFI::Struct layout :argc, :int, :argv, :pointer end - + # Class representing window information. - # + # = Fields: # :parent_widget :: - # (FFI::Pointer(*Int)) + # (FFI::Pointer(*Int)) # :widget :: - # (FFI::Pointer(*Int)) + # (FFI::Pointer(*Int)) class WindowInfo < FFI::Struct layout :parent_widget, :pointer, :widget, :pointer end - + end diff --git a/test/output/include/internal/cef_types_mac.rb b/test/output/include/internal/cef_types_mac.rb index 46caee6..f69421e 100644 --- a/test/output/include/internal/cef_types_mac.rb +++ b/test/output/include/internal/cef_types_mac.rb @@ -1,15 +1,17 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + end diff --git a/test/output/include/internal/cef_types_win.rb b/test/output/include/internal/cef_types_win.rb index 46caee6..f69421e 100644 --- a/test/output/include/internal/cef_types_win.rb +++ b/test/output/include/internal/cef_types_win.rb @@ -1,15 +1,17 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + end diff --git a/test/output/include/internal/cef_types_wrappers.rb b/test/output/include/internal/cef_types_wrappers.rb index e532b37..24b18f3 100644 --- a/test/output/include/internal/cef_types_wrappers.rb +++ b/test/output/include/internal/cef_types_wrappers.rb @@ -1,112 +1,114 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Set this object's values. If |copy| is true the source structure's values # will be copied instead of referenced. - # + # = Fields: # :struct_type :: - # (unknown) + # (error_unknown) # :init :: - # (unknown) + # (error_unknown) class CefRectTraits < FFI::Struct layout :struct_type, :char, :init, :char end - + # Class representing a a keyboard event. - # + # = Fields: # :struct_type :: - # (unknown) + # (error_unknown) # :init :: - # (unknown) + # (error_unknown) class CefPopupFeaturesTraits < FFI::Struct layout :struct_type, :char, :init, :char end - + # Class representing popup window features. - # + # = Fields: # :struct_type :: - # (unknown) + # (error_unknown) # :init :: - # (unknown) + # (error_unknown) class CefSettingsTraits < FFI::Struct layout :struct_type, :char, :init, :char end - + # Class representing initialization settings. - # + # = Fields: # :struct_type :: - # (unknown) + # (error_unknown) # :init :: - # (unknown) + # (error_unknown) class CefBrowserSettingsTraits < FFI::Struct layout :struct_type, :char, :init, :char end - + # Class representing browser initialization settings. - # + # = Fields: # :struct_type :: - # (unknown) + # (error_unknown) # :init :: - # (unknown) + # (error_unknown) class CefURLPartsTraits < FFI::Struct layout :struct_type, :char, :init, :char end - + # Class representing a URL's component parts. - # + # = Fields: # :struct_type :: - # (unknown) + # (Integer) # :init :: - # (unknown) + # (error_unknown) class CefTimeTraits < FFI::Struct - layout :struct_type, :char, + layout :struct_type, :int, :init, :char end - + # means "not initialized". - # + # = Fields: # :struct_type :: - # (unknown) + # (error_unknown) # :init :: - # (unknown) + # (error_unknown) class CefCookieTraits < FFI::Struct layout :struct_type, :char, :init, :char end - + # Class representing a cookie. - # + # = Fields: # :struct_type :: - # (unknown) + # (error_unknown) # :init :: - # (unknown) + # (error_unknown) class CefProxyInfoTraits < FFI::Struct layout :struct_type, :char, :init, :char end - + end diff --git a/test/output/include/internal/cef_win.rb b/test/output/include/internal/cef_win.rb index 46caee6..f69421e 100644 --- a/test/output/include/internal/cef_win.rb +++ b/test/output/include/internal/cef_win.rb @@ -1,15 +1,17 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module CEF + extend FFI::Library - ffi_lib 'cef' - + + ffi_lib ENV["CEF_PATH"] || "cef" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + end diff --git a/test/output/libssh2.rb b/test/output/libssh2.rb index eb5093e..893f300 100644 --- a/test/output/libssh2.rb +++ b/test/output/libssh2.rb @@ -1,489 +1,491 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module LibSSH2 + extend FFI::Library - ffi_lib 'libssh2' - + + ffi_lib ENV["LIBSSH2_PATH"] || "libssh2" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + H = 1 - + COPYRIGHT = "2004-2010 The libssh2 project and its contributors." - + VERSION = "1.2.8" - + VERSION_MAJOR = 1 - + VERSION_MINOR = 2 - + VERSION_PATCH = 8 - + VERSION_NUM = 0x010208 - + TIMESTAMP = "Tue Apr 5 17:15:42 UTC 2011" - + INVALID_SOCKET = -1 - + DH_GEX_MINGROUP = 1024 - + DH_GEX_OPTGROUP = 1536 - + DH_GEX_MAXGROUP = 2048 - + TERM_WIDTH = 80 - + TERM_HEIGHT = 24 - + TERM_WIDTH_PX = 0 - + TERM_HEIGHT_PX = 0 - + SOCKET_POLL_UDELAY = 250000 - + SOCKET_POLL_MAXLOOPS = 120 - + PACKET_MAXCOMP = 32000 - + PACKET_MAXDECOMP = 40000 - + PACKET_MAXPAYLOAD = 40000 - + CALLBACK_IGNORE = 0 - + CALLBACK_DEBUG = 1 - + CALLBACK_DISCONNECT = 2 - + CALLBACK_MACERROR = 3 - + CALLBACK_X11 = 4 - + METHOD_KEX = 0 - + METHOD_HOSTKEY = 1 - + METHOD_CRYPT_CS = 2 - + METHOD_CRYPT_SC = 3 - + METHOD_MAC_CS = 4 - + METHOD_MAC_SC = 5 - + METHOD_COMP_CS = 6 - + METHOD_COMP_SC = 7 - + METHOD_LANG_CS = 8 - + METHOD_LANG_SC = 9 - + FLAG_SIGPIPE = 1 - + FLAG_COMPRESS = 2 - + POLLFD_SOCKET = 1 - + POLLFD_CHANNEL = 2 - + POLLFD_LISTENER = 3 - + POLLFD_POLLIN = 0x0001 - + POLLFD_POLLPRI = 0x0002 - + POLLFD_POLLEXT = 0x0002 - + POLLFD_POLLOUT = 0x0004 - + POLLFD_POLLERR = 0x0008 - + POLLFD_POLLHUP = 0x0010 - + POLLFD_SESSION_CLOSED = 0x0010 - + POLLFD_POLLNVAL = 0x0020 - + POLLFD_POLLEX = 0x0040 - + POLLFD_CHANNEL_CLOSED = 0x0080 - + POLLFD_LISTENER_CLOSED = 0x0080 - + SESSION_BLOCK_INBOUND = 0x0001 - + SESSION_BLOCK_OUTBOUND = 0x0002 - + HOSTKEY_HASH_MD5 = 1 - + HOSTKEY_HASH_SHA1 = 2 - + HOSTKEY_TYPE_UNKNOWN = 0 - + HOSTKEY_TYPE_RSA = 1 - + HOSTKEY_TYPE_DSS = 2 - + SSH_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT = 1 - + SSH_DISCONNECT_PROTOCOL_ERROR = 2 - + SSH_DISCONNECT_KEY_EXCHANGE_FAILED = 3 - + SSH_DISCONNECT_RESERVED = 4 - + SSH_DISCONNECT_MAC_ERROR = 5 - + SSH_DISCONNECT_COMPRESSION_ERROR = 6 - + SSH_DISCONNECT_SERVICE_NOT_AVAILABLE = 7 - + SSH_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED = 8 - + SSH_DISCONNECT_HOST_KEY_NOT_VERIFIABLE = 9 - + SSH_DISCONNECT_CONNECTION_LOST = 10 - + SSH_DISCONNECT_BY_APPLICATION = 11 - + SSH_DISCONNECT_TOO_MANY_CONNECTIONS = 12 - + SSH_DISCONNECT_AUTH_CANCELLED_BY_USER = 13 - + SSH_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE = 14 - + SSH_DISCONNECT_ILLEGAL_USER_NAME = 15 - + ERROR_NONE = 0 - + ERROR_SOCKET_NONE = -1 - + ERROR_BANNER_RECV = -2 - + ERROR_BANNER_SEND = -3 - + ERROR_INVALID_MAC = -4 - + ERROR_KEX_FAILURE = -5 - + ERROR_ALLOC = -6 - + ERROR_SOCKET_SEND = -7 - + ERROR_KEY_EXCHANGE_FAILURE = -8 - + ERROR_TIMEOUT = -9 - + ERROR_HOSTKEY_INIT = -10 - + ERROR_HOSTKEY_SIGN = -11 - + ERROR_DECRYPT = -12 - + ERROR_SOCKET_DISCONNECT = -13 - + ERROR_PROTO = -14 - + ERROR_PASSWORD_EXPIRED = -15 - + ERROR_FILE = -16 - + ERROR_METHOD_NONE = -17 - + ERROR_AUTHENTICATION_FAILED = -18 - + ERROR_PUBLICKEY_UNVERIFIED = -19 - + ERROR_CHANNEL_OUTOFORDER = -20 - + ERROR_CHANNEL_FAILURE = -21 - + ERROR_CHANNEL_REQUEST_DENIED = -22 - + ERROR_CHANNEL_UNKNOWN = -23 - + ERROR_CHANNEL_WINDOW_EXCEEDED = -24 - + ERROR_CHANNEL_PACKET_EXCEEDED = -25 - + ERROR_CHANNEL_CLOSED = -26 - + ERROR_CHANNEL_EOF_SENT = -27 - + ERROR_SCP_PROTOCOL = -28 - + ERROR_ZLIB = -29 - + ERROR_SOCKET_TIMEOUT = -30 - + ERROR_SFTP_PROTOCOL = -31 - + ERROR_REQUEST_DENIED = -32 - + ERROR_METHOD_NOT_SUPPORTED = -33 - + ERROR_INVAL = -34 - + ERROR_INVALID_POLL_TYPE = -35 - + ERROR_PUBLICKEY_PROTOCOL = -36 - + ERROR_EAGAIN = -37 - + ERROR_BUFFER_TOO_SMALL = -38 - + ERROR_BAD_USE = -39 - + ERROR_COMPRESS = -40 - + ERROR_OUT_OF_BOUNDARY = -41 - + ERROR_AGENT_PROTOCOL = -42 - + ERROR_SOCKET_RECV = -43 - + ERROR_ENCRYPT = -44 - + ERROR_BAD_SOCKET = -45 - + INIT_NO_CRYPTO = 0x0001 - + def session_init() session_init_ex(nil, nil, nil, nil) end - + def session_disconnect(session, description) session_disconnect_ex(session, SSH_DISCONNECT_BY_APPLICATION, description, "") end - + def userauth_password(session, username, password) userauth_password_ex(session, username, username.length, password, password.length, nil) end - + def userauth_publickey_fromfile(session, username, publickey, privatekey, passphrase) userauth_publickey_fromfile_ex(session, username, username.length, publickey, privatekey, passphrase) end - + def userauth_hostbased_fromfile(session, username, publickey, privatekey, passphrase, hostname) userauth_hostbased_fromfile_ex(session, username, username.length, publickey, privatekey, passphrase, hostname, hostname.length, username, username.length) end - + def userauth_keyboard_interactive(session, username, response_callback) userauth_keyboard_interactive_ex(session, username, username.length, response_callback) end - + CHANNEL_WINDOW_DEFAULT = 65536 - + CHANNEL_PACKET_DEFAULT = 32768 - + CHANNEL_MINADJUST = 1024 - + CHANNEL_EXTENDED_DATA_NORMAL = 0 - + CHANNEL_EXTENDED_DATA_IGNORE = 1 - + CHANNEL_EXTENDED_DATA_MERGE = 2 - + SSH_EXTENDED_DATA_STDERR = 1 - + def channel_open_session(session) channel_open_ex(session, "session", "session".length-1, CHANNEL_WINDOW_DEFAULT, CHANNEL_PACKET_DEFAULT, nil, 0) end - + def channel_direct_tcpip(session, host, port) channel_direct_tcpip_ex(session, host, port, "127.0.0.1", 22) end - + def channel_forward_listen(session, port) channel_forward_listen_ex(session, nil, port, nil, 16) end - + def channel_setenv(channel, varname, value) channel_setenv_ex(channel, varname, varname.length, value, value.length) end - + def channel_request_pty(channel, term) channel_request_pty_ex(channel, term, term.length, nil, 0, TERM_WIDTH, TERM_HEIGHT, TERM_WIDTH_PX, TERM_HEIGHT_PX) end - + def channel_request_pty_size(channel, width, height) channel_request_pty_size_ex(channel, width, height, 0, 0) end - + def channel_x11_req(channel, screen_number) channel_x11_req_ex(channel, 0, nil, nil, screen_number) end - + def channel_shell(channel) channel_process_startup(channel, "shell", "shell".length-1, nil, 0) end - + def channel_exec(channel, command) channel_process_startup(channel, "exec", "exec".length-1, command, command.length) end - + def channel_subsystem(channel, subsystem) channel_process_startup(channel, "subsystem", "subsystem".length-1, subsystem, subsystem.length) end - + def channel_read(channel, buf, buflen) channel_read_ex(channel, 0, buf, buflen) end - + def channel_read_stderr(channel, buf, buflen) channel_read_ex(channel, SSH_EXTENDED_DATA_STDERR, buf, buflen) end - + def channel_window_read(channel) channel_window_read_ex(channel, nil, nil) end - + def channel_write(channel, buf, buflen) channel_write_ex(channel, 0, buf, buflen) end - + def channel_write_stderr(channel, buf, buflen) channel_write_ex(channel, SSH_EXTENDED_DATA_STDERR, buf, buflen) end - + def channel_window_write(channel) channel_window_write_ex(channel, nil) end - + CHANNEL_FLUSH_EXTENDED_DATA = -1 - + CHANNEL_FLUSH_ALL = -2 - + def channel_flush(channel) channel_flush_ex(channel, 0) end - + def channel_flush_stderr(channel) channel_flush_ex(channel, SSH_EXTENDED_DATA_STDERR) end - + def scp_send(session, path, mode, size) scp_send_ex(session, path, mode, size, 0, 0) end - + HAVE_LIBSSH2_KNOWNHOST_API = 0x010101 - + HAVE_LIBSSH2_VERSION_API = 0x010100 - + KNOWNHOST_TYPE_MASK = 0xffff - + KNOWNHOST_TYPE_PLAIN = 1 - + KNOWNHOST_TYPE_SHA1 = 2 - + KNOWNHOST_TYPE_CUSTOM = 3 - + KNOWNHOST_KEYENC_MASK = (3<<16) - + KNOWNHOST_KEYENC_RAW = (1<<16) - + KNOWNHOST_KEYENC_BASE64 = (2<<16) - + KNOWNHOST_KEY_MASK = (3<<18) - + KNOWNHOST_KEY_SHIFT = 18 - + KNOWNHOST_KEY_RSA1 = (1<<18) - + KNOWNHOST_KEY_SSHRSA = (2<<18) - + KNOWNHOST_KEY_SSHDSS = (3<<18) - + KNOWNHOST_CHECK_MATCH = 0 - + KNOWNHOST_CHECK_MISMATCH = 1 - + KNOWNHOST_CHECK_NOTFOUND = 2 - + KNOWNHOST_CHECK_FAILURE = 3 - + KNOWNHOST_FILE_OPENSSH = 1 - + HAVE_LIBSSH2_AGENT_API = 0x010202 - + TRACE_TRANS = (1<<1) - + TRACE_KEX = (1<<2) - + TRACE_AUTH = (1<<3) - + TRACE_CONN = (1<<4) - + TRACE_SCP = (1<<5) - + TRACE_SFTP = (1<<6) - + TRACE_ERROR = (1<<7) - + TRACE_PUBLICKEY = (1<<8) - + TRACE_SOCKET = (1<<9) - + # Malloc callbacks - # + # = Fields: # :text :: - # (String) + # (String) # :length :: - # (Integer) + # (Integer) # :echo :: - # (Integer) + # (Integer) class LIBSSH2USERAUTHKBDINTPROMPT < FFI::Struct layout :text, :string, :length, :uint, :echo, :uchar end - + # (Not documented) - # + # = Fields: # :text :: - # (String) + # (String) # :length :: - # (Integer) + # (Integer) class LIBSSH2USERAUTHKBDINTRESPONSE < FFI::Struct layout :text, :string, :length, :uint end - + # flags class LIBSSH2SESSION < FFI::Struct layout :dummy, :char end - + # (Not documented) class LIBSSH2CHANNEL < FFI::Struct layout :dummy, :char end - + # (Not documented) class LIBSSH2LISTENER < FFI::Struct layout :dummy, :char end - + # (Not documented) class LIBSSH2KNOWNHOSTS < FFI::Struct layout :dummy, :char end - + # (Not documented) class LIBSSH2AGENT < FFI::Struct layout :dummy, :char end - + # (Not documented) - # + # = Fields: # :socket :: # (Integer) File descriptors -- examined with system select() call @@ -492,687 +494,624 @@ class LIBSSH2AGENT < FFI::Struct # :listener :: # (LIBSSH2LISTENER) Read polls only -- are inbound # connections waiting to be accepted? - class LIBSSH2POLLFDFd < FFI::Union + class LIBSSH2POLLFD697836898 < FFI::Union layout :socket, :int, :channel, LIBSSH2CHANNEL, :listener, LIBSSH2LISTENER end - + # (Not documented) - # + # = Fields: # :type :: # (Integer) LIBSSH2_POLLFD_* below # :fd :: - # (LIBSSH2POLLFDFd) + # (LIBSSH2POLLFD697836898) # :events :: # (Integer) Requested Events # :revents :: # (Integer) Returned Events class LIBSSH2POLLFD < FFI::Struct layout :type, :uchar, - :fd, LIBSSH2POLLFDFd.by_value, + :fd, LIBSSH2POLLFD697836898.by_value, :events, :ulong, :revents, :ulong end - + # libssh2_init() - # + # Initialize the libssh2 functions. This typically initialize the # crypto library. It uses a global state, and is not thread safe -- # you must make sure this function is not called concurrently. - # + # Flags can be: # 0: Normal initialize # LIBSSH2_INIT_NO_CRYPTO: Do not initialize the crypto library (ie. # OPENSSL_add_cipher_algoritms() for OpenSSL - # + # Returns 0 if succeeded, or a negative value for error. - # + # @method init(flags) - # @param [Integer] flags - # @return [Integer] + # @param [Integer] flags + # @return [Integer] # @scope class attach_function :init, :libssh2_init, [:int], :int - # libssh2_exit() - # + # Exit the libssh2 functions and free's all memory used internal. - # + # @method exit() - # @return [nil] + # @return [nil] # @scope class attach_function :exit, :libssh2_exit, [], :void - # libssh2_free() - # + # Deallocate memory allocated by earlier call to libssh2 functions. - # + # @method free(session, ptr) - # @param [LIBSSH2SESSION] session - # @param [FFI::Pointer(*Void)] ptr - # @return [nil] + # @param [LIBSSH2SESSION] session + # @param [FFI::Pointer(*Void)] ptr + # @return [nil] # @scope class attach_function :free, :libssh2_free, [LIBSSH2SESSION, :pointer], :void - # Session API - # + # @method session_init_ex(my_alloc, my_free, my_realloc, abstract) - # @param [FFI::Pointer(*)] my_alloc - # @param [FFI::Pointer(*)] my_free - # @param [FFI::Pointer(*)] my_realloc - # @param [FFI::Pointer(*Void)] abstract - # @return [LIBSSH2SESSION] + # @param [FFI::Pointer(*FunctionProto)] my_alloc + # @param [FFI::Pointer(*FunctionProto)] my_free + # @param [FFI::Pointer(*FunctionProto)] my_realloc + # @param [FFI::Pointer(*Void)] abstract + # @return [LIBSSH2SESSION] # @scope class attach_function :session_init_ex, :libssh2_session_init_ex, [:pointer, :pointer, :pointer, :pointer], LIBSSH2SESSION - # (Not documented) - # + # @method session_abstract(session) - # @param [LIBSSH2SESSION] session - # @return [FFI::Pointer(**Void)] + # @param [LIBSSH2SESSION] session + # @return [FFI::Pointer(**Void)] # @scope class attach_function :session_abstract, :libssh2_session_abstract, [LIBSSH2SESSION], :pointer - # (Not documented) - # + # @method session_callback_set(session, cbtype, callback) - # @param [LIBSSH2SESSION] session - # @param [Integer] cbtype - # @param [FFI::Pointer(*Void)] callback - # @return [FFI::Pointer(*Void)] + # @param [LIBSSH2SESSION] session + # @param [Integer] cbtype + # @param [FFI::Pointer(*Void)] callback + # @return [FFI::Pointer(*Void)] # @scope class attach_function :session_callback_set, :libssh2_session_callback_set, [LIBSSH2SESSION, :int, :pointer], :pointer - # (Not documented) - # + # @method banner_set(session, banner) - # @param [LIBSSH2SESSION] session - # @param [String] banner - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @param [String] banner + # @return [Integer] # @scope class attach_function :banner_set, :libssh2_banner_set, [LIBSSH2SESSION, :string], :int - # (Not documented) - # + # @method session_startup(session, sock) - # @param [LIBSSH2SESSION] session - # @param [Integer] sock - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @param [Integer] sock + # @return [Integer] # @scope class attach_function :session_startup, :libssh2_session_startup, [LIBSSH2SESSION, :int], :int - # (Not documented) - # + # @method session_handshake(session, sock) - # @param [LIBSSH2SESSION] session - # @param [Integer] sock - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @param [Integer] sock + # @return [Integer] # @scope class attach_function :session_handshake, :libssh2_session_handshake, [LIBSSH2SESSION, :int], :int - # (Not documented) - # + # @method session_disconnect_ex(session, reason, description, lang) - # @param [LIBSSH2SESSION] session - # @param [Integer] reason - # @param [String] description - # @param [String] lang - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @param [Integer] reason + # @param [String] description + # @param [String] lang + # @return [Integer] # @scope class attach_function :session_disconnect_ex, :libssh2_session_disconnect_ex, [LIBSSH2SESSION, :int, :string, :string], :int - # (Not documented) - # + # @method session_free(session) - # @param [LIBSSH2SESSION] session - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @return [Integer] # @scope class attach_function :session_free, :libssh2_session_free, [LIBSSH2SESSION], :int - # (Not documented) - # + # @method hostkey_hash(session, hash_type) - # @param [LIBSSH2SESSION] session - # @param [Integer] hash_type - # @return [String] + # @param [LIBSSH2SESSION] session + # @param [Integer] hash_type + # @return [String] # @scope class attach_function :hostkey_hash, :libssh2_hostkey_hash, [LIBSSH2SESSION, :int], :string - # (Not documented) - # + # @method session_hostkey(session, len, type) - # @param [LIBSSH2SESSION] session - # @param [FFI::Pointer(*SizeT)] len - # @param [FFI::Pointer(*Int)] type - # @return [String] + # @param [LIBSSH2SESSION] session + # @param [FFI::Pointer(*Int)] len + # @param [FFI::Pointer(*Int)] type + # @return [String] # @scope class attach_function :session_hostkey, :libssh2_session_hostkey, [LIBSSH2SESSION, :pointer, :pointer], :string - # (Not documented) - # + # @method session_method_pref(session, method_type, prefs) - # @param [LIBSSH2SESSION] session - # @param [Integer] method_type - # @param [String] prefs - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @param [Integer] method_type + # @param [String] prefs + # @return [Integer] # @scope class attach_function :session_method_pref, :libssh2_session_method_pref, [LIBSSH2SESSION, :int, :string], :int - # (Not documented) - # + # @method session_methods(session, method_type) - # @param [LIBSSH2SESSION] session - # @param [Integer] method_type - # @return [String] + # @param [LIBSSH2SESSION] session + # @param [Integer] method_type + # @return [String] # @scope class attach_function :session_methods, :libssh2_session_methods, [LIBSSH2SESSION, :int], :string - # (Not documented) - # + # @method session_last_error(session, errmsg, errmsg_len, want_buf) - # @param [LIBSSH2SESSION] session - # @param [FFI::Pointer(**CharS)] errmsg - # @param [FFI::Pointer(*Int)] errmsg_len - # @param [Integer] want_buf - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @param [FFI::Pointer(**CharS)] errmsg + # @param [FFI::Pointer(*Int)] errmsg_len + # @param [Integer] want_buf + # @return [Integer] # @scope class attach_function :session_last_error, :libssh2_session_last_error, [LIBSSH2SESSION, :pointer, :pointer, :int], :int - # (Not documented) - # + # @method session_last_errno(session) - # @param [LIBSSH2SESSION] session - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @return [Integer] # @scope class attach_function :session_last_errno, :libssh2_session_last_errno, [LIBSSH2SESSION], :int - # (Not documented) - # + # @method session_block_directions(session) - # @param [LIBSSH2SESSION] session - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @return [Integer] # @scope class attach_function :session_block_directions, :libssh2_session_block_directions, [LIBSSH2SESSION], :int - # (Not documented) - # + # @method session_flag(session, flag, value) - # @param [LIBSSH2SESSION] session - # @param [Integer] flag - # @param [Integer] value - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @param [Integer] flag + # @param [Integer] value + # @return [Integer] # @scope class attach_function :session_flag, :libssh2_session_flag, [LIBSSH2SESSION, :int, :int], :int - # Userauth API - # + # @method userauth_list(session, username, username_len) - # @param [LIBSSH2SESSION] session - # @param [String] username - # @param [Integer] username_len - # @return [String] + # @param [LIBSSH2SESSION] session + # @param [String] username + # @param [Integer] username_len + # @return [String] # @scope class attach_function :userauth_list, :libssh2_userauth_list, [LIBSSH2SESSION, :string, :uint], :string - # (Not documented) - # + # @method userauth_authenticated(session) - # @param [LIBSSH2SESSION] session - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @return [Integer] # @scope class attach_function :userauth_authenticated, :libssh2_userauth_authenticated, [LIBSSH2SESSION], :int - # (Not documented) - # + # @method userauth_password_ex(session, username, username_len, password, password_len, passwd_change_cb) - # @param [LIBSSH2SESSION] session - # @param [String] username - # @param [Integer] username_len - # @param [String] password - # @param [Integer] password_len - # @param [FFI::Pointer(*)] passwd_change_cb - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @param [String] username + # @param [Integer] username_len + # @param [String] password + # @param [Integer] password_len + # @param [FFI::Pointer(*FunctionProto)] passwd_change_cb + # @return [Integer] # @scope class attach_function :userauth_password_ex, :libssh2_userauth_password_ex, [LIBSSH2SESSION, :string, :uint, :string, :uint, :pointer], :int - # (Not documented) - # + # @method userauth_publickey_fromfile_ex(session, username, username_len, publickey, privatekey, passphrase) - # @param [LIBSSH2SESSION] session - # @param [String] username - # @param [Integer] username_len - # @param [String] publickey - # @param [String] privatekey - # @param [String] passphrase - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @param [String] username + # @param [Integer] username_len + # @param [String] publickey + # @param [String] privatekey + # @param [String] passphrase + # @return [Integer] # @scope class attach_function :userauth_publickey_fromfile_ex, :libssh2_userauth_publickey_fromfile_ex, [LIBSSH2SESSION, :string, :uint, :string, :string, :string], :int - # (Not documented) - # + # @method userauth_publickey(session, username, pubkeydata, pubkeydata_len, sign_callback, abstract) - # @param [LIBSSH2SESSION] session - # @param [String] username - # @param [FFI::Pointer(*UChar)] pubkeydata - # @param [Integer] pubkeydata_len - # @param [FFI::Pointer(*)] sign_callback - # @param [FFI::Pointer(**Void)] abstract - # @return [Integer] - # @scope class - attach_function :userauth_publickey, :libssh2_userauth_publickey, [LIBSSH2SESSION, :string, :pointer, :ulong, :pointer, :pointer], :int - + # @param [LIBSSH2SESSION] session + # @param [String] username + # @param [FFI::Pointer(*UChar)] pubkeydata + # @param [Integer] pubkeydata_len + # @param [FFI::Pointer(*FunctionProto)] sign_callback + # @param [FFI::Pointer(**Void)] abstract + # @return [Integer] + # @scope class + attach_function :userauth_publickey, :libssh2_userauth_publickey, [LIBSSH2SESSION, :string, :pointer, :int, :pointer, :pointer], :int # (Not documented) - # + # @method userauth_hostbased_fromfile_ex(session, username, username_len, publickey, privatekey, passphrase, hostname, hostname_len, local_username, local_username_len) - # @param [LIBSSH2SESSION] session - # @param [String] username - # @param [Integer] username_len - # @param [String] publickey - # @param [String] privatekey - # @param [String] passphrase - # @param [String] hostname - # @param [Integer] hostname_len - # @param [String] local_username - # @param [Integer] local_username_len - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @param [String] username + # @param [Integer] username_len + # @param [String] publickey + # @param [String] privatekey + # @param [String] passphrase + # @param [String] hostname + # @param [Integer] hostname_len + # @param [String] local_username + # @param [Integer] local_username_len + # @return [Integer] # @scope class attach_function :userauth_hostbased_fromfile_ex, :libssh2_userauth_hostbased_fromfile_ex, [LIBSSH2SESSION, :string, :uint, :string, :string, :string, :string, :uint, :string, :uint], :int - # response_callback is provided with filled by library prompts array, # but client must allocate and fill individual responses. Responses # array is already allocated. Responses data will be freed by libssh2 # after callback return, but before subsequent callback invokation. - # + # @method userauth_keyboard_interactive_ex(session, username, username_len, response_callback) - # @param [LIBSSH2SESSION] session - # @param [String] username - # @param [Integer] username_len - # @param [FFI::Pointer(*)] response_callback - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @param [String] username + # @param [Integer] username_len + # @param [FFI::Pointer(*FunctionProto)] response_callback + # @return [Integer] # @scope class attach_function :userauth_keyboard_interactive_ex, :libssh2_userauth_keyboard_interactive_ex, [LIBSSH2SESSION, :string, :uint, :pointer], :int - # (Not documented) - # + # @method poll(fds, nfds, timeout) - # @param [LIBSSH2POLLFD] fds - # @param [Integer] nfds - # @param [Integer] timeout - # @return [Integer] + # @param [LIBSSH2POLLFD] fds + # @param [Integer] nfds + # @param [Integer] timeout + # @return [Integer] # @scope class attach_function :poll, :libssh2_poll, [LIBSSH2POLLFD, :uint, :long], :int - # Returned by any function that would block during a read/write opperation - # + # @method channel_open_ex(session, channel_type, channel_type_len, window_size, packet_size, message, message_len) - # @param [LIBSSH2SESSION] session - # @param [String] channel_type - # @param [Integer] channel_type_len - # @param [Integer] window_size - # @param [Integer] packet_size - # @param [String] message - # @param [Integer] message_len - # @return [LIBSSH2CHANNEL] + # @param [LIBSSH2SESSION] session + # @param [String] channel_type + # @param [Integer] channel_type_len + # @param [Integer] window_size + # @param [Integer] packet_size + # @param [String] message + # @param [Integer] message_len + # @return [LIBSSH2CHANNEL] # @scope class attach_function :channel_open_ex, :libssh2_channel_open_ex, [LIBSSH2SESSION, :string, :uint, :uint, :uint, :string, :uint], LIBSSH2CHANNEL - # (Not documented) - # + # @method channel_direct_tcpip_ex(session, host, port, shost, sport) - # @param [LIBSSH2SESSION] session - # @param [String] host - # @param [Integer] port - # @param [String] shost - # @param [Integer] sport - # @return [LIBSSH2CHANNEL] + # @param [LIBSSH2SESSION] session + # @param [String] host + # @param [Integer] port + # @param [String] shost + # @param [Integer] sport + # @return [LIBSSH2CHANNEL] # @scope class attach_function :channel_direct_tcpip_ex, :libssh2_channel_direct_tcpip_ex, [LIBSSH2SESSION, :string, :int, :string, :int], LIBSSH2CHANNEL - # (Not documented) - # + # @method channel_forward_listen_ex(session, host, port, bound_port, queue_maxsize) - # @param [LIBSSH2SESSION] session - # @param [String] host - # @param [Integer] port - # @param [FFI::Pointer(*Int)] bound_port - # @param [Integer] queue_maxsize - # @return [LIBSSH2LISTENER] + # @param [LIBSSH2SESSION] session + # @param [String] host + # @param [Integer] port + # @param [FFI::Pointer(*Int)] bound_port + # @param [Integer] queue_maxsize + # @return [LIBSSH2LISTENER] # @scope class attach_function :channel_forward_listen_ex, :libssh2_channel_forward_listen_ex, [LIBSSH2SESSION, :string, :int, :pointer, :int], LIBSSH2LISTENER - # (Not documented) - # + # @method channel_forward_cancel(listener) - # @param [LIBSSH2LISTENER] listener - # @return [Integer] + # @param [LIBSSH2LISTENER] listener + # @return [Integer] # @scope class attach_function :channel_forward_cancel, :libssh2_channel_forward_cancel, [LIBSSH2LISTENER], :int - # (Not documented) - # + # @method channel_forward_accept(listener) - # @param [LIBSSH2LISTENER] listener - # @return [LIBSSH2CHANNEL] + # @param [LIBSSH2LISTENER] listener + # @return [LIBSSH2CHANNEL] # @scope class attach_function :channel_forward_accept, :libssh2_channel_forward_accept, [LIBSSH2LISTENER], LIBSSH2CHANNEL - # (Not documented) - # + # @method channel_setenv_ex(channel, varname, varname_len, value, value_len) - # @param [LIBSSH2CHANNEL] channel - # @param [String] varname - # @param [Integer] varname_len - # @param [String] value - # @param [Integer] value_len - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @param [String] varname + # @param [Integer] varname_len + # @param [String] value + # @param [Integer] value_len + # @return [Integer] # @scope class attach_function :channel_setenv_ex, :libssh2_channel_setenv_ex, [LIBSSH2CHANNEL, :string, :uint, :string, :uint], :int - # (Not documented) - # + # @method channel_request_pty_ex(channel, term, term_len, modes, modes_len, width, height, width_px, height_px) - # @param [LIBSSH2CHANNEL] channel - # @param [String] term - # @param [Integer] term_len - # @param [String] modes - # @param [Integer] modes_len - # @param [Integer] width - # @param [Integer] height - # @param [Integer] width_px - # @param [Integer] height_px - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @param [String] term + # @param [Integer] term_len + # @param [String] modes + # @param [Integer] modes_len + # @param [Integer] width + # @param [Integer] height + # @param [Integer] width_px + # @param [Integer] height_px + # @return [Integer] # @scope class attach_function :channel_request_pty_ex, :libssh2_channel_request_pty_ex, [LIBSSH2CHANNEL, :string, :uint, :string, :uint, :int, :int, :int, :int], :int - # (Not documented) - # + # @method channel_request_pty_size_ex(channel, width, height, width_px, height_px) - # @param [LIBSSH2CHANNEL] channel - # @param [Integer] width - # @param [Integer] height - # @param [Integer] width_px - # @param [Integer] height_px - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @param [Integer] width + # @param [Integer] height + # @param [Integer] width_px + # @param [Integer] height_px + # @return [Integer] # @scope class attach_function :channel_request_pty_size_ex, :libssh2_channel_request_pty_size_ex, [LIBSSH2CHANNEL, :int, :int, :int, :int], :int - # (Not documented) - # + # @method channel_x11_req_ex(channel, single_connection, auth_proto, auth_cookie, screen_number) - # @param [LIBSSH2CHANNEL] channel - # @param [Integer] single_connection - # @param [String] auth_proto - # @param [String] auth_cookie - # @param [Integer] screen_number - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @param [Integer] single_connection + # @param [String] auth_proto + # @param [String] auth_cookie + # @param [Integer] screen_number + # @return [Integer] # @scope class attach_function :channel_x11_req_ex, :libssh2_channel_x11_req_ex, [LIBSSH2CHANNEL, :int, :string, :string, :int], :int - # (Not documented) - # + # @method channel_process_startup(channel, request, request_len, message, message_len) - # @param [LIBSSH2CHANNEL] channel - # @param [String] request - # @param [Integer] request_len - # @param [String] message - # @param [Integer] message_len - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @param [String] request + # @param [Integer] request_len + # @param [String] message + # @param [Integer] message_len + # @return [Integer] # @scope class attach_function :channel_process_startup, :libssh2_channel_process_startup, [LIBSSH2CHANNEL, :string, :uint, :string, :uint], :int - # (Not documented) - # + # @method channel_read_ex(channel, stream_id, buf, buflen) - # @param [LIBSSH2CHANNEL] channel - # @param [Integer] stream_id - # @param [String] buf - # @param [Integer] buflen - # @return [Integer] - # @scope class - attach_function :channel_read_ex, :libssh2_channel_read_ex, [LIBSSH2CHANNEL, :int, :string, :ulong], :long - + # @param [LIBSSH2CHANNEL] channel + # @param [Integer] stream_id + # @param [String] buf + # @param [Integer] buflen + # @return [Integer] + # @scope class + attach_function :channel_read_ex, :libssh2_channel_read_ex, [LIBSSH2CHANNEL, :int, :string, :int], :int # (Not documented) - # + # @method poll_channel_read(channel, extended) - # @param [LIBSSH2CHANNEL] channel - # @param [Integer] extended - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @param [Integer] extended + # @return [Integer] # @scope class attach_function :poll_channel_read, :libssh2_poll_channel_read, [LIBSSH2CHANNEL, :int], :int - # (Not documented) - # + # @method channel_window_read_ex(channel, read_avail, window_size_initial) - # @param [LIBSSH2CHANNEL] channel - # @param [FFI::Pointer(*ULong)] read_avail - # @param [FFI::Pointer(*ULong)] window_size_initial - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @param [FFI::Pointer(*ULong)] read_avail + # @param [FFI::Pointer(*ULong)] window_size_initial + # @return [Integer] # @scope class attach_function :channel_window_read_ex, :libssh2_channel_window_read_ex, [LIBSSH2CHANNEL, :pointer, :pointer], :ulong - # libssh2_channel_receive_window_adjust is DEPRECATED, do not use! - # + # @method channel_receive_window_adjust(channel, adjustment, force) - # @param [LIBSSH2CHANNEL] channel - # @param [Integer] adjustment - # @param [Integer] force - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @param [Integer] adjustment + # @param [Integer] force + # @return [Integer] # @scope class attach_function :channel_receive_window_adjust, :libssh2_channel_receive_window_adjust, [LIBSSH2CHANNEL, :ulong, :uchar], :ulong - # (Not documented) - # + # @method channel_receive_window_adjust2(channel, adjustment, force, storewindow) - # @param [LIBSSH2CHANNEL] channel - # @param [Integer] adjustment - # @param [Integer] force - # @param [FFI::Pointer(*UInt)] storewindow - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @param [Integer] adjustment + # @param [Integer] force + # @param [FFI::Pointer(*UInt)] storewindow + # @return [Integer] # @scope class attach_function :channel_receive_window_adjust2, :libssh2_channel_receive_window_adjust2, [LIBSSH2CHANNEL, :ulong, :uchar, :pointer], :int - # (Not documented) - # + # @method channel_write_ex(channel, stream_id, buf, buflen) - # @param [LIBSSH2CHANNEL] channel - # @param [Integer] stream_id - # @param [String] buf - # @param [Integer] buflen - # @return [Integer] - # @scope class - attach_function :channel_write_ex, :libssh2_channel_write_ex, [LIBSSH2CHANNEL, :int, :string, :ulong], :long - + # @param [LIBSSH2CHANNEL] channel + # @param [Integer] stream_id + # @param [String] buf + # @param [Integer] buflen + # @return [Integer] + # @scope class + attach_function :channel_write_ex, :libssh2_channel_write_ex, [LIBSSH2CHANNEL, :int, :string, :int], :int # (Not documented) - # + # @method channel_window_write_ex(channel, window_size_initial) - # @param [LIBSSH2CHANNEL] channel - # @param [FFI::Pointer(*ULong)] window_size_initial - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @param [FFI::Pointer(*ULong)] window_size_initial + # @return [Integer] # @scope class attach_function :channel_window_write_ex, :libssh2_channel_window_write_ex, [LIBSSH2CHANNEL, :pointer], :ulong - # (Not documented) - # + # @method session_set_blocking(session, blocking) - # @param [LIBSSH2SESSION] session - # @param [Integer] blocking - # @return [nil] + # @param [LIBSSH2SESSION] session + # @param [Integer] blocking + # @return [nil] # @scope class attach_function :session_set_blocking, :libssh2_session_set_blocking, [LIBSSH2SESSION, :int], :void - # (Not documented) - # + # @method session_get_blocking(session) - # @param [LIBSSH2SESSION] session - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @return [Integer] # @scope class attach_function :session_get_blocking, :libssh2_session_get_blocking, [LIBSSH2SESSION], :int - # (Not documented) - # + # @method channel_set_blocking(channel, blocking) - # @param [LIBSSH2CHANNEL] channel - # @param [Integer] blocking - # @return [nil] + # @param [LIBSSH2CHANNEL] channel + # @param [Integer] blocking + # @return [nil] # @scope class attach_function :channel_set_blocking, :libssh2_channel_set_blocking, [LIBSSH2CHANNEL, :int], :void - # libssh2_channel_handle_extended_data is DEPRECATED, do not use! - # + # @method channel_handle_extended_data(channel, ignore_mode) - # @param [LIBSSH2CHANNEL] channel - # @param [Integer] ignore_mode - # @return [nil] + # @param [LIBSSH2CHANNEL] channel + # @param [Integer] ignore_mode + # @return [nil] # @scope class attach_function :channel_handle_extended_data, :libssh2_channel_handle_extended_data, [LIBSSH2CHANNEL, :int], :void - # (Not documented) - # + # @method channel_handle_extended_data2(channel, ignore_mode) - # @param [LIBSSH2CHANNEL] channel - # @param [Integer] ignore_mode - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @param [Integer] ignore_mode + # @return [Integer] # @scope class attach_function :channel_handle_extended_data2, :libssh2_channel_handle_extended_data2, [LIBSSH2CHANNEL, :int], :int - # DEPRECATED - # + # @method channel_flush_ex(channel, streamid) - # @param [LIBSSH2CHANNEL] channel - # @param [Integer] streamid - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @param [Integer] streamid + # @return [Integer] # @scope class attach_function :channel_flush_ex, :libssh2_channel_flush_ex, [LIBSSH2CHANNEL, :int], :int - # (Not documented) - # + # @method channel_get_exit_status(channel) - # @param [LIBSSH2CHANNEL] channel - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @return [Integer] # @scope class attach_function :channel_get_exit_status, :libssh2_channel_get_exit_status, [LIBSSH2CHANNEL], :int - # (Not documented) - # + # @method channel_get_exit_signal(channel, exitsignal, exitsignal_len, errmsg, errmsg_len, langtag, langtag_len) - # @param [LIBSSH2CHANNEL] channel - # @param [FFI::Pointer(**CharS)] exitsignal - # @param [FFI::Pointer(*SizeT)] exitsignal_len - # @param [FFI::Pointer(**CharS)] errmsg - # @param [FFI::Pointer(*SizeT)] errmsg_len - # @param [FFI::Pointer(**CharS)] langtag - # @param [FFI::Pointer(*SizeT)] langtag_len - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @param [FFI::Pointer(**CharS)] exitsignal + # @param [FFI::Pointer(*Int)] exitsignal_len + # @param [FFI::Pointer(**CharS)] errmsg + # @param [FFI::Pointer(*Int)] errmsg_len + # @param [FFI::Pointer(**CharS)] langtag + # @param [FFI::Pointer(*Int)] langtag_len + # @return [Integer] # @scope class attach_function :channel_get_exit_signal, :libssh2_channel_get_exit_signal, [LIBSSH2CHANNEL, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :int - # (Not documented) - # + # @method channel_send_eof(channel) - # @param [LIBSSH2CHANNEL] channel - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @return [Integer] # @scope class attach_function :channel_send_eof, :libssh2_channel_send_eof, [LIBSSH2CHANNEL], :int - # (Not documented) - # + # @method channel_eof(channel) - # @param [LIBSSH2CHANNEL] channel - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @return [Integer] # @scope class attach_function :channel_eof, :libssh2_channel_eof, [LIBSSH2CHANNEL], :int - # (Not documented) - # + # @method channel_wait_eof(channel) - # @param [LIBSSH2CHANNEL] channel - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @return [Integer] # @scope class attach_function :channel_wait_eof, :libssh2_channel_wait_eof, [LIBSSH2CHANNEL], :int - # (Not documented) - # + # @method channel_close(channel) - # @param [LIBSSH2CHANNEL] channel - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @return [Integer] # @scope class attach_function :channel_close, :libssh2_channel_close, [LIBSSH2CHANNEL], :int - # (Not documented) - # + # @method channel_wait_closed(channel) - # @param [LIBSSH2CHANNEL] channel - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @return [Integer] # @scope class attach_function :channel_wait_closed, :libssh2_channel_wait_closed, [LIBSSH2CHANNEL], :int - # (Not documented) - # + # @method channel_free(channel) - # @param [LIBSSH2CHANNEL] channel - # @return [Integer] + # @param [LIBSSH2CHANNEL] channel + # @return [Integer] # @scope class attach_function :channel_free, :libssh2_channel_free, [LIBSSH2CHANNEL], :int - # (Not documented) - # + # @method scp_recv(session, path, sb) - # @param [LIBSSH2SESSION] session - # @param [String] path - # @param [FFI::Pointer(*Stat)] sb - # @return [LIBSSH2CHANNEL] + # @param [LIBSSH2SESSION] session + # @param [String] path + # @param [FFI::Pointer(*Stat)] sb + # @return [LIBSSH2CHANNEL] # @scope class attach_function :scp_recv, :libssh2_scp_recv, [LIBSSH2SESSION, :string, :pointer], LIBSSH2CHANNEL - # (Not documented) - # + # @method scp_send_ex(session, path, mode, size, mtime, atime) - # @param [LIBSSH2SESSION] session - # @param [String] path - # @param [Integer] mode - # @param [Integer] size - # @param [Integer] mtime - # @param [Integer] atime - # @return [LIBSSH2CHANNEL] - # @scope class - attach_function :scp_send_ex, :libssh2_scp_send_ex, [LIBSSH2SESSION, :string, :int, :ulong, :long, :long], LIBSSH2CHANNEL - + # @param [LIBSSH2SESSION] session + # @param [String] path + # @param [Integer] mode + # @param [Integer] size + # @param [Integer] mtime + # @param [Integer] atime + # @return [LIBSSH2CHANNEL] + # @scope class + attach_function :scp_send_ex, :libssh2_scp_send_ex, [LIBSSH2SESSION, :string, :int, :int, :long, :long], LIBSSH2CHANNEL # (Not documented) - # + # @method scp_send64(session, path, mode, size, mtime, atime) - # @param [LIBSSH2SESSION] session - # @param [String] path - # @param [Integer] mode - # @param [Integer] size - # @param [Integer] mtime - # @param [Integer] atime - # @return [LIBSSH2CHANNEL] - # @scope class - attach_function :scp_send64, :libssh2_scp_send64, [LIBSSH2SESSION, :string, :int, :long_long, :long, :long], LIBSSH2CHANNEL - + # @param [LIBSSH2SESSION] session + # @param [String] path + # @param [Integer] mode + # @param [Integer] size + # @param [Integer] mtime + # @param [Integer] atime + # @return [LIBSSH2CHANNEL] + # @scope class + attach_function :scp_send64, :libssh2_scp_send64, [LIBSSH2SESSION, :string, :int, :long_long, :int, :int], LIBSSH2CHANNEL # (Not documented) - # + # @method base64_decode(session, dest, dest_len, src, src_len) - # @param [LIBSSH2SESSION] session - # @param [FFI::Pointer(**CharS)] dest - # @param [FFI::Pointer(*UInt)] dest_len - # @param [String] src - # @param [Integer] src_len - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @param [FFI::Pointer(**CharS)] dest + # @param [FFI::Pointer(*UInt)] dest_len + # @param [String] src + # @param [Integer] src_len + # @return [Integer] # @scope class attach_function :base64_decode, :libssh2_base64_decode, [LIBSSH2SESSION, :pointer, :pointer, :string, :uint], :int - # (Not documented) - # + # @method version(req_version_num) - # @param [Integer] req_version_num - # @return [String] + # @param [Integer] req_version_num + # @return [String] # @scope class attach_function :version, :libssh2_version, [:int], :string - # libssh2_version since 1.1 - # + # = Fields: # :magic :: # (Integer) magic stored by the library @@ -1183,7 +1122,7 @@ class LIBSSH2POLLFD < FFI::Struct # :key :: # (String) key in base64/printable format # :typemask :: - # (Integer) + # (Integer) class Knownhost < FFI::Struct layout :magic, :uint, :node, :pointer, @@ -1191,223 +1130,211 @@ class Knownhost < FFI::Struct :key, :string, :typemask, :int end - + # libssh2_knownhost_init - # + # Init a collection of known hosts. Returns the pointer to a collection. - # + # @method knownhost_init(session) - # @param [LIBSSH2SESSION] session - # @return [LIBSSH2KNOWNHOSTS] + # @param [LIBSSH2SESSION] session + # @return [LIBSSH2KNOWNHOSTS] # @scope class attach_function :knownhost_init, :libssh2_knownhost_init, [LIBSSH2SESSION], LIBSSH2KNOWNHOSTS - # type of key (2 bits) - # + # @method knownhost_add(hosts, host, salt, key, keylen, typemask, store) - # @param [LIBSSH2KNOWNHOSTS] hosts - # @param [String] host - # @param [String] salt - # @param [String] key - # @param [Integer] keylen - # @param [Integer] typemask - # @param [FFI::Pointer(**Knownhost)] store - # @return [Integer] - # @scope class - attach_function :knownhost_add, :libssh2_knownhost_add, [LIBSSH2KNOWNHOSTS, :string, :string, :string, :ulong, :int, :pointer], :int - + # @param [LIBSSH2KNOWNHOSTS] hosts + # @param [String] host + # @param [String] salt + # @param [String] key + # @param [Integer] keylen + # @param [Integer] typemask + # @param [FFI::Pointer(**Knownhost)] store + # @return [Integer] + # @scope class + attach_function :knownhost_add, :libssh2_knownhost_add, [LIBSSH2KNOWNHOSTS, :string, :string, :string, :int, :int, :pointer], :int # libssh2_knownhost_addc - # + # Add a host and its associated key to the collection of known hosts. - # + # Takes a comment argument that may be NULL. A NULL comment indicates # there is no comment and the entry will end directly after the key # when written out to a file. An empty string "" comment will indicate an # empty comment which will cause a single space to be written after the key. - # + # The 'type' argument specifies on what format the given host and keys are: - # + # plain - ascii "hostname.domain.tld" # sha1 - SHA1( ) base64-encoded! # custom - another hash - # + # If 'sha1' is selected as type, the salt must be provided to the salt # argument. This too base64 encoded. - # + # The SHA-1 hash is what OpenSSH can be told to use in known_hosts files. If # a custom type is used, salt is ignored and you must provide the host # pre-hashed when checking for it in the libssh2_knownhost_check() function. - # + # The keylen parameter may be omitted (zero) if the key is provided as a # NULL-terminated base64-encoded string. - # + # @method knownhost_addc(hosts, host, salt, key, keylen, comment, commentlen, typemask, store) - # @param [LIBSSH2KNOWNHOSTS] hosts - # @param [String] host - # @param [String] salt - # @param [String] key - # @param [Integer] keylen - # @param [String] comment - # @param [Integer] commentlen - # @param [Integer] typemask - # @param [FFI::Pointer(**Knownhost)] store - # @return [Integer] - # @scope class - attach_function :knownhost_addc, :libssh2_knownhost_addc, [LIBSSH2KNOWNHOSTS, :string, :string, :string, :ulong, :string, :ulong, :int, :pointer], :int - + # @param [LIBSSH2KNOWNHOSTS] hosts + # @param [String] host + # @param [String] salt + # @param [String] key + # @param [Integer] keylen + # @param [String] comment + # @param [Integer] commentlen + # @param [Integer] typemask + # @param [FFI::Pointer(**Knownhost)] store + # @return [Integer] + # @scope class + attach_function :knownhost_addc, :libssh2_knownhost_addc, [LIBSSH2KNOWNHOSTS, :string, :string, :string, :int, :string, :int, :int, :pointer], :int # libssh2_knownhost_check - # + # Check a host and its associated key against the collection of known hosts. - # + # The type is the type/format of the given host name. - # + # plain - ascii "hostname.domain.tld" # custom - prehashed base64 encoded. Note that this cannot use any salts. - # - # + + # 'knownhost' may be set to NULL if you don't care about that info. - # + # Returns: - # + # LIBSSH2_KNOWNHOST_CHECK_* values, see below - # + # @method knownhost_check(hosts, host, key, keylen, typemask, knownhost) - # @param [LIBSSH2KNOWNHOSTS] hosts - # @param [String] host - # @param [String] key - # @param [Integer] keylen - # @param [Integer] typemask - # @param [FFI::Pointer(**Knownhost)] knownhost - # @return [Integer] - # @scope class - attach_function :knownhost_check, :libssh2_knownhost_check, [LIBSSH2KNOWNHOSTS, :string, :string, :ulong, :int, :pointer], :int - + # @param [LIBSSH2KNOWNHOSTS] hosts + # @param [String] host + # @param [String] key + # @param [Integer] keylen + # @param [Integer] typemask + # @param [FFI::Pointer(**Knownhost)] knownhost + # @return [Integer] + # @scope class + attach_function :knownhost_check, :libssh2_knownhost_check, [LIBSSH2KNOWNHOSTS, :string, :string, :int, :int, :pointer], :int # this function is identital to the above one, but also takes a port # argument that allows libssh2 to do a better check - # + # @method knownhost_checkp(hosts, host, port, key, keylen, typemask, knownhost) - # @param [LIBSSH2KNOWNHOSTS] hosts - # @param [String] host - # @param [Integer] port - # @param [String] key - # @param [Integer] keylen - # @param [Integer] typemask - # @param [FFI::Pointer(**Knownhost)] knownhost - # @return [Integer] - # @scope class - attach_function :knownhost_checkp, :libssh2_knownhost_checkp, [LIBSSH2KNOWNHOSTS, :string, :int, :string, :ulong, :int, :pointer], :int - + # @param [LIBSSH2KNOWNHOSTS] hosts + # @param [String] host + # @param [Integer] port + # @param [String] key + # @param [Integer] keylen + # @param [Integer] typemask + # @param [FFI::Pointer(**Knownhost)] knownhost + # @return [Integer] + # @scope class + attach_function :knownhost_checkp, :libssh2_knownhost_checkp, [LIBSSH2KNOWNHOSTS, :string, :int, :string, :int, :int, :pointer], :int # libssh2_knownhost_del - # + # Remove a host from the collection of known hosts. The 'entry' struct is # retrieved by a call to libssh2_knownhost_check(). - # + # @method knownhost_del(hosts, entry) - # @param [LIBSSH2KNOWNHOSTS] hosts - # @param [Knownhost] entry - # @return [Integer] + # @param [LIBSSH2KNOWNHOSTS] hosts + # @param [Knownhost] entry + # @return [Integer] # @scope class attach_function :knownhost_del, :libssh2_knownhost_del, [LIBSSH2KNOWNHOSTS, Knownhost], :int - # libssh2_knownhost_free - # + # Free an entire collection of known hosts. - # + # @method knownhost_free(hosts) - # @param [LIBSSH2KNOWNHOSTS] hosts - # @return [nil] + # @param [LIBSSH2KNOWNHOSTS] hosts + # @return [nil] # @scope class attach_function :knownhost_free, :libssh2_knownhost_free, [LIBSSH2KNOWNHOSTS], :void - # libssh2_knownhost_readline() - # + # Pass in a line of a file of 'type'. It makes libssh2 read this line. - # + # LIBSSH2_KNOWNHOST_FILE_OPENSSH is the only supported type. - # + # @method knownhost_readline(hosts, line, len, type) - # @param [LIBSSH2KNOWNHOSTS] hosts - # @param [String] line - # @param [Integer] len - # @param [Integer] type - # @return [Integer] - # @scope class - attach_function :knownhost_readline, :libssh2_knownhost_readline, [LIBSSH2KNOWNHOSTS, :string, :ulong, :int], :int - + # @param [LIBSSH2KNOWNHOSTS] hosts + # @param [String] line + # @param [Integer] len + # @param [Integer] type + # @return [Integer] + # @scope class + attach_function :knownhost_readline, :libssh2_knownhost_readline, [LIBSSH2KNOWNHOSTS, :string, :int, :int], :int # libssh2_knownhost_readfile - # + # Add hosts+key pairs from a given file. - # + # Returns a negative value for error or number of successfully added hosts. - # + # This implementation currently only knows one 'type' (openssh), all others # are reserved for future use. - # + # @method knownhost_readfile(hosts, filename, type) - # @param [LIBSSH2KNOWNHOSTS] hosts - # @param [String] filename - # @param [Integer] type - # @return [Integer] + # @param [LIBSSH2KNOWNHOSTS] hosts + # @param [String] filename + # @param [Integer] type + # @return [Integer] # @scope class attach_function :knownhost_readfile, :libssh2_knownhost_readfile, [LIBSSH2KNOWNHOSTS, :string, :int], :int - # libssh2_knownhost_writeline() - # + # Ask libssh2 to convert a known host to an output line for storage. - # + # Note that this function returns LIBSSH2_ERROR_BUFFER_TOO_SMALL if the given # output buffer is too small to hold the desired output. - # + # This implementation currently only knows one 'type' (openssh), all others # are reserved for future use. - # + # @method knownhost_writeline(hosts, known, buffer, buflen, outlen, type) - # @param [LIBSSH2KNOWNHOSTS] hosts - # @param [Knownhost] known - # @param [String] buffer - # @param [Integer] buflen - # @param [FFI::Pointer(*SizeT)] outlen - # @param [Integer] type - # @return [Integer] - # @scope class - attach_function :knownhost_writeline, :libssh2_knownhost_writeline, [LIBSSH2KNOWNHOSTS, Knownhost, :string, :ulong, :pointer, :int], :int - + # @param [LIBSSH2KNOWNHOSTS] hosts + # @param [Knownhost] known + # @param [String] buffer + # @param [Integer] buflen + # @param [FFI::Pointer(*Int)] outlen + # @param [Integer] type + # @return [Integer] + # @scope class + attach_function :knownhost_writeline, :libssh2_knownhost_writeline, [LIBSSH2KNOWNHOSTS, Knownhost, :string, :int, :pointer, :int], :int # libssh2_knownhost_writefile - # + # Write hosts+key pairs to a given file. - # + # This implementation currently only knows one 'type' (openssh), all others # are reserved for future use. - # + # @method knownhost_writefile(hosts, filename, type) - # @param [LIBSSH2KNOWNHOSTS] hosts - # @param [String] filename - # @param [Integer] type - # @return [Integer] + # @param [LIBSSH2KNOWNHOSTS] hosts + # @param [String] filename + # @param [Integer] type + # @return [Integer] # @scope class attach_function :knownhost_writefile, :libssh2_knownhost_writefile, [LIBSSH2KNOWNHOSTS, :string, :int], :int - # libssh2_knownhost_get() - # + # Traverse the internal list of known hosts. Pass NULL to 'prev' to get # the first one. Or pass a poiner to the previously returned one to get the # next. - # + # Returns: # 0 if a fine host was stored in 'store' # 1 if end of hosts # (negative) on errors - # + # @method knownhost_get(hosts, store, prev) - # @param [LIBSSH2KNOWNHOSTS] hosts - # @param [FFI::Pointer(**Knownhost)] store - # @param [Knownhost] prev - # @return [Integer] + # @param [LIBSSH2KNOWNHOSTS] hosts + # @param [FFI::Pointer(**Knownhost)] store + # @param [Knownhost] prev + # @return [Integer] # @scope class attach_function :knownhost_get, :libssh2_knownhost_get, [LIBSSH2KNOWNHOSTS, :pointer, Knownhost], :int - # since 1.2.2 - # + # = Fields: # :magic :: # (Integer) magic stored by the library @@ -1423,165 +1350,155 @@ class AgentPublickey < FFI::Struct layout :magic, :uint, :node, :pointer, :blob, :pointer, - :blob_len, :ulong, + :blob_len, :int, :comment, :string end - + # libssh2_agent_init - # + # Init an ssh-agent handle. Returns the pointer to the handle. - # + # @method agent_init(session) - # @param [LIBSSH2SESSION] session - # @return [LIBSSH2AGENT] + # @param [LIBSSH2SESSION] session + # @return [LIBSSH2AGENT] # @scope class attach_function :agent_init, :libssh2_agent_init, [LIBSSH2SESSION], LIBSSH2AGENT - # libssh2_agent_connect() - # + # Connect to an ssh-agent. - # + # Returns 0 if succeeded, or a negative value for error. - # + # @method agent_connect(agent) - # @param [LIBSSH2AGENT] agent - # @return [Integer] + # @param [LIBSSH2AGENT] agent + # @return [Integer] # @scope class attach_function :agent_connect, :libssh2_agent_connect, [LIBSSH2AGENT], :int - # libssh2_agent_list_identities() - # + # Request an ssh-agent to list identities. - # + # Returns 0 if succeeded, or a negative value for error. - # + # @method agent_list_identities(agent) - # @param [LIBSSH2AGENT] agent - # @return [Integer] + # @param [LIBSSH2AGENT] agent + # @return [Integer] # @scope class attach_function :agent_list_identities, :libssh2_agent_list_identities, [LIBSSH2AGENT], :int - # libssh2_agent_get_identity() - # + # Traverse the internal list of public keys. Pass NULL to 'prev' to get # the first one. Or pass a poiner to the previously returned one to get the # next. - # + # Returns: # 0 if a fine public key was stored in 'store' # 1 if end of public keys # (negative) on errors - # + # @method agent_get_identity(agent, store, prev) - # @param [LIBSSH2AGENT] agent - # @param [FFI::Pointer(**AgentPublickey)] store - # @param [AgentPublickey] prev - # @return [Integer] + # @param [LIBSSH2AGENT] agent + # @param [FFI::Pointer(**AgentPublickey)] store + # @param [AgentPublickey] prev + # @return [Integer] # @scope class attach_function :agent_get_identity, :libssh2_agent_get_identity, [LIBSSH2AGENT, :pointer, AgentPublickey], :int - # libssh2_agent_userauth() - # + # Do publickey user authentication with the help of ssh-agent. - # + # Returns 0 if succeeded, or a negative value for error. - # + # @method agent_userauth(agent, username, identity) - # @param [LIBSSH2AGENT] agent - # @param [String] username - # @param [AgentPublickey] identity - # @return [Integer] + # @param [LIBSSH2AGENT] agent + # @param [String] username + # @param [AgentPublickey] identity + # @return [Integer] # @scope class attach_function :agent_userauth, :libssh2_agent_userauth, [LIBSSH2AGENT, :string, AgentPublickey], :int - # libssh2_agent_disconnect() - # + # Close a connection to an ssh-agent. - # + # Returns 0 if succeeded, or a negative value for error. - # + # @method agent_disconnect(agent) - # @param [LIBSSH2AGENT] agent - # @return [Integer] + # @param [LIBSSH2AGENT] agent + # @return [Integer] # @scope class attach_function :agent_disconnect, :libssh2_agent_disconnect, [LIBSSH2AGENT], :int - # libssh2_agent_free() - # + # Free an ssh-agent handle. This function also frees the internal # collection of public keys. - # + # @method agent_free(agent) - # @param [LIBSSH2AGENT] agent - # @return [nil] + # @param [LIBSSH2AGENT] agent + # @return [nil] # @scope class attach_function :agent_free, :libssh2_agent_free, [LIBSSH2AGENT], :void - # libssh2_keepalive_config() - # + # Set how often keepalive messages should be sent. WANT_REPLY # indicates whether the keepalive messages should request a response # from the server. INTERVAL is number of seconds that can pass # without any I/O, use 0 (the default) to disable keepalives. To # avoid some busy-loop corner-cases, if you specify an interval of 1 # it will be treated as 2. - # + # Note that non-blocking applications are responsible for sending the # keepalive messages using libssh2_keepalive_send(). - # + # @method keepalive_config(session, want_reply, interval) - # @param [LIBSSH2SESSION] session - # @param [Integer] want_reply - # @param [Integer] interval - # @return [nil] + # @param [LIBSSH2SESSION] session + # @param [Integer] want_reply + # @param [Integer] interval + # @return [nil] # @scope class attach_function :keepalive_config, :libssh2_keepalive_config, [LIBSSH2SESSION, :int, :uint], :void - # libssh2_keepalive_send() - # + # Send a keepalive message if needed. SECONDS_TO_NEXT indicates how # many seconds you can sleep after this call before you need to call # it again. Returns 0 on success, or LIBSSH2_ERROR_SOCKET_SEND on # I/O errors. - # + # @method keepalive_send(session, seconds_to_next) - # @param [LIBSSH2SESSION] session - # @param [FFI::Pointer(*Int)] seconds_to_next - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @param [FFI::Pointer(*Int)] seconds_to_next + # @return [Integer] # @scope class attach_function :keepalive_send, :libssh2_keepalive_send, [LIBSSH2SESSION, :pointer], :int - # NOTE NOTE NOTE # libssh2_trace() has no function in builds that aren't built with debug # enabled - # + # @method trace(session, bitmask) - # @param [LIBSSH2SESSION] session - # @param [Integer] bitmask - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @param [Integer] bitmask + # @return [Integer] # @scope class attach_function :trace, :libssh2_trace, [LIBSSH2SESSION, :int], :int - # (Not documented) - # + # This entry is only for documentation and no real method. - # - # @method _callback_trace_handler_func_(void, string, u_long) - # @param [FFI::Pointer(*Void)] void - # @param [String] string - # @param [Integer] u_long - # @return [LIBSSH2SESSION] - # @scope class - callback :trace_handler_func, [:pointer, :string, :ulong], LIBSSH2SESSION - + + # @method _callback_trace_handler_func_(libssh2_session, void, string, size_t) + # @param [LIBSSH2SESSION] libssh2_session + # @param [FFI::Pointer(*Void)] void + # @param [String] string + # @param [Integer] size_t + # @return [LIBSSH2SESSION] + # @scope class + callback :trace_handler_func, [LIBSSH2SESSION, :pointer, :string, :int], LIBSSH2SESSION + # (Not documented) - # + # @method trace_sethandler(session, context, callback) - # @param [LIBSSH2SESSION] session - # @param [FFI::Pointer(*Void)] context - # @param [Proc(_callback_trace_handler_func_)] callback - # @return [Integer] + # @param [LIBSSH2SESSION] session + # @param [FFI::Pointer(*Void)] context + # @param [FFI::Pointer(TraceHandlerFunc)] callback + # @return [Integer] # @scope class - attach_function :trace_sethandler, :libssh2_trace_sethandler, [LIBSSH2SESSION, :pointer, :trace_handler_func], :int - + attach_function :trace_sethandler, :libssh2_trace_sethandler, [LIBSSH2SESSION, :pointer, :pointer], :int end diff --git a/test/output/llvm-c/Analysis.rb b/test/output/llvm-c/Analysis.rb index 6002c20..5624dd1 100644 --- a/test/output/llvm-c/Analysis.rb +++ b/test/output/llvm-c/Analysis.rb @@ -1,29 +1,31 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module LLVM + extend FFI::Library - ffi_lib 'LLVM-3.0' - + + ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"] + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:verifier_failure_action). - # + # === Options: # :abort_process :: - # + # :print_message :: # verifier will print to stderr and abort() # :return_status :: # verifier will print to stderr and return 1 - # + # @method _enum_verifier_failure_action_ # @return [Symbol] # @scope class @@ -32,44 +34,40 @@ def self.attach_function(name, *_) :print_message, 1, :return_status, 2 ] - + # Verifies that a module is valid, taking the specified action if not. # Optionally returns a human-readable description of any invalid constructs. # OutMessage must be disposed with LLVMDisposeMessage. - # + # @method verify_module(m, action, out_message) - # @param [FFI::Pointer(ModuleRef)] m - # @param [Symbol from _enum_verifier_failure_action_] action - # @param [FFI::Pointer(**CharS)] out_message - # @return [Integer] + # @param [FFI::Pointer(ModuleRef)] m + # @param [Symbol from _enum_verifier_failure_action_] action + # @param [FFI::Pointer(**CharS)] out_message + # @return [Integer] # @scope class attach_function :verify_module, :LLVMVerifyModule, [:pointer, :verifier_failure_action, :pointer], :int - # Verifies that a single function is valid, taking the specified action. Useful # for debugging. - # + # @method verify_function(fn, action) - # @param [FFI::Pointer(ValueRef)] fn - # @param [Symbol from _enum_verifier_failure_action_] action - # @return [Integer] + # @param [FFI::Pointer(ValueRef)] fn + # @param [Symbol from _enum_verifier_failure_action_] action + # @return [Integer] # @scope class attach_function :verify_function, :LLVMVerifyFunction, [:pointer, :verifier_failure_action], :int - # Open up a ghostview window that displays the CFG of the current function. # Useful for debugging. - # + # @method view_function_cfg(fn) - # @param [FFI::Pointer(ValueRef)] fn - # @return [nil] + # @param [FFI::Pointer(ValueRef)] fn + # @return [nil] # @scope class attach_function :view_function_cfg, :LLVMViewFunctionCFG, [:pointer], :void - # (Not documented) - # + # @method view_function_cfg_only(fn) - # @param [FFI::Pointer(ValueRef)] fn - # @return [nil] + # @param [FFI::Pointer(ValueRef)] fn + # @return [nil] # @scope class attach_function :view_function_cfg_only, :LLVMViewFunctionCFGOnly, [:pointer], :void - end diff --git a/test/output/llvm-c/BitReader.rb b/test/output/llvm-c/BitReader.rb index a47fcba..8455194 100644 --- a/test/output/llvm-c/BitReader.rb +++ b/test/output/llvm-c/BitReader.rb @@ -1,82 +1,78 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module LLVM + extend FFI::Library - ffi_lib 'LLVM-3.0' - + + ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"] + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Builds a module from the bitcode in the specified memory buffer, returning a # reference to the module via the OutModule parameter. Returns 0 on success. # Optionally returns a human-readable error message via OutMessage. - # + # @method parse_bitcode(mem_buf, out_module, out_message) - # @param [FFI::Pointer(MemoryBufferRef)] mem_buf - # @param [FFI::Pointer(*ModuleRef)] out_module - # @param [FFI::Pointer(**CharS)] out_message - # @return [Integer] + # @param [FFI::Pointer(MemoryBufferRef)] mem_buf + # @param [FFI::Pointer(*ModuleRef)] out_module + # @param [FFI::Pointer(**CharS)] out_message + # @return [Integer] # @scope class attach_function :parse_bitcode, :LLVMParseBitcode, [:pointer, :pointer, :pointer], :int - # (Not documented) - # + # @method parse_bitcode_in_context(context_ref, mem_buf, out_module, out_message) - # @param [FFI::Pointer(ContextRef)] context_ref - # @param [FFI::Pointer(MemoryBufferRef)] mem_buf - # @param [FFI::Pointer(*ModuleRef)] out_module - # @param [FFI::Pointer(**CharS)] out_message - # @return [Integer] + # @param [FFI::Pointer(ContextRef)] context_ref + # @param [FFI::Pointer(MemoryBufferRef)] mem_buf + # @param [FFI::Pointer(*ModuleRef)] out_module + # @param [FFI::Pointer(**CharS)] out_message + # @return [Integer] # @scope class attach_function :parse_bitcode_in_context, :LLVMParseBitcodeInContext, [:pointer, :pointer, :pointer, :pointer], :int - # Reads a module from the specified path, returning via the OutMP parameter # a module provider which performs lazy deserialization. Returns 0 on success. # Optionally returns a human-readable error message via OutMessage. - # + # @method get_bitcode_module_in_context(context_ref, mem_buf, out_m, out_message) - # @param [FFI::Pointer(ContextRef)] context_ref - # @param [FFI::Pointer(MemoryBufferRef)] mem_buf - # @param [FFI::Pointer(*ModuleRef)] out_m - # @param [FFI::Pointer(**CharS)] out_message - # @return [Integer] + # @param [FFI::Pointer(ContextRef)] context_ref + # @param [FFI::Pointer(MemoryBufferRef)] mem_buf + # @param [FFI::Pointer(*ModuleRef)] out_m + # @param [FFI::Pointer(**CharS)] out_message + # @return [Integer] # @scope class attach_function :get_bitcode_module_in_context, :LLVMGetBitcodeModuleInContext, [:pointer, :pointer, :pointer, :pointer], :int - # (Not documented) - # + # @method get_bitcode_module(mem_buf, out_m, out_message) - # @param [FFI::Pointer(MemoryBufferRef)] mem_buf - # @param [FFI::Pointer(*ModuleRef)] out_m - # @param [FFI::Pointer(**CharS)] out_message - # @return [Integer] + # @param [FFI::Pointer(MemoryBufferRef)] mem_buf + # @param [FFI::Pointer(*ModuleRef)] out_m + # @param [FFI::Pointer(**CharS)] out_message + # @return [Integer] # @scope class attach_function :get_bitcode_module, :LLVMGetBitcodeModule, [:pointer, :pointer, :pointer], :int - # Deprecated: Use LLVMGetBitcodeModuleInContext instead. - # + # @method get_bitcode_module_provider_in_context(context_ref, mem_buf, out_mp, out_message) - # @param [FFI::Pointer(ContextRef)] context_ref - # @param [FFI::Pointer(MemoryBufferRef)] mem_buf - # @param [FFI::Pointer(*ModuleProviderRef)] out_mp - # @param [FFI::Pointer(**CharS)] out_message - # @return [Integer] + # @param [FFI::Pointer(ContextRef)] context_ref + # @param [FFI::Pointer(MemoryBufferRef)] mem_buf + # @param [FFI::Pointer(*ModuleProviderRef)] out_mp + # @param [FFI::Pointer(**CharS)] out_message + # @return [Integer] # @scope class attach_function :get_bitcode_module_provider_in_context, :LLVMGetBitcodeModuleProviderInContext, [:pointer, :pointer, :pointer, :pointer], :int - # Deprecated: Use LLVMGetBitcodeModule instead. - # + # @method get_bitcode_module_provider(mem_buf, out_mp, out_message) - # @param [FFI::Pointer(MemoryBufferRef)] mem_buf - # @param [FFI::Pointer(*ModuleProviderRef)] out_mp - # @param [FFI::Pointer(**CharS)] out_message - # @return [Integer] + # @param [FFI::Pointer(MemoryBufferRef)] mem_buf + # @param [FFI::Pointer(*ModuleProviderRef)] out_mp + # @param [FFI::Pointer(**CharS)] out_message + # @return [Integer] # @scope class attach_function :get_bitcode_module_provider, :LLVMGetBitcodeModuleProvider, [:pointer, :pointer, :pointer], :int - end diff --git a/test/output/llvm-c/BitWriter.rb b/test/output/llvm-c/BitWriter.rb index 5652018..41e4d22 100644 --- a/test/output/llvm-c/BitWriter.rb +++ b/test/output/llvm-c/BitWriter.rb @@ -1,45 +1,44 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module LLVM + extend FFI::Library - ffi_lib 'LLVM-3.0' - + + ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"] + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # Writes a module to the specified path. Returns 0 on success. - # + # @method write_bitcode_to_file(m, path) - # @param [FFI::Pointer(ModuleRef)] m - # @param [String] path - # @return [Integer] + # @param [FFI::Pointer(ModuleRef)] m + # @param [String] path + # @return [Integer] # @scope class attach_function :write_bitcode_to_file, :LLVMWriteBitcodeToFile, [:pointer, :string], :int - # Writes a module to an open file descriptor. Returns 0 on success. - # + # @method write_bitcode_to_fd(m, fd, should_close, unbuffered) - # @param [FFI::Pointer(ModuleRef)] m - # @param [Integer] fd - # @param [Integer] should_close - # @param [Integer] unbuffered - # @return [Integer] + # @param [FFI::Pointer(ModuleRef)] m + # @param [Integer] fd + # @param [Integer] should_close + # @param [Integer] unbuffered + # @return [Integer] # @scope class attach_function :write_bitcode_to_fd, :LLVMWriteBitcodeToFD, [:pointer, :int, :int, :int], :int - # Deprecated for LLVMWriteBitcodeToFD. Writes a module to an open file # descriptor. Returns 0 on success. Closes the Handle. - # + # @method write_bitcode_to_file_handle(m, handle) - # @param [FFI::Pointer(ModuleRef)] m - # @param [Integer] handle - # @return [Integer] + # @param [FFI::Pointer(ModuleRef)] m + # @param [Integer] handle + # @return [Integer] # @scope class attach_function :write_bitcode_to_file_handle, :LLVMWriteBitcodeToFileHandle, [:pointer, :int], :int - end diff --git a/test/output/llvm-c/Core.rb b/test/output/llvm-c/Core.rb index dc8e49e..d3d18f2 100644 --- a/test/output/llvm-c/Core.rb +++ b/test/output/llvm-c/Core.rb @@ -1,139 +1,141 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module LLVM + extend FFI::Library - ffi_lib 'LLVM-3.0' - + + ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"] + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + def for_each_value_subclass(macro) macroARGUMENTmacroBASIC_BLOCKmacroINLINE_ASMmacroMD_NODEmacroMD_STRINGmacroUSERmacroCONSTANTmacroBLOCK_ADDRESSmacroCONSTANT_AGGREGATE_ZEROmacroCONSTANT_ARRAYmacroCONSTANT_EXPRmacroCONSTANT_FPmacroCONSTANT_INTmacroCONSTANT_POINTER_NULLmacroCONSTANT_STRUCTmacroCONSTANT_VECTORmacroGLOBAL_VALUEmacroFUNCTIONmacroGLOBAL_ALIASmacroGLOBAL_VARIABLEmacroUNDEF_VALUEmacroINSTRUCTIONmacroBINARY_OPERATORmacroCALL_INSTmacroINTRINSIC_INSTmacroDBG_INFO_INTRINSICmacroDBG_DECLARE_INSTmacroEH_EXCEPTION_INSTmacroEH_SELECTOR_INSTmacroMEM_INTRINSICmacroMEM_CPY_INSTmacroMEM_MOVE_INSTmacroMEM_SET_INSTmacroCMP_INSTmacroF_CMP_INSTmacroI_CMP_INSTmacroEXTRACT_ELEMENT_INSTmacroGET_ELEMENT_PTR_INSTmacroINSERT_ELEMENT_INSTmacroINSERT_VALUE_INSTmacroLANDING_PAD_INSTmacroPHI_NODEmacroSELECT_INSTmacroSHUFFLE_VECTOR_INSTmacroSTORE_INSTmacroTERMINATOR_INSTmacroBRANCH_INSTmacroINDIRECT_BR_INSTmacroINVOKE_INSTmacroRETURN_INSTmacroSWITCH_INSTmacroUNREACHABLE_INSTmacroRESUME_INSTmacroUNARY_INSTRUCTIONmacroALLOCA_INSTmacroCAST_INSTmacroBIT_CAST_INSTmacroFP_EXT_INSTmacroFP_TO_SI_INSTmacroFP_TO_UI_INSTmacroFP_TRUNC_INSTmacroINT_TO_PTR_INSTmacroPTR_TO_INT_INSTmacroS_EXT_INSTmacroSI_TO_FP_INSTmacroTRUNC_INSTmacroUI_TO_FP_INSTmacroZ_EXT_INSTmacroEXTRACT_VALUE_INSTmacroLOAD_INSTmacroVA_ARG_INST end - + # The top-level container for all LLVM global data. See the LLVMContext class. class OpaqueContext < FFI::Struct layout :dummy, :char end - + # The top-level container for all other LLVM Intermediate Representation (IR) # objects. See the llvm::Module class. class OpaqueModule < FFI::Struct layout :dummy, :char end - + # Each value in the LLVM IR has a type, an LLVMTypeRef. See the llvm::Type # class. class OpaqueType < FFI::Struct layout :dummy, :char end - + # (Not documented) class OpaqueValue < FFI::Struct layout :dummy, :char end - + # (Not documented) class OpaqueBasicBlock < FFI::Struct layout :dummy, :char end - + # (Not documented) class OpaqueBuilder < FFI::Struct layout :dummy, :char end - + # Interface used to provide a module to JIT or interpreter. This is now just a # synonym for llvm::Module, but we have to keep using the different type to # keep binary compatibility. class OpaqueModuleProvider < FFI::Struct layout :dummy, :char end - + # Used to provide a module to JIT or interpreter. # See the llvm::MemoryBuffer class. class OpaqueMemoryBuffer < FFI::Struct layout :dummy, :char end - + # See the llvm::PassManagerBase class. class OpaquePassManager < FFI::Struct layout :dummy, :char end - + # See the llvm::PassRegistry class. class OpaquePassRegistry < FFI::Struct layout :dummy, :char end - + # Used to get the users and usees of a Value. See the llvm::Use class. class OpaqueUse < FFI::Struct layout :dummy, :char end - + # (Not documented) - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:attribute). - # + # === Options: # :z_ext_attribute :: - # + # :s_ext_attribute :: - # + # :no_return_attribute :: - # + # :in_reg_attribute :: - # + # :struct_ret_attribute :: - # + # :no_unwind_attribute :: - # + # :no_alias_attribute :: - # + # :by_val_attribute :: - # + # :nest_attribute :: - # + # :read_none_attribute :: - # + # :read_only_attribute :: - # + # :no_inline_attribute :: - # + # :always_inline_attribute :: - # + # :optimize_for_size_attribute :: - # + # :stack_protect_attribute :: - # + # :stack_protect_req_attribute :: - # + # :alignment :: - # + # :no_capture_attribute :: - # + # :no_red_zone_attribute :: - # + # :no_implicit_float_attribute :: - # + # :naked_attribute :: - # + # :inline_hint_attribute :: - # + # :stack_alignment :: - # + # :returns_twice :: - # + # :uw_table :: - # + # :non_lazy_bind :: - # - # + + # @method _enum_attribute_ # @return [Symbol] # @scope class @@ -165,131 +167,131 @@ class OpaqueUse < FFI::Struct :uw_table, 1073741824, :non_lazy_bind, 2147483648 ] - + # (Not documented) - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:opcode). - # + # === Options: # :ret :: # Terminator Instructions # :br :: - # + # :switch :: - # + # :indirect_br :: - # + # :invoke :: - # + # :unreachable :: # removed 6 due to API changes # :add :: # Standard Binary Operators # :f_add :: - # + # :sub :: - # + # :f_sub :: - # + # :mul :: - # + # :f_mul :: - # + # :u_div :: - # + # :s_div :: - # + # :f_div :: - # + # :u_rem :: - # + # :s_rem :: - # + # :f_rem :: - # + # :shl :: # Logical Operators # :l_shr :: - # + # :a_shr :: - # + # :and_ :: - # + # :or_ :: - # + # :xor :: - # + # :alloca :: # Memory Operators # :load :: - # + # :store :: - # + # :get_element_ptr :: - # + # :trunc :: # Cast Operators # :z_ext :: - # + # :s_ext :: - # + # :fp_to_ui :: - # + # :fp_to_si :: - # + # :ui_to_fp :: - # + # :si_to_fp :: - # + # :fp_trunc :: - # + # :fp_ext :: - # + # :ptr_to_int :: - # + # :int_to_ptr :: - # + # :bit_cast :: - # + # :i_cmp :: # Other Operators # :f_cmp :: - # + # :phi :: - # + # :call :: - # + # :select :: - # + # :user_op1 :: - # + # :user_op2 :: - # + # :va_arg :: - # + # :extract_element :: - # + # :insert_element :: - # + # :shuffle_vector :: - # + # :extract_value :: - # + # :insert_value :: - # + # :fence :: # Atomic operators # :atomic_cmp_xchg :: - # + # :atomic_rmw :: - # + # :resume :: # Exception Handling Operators # :landing_pad :: - # + # :unwind :: - # - # + + # @method _enum_opcode_ # @return [Symbol] # @scope class @@ -354,14 +356,14 @@ class OpaqueUse < FFI::Struct :landing_pad, 59, :unwind, 60 ] - + # (Not documented) - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:type_kind). - # + # === Options: # :void :: - # + # :float :: # < type with no size # :double :: @@ -390,7 +392,7 @@ class OpaqueUse < FFI::Struct # < SIMD 'packed' format, or other vector type # :x86_mmx :: # < Metadata - # + # @method _enum_type_kind_ # @return [Symbol] # @scope class @@ -411,18 +413,18 @@ class OpaqueUse < FFI::Struct :metadata, 13, :x86_mmx, 14 ] - + # (Not documented) - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:linkage). - # + # === Options: # :external :: - # + # :available_externally :: # < Externally visible function # :link_once_any :: - # + # :link_once_odr :: # < Keep one copy of function when linking (inline) # :weak_any :: @@ -454,7 +456,7 @@ class OpaqueUse < FFI::Struct # < Like Private, but linker removes. # :linker_private_weak_def_auto :: # < Like LinkerPrivate, but is weak. - # + # @method _enum_linkage_ # @return [Symbol] # @scope class @@ -477,19 +479,19 @@ class OpaqueUse < FFI::Struct :linker_private_weak, 15, :linker_private_weak_def_auto, 16 ] - + # (Not documented) - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:visibility). - # + # === Options: # :default :: - # + # :hidden :: # < The GV is visible # :protected :: # < The GV is hidden - # + # @method _enum_visibility_ # @return [Symbol] # @scope class @@ -498,23 +500,23 @@ class OpaqueUse < FFI::Struct :hidden, 1, :protected, 2 ] - + # (Not documented) - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:call_conv). - # + # === Options: # :c :: - # + # :fast :: - # + # :cold :: - # + # :x86_stdcall :: - # + # :x86_fastcall :: - # - # + + # @method _enum_call_conv_ # @return [Symbol] # @scope class @@ -525,14 +527,14 @@ class OpaqueUse < FFI::Struct :x86_stdcall, 64, :x86_fastcall, 65 ] - + # (Not documented) - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:int_predicate). - # + # === Options: # :eq :: - # + # :ne :: # < equal # :ugt :: @@ -551,7 +553,7 @@ class OpaqueUse < FFI::Struct # < signed greater or equal # :sle :: # < signed less than - # + # @method _enum_int_predicate_ # @return [Symbol] # @scope class @@ -567,14 +569,14 @@ class OpaqueUse < FFI::Struct :slt, 40, :sle, 41 ] - + # (Not documented) - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:real_predicate). - # + # === Options: # :predicate_false :: - # + # :oeq :: # < Always false (always folded) # :ogt :: @@ -605,7 +607,7 @@ class OpaqueUse < FFI::Struct # < True if unordered, less than, or equal # :predicate_true :: # < True if unordered or not equal - # + # @method _enum_real_predicate_ # @return [Symbol] # @scope class @@ -627,17 +629,17 @@ class OpaqueUse < FFI::Struct :une, 14, :predicate_true, 15 ] - + # (Not documented) - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:landing_pad_clause_ty). - # + # === Options: # :catch :: - # + # :filter :: # < A catch clause - # + # @method _enum_landing_pad_clause_ty_ # @return [Symbol] # @scope class @@ -645,4159 +647,3200 @@ class OpaqueUse < FFI::Struct :catch, 0, :filter, 1 ] - + # (Not documented) - # + # @method initialize_core(r) - # @param [OpaquePassRegistry] r - # @return [nil] + # @param [OpaquePassRegistry] r + # @return [nil] # @scope class attach_function :initialize_core, :LLVMInitializeCore, [OpaquePassRegistry], :void - # ===-- Error handling ----------------------------------------------------=== - # + # @method dispose_message(message) - # @param [String] message - # @return [nil] + # @param [String] message + # @return [nil] # @scope class attach_function :dispose_message, :LLVMDisposeMessage, [:string], :void - # Create and destroy contexts. - # + # @method context_create() - # @return [OpaqueContext] + # @return [OpaqueContext] # @scope class attach_function :context_create, :LLVMContextCreate, [], OpaqueContext - # (Not documented) - # + # @method get_global_context() - # @return [OpaqueContext] + # @return [OpaqueContext] # @scope class attach_function :get_global_context, :LLVMGetGlobalContext, [], OpaqueContext - # (Not documented) - # + # @method context_dispose(c) - # @param [OpaqueContext] c - # @return [nil] + # @param [OpaqueContext] c + # @return [nil] # @scope class attach_function :context_dispose, :LLVMContextDispose, [OpaqueContext], :void - # (Not documented) - # + # @method get_md_kind_id_in_context(c, name, s_len) - # @param [OpaqueContext] c - # @param [String] name - # @param [Integer] s_len - # @return [Integer] + # @param [OpaqueContext] c + # @param [String] name + # @param [Integer] s_len + # @return [Integer] # @scope class attach_function :get_md_kind_id_in_context, :LLVMGetMDKindIDInContext, [OpaqueContext, :string, :uint], :uint - # (Not documented) - # + # @method get_md_kind_id(name, s_len) - # @param [String] name - # @param [Integer] s_len - # @return [Integer] + # @param [String] name + # @param [Integer] s_len + # @return [Integer] # @scope class attach_function :get_md_kind_id, :LLVMGetMDKindID, [:string, :uint], :uint - # See llvm::Module::Module. - # + # @method module_create_with_name(module_id) - # @param [String] module_id - # @return [OpaqueModule] + # @param [String] module_id + # @return [OpaqueModule] # @scope class attach_function :module_create_with_name, :LLVMModuleCreateWithName, [:string], OpaqueModule - # (Not documented) - # + # @method module_create_with_name_in_context(module_id, c) - # @param [String] module_id - # @param [OpaqueContext] c - # @return [OpaqueModule] + # @param [String] module_id + # @param [OpaqueContext] c + # @return [OpaqueModule] # @scope class attach_function :module_create_with_name_in_context, :LLVMModuleCreateWithNameInContext, [:string, OpaqueContext], OpaqueModule - # See llvm::Module::~Module. - # + # @method dispose_module(m) - # @param [OpaqueModule] m - # @return [nil] + # @param [OpaqueModule] m + # @return [nil] # @scope class attach_function :dispose_module, :LLVMDisposeModule, [OpaqueModule], :void - # Data layout. See Module::getDataLayout. - # + # @method get_data_layout(m) - # @param [OpaqueModule] m - # @return [String] + # @param [OpaqueModule] m + # @return [String] # @scope class attach_function :get_data_layout, :LLVMGetDataLayout, [OpaqueModule], :string - # (Not documented) - # + # @method set_data_layout(m, triple) - # @param [OpaqueModule] m - # @param [String] triple - # @return [nil] + # @param [OpaqueModule] m + # @param [String] triple + # @return [nil] # @scope class attach_function :set_data_layout, :LLVMSetDataLayout, [OpaqueModule, :string], :void - # Target triple. See Module::getTargetTriple. - # + # @method get_target(m) - # @param [OpaqueModule] m - # @return [String] + # @param [OpaqueModule] m + # @return [String] # @scope class attach_function :get_target, :LLVMGetTarget, [OpaqueModule], :string - # (Not documented) - # + # @method set_target(m, triple) - # @param [OpaqueModule] m - # @param [String] triple - # @return [nil] + # @param [OpaqueModule] m + # @param [String] triple + # @return [nil] # @scope class attach_function :set_target, :LLVMSetTarget, [OpaqueModule, :string], :void - # See Module::dump. - # + # @method dump_module(m) - # @param [OpaqueModule] m - # @return [nil] + # @param [OpaqueModule] m + # @return [nil] # @scope class attach_function :dump_module, :LLVMDumpModule, [OpaqueModule], :void - # See Module::setModuleInlineAsm. - # + # @method set_module_inline_asm(m, asm) - # @param [OpaqueModule] m - # @param [String] asm - # @return [nil] + # @param [OpaqueModule] m + # @param [String] asm + # @return [nil] # @scope class attach_function :set_module_inline_asm, :LLVMSetModuleInlineAsm, [OpaqueModule, :string], :void - # See Module::getContext. - # + # @method get_module_context(m) - # @param [OpaqueModule] m - # @return [OpaqueContext] + # @param [OpaqueModule] m + # @return [OpaqueContext] # @scope class attach_function :get_module_context, :LLVMGetModuleContext, [OpaqueModule], OpaqueContext - # See llvm::LLVMTypeKind::getTypeID. - # + # @method get_type_kind(ty) - # @param [OpaqueType] ty - # @return [Symbol from _enum_type_kind_] + # @param [OpaqueType] ty + # @return [Symbol from _enum_type_kind_] # @scope class attach_function :get_type_kind, :LLVMGetTypeKind, [OpaqueType], :type_kind - # (Not documented) - # + # @method type_is_sized(ty) - # @param [OpaqueType] ty - # @return [Integer] + # @param [OpaqueType] ty + # @return [Integer] # @scope class attach_function :type_is_sized, :LLVMTypeIsSized, [OpaqueType], :int - # See llvm::LLVMType::getContext. - # + # @method get_type_context(ty) - # @param [OpaqueType] ty - # @return [OpaqueContext] + # @param [OpaqueType] ty + # @return [OpaqueContext] # @scope class attach_function :get_type_context, :LLVMGetTypeContext, [OpaqueType], OpaqueContext - # Operations on integer types - # + # @method int1_type_in_context(c) - # @param [OpaqueContext] c - # @return [OpaqueType] + # @param [OpaqueContext] c + # @return [OpaqueType] # @scope class attach_function :int1_type_in_context, :LLVMInt1TypeInContext, [OpaqueContext], OpaqueType - # (Not documented) - # + # @method int8_type_in_context(c) - # @param [OpaqueContext] c - # @return [OpaqueType] + # @param [OpaqueContext] c + # @return [OpaqueType] # @scope class attach_function :int8_type_in_context, :LLVMInt8TypeInContext, [OpaqueContext], OpaqueType - # (Not documented) - # + # @method int16_type_in_context(c) - # @param [OpaqueContext] c - # @return [OpaqueType] + # @param [OpaqueContext] c + # @return [OpaqueType] # @scope class attach_function :int16_type_in_context, :LLVMInt16TypeInContext, [OpaqueContext], OpaqueType - # (Not documented) - # + # @method int32_type_in_context(c) - # @param [OpaqueContext] c - # @return [OpaqueType] + # @param [OpaqueContext] c + # @return [OpaqueType] # @scope class attach_function :int32_type_in_context, :LLVMInt32TypeInContext, [OpaqueContext], OpaqueType - # (Not documented) - # + # @method int64_type_in_context(c) - # @param [OpaqueContext] c - # @return [OpaqueType] + # @param [OpaqueContext] c + # @return [OpaqueType] # @scope class attach_function :int64_type_in_context, :LLVMInt64TypeInContext, [OpaqueContext], OpaqueType - # (Not documented) - # + # @method int_type_in_context(c, num_bits) - # @param [OpaqueContext] c - # @param [Integer] num_bits - # @return [OpaqueType] + # @param [OpaqueContext] c + # @param [Integer] num_bits + # @return [OpaqueType] # @scope class attach_function :int_type_in_context, :LLVMIntTypeInContext, [OpaqueContext, :uint], OpaqueType - # (Not documented) - # + # @method int1_type() - # @return [OpaqueType] + # @return [OpaqueType] # @scope class attach_function :int1_type, :LLVMInt1Type, [], OpaqueType - # (Not documented) - # + # @method int8_type() - # @return [OpaqueType] + # @return [OpaqueType] # @scope class attach_function :int8_type, :LLVMInt8Type, [], OpaqueType - # (Not documented) - # + # @method int16_type() - # @return [OpaqueType] + # @return [OpaqueType] # @scope class attach_function :int16_type, :LLVMInt16Type, [], OpaqueType - # (Not documented) - # + # @method int32_type() - # @return [OpaqueType] + # @return [OpaqueType] # @scope class attach_function :int32_type, :LLVMInt32Type, [], OpaqueType - # (Not documented) - # + # @method int64_type() - # @return [OpaqueType] + # @return [OpaqueType] # @scope class attach_function :int64_type, :LLVMInt64Type, [], OpaqueType - # (Not documented) - # + # @method int_type(num_bits) - # @param [Integer] num_bits - # @return [OpaqueType] + # @param [Integer] num_bits + # @return [OpaqueType] # @scope class attach_function :int_type, :LLVMIntType, [:uint], OpaqueType - # (Not documented) - # + # @method get_int_type_width(integer_ty) - # @param [OpaqueType] integer_ty - # @return [Integer] + # @param [OpaqueType] integer_ty + # @return [Integer] # @scope class attach_function :get_int_type_width, :LLVMGetIntTypeWidth, [OpaqueType], :uint - # Operations on real types - # + # @method float_type_in_context(c) - # @param [OpaqueContext] c - # @return [OpaqueType] + # @param [OpaqueContext] c + # @return [OpaqueType] # @scope class attach_function :float_type_in_context, :LLVMFloatTypeInContext, [OpaqueContext], OpaqueType - # (Not documented) - # + # @method double_type_in_context(c) - # @param [OpaqueContext] c - # @return [OpaqueType] + # @param [OpaqueContext] c + # @return [OpaqueType] # @scope class attach_function :double_type_in_context, :LLVMDoubleTypeInContext, [OpaqueContext], OpaqueType - # (Not documented) - # + # @method x86fp80_type_in_context(c) - # @param [OpaqueContext] c - # @return [OpaqueType] + # @param [OpaqueContext] c + # @return [OpaqueType] # @scope class attach_function :x86fp80_type_in_context, :LLVMX86FP80TypeInContext, [OpaqueContext], OpaqueType - # (Not documented) - # + # @method fp128_type_in_context(c) - # @param [OpaqueContext] c - # @return [OpaqueType] + # @param [OpaqueContext] c + # @return [OpaqueType] # @scope class attach_function :fp128_type_in_context, :LLVMFP128TypeInContext, [OpaqueContext], OpaqueType - # (Not documented) - # + # @method ppcfp128_type_in_context(c) - # @param [OpaqueContext] c - # @return [OpaqueType] + # @param [OpaqueContext] c + # @return [OpaqueType] # @scope class attach_function :ppcfp128_type_in_context, :LLVMPPCFP128TypeInContext, [OpaqueContext], OpaqueType - # (Not documented) - # + # @method float_type() - # @return [OpaqueType] + # @return [OpaqueType] # @scope class attach_function :float_type, :LLVMFloatType, [], OpaqueType - # (Not documented) - # + # @method double_type() - # @return [OpaqueType] + # @return [OpaqueType] # @scope class attach_function :double_type, :LLVMDoubleType, [], OpaqueType - # (Not documented) - # + # @method x86fp80_type() - # @return [OpaqueType] + # @return [OpaqueType] # @scope class attach_function :x86fp80_type, :LLVMX86FP80Type, [], OpaqueType - # (Not documented) - # + # @method fp128_type() - # @return [OpaqueType] + # @return [OpaqueType] # @scope class attach_function :fp128_type, :LLVMFP128Type, [], OpaqueType - # (Not documented) - # + # @method ppcfp128_type() - # @return [OpaqueType] + # @return [OpaqueType] # @scope class attach_function :ppcfp128_type, :LLVMPPCFP128Type, [], OpaqueType - # Operations on function types - # + # @method function_type(return_type, param_types, param_count, is_var_arg) - # @param [OpaqueType] return_type - # @param [FFI::Pointer(*TypeRef)] param_types - # @param [Integer] param_count - # @param [Integer] is_var_arg - # @return [OpaqueType] + # @param [OpaqueType] return_type + # @param [FFI::Pointer(*TypeRef)] param_types + # @param [Integer] param_count + # @param [Integer] is_var_arg + # @return [OpaqueType] # @scope class attach_function :function_type, :LLVMFunctionType, [OpaqueType, :pointer, :uint, :int], OpaqueType - # (Not documented) - # + # @method is_function_var_arg(function_ty) - # @param [OpaqueType] function_ty - # @return [Integer] + # @param [OpaqueType] function_ty + # @return [Integer] # @scope class attach_function :is_function_var_arg, :LLVMIsFunctionVarArg, [OpaqueType], :int - # (Not documented) - # + # @method get_return_type(function_ty) - # @param [OpaqueType] function_ty - # @return [OpaqueType] + # @param [OpaqueType] function_ty + # @return [OpaqueType] # @scope class attach_function :get_return_type, :LLVMGetReturnType, [OpaqueType], OpaqueType - # (Not documented) - # + # @method count_param_types(function_ty) - # @param [OpaqueType] function_ty - # @return [Integer] + # @param [OpaqueType] function_ty + # @return [Integer] # @scope class attach_function :count_param_types, :LLVMCountParamTypes, [OpaqueType], :uint - # (Not documented) - # + # @method get_param_types(function_ty, dest) - # @param [OpaqueType] function_ty - # @param [FFI::Pointer(*TypeRef)] dest - # @return [nil] + # @param [OpaqueType] function_ty + # @param [FFI::Pointer(*TypeRef)] dest + # @return [nil] # @scope class attach_function :get_param_types, :LLVMGetParamTypes, [OpaqueType, :pointer], :void - # Operations on struct types - # + # @method struct_type_in_context(c, element_types, element_count, packed) - # @param [OpaqueContext] c - # @param [FFI::Pointer(*TypeRef)] element_types - # @param [Integer] element_count - # @param [Integer] packed - # @return [OpaqueType] + # @param [OpaqueContext] c + # @param [FFI::Pointer(*TypeRef)] element_types + # @param [Integer] element_count + # @param [Integer] packed + # @return [OpaqueType] # @scope class attach_function :struct_type_in_context, :LLVMStructTypeInContext, [OpaqueContext, :pointer, :uint, :int], OpaqueType - # (Not documented) - # + # @method struct_type(element_types, element_count, packed) - # @param [FFI::Pointer(*TypeRef)] element_types - # @param [Integer] element_count - # @param [Integer] packed - # @return [OpaqueType] + # @param [FFI::Pointer(*TypeRef)] element_types + # @param [Integer] element_count + # @param [Integer] packed + # @return [OpaqueType] # @scope class attach_function :struct_type, :LLVMStructType, [:pointer, :uint, :int], OpaqueType - # (Not documented) - # + # @method struct_create_named(c, name) - # @param [OpaqueContext] c - # @param [String] name - # @return [OpaqueType] + # @param [OpaqueContext] c + # @param [String] name + # @return [OpaqueType] # @scope class attach_function :struct_create_named, :LLVMStructCreateNamed, [OpaqueContext, :string], OpaqueType - # (Not documented) - # + # @method get_struct_name(ty) - # @param [OpaqueType] ty - # @return [String] + # @param [OpaqueType] ty + # @return [String] # @scope class attach_function :get_struct_name, :LLVMGetStructName, [OpaqueType], :string - # (Not documented) - # + # @method struct_set_body(struct_ty, element_types, element_count, packed) - # @param [OpaqueType] struct_ty - # @param [FFI::Pointer(*TypeRef)] element_types - # @param [Integer] element_count - # @param [Integer] packed - # @return [nil] + # @param [OpaqueType] struct_ty + # @param [FFI::Pointer(*TypeRef)] element_types + # @param [Integer] element_count + # @param [Integer] packed + # @return [nil] # @scope class attach_function :struct_set_body, :LLVMStructSetBody, [OpaqueType, :pointer, :uint, :int], :void - # (Not documented) - # + # @method count_struct_element_types(struct_ty) - # @param [OpaqueType] struct_ty - # @return [Integer] + # @param [OpaqueType] struct_ty + # @return [Integer] # @scope class attach_function :count_struct_element_types, :LLVMCountStructElementTypes, [OpaqueType], :uint - # (Not documented) - # + # @method get_struct_element_types(struct_ty, dest) - # @param [OpaqueType] struct_ty - # @param [FFI::Pointer(*TypeRef)] dest - # @return [nil] + # @param [OpaqueType] struct_ty + # @param [FFI::Pointer(*TypeRef)] dest + # @return [nil] # @scope class attach_function :get_struct_element_types, :LLVMGetStructElementTypes, [OpaqueType, :pointer], :void - # (Not documented) - # + # @method is_packed_struct(struct_ty) - # @param [OpaqueType] struct_ty - # @return [Integer] + # @param [OpaqueType] struct_ty + # @return [Integer] # @scope class attach_function :is_packed_struct, :LLVMIsPackedStruct, [OpaqueType], :int - # (Not documented) - # + # @method is_opaque_struct(struct_ty) - # @param [OpaqueType] struct_ty - # @return [Integer] + # @param [OpaqueType] struct_ty + # @return [Integer] # @scope class attach_function :is_opaque_struct, :LLVMIsOpaqueStruct, [OpaqueType], :int - # (Not documented) - # + # @method get_type_by_name(m, name) - # @param [OpaqueModule] m - # @param [String] name - # @return [OpaqueType] + # @param [OpaqueModule] m + # @param [String] name + # @return [OpaqueType] # @scope class attach_function :get_type_by_name, :LLVMGetTypeByName, [OpaqueModule, :string], OpaqueType - # Operations on array, pointer, and vector types (sequence types) - # + # @method array_type(element_type, element_count) - # @param [OpaqueType] element_type - # @param [Integer] element_count - # @return [OpaqueType] + # @param [OpaqueType] element_type + # @param [Integer] element_count + # @return [OpaqueType] # @scope class attach_function :array_type, :LLVMArrayType, [OpaqueType, :uint], OpaqueType - # (Not documented) - # + # @method pointer_type(element_type, address_space) - # @param [OpaqueType] element_type - # @param [Integer] address_space - # @return [OpaqueType] + # @param [OpaqueType] element_type + # @param [Integer] address_space + # @return [OpaqueType] # @scope class attach_function :pointer_type, :LLVMPointerType, [OpaqueType, :uint], OpaqueType - # (Not documented) - # + # @method vector_type(element_type, element_count) - # @param [OpaqueType] element_type - # @param [Integer] element_count - # @return [OpaqueType] + # @param [OpaqueType] element_type + # @param [Integer] element_count + # @return [OpaqueType] # @scope class attach_function :vector_type, :LLVMVectorType, [OpaqueType, :uint], OpaqueType - # (Not documented) - # + # @method get_element_type(ty) - # @param [OpaqueType] ty - # @return [OpaqueType] + # @param [OpaqueType] ty + # @return [OpaqueType] # @scope class attach_function :get_element_type, :LLVMGetElementType, [OpaqueType], OpaqueType - # (Not documented) - # + # @method get_array_length(array_ty) - # @param [OpaqueType] array_ty - # @return [Integer] + # @param [OpaqueType] array_ty + # @return [Integer] # @scope class attach_function :get_array_length, :LLVMGetArrayLength, [OpaqueType], :uint - # (Not documented) - # + # @method get_pointer_address_space(pointer_ty) - # @param [OpaqueType] pointer_ty - # @return [Integer] + # @param [OpaqueType] pointer_ty + # @return [Integer] # @scope class attach_function :get_pointer_address_space, :LLVMGetPointerAddressSpace, [OpaqueType], :uint - # (Not documented) - # + # @method get_vector_size(vector_ty) - # @param [OpaqueType] vector_ty - # @return [Integer] + # @param [OpaqueType] vector_ty + # @return [Integer] # @scope class attach_function :get_vector_size, :LLVMGetVectorSize, [OpaqueType], :uint - # Operations on other types - # + # @method void_type_in_context(c) - # @param [OpaqueContext] c - # @return [OpaqueType] + # @param [OpaqueContext] c + # @return [OpaqueType] # @scope class attach_function :void_type_in_context, :LLVMVoidTypeInContext, [OpaqueContext], OpaqueType - # (Not documented) - # + # @method label_type_in_context(c) - # @param [OpaqueContext] c - # @return [OpaqueType] + # @param [OpaqueContext] c + # @return [OpaqueType] # @scope class attach_function :label_type_in_context, :LLVMLabelTypeInContext, [OpaqueContext], OpaqueType - # (Not documented) - # + # @method x86mmx_type_in_context(c) - # @param [OpaqueContext] c - # @return [OpaqueType] + # @param [OpaqueContext] c + # @return [OpaqueType] # @scope class attach_function :x86mmx_type_in_context, :LLVMX86MMXTypeInContext, [OpaqueContext], OpaqueType - # (Not documented) - # + # @method void_type() - # @return [OpaqueType] + # @return [OpaqueType] # @scope class attach_function :void_type, :LLVMVoidType, [], OpaqueType - # (Not documented) - # + # @method label_type() - # @return [OpaqueType] + # @return [OpaqueType] # @scope class attach_function :label_type, :LLVMLabelType, [], OpaqueType - # (Not documented) - # + # @method x86mmx_type() - # @return [OpaqueType] + # @return [OpaqueType] # @scope class attach_function :x86mmx_type, :LLVMX86MMXType, [], OpaqueType - # Operations on all values - # + # @method type_of(val) - # @param [OpaqueValue] val - # @return [OpaqueType] + # @param [OpaqueValue] val + # @return [OpaqueType] # @scope class attach_function :type_of, :LLVMTypeOf, [OpaqueValue], OpaqueType - # (Not documented) - # + # @method get_value_name(val) - # @param [OpaqueValue] val - # @return [String] + # @param [OpaqueValue] val + # @return [String] # @scope class attach_function :get_value_name, :LLVMGetValueName, [OpaqueValue], :string - # (Not documented) - # + # @method set_value_name(val, name) - # @param [OpaqueValue] val - # @param [String] name - # @return [nil] + # @param [OpaqueValue] val + # @param [String] name + # @return [nil] # @scope class attach_function :set_value_name, :LLVMSetValueName, [OpaqueValue, :string], :void - # (Not documented) - # + # @method dump_value(val) - # @param [OpaqueValue] val - # @return [nil] + # @param [OpaqueValue] val + # @return [nil] # @scope class attach_function :dump_value, :LLVMDumpValue, [OpaqueValue], :void - # (Not documented) - # + # @method replace_all_uses_with(old_val, new_val) - # @param [OpaqueValue] old_val - # @param [OpaqueValue] new_val - # @return [nil] + # @param [OpaqueValue] old_val + # @param [OpaqueValue] new_val + # @return [nil] # @scope class attach_function :replace_all_uses_with, :LLVMReplaceAllUsesWith, [OpaqueValue, OpaqueValue], :void - # (Not documented) - # + # @method has_metadata(val) - # @param [OpaqueValue] val - # @return [Integer] + # @param [OpaqueValue] val + # @return [Integer] # @scope class attach_function :has_metadata, :LLVMHasMetadata, [OpaqueValue], :int - # (Not documented) - # + # @method get_metadata(val, kind_id) - # @param [OpaqueValue] val - # @param [Integer] kind_id - # @return [OpaqueValue] + # @param [OpaqueValue] val + # @param [Integer] kind_id + # @return [OpaqueValue] # @scope class attach_function :get_metadata, :LLVMGetMetadata, [OpaqueValue, :uint], OpaqueValue - # (Not documented) - # + # @method set_metadata(val, kind_id, node) - # @param [OpaqueValue] val - # @param [Integer] kind_id - # @param [OpaqueValue] node - # @return [nil] + # @param [OpaqueValue] val + # @param [Integer] kind_id + # @param [OpaqueValue] node + # @return [nil] # @scope class attach_function :set_metadata, :LLVMSetMetadata, [OpaqueValue, :uint, OpaqueValue], :void - - # (Not documented) - # - # @method is_a_argument(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_argument, :LLVMIsAArgument, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_basic_block(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_basic_block, :LLVMIsABasicBlock, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_inline_asm(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_inline_asm, :LLVMIsAInlineAsm, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_amd_node(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_amd_node, :LLVMIsAMDNode, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_amd_string(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_amd_string, :LLVMIsAMDString, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_user(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_user, :LLVMIsAUser, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_constant(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_constant, :LLVMIsAConstant, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_block_address(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_block_address, :LLVMIsABlockAddress, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_constant_aggregate_zero(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_constant_aggregate_zero, :LLVMIsAConstantAggregateZero, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_constant_array(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_constant_array, :LLVMIsAConstantArray, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_constant_expr(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_constant_expr, :LLVMIsAConstantExpr, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_constant_fp(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_constant_fp, :LLVMIsAConstantFP, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_constant_int(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_constant_int, :LLVMIsAConstantInt, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_constant_pointer_null(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_constant_pointer_null, :LLVMIsAConstantPointerNull, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_constant_struct(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_constant_struct, :LLVMIsAConstantStruct, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_constant_vector(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_constant_vector, :LLVMIsAConstantVector, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_global_value(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_global_value, :LLVMIsAGlobalValue, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_function(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_function, :LLVMIsAFunction, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_global_alias(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_global_alias, :LLVMIsAGlobalAlias, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_global_variable(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_global_variable, :LLVMIsAGlobalVariable, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_undef_value(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_undef_value, :LLVMIsAUndefValue, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_instruction(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_instruction, :LLVMIsAInstruction, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_binary_operator(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_binary_operator, :LLVMIsABinaryOperator, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_call_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_call_inst, :LLVMIsACallInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_intrinsic_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_intrinsic_inst, :LLVMIsAIntrinsicInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_dbg_info_intrinsic(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_dbg_info_intrinsic, :LLVMIsADbgInfoIntrinsic, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_dbg_declare_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_dbg_declare_inst, :LLVMIsADbgDeclareInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_aeh_exception_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_aeh_exception_inst, :LLVMIsAEHExceptionInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_aeh_selector_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_aeh_selector_inst, :LLVMIsAEHSelectorInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_mem_intrinsic(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_mem_intrinsic, :LLVMIsAMemIntrinsic, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_mem_cpy_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_mem_cpy_inst, :LLVMIsAMemCpyInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_mem_move_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_mem_move_inst, :LLVMIsAMemMoveInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_mem_set_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_mem_set_inst, :LLVMIsAMemSetInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_cmp_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_cmp_inst, :LLVMIsACmpInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_af_cmp_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_af_cmp_inst, :LLVMIsAFCmpInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_ai_cmp_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_ai_cmp_inst, :LLVMIsAICmpInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_extract_element_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_extract_element_inst, :LLVMIsAExtractElementInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_get_element_ptr_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_get_element_ptr_inst, :LLVMIsAGetElementPtrInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_insert_element_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_insert_element_inst, :LLVMIsAInsertElementInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_insert_value_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_insert_value_inst, :LLVMIsAInsertValueInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_landing_pad_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_landing_pad_inst, :LLVMIsALandingPadInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_aphi_node(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_aphi_node, :LLVMIsAPHINode, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_select_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_select_inst, :LLVMIsASelectInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_shuffle_vector_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_shuffle_vector_inst, :LLVMIsAShuffleVectorInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_store_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_store_inst, :LLVMIsAStoreInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_terminator_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_terminator_inst, :LLVMIsATerminatorInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_branch_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_branch_inst, :LLVMIsABranchInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_indirect_br_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_indirect_br_inst, :LLVMIsAIndirectBrInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_invoke_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_invoke_inst, :LLVMIsAInvokeInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_return_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_return_inst, :LLVMIsAReturnInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_switch_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_switch_inst, :LLVMIsASwitchInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_unreachable_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_unreachable_inst, :LLVMIsAUnreachableInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_resume_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_resume_inst, :LLVMIsAResumeInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_unary_instruction(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_unary_instruction, :LLVMIsAUnaryInstruction, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_alloca_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_alloca_inst, :LLVMIsAAllocaInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_cast_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_cast_inst, :LLVMIsACastInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_bit_cast_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_bit_cast_inst, :LLVMIsABitCastInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_afp_ext_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_afp_ext_inst, :LLVMIsAFPExtInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_afp_to_si_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_afp_to_si_inst, :LLVMIsAFPToSIInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_afp_to_ui_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_afp_to_ui_inst, :LLVMIsAFPToUIInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_afp_trunc_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_afp_trunc_inst, :LLVMIsAFPTruncInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_int_to_ptr_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_int_to_ptr_inst, :LLVMIsAIntToPtrInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_ptr_to_int_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_ptr_to_int_inst, :LLVMIsAPtrToIntInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_as_ext_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_as_ext_inst, :LLVMIsASExtInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_asi_to_fp_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_asi_to_fp_inst, :LLVMIsASIToFPInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_trunc_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_trunc_inst, :LLVMIsATruncInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_aui_to_fp_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_aui_to_fp_inst, :LLVMIsAUIToFPInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_az_ext_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_az_ext_inst, :LLVMIsAZExtInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_extract_value_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_extract_value_inst, :LLVMIsAExtractValueInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_a_load_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_a_load_inst, :LLVMIsALoadInst, [OpaqueValue], OpaqueValue - - # (Not documented) - # - # @method is_ava_arg_inst(val) - # @param [OpaqueValue] val - # @return [OpaqueValue] - # @scope class - attach_function :is_ava_arg_inst, :LLVMIsAVAArgInst, [OpaqueValue], OpaqueValue - # Operations on Uses - # + # @method get_first_use(val) - # @param [OpaqueValue] val - # @return [OpaqueUse] + # @param [OpaqueValue] val + # @return [OpaqueUse] # @scope class attach_function :get_first_use, :LLVMGetFirstUse, [OpaqueValue], OpaqueUse - # (Not documented) - # + # @method get_next_use(u) - # @param [OpaqueUse] u - # @return [OpaqueUse] + # @param [OpaqueUse] u + # @return [OpaqueUse] # @scope class attach_function :get_next_use, :LLVMGetNextUse, [OpaqueUse], OpaqueUse - # (Not documented) - # + # @method get_user(u) - # @param [OpaqueUse] u - # @return [OpaqueValue] + # @param [OpaqueUse] u + # @return [OpaqueValue] # @scope class attach_function :get_user, :LLVMGetUser, [OpaqueUse], OpaqueValue - # (Not documented) - # + # @method get_used_value(u) - # @param [OpaqueUse] u - # @return [OpaqueValue] + # @param [OpaqueUse] u + # @return [OpaqueValue] # @scope class attach_function :get_used_value, :LLVMGetUsedValue, [OpaqueUse], OpaqueValue - # Operations on Users - # + # @method get_operand(val, index) - # @param [OpaqueValue] val - # @param [Integer] index - # @return [OpaqueValue] + # @param [OpaqueValue] val + # @param [Integer] index + # @return [OpaqueValue] # @scope class attach_function :get_operand, :LLVMGetOperand, [OpaqueValue, :uint], OpaqueValue - # (Not documented) - # + # @method set_operand(user, index, val) - # @param [OpaqueValue] user - # @param [Integer] index - # @param [OpaqueValue] val - # @return [nil] + # @param [OpaqueValue] user + # @param [Integer] index + # @param [OpaqueValue] val + # @return [nil] # @scope class attach_function :set_operand, :LLVMSetOperand, [OpaqueValue, :uint, OpaqueValue], :void - # (Not documented) - # + # @method get_num_operands(val) - # @param [OpaqueValue] val - # @return [Integer] + # @param [OpaqueValue] val + # @return [Integer] # @scope class attach_function :get_num_operands, :LLVMGetNumOperands, [OpaqueValue], :int - # Operations on constants of any type - # + # @method const_null(ty) - # @param [OpaqueType] ty - # @return [OpaqueValue] + # @param [OpaqueType] ty + # @return [OpaqueValue] # @scope class attach_function :const_null, :LLVMConstNull, [OpaqueType], OpaqueValue - # all zeroes - # + # @method const_all_ones(ty) - # @param [OpaqueType] ty - # @return [OpaqueValue] + # @param [OpaqueType] ty + # @return [OpaqueValue] # @scope class attach_function :const_all_ones, :LLVMConstAllOnes, [OpaqueType], OpaqueValue - # only for int/vector - # + # @method get_undef(ty) - # @param [OpaqueType] ty - # @return [OpaqueValue] + # @param [OpaqueType] ty + # @return [OpaqueValue] # @scope class attach_function :get_undef, :LLVMGetUndef, [OpaqueType], OpaqueValue - # (Not documented) - # + # @method is_constant(val) - # @param [OpaqueValue] val - # @return [Integer] + # @param [OpaqueValue] val + # @return [Integer] # @scope class attach_function :is_constant, :LLVMIsConstant, [OpaqueValue], :int - # (Not documented) - # + # @method is_null(val) - # @param [OpaqueValue] val - # @return [Integer] + # @param [OpaqueValue] val + # @return [Integer] # @scope class attach_function :is_null, :LLVMIsNull, [OpaqueValue], :int - # (Not documented) - # + # @method is_undef(val) - # @param [OpaqueValue] val - # @return [Integer] + # @param [OpaqueValue] val + # @return [Integer] # @scope class attach_function :is_undef, :LLVMIsUndef, [OpaqueValue], :int - # (Not documented) - # + # @method const_pointer_null(ty) - # @param [OpaqueType] ty - # @return [OpaqueValue] + # @param [OpaqueType] ty + # @return [OpaqueValue] # @scope class attach_function :const_pointer_null, :LLVMConstPointerNull, [OpaqueType], OpaqueValue - # Operations on metadata - # + # @method md_string_in_context(c, str, s_len) - # @param [OpaqueContext] c - # @param [String] str - # @param [Integer] s_len - # @return [OpaqueValue] + # @param [OpaqueContext] c + # @param [String] str + # @param [Integer] s_len + # @return [OpaqueValue] # @scope class attach_function :md_string_in_context, :LLVMMDStringInContext, [OpaqueContext, :string, :uint], OpaqueValue - # (Not documented) - # + # @method md_string(str, s_len) - # @param [String] str - # @param [Integer] s_len - # @return [OpaqueValue] + # @param [String] str + # @param [Integer] s_len + # @return [OpaqueValue] # @scope class attach_function :md_string, :LLVMMDString, [:string, :uint], OpaqueValue - # (Not documented) - # + # @method md_node_in_context(c, vals, count) - # @param [OpaqueContext] c - # @param [FFI::Pointer(*ValueRef)] vals - # @param [Integer] count - # @return [OpaqueValue] + # @param [OpaqueContext] c + # @param [FFI::Pointer(*ValueRef)] vals + # @param [Integer] count + # @return [OpaqueValue] # @scope class attach_function :md_node_in_context, :LLVMMDNodeInContext, [OpaqueContext, :pointer, :uint], OpaqueValue - # (Not documented) - # + # @method md_node(vals, count) - # @param [FFI::Pointer(*ValueRef)] vals - # @param [Integer] count - # @return [OpaqueValue] + # @param [FFI::Pointer(*ValueRef)] vals + # @param [Integer] count + # @return [OpaqueValue] # @scope class attach_function :md_node, :LLVMMDNode, [:pointer, :uint], OpaqueValue - # (Not documented) - # + # @method get_md_string(v, len) - # @param [OpaqueValue] v - # @param [FFI::Pointer(*UInt)] len - # @return [String] + # @param [OpaqueValue] v + # @param [FFI::Pointer(*UInt)] len + # @return [String] # @scope class attach_function :get_md_string, :LLVMGetMDString, [OpaqueValue, :pointer], :string - # (Not documented) - # + # @method get_md_node_num_operands(v) - # @param [OpaqueValue] v - # @return [Integer] + # @param [OpaqueValue] v + # @return [Integer] # @scope class attach_function :get_md_node_num_operands, :LLVMGetMDNodeNumOperands, [OpaqueValue], :int - # (Not documented) - # + # @method get_md_node_operand(v, i) - # @param [OpaqueValue] v - # @param [Integer] i - # @return [FFI::Pointer(*ValueRef)] + # @param [OpaqueValue] v + # @param [Integer] i + # @return [FFI::Pointer(*ValueRef)] # @scope class attach_function :get_md_node_operand, :LLVMGetMDNodeOperand, [OpaqueValue, :uint], :pointer - # (Not documented) - # + # @method get_named_metadata_num_operands(m, name) - # @param [OpaqueModule] m - # @param [String] name - # @return [Integer] + # @param [OpaqueModule] m + # @param [String] name + # @return [Integer] # @scope class attach_function :get_named_metadata_num_operands, :LLVMGetNamedMetadataNumOperands, [OpaqueModule, :string], :uint - # (Not documented) - # + # @method get_named_metadata_operands(m, name, dest) - # @param [OpaqueModule] m - # @param [String] name - # @param [FFI::Pointer(*ValueRef)] dest - # @return [nil] + # @param [OpaqueModule] m + # @param [String] name + # @param [FFI::Pointer(*ValueRef)] dest + # @return [nil] # @scope class attach_function :get_named_metadata_operands, :LLVMGetNamedMetadataOperands, [OpaqueModule, :string, :pointer], :void - # Operations on scalar constants - # + # @method const_int(int_ty, n, sign_extend) - # @param [OpaqueType] int_ty - # @param [Integer] n - # @param [Integer] sign_extend - # @return [OpaqueValue] + # @param [OpaqueType] int_ty + # @param [Integer] n + # @param [Integer] sign_extend + # @return [OpaqueValue] # @scope class attach_function :const_int, :LLVMConstInt, [OpaqueType, :ulong_long, :int], OpaqueValue - # (Not documented) - # + # @method const_int_of_arbitrary_precision(int_ty, num_words, words) - # @param [OpaqueType] int_ty - # @param [Integer] num_words - # @param [Array] words - # @return [OpaqueValue] + # @param [OpaqueType] int_ty + # @param [Integer] num_words + # @param [FFI::Pointer(*U_long_long)] words + # @return [OpaqueValue] # @scope class attach_function :const_int_of_arbitrary_precision, :LLVMConstIntOfArbitraryPrecision, [OpaqueType, :uint, :pointer], OpaqueValue - # (Not documented) - # + # @method const_int_of_string(int_ty, text, radix) - # @param [OpaqueType] int_ty - # @param [String] text - # @param [Integer] radix - # @return [OpaqueValue] + # @param [OpaqueType] int_ty + # @param [String] text + # @param [Integer] radix + # @return [OpaqueValue] # @scope class attach_function :const_int_of_string, :LLVMConstIntOfString, [OpaqueType, :string, :uchar], OpaqueValue - # (Not documented) - # + # @method const_int_of_string_and_size(int_ty, text, s_len, radix) - # @param [OpaqueType] int_ty - # @param [String] text - # @param [Integer] s_len - # @param [Integer] radix - # @return [OpaqueValue] + # @param [OpaqueType] int_ty + # @param [String] text + # @param [Integer] s_len + # @param [Integer] radix + # @return [OpaqueValue] # @scope class attach_function :const_int_of_string_and_size, :LLVMConstIntOfStringAndSize, [OpaqueType, :string, :uint, :uchar], OpaqueValue - # (Not documented) - # + # @method const_real(real_ty, n) - # @param [OpaqueType] real_ty - # @param [Float] n - # @return [OpaqueValue] + # @param [OpaqueType] real_ty + # @param [Float] n + # @return [OpaqueValue] # @scope class attach_function :const_real, :LLVMConstReal, [OpaqueType, :double], OpaqueValue - # (Not documented) - # + # @method const_real_of_string(real_ty, text) - # @param [OpaqueType] real_ty - # @param [String] text - # @return [OpaqueValue] + # @param [OpaqueType] real_ty + # @param [String] text + # @return [OpaqueValue] # @scope class attach_function :const_real_of_string, :LLVMConstRealOfString, [OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method const_real_of_string_and_size(real_ty, text, s_len) - # @param [OpaqueType] real_ty - # @param [String] text - # @param [Integer] s_len - # @return [OpaqueValue] + # @param [OpaqueType] real_ty + # @param [String] text + # @param [Integer] s_len + # @return [OpaqueValue] # @scope class attach_function :const_real_of_string_and_size, :LLVMConstRealOfStringAndSize, [OpaqueType, :string, :uint], OpaqueValue - # (Not documented) - # + # @method const_int_get_z_ext_value(constant_val) - # @param [OpaqueValue] constant_val - # @return [Integer] + # @param [OpaqueValue] constant_val + # @return [Integer] # @scope class attach_function :const_int_get_z_ext_value, :LLVMConstIntGetZExtValue, [OpaqueValue], :ulong_long - # (Not documented) - # + # @method const_int_get_s_ext_value(constant_val) - # @param [OpaqueValue] constant_val - # @return [Integer] + # @param [OpaqueValue] constant_val + # @return [Integer] # @scope class attach_function :const_int_get_s_ext_value, :LLVMConstIntGetSExtValue, [OpaqueValue], :long_long - # Operations on composite constants - # + # @method const_string_in_context(c, str, length, dont_null_terminate) - # @param [OpaqueContext] c - # @param [String] str - # @param [Integer] length - # @param [Integer] dont_null_terminate - # @return [OpaqueValue] + # @param [OpaqueContext] c + # @param [String] str + # @param [Integer] length + # @param [Integer] dont_null_terminate + # @return [OpaqueValue] # @scope class attach_function :const_string_in_context, :LLVMConstStringInContext, [OpaqueContext, :string, :uint, :int], OpaqueValue - # (Not documented) - # + # @method const_struct_in_context(c, constant_vals, count, packed) - # @param [OpaqueContext] c - # @param [FFI::Pointer(*ValueRef)] constant_vals - # @param [Integer] count - # @param [Integer] packed - # @return [OpaqueValue] + # @param [OpaqueContext] c + # @param [FFI::Pointer(*ValueRef)] constant_vals + # @param [Integer] count + # @param [Integer] packed + # @return [OpaqueValue] # @scope class attach_function :const_struct_in_context, :LLVMConstStructInContext, [OpaqueContext, :pointer, :uint, :int], OpaqueValue - # (Not documented) - # + # @method const_string(str, length, dont_null_terminate) - # @param [String] str - # @param [Integer] length - # @param [Integer] dont_null_terminate - # @return [OpaqueValue] + # @param [String] str + # @param [Integer] length + # @param [Integer] dont_null_terminate + # @return [OpaqueValue] # @scope class attach_function :const_string, :LLVMConstString, [:string, :uint, :int], OpaqueValue - # (Not documented) - # + # @method const_array(element_ty, constant_vals, length) - # @param [OpaqueType] element_ty - # @param [FFI::Pointer(*ValueRef)] constant_vals - # @param [Integer] length - # @return [OpaqueValue] + # @param [OpaqueType] element_ty + # @param [FFI::Pointer(*ValueRef)] constant_vals + # @param [Integer] length + # @return [OpaqueValue] # @scope class attach_function :const_array, :LLVMConstArray, [OpaqueType, :pointer, :uint], OpaqueValue - # (Not documented) - # + # @method const_struct(constant_vals, count, packed) - # @param [FFI::Pointer(*ValueRef)] constant_vals - # @param [Integer] count - # @param [Integer] packed - # @return [OpaqueValue] + # @param [FFI::Pointer(*ValueRef)] constant_vals + # @param [Integer] count + # @param [Integer] packed + # @return [OpaqueValue] # @scope class attach_function :const_struct, :LLVMConstStruct, [:pointer, :uint, :int], OpaqueValue - # (Not documented) - # + # @method const_named_struct(struct_ty, constant_vals, count) - # @param [OpaqueType] struct_ty - # @param [FFI::Pointer(*ValueRef)] constant_vals - # @param [Integer] count - # @return [OpaqueValue] + # @param [OpaqueType] struct_ty + # @param [FFI::Pointer(*ValueRef)] constant_vals + # @param [Integer] count + # @return [OpaqueValue] # @scope class attach_function :const_named_struct, :LLVMConstNamedStruct, [OpaqueType, :pointer, :uint], OpaqueValue - # (Not documented) - # + # @method const_vector(scalar_constant_vals, size) - # @param [FFI::Pointer(*ValueRef)] scalar_constant_vals - # @param [Integer] size - # @return [OpaqueValue] + # @param [FFI::Pointer(*ValueRef)] scalar_constant_vals + # @param [Integer] size + # @return [OpaqueValue] # @scope class attach_function :const_vector, :LLVMConstVector, [:pointer, :uint], OpaqueValue - # Constant expressions - # + # @method get_const_opcode(constant_val) - # @param [OpaqueValue] constant_val - # @return [Symbol from _enum_opcode_] + # @param [OpaqueValue] constant_val + # @return [Symbol from _enum_opcode_] # @scope class attach_function :get_const_opcode, :LLVMGetConstOpcode, [OpaqueValue], :opcode - # (Not documented) - # + # @method align_of(ty) - # @param [OpaqueType] ty - # @return [OpaqueValue] + # @param [OpaqueType] ty + # @return [OpaqueValue] # @scope class attach_function :align_of, :LLVMAlignOf, [OpaqueType], OpaqueValue - # (Not documented) - # + # @method size_of(ty) - # @param [OpaqueType] ty - # @return [OpaqueValue] + # @param [OpaqueType] ty + # @return [OpaqueValue] # @scope class attach_function :size_of, :LLVMSizeOf, [OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_neg(constant_val) - # @param [OpaqueValue] constant_val - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @return [OpaqueValue] # @scope class attach_function :const_neg, :LLVMConstNeg, [OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_nsw_neg(constant_val) - # @param [OpaqueValue] constant_val - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @return [OpaqueValue] # @scope class attach_function :const_nsw_neg, :LLVMConstNSWNeg, [OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_nuw_neg(constant_val) - # @param [OpaqueValue] constant_val - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @return [OpaqueValue] # @scope class attach_function :const_nuw_neg, :LLVMConstNUWNeg, [OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_f_neg(constant_val) - # @param [OpaqueValue] constant_val - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @return [OpaqueValue] # @scope class attach_function :const_f_neg, :LLVMConstFNeg, [OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_not(constant_val) - # @param [OpaqueValue] constant_val - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @return [OpaqueValue] # @scope class attach_function :const_not, :LLVMConstNot, [OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_add(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_add, :LLVMConstAdd, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_nsw_add(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_nsw_add, :LLVMConstNSWAdd, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_nuw_add(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_nuw_add, :LLVMConstNUWAdd, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_f_add(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_f_add, :LLVMConstFAdd, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_sub(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_sub, :LLVMConstSub, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_nsw_sub(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_nsw_sub, :LLVMConstNSWSub, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_nuw_sub(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_nuw_sub, :LLVMConstNUWSub, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_f_sub(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_f_sub, :LLVMConstFSub, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_mul(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_mul, :LLVMConstMul, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_nsw_mul(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_nsw_mul, :LLVMConstNSWMul, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_nuw_mul(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_nuw_mul, :LLVMConstNUWMul, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_f_mul(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_f_mul, :LLVMConstFMul, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_u_div(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_u_div, :LLVMConstUDiv, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_s_div(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_s_div, :LLVMConstSDiv, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_exact_s_div(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_exact_s_div, :LLVMConstExactSDiv, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_f_div(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_f_div, :LLVMConstFDiv, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_u_rem(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_u_rem, :LLVMConstURem, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_s_rem(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_s_rem, :LLVMConstSRem, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_f_rem(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_f_rem, :LLVMConstFRem, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_and(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_and, :LLVMConstAnd, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_or(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_or, :LLVMConstOr, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_xor(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_xor, :LLVMConstXor, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_i_cmp(predicate, lhs_constant, rhs_constant) - # @param [Symbol from _enum_int_predicate_] predicate - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [Symbol from _enum_int_predicate_] predicate + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_i_cmp, :LLVMConstICmp, [:int_predicate, OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_f_cmp(predicate, lhs_constant, rhs_constant) - # @param [Symbol from _enum_real_predicate_] predicate - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [Symbol from _enum_real_predicate_] predicate + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_f_cmp, :LLVMConstFCmp, [:real_predicate, OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_shl(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_shl, :LLVMConstShl, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_l_shr(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_l_shr, :LLVMConstLShr, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_a_shr(lhs_constant, rhs_constant) - # @param [OpaqueValue] lhs_constant - # @param [OpaqueValue] rhs_constant - # @return [OpaqueValue] + # @param [OpaqueValue] lhs_constant + # @param [OpaqueValue] rhs_constant + # @return [OpaqueValue] # @scope class attach_function :const_a_shr, :LLVMConstAShr, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_gep(constant_val, constant_indices, num_indices) - # @param [OpaqueValue] constant_val - # @param [FFI::Pointer(*ValueRef)] constant_indices - # @param [Integer] num_indices - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [FFI::Pointer(*ValueRef)] constant_indices + # @param [Integer] num_indices + # @return [OpaqueValue] # @scope class attach_function :const_gep, :LLVMConstGEP, [OpaqueValue, :pointer, :uint], OpaqueValue - # (Not documented) - # + # @method const_in_bounds_gep(constant_val, constant_indices, num_indices) - # @param [OpaqueValue] constant_val - # @param [FFI::Pointer(*ValueRef)] constant_indices - # @param [Integer] num_indices - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [FFI::Pointer(*ValueRef)] constant_indices + # @param [Integer] num_indices + # @return [OpaqueValue] # @scope class attach_function :const_in_bounds_gep, :LLVMConstInBoundsGEP, [OpaqueValue, :pointer, :uint], OpaqueValue - # (Not documented) - # + # @method const_trunc(constant_val, to_type) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @return [OpaqueValue] # @scope class attach_function :const_trunc, :LLVMConstTrunc, [OpaqueValue, OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_s_ext(constant_val, to_type) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @return [OpaqueValue] # @scope class attach_function :const_s_ext, :LLVMConstSExt, [OpaqueValue, OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_z_ext(constant_val, to_type) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @return [OpaqueValue] # @scope class attach_function :const_z_ext, :LLVMConstZExt, [OpaqueValue, OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_fp_trunc(constant_val, to_type) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @return [OpaqueValue] # @scope class attach_function :const_fp_trunc, :LLVMConstFPTrunc, [OpaqueValue, OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_fp_ext(constant_val, to_type) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @return [OpaqueValue] # @scope class attach_function :const_fp_ext, :LLVMConstFPExt, [OpaqueValue, OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_ui_to_fp(constant_val, to_type) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @return [OpaqueValue] # @scope class attach_function :const_ui_to_fp, :LLVMConstUIToFP, [OpaqueValue, OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_si_to_fp(constant_val, to_type) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @return [OpaqueValue] # @scope class attach_function :const_si_to_fp, :LLVMConstSIToFP, [OpaqueValue, OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_fp_to_ui(constant_val, to_type) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @return [OpaqueValue] # @scope class attach_function :const_fp_to_ui, :LLVMConstFPToUI, [OpaqueValue, OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_fp_to_si(constant_val, to_type) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @return [OpaqueValue] # @scope class attach_function :const_fp_to_si, :LLVMConstFPToSI, [OpaqueValue, OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_ptr_to_int(constant_val, to_type) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @return [OpaqueValue] # @scope class attach_function :const_ptr_to_int, :LLVMConstPtrToInt, [OpaqueValue, OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_int_to_ptr(constant_val, to_type) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @return [OpaqueValue] # @scope class attach_function :const_int_to_ptr, :LLVMConstIntToPtr, [OpaqueValue, OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_bit_cast(constant_val, to_type) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @return [OpaqueValue] # @scope class attach_function :const_bit_cast, :LLVMConstBitCast, [OpaqueValue, OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_z_ext_or_bit_cast(constant_val, to_type) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @return [OpaqueValue] # @scope class attach_function :const_z_ext_or_bit_cast, :LLVMConstZExtOrBitCast, [OpaqueValue, OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_s_ext_or_bit_cast(constant_val, to_type) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @return [OpaqueValue] # @scope class attach_function :const_s_ext_or_bit_cast, :LLVMConstSExtOrBitCast, [OpaqueValue, OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_trunc_or_bit_cast(constant_val, to_type) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @return [OpaqueValue] # @scope class attach_function :const_trunc_or_bit_cast, :LLVMConstTruncOrBitCast, [OpaqueValue, OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_pointer_cast(constant_val, to_type) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @return [OpaqueValue] # @scope class attach_function :const_pointer_cast, :LLVMConstPointerCast, [OpaqueValue, OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_int_cast(constant_val, to_type, is_signed) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @param [Integer] is_signed - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @param [Integer] is_signed + # @return [OpaqueValue] # @scope class attach_function :const_int_cast, :LLVMConstIntCast, [OpaqueValue, OpaqueType, :int], OpaqueValue - # (Not documented) - # + # @method const_fp_cast(constant_val, to_type) - # @param [OpaqueValue] constant_val - # @param [OpaqueType] to_type - # @return [OpaqueValue] + # @param [OpaqueValue] constant_val + # @param [OpaqueType] to_type + # @return [OpaqueValue] # @scope class attach_function :const_fp_cast, :LLVMConstFPCast, [OpaqueValue, OpaqueType], OpaqueValue - # (Not documented) - # + # @method const_select(constant_condition, constant_if_true, constant_if_false) - # @param [OpaqueValue] constant_condition - # @param [OpaqueValue] constant_if_true - # @param [OpaqueValue] constant_if_false - # @return [OpaqueValue] + # @param [OpaqueValue] constant_condition + # @param [OpaqueValue] constant_if_true + # @param [OpaqueValue] constant_if_false + # @return [OpaqueValue] # @scope class attach_function :const_select, :LLVMConstSelect, [OpaqueValue, OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_extract_element(vector_constant, index_constant) - # @param [OpaqueValue] vector_constant - # @param [OpaqueValue] index_constant - # @return [OpaqueValue] + # @param [OpaqueValue] vector_constant + # @param [OpaqueValue] index_constant + # @return [OpaqueValue] # @scope class attach_function :const_extract_element, :LLVMConstExtractElement, [OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_insert_element(vector_constant, element_value_constant, index_constant) - # @param [OpaqueValue] vector_constant - # @param [OpaqueValue] element_value_constant - # @param [OpaqueValue] index_constant - # @return [OpaqueValue] + # @param [OpaqueValue] vector_constant + # @param [OpaqueValue] element_value_constant + # @param [OpaqueValue] index_constant + # @return [OpaqueValue] # @scope class attach_function :const_insert_element, :LLVMConstInsertElement, [OpaqueValue, OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_shuffle_vector(vector_a_constant, vector_b_constant, mask_constant) - # @param [OpaqueValue] vector_a_constant - # @param [OpaqueValue] vector_b_constant - # @param [OpaqueValue] mask_constant - # @return [OpaqueValue] + # @param [OpaqueValue] vector_a_constant + # @param [OpaqueValue] vector_b_constant + # @param [OpaqueValue] mask_constant + # @return [OpaqueValue] # @scope class attach_function :const_shuffle_vector, :LLVMConstShuffleVector, [OpaqueValue, OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method const_extract_value(agg_constant, idx_list, num_idx) - # @param [OpaqueValue] agg_constant - # @param [FFI::Pointer(*UInt)] idx_list - # @param [Integer] num_idx - # @return [OpaqueValue] + # @param [OpaqueValue] agg_constant + # @param [FFI::Pointer(*UInt)] idx_list + # @param [Integer] num_idx + # @return [OpaqueValue] # @scope class attach_function :const_extract_value, :LLVMConstExtractValue, [OpaqueValue, :pointer, :uint], OpaqueValue - # (Not documented) - # + # @method const_insert_value(agg_constant, element_value_constant, idx_list, num_idx) - # @param [OpaqueValue] agg_constant - # @param [OpaqueValue] element_value_constant - # @param [FFI::Pointer(*UInt)] idx_list - # @param [Integer] num_idx - # @return [OpaqueValue] + # @param [OpaqueValue] agg_constant + # @param [OpaqueValue] element_value_constant + # @param [FFI::Pointer(*UInt)] idx_list + # @param [Integer] num_idx + # @return [OpaqueValue] # @scope class attach_function :const_insert_value, :LLVMConstInsertValue, [OpaqueValue, OpaqueValue, :pointer, :uint], OpaqueValue - # (Not documented) - # + # @method const_inline_asm(ty, asm_string, constraints, has_side_effects, is_align_stack) - # @param [OpaqueType] ty - # @param [String] asm_string - # @param [String] constraints - # @param [Integer] has_side_effects - # @param [Integer] is_align_stack - # @return [OpaqueValue] + # @param [OpaqueType] ty + # @param [String] asm_string + # @param [String] constraints + # @param [Integer] has_side_effects + # @param [Integer] is_align_stack + # @return [OpaqueValue] # @scope class attach_function :const_inline_asm, :LLVMConstInlineAsm, [OpaqueType, :string, :string, :int, :int], OpaqueValue - # (Not documented) - # + # @method block_address(f, bb) - # @param [OpaqueValue] f - # @param [OpaqueBasicBlock] bb - # @return [OpaqueValue] + # @param [OpaqueValue] f + # @param [OpaqueBasicBlock] bb + # @return [OpaqueValue] # @scope class attach_function :block_address, :LLVMBlockAddress, [OpaqueValue, OpaqueBasicBlock], OpaqueValue - # Operations on global variables, functions, and aliases (globals) - # + # @method get_global_parent(global) - # @param [OpaqueValue] global - # @return [OpaqueModule] + # @param [OpaqueValue] global + # @return [OpaqueModule] # @scope class attach_function :get_global_parent, :LLVMGetGlobalParent, [OpaqueValue], OpaqueModule - # (Not documented) - # + # @method is_declaration(global) - # @param [OpaqueValue] global - # @return [Integer] + # @param [OpaqueValue] global + # @return [Integer] # @scope class attach_function :is_declaration, :LLVMIsDeclaration, [OpaqueValue], :int - # (Not documented) - # + # @method get_linkage(global) - # @param [OpaqueValue] global - # @return [Symbol from _enum_linkage_] + # @param [OpaqueValue] global + # @return [Symbol from _enum_linkage_] # @scope class attach_function :get_linkage, :LLVMGetLinkage, [OpaqueValue], :linkage - # (Not documented) - # + # @method set_linkage(global, linkage) - # @param [OpaqueValue] global - # @param [Symbol from _enum_linkage_] linkage - # @return [nil] + # @param [OpaqueValue] global + # @param [Symbol from _enum_linkage_] linkage + # @return [nil] # @scope class attach_function :set_linkage, :LLVMSetLinkage, [OpaqueValue, :linkage], :void - # (Not documented) - # + # @method get_section(global) - # @param [OpaqueValue] global - # @return [String] + # @param [OpaqueValue] global + # @return [String] # @scope class attach_function :get_section, :LLVMGetSection, [OpaqueValue], :string - # (Not documented) - # + # @method set_section(global, section) - # @param [OpaqueValue] global - # @param [String] section - # @return [nil] + # @param [OpaqueValue] global + # @param [String] section + # @return [nil] # @scope class attach_function :set_section, :LLVMSetSection, [OpaqueValue, :string], :void - # (Not documented) - # + # @method get_visibility(global) - # @param [OpaqueValue] global - # @return [Symbol from _enum_visibility_] + # @param [OpaqueValue] global + # @return [Symbol from _enum_visibility_] # @scope class attach_function :get_visibility, :LLVMGetVisibility, [OpaqueValue], :visibility - # (Not documented) - # + # @method set_visibility(global, viz) - # @param [OpaqueValue] global - # @param [Symbol from _enum_visibility_] viz - # @return [nil] + # @param [OpaqueValue] global + # @param [Symbol from _enum_visibility_] viz + # @return [nil] # @scope class attach_function :set_visibility, :LLVMSetVisibility, [OpaqueValue, :visibility], :void - # (Not documented) - # + # @method get_alignment(global) - # @param [OpaqueValue] global - # @return [Integer] + # @param [OpaqueValue] global + # @return [Integer] # @scope class attach_function :get_alignment, :LLVMGetAlignment, [OpaqueValue], :uint - # (Not documented) - # + # @method set_alignment(global, bytes) - # @param [OpaqueValue] global - # @param [Integer] bytes - # @return [nil] + # @param [OpaqueValue] global + # @param [Integer] bytes + # @return [nil] # @scope class attach_function :set_alignment, :LLVMSetAlignment, [OpaqueValue, :uint], :void - # Operations on global variables - # + # @method add_global(m, ty, name) - # @param [OpaqueModule] m - # @param [OpaqueType] ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueModule] m + # @param [OpaqueType] ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :add_global, :LLVMAddGlobal, [OpaqueModule, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method add_global_in_address_space(m, ty, name, address_space) - # @param [OpaqueModule] m - # @param [OpaqueType] ty - # @param [String] name - # @param [Integer] address_space - # @return [OpaqueValue] + # @param [OpaqueModule] m + # @param [OpaqueType] ty + # @param [String] name + # @param [Integer] address_space + # @return [OpaqueValue] # @scope class attach_function :add_global_in_address_space, :LLVMAddGlobalInAddressSpace, [OpaqueModule, OpaqueType, :string, :uint], OpaqueValue - # (Not documented) - # + # @method get_named_global(m, name) - # @param [OpaqueModule] m - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueModule] m + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :get_named_global, :LLVMGetNamedGlobal, [OpaqueModule, :string], OpaqueValue - # (Not documented) - # + # @method get_first_global(m) - # @param [OpaqueModule] m - # @return [OpaqueValue] + # @param [OpaqueModule] m + # @return [OpaqueValue] # @scope class attach_function :get_first_global, :LLVMGetFirstGlobal, [OpaqueModule], OpaqueValue - # (Not documented) - # + # @method get_last_global(m) - # @param [OpaqueModule] m - # @return [OpaqueValue] + # @param [OpaqueModule] m + # @return [OpaqueValue] # @scope class attach_function :get_last_global, :LLVMGetLastGlobal, [OpaqueModule], OpaqueValue - # (Not documented) - # + # @method get_next_global(global_var) - # @param [OpaqueValue] global_var - # @return [OpaqueValue] + # @param [OpaqueValue] global_var + # @return [OpaqueValue] # @scope class attach_function :get_next_global, :LLVMGetNextGlobal, [OpaqueValue], OpaqueValue - # (Not documented) - # + # @method get_previous_global(global_var) - # @param [OpaqueValue] global_var - # @return [OpaqueValue] + # @param [OpaqueValue] global_var + # @return [OpaqueValue] # @scope class attach_function :get_previous_global, :LLVMGetPreviousGlobal, [OpaqueValue], OpaqueValue - # (Not documented) - # + # @method delete_global(global_var) - # @param [OpaqueValue] global_var - # @return [nil] + # @param [OpaqueValue] global_var + # @return [nil] # @scope class attach_function :delete_global, :LLVMDeleteGlobal, [OpaqueValue], :void - # (Not documented) - # + # @method get_initializer(global_var) - # @param [OpaqueValue] global_var - # @return [OpaqueValue] + # @param [OpaqueValue] global_var + # @return [OpaqueValue] # @scope class attach_function :get_initializer, :LLVMGetInitializer, [OpaqueValue], OpaqueValue - # (Not documented) - # + # @method set_initializer(global_var, constant_val) - # @param [OpaqueValue] global_var - # @param [OpaqueValue] constant_val - # @return [nil] + # @param [OpaqueValue] global_var + # @param [OpaqueValue] constant_val + # @return [nil] # @scope class attach_function :set_initializer, :LLVMSetInitializer, [OpaqueValue, OpaqueValue], :void - # (Not documented) - # + # @method is_thread_local(global_var) - # @param [OpaqueValue] global_var - # @return [Integer] + # @param [OpaqueValue] global_var + # @return [Integer] # @scope class attach_function :is_thread_local, :LLVMIsThreadLocal, [OpaqueValue], :int - # (Not documented) - # + # @method set_thread_local(global_var, is_thread_local) - # @param [OpaqueValue] global_var - # @param [Integer] is_thread_local - # @return [nil] + # @param [OpaqueValue] global_var + # @param [Integer] is_thread_local + # @return [nil] # @scope class attach_function :set_thread_local, :LLVMSetThreadLocal, [OpaqueValue, :int], :void - # (Not documented) - # + # @method is_global_constant(global_var) - # @param [OpaqueValue] global_var - # @return [Integer] + # @param [OpaqueValue] global_var + # @return [Integer] # @scope class attach_function :is_global_constant, :LLVMIsGlobalConstant, [OpaqueValue], :int - # (Not documented) - # + # @method set_global_constant(global_var, is_constant) - # @param [OpaqueValue] global_var - # @param [Integer] is_constant - # @return [nil] + # @param [OpaqueValue] global_var + # @param [Integer] is_constant + # @return [nil] # @scope class attach_function :set_global_constant, :LLVMSetGlobalConstant, [OpaqueValue, :int], :void - # Operations on aliases - # + # @method add_alias(m, ty, aliasee, name) - # @param [OpaqueModule] m - # @param [OpaqueType] ty - # @param [OpaqueValue] aliasee - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueModule] m + # @param [OpaqueType] ty + # @param [OpaqueValue] aliasee + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :add_alias, :LLVMAddAlias, [OpaqueModule, OpaqueType, OpaqueValue, :string], OpaqueValue - # Operations on functions - # + # @method add_function(m, name, function_ty) - # @param [OpaqueModule] m - # @param [String] name - # @param [OpaqueType] function_ty - # @return [OpaqueValue] + # @param [OpaqueModule] m + # @param [String] name + # @param [OpaqueType] function_ty + # @return [OpaqueValue] # @scope class attach_function :add_function, :LLVMAddFunction, [OpaqueModule, :string, OpaqueType], OpaqueValue - # (Not documented) - # + # @method get_named_function(m, name) - # @param [OpaqueModule] m - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueModule] m + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :get_named_function, :LLVMGetNamedFunction, [OpaqueModule, :string], OpaqueValue - # (Not documented) - # + # @method get_first_function(m) - # @param [OpaqueModule] m - # @return [OpaqueValue] + # @param [OpaqueModule] m + # @return [OpaqueValue] # @scope class attach_function :get_first_function, :LLVMGetFirstFunction, [OpaqueModule], OpaqueValue - # (Not documented) - # + # @method get_last_function(m) - # @param [OpaqueModule] m - # @return [OpaqueValue] + # @param [OpaqueModule] m + # @return [OpaqueValue] # @scope class attach_function :get_last_function, :LLVMGetLastFunction, [OpaqueModule], OpaqueValue - # (Not documented) - # + # @method get_next_function(fn) - # @param [OpaqueValue] fn - # @return [OpaqueValue] + # @param [OpaqueValue] fn + # @return [OpaqueValue] # @scope class attach_function :get_next_function, :LLVMGetNextFunction, [OpaqueValue], OpaqueValue - # (Not documented) - # + # @method get_previous_function(fn) - # @param [OpaqueValue] fn - # @return [OpaqueValue] + # @param [OpaqueValue] fn + # @return [OpaqueValue] # @scope class attach_function :get_previous_function, :LLVMGetPreviousFunction, [OpaqueValue], OpaqueValue - # (Not documented) - # + # @method delete_function(fn) - # @param [OpaqueValue] fn - # @return [nil] + # @param [OpaqueValue] fn + # @return [nil] # @scope class attach_function :delete_function, :LLVMDeleteFunction, [OpaqueValue], :void - # (Not documented) - # + # @method get_intrinsic_id(fn) - # @param [OpaqueValue] fn - # @return [Integer] + # @param [OpaqueValue] fn + # @return [Integer] # @scope class attach_function :get_intrinsic_id, :LLVMGetIntrinsicID, [OpaqueValue], :uint - # (Not documented) - # + # @method get_function_call_conv(fn) - # @param [OpaqueValue] fn - # @return [Integer] + # @param [OpaqueValue] fn + # @return [Integer] # @scope class attach_function :get_function_call_conv, :LLVMGetFunctionCallConv, [OpaqueValue], :uint - # (Not documented) - # + # @method set_function_call_conv(fn, cc) - # @param [OpaqueValue] fn - # @param [Integer] cc - # @return [nil] + # @param [OpaqueValue] fn + # @param [Integer] cc + # @return [nil] # @scope class attach_function :set_function_call_conv, :LLVMSetFunctionCallConv, [OpaqueValue, :uint], :void - # (Not documented) - # + # @method get_gc(fn) - # @param [OpaqueValue] fn - # @return [String] + # @param [OpaqueValue] fn + # @return [String] # @scope class attach_function :get_gc, :LLVMGetGC, [OpaqueValue], :string - # (Not documented) - # + # @method set_gc(fn, name) - # @param [OpaqueValue] fn - # @param [String] name - # @return [nil] + # @param [OpaqueValue] fn + # @param [String] name + # @return [nil] # @scope class attach_function :set_gc, :LLVMSetGC, [OpaqueValue, :string], :void - # (Not documented) - # + # @method add_function_attr(fn, pa) - # @param [OpaqueValue] fn - # @param [Symbol from _enum_attribute_] pa - # @return [nil] + # @param [OpaqueValue] fn + # @param [Symbol from _enum_attribute_] pa + # @return [nil] # @scope class attach_function :add_function_attr, :LLVMAddFunctionAttr, [OpaqueValue, :attribute], :void - # (Not documented) - # + # @method get_function_attr(fn) - # @param [OpaqueValue] fn - # @return [Symbol from _enum_attribute_] + # @param [OpaqueValue] fn + # @return [Symbol from _enum_attribute_] # @scope class attach_function :get_function_attr, :LLVMGetFunctionAttr, [OpaqueValue], :attribute - # (Not documented) - # + # @method remove_function_attr(fn, pa) - # @param [OpaqueValue] fn - # @param [Symbol from _enum_attribute_] pa - # @return [nil] + # @param [OpaqueValue] fn + # @param [Symbol from _enum_attribute_] pa + # @return [nil] # @scope class attach_function :remove_function_attr, :LLVMRemoveFunctionAttr, [OpaqueValue, :attribute], :void - # Operations on parameters - # + # @method count_params(fn) - # @param [OpaqueValue] fn - # @return [Integer] + # @param [OpaqueValue] fn + # @return [Integer] # @scope class attach_function :count_params, :LLVMCountParams, [OpaqueValue], :uint - # (Not documented) - # + # @method get_params(fn, params) - # @param [OpaqueValue] fn - # @param [FFI::Pointer(*ValueRef)] params - # @return [nil] + # @param [OpaqueValue] fn + # @param [FFI::Pointer(*ValueRef)] params + # @return [nil] # @scope class attach_function :get_params, :LLVMGetParams, [OpaqueValue, :pointer], :void - # (Not documented) - # + # @method get_param(fn, index) - # @param [OpaqueValue] fn - # @param [Integer] index - # @return [OpaqueValue] + # @param [OpaqueValue] fn + # @param [Integer] index + # @return [OpaqueValue] # @scope class attach_function :get_param, :LLVMGetParam, [OpaqueValue, :uint], OpaqueValue - # (Not documented) - # + # @method get_param_parent(inst) - # @param [OpaqueValue] inst - # @return [OpaqueValue] + # @param [OpaqueValue] inst + # @return [OpaqueValue] # @scope class attach_function :get_param_parent, :LLVMGetParamParent, [OpaqueValue], OpaqueValue - # (Not documented) - # + # @method get_first_param(fn) - # @param [OpaqueValue] fn - # @return [OpaqueValue] + # @param [OpaqueValue] fn + # @return [OpaqueValue] # @scope class attach_function :get_first_param, :LLVMGetFirstParam, [OpaqueValue], OpaqueValue - # (Not documented) - # + # @method get_last_param(fn) - # @param [OpaqueValue] fn - # @return [OpaqueValue] + # @param [OpaqueValue] fn + # @return [OpaqueValue] # @scope class attach_function :get_last_param, :LLVMGetLastParam, [OpaqueValue], OpaqueValue - # (Not documented) - # + # @method get_next_param(arg) - # @param [OpaqueValue] arg - # @return [OpaqueValue] + # @param [OpaqueValue] arg + # @return [OpaqueValue] # @scope class attach_function :get_next_param, :LLVMGetNextParam, [OpaqueValue], OpaqueValue - # (Not documented) - # + # @method get_previous_param(arg) - # @param [OpaqueValue] arg - # @return [OpaqueValue] + # @param [OpaqueValue] arg + # @return [OpaqueValue] # @scope class attach_function :get_previous_param, :LLVMGetPreviousParam, [OpaqueValue], OpaqueValue - # (Not documented) - # + # @method add_attribute(arg, pa) - # @param [OpaqueValue] arg - # @param [Symbol from _enum_attribute_] pa - # @return [nil] + # @param [OpaqueValue] arg + # @param [Symbol from _enum_attribute_] pa + # @return [nil] # @scope class attach_function :add_attribute, :LLVMAddAttribute, [OpaqueValue, :attribute], :void - # (Not documented) - # + # @method remove_attribute(arg, pa) - # @param [OpaqueValue] arg - # @param [Symbol from _enum_attribute_] pa - # @return [nil] + # @param [OpaqueValue] arg + # @param [Symbol from _enum_attribute_] pa + # @return [nil] # @scope class attach_function :remove_attribute, :LLVMRemoveAttribute, [OpaqueValue, :attribute], :void - # (Not documented) - # + # @method get_attribute(arg) - # @param [OpaqueValue] arg - # @return [Symbol from _enum_attribute_] + # @param [OpaqueValue] arg + # @return [Symbol from _enum_attribute_] # @scope class attach_function :get_attribute, :LLVMGetAttribute, [OpaqueValue], :attribute - # (Not documented) - # + # @method set_param_alignment(arg, align) - # @param [OpaqueValue] arg - # @param [Integer] align - # @return [nil] + # @param [OpaqueValue] arg + # @param [Integer] align + # @return [nil] # @scope class attach_function :set_param_alignment, :LLVMSetParamAlignment, [OpaqueValue, :uint], :void - # Operations on basic blocks - # + # @method basic_block_as_value(bb) - # @param [OpaqueBasicBlock] bb - # @return [OpaqueValue] + # @param [OpaqueBasicBlock] bb + # @return [OpaqueValue] # @scope class attach_function :basic_block_as_value, :LLVMBasicBlockAsValue, [OpaqueBasicBlock], OpaqueValue - # (Not documented) - # + # @method value_is_basic_block(val) - # @param [OpaqueValue] val - # @return [Integer] + # @param [OpaqueValue] val + # @return [Integer] # @scope class attach_function :value_is_basic_block, :LLVMValueIsBasicBlock, [OpaqueValue], :int - # (Not documented) - # + # @method value_as_basic_block(val) - # @param [OpaqueValue] val - # @return [OpaqueBasicBlock] + # @param [OpaqueValue] val + # @return [OpaqueBasicBlock] # @scope class attach_function :value_as_basic_block, :LLVMValueAsBasicBlock, [OpaqueValue], OpaqueBasicBlock - # (Not documented) - # + # @method get_basic_block_parent(bb) - # @param [OpaqueBasicBlock] bb - # @return [OpaqueValue] + # @param [OpaqueBasicBlock] bb + # @return [OpaqueValue] # @scope class attach_function :get_basic_block_parent, :LLVMGetBasicBlockParent, [OpaqueBasicBlock], OpaqueValue - # (Not documented) - # + # @method get_basic_block_terminator(bb) - # @param [OpaqueBasicBlock] bb - # @return [OpaqueValue] + # @param [OpaqueBasicBlock] bb + # @return [OpaqueValue] # @scope class attach_function :get_basic_block_terminator, :LLVMGetBasicBlockTerminator, [OpaqueBasicBlock], OpaqueValue - # (Not documented) - # + # @method count_basic_blocks(fn) - # @param [OpaqueValue] fn - # @return [Integer] + # @param [OpaqueValue] fn + # @return [Integer] # @scope class attach_function :count_basic_blocks, :LLVMCountBasicBlocks, [OpaqueValue], :uint - # (Not documented) - # + # @method get_basic_blocks(fn, basic_blocks) - # @param [OpaqueValue] fn - # @param [FFI::Pointer(*BasicBlockRef)] basic_blocks - # @return [nil] + # @param [OpaqueValue] fn + # @param [FFI::Pointer(*BasicBlockRef)] basic_blocks + # @return [nil] # @scope class attach_function :get_basic_blocks, :LLVMGetBasicBlocks, [OpaqueValue, :pointer], :void - # (Not documented) - # + # @method get_first_basic_block(fn) - # @param [OpaqueValue] fn - # @return [OpaqueBasicBlock] + # @param [OpaqueValue] fn + # @return [OpaqueBasicBlock] # @scope class attach_function :get_first_basic_block, :LLVMGetFirstBasicBlock, [OpaqueValue], OpaqueBasicBlock - # (Not documented) - # + # @method get_last_basic_block(fn) - # @param [OpaqueValue] fn - # @return [OpaqueBasicBlock] + # @param [OpaqueValue] fn + # @return [OpaqueBasicBlock] # @scope class attach_function :get_last_basic_block, :LLVMGetLastBasicBlock, [OpaqueValue], OpaqueBasicBlock - # (Not documented) - # + # @method get_next_basic_block(bb) - # @param [OpaqueBasicBlock] bb - # @return [OpaqueBasicBlock] + # @param [OpaqueBasicBlock] bb + # @return [OpaqueBasicBlock] # @scope class attach_function :get_next_basic_block, :LLVMGetNextBasicBlock, [OpaqueBasicBlock], OpaqueBasicBlock - # (Not documented) - # + # @method get_previous_basic_block(bb) - # @param [OpaqueBasicBlock] bb - # @return [OpaqueBasicBlock] + # @param [OpaqueBasicBlock] bb + # @return [OpaqueBasicBlock] # @scope class attach_function :get_previous_basic_block, :LLVMGetPreviousBasicBlock, [OpaqueBasicBlock], OpaqueBasicBlock - # (Not documented) - # + # @method get_entry_basic_block(fn) - # @param [OpaqueValue] fn - # @return [OpaqueBasicBlock] + # @param [OpaqueValue] fn + # @return [OpaqueBasicBlock] # @scope class attach_function :get_entry_basic_block, :LLVMGetEntryBasicBlock, [OpaqueValue], OpaqueBasicBlock - # (Not documented) - # + # @method append_basic_block_in_context(c, fn, name) - # @param [OpaqueContext] c - # @param [OpaqueValue] fn - # @param [String] name - # @return [OpaqueBasicBlock] + # @param [OpaqueContext] c + # @param [OpaqueValue] fn + # @param [String] name + # @return [OpaqueBasicBlock] # @scope class attach_function :append_basic_block_in_context, :LLVMAppendBasicBlockInContext, [OpaqueContext, OpaqueValue, :string], OpaqueBasicBlock - # (Not documented) - # + # @method insert_basic_block_in_context(c, bb, name) - # @param [OpaqueContext] c - # @param [OpaqueBasicBlock] bb - # @param [String] name - # @return [OpaqueBasicBlock] + # @param [OpaqueContext] c + # @param [OpaqueBasicBlock] bb + # @param [String] name + # @return [OpaqueBasicBlock] # @scope class attach_function :insert_basic_block_in_context, :LLVMInsertBasicBlockInContext, [OpaqueContext, OpaqueBasicBlock, :string], OpaqueBasicBlock - # (Not documented) - # + # @method append_basic_block(fn, name) - # @param [OpaqueValue] fn - # @param [String] name - # @return [OpaqueBasicBlock] + # @param [OpaqueValue] fn + # @param [String] name + # @return [OpaqueBasicBlock] # @scope class attach_function :append_basic_block, :LLVMAppendBasicBlock, [OpaqueValue, :string], OpaqueBasicBlock - # (Not documented) - # + # @method insert_basic_block(insert_before_bb, name) - # @param [OpaqueBasicBlock] insert_before_bb - # @param [String] name - # @return [OpaqueBasicBlock] + # @param [OpaqueBasicBlock] insert_before_bb + # @param [String] name + # @return [OpaqueBasicBlock] # @scope class attach_function :insert_basic_block, :LLVMInsertBasicBlock, [OpaqueBasicBlock, :string], OpaqueBasicBlock - # (Not documented) - # + # @method delete_basic_block(bb) - # @param [OpaqueBasicBlock] bb - # @return [nil] + # @param [OpaqueBasicBlock] bb + # @return [nil] # @scope class attach_function :delete_basic_block, :LLVMDeleteBasicBlock, [OpaqueBasicBlock], :void - # (Not documented) - # + # @method remove_basic_block_from_parent(bb) - # @param [OpaqueBasicBlock] bb - # @return [nil] + # @param [OpaqueBasicBlock] bb + # @return [nil] # @scope class attach_function :remove_basic_block_from_parent, :LLVMRemoveBasicBlockFromParent, [OpaqueBasicBlock], :void - # (Not documented) - # + # @method move_basic_block_before(bb, move_pos) - # @param [OpaqueBasicBlock] bb - # @param [OpaqueBasicBlock] move_pos - # @return [nil] + # @param [OpaqueBasicBlock] bb + # @param [OpaqueBasicBlock] move_pos + # @return [nil] # @scope class attach_function :move_basic_block_before, :LLVMMoveBasicBlockBefore, [OpaqueBasicBlock, OpaqueBasicBlock], :void - # (Not documented) - # + # @method move_basic_block_after(bb, move_pos) - # @param [OpaqueBasicBlock] bb - # @param [OpaqueBasicBlock] move_pos - # @return [nil] + # @param [OpaqueBasicBlock] bb + # @param [OpaqueBasicBlock] move_pos + # @return [nil] # @scope class attach_function :move_basic_block_after, :LLVMMoveBasicBlockAfter, [OpaqueBasicBlock, OpaqueBasicBlock], :void - # (Not documented) - # + # @method get_first_instruction(bb) - # @param [OpaqueBasicBlock] bb - # @return [OpaqueValue] + # @param [OpaqueBasicBlock] bb + # @return [OpaqueValue] # @scope class attach_function :get_first_instruction, :LLVMGetFirstInstruction, [OpaqueBasicBlock], OpaqueValue - # (Not documented) - # + # @method get_last_instruction(bb) - # @param [OpaqueBasicBlock] bb - # @return [OpaqueValue] + # @param [OpaqueBasicBlock] bb + # @return [OpaqueValue] # @scope class attach_function :get_last_instruction, :LLVMGetLastInstruction, [OpaqueBasicBlock], OpaqueValue - # Operations on instructions - # + # @method get_instruction_parent(inst) - # @param [OpaqueValue] inst - # @return [OpaqueBasicBlock] + # @param [OpaqueValue] inst + # @return [OpaqueBasicBlock] # @scope class attach_function :get_instruction_parent, :LLVMGetInstructionParent, [OpaqueValue], OpaqueBasicBlock - # (Not documented) - # + # @method get_next_instruction(inst) - # @param [OpaqueValue] inst - # @return [OpaqueValue] + # @param [OpaqueValue] inst + # @return [OpaqueValue] # @scope class attach_function :get_next_instruction, :LLVMGetNextInstruction, [OpaqueValue], OpaqueValue - # (Not documented) - # + # @method get_previous_instruction(inst) - # @param [OpaqueValue] inst - # @return [OpaqueValue] + # @param [OpaqueValue] inst + # @return [OpaqueValue] # @scope class attach_function :get_previous_instruction, :LLVMGetPreviousInstruction, [OpaqueValue], OpaqueValue - # (Not documented) - # + # @method instruction_erase_from_parent(inst) - # @param [OpaqueValue] inst - # @return [nil] + # @param [OpaqueValue] inst + # @return [nil] # @scope class attach_function :instruction_erase_from_parent, :LLVMInstructionEraseFromParent, [OpaqueValue], :void - # (Not documented) - # + # @method get_instruction_opcode(inst) - # @param [OpaqueValue] inst - # @return [Symbol from _enum_opcode_] + # @param [OpaqueValue] inst + # @return [Symbol from _enum_opcode_] # @scope class attach_function :get_instruction_opcode, :LLVMGetInstructionOpcode, [OpaqueValue], :opcode - # (Not documented) - # + # @method get_i_cmp_predicate(inst) - # @param [OpaqueValue] inst - # @return [Symbol from _enum_int_predicate_] + # @param [OpaqueValue] inst + # @return [Symbol from _enum_int_predicate_] # @scope class attach_function :get_i_cmp_predicate, :LLVMGetICmpPredicate, [OpaqueValue], :int_predicate - # Operations on call sites - # + # @method set_instruction_call_conv(instr, cc) - # @param [OpaqueValue] instr - # @param [Integer] cc - # @return [nil] + # @param [OpaqueValue] instr + # @param [Integer] cc + # @return [nil] # @scope class attach_function :set_instruction_call_conv, :LLVMSetInstructionCallConv, [OpaqueValue, :uint], :void - # (Not documented) - # + # @method get_instruction_call_conv(instr) - # @param [OpaqueValue] instr - # @return [Integer] + # @param [OpaqueValue] instr + # @return [Integer] # @scope class attach_function :get_instruction_call_conv, :LLVMGetInstructionCallConv, [OpaqueValue], :uint - # (Not documented) - # + # @method add_instr_attribute(instr, index, attribute) - # @param [OpaqueValue] instr - # @param [Integer] index - # @param [Symbol from _enum_attribute_] attribute - # @return [nil] + # @param [OpaqueValue] instr + # @param [Integer] index + # @param [Symbol from _enum_attribute_] attribute + # @return [nil] # @scope class attach_function :add_instr_attribute, :LLVMAddInstrAttribute, [OpaqueValue, :uint, :attribute], :void - # (Not documented) - # + # @method remove_instr_attribute(instr, index, attribute) - # @param [OpaqueValue] instr - # @param [Integer] index - # @param [Symbol from _enum_attribute_] attribute - # @return [nil] + # @param [OpaqueValue] instr + # @param [Integer] index + # @param [Symbol from _enum_attribute_] attribute + # @return [nil] # @scope class attach_function :remove_instr_attribute, :LLVMRemoveInstrAttribute, [OpaqueValue, :uint, :attribute], :void - # (Not documented) - # + # @method set_instr_param_alignment(instr, index, align) - # @param [OpaqueValue] instr - # @param [Integer] index - # @param [Integer] align - # @return [nil] + # @param [OpaqueValue] instr + # @param [Integer] index + # @param [Integer] align + # @return [nil] # @scope class attach_function :set_instr_param_alignment, :LLVMSetInstrParamAlignment, [OpaqueValue, :uint, :uint], :void - # Operations on call instructions (only) - # + # @method is_tail_call(call_inst) - # @param [OpaqueValue] call_inst - # @return [Integer] + # @param [OpaqueValue] call_inst + # @return [Integer] # @scope class attach_function :is_tail_call, :LLVMIsTailCall, [OpaqueValue], :int - # (Not documented) - # + # @method set_tail_call(call_inst, is_tail_call) - # @param [OpaqueValue] call_inst - # @param [Integer] is_tail_call - # @return [nil] + # @param [OpaqueValue] call_inst + # @param [Integer] is_tail_call + # @return [nil] # @scope class attach_function :set_tail_call, :LLVMSetTailCall, [OpaqueValue, :int], :void - # Operations on switch instructions (only) - # + # @method get_switch_default_dest(switch_instr) - # @param [OpaqueValue] switch_instr - # @return [OpaqueBasicBlock] + # @param [OpaqueValue] switch_instr + # @return [OpaqueBasicBlock] # @scope class attach_function :get_switch_default_dest, :LLVMGetSwitchDefaultDest, [OpaqueValue], OpaqueBasicBlock - # Operations on phi nodes - # + # @method add_incoming(phi_node, incoming_values, incoming_blocks, count) - # @param [OpaqueValue] phi_node - # @param [FFI::Pointer(*ValueRef)] incoming_values - # @param [FFI::Pointer(*BasicBlockRef)] incoming_blocks - # @param [Integer] count - # @return [nil] + # @param [OpaqueValue] phi_node + # @param [FFI::Pointer(*ValueRef)] incoming_values + # @param [FFI::Pointer(*BasicBlockRef)] incoming_blocks + # @param [Integer] count + # @return [nil] # @scope class attach_function :add_incoming, :LLVMAddIncoming, [OpaqueValue, :pointer, :pointer, :uint], :void - # (Not documented) - # + # @method count_incoming(phi_node) - # @param [OpaqueValue] phi_node - # @return [Integer] + # @param [OpaqueValue] phi_node + # @return [Integer] # @scope class attach_function :count_incoming, :LLVMCountIncoming, [OpaqueValue], :uint - # (Not documented) - # + # @method get_incoming_value(phi_node, index) - # @param [OpaqueValue] phi_node - # @param [Integer] index - # @return [OpaqueValue] + # @param [OpaqueValue] phi_node + # @param [Integer] index + # @return [OpaqueValue] # @scope class attach_function :get_incoming_value, :LLVMGetIncomingValue, [OpaqueValue, :uint], OpaqueValue - # (Not documented) - # + # @method get_incoming_block(phi_node, index) - # @param [OpaqueValue] phi_node - # @param [Integer] index - # @return [OpaqueBasicBlock] + # @param [OpaqueValue] phi_node + # @param [Integer] index + # @return [OpaqueBasicBlock] # @scope class attach_function :get_incoming_block, :LLVMGetIncomingBlock, [OpaqueValue, :uint], OpaqueBasicBlock - # An instruction builder represents a point within a basic block, and is the # exclusive means of building instructions using the C interface. - # + # @method create_builder_in_context(c) - # @param [OpaqueContext] c - # @return [OpaqueBuilder] + # @param [OpaqueContext] c + # @return [OpaqueBuilder] # @scope class attach_function :create_builder_in_context, :LLVMCreateBuilderInContext, [OpaqueContext], OpaqueBuilder - # (Not documented) - # + # @method create_builder() - # @return [OpaqueBuilder] + # @return [OpaqueBuilder] # @scope class attach_function :create_builder, :LLVMCreateBuilder, [], OpaqueBuilder - # (Not documented) - # + # @method position_builder(builder, block, instr) - # @param [OpaqueBuilder] builder - # @param [OpaqueBasicBlock] block - # @param [OpaqueValue] instr - # @return [nil] + # @param [OpaqueBuilder] builder + # @param [OpaqueBasicBlock] block + # @param [OpaqueValue] instr + # @return [nil] # @scope class attach_function :position_builder, :LLVMPositionBuilder, [OpaqueBuilder, OpaqueBasicBlock, OpaqueValue], :void - # (Not documented) - # + # @method position_builder_before(builder, instr) - # @param [OpaqueBuilder] builder - # @param [OpaqueValue] instr - # @return [nil] + # @param [OpaqueBuilder] builder + # @param [OpaqueValue] instr + # @return [nil] # @scope class attach_function :position_builder_before, :LLVMPositionBuilderBefore, [OpaqueBuilder, OpaqueValue], :void - # (Not documented) - # + # @method position_builder_at_end(builder, block) - # @param [OpaqueBuilder] builder - # @param [OpaqueBasicBlock] block - # @return [nil] + # @param [OpaqueBuilder] builder + # @param [OpaqueBasicBlock] block + # @return [nil] # @scope class attach_function :position_builder_at_end, :LLVMPositionBuilderAtEnd, [OpaqueBuilder, OpaqueBasicBlock], :void - # (Not documented) - # + # @method get_insert_block(builder) - # @param [OpaqueBuilder] builder - # @return [OpaqueBasicBlock] + # @param [OpaqueBuilder] builder + # @return [OpaqueBasicBlock] # @scope class attach_function :get_insert_block, :LLVMGetInsertBlock, [OpaqueBuilder], OpaqueBasicBlock - # (Not documented) - # + # @method clear_insertion_position(builder) - # @param [OpaqueBuilder] builder - # @return [nil] + # @param [OpaqueBuilder] builder + # @return [nil] # @scope class attach_function :clear_insertion_position, :LLVMClearInsertionPosition, [OpaqueBuilder], :void - # (Not documented) - # + # @method insert_into_builder(builder, instr) - # @param [OpaqueBuilder] builder - # @param [OpaqueValue] instr - # @return [nil] + # @param [OpaqueBuilder] builder + # @param [OpaqueValue] instr + # @return [nil] # @scope class attach_function :insert_into_builder, :LLVMInsertIntoBuilder, [OpaqueBuilder, OpaqueValue], :void - # (Not documented) - # + # @method insert_into_builder_with_name(builder, instr, name) - # @param [OpaqueBuilder] builder - # @param [OpaqueValue] instr - # @param [String] name - # @return [nil] + # @param [OpaqueBuilder] builder + # @param [OpaqueValue] instr + # @param [String] name + # @return [nil] # @scope class attach_function :insert_into_builder_with_name, :LLVMInsertIntoBuilderWithName, [OpaqueBuilder, OpaqueValue, :string], :void - # (Not documented) - # + # @method dispose_builder(builder) - # @param [OpaqueBuilder] builder - # @return [nil] + # @param [OpaqueBuilder] builder + # @return [nil] # @scope class attach_function :dispose_builder, :LLVMDisposeBuilder, [OpaqueBuilder], :void - # Metadata - # + # @method set_current_debug_location(builder, l) - # @param [OpaqueBuilder] builder - # @param [OpaqueValue] l - # @return [nil] + # @param [OpaqueBuilder] builder + # @param [OpaqueValue] l + # @return [nil] # @scope class attach_function :set_current_debug_location, :LLVMSetCurrentDebugLocation, [OpaqueBuilder, OpaqueValue], :void - # (Not documented) - # + # @method get_current_debug_location(builder) - # @param [OpaqueBuilder] builder - # @return [OpaqueValue] + # @param [OpaqueBuilder] builder + # @return [OpaqueValue] # @scope class attach_function :get_current_debug_location, :LLVMGetCurrentDebugLocation, [OpaqueBuilder], OpaqueValue - # (Not documented) - # + # @method set_inst_debug_location(builder, inst) - # @param [OpaqueBuilder] builder - # @param [OpaqueValue] inst - # @return [nil] + # @param [OpaqueBuilder] builder + # @param [OpaqueValue] inst + # @return [nil] # @scope class attach_function :set_inst_debug_location, :LLVMSetInstDebugLocation, [OpaqueBuilder, OpaqueValue], :void - # Terminators - # + # @method build_ret_void(opaque_builder) - # @param [OpaqueBuilder] opaque_builder - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @return [OpaqueValue] # @scope class attach_function :build_ret_void, :LLVMBuildRetVoid, [OpaqueBuilder], OpaqueValue - # (Not documented) - # + # @method build_ret(opaque_builder, v) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] v - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] v + # @return [OpaqueValue] # @scope class attach_function :build_ret, :LLVMBuildRet, [OpaqueBuilder, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method build_aggregate_ret(opaque_builder, ret_vals, n) - # @param [OpaqueBuilder] opaque_builder - # @param [FFI::Pointer(*ValueRef)] ret_vals - # @param [Integer] n - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [FFI::Pointer(*ValueRef)] ret_vals + # @param [Integer] n + # @return [OpaqueValue] # @scope class attach_function :build_aggregate_ret, :LLVMBuildAggregateRet, [OpaqueBuilder, :pointer, :uint], OpaqueValue - # (Not documented) - # + # @method build_br(opaque_builder, dest) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueBasicBlock] dest - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueBasicBlock] dest + # @return [OpaqueValue] # @scope class attach_function :build_br, :LLVMBuildBr, [OpaqueBuilder, OpaqueBasicBlock], OpaqueValue - # (Not documented) - # + # @method build_cond_br(opaque_builder, if_, then_, else_) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] if_ - # @param [OpaqueBasicBlock] then_ - # @param [OpaqueBasicBlock] else_ - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] if_ + # @param [OpaqueBasicBlock] then_ + # @param [OpaqueBasicBlock] else_ + # @return [OpaqueValue] # @scope class attach_function :build_cond_br, :LLVMBuildCondBr, [OpaqueBuilder, OpaqueValue, OpaqueBasicBlock, OpaqueBasicBlock], OpaqueValue - # (Not documented) - # + # @method build_switch(opaque_builder, v, else_, num_cases) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] v - # @param [OpaqueBasicBlock] else_ - # @param [Integer] num_cases - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] v + # @param [OpaqueBasicBlock] else_ + # @param [Integer] num_cases + # @return [OpaqueValue] # @scope class attach_function :build_switch, :LLVMBuildSwitch, [OpaqueBuilder, OpaqueValue, OpaqueBasicBlock, :uint], OpaqueValue - # (Not documented) - # + # @method build_indirect_br(b, addr, num_dests) - # @param [OpaqueBuilder] b - # @param [OpaqueValue] addr - # @param [Integer] num_dests - # @return [OpaqueValue] + # @param [OpaqueBuilder] b + # @param [OpaqueValue] addr + # @param [Integer] num_dests + # @return [OpaqueValue] # @scope class attach_function :build_indirect_br, :LLVMBuildIndirectBr, [OpaqueBuilder, OpaqueValue, :uint], OpaqueValue - # (Not documented) - # + # @method build_invoke(opaque_builder, fn, args, num_args, then_, catch, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] fn - # @param [FFI::Pointer(*ValueRef)] args - # @param [Integer] num_args - # @param [OpaqueBasicBlock] then_ - # @param [OpaqueBasicBlock] catch - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] fn + # @param [FFI::Pointer(*ValueRef)] args + # @param [Integer] num_args + # @param [OpaqueBasicBlock] then_ + # @param [OpaqueBasicBlock] catch + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_invoke, :LLVMBuildInvoke, [OpaqueBuilder, OpaqueValue, :pointer, :uint, OpaqueBasicBlock, OpaqueBasicBlock, :string], OpaqueValue - # (Not documented) - # + # @method build_landing_pad(b, ty, pers_fn, num_clauses, name) - # @param [OpaqueBuilder] b - # @param [OpaqueType] ty - # @param [OpaqueValue] pers_fn - # @param [Integer] num_clauses - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] b + # @param [OpaqueType] ty + # @param [OpaqueValue] pers_fn + # @param [Integer] num_clauses + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_landing_pad, :LLVMBuildLandingPad, [OpaqueBuilder, OpaqueType, OpaqueValue, :uint, :string], OpaqueValue - # (Not documented) - # + # @method build_resume(b, exn) - # @param [OpaqueBuilder] b - # @param [OpaqueValue] exn - # @return [OpaqueValue] + # @param [OpaqueBuilder] b + # @param [OpaqueValue] exn + # @return [OpaqueValue] # @scope class attach_function :build_resume, :LLVMBuildResume, [OpaqueBuilder, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method build_unreachable(opaque_builder) - # @param [OpaqueBuilder] opaque_builder - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @return [OpaqueValue] # @scope class attach_function :build_unreachable, :LLVMBuildUnreachable, [OpaqueBuilder], OpaqueValue - # Add a case to the switch instruction - # + # @method add_case(switch, on_val, dest) - # @param [OpaqueValue] switch - # @param [OpaqueValue] on_val - # @param [OpaqueBasicBlock] dest - # @return [nil] + # @param [OpaqueValue] switch + # @param [OpaqueValue] on_val + # @param [OpaqueBasicBlock] dest + # @return [nil] # @scope class attach_function :add_case, :LLVMAddCase, [OpaqueValue, OpaqueValue, OpaqueBasicBlock], :void - # Add a destination to the indirectbr instruction - # + # @method add_destination(indirect_br, dest) - # @param [OpaqueValue] indirect_br - # @param [OpaqueBasicBlock] dest - # @return [nil] + # @param [OpaqueValue] indirect_br + # @param [OpaqueBasicBlock] dest + # @return [nil] # @scope class attach_function :add_destination, :LLVMAddDestination, [OpaqueValue, OpaqueBasicBlock], :void - # Add a catch or filter clause to the landingpad instruction - # + # @method add_clause(landing_pad, clause_val) - # @param [OpaqueValue] landing_pad - # @param [OpaqueValue] clause_val - # @return [nil] + # @param [OpaqueValue] landing_pad + # @param [OpaqueValue] clause_val + # @return [nil] # @scope class attach_function :add_clause, :LLVMAddClause, [OpaqueValue, OpaqueValue], :void - # Set the 'cleanup' flag in the landingpad instruction - # + # @method set_cleanup(landing_pad, val) - # @param [OpaqueValue] landing_pad - # @param [Integer] val - # @return [nil] + # @param [OpaqueValue] landing_pad + # @param [Integer] val + # @return [nil] # @scope class attach_function :set_cleanup, :LLVMSetCleanup, [OpaqueValue, :int], :void - # Arithmetic - # + # @method build_add(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_add, :LLVMBuildAdd, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_nsw_add(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_nsw_add, :LLVMBuildNSWAdd, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_nuw_add(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_nuw_add, :LLVMBuildNUWAdd, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_f_add(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_f_add, :LLVMBuildFAdd, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_sub(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_sub, :LLVMBuildSub, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_nsw_sub(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_nsw_sub, :LLVMBuildNSWSub, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_nuw_sub(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_nuw_sub, :LLVMBuildNUWSub, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_f_sub(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_f_sub, :LLVMBuildFSub, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_mul(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_mul, :LLVMBuildMul, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_nsw_mul(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_nsw_mul, :LLVMBuildNSWMul, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_nuw_mul(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_nuw_mul, :LLVMBuildNUWMul, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_f_mul(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_f_mul, :LLVMBuildFMul, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_u_div(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_u_div, :LLVMBuildUDiv, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_s_div(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_s_div, :LLVMBuildSDiv, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_exact_s_div(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_exact_s_div, :LLVMBuildExactSDiv, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_f_div(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_f_div, :LLVMBuildFDiv, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_u_rem(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_u_rem, :LLVMBuildURem, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_s_rem(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_s_rem, :LLVMBuildSRem, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_f_rem(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_f_rem, :LLVMBuildFRem, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_shl(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_shl, :LLVMBuildShl, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_l_shr(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_l_shr, :LLVMBuildLShr, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_a_shr(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_a_shr, :LLVMBuildAShr, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_and(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_and, :LLVMBuildAnd, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_or(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_or, :LLVMBuildOr, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_xor(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_xor, :LLVMBuildXor, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_bin_op(b, op, lhs, rhs, name) - # @param [OpaqueBuilder] b - # @param [Symbol from _enum_opcode_] op - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] b + # @param [Symbol from _enum_opcode_] op + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_bin_op, :LLVMBuildBinOp, [OpaqueBuilder, :opcode, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_neg(opaque_builder, v, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] v - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] v + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_neg, :LLVMBuildNeg, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_nsw_neg(b, v, name) - # @param [OpaqueBuilder] b - # @param [OpaqueValue] v - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] b + # @param [OpaqueValue] v + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_nsw_neg, :LLVMBuildNSWNeg, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_nuw_neg(b, v, name) - # @param [OpaqueBuilder] b - # @param [OpaqueValue] v - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] b + # @param [OpaqueValue] v + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_nuw_neg, :LLVMBuildNUWNeg, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_f_neg(opaque_builder, v, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] v - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] v + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_f_neg, :LLVMBuildFNeg, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_not(opaque_builder, v, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] v - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] v + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_not, :LLVMBuildNot, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue - # Memory - # + # @method build_malloc(opaque_builder, ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueType] ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueType] ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_malloc, :LLVMBuildMalloc, [OpaqueBuilder, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_array_malloc(opaque_builder, ty, val, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueType] ty - # @param [OpaqueValue] val - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueType] ty + # @param [OpaqueValue] val + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_array_malloc, :LLVMBuildArrayMalloc, [OpaqueBuilder, OpaqueType, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_alloca(opaque_builder, ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueType] ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueType] ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_alloca, :LLVMBuildAlloca, [OpaqueBuilder, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_array_alloca(opaque_builder, ty, val, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueType] ty - # @param [OpaqueValue] val - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueType] ty + # @param [OpaqueValue] val + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_array_alloca, :LLVMBuildArrayAlloca, [OpaqueBuilder, OpaqueType, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_free(opaque_builder, pointer_val) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] pointer_val - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] pointer_val + # @return [OpaqueValue] # @scope class attach_function :build_free, :LLVMBuildFree, [OpaqueBuilder, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method build_load(opaque_builder, pointer_val, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] pointer_val - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] pointer_val + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_load, :LLVMBuildLoad, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_store(opaque_builder, val, ptr) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueValue] ptr - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueValue] ptr + # @return [OpaqueValue] # @scope class attach_function :build_store, :LLVMBuildStore, [OpaqueBuilder, OpaqueValue, OpaqueValue], OpaqueValue - # (Not documented) - # + # @method build_gep(b, pointer, indices, num_indices, name) - # @param [OpaqueBuilder] b - # @param [OpaqueValue] pointer - # @param [FFI::Pointer(*ValueRef)] indices - # @param [Integer] num_indices - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] b + # @param [OpaqueValue] pointer + # @param [FFI::Pointer(*ValueRef)] indices + # @param [Integer] num_indices + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_gep, :LLVMBuildGEP, [OpaqueBuilder, OpaqueValue, :pointer, :uint, :string], OpaqueValue - # (Not documented) - # + # @method build_in_bounds_gep(b, pointer, indices, num_indices, name) - # @param [OpaqueBuilder] b - # @param [OpaqueValue] pointer - # @param [FFI::Pointer(*ValueRef)] indices - # @param [Integer] num_indices - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] b + # @param [OpaqueValue] pointer + # @param [FFI::Pointer(*ValueRef)] indices + # @param [Integer] num_indices + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_in_bounds_gep, :LLVMBuildInBoundsGEP, [OpaqueBuilder, OpaqueValue, :pointer, :uint, :string], OpaqueValue - # (Not documented) - # + # @method build_struct_gep(b, pointer, idx, name) - # @param [OpaqueBuilder] b - # @param [OpaqueValue] pointer - # @param [Integer] idx - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] b + # @param [OpaqueValue] pointer + # @param [Integer] idx + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_struct_gep, :LLVMBuildStructGEP, [OpaqueBuilder, OpaqueValue, :uint, :string], OpaqueValue - # (Not documented) - # + # @method build_global_string(b, str, name) - # @param [OpaqueBuilder] b - # @param [String] str - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] b + # @param [String] str + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_global_string, :LLVMBuildGlobalString, [OpaqueBuilder, :string, :string], OpaqueValue - # (Not documented) - # + # @method build_global_string_ptr(b, str, name) - # @param [OpaqueBuilder] b - # @param [String] str - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] b + # @param [String] str + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_global_string_ptr, :LLVMBuildGlobalStringPtr, [OpaqueBuilder, :string, :string], OpaqueValue - # Casts - # + # @method build_trunc(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_trunc, :LLVMBuildTrunc, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_z_ext(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_z_ext, :LLVMBuildZExt, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_s_ext(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_s_ext, :LLVMBuildSExt, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_fp_to_ui(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_fp_to_ui, :LLVMBuildFPToUI, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_fp_to_si(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_fp_to_si, :LLVMBuildFPToSI, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_ui_to_fp(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_ui_to_fp, :LLVMBuildUIToFP, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_si_to_fp(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_si_to_fp, :LLVMBuildSIToFP, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_fp_trunc(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_fp_trunc, :LLVMBuildFPTrunc, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_fp_ext(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_fp_ext, :LLVMBuildFPExt, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_ptr_to_int(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_ptr_to_int, :LLVMBuildPtrToInt, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_int_to_ptr(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_int_to_ptr, :LLVMBuildIntToPtr, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_bit_cast(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_bit_cast, :LLVMBuildBitCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_z_ext_or_bit_cast(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_z_ext_or_bit_cast, :LLVMBuildZExtOrBitCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_s_ext_or_bit_cast(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_s_ext_or_bit_cast, :LLVMBuildSExtOrBitCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_trunc_or_bit_cast(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_trunc_or_bit_cast, :LLVMBuildTruncOrBitCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_cast(b, op, val, dest_ty, name) - # @param [OpaqueBuilder] b - # @param [Symbol from _enum_opcode_] op - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] b + # @param [Symbol from _enum_opcode_] op + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_cast, :LLVMBuildCast, [OpaqueBuilder, :opcode, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_pointer_cast(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_pointer_cast, :LLVMBuildPointerCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_int_cast(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_int_cast, :LLVMBuildIntCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_fp_cast(opaque_builder, val, dest_ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [OpaqueType] dest_ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [OpaqueType] dest_ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_fp_cast, :LLVMBuildFPCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # Comparisons - # + # @method build_i_cmp(opaque_builder, op, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [Symbol from _enum_int_predicate_] op - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [Symbol from _enum_int_predicate_] op + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_i_cmp, :LLVMBuildICmp, [OpaqueBuilder, :int_predicate, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_f_cmp(opaque_builder, op, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [Symbol from _enum_real_predicate_] op - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [Symbol from _enum_real_predicate_] op + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_f_cmp, :LLVMBuildFCmp, [OpaqueBuilder, :real_predicate, OpaqueValue, OpaqueValue, :string], OpaqueValue - # Miscellaneous instructions - # + # @method build_phi(opaque_builder, ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueType] ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueType] ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_phi, :LLVMBuildPhi, [OpaqueBuilder, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_call(opaque_builder, fn, args, num_args, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] fn - # @param [FFI::Pointer(*ValueRef)] args - # @param [Integer] num_args - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] fn + # @param [FFI::Pointer(*ValueRef)] args + # @param [Integer] num_args + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_call, :LLVMBuildCall, [OpaqueBuilder, OpaqueValue, :pointer, :uint, :string], OpaqueValue - # (Not documented) - # + # @method build_select(opaque_builder, if_, then_, else_, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] if_ - # @param [OpaqueValue] then_ - # @param [OpaqueValue] else_ - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] if_ + # @param [OpaqueValue] then_ + # @param [OpaqueValue] else_ + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_select, :LLVMBuildSelect, [OpaqueBuilder, OpaqueValue, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_va_arg(opaque_builder, list, ty, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] list - # @param [OpaqueType] ty - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] list + # @param [OpaqueType] ty + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_va_arg, :LLVMBuildVAArg, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue - # (Not documented) - # + # @method build_extract_element(opaque_builder, vec_val, index, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] vec_val - # @param [OpaqueValue] index - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] vec_val + # @param [OpaqueValue] index + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_extract_element, :LLVMBuildExtractElement, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_insert_element(opaque_builder, vec_val, elt_val, index, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] vec_val - # @param [OpaqueValue] elt_val - # @param [OpaqueValue] index - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] vec_val + # @param [OpaqueValue] elt_val + # @param [OpaqueValue] index + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_insert_element, :LLVMBuildInsertElement, [OpaqueBuilder, OpaqueValue, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_shuffle_vector(opaque_builder, v1, v2, mask, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] v1 - # @param [OpaqueValue] v2 - # @param [OpaqueValue] mask - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] v1 + # @param [OpaqueValue] v2 + # @param [OpaqueValue] mask + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_shuffle_vector, :LLVMBuildShuffleVector, [OpaqueBuilder, OpaqueValue, OpaqueValue, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_extract_value(opaque_builder, agg_val, index, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] agg_val - # @param [Integer] index - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] agg_val + # @param [Integer] index + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_extract_value, :LLVMBuildExtractValue, [OpaqueBuilder, OpaqueValue, :uint, :string], OpaqueValue - # (Not documented) - # + # @method build_insert_value(opaque_builder, agg_val, elt_val, index, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] agg_val - # @param [OpaqueValue] elt_val - # @param [Integer] index - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] agg_val + # @param [OpaqueValue] elt_val + # @param [Integer] index + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_insert_value, :LLVMBuildInsertValue, [OpaqueBuilder, OpaqueValue, OpaqueValue, :uint, :string], OpaqueValue - # (Not documented) - # + # @method build_is_null(opaque_builder, val, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_is_null, :LLVMBuildIsNull, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_is_not_null(opaque_builder, val, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] val - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] val + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_is_not_null, :LLVMBuildIsNotNull, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue - # (Not documented) - # + # @method build_ptr_diff(opaque_builder, lhs, rhs, name) - # @param [OpaqueBuilder] opaque_builder - # @param [OpaqueValue] lhs - # @param [OpaqueValue] rhs - # @param [String] name - # @return [OpaqueValue] + # @param [OpaqueBuilder] opaque_builder + # @param [OpaqueValue] lhs + # @param [OpaqueValue] rhs + # @param [String] name + # @return [OpaqueValue] # @scope class attach_function :build_ptr_diff, :LLVMBuildPtrDiff, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue - # Changes the type of M so it can be passed to FunctionPassManagers and the # JIT. They take ModuleProviders for historical reasons. - # + # @method create_module_provider_for_existing_module(m) - # @param [OpaqueModule] m - # @return [OpaqueModuleProvider] + # @param [OpaqueModule] m + # @return [OpaqueModuleProvider] # @scope class attach_function :create_module_provider_for_existing_module, :LLVMCreateModuleProviderForExistingModule, [OpaqueModule], OpaqueModuleProvider - # Destroys the module M. - # + # @method dispose_module_provider(m) - # @param [OpaqueModuleProvider] m - # @return [nil] + # @param [OpaqueModuleProvider] m + # @return [nil] # @scope class attach_function :dispose_module_provider, :LLVMDisposeModuleProvider, [OpaqueModuleProvider], :void - # ===-- Memory buffers ----------------------------------------------------=== - # + # @method create_memory_buffer_with_contents_of_file(path, out_mem_buf, out_message) - # @param [String] path - # @param [FFI::Pointer(*MemoryBufferRef)] out_mem_buf - # @param [FFI::Pointer(**CharS)] out_message - # @return [Integer] + # @param [String] path + # @param [FFI::Pointer(*MemoryBufferRef)] out_mem_buf + # @param [FFI::Pointer(**CharS)] out_message + # @return [Integer] # @scope class attach_function :create_memory_buffer_with_contents_of_file, :LLVMCreateMemoryBufferWithContentsOfFile, [:string, :pointer, :pointer], :int - # (Not documented) - # + # @method create_memory_buffer_with_stdin(out_mem_buf, out_message) - # @param [FFI::Pointer(*MemoryBufferRef)] out_mem_buf - # @param [FFI::Pointer(**CharS)] out_message - # @return [Integer] + # @param [FFI::Pointer(*MemoryBufferRef)] out_mem_buf + # @param [FFI::Pointer(**CharS)] out_message + # @return [Integer] # @scope class attach_function :create_memory_buffer_with_stdin, :LLVMCreateMemoryBufferWithSTDIN, [:pointer, :pointer], :int - # (Not documented) - # + # @method dispose_memory_buffer(mem_buf) - # @param [OpaqueMemoryBuffer] mem_buf - # @return [nil] + # @param [OpaqueMemoryBuffer] mem_buf + # @return [nil] # @scope class attach_function :dispose_memory_buffer, :LLVMDisposeMemoryBuffer, [OpaqueMemoryBuffer], :void - # Return the global pass registry, for use with initialization functions. # See llvm::PassRegistry::getPassRegistry. - # + # @method get_global_pass_registry() - # @return [OpaquePassRegistry] + # @return [OpaquePassRegistry] # @scope class attach_function :get_global_pass_registry, :LLVMGetGlobalPassRegistry, [], OpaquePassRegistry - # Constructs a new whole-module pass pipeline. This type of pipeline is # suitable for link-time optimization and whole-module transformations. # See llvm::PassManager::PassManager. - # + # @method create_pass_manager() - # @return [OpaquePassManager] + # @return [OpaquePassManager] # @scope class attach_function :create_pass_manager, :LLVMCreatePassManager, [], OpaquePassManager - # Constructs a new function-by-function pass pipeline over the module # provider. It does not take ownership of the module provider. This type of # pipeline is suitable for code generation and JIT compilation tasks. # See llvm::FunctionPassManager::FunctionPassManager. - # + # @method create_function_pass_manager_for_module(m) - # @param [OpaqueModule] m - # @return [OpaquePassManager] + # @param [OpaqueModule] m + # @return [OpaquePassManager] # @scope class attach_function :create_function_pass_manager_for_module, :LLVMCreateFunctionPassManagerForModule, [OpaqueModule], OpaquePassManager - # Deprecated: Use LLVMCreateFunctionPassManagerForModule instead. - # + # @method create_function_pass_manager(mp) - # @param [OpaqueModuleProvider] mp - # @return [OpaquePassManager] + # @param [OpaqueModuleProvider] mp + # @return [OpaquePassManager] # @scope class attach_function :create_function_pass_manager, :LLVMCreateFunctionPassManager, [OpaqueModuleProvider], OpaquePassManager - # Initializes, executes on the provided module, and finalizes all of the # passes scheduled in the pass manager. Returns 1 if any of the passes # modified the module, 0 otherwise. See llvm::PassManager::run(Module&). - # + # @method run_pass_manager(pm, m) - # @param [OpaquePassManager] pm - # @param [OpaqueModule] m - # @return [Integer] + # @param [OpaquePassManager] pm + # @param [OpaqueModule] m + # @return [Integer] # @scope class attach_function :run_pass_manager, :LLVMRunPassManager, [OpaquePassManager, OpaqueModule], :int - # Initializes all of the function passes scheduled in the function pass # manager. Returns 1 if any of the passes modified the module, 0 otherwise. # See llvm::FunctionPassManager::doInitialization. - # + # @method initialize_function_pass_manager(fpm) - # @param [OpaquePassManager] fpm - # @return [Integer] + # @param [OpaquePassManager] fpm + # @return [Integer] # @scope class attach_function :initialize_function_pass_manager, :LLVMInitializeFunctionPassManager, [OpaquePassManager], :int - # Executes all of the function passes scheduled in the function pass manager # on the provided function. Returns 1 if any of the passes modified the # function, false otherwise. # See llvm::FunctionPassManager::run(Function&). - # + # @method run_function_pass_manager(fpm, f) - # @param [OpaquePassManager] fpm - # @param [OpaqueValue] f - # @return [Integer] + # @param [OpaquePassManager] fpm + # @param [OpaqueValue] f + # @return [Integer] # @scope class attach_function :run_function_pass_manager, :LLVMRunFunctionPassManager, [OpaquePassManager, OpaqueValue], :int - # Finalizes all of the function passes scheduled in in the function pass # manager. Returns 1 if any of the passes modified the module, 0 otherwise. # See llvm::FunctionPassManager::doFinalization. - # + # @method finalize_function_pass_manager(fpm) - # @param [OpaquePassManager] fpm - # @return [Integer] + # @param [OpaquePassManager] fpm + # @return [Integer] # @scope class attach_function :finalize_function_pass_manager, :LLVMFinalizeFunctionPassManager, [OpaquePassManager], :int - # Frees the memory of a pass pipeline. For function pipelines, does not free # the module provider. # See llvm::PassManagerBase::~PassManagerBase. - # + # @method dispose_pass_manager(pm) - # @param [OpaquePassManager] pm - # @return [nil] + # @param [OpaquePassManager] pm + # @return [nil] # @scope class attach_function :dispose_pass_manager, :LLVMDisposePassManager, [OpaquePassManager], :void - end diff --git a/test/output/llvm-c/Disassembler.rb b/test/output/llvm-c/Disassembler.rb index d376ed2..763f2f2 100644 --- a/test/output/llvm-c/Disassembler.rb +++ b/test/output/llvm-c/Disassembler.rb @@ -1,35 +1,37 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module LLVM + extend FFI::Library - ffi_lib 'LLVM-3.0' - + + ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"] + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + DISASSEMBLER_VARIANT_KIND_NONE = 0 - + DISASSEMBLER_VARIANT_KIND_ARM_HI16 = 1 - + DISASSEMBLER_VARIANT_KIND_ARM_LO16 = 2 - + DISASSEMBLER_REFERENCE_TYPE_IN_OUT_NONE = 0 - + DISASSEMBLER_REFERENCE_TYPE_IN_BRANCH = 1 - + DISASSEMBLER_REFERENCE_TYPE_IN_P_CREL_LOAD = 2 - + DISASSEMBLER_REFERENCE_TYPE_OUT_SYMBOL_STUB = 1 - + DISASSEMBLER_REFERENCE_TYPE_OUT_LIT_POOL_SYM_ADDR = 2 - + DISASSEMBLER_REFERENCE_TYPE_OUT_LIT_POOL_CSTR_ADDR = 3 - + # The type for the operand information call back function. This is called to # get the symbolic information for an operand of an instruction. Typically # this is from the relocation information, symbol table, etc. That block of @@ -45,26 +47,27 @@ def self.attach_function(name, *_) # Triple specific with its specific information defined by the value of # TagType for that Triple. If symbolic information is returned the function # returns 1, otherwise it returns 0. - # + # This entry is only for documentation and no real method. - # - # @method _callback_op_info_callback_(pc, offset, size, tag_type, tag_buf) - # @param [Integer] pc - # @param [Integer] offset - # @param [Integer] size - # @param [Integer] tag_type - # @param [FFI::Pointer(*Void)] tag_buf - # @return [FFI::Pointer(*Void)] + + # @method _callback_op_info_callback_(dis_info, pc, offset, size, tag_type, tag_buf) + # @param [FFI::Pointer(*Void)] dis_info + # @param [Integer] pc + # @param [Integer] offset + # @param [Integer] size + # @param [Integer] tag_type + # @param [FFI::Pointer(*Void)] tag_buf + # @return [FFI::Pointer(*Void)] # @scope class - callback :op_info_callback, [:ulong, :ulong, :ulong, :int, :pointer], :pointer - + callback :op_info_callback, [:pointer, :ulong_long, :ulong_long, :ulong_long, :int, :pointer], :pointer + # The initial support in LLVM MC for the most general form of a relocatable # expression is "AddSymbol - SubtractSymbol + Offset". For some Darwin targets # this full form is encoded in the relocation information so that AddSymbol and # SubtractSymbol can be link edited independent of each other. Many other # platforms only allow a relocatable expression of the form AddSymbol + Offset # to be encoded. - # + # The LLVMOpInfoCallback() for the TagType value of 1 uses the struct # LLVMOpInfo1. The value of the relocatable expression for the operand, # including any PC adjustment, is passed in to the call back in the Value @@ -76,7 +79,7 @@ def self.attach_function(name, *_) # symbol names are present in the relocation information. The VariantKind # type is one of the Target specific #defines below and is used to print # operands like "_foo@GOT", ":lower16:_foo", etc. - # + # = Fields: # :present :: # (Integer) 1 if this symbol is present @@ -85,29 +88,29 @@ def self.attach_function(name, *_) # :value :: # (Integer) symbol value if name is NULL class OpInfoSymbol1 < FFI::Struct - layout :present, :ulong, + layout :present, :ulong_long, :name, :string, - :value, :ulong + :value, :ulong_long end - + # (Not documented) - # + # = Fields: # :add_symbol :: - # (OpInfoSymbol1) + # (OpInfoSymbol1) # :subtract_symbol :: - # (OpInfoSymbol1) + # (OpInfoSymbol1) # :value :: - # (Integer) + # (Integer) # :variant_kind :: - # (Integer) + # (Integer) class OpInfo1 < FFI::Struct layout :add_symbol, OpInfoSymbol1.by_value, :subtract_symbol, OpInfoSymbol1.by_value, - :value, :ulong, - :variant_kind, :ulong + :value, :ulong_long, + :variant_kind, :ulong_long end - + # The type for the symbol lookup function. This may be called by the # disassembler for things like adding a comment for a PC plus a constant # offset load instruction to use a symbol name instead of a load address value. @@ -118,42 +121,41 @@ class OpInfo1 < FFI::Struct # ReferencePC. If the output reference can be determined its type is returned # indirectly in ReferenceType along with ReferenceName if any, or that is set # to NULL. - # + # This entry is only for documentation and no real method. - # - # @method _callback_symbol_lookup_callback_(reference_value, reference_type, reference_pc, reference_name) - # @param [Integer] reference_value - # @param [FFI::Pointer(*Uint64T)] reference_type - # @param [Integer] reference_pc - # @param [FFI::Pointer(**CharS)] reference_name - # @return [FFI::Pointer(*Void)] + + # @method _callback_symbol_lookup_callback_(dis_info, reference_value, reference_type, reference_pc, reference_name) + # @param [FFI::Pointer(*Void)] dis_info + # @param [Integer] reference_value + # @param [FFI::Pointer(*Uint64T)] reference_type + # @param [Integer] reference_pc + # @param [FFI::Pointer(**CharS)] reference_name + # @return [FFI::Pointer(*Void)] # @scope class - callback :symbol_lookup_callback, [:ulong, :pointer, :ulong, :pointer], :pointer - + callback :symbol_lookup_callback, [:pointer, :ulong_long, :pointer, :ulong_long, :pointer], :pointer + # Create a disassembler for the TripleName. Symbolic disassembly is supported # by passing a block of information in the DisInfo parameter and specifying the # TagType and callback functions as described above. These can all be passed # as NULL. If successful, this returns a disassembler context. If not, it # returns NULL. - # + # @method create_disasm(triple_name, dis_info, tag_type, get_op_info, symbol_look_up) - # @param [String] triple_name - # @param [FFI::Pointer(*Void)] dis_info - # @param [Integer] tag_type - # @param [Proc(_callback_op_info_callback_)] get_op_info - # @param [Proc(_callback_symbol_lookup_callback_)] symbol_look_up - # @return [FFI::Pointer(DisasmContextRef)] + # @param [String] triple_name + # @param [FFI::Pointer(*Void)] dis_info + # @param [Integer] tag_type + # @param [FFI::Pointer(OpInfoCallback)] get_op_info + # @param [FFI::Pointer(SymbolLookupCallback)] symbol_look_up + # @return [FFI::Pointer(DisasmContextRef)] # @scope class - attach_function :create_disasm, :LLVMCreateDisasm, [:string, :pointer, :int, :op_info_callback, :symbol_lookup_callback], :pointer - + attach_function :create_disasm, :LLVMCreateDisasm, [:string, :pointer, :int, :pointer, :pointer], :pointer # Dispose of a disassembler context. - # + # @method disasm_dispose(dc) - # @param [FFI::Pointer(DisasmContextRef)] dc - # @return [nil] + # @param [FFI::Pointer(DisasmContextRef)] dc + # @return [nil] # @scope class attach_function :disasm_dispose, :LLVMDisasmDispose, [:pointer], :void - # Disassemble a single instruction using the disassembler context specified in # the parameter DC. The bytes of the instruction are specified in the # parameter Bytes, and contains at least BytesSize number of bytes. The @@ -162,16 +164,15 @@ class OpInfo1 < FFI::Struct # OutString whose size is specified in the parameter OutStringSize. This # function returns the number of bytes in the instruction or zero if there was # no valid instruction. - # + # @method disasm_instruction(dc, bytes, bytes_size, pc, out_string, out_string_size) - # @param [FFI::Pointer(DisasmContextRef)] dc - # @param [FFI::Pointer(*Uint8T)] bytes - # @param [Integer] bytes_size - # @param [Integer] pc - # @param [String] out_string - # @param [Integer] out_string_size - # @return [Integer] + # @param [FFI::Pointer(DisasmContextRef)] dc + # @param [FFI::Pointer(*Uint8T)] bytes + # @param [Integer] bytes_size + # @param [Integer] pc + # @param [String] out_string + # @param [Integer] out_string_size + # @return [Integer] # @scope class - attach_function :disasm_instruction, :LLVMDisasmInstruction, [:pointer, :pointer, :ulong, :ulong, :string, :ulong], :ulong - + attach_function :disasm_instruction, :LLVMDisasmInstruction, [:pointer, :pointer, :ulong_long, :ulong_long, :string, :int], :int end diff --git a/test/output/llvm-c/EnhancedDisassembly.rb b/test/output/llvm-c/EnhancedDisassembly.rb index 8dcfd83..24fe198 100644 --- a/test/output/llvm-c/EnhancedDisassembly.rb +++ b/test/output/llvm-c/EnhancedDisassembly.rb @@ -1,17 +1,19 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module LLVM + extend FFI::Library - ffi_lib 'LLVM-3.0' - + + ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"] + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # ! # @typedef EDByteReaderCallback # Interface to memory from which instructions may be read. @@ -19,16 +21,17 @@ def self.attach_function(name, *_) # @param address The address of the byte to be read. # @param arg An anonymous argument for client use. # @result 0 on success; -1 otherwise. - # + # This entry is only for documentation and no real method. - # - # @method _callback_ed_byte_reader_callback_(address, arg) - # @param [Integer] address - # @param [FFI::Pointer(*Void)] arg - # @return [FFI::Pointer(*Uint8T)] + + # @method _callback_ed_byte_reader_callback_(byte, address, arg) + # @param [FFI::Pointer(*Uint8T)] byte + # @param [Integer] address + # @param [FFI::Pointer(*Void)] arg + # @return [FFI::Pointer(*Uint8T)] # @scope class - callback :ed_byte_reader_callback, [:ulong, :pointer], :pointer - + callback :ed_byte_reader_callback, [:pointer, :ulong_long, :pointer], :pointer + # ! # @typedef EDRegisterReaderCallback # Interface to registers from which registers may be read. @@ -37,16 +40,40 @@ def self.attach_function(name, *_) # @param regID The LLVM register identifier for the register to read. # @param arg An anonymous argument for client use. # @result 0 if the register could be read; -1 otherwise. - # + # This entry is only for documentation and no real method. - # - # @method _callback_ed_register_reader_callback_(reg_id, arg) - # @param [Integer] reg_id - # @param [FFI::Pointer(*Void)] arg - # @return [FFI::Pointer(*Uint64T)] + + # @method _callback_ed_register_reader_callback_(value, reg_id, arg) + # @param [FFI::Pointer(*Uint64T)] value + # @param [Integer] reg_id + # @param [FFI::Pointer(*Void)] arg + # @return [FFI::Pointer(*Uint64T)] # @scope class - callback :ed_register_reader_callback, [:uint, :pointer], :pointer - + callback :ed_register_reader_callback, [:pointer, :uint, :pointer], :pointer + + # ! + # @typedef EDAssemblySyntax_t + # An assembly syntax for use in tokenizing instructions. + + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:k_ed_assembly_syntax_x86_intel3874185085). + + # === Options: + # :x86_intel :: + # ! @constant kEDAssemblySyntaxX86Intel Intel syntax for i386 and x86_64. + # :x86att :: + # ! @constant kEDAssemblySyntaxX86ATT AT&T syntax for i386 and x86_64. + # :armual :: + + + # @method _enum_k_ed_assembly_syntax_x86_intel3874185085_ + # @return [Symbol] + # @scope class + enum :k_ed_assembly_syntax_x86_intel3874185085, [ + :x86_intel, 0, + :x86att, 1, + :armual, 2 + ] + # ! # @function EDGetDisassembler # Gets the disassembler for a given target. @@ -55,15 +82,14 @@ def self.attach_function(name, *_) # @param triple Identifies the target. Example: "x86_64-apple-darwin10" # @param syntax The assembly syntax to use when decoding instructions. # @result 0 on success; -1 otherwise. - # + # @method ed_get_disassembler(disassembler, triple, syntax) - # @param [FFI::Pointer(*EDDisassemblerRef)] disassembler - # @param [String] triple - # @param [Integer] syntax - # @return [Integer] + # @param [FFI::Pointer(*EDDisassemblerRef)] disassembler + # @param [String] triple + # @param [Integer] syntax + # @return [Integer] # @scope class attach_function :ed_get_disassembler, :EDGetDisassembler, [:pointer, :string, :uint], :int - # ! # @function EDGetRegisterName # Gets the human-readable name for a given register. @@ -72,43 +98,40 @@ def self.attach_function(name, *_) # @param disassembler The disassembler to query for the name. # @param regID The register identifier, as returned by EDRegisterTokenValue. # @result 0 on success; -1 otherwise. - # + # @method ed_get_register_name(reg_name, disassembler, reg_id) - # @param [FFI::Pointer(**CharS)] reg_name - # @param [FFI::Pointer(EDDisassemblerRef)] disassembler - # @param [Integer] reg_id - # @return [Integer] + # @param [FFI::Pointer(**CharS)] reg_name + # @param [FFI::Pointer(EDDisassemblerRef)] disassembler + # @param [Integer] reg_id + # @return [Integer] # @scope class attach_function :ed_get_register_name, :EDGetRegisterName, [:pointer, :pointer, :uint], :int - # ! # @function EDRegisterIsStackPointer # Determines if a register is one of the platform's stack-pointer registers. # @param disassembler The disassembler to query. # @param regID The register identifier, as returned by EDRegisterTokenValue. # @result 1 if true; 0 otherwise. - # + # @method ed_register_is_stack_pointer(disassembler, reg_id) - # @param [FFI::Pointer(EDDisassemblerRef)] disassembler - # @param [Integer] reg_id - # @return [Integer] + # @param [FFI::Pointer(EDDisassemblerRef)] disassembler + # @param [Integer] reg_id + # @return [Integer] # @scope class attach_function :ed_register_is_stack_pointer, :EDRegisterIsStackPointer, [:pointer, :uint], :int - # ! # @function EDRegisterIsProgramCounter # Determines if a register is one of the platform's stack-pointer registers. # @param disassembler The disassembler to query. # @param regID The register identifier, as returned by EDRegisterTokenValue. # @result 1 if true; 0 otherwise. - # + # @method ed_register_is_program_counter(disassembler, reg_id) - # @param [FFI::Pointer(EDDisassemblerRef)] disassembler - # @param [Integer] reg_id - # @return [Integer] + # @param [FFI::Pointer(EDDisassemblerRef)] disassembler + # @param [Integer] reg_id + # @return [Integer] # @scope class attach_function :ed_register_is_program_counter, :EDRegisterIsProgramCounter, [:pointer, :uint], :int - # ! # @function EDCreateInst # Gets a set of contiguous instructions from a disassembler. @@ -122,41 +145,38 @@ def self.attach_function(name, *_) # @param address The address of the first byte of the instruction. # @param arg An anonymous argument to be passed to byteReader. # @result The number of instructions read on success; 0 otherwise. - # + # @method ed_create_insts(insts, count, disassembler, byte_reader, address, arg) - # @param [FFI::Pointer(*EDInstRef)] insts - # @param [Integer] count - # @param [FFI::Pointer(EDDisassemblerRef)] disassembler - # @param [Proc(_callback_ed_byte_reader_callback_)] byte_reader - # @param [Integer] address - # @param [FFI::Pointer(*Void)] arg - # @return [Integer] + # @param [FFI::Pointer(*EDInstRef)] insts + # @param [Integer] count + # @param [FFI::Pointer(EDDisassemblerRef)] disassembler + # @param [FFI::Pointer(EDByteReaderCallback)] byte_reader + # @param [Integer] address + # @param [FFI::Pointer(*Void)] arg + # @return [Integer] # @scope class - attach_function :ed_create_insts, :EDCreateInsts, [:pointer, :uint, :pointer, :ed_byte_reader_callback, :ulong, :pointer], :uint - + attach_function :ed_create_insts, :EDCreateInsts, [:pointer, :uint, :pointer, :pointer, :ulong_long, :pointer], :uint # ! # @function EDReleaseInst # Frees the memory for an instruction. The instruction can no longer be accessed # after this call. # @param inst The instruction to be freed. - # + # @method ed_release_inst(inst) - # @param [FFI::Pointer(EDInstRef)] inst - # @return [nil] + # @param [FFI::Pointer(EDInstRef)] inst + # @return [nil] # @scope class attach_function :ed_release_inst, :EDReleaseInst, [:pointer], :void - # ! # @function EDInstByteSize # @param inst The instruction to be queried. # @result The number of bytes in the instruction's machine-code representation. - # + # @method ed_inst_byte_size(inst) - # @param [FFI::Pointer(EDInstRef)] inst - # @return [Integer] + # @param [FFI::Pointer(EDInstRef)] inst + # @return [Integer] # @scope class attach_function :ed_inst_byte_size, :EDInstByteSize, [:pointer], :int - # ! # @function EDGetInstString # Gets the disassembled text equivalent of the instruction. @@ -164,99 +184,91 @@ def self.attach_function(name, *_) # string. (The string becomes invalid when the instruction is released.) # @param inst The instruction to be queried. # @result 0 on success; -1 otherwise. - # + # @method ed_get_inst_string(buf, inst) - # @param [FFI::Pointer(**CharS)] buf - # @param [FFI::Pointer(EDInstRef)] inst - # @return [Integer] + # @param [FFI::Pointer(**CharS)] buf + # @param [FFI::Pointer(EDInstRef)] inst + # @return [Integer] # @scope class attach_function :ed_get_inst_string, :EDGetInstString, [:pointer, :pointer], :int - # ! # @function EDInstID # @param instID A pointer whose target will be filled in with the LLVM identifier # for the instruction. # @param inst The instruction to be queried. # @result 0 on success; -1 otherwise. - # + # @method ed_inst_id(inst_id, inst) - # @param [FFI::Pointer(*UInt)] inst_id - # @param [FFI::Pointer(EDInstRef)] inst - # @return [Integer] + # @param [FFI::Pointer(*UInt)] inst_id + # @param [FFI::Pointer(EDInstRef)] inst + # @return [Integer] # @scope class attach_function :ed_inst_id, :EDInstID, [:pointer, :pointer], :int - # ! # @function EDInstIsBranch # @param inst The instruction to be queried. # @result 1 if the instruction is a branch instruction; 0 if it is some other # type of instruction; -1 if there was an error. - # + # @method ed_inst_is_branch(inst) - # @param [FFI::Pointer(EDInstRef)] inst - # @return [Integer] + # @param [FFI::Pointer(EDInstRef)] inst + # @return [Integer] # @scope class attach_function :ed_inst_is_branch, :EDInstIsBranch, [:pointer], :int - # ! # @function EDInstIsMove # @param inst The instruction to be queried. # @result 1 if the instruction is a move instruction; 0 if it is some other # type of instruction; -1 if there was an error. - # + # @method ed_inst_is_move(inst) - # @param [FFI::Pointer(EDInstRef)] inst - # @return [Integer] + # @param [FFI::Pointer(EDInstRef)] inst + # @return [Integer] # @scope class attach_function :ed_inst_is_move, :EDInstIsMove, [:pointer], :int - # ! # @function EDBranchTargetID # @param inst The instruction to be queried. # @result The ID of the branch target operand, suitable for use with # EDCopyOperand. -1 if no such operand exists. - # + # @method ed_branch_target_id(inst) - # @param [FFI::Pointer(EDInstRef)] inst - # @return [Integer] + # @param [FFI::Pointer(EDInstRef)] inst + # @return [Integer] # @scope class attach_function :ed_branch_target_id, :EDBranchTargetID, [:pointer], :int - # ! # @function EDMoveSourceID # @param inst The instruction to be queried. # @result The ID of the move source operand, suitable for use with # EDCopyOperand. -1 if no such operand exists. - # + # @method ed_move_source_id(inst) - # @param [FFI::Pointer(EDInstRef)] inst - # @return [Integer] + # @param [FFI::Pointer(EDInstRef)] inst + # @return [Integer] # @scope class attach_function :ed_move_source_id, :EDMoveSourceID, [:pointer], :int - # ! # @function EDMoveTargetID # @param inst The instruction to be queried. # @result The ID of the move source operand, suitable for use with # EDCopyOperand. -1 if no such operand exists. - # + # @method ed_move_target_id(inst) - # @param [FFI::Pointer(EDInstRef)] inst - # @return [Integer] + # @param [FFI::Pointer(EDInstRef)] inst + # @return [Integer] # @scope class attach_function :ed_move_target_id, :EDMoveTargetID, [:pointer], :int - # ! # @function EDNumTokens # @param inst The instruction to be queried. # @result The number of tokens in the instruction, or -1 on error. - # + # @method ed_num_tokens(inst) - # @param [FFI::Pointer(EDInstRef)] inst - # @return [Integer] + # @param [FFI::Pointer(EDInstRef)] inst + # @return [Integer] # @scope class attach_function :ed_num_tokens, :EDNumTokens, [:pointer], :int - # ! # @function EDGetToken # Retrieves a token from an instruction. The token is valid until the @@ -265,15 +277,14 @@ def self.attach_function(name, *_) # @param inst The instruction to be queried. # @param index The index of the token in the instruction. # @result 0 on success; -1 otherwise. - # + # @method ed_get_token(token, inst, index) - # @param [FFI::Pointer(*EDTokenRef)] token - # @param [FFI::Pointer(EDInstRef)] inst - # @param [Integer] index - # @return [Integer] + # @param [FFI::Pointer(*EDTokenRef)] token + # @param [FFI::Pointer(EDInstRef)] inst + # @param [Integer] index + # @return [Integer] # @scope class attach_function :ed_get_token, :EDGetToken, [:pointer, :pointer, :int], :int - # ! # @function EDGetTokenString # Gets the disassembled text for a token. @@ -281,131 +292,120 @@ def self.attach_function(name, *_) # string. (The string becomes invalid when the token is released.) # @param token The token to be queried. # @result 0 on success; -1 otherwise. - # + # @method ed_get_token_string(buf, token) - # @param [FFI::Pointer(**CharS)] buf - # @param [FFI::Pointer(EDTokenRef)] token - # @return [Integer] + # @param [FFI::Pointer(**CharS)] buf + # @param [FFI::Pointer(EDTokenRef)] token + # @return [Integer] # @scope class attach_function :ed_get_token_string, :EDGetTokenString, [:pointer, :pointer], :int - # ! # @function EDOperandIndexForToken # Returns the index of the operand to which a token belongs. # @param token The token to be queried. # @result The operand index on success; -1 otherwise - # + # @method ed_operand_index_for_token(token) - # @param [FFI::Pointer(EDTokenRef)] token - # @return [Integer] + # @param [FFI::Pointer(EDTokenRef)] token + # @return [Integer] # @scope class attach_function :ed_operand_index_for_token, :EDOperandIndexForToken, [:pointer], :int - # ! # @function EDTokenIsWhitespace # @param token The token to be queried. # @result 1 if the token is whitespace; 0 if not; -1 on error. - # + # @method ed_token_is_whitespace(token) - # @param [FFI::Pointer(EDTokenRef)] token - # @return [Integer] + # @param [FFI::Pointer(EDTokenRef)] token + # @return [Integer] # @scope class attach_function :ed_token_is_whitespace, :EDTokenIsWhitespace, [:pointer], :int - # ! # @function EDTokenIsPunctuation # @param token The token to be queried. # @result 1 if the token is punctuation; 0 if not; -1 on error. - # + # @method ed_token_is_punctuation(token) - # @param [FFI::Pointer(EDTokenRef)] token - # @return [Integer] + # @param [FFI::Pointer(EDTokenRef)] token + # @return [Integer] # @scope class attach_function :ed_token_is_punctuation, :EDTokenIsPunctuation, [:pointer], :int - # ! # @function EDTokenIsOpcode # @param token The token to be queried. # @result 1 if the token is opcode; 0 if not; -1 on error. - # + # @method ed_token_is_opcode(token) - # @param [FFI::Pointer(EDTokenRef)] token - # @return [Integer] + # @param [FFI::Pointer(EDTokenRef)] token + # @return [Integer] # @scope class attach_function :ed_token_is_opcode, :EDTokenIsOpcode, [:pointer], :int - # ! # @function EDTokenIsLiteral # @param token The token to be queried. # @result 1 if the token is a numeric literal; 0 if not; -1 on error. - # + # @method ed_token_is_literal(token) - # @param [FFI::Pointer(EDTokenRef)] token - # @return [Integer] + # @param [FFI::Pointer(EDTokenRef)] token + # @return [Integer] # @scope class attach_function :ed_token_is_literal, :EDTokenIsLiteral, [:pointer], :int - # ! # @function EDTokenIsRegister # @param token The token to be queried. # @result 1 if the token identifies a register; 0 if not; -1 on error. - # + # @method ed_token_is_register(token) - # @param [FFI::Pointer(EDTokenRef)] token - # @return [Integer] + # @param [FFI::Pointer(EDTokenRef)] token + # @return [Integer] # @scope class attach_function :ed_token_is_register, :EDTokenIsRegister, [:pointer], :int - # ! # @function EDTokenIsNegativeLiteral # @param token The token to be queried. # @result 1 if the token is a negative signed literal; 0 if not; -1 on error. - # + # @method ed_token_is_negative_literal(token) - # @param [FFI::Pointer(EDTokenRef)] token - # @return [Integer] + # @param [FFI::Pointer(EDTokenRef)] token + # @return [Integer] # @scope class attach_function :ed_token_is_negative_literal, :EDTokenIsNegativeLiteral, [:pointer], :int - # ! # @function EDLiteralTokenAbsoluteValue # @param value A pointer whose target will be filled in with the absolute value # of the literal. # @param token The token to be queried. # @result 0 on success; -1 otherwise. - # + # @method ed_literal_token_absolute_value(value, token) - # @param [FFI::Pointer(*Uint64T)] value - # @param [FFI::Pointer(EDTokenRef)] token - # @return [Integer] + # @param [FFI::Pointer(*Uint64T)] value + # @param [FFI::Pointer(EDTokenRef)] token + # @return [Integer] # @scope class attach_function :ed_literal_token_absolute_value, :EDLiteralTokenAbsoluteValue, [:pointer, :pointer], :int - # ! # @function EDRegisterTokenValue # @param registerID A pointer whose target will be filled in with the LLVM # register identifier for the token. # @param token The token to be queried. # @result 0 on success; -1 otherwise. - # + # @method ed_register_token_value(register_id, token) - # @param [FFI::Pointer(*UInt)] register_id - # @param [FFI::Pointer(EDTokenRef)] token - # @return [Integer] + # @param [FFI::Pointer(*UInt)] register_id + # @param [FFI::Pointer(EDTokenRef)] token + # @return [Integer] # @scope class attach_function :ed_register_token_value, :EDRegisterTokenValue, [:pointer, :pointer], :int - # ! # @function EDNumOperands # @param inst The instruction to be queried. # @result The number of operands in the instruction, or -1 on error. - # + # @method ed_num_operands(inst) - # @param [FFI::Pointer(EDInstRef)] inst - # @return [Integer] + # @param [FFI::Pointer(EDInstRef)] inst + # @return [Integer] # @scope class attach_function :ed_num_operands, :EDNumOperands, [:pointer], :int - # ! # @function EDGetOperand # Retrieves an operand from an instruction. The operand is valid until the @@ -414,76 +414,70 @@ def self.attach_function(name, *_) # @param inst The instruction to be queried. # @param index The index of the operand in the instruction. # @result 0 on success; -1 otherwise. - # + # @method ed_get_operand(operand, inst, index) - # @param [FFI::Pointer(*EDOperandRef)] operand - # @param [FFI::Pointer(EDInstRef)] inst - # @param [Integer] index - # @return [Integer] + # @param [FFI::Pointer(*EDOperandRef)] operand + # @param [FFI::Pointer(EDInstRef)] inst + # @param [Integer] index + # @return [Integer] # @scope class attach_function :ed_get_operand, :EDGetOperand, [:pointer, :pointer, :int], :int - # ! # @function EDOperandIsRegister # @param operand The operand to be queried. # @result 1 if the operand names a register; 0 if not; -1 on error. - # + # @method ed_operand_is_register(operand) - # @param [FFI::Pointer(EDOperandRef)] operand - # @return [Integer] + # @param [FFI::Pointer(EDOperandRef)] operand + # @return [Integer] # @scope class attach_function :ed_operand_is_register, :EDOperandIsRegister, [:pointer], :int - # ! # @function EDOperandIsImmediate # @param operand The operand to be queried. # @result 1 if the operand specifies an immediate value; 0 if not; -1 on error. - # + # @method ed_operand_is_immediate(operand) - # @param [FFI::Pointer(EDOperandRef)] operand - # @return [Integer] + # @param [FFI::Pointer(EDOperandRef)] operand + # @return [Integer] # @scope class attach_function :ed_operand_is_immediate, :EDOperandIsImmediate, [:pointer], :int - # ! # @function EDOperandIsMemory # @param operand The operand to be queried. # @result 1 if the operand specifies a location in memory; 0 if not; -1 on error. - # + # @method ed_operand_is_memory(operand) - # @param [FFI::Pointer(EDOperandRef)] operand - # @return [Integer] + # @param [FFI::Pointer(EDOperandRef)] operand + # @return [Integer] # @scope class attach_function :ed_operand_is_memory, :EDOperandIsMemory, [:pointer], :int - # ! # @function EDRegisterOperandValue # @param value A pointer whose target will be filled in with the LLVM register ID # of the register named by the operand. # @param operand The operand to be queried. # @result 0 on success; -1 otherwise. - # + # @method ed_register_operand_value(value, operand) - # @param [FFI::Pointer(*UInt)] value - # @param [FFI::Pointer(EDOperandRef)] operand - # @return [Integer] + # @param [FFI::Pointer(*UInt)] value + # @param [FFI::Pointer(EDOperandRef)] operand + # @return [Integer] # @scope class attach_function :ed_register_operand_value, :EDRegisterOperandValue, [:pointer, :pointer], :int - # ! # @function EDImmediateOperandValue # @param value A pointer whose target will be filled in with the value of the # immediate. # @param operand The operand to be queried. # @result 0 on success; -1 otherwise. - # + # @method ed_immediate_operand_value(value, operand) - # @param [FFI::Pointer(*Uint64T)] value - # @param [FFI::Pointer(EDOperandRef)] operand - # @return [Integer] + # @param [FFI::Pointer(*Uint64T)] value + # @param [FFI::Pointer(EDOperandRef)] operand + # @return [Integer] # @scope class attach_function :ed_immediate_operand_value, :EDImmediateOperandValue, [:pointer, :pointer], :int - # ! # @function EDEvaluateOperand # Evaluates an operand using a client-supplied register state accessor. Register @@ -498,14 +492,13 @@ def self.attach_function(name, *_) # state. # @param arg An anonymous argument for client use. # @result 0 if the operand could be evaluated; -1 otherwise. - # + # @method ed_evaluate_operand(result, operand, reg_reader, arg) - # @param [FFI::Pointer(*Uint64T)] result - # @param [FFI::Pointer(EDOperandRef)] operand - # @param [Proc(_callback_ed_register_reader_callback_)] reg_reader - # @param [FFI::Pointer(*Void)] arg - # @return [Integer] - # @scope class - attach_function :ed_evaluate_operand, :EDEvaluateOperand, [:pointer, :pointer, :ed_register_reader_callback, :pointer], :int - + # @param [FFI::Pointer(*Uint64T)] result + # @param [FFI::Pointer(EDOperandRef)] operand + # @param [FFI::Pointer(EDRegisterReaderCallback)] reg_reader + # @param [FFI::Pointer(*Void)] arg + # @return [Integer] + # @scope class + attach_function :ed_evaluate_operand, :EDEvaluateOperand, [:pointer, :pointer, :pointer, :pointer], :int end diff --git a/test/output/llvm-c/ExecutionEngine.rb b/test/output/llvm-c/ExecutionEngine.rb index 3126a8a..9243fcd 100644 --- a/test/output/llvm-c/ExecutionEngine.rb +++ b/test/output/llvm-c/ExecutionEngine.rb @@ -1,314 +1,285 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module LLVM + extend FFI::Library - ffi_lib 'LLVM-3.0' - + + ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"] + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) - # + # @method link_in_jit() - # @return [nil] + # @return [nil] # @scope class attach_function :link_in_jit, :LLVMLinkInJIT, [], :void - # (Not documented) - # + # @method link_in_interpreter() - # @return [nil] + # @return [nil] # @scope class attach_function :link_in_interpreter, :LLVMLinkInInterpreter, [], :void - # (Not documented) class OpaqueGenericValue < FFI::Struct layout :dummy, :char end - + # (Not documented) class OpaqueExecutionEngine < FFI::Struct layout :dummy, :char end - + # ===-- Operations on generic values --------------------------------------=== - # + # @method create_generic_value_of_int(ty, n, is_signed) - # @param [FFI::Pointer(TypeRef)] ty - # @param [Integer] n - # @param [Integer] is_signed - # @return [OpaqueGenericValue] + # @param [FFI::Pointer(TypeRef)] ty + # @param [Integer] n + # @param [Integer] is_signed + # @return [OpaqueGenericValue] # @scope class attach_function :create_generic_value_of_int, :LLVMCreateGenericValueOfInt, [:pointer, :ulong_long, :int], OpaqueGenericValue - # (Not documented) - # + # @method create_generic_value_of_pointer(p) - # @param [FFI::Pointer(*Void)] p - # @return [OpaqueGenericValue] + # @param [FFI::Pointer(*Void)] p + # @return [OpaqueGenericValue] # @scope class attach_function :create_generic_value_of_pointer, :LLVMCreateGenericValueOfPointer, [:pointer], OpaqueGenericValue - # (Not documented) - # + # @method create_generic_value_of_float(ty, n) - # @param [FFI::Pointer(TypeRef)] ty - # @param [Float] n - # @return [OpaqueGenericValue] + # @param [FFI::Pointer(TypeRef)] ty + # @param [Float] n + # @return [OpaqueGenericValue] # @scope class attach_function :create_generic_value_of_float, :LLVMCreateGenericValueOfFloat, [:pointer, :double], OpaqueGenericValue - # (Not documented) - # + # @method generic_value_int_width(gen_val_ref) - # @param [OpaqueGenericValue] gen_val_ref - # @return [Integer] + # @param [OpaqueGenericValue] gen_val_ref + # @return [Integer] # @scope class attach_function :generic_value_int_width, :LLVMGenericValueIntWidth, [OpaqueGenericValue], :uint - # (Not documented) - # + # @method generic_value_to_int(gen_val, is_signed) - # @param [OpaqueGenericValue] gen_val - # @param [Integer] is_signed - # @return [Integer] + # @param [OpaqueGenericValue] gen_val + # @param [Integer] is_signed + # @return [Integer] # @scope class attach_function :generic_value_to_int, :LLVMGenericValueToInt, [OpaqueGenericValue, :int], :ulong_long - # (Not documented) - # + # @method generic_value_to_pointer(gen_val) - # @param [OpaqueGenericValue] gen_val - # @return [FFI::Pointer(*Void)] + # @param [OpaqueGenericValue] gen_val + # @return [FFI::Pointer(*Void)] # @scope class attach_function :generic_value_to_pointer, :LLVMGenericValueToPointer, [OpaqueGenericValue], :pointer - # (Not documented) - # + # @method generic_value_to_float(ty_ref, gen_val) - # @param [FFI::Pointer(TypeRef)] ty_ref - # @param [OpaqueGenericValue] gen_val - # @return [Float] + # @param [FFI::Pointer(TypeRef)] ty_ref + # @param [OpaqueGenericValue] gen_val + # @return [Float] # @scope class attach_function :generic_value_to_float, :LLVMGenericValueToFloat, [:pointer, OpaqueGenericValue], :double - # (Not documented) - # + # @method dispose_generic_value(gen_val) - # @param [OpaqueGenericValue] gen_val - # @return [nil] + # @param [OpaqueGenericValue] gen_val + # @return [nil] # @scope class attach_function :dispose_generic_value, :LLVMDisposeGenericValue, [OpaqueGenericValue], :void - # ===-- Operations on execution engines -----------------------------------=== - # + # @method create_execution_engine_for_module(out_ee, m, out_error) - # @param [FFI::Pointer(*ExecutionEngineRef)] out_ee - # @param [FFI::Pointer(ModuleRef)] m - # @param [FFI::Pointer(**CharS)] out_error - # @return [Integer] + # @param [FFI::Pointer(*ExecutionEngineRef)] out_ee + # @param [FFI::Pointer(ModuleRef)] m + # @param [FFI::Pointer(**CharS)] out_error + # @return [Integer] # @scope class attach_function :create_execution_engine_for_module, :LLVMCreateExecutionEngineForModule, [:pointer, :pointer, :pointer], :int - # (Not documented) - # + # @method create_interpreter_for_module(out_interp, m, out_error) - # @param [FFI::Pointer(*ExecutionEngineRef)] out_interp - # @param [FFI::Pointer(ModuleRef)] m - # @param [FFI::Pointer(**CharS)] out_error - # @return [Integer] + # @param [FFI::Pointer(*ExecutionEngineRef)] out_interp + # @param [FFI::Pointer(ModuleRef)] m + # @param [FFI::Pointer(**CharS)] out_error + # @return [Integer] # @scope class attach_function :create_interpreter_for_module, :LLVMCreateInterpreterForModule, [:pointer, :pointer, :pointer], :int - # (Not documented) - # + # @method create_jit_compiler_for_module(out_jit, m, opt_level, out_error) - # @param [FFI::Pointer(*ExecutionEngineRef)] out_jit - # @param [FFI::Pointer(ModuleRef)] m - # @param [Integer] opt_level - # @param [FFI::Pointer(**CharS)] out_error - # @return [Integer] + # @param [FFI::Pointer(*ExecutionEngineRef)] out_jit + # @param [FFI::Pointer(ModuleRef)] m + # @param [Integer] opt_level + # @param [FFI::Pointer(**CharS)] out_error + # @return [Integer] # @scope class attach_function :create_jit_compiler_for_module, :LLVMCreateJITCompilerForModule, [:pointer, :pointer, :uint, :pointer], :int - # Deprecated: Use LLVMCreateExecutionEngineForModule instead. - # + # @method create_execution_engine(out_ee, mp, out_error) - # @param [FFI::Pointer(*ExecutionEngineRef)] out_ee - # @param [FFI::Pointer(ModuleProviderRef)] mp - # @param [FFI::Pointer(**CharS)] out_error - # @return [Integer] + # @param [FFI::Pointer(*ExecutionEngineRef)] out_ee + # @param [FFI::Pointer(ModuleProviderRef)] mp + # @param [FFI::Pointer(**CharS)] out_error + # @return [Integer] # @scope class attach_function :create_execution_engine, :LLVMCreateExecutionEngine, [:pointer, :pointer, :pointer], :int - # Deprecated: Use LLVMCreateInterpreterForModule instead. - # + # @method create_interpreter(out_interp, mp, out_error) - # @param [FFI::Pointer(*ExecutionEngineRef)] out_interp - # @param [FFI::Pointer(ModuleProviderRef)] mp - # @param [FFI::Pointer(**CharS)] out_error - # @return [Integer] + # @param [FFI::Pointer(*ExecutionEngineRef)] out_interp + # @param [FFI::Pointer(ModuleProviderRef)] mp + # @param [FFI::Pointer(**CharS)] out_error + # @return [Integer] # @scope class attach_function :create_interpreter, :LLVMCreateInterpreter, [:pointer, :pointer, :pointer], :int - # Deprecated: Use LLVMCreateJITCompilerForModule instead. - # + # @method create_jit_compiler(out_jit, mp, opt_level, out_error) - # @param [FFI::Pointer(*ExecutionEngineRef)] out_jit - # @param [FFI::Pointer(ModuleProviderRef)] mp - # @param [Integer] opt_level - # @param [FFI::Pointer(**CharS)] out_error - # @return [Integer] + # @param [FFI::Pointer(*ExecutionEngineRef)] out_jit + # @param [FFI::Pointer(ModuleProviderRef)] mp + # @param [Integer] opt_level + # @param [FFI::Pointer(**CharS)] out_error + # @return [Integer] # @scope class attach_function :create_jit_compiler, :LLVMCreateJITCompiler, [:pointer, :pointer, :uint, :pointer], :int - # (Not documented) - # + # @method dispose_execution_engine(ee) - # @param [OpaqueExecutionEngine] ee - # @return [nil] + # @param [OpaqueExecutionEngine] ee + # @return [nil] # @scope class attach_function :dispose_execution_engine, :LLVMDisposeExecutionEngine, [OpaqueExecutionEngine], :void - # (Not documented) - # + # @method run_static_constructors(ee) - # @param [OpaqueExecutionEngine] ee - # @return [nil] + # @param [OpaqueExecutionEngine] ee + # @return [nil] # @scope class attach_function :run_static_constructors, :LLVMRunStaticConstructors, [OpaqueExecutionEngine], :void - # (Not documented) - # + # @method run_static_destructors(ee) - # @param [OpaqueExecutionEngine] ee - # @return [nil] + # @param [OpaqueExecutionEngine] ee + # @return [nil] # @scope class attach_function :run_static_destructors, :LLVMRunStaticDestructors, [OpaqueExecutionEngine], :void - @blocking = true # (Not documented) - # + # @method run_function_as_main(ee, f, arg_c, arg_v, env_p) - # @param [OpaqueExecutionEngine] ee - # @param [FFI::Pointer(ValueRef)] f - # @param [Integer] arg_c - # @param [FFI::Pointer(**CharS)] arg_v - # @param [FFI::Pointer(**CharS)] env_p - # @return [Integer] + # @param [OpaqueExecutionEngine] ee + # @param [FFI::Pointer(ValueRef)] f + # @param [Integer] arg_c + # @param [FFI::Pointer(**CharS)] arg_v + # @param [FFI::Pointer(**CharS)] env_p + # @return [Integer] # @scope class attach_function :run_function_as_main, :LLVMRunFunctionAsMain, [OpaqueExecutionEngine, :pointer, :uint, :pointer, :pointer], :int - @blocking = true # (Not documented) - # + # @method run_function(ee, f, num_args, args) - # @param [OpaqueExecutionEngine] ee - # @param [FFI::Pointer(ValueRef)] f - # @param [Integer] num_args - # @param [FFI::Pointer(*GenericValueRef)] args - # @return [OpaqueGenericValue] + # @param [OpaqueExecutionEngine] ee + # @param [FFI::Pointer(ValueRef)] f + # @param [Integer] num_args + # @param [FFI::Pointer(*GenericValueRef)] args + # @return [OpaqueGenericValue] # @scope class attach_function :run_function, :LLVMRunFunction, [OpaqueExecutionEngine, :pointer, :uint, :pointer], OpaqueGenericValue - # (Not documented) - # + # @method free_machine_code_for_function(ee, f) - # @param [OpaqueExecutionEngine] ee - # @param [FFI::Pointer(ValueRef)] f - # @return [nil] + # @param [OpaqueExecutionEngine] ee + # @param [FFI::Pointer(ValueRef)] f + # @return [nil] # @scope class attach_function :free_machine_code_for_function, :LLVMFreeMachineCodeForFunction, [OpaqueExecutionEngine, :pointer], :void - # (Not documented) - # + # @method add_module(ee, m) - # @param [OpaqueExecutionEngine] ee - # @param [FFI::Pointer(ModuleRef)] m - # @return [nil] + # @param [OpaqueExecutionEngine] ee + # @param [FFI::Pointer(ModuleRef)] m + # @return [nil] # @scope class attach_function :add_module, :LLVMAddModule, [OpaqueExecutionEngine, :pointer], :void - # Deprecated: Use LLVMAddModule instead. - # + # @method add_module_provider(ee, mp) - # @param [OpaqueExecutionEngine] ee - # @param [FFI::Pointer(ModuleProviderRef)] mp - # @return [nil] + # @param [OpaqueExecutionEngine] ee + # @param [FFI::Pointer(ModuleProviderRef)] mp + # @return [nil] # @scope class attach_function :add_module_provider, :LLVMAddModuleProvider, [OpaqueExecutionEngine, :pointer], :void - # (Not documented) - # + # @method remove_module(ee, m, out_mod, out_error) - # @param [OpaqueExecutionEngine] ee - # @param [FFI::Pointer(ModuleRef)] m - # @param [FFI::Pointer(*ModuleRef)] out_mod - # @param [FFI::Pointer(**CharS)] out_error - # @return [Integer] + # @param [OpaqueExecutionEngine] ee + # @param [FFI::Pointer(ModuleRef)] m + # @param [FFI::Pointer(*ModuleRef)] out_mod + # @param [FFI::Pointer(**CharS)] out_error + # @return [Integer] # @scope class attach_function :remove_module, :LLVMRemoveModule, [OpaqueExecutionEngine, :pointer, :pointer, :pointer], :int - # Deprecated: Use LLVMRemoveModule instead. - # + # @method remove_module_provider(ee, mp, out_mod, out_error) - # @param [OpaqueExecutionEngine] ee - # @param [FFI::Pointer(ModuleProviderRef)] mp - # @param [FFI::Pointer(*ModuleRef)] out_mod - # @param [FFI::Pointer(**CharS)] out_error - # @return [Integer] + # @param [OpaqueExecutionEngine] ee + # @param [FFI::Pointer(ModuleProviderRef)] mp + # @param [FFI::Pointer(*ModuleRef)] out_mod + # @param [FFI::Pointer(**CharS)] out_error + # @return [Integer] # @scope class attach_function :remove_module_provider, :LLVMRemoveModuleProvider, [OpaqueExecutionEngine, :pointer, :pointer, :pointer], :int - # (Not documented) - # + # @method find_function(ee, name, out_fn) - # @param [OpaqueExecutionEngine] ee - # @param [String] name - # @param [FFI::Pointer(*ValueRef)] out_fn - # @return [Integer] + # @param [OpaqueExecutionEngine] ee + # @param [String] name + # @param [FFI::Pointer(*ValueRef)] out_fn + # @return [Integer] # @scope class attach_function :find_function, :LLVMFindFunction, [OpaqueExecutionEngine, :string, :pointer], :int - # (Not documented) - # + # @method recompile_and_relink_function(ee, fn) - # @param [OpaqueExecutionEngine] ee - # @param [FFI::Pointer(ValueRef)] fn - # @return [FFI::Pointer(*Void)] + # @param [OpaqueExecutionEngine] ee + # @param [FFI::Pointer(ValueRef)] fn + # @return [FFI::Pointer(*Void)] # @scope class attach_function :recompile_and_relink_function, :LLVMRecompileAndRelinkFunction, [OpaqueExecutionEngine, :pointer], :pointer - # (Not documented) - # + # @method get_execution_engine_target_data(ee) - # @param [OpaqueExecutionEngine] ee - # @return [FFI::Pointer(TargetDataRef)] + # @param [OpaqueExecutionEngine] ee + # @return [FFI::Pointer(TargetDataRef)] # @scope class attach_function :get_execution_engine_target_data, :LLVMGetExecutionEngineTargetData, [OpaqueExecutionEngine], :pointer - # (Not documented) - # + # @method add_global_mapping(ee, global, addr) - # @param [OpaqueExecutionEngine] ee - # @param [FFI::Pointer(ValueRef)] global - # @param [FFI::Pointer(*Void)] addr - # @return [nil] + # @param [OpaqueExecutionEngine] ee + # @param [FFI::Pointer(ValueRef)] global + # @param [FFI::Pointer(*Void)] addr + # @return [nil] # @scope class attach_function :add_global_mapping, :LLVMAddGlobalMapping, [OpaqueExecutionEngine, :pointer, :pointer], :void - # (Not documented) - # + # @method get_pointer_to_global(ee, global) - # @param [OpaqueExecutionEngine] ee - # @param [FFI::Pointer(ValueRef)] global - # @return [FFI::Pointer(*Void)] + # @param [OpaqueExecutionEngine] ee + # @param [FFI::Pointer(ValueRef)] global + # @return [FFI::Pointer(*Void)] # @scope class attach_function :get_pointer_to_global, :LLVMGetPointerToGlobal, [OpaqueExecutionEngine, :pointer], :pointer - end diff --git a/test/output/llvm-c/Initialization.rb b/test/output/llvm-c/Initialization.rb index 0dfebca..4893cee 100644 --- a/test/output/llvm-c/Initialization.rb +++ b/test/output/llvm-c/Initialization.rb @@ -1,95 +1,87 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module LLVM + extend FFI::Library - ffi_lib 'LLVM-3.0' - + + ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"] + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) - # + # @method initialize_core(r) - # @param [FFI::Pointer(PassRegistryRef)] r - # @return [nil] + # @param [FFI::Pointer(PassRegistryRef)] r + # @return [nil] # @scope class attach_function :initialize_core, :LLVMInitializeCore, [:pointer], :void - # (Not documented) - # + # @method initialize_transform_utils(r) - # @param [FFI::Pointer(PassRegistryRef)] r - # @return [nil] + # @param [FFI::Pointer(PassRegistryRef)] r + # @return [nil] # @scope class attach_function :initialize_transform_utils, :LLVMInitializeTransformUtils, [:pointer], :void - # (Not documented) - # + # @method initialize_scalar_opts(r) - # @param [FFI::Pointer(PassRegistryRef)] r - # @return [nil] + # @param [FFI::Pointer(PassRegistryRef)] r + # @return [nil] # @scope class attach_function :initialize_scalar_opts, :LLVMInitializeScalarOpts, [:pointer], :void - # (Not documented) - # + # @method initialize_inst_combine(r) - # @param [FFI::Pointer(PassRegistryRef)] r - # @return [nil] + # @param [FFI::Pointer(PassRegistryRef)] r + # @return [nil] # @scope class attach_function :initialize_inst_combine, :LLVMInitializeInstCombine, [:pointer], :void - # (Not documented) - # + # @method initialize_ipo(r) - # @param [FFI::Pointer(PassRegistryRef)] r - # @return [nil] + # @param [FFI::Pointer(PassRegistryRef)] r + # @return [nil] # @scope class attach_function :initialize_ipo, :LLVMInitializeIPO, [:pointer], :void - # (Not documented) - # + # @method initialize_instrumentation(r) - # @param [FFI::Pointer(PassRegistryRef)] r - # @return [nil] + # @param [FFI::Pointer(PassRegistryRef)] r + # @return [nil] # @scope class attach_function :initialize_instrumentation, :LLVMInitializeInstrumentation, [:pointer], :void - # (Not documented) - # + # @method initialize_analysis(r) - # @param [FFI::Pointer(PassRegistryRef)] r - # @return [nil] + # @param [FFI::Pointer(PassRegistryRef)] r + # @return [nil] # @scope class attach_function :initialize_analysis, :LLVMInitializeAnalysis, [:pointer], :void - # (Not documented) - # + # @method initialize_ipa(r) - # @param [FFI::Pointer(PassRegistryRef)] r - # @return [nil] + # @param [FFI::Pointer(PassRegistryRef)] r + # @return [nil] # @scope class attach_function :initialize_ipa, :LLVMInitializeIPA, [:pointer], :void - # (Not documented) - # + # @method initialize_code_gen(r) - # @param [FFI::Pointer(PassRegistryRef)] r - # @return [nil] + # @param [FFI::Pointer(PassRegistryRef)] r + # @return [nil] # @scope class attach_function :initialize_code_gen, :LLVMInitializeCodeGen, [:pointer], :void - # (Not documented) - # + # @method initialize_target(r) - # @param [FFI::Pointer(PassRegistryRef)] r - # @return [nil] + # @param [FFI::Pointer(PassRegistryRef)] r + # @return [nil] # @scope class attach_function :initialize_target, :LLVMInitializeTarget, [:pointer], :void - end diff --git a/test/output/llvm-c/LinkTimeOptimizer.rb b/test/output/llvm-c/LinkTimeOptimizer.rb index af2b83a..361fb3f 100644 --- a/test/output/llvm-c/LinkTimeOptimizer.rb +++ b/test/output/llvm-c/LinkTimeOptimizer.rb @@ -1,43 +1,45 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module LLVM + extend FFI::Library - ffi_lib 'LLVM-3.0' - + + ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"] + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # This should map exactly onto the C++ enumerator LTOStatus. - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:llvm_lto_status). - # + # === Options: # :unknown :: - # + # :opt_success :: - # + # :read_success :: - # + # :read_failure :: - # + # :write_failure :: - # + # :no_target :: - # + # :no_work :: - # + # :module_merge_failure :: - # + # :asm_failure :: - # + # :null_object :: # Added C-specific error codes - # + # @method _enum_llvm_lto_status_ # @return [Symbol] # @scope class @@ -53,38 +55,34 @@ def self.attach_function(name, *_) :asm_failure, 8, :null_object, 9 ] - + # extern "C" helps, because dlopen() interface uses name to find the symbol. - # + # @method llvm_create_optimizer() - # @return [FFI::Pointer(LlvmLtoT)] + # @return [FFI::Pointer(LlvmLtoT)] # @scope class attach_function :llvm_create_optimizer, :llvm_create_optimizer, [], :pointer - # (Not documented) - # + # @method llvm_destroy_optimizer(lto) - # @param [FFI::Pointer(LlvmLtoT)] lto - # @return [nil] + # @param [FFI::Pointer(LlvmLtoT)] lto + # @return [nil] # @scope class attach_function :llvm_destroy_optimizer, :llvm_destroy_optimizer, [:pointer], :void - # (Not documented) - # + # @method llvm_read_object_file(lto, input_filename) - # @param [FFI::Pointer(LlvmLtoT)] lto - # @param [String] input_filename - # @return [Symbol from _enum_llvm_lto_status_] + # @param [FFI::Pointer(LlvmLtoT)] lto + # @param [String] input_filename + # @return [Symbol from _enum_llvm_lto_status_] # @scope class attach_function :llvm_read_object_file, :llvm_read_object_file, [:pointer, :string], :llvm_lto_status - # (Not documented) - # + # @method llvm_optimize_modules(lto, output_filename) - # @param [FFI::Pointer(LlvmLtoT)] lto - # @param [String] output_filename - # @return [Symbol from _enum_llvm_lto_status_] + # @param [FFI::Pointer(LlvmLtoT)] lto + # @param [String] output_filename + # @return [Symbol from _enum_llvm_lto_status_] # @scope class attach_function :llvm_optimize_modules, :llvm_optimize_modules, [:pointer, :string], :llvm_lto_status - end diff --git a/test/output/llvm-c/Object.rb b/test/output/llvm-c/Object.rb index 072819c..81be50f 100644 --- a/test/output/llvm-c/Object.rb +++ b/test/output/llvm-c/Object.rb @@ -1,98 +1,91 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module LLVM + extend FFI::Library - ffi_lib 'LLVM-3.0' - + + ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"] + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) class OpaqueObjectFile < FFI::Struct layout :dummy, :char end - + # (Not documented) class OpaqueSectionIterator < FFI::Struct layout :dummy, :char end - + # (Not documented) - # + # @method create_object_file(mem_buf) - # @param [FFI::Pointer(MemoryBufferRef)] mem_buf - # @return [OpaqueObjectFile] + # @param [FFI::Pointer(MemoryBufferRef)] mem_buf + # @return [OpaqueObjectFile] # @scope class attach_function :create_object_file, :LLVMCreateObjectFile, [:pointer], OpaqueObjectFile - # (Not documented) - # + # @method dispose_object_file(object_file) - # @param [OpaqueObjectFile] object_file - # @return [nil] + # @param [OpaqueObjectFile] object_file + # @return [nil] # @scope class attach_function :dispose_object_file, :LLVMDisposeObjectFile, [OpaqueObjectFile], :void - # (Not documented) - # + # @method get_sections(object_file) - # @param [OpaqueObjectFile] object_file - # @return [OpaqueSectionIterator] + # @param [OpaqueObjectFile] object_file + # @return [OpaqueSectionIterator] # @scope class attach_function :get_sections, :LLVMGetSections, [OpaqueObjectFile], OpaqueSectionIterator - # (Not documented) - # + # @method dispose_section_iterator(si) - # @param [OpaqueSectionIterator] si - # @return [nil] + # @param [OpaqueSectionIterator] si + # @return [nil] # @scope class attach_function :dispose_section_iterator, :LLVMDisposeSectionIterator, [OpaqueSectionIterator], :void - # (Not documented) - # + # @method is_section_iterator_at_end(object_file, si) - # @param [OpaqueObjectFile] object_file - # @param [OpaqueSectionIterator] si - # @return [Integer] + # @param [OpaqueObjectFile] object_file + # @param [OpaqueSectionIterator] si + # @return [Integer] # @scope class attach_function :is_section_iterator_at_end, :LLVMIsSectionIteratorAtEnd, [OpaqueObjectFile, OpaqueSectionIterator], :int - # (Not documented) - # + # @method move_to_next_section(si) - # @param [OpaqueSectionIterator] si - # @return [nil] + # @param [OpaqueSectionIterator] si + # @return [nil] # @scope class attach_function :move_to_next_section, :LLVMMoveToNextSection, [OpaqueSectionIterator], :void - # (Not documented) - # + # @method get_section_name(si) - # @param [OpaqueSectionIterator] si - # @return [String] + # @param [OpaqueSectionIterator] si + # @return [String] # @scope class attach_function :get_section_name, :LLVMGetSectionName, [OpaqueSectionIterator], :string - # (Not documented) - # + # @method get_section_size(si) - # @param [OpaqueSectionIterator] si - # @return [Integer] + # @param [OpaqueSectionIterator] si + # @return [Integer] # @scope class - attach_function :get_section_size, :LLVMGetSectionSize, [OpaqueSectionIterator], :ulong - + attach_function :get_section_size, :LLVMGetSectionSize, [OpaqueSectionIterator], :ulong_long # (Not documented) - # + # @method get_section_contents(si) - # @param [OpaqueSectionIterator] si - # @return [String] + # @param [OpaqueSectionIterator] si + # @return [String] # @scope class attach_function :get_section_contents, :LLVMGetSectionContents, [OpaqueSectionIterator], :string - end diff --git a/test/output/llvm-c/Target.rb b/test/output/llvm-c/Target.rb index 5cd7c88..a7360e6 100644 --- a/test/output/llvm-c/Target.rb +++ b/test/output/llvm-c/Target.rb @@ -1,27 +1,29 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module LLVM + extend FFI::Library - ffi_lib 'LLVM-3.0' - + + ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"] + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:byte_ordering). - # + # === Options: # :big_endian :: - # + # :little_endian :: - # - # + + # @method _enum_byte_ordering_ # @return [Symbol] # @scope class @@ -29,217 +31,197 @@ def self.attach_function(name, *_) :big_endian, 0, :little_endian, 1 ] - + # (Not documented) class OpaqueTargetData < FFI::Struct layout :dummy, :char end - + # (Not documented) class OpaqueTargetLibraryInfotData < FFI::Struct layout :dummy, :char end - + # (Not documented) class StructLayout < FFI::Struct layout :dummy, :char end - + # LLVMInitializeAllTargetInfos - The main program should call this function if # it wants access to all available targets that LLVM is configured to # support. - # + # @method initialize_all_target_infos() - # @return [nil] + # @return [nil] # @scope class attach_function :initialize_all_target_infos, :LLVMInitializeAllTargetInfos, [], :void - # LLVMInitializeAllTargets - The main program should call this function if it # wants to link in all available targets that LLVM is configured to # support. - # + # @method initialize_all_targets() - # @return [nil] + # @return [nil] # @scope class attach_function :initialize_all_targets, :LLVMInitializeAllTargets, [], :void - # LLVMInitializeNativeTarget - The main program should call this function to # initialize the native target corresponding to the host. This is useful # for JIT applications to ensure that the target gets linked in correctly. - # + # @method initialize_native_target() - # @return [Integer] + # @return [Integer] # @scope class attach_function :initialize_native_target, :LLVMInitializeNativeTarget, [], :int - # Creates target data from a target layout string. # See the constructor llvm::TargetData::TargetData. - # + # @method create_target_data(string_rep) - # @param [String] string_rep - # @return [OpaqueTargetData] + # @param [String] string_rep + # @return [OpaqueTargetData] # @scope class attach_function :create_target_data, :LLVMCreateTargetData, [:string], OpaqueTargetData - # Adds target data information to a pass manager. This does not take ownership # of the target data. # See the method llvm::PassManagerBase::add. - # + # @method add_target_data(opaque_target_data, pass_manager_ref) - # @param [OpaqueTargetData] opaque_target_data - # @param [FFI::Pointer(PassManagerRef)] pass_manager_ref - # @return [nil] + # @param [OpaqueTargetData] opaque_target_data + # @param [FFI::Pointer(PassManagerRef)] pass_manager_ref + # @return [nil] # @scope class attach_function :add_target_data, :LLVMAddTargetData, [OpaqueTargetData, :pointer], :void - # Adds target library information to a pass manager. This does not take # ownership of the target library info. # See the method llvm::PassManagerBase::add. - # + # @method add_target_library_info(opaque_target_library_infot_data, pass_manager_ref) - # @param [OpaqueTargetLibraryInfotData] opaque_target_library_infot_data - # @param [FFI::Pointer(PassManagerRef)] pass_manager_ref - # @return [nil] + # @param [OpaqueTargetLibraryInfotData] opaque_target_library_infot_data + # @param [FFI::Pointer(PassManagerRef)] pass_manager_ref + # @return [nil] # @scope class attach_function :add_target_library_info, :LLVMAddTargetLibraryInfo, [OpaqueTargetLibraryInfotData, :pointer], :void - # Converts target data to a target layout string. The string must be disposed # with LLVMDisposeMessage. # See the constructor llvm::TargetData::TargetData. - # + # @method copy_string_rep_of_target_data(opaque_target_data) - # @param [OpaqueTargetData] opaque_target_data - # @return [String] + # @param [OpaqueTargetData] opaque_target_data + # @return [String] # @scope class attach_function :copy_string_rep_of_target_data, :LLVMCopyStringRepOfTargetData, [OpaqueTargetData], :string - # Returns the byte order of a target, either LLVMBigEndian or # LLVMLittleEndian. # See the method llvm::TargetData::isLittleEndian. - # + # @method byte_order(opaque_target_data) - # @param [OpaqueTargetData] opaque_target_data - # @return [Symbol from _enum_byte_ordering_] + # @param [OpaqueTargetData] opaque_target_data + # @return [Symbol from _enum_byte_ordering_] # @scope class attach_function :byte_order, :LLVMByteOrder, [OpaqueTargetData], :byte_ordering - # Returns the pointer size in bytes for a target. # See the method llvm::TargetData::getPointerSize. - # + # @method pointer_size(opaque_target_data) - # @param [OpaqueTargetData] opaque_target_data - # @return [Integer] + # @param [OpaqueTargetData] opaque_target_data + # @return [Integer] # @scope class attach_function :pointer_size, :LLVMPointerSize, [OpaqueTargetData], :uint - # Returns the integer type that is the same size as a pointer on a target. # See the method llvm::TargetData::getIntPtrType. - # + # @method int_ptr_type(opaque_target_data) - # @param [OpaqueTargetData] opaque_target_data - # @return [FFI::Pointer(TypeRef)] + # @param [OpaqueTargetData] opaque_target_data + # @return [FFI::Pointer(TypeRef)] # @scope class attach_function :int_ptr_type, :LLVMIntPtrType, [OpaqueTargetData], :pointer - # Computes the size of a type in bytes for a target. # See the method llvm::TargetData::getTypeSizeInBits. - # + # @method size_of_type_in_bits(opaque_target_data, type_ref) - # @param [OpaqueTargetData] opaque_target_data - # @param [FFI::Pointer(TypeRef)] type_ref - # @return [Integer] + # @param [OpaqueTargetData] opaque_target_data + # @param [FFI::Pointer(TypeRef)] type_ref + # @return [Integer] # @scope class attach_function :size_of_type_in_bits, :LLVMSizeOfTypeInBits, [OpaqueTargetData, :pointer], :ulong_long - # Computes the storage size of a type in bytes for a target. # See the method llvm::TargetData::getTypeStoreSize. - # + # @method store_size_of_type(opaque_target_data, type_ref) - # @param [OpaqueTargetData] opaque_target_data - # @param [FFI::Pointer(TypeRef)] type_ref - # @return [Integer] + # @param [OpaqueTargetData] opaque_target_data + # @param [FFI::Pointer(TypeRef)] type_ref + # @return [Integer] # @scope class attach_function :store_size_of_type, :LLVMStoreSizeOfType, [OpaqueTargetData, :pointer], :ulong_long - # Computes the ABI size of a type in bytes for a target. # See the method llvm::TargetData::getTypeAllocSize. - # + # @method abi_size_of_type(opaque_target_data, type_ref) - # @param [OpaqueTargetData] opaque_target_data - # @param [FFI::Pointer(TypeRef)] type_ref - # @return [Integer] + # @param [OpaqueTargetData] opaque_target_data + # @param [FFI::Pointer(TypeRef)] type_ref + # @return [Integer] # @scope class attach_function :abi_size_of_type, :LLVMABISizeOfType, [OpaqueTargetData, :pointer], :ulong_long - # Computes the ABI alignment of a type in bytes for a target. # See the method llvm::TargetData::getTypeABISize. - # + # @method abi_alignment_of_type(opaque_target_data, type_ref) - # @param [OpaqueTargetData] opaque_target_data - # @param [FFI::Pointer(TypeRef)] type_ref - # @return [Integer] + # @param [OpaqueTargetData] opaque_target_data + # @param [FFI::Pointer(TypeRef)] type_ref + # @return [Integer] # @scope class attach_function :abi_alignment_of_type, :LLVMABIAlignmentOfType, [OpaqueTargetData, :pointer], :uint - # Computes the call frame alignment of a type in bytes for a target. # See the method llvm::TargetData::getTypeABISize. - # + # @method call_frame_alignment_of_type(opaque_target_data, type_ref) - # @param [OpaqueTargetData] opaque_target_data - # @param [FFI::Pointer(TypeRef)] type_ref - # @return [Integer] + # @param [OpaqueTargetData] opaque_target_data + # @param [FFI::Pointer(TypeRef)] type_ref + # @return [Integer] # @scope class attach_function :call_frame_alignment_of_type, :LLVMCallFrameAlignmentOfType, [OpaqueTargetData, :pointer], :uint - # Computes the preferred alignment of a type in bytes for a target. # See the method llvm::TargetData::getTypeABISize. - # + # @method preferred_alignment_of_type(opaque_target_data, type_ref) - # @param [OpaqueTargetData] opaque_target_data - # @param [FFI::Pointer(TypeRef)] type_ref - # @return [Integer] + # @param [OpaqueTargetData] opaque_target_data + # @param [FFI::Pointer(TypeRef)] type_ref + # @return [Integer] # @scope class attach_function :preferred_alignment_of_type, :LLVMPreferredAlignmentOfType, [OpaqueTargetData, :pointer], :uint - # Computes the preferred alignment of a global variable in bytes for a target. # See the method llvm::TargetData::getPreferredAlignment. - # + # @method preferred_alignment_of_global(opaque_target_data, global_var) - # @param [OpaqueTargetData] opaque_target_data - # @param [FFI::Pointer(ValueRef)] global_var - # @return [Integer] + # @param [OpaqueTargetData] opaque_target_data + # @param [FFI::Pointer(ValueRef)] global_var + # @return [Integer] # @scope class attach_function :preferred_alignment_of_global, :LLVMPreferredAlignmentOfGlobal, [OpaqueTargetData, :pointer], :uint - # Computes the structure element that contains the byte offset for a target. # See the method llvm::StructLayout::getElementContainingOffset. - # + # @method element_at_offset(opaque_target_data, struct_ty, offset) - # @param [OpaqueTargetData] opaque_target_data - # @param [FFI::Pointer(TypeRef)] struct_ty - # @param [Integer] offset - # @return [Integer] + # @param [OpaqueTargetData] opaque_target_data + # @param [FFI::Pointer(TypeRef)] struct_ty + # @param [Integer] offset + # @return [Integer] # @scope class attach_function :element_at_offset, :LLVMElementAtOffset, [OpaqueTargetData, :pointer, :ulong_long], :uint - # Computes the byte offset of the indexed struct element for a target. # See the method llvm::StructLayout::getElementContainingOffset. - # + # @method offset_of_element(opaque_target_data, struct_ty, element) - # @param [OpaqueTargetData] opaque_target_data - # @param [FFI::Pointer(TypeRef)] struct_ty - # @param [Integer] element - # @return [Integer] + # @param [OpaqueTargetData] opaque_target_data + # @param [FFI::Pointer(TypeRef)] struct_ty + # @param [Integer] element + # @return [Integer] # @scope class attach_function :offset_of_element, :LLVMOffsetOfElement, [OpaqueTargetData, :pointer, :uint], :ulong_long - # Deallocates a TargetData. # See the destructor llvm::TargetData::~TargetData. - # + # @method dispose_target_data(opaque_target_data) - # @param [OpaqueTargetData] opaque_target_data - # @return [nil] + # @param [OpaqueTargetData] opaque_target_data + # @return [nil] # @scope class attach_function :dispose_target_data, :LLVMDisposeTargetData, [OpaqueTargetData], :void - end diff --git a/test/output/llvm-c/Transforms/IPO.rb b/test/output/llvm-c/Transforms/IPO.rb index 22bc8d0..fc4e768 100644 --- a/test/output/llvm-c/Transforms/IPO.rb +++ b/test/output/llvm-c/Transforms/IPO.rb @@ -1,128 +1,116 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module LLVM + extend FFI::Library - ffi_lib 'LLVM-3.0' - + + ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"] + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # See llvm::createArgumentPromotionPass function. - # + # @method add_argument_promotion_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_argument_promotion_pass, :LLVMAddArgumentPromotionPass, [:pointer], :void - # See llvm::createConstantMergePass function. - # + # @method add_constant_merge_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_constant_merge_pass, :LLVMAddConstantMergePass, [:pointer], :void - # See llvm::createDeadArgEliminationPass function. - # + # @method add_dead_arg_elimination_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_dead_arg_elimination_pass, :LLVMAddDeadArgEliminationPass, [:pointer], :void - # See llvm::createFunctionAttrsPass function. - # + # @method add_function_attrs_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_function_attrs_pass, :LLVMAddFunctionAttrsPass, [:pointer], :void - # See llvm::createFunctionInliningPass function. - # + # @method add_function_inlining_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_function_inlining_pass, :LLVMAddFunctionInliningPass, [:pointer], :void - # See llvm::createAlwaysInlinerPass function. - # + # @method add_always_inliner_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_always_inliner_pass, :LLVMAddAlwaysInlinerPass, [:pointer], :void - # See llvm::createGlobalDCEPass function. - # + # @method add_global_dce_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_global_dce_pass, :LLVMAddGlobalDCEPass, [:pointer], :void - # See llvm::createGlobalOptimizerPass function. - # + # @method add_global_optimizer_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_global_optimizer_pass, :LLVMAddGlobalOptimizerPass, [:pointer], :void - # See llvm::createIPConstantPropagationPass function. - # + # @method add_ip_constant_propagation_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_ip_constant_propagation_pass, :LLVMAddIPConstantPropagationPass, [:pointer], :void - # See llvm::createPruneEHPass function. - # + # @method add_prune_eh_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_prune_eh_pass, :LLVMAddPruneEHPass, [:pointer], :void - # See llvm::createIPSCCPPass function. - # + # @method add_ipsccp_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_ipsccp_pass, :LLVMAddIPSCCPPass, [:pointer], :void - # See llvm::createInternalizePass function. - # + # @method add_internalize_pass(pass_manager_ref, all_but_main) - # @param [FFI::Pointer(PassManagerRef)] pass_manager_ref - # @param [Integer] all_but_main - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pass_manager_ref + # @param [Integer] all_but_main + # @return [nil] # @scope class attach_function :add_internalize_pass, :LLVMAddInternalizePass, [:pointer, :uint], :void - # See llvm::createStripDeadPrototypesPass function. - # + # @method add_strip_dead_prototypes_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_strip_dead_prototypes_pass, :LLVMAddStripDeadPrototypesPass, [:pointer], :void - # See llvm::createStripSymbolsPass function. - # + # @method add_strip_symbols_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_strip_symbols_pass, :LLVMAddStripSymbolsPass, [:pointer], :void - end diff --git a/test/output/llvm-c/Transforms/PassManagerBuilder.rb b/test/output/llvm-c/Transforms/PassManagerBuilder.rb index d2d593d..cd73474 100644 --- a/test/output/llvm-c/Transforms/PassManagerBuilder.rb +++ b/test/output/llvm-c/Transforms/PassManagerBuilder.rb @@ -1,118 +1,109 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module LLVM + extend FFI::Library - ffi_lib 'LLVM-3.0' - + + ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"] + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # (Not documented) class OpaquePassManagerBuilder < FFI::Struct layout :dummy, :char end - + # See llvm::PassManagerBuilder. - # + # @method pass_manager_builder_create() - # @return [OpaquePassManagerBuilder] + # @return [OpaquePassManagerBuilder] # @scope class attach_function :pass_manager_builder_create, :LLVMPassManagerBuilderCreate, [], OpaquePassManagerBuilder - # (Not documented) - # + # @method pass_manager_builder_dispose(pmb) - # @param [OpaquePassManagerBuilder] pmb - # @return [nil] + # @param [OpaquePassManagerBuilder] pmb + # @return [nil] # @scope class attach_function :pass_manager_builder_dispose, :LLVMPassManagerBuilderDispose, [OpaquePassManagerBuilder], :void - # See llvm::PassManagerBuilder::OptLevel. - # + # @method pass_manager_builder_set_opt_level(pmb, opt_level) - # @param [OpaquePassManagerBuilder] pmb - # @param [Integer] opt_level - # @return [nil] + # @param [OpaquePassManagerBuilder] pmb + # @param [Integer] opt_level + # @return [nil] # @scope class attach_function :pass_manager_builder_set_opt_level, :LLVMPassManagerBuilderSetOptLevel, [OpaquePassManagerBuilder, :uint], :void - # See llvm::PassManagerBuilder::SizeLevel. - # + # @method pass_manager_builder_set_size_level(pmb, size_level) - # @param [OpaquePassManagerBuilder] pmb - # @param [Integer] size_level - # @return [nil] + # @param [OpaquePassManagerBuilder] pmb + # @param [Integer] size_level + # @return [nil] # @scope class attach_function :pass_manager_builder_set_size_level, :LLVMPassManagerBuilderSetSizeLevel, [OpaquePassManagerBuilder, :uint], :void - # See llvm::PassManagerBuilder::DisableUnitAtATime. - # + # @method pass_manager_builder_set_disable_unit_at_a_time(pmb, value) - # @param [OpaquePassManagerBuilder] pmb - # @param [Integer] value - # @return [nil] + # @param [OpaquePassManagerBuilder] pmb + # @param [Integer] value + # @return [nil] # @scope class attach_function :pass_manager_builder_set_disable_unit_at_a_time, :LLVMPassManagerBuilderSetDisableUnitAtATime, [OpaquePassManagerBuilder, :int], :void - # See llvm::PassManagerBuilder::DisableUnrollLoops. - # + # @method pass_manager_builder_set_disable_unroll_loops(pmb, value) - # @param [OpaquePassManagerBuilder] pmb - # @param [Integer] value - # @return [nil] + # @param [OpaquePassManagerBuilder] pmb + # @param [Integer] value + # @return [nil] # @scope class attach_function :pass_manager_builder_set_disable_unroll_loops, :LLVMPassManagerBuilderSetDisableUnrollLoops, [OpaquePassManagerBuilder, :int], :void - # See llvm::PassManagerBuilder::DisableSimplifyLibCalls - # + # @method pass_manager_builder_set_disable_simplify_lib_calls(pmb, value) - # @param [OpaquePassManagerBuilder] pmb - # @param [Integer] value - # @return [nil] + # @param [OpaquePassManagerBuilder] pmb + # @param [Integer] value + # @return [nil] # @scope class attach_function :pass_manager_builder_set_disable_simplify_lib_calls, :LLVMPassManagerBuilderSetDisableSimplifyLibCalls, [OpaquePassManagerBuilder, :int], :void - # See llvm::PassManagerBuilder::Inliner. - # + # @method pass_manager_builder_use_inliner_with_threshold(pmb, threshold) - # @param [OpaquePassManagerBuilder] pmb - # @param [Integer] threshold - # @return [nil] + # @param [OpaquePassManagerBuilder] pmb + # @param [Integer] threshold + # @return [nil] # @scope class attach_function :pass_manager_builder_use_inliner_with_threshold, :LLVMPassManagerBuilderUseInlinerWithThreshold, [OpaquePassManagerBuilder, :uint], :void - # See llvm::PassManagerBuilder::populateFunctionPassManager. - # + # @method pass_manager_builder_populate_function_pass_manager(pmb, pm) - # @param [OpaquePassManagerBuilder] pmb - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [OpaquePassManagerBuilder] pmb + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :pass_manager_builder_populate_function_pass_manager, :LLVMPassManagerBuilderPopulateFunctionPassManager, [OpaquePassManagerBuilder, :pointer], :void - # See llvm::PassManagerBuilder::populateModulePassManager. - # + # @method pass_manager_builder_populate_module_pass_manager(pmb, pm) - # @param [OpaquePassManagerBuilder] pmb - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [OpaquePassManagerBuilder] pmb + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :pass_manager_builder_populate_module_pass_manager, :LLVMPassManagerBuilderPopulateModulePassManager, [OpaquePassManagerBuilder, :pointer], :void - # See llvm::PassManagerBuilder::populateLTOPassManager. - # + # @method pass_manager_builder_populate_lto_pass_manager(pmb, pm, internalize, run_inliner) - # @param [OpaquePassManagerBuilder] pmb - # @param [FFI::Pointer(PassManagerRef)] pm - # @param [Integer] internalize - # @param [Integer] run_inliner - # @return [nil] + # @param [OpaquePassManagerBuilder] pmb + # @param [FFI::Pointer(PassManagerRef)] pm + # @param [Integer] internalize + # @param [Integer] run_inliner + # @return [nil] # @scope class attach_function :pass_manager_builder_populate_lto_pass_manager, :LLVMPassManagerBuilderPopulateLTOPassManager, [OpaquePassManagerBuilder, :pointer, :int, :int], :void - end diff --git a/test/output/llvm-c/Transforms/Scalar.rb b/test/output/llvm-c/Transforms/Scalar.rb index eb95e52..21e9429 100644 --- a/test/output/llvm-c/Transforms/Scalar.rb +++ b/test/output/llvm-c/Transforms/Scalar.rb @@ -1,256 +1,228 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module LLVM + extend FFI::Library - ffi_lib 'LLVM-3.0' - + + ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"] + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + # See llvm::createAggressiveDCEPass function. - # + # @method add_aggressive_dce_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_aggressive_dce_pass, :LLVMAddAggressiveDCEPass, [:pointer], :void - # See llvm::createCFGSimplificationPass function. - # + # @method add_cfg_simplification_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_cfg_simplification_pass, :LLVMAddCFGSimplificationPass, [:pointer], :void - # See llvm::createDeadStoreEliminationPass function. - # + # @method add_dead_store_elimination_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_dead_store_elimination_pass, :LLVMAddDeadStoreEliminationPass, [:pointer], :void - # See llvm::createGVNPass function. - # + # @method add_gvn_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_gvn_pass, :LLVMAddGVNPass, [:pointer], :void - # See llvm::createIndVarSimplifyPass function. - # + # @method add_ind_var_simplify_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_ind_var_simplify_pass, :LLVMAddIndVarSimplifyPass, [:pointer], :void - # See llvm::createInstructionCombiningPass function. - # + # @method add_instruction_combining_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_instruction_combining_pass, :LLVMAddInstructionCombiningPass, [:pointer], :void - # See llvm::createJumpThreadingPass function. - # + # @method add_jump_threading_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_jump_threading_pass, :LLVMAddJumpThreadingPass, [:pointer], :void - # See llvm::createLICMPass function. - # + # @method add_licm_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_licm_pass, :LLVMAddLICMPass, [:pointer], :void - # See llvm::createLoopDeletionPass function. - # + # @method add_loop_deletion_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_loop_deletion_pass, :LLVMAddLoopDeletionPass, [:pointer], :void - # See llvm::createLoopIdiomPass function - # + # @method add_loop_idiom_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_loop_idiom_pass, :LLVMAddLoopIdiomPass, [:pointer], :void - # See llvm::createLoopRotatePass function. - # + # @method add_loop_rotate_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_loop_rotate_pass, :LLVMAddLoopRotatePass, [:pointer], :void - # See llvm::createLoopUnrollPass function. - # + # @method add_loop_unroll_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_loop_unroll_pass, :LLVMAddLoopUnrollPass, [:pointer], :void - # See llvm::createLoopUnswitchPass function. - # + # @method add_loop_unswitch_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_loop_unswitch_pass, :LLVMAddLoopUnswitchPass, [:pointer], :void - # See llvm::createMemCpyOptPass function. - # + # @method add_mem_cpy_opt_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_mem_cpy_opt_pass, :LLVMAddMemCpyOptPass, [:pointer], :void - # See llvm::createPromoteMemoryToRegisterPass function. - # + # @method add_promote_memory_to_register_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_promote_memory_to_register_pass, :LLVMAddPromoteMemoryToRegisterPass, [:pointer], :void - # See llvm::createReassociatePass function. - # + # @method add_reassociate_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_reassociate_pass, :LLVMAddReassociatePass, [:pointer], :void - # See llvm::createSCCPPass function. - # + # @method add_sccp_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_sccp_pass, :LLVMAddSCCPPass, [:pointer], :void - # See llvm::createScalarReplAggregatesPass function. - # + # @method add_scalar_repl_aggregates_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_scalar_repl_aggregates_pass, :LLVMAddScalarReplAggregatesPass, [:pointer], :void - # See llvm::createScalarReplAggregatesPass function. - # + # @method add_scalar_repl_aggregates_pass_ssa(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_scalar_repl_aggregates_pass_ssa, :LLVMAddScalarReplAggregatesPassSSA, [:pointer], :void - # See llvm::createScalarReplAggregatesPass function. - # + # @method add_scalar_repl_aggregates_pass_with_threshold(pm, threshold) - # @param [FFI::Pointer(PassManagerRef)] pm - # @param [Integer] threshold - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @param [Integer] threshold + # @return [nil] # @scope class attach_function :add_scalar_repl_aggregates_pass_with_threshold, :LLVMAddScalarReplAggregatesPassWithThreshold, [:pointer, :int], :void - # See llvm::createSimplifyLibCallsPass function. - # + # @method add_simplify_lib_calls_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_simplify_lib_calls_pass, :LLVMAddSimplifyLibCallsPass, [:pointer], :void - # See llvm::createTailCallEliminationPass function. - # + # @method add_tail_call_elimination_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_tail_call_elimination_pass, :LLVMAddTailCallEliminationPass, [:pointer], :void - # See llvm::createConstantPropagationPass function. - # + # @method add_constant_propagation_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_constant_propagation_pass, :LLVMAddConstantPropagationPass, [:pointer], :void - # See llvm::demotePromoteMemoryToRegisterPass function. - # + # @method add_demote_memory_to_register_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_demote_memory_to_register_pass, :LLVMAddDemoteMemoryToRegisterPass, [:pointer], :void - # See llvm::createVerifierPass function. - # + # @method add_verifier_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_verifier_pass, :LLVMAddVerifierPass, [:pointer], :void - # See llvm::createCorrelatedValuePropagationPass function - # + # @method add_correlated_value_propagation_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_correlated_value_propagation_pass, :LLVMAddCorrelatedValuePropagationPass, [:pointer], :void - # See llvm::createEarlyCSEPass function - # + # @method add_early_cse_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_early_cse_pass, :LLVMAddEarlyCSEPass, [:pointer], :void - # See llvm::createLowerExpectIntrinsicPass function - # + # @method add_lower_expect_intrinsic_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_lower_expect_intrinsic_pass, :LLVMAddLowerExpectIntrinsicPass, [:pointer], :void - # See llvm::createTypeBasedAliasAnalysisPass function - # + # @method add_type_based_alias_analysis_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_type_based_alias_analysis_pass, :LLVMAddTypeBasedAliasAnalysisPass, [:pointer], :void - # See llvm::createBasicAliasAnalysisPass function - # + # @method add_basic_alias_analysis_pass(pm) - # @param [FFI::Pointer(PassManagerRef)] pm - # @return [nil] + # @param [FFI::Pointer(PassManagerRef)] pm + # @return [nil] # @scope class attach_function :add_basic_alias_analysis_pass, :LLVMAddBasicAliasAnalysisPass, [:pointer], :void - end diff --git a/test/output/llvm-c/lto.rb b/test/output/llvm-c/lto.rb index 1cc26bd..bf175e3 100644 --- a/test/output/llvm-c/lto.rb +++ b/test/output/llvm-c/lto.rb @@ -1,65 +1,67 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module LLVM + extend FFI::Library - ffi_lib 'LLVM-3.0' - + + ffi_lib ENV["LLVM_PATH"] || ["libLLVM-3.5.so.1", "LLVM-3.5"] + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + LTO_H = 1 - + LTO_API_VERSION = 4 - + # (Not documented) - # - # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:lto_symbol_attributes). - # + + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:lto_symbol_alignment_mask1225945966). + # === Options: # :alignment_mask :: - # + # :permissions_mask :: # log2 of alignment # :permissions_code :: - # + # :permissions_data :: - # + # :permissions_rodata :: - # + # :definition_mask :: - # + # :definition_regular :: - # + # :definition_tentative :: - # + # :definition_weak :: - # + # :definition_undefined :: - # + # :definition_weakundef :: - # + # :scope_mask :: - # + # :scope_internal :: - # + # :scope_hidden :: - # + # :scope_protected :: - # + # :scope_default :: - # + # :scope_default_can_be_hidden :: - # - # - # @method _enum_lto_symbol_attributes_ + + + # @method _enum_lto_symbol_alignment_mask1225945966_ # @return [Symbol] # @scope class - enum :lto_symbol_attributes, [ + enum :lto_symbol_alignment_mask1225945966, [ :alignment_mask, 31, :permissions_mask, 224, :permissions_code, 160, @@ -78,17 +80,17 @@ def self.attach_function(name, *_) :scope_default, 6144, :scope_default_can_be_hidden, 10240 ] - + # (Not documented) - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:lto_debug_model). - # + # === Options: # :none :: - # + # :dwarf :: - # - # + + # @method _enum_lto_debug_model_ # @return [Symbol] # @scope class @@ -96,19 +98,19 @@ def self.attach_function(name, *_) :none, 0, :dwarf, 1 ] - + # (Not documented) - # + # This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:lto_codegen_model). - # + # === Options: # :pic_model_static :: - # + # :pic_model_dynamic :: - # + # :pic_model_dynamic_no_pic :: - # - # + + # @method _enum_lto_codegen_model_ # @return [Symbol] # @scope class @@ -117,327 +119,298 @@ def self.attach_function(name, *_) :pic_model_dynamic, 1, :pic_model_dynamic_no_pic, 2 ] - + # opaque reference to a loaded object module module LTOModuleWrappers - # @return [nil] + # @return [nil] def dispose() LLVM.lto_module_dispose(self) end - - # @return [String] + + # @return [String] def get_target_triple() LLVM.lto_module_get_target_triple(self) end - - # @param [String] triple - # @return [nil] + + # @param [String] triple + # @return [nil] def set_target_triple(triple) LLVM.lto_module_set_target_triple(self, triple) end - - # @return [Integer] + + # @return [Integer] def get_num_symbols() LLVM.lto_module_get_num_symbols(self) end - - # @param [Integer] index - # @return [String] + + # @param [Integer] index + # @return [String] def get_symbol_name(index) LLVM.lto_module_get_symbol_name(self, index) end - - # @param [Integer] index - # @return [Symbol from _enum_lto_symbol_attributes_] + + # @param [Integer] index + # @return [Integer] def get_symbol_attribute(index) LLVM.lto_module_get_symbol_attribute(self, index) end end - + class LTOModule < FFI::Struct include LTOModuleWrappers layout :dummy, :char end - + # opaque reference to a code generator class LTOCodeGenerator < FFI::Struct layout :dummy, :char end - + # Returns a printable string. - # + # @method lto_get_version() - # @return [String] + # @return [String] # @scope class attach_function :lto_get_version, :lto_get_version, [], :string - # Returns the last error string or NULL if last operation was successful. - # + # @method lto_get_error_message() - # @return [String] + # @return [String] # @scope class attach_function :lto_get_error_message, :lto_get_error_message, [], :string - # Checks if a file is a loadable object file. - # + # @method lto_module_is_object_file(path) - # @param [String] path - # @return [Boolean] + # @param [String] path + # @return [Integer] # @scope class - attach_function :lto_module_is_object_file, :lto_module_is_object_file, [:string], :bool - + attach_function :lto_module_is_object_file, :lto_module_is_object_file, [:string], :int # Checks if a file is a loadable object compiled for requested target. - # + # @method lto_module_is_object_file_for_target(path, target_triple_prefix) - # @param [String] path - # @param [String] target_triple_prefix - # @return [Boolean] + # @param [String] path + # @param [String] target_triple_prefix + # @return [Integer] # @scope class - attach_function :lto_module_is_object_file_for_target, :lto_module_is_object_file_for_target, [:string, :string], :bool - + attach_function :lto_module_is_object_file_for_target, :lto_module_is_object_file_for_target, [:string, :string], :int # Checks if a buffer is a loadable object file. - # + # @method lto_module_is_object_file_in_memory(mem, length) - # @param [FFI::Pointer(*Void)] mem - # @param [Integer] length - # @return [Boolean] + # @param [FFI::Pointer(*Void)] mem + # @param [Integer] length + # @return [Integer] # @scope class - attach_function :lto_module_is_object_file_in_memory, :lto_module_is_object_file_in_memory, [:pointer, :ulong], :bool - + attach_function :lto_module_is_object_file_in_memory, :lto_module_is_object_file_in_memory, [:pointer, :int], :int # Checks if a buffer is a loadable object compiled for requested target. - # + # @method lto_module_is_object_file_in_memory_for_target(mem, length, target_triple_prefix) - # @param [FFI::Pointer(*Void)] mem - # @param [Integer] length - # @param [String] target_triple_prefix - # @return [Boolean] + # @param [FFI::Pointer(*Void)] mem + # @param [Integer] length + # @param [String] target_triple_prefix + # @return [Integer] # @scope class - attach_function :lto_module_is_object_file_in_memory_for_target, :lto_module_is_object_file_in_memory_for_target, [:pointer, :ulong, :string], :bool - + attach_function :lto_module_is_object_file_in_memory_for_target, :lto_module_is_object_file_in_memory_for_target, [:pointer, :int, :string], :int # Loads an object file from disk. # Returns NULL on error (check lto_get_error_message() for details). - # + # @method lto_module_create(path) - # @param [String] path - # @return [LTOModule] + # @param [String] path + # @return [LTOModule] # @scope class attach_function :lto_module_create, :lto_module_create, [:string], LTOModule - # Loads an object file from memory. # Returns NULL on error (check lto_get_error_message() for details). - # + # @method lto_module_create_from_memory(mem, length) - # @param [FFI::Pointer(*Void)] mem - # @param [Integer] length - # @return [LTOModule] + # @param [FFI::Pointer(*Void)] mem + # @param [Integer] length + # @return [LTOModule] # @scope class - attach_function :lto_module_create_from_memory, :lto_module_create_from_memory, [:pointer, :ulong], LTOModule - + attach_function :lto_module_create_from_memory, :lto_module_create_from_memory, [:pointer, :int], LTOModule # Loads an object file from disk. The seek point of fd is not preserved. # Returns NULL on error (check lto_get_error_message() for details). - # + # @method lto_module_create_from_fd(fd, path, file_size) - # @param [Integer] fd - # @param [String] path - # @param [Integer] file_size - # @return [LTOModule] + # @param [Integer] fd + # @param [String] path + # @param [Integer] file_size + # @return [LTOModule] # @scope class - attach_function :lto_module_create_from_fd, :lto_module_create_from_fd, [:int, :string, :ulong], LTOModule - + attach_function :lto_module_create_from_fd, :lto_module_create_from_fd, [:int, :string, :int], LTOModule # Loads an object file from disk. The seek point of fd is not preserved. # Returns NULL on error (check lto_get_error_message() for details). - # + # @method lto_module_create_from_fd_at_offset(fd, path, file_size, map_size, offset) - # @param [Integer] fd - # @param [String] path - # @param [Integer] file_size - # @param [Integer] map_size - # @param [Integer] offset - # @return [LTOModule] - # @scope class - attach_function :lto_module_create_from_fd_at_offset, :lto_module_create_from_fd_at_offset, [:int, :string, :ulong, :ulong, :long], LTOModule - + # @param [Integer] fd + # @param [String] path + # @param [Integer] file_size + # @param [Integer] map_size + # @param [Integer] offset + # @return [LTOModule] + # @scope class + attach_function :lto_module_create_from_fd_at_offset, :lto_module_create_from_fd_at_offset, [:int, :string, :int, :int, :int], LTOModule # Frees all memory internally allocated by the module. # Upon return the lto_module_t is no longer valid. - # + # @method lto_module_dispose(mod) - # @param [LTOModule] mod - # @return [nil] + # @param [LTOModule] mod + # @return [nil] # @scope class attach_function :lto_module_dispose, :lto_module_dispose, [LTOModule], :void - # Returns triple string which the object module was compiled under. - # + # @method lto_module_get_target_triple(mod) - # @param [LTOModule] mod - # @return [String] + # @param [LTOModule] mod + # @return [String] # @scope class attach_function :lto_module_get_target_triple, :lto_module_get_target_triple, [LTOModule], :string - # Sets triple string with which the object will be codegened. - # + # @method lto_module_set_target_triple(mod, triple) - # @param [LTOModule] mod - # @param [String] triple - # @return [nil] + # @param [LTOModule] mod + # @param [String] triple + # @return [nil] # @scope class attach_function :lto_module_set_target_triple, :lto_module_set_target_triple, [LTOModule, :string], :void - # Returns the number of symbols in the object module. - # + # @method lto_module_get_num_symbols(mod) - # @param [LTOModule] mod - # @return [Integer] + # @param [LTOModule] mod + # @return [Integer] # @scope class attach_function :lto_module_get_num_symbols, :lto_module_get_num_symbols, [LTOModule], :uint - # Returns the name of the ith symbol in the object module. - # + # @method lto_module_get_symbol_name(mod, index) - # @param [LTOModule] mod - # @param [Integer] index - # @return [String] + # @param [LTOModule] mod + # @param [Integer] index + # @return [String] # @scope class attach_function :lto_module_get_symbol_name, :lto_module_get_symbol_name, [LTOModule, :uint], :string - # Returns the attributes of the ith symbol in the object module. - # + # @method lto_module_get_symbol_attribute(mod, index) - # @param [LTOModule] mod - # @param [Integer] index - # @return [Symbol from _enum_lto_symbol_attributes_] + # @param [LTOModule] mod + # @param [Integer] index + # @return [Integer] # @scope class - attach_function :lto_module_get_symbol_attribute, :lto_module_get_symbol_attribute, [LTOModule, :uint], :lto_symbol_attributes - + attach_function :lto_module_get_symbol_attribute, :lto_module_get_symbol_attribute, [LTOModule, :uint], :int # Instantiates a code generator. # Returns NULL on error (check lto_get_error_message() for details). - # + # @method lto_codegen_create() - # @return [LTOCodeGenerator] + # @return [LTOCodeGenerator] # @scope class attach_function :lto_codegen_create, :lto_codegen_create, [], LTOCodeGenerator - # Frees all code generator and all memory it internally allocated. # Upon return the lto_code_gen_t is no longer valid. - # + # @method lto_codegen_dispose(lto_code_generator) - # @param [LTOCodeGenerator] lto_code_generator - # @return [nil] + # @param [LTOCodeGenerator] lto_code_generator + # @return [nil] # @scope class attach_function :lto_codegen_dispose, :lto_codegen_dispose, [LTOCodeGenerator], :void - # Add an object module to the set of modules for which code will be generated. # Returns true on error (check lto_get_error_message() for details). - # + # @method lto_codegen_add_module(cg, mod) - # @param [LTOCodeGenerator] cg - # @param [LTOModule] mod - # @return [Boolean] + # @param [LTOCodeGenerator] cg + # @param [LTOModule] mod + # @return [Integer] # @scope class - attach_function :lto_codegen_add_module, :lto_codegen_add_module, [LTOCodeGenerator, LTOModule], :bool - + attach_function :lto_codegen_add_module, :lto_codegen_add_module, [LTOCodeGenerator, LTOModule], :int # Sets if debug info should be generated. # Returns true on error (check lto_get_error_message() for details). - # + # @method lto_codegen_set_debug_model(cg, lto_debug_model) - # @param [LTOCodeGenerator] cg - # @param [Symbol from _enum_lto_debug_model_] lto_debug_model - # @return [Boolean] + # @param [LTOCodeGenerator] cg + # @param [Symbol from _enum_lto_debug_model_] lto_debug_model + # @return [Integer] # @scope class - attach_function :lto_codegen_set_debug_model, :lto_codegen_set_debug_model, [LTOCodeGenerator, :lto_debug_model], :bool - + attach_function :lto_codegen_set_debug_model, :lto_codegen_set_debug_model, [LTOCodeGenerator, :lto_debug_model], :int # Sets which PIC code model to generated. # Returns true on error (check lto_get_error_message() for details). - # + # @method lto_codegen_set_pic_model(cg, lto_codegen_model) - # @param [LTOCodeGenerator] cg - # @param [Symbol from _enum_lto_codegen_model_] lto_codegen_model - # @return [Boolean] + # @param [LTOCodeGenerator] cg + # @param [Symbol from _enum_lto_codegen_model_] lto_codegen_model + # @return [Integer] # @scope class - attach_function :lto_codegen_set_pic_model, :lto_codegen_set_pic_model, [LTOCodeGenerator, :lto_codegen_model], :bool - + attach_function :lto_codegen_set_pic_model, :lto_codegen_set_pic_model, [LTOCodeGenerator, :lto_codegen_model], :int # Sets the cpu to generate code for. - # + # @method lto_codegen_set_cpu(cg, cpu) - # @param [LTOCodeGenerator] cg - # @param [String] cpu - # @return [nil] + # @param [LTOCodeGenerator] cg + # @param [String] cpu + # @return [nil] # @scope class attach_function :lto_codegen_set_cpu, :lto_codegen_set_cpu, [LTOCodeGenerator, :string], :void - # Sets the location of the assembler tool to run. If not set, libLTO # will use gcc to invoke the assembler. - # + # @method lto_codegen_set_assembler_path(cg, path) - # @param [LTOCodeGenerator] cg - # @param [String] path - # @return [nil] + # @param [LTOCodeGenerator] cg + # @param [String] path + # @return [nil] # @scope class attach_function :lto_codegen_set_assembler_path, :lto_codegen_set_assembler_path, [LTOCodeGenerator, :string], :void - # Sets extra arguments that libLTO should pass to the assembler. - # + # @method lto_codegen_set_assembler_args(cg, args, nargs) - # @param [LTOCodeGenerator] cg - # @param [FFI::Pointer(**CharS)] args - # @param [Integer] nargs - # @return [nil] + # @param [LTOCodeGenerator] cg + # @param [FFI::Pointer(**CharS)] args + # @param [Integer] nargs + # @return [nil] # @scope class attach_function :lto_codegen_set_assembler_args, :lto_codegen_set_assembler_args, [LTOCodeGenerator, :pointer, :int], :void - # Adds to a list of all global symbols that must exist in the final # generated code. If a function is not listed, it might be # inlined into every usage and optimized away. - # + # @method lto_codegen_add_must_preserve_symbol(cg, symbol) - # @param [LTOCodeGenerator] cg - # @param [String] symbol - # @return [nil] + # @param [LTOCodeGenerator] cg + # @param [String] symbol + # @return [nil] # @scope class attach_function :lto_codegen_add_must_preserve_symbol, :lto_codegen_add_must_preserve_symbol, [LTOCodeGenerator, :string], :void - # Writes a new object file at the specified path that contains the # merged contents of all modules added so far. # Returns true on error (check lto_get_error_message() for details). - # + # @method lto_codegen_write_merged_modules(cg, path) - # @param [LTOCodeGenerator] cg - # @param [String] path - # @return [Boolean] + # @param [LTOCodeGenerator] cg + # @param [String] path + # @return [Integer] # @scope class - attach_function :lto_codegen_write_merged_modules, :lto_codegen_write_merged_modules, [LTOCodeGenerator, :string], :bool - + attach_function :lto_codegen_write_merged_modules, :lto_codegen_write_merged_modules, [LTOCodeGenerator, :string], :int # Generates code for all added modules into one native object file. # On success returns a pointer to a generated mach-o/ELF buffer and # length set to the buffer size. The buffer is owned by the # lto_code_gen_t and will be freed when lto_codegen_dispose() # is called, or lto_codegen_compile() is called again. # On failure, returns NULL (check lto_get_error_message() for details). - # + # @method lto_codegen_compile(cg, length) - # @param [LTOCodeGenerator] cg - # @param [FFI::Pointer(*SizeT)] length - # @return [FFI::Pointer(*Void)] + # @param [LTOCodeGenerator] cg + # @param [FFI::Pointer(*Int)] length + # @return [FFI::Pointer(*Void)] # @scope class attach_function :lto_codegen_compile, :lto_codegen_compile, [LTOCodeGenerator, :pointer], :pointer - # Generates code for all added modules into one native object file. # The name of the file is written to name. Returns true on error. - # + # @method lto_codegen_compile_to_file(cg, name) - # @param [LTOCodeGenerator] cg - # @param [FFI::Pointer(**CharS)] name - # @return [Boolean] + # @param [LTOCodeGenerator] cg + # @param [FFI::Pointer(**CharS)] name + # @return [Integer] # @scope class - attach_function :lto_codegen_compile_to_file, :lto_codegen_compile_to_file, [LTOCodeGenerator, :pointer], :bool - + attach_function :lto_codegen_compile_to_file, :lto_codegen_compile_to_file, [LTOCodeGenerator, :pointer], :int # Sets options to help debug codegen bugs. - # + # @method lto_codegen_debug_options(cg, string) - # @param [LTOCodeGenerator] cg - # @param [String] string - # @return [nil] + # @param [LTOCodeGenerator] cg + # @param [String] string + # @return [nil] # @scope class attach_function :lto_codegen_debug_options, :lto_codegen_debug_options, [LTOCodeGenerator, :string], :void - end diff --git a/test/output/sqlite3.rb b/test/output/sqlite3.rb index 29e755d..83ea5cc 100644 --- a/test/output/sqlite3.rb +++ b/test/output/sqlite3.rb @@ -1,480 +1,482 @@ -# Generated by ffi-gen. Please do not change this file by hand. +# [generated by ffi_generator] # require 'ffi' module SQLite3 + extend FFI::Library - ffi_lib 'sqlite3' - + + ffi_lib ENV["SQLITE3_PATH"] || "sqlite3" + def self.attach_function(name, *_) begin; super; rescue FFI::NotFoundError => e (class << self; self; end).class_eval { define_method(name) { |*_| raise e } } end end - + VERSION = "3.7.9" - + VERSION_NUMBER = 3007009 - + SOURCE_ID = "2011-11-01 00:52:41 c7c6050ef060877ebe77b41d959e9df13f8c9b5e" - + OK = 0 - + ERROR = 1 - + INTERNAL = 2 - + PERM = 3 - + ABORT = 4 - + BUSY = 5 - + LOCKED = 6 - + NOMEM = 7 - + READONLY = 8 - + INTERRUPT = 9 - + IOERR = 10 - + CORRUPT = 11 - + NOTFOUND = 12 - + FULL = 13 - + CANTOPEN = 14 - + PROTOCOL = 15 - + EMPTY = 16 - + SCHEMA = 17 - + TOOBIG = 18 - + CONSTRAINT = 19 - + MISMATCH = 20 - + MISUSE = 21 - + NOLFS = 22 - + AUTH = 23 - + FORMAT = 24 - + RANGE = 25 - + NOTADB = 26 - + ROW = 100 - + DONE = 101 - + OPEN_READONLY = 0x00000001 - + OPEN_READWRITE = 0x00000002 - + OPEN_CREATE = 0x00000004 - + OPEN_DELETEONCLOSE = 0x00000008 - + OPEN_EXCLUSIVE = 0x00000010 - + OPEN_AUTOPROXY = 0x00000020 - + OPEN_URI = 0x00000040 - + OPEN_MAIN_DB = 0x00000100 - + OPEN_TEMP_DB = 0x00000200 - + OPEN_TRANSIENT_DB = 0x00000400 - + OPEN_MAIN_JOURNAL = 0x00000800 - + OPEN_TEMP_JOURNAL = 0x00001000 - + OPEN_SUBJOURNAL = 0x00002000 - + OPEN_MASTER_JOURNAL = 0x00004000 - + OPEN_NOMUTEX = 0x00008000 - + OPEN_FULLMUTEX = 0x00010000 - + OPEN_SHAREDCACHE = 0x00020000 - + OPEN_PRIVATECACHE = 0x00040000 - + OPEN_WAL = 0x00080000 - + IOCAP_ATOMIC = 0x00000001 - + IOCAP_ATOMIC512 = 0x00000002 - + IOCAP_ATOMIC1K = 0x00000004 - + IOCAP_ATOMIC2K = 0x00000008 - + IOCAP_ATOMIC4K = 0x00000010 - + IOCAP_ATOMIC8K = 0x00000020 - + IOCAP_ATOMIC16K = 0x00000040 - + IOCAP_ATOMIC32K = 0x00000080 - + IOCAP_ATOMIC64K = 0x00000100 - + IOCAP_SAFE_APPEND = 0x00000200 - + IOCAP_SEQUENTIAL = 0x00000400 - + IOCAP_UNDELETABLE_WHEN_OPEN = 0x00000800 - + LOCK_NONE = 0 - + LOCK_SHARED = 1 - + LOCK_RESERVED = 2 - + LOCK_PENDING = 3 - + LOCK_EXCLUSIVE = 4 - + SYNC_NORMAL = 0x00002 - + SYNC_FULL = 0x00003 - + SYNC_DATAONLY = 0x00010 - + FCNTL_LOCKSTATE = 1 - + GET_LOCKPROXYFILE = 2 - + SET_LOCKPROXYFILE = 3 - + LAST_ERRNO = 4 - + FCNTL_SIZE_HINT = 5 - + FCNTL_CHUNK_SIZE = 6 - + FCNTL_FILE_POINTER = 7 - + FCNTL_SYNC_OMITTED = 8 - + FCNTL_WIN32_AV_RETRY = 9 - + FCNTL_PERSIST_WAL = 10 - + FCNTL_OVERWRITE = 11 - + ACCESS_EXISTS = 0 - + ACCESS_READWRITE = 1 - + ACCESS_READ = 2 - + SHM_UNLOCK = 1 - + SHM_LOCK = 2 - + SHM_SHARED = 4 - + SHM_EXCLUSIVE = 8 - + SHM_NLOCK = 8 - + CONFIG_SINGLETHREAD = 1 - + CONFIG_MULTITHREAD = 2 - + CONFIG_SERIALIZED = 3 - + CONFIG_MALLOC = 4 - + CONFIG_GETMALLOC = 5 - + CONFIG_SCRATCH = 6 - + CONFIG_PAGECACHE = 7 - + CONFIG_HEAP = 8 - + CONFIG_MEMSTATUS = 9 - + CONFIG_MUTEX = 10 - + CONFIG_GETMUTEX = 11 - + CONFIG_LOOKASIDE = 13 - + CONFIG_PCACHE = 14 - + CONFIG_GETPCACHE = 15 - + CONFIG_LOG = 16 - + CONFIG_URI = 17 - + DBCONFIG_LOOKASIDE = 1001 - + DBCONFIG_ENABLE_FKEY = 1002 - + DBCONFIG_ENABLE_TRIGGER = 1003 - + DENY = 1 - + IGNORE = 2 - + CREATE_INDEX = 1 - + CREATE_TABLE = 2 - + CREATE_TEMP_INDEX = 3 - + CREATE_TEMP_TABLE = 4 - + CREATE_TEMP_TRIGGER = 5 - + CREATE_TEMP_VIEW = 6 - + CREATE_TRIGGER = 7 - + CREATE_VIEW = 8 - + DELETE = 9 - + DROP_INDEX = 10 - + DROP_TABLE = 11 - + DROP_TEMP_INDEX = 12 - + DROP_TEMP_TABLE = 13 - + DROP_TEMP_TRIGGER = 14 - + DROP_TEMP_VIEW = 15 - + DROP_TRIGGER = 16 - + DROP_VIEW = 17 - + INSERT = 18 - + PRAGMA = 19 - + READ = 20 - + SELECT = 21 - + TRANSACTION = 22 - + UPDATE = 23 - + ATTACH = 24 - + DETACH = 25 - + ALTER_TABLE = 26 - + REINDEX = 27 - + ANALYZE = 28 - + CREATE_VTABLE = 29 - + DROP_VTABLE = 30 - + FUNCTION = 31 - + SAVEPOINT = 32 - + COPY = 0 - + LIMIT_LENGTH = 0 - + LIMIT_SQL_LENGTH = 1 - + LIMIT_COLUMN = 2 - + LIMIT_EXPR_DEPTH = 3 - + LIMIT_COMPOUND_SELECT = 4 - + LIMIT_VDBE_OP = 5 - + LIMIT_FUNCTION_ARG = 6 - + LIMIT_ATTACHED = 7 - + LIMIT_LIKE_PATTERN_LENGTH = 8 - + LIMIT_VARIABLE_NUMBER = 9 - + LIMIT_TRIGGER_DEPTH = 10 - + INTEGER = 1 - + FLOAT = 2 - + BLOB = 4 - + NULL = 5 - + TEXT = 3 - + SQLITE3_TEXT = 3 - + UTF8 = 1 - + UTF16LE = 2 - + UTF16BE = 3 - + UTF16 = 4 - + ANY = 5 - + UTF16_ALIGNED = 8 - + INDEX_CONSTRAINT_EQ = 2 - + INDEX_CONSTRAINT_GT = 4 - + INDEX_CONSTRAINT_LE = 8 - + INDEX_CONSTRAINT_LT = 16 - + INDEX_CONSTRAINT_GE = 32 - + INDEX_CONSTRAINT_MATCH = 64 - + MUTEX_FAST = 0 - + MUTEX_RECURSIVE = 1 - + MUTEX_STATIC_MASTER = 2 - + MUTEX_STATIC_MEM = 3 - + MUTEX_STATIC_MEM2 = 4 - + MUTEX_STATIC_OPEN = 4 - + MUTEX_STATIC_PRNG = 5 - + MUTEX_STATIC_LRU = 6 - + MUTEX_STATIC_LRU2 = 7 - + MUTEX_STATIC_PMEM = 7 - + TESTCTRL_FIRST = 5 - + TESTCTRL_PRNG_SAVE = 5 - + TESTCTRL_PRNG_RESTORE = 6 - + TESTCTRL_PRNG_RESET = 7 - + TESTCTRL_BITVEC_TEST = 8 - + TESTCTRL_FAULT_INSTALL = 9 - + TESTCTRL_BENIGN_MALLOC_HOOKS = 10 - + TESTCTRL_PENDING_BYTE = 11 - + TESTCTRL_ASSERT = 12 - + TESTCTRL_ALWAYS = 13 - + TESTCTRL_RESERVE = 14 - + TESTCTRL_OPTIMIZATIONS = 15 - + TESTCTRL_ISKEYWORD = 16 - + TESTCTRL_PGHDRSZ = 17 - + TESTCTRL_SCRATCHMALLOC = 18 - + TESTCTRL_LOCALTIME_FAULT = 19 - + TESTCTRL_LAST = 19 - + STATUS_MEMORY_USED = 0 - + STATUS_PAGECACHE_USED = 1 - + STATUS_PAGECACHE_OVERFLOW = 2 - + STATUS_SCRATCH_USED = 3 - + STATUS_SCRATCH_OVERFLOW = 4 - + STATUS_MALLOC_SIZE = 5 - + STATUS_PARSER_STACK = 6 - + STATUS_PAGECACHE_SIZE = 7 - + STATUS_SCRATCH_SIZE = 8 - + STATUS_MALLOC_COUNT = 9 - + DBSTATUS_LOOKASIDE_USED = 0 - + DBSTATUS_CACHE_USED = 1 - + DBSTATUS_SCHEMA_USED = 2 - + DBSTATUS_STMT_USED = 3 - + DBSTATUS_LOOKASIDE_HIT = 4 - + DBSTATUS_LOOKASIDE_MISS_SIZE = 5 - + DBSTATUS_LOOKASIDE_MISS_FULL = 6 - + DBSTATUS_CACHE_HIT = 7 - + DBSTATUS_CACHE_MISS = 8 - + DBSTATUS_MAX = 8 - + STMTSTATUS_FULLSCAN_STEP = 1 - + STMTSTATUS_SORT = 2 - + STMTSTATUS_AUTOINDEX = 3 - + CHECKPOINT_PASSIVE = 0 - + CHECKPOINT_FULL = 1 - + CHECKPOINT_RESTART = 2 - + VTAB_CONSTRAINT_SUPPORT = 1 - + ROLLBACK = 1 - + FAIL = 3 - + REPLACE = 5 - + # CAPI3REF: Run-Time Library Version Numbers # KEYWORDS: sqlite3_version, sqlite3_sourceid - # + # These interfaces provide the same information as the (SQLITE_VERSION), # (SQLITE_VERSION_NUMBER), and (SQLITE_SOURCE_ID) C preprocessor macros # but are associated with the library instead of the header file. ^(Cautious @@ -482,13 +484,13 @@ def self.attach_function(name, *_) # verify that values returned by these interfaces match the macros in # the header, and thus insure that the application is # compiled with matching library and header files. - # + #
   # assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
   # assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );
   # assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );
   # 
)^ - # + # ^The sqlite3_version() string constant contains the text of (SQLITE_VERSION) # macro. ^The sqlite3_libversion() function returns a pointer to the # to the sqlite3_version() string constant. The sqlite3_libversion() @@ -498,85 +500,80 @@ def self.attach_function(name, *_) # (SQLITE_VERSION_NUMBER). ^The sqlite3_sourceid() function returns # a pointer to a string constant whose value is the same as the # (SQLITE_SOURCE_ID) C preprocessor macro. - # + # See also: (sqlite_version()) and (sqlite_source_id()). - # + # @method libversion() - # @return [String] + # @return [String] # @scope class attach_function :libversion, :sqlite3_libversion, [], :string - # (Not documented) - # + # @method sourceid() - # @return [String] + # @return [String] # @scope class attach_function :sourceid, :sqlite3_sourceid, [], :string - # (Not documented) - # + # @method libversion_number() - # @return [Integer] + # @return [Integer] # @scope class attach_function :libversion_number, :sqlite3_libversion_number, [], :int - # CAPI3REF: Run-Time Library Compilation Options Diagnostics - # + # ^The sqlite3_compileoption_used() function returns 0 or 1 # indicating whether the specified option was defined at # compile time. ^The SQLITE_ prefix may be omitted from the # option name passed to sqlite3_compileoption_used(). - # + # ^The sqlite3_compileoption_get() function allows iterating # over the list of options that were defined at compile time by # returning the N-th compile time option string. ^If N is out of range, # sqlite3_compileoption_get() returns a NULL pointer. ^The SQLITE_ # prefix is omitted from any strings returned by # sqlite3_compileoption_get(). - # + # ^Support for the diagnostic functions sqlite3_compileoption_used() # and sqlite3_compileoption_get() may be omitted by specifying the # (SQLITE_OMIT_COMPILEOPTION_DIAGS) option at compile time. - # + # See also: SQL functions (sqlite_compileoption_used()) and # (sqlite_compileoption_get()) and the (compile_options pragma). - # + # @method compileoption_used(z_opt_name) - # @param [String] z_opt_name - # @return [Integer] + # @param [String] z_opt_name + # @return [Integer] # @scope class attach_function :compileoption_used, :sqlite3_compileoption_used, [:string], :int - # (Not documented) - # + # @method compileoption_get(n) - # @param [Integer] n - # @return [String] + # @param [Integer] n + # @return [String] # @scope class attach_function :compileoption_get, :sqlite3_compileoption_get, [:int], :string - # CAPI3REF: Test To See If The Library Is Threadsafe - # + # ^The sqlite3_threadsafe() function returns zero if and only if # SQLite was compiled mutexing code omitted due to the # (SQLITE_THREADSAFE) compile-time option being set to 0. - # + # SQLite can be compiled with or without mutexes. When # the (SQLITE_THREADSAFE) C preprocessor macro is 1 or 2, mutexes # are enabled and SQLite is threadsafe. When the # (SQLITE_THREADSAFE) macro is 0, # the mutexes are omitted. Without the mutexes, it is not safe # to use SQLite concurrently from more than one thread. - # + # Enabling mutexes incurs a measurable performance penalty. # So if speed is of utmost importance, it makes sense to disable # the mutexes. But for maximum safety, mutexes should be enabled. # ^The default behavior is for mutexes to be enabled. - # + # This interface can be used by an application to make sure that the # version of SQLite that it is linking against was compiled with # the desired setting of the (SQLITE_THREADSAFE) macro. - # + # This interface only reports on the compile-time mutex setting # of the (SQLITE_THREADSAFE) flag. If SQLite is compiled with # SQLITE_THREADSAFE=1 or =2 then mutexes are enabled by default but @@ -587,17 +584,16 @@ def self.attach_function(name, *_) # thread safety, not any run-time changes to that setting made by # sqlite3_config(). In other words, the return value from sqlite3_threadsafe() # is unchanged by calls to sqlite3_config().)^ - # + # See the (threading mode) documentation for additional information. - # + # @method threadsafe() - # @return [Integer] + # @return [Integer] # @scope class attach_function :threadsafe, :sqlite3_threadsafe, [], :int - # CAPI3REF: Database Connection Handle # KEYWORDS: {database connection} {database connections} - # + # Each open SQLite database is represented by a pointer to an instance of # the opaque structure named "sqlite3". It is useful to think of an sqlite3 # pointer as an object. The (sqlite3_open()), (sqlite3_open16()), and @@ -609,57 +605,57 @@ def self.attach_function(name, *_) class Sqlite3 < FFI::Struct layout :dummy, :char end - + # CAPI3REF: Closing A Database Connection - # + # ^The sqlite3_close() routine is the destructor for the (sqlite3) object. # ^Calls to sqlite3_close() return SQLITE_OK if the (sqlite3) object is # successfully destroyed and all associated resources are deallocated. - # + # Applications must (sqlite3_finalize | finalize) all (prepared statements) # and (sqlite3_blob_close | close) all (BLOB handles) associated with # the (sqlite3) object prior to attempting to close the object. ^If # sqlite3_close() is called on a (database connection) that still has # outstanding (prepared statements) or (BLOB handles), then it returns # SQLITE_BUSY. - # + # ^If (sqlite3_close()) is invoked while a transaction is open, # the transaction is automatically rolled back. - # + # The C parameter to (sqlite3_close(C)) must be either a NULL # pointer or an (sqlite3) object pointer obtained # from (sqlite3_open()), (sqlite3_open16()), or # (sqlite3_open_v2()), and not previously closed. # ^Calling sqlite3_close() with a NULL pointer argument is a # harmless no-op. - # + # @method close(sqlite3) - # @param [Sqlite3] sqlite3 - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @return [Integer] # @scope class attach_function :close, :sqlite3_close, [Sqlite3], :int - # The type for a callback function. # This is legacy and deprecated. It is included for historical # compatibility and is not documented. - # + # This entry is only for documentation and no real method. - # - # @method _callback_callback_(int, char_s, char_s) - # @param [Integer] int - # @param [FFI::Pointer(**CharS)] char_s - # @param [FFI::Pointer(**CharS)] char_s - # @return [FFI::Pointer(*Void)] - # @scope class - callback :callback, [:int, :pointer, :pointer], :pointer - + + # @method _callback_callback_(void, int, char_s, char_s) + # @param [FFI::Pointer(*Void)] void + # @param [Integer] int + # @param [FFI::Pointer(**CharS)] char_s + # @param [FFI::Pointer(**CharS)] char_s + # @return [FFI::Pointer(*Void)] + # @scope class + callback :callback, [:pointer, :int, :pointer, :pointer], :pointer + # CAPI3REF: One-Step Query Execution Interface - # + # The sqlite3_exec() interface is a convenience wrapper around # (sqlite3_prepare_v2()), (sqlite3_step()), and (sqlite3_finalize()), # that allows an application to run multiple statements of SQL # without having to use a lot of C code. - # + # ^The sqlite3_exec() interface runs zero or more UTF-8 encoded, # semicolon-separate SQL statements passed into its 2nd argument, # in the context of the (database connection) passed in as its 1st @@ -670,7 +666,7 @@ class Sqlite3 < FFI::Struct # callback invocation. ^If the callback pointer to sqlite3_exec() # is NULL, then no callback is ever invoked and result rows are # ignored. - # + # ^If an error occurs while evaluating the SQL statements passed into # sqlite3_exec(), then execution of the current statement stops and # subsequent statements are skipped. ^If the 5th parameter to sqlite3_exec() @@ -682,11 +678,11 @@ class Sqlite3 < FFI::Struct # ^If the 5th parameter to sqlite3_exec() is not NULL and no errors # occur, then sqlite3_exec() sets the pointer in its 5th parameter to # NULL before returning. - # + # ^If an sqlite3_exec() callback returns non-zero, the sqlite3_exec() # routine returns SQLITE_ABORT without invoking the callback again and # without running any subsequent SQL statements. - # + # ^The 2nd argument to the sqlite3_exec() callback function is the # number of columns in the result. ^The 3rd argument to the sqlite3_exec() # callback is an array of pointers to strings obtained as if from @@ -696,14 +692,14 @@ class Sqlite3 < FFI::Struct # sqlite3_exec() callback is an array of pointers to strings where each # entry represents the name of corresponding result column as obtained # from (sqlite3_column_name()). - # + # ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer # to an empty string, or a pointer that contains only whitespace and/or # SQL comments, then no SQL statements are evaluated and the database # is not changed. - # + # Restrictions: - # + #
    #
  • The application must insure that the 1st parameter to sqlite3_exec() # is a valid and open (database connection). @@ -712,19 +708,18 @@ class Sqlite3 < FFI::Struct #
  • The application must not modify the SQL statement text passed into # the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. #
- # + # @method exec(sqlite3, sql, callback, void, errmsg) - # @param [Sqlite3] sqlite3 - # @param [String] sql - # @param [FFI::Pointer(*)] callback - # @param [FFI::Pointer(*Void)] void - # @param [FFI::Pointer(**CharS)] errmsg - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @param [String] sql + # @param [FFI::Pointer(*FunctionProto)] callback + # @param [FFI::Pointer(*Void)] void + # @param [FFI::Pointer(**CharS)] errmsg + # @return [Integer] # @scope class attach_function :exec, :sqlite3_exec, [Sqlite3, :string, :pointer, :pointer, :pointer], :int - # CAPI3REF: OS Interface Open File Handle - # + # An (sqlite3_file) object represents an open file in the # (sqlite3_vfs | OS interface layer). Individual OS interface # implementations will @@ -732,51 +727,51 @@ class Sqlite3 < FFI::Struct # for their own use. The pMethods entry is a pointer to an # (sqlite3_io_methods) object that defines methods for performing # I/O operations on the open file. - # + # = Fields: # :p_methods :: # (FFI::Pointer(*IoMethods)) Methods for an open file class File < FFI::Struct layout :p_methods, :pointer end - + # (Not documented) - # + # = Fields: # :i_version :: - # (Integer) + # (Integer) # :x_close :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_read :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_write :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_truncate :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_sync :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_file_size :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_lock :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_unlock :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_check_reserved_lock :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_file_control :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_sector_size :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_device_characteristics :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_shm_map :: - # (FFI::Pointer(*)) Methods above are valid for version 1 + # (FFI::Pointer(*FunctionProto)) Methods above are valid for version 1 # :x_shm_lock :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_shm_barrier :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_shm_unmap :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) class IoMethods < FFI::Struct layout :i_version, :int, :x_close, :pointer, @@ -796,86 +791,86 @@ class IoMethods < FFI::Struct :x_shm_barrier, :pointer, :x_shm_unmap, :pointer end - + # CAPI3REF: Mutex Handle - # + # The mutex module within SQLite defines (sqlite3_mutex) to be an # abstract type for a mutex object. The SQLite core never looks # at the internal representation of an (sqlite3_mutex). It only # deals with pointers to the (sqlite3_mutex) object. - # + # Mutexes are created using (sqlite3_mutex_alloc()). module MutexWrappers - # @return [nil] + # @return [nil] def free() SQLite3.mutex_free(self) end - - # @return [nil] + + # @return [nil] def enter() SQLite3.mutex_enter(self) end - - # @return [Integer] + + # @return [Integer] def try() SQLite3.mutex_try(self) end - - # @return [nil] + + # @return [nil] def leave() SQLite3.mutex_leave(self) end - - # @return [Integer] + + # @return [Integer] def held() SQLite3.mutex_held(self) end - - # @return [Integer] + + # @return [Integer] def notheld() SQLite3.mutex_notheld(self) end end - + class Mutex < FFI::Struct include MutexWrappers layout :dummy, :char end - + # CAPI3REF: OS Interface Object - # + # An instance of the sqlite3_vfs object defines the interface between # the SQLite core and the underlying operating system. The "vfs" # in the name of the object stands for "virtual file system". See # the (VFS | VFS documentation) for further information. - # + # The value of the iVersion field is initially 1 but may be larger in # future versions of SQLite. Additional fields may be appended to this # object when the iVersion value is increased. Note that the structure # of the sqlite3_vfs object changes in the transaction between # SQLite version 3.5.9 and 3.6.0 and yet the iVersion field was not # modified. - # + # The szOsFile field is the size of the subclassed (sqlite3_file) # structure used by this VFS. mxPathname is the maximum length of # a pathname in this VFS. - # + # Registered sqlite3_vfs objects are kept on a linked list formed by # the pNext pointer. The (sqlite3_vfs_register()) # and (sqlite3_vfs_unregister()) interfaces manage this list # in a thread-safe way. The (sqlite3_vfs_find()) interface # searches the list. Neither the application code nor the VFS # implementation should use the pNext pointer. - # + # The pNext field is the only field in the sqlite3_vfs # structure that SQLite will ever modify. SQLite will only access # or modify this field while holding a particular static mutex. # The application should never modify anything within the sqlite3_vfs # object once the object has been registered. - # + # The zName field holds the name of the VFS module. The name must # be unique across all VFS modules. - # + # ((sqlite3_vfs.xOpen)) # ^SQLite guarantees that the zFilename parameter to xOpen # is either a NULL pointer or string obtained @@ -892,17 +887,17 @@ class Mutex < FFI::Struct # must invent its own temporary name for the file. ^Whenever the # xFilename parameter is NULL it will also be the case that the # flags parameter will include (SQLITE_OPEN_DELETEONCLOSE). - # + # The flags argument to xOpen() includes all bits set in # the flags argument to (sqlite3_open_v2()). Or if (sqlite3_open()) # or (sqlite3_open16()) is used, then flags includes at least # (SQLITE_OPEN_READWRITE) | (SQLITE_OPEN_CREATE). # If xOpen() opens a file read-only then it sets *pOutFlags to # include (SQLITE_OPEN_READONLY). Other bits in *pOutFlags may be set. - # + # ^(SQLite will also add one of the following flags to the xOpen() # call, depending on the object being opened: - # + #
    #
  • (SQLITE_OPEN_MAIN_DB) #
  • (SQLITE_OPEN_MAIN_JOURNAL) @@ -913,7 +908,7 @@ class Mutex < FFI::Struct #
  • (SQLITE_OPEN_MASTER_JOURNAL) #
  • (SQLITE_OPEN_WAL) #
)^ - # + # The file I/O implementation can use the object type flags to # change the way it deals with files. For example, an application # that does not care about crash recovery or rollback might make @@ -922,19 +917,19 @@ class Mutex < FFI::Struct # SQLITE_IOERR. Or the implementation might recognize that a database # file will be doing page-aligned sector reads and writes in a random # order and set up its I/O subsystem accordingly. - # + # SQLite might also add one of the following flags to the xOpen method: - # + #
    #
  • (SQLITE_OPEN_DELETEONCLOSE) #
  • (SQLITE_OPEN_EXCLUSIVE) #
- # + # The (SQLITE_OPEN_DELETEONCLOSE) flag means the file should be # deleted when it is closed. ^The (SQLITE_OPEN_DELETEONCLOSE) # will be set for TEMP databases and their journals, transient # databases, and subjournals. - # + # ^The (SQLITE_OPEN_EXCLUSIVE) flag is always used in conjunction # with the (SQLITE_OPEN_CREATE) flag, which are both directly # analogous to the O_EXCL and O_CREAT flags of the POSIX open() @@ -943,7 +938,7 @@ class Mutex < FFI::Struct # be created, and that it is an error if it already exists. # It is not used to indicate the file should be opened # for exclusive access. - # + # ^At least szOsFile bytes of memory are allocated by SQLite # to hold the (sqlite3_file) structure passed as the third # argument to xOpen. The xOpen method does not have to @@ -953,21 +948,21 @@ class Mutex < FFI::Struct # this even if the open fails. SQLite expects that the sqlite3_file.pMethods # element will be valid after xOpen returns regardless of the success # or failure of the xOpen call. - # + # ((sqlite3_vfs.xAccess)) # ^The flags argument to xAccess() may be (SQLITE_ACCESS_EXISTS) # to test for the existence of a file, or (SQLITE_ACCESS_READWRITE) to # test whether a file is readable and writable, or (SQLITE_ACCESS_READ) # to test whether a file is at least readable. The file can be a # directory. - # + # ^SQLite will always allocate at least mxPathname+1 bytes for the # output buffer xFullPathname. The exact size of the output buffer # is also passed as a parameter to both methods. If the output buffer # is not large enough, (SQLITE_CANTOPEN) should be returned. Since this is # handled as a fatal error by SQLite, vfs implementations should endeavor # to prevent this by setting mxPathname to a sufficiently large value. - # + # The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64() # interfaces are not strictly a part of the filesystem, but they are # included in the VFS structure for completeness. @@ -985,7 +980,7 @@ class Mutex < FFI::Struct # date and time if that method is available (if iVersion is 2 or # greater and the function pointer is not NULL) and will fall back # to xCurrentTime() if xCurrentTimeInt64() is unavailable. - # + # ^The xSetSystemCall(), xGetSystemCall(), and xNestSystemCall() interfaces # are not used by the SQLite core. These optional interfaces are provided # by some VFSes to facilitate testing of the VFS code. By overriding @@ -997,7 +992,7 @@ class Mutex < FFI::Struct # or all of these interfaces to be NULL or for their behavior to change # from one release to the next. Applications must not attempt to access # any of these methods if the iVersion of the VFS is less than 3. - # + # = Fields: # :i_version :: # (Integer) Structure version number (currently 3) @@ -1012,52 +1007,52 @@ class Mutex < FFI::Struct # :p_app_data :: # (FFI::Pointer(*Void)) Pointer to application-specific data # :x_open :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_delete :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_access :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_full_pathname :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_dl_open :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_dl_error :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_dl_sym :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_dl_close :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_randomness :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_sleep :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_current_time :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_get_last_error :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_current_time_int64 :: - # (FFI::Pointer(*)) The methods above are in version 1 of the sqlite_vfs object + # (FFI::Pointer(*FunctionProto)) The methods above are in version 1 of the sqlite_vfs object # definition. Those that follow are added in version 2 or later # :x_set_system_call :: - # (FFI::Pointer(*)) The methods above are in versions 1 and 2 of the sqlite_vfs object. + # (FFI::Pointer(*FunctionProto)) The methods above are in versions 1 and 2 of the sqlite_vfs object. # Those below are for version 3 and greater. # :x_get_system_call :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_next_system_call :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) module VfsWrappers - # @param [Integer] make_dflt - # @return [Integer] + # @param [Integer] make_dflt + # @return [Integer] def register(make_dflt) SQLite3.vfs_register(self, make_dflt) end - - # @return [Integer] + + # @return [Integer] def unregister() SQLite3.vfs_unregister(self) end end - + class Vfs < FFI::Struct include VfsWrappers layout :i_version, :int, @@ -1083,43 +1078,43 @@ class Vfs < FFI::Struct :x_get_system_call, :pointer, :x_next_system_call, :pointer end - + # CAPI3REF: Initialize The SQLite Library - # + # ^The sqlite3_initialize() routine initializes the # SQLite library. ^The sqlite3_shutdown() routine # deallocates any resources that were allocated by sqlite3_initialize(). # These routines are designed to aid in process initialization and # shutdown on embedded systems. Workstation applications using # SQLite normally do not need to invoke either of these routines. - # + # A call to sqlite3_initialize() is an "effective" call if it is # the first time sqlite3_initialize() is invoked during the lifetime of # the process, or if it is the first time sqlite3_initialize() is invoked # following a call to sqlite3_shutdown(). ^(Only an effective call # of sqlite3_initialize() does any initialization. All other calls # are harmless no-ops.)^ - # + # A call to sqlite3_shutdown() is an "effective" call if it is the first # call to sqlite3_shutdown() since the last sqlite3_initialize(). ^(Only # an effective call to sqlite3_shutdown() does any deinitialization. # All other valid calls to sqlite3_shutdown() are harmless no-ops.)^ - # + # The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown() # is not. The sqlite3_shutdown() interface must only be called from a # single thread. All open (database connections) must be closed and all # other SQLite resources must be deallocated prior to invoking # sqlite3_shutdown(). - # + # Among other things, ^sqlite3_initialize() will invoke # sqlite3_os_init(). Similarly, ^sqlite3_shutdown() # will invoke sqlite3_os_end(). - # + # ^The sqlite3_initialize() routine returns (SQLITE_OK) on success. # ^If for some reason, sqlite3_initialize() is unable to initialize # the library (perhaps it is unable to allocate a needed resource such # as a mutex) it returns an (error code) other than (SQLITE_OK). - # + # ^The sqlite3_initialize() routine is called internally by many other # SQLite interfaces so that an application usually does not need to # invoke sqlite3_initialize() directly. For example, (sqlite3_open()) @@ -1134,7 +1129,7 @@ class Vfs < FFI::Struct # of SQLite may require this. In other words, the behavior exhibited # when SQLite is compiled with (SQLITE_OMIT_AUTOINIT) might become the # default behavior in some future release of SQLite. - # + # The sqlite3_os_init() routine does operating-system specific # initialization of the SQLite library. The sqlite3_os_end() # routine undoes the effect of sqlite3_os_init(). Typical tasks @@ -1142,7 +1137,7 @@ class Vfs < FFI::Struct # of static resources, initialization of global variables, # setting up a default (sqlite3_vfs) module, or setting up # a default configuration using (sqlite3_config()). - # + # The application should never invoke either sqlite3_os_init() # or sqlite3_os_end() directly. The application should only invoke # sqlite3_initialize() and sqlite3_shutdown(). The sqlite3_os_init() @@ -1157,41 +1152,37 @@ class Vfs < FFI::Struct # implementation of sqlite3_os_init() or sqlite3_os_end() # must return (SQLITE_OK) on success and some other (error code) upon # failure. - # + # @method initialize() - # @return [Integer] + # @return [Integer] # @scope class attach_function :initialize, :sqlite3_initialize, [], :int - # (Not documented) - # + # @method shutdown() - # @return [Integer] + # @return [Integer] # @scope class attach_function :shutdown, :sqlite3_shutdown, [], :int - # (Not documented) - # + # @method os_init() - # @return [Integer] + # @return [Integer] # @scope class attach_function :os_init, :sqlite3_os_init, [], :int - # (Not documented) - # + # @method os_end() - # @return [Integer] + # @return [Integer] # @scope class attach_function :os_end, :sqlite3_os_end, [], :int - # CAPI3REF: Configuring The SQLite Library - # + # The sqlite3_config() interface is used to make global configuration # changes to SQLite in order to tune SQLite to the specific needs of # the application. The default configuration is recommended for most # applications and so this routine is usually not necessary. It is # provided to support rare applications with unusual needs. - # + # The sqlite3_config() interface is not threadsafe. The application # must insure that no other SQLite interfaces are invoked by other # threads while sqlite3_config() is running. Furthermore, sqlite3_config() @@ -1201,50 +1192,48 @@ class Vfs < FFI::Struct # (sqlite3_shutdown()) then it will return SQLITE_MISUSE. # Note, however, that ^sqlite3_config() can be called as part of the # implementation of an application-defined (sqlite3_os_init()). - # + # The first argument to sqlite3_config() is an integer # (configuration option) that determines # what property of SQLite is to be configured. Subsequent arguments # vary depending on the (configuration option) # in the first argument. - # + # ^When a configuration option is set, sqlite3_config() returns (SQLITE_OK). # ^If the option is unknown or SQLite is unable to set the option # then this routine returns a non-zero (error code). - # + # @method config(int) - # @param [Integer] int - # @return [Integer] + # @param [Integer] int + # @return [Integer] # @scope class attach_function :config, :sqlite3_config, [:int], :int - # CAPI3REF: Configure database connections - # + # The sqlite3_db_config() interface is used to make configuration # changes to a (database connection). The interface is similar to # (sqlite3_config()) except that the changes apply to a single # (database connection) (specified in the first argument). - # + # The second argument to sqlite3_db_config(D,V,...) is the # (SQLITE_DBCONFIG_LOOKASIDE | configuration verb) - an integer code # that indicates what aspect of the (database connection) is being configured. # Subsequent arguments vary depending on the configuration verb. - # + # ^Calls to sqlite3_db_config() return SQLITE_OK if and only if # the call is considered successful. - # + # @method db_config(sqlite3, op) - # @param [Sqlite3] sqlite3 - # @param [Integer] op - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @param [Integer] op + # @return [Integer] # @scope class attach_function :db_config, :sqlite3_db_config, [Sqlite3, :int], :int - # CAPI3REF: Memory Allocation Routines - # + # An instance of this object defines the interface between SQLite # and low-level memory allocation routines. - # + # This object is used in only one place in the SQLite interface. # A pointer to an instance of this object is the argument to # (sqlite3_config()) when the configuration option is @@ -1254,7 +1243,7 @@ class Vfs < FFI::Struct # during configuration, an application can specify an alternative # memory allocation subsystem for SQLite to use for all of its # dynamic memory needs. - # + # Note that SQLite comes with several (built-in memory allocators) # that are perfectly adequate for the overwhelming majority of applications # and that this object is only useful to a tiny minority of applications @@ -1263,16 +1252,16 @@ class Vfs < FFI::Struct # memory allocator that simulates memory out-of-memory conditions in # order to verify that SQLite recovers gracefully from such # conditions. - # + # The xMalloc, xRealloc, and xFree methods must work like the # malloc(), realloc() and free() functions from the standard C library. # ^SQLite guarantees that the second argument to # xRealloc is always a value returned by a prior call to xRoundup. - # + # xSize should return the allocated size of a memory allocation # previously obtained from xMalloc or xRealloc. The allocated size # is always at least as big as the requested size but may be larger. - # + # The xRoundup method returns what would be the allocated size of # a memory allocation given a particular requested size. Most memory # allocators round up memory allocations at least to the next multiple @@ -1280,14 +1269,14 @@ class Vfs < FFI::Struct # Every memory allocation request coming in through (sqlite3_malloc()) # or (sqlite3_realloc()) first calls xRoundup. If xRoundup returns 0, # that causes the corresponding memory allocation to fail. - # + # The xInit method initializes the memory allocator. (For example, # it might allocate any require mutexes or initialize internal data # structures. The xShutdown method is invoked (indirectly) by # (sqlite3_shutdown()) and should deallocate any resources acquired # by xInit. The pAppData pointer is used as the only parameter to # xInit and xShutdown. - # + # SQLite holds the (SQLITE_MUTEX_STATIC_MASTER) mutex when it invokes # the xInit method, so the xInit method need not be threadsafe. The # xShutdown method is only called from (sqlite3_shutdown()) so it does @@ -1298,25 +1287,25 @@ class Vfs < FFI::Struct # However, if (SQLITE_CONFIG_MEMSTATUS) is disabled, then the other # methods must be threadsafe or else make their own arrangements for # serialization. - # + # SQLite will never invoke xInit() more than once without an intervening # call to xShutdown(). - # + # = Fields: # :x_malloc :: - # (FFI::Pointer(*)) Memory allocation function + # (FFI::Pointer(*FunctionProto)) Memory allocation function # :x_free :: - # (FFI::Pointer(*)) Free a prior allocation + # (FFI::Pointer(*FunctionProto)) Free a prior allocation # :x_realloc :: - # (FFI::Pointer(*)) Resize an allocation + # (FFI::Pointer(*FunctionProto)) Resize an allocation # :x_size :: - # (FFI::Pointer(*)) Return the size of an allocation + # (FFI::Pointer(*FunctionProto)) Return the size of an allocation # :x_roundup :: - # (FFI::Pointer(*)) Round up request size to allocation size + # (FFI::Pointer(*FunctionProto)) Round up request size to allocation size # :x_init :: - # (FFI::Pointer(*)) Initialize the memory allocator + # (FFI::Pointer(*FunctionProto)) Initialize the memory allocator # :x_shutdown :: - # (FFI::Pointer(*)) Deinitialize the memory allocator + # (FFI::Pointer(*FunctionProto)) Deinitialize the memory allocator # :p_app_data :: # (FFI::Pointer(*Void)) Argument to xInit() and xShutdown() class MemMethods < FFI::Struct @@ -1329,43 +1318,42 @@ class MemMethods < FFI::Struct :x_shutdown, :pointer, :p_app_data, :pointer end - + # CAPI3REF: Enable Or Disable Extended Result Codes - # + # ^The sqlite3_extended_result_codes() routine enables or disables the # (extended result codes) feature of SQLite. ^The extended result # codes are disabled by default for historical compatibility. - # + # @method extended_result_codes(sqlite3, onoff) - # @param [Sqlite3] sqlite3 - # @param [Integer] onoff - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @param [Integer] onoff + # @return [Integer] # @scope class attach_function :extended_result_codes, :sqlite3_extended_result_codes, [Sqlite3, :int], :int - # CAPI3REF: Last Insert Rowid - # + # ^Each entry in an SQLite table has a unique 64-bit signed # integer key called the (ROWID | "rowid"). ^The rowid is always available # as an undeclared column named ROWID, OID, or _ROWID_ as long as those # names are not also used by explicitly declared columns. ^If # the table has a column of type (INTEGER PRIMARY KEY) then that column # is another alias for the rowid. - # + # ^This routine returns the (rowid) of the most recent # successful (INSERT) into the database from the (database connection) # in the first argument. ^As of SQLite version 3.7.7, this routines # records the last insert rowid of both ordinary tables and (virtual tables). # ^If no successful (INSERT)s # have ever occurred on that database connection, zero is returned. - # + # ^(If an (INSERT) occurs within a trigger or within a (virtual table) # method, then this routine will return the (rowid) of the inserted # row as long as the trigger or virtual table method is running. # But once the trigger or virtual table method ends, the value returned # by this routine reverts to what it was before the trigger or virtual # table method began.)^ - # + # ^An (INSERT) that fails due to a constraint violation is not a # successful (INSERT) and does not change the value returned by this # routine. ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK, @@ -1375,28 +1363,27 @@ class MemMethods < FFI::Struct # INSERT continues to completion after deleting rows that caused # the constraint problem so INSERT OR REPLACE will always change # the return value of this interface.)^ - # + # ^For the purposes of this routine, an (INSERT) is considered to # be successful even if it is subsequently rolled back. - # + # This function is accessible to SQL statements via the # (last_insert_rowid() SQL function). - # + # If a separate thread performs a new (INSERT) on the same # database connection while the (sqlite3_last_insert_rowid()) # function is running and thus changes the last insert (rowid), # then the value returned by (sqlite3_last_insert_rowid()) is # unpredictable and might not equal either the old or the new # last insert (rowid). - # + # @method last_insert_rowid(sqlite3) - # @param [Sqlite3] sqlite3 - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @return [Integer] # @scope class attach_function :last_insert_rowid, :sqlite3_last_insert_rowid, [Sqlite3], :long_long - # CAPI3REF: Count The Number Of Rows Modified - # + # ^This function returns the number of database rows that were changed # or inserted or deleted by the most recently completed SQL statement # on the (database connection) specified by the first parameter. @@ -1405,16 +1392,16 @@ class MemMethods < FFI::Struct # triggers or (foreign key actions) are not counted.)^ Use the # (sqlite3_total_changes()) function to find the total number of changes # including changes caused by triggers and foreign key actions. - # + # ^Changes to a view that are simulated by an (INSTEAD OF trigger) # are not counted. Only real table changes are counted. - # + # ^(A "row change" is a change to a single row of a single table # caused by an INSERT, DELETE, or UPDATE statement. Rows that # are changed as side effects of (REPLACE) constraint resolution, # rollback, ABORT processing, (DROP TABLE), or by any other # mechanisms do not count as direct row changes.)^ - # + # A "trigger context" is a scope of execution that begins and # ends with the script of a (CREATE TRIGGER | trigger). # Most SQL statements are @@ -1422,14 +1409,14 @@ class MemMethods < FFI::Struct # trigger context. If a trigger fires from the top level, a # new trigger context is entered for the duration of that one # trigger. Subtriggers create subcontexts for their duration. - # + # ^Calling (sqlite3_exec()) or (sqlite3_step()) recursively does # not create a new trigger context. - # + # ^This function returns the number of direct row changes in the # most recent INSERT, UPDATE, or DELETE statement within the same # trigger context. - # + # ^Thus, when called from the top level, this function returns the # number of changes in the most recent INSERT, UPDATE, or DELETE # that also occurred at the top level. ^(Within the body of a trigger, @@ -1438,22 +1425,21 @@ class MemMethods < FFI::Struct # statement within the body of the same trigger. # However, the number returned does not include changes # caused by subtriggers since those have their own context.)^ - # + # See also the (sqlite3_total_changes()) interface, the # (count_changes pragma), and the (changes() SQL function). - # + # If a separate thread makes changes on the same database connection # while (sqlite3_changes()) is running then the value returned # is unpredictable and not meaningful. - # + # @method changes(sqlite3) - # @param [Sqlite3] sqlite3 - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @return [Integer] # @scope class attach_function :changes, :sqlite3_changes, [Sqlite3], :int - # CAPI3REF: Total Number Of Rows Modified - # + # ^This function returns the number of row changes caused by (INSERT), # (UPDATE) or (DELETE) statements since the (database connection) was opened. # ^(The count returned by sqlite3_total_changes() includes all changes @@ -1467,42 +1453,41 @@ class MemMethods < FFI::Struct # ^The sqlite3_total_changes() function counts the changes as soon as # the statement that makes them is completed (when the statement handle # is passed to (sqlite3_reset()) or (sqlite3_finalize())). - # + # See also the (sqlite3_changes()) interface, the # (count_changes pragma), and the (total_changes() SQL function). - # + # If a separate thread makes changes on the same database connection # while (sqlite3_total_changes()) is running then the value # returned is unpredictable and not meaningful. - # + # @method total_changes(sqlite3) - # @param [Sqlite3] sqlite3 - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @return [Integer] # @scope class attach_function :total_changes, :sqlite3_total_changes, [Sqlite3], :int - # CAPI3REF: Interrupt A Long-Running Query - # + # ^This function causes any pending database operation to abort and # return at its earliest opportunity. This routine is typically # called in response to a user action such as pressing "Cancel" # or Ctrl-C where the user wants a long query operation to halt # immediately. - # + # ^It is safe to call this routine from a thread different from the # thread that is currently running the database operation. But it # is not safe to call this routine with a (database connection) that # is closed or might close before sqlite3_interrupt() returns. - # + # ^If an SQL operation is very nearly finished at the time when # sqlite3_interrupt() is called, then it might not have an opportunity # to be interrupted and might continue to completion. - # + # ^An SQL operation that is interrupted will return (SQLITE_INTERRUPT). # ^If the interrupted SQL operation is an INSERT, UPDATE, or DELETE # that is inside an explicit transaction, then the entire transaction # will be rolled back automatically. - # + # ^The sqlite3_interrupt(D) call is in effect until all currently running # SQL statements on (database connection) D complete. ^Any new SQL statements # that are started after the sqlite3_interrupt() call and before the @@ -1513,18 +1498,17 @@ class MemMethods < FFI::Struct # ^A call to sqlite3_interrupt(D) that occurs when there are no running # SQL statements is a no-op and has no effect on SQL statements # that are started after the sqlite3_interrupt() call returns. - # + # If the database connection closes while (sqlite3_interrupt()) # is running then bad things will likely happen. - # + # @method interrupt(sqlite3) - # @param [Sqlite3] sqlite3 - # @return [nil] + # @param [Sqlite3] sqlite3 + # @return [nil] # @scope class attach_function :interrupt, :sqlite3_interrupt, [Sqlite3], :void - # CAPI3REF: Determine If An SQL Statement Is Complete - # + # These routines are useful during command-line input to determine if the # currently entered text seems to form a complete SQL statement or # if additional input is needed before sending the text into @@ -1536,49 +1520,47 @@ class MemMethods < FFI::Struct # independent tokens (they are part of the token in which they are # embedded) and thus do not count as a statement terminator. ^Whitespace # and comments that follow the final semicolon are ignored. - # + # ^These routines return 0 if the statement is incomplete. ^If a # memory allocation fails, then SQLITE_NOMEM is returned. - # + # ^These routines do not parse the SQL statements thus # will not detect syntactically incorrect SQL. - # + # ^(If SQLite has not been initialized using (sqlite3_initialize()) prior # to invoking sqlite3_complete16() then sqlite3_initialize() is invoked # automatically by sqlite3_complete16(). If that initialization fails, # then the return value from sqlite3_complete16() will be non-zero # regardless of whether or not the input SQL is complete.)^ - # + # The input to (sqlite3_complete()) must be a zero-terminated # UTF-8 string. - # + # The input to (sqlite3_complete16()) must be a zero-terminated # UTF-16 string in native byte order. - # + # @method complete(sql) - # @param [String] sql - # @return [Integer] + # @param [String] sql + # @return [Integer] # @scope class attach_function :complete, :sqlite3_complete, [:string], :int - # (Not documented) - # + # @method complete16(sql) - # @param [FFI::Pointer(*Void)] sql - # @return [Integer] + # @param [FFI::Pointer(*Void)] sql + # @return [Integer] # @scope class attach_function :complete16, :sqlite3_complete16, [:pointer], :int - # CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors - # + # ^This routine sets a callback function that might be invoked whenever # an attempt is made to open a database table that another thread # or process has locked. - # + # ^If the busy callback is NULL, then (SQLITE_BUSY) or (SQLITE_IOERR_BLOCKED) # is returned immediately upon encountering the lock. ^If the busy callback # is not NULL, then the callback might be invoked with two arguments. - # + # ^The first argument to the busy handler is a copy of the void* pointer which # is the third argument to sqlite3_busy_handler(). ^The second argument to # the busy handler callback is the number of times that the busy handler has @@ -1587,7 +1569,7 @@ class MemMethods < FFI::Struct # access the database and (SQLITE_BUSY) or (SQLITE_IOERR_BLOCKED) is returned. # ^If the callback returns non-zero, then another attempt # is made to open the database for reading and the cycle repeats. - # + # The presence of a busy handler does not guarantee that it will be invoked # when there is lock contention. ^If SQLite determines that invoking the busy # handler could result in a deadlock, it will go ahead and return (SQLITE_BUSY) @@ -1602,9 +1584,9 @@ class MemMethods < FFI::Struct # SQLite returns (SQLITE_BUSY) for the first process, hoping that this # will induce the first process to release its read lock and allow # the second process to proceed. - # + # ^The default busy callback is NULL. - # + # ^The (SQLITE_BUSY) error is converted to (SQLITE_IOERR_BLOCKED) # when SQLite is in the middle of a large transaction where all the # changes will not fit into the in-memory cache. SQLite will @@ -1619,79 +1601,77 @@ class MemMethods < FFI::Struct # # CorruptionFollowingBusyError wiki page for a discussion of why # this is important. - # + # ^(There can only be a single busy handler defined for each # (database connection). Setting a new busy handler clears any # previously set handler.)^ ^Note that calling (sqlite3_busy_timeout()) # will also set or clear the busy handler. - # + # The busy callback should not take any actions which modify the # database connection that invoked the busy handler. Any such actions # result in undefined behavior. - # + # A busy handler must not close the database connection # or (prepared statement) that invoked the busy handler. - # - # @method busy_handler(sqlite3, , void) - # @param [Sqlite3] sqlite3 - # @param [FFI::Pointer(*)] - # @param [FFI::Pointer(*Void)] void - # @return [Integer] + + # @method busy_handler(sqlite3, functionproto, void) + # @param [Sqlite3] sqlite3 + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @param [FFI::Pointer(*Void)] void + # @return [Integer] # @scope class attach_function :busy_handler, :sqlite3_busy_handler, [Sqlite3, :pointer, :pointer], :int - # CAPI3REF: Set A Busy Timeout - # + # ^This routine sets a (sqlite3_busy_handler | busy handler) that sleeps # for a specified amount of time when a table is locked. ^The handler # will sleep multiple times until at least "ms" milliseconds of sleeping # have accumulated. ^After at least "ms" milliseconds of sleeping, # the handler returns 0 which causes (sqlite3_step()) to return # (SQLITE_BUSY) or (SQLITE_IOERR_BLOCKED). - # + # ^Calling this routine with an argument less than or equal to zero # turns off all busy handlers. - # + # ^(There can only be a single busy handler for a particular # (database connection) any any given moment. If another busy handler # was defined (using (sqlite3_busy_handler())) prior to calling # this routine, that other busy handler is cleared.)^ - # + # @method busy_timeout(sqlite3, ms) - # @param [Sqlite3] sqlite3 - # @param [Integer] ms - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @param [Integer] ms + # @return [Integer] # @scope class attach_function :busy_timeout, :sqlite3_busy_timeout, [Sqlite3, :int], :int - # CAPI3REF: Convenience Routines For Running Queries - # + # This is a legacy interface that is preserved for backwards compatibility. # Use of this interface is not recommended. - # + # Definition: A result table is memory data structure created by the # (sqlite3_get_table()) interface. A result table records the # complete query results from one or more queries. - # + # The table conceptually has a number of rows and columns. But # these numbers are not part of the result table itself. These # numbers are obtained separately. Let N be the number of rows # and M be the number of columns. - # + # A result table is an array of pointers to zero-terminated UTF-8 strings. # There are (N+1)*M elements in the array. The first M pointers point # to zero-terminated strings that contain the names of the columns. # The remaining entries all point to query results. NULL values result # in NULL pointers. All other values are in their UTF-8 zero-terminated # string representation as returned by (sqlite3_column_text()). - # + # A result table might consist of one or more memory allocations. # It is not safe to pass a result table directly to (sqlite3_free()). # A result table should be deallocated using (sqlite3_free_table()). - # + # ^(As an example of the result table format, suppose a query result # is as follows: - # + #
   #        Name        | Age
   #        -----------------------
@@ -1699,11 +1679,11 @@ class MemMethods < FFI::Struct
   #        Bob         | 28
   #        Cindy       | 21
   # 
- # + # There are two column (M==2) and three rows (N==3). Thus the # result table has 8 entries. Suppose the result table is stored # in an array names azResult. Then azResult holds this content: - # + #
   #        azResult[0) = "Name";
   #        azResult[1) = "Age";
@@ -1714,19 +1694,19 @@ class MemMethods < FFI::Struct
   #        azResult[6) = "Cindy";
   #        azResult[7) = "21";
   # 
)^ - # + # ^The sqlite3_get_table() function evaluates one or more # semicolon-separated SQL statements in the zero-terminated UTF-8 # string of its 2nd parameter and returns a result table to the # pointer given in its 3rd parameter. - # + # After the application has finished with the result from sqlite3_get_table(), # it must pass the result table pointer to sqlite3_free_table() in order to # release the memory that was malloced. Because of the way the # (sqlite3_malloc()) happens within sqlite3_get_table(), the calling # function must not try to call (sqlite3_free()) directly. Only # (sqlite3_free_table()) is able to release the memory properly and safely. - # + # The sqlite3_get_table() interface is implemented as a wrapper around # (sqlite3_exec()). The sqlite3_get_table() routine does not have access # to any internal data structures of SQLite. It uses only the public @@ -1734,38 +1714,36 @@ class MemMethods < FFI::Struct # wrapper layer outside of the internal (sqlite3_exec()) call are not # reflected in subsequent calls to (sqlite3_errcode()) or # (sqlite3_errmsg()). - # + # @method get_table(db, z_sql, paz_result, pn_row, pn_column, pz_errmsg) - # @param [Sqlite3] db - # @param [String] z_sql - # @param [FFI::Pointer(***CharS)] paz_result - # @param [FFI::Pointer(*Int)] pn_row - # @param [FFI::Pointer(*Int)] pn_column - # @param [FFI::Pointer(**CharS)] pz_errmsg - # @return [Integer] + # @param [Sqlite3] db + # @param [String] z_sql + # @param [FFI::Pointer(***CharS)] paz_result + # @param [FFI::Pointer(*Int)] pn_row + # @param [FFI::Pointer(*Int)] pn_column + # @param [FFI::Pointer(**CharS)] pz_errmsg + # @return [Integer] # @scope class attach_function :get_table, :sqlite3_get_table, [Sqlite3, :string, :pointer, :pointer, :pointer, :pointer], :int - # (Not documented) - # + # @method free_table(result) - # @param [FFI::Pointer(**CharS)] result - # @return [nil] + # @param [FFI::Pointer(**CharS)] result + # @return [nil] # @scope class attach_function :free_table, :sqlite3_free_table, [:pointer], :void - # CAPI3REF: Formatted String Printing Functions - # + # These routines are work-alikes of the "printf()" family of functions # from the standard C library. - # + # ^The sqlite3_mprintf() and sqlite3_vmprintf() routines write their # results into memory obtained from (sqlite3_malloc()). # The strings returned by these two routines should be # released by (sqlite3_free()). ^Both routines return a # NULL pointer if (sqlite3_malloc()) is unable to allocate enough # memory to hold the resulting string. - # + # ^(The sqlite3_snprintf() routine is similar to "snprintf()" from # the standard C library. The result is written into the # buffer supplied as the second parameter whose size is given by @@ -1778,125 +1756,123 @@ class MemMethods < FFI::Struct # the number of characters written would be a more useful return # value but we cannot change the implementation of sqlite3_snprintf() # now without breaking compatibility. - # + # ^As long as the buffer size is greater than zero, sqlite3_snprintf() # guarantees that the buffer is always zero-terminated. ^The first # parameter "n" is the total size of the buffer, including space for # the zero terminator. So the longest string that can be completely # written will be n-1 characters. - # + # ^The sqlite3_vsnprintf() routine is a varargs version of sqlite3_snprintf(). - # + # These routines all implement some additional formatting # options that are useful for constructing SQL statements. # All of the usual printf() formatting options apply. In addition, there # is are "%q", "%Q", and "%z" options. - # + # ^(The %q option works like %s in that it substitutes a null-terminated # string from the argument list. But %q also doubles every '\'' character. # %q is designed for use inside a string literal.)^ By doubling each '\'' # character it escapes that character and allows it to be inserted into # the string. - # + # For example, assume the string variable zText contains text as follows: - # + #
   #  char *zText = "It's a happy day!";
   # 
- # + # One can use this text in an SQL statement as follows: - # + #
   #  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES('%q')", zText);
   #  sqlite3_exec(db, zSQL, 0, 0, 0);
   #  sqlite3_free(zSQL);
   # 
- # + # Because the %q format string is used, the '\'' character in zText # is escaped and the SQL generated is as follows: - # + #
   #  INSERT INTO table1 VALUES('It''s a happy day!')
   # 
- # + # This is correct. Had we used %s instead of %q, the generated SQL # would have looked like this: - # + #
   #  INSERT INTO table1 VALUES('It's a happy day!');
   # 
- # + # This second example is an SQL syntax error. As a general rule you should # always use %q instead of %s when inserting text into a string literal. - # + # ^(The %Q option works like %q except it also adds single quotes around # the outside of the total string. Additionally, if the parameter in the # argument list is a NULL pointer, %Q substitutes the text "NULL" (without # single quotes).)^ So, for example, one could say: - # + #
   #  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES(%Q)", zText);
   #  sqlite3_exec(db, zSQL, 0, 0, 0);
   #  sqlite3_free(zSQL);
   # 
- # + # The code above will render a correct SQL statement in the zSQL # variable even if the zText variable is a NULL pointer. - # + # ^(The "%z" formatting option works like "%s" but with the # addition that after the string has been read and copied into # the result, (sqlite3_free()) is called on the input string.)^ - # + # @method mprintf(string) - # @param [String] string - # @return [String] + # @param [String] string + # @return [String] # @scope class attach_function :mprintf, :sqlite3_mprintf, [:string], :string - # (Not documented) - # - # @method vmprintf(string, va_list_tag) - # @param [String] string - # @param [FFI::Pointer(*VaListTag)] va_list_tag - # @return [String] - # @scope class - attach_function :vmprintf, :sqlite3_vmprintf, [:string, :pointer], :string - + + # @method vmprintf(string, va_list) + # @param [String] string + # @param [Integer] va_list + # @return [String] + # @scope class + # FAILED FFI WRAPPER GENERATION --| vmprintf - Error: Cannot attach_function for :sqlite3_vmprintf with signature [:string, :int], :string + # FAILED FFI WRAPPER GENERATION --| vmprintf - Error: Found macro 'va_list' which cannot be parsed easily. This 'va_list' macro would require compilation to determine full type information. # (Not documented) - # + # @method snprintf(int, string, string) - # @param [Integer] int - # @param [String] string - # @param [String] string - # @return [String] + # @param [Integer] int + # @param [String] string + # @param [String] string + # @return [String] # @scope class attach_function :snprintf, :sqlite3_snprintf, [:int, :string, :string], :string - # (Not documented) - # - # @method vsnprintf(int, string, string, va_list_tag) - # @param [Integer] int - # @param [String] string - # @param [String] string - # @param [FFI::Pointer(*VaListTag)] va_list_tag - # @return [String] - # @scope class - attach_function :vsnprintf, :sqlite3_vsnprintf, [:int, :string, :string, :pointer], :string - + + # @method vsnprintf(int, string, string, va_list) + # @param [Integer] int + # @param [String] string + # @param [String] string + # @param [Integer] va_list + # @return [String] + # @scope class + # FAILED FFI WRAPPER GENERATION --| vsnprintf - Error: Cannot attach_function for :sqlite3_vsnprintf with signature [:int, :string, :string, :int], :string + # FAILED FFI WRAPPER GENERATION --| vsnprintf - Error: Found macro 'va_list' which cannot be parsed easily. This 'va_list' macro would require compilation to determine full type information. # CAPI3REF: Memory Allocation Subsystem - # + # The SQLite core uses these three routines for all of its own # internal memory allocation needs. "Core" in the previous sentence # does not include operating-system specific VFS implementation. The # Windows VFS uses native malloc() and free() for some operations. - # + # ^The sqlite3_malloc() routine returns a pointer to a block # of memory at least N bytes in length, where N is the parameter. # ^If sqlite3_malloc() is unable to obtain sufficient free # memory, it returns a NULL pointer. ^If the parameter N to # sqlite3_malloc() is zero or negative then sqlite3_malloc() returns # a NULL pointer. - # + # ^Calling sqlite3_free() with a pointer previously returned # by sqlite3_malloc() or sqlite3_realloc() releases that memory so # that it might be reused. ^The sqlite3_free() routine is @@ -1907,7 +1883,7 @@ class MemMethods < FFI::Struct # Memory corruption, a segmentation fault, or other severe error # might result if sqlite3_free() is called with a non-NULL pointer that # was not obtained from sqlite3_malloc() or sqlite3_realloc(). - # + # ^(The sqlite3_realloc() interface attempts to resize a # prior memory allocation to be at least N bytes, where N is the # second parameter. The memory allocation to be resized is the first @@ -1924,17 +1900,17 @@ class MemMethods < FFI::Struct # by sqlite3_realloc() and the prior allocation is freed. # ^If sqlite3_realloc() returns NULL, then the prior allocation # is not freed. - # + # ^The memory returned by sqlite3_malloc() and sqlite3_realloc() # is always aligned to at least an 8 byte boundary, or to a # 4 byte boundary if the (SQLITE_4_BYTE_ALIGNED_MALLOC) compile-time # option is used. - # + # In SQLite version 3.5.0 and 3.5.1, it was possible to define # the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in # implementation of these routines to be omitted. That capability # is no longer provided. Only built-in memory allocators can be used. - # + # The Windows OS interface layer calls # the system malloc() and free() directly when converting # filenames between the UTF-8 encoding used by SQLite @@ -1942,45 +1918,42 @@ class MemMethods < FFI::Struct # installation. Memory allocation errors are detected, but # they are reported back as (SQLITE_CANTOPEN) or # (SQLITE_IOERR) rather than (SQLITE_NOMEM). - # + # The pointer arguments to (sqlite3_free()) and (sqlite3_realloc()) # must be either NULL or else pointers obtained from a prior # invocation of (sqlite3_malloc()) or (sqlite3_realloc()) that have # not yet been released. - # + # The application must not read or write any part of # a block of memory after it has been released using # (sqlite3_free()) or (sqlite3_realloc()). - # + # @method malloc(int) - # @param [Integer] int - # @return [FFI::Pointer(*Void)] + # @param [Integer] int + # @return [FFI::Pointer(*Void)] # @scope class attach_function :malloc, :sqlite3_malloc, [:int], :pointer - # (Not documented) - # + # @method realloc(void, int) - # @param [FFI::Pointer(*Void)] void - # @param [Integer] int - # @return [FFI::Pointer(*Void)] + # @param [FFI::Pointer(*Void)] void + # @param [Integer] int + # @return [FFI::Pointer(*Void)] # @scope class attach_function :realloc, :sqlite3_realloc, [:pointer, :int], :pointer - # (Not documented) - # + # @method free(void) - # @param [FFI::Pointer(*Void)] void - # @return [nil] + # @param [FFI::Pointer(*Void)] void + # @return [nil] # @scope class attach_function :free, :sqlite3_free, [:pointer], :void - # CAPI3REF: Memory Allocator Statistics - # + # SQLite provides these two interfaces for reporting on the status # of the (sqlite3_malloc()), (sqlite3_free()), and (sqlite3_realloc()) # routines, which form the built-in memory allocation subsystem. - # + # ^The (sqlite3_memory_used()) routine returns the number of bytes # of memory currently outstanding (malloced but not freed). # ^The (sqlite3_memory_highwater()) routine returns the maximum @@ -1990,52 +1963,49 @@ class MemMethods < FFI::Struct # added by SQLite in its implementation of (sqlite3_malloc()), # but not overhead added by the any underlying system library # routines that (sqlite3_malloc()) may call. - # + # ^The memory high-water mark is reset to the current value of # (sqlite3_memory_used()) if and only if the parameter to # (sqlite3_memory_highwater()) is true. ^The value returned # by (sqlite3_memory_highwater(1)) is the high-water mark # prior to the reset. - # + # @method memory_used() - # @return [Integer] + # @return [Integer] # @scope class attach_function :memory_used, :sqlite3_memory_used, [], :long_long - # (Not documented) - # + # @method memory_highwater(reset_flag) - # @param [Integer] reset_flag - # @return [Integer] + # @param [Integer] reset_flag + # @return [Integer] # @scope class attach_function :memory_highwater, :sqlite3_memory_highwater, [:int], :long_long - # CAPI3REF: Pseudo-Random Number Generator - # + # SQLite contains a high-quality pseudo-random number generator (PRNG) used to # select random (ROWID | ROWIDs) when inserting new records into a table that # already uses the largest possible (ROWID). The PRNG is also used for # the build-in random() and randomblob() SQL functions. This interface allows # applications to access the same PRNG for other purposes. - # + # ^A call to this routine stores N bytes of randomness into buffer P. - # + # ^The first time this routine is invoked (either internally or by # the application) the PRNG is seeded using randomness obtained # from the xRandomness method of the default (sqlite3_vfs) object. # ^On all subsequent invocations, the pseudo-randomness is generated # internally and without recourse to the (sqlite3_vfs) xRandomness # method. - # + # @method randomness(n, p) - # @param [Integer] n - # @param [FFI::Pointer(*Void)] p - # @return [nil] + # @param [Integer] n + # @param [FFI::Pointer(*Void)] p + # @return [nil] # @scope class attach_function :randomness, :sqlite3_randomness, [:int, :pointer], :void - # CAPI3REF: Compile-Time Authorization Callbacks - # + # ^This routine registers an authorizer callback with a particular # (database connection), supplied in the first argument. # ^The authorizer callback is invoked as SQL statements are being compiled @@ -2051,20 +2021,20 @@ class MemMethods < FFI::Struct # any value other than (SQLITE_IGNORE), (SQLITE_OK), or (SQLITE_DENY) # then the (sqlite3_prepare_v2()) or equivalent call that triggered # the authorizer will fail with an error message. - # + # When the callback returns (SQLITE_OK), that means the operation # requested is ok. ^When the callback returns (SQLITE_DENY), the # (sqlite3_prepare_v2()) or equivalent call that triggered the # authorizer will fail with an error message explaining that # access is denied. - # + # ^The first parameter to the authorizer callback is a copy of the third # parameter to the sqlite3_set_authorizer() interface. ^The second parameter # to the callback is an integer (SQLITE_COPY | action code) that specifies # the particular action to be authorized. ^The third through sixth parameters # to the callback are zero-terminated strings that contain additional # details about the action to be authorized. - # + # ^If the action code is (SQLITE_READ) # and the callback returns (SQLITE_IGNORE) then the # (prepared statement) statement is constructed to substitute @@ -2075,7 +2045,7 @@ class MemMethods < FFI::Struct # ^If the action code is (SQLITE_DELETE) and the callback returns # (SQLITE_IGNORE) then the (DELETE) operation proceeds but the # (truncate optimization) is disabled and all rows are deleted individually. - # + # An authorizer is used when (sqlite3_prepare | preparing) # SQL statements from an untrusted source, to ensure that the SQL statements # do not try to access data they are not allowed to see, or that they do not @@ -2086,46 +2056,45 @@ class MemMethods < FFI::Struct # database. An authorizer could then be put in place while the # user-entered SQL is being (sqlite3_prepare | prepared) that # disallows everything except (SELECT) statements. - # + # Applications that need to process SQL from untrusted sources # might also consider lowering resource limits using (sqlite3_limit()) # and limiting database size using the (max_page_count) (PRAGMA) # in addition to using an authorizer. - # + # ^(Only a single authorizer can be in place on a database connection # at a time. Each call to sqlite3_set_authorizer overrides the # previous call.)^ ^Disable the authorizer by installing a NULL callback. # The authorizer is disabled by default. - # + # The authorizer callback must not do anything that will modify # the database connection that invoked the authorizer callback. # Note that (sqlite3_prepare_v2()) and (sqlite3_step()) both modify their # database connections for the meaning of "modify" in this paragraph. - # + # ^When (sqlite3_prepare_v2()) is used to prepare a statement, the # statement might be re-prepared during (sqlite3_step()) due to a # schema change. Hence, the application should ensure that the # correct authorizer callback remains in place during the (sqlite3_step()). - # + # ^Note that the authorizer callback is invoked only during # (sqlite3_prepare()) or its variants. Authorization is not # performed during statement evaluation in (sqlite3_step()), unless # as stated in the previous paragraph, sqlite3_step() invokes # sqlite3_prepare_v2() to reprepare a statement after a schema change. - # + # @method set_authorizer(sqlite3, x_auth, p_user_data) - # @param [Sqlite3] sqlite3 - # @param [FFI::Pointer(*)] x_auth - # @param [FFI::Pointer(*Void)] p_user_data - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @param [FFI::Pointer(*FunctionProto)] x_auth + # @param [FFI::Pointer(*Void)] p_user_data + # @return [Integer] # @scope class attach_function :set_authorizer, :sqlite3_set_authorizer, [Sqlite3, :pointer, :pointer], :int - # CAPI3REF: Tracing And Profiling Functions - # + # These routines register callback functions that can be used for # tracing and profiling the execution of SQL statements. - # + # ^The callback function registered by sqlite3_trace() is invoked at # various times when an SQL statement is being run by (sqlite3_step()). # ^The sqlite3_trace() callback is invoked with a UTF-8 rendering of the @@ -2133,7 +2102,7 @@ class MemMethods < FFI::Struct # ^(Additional sqlite3_trace() callbacks might occur # as each triggered subprogram is entered. The callbacks for triggers # contain a UTF-8 SQL comment that identifies the trigger.)^ - # + # ^The callback function registered by sqlite3_profile() is invoked # as each SQL statement finishes. ^The profile callback contains # the original statement text and an estimate of wall-clock time @@ -2144,64 +2113,61 @@ class MemMethods < FFI::Struct # might provide greater resolution on the profiler callback. The # sqlite3_profile() function is considered experimental and is # subject to change in future versions of SQLite. - # + # @method trace(sqlite3, x_trace, void) - # @param [Sqlite3] sqlite3 - # @param [FFI::Pointer(*)] x_trace - # @param [FFI::Pointer(*Void)] void - # @return [FFI::Pointer(*Void)] + # @param [Sqlite3] sqlite3 + # @param [FFI::Pointer(*FunctionProto)] x_trace + # @param [FFI::Pointer(*Void)] void + # @return [FFI::Pointer(*Void)] # @scope class attach_function :trace, :sqlite3_trace, [Sqlite3, :pointer, :pointer], :pointer - # (Not documented) - # + # @method profile(sqlite3, x_profile, void) - # @param [Sqlite3] sqlite3 - # @param [FFI::Pointer(*)] x_profile - # @param [FFI::Pointer(*Void)] void - # @return [FFI::Pointer(*Void)] + # @param [Sqlite3] sqlite3 + # @param [FFI::Pointer(*FunctionProto)] x_profile + # @param [FFI::Pointer(*Void)] void + # @return [FFI::Pointer(*Void)] # @scope class attach_function :profile, :sqlite3_profile, [Sqlite3, :pointer, :pointer], :pointer - # CAPI3REF: Query Progress Callbacks - # + # ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback # function X to be invoked periodically during long running calls to # (sqlite3_exec()), (sqlite3_step()) and (sqlite3_get_table()) for # database connection D. An example use for this # interface is to keep a GUI updated during a large query. - # + # ^The parameter P is passed through as the only parameter to the # callback function X. ^The parameter N is the number of # (virtual machine instructions) that are evaluated between successive # invocations of the callback X. - # + # ^Only a single progress handler may be defined at one time per # (database connection); setting a new progress handler cancels the # old one. ^Setting parameter X to NULL disables the progress handler. # ^The progress handler is also disabled by setting N to a value less # than 1. - # + # ^If the progress callback returns non-zero, the operation is # interrupted. This feature can be used to implement a # "Cancel" button on a GUI progress dialog box. - # + # The progress handler callback must not do anything that will modify # the database connection that invoked the progress handler. # Note that (sqlite3_prepare_v2()) and (sqlite3_step()) both modify their # database connections for the meaning of "modify" in this paragraph. - # - # @method progress_handler(sqlite3, int, , void) - # @param [Sqlite3] sqlite3 - # @param [Integer] int - # @param [FFI::Pointer(*)] - # @param [FFI::Pointer(*Void)] void - # @return [nil] + + # @method progress_handler(sqlite3, int, functionproto, void) + # @param [Sqlite3] sqlite3 + # @param [Integer] int + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @param [FFI::Pointer(*Void)] void + # @return [nil] # @scope class attach_function :progress_handler, :sqlite3_progress_handler, [Sqlite3, :int, :pointer, :pointer], :void - # CAPI3REF: Opening A New Database Connection - # + # ^These routines open an SQLite database file as specified by the # filename argument. ^The filename argument is interpreted as UTF-8 for # sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte @@ -2214,15 +2180,15 @@ class MemMethods < FFI::Struct # (sqlite3_errmsg()) or (sqlite3_errmsg16()) routines can be used to obtain # an English language description of the error following a failure of any # of the sqlite3_open() routines. - # + # ^The default encoding for the database will be UTF-8 if # sqlite3_open() or sqlite3_open_v2() is called and # UTF-16 in the native byte order if sqlite3_open16() is used. - # + # Whether or not an error occurs when it is opened, resources # associated with the (database connection) handle should be released by # passing it to (sqlite3_close()) when it is no longer required. - # + # The sqlite3_open_v2() interface works like sqlite3_open() # except that it accepts two additional parameters for additional control # over the new database connection. ^(The flags parameter to @@ -2230,28 +2196,28 @@ class MemMethods < FFI::Struct # the following three values, optionally combined with the # (SQLITE_OPEN_NOMUTEX), (SQLITE_OPEN_FULLMUTEX), (SQLITE_OPEN_SHAREDCACHE), # (SQLITE_OPEN_PRIVATECACHE), and/or (SQLITE_OPEN_URI) flags:)^ - # + #
# ^(
(SQLITE_OPEN_READONLY)
#
The database is opened in read-only mode. If the database does not # already exist, an error is returned.
)^ - # + # ^(
(SQLITE_OPEN_READWRITE)
#
The database is opened for reading and writing if possible, or reading # only if the file is write protected by the operating system. In either # case the database must already exist, otherwise an error is returned.
)^ - # + # ^(
(SQLITE_OPEN_READWRITE) | (SQLITE_OPEN_CREATE)
#
The database is opened for reading and writing, and is created if # it does not already exist. This is the behavior that is always used for # sqlite3_open() and sqlite3_open16().
)^ #
- # + # If the 3rd parameter to sqlite3_open_v2() is not one of the # combinations shown above optionally combined with other # (SQLITE_OPEN_READONLY | SQLITE_OPEN_* bits) # then the behavior is undefined. - # + # ^If the (SQLITE_OPEN_NOMUTEX) flag is set, then the database connection # opens in the multi-thread (threading mode) as long as the single-thread # mode has not been set at compile-time or start-time. ^If the @@ -2263,12 +2229,12 @@ class MemMethods < FFI::Struct # cache is enabled using (sqlite3_enable_shared_cache()). ^The # (SQLITE_OPEN_PRIVATECACHE) flag causes the database connection to not # participate in (shared cache mode) even if it is enabled. - # + # ^The fourth parameter to sqlite3_open_v2() is the name of the # (sqlite3_vfs) object that defines the operating system interface that # the new database connection should use. ^If the fourth parameter is # a NULL pointer then the default (sqlite3_vfs) object is used. - # + # ^If the filename is ":memory:", then a private, temporary in-memory database # is created for the connection. ^This in-memory database will vanish when # the database connection is closed. Future versions of SQLite might @@ -2276,13 +2242,13 @@ class MemMethods < FFI::Struct # It is recommended that when a database filename actually does begin with # a ":" character you should prefix the filename with a pathname such as # "./" to avoid ambiguity. - # + # ^If the filename is an empty string, then a private, temporary # on-disk database will be created. ^This private database will be # automatically deleted as soon as the database connection is closed. - # + # ((URI filenames in sqlite3_open()))

URI Filenames

- # + # ^If (URI filename) interpretation is enabled, and the filename argument # begins with "file:", then the filename is interpreted as a URI. ^URI # filename interpretation is enabled if the (SQLITE_OPEN_URI) flag is @@ -2293,13 +2259,13 @@ class MemMethods < FFI::Struct # by default, but future releases of SQLite might enable URI filename # interpretation by default. See "(URI filenames)" for additional # information. - # + # URI filenames are parsed according to RFC 3986. ^If the URI contains an # authority, then it must be either an empty string or the string # "localhost". ^If the authority is not an empty string or "localhost", an # error is returned to the caller. ^The fragment component of a URI, if # present, is ignored. - # + # ^SQLite uses the path component of the URI as the name of the disk file # which contains the database. ^If the path begins with a '/' character, # then it is interpreted as an absolute path. ^If the path does not begin @@ -2307,12 +2273,12 @@ class MemMethods < FFI::Struct # then the path is interpreted as a relative path. # ^On windows, the first component of an absolute path # is a drive specification (e.g. "C:"). - # + # ((core URI query parameters)) # The query component of a URI may contain parameters that are interpreted # either by SQLite itself, or by a (VFS | custom VFS implementation). # SQLite interprets the following three query parameters: - # + #
    #
  • vfs: ^The "vfs" parameter may be used to specify the name of # a VFS object that provides the operating system interface that should @@ -2321,7 +2287,7 @@ class MemMethods < FFI::Struct # VFS is an error. ^If sqlite3_open_v2() is used and the vfs option is # present, then the VFS specified by the option takes precedence over # the value passed as the fourth parameter to sqlite3_open_v2(). - # + #
  • mode: ^(The mode parameter may be set to either "ro", "rw" or # "rwc". Attempting to set it to any other value is an error)^. # ^If "ro" is specified, then the database is opened for read-only @@ -2334,7 +2300,7 @@ class MemMethods < FFI::Struct # used, it is an error to specify a value for the mode parameter that is # less restrictive than that specified by the flags passed as the third # parameter. - # + #
  • cache: ^The cache parameter may be set to either "shared" or # "private". ^Setting it to "shared" is equivalent to setting the # SQLITE_OPEN_SHAREDCACHE bit in the flags argument passed to @@ -2344,14 +2310,14 @@ class MemMethods < FFI::Struct # a URI filename, its value overrides any behaviour requested by setting # SQLITE_OPEN_PRIVATECACHE or SQLITE_OPEN_SHAREDCACHE flag. #
- # + # ^Specifying an unknown parameter in the query component of a URI is not an # error. Future versions of SQLite might understand additional query # parameters. See "(query parameters with special meaning to SQLite)" for # additional information. - # + # ((URI filename examples))

URI filename examples

- # + # #
URI filenames Results #
file:data.db @@ -2377,7 +2343,7 @@ class MemMethods < FFI::Struct #
file:data.db?mode=readonly # An error. "readonly" is not a valid option for the "mode" parameter. #
- # + # ^URI hexadecimal escape sequences (%HH) are supported within the path and # query components of a URI. A hexadecimal escape sequence consists of a # percent sign - "%" - followed by exactly two hexadecimal digits @@ -2386,65 +2352,61 @@ class MemMethods < FFI::Struct # hexadecimal escape sequences replaced by a single byte containing the # corresponding octet. If this process generates an invalid UTF-8 encoding, # the results are undefined. - # + # Note to Windows users: The encoding used for the filename argument # of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever # codepage is currently defined. Filenames containing international # characters must be converted to UTF-8 prior to passing them into # sqlite3_open() or sqlite3_open_v2(). - # + # @method open(filename, pp_db) - # @param [String] filename - # @param [FFI::Pointer(**Sqlite3)] pp_db - # @return [Integer] + # @param [String] filename + # @param [FFI::Pointer(**Sqlite3)] pp_db + # @return [Integer] # @scope class attach_function :open, :sqlite3_open, [:string, :pointer], :int - # (Not documented) - # + # @method open16(filename, pp_db) - # @param [FFI::Pointer(*Void)] filename - # @param [FFI::Pointer(**Sqlite3)] pp_db - # @return [Integer] + # @param [FFI::Pointer(*Void)] filename + # @param [FFI::Pointer(**Sqlite3)] pp_db + # @return [Integer] # @scope class attach_function :open16, :sqlite3_open16, [:pointer, :pointer], :int - # (Not documented) - # + # @method open_v2(filename, pp_db, flags, z_vfs) - # @param [String] filename - # @param [FFI::Pointer(**Sqlite3)] pp_db - # @param [Integer] flags - # @param [String] z_vfs - # @return [Integer] + # @param [String] filename + # @param [FFI::Pointer(**Sqlite3)] pp_db + # @param [Integer] flags + # @param [String] z_vfs + # @return [Integer] # @scope class attach_function :open_v2, :sqlite3_open_v2, [:string, :pointer, :int, :string], :int - # CAPI3REF: Obtain Values For URI Parameters - # + # This is a utility routine, useful to VFS implementations, that checks # to see if a database file was a URI that contained a specific query # parameter, and if so obtains the value of the query parameter. - # + # The zFilename argument is the filename pointer passed into the xOpen() # method of a VFS implementation. The zParam argument is the name of the # query parameter we seek. This routine returns the value of the zParam # parameter if it exists. If the parameter does not exist, this routine # returns a NULL pointer. - # + # If the zFilename argument to this function is not a pointer that SQLite # passed into the xOpen VFS method, then the behavior of this routine # is undefined and probably undesirable. - # + # @method uri_parameter(z_filename, z_param) - # @param [String] z_filename - # @param [String] z_param - # @return [String] + # @param [String] z_filename + # @param [String] z_param + # @return [String] # @scope class attach_function :uri_parameter, :sqlite3_uri_parameter, [:string, :string], :string - # CAPI3REF: Error Codes And Messages - # + # ^The sqlite3_errcode() interface returns the numeric (result code) or # (extended result code) for the most recent failed sqlite3_* API call # associated with a (database connection). If a prior API call failed @@ -2453,14 +2415,14 @@ class MemMethods < FFI::Struct # interface is the same except that it always returns the # (extended result code) even when extended result codes are # disabled. - # + # ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language # text that describes the error, as either UTF-8 or UTF-16 respectively. # ^(Memory to hold the error message string is managed internally. # The application does not need to worry about freeing the result. # However, the error string might be overwritten or deallocated by # subsequent calls to other SQLite interface functions.)^ - # + # When the serialized (threading mode) is in use, it might be the # case that a second error occurs on a separate thread in between # the time of the first error and the call to these interfaces. @@ -2470,50 +2432,46 @@ class MemMethods < FFI::Struct # by invoking (sqlite3_mutex_enter)((sqlite3_db_mutex)(D)) before beginning # to use D and invoking (sqlite3_mutex_leave)((sqlite3_db_mutex)(D)) after # all calls to the interfaces listed here are completed. - # + # If an interface fails with SQLITE_MISUSE, that means the interface # was invoked incorrectly by the application. In that case, the # error code and message may or may not be set. - # + # @method errcode(db) - # @param [Sqlite3] db - # @return [Integer] + # @param [Sqlite3] db + # @return [Integer] # @scope class attach_function :errcode, :sqlite3_errcode, [Sqlite3], :int - # (Not documented) - # + # @method extended_errcode(db) - # @param [Sqlite3] db - # @return [Integer] + # @param [Sqlite3] db + # @return [Integer] # @scope class attach_function :extended_errcode, :sqlite3_extended_errcode, [Sqlite3], :int - # (Not documented) - # + # @method errmsg(sqlite3) - # @param [Sqlite3] sqlite3 - # @return [String] + # @param [Sqlite3] sqlite3 + # @return [String] # @scope class attach_function :errmsg, :sqlite3_errmsg, [Sqlite3], :string - # (Not documented) - # + # @method errmsg16(sqlite3) - # @param [Sqlite3] sqlite3 - # @return [FFI::Pointer(*Void)] + # @param [Sqlite3] sqlite3 + # @return [FFI::Pointer(*Void)] # @scope class attach_function :errmsg16, :sqlite3_errmsg16, [Sqlite3], :pointer - # CAPI3REF: SQL Statement Object # KEYWORDS: {prepared statement} {prepared statements} - # + # An instance of this object represents a single SQL statement. # This object is variously known as a "prepared statement" or a # "compiled SQL statement" or simply as a "statement". - # + # The life of a statement object goes something like this: - # + #
    #
  1. Create the object using (sqlite3_prepare_v2()) or a related # function. @@ -2524,37 +2482,37 @@ class MemMethods < FFI::Struct # to step 2. Do this zero or more times. #
  2. Destroy the object using (sqlite3_finalize()). #
- # + # Refer to documentation on individual methods above for additional # information. module StmtWrappers - # @return [Integer] + # @return [Integer] def readonly() SQLite3.stmt_readonly(self) end - - # @param [Integer] op - # @param [Integer] reset_flg - # @return [Integer] + + # @param [Integer] op + # @param [Integer] reset_flg + # @return [Integer] def status(op, reset_flg) SQLite3.stmt_status(self, op, reset_flg) end end - + class Stmt < FFI::Struct include StmtWrappers layout :dummy, :char end - + # CAPI3REF: Run-time Limits - # + # ^(This interface allows the size of various constructs to be limited # on a connection by connection basis. The first parameter is the # (database connection) whose limit is to be set or queried. The # second parameter is one of the (limit categories) that define a # class of constructs to be size limited. The third parameter is the # new limit for that construct.)^ - # + # ^If the new limit is a negative number, the limit is unchanged. # ^(For each limit category SQLITE_LIMIT_NAME there is a # (limits | hard upper bound) @@ -2563,12 +2521,12 @@ class Stmt < FFI::Struct # (The "_LIMIT_" in the name is changed to "_MAX_".))^ # ^Attempts to increase a limit above its hard upper bound are # silently truncated to the hard upper bound. - # + # ^Regardless of whether or not the limit was changed, the # (sqlite3_limit()) interface returns the prior value of the limit. # ^Hence, to find the current value of a limit without changing it, # simply invoke this interface with the third parameter set to -1. - # + # Run-time limits are intended for use in applications that manage # both their own internal database and also databases that are controlled # by untrusted external sources. An example application might be a @@ -2581,32 +2539,31 @@ class Stmt < FFI::Struct # interface to further control untrusted SQL. The size of the database # created by an untrusted script can be contained using the # (max_page_count) (PRAGMA). - # + # New run-time limit categories may be added in future releases. - # + # @method limit(sqlite3, id, new_val) - # @param [Sqlite3] sqlite3 - # @param [Integer] id - # @param [Integer] new_val - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @param [Integer] id + # @param [Integer] new_val + # @return [Integer] # @scope class attach_function :limit, :sqlite3_limit, [Sqlite3, :int, :int], :int - # CAPI3REF: Compiling An SQL Statement # KEYWORDS: {SQL statement compiler} - # + # To execute an SQL query, it must first be compiled into a byte-code # program using one of these routines. - # + # The first argument, "db", is a (database connection) obtained from a # prior successful call to (sqlite3_open()), (sqlite3_open_v2()) or # (sqlite3_open16()). The database connection must not have been closed. - # + # The second argument, "zSql", is the statement to be compiled, encoded # as either UTF-8 or UTF-16. The sqlite3_prepare() and sqlite3_prepare_v2() # interfaces use UTF-8, and sqlite3_prepare16() and sqlite3_prepare16_v2() # use UTF-16. - # + # ^If the nByte argument is less than zero, then zSql is read up to the # first zero terminator. ^If nByte is non-negative, then it is the maximum # number of bytes read from zSql. ^When nByte is non-negative, the @@ -2617,12 +2574,12 @@ class Stmt < FFI::Struct # is equal to the number of bytes in the input string including # the nul-terminator bytes as this saves SQLite from having to # make a copy of the input string. - # + # ^If pzTail is not NULL then *pzTail is made to point to the first byte # past the end of the first SQL statement in zSql. These routines only # compile the first statement in zSql, so *pzTail is left pointing to # what remains uncompiled. - # + # ^*ppStmt is left pointing to a compiled (prepared statement) that can be # executed using (sqlite3_step()). ^If there is an error, *ppStmt is set # to NULL. ^If the input text contains no SQL (if the input is an empty @@ -2630,10 +2587,10 @@ class Stmt < FFI::Struct # The calling procedure is responsible for deleting the compiled # SQL statement using (sqlite3_finalize()) after it has finished with it. # ppStmt may not be NULL. - # + # ^On success, the sqlite3_prepare() family of routines return (SQLITE_OK); # otherwise an (error code) is returned. - # + # The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are # recommended for all new programs. The two older interfaces are retained # for backwards compatibility, but their use is discouraged. @@ -2641,14 +2598,14 @@ class Stmt < FFI::Struct # that is returned (the (sqlite3_stmt) object) contains a copy of the # original SQL text. This causes the (sqlite3_step()) interface to # behave differently in three ways: - # + #
    #
  1. # ^If the database schema changes, instead of returning (SQLITE_SCHEMA) as it # always used to do, (sqlite3_step()) will automatically recompile the SQL # statement and try to run it again. #
  2. - # + #
  3. # ^When an error occurs, (sqlite3_step()) will return one of the detailed # (error codes) or (extended error codes). ^The legacy behavior was that @@ -2657,7 +2614,7 @@ class Stmt < FFI::Struct # in order to find the underlying cause of the problem. With the "v2" prepare # interfaces, the underlying reason for the error is returned immediately. #
  4. - # + #
  5. # ^If the specific value bound to (parameter | host parameter) in the # WHERE clause might influence the choice of query plan for a statement, @@ -2671,84 +2628,79 @@ class Stmt < FFI::Struct # the #
  6. #
- # + # @method prepare(db, z_sql, n_byte, pp_stmt, pz_tail) - # @param [Sqlite3] db - # @param [String] z_sql - # @param [Integer] n_byte - # @param [FFI::Pointer(**Stmt)] pp_stmt - # @param [FFI::Pointer(**CharS)] pz_tail - # @return [Integer] + # @param [Sqlite3] db + # @param [String] z_sql + # @param [Integer] n_byte + # @param [FFI::Pointer(**Stmt)] pp_stmt + # @param [FFI::Pointer(**CharS)] pz_tail + # @return [Integer] # @scope class attach_function :prepare, :sqlite3_prepare, [Sqlite3, :string, :int, :pointer, :pointer], :int - # (Not documented) - # + # @method prepare_v2(db, z_sql, n_byte, pp_stmt, pz_tail) - # @param [Sqlite3] db - # @param [String] z_sql - # @param [Integer] n_byte - # @param [FFI::Pointer(**Stmt)] pp_stmt - # @param [FFI::Pointer(**CharS)] pz_tail - # @return [Integer] + # @param [Sqlite3] db + # @param [String] z_sql + # @param [Integer] n_byte + # @param [FFI::Pointer(**Stmt)] pp_stmt + # @param [FFI::Pointer(**CharS)] pz_tail + # @return [Integer] # @scope class attach_function :prepare_v2, :sqlite3_prepare_v2, [Sqlite3, :string, :int, :pointer, :pointer], :int - # (Not documented) - # + # @method prepare16(db, z_sql, n_byte, pp_stmt, pz_tail) - # @param [Sqlite3] db - # @param [FFI::Pointer(*Void)] z_sql - # @param [Integer] n_byte - # @param [FFI::Pointer(**Stmt)] pp_stmt - # @param [FFI::Pointer(**Void)] pz_tail - # @return [Integer] + # @param [Sqlite3] db + # @param [FFI::Pointer(*Void)] z_sql + # @param [Integer] n_byte + # @param [FFI::Pointer(**Stmt)] pp_stmt + # @param [FFI::Pointer(**Void)] pz_tail + # @return [Integer] # @scope class attach_function :prepare16, :sqlite3_prepare16, [Sqlite3, :pointer, :int, :pointer, :pointer], :int - # (Not documented) - # + # @method prepare16_v2(db, z_sql, n_byte, pp_stmt, pz_tail) - # @param [Sqlite3] db - # @param [FFI::Pointer(*Void)] z_sql - # @param [Integer] n_byte - # @param [FFI::Pointer(**Stmt)] pp_stmt - # @param [FFI::Pointer(**Void)] pz_tail - # @return [Integer] + # @param [Sqlite3] db + # @param [FFI::Pointer(*Void)] z_sql + # @param [Integer] n_byte + # @param [FFI::Pointer(**Stmt)] pp_stmt + # @param [FFI::Pointer(**Void)] pz_tail + # @return [Integer] # @scope class attach_function :prepare16_v2, :sqlite3_prepare16_v2, [Sqlite3, :pointer, :int, :pointer, :pointer], :int - # CAPI3REF: Retrieving Statement SQL - # + # ^This interface can be used to retrieve a saved copy of the original # SQL text used to create a (prepared statement) if that statement was # compiled using either (sqlite3_prepare_v2()) or (sqlite3_prepare16_v2()). - # + # @method sql(p_stmt) - # @param [Stmt] p_stmt - # @return [String] + # @param [Stmt] p_stmt + # @return [String] # @scope class attach_function :sql, :sqlite3_sql, [Stmt], :string - # CAPI3REF: Determine If An SQL Statement Writes The Database - # + # ^The sqlite3_stmt_readonly(X) interface returns true (non-zero) if # and only if the (prepared statement) X makes no direct changes to # the content of the database file. - # + # Note that (application-defined SQL functions) or # (virtual tables) might change the database indirectly as a side effect. # ^(For example, if an application defines a function "eval()" that # calls (sqlite3_exec()), then the following SQL statement would # change the database file through side-effects: - # + #
   #    SELECT eval('DELETE FROM t1') FROM t2;
   # 
- # + # But because the (SELECT) statement does not change the database file # directly, sqlite3_stmt_readonly() would still return true.)^ - # + # ^Transaction control statements such as (BEGIN), (COMMIT), (ROLLBACK), # (SAVEPOINT), and (RELEASE) cause sqlite3_stmt_readonly() to return true, # since the statements themselves do not actually modify the database but @@ -2757,27 +2709,26 @@ class Stmt < FFI::Struct # sqlite3_stmt_readonly() to return true since, while those statements # change the configuration of a database connection, they do not make # changes to the content of the database files on disk. - # + # @method stmt_readonly(p_stmt) - # @param [Stmt] p_stmt - # @return [Integer] + # @param [Stmt] p_stmt + # @return [Integer] # @scope class attach_function :stmt_readonly, :sqlite3_stmt_readonly, [Stmt], :int - # CAPI3REF: Dynamically Typed Value Object # KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} - # + # SQLite uses the sqlite3_value object to represent all values # that can be stored in a database table. SQLite uses dynamic typing # for the values it stores. ^Values stored in sqlite3_value objects # can be integers, floating point values, strings, BLOBs, or NULL. - # + # An sqlite3_value object may be either "protected" or "unprotected". # Some interfaces require a protected sqlite3_value. Other interfaces # will accept either a protected or an unprotected sqlite3_value. # Every interface that accepts sqlite3_value arguments specifies # whether or not it requires a protected sqlite3_value. - # + # The terms "protected" and "unprotected" refer to whether or not # a mutex is held. An internal mutex is held for a protected # sqlite3_value object but no mutex is held for an unprotected @@ -2790,7 +2741,7 @@ class Stmt < FFI::Struct # for maximum code portability it is recommended that applications # still make the distinction between protected and unprotected # sqlite3_value objects even when not strictly required. - # + # ^The sqlite3_value objects that are passed as parameters into the # implementation of (application-defined SQL functions) are protected. # ^The sqlite3_value object returned by @@ -2802,9 +2753,9 @@ class Stmt < FFI::Struct class Mem < FFI::Struct layout :dummy, :char end - + # CAPI3REF: SQL Function Context Object - # + # The context in which an SQL function executes is stored in an # sqlite3_context object. ^A pointer to an sqlite3_context object # is always first parameter to (application-defined SQL functions). @@ -2814,25 +2765,25 @@ class Mem < FFI::Struct # (sqlite3_context_db_handle()), (sqlite3_get_auxdata()), # and/or (sqlite3_set_auxdata()). module ContextWrappers - # @return [Sqlite3] + # @return [Sqlite3] def db_handle() Sqlite3.new SQLite3.context_db_handle(self) end end - + class Context < FFI::Struct include ContextWrappers layout :dummy, :char end - + # CAPI3REF: Binding Values To Prepared Statements # KEYWORDS: {host parameter} {host parameters} {host parameter name} # KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding} - # + # ^(In the SQL statement text input to (sqlite3_prepare_v2()) and its variants, # literals may be replaced by a (parameter) that matches one of following # templates: - # + #
    #
  • ? #
  • ?NNN @@ -2840,16 +2791,16 @@ class Context < FFI::Struct #
  • @VVV #
  • $VVV #
- # + # In the templates above, NNN represents an integer literal, # and VVV represents an alphanumeric identifier.)^ ^The values of these # parameters (also called "host parameter names" or "SQL parameters") # can be set using the sqlite3_bind_*() routines defined here. - # + # ^The first argument to the sqlite3_bind_*() routines is always # a pointer to the (sqlite3_stmt) object returned from # (sqlite3_prepare_v2()) or its variants. - # + # ^The second argument is the index of the SQL parameter to be set. # ^The leftmost SQL parameter has an index of 1. ^When the same named # SQL parameter is used more than once, second and subsequent @@ -2859,9 +2810,9 @@ class Context < FFI::Struct # for "?NNN" parameters is the value of NNN. # ^The NNN value must be between 1 and the (sqlite3_limit()) # parameter (SQLITE_LIMIT_VARIABLE_NUMBER) (default value: 999). - # + # ^The third argument is the value to bind to the parameter. - # + # ^(In those routines that have a fourth argument, its value is the # number of bytes in the parameter. To be clear: the value is the # number of bytes in the value, not the number of characters.)^ @@ -2874,7 +2825,7 @@ class Context < FFI::Struct # the value of the fourth parameter then the resulting string value will # contain embedded NULs. The result of expressions involving strings # with embedded NULs is undefined. - # + # ^The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and # sqlite3_bind_text16() is a destructor used to dispose of the BLOB or # string after SQLite has finished with it. ^The destructor is called @@ -2886,7 +2837,7 @@ class Context < FFI::Struct # ^If the fifth argument has the value (SQLITE_TRANSIENT), then # SQLite makes its own private copy of the data immediately, before # the sqlite3_bind_*() routine returns. - # + # ^The sqlite3_bind_zeroblob() routine binds a BLOB of length N that # is filled with zeroes. ^A zeroblob uses a fixed amount of memory # (just an integer to hold its size) while it is being processed. @@ -2894,143 +2845,133 @@ class Context < FFI::Struct # content is later written using # (sqlite3_blob_open | incremental BLOB I/O) routines. # ^A negative value for the zeroblob results in a zero-length BLOB. - # + # ^If any of the sqlite3_bind_*() routines are called with a NULL pointer # for the (prepared statement) or with a prepared statement for which # (sqlite3_step()) has been called more recently than (sqlite3_reset()), # then the call will return (SQLITE_MISUSE). If any sqlite3_bind_() # routine is passed a (prepared statement) that has been finalized, the # result is undefined and probably harmful. - # + # ^Bindings are not cleared by the (sqlite3_reset()) routine. # ^Unbound parameters are interpreted as NULL. - # + # ^The sqlite3_bind_* routines return (SQLITE_OK) on success or an # (error code) if anything goes wrong. # ^(SQLITE_RANGE) is returned if the parameter # index is out of range. ^(SQLITE_NOMEM) is returned if malloc() fails. - # + # See also: (sqlite3_bind_parameter_count()), # (sqlite3_bind_parameter_name()), and (sqlite3_bind_parameter_index()). - # - # @method bind_blob(stmt, int, void, n, ) - # @param [Stmt] stmt - # @param [Integer] int - # @param [FFI::Pointer(*Void)] void - # @param [Integer] n - # @param [FFI::Pointer(*)] - # @return [Integer] + + # @method bind_blob(stmt, int, void, n, functionproto) + # @param [Stmt] stmt + # @param [Integer] int + # @param [FFI::Pointer(*Void)] void + # @param [Integer] n + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @return [Integer] # @scope class attach_function :bind_blob, :sqlite3_bind_blob, [Stmt, :int, :pointer, :int, :pointer], :int - # (Not documented) - # + # @method bind_double(stmt, int, double) - # @param [Stmt] stmt - # @param [Integer] int - # @param [Float] double - # @return [Integer] + # @param [Stmt] stmt + # @param [Integer] int + # @param [Float] double + # @return [Integer] # @scope class attach_function :bind_double, :sqlite3_bind_double, [Stmt, :int, :double], :int - # (Not documented) - # + # @method bind_int(stmt, int, int) - # @param [Stmt] stmt - # @param [Integer] int - # @param [Integer] int - # @return [Integer] + # @param [Stmt] stmt + # @param [Integer] int + # @param [Integer] int + # @return [Integer] # @scope class attach_function :bind_int, :sqlite3_bind_int, [Stmt, :int, :int], :int - # (Not documented) - # + # @method bind_int64(stmt, int, long_long) - # @param [Stmt] stmt - # @param [Integer] int - # @param [Integer] long_long - # @return [Integer] + # @param [Stmt] stmt + # @param [Integer] int + # @param [Integer] long_long + # @return [Integer] # @scope class attach_function :bind_int64, :sqlite3_bind_int64, [Stmt, :int, :long_long], :int - # (Not documented) - # + # @method bind_null(stmt, int) - # @param [Stmt] stmt - # @param [Integer] int - # @return [Integer] + # @param [Stmt] stmt + # @param [Integer] int + # @return [Integer] # @scope class attach_function :bind_null, :sqlite3_bind_null, [Stmt, :int], :int - # (Not documented) - # - # @method bind_text(stmt, int, string, n, ) - # @param [Stmt] stmt - # @param [Integer] int - # @param [String] string - # @param [Integer] n - # @param [FFI::Pointer(*)] - # @return [Integer] + + # @method bind_text(stmt, int, string, n, functionproto) + # @param [Stmt] stmt + # @param [Integer] int + # @param [String] string + # @param [Integer] n + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @return [Integer] # @scope class attach_function :bind_text, :sqlite3_bind_text, [Stmt, :int, :string, :int, :pointer], :int - # (Not documented) - # - # @method bind_text16(stmt, int, void, int, ) - # @param [Stmt] stmt - # @param [Integer] int - # @param [FFI::Pointer(*Void)] void - # @param [Integer] int - # @param [FFI::Pointer(*)] - # @return [Integer] + + # @method bind_text16(stmt, int, void, int, functionproto) + # @param [Stmt] stmt + # @param [Integer] int + # @param [FFI::Pointer(*Void)] void + # @param [Integer] int + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @return [Integer] # @scope class attach_function :bind_text16, :sqlite3_bind_text16, [Stmt, :int, :pointer, :int, :pointer], :int - # (Not documented) - # + # @method bind_value(stmt, int, mem) - # @param [Stmt] stmt - # @param [Integer] int - # @param [Mem] mem - # @return [Integer] + # @param [Stmt] stmt + # @param [Integer] int + # @param [Mem] mem + # @return [Integer] # @scope class attach_function :bind_value, :sqlite3_bind_value, [Stmt, :int, Mem], :int - # (Not documented) - # + # @method bind_zeroblob(stmt, int, n) - # @param [Stmt] stmt - # @param [Integer] int - # @param [Integer] n - # @return [Integer] + # @param [Stmt] stmt + # @param [Integer] int + # @param [Integer] n + # @return [Integer] # @scope class attach_function :bind_zeroblob, :sqlite3_bind_zeroblob, [Stmt, :int, :int], :int - # CAPI3REF: Number Of SQL Parameters - # + # ^This routine can be used to find the number of (SQL parameters) # in a (prepared statement). SQL parameters are tokens of the # form "?", "?NNN", ":AAA", "$AAA", or "@AAA" that serve as # placeholders for values that are (sqlite3_bind_blob | bound) # to the parameters at a later time. - # + # ^(This routine actually returns the index of the largest (rightmost) # parameter. For all forms except ?NNN, this will correspond to the # number of unique parameters. If parameters of the ?NNN form are used, # there may be gaps in the list.)^ - # + # See also: (sqlite3_bind_blob|sqlite3_bind()), # (sqlite3_bind_parameter_name()), and # (sqlite3_bind_parameter_index()). - # + # @method bind_parameter_count(stmt) - # @param [Stmt] stmt - # @return [Integer] + # @param [Stmt] stmt + # @return [Integer] # @scope class attach_function :bind_parameter_count, :sqlite3_bind_parameter_count, [Stmt], :int - # CAPI3REF: Name Of A Host Parameter - # + # ^The sqlite3_bind_parameter_name(P,N) interface returns # the name of the N-th (SQL parameter) in the (prepared statement) P. # ^(SQL parameters of the form "?NNN" or ":AAA" or "@AAA" or "$AAA" @@ -3040,74 +2981,70 @@ class Context < FFI::Struct # is included as part of the name.)^ # ^Parameters of the form "?" without a following integer have no name # and are referred to as "nameless" or "anonymous parameters". - # + # ^The first host parameter has an index of 1, not 0. - # + # ^If the value N is out of range or if the N-th parameter is # nameless, then NULL is returned. ^The returned string is # always in UTF-8 encoding even if the named parameter was # originally specified as UTF-16 in (sqlite3_prepare16()) or # (sqlite3_prepare16_v2()). - # + # See also: (sqlite3_bind_blob|sqlite3_bind()), # (sqlite3_bind_parameter_count()), and # (sqlite3_bind_parameter_index()). - # + # @method bind_parameter_name(stmt, int) - # @param [Stmt] stmt - # @param [Integer] int - # @return [String] + # @param [Stmt] stmt + # @param [Integer] int + # @return [String] # @scope class attach_function :bind_parameter_name, :sqlite3_bind_parameter_name, [Stmt, :int], :string - # CAPI3REF: Index Of A Parameter With A Given Name - # + # ^Return the index of an SQL parameter given its name. ^The # index value returned is suitable for use as the second # parameter to (sqlite3_bind_blob|sqlite3_bind()). ^A zero # is returned if no matching parameter is found. ^The parameter # name must be given in UTF-8 even if the original statement # was prepared from UTF-16 text using (sqlite3_prepare16_v2()). - # + # See also: (sqlite3_bind_blob|sqlite3_bind()), # (sqlite3_bind_parameter_count()), and # (sqlite3_bind_parameter_index()). - # + # @method bind_parameter_index(stmt, z_name) - # @param [Stmt] stmt - # @param [String] z_name - # @return [Integer] + # @param [Stmt] stmt + # @param [String] z_name + # @return [Integer] # @scope class attach_function :bind_parameter_index, :sqlite3_bind_parameter_index, [Stmt, :string], :int - # CAPI3REF: Reset All Bindings On A Prepared Statement - # + # ^Contrary to the intuition of many, (sqlite3_reset()) does not reset # the (sqlite3_bind_blob | bindings) on a (prepared statement). # ^Use this routine to reset all host parameters to NULL. - # + # @method clear_bindings(stmt) - # @param [Stmt] stmt - # @return [Integer] + # @param [Stmt] stmt + # @return [Integer] # @scope class attach_function :clear_bindings, :sqlite3_clear_bindings, [Stmt], :int - # CAPI3REF: Number Of Columns In A Result Set - # + # ^Return the number of columns in the result set returned by the # (prepared statement). ^This routine returns 0 if pStmt is an SQL # statement that does not return data (for example an (UPDATE)). - # + # See also: (sqlite3_data_count()) - # + # @method column_count(p_stmt) - # @param [Stmt] p_stmt - # @return [Integer] + # @param [Stmt] p_stmt + # @return [Integer] # @scope class attach_function :column_count, :sqlite3_column_count, [Stmt], :int - # CAPI3REF: Column Names In A Result Set - # + # ^These routines return the name assigned to a particular column # in the result set of a (SELECT) statement. ^The sqlite3_column_name() # interface returns a pointer to a zero-terminated UTF-8 string @@ -3115,40 +3052,38 @@ class Context < FFI::Struct # UTF-16 string. ^The first parameter is the (prepared statement) # that implements the (SELECT) statement. ^The second parameter is the # column number. ^The leftmost column is number 0. - # + # ^The returned string pointer is valid until either the (prepared statement) # is destroyed by (sqlite3_finalize()) or until the statement is automatically # reprepared by the first call to (sqlite3_step()) for a particular run # or until the next call to # sqlite3_column_name() or sqlite3_column_name16() on the same column. - # + # ^If sqlite3_malloc() fails during the processing of either routine # (for example during a conversion from UTF-8 to UTF-16) then a # NULL pointer is returned. - # + # ^The name of a result column is the value of the "AS" clause for # that column, if there is an AS clause. If there is no AS clause # then the name of the column is unspecified and may change from # one release of SQLite to the next. - # + # @method column_name(stmt, n) - # @param [Stmt] stmt - # @param [Integer] n - # @return [String] + # @param [Stmt] stmt + # @param [Integer] n + # @return [String] # @scope class attach_function :column_name, :sqlite3_column_name, [Stmt, :int], :string - # (Not documented) - # + # @method column_name16(stmt, n) - # @param [Stmt] stmt - # @param [Integer] n - # @return [FFI::Pointer(*Void)] + # @param [Stmt] stmt + # @param [Integer] n + # @return [FFI::Pointer(*Void)] # @scope class attach_function :column_name16, :sqlite3_column_name16, [Stmt, :int], :pointer - # CAPI3REF: Source Of Data In A Query Result - # + # ^These routines provide a means to determine the database, table, and # table column that is the origin of a particular result column in # (SELECT) statement. @@ -3161,90 +3096,84 @@ class Context < FFI::Struct # reprepared by the first call to (sqlite3_step()) for a particular run # or until the same information is requested # again in a different encoding. - # + # ^The names returned are the original un-aliased names of the # database, table, and column. - # + # ^The first argument to these interfaces is a (prepared statement). # ^These functions return information about the Nth result column returned by # the statement, where N is the second function argument. # ^The left-most column is column 0 for these routines. - # + # ^If the Nth column returned by the statement is an expression or # subquery and is not a column value, then all of these functions return # NULL. ^These routine might also return NULL if a memory allocation error # occurs. ^Otherwise, they return the name of the attached database, table, # or column that query result column was extracted from. - # + # ^As with all other SQLite APIs, those whose names end with "16" return # UTF-16 encoded strings and the other functions return UTF-8. - # + # ^These APIs are only available if the library was compiled with the # (SQLITE_ENABLE_COLUMN_METADATA) C-preprocessor symbol. - # + # If two or more threads call one or more of these routines against the same # prepared statement and column at the same time then the results are # undefined. - # + # If two or more threads call one or more # (sqlite3_column_database_name | column metadata interfaces) # for the same (prepared statement) and result column # at the same time then the results are undefined. - # + # @method column_database_name(stmt, int) - # @param [Stmt] stmt - # @param [Integer] int - # @return [String] + # @param [Stmt] stmt + # @param [Integer] int + # @return [String] # @scope class attach_function :column_database_name, :sqlite3_column_database_name, [Stmt, :int], :string - # (Not documented) - # + # @method column_database_name16(stmt, int) - # @param [Stmt] stmt - # @param [Integer] int - # @return [FFI::Pointer(*Void)] + # @param [Stmt] stmt + # @param [Integer] int + # @return [FFI::Pointer(*Void)] # @scope class attach_function :column_database_name16, :sqlite3_column_database_name16, [Stmt, :int], :pointer - # (Not documented) - # + # @method column_table_name(stmt, int) - # @param [Stmt] stmt - # @param [Integer] int - # @return [String] + # @param [Stmt] stmt + # @param [Integer] int + # @return [String] # @scope class attach_function :column_table_name, :sqlite3_column_table_name, [Stmt, :int], :string - # (Not documented) - # + # @method column_table_name16(stmt, int) - # @param [Stmt] stmt - # @param [Integer] int - # @return [FFI::Pointer(*Void)] + # @param [Stmt] stmt + # @param [Integer] int + # @return [FFI::Pointer(*Void)] # @scope class attach_function :column_table_name16, :sqlite3_column_table_name16, [Stmt, :int], :pointer - # (Not documented) - # + # @method column_origin_name(stmt, int) - # @param [Stmt] stmt - # @param [Integer] int - # @return [String] + # @param [Stmt] stmt + # @param [Integer] int + # @return [String] # @scope class attach_function :column_origin_name, :sqlite3_column_origin_name, [Stmt, :int], :string - # (Not documented) - # + # @method column_origin_name16(stmt, int) - # @param [Stmt] stmt - # @param [Integer] int - # @return [FFI::Pointer(*Void)] + # @param [Stmt] stmt + # @param [Integer] int + # @return [FFI::Pointer(*Void)] # @scope class attach_function :column_origin_name16, :sqlite3_column_origin_name16, [Stmt, :int], :pointer - # CAPI3REF: Declared Datatype Of A Query Result - # + # ^(The first parameter is a (prepared statement). # If this statement is a (SELECT) statement and the Nth column of the # returned result set of that (SELECT) is a table column (not an @@ -3252,77 +3181,75 @@ class Context < FFI::Struct # column is returned.)^ ^If the Nth column of the result set is an # expression or subquery, then a NULL pointer is returned. # ^The returned string is always UTF-8 encoded. - # + # ^(For example, given the database schema: - # + # CREATE TABLE t1(c1 VARIANT); - # + # and the following statement to be compiled: - # + # SELECT c1 + 1, c1 FROM t1; - # + # this routine would return the string "VARIANT" for the second result # column (i==1), and a NULL pointer for the first result column (i==0).)^ - # + # ^SQLite uses dynamic run-time typing. ^So just because a column # is declared to contain a particular type does not mean that the # data stored in that column is of the declared type. SQLite is # strongly typed, but the typing is dynamic not static. ^Type # is associated with individual values, not with the containers # used to hold those values. - # + # @method column_decltype(stmt, int) - # @param [Stmt] stmt - # @param [Integer] int - # @return [String] + # @param [Stmt] stmt + # @param [Integer] int + # @return [String] # @scope class attach_function :column_decltype, :sqlite3_column_decltype, [Stmt, :int], :string - # (Not documented) - # + # @method column_decltype16(stmt, int) - # @param [Stmt] stmt - # @param [Integer] int - # @return [FFI::Pointer(*Void)] + # @param [Stmt] stmt + # @param [Integer] int + # @return [FFI::Pointer(*Void)] # @scope class attach_function :column_decltype16, :sqlite3_column_decltype16, [Stmt, :int], :pointer - # CAPI3REF: Evaluate An SQL Statement - # + # After a (prepared statement) has been prepared using either # (sqlite3_prepare_v2()) or (sqlite3_prepare16_v2()) or one of the legacy # interfaces (sqlite3_prepare()) or (sqlite3_prepare16()), this function # must be called one or more times to evaluate the statement. - # + # The details of the behavior of the sqlite3_step() interface depend # on whether the statement was prepared using the newer "v2" interface # (sqlite3_prepare_v2()) and (sqlite3_prepare16_v2()) or the older legacy # interface (sqlite3_prepare()) and (sqlite3_prepare16()). The use of the # new "v2" interface is recommended for new applications but the legacy # interface will continue to be supported. - # + # ^In the legacy interface, the return value will be either (SQLITE_BUSY), # (SQLITE_DONE), (SQLITE_ROW), (SQLITE_ERROR), or (SQLITE_MISUSE). # ^With the "v2" interface, any of the other (result codes) or # (extended result codes) might be returned as well. - # + # ^(SQLITE_BUSY) means that the database engine was unable to acquire the # database locks it needs to do its job. ^If the statement is a (COMMIT) # or occurs outside of an explicit transaction, then you can retry the # statement. If the statement is not a (COMMIT) and occurs within an # explicit transaction then you should rollback the transaction before # continuing. - # + # ^(SQLITE_DONE) means that the statement has finished executing # successfully. sqlite3_step() should not be called again on this virtual # machine without first calling (sqlite3_reset()) to reset the virtual # machine back to its initial state. - # + # ^If the SQL statement being executed returns any data, then (SQLITE_ROW) # is returned each time a new row of data is ready for processing by the # caller. The values may be accessed using the (column access functions). # sqlite3_step() is called again to retrieve the next row of data. - # + # ^(SQLITE_ERROR) means that a run-time error (such as a constraint # violation) has occurred. sqlite3_step() should not be called again on # the VM. More information may be found by calling (sqlite3_errmsg()). @@ -3331,14 +3258,14 @@ class Context < FFI::Struct # can be obtained by calling (sqlite3_reset()) on the # (prepared statement). ^In the "v2" interface, # the more specific error code is returned directly by sqlite3_step(). - # + # (SQLITE_MISUSE) means that the this routine was called inappropriately. # Perhaps it was called on a (prepared statement) that has # already been (sqlite3_finalize | finalized) or on one that had # previously returned (SQLITE_ERROR) or (SQLITE_DONE). Or it could # be the case that the same database connection is being used by two or # more threads at the same moment in time. - # + # For all versions of SQLite up to and including 3.6.23.1, a call to # (sqlite3_reset()) was required after sqlite3_step() returned anything # other than (SQLITE_ROW) before any subsequent invocation of @@ -3350,7 +3277,7 @@ class Context < FFI::Struct # break because any application that ever receives an SQLITE_MISUSE error # is broken by definition. The (SQLITE_OMIT_AUTORESET) compile-time option # can be used to restore the legacy behavior. - # + # Goofy Interface Alert: In the legacy interface, the sqlite3_step() # API always returns a generic error code, (SQLITE_ERROR), following any # error other than (SQLITE_BUSY) and (SQLITE_MISUSE). You must call @@ -3362,15 +3289,14 @@ class Context < FFI::Struct # of the legacy (sqlite3_prepare()) and (sqlite3_prepare16()) interfaces, # then the more specific (error codes) are returned directly # by sqlite3_step(). The use of the "v2" interface is recommended. - # + # @method step(stmt) - # @param [Stmt] stmt - # @return [Integer] + # @param [Stmt] stmt + # @return [Integer] # @scope class attach_function :step, :sqlite3_step, [Stmt], :int - # CAPI3REF: Number of columns in a result set - # + # ^The sqlite3_data_count(P) interface returns the number of columns in the # current row of the result set of (prepared statement) P. # ^If prepared statement P does not have results ready to return @@ -3383,20 +3309,19 @@ class Context < FFI::Struct # (SQLITE_ROW), except in the case of the (PRAGMA incremental_vacuum) # where it always returns zero since each step of that multi-step # pragma returns 0 columns of data. - # + # See also: (sqlite3_column_count()) - # + # @method data_count(p_stmt) - # @param [Stmt] p_stmt - # @return [Integer] + # @param [Stmt] p_stmt + # @return [Integer] # @scope class attach_function :data_count, :sqlite3_data_count, [Stmt], :int - # CAPI3REF: Result Values From A Query # KEYWORDS: {column access functions} - # + # These routines form the "result set" interface. - # + # ^These routines return information about a single column of the current # result row of a query. ^In every case the first argument is a pointer # to the (prepared statement) that is being evaluated (the (sqlite3_stmt*) @@ -3405,7 +3330,7 @@ class Context < FFI::Struct # should be returned. ^The leftmost column of the result set has the index 0. # ^The number of columns in the result can be determined using # (sqlite3_column_count()). - # + # If the SQL statement does not currently point to a valid row, or if the # column index is out of range, the result is undefined. # These routines may only be called when the most recent call to @@ -3417,7 +3342,7 @@ class Context < FFI::Struct # If (sqlite3_step()) or (sqlite3_reset()) or (sqlite3_finalize()) # are called from a different thread while any of these routines # are pending, then the results are undefined. - # + # ^The sqlite3_column_type() routine returns the # (SQLITE_INTEGER | datatype code) for the initial data type # of the result column. ^The returned value is one of (SQLITE_INTEGER), @@ -3427,7 +3352,7 @@ class Context < FFI::Struct # the value returned by sqlite3_column_type() is undefined. Future # versions of SQLite may change the behavior of sqlite3_column_type() # following a type conversion. - # + # ^If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes() # routine returns the number of bytes in that BLOB or string. # ^If the result is a UTF-16 string, then sqlite3_column_bytes() converts @@ -3436,7 +3361,7 @@ class Context < FFI::Struct # (sqlite3_snprintf()) to convert that value to a UTF-8 string and returns # the number of bytes in that string. # ^If the result is NULL, then sqlite3_column_bytes() returns zero. - # + # ^If the result is a BLOB or UTF-16 string then the sqlite3_column_bytes16() # routine returns the number of bytes in that BLOB or string. # ^If the result is a UTF-8 string, then sqlite3_column_bytes16() converts @@ -3445,17 +3370,17 @@ class Context < FFI::Struct # (sqlite3_snprintf()) to convert that value to a UTF-16 string and returns # the number of bytes in that string. # ^If the result is NULL, then sqlite3_column_bytes16() returns zero. - # + # ^The values returned by (sqlite3_column_bytes()) and # (sqlite3_column_bytes16()) do not include the zero terminators at the end # of the string. ^For clarity: the values returned by # (sqlite3_column_bytes()) and (sqlite3_column_bytes16()) are the number of # bytes in the string, not the number of characters. - # + # ^Strings returned by sqlite3_column_text() and sqlite3_column_text16(), # even empty strings, are always zero terminated. ^The return # value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer. - # + # ^The object returned by (sqlite3_column_value()) is an # (unprotected sqlite3_value) object. An unprotected sqlite3_value object # may only be used with (sqlite3_bind_value()) and (sqlite3_result_value()). @@ -3463,17 +3388,17 @@ class Context < FFI::Struct # (sqlite3_column_value()) is used in any other way, including calls # to routines like (sqlite3_value_int()), (sqlite3_value_text()), # or (sqlite3_value_bytes()), then the behavior is undefined. - # + # These routines attempt to convert the value where appropriate. ^For # example, if the internal representation is FLOAT and a text result # is requested, (sqlite3_snprintf()) is used internally to perform the # conversion automatically. ^(The following table details the conversions # that are applied: - # + #
# #
Internal
Type
Requested
Type
Conversion - # + #
NULL INTEGER Result is 0 #
NULL FLOAT Result is 0.0 #
NULL TEXT Result is NULL pointer @@ -3492,19 +3417,19 @@ class Context < FFI::Struct #
BLOB TEXT Add a zero terminator if needed #
#
)^ - # + # The table above makes reference to standard C library functions atoi() # and atof(). SQLite does not really use these functions. It has its # own equivalent internal routines. The atoi() and atof() names are # used in the table for brevity and because they are familiar to most # C programmers. - # + # Note that when type conversions occur, pointers returned by prior # calls to sqlite3_column_blob(), sqlite3_column_text(), and/or # sqlite3_column_text16() may be invalidated. # Type conversions and pointer invalidations might occur # in the following cases: - # + #
    #
  • The initial content is a BLOB and sqlite3_column_text() or # sqlite3_column_text16() is called. A zero-terminator might @@ -3516,22 +3441,22 @@ class Context < FFI::Struct # sqlite3_column_text() is called. The content must be converted # to UTF-8.
  • #
- # + # ^Conversions between UTF-16be and UTF-16le are always done in place and do # not invalidate a prior pointer, though of course the content of the buffer # that the prior pointer references will have been modified. Other kinds # of conversion are done in place when it is possible, but sometimes they # are not possible and in those cases prior pointers are invalidated. - # + # The safest and easiest to remember policy is to invoke these routines # in one of the following ways: - # + #
    #
  • sqlite3_column_text() followed by sqlite3_column_bytes()
  • #
  • sqlite3_column_blob() followed by sqlite3_column_bytes()
  • #
  • sqlite3_column_text16() followed by sqlite3_column_bytes16()
  • #
- # + # In other words, you should call sqlite3_column_text(), # sqlite3_column_blob(), or sqlite3_column_text16() first to force the result # into the desired format, then invoke sqlite3_column_bytes() or @@ -3539,172 +3464,160 @@ class Context < FFI::Struct # to sqlite3_column_text() or sqlite3_column_blob() with calls to # sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16() # with calls to sqlite3_column_bytes(). - # + # ^The pointers returned are valid until a type conversion occurs as # described above, or until (sqlite3_step()) or (sqlite3_reset()) or # (sqlite3_finalize()) is called. ^The memory space used to hold strings # and BLOBs is freed automatically. Do not pass the pointers returned # (sqlite3_column_blob()), (sqlite3_column_text()), etc. into # (sqlite3_free()). - # + # ^(If a memory allocation error occurs during the evaluation of any # of these routines, a default value is returned. The default value # is either the integer 0, the floating point number 0.0, or a NULL # pointer. Subsequent calls to (sqlite3_errcode()) will return # (SQLITE_NOMEM).)^ - # + # @method column_blob(stmt, i_col) - # @param [Stmt] stmt - # @param [Integer] i_col - # @return [FFI::Pointer(*Void)] + # @param [Stmt] stmt + # @param [Integer] i_col + # @return [FFI::Pointer(*Void)] # @scope class attach_function :column_blob, :sqlite3_column_blob, [Stmt, :int], :pointer - # (Not documented) - # + # @method column_bytes(stmt, i_col) - # @param [Stmt] stmt - # @param [Integer] i_col - # @return [Integer] + # @param [Stmt] stmt + # @param [Integer] i_col + # @return [Integer] # @scope class attach_function :column_bytes, :sqlite3_column_bytes, [Stmt, :int], :int - # (Not documented) - # + # @method column_bytes16(stmt, i_col) - # @param [Stmt] stmt - # @param [Integer] i_col - # @return [Integer] + # @param [Stmt] stmt + # @param [Integer] i_col + # @return [Integer] # @scope class attach_function :column_bytes16, :sqlite3_column_bytes16, [Stmt, :int], :int - # (Not documented) - # + # @method column_double(stmt, i_col) - # @param [Stmt] stmt - # @param [Integer] i_col - # @return [Float] + # @param [Stmt] stmt + # @param [Integer] i_col + # @return [Float] # @scope class attach_function :column_double, :sqlite3_column_double, [Stmt, :int], :double - # (Not documented) - # + # @method column_int(stmt, i_col) - # @param [Stmt] stmt - # @param [Integer] i_col - # @return [Integer] + # @param [Stmt] stmt + # @param [Integer] i_col + # @return [Integer] # @scope class attach_function :column_int, :sqlite3_column_int, [Stmt, :int], :int - # (Not documented) - # + # @method column_int64(stmt, i_col) - # @param [Stmt] stmt - # @param [Integer] i_col - # @return [Integer] + # @param [Stmt] stmt + # @param [Integer] i_col + # @return [Integer] # @scope class attach_function :column_int64, :sqlite3_column_int64, [Stmt, :int], :long_long - # (Not documented) - # + # @method column_text(stmt, i_col) - # @param [Stmt] stmt - # @param [Integer] i_col - # @return [FFI::Pointer(*UChar)] + # @param [Stmt] stmt + # @param [Integer] i_col + # @return [FFI::Pointer(*UChar)] # @scope class attach_function :column_text, :sqlite3_column_text, [Stmt, :int], :pointer - # (Not documented) - # + # @method column_text16(stmt, i_col) - # @param [Stmt] stmt - # @param [Integer] i_col - # @return [FFI::Pointer(*Void)] + # @param [Stmt] stmt + # @param [Integer] i_col + # @return [FFI::Pointer(*Void)] # @scope class attach_function :column_text16, :sqlite3_column_text16, [Stmt, :int], :pointer - # (Not documented) - # + # @method column_type(stmt, i_col) - # @param [Stmt] stmt - # @param [Integer] i_col - # @return [Integer] + # @param [Stmt] stmt + # @param [Integer] i_col + # @return [Integer] # @scope class attach_function :column_type, :sqlite3_column_type, [Stmt, :int], :int - # (Not documented) - # + # @method column_value(stmt, i_col) - # @param [Stmt] stmt - # @param [Integer] i_col - # @return [Mem] + # @param [Stmt] stmt + # @param [Integer] i_col + # @return [Mem] # @scope class attach_function :column_value, :sqlite3_column_value, [Stmt, :int], Mem - # CAPI3REF: Destroy A Prepared Statement Object - # + # ^The sqlite3_finalize() function is called to delete a (prepared statement). # ^If the most recent evaluation of the statement encountered no errors # or if the statement is never been evaluated, then sqlite3_finalize() returns # SQLITE_OK. ^If the most recent evaluation of statement S failed, then # sqlite3_finalize(S) returns the appropriate (error code) or # (extended error code). - # + # ^The sqlite3_finalize(S) routine can be called at any point during # the life cycle of (prepared statement) S: # before statement S is ever evaluated, after # one or more calls to (sqlite3_reset()), or after any call # to (sqlite3_step()) regardless of whether or not the statement has # completed execution. - # + # ^Invoking sqlite3_finalize() on a NULL pointer is a harmless no-op. - # + # The application must finalize every (prepared statement) in order to avoid # resource leaks. It is a grievous error for the application to try to use # a prepared statement after it has been finalized. Any use of a prepared # statement after it has been finalized can result in undefined and # undesirable behavior such as segfaults and heap corruption. - # + # @method finalize(p_stmt) - # @param [Stmt] p_stmt - # @return [Integer] + # @param [Stmt] p_stmt + # @return [Integer] # @scope class attach_function :finalize, :sqlite3_finalize, [Stmt], :int - # CAPI3REF: Reset A Prepared Statement Object - # + # The sqlite3_reset() function is called to reset a (prepared statement) # object back to its initial state, ready to be re-executed. # ^Any SQL statement variables that had values bound to them using # the (sqlite3_bind_blob | sqlite3_bind_*() API) retain their values. # Use (sqlite3_clear_bindings()) to reset the bindings. - # + # ^The (sqlite3_reset(S)) interface resets the (prepared statement) S # back to the beginning of its program. - # + # ^If the most recent call to (sqlite3_step(S)) for the # (prepared statement) S returned (SQLITE_ROW) or (SQLITE_DONE), # or if (sqlite3_step(S)) has never before been called on S, # then (sqlite3_reset(S)) returns (SQLITE_OK). - # + # ^If the most recent call to (sqlite3_step(S)) for the # (prepared statement) S indicated an error, then # (sqlite3_reset(S)) returns an appropriate (error code). - # + # ^The (sqlite3_reset(S)) interface does not change the values # of any (sqlite3_bind_blob|bindings) on the (prepared statement) S. - # + # @method reset(p_stmt) - # @param [Stmt] p_stmt - # @return [Integer] + # @param [Stmt] p_stmt + # @return [Integer] # @scope class attach_function :reset, :sqlite3_reset, [Stmt], :int - # CAPI3REF: Create Or Redefine SQL Functions # KEYWORDS: {function creation routines} # KEYWORDS: {application-defined SQL function} # KEYWORDS: {application-defined SQL functions} - # + # ^These functions (collectively known as "function creation routines") # are used to add SQL functions or aggregates or to redefine the behavior # of existing SQL functions or aggregates. The only differences between @@ -3712,19 +3625,19 @@ class Context < FFI::Struct # the second parameter (the name of the function being created) # and the presence or absence of a destructor callback for # the application data pointer. - # + # ^The first parameter is the (database connection) to which the SQL # function is to be added. ^If an application uses more than one database # connection then application-defined SQL functions must be added # to each database connection separately. - # + # ^The second parameter is the name of the SQL function to be created or # redefined. ^The length of the name is limited to 255 bytes in a UTF-8 # representation, exclusive of the zero-terminator. ^Note that the name # length limit is in UTF-8 bytes, not characters nor UTF-16 bytes. # ^Any attempt to create a function with a longer name # will result in (SQLITE_MISUSE) being returned. - # + # ^The third parameter (nArg) # is the number of arguments that the SQL function or # aggregate takes. ^If this parameter is -1, then the SQL function or @@ -3732,7 +3645,7 @@ class Context < FFI::Struct # set by (sqlite3_limit)((SQLITE_LIMIT_FUNCTION_ARG)). If the third # parameter is less than -1 or greater than 127 then the behavior is # undefined. - # + # ^The fourth parameter, eTextRep, specifies what # (SQLITE_UTF8 | text encoding) this SQL function prefers for # its parameters. Every SQL function implementation must be able to work @@ -3744,10 +3657,10 @@ class Context < FFI::Struct # will pick the one that involves the least amount of data conversion. # If there is only a single implementation which does not care what text # encoding is used, then the fourth argument should be (SQLITE_ANY). - # + # ^(The fifth parameter is an arbitrary pointer. The implementation of the # function can gain access to this pointer using (sqlite3_user_data()).)^ - # + # ^The sixth, seventh and eighth parameters, xFunc, xStep and xFinal, are # pointers to C-language functions that implement the SQL function or # aggregate. ^A scalar SQL function requires an implementation of the xFunc @@ -3756,7 +3669,7 @@ class Context < FFI::Struct # and xFinal and NULL pointer must be passed for xFunc. ^To delete an existing # SQL function or aggregate, pass NULL pointers for all three function # callbacks. - # + # ^(If the ninth parameter to sqlite3_create_function_v2() is not NULL, # then it is destructor for the application data pointer. # The destructor is invoked when the function is deleted, either by being @@ -3766,7 +3679,7 @@ class Context < FFI::Struct # ^When the destructor callback of the tenth parameter is invoked, it # is passed a single argument which is a copy of the application data # pointer which was the fifth parameter to sqlite3_create_function_v2(). - # + # ^It is permitted to register multiple implementations of the same # functions with the same name but with either differing numbers of # arguments or differing preferred text encodings. ^SQLite will use @@ -3779,120 +3692,111 @@ class Context < FFI::Struct # ^A function where the encoding difference is between UTF16le and UTF16be # is a closer match than a function where the encoding difference is # between UTF8 and UTF16. - # + # ^Built-in functions may be overloaded by new application-defined functions. - # + # ^An application-defined function is permitted to call other # SQLite interfaces. However, such calls must not # close the database connection nor finalize or reset the prepared # statement in which the function is running. - # + # @method create_function(db, z_function_name, n_arg, e_text_rep, p_app, x_func, x_step, x_final) - # @param [Sqlite3] db - # @param [String] z_function_name - # @param [Integer] n_arg - # @param [Integer] e_text_rep - # @param [FFI::Pointer(*Void)] p_app - # @param [FFI::Pointer(*)] x_func - # @param [FFI::Pointer(*)] x_step - # @param [FFI::Pointer(*)] x_final - # @return [Integer] + # @param [Sqlite3] db + # @param [String] z_function_name + # @param [Integer] n_arg + # @param [Integer] e_text_rep + # @param [FFI::Pointer(*Void)] p_app + # @param [FFI::Pointer(*FunctionProto)] x_func + # @param [FFI::Pointer(*FunctionProto)] x_step + # @param [FFI::Pointer(*FunctionProto)] x_final + # @return [Integer] # @scope class attach_function :create_function, :sqlite3_create_function, [Sqlite3, :string, :int, :int, :pointer, :pointer, :pointer, :pointer], :int - # (Not documented) - # + # @method create_function16(db, z_function_name, n_arg, e_text_rep, p_app, x_func, x_step, x_final) - # @param [Sqlite3] db - # @param [FFI::Pointer(*Void)] z_function_name - # @param [Integer] n_arg - # @param [Integer] e_text_rep - # @param [FFI::Pointer(*Void)] p_app - # @param [FFI::Pointer(*)] x_func - # @param [FFI::Pointer(*)] x_step - # @param [FFI::Pointer(*)] x_final - # @return [Integer] + # @param [Sqlite3] db + # @param [FFI::Pointer(*Void)] z_function_name + # @param [Integer] n_arg + # @param [Integer] e_text_rep + # @param [FFI::Pointer(*Void)] p_app + # @param [FFI::Pointer(*FunctionProto)] x_func + # @param [FFI::Pointer(*FunctionProto)] x_step + # @param [FFI::Pointer(*FunctionProto)] x_final + # @return [Integer] # @scope class attach_function :create_function16, :sqlite3_create_function16, [Sqlite3, :pointer, :int, :int, :pointer, :pointer, :pointer, :pointer], :int - # (Not documented) - # + # @method create_function_v2(db, z_function_name, n_arg, e_text_rep, p_app, x_func, x_step, x_final, x_destroy) - # @param [Sqlite3] db - # @param [String] z_function_name - # @param [Integer] n_arg - # @param [Integer] e_text_rep - # @param [FFI::Pointer(*Void)] p_app - # @param [FFI::Pointer(*)] x_func - # @param [FFI::Pointer(*)] x_step - # @param [FFI::Pointer(*)] x_final - # @param [FFI::Pointer(*)] x_destroy - # @return [Integer] + # @param [Sqlite3] db + # @param [String] z_function_name + # @param [Integer] n_arg + # @param [Integer] e_text_rep + # @param [FFI::Pointer(*Void)] p_app + # @param [FFI::Pointer(*FunctionProto)] x_func + # @param [FFI::Pointer(*FunctionProto)] x_step + # @param [FFI::Pointer(*FunctionProto)] x_final + # @param [FFI::Pointer(*FunctionProto)] x_destroy + # @return [Integer] # @scope class attach_function :create_function_v2, :sqlite3_create_function_v2, [Sqlite3, :string, :int, :int, :pointer, :pointer, :pointer, :pointer, :pointer], :int - # CAPI3REF: Deprecated Functions # DEPRECATED - # + # These functions are (deprecated). In order to maintain # backwards compatibility with older code, these functions continue # to be supported. However, new applications should avoid # the use of these functions. To help encourage people to avoid # using these functions, we are not going to tell you what they do. - # + # @method aggregate_count(context) - # @param [Context] context - # @return [Integer] + # @param [Context] context + # @return [Integer] # @scope class attach_function :aggregate_count, :sqlite3_aggregate_count, [Context], :int - # (Not documented) - # + # @method expired(stmt) - # @param [Stmt] stmt - # @return [Integer] + # @param [Stmt] stmt + # @return [Integer] # @scope class attach_function :expired, :sqlite3_expired, [Stmt], :int - # (Not documented) - # + # @method transfer_bindings(stmt, stmt) - # @param [Stmt] stmt - # @param [Stmt] stmt - # @return [Integer] + # @param [Stmt] stmt + # @param [Stmt] stmt + # @return [Integer] # @scope class attach_function :transfer_bindings, :sqlite3_transfer_bindings, [Stmt, Stmt], :int - # (Not documented) - # + # @method global_recover() - # @return [Integer] + # @return [Integer] # @scope class attach_function :global_recover, :sqlite3_global_recover, [], :int - # (Not documented) - # + # @method thread_cleanup() - # @return [nil] + # @return [nil] # @scope class attach_function :thread_cleanup, :sqlite3_thread_cleanup, [], :void - # (Not documented) - # - # @method memory_alarm(, void, long_long) - # @param [FFI::Pointer(*)] - # @param [FFI::Pointer(*Void)] void - # @param [Integer] long_long - # @return [Integer] + + # @method memory_alarm(functionproto, void, long_long) + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @param [FFI::Pointer(*Void)] void + # @param [Integer] long_long + # @return [Integer] # @scope class attach_function :memory_alarm, :sqlite3_memory_alarm, [:pointer, :pointer, :long_long], :int - # CAPI3REF: Obtaining SQL Function Parameter Values - # + # The C-language implementation of SQL functions and aggregates uses # this set of interface routines to access the parameter values on # the function or aggregate. - # + # The xFunc (for scalar functions) or xStep (for aggregates) parameters # to (sqlite3_create_function()) and (sqlite3_create_function16()) # define callbacks that implement the SQL functions and aggregates. @@ -3900,20 +3804,20 @@ class Context < FFI::Struct # (protected sqlite3_value) objects. There is one (sqlite3_value) object for # each parameter to the SQL function. These routines are used to # extract values from the (sqlite3_value) objects. - # + # These routines work only with (protected sqlite3_value) objects. # Any attempt to use these routines on an (unprotected sqlite3_value) # object results in undefined behavior. - # + # ^These routines work just like the corresponding (column access functions) # except that these routines take a single (protected sqlite3_value) object # pointer instead of a (sqlite3_stmt*) pointer and an integer column number. - # + # ^The sqlite3_value_text16() interface extracts a UTF-16 string # in the native byte-order of the host machine. ^The # sqlite3_value_text16be() and sqlite3_value_text16le() interfaces # extract UTF-16 strings as big-endian and little-endian respectively. - # + # ^(The sqlite3_value_numeric_type() interface attempts to apply # numeric affinity to the value. This means that an attempt is # made to convert the value to an integer or floating point. If @@ -3921,115 +3825,103 @@ class Context < FFI::Struct # words, if the value is a string that looks like a number) # then the conversion is performed. Otherwise no conversion occurs. # The (SQLITE_INTEGER | datatype) after conversion is returned.)^ - # + # Please pay particular attention to the fact that the pointer returned # from (sqlite3_value_blob()), (sqlite3_value_text()), or # (sqlite3_value_text16()) can be invalidated by a subsequent call to # (sqlite3_value_bytes()), (sqlite3_value_bytes16()), (sqlite3_value_text()), # or (sqlite3_value_text16()). - # + # These routines must be called from the same thread as # the SQL function that supplied the (sqlite3_value*) parameters. - # + # @method value_blob(mem) - # @param [Mem] mem - # @return [FFI::Pointer(*Void)] + # @param [Mem] mem + # @return [FFI::Pointer(*Void)] # @scope class attach_function :value_blob, :sqlite3_value_blob, [Mem], :pointer - # (Not documented) - # + # @method value_bytes(mem) - # @param [Mem] mem - # @return [Integer] + # @param [Mem] mem + # @return [Integer] # @scope class attach_function :value_bytes, :sqlite3_value_bytes, [Mem], :int - # (Not documented) - # + # @method value_bytes16(mem) - # @param [Mem] mem - # @return [Integer] + # @param [Mem] mem + # @return [Integer] # @scope class attach_function :value_bytes16, :sqlite3_value_bytes16, [Mem], :int - # (Not documented) - # + # @method value_double(mem) - # @param [Mem] mem - # @return [Float] + # @param [Mem] mem + # @return [Float] # @scope class attach_function :value_double, :sqlite3_value_double, [Mem], :double - # (Not documented) - # + # @method value_int(mem) - # @param [Mem] mem - # @return [Integer] + # @param [Mem] mem + # @return [Integer] # @scope class attach_function :value_int, :sqlite3_value_int, [Mem], :int - # (Not documented) - # + # @method value_int64(mem) - # @param [Mem] mem - # @return [Integer] + # @param [Mem] mem + # @return [Integer] # @scope class attach_function :value_int64, :sqlite3_value_int64, [Mem], :long_long - # (Not documented) - # + # @method value_text(mem) - # @param [Mem] mem - # @return [FFI::Pointer(*UChar)] + # @param [Mem] mem + # @return [FFI::Pointer(*UChar)] # @scope class attach_function :value_text, :sqlite3_value_text, [Mem], :pointer - # (Not documented) - # + # @method value_text16(mem) - # @param [Mem] mem - # @return [FFI::Pointer(*Void)] + # @param [Mem] mem + # @return [FFI::Pointer(*Void)] # @scope class attach_function :value_text16, :sqlite3_value_text16, [Mem], :pointer - # (Not documented) - # + # @method value_text16le(mem) - # @param [Mem] mem - # @return [FFI::Pointer(*Void)] + # @param [Mem] mem + # @return [FFI::Pointer(*Void)] # @scope class attach_function :value_text16le, :sqlite3_value_text16le, [Mem], :pointer - # (Not documented) - # + # @method value_text16be(mem) - # @param [Mem] mem - # @return [FFI::Pointer(*Void)] + # @param [Mem] mem + # @return [FFI::Pointer(*Void)] # @scope class attach_function :value_text16be, :sqlite3_value_text16be, [Mem], :pointer - # (Not documented) - # + # @method value_type(mem) - # @param [Mem] mem - # @return [Integer] + # @param [Mem] mem + # @return [Integer] # @scope class attach_function :value_type, :sqlite3_value_type, [Mem], :int - # (Not documented) - # + # @method value_numeric_type(mem) - # @param [Mem] mem - # @return [Integer] + # @param [Mem] mem + # @return [Integer] # @scope class attach_function :value_numeric_type, :sqlite3_value_numeric_type, [Mem], :int - # CAPI3REF: Obtain Aggregate Function Context - # + # Implementations of aggregate SQL functions use this # routine to allocate memory for storing their state. - # + # ^The first time the sqlite3_aggregate_context(C,N) routine is called # for a particular aggregate function, SQLite # allocates N of memory, zeroes out that memory, and returns a pointer @@ -4042,67 +3934,64 @@ class Context < FFI::Struct # implementation is never called and xFinal() is called exactly once. # In those cases, sqlite3_aggregate_context() might be called for the # first time from within xFinal().)^ - # + # ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer if N is # less than or equal to zero or if a memory allocate error occurs. - # + # ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is # determined by the N parameter on first successful call. Changing the # value of N in subsequent call to sqlite3_aggregate_context() within # the same aggregate function instance will not resize the memory # allocation.)^ - # + # ^SQLite automatically frees the memory allocated by # sqlite3_aggregate_context() when the aggregate query concludes. - # + # The first parameter must be a copy of the # (sqlite3_context | SQL function context) that is the first parameter # to the xStep or xFinal callback routine that implements the aggregate # function. - # + # This routine must be called from the same thread in which # the aggregate SQL function is running. - # + # @method aggregate_context(context, n_bytes) - # @param [Context] context - # @param [Integer] n_bytes - # @return [FFI::Pointer(*Void)] + # @param [Context] context + # @param [Integer] n_bytes + # @return [FFI::Pointer(*Void)] # @scope class attach_function :aggregate_context, :sqlite3_aggregate_context, [Context, :int], :pointer - # CAPI3REF: User Data For Functions - # + # ^The sqlite3_user_data() interface returns a copy of # the pointer that was the pUserData parameter (the 5th parameter) # of the (sqlite3_create_function()) # and (sqlite3_create_function16()) routines that originally # registered the application defined function. - # + # This routine must be called from the same thread in which # the application-defined function is running. - # + # @method user_data(context) - # @param [Context] context - # @return [FFI::Pointer(*Void)] + # @param [Context] context + # @return [FFI::Pointer(*Void)] # @scope class attach_function :user_data, :sqlite3_user_data, [Context], :pointer - # CAPI3REF: Database Connection For Functions - # + # ^The sqlite3_context_db_handle() interface returns a copy of # the pointer to the (database connection) (the 1st parameter) # of the (sqlite3_create_function()) # and (sqlite3_create_function16()) routines that originally # registered the application defined function. - # + # @method context_db_handle(context) - # @param [Context] context - # @return [Sqlite3] + # @param [Context] context + # @return [Sqlite3] # @scope class attach_function :context_db_handle, :sqlite3_context_db_handle, [Context], Sqlite3 - # CAPI3REF: Function Auxiliary Data - # + # The following two functions may be used by scalar SQL functions to # associate metadata with argument values. If the same value is passed to # multiple invocations of the same SQL function during query execution, under @@ -4113,14 +4002,14 @@ class Context < FFI::Struct # pattern. The compiled regular expression can be reused on multiple # invocations of the same function so that the original pattern string # does not need to be recompiled on each invocation. - # + # ^The sqlite3_get_auxdata() interface returns a pointer to the metadata # associated by the sqlite3_set_auxdata() function with the Nth argument # value to the application-defined function. ^If no metadata has been ever # been set for the Nth argument of the function, or if the corresponding # function parameter has changed since the meta-data was set, # then sqlite3_get_auxdata() returns a NULL pointer. - # + # ^The sqlite3_set_auxdata() interface saves the metadata # pointed to by its 3rd parameter as the metadata for the N-th # argument of the application-defined function. Subsequent @@ -4130,60 +4019,58 @@ class Context < FFI::Struct # function given by the 4th parameter to sqlite3_set_auxdata() on # the metadata when the corresponding function parameter changes # or when the SQL statement completes, whichever comes first. - # + # SQLite is free to call the destructor and drop metadata on any # parameter of any function at any time. ^The only guarantee is that # the destructor will be called before the metadata is dropped. - # + # ^(In practice, metadata is preserved between function calls for # expressions that are constant at compile time. This includes literal # values and (parameters).)^ - # + # These routines must be called from the same thread in which # the SQL function is running. - # + # @method get_auxdata(context, n) - # @param [Context] context - # @param [Integer] n - # @return [FFI::Pointer(*Void)] + # @param [Context] context + # @param [Integer] n + # @return [FFI::Pointer(*Void)] # @scope class attach_function :get_auxdata, :sqlite3_get_auxdata, [Context, :int], :pointer - # (Not documented) - # - # @method set_auxdata(context, n, void, ) - # @param [Context] context - # @param [Integer] n - # @param [FFI::Pointer(*Void)] void - # @param [FFI::Pointer(*)] - # @return [nil] + + # @method set_auxdata(context, n, void, functionproto) + # @param [Context] context + # @param [Integer] n + # @param [FFI::Pointer(*Void)] void + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @return [nil] # @scope class attach_function :set_auxdata, :sqlite3_set_auxdata, [Context, :int, :pointer, :pointer], :void - # CAPI3REF: Setting The Result Of An SQL Function - # + # These routines are used by the xFunc or xFinal callbacks that # implement SQL functions and aggregates. See # (sqlite3_create_function()) and (sqlite3_create_function16()) # for additional information. - # + # These functions work very much like the (parameter binding) family of # functions used to bind values to host parameters in prepared statements. # Refer to the (SQL parameter) documentation for additional information. - # + # ^The sqlite3_result_blob() interface sets the result from # an application-defined function to be the BLOB whose content is pointed # to by the second parameter and which is N bytes long where N is the # third parameter. - # + # ^The sqlite3_result_zeroblob() interfaces set the result of # the application-defined function to be a BLOB containing all zero # bytes and N bytes in size, where N is the value of the 2nd parameter. - # + # ^The sqlite3_result_double() interface sets the result from # an application-defined function to be a floating point value specified # by its 2nd argument. - # + # ^The sqlite3_result_error() and sqlite3_result_error16() functions # cause the implemented SQL function to throw an exception. # ^SQLite uses the string pointed to by the @@ -4205,23 +4092,23 @@ class Context < FFI::Struct # returned by SQLite as a result of an error in a function. ^By default, # the error code is SQLITE_ERROR. ^A subsequent call to sqlite3_result_error() # or sqlite3_result_error16() resets the error code to SQLITE_ERROR. - # + # ^The sqlite3_result_toobig() interface causes SQLite to throw an error # indicating that a string or BLOB is too long to represent. - # + # ^The sqlite3_result_nomem() interface causes SQLite to throw an error # indicating that a memory allocation failed. - # + # ^The sqlite3_result_int() interface sets the return value # of the application-defined function to be the 32-bit signed integer # value given in the 2nd argument. # ^The sqlite3_result_int64() interface sets the return value # of the application-defined function to be the 64-bit signed integer # value given in the 2nd argument. - # + # ^The sqlite3_result_null() interface sets the return value # of the application-defined function to be NULL. - # + # ^The sqlite3_result_text(), sqlite3_result_text16(), # sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces # set the return value of the application-defined function to be @@ -4254,7 +4141,7 @@ class Context < FFI::Struct # or sqlite3_result_blob is the special constant SQLITE_TRANSIENT # then SQLite makes a copy of the result into space obtained from # from (sqlite3_malloc()) before it returns. - # + # ^The sqlite3_result_value() interface sets the result of # the application-defined function to be a copy the # (unprotected sqlite3_value) object specified by the 2nd parameter. ^The @@ -4264,173 +4151,157 @@ class Context < FFI::Struct # ^A (protected sqlite3_value) object may always be used where an # (unprotected sqlite3_value) object is required, so either # kind of (sqlite3_value) object can be used with this interface. - # + # If these routines are called from within the different thread # than the one containing the application-defined function that received # the (sqlite3_context) pointer, the results are undefined. - # - # @method result_blob(context, void, int, ) - # @param [Context] context - # @param [FFI::Pointer(*Void)] void - # @param [Integer] int - # @param [FFI::Pointer(*)] - # @return [nil] + + # @method result_blob(context, void, int, functionproto) + # @param [Context] context + # @param [FFI::Pointer(*Void)] void + # @param [Integer] int + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @return [nil] # @scope class attach_function :result_blob, :sqlite3_result_blob, [Context, :pointer, :int, :pointer], :void - # (Not documented) - # + # @method result_double(context, double) - # @param [Context] context - # @param [Float] double - # @return [nil] + # @param [Context] context + # @param [Float] double + # @return [nil] # @scope class attach_function :result_double, :sqlite3_result_double, [Context, :double], :void - # (Not documented) - # + # @method result_error(context, string, int) - # @param [Context] context - # @param [String] string - # @param [Integer] int - # @return [nil] + # @param [Context] context + # @param [String] string + # @param [Integer] int + # @return [nil] # @scope class attach_function :result_error, :sqlite3_result_error, [Context, :string, :int], :void - # (Not documented) - # + # @method result_error16(context, void, int) - # @param [Context] context - # @param [FFI::Pointer(*Void)] void - # @param [Integer] int - # @return [nil] + # @param [Context] context + # @param [FFI::Pointer(*Void)] void + # @param [Integer] int + # @return [nil] # @scope class attach_function :result_error16, :sqlite3_result_error16, [Context, :pointer, :int], :void - # (Not documented) - # + # @method result_error_toobig(context) - # @param [Context] context - # @return [nil] + # @param [Context] context + # @return [nil] # @scope class attach_function :result_error_toobig, :sqlite3_result_error_toobig, [Context], :void - # (Not documented) - # + # @method result_error_nomem(context) - # @param [Context] context - # @return [nil] + # @param [Context] context + # @return [nil] # @scope class attach_function :result_error_nomem, :sqlite3_result_error_nomem, [Context], :void - # (Not documented) - # + # @method result_error_code(context, int) - # @param [Context] context - # @param [Integer] int - # @return [nil] + # @param [Context] context + # @param [Integer] int + # @return [nil] # @scope class attach_function :result_error_code, :sqlite3_result_error_code, [Context, :int], :void - # (Not documented) - # + # @method result_int(context, int) - # @param [Context] context - # @param [Integer] int - # @return [nil] + # @param [Context] context + # @param [Integer] int + # @return [nil] # @scope class attach_function :result_int, :sqlite3_result_int, [Context, :int], :void - # (Not documented) - # + # @method result_int64(context, long_long) - # @param [Context] context - # @param [Integer] long_long - # @return [nil] + # @param [Context] context + # @param [Integer] long_long + # @return [nil] # @scope class attach_function :result_int64, :sqlite3_result_int64, [Context, :long_long], :void - # (Not documented) - # + # @method result_null(context) - # @param [Context] context - # @return [nil] + # @param [Context] context + # @return [nil] # @scope class attach_function :result_null, :sqlite3_result_null, [Context], :void - # (Not documented) - # - # @method result_text(context, string, int, ) - # @param [Context] context - # @param [String] string - # @param [Integer] int - # @param [FFI::Pointer(*)] - # @return [nil] + + # @method result_text(context, string, int, functionproto) + # @param [Context] context + # @param [String] string + # @param [Integer] int + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @return [nil] # @scope class attach_function :result_text, :sqlite3_result_text, [Context, :string, :int, :pointer], :void - # (Not documented) - # - # @method result_text16(context, void, int, ) - # @param [Context] context - # @param [FFI::Pointer(*Void)] void - # @param [Integer] int - # @param [FFI::Pointer(*)] - # @return [nil] + + # @method result_text16(context, void, int, functionproto) + # @param [Context] context + # @param [FFI::Pointer(*Void)] void + # @param [Integer] int + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @return [nil] # @scope class attach_function :result_text16, :sqlite3_result_text16, [Context, :pointer, :int, :pointer], :void - # (Not documented) - # - # @method result_text16le(context, void, int, ) - # @param [Context] context - # @param [FFI::Pointer(*Void)] void - # @param [Integer] int - # @param [FFI::Pointer(*)] - # @return [nil] + + # @method result_text16le(context, void, int, functionproto) + # @param [Context] context + # @param [FFI::Pointer(*Void)] void + # @param [Integer] int + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @return [nil] # @scope class attach_function :result_text16le, :sqlite3_result_text16le, [Context, :pointer, :int, :pointer], :void - # (Not documented) - # - # @method result_text16be(context, void, int, ) - # @param [Context] context - # @param [FFI::Pointer(*Void)] void - # @param [Integer] int - # @param [FFI::Pointer(*)] - # @return [nil] + + # @method result_text16be(context, void, int, functionproto) + # @param [Context] context + # @param [FFI::Pointer(*Void)] void + # @param [Integer] int + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @return [nil] # @scope class attach_function :result_text16be, :sqlite3_result_text16be, [Context, :pointer, :int, :pointer], :void - # (Not documented) - # + # @method result_value(context, mem) - # @param [Context] context - # @param [Mem] mem - # @return [nil] + # @param [Context] context + # @param [Mem] mem + # @return [nil] # @scope class attach_function :result_value, :sqlite3_result_value, [Context, Mem], :void - # (Not documented) - # + # @method result_zeroblob(context, n) - # @param [Context] context - # @param [Integer] n - # @return [nil] + # @param [Context] context + # @param [Integer] n + # @return [nil] # @scope class attach_function :result_zeroblob, :sqlite3_result_zeroblob, [Context, :int], :void - # CAPI3REF: Define New Collating Sequences - # + # ^These functions add, remove, or modify a (collation) associated # with the (database connection) specified as the first argument. - # + # ^The name of the collation is a UTF-8 string # for sqlite3_create_collation() and sqlite3_create_collation_v2() # and a UTF-16 string in native byte order for sqlite3_create_collation16(). # ^Collation names that compare equal according to (sqlite3_strnicmp()) are # considered to be the same name. - # + # ^(The third argument (eTextRep) must be one of the constants: #
    #
  • (SQLITE_UTF8), @@ -4445,10 +4316,10 @@ class Context < FFI::Struct # force strings to be UTF16 with native byte order. # ^The (SQLITE_UTF16_ALIGNED) value for eTextRep forces strings to begin # on an even byte address. - # + # ^The fourth argument, pArg, is an application data pointer that is passed # through as the first argument to the collating function callback. - # + # ^The fifth argument, xCallback, is a pointer to the collating function. # ^Multiple collating functions can be registered using the same name but # with different eTextRep parameters and SQLite will use whichever @@ -4456,7 +4327,7 @@ class Context < FFI::Struct # ^If the xCallback argument is NULL then the collating function is # deleted. ^When all collating functions having the same name are deleted, # that collation is no longer usable. - # + # ^The collating function callback is invoked with a copy of the pArg # application data pointer and with two strings in the encoding specified # by the eTextRep argument. The collating function must return an @@ -4468,25 +4339,25 @@ class Context < FFI::Struct # must give an equivalent answer when invoked with equivalent strings. # The collating function must obey the following properties for all # strings A, B, and C: - # + #
      #
    1. If A==B then B==A. #
    2. If A==B and B==C then A==C. #
    3. If A<B THEN B>A. #
    4. If A<B and B<C then A<C. #
    - # + # If a collating function fails any of the above constraints and that # collating function is registered and used, then the behavior of SQLite # is undefined. - # + # ^The sqlite3_create_collation_v2() works like sqlite3_create_collation() # with the addition that the xDestroy callback is invoked on pArg when # the collating function is deleted. # ^Collating functions are deleted when they are overridden by later # calls to the collation creation functions or when the # (database connection) is closed using (sqlite3_close()). - # + # ^The xDestroy callback is not called if the # sqlite3_create_collation_v2() function fails. Applications that invoke # sqlite3_create_collation_v2() with a non-NULL xDestroy argument should @@ -4495,57 +4366,54 @@ class Context < FFI::Struct # This is different from every other SQLite interface. The inconsistency # is unfortunate but cannot be changed without breaking backwards # compatibility. - # + # See also: (sqlite3_collation_needed()) and (sqlite3_collation_needed16()). - # + # @method create_collation(sqlite3, z_name, e_text_rep, p_arg, x_compare) - # @param [Sqlite3] sqlite3 - # @param [String] z_name - # @param [Integer] e_text_rep - # @param [FFI::Pointer(*Void)] p_arg - # @param [FFI::Pointer(*)] x_compare - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @param [String] z_name + # @param [Integer] e_text_rep + # @param [FFI::Pointer(*Void)] p_arg + # @param [FFI::Pointer(*FunctionProto)] x_compare + # @return [Integer] # @scope class attach_function :create_collation, :sqlite3_create_collation, [Sqlite3, :string, :int, :pointer, :pointer], :int - # (Not documented) - # + # @method create_collation_v2(sqlite3, z_name, e_text_rep, p_arg, x_compare, x_destroy) - # @param [Sqlite3] sqlite3 - # @param [String] z_name - # @param [Integer] e_text_rep - # @param [FFI::Pointer(*Void)] p_arg - # @param [FFI::Pointer(*)] x_compare - # @param [FFI::Pointer(*)] x_destroy - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @param [String] z_name + # @param [Integer] e_text_rep + # @param [FFI::Pointer(*Void)] p_arg + # @param [FFI::Pointer(*FunctionProto)] x_compare + # @param [FFI::Pointer(*FunctionProto)] x_destroy + # @return [Integer] # @scope class attach_function :create_collation_v2, :sqlite3_create_collation_v2, [Sqlite3, :string, :int, :pointer, :pointer, :pointer], :int - # (Not documented) - # + # @method create_collation16(sqlite3, z_name, e_text_rep, p_arg, x_compare) - # @param [Sqlite3] sqlite3 - # @param [FFI::Pointer(*Void)] z_name - # @param [Integer] e_text_rep - # @param [FFI::Pointer(*Void)] p_arg - # @param [FFI::Pointer(*)] x_compare - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @param [FFI::Pointer(*Void)] z_name + # @param [Integer] e_text_rep + # @param [FFI::Pointer(*Void)] p_arg + # @param [FFI::Pointer(*FunctionProto)] x_compare + # @return [Integer] # @scope class attach_function :create_collation16, :sqlite3_create_collation16, [Sqlite3, :pointer, :int, :pointer, :pointer], :int - # CAPI3REF: Collation Needed Callbacks - # + # ^To avoid having to register all collation sequences before a database # can be used, a single callback function may be registered with the # (database connection) to be invoked whenever an undefined collation # sequence is required. - # + # ^If the function is registered using the sqlite3_collation_needed() API, # then it is passed the names of undefined collation sequences as strings # encoded in UTF-8. ^If sqlite3_collation_needed16() is used, # the names are passed as UTF-16 in machine native byte order. # ^A call to either function replaces the existing collation-needed callback. - # + # ^(When the callback is invoked, the first argument passed is a copy # of the second argument to sqlite3_collation_needed() or # sqlite3_collation_needed16(). The second argument is the database @@ -4553,113 +4421,107 @@ class Context < FFI::Struct # or (SQLITE_UTF16LE), indicating the most desirable form of the collation # sequence function required. The fourth parameter is the name of the # required collation sequence.)^ - # + # The callback function should register the desired collation using # (sqlite3_create_collation()), (sqlite3_create_collation16()), or # (sqlite3_create_collation_v2()). - # - # @method collation_needed(sqlite3, void, ) - # @param [Sqlite3] sqlite3 - # @param [FFI::Pointer(*Void)] void - # @param [FFI::Pointer(*)] - # @return [Integer] + + # @method collation_needed(sqlite3, void, functionproto) + # @param [Sqlite3] sqlite3 + # @param [FFI::Pointer(*Void)] void + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @return [Integer] # @scope class attach_function :collation_needed, :sqlite3_collation_needed, [Sqlite3, :pointer, :pointer], :int - # (Not documented) - # - # @method collation_needed16(sqlite3, void, ) - # @param [Sqlite3] sqlite3 - # @param [FFI::Pointer(*Void)] void - # @param [FFI::Pointer(*)] - # @return [Integer] + + # @method collation_needed16(sqlite3, void, functionproto) + # @param [Sqlite3] sqlite3 + # @param [FFI::Pointer(*Void)] void + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @return [Integer] # @scope class attach_function :collation_needed16, :sqlite3_collation_needed16, [Sqlite3, :pointer, :pointer], :int - # CAPI3REF: Suspend Execution For A Short Time - # + # The sqlite3_sleep() function causes the current thread to suspend execution # for at least a number of milliseconds specified in its parameter. - # + # If the operating system does not support sleep requests with # millisecond time resolution, then the time will be rounded up to # the nearest second. The number of milliseconds of sleep actually # requested from the operating system is returned. - # + # ^SQLite implements this interface by calling the xSleep() # method of the default (sqlite3_vfs) object. If the xSleep() method # of the default VFS is not implemented correctly, or not implemented at # all, then the behavior of sqlite3_sleep() may deviate from the description # in the previous paragraphs. - # + # @method sleep(int) - # @param [Integer] int - # @return [Integer] + # @param [Integer] int + # @return [Integer] # @scope class attach_function :sleep, :sqlite3_sleep, [:int], :int - # CAPI3REF: Test For Auto-Commit Mode # KEYWORDS: {autocommit mode} - # + # ^The sqlite3_get_autocommit() interface returns non-zero or # zero if the given database connection is or is not in autocommit mode, # respectively. ^Autocommit mode is on by default. # ^Autocommit mode is disabled by a (BEGIN) statement. # ^Autocommit mode is re-enabled by a (COMMIT) or (ROLLBACK). - # + # If certain kinds of errors occur on a statement within a multi-statement # transaction (errors including (SQLITE_FULL), (SQLITE_IOERR), # (SQLITE_NOMEM), (SQLITE_BUSY), and (SQLITE_INTERRUPT)) then the # transaction might be rolled back automatically. The only way to # find out whether SQLite automatically rolled back the transaction after # an error is to use this function. - # + # If another thread changes the autocommit status of the database # connection while this routine is running, then the return value # is undefined. - # + # @method get_autocommit(sqlite3) - # @param [Sqlite3] sqlite3 - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @return [Integer] # @scope class attach_function :get_autocommit, :sqlite3_get_autocommit, [Sqlite3], :int - # CAPI3REF: Find The Database Handle Of A Prepared Statement - # + # ^The sqlite3_db_handle interface returns the (database connection) handle # to which a (prepared statement) belongs. ^The (database connection) # returned by sqlite3_db_handle is the same (database connection) # that was the first argument # to the (sqlite3_prepare_v2()) call (or its variants) that was used to # create the statement in the first place. - # + # @method db_handle(stmt) - # @param [Stmt] stmt - # @return [Sqlite3] + # @param [Stmt] stmt + # @return [Sqlite3] # @scope class attach_function :db_handle, :sqlite3_db_handle, [Stmt], Sqlite3 - # CAPI3REF: Find the next prepared statement - # + # ^This interface returns a pointer to the next (prepared statement) after # pStmt associated with the (database connection) pDb. ^If pStmt is NULL # then this interface returns a pointer to the first prepared statement # associated with the database connection pDb. ^If no prepared statement # satisfies the conditions of this routine, it returns NULL. - # + # The (database connection) pointer D in a call to # (sqlite3_next_stmt(D,S)) must refer to an open database # connection and in particular must not be a NULL pointer. - # + # @method next_stmt(p_db, p_stmt) - # @param [Sqlite3] p_db - # @param [Stmt] p_stmt - # @return [Stmt] + # @param [Sqlite3] p_db + # @param [Stmt] p_stmt + # @return [Stmt] # @scope class attach_function :next_stmt, :sqlite3_next_stmt, [Sqlite3, Stmt], Stmt - # CAPI3REF: Commit And Rollback Notification Callbacks - # + # ^The sqlite3_commit_hook() interface registers a callback # function to be invoked whenever a transaction is (COMMIT | committed). # ^Any callback set by a previous call to sqlite3_commit_hook() @@ -4671,12 +4533,12 @@ class Context < FFI::Struct # ^The pArg argument is passed through to the callback. # ^If the callback on a commit hook function returns non-zero, # then the commit is converted into a rollback. - # + # ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions # return the P argument from the previous call of the same function # on the same (database connection) D, or NULL for # the first call for each function on D. - # + # The callback implementation must not do anything that will modify # the database connection that invoked the callback. Any actions # to modify the database connection must be deferred until after the @@ -4684,49 +4546,47 @@ class Context < FFI::Struct # or rollback hook in the first place. # Note that (sqlite3_prepare_v2()) and (sqlite3_step()) both modify their # database connections for the meaning of "modify" in this paragraph. - # + # ^Registering a NULL function disables the callback. - # + # ^When the commit hook callback routine returns zero, the (COMMIT) # operation is allowed to continue normally. ^If the commit hook # returns non-zero, then the (COMMIT) is converted into a (ROLLBACK). # ^The rollback hook is invoked on a rollback that results from a commit # hook returning non-zero, just as it would be with any other rollback. - # + # ^For the purposes of this API, a transaction is said to have been # rolled back if an explicit "ROLLBACK" statement is executed, or # an error or constraint causes an implicit rollback to occur. # ^The rollback callback is not invoked if a transaction is # automatically rolled back because the database connection is closed. - # + # See also the (sqlite3_update_hook()) interface. - # - # @method commit_hook(sqlite3, , void) - # @param [Sqlite3] sqlite3 - # @param [FFI::Pointer(*)] - # @param [FFI::Pointer(*Void)] void - # @return [FFI::Pointer(*Void)] + + # @method commit_hook(sqlite3, functionproto, void) + # @param [Sqlite3] sqlite3 + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @param [FFI::Pointer(*Void)] void + # @return [FFI::Pointer(*Void)] # @scope class attach_function :commit_hook, :sqlite3_commit_hook, [Sqlite3, :pointer, :pointer], :pointer - # (Not documented) - # - # @method rollback_hook(sqlite3, , void) - # @param [Sqlite3] sqlite3 - # @param [FFI::Pointer(*)] - # @param [FFI::Pointer(*Void)] void - # @return [FFI::Pointer(*Void)] + + # @method rollback_hook(sqlite3, functionproto, void) + # @param [Sqlite3] sqlite3 + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @param [FFI::Pointer(*Void)] void + # @return [FFI::Pointer(*Void)] # @scope class attach_function :rollback_hook, :sqlite3_rollback_hook, [Sqlite3, :pointer, :pointer], :pointer - # CAPI3REF: Data Change Notification Callbacks - # + # ^The sqlite3_update_hook() interface registers a callback function # with the (database connection) identified by the first argument # to be invoked whenever a row is updated, inserted or deleted. # ^Any callback set by a previous call to this function # for the same database connection is overridden. - # + # ^The second argument is a pointer to the function to invoke when a # row is updated, inserted or deleted. # ^The first argument to the callback is a copy of the third argument @@ -4738,74 +4598,72 @@ class Context < FFI::Struct # database and table name containing the affected row. # ^The final callback parameter is the (rowid) of the row. # ^In the case of an update, this is the (rowid) after the update takes place. - # + # ^(The update hook is not invoked when internal system tables are # modified (i.e. sqlite_master and sqlite_sequence).)^ - # + # ^In the current implementation, the update hook # is not invoked when duplication rows are deleted because of an # (ON CONFLICT | ON CONFLICT REPLACE) clause. ^Nor is the update hook # invoked when rows are deleted using the (truncate optimization). # The exceptions defined in this paragraph might change in a future # release of SQLite. - # + # The update hook implementation must not do anything that will modify # the database connection that invoked the update hook. Any actions # to modify the database connection must be deferred until after the # completion of the (sqlite3_step()) call that triggered the update hook. # Note that (sqlite3_prepare_v2()) and (sqlite3_step()) both modify their # database connections for the meaning of "modify" in this paragraph. - # + # ^The sqlite3_update_hook(D,C,P) function # returns the P argument from the previous call # on the same (database connection) D, or NULL for # the first call on D. - # + # See also the (sqlite3_commit_hook()) and (sqlite3_rollback_hook()) # interfaces. - # - # @method update_hook(sqlite3, , void) - # @param [Sqlite3] sqlite3 - # @param [FFI::Pointer(*)] - # @param [FFI::Pointer(*Void)] void - # @return [FFI::Pointer(*Void)] + + # @method update_hook(sqlite3, functionproto, void) + # @param [Sqlite3] sqlite3 + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @param [FFI::Pointer(*Void)] void + # @return [FFI::Pointer(*Void)] # @scope class attach_function :update_hook, :sqlite3_update_hook, [Sqlite3, :pointer, :pointer], :pointer - # CAPI3REF: Enable Or Disable Shared Pager Cache # KEYWORDS: {shared cache} - # + # ^(This routine enables or disables the sharing of the database cache # and schema data structures between (database connection | connections) # to the same database. Sharing is enabled if the argument is true # and disabled if the argument is false.)^ - # + # ^Cache sharing is enabled and disabled for an entire process. # This is a change as of SQLite version 3.5.0. In prior versions of SQLite, # sharing was enabled or disabled for each thread separately. - # + # ^(The cache sharing mode set by this interface effects all subsequent # calls to (sqlite3_open()), (sqlite3_open_v2()), and (sqlite3_open16()). # Existing database connections continue use the sharing mode # that was in effect at the time they were opened.)^ - # + # ^(This routine returns (SQLITE_OK) if shared cache was enabled or disabled # successfully. An (error code) is returned otherwise.)^ - # + # ^Shared cache is disabled by default. But this might change in # future releases of SQLite. Applications that care about shared # cache setting should set it explicitly. - # + # See Also: (SQLite Shared-Cache Mode) - # + # @method enable_shared_cache(int) - # @param [Integer] int - # @return [Integer] + # @param [Integer] int + # @return [Integer] # @scope class attach_function :enable_shared_cache, :sqlite3_enable_shared_cache, [:int], :int - # CAPI3REF: Attempt To Free Heap Memory - # + # ^The sqlite3_release_memory() interface attempts to free N bytes # of heap memory by deallocating non-essential memory allocations # held by the database library. Memory used to cache database @@ -4814,15 +4672,14 @@ class Context < FFI::Struct # which might be more or less than the amount requested. # ^The sqlite3_release_memory() routine is a no-op returning zero # if SQLite is not compiled with (SQLITE_ENABLE_MEMORY_MANAGEMENT). - # + # @method release_memory(int) - # @param [Integer] int - # @return [Integer] + # @param [Integer] int + # @return [Integer] # @scope class attach_function :release_memory, :sqlite3_release_memory, [:int], :int - # CAPI3REF: Impose A Limit On Heap Size - # + # ^The sqlite3_soft_heap_limit64() interface sets and/or queries the # soft limit on the amount of heap memory that may be allocated by SQLite. # ^SQLite strives to keep heap memory utilization below the soft heap @@ -4832,18 +4689,18 @@ class Context < FFI::Struct # below the limit, it will exceed the limit rather than generate # an (SQLITE_NOMEM) error. In other words, the soft heap limit # is advisory only. - # + # ^The return value from sqlite3_soft_heap_limit64() is the size of # the soft heap limit prior to the call. ^If the argument N is negative # then no change is made to the soft heap limit. Hence, the current # size of the soft heap limit can be determined by invoking # sqlite3_soft_heap_limit64() with a negative argument. - # + # ^If the argument N is zero then the soft heap limit is disabled. - # + # ^(The soft heap limit is not enforced in the current implementation # if one or more of following conditions are true: - # + #
      #
    • The soft heap limit is set to zero. #
    • Memory accounting is disabled using a combination of the @@ -4855,7 +4712,7 @@ class Context < FFI::Struct # by (sqlite3_config)((SQLITE_CONFIG_PAGECACHE),...) rather than # from the heap. #
    )^ - # + # Beginning with SQLite version 3.7.3, the soft heap limit is enforced # regardless of whether or not the (SQLITE_ENABLE_MEMORY_MANAGEMENT) # compile-time option is invoked. With (SQLITE_ENABLE_MEMORY_MANAGEMENT), @@ -4865,55 +4722,53 @@ class Context < FFI::Struct # the page cache is the predominate memory user in SQLite, most # applications will achieve adequate soft heap limit enforcement without # the use of (SQLITE_ENABLE_MEMORY_MANAGEMENT). - # + # The circumstances under which SQLite will enforce the soft heap limit may # changes in future releases of SQLite. - # + # @method soft_heap_limit64(n) - # @param [Integer] n - # @return [Integer] + # @param [Integer] n + # @return [Integer] # @scope class attach_function :soft_heap_limit64, :sqlite3_soft_heap_limit64, [:long_long], :long_long - # CAPI3REF: Deprecated Soft Heap Limit Interface # DEPRECATED - # + # This is a deprecated version of the (sqlite3_soft_heap_limit64()) # interface. This routine is provided for historical compatibility # only. All new applications should use the # (sqlite3_soft_heap_limit64()) interface rather than this one. - # + # @method soft_heap_limit(n) - # @param [Integer] n - # @return [nil] + # @param [Integer] n + # @return [nil] # @scope class attach_function :soft_heap_limit, :sqlite3_soft_heap_limit, [:int], :void - # CAPI3REF: Extract Metadata About A Column Of A Table - # + # ^This routine returns metadata about a specific column of a specific # database table accessible using the (database connection) handle # passed as the first function argument. - # + # ^The column is identified by the second, third and fourth parameters to # this function. ^The second parameter is either the name of the database # (i.e. "main", "temp", or an attached database) containing the specified # table or NULL. ^If it is NULL, then all attached databases are searched # for the table using the same algorithm used by the database engine to # resolve unqualified table references. - # + # ^The third and fourth parameters to this function are the table and column # name of the desired column, respectively. Neither of these parameters # may be NULL. - # + # ^Metadata is returned by writing to the memory locations passed as the 5th # and subsequent parameters to this function. ^Any of these arguments may be # NULL, in which case the corresponding element of metadata is omitted. - # + # ^(
    # #
    Parameter Output
    Type
    Description - # + #
    5th const char* Data type #
    6th const char* Name of default collation sequence #
    7th int True if column has a NOT NULL constraint @@ -4921,19 +4776,19 @@ class Context < FFI::Struct #
    9th int True if column is (AUTOINCREMENT) #
    #
    )^ - # + # ^The memory pointed to by the character pointers returned for the # declaration type and collation sequence is valid only until the next # call to any SQLite API function. - # + # ^If the specified table is actually a view, an (error code) is returned. - # + # ^If the specified column is "rowid", "oid" or "_rowid_" and an # (INTEGER PRIMARY KEY) column has been explicitly declared, then the output # parameters are set for the explicitly declared column. ^(If there is no # explicitly declared (INTEGER PRIMARY KEY) column, then the output # parameters are set as follows: - # + #
       #     data type: "INTEGER"
       #     collation sequence: "BINARY"
    @@ -4941,36 +4796,35 @@ class Context < FFI::Struct
       #     primary key: 1
       #     auto increment: 0
       # 
    )^ - # + # ^(This function may load one or more schemas from database files. If an # error occurs during this process, or if the requested table or column # cannot be found, an (error code) is returned and an error message left # in the (database connection) (to be retrieved using sqlite3_errmsg()).)^ - # + # ^This API is only available if the library was compiled with the # (SQLITE_ENABLE_COLUMN_METADATA) C-preprocessor symbol defined. - # + # @method table_column_metadata(db, z_db_name, z_table_name, z_column_name, pz_data_type, pz_coll_seq, p_not_null, p_primary_key, p_autoinc) - # @param [Sqlite3] db - # @param [String] z_db_name - # @param [String] z_table_name - # @param [String] z_column_name - # @param [FFI::Pointer(**CharS)] pz_data_type - # @param [FFI::Pointer(**CharS)] pz_coll_seq - # @param [FFI::Pointer(*Int)] p_not_null - # @param [FFI::Pointer(*Int)] p_primary_key - # @param [FFI::Pointer(*Int)] p_autoinc - # @return [Integer] + # @param [Sqlite3] db + # @param [String] z_db_name + # @param [String] z_table_name + # @param [String] z_column_name + # @param [FFI::Pointer(**CharS)] pz_data_type + # @param [FFI::Pointer(**CharS)] pz_coll_seq + # @param [FFI::Pointer(*Int)] p_not_null + # @param [FFI::Pointer(*Int)] p_primary_key + # @param [FFI::Pointer(*Int)] p_autoinc + # @return [Integer] # @scope class attach_function :table_column_metadata, :sqlite3_table_column_metadata, [Sqlite3, :string, :string, :string, :pointer, :pointer, :pointer, :pointer, :pointer], :int - # CAPI3REF: Load An Extension - # + # ^This interface loads an SQLite extension library from the named file. - # + # ^The sqlite3_load_extension() interface attempts to load an # SQLite extension library contained in the file zFile. - # + # ^The entry point is zProc. # ^zProc may be 0, in which case the name of the entry point # defaults to "sqlite3_extension_init". @@ -4981,53 +4835,51 @@ class Context < FFI::Struct # fill *pzErrMsg with error message text stored in memory # obtained from (sqlite3_malloc()). The calling function # should free this memory by calling (sqlite3_free()). - # + # ^Extension loading must be enabled using # (sqlite3_enable_load_extension()) prior to calling this API, # otherwise an error will be returned. - # + # See also the (load_extension() SQL function). - # + # @method load_extension(db, z_file, z_proc, pz_err_msg) - # @param [Sqlite3] db - # @param [String] z_file - # @param [String] z_proc - # @param [FFI::Pointer(**CharS)] pz_err_msg - # @return [Integer] + # @param [Sqlite3] db + # @param [String] z_file + # @param [String] z_proc + # @param [FFI::Pointer(**CharS)] pz_err_msg + # @return [Integer] # @scope class attach_function :load_extension, :sqlite3_load_extension, [Sqlite3, :string, :string, :pointer], :int - # CAPI3REF: Enable Or Disable Extension Loading - # + # ^So as not to open security holes in older applications that are # unprepared to deal with extension loading, and as a means of disabling # extension loading while evaluating user-entered SQL, the following API # is provided to turn the (sqlite3_load_extension()) mechanism on and off. - # + # ^Extension loading is off by default. See ticket #1863. # ^Call the sqlite3_enable_load_extension() routine with onoff==1 # to turn extension loading on and call it with onoff==0 to turn # it back off again. - # + # @method enable_load_extension(db, onoff) - # @param [Sqlite3] db - # @param [Integer] onoff - # @return [Integer] + # @param [Sqlite3] db + # @param [Integer] onoff + # @return [Integer] # @scope class attach_function :enable_load_extension, :sqlite3_enable_load_extension, [Sqlite3, :int], :int - # CAPI3REF: Automatically Load Statically Linked Extensions - # + # ^This interface causes the xEntryPoint() function to be invoked for # each new (database connection) that is created. The idea here is that # xEntryPoint() is the entry point for a statically linked SQLite extension # that is to be automatically loaded into all new database connections. - # + # ^(Even though the function prototype shows that xEntryPoint() takes # no arguments and returns void, SQLite invokes xEntryPoint() with three # arguments and expects and integer result as if the signature of the # entry point where as follows: - # + #
       #    int xEntryPoint(
       #      sqlite3 *db,
    @@ -5035,7 +4887,7 @@ class Context < FFI::Struct
       #      const struct sqlite3_api_routines *pThunk
       #    );
       # 
    )^ - # + # If the xEntryPoint routine encounters an error, it should make *pzErrMsg # point to an appropriate error message (obtained from (sqlite3_mprintf())) # and return an appropriate (error code). ^SQLite ensures that *pzErrMsg @@ -5043,36 +4895,34 @@ class Context < FFI::Struct # (sqlite3_free()) on *pzErrMsg after xEntryPoint() returns. ^If any # xEntryPoint() returns an error, the (sqlite3_open()), (sqlite3_open16()), # or (sqlite3_open_v2()) call that provoked the xEntryPoint() will fail. - # + # ^Calling sqlite3_auto_extension(X) with an entry point X that is already # on the list of automatic extensions is a harmless no-op. ^No entry point # will be called more than once for each database connection that is opened. - # + # See also: (sqlite3_reset_auto_extension()). - # + # @method auto_extension(x_entry_point) - # @param [FFI::Pointer(*)] x_entry_point - # @return [Integer] + # @param [FFI::Pointer(*FunctionProto)] x_entry_point + # @return [Integer] # @scope class attach_function :auto_extension, :sqlite3_auto_extension, [:pointer], :int - # CAPI3REF: Reset Automatic Extension Loading - # + # ^This interface disables all automatic extensions previously # registered using (sqlite3_auto_extension()). - # + # @method reset_auto_extension() - # @return [nil] + # @return [nil] # @scope class attach_function :reset_auto_extension, :sqlite3_reset_auto_extension, [], :void - # CAPI3REF: Virtual Table Object # KEYWORDS: sqlite3_module {virtual table module} - # + # This structure, sometimes called a "virtual table module", # defines the implementation of a (virtual tables). # This structure consists mostly of methods for the module. - # + # ^A virtual table module is created by filling in a persistent # instance of this structure and passing a pointer to that instance # to (sqlite3_create_module()) or (sqlite3_create_module_v2()). @@ -5080,55 +4930,55 @@ class Context < FFI::Struct # module or until the (database connection) closes. The content # of this structure must not change while it is registered with # any database connection. - # + # = Fields: # :i_version :: - # (Integer) + # (Integer) # :x_create :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_connect :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_best_index :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_disconnect :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_destroy :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_open :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_close :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_filter :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_next :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_eof :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_column :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_rowid :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_update :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_begin :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_sync :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_commit :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_rollback :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_find_function :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_rename :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_savepoint :: - # (FFI::Pointer(*)) The methods above are in version 1 of the sqlite_module object. Those + # (FFI::Pointer(*FunctionProto)) The methods above are in version 1 of the sqlite_module object. Those # below are for version 2 and greater. # :x_release :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_rollback_to :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) class Module < FFI::Struct layout :i_version, :int, :x_create, :pointer, @@ -5154,9 +5004,9 @@ class Module < FFI::Struct :x_release, :pointer, :x_rollback_to, :pointer end - + # (Not documented) - # + # = Fields: # :i_column :: # (Integer) Column on left-hand side of constraint @@ -5172,9 +5022,9 @@ class IndexConstraint < FFI::Struct :usable, :uchar, :i_term_offset, :int end - + # (Not documented) - # + # = Fields: # :i_column :: # (Integer) Column number @@ -5184,9 +5034,9 @@ class IndexOrderby < FFI::Struct layout :i_column, :int, :desc, :uchar end - + # (Not documented) - # + # = Fields: # :argv_index :: # (Integer) if >0, constraint is part of argv to xFilter @@ -5196,21 +5046,21 @@ class IndexConstraintUsage < FFI::Struct layout :argv_index, :int, :omit, :uchar end - + # CAPI3REF: Virtual Table Indexing Information # KEYWORDS: sqlite3_index_info - # + # The sqlite3_index_info structure and its substructures is used as part # of the (virtual table) interface to # pass information into and receive the reply from the (xBestIndex) # method of a (virtual table module). The fields under **Inputs** are the # inputs to xBestIndex and are read-only. xBestIndex inserts its # results into the **Outputs** fields. - # + # ^(The aConstraint() array records WHERE clause constraints of the form: - # + #
    column OP expr
    - # + # where OP is =, <, <=, >, or >=.)^ ^(The particular operator is # stored in aConstraint().op using one of the # (SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values).)^ @@ -5218,37 +5068,37 @@ class IndexConstraintUsage < FFI::Struct # aConstraint().iColumn.)^ ^(aConstraint().usable is TRUE if the # expr on the right-hand side can be evaluated (and thus the constraint # is usable) and false if it cannot.)^ - # + # ^The optimizer automatically inverts terms of the form "expr OP column" # and makes other simplifications to the WHERE clause in an attempt to # get as many WHERE clause terms into the form shown above as possible. # ^The aConstraint() array only reports WHERE clause terms that are # relevant to the particular virtual table being queried. - # + # ^Information about the ORDER BY clause is stored in aOrderBy(). # ^Each term of aOrderBy records a column of the ORDER BY clause. - # + # The (xBestIndex) method must fill aConstraintUsage() with information # about what parameters to pass to xFilter. ^If argvIndex>0 then # the right-hand side of the corresponding aConstraint() is evaluated # and becomes the argvIndex-th entry in argv. ^(If aConstraintUsage().omit # is true, then the constraint is assumed to be fully handled by the # virtual table and is not checked again by SQLite.)^ - # + # ^The idxNum and idxPtr values are recorded and passed into the # (xFilter) method. # ^(sqlite3_free()) is used to free idxPtr if and only if # needToFreeIdxPtr is true. - # + # ^The orderByConsumed means that output from (xFilter)/(xNext) will occur in # the correct order to satisfy the ORDER BY clause so that no separate # sorting step is required. - # + # ^The estimatedCost value is an estimate of the cost of doing the # particular lookup. A full scan of a table with N entries should have # a cost of N. A binary search of a table of N entries should have a # cost of approximately log(N). - # + # = Fields: # :n_constraint :: # (Integer) Number of entries in aConstraint @@ -5282,14 +5132,14 @@ class IndexInfo < FFI::Struct :order_by_consumed, :int, :estimated_cost, :double end - + # CAPI3REF: Register A Virtual Table Implementation - # + # ^These routines are used to register a new (virtual table module) name. # ^Module names must be registered before # creating a new (virtual table) using the module and before using a # preexisting (virtual table) for the module. - # + # ^The module name is registered on the (database connection) specified # by the first parameter. ^The name of the module is given by the # second parameter. ^The third parameter is a pointer to @@ -5297,7 +5147,7 @@ class IndexInfo < FFI::Struct # parameter is an arbitrary client data pointer that is passed through # into the (xCreate) and (xConnect) methods of the virtual table module # when a new virtual table is be being created or reinitialized. - # + # ^The sqlite3_create_module_v2() interface has a fifth parameter which # is a pointer to a destructor for the pClientData. ^SQLite will # invoke the destructor function (if it is not NULL) when SQLite @@ -5306,48 +5156,46 @@ class IndexInfo < FFI::Struct # ^The sqlite3_create_module() # interface is equivalent to sqlite3_create_module_v2() with a NULL # destructor. - # + # @method create_module(db, z_name, p, p_client_data) - # @param [Sqlite3] db - # @param [String] z_name - # @param [Module] p - # @param [FFI::Pointer(*Void)] p_client_data - # @return [Integer] + # @param [Sqlite3] db + # @param [String] z_name + # @param [Module] p + # @param [FFI::Pointer(*Void)] p_client_data + # @return [Integer] # @scope class attach_function :create_module, :sqlite3_create_module, [Sqlite3, :string, Module, :pointer], :int - # (Not documented) - # + # @method create_module_v2(db, z_name, p, p_client_data, x_destroy) - # @param [Sqlite3] db - # @param [String] z_name - # @param [Module] p - # @param [FFI::Pointer(*Void)] p_client_data - # @param [FFI::Pointer(*)] x_destroy - # @return [Integer] + # @param [Sqlite3] db + # @param [String] z_name + # @param [Module] p + # @param [FFI::Pointer(*Void)] p_client_data + # @param [FFI::Pointer(*FunctionProto)] x_destroy + # @return [Integer] # @scope class attach_function :create_module_v2, :sqlite3_create_module_v2, [Sqlite3, :string, Module, :pointer, :pointer], :int - # Structures used by the virtual table interface - # - # + + # CAPI3REF: Virtual Table Instance Object # KEYWORDS: sqlite3_vtab - # + # Every (virtual table module) implementation uses a subclass # of this object to describe a particular instance # of the (virtual table). Each subclass will # be tailored to the specific needs of the module implementation. # The purpose of this superclass is to define certain fields that are # common to all module implementations. - # + # ^Virtual tables methods can set an error message by assigning a # string obtained from (sqlite3_mprintf()) to zErrMsg. The method should # take care that any prior string is freed by a call to (sqlite3_free()) # prior to assigning a new string to zErrMsg. ^After the error message # is delivered up to the client application, the string will be automatically # freed by sqlite3_free() and the zErrMsg field will be zeroed. - # + # = Fields: # :p_module :: # (Module) The module for this virtual table @@ -5360,10 +5208,10 @@ class Vtab < FFI::Struct :n_ref, :int, :z_err_msg, :string end - + # CAPI3REF: Virtual Table Cursor Object # KEYWORDS: sqlite3_vtab_cursor {virtual table cursor} - # + # Every (virtual table module) implementation uses a subclass of the # following structure to describe cursors that point into the # (virtual table) and are used @@ -5373,38 +5221,37 @@ class Vtab < FFI::Struct # by the (xFilter), (xNext), (xEof), (xColumn), and (xRowid) methods # of the module. Each module implementation will define # the content of a cursor structure to suit its own needs. - # + # This superclass exists in order to define fields of the cursor that # are common to all implementations. - # + # = Fields: # :p_vtab :: # (Vtab) Virtual table of this cursor class VtabCursor < FFI::Struct layout :p_vtab, Vtab end - + # CAPI3REF: Declare The Schema Of A Virtual Table - # + # ^The (xCreate) and (xConnect) methods of a # (virtual table module) call this interface # to declare the format (the names and datatypes of the columns) of # the virtual tables they implement. - # + # @method declare_vtab(sqlite3, z_sql) - # @param [Sqlite3] sqlite3 - # @param [String] z_sql - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @param [String] z_sql + # @return [Integer] # @scope class attach_function :declare_vtab, :sqlite3_declare_vtab, [Sqlite3, :string], :int - # CAPI3REF: Overload A Function For A Virtual Table - # + # ^(Virtual tables can provide alternative implementations of functions # using the (xFindFunction) method of the (virtual table module). # But global versions of those functions # must exist in order to be overloaded.)^ - # + # ^(This API makes sure a global version of a function with a particular # name and number of parameters exists. If no such function exists # before this API is called, a new function is created.)^ ^The implementation @@ -5412,18 +5259,17 @@ class VtabCursor < FFI::Struct # the new function is not good for anything by itself. Its only # purpose is to be a placeholder function that can be overloaded # by a (virtual table). - # + # @method overload_function(sqlite3, z_func_name, n_arg) - # @param [Sqlite3] sqlite3 - # @param [String] z_func_name - # @param [Integer] n_arg - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @param [String] z_func_name + # @param [Integer] n_arg + # @return [Integer] # @scope class attach_function :overload_function, :sqlite3_overload_function, [Sqlite3, :string, :int], :int - # CAPI3REF: A Handle To An Open BLOB # KEYWORDS: {BLOB handle} {BLOB handles} - # + # An instance of this object represents an open BLOB on which # (sqlite3_blob_open | incremental BLOB I/O) can be performed. # ^Objects of this type are created by (sqlite3_blob_open()) @@ -5432,66 +5278,66 @@ class VtabCursor < FFI::Struct # can be used to read or write small subsections of the BLOB. # ^The (sqlite3_blob_bytes()) interface returns the size of the BLOB in bytes. module BlobWrappers - # @param [Integer] long_long - # @return [Integer] + # @param [Integer] long_long + # @return [Integer] def reopen(long_long) SQLite3.blob_reopen(self, long_long) end - - # @return [Integer] + + # @return [Integer] def close() SQLite3.blob_close(self) end - - # @return [Integer] + + # @return [Integer] def bytes() SQLite3.blob_bytes(self) end - - # @param [FFI::Pointer(*Void)] z - # @param [Integer] n - # @param [Integer] i_offset - # @return [Integer] + + # @param [FFI::Pointer(*Void)] z + # @param [Integer] n + # @param [Integer] i_offset + # @return [Integer] def read(z, n, i_offset) SQLite3.blob_read(self, z, n, i_offset) end - - # @param [FFI::Pointer(*Void)] z - # @param [Integer] n - # @param [Integer] i_offset - # @return [Integer] + + # @param [FFI::Pointer(*Void)] z + # @param [Integer] n + # @param [Integer] i_offset + # @return [Integer] def write(z, n, i_offset) SQLite3.blob_write(self, z, n, i_offset) end end - + class Blob < FFI::Struct include BlobWrappers layout :dummy, :char end - + # CAPI3REF: Open A BLOB For Incremental I/O - # + # ^(This interfaces opens a (BLOB handle | handle) to the BLOB located # in row iRow, column zColumn, table zTable in database zDb; # in other words, the same BLOB that would be selected by: - # + #
       #     SELECT zColumn FROM zDb.zTable WHERE (rowid) = iRow;
       # 
    )^ - # + # ^If the flags parameter is non-zero, then the BLOB is opened for read # and write access. ^If it is zero, the BLOB is opened for read access. # ^It is not possible to open a column that is part of an index or primary # key for writing. ^If (foreign key constraints) are enabled, it is # not possible to open a column that is part of a (child key) for writing. - # + # ^Note that the database name is not the filename that contains # the database but rather the symbolic name of the database that # appears after the AS keyword when the database is connected using (ATTACH). # ^For the main database file, the database name is "main". # ^For TEMP tables, the database name is "temp". - # + # ^(On success, (SQLITE_OK) is returned and the new (BLOB handle) is written # to *ppBlob. Otherwise an (error code) is returned and *ppBlob is set # to be a null pointer.)^ @@ -5500,7 +5346,7 @@ class Blob < FFI::Struct # functions. ^Note that the *ppBlob variable is always initialized in a # way that makes it safe to invoke (sqlite3_blob_close()) on *ppBlob # regardless of the success or failure of this routine. - # + # ^(If the row that a BLOB handle points to is modified by an # (UPDATE), (DELETE), or by (ON CONFLICT) side-effects # then the BLOB handle is marked as "expired". @@ -5511,41 +5357,40 @@ class Blob < FFI::Struct # ^(Changes written into a BLOB prior to the BLOB expiring are not # rolled back by the expiration of the BLOB. Such changes will eventually # commit if the transaction continues to completion.)^ - # + # ^Use the (sqlite3_blob_bytes()) interface to determine the size of # the opened blob. ^The size of a blob may not be changed by this # interface. Use the (UPDATE) SQL command to change the size of a # blob. - # + # ^The (sqlite3_bind_zeroblob()) and (sqlite3_result_zeroblob()) interfaces # and the built-in (zeroblob) SQL function can be used, if desired, # to create an empty, zero-filled blob in which to read or write using # this interface. - # + # To avoid a resource leak, every open (BLOB handle) should eventually # be released by a call to (sqlite3_blob_close()). - # + # @method blob_open(sqlite3, z_db, z_table, z_column, i_row, flags, pp_blob) - # @param [Sqlite3] sqlite3 - # @param [String] z_db - # @param [String] z_table - # @param [String] z_column - # @param [Integer] i_row - # @param [Integer] flags - # @param [FFI::Pointer(**Blob)] pp_blob - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @param [String] z_db + # @param [String] z_table + # @param [String] z_column + # @param [Integer] i_row + # @param [Integer] flags + # @param [FFI::Pointer(**Blob)] pp_blob + # @return [Integer] # @scope class attach_function :blob_open, :sqlite3_blob_open, [Sqlite3, :string, :string, :string, :long_long, :int, :pointer], :int - # CAPI3REF: Move a BLOB Handle to a New Row - # + # ^This function is used to move an existing blob handle so that it points # to a different row of the same database table. ^The new row is identified # by the rowid value passed as the second argument. Only the row can be # changed. ^The database, table and column on which the blob handle is open # remain the same. Moving an existing blob handle to a new row can be # faster than closing the existing handle and opening a new one. - # + # ^(The new row must meet the same criteria as for (sqlite3_blob_open()) - # it must exist and there must be either a blob or text value stored in # the nominated column.)^ ^If the new row is not present in the table, or if @@ -5555,105 +5400,101 @@ class Blob < FFI::Struct # (sqlite3_blob_reopen()) on an aborted blob handle immediately return # SQLITE_ABORT. ^Calling (sqlite3_blob_bytes()) on an aborted blob handle # always returns zero. - # + # ^This function sets the database handle error code and message. - # + # @method blob_reopen(blob, long_long) - # @param [Blob] blob - # @param [Integer] long_long - # @return [Integer] + # @param [Blob] blob + # @param [Integer] long_long + # @return [Integer] # @scope class attach_function :blob_reopen, :sqlite3_blob_reopen, [Blob, :long_long], :int - # CAPI3REF: Close A BLOB Handle - # + # ^Closes an open (BLOB handle). - # + # ^Closing a BLOB shall cause the current transaction to commit # if there are no other BLOBs, no pending prepared statements, and the # database connection is in (autocommit mode). # ^If any writes were made to the BLOB, they might be held in cache # until the close operation if they will fit. - # + # ^(Closing the BLOB often forces the changes # out to disk and so if any I/O errors occur, they will likely occur # at the time when the BLOB is closed. Any errors that occur during # closing are reported as a non-zero return value.)^ - # + # ^(The BLOB is closed unconditionally. Even if this routine returns # an error code, the BLOB is still closed.)^ - # + # ^Calling this routine with a null pointer (such as would be returned # by a failed call to (sqlite3_blob_open())) is a harmless no-op. - # + # @method blob_close(blob) - # @param [Blob] blob - # @return [Integer] + # @param [Blob] blob + # @return [Integer] # @scope class attach_function :blob_close, :sqlite3_blob_close, [Blob], :int - # CAPI3REF: Return The Size Of An Open BLOB - # + # ^Returns the size in bytes of the BLOB accessible via the # successfully opened (BLOB handle) in its only argument. ^The # incremental blob I/O routines can only read or overwriting existing # blob content; they cannot change the size of a blob. - # + # This routine only works on a (BLOB handle) which has been created # by a prior successful call to (sqlite3_blob_open()) and which has not # been closed by (sqlite3_blob_close()). Passing any other pointer in # to this routine results in undefined and probably undesirable behavior. - # + # @method blob_bytes(blob) - # @param [Blob] blob - # @return [Integer] + # @param [Blob] blob + # @return [Integer] # @scope class attach_function :blob_bytes, :sqlite3_blob_bytes, [Blob], :int - # CAPI3REF: Read Data From A BLOB Incrementally - # + # ^(This function is used to read data from an open (BLOB handle) into a # caller-supplied buffer. N bytes of data are copied into buffer Z # from the open BLOB, starting at offset iOffset.)^ - # + # ^If offset iOffset is less than N bytes from the end of the BLOB, # (SQLITE_ERROR) is returned and no data is read. ^If N or iOffset is # less than zero, (SQLITE_ERROR) is returned and no data is read. # ^The size of the blob (and hence the maximum value of N+iOffset) # can be determined using the (sqlite3_blob_bytes()) interface. - # + # ^An attempt to read from an expired (BLOB handle) fails with an # error code of (SQLITE_ABORT). - # + # ^(On success, sqlite3_blob_read() returns SQLITE_OK. # Otherwise, an (error code) or an (extended error code) is returned.)^ - # + # This routine only works on a (BLOB handle) which has been created # by a prior successful call to (sqlite3_blob_open()) and which has not # been closed by (sqlite3_blob_close()). Passing any other pointer in # to this routine results in undefined and probably undesirable behavior. - # + # See also: (sqlite3_blob_write()). - # + # @method blob_read(blob, z, n, i_offset) - # @param [Blob] blob - # @param [FFI::Pointer(*Void)] z - # @param [Integer] n - # @param [Integer] i_offset - # @return [Integer] + # @param [Blob] blob + # @param [FFI::Pointer(*Void)] z + # @param [Integer] n + # @param [Integer] i_offset + # @return [Integer] # @scope class attach_function :blob_read, :sqlite3_blob_read, [Blob, :pointer, :int, :int], :int - # CAPI3REF: Write Data Into A BLOB Incrementally - # + # ^This function is used to write data into an open (BLOB handle) from a # caller-supplied buffer. ^N bytes of data are copied from the buffer Z # into the open BLOB, starting at offset iOffset. - # + # ^If the (BLOB handle) passed as the first argument was not opened for # writing (the flags parameter to (sqlite3_blob_open()) was zero), # this function returns (SQLITE_READONLY). - # + # ^This function may only modify the contents of the BLOB; it is # not possible to increase the size of a BLOB using this API. # ^If offset iOffset is less than N bytes from the end of the BLOB, @@ -5661,48 +5502,47 @@ class Blob < FFI::Struct # less than zero (SQLITE_ERROR) is returned and no data is written. # The size of the BLOB (and hence the maximum value of N+iOffset) # can be determined using the (sqlite3_blob_bytes()) interface. - # + # ^An attempt to write to an expired (BLOB handle) fails with an # error code of (SQLITE_ABORT). ^Writes to the BLOB that occurred # before the (BLOB handle) expired are not rolled back by the # expiration of the handle, though of course those changes might # have been overwritten by the statement that expired the BLOB handle # or by other independent statements. - # + # ^(On success, sqlite3_blob_write() returns SQLITE_OK. # Otherwise, an (error code) or an (extended error code) is returned.)^ - # + # This routine only works on a (BLOB handle) which has been created # by a prior successful call to (sqlite3_blob_open()) and which has not # been closed by (sqlite3_blob_close()). Passing any other pointer in # to this routine results in undefined and probably undesirable behavior. - # + # See also: (sqlite3_blob_read()). - # + # @method blob_write(blob, z, n, i_offset) - # @param [Blob] blob - # @param [FFI::Pointer(*Void)] z - # @param [Integer] n - # @param [Integer] i_offset - # @return [Integer] + # @param [Blob] blob + # @param [FFI::Pointer(*Void)] z + # @param [Integer] n + # @param [Integer] i_offset + # @return [Integer] # @scope class attach_function :blob_write, :sqlite3_blob_write, [Blob, :pointer, :int, :int], :int - # CAPI3REF: Virtual File System Objects - # + # A virtual filesystem (VFS) is an (sqlite3_vfs) object # that SQLite uses to interact # with the underlying operating system. Most SQLite builds come with a # single default VFS that is appropriate for the host computer. # New VFSes can be registered and existing VFSes can be unregistered. # The following interfaces are provided. - # + # ^The sqlite3_vfs_find() interface returns a pointer to a VFS given its name. # ^Names are case sensitive. # ^Names are zero-terminated UTF-8 strings. # ^If there is no match, a NULL pointer is returned. # ^If zVfsName is NULL then the default VFS is returned. - # + # ^New VFSes are registered with sqlite3_vfs_register(). # ^Each new VFS becomes the default VFS if the makeDflt flag is set. # ^The same VFS can be registered multiple times without injury. @@ -5711,59 +5551,56 @@ class Blob < FFI::Struct # same name are registered, the behavior is undefined. If a # VFS is registered with a name that is NULL or an empty string, # then the behavior is undefined. - # + # ^Unregister a VFS with the sqlite3_vfs_unregister() interface. # ^(If the default VFS is unregistered, another VFS is chosen as # the default. The choice for the new VFS is arbitrary.)^ - # + # @method vfs_find(z_vfs_name) - # @param [String] z_vfs_name - # @return [Vfs] + # @param [String] z_vfs_name + # @return [Vfs] # @scope class attach_function :vfs_find, :sqlite3_vfs_find, [:string], Vfs - # (Not documented) - # + # @method vfs_register(vfs, make_dflt) - # @param [Vfs] vfs - # @param [Integer] make_dflt - # @return [Integer] + # @param [Vfs] vfs + # @param [Integer] make_dflt + # @return [Integer] # @scope class attach_function :vfs_register, :sqlite3_vfs_register, [Vfs, :int], :int - # (Not documented) - # + # @method vfs_unregister(vfs) - # @param [Vfs] vfs - # @return [Integer] + # @param [Vfs] vfs + # @return [Integer] # @scope class attach_function :vfs_unregister, :sqlite3_vfs_unregister, [Vfs], :int - # CAPI3REF: Mutexes - # + # The SQLite core uses these routines for thread # synchronization. Though they are intended for internal # use by SQLite, code that links against SQLite is # permitted to use any of these routines. - # + # The SQLite source code contains multiple implementations # of these mutex routines. An appropriate implementation # is selected automatically at compile-time. ^(The following # implementations are available in the SQLite core: - # + #
      #
    • SQLITE_MUTEX_OS2 #
    • SQLITE_MUTEX_PTHREAD #
    • SQLITE_MUTEX_W32 #
    • SQLITE_MUTEX_NOOP #
    )^ - # + # ^The SQLITE_MUTEX_NOOP implementation is a set of routines # that does no real locking and is appropriate for use in # a single-threaded application. ^The SQLITE_MUTEX_OS2, # SQLITE_MUTEX_PTHREAD, and SQLITE_MUTEX_W32 implementations # are appropriate for use on OS/2, Unix, and Windows. - # + # ^(If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor # macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex # implementation is included with the library. In this case the @@ -5771,13 +5608,13 @@ class Blob < FFI::Struct # (SQLITE_CONFIG_MUTEX) option of the sqlite3_config() function # before calling sqlite3_initialize() or any other public sqlite3_ # function that calls sqlite3_initialize().)^ - # + # ^The sqlite3_mutex_alloc() routine allocates a new # mutex and returns a pointer to it. ^If it returns NULL # that means that a mutex could not be allocated. ^SQLite # will unwind its stack and return an error. ^(The argument # to sqlite3_mutex_alloc() is one of these integer constants: - # + #
      #
    • SQLITE_MUTEX_FAST #
    • SQLITE_MUTEX_RECURSIVE @@ -5788,7 +5625,7 @@ class Blob < FFI::Struct #
    • SQLITE_MUTEX_STATIC_LRU #
    • SQLITE_MUTEX_STATIC_LRU2 #
    )^ - # + # ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) # cause sqlite3_mutex_alloc() to create # a new mutex. ^The new mutex is recursive when SQLITE_MUTEX_RECURSIVE @@ -5799,7 +5636,7 @@ class Blob < FFI::Struct # cases where it really needs one. ^If a faster non-recursive mutex # implementation is available on the host platform, the mutex subsystem # might return such a mutex in response to SQLITE_MUTEX_FAST. - # + # ^The other allowed parameters to sqlite3_mutex_alloc() (anything other # than SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) each return # a pointer to a static preexisting mutex. ^Six static mutexes are @@ -5808,20 +5645,20 @@ class Blob < FFI::Struct # use by SQLite only. Applications that use SQLite mutexes should # use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or # SQLITE_MUTEX_RECURSIVE. - # + # ^Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST # or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc() # returns a different mutex on every call. ^But for the static # mutex types, the same mutex is returned on every call that has # the same type number. - # + # ^The sqlite3_mutex_free() routine deallocates a previously # allocated dynamic mutex. ^SQLite is careful to deallocate every # dynamic mutex that it allocates. The dynamic mutexes must not be in # use when they are deallocated. Attempting to deallocate a static # mutex results in undefined behavior. ^SQLite never deallocates # a static mutex. - # + # ^The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt # to enter a mutex. ^If another thread is already within the mutex, # sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return @@ -5834,67 +5671,62 @@ class Blob < FFI::Struct # kind of mutex more than once, the behavior is undefined. # SQLite will never exhibit # such behavior in its own use of mutexes.)^ - # + # ^(Some systems (for example, Windows 95) do not support the operation # implemented by sqlite3_mutex_try(). On those systems, sqlite3_mutex_try() # will always return SQLITE_BUSY. The SQLite core only ever uses # sqlite3_mutex_try() as an optimization so this is acceptable behavior.)^ - # + # ^The sqlite3_mutex_leave() routine exits a mutex that was # previously entered by the same thread. ^(The behavior # is undefined if the mutex is not currently entered by the # calling thread or is not currently allocated. SQLite will # never do either.)^ - # + # ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or # sqlite3_mutex_leave() is a NULL pointer, then all three routines # behave as no-ops. - # + # See also: (sqlite3_mutex_held()) and (sqlite3_mutex_notheld()). - # + # @method mutex_alloc(int) - # @param [Integer] int - # @return [Mutex] + # @param [Integer] int + # @return [Mutex] # @scope class attach_function :mutex_alloc, :sqlite3_mutex_alloc, [:int], Mutex - # (Not documented) - # + # @method mutex_free(mutex) - # @param [Mutex] mutex - # @return [nil] + # @param [Mutex] mutex + # @return [nil] # @scope class attach_function :mutex_free, :sqlite3_mutex_free, [Mutex], :void - # (Not documented) - # + # @method mutex_enter(mutex) - # @param [Mutex] mutex - # @return [nil] + # @param [Mutex] mutex + # @return [nil] # @scope class attach_function :mutex_enter, :sqlite3_mutex_enter, [Mutex], :void - # (Not documented) - # + # @method mutex_try(mutex) - # @param [Mutex] mutex - # @return [Integer] + # @param [Mutex] mutex + # @return [Integer] # @scope class attach_function :mutex_try, :sqlite3_mutex_try, [Mutex], :int - # (Not documented) - # + # @method mutex_leave(mutex) - # @param [Mutex] mutex - # @return [nil] + # @param [Mutex] mutex + # @return [nil] # @scope class attach_function :mutex_leave, :sqlite3_mutex_leave, [Mutex], :void - # CAPI3REF: Mutex Methods Object - # + # An instance of this structure defines the low-level routines # used to allocate and use mutexes. - # + # Usually, the default mutex implementations provided by SQLite are # sufficient, however the user has the option of substituting a custom # implementation for specialized deployments or systems for which SQLite @@ -5904,23 +5736,23 @@ class Blob < FFI::Struct # Additionally, an instance of this structure can be used as an # output variable when querying the system for the current mutex # implementation, using the (SQLITE_CONFIG_GETMUTEX) option. - # + # ^The xMutexInit method defined by this structure is invoked as # part of system initialization by the sqlite3_initialize() function. # ^The xMutexInit routine is called by SQLite exactly once for each # effective call to (sqlite3_initialize()). - # + # ^The xMutexEnd method defined by this structure is invoked as # part of system shutdown by the sqlite3_shutdown() function. The # implementation of this method is expected to release all outstanding # resources obtained by the mutex methods implementation, especially # those obtained by the xMutexInit method. ^The xMutexEnd() # interface is invoked exactly once for each call to (sqlite3_shutdown()). - # + # ^(The remaining seven methods defined by this structure (xMutexAlloc, # xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and # xMutexNotheld) implement the following interfaces (respectively): - # + #
      #
    • (sqlite3_mutex_alloc())
    • #
    • (sqlite3_mutex_free())
    • @@ -5930,7 +5762,7 @@ class Blob < FFI::Struct #
    • (sqlite3_mutex_held())
    • #
    • (sqlite3_mutex_notheld())
    • #
    )^ - # + # The only difference is that the public sqlite3_XXX functions enumerated # above silently ignore any invocations that pass a NULL pointer instead # of a valid mutex handle. The implementations of the methods defined @@ -5938,41 +5770,41 @@ class Blob < FFI::Struct # of passing a NULL pointer instead of a valid mutex handle are undefined # (i.e. it is acceptable to provide an implementation that segfaults if # it is passed a NULL pointer). - # + # The xMutexInit() method must be threadsafe. ^It must be harmless to # invoke xMutexInit() multiple times within the same process and without # intervening calls to xMutexEnd(). Second and subsequent calls to # xMutexInit() must be no-ops. - # + # ^xMutexInit() must not use SQLite memory allocation ((sqlite3_malloc()) # and its associates). ^Similarly, xMutexAlloc() must not use SQLite memory # allocation for a static mutex. ^However xMutexAlloc() may use SQLite # memory allocation for a fast or recursive mutex. - # + # ^SQLite will invoke the xMutexEnd() method when (sqlite3_shutdown()) is # called, but only if the prior call to xMutexInit returned SQLITE_OK. # If xMutexInit fails in any way, it is expected to clean up after itself # prior to returning. - # + # = Fields: # :x_mutex_init :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_mutex_end :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_mutex_alloc :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_mutex_free :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_mutex_enter :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_mutex_try :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_mutex_leave :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_mutex_held :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_mutex_notheld :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) class MutexMethods < FFI::Struct layout :x_mutex_init, :pointer, :x_mutex_end, :pointer, @@ -5984,9 +5816,9 @@ class MutexMethods < FFI::Struct :x_mutex_held, :pointer, :x_mutex_notheld, :pointer end - + # CAPI3REF: Mutex Verification Routines - # + # The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines # are intended for use inside assert() statements. ^The SQLite core # never uses these routines except inside an assert() and applications @@ -5995,15 +5827,15 @@ class MutexMethods < FFI::Struct # with the SQLITE_DEBUG flag. ^External mutex implementations # are only required to provide these routines if SQLITE_DEBUG is # defined and if NDEBUG is not defined. - # + # ^These routines should return true if the mutex in their argument # is held or not held, respectively, by the calling thread. - # + # ^The implementation is not required to provided versions of these # routines that actually work. If the implementation does not provide working # versions of these routines, it should at least provide stubs that always # return true so that one does not get spurious assertion failures. - # + # ^If the argument to sqlite3_mutex_held() is a NULL pointer then # the routine should return 1. This seems counter-intuitive since # clearly the mutex cannot be held if it does not exist. But @@ -6012,37 +5844,34 @@ class MutexMethods < FFI::Struct # call to sqlite3_mutex_held() to fail, so a non-zero return is # the appropriate thing to do. ^The sqlite3_mutex_notheld() # interface should also return 1 when given a NULL pointer. - # + # @method mutex_held(mutex) - # @param [Mutex] mutex - # @return [Integer] + # @param [Mutex] mutex + # @return [Integer] # @scope class attach_function :mutex_held, :sqlite3_mutex_held, [Mutex], :int - # (Not documented) - # + # @method mutex_notheld(mutex) - # @param [Mutex] mutex - # @return [Integer] + # @param [Mutex] mutex + # @return [Integer] # @scope class attach_function :mutex_notheld, :sqlite3_mutex_notheld, [Mutex], :int - # CAPI3REF: Retrieve the mutex for a database connection - # + # ^This interface returns a pointer the (sqlite3_mutex) object that # serializes access to the (database connection) given in the argument # when the (threading mode) is Serialized. # ^If the (threading mode) is Single-thread or Multi-thread then this # routine returns a NULL pointer. - # + # @method db_mutex(sqlite3) - # @param [Sqlite3] sqlite3 - # @return [Mutex] + # @param [Sqlite3] sqlite3 + # @return [Mutex] # @scope class attach_function :db_mutex, :sqlite3_db_mutex, [Sqlite3], Mutex - # CAPI3REF: Low-Level Control Of Database Files - # + # ^The (sqlite3_file_control()) interface makes a direct call to the # xFileControl method for the (sqlite3_io_methods) object associated # with a particular database identified by the second argument. ^The @@ -6055,13 +5884,13 @@ class MutexMethods < FFI::Struct # are passed directly through to the second and third parameters of # the xFileControl method. ^The return value of the xFileControl # method becomes the return value of this routine. - # + # ^The SQLITE_FCNTL_FILE_POINTER value for the op parameter causes # a pointer to the underlying (sqlite3_file) object to be written into # the space pointed to by the 4th parameter. ^The SQLITE_FCNTL_FILE_POINTER # case is a short-circuit path which does not actually invoke the # underlying sqlite3_io_methods.xFileControl method. - # + # ^If the second parameter (zDbName) does not match the name of any # open database file, then SQLITE_ERROR is returned. ^This error # code is not remembered and will not be recalled by (sqlite3_errcode()) @@ -6069,42 +5898,40 @@ class MutexMethods < FFI::Struct # also return SQLITE_ERROR. There is no way to distinguish between # an incorrect zDbName and an SQLITE_ERROR return from the underlying # xFileControl method. - # + # See also: (SQLITE_FCNTL_LOCKSTATE) - # + # @method file_control(sqlite3, z_db_name, op, void) - # @param [Sqlite3] sqlite3 - # @param [String] z_db_name - # @param [Integer] op - # @param [FFI::Pointer(*Void)] void - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @param [String] z_db_name + # @param [Integer] op + # @param [FFI::Pointer(*Void)] void + # @return [Integer] # @scope class attach_function :file_control, :sqlite3_file_control, [Sqlite3, :string, :int, :pointer], :int - # CAPI3REF: Testing Interface - # + # ^The sqlite3_test_control() interface is used to read out internal # state of SQLite and to inject faults into SQLite for testing # purposes. ^The first parameter is an operation code that determines # the number, meaning, and operation of all subsequent parameters. - # + # This interface is not for use by applications. It exists solely # for verifying the correct operation of the SQLite library. Depending # on how the SQLite library is compiled, this interface might not exist. - # + # The details of the operation codes, their meanings, the parameters # they take, and what they do are all subject to change without notice. # Unlike most of the SQLite API, this function is not guaranteed to # operate consistently from one release to the next. - # + # @method test_control(op) - # @param [Integer] op - # @return [Integer] + # @param [Integer] op + # @return [Integer] # @scope class attach_function :test_control, :sqlite3_test_control, [:int], :int - # CAPI3REF: SQLite Runtime Status - # + # ^This interface is used to retrieve runtime status information # about the performance of SQLite, and optionally to reset various # highwater marks. ^The first argument is an integer code for @@ -6118,30 +5945,29 @@ class MutexMethods < FFI::Struct # nothing is written into *pHighwater and the resetFlag is ignored.)^ # ^(Other parameters record only the highwater mark and not the current # value. For these latter parameters nothing is written into *pCurrent.)^ - # + # ^The sqlite3_status() routine returns SQLITE_OK on success and a # non-zero (error code) on failure. - # + # This routine is threadsafe but is not atomic. This routine can be # called while other threads are running the same or different SQLite # interfaces. However the values returned in *pCurrent and # *pHighwater reflect the status of SQLite at different points in time # and it is possible that another thread might change the parameter # in between the times when *pCurrent and *pHighwater are written. - # + # See also: (sqlite3_db_status()) - # + # @method status(op, p_current, p_highwater, reset_flag) - # @param [Integer] op - # @param [FFI::Pointer(*Int)] p_current - # @param [FFI::Pointer(*Int)] p_highwater - # @param [Integer] reset_flag - # @return [Integer] + # @param [Integer] op + # @param [FFI::Pointer(*Int)] p_current + # @param [FFI::Pointer(*Int)] p_highwater + # @param [Integer] reset_flag + # @return [Integer] # @scope class attach_function :status, :sqlite3_status, [:int, :pointer, :pointer, :int], :int - # CAPI3REF: Database Connection Status - # + # ^This interface is used to retrieve runtime status information # about a single (database connection). ^The first argument is the # database connection object to be interrogated. ^The second argument @@ -6150,29 +5976,28 @@ class MutexMethods < FFI::Struct # determines the parameter to interrogate. The set of # (SQLITE_DBSTATUS options) is likely # to grow in future releases of SQLite. - # + # ^The current value of the requested parameter is written into *pCur # and the highest instantaneous value is written into *pHiwtr. ^If # the resetFlg is true, then the highest instantaneous value is # reset back down to the current value. - # + # ^The sqlite3_db_status() routine returns SQLITE_OK on success and a # non-zero (error code) on failure. - # + # See also: (sqlite3_status()) and (sqlite3_stmt_status()). - # + # @method db_status(sqlite3, op, p_cur, p_hiwtr, reset_flg) - # @param [Sqlite3] sqlite3 - # @param [Integer] op - # @param [FFI::Pointer(*Int)] p_cur - # @param [FFI::Pointer(*Int)] p_hiwtr - # @param [Integer] reset_flg - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @param [Integer] op + # @param [FFI::Pointer(*Int)] p_cur + # @param [FFI::Pointer(*Int)] p_hiwtr + # @param [Integer] reset_flg + # @return [Integer] # @scope class attach_function :db_status, :sqlite3_db_status, [Sqlite3, :int, :pointer, :pointer, :int], :int - # CAPI3REF: Prepared Statement Status - # + # ^(Each prepared statement maintains various # (SQLITE_STMTSTATUS counters) that measure the number # of times it has performed specific operations.)^ These counters can @@ -6181,7 +6006,7 @@ class MutexMethods < FFI::Struct # the number of table searches or result rows, that would tend to indicate # that the prepared statement is using a full table scan rather than # an index. - # + # ^(This interface is used to retrieve and reset counter values from # a (prepared statement). The first argument is the prepared statement # object to be interrogated. The second argument @@ -6190,33 +6015,32 @@ class MutexMethods < FFI::Struct # ^The current value of the requested counter is returned. # ^If the resetFlg is true, then the counter is reset to zero after this # interface call returns. - # + # See also: (sqlite3_status()) and (sqlite3_db_status()). - # + # @method stmt_status(stmt, op, reset_flg) - # @param [Stmt] stmt - # @param [Integer] op - # @param [Integer] reset_flg - # @return [Integer] + # @param [Stmt] stmt + # @param [Integer] op + # @param [Integer] reset_flg + # @return [Integer] # @scope class attach_function :stmt_status, :sqlite3_stmt_status, [Stmt, :int, :int], :int - # CAPI3REF: Custom Page Cache Object - # + # The sqlite3_pcache type is opaque. It is implemented by # the pluggable module. The SQLite core has no knowledge of # its size or internal structure and never deals with the # sqlite3_pcache object except by holding and passing pointers # to the object. - # + # See (sqlite3_pcache_methods) for additional information. class Pcache < FFI::Struct layout :dummy, :char end - + # CAPI3REF: Application Defined Page Cache. # KEYWORDS: {page cache} - # + # ^(The (sqlite3_config)((SQLITE_CONFIG_PCACHE), ...) interface can # register an alternative page cache implementation by passing in an # instance of the sqlite3_pcache_methods structure.)^ @@ -6228,16 +6052,16 @@ class Pcache < FFI::Struct # that memory is allocated and released, and the policies used to # determine exactly which parts of a database file are cached and for # how long. - # + # The alternative page cache mechanism is an # extreme measure that is only needed by the most demanding applications. # The built-in page cache is recommended for most uses. - # + # ^(The contents of the sqlite3_pcache_methods structure are copied to an # internal buffer by SQLite within the call to (sqlite3_config). Hence # the application may discard the parameter after the call to # (sqlite3_config()) returns.)^ - # + # ((the xInit() page cache method)) # ^(The xInit() method is called once for each effective # call to (sqlite3_initialize()))^ @@ -6248,22 +6072,22 @@ class Pcache < FFI::Struct # ^(If the xInit() method is NULL, then the # built-in default page cache is used instead of the application defined # page cache.)^ - # + # ((the xShutdown() page cache method)) # ^The xShutdown() method is called by (sqlite3_shutdown()). # It can be used to clean up # any outstanding resources before process shutdown, if required. # ^The xShutdown() method may be NULL. - # + # ^SQLite automatically serializes calls to the xInit method, # so the xInit method need not be threadsafe. ^The # xShutdown method is only called from (sqlite3_shutdown()) so it does # not need to be threadsafe either. All other methods must be threadsafe # in multithreaded applications. - # + # ^SQLite will never invoke xInit() more than once without an intervening # call to xShutdown(). - # + # ((the xCreate() page cache methods)) # ^SQLite invokes the xCreate() method to construct a new cache instance. # SQLite will typically create one cache instance for each open database file, @@ -6288,7 +6112,7 @@ class Pcache < FFI::Struct # false will always have the "discard" flag set to true. # ^Hence, a cache created with bPurgeable false will # never contain any unpinned pages. - # + # ((the xCachesize() page cache method)) # ^(The xCachesize() method may be called at any time by SQLite to set the # suggested maximum cache-size (number of pages stored by) the cache @@ -6296,11 +6120,11 @@ class Pcache < FFI::Struct # the SQLite "(PRAGMA cache_size)" command.)^ As with the bPurgeable # parameter, the implementation is not required to do anything with this # value; it is advisory only. - # + # ((the xPagecount() page cache methods)) # The xPagecount() method must return the number of pages currently # stored in the cache, both pinned and unpinned. - # + # ((the xFetch() page cache methods)) # The xFetch() method locates a page in the cache and returns a pointer to # the page, or a NULL pointer. @@ -6308,13 +6132,13 @@ class Pcache < FFI::Struct # 8-byte boundary. The page to be fetched is determined by the key. ^The # minimum key value is 1. After it has been retrieved using xFetch, the page # is considered to be "pinned". - # + # If the requested page is already in the page cache, then the page cache # implementation must return a pointer to the page buffer with its content # intact. If the requested page is not already in the cache, then the # cache implementation should use the value of the createFlag # parameter to help it determined what action to take: - # + # #
    createFlag Behaviour when page is not already in cache #
    0 Do not allocate a new page. Return NULL. @@ -6323,13 +6147,13 @@ class Pcache < FFI::Struct #
    2 Make every effort to allocate a new page. Only return # NULL if allocating a new page is effectively impossible. #
    - # + # ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1. SQLite # will only use a createFlag of 2 after a prior call with a createFlag of 1 # failed.)^ In between the to xFetch() calls, SQLite may # attempt to unpin one or more cache pages by spilling the content of # pinned pages to disk and synching the operating system disk cache. - # + # ((the xUnpin() page cache method)) # ^xUnpin() is called by SQLite with a pointer to a currently pinned page # as its second argument. If the third parameter, discard, is non-zero, @@ -6338,54 +6162,54 @@ class Pcache < FFI::Struct # zero, then the page may be discarded or retained at the discretion of # page cache implementation. ^The page cache implementation # may choose to evict unpinned pages at any time. - # + # The cache must not perform any reference counting. A single # call to xUnpin() unpins the page regardless of the number of prior calls # to xFetch(). - # + # ((the xRekey() page cache methods)) # The xRekey() method is used to change the key value associated with the # page passed as the second argument. If the cache # previously contains an entry associated with newKey, it must be # discarded. ^Any prior cache entry associated with newKey is guaranteed not # to be pinned. - # + # When SQLite calls the xTruncate() method, the cache must discard all # existing cache entries with page numbers (keys) greater than or equal # to the value of the iLimit parameter passed to xTruncate(). If any # of these pages are pinned, they are implicitly unpinned, meaning that # they can be safely discarded. - # + # ((the xDestroy() page cache method)) # ^The xDestroy() method is used to delete a cache allocated by xCreate(). # All resources associated with the specified cache should be freed. ^After # calling the xDestroy() method, SQLite considers the (sqlite3_pcache*) # handle invalid, and will not use it with any other sqlite3_pcache_methods # functions. - # + # = Fields: # :p_arg :: - # (FFI::Pointer(*Void)) + # (FFI::Pointer(*Void)) # :x_init :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_shutdown :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_create :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_cachesize :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_pagecount :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_fetch :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_unpin :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_rekey :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_truncate :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) # :x_destroy :: - # (FFI::Pointer(*)) + # (FFI::Pointer(*FunctionProto)) class PcacheMethods < FFI::Struct layout :p_arg, :pointer, :x_init, :pointer, @@ -6399,51 +6223,51 @@ class PcacheMethods < FFI::Struct :x_truncate, :pointer, :x_destroy, :pointer end - + # CAPI3REF: Online Backup Object - # + # The sqlite3_backup object records state information about an ongoing # online backup operation. ^The sqlite3_backup object is created by # a call to (sqlite3_backup_init()) and is destroyed by a call to # (sqlite3_backup_finish()). - # + # See Also: (Using the SQLite Online Backup API) module BackupWrappers - # @param [Integer] n_page - # @return [Integer] + # @param [Integer] n_page + # @return [Integer] def step(n_page) SQLite3.backup_step(self, n_page) end - - # @return [Integer] + + # @return [Integer] def finish() SQLite3.backup_finish(self) end - - # @return [Integer] + + # @return [Integer] def remaining() SQLite3.backup_remaining(self) end - - # @return [Integer] + + # @return [Integer] def pagecount() SQLite3.backup_pagecount(self) end end - + class Backup < FFI::Struct include BackupWrappers layout :dummy, :char end - + # CAPI3REF: Online Backup API. - # + # The backup API copies the content of one database into another. # It is useful either for creating backups of databases or # for copying in-memory databases to or from persistent files. - # + # See Also: (Using the SQLite Online Backup API) - # + # ^SQLite holds a write transaction open on the destination database file # for the duration of the backup operation. # ^The source database is read-locked only while it is being read; @@ -6451,7 +6275,7 @@ class Backup < FFI::Struct # ^Thus, the backup may be performed on a live source database without # preventing other database connections from # reading or writing to the source database while the backup is underway. - # + # ^(To perform a backup operation: #
      #
    1. sqlite3_backup_init() is called once to initialize the @@ -6463,9 +6287,9 @@ class Backup < FFI::Struct #
    )^ # There should be exactly one call to sqlite3_backup_finish() for each # successful call to sqlite3_backup_init(). - # + # ((sqlite3_backup_init())) sqlite3_backup_init() - # + # ^The D and N arguments to sqlite3_backup_init(D,N,S,M) are the # (database connection) associated with the destination database # and the database name, respectively. @@ -6478,7 +6302,7 @@ class Backup < FFI::Struct # ^The source and destination (database connections) (parameters S and D) # must be different or else sqlite3_backup_init(D,N,S,M) will fail with # an error. - # + # ^If an error occurs within sqlite3_backup_init(D,N,S,M), then NULL is # returned and an error code and error message are stored in the # destination (database connection) D. @@ -6490,9 +6314,9 @@ class Backup < FFI::Struct # ^The (sqlite3_backup) object may be used with the sqlite3_backup_step() and # sqlite3_backup_finish() functions to perform the specified backup # operation. - # + # ((sqlite3_backup_step())) sqlite3_backup_step() - # + # ^Function sqlite3_backup_step(B,N) will copy up to N pages between # the source and destination databases specified by (sqlite3_backup) object B. # ^If N is negative, all remaining source pages are copied. @@ -6505,7 +6329,7 @@ class Backup < FFI::Struct # (SQLITE_DONE), a call to sqlite3_backup_step() may return (SQLITE_READONLY), # (SQLITE_NOMEM), (SQLITE_BUSY), (SQLITE_LOCKED), or an # (SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX) extended error code. - # + # ^(The sqlite3_backup_step() might return (SQLITE_READONLY) if #
      #
    1. the destination database was opened read-only, or @@ -6514,7 +6338,7 @@ class Backup < FFI::Struct #
    2. the destination database is an in-memory database and the # destination and source page sizes differ. #
    )^ - # + # ^If sqlite3_backup_step() cannot obtain a required file-system lock, then # the (sqlite3_busy_handler | busy-handler function) # is invoked (if one is specified). ^If the @@ -6531,7 +6355,7 @@ class Backup < FFI::Struct # errors are considered fatal.)^ The application must accept # that the backup operation has failed and pass the backup operation handle # to the sqlite3_backup_finish() to release associated resources. - # + # ^The first call to sqlite3_backup_step() obtains an exclusive lock # on the destination file. ^The exclusive lock is not released until either # sqlite3_backup_finish() is called or the backup operation is complete @@ -6547,9 +6371,9 @@ class Backup < FFI::Struct # database is modified by the using the same database connection as is used # by the backup operation, then the backup database is automatically # updated at the same time. - # + # ((sqlite3_backup_finish())) sqlite3_backup_finish() - # + # When sqlite3_backup_step() has returned (SQLITE_DONE), or when the # application wishes to abandon the backup operation, the application # should destroy the (sqlite3_backup) by passing it to sqlite3_backup_finish(). @@ -6559,41 +6383,41 @@ class Backup < FFI::Struct # active write-transaction on the destination database is rolled back. # The (sqlite3_backup) object is invalid # and may not be used following a call to sqlite3_backup_finish(). - # + # ^The value returned by sqlite3_backup_finish is (SQLITE_OK) if no # sqlite3_backup_step() errors occurred, regardless or whether or not # sqlite3_backup_step() completed. # ^If an out-of-memory condition or IO error occurred during any prior # sqlite3_backup_step() call on the same (sqlite3_backup) object, then # sqlite3_backup_finish() returns the corresponding (error code). - # + # ^A return of (SQLITE_BUSY) or (SQLITE_LOCKED) from sqlite3_backup_step() # is not a permanent error and does not affect the return value of # sqlite3_backup_finish(). - # + # ((sqlite3_backup__remaining())) ((sqlite3_backup_pagecount())) # sqlite3_backup_remaining() and sqlite3_backup_pagecount() - # + # ^Each call to sqlite3_backup_step() sets two values inside # the (sqlite3_backup) object: the number of pages still to be backed # up and the total number of pages in the source database file. # The sqlite3_backup_remaining() and sqlite3_backup_pagecount() interfaces # retrieve these two values, respectively. - # + # ^The values returned by these functions are only updated by # sqlite3_backup_step(). ^If the source database is modified during a backup # operation, then the values are not updated to account for any extra # pages that need to be updated or the size of the source database file # changing. - # + # Concurrent Usage of Database Handles - # + # ^The source (database connection) may be used by the application for other # purposes while a backup operation is underway or being initialized. # ^If SQLite is compiled and configured to support threadsafe database # connections, then the source database connection may be used concurrently # from within other threads. - # + # However, the application must guarantee that the destination # (database connection) is not passed to any other API (by any thread) after # sqlite3_backup_init() is called and before the corresponding call to @@ -6602,65 +6426,60 @@ class Backup < FFI::Struct # and so no error code is reported, but the operations may malfunction # nevertheless. Use of the destination database connection while a # backup is in progress might also also cause a mutex deadlock. - # + # If running in (shared cache mode), the application must # guarantee that the shared cache used by the destination database # is not accessed while the backup is running. In practice this means # that the application must guarantee that the disk file being # backed up to is not accessed by any connection within the process, # not just the specific connection that was passed to sqlite3_backup_init(). - # + # The (sqlite3_backup) object itself is partially threadsafe. Multiple # threads may safely make multiple concurrent calls to sqlite3_backup_step(). # However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() # APIs are not strictly speaking threadsafe. If they are invoked at the # same time as another thread is invoking sqlite3_backup_step() it is # possible that they return invalid values. - # + # @method backup_init(p_dest, z_dest_name, p_source, z_source_name) - # @param [Sqlite3] p_dest - # @param [String] z_dest_name - # @param [Sqlite3] p_source - # @param [String] z_source_name - # @return [Backup] + # @param [Sqlite3] p_dest + # @param [String] z_dest_name + # @param [Sqlite3] p_source + # @param [String] z_source_name + # @return [Backup] # @scope class attach_function :backup_init, :sqlite3_backup_init, [Sqlite3, :string, Sqlite3, :string], Backup - # (Not documented) - # + # @method backup_step(p, n_page) - # @param [Backup] p - # @param [Integer] n_page - # @return [Integer] + # @param [Backup] p + # @param [Integer] n_page + # @return [Integer] # @scope class attach_function :backup_step, :sqlite3_backup_step, [Backup, :int], :int - # (Not documented) - # + # @method backup_finish(p) - # @param [Backup] p - # @return [Integer] + # @param [Backup] p + # @return [Integer] # @scope class attach_function :backup_finish, :sqlite3_backup_finish, [Backup], :int - # (Not documented) - # + # @method backup_remaining(p) - # @param [Backup] p - # @return [Integer] + # @param [Backup] p + # @return [Integer] # @scope class attach_function :backup_remaining, :sqlite3_backup_remaining, [Backup], :int - # (Not documented) - # + # @method backup_pagecount(p) - # @param [Backup] p - # @return [Integer] + # @param [Backup] p + # @return [Integer] # @scope class attach_function :backup_pagecount, :sqlite3_backup_pagecount, [Backup], :int - # CAPI3REF: Unlock Notification - # + # ^When running in shared-cache mode, a database operation may fail with # an (SQLITE_LOCKED) error if the required locks on the shared-cache or # individual tables within the shared-cache cannot be obtained. See @@ -6669,12 +6488,12 @@ class Backup < FFI::Struct # when the connection currently holding the required lock relinquishes it. # ^This API is only available if the library was compiled with the # (SQLITE_ENABLE_UNLOCK_NOTIFY) C-preprocessor symbol defined. - # + # See Also: (Using the SQLite Unlock Notification Feature). - # + # ^Shared-cache locks are released when a database connection concludes # its current transaction, either by committing it or rolling it back. - # + # ^When a connection (known as the blocked connection) fails to obtain a # shared-cache lock and SQLITE_LOCKED is returned to the caller, the # identity of the database connection (the blocking connection) that @@ -6685,18 +6504,18 @@ class Backup < FFI::Struct # when the blocking connections current transaction is concluded. ^The # callback is invoked from within the (sqlite3_step) or (sqlite3_close) # call that concludes the blocking connections transaction. - # + # ^(If sqlite3_unlock_notify() is called in a multi-threaded application, # there is a chance that the blocking connection will have already # concluded its transaction by the time sqlite3_unlock_notify() is invoked. # If this happens, then the specified callback is invoked immediately, # from within the call to sqlite3_unlock_notify().)^ - # + # ^If the blocked connection is attempting to obtain a write-lock on a # shared-cache table, and more than one other connection currently holds # a read-lock on the same table, then SQLite arbitrarily selects one of # the other connections to use as the blocking connection. - # + # ^(There may be at most one unlock-notify callback registered by a # blocked connection. If sqlite3_unlock_notify() is called when the # blocked connection already has a registered unlock-notify callback, @@ -6705,23 +6524,23 @@ class Backup < FFI::Struct # unlock-notify callback is canceled. ^The blocked connections # unlock-notify callback may also be canceled by closing the blocked # connection using (sqlite3_close()). - # + # The unlock-notify callback is not reentrant. If an application invokes # any sqlite3_xxx API functions from within an unlock-notify callback, a # crash or deadlock may be the result. - # + # ^Unless deadlock is detected (see below), sqlite3_unlock_notify() always # returns SQLITE_OK. - # + # Callback Invocation Details - # + # When an unlock-notify callback is registered, the application provides a # single void* pointer that is passed to the callback when it is invoked. # However, the signature of the callback function allows SQLite to pass # it an array of void* context pointers. The first argument passed to # an unlock-notify callback is a pointer to an array of void* pointers, # and the second is the number of entries in the array. - # + # When a blocking connections transaction is concluded, there may be # more than one blocked connection that has registered for an unlock-notify # callback. ^If two or more such blocked connections have specified the @@ -6730,9 +6549,9 @@ class Backup < FFI::Struct # specified by the blocked connections bundled together into an array. # This gives the application an opportunity to prioritize any actions # related to the set of unblocked database connections. - # + # Deadlock Detection - # + # Assuming that after registering for an unlock-notify callback a # database waits for the callback to be issued before taking any further # action (a reasonable assumption), then using this API may cause the @@ -6740,7 +6559,7 @@ class Backup < FFI::Struct # connection Y's transaction to be concluded, and similarly connection # Y is waiting on connection X's transaction, then neither connection # will proceed and the system may remain deadlocked indefinitely. - # + # To avoid this scenario, the sqlite3_unlock_notify() performs deadlock # detection. ^If a given call to sqlite3_unlock_notify() would put the # system in a deadlocked state, then SQLITE_LOCKED is returned and no @@ -6753,9 +6572,9 @@ class Backup < FFI::Struct # registered for an unlock-notify callback on the conclusion of connection # C's transaction, where connection C is waiting on connection A. ^Any # number of levels of indirection are allowed. - # + # The "DROP TABLE" Exception - # + # When a call to (sqlite3_step()) returns SQLITE_LOCKED, it is almost # always appropriate to call sqlite3_unlock_notify(). There is however, # one exception. When executing a "DROP TABLE" or "DROP INDEX" statement, @@ -6765,74 +6584,71 @@ class Backup < FFI::Struct # sqlite3_unlock_notify() results in the unlock-notify callback being # invoked immediately. If the application then re-attempts the "DROP TABLE" # or "DROP INDEX" query, an infinite loop might be the result. - # + # One way around this problem is to check the extended error code returned # by an sqlite3_step() call. ^(If there is a blocking connection, then the # extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in # the special "DROP TABLE/INDEX" case, the extended error code is just # SQLITE_LOCKED.)^ - # + # @method unlock_notify(p_blocked, x_notify, p_notify_arg) - # @param [Sqlite3] p_blocked - # @param [FFI::Pointer(*)] x_notify - # @param [FFI::Pointer(*Void)] p_notify_arg - # @return [Integer] + # @param [Sqlite3] p_blocked + # @param [FFI::Pointer(*FunctionProto)] x_notify + # @param [FFI::Pointer(*Void)] p_notify_arg + # @return [Integer] # @scope class attach_function :unlock_notify, :sqlite3_unlock_notify, [Sqlite3, :pointer, :pointer], :int - # CAPI3REF: String Comparison - # + # ^The (sqlite3_strnicmp()) API allows applications and extensions to # compare the contents of two buffers containing UTF-8 strings in a # case-independent fashion, using the same definition of case independence # that SQLite uses internally when comparing identifiers. - # + # @method strnicmp(string, string, int) - # @param [String] string - # @param [String] string - # @param [Integer] int - # @return [Integer] + # @param [String] string + # @param [String] string + # @param [Integer] int + # @return [Integer] # @scope class attach_function :strnicmp, :sqlite3_strnicmp, [:string, :string, :int], :int - # CAPI3REF: Error Logging Interface - # + # ^The (sqlite3_log()) interface writes a message into the error log # established by the (SQLITE_CONFIG_LOG) option to (sqlite3_config()). # ^If logging is enabled, the zFormat string and subsequent arguments are # used with (sqlite3_snprintf()) to generate the final output string. - # + # The sqlite3_log() interface is intended for use by extensions such as # virtual tables, collating functions, and SQL functions. While there is # nothing to prevent an application from calling sqlite3_log(), doing so # is considered bad form. - # + # The zFormat string must not be NULL. - # + # To avoid deadlocks and other threading problems, the sqlite3_log() routine # will not use dynamically allocated memory. The log message is stored in # a fixed-length buffer on the stack. If the log message is longer than # a few hundred characters, it will be truncated to the length of the # buffer. - # + # @method log(i_err_code, z_format) - # @param [Integer] i_err_code - # @param [String] z_format - # @return [nil] + # @param [Integer] i_err_code + # @param [String] z_format + # @return [nil] # @scope class attach_function :log, :sqlite3_log, [:int, :string], :void - # CAPI3REF: Write-Ahead Log Commit Hook - # + # ^The (sqlite3_wal_hook()) function is used to register a callback that # will be invoked each time a database connection commits data to a # (write-ahead log) (i.e. whenever a transaction is committed in # (journal_mode | journal_mode=WAL mode)). - # + # ^The callback is invoked by SQLite after the commit has taken place and # the associated write-lock on the database released, so the implementation # may read, write or (checkpoint) the database as required. - # + # ^The first parameter passed to the callback function when it is invoked # is a copy of the third parameter passed to sqlite3_wal_hook() when # registering the callback. ^The second is a copy of the database handle. @@ -6840,7 +6656,7 @@ class Backup < FFI::Struct # either "main" or the name of an (ATTACH)-ed database. ^The fourth parameter # is the number of pages currently in the write-ahead log file, # including those that were just committed. - # + # The callback function should normally return (SQLITE_OK). ^If an error # code is returned, that error will propagate back up through the # SQLite code base to cause the statement that provoked the callback @@ -6848,24 +6664,23 @@ class Backup < FFI::Struct # callback returns (SQLITE_ROW) or (SQLITE_DONE), or if it returns a value # that does not correspond to any valid SQLite error code, the results # are undefined. - # + # A single database handle may have at most a single write-ahead log callback # registered at one time. ^Calling (sqlite3_wal_hook()) replaces any # previously registered write-ahead log callback. ^Note that the # (sqlite3_wal_autocheckpoint()) interface and the # (wal_autocheckpoint pragma) both invoke (sqlite3_wal_hook()) and will # those overwrite any prior (sqlite3_wal_hook()) settings. - # - # @method wal_hook(sqlite3, , void) - # @param [Sqlite3] sqlite3 - # @param [FFI::Pointer(*)] - # @param [FFI::Pointer(*Void)] void - # @return [FFI::Pointer(*Void)] + + # @method wal_hook(sqlite3, functionproto, void) + # @param [Sqlite3] sqlite3 + # @param [FFI::Pointer(*FunctionProto)] functionproto + # @param [FFI::Pointer(*Void)] void + # @return [FFI::Pointer(*Void)] # @scope class attach_function :wal_hook, :sqlite3_wal_hook, [Sqlite3, :pointer, :pointer], :pointer - # CAPI3REF: Configure an auto-checkpoint - # + # ^The (sqlite3_wal_autocheckpoint(D,N)) is a wrapper around # (sqlite3_wal_hook()) that causes any database on (database connection) D # to automatically (checkpoint) @@ -6873,70 +6688,68 @@ class Backup < FFI::Struct # more frames in the (write-ahead log) file. ^Passing zero or # a negative value as the nFrame parameter disables automatic # checkpoints entirely. - # + # ^The callback registered by this function replaces any existing callback # registered using (sqlite3_wal_hook()). ^Likewise, registering a callback # using (sqlite3_wal_hook()) disables the automatic checkpoint mechanism # configured by this function. - # + # ^The (wal_autocheckpoint pragma) can be used to invoke this interface # from SQL. - # + # ^Every new (database connection) defaults to having the auto-checkpoint # enabled with a threshold of 1000 or (SQLITE_DEFAULT_WAL_AUTOCHECKPOINT) # pages. The use of this interface # is only necessary if the default setting is found to be suboptimal # for a particular application. - # + # @method wal_autocheckpoint(db, n) - # @param [Sqlite3] db - # @param [Integer] n - # @return [Integer] + # @param [Sqlite3] db + # @param [Integer] n + # @return [Integer] # @scope class attach_function :wal_autocheckpoint, :sqlite3_wal_autocheckpoint, [Sqlite3, :int], :int - # CAPI3REF: Checkpoint a database - # + # ^The (sqlite3_wal_checkpoint(D,X)) interface causes database named X # on (database connection) D to be (checkpointed). ^If X is NULL or an # empty string, then a checkpoint is run on all databases of # connection D. ^If the database connection D is not in # (WAL | write-ahead log mode) then this interface is a harmless no-op. - # + # ^The (wal_checkpoint pragma) can be used to invoke this interface # from SQL. ^The (sqlite3_wal_autocheckpoint()) interface and the # (wal_autocheckpoint pragma) can be used to cause this interface to be # run whenever the WAL reaches a certain size threshold. - # + # See also: (sqlite3_wal_checkpoint_v2()) - # + # @method wal_checkpoint(db, z_db) - # @param [Sqlite3] db - # @param [String] z_db - # @return [Integer] + # @param [Sqlite3] db + # @param [String] z_db + # @return [Integer] # @scope class attach_function :wal_checkpoint, :sqlite3_wal_checkpoint, [Sqlite3, :string], :int - # CAPI3REF: Checkpoint a database - # + # Run a checkpoint operation on WAL database zDb attached to database # handle db. The specific operation is determined by the value of the # eMode parameter: - # + #
    #
    SQLITE_CHECKPOINT_PASSIVE
    # Checkpoint as many frames as possible without waiting for any database # readers or writers to finish. Sync the db file if all frames in the log # are checkpointed. This mode is the same as calling # sqlite3_wal_checkpoint(). The busy-handler callback is never invoked. - # + #
    SQLITE_CHECKPOINT_FULL
    # This mode blocks (calls the busy-handler callback) until there is no # database writer and all readers are reading from the most recent database # snapshot. It then checkpoints all frames in the log file and syncs the # database file. This call blocks database writers while it is running, # but not database readers. - # + #
    SQLITE_CHECKPOINT_RESTART
    # This mode works the same way as SQLITE_CHECKPOINT_FULL, except after # checkpointing the log file it blocks (calls the busy-handler callback) @@ -6945,7 +6758,7 @@ class Backup < FFI::Struct # from the beginning. This call blocks database writers while it is running, # but not database readers. #
    - # + # If pnLog is not NULL, then *pnLog is set to the total number of frames in # the log file before returning. If pnCkpt is not NULL, then *pnCkpt is set to # the total number of checkpointed frames (including any that were already @@ -6953,12 +6766,12 @@ class Backup < FFI::Struct # populated even if sqlite3_wal_checkpoint_v2() returns other than SQLITE_OK. # If no values are available because of an error, they are both set to -1 # before returning to communicate this to the caller. - # + # All calls obtain an exclusive "checkpoint" lock on the database file. If # any other process is running a checkpoint operation at the same time, the # lock cannot be obtained and SQLITE_BUSY is returned. Even if there is a # busy-handler configured, it will not be invoked in this case. - # + # The SQLITE_CHECKPOINT_FULL and RESTART modes also obtain the exclusive # "writer" lock on the database file. If the writer lock cannot be obtained # immediately, and a busy-handler is configured, it is invoked and the writer @@ -6969,7 +6782,7 @@ class Backup < FFI::Struct # checkpoint operation proceeds from that point in the same way as # SQLITE_CHECKPOINT_PASSIVE - checkpointing as many frames as possible # without blocking any further. SQLITE_BUSY is returned in this case. - # + # If parameter zDb is NULL or points to a zero length string, then the # specified operation is attempted on all WAL databases. In this case the # values written to output parameters *pnLog and *pnCkpt are undefined. If @@ -6980,86 +6793,82 @@ class Backup < FFI::Struct # and the error code returned to the caller immediately. If no error # (SQLITE_BUSY or otherwise) is encountered while processing the attached # databases, SQLITE_OK is returned. - # + # If database zDb is the name of an attached database that is not in WAL # mode, SQLITE_OK is returned and both *pnLog and *pnCkpt set to -1. If # zDb is not NULL (or a zero length string) and is not the name of any # attached database, SQLITE_ERROR is returned to the caller. - # + # @method wal_checkpoint_v2(db, z_db, e_mode, pn_log, pn_ckpt) - # @param [Sqlite3] db - # @param [String] z_db - # @param [Integer] e_mode - # @param [FFI::Pointer(*Int)] pn_log - # @param [FFI::Pointer(*Int)] pn_ckpt - # @return [Integer] + # @param [Sqlite3] db + # @param [String] z_db + # @param [Integer] e_mode + # @param [FFI::Pointer(*Int)] pn_log + # @param [FFI::Pointer(*Int)] pn_ckpt + # @return [Integer] # @scope class attach_function :wal_checkpoint_v2, :sqlite3_wal_checkpoint_v2, [Sqlite3, :string, :int, :pointer, :pointer], :int - # CAPI3REF: Virtual Table Interface Configuration - # + # This function may be called by either the (xConnect) or (xCreate) method # of a (virtual table) implementation to configure # various facets of the virtual table interface. - # + # If this interface is invoked outside the context of an xConnect or # xCreate virtual table method then the behavior is undefined. - # + # At present, there is only one option that may be configured using # this function. (See (SQLITE_VTAB_CONSTRAINT_SUPPORT).) Further options # may be added in the future. - # + # @method vtab_config(sqlite3, op) - # @param [Sqlite3] sqlite3 - # @param [Integer] op - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @param [Integer] op + # @return [Integer] # @scope class attach_function :vtab_config, :sqlite3_vtab_config, [Sqlite3, :int], :int - # CAPI3REF: Determine The Virtual Table Conflict Policy - # + # This function may only be called from within a call to the (xUpdate) method # of a (virtual table) implementation for an INSERT or UPDATE operation. ^The # value returned is one of (SQLITE_ROLLBACK), (SQLITE_IGNORE), (SQLITE_FAIL), # (SQLITE_ABORT), or (SQLITE_REPLACE), according to the (ON CONFLICT) mode # of the SQL statement that triggered the call to the (xUpdate) method of the # (virtual table). - # + # @method vtab_on_conflict(sqlite3) - # @param [Sqlite3] sqlite3 - # @return [Integer] + # @param [Sqlite3] sqlite3 + # @return [Integer] # @scope class attach_function :vtab_on_conflict, :sqlite3_vtab_on_conflict, [Sqlite3], :int - # Register a geometry callback named zGeom that can be used as part of an # R-Tree geometry query as follows: - # + # SELECT ... FROM WHERE MATCH $zGeom(... params ...) - # + # @method rtree_geometry_callback(db, z_geom, x_geom, p_context) - # @param [Sqlite3] db - # @param [String] z_geom - # @param [FFI::Pointer(*)] x_geom - # @param [FFI::Pointer(*Void)] p_context - # @return [Integer] + # @param [Sqlite3] db + # @param [String] z_geom + # @param [FFI::Pointer(*FunctionProto)] x_geom + # @param [FFI::Pointer(*Void)] p_context + # @return [Integer] # @scope class attach_function :rtree_geometry_callback, :sqlite3_rtree_geometry_callback, [Sqlite3, :string, :pointer, :pointer], :int - # 2010 August 30 - # + # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: - # + # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. - # - # - # - # + + + + # A pointer to a structure of the following type is passed as the first # argument to callbacks registered using rtree_geometry_callback(). - # + # = Fields: # :p_context :: # (FFI::Pointer(*Void)) Copy of pContext passed to s_r_g_c() @@ -7070,7 +6879,7 @@ class Backup < FFI::Struct # :p_user :: # (FFI::Pointer(*Void)) Callback implementation user data # :x_del_user :: - # (FFI::Pointer(*)) Called by SQLite to clean up pUser + # (FFI::Pointer(*FunctionProto)) Called by SQLite to clean up pUser class RtreeGeometry < FFI::Struct layout :p_context, :pointer, :n_param, :int, @@ -7078,5 +6887,5 @@ class RtreeGeometry < FFI::Struct :p_user, :pointer, :x_del_user, :pointer end - + end