diff options
Diffstat (limited to 'lib/oldwrappers')
64 files changed, 91871 insertions, 0 deletions
diff --git a/lib/oldwrappers/cairo/cairo.nim b/lib/oldwrappers/cairo/cairo.nim new file mode 100644 index 000000000..6da8183f3 --- /dev/null +++ b/lib/oldwrappers/cairo/cairo.nim @@ -0,0 +1,698 @@ + +#* cairo - a vector graphics library with display and print output +# * +# * Copyright © 2002 University of Southern California +# * Copyright © 2005 Red Hat, Inc. +# * +# * This library is free software; you can redistribute it and/or +# * modify it either under the terms of the GNU Lesser General Public +# * License version 2.1 as published by the Free Software Foundation +# * (the "LGPL") or, at your option, under the terms of the Mozilla +# * Public License Version 1.1 (the "MPL"). If you do not alter this +# * notice, a recipient may use your version of this file under either +# * the MPL or the LGPL. +# * +# * You should have received a copy of the LGPL along with this library +# * in the file COPYING-LGPL-2.1; if not, write to the Free Software +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# * You should have received a copy of the MPL along with this library +# * in the file COPYING-MPL-1.1 +# * +# * The contents of this file are subject to the Mozilla Public License +# * Version 1.1 (the "License"); you may not use this file except in +# * compliance with the License. You may obtain a copy of the License at +# * http://www.mozilla.org/MPL/ +# * +# * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY +# * OF ANY KIND, either express or implied. See the LGPL or the MPL for +# * the specific language governing rights and limitations. +# * +# * The Original Code is the cairo graphics library. +# * +# * The Initial Developer of the Original Code is University of Southern +# * California. +# * +# * Contributor(s): +# * Carl D. Worth <cworth@cworth.org> +# #* +# * This FreePascal binding generated August 26, 2005 +# * by Jeffrey Pohlmeyer <yetanothergeek@yahoo.com> +# + +# +# - Updated to cairo version 1.4 +# - Grouped OS specific fuctions in separated units +# - Organized the functions by group and ordered exactly as the c header +# - Cleared parameter list syntax according to pascal standard +# +# By Luiz Américo Pereira Câmara +# October 2007 +# + +when defined(windows): + const + LIB_CAIRO* = "cairo.dll" +else: + const + LIB_CAIRO* = "libcairo.so" + +type + PByte = cstring + TCairoStatus* = enum + CAIRO_STATUS_SUCCESS = 0, CAIRO_STATUS_NO_MEMORY, + CAIRO_STATUS_INVALID_RESTORE, CAIRO_STATUS_INVALID_POP_GROUP, + CAIRO_STATUS_NO_CURRENT_POINT, CAIRO_STATUS_INVALID_MATRIX, + CAIRO_STATUS_INVALID_STATUS, CAIRO_STATUS_NULL_POINTER, + CAIRO_STATUS_INVALID_STRING, CAIRO_STATUS_INVALID_PATH_DATA, + CAIRO_STATUS_READ_ERROR, CAIRO_STATUS_WRITE_ERROR, + CAIRO_STATUS_SURFACE_FINISHED, CAIRO_STATUS_SURFACE_TYPE_MISMATCH, + CAIRO_STATUS_PATTERN_TYPE_MISMATCH, CAIRO_STATUS_INVALID_CONTENT, + CAIRO_STATUS_INVALID_FORMAT, CAIRO_STATUS_INVALID_VISUAL, + CAIRO_STATUS_FILE_NOT_FOUND, CAIRO_STATUS_INVALID_DASH + TCairoOperator* = enum + CAIRO_OPERATOR_CLEAR, CAIRO_OPERATOR_SOURCE, CAIRO_OPERATOR_OVER, + CAIRO_OPERATOR_IN, CAIRO_OPERATOR_OUT, CAIRO_OPERATOR_ATOP, + CAIRO_OPERATOR_DEST, CAIRO_OPERATOR_DEST_OVER, CAIRO_OPERATOR_DEST_IN, + CAIRO_OPERATOR_DEST_OUT, CAIRO_OPERATOR_DEST_ATOP, CAIRO_OPERATOR_XOR, + CAIRO_OPERATOR_ADD, CAIRO_OPERATOR_SATURATE + TCairoAntialias* = enum + CAIRO_ANTIALIAS_DEFAULT, CAIRO_ANTIALIAS_NONE, CAIRO_ANTIALIAS_GRAY, + CAIRO_ANTIALIAS_SUBPIXEL + TCairoFillRule* = enum + CAIRO_FILL_RULE_WINDING, CAIRO_FILL_RULE_EVEN_ODD + TCairoLineCap* = enum + CAIRO_LINE_CAP_BUTT, CAIRO_LINE_CAP_ROUND, CAIRO_LINE_CAP_SQUARE + TCairoLineJoin* = enum + CAIRO_LINE_JOIN_MITER, CAIRO_LINE_JOIN_ROUND, CAIRO_LINE_JOIN_BEVEL + TCairoFontSlant* = enum + CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_SLANT_OBLIQUE + TCairoFontWeight* = enum + CAIRO_FONT_WEIGHT_NORMAL, CAIRO_FONT_WEIGHT_BOLD + TCairoSubpixelOrder* = enum + CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_SUBPIXEL_ORDER_RGB, + CAIRO_SUBPIXEL_ORDER_BGR, CAIRO_SUBPIXEL_ORDER_VRGB, + CAIRO_SUBPIXEL_ORDER_VBGR + TCairoHintStyle* = enum + CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_STYLE_NONE, CAIRO_HINT_STYLE_SLIGHT, + CAIRO_HINT_STYLE_MEDIUM, CAIRO_HINT_STYLE_FULL + TCairoHintMetrics* = enum + CAIRO_HINT_METRICS_DEFAULT, CAIRO_HINT_METRICS_OFF, CAIRO_HINT_METRICS_ON + TCairoPathDataType* = enum + CAIRO_PATH_MOVE_TO, CAIRO_PATH_LINE_TO, CAIRO_PATH_CURVE_TO, + CAIRO_PATH_CLOSE_PATH + TCairoContent* = enum + CAIRO_CONTENT_COLOR = 0x00001000, CAIRO_CONTENT_ALPHA = 0x00002000, + CAIRO_CONTENT_COLOR_ALPHA = 0x00003000 + TCairoFormat* = enum + CAIRO_FORMAT_ARGB32, CAIRO_FORMAT_RGB24, CAIRO_FORMAT_A8, CAIRO_FORMAT_A1 + TCairoExtend* = enum + CAIRO_EXTEND_NONE, CAIRO_EXTEND_REPEAT, CAIRO_EXTEND_REFLECT, + CAIRO_EXTEND_PAD + TCairoFilter* = enum + CAIRO_FILTER_FAST, CAIRO_FILTER_GOOD, CAIRO_FILTER_BEST, + CAIRO_FILTER_NEAREST, CAIRO_FILTER_BILINEAR, CAIRO_FILTER_GAUSSIAN + TCairoFontType* = enum + CAIRO_FONT_TYPE_TOY, CAIRO_FONT_TYPE_FT, CAIRO_FONT_TYPE_WIN32, + CAIRO_FONT_TYPE_ATSUI + TCairoPatternType* = enum + CAIRO_PATTERN_TYPE_SOLID, CAIRO_PATTERN_TYPE_SURFACE, + CAIRO_PATTERN_TYPE_LINEAR, CAIRO_PATTERN_TYPE_RADIAL + TCairoSurfaceType* = enum + CAIRO_SURFACE_TYPE_IMAGE, CAIRO_SURFACE_TYPE_PDF, CAIRO_SURFACE_TYPE_PS, + CAIRO_SURFACE_TYPE_XLIB, CAIRO_SURFACE_TYPE_XCB, CAIRO_SURFACE_TYPE_GLITZ, + CAIRO_SURFACE_TYPE_QUARTZ, CAIRO_SURFACE_TYPE_WIN32, + CAIRO_SURFACE_TYPE_BEOS, CAIRO_SURFACE_TYPE_DIRECTFB, + CAIRO_SURFACE_TYPE_SVG, CAIRO_SURFACE_TYPE_OS2 + TCairoSvgVersion* = enum + CAIRO_SVG_VERSION_1_1, CAIRO_SVG_VERSION_1_2 + PCairoSurface* = ptr TCairoSurface + PPCairoSurface* = ptr PCairoSurface + PCairo* = ptr TCairo + PCairoPattern* = ptr TCairoPattern + PCairoFontOptions* = ptr TCairoFontOptions + PCairoFontFace* = ptr TCairoFontFace + PCairoScaledFont* = ptr TCairoScaledFont + PCairoBool* = ptr TCairoBool + TCairoBool* = int32 + PCairoMatrix* = ptr TCairoMatrix + PCairoUserDataKey* = ptr TCairoUserDataKey + PCairoGlyph* = ptr TCairoGlyph + PCairoTextExtents* = ptr TCairoTextExtents + PCairoFontExtents* = ptr TCairoFontExtents + PCairoPathDataType* = ptr TCairoPathDataType + PCairoPathData* = ptr TCairoPathData + PCairoPath* = ptr TCairoPath + PCairoRectangle* = ptr TCairoRectangle + PCairoRectangleList* = ptr TCairoRectangleList + TCairoDestroyFunc* = proc (data: Pointer){.cdecl.} + TCairoWriteFunc* = proc (closure: Pointer, data: PByte, len: int32): TCairoStatus{. + cdecl.} + TCairoReadFunc* = proc (closure: Pointer, data: PByte, len: int32): TCairoStatus{. + cdecl.} + TCairo* {.final.} = object #OPAQUE + TCairoSurface* {.final.} = object #OPAQUE + TCairoPattern* {.final.} = object #OPAQUE + TCairoScaledFont* {.final.} = object #OPAQUE + TCairoFontFace* {.final.} = object #OPAQUE + TCairoFontOptions* {.final.} = object #OPAQUE + TCairoMatrix* {.final.} = object + xx: float64 + yx: float64 + xy: float64 + yy: float64 + x0: float64 + y0: float64 + + TCairoUserDataKey* {.final.} = object + unused: int32 + + TCairoGlyph* {.final.} = object + index: int32 + x: float64 + y: float64 + + TCairoTextExtents* {.final.} = object + x_bearing: float64 + y_bearing: float64 + width: float64 + height: float64 + x_advance: float64 + y_advance: float64 + + TCairoFontExtents* {.final.} = object + ascent: float64 + descent: float64 + height: float64 + max_x_advance: float64 + max_y_advance: float64 + + TCairoPathData* {.final.} = object #* _type : TCairoPathDataType; + # length : LongInt; + # end + x: float64 + y: float64 + + TCairoPath* {.final.} = object + status: TCairoStatus + data: PCairoPathData + num_data: int32 + + TCairoRectangle* {.final.} = object + x, y, width, height: float64 + + TCairoRectangleList* {.final.} = object + status: TCairoStatus + rectangles: PCairoRectangle + num_rectangles: int32 + + +proc cairo_version*(): int32{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_version_string*(): cstring{.cdecl, importc, dynlib: LIB_CAIRO.} + #Helper function to retrieve decoded version +proc cairo_version*(major, minor, micro: var int32) + #* Functions for manipulating state objects +proc cairo_create*(target: PCairoSurface): PCairo{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_reference*(cr: PCairo): PCairo{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_destroy*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_get_reference_count*(cr: PCairo): int32{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_get_user_data*(cr: PCairo, key: PCairoUserDataKey): pointer{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_set_user_data*(cr: PCairo, key: PCairoUserDataKey, + user_data: Pointer, destroy: TCairoDestroyFunc): TCairoStatus{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_save*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_restore*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_push_group*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_push_group_with_content*(cr: PCairo, content: TCairoContent){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pop_group*(cr: PCairo): PCairoPattern{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pop_group_to_source*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} + #* Modify state +proc cairo_set_operator*(cr: PCairo, op: TCairoOperator){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_set_source*(cr: PCairo, source: PCairoPattern){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_set_source_rgb*(cr: PCairo, red, green, blue: float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_set_source_rgba*(cr: PCairo, red, green, blue, alpha: float64){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_set_source_surface*(cr: PCairo, surface: PCairoSurface, + x, y: float64){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_set_tolerance*(cr: PCairo, tolerance: float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_set_antialias*(cr: PCairo, antialias: TCairoAntialias){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_set_fill_rule*(cr: PCairo, fill_rule: TCairoFillRule){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_set_line_width*(cr: PCairo, width: float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_set_line_cap*(cr: PCairo, line_cap: TCairoLineCap){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_set_line_join*(cr: PCairo, line_join: TCairoLineJoin){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_set_dash*(cr: PCairo, dashes: openarray[float64], + offset: float64){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_set_miter_limit*(cr: PCairo, limit: float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_translate*(cr: PCairo, tx, ty: float64){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_scale*(cr: PCairo, sx, sy: float64){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_rotate*(cr: PCairo, angle: float64){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_transform*(cr: PCairo, matrix: PCairoMatrix){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_set_matrix*(cr: PCairo, matrix: PCairoMatrix){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_identity_matrix*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_user_to_device*(cr: PCairo, x, y: var float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_user_to_device_distance*(cr: PCairo, dx, dy: var float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_device_to_user*(cr: PCairo, x, y: var float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_device_to_user_distance*(cr: PCairo, dx, dy: var float64){.cdecl, importc, + dynlib: LIB_CAIRO.} + #* Path creation functions +proc cairo_new_path*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_move_to*(cr: PCairo, x, y: float64){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_new_sub_path*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_line_to*(cr: PCairo, x, y: float64){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_curve_to*(cr: PCairo, x1, y1, x2, y2, x3, y3: float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_arc*(cr: PCairo, xc, yc, radius, angle1, angle2: float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_arc_negative*(cr: PCairo, xc, yc, radius, angle1, angle2: float64){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_rel_move_to*(cr: PCairo, dx, dy: float64){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_rel_line_to*(cr: PCairo, dx, dy: float64){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_rel_curve_to*(cr: PCairo, dx1, dy1, dx2, dy2, dx3, dy3: float64){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_rectangle*(cr: PCairo, x, y, width, height: float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_close_path*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} + #* Painting functions +proc cairo_paint*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_paint_with_alpha*(cr: PCairo, alpha: float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_mask*(cr: PCairo, pattern: PCairoPattern){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_mask_surface*(cr: PCairo, surface: PCairoSurface, + surface_x, surface_y: float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_stroke*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_stroke_preserve*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_fill*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_fill_preserve*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_copy_page*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_show_page*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} + #* Insideness testing +proc cairo_in_stroke*(cr: PCairo, x, y: float64): TCairoBool{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_in_fill*(cr: PCairo, x, y: float64): TCairoBool{.cdecl, importc, + dynlib: LIB_CAIRO.} + #* Rectangular extents +proc cairo_stroke_extents*(cr: PCairo, x1, y1, x2, y2: var float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_fill_extents*(cr: PCairo, x1, y1, x2, y2: var float64){.cdecl, importc, + dynlib: LIB_CAIRO.} + #* Clipping +proc cairo_reset_clip*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_clip*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_clip_preserve*(cr: PCairo){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_clip_extents*(cr: PCairo, x1, y1, x2, y2: var float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_copy_clip_rectangle_list*(cr: PCairo): PCairoRectangleList{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_rectangle_list_destroy*(rectangle_list: PCairoRectangleList){. + cdecl, importc, dynlib: LIB_CAIRO.} + #* Font/Text functions +proc cairo_font_options_create*(): PCairoFontOptions{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_font_options_copy*(original: PCairoFontOptions): PCairoFontOptions{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_font_options_destroy*(options: PCairoFontOptions){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_font_options_status*(options: PCairoFontOptions): TCairoStatus{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_font_options_merge*(options, other: PCairoFontOptions){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_font_options_equal*(options, other: PCairoFontOptions): TCairoBool{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_font_options_hash*(options: PCairoFontOptions): int32{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_font_options_set_antialias*(options: PCairoFontOptions, + antialias: TCairoAntialias){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_font_options_get_antialias*(options: PCairoFontOptions): TCairoAntialias{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_font_options_set_subpixel_order*(options: PCairoFontOptions, + subpixel_order: TCairoSubpixelOrder){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_font_options_get_subpixel_order*(options: PCairoFontOptions): TCairoSubpixelOrder{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_font_options_set_hint_style*(options: PCairoFontOptions, + hint_style: TCairoHintStyle){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_font_options_get_hint_style*(options: PCairoFontOptions): TCairoHintStyle{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_font_options_set_hint_metrics*(options: PCairoFontOptions, + hint_metrics: TCairoHintMetrics){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_font_options_get_hint_metrics*(options: PCairoFontOptions): TCairoHintMetrics{. + cdecl, importc, dynlib: LIB_CAIRO.} + #* This interface is for dealing with text as text, not caring about the + # font object inside the the TCairo. +proc cairo_select_font_face*(cr: PCairo, family: cstring, + slant: TCairoFontSlant, + weight: TCairoFontWeight){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_set_font_size*(cr: PCairo, size: float64){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_set_font_matrix*(cr: PCairo, matrix: PCairoMatrix){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_get_font_matrix*(cr: PCairo, matrix: PCairoMatrix){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_set_font_options*(cr: PCairo, options: PCairoFontOptions){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_get_font_options*(cr: PCairo, options: PCairoFontOptions){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_set_font_face*(cr: PCairo, font_face: PCairoFontFace){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_get_font_face*(cr: PCairo): PCairoFontFace{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_set_scaled_font*(cr: PCairo, scaled_font: PCairoScaledFont){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_get_scaled_font*(cr: PCairo): PCairoScaledFont{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_show_text*(cr: PCairo, utf8: cstring){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_show_glyphs*(cr: PCairo, glyphs: PCairoGlyph, num_glyphs: int32){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_text_path*(cr: PCairo, utf8: cstring){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_glyph_path*(cr: PCairo, glyphs: PCairoGlyph, num_glyphs: int32){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_text_extents*(cr: PCairo, utf8: cstring, + extents: PCairoTextExtents){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_glyph_extents*(cr: PCairo, glyphs: PCairoGlyph, + num_glyphs: int32, extents: PCairoTextExtents){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_font_extents*(cr: PCairo, extents: PCairoFontExtents){.cdecl, importc, + dynlib: LIB_CAIRO.} + #* Generic identifier for a font style +proc cairo_font_face_reference*(font_face: PCairoFontFace): PCairoFontFace{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_font_face_destroy*(font_face: PCairoFontFace){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_font_face_get_reference_count*(font_face: PCairoFontFace): int32{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_font_face_status*(font_face: PCairoFontFace): TCairoStatus{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_font_face_get_type*(font_face: PCairoFontFace): TCairoFontType{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_font_face_get_user_data*(font_face: PCairoFontFace, + key: PCairoUserDataKey): pointer{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_font_face_set_user_data*(font_face: PCairoFontFace, + key: PCairoUserDataKey, + user_data: pointer, + destroy: TCairoDestroyFunc): TCairoStatus{. + cdecl, importc, dynlib: LIB_CAIRO.} + #* Portable interface to general font features +proc cairo_scaled_font_create*(font_face: PCairoFontFace, + font_matrix: PCairoMatrix, + ctm: PCairoMatrix, + options: PCairoFontOptions): PCairoScaledFont{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_scaled_font_reference*(scaled_font: PCairoScaledFont): PCairoScaledFont{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_scaled_font_destroy*(scaled_font: PCairoScaledFont){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_scaled_font_get_reference_count*(scaled_font: PCairoScaledFont): int32{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_scaled_font_status*(scaled_font: PCairoScaledFont): TCairoStatus{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_scaled_font_get_type*(scaled_font: PCairoScaledFont): TCairoFontType{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_scaled_font_get_user_data*(scaled_font: PCairoScaledFont, + key: PCairoUserDataKey): Pointer{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_scaled_font_set_user_data*(scaled_font: PCairoScaledFont, + key: PCairoUserDataKey, + user_data: Pointer, + destroy: TCairoDestroyFunc): TCairoStatus{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_scaled_font_extents*(scaled_font: PCairoScaledFont, + extents: PCairoFontExtents){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_scaled_font_text_extents*(scaled_font: PCairoScaledFont, + utf8: cstring, + extents: PCairoTextExtents){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_scaled_font_glyph_extents*(scaled_font: PCairoScaledFont, + glyphs: PCairoGlyph, num_glyphs: int32, + extents: PCairoTextExtents){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_scaled_font_get_font_face*(scaled_font: PCairoScaledFont): PCairoFontFace{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_scaled_font_get_font_matrix*(scaled_font: PCairoScaledFont, + font_matrix: PCairoMatrix){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_scaled_font_get_ctm*(scaled_font: PCairoScaledFont, + ctm: PCairoMatrix){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_scaled_font_get_font_options*(scaled_font: PCairoScaledFont, + options: PCairoFontOptions){.cdecl, importc, dynlib: LIB_CAIRO.} + #* Query functions +proc cairo_get_operator*(cr: PCairo): TCairoOperator{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_get_source*(cr: PCairo): PCairoPattern{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_get_tolerance*(cr: PCairo): float64{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_get_antialias*(cr: PCairo): TCairoAntialias{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_get_current_point*(cr: PCairo, x, y: var float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_get_fill_rule*(cr: PCairo): TCairoFillRule{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_get_line_width*(cr: PCairo): float64{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_get_line_cap*(cr: PCairo): TCairoLineCap{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_get_line_join*(cr: PCairo): TCairoLineJoin{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_get_miter_limit*(cr: PCairo): float64{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_get_dash_count*(cr: PCairo): int32{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_get_dash*(cr: PCairo, dashes, offset: var float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_get_matrix*(cr: PCairo, matrix: PCairoMatrix){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_get_target*(cr: PCairo): PCairoSurface{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_get_group_target*(cr: PCairo): PCairoSurface{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_copy_path*(cr: PCairo): PCairoPath{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_copy_path_flat*(cr: PCairo): PCairoPath{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_append_path*(cr: PCairo, path: PCairoPath){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_path_destroy*(path: PCairoPath){.cdecl, importc, dynlib: LIB_CAIRO.} + #* Error status queries +proc cairo_status*(cr: PCairo): TCairoStatus{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_status_to_string*(status: TCairoStatus): cstring{.cdecl, importc, + dynlib: LIB_CAIRO.} + #* Surface manipulation +proc cairo_surface_create_similar*(other: PCairoSurface, + content: TCairoContent, + width, height: int32): PCairoSurface{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_surface_reference*(surface: PCairoSurface): PCairoSurface{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_surface_finish*(surface: PCairoSurface){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_surface_destroy*(surface: PCairoSurface){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_surface_get_reference_count*(surface: PCairoSurface): int32{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_surface_status*(surface: PCairoSurface): TCairoStatus{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_surface_get_type*(surface: PCairoSurface): TCairoSurfaceType{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_surface_get_content*(surface: PCairoSurface): TCairoContent{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_surface_write_to_png*(surface: PCairoSurface, filename: cstring): TCairoStatus{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_surface_write_to_png_stream*(surface: PCairoSurface, + write_func: TCairoWriteFunc, + closure: pointer): TCairoStatus{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_surface_get_user_data*(surface: PCairoSurface, + key: PCairoUserDataKey): pointer{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_surface_set_user_data*(surface: PCairoSurface, + key: PCairoUserDataKey, + user_data: pointer, + destroy: TCairoDestroyFunc): TCairoStatus{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_surface_get_font_options*(surface: PCairoSurface, + options: PCairoFontOptions){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_surface_flush*(surface: PCairoSurface){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_surface_mark_dirty*(surface: PCairoSurface){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_surface_mark_dirty_rectangle*(surface: PCairoSurface, + x, y, width, height: int32){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_surface_set_device_offset*(surface: PCairoSurface, + x_offset, y_offset: float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_surface_get_device_offset*(surface: PCairoSurface, + x_offset, y_offset: var float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_surface_set_fallback_resolution*(surface: PCairoSurface, + x_pixels_per_inch, y_pixels_per_inch: float64){.cdecl, importc, dynlib: LIB_CAIRO.} + #* Image-surface functions +proc cairo_image_surface_create*(format: TCairoFormat, width, height: int32): PCairoSurface{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_image_surface_create_for_data*(data: Pbyte, format: TCairoFormat, + width, height, stride: int32): PCairoSurface{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_image_surface_get_data*(surface: PCairoSurface): cstring{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_image_surface_get_format*(surface: PCairoSurface): TCairoFormat{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_image_surface_get_width*(surface: PCairoSurface): int32{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_image_surface_get_height*(surface: PCairoSurface): int32{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_image_surface_get_stride*(surface: PCairoSurface): int32{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_image_surface_create_from_png*(filename: cstring): PCairoSurface{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_image_surface_create_from_png_stream*(read_func: TCairoReadFunc, + closure: pointer): PCairoSurface{.cdecl, importc, dynlib: LIB_CAIRO.} + #* Pattern creation functions +proc cairo_pattern_create_rgb*(red, green, blue: float64): PCairoPattern{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_create_rgba*(red, green, blue, alpha: float64): PCairoPattern{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_create_for_surface*(surface: PCairoSurface): PCairoPattern{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_create_linear*(x0, y0, x1, y1: float64): PCairoPattern{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_create_radial*(cx0, cy0, radius0, cx1, cy1, radius1: float64): PCairoPattern{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_reference*(pattern: PCairoPattern): PCairoPattern{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_destroy*(pattern: PCairoPattern){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_get_reference_count*(pattern: PCairoPattern): int32{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_status*(pattern: PCairoPattern): TCairoStatus{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_pattern_get_user_data*(pattern: PCairoPattern, + key: PCairoUserDataKey): Pointer{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_pattern_set_user_data*(pattern: PCairoPattern, + key: PCairoUserDataKey, + user_data: Pointer, + destroy: TCairoDestroyFunc): TCairoStatus{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_get_type*(pattern: PCairoPattern): TCairoPatternType{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_add_color_stop_rgb*(pattern: PCairoPattern, + offset, red, green, blue: float64){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_add_color_stop_rgba*(pattern: PCairoPattern, offset, red, + green, blue, alpha: float64){.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_set_matrix*(pattern: PCairoPattern, + matrix: PCairoMatrix){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_pattern_get_matrix*(pattern: PCairoPattern, + matrix: PCairoMatrix){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_pattern_set_extend*(pattern: PCairoPattern, extend: TCairoExtend){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_get_extend*(pattern: PCairoPattern): TCairoExtend{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_set_filter*(pattern: PCairoPattern, filter: TCairoFilter){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_get_filter*(pattern: PCairoPattern): TCairoFilter{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_get_rgba*(pattern: PCairoPattern, + red, green, blue, alpha: var float64): TCairoStatus{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_get_surface*(pattern: PCairoPattern, + surface: PPCairoSurface): TCairoStatus{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_get_color_stop_rgba*(pattern: PCairoPattern, index: int32, + offset, red, green, blue, alpha: var float64): TCairoStatus{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_pattern_get_color_stop_count*(pattern: PCairoPattern, + count: var int32): TCairoStatus{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_get_linear_points*(pattern: PCairoPattern, + x0, y0, x1, y1: var float64): TCairoStatus{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pattern_get_radial_circles*(pattern: PCairoPattern, + x0, y0, r0, x1, y1, r1: var float64): TCairoStatus{. + cdecl, importc, dynlib: LIB_CAIRO.} + #* Matrix functions +proc cairo_matrix_init*(matrix: PCairoMatrix, xx, yx, xy, yy, x0, y0: float64){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_matrix_init_identity*(matrix: PCairoMatrix){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_matrix_init_translate*(matrix: PCairoMatrix, tx, ty: float64){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_matrix_init_scale*(matrix: PCairoMatrix, sx, sy: float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_matrix_init_rotate*(matrix: PCairoMatrix, radians: float64){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_matrix_translate*(matrix: PCairoMatrix, tx, ty: float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_matrix_scale*(matrix: PCairoMatrix, sx, sy: float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_matrix_rotate*(matrix: PCairoMatrix, radians: float64){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_matrix_invert*(matrix: PCairoMatrix): TCairoStatus{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_matrix_multiply*(result, a, b: PCairoMatrix){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_matrix_transform_distance*(matrix: PCairoMatrix, dx, dy: var float64){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_matrix_transform_point*(matrix: PCairoMatrix, x, y: var float64){. + cdecl, importc, dynlib: LIB_CAIRO.} + #* PDF functions +proc cairo_pdf_surface_create*(filename: cstring, + width_in_points, height_in_points: float64): PCairoSurface{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pdf_surface_create_for_stream*(write_func: TCairoWriteFunc, + closure: Pointer, width_in_points, height_in_points: float64): PCairoSurface{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_pdf_surface_set_size*(surface: PCairoSurface, + width_in_points, height_in_points: float64){. + cdecl, importc, dynlib: LIB_CAIRO.} + #* PS functions +proc cairo_ps_surface_create*(filename: cstring, + width_in_points, height_in_points: float64): PCairoSurface{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_ps_surface_create_for_stream*(write_func: TCairoWriteFunc, + closure: Pointer, width_in_points, height_in_points: float64): PCairoSurface{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_ps_surface_set_size*(surface: PCairoSurface, + width_in_points, height_in_points: float64){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_ps_surface_dsc_comment*(surface: PCairoSurface, comment: cstring){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_ps_surface_dsc_begin_setup*(surface: PCairoSurface){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_ps_surface_dsc_begin_page_setup*(surface: PCairoSurface){.cdecl, importc, + dynlib: LIB_CAIRO.} + #* SVG functions +proc cairo_svg_surface_create*(filename: cstring, + width_in_points, height_in_points: float64): PCairoSurface{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_svg_surface_create_for_stream*(write_func: TCairoWriteFunc, + closure: Pointer, width_in_points, height_in_points: float64): PCairoSurface{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_svg_surface_restrict_to_version*(surface: PCairoSurface, + version: TCairoSvgVersion){.cdecl, importc, dynlib: LIB_CAIRO.} + #todo: see how translate this + #procedure cairo_svg_get_versions(TCairoSvgVersion const **versions, + # int *num_versions); +proc cairo_svg_version_to_string*(version: TCairoSvgVersion): cstring{.cdecl, importc, + dynlib: LIB_CAIRO.} + #* Functions to be used while debugging (not intended for use in production code) +proc cairo_debug_reset_static_data*(){.cdecl, importc, dynlib: LIB_CAIRO.} +# implementation + +proc cairo_version(major, minor, micro: var int32) = + var version: int32 + version = cairo_version() + major = version div 10000'i32 + minor = (version mod (major * 10000'i32)) div 100'i32 + micro = (version mod ((major * 10000'i32) + (minor * 100'i32))) diff --git a/lib/oldwrappers/cairo/cairoft.nim b/lib/oldwrappers/cairo/cairoft.nim new file mode 100644 index 000000000..2418aa922 --- /dev/null +++ b/lib/oldwrappers/cairo/cairoft.nim @@ -0,0 +1,36 @@ +# +# Translation of cairo-ft.h +# by Jeffrey Pohlmeyer +# updated to version 1.4 by Luiz Américo Pereira Câmara 2007 +# + +import cairo, freetypeh + +#todo: properly define FcPattern: +#It will require translate FontConfig header + +#* +#typedef struct _XftPattern { +# int num; +# int size; +# XftPatternElt *elts; +# } XftPattern; +# typedef FcPattern XftPattern; +# + +type + FcPattern* = Pointer + PFcPattern* = ptr FcPattern + +proc cairo_ft_font_face_create_for_pattern*(pattern: PFcPattern): PCairoFontFace{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_ft_font_options_substitute*(options: PCairoFontOptions, + pattern: PFcPattern){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_ft_font_face_create_for_ft_face*(face: TFT_Face, + load_flags: int32): PCairoFontFace {.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_ft_scaled_font_lock_face*( + scaled_font: PCairoScaledFont): TFT_Face{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_ft_scaled_font_unlock_face*( + scaled_font: PCairoScaledFont){.cdecl, importc, dynlib: LIB_CAIRO.} + diff --git a/lib/oldwrappers/cairo/cairowin32.nim b/lib/oldwrappers/cairo/cairowin32.nim new file mode 100644 index 000000000..5d07c2611 --- /dev/null +++ b/lib/oldwrappers/cairo/cairowin32.nim @@ -0,0 +1,36 @@ + +# +# Translation of cairo-win32.h version 1.4 +# by Luiz Américo Pereira Câmara 2007 +# + +import + Cairo, windows + +proc cairo_win32_surface_create*(hdc: HDC): PCairoSurface{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_win32_surface_create_with_ddb*(hdc: HDC, format: TCairoFormat, + width, height: int32): PCairoSurface{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_win32_surface_create_with_dib*(format: TCairoFormat, + width, height: int32): PCairoSurface{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_win32_surface_get_dc*(surface: PCairoSurface): HDC{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_win32_surface_get_image*(surface: PCairoSurface): PCairoSurface{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_win32_font_face_create_for_logfontw*(logfont: pLOGFONTW): PCairoFontFace{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_win32_font_face_create_for_hfont*(font: HFONT): PCairoFontFace{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_win32_scaled_font_select_font*(scaled_font: PCairoScaledFont, + hdc: HDC): TCairoStatus{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_win32_scaled_font_done_font*(scaled_font: PCairoScaledFont){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_win32_scaled_font_get_metrics_factor*( + scaled_font: PCairoScaledFont): float64{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_win32_scaled_font_get_logical_to_device*( + scaled_font: PCairoScaledFont, logical_to_device: PCairoMatrix){. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_win32_scaled_font_get_device_to_logical*( + scaled_font: PCairoScaledFont, device_to_logical: PCairoMatrix){. + cdecl, importc, dynlib: LIB_CAIRO.} +# implementation diff --git a/lib/oldwrappers/cairo/cairoxlib.nim b/lib/oldwrappers/cairo/cairoxlib.nim new file mode 100644 index 000000000..dfe44eb87 --- /dev/null +++ b/lib/oldwrappers/cairo/cairoxlib.nim @@ -0,0 +1,40 @@ + +# +# Translation of cairo-xlib.h version 1.4 +# by Jeffrey Pohlmeyer +# updated to version 1.4 by Luiz Américo Pereira Câmara 2007 +# + +import + Cairo, x, xlib, xrender + +proc cairo_xlib_surface_create*(dpy: PDisplay, drawable: TDrawable, + visual: PVisual, width, height: int32): PCairoSurface{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_xlib_surface_create_for_bitmap*(dpy: PDisplay, bitmap: TPixmap, + screen: PScreen, width, height: int32): PCairoSurface{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_xlib_surface_create_with_xrender_format*(dpy: PDisplay, + drawable: TDrawable, screen: PScreen, format: PXRenderPictFormat, + width, height: int32): PCairoSurface{.cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_xlib_surface_get_depth*(surface: PCairoSurface): int32{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_xlib_surface_get_display*(surface: PCairoSurface): PDisplay{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_xlib_surface_get_drawable*(surface: PCairoSurface): TDrawable{. + cdecl, importc, dynlib: LIB_CAIRO.} +proc cairo_xlib_surface_get_height*(surface: PCairoSurface): int32{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_xlib_surface_get_screen*(surface: PCairoSurface): PScreen{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_xlib_surface_get_visual*(surface: PCairoSurface): PVisual{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_xlib_surface_get_width*(surface: PCairoSurface): int32{.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_xlib_surface_set_size*(surface: PCairoSurface, + width, height: int32){.cdecl, importc, + dynlib: LIB_CAIRO.} +proc cairo_xlib_surface_set_drawable*(surface: PCairoSurface, + drawable: TDrawable, width, height: int32){. + cdecl, importc, dynlib: LIB_CAIRO.} +# implementation diff --git a/lib/oldwrappers/gtk/atk.nim b/lib/oldwrappers/gtk/atk.nim new file mode 100644 index 000000000..ae7a34c4b --- /dev/null +++ b/lib/oldwrappers/gtk/atk.nim @@ -0,0 +1,1369 @@ +{.deadCodeElim: on.} + +import + glib2 + +when defined(windows): + const + atklib = "libatk-1.0-0.dll" +else: + const + atklib = "libatk-1.0.so" +type + PAtkImplementor* = pointer + PAtkAction* = pointer + PAtkComponent* = pointer + PAtkDocument* = pointer + PAtkEditableText* = pointer + PAtkHypertext* = pointer + PAtkImage* = pointer + PAtkSelection* = pointer + PAtkStreamableContent* = pointer + PAtkTable* = pointer + PAtkText* = pointer + PAtkValue* = pointer + PAtkRelationSet* = ptr TAtkRelationSet + PAtkStateSet* = ptr TAtkStateSet + PAtkAttributeSet* = ptr TAtkAttributeSet + PAtkCoordType* = ptr TAtkCoordType + TAtkCoordType* = enum + ATK_XY_SCREEN, ATK_XY_WINDOW + PAtkRole* = ptr TAtkRole + TAtkRole* = enum + ATK_ROLE_INVALID, ATK_ROLE_ACCEL_LABEL, ATK_ROLE_ALERT, ATK_ROLE_ANIMATION, + ATK_ROLE_ARROW, ATK_ROLE_CALENDAR, ATK_ROLE_CANVAS, ATK_ROLE_CHECK_BOX, + ATK_ROLE_CHECK_MENU_ITEM, ATK_ROLE_COLOR_CHOOSER, ATK_ROLE_COLUMN_HEADER, + ATK_ROLE_COMBO_BOX, ATK_ROLE_DATE_EDITOR, ATK_ROLE_DESKTOP_ICON, + ATK_ROLE_DESKTOP_FRAME, ATK_ROLE_DIAL, ATK_ROLE_DIALOG, + ATK_ROLE_DIRECTORY_PANE, ATK_ROLE_DRAWING_AREA, ATK_ROLE_FILE_CHOOSER, + ATK_ROLE_FILLER, ATK_ROLE_FONT_CHOOSER, ATK_ROLE_FRAME, ATK_ROLE_GLASS_PANE, + ATK_ROLE_HTML_CONTAINER, ATK_ROLE_ICON, ATK_ROLE_IMAGE, + ATK_ROLE_INTERNAL_FRAME, ATK_ROLE_LABEL, ATK_ROLE_LAYERED_PANE, + ATK_ROLE_LIST, ATK_ROLE_LIST_ITEM, ATK_ROLE_MENU, ATK_ROLE_MENU_BAR, + ATK_ROLE_MENU_ITEM, ATK_ROLE_OPTION_PANE, ATK_ROLE_PAGE_TAB, + ATK_ROLE_PAGE_TAB_LIST, ATK_ROLE_PANEL, ATK_ROLE_PASSWORD_TEXT, + ATK_ROLE_POPUP_MENU, ATK_ROLE_PROGRESS_BAR, ATK_ROLE_PUSH_BUTTON, + ATK_ROLE_RADIO_BUTTON, ATK_ROLE_RADIO_MENU_ITEM, ATK_ROLE_ROOT_PANE, + ATK_ROLE_ROW_HEADER, ATK_ROLE_SCROLL_BAR, ATK_ROLE_SCROLL_PANE, + ATK_ROLE_SEPARATOR, ATK_ROLE_SLIDER, ATK_ROLE_SPLIT_PANE, + ATK_ROLE_SPIN_BUTTON, ATK_ROLE_STATUSBAR, ATK_ROLE_TABLE, + ATK_ROLE_TABLE_CELL, ATK_ROLE_TABLE_COLUMN_HEADER, + ATK_ROLE_TABLE_ROW_HEADER, ATK_ROLE_TEAR_OFF_MENU_ITEM, ATK_ROLE_TERMINAL, + ATK_ROLE_TEXT, ATK_ROLE_TOGGLE_BUTTON, ATK_ROLE_TOOL_BAR, ATK_ROLE_TOOL_TIP, + ATK_ROLE_TREE, ATK_ROLE_TREE_TABLE, ATK_ROLE_UNKNOWN, ATK_ROLE_VIEWPORT, + ATK_ROLE_WINDOW, ATK_ROLE_LAST_DEFINED + PAtkLayer* = ptr TAtkLayer + TAtkLayer* = enum + ATK_LAYER_INVALID, ATK_LAYER_BACKGROUND, ATK_LAYER_CANVAS, ATK_LAYER_WIDGET, + ATK_LAYER_MDI, ATK_LAYER_POPUP, ATK_LAYER_OVERLAY + PAtkPropertyValues* = ptr TAtkPropertyValues + TAtkPropertyValues* {.final, pure.} = object + property_name*: cstring + old_value*: TGValue + new_value*: TGValue + + TAtkFunction* = proc (data: gpointer): gboolean{.cdecl.} + PAtkObject* = ptr TAtkObject + PPAtkObject* = ptr PAtkObject + TAtkObject* = object of TGObject + description*: cstring + name*: cstring + accessible_parent*: PAtkObject + role*: TAtkRole + relation_set*: PAtkRelationSet + layer*: TAtkLayer + + TAtkPropertyChangeHandler* = proc (para1: PAtkObject, + para2: PAtkPropertyValues){.cdecl.} + PAtkObjectClass* = ptr TAtkObjectClass + TAtkObjectClass* = object of TGObjectClass + get_name*: proc (accessible: PAtkObject): cstring{.cdecl.} + get_description*: proc (accessible: PAtkObject): cstring{.cdecl.} + get_parent*: proc (accessible: PAtkObject): PAtkObject{.cdecl.} + get_n_children*: proc (accessible: PAtkObject): gint{.cdecl.} + ref_child*: proc (accessible: PAtkObject, i: gint): PAtkObject{.cdecl.} + get_index_in_parent*: proc (accessible: PAtkObject): gint{.cdecl.} + ref_relation_set*: proc (accessible: PAtkObject): PAtkRelationSet{.cdecl.} + get_role*: proc (accessible: PAtkObject): TAtkRole{.cdecl.} + get_layer*: proc (accessible: PAtkObject): TAtkLayer{.cdecl.} + get_mdi_zorder*: proc (accessible: PAtkObject): gint{.cdecl.} + ref_state_set*: proc (accessible: PAtkObject): PAtkStateSet{.cdecl.} + set_name*: proc (accessible: PAtkObject, name: cstring){.cdecl.} + set_description*: proc (accessible: PAtkObject, description: cstring){.cdecl.} + set_parent*: proc (accessible: PAtkObject, parent: PAtkObject){.cdecl.} + set_role*: proc (accessible: PAtkObject, role: TAtkRole){.cdecl.} + connect_property_change_handler*: proc (accessible: PAtkObject, + handler: TAtkPropertyChangeHandler): guint{.cdecl.} + remove_property_change_handler*: proc (accessible: PAtkObject, + handler_id: guint){.cdecl.} + initialize*: proc (accessible: PAtkObject, data: gpointer){.cdecl.} + children_changed*: proc (accessible: PAtkObject, change_index: guint, + changed_child: gpointer){.cdecl.} + focus_event*: proc (accessible: PAtkObject, focus_in: gboolean){.cdecl.} + property_change*: proc (accessible: PAtkObject, values: PAtkPropertyValues){. + cdecl.} + state_change*: proc (accessible: PAtkObject, name: cstring, + state_set: gboolean){.cdecl.} + visible_data_changed*: proc (accessible: PAtkObject){.cdecl.} + pad1*: TAtkFunction + pad2*: TAtkFunction + pad3*: TAtkFunction + pad4*: TAtkFunction + + PAtkImplementorIface* = ptr TAtkImplementorIface + TAtkImplementorIface* = object of TGTypeInterface + ref_accessible*: proc (implementor: PAtkImplementor): PAtkObject{.cdecl.} + + PAtkActionIface* = ptr TAtkActionIface + TAtkActionIface* = object of TGTypeInterface + do_action*: proc (action: PAtkAction, i: gint): gboolean{.cdecl.} + get_n_actions*: proc (action: PAtkAction): gint{.cdecl.} + get_description*: proc (action: PAtkAction, i: gint): cstring{.cdecl.} + get_name*: proc (action: PAtkAction, i: gint): cstring{.cdecl.} + get_keybinding*: proc (action: PAtkAction, i: gint): cstring{.cdecl.} + set_description*: proc (action: PAtkAction, i: gint, desc: cstring): gboolean{. + cdecl.} + pad1*: TAtkFunction + pad2*: TAtkFunction + + TAtkFocusHandler* = proc (para1: PAtkObject, para2: gboolean){.cdecl.} + PAtkComponentIface* = ptr TAtkComponentIface + TAtkComponentIface* = object of TGTypeInterface + add_focus_handler*: proc (component: PAtkComponent, + handler: TAtkFocusHandler): guint{.cdecl.} + contains*: proc (component: PAtkComponent, x: gint, y: gint, + coord_type: TAtkCoordType): gboolean{.cdecl.} + ref_accessible_at_point*: proc (component: PAtkComponent, x: gint, y: gint, + coord_type: TAtkCoordType): PAtkObject{. + cdecl.} + get_extents*: proc (component: PAtkComponent, x: Pgint, y: Pgint, + width: Pgint, height: Pgint, coord_type: TAtkCoordType){. + cdecl.} + get_position*: proc (component: PAtkComponent, x: Pgint, y: Pgint, + coord_type: TAtkCoordType){.cdecl.} + get_size*: proc (component: PAtkComponent, width: Pgint, height: Pgint){. + cdecl.} + grab_focus*: proc (component: PAtkComponent): gboolean{.cdecl.} + remove_focus_handler*: proc (component: PAtkComponent, handler_id: guint){. + cdecl.} + set_extents*: proc (component: PAtkComponent, x: gint, y: gint, width: gint, + height: gint, coord_type: TAtkCoordType): gboolean{. + cdecl.} + set_position*: proc (component: PAtkComponent, x: gint, y: gint, + coord_type: TAtkCoordType): gboolean{.cdecl.} + set_size*: proc (component: PAtkComponent, width: gint, height: gint): gboolean{. + cdecl.} + get_layer*: proc (component: PAtkComponent): TAtkLayer{.cdecl.} + get_mdi_zorder*: proc (component: PAtkComponent): gint{.cdecl.} + pad1*: TAtkFunction + pad2*: TAtkFunction + + PAtkDocumentIface* = ptr TAtkDocumentIface + TAtkDocumentIface* = object of TGTypeInterface + get_document_type*: proc (document: PAtkDocument): cstring{.cdecl.} + get_document*: proc (document: PAtkDocument): gpointer{.cdecl.} + pad1*: TAtkFunction + pad2*: TAtkFunction + pad3*: TAtkFunction + pad4*: TAtkFunction + pad5*: TAtkFunction + pad6*: TAtkFunction + pad7*: TAtkFunction + pad8*: TAtkFunction + + PAtkEditableTextIface* = ptr TAtkEditableTextIface + TAtkEditableTextIface* = object of TGTypeInterface + set_run_attributes*: proc (text: PAtkEditableText, + attrib_set: PAtkAttributeSet, start_offset: gint, + end_offset: gint): gboolean{.cdecl.} + set_text_contents*: proc (text: PAtkEditableText, `string`: cstring){.cdecl.} + insert_text*: proc (text: PAtkEditableText, `string`: cstring, length: gint, + position: Pgint){.cdecl.} + copy_text*: proc (text: PAtkEditableText, start_pos: gint, end_pos: gint){. + cdecl.} + cut_text*: proc (text: PAtkEditableText, start_pos: gint, end_pos: gint){. + cdecl.} + delete_text*: proc (text: PAtkEditableText, start_pos: gint, end_pos: gint){. + cdecl.} + paste_text*: proc (text: PAtkEditableText, position: gint){.cdecl.} + pad1*: TAtkFunction + pad2*: TAtkFunction + + PAtkGObjectAccessible* = ptr TAtkGObjectAccessible + TAtkGObjectAccessible* = object of TAtkObject + + PAtkGObjectAccessibleClass* = ptr TAtkGObjectAccessibleClass + TAtkGObjectAccessibleClass* = object of TAtkObjectClass + pad5*: TAtkFunction + pad6*: TAtkFunction + + PAtkHyperlink* = ptr TAtkHyperlink + TAtkHyperlink* = object of TGObject + + PAtkHyperlinkClass* = ptr TAtkHyperlinkClass + TAtkHyperlinkClass* = object of TGObjectClass + get_uri*: proc (link: PAtkHyperlink, i: gint): cstring{.cdecl.} + get_object*: proc (link: PAtkHyperlink, i: gint): PAtkObject{.cdecl.} + get_end_index*: proc (link: PAtkHyperlink): gint{.cdecl.} + get_start_index*: proc (link: PAtkHyperlink): gint{.cdecl.} + is_valid*: proc (link: PAtkHyperlink): gboolean{.cdecl.} + get_n_anchors*: proc (link: PAtkHyperlink): gint{.cdecl.} + pad7*: TAtkFunction + pad8*: TAtkFunction + pad9*: TAtkFunction + pad10*: TAtkFunction + + PAtkHypertextIface* = ptr TAtkHypertextIface + TAtkHypertextIface* = object of TGTypeInterface + get_link*: proc (hypertext: PAtkHypertext, link_index: gint): PAtkHyperlink{. + cdecl.} + get_n_links*: proc (hypertext: PAtkHypertext): gint{.cdecl.} + get_link_index*: proc (hypertext: PAtkHypertext, char_index: gint): gint{. + cdecl.} + pad11*: TAtkFunction + pad12*: TAtkFunction + pad13*: TAtkFunction + pad14*: TAtkFunction + + PAtkImageIface* = ptr TAtkImageIface + TAtkImageIface* = object of TGTypeInterface + get_image_position*: proc (image: PAtkImage, x: Pgint, y: Pgint, + coord_type: TAtkCoordType){.cdecl.} + get_image_description*: proc (image: PAtkImage): cstring{.cdecl.} + get_image_size*: proc (image: PAtkImage, width: Pgint, height: Pgint){.cdecl.} + set_image_description*: proc (image: PAtkImage, description: cstring): gboolean{. + cdecl.} + pad15*: TAtkFunction + pad16*: TAtkFunction + + PAtkObjectFactory* = ptr TAtkObjectFactory + TAtkObjectFactory* = object of TGObject + + PAtkObjectFactoryClass* = ptr TAtkObjectFactoryClass + TAtkObjectFactoryClass* = object of TGObjectClass + create_accessible*: proc (obj: PGObject): PAtkObject{.cdecl.} + invalidate*: proc (factory: PAtkObjectFactory){.cdecl.} + get_accessible_type*: proc (): GType{.cdecl.} + pad17*: TAtkFunction + pad18*: TAtkFunction + + PAtkRegistry* = ptr TAtkRegistry + TAtkRegistry* = object of TGObject + factory_type_registry*: PGHashTable + factory_singleton_cache*: PGHashTable + + PAtkRegistryClass* = ptr TAtkRegistryClass + TAtkRegistryClass* = object of TGObjectClass + + PAtkRelationType* = ptr TAtkRelationType + TAtkRelationType* = enum + ATK_RELATION_NULL, ATK_RELATION_CONTROLLED_BY, ATK_RELATION_CONTROLLER_FOR, + ATK_RELATION_LABEL_FOR, ATK_RELATION_LABELLED_BY, ATK_RELATION_MEMBER_OF, + ATK_RELATION_NODE_CHILD_OF, ATK_RELATION_LAST_DEFINED + PAtkRelation* = ptr TAtkRelation + PGPtrArray = pointer + TAtkRelation* = object of TGObject + target*: PGPtrArray + relationship*: TAtkRelationType + + PAtkRelationClass* = ptr TAtkRelationClass + TAtkRelationClass* = object of TGObjectClass + + TAtkRelationSet* = object of TGObject + relations*: PGPtrArray + + PAtkRelationSetClass* = ptr TAtkRelationSetClass + TAtkRelationSetClass* = object of TGObjectClass + pad19*: TAtkFunction + pad20*: TAtkFunction + + PAtkSelectionIface* = ptr TAtkSelectionIface + TAtkSelectionIface* = object of TGTypeInterface + add_selection*: proc (selection: PAtkSelection, i: gint): gboolean{.cdecl.} + clear_selection*: proc (selection: PAtkSelection): gboolean{.cdecl.} + ref_selection*: proc (selection: PAtkSelection, i: gint): PAtkObject{.cdecl.} + get_selection_count*: proc (selection: PAtkSelection): gint{.cdecl.} + is_child_selected*: proc (selection: PAtkSelection, i: gint): gboolean{. + cdecl.} + remove_selection*: proc (selection: PAtkSelection, i: gint): gboolean{.cdecl.} + select_all_selection*: proc (selection: PAtkSelection): gboolean{.cdecl.} + selection_changed*: proc (selection: PAtkSelection){.cdecl.} + pad1*: TAtkFunction + pad2*: TAtkFunction + + PAtkStateType* = ptr TAtkStateType + TAtkStateType* = enum + ATK_STATE_INVALID, ATK_STATE_ACTIVE, ATK_STATE_ARMED, ATK_STATE_BUSY, + ATK_STATE_CHECKED, ATK_STATE_DEFUNCT, ATK_STATE_EDITABLE, ATK_STATE_ENABLED, + ATK_STATE_EXPANDABLE, ATK_STATE_EXPANDED, ATK_STATE_FOCUSABLE, + ATK_STATE_FOCUSED, ATK_STATE_HORIZONTAL, ATK_STATE_ICONIFIED, + ATK_STATE_MODAL, ATK_STATE_MULTI_LINE, ATK_STATE_MULTISELECTABLE, + ATK_STATE_OPAQUE, ATK_STATE_PRESSED, ATK_STATE_RESIZABLE, + ATK_STATE_SELECTABLE, ATK_STATE_SELECTED, ATK_STATE_SENSITIVE, + ATK_STATE_SHOWING, ATK_STATE_SINGLE_LINE, ATK_STATE_STALE, + ATK_STATE_TRANSIENT, ATK_STATE_VERTICAL, ATK_STATE_VISIBLE, + ATK_STATE_LAST_DEFINED + PAtkState* = ptr TAtkState + TAtkState* = guint64 + TAtkStateSet* = object of TGObject + + PAtkStateSetClass* = ptr TAtkStateSetClass + TAtkStateSetClass* = object of TGObjectClass + + PAtkStreamableContentIface* = ptr TAtkStreamableContentIface + TAtkStreamableContentIface* = object of TGTypeInterface + get_n_mime_types*: proc (streamable: PAtkStreamableContent): gint{.cdecl.} + get_mime_type*: proc (streamable: PAtkStreamableContent, i: gint): cstring{. + cdecl.} + get_stream*: proc (streamable: PAtkStreamableContent, mime_type: cstring): PGIOChannel{. + cdecl.} + pad21*: TAtkFunction + pad22*: TAtkFunction + pad23*: TAtkFunction + pad24*: TAtkFunction + + PAtkTableIface* = ptr TAtkTableIface + TAtkTableIface* = object of TGTypeInterface + ref_at*: proc (table: PAtkTable, row: gint, column: gint): PAtkObject{.cdecl.} + get_index_at*: proc (table: PAtkTable, row: gint, column: gint): gint{.cdecl.} + get_column_at_index*: proc (table: PAtkTable, index: gint): gint{.cdecl.} + get_row_at_index*: proc (table: PAtkTable, index: gint): gint{.cdecl.} + get_n_columns*: proc (table: PAtkTable): gint{.cdecl.} + get_n_rows*: proc (table: PAtkTable): gint{.cdecl.} + get_column_extent_at*: proc (table: PAtkTable, row: gint, column: gint): gint{. + cdecl.} + get_row_extent_at*: proc (table: PAtkTable, row: gint, column: gint): gint{. + cdecl.} + get_caption*: proc (table: PAtkTable): PAtkObject{.cdecl.} + get_column_description*: proc (table: PAtkTable, column: gint): cstring{. + cdecl.} + get_column_header*: proc (table: PAtkTable, column: gint): PAtkObject{.cdecl.} + get_row_description*: proc (table: PAtkTable, row: gint): cstring{.cdecl.} + get_row_header*: proc (table: PAtkTable, row: gint): PAtkObject{.cdecl.} + get_summary*: proc (table: PAtkTable): PAtkObject{.cdecl.} + set_caption*: proc (table: PAtkTable, caption: PAtkObject){.cdecl.} + set_column_description*: proc (table: PAtkTable, column: gint, + description: cstring){.cdecl.} + set_column_header*: proc (table: PAtkTable, column: gint, header: PAtkObject){. + cdecl.} + set_row_description*: proc (table: PAtkTable, row: gint, description: cstring){. + cdecl.} + set_row_header*: proc (table: PAtkTable, row: gint, header: PAtkObject){. + cdecl.} + set_summary*: proc (table: PAtkTable, accessible: PAtkObject){.cdecl.} + get_selected_columns*: proc (table: PAtkTable, selected: PPgint): gint{. + cdecl.} + get_selected_rows*: proc (table: PAtkTable, selected: PPgint): gint{.cdecl.} + is_column_selected*: proc (table: PAtkTable, column: gint): gboolean{.cdecl.} + is_row_selected*: proc (table: PAtkTable, row: gint): gboolean{.cdecl.} + is_selected*: proc (table: PAtkTable, row: gint, column: gint): gboolean{. + cdecl.} + add_row_selection*: proc (table: PAtkTable, row: gint): gboolean{.cdecl.} + remove_row_selection*: proc (table: PAtkTable, row: gint): gboolean{.cdecl.} + add_column_selection*: proc (table: PAtkTable, column: gint): gboolean{. + cdecl.} + remove_column_selection*: proc (table: PAtkTable, column: gint): gboolean{. + cdecl.} + row_inserted*: proc (table: PAtkTable, row: gint, num_inserted: gint){.cdecl.} + column_inserted*: proc (table: PAtkTable, column: gint, num_inserted: gint){. + cdecl.} + row_deleted*: proc (table: PAtkTable, row: gint, num_deleted: gint){.cdecl.} + column_deleted*: proc (table: PAtkTable, column: gint, num_deleted: gint){. + cdecl.} + row_reordered*: proc (table: PAtkTable){.cdecl.} + column_reordered*: proc (table: PAtkTable){.cdecl.} + model_changed*: proc (table: PAtkTable){.cdecl.} + pad25*: TAtkFunction + pad26*: TAtkFunction + pad27*: TAtkFunction + pad28*: TAtkFunction + + TAtkAttributeSet* = TGSList + PAtkAttribute* = ptr TAtkAttribute + TAtkAttribute* {.final, pure.} = object + name*: cstring + value*: cstring + + PAtkTextAttribute* = ptr TAtkTextAttribute + TAtkTextAttribute* = enum + ATK_TEXT_ATTR_INVALID, ATK_TEXT_ATTR_LEFT_MARGIN, + ATK_TEXT_ATTR_RIGHT_MARGIN, ATK_TEXT_ATTR_INDENT, ATK_TEXT_ATTR_INVISIBLE, + ATK_TEXT_ATTR_EDITABLE, ATK_TEXT_ATTR_PIXELS_ABOVE_LINES, + ATK_TEXT_ATTR_PIXELS_BELOW_LINES, ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP, + ATK_TEXT_ATTR_BG_FULL_HEIGHT, ATK_TEXT_ATTR_RISE, ATK_TEXT_ATTR_UNDERLINE, + ATK_TEXT_ATTR_STRIKETHROUGH, ATK_TEXT_ATTR_SIZE, ATK_TEXT_ATTR_SCALE, + ATK_TEXT_ATTR_WEIGHT, ATK_TEXT_ATTR_LANGUAGE, ATK_TEXT_ATTR_FAMILY_NAME, + ATK_TEXT_ATTR_BG_COLOR, ATK_TEXT_ATTR_FG_COLOR, ATK_TEXT_ATTR_BG_STIPPLE, + ATK_TEXT_ATTR_FG_STIPPLE, ATK_TEXT_ATTR_WRAP_MODE, ATK_TEXT_ATTR_DIRECTION, + ATK_TEXT_ATTR_JUSTIFICATION, ATK_TEXT_ATTR_STRETCH, ATK_TEXT_ATTR_VARIANT, + ATK_TEXT_ATTR_STYLE, ATK_TEXT_ATTR_LAST_DEFINED + PAtkTextBoundary* = ptr TAtkTextBoundary + TAtkTextBoundary* = enum + ATK_TEXT_BOUNDARY_CHAR, ATK_TEXT_BOUNDARY_WORD_START, + ATK_TEXT_BOUNDARY_WORD_END, ATK_TEXT_BOUNDARY_SENTENCE_START, + ATK_TEXT_BOUNDARY_SENTENCE_END, ATK_TEXT_BOUNDARY_LINE_START, + ATK_TEXT_BOUNDARY_LINE_END + PAtkTextIface* = ptr TAtkTextIface + TAtkTextIface* = object of TGTypeInterface + get_text*: proc (text: PAtkText, start_offset: gint, end_offset: gint): cstring{. + cdecl.} + get_text_after_offset*: proc (text: PAtkText, offset: gint, + boundary_type: TAtkTextBoundary, + start_offset: Pgint, end_offset: Pgint): cstring{. + cdecl.} + get_text_at_offset*: proc (text: PAtkText, offset: gint, + boundary_type: TAtkTextBoundary, + start_offset: Pgint, end_offset: Pgint): cstring{. + cdecl.} + get_character_at_offset*: proc (text: PAtkText, offset: gint): gunichar{. + cdecl.} + get_text_before_offset*: proc (text: PAtkText, offset: gint, + boundary_type: TAtkTextBoundary, + start_offset: Pgint, end_offset: Pgint): cstring{. + cdecl.} + get_caret_offset*: proc (text: PAtkText): gint{.cdecl.} + get_run_attributes*: proc (text: PAtkText, offset: gint, + start_offset: Pgint, end_offset: Pgint): PAtkAttributeSet{. + cdecl.} + get_default_attributes*: proc (text: PAtkText): PAtkAttributeSet{.cdecl.} + get_character_extents*: proc (text: PAtkText, offset: gint, x: Pgint, + y: Pgint, width: Pgint, height: Pgint, + coords: TAtkCoordType){.cdecl.} + get_character_count*: proc (text: PAtkText): gint{.cdecl.} + get_offset_at_point*: proc (text: PAtkText, x: gint, y: gint, + coords: TAtkCoordType): gint{.cdecl.} + get_n_selections*: proc (text: PAtkText): gint{.cdecl.} + get_selection*: proc (text: PAtkText, selection_num: gint, + start_offset: Pgint, end_offset: Pgint): cstring{.cdecl.} + add_selection*: proc (text: PAtkText, start_offset: gint, end_offset: gint): gboolean{. + cdecl.} + remove_selection*: proc (text: PAtkText, selection_num: gint): gboolean{. + cdecl.} + set_selection*: proc (text: PAtkText, selection_num: gint, + start_offset: gint, end_offset: gint): gboolean{.cdecl.} + set_caret_offset*: proc (text: PAtkText, offset: gint): gboolean{.cdecl.} + text_changed*: proc (text: PAtkText, position: gint, length: gint){.cdecl.} + text_caret_moved*: proc (text: PAtkText, location: gint){.cdecl.} + text_selection_changed*: proc (text: PAtkText){.cdecl.} + pad29*: TAtkFunction + pad30*: TAtkFunction + pad31*: TAtkFunction + pad32*: TAtkFunction + + TAtkEventListener* = proc (para1: PAtkObject){.cdecl.} + TAtkEventListenerInitProc* = proc () + TAtkEventListenerInit* = proc (para1: TAtkEventListenerInitProc){.cdecl.} + PAtkKeyEventStruct* = ptr TAtkKeyEventStruct + TAtkKeyEventStruct* {.final, pure.} = object + `type`*: gint + state*: guint + keyval*: guint + length*: gint + string*: cstring + keycode*: guint16 + timestamp*: guint32 + + TAtkKeySnoopFunc* = proc (event: PAtkKeyEventStruct, func_data: gpointer): gint{. + cdecl.} + PAtkKeyEventType* = ptr TAtkKeyEventType + TAtkKeyEventType* = enum + ATK_KEY_EVENT_PRESS, ATK_KEY_EVENT_RELEASE, ATK_KEY_EVENT_LAST_DEFINED + PAtkUtil* = ptr TAtkUtil + TAtkUtil* = object of TGObject + + PAtkUtilClass* = ptr TAtkUtilClass + TAtkUtilClass* = object of TGObjectClass + add_global_event_listener*: proc (listener: TGSignalEmissionHook, + event_type: cstring): guint{.cdecl.} + remove_global_event_listener*: proc (listener_id: guint){.cdecl.} + add_key_event_listener*: proc (listener: TAtkKeySnoopFunc, data: gpointer): guint{. + cdecl.} + remove_key_event_listener*: proc (listener_id: guint){.cdecl.} + get_root*: proc (): PAtkObject{.cdecl.} + get_toolkit_name*: proc (): cstring{.cdecl.} + get_toolkit_version*: proc (): cstring{.cdecl.} + + PAtkValueIface* = ptr TAtkValueIface + TAtkValueIface* = object of TGTypeInterface + get_current_value*: proc (obj: PAtkValue, value: PGValue){.cdecl.} + get_maximum_value*: proc (obj: PAtkValue, value: PGValue){.cdecl.} + get_minimum_value*: proc (obj: PAtkValue, value: PGValue){.cdecl.} + set_current_value*: proc (obj: PAtkValue, value: PGValue): gboolean{.cdecl.} + pad33*: TAtkFunction + pad34*: TAtkFunction + + +proc atk_role_register*(name: cstring): TAtkRole{.cdecl, dynlib: atklib, + importc: "atk_role_register".} +proc atk_object_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_object_get_type".} +proc ATK_TYPE_OBJECT*(): GType +proc ATK_OBJECT*(obj: pointer): PAtkObject +proc ATK_OBJECT_CLASS*(klass: pointer): PAtkObjectClass +proc ATK_IS_OBJECT*(obj: pointer): bool +proc ATK_IS_OBJECT_CLASS*(klass: pointer): bool +proc ATK_OBJECT_GET_CLASS*(obj: pointer): PAtkObjectClass +proc ATK_TYPE_IMPLEMENTOR*(): GType +proc ATK_IS_IMPLEMENTOR*(obj: pointer): bool +proc ATK_IMPLEMENTOR*(obj: pointer): PAtkImplementor +proc ATK_IMPLEMENTOR_GET_IFACE*(obj: pointer): PAtkImplementorIface +proc atk_implementor_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_implementor_get_type".} +proc atk_implementor_ref_accessible*(implementor: PAtkImplementor): PAtkObject{. + cdecl, dynlib: atklib, importc: "atk_implementor_ref_accessible".} +proc atk_object_get_name*(accessible: PAtkObject): cstring{.cdecl, + dynlib: atklib, importc: "atk_object_get_name".} +proc atk_object_get_description*(accessible: PAtkObject): cstring{.cdecl, + dynlib: atklib, importc: "atk_object_get_description".} +proc atk_object_get_parent*(accessible: PAtkObject): PAtkObject{.cdecl, + dynlib: atklib, importc: "atk_object_get_parent".} +proc atk_object_get_n_accessible_children*(accessible: PAtkObject): gint{.cdecl, + dynlib: atklib, importc: "atk_object_get_n_accessible_children".} +proc atk_object_ref_accessible_child*(accessible: PAtkObject, i: gint): PAtkObject{. + cdecl, dynlib: atklib, importc: "atk_object_ref_accessible_child".} +proc atk_object_ref_relation_set*(accessible: PAtkObject): PAtkRelationSet{. + cdecl, dynlib: atklib, importc: "atk_object_ref_relation_set".} +proc atk_object_get_role*(accessible: PAtkObject): TAtkRole{.cdecl, + dynlib: atklib, importc: "atk_object_get_role".} +proc atk_object_get_layer*(accessible: PAtkObject): TAtkLayer{.cdecl, + dynlib: atklib, importc: "atk_object_get_layer".} +proc atk_object_get_mdi_zorder*(accessible: PAtkObject): gint{.cdecl, + dynlib: atklib, importc: "atk_object_get_mdi_zorder".} +proc atk_object_ref_state_set*(accessible: PAtkObject): PAtkStateSet{.cdecl, + dynlib: atklib, importc: "atk_object_ref_state_set".} +proc atk_object_get_index_in_parent*(accessible: PAtkObject): gint{.cdecl, + dynlib: atklib, importc: "atk_object_get_index_in_parent".} +proc atk_object_set_name*(accessible: PAtkObject, name: cstring){.cdecl, + dynlib: atklib, importc: "atk_object_set_name".} +proc atk_object_set_description*(accessible: PAtkObject, description: cstring){. + cdecl, dynlib: atklib, importc: "atk_object_set_description".} +proc atk_object_set_parent*(accessible: PAtkObject, parent: PAtkObject){.cdecl, + dynlib: atklib, importc: "atk_object_set_parent".} +proc atk_object_set_role*(accessible: PAtkObject, role: TAtkRole){.cdecl, + dynlib: atklib, importc: "atk_object_set_role".} +proc atk_object_connect_property_change_handler*(accessible: PAtkObject, + handler: TAtkPropertyChangeHandler): guint{.cdecl, dynlib: atklib, + importc: "atk_object_connect_property_change_handler".} +proc atk_object_remove_property_change_handler*(accessible: PAtkObject, + handler_id: guint){.cdecl, dynlib: atklib, + importc: "atk_object_remove_property_change_handler".} +proc atk_object_notify_state_change*(accessible: PAtkObject, state: TAtkState, + value: gboolean){.cdecl, dynlib: atklib, + importc: "atk_object_notify_state_change".} +proc atk_object_initialize*(accessible: PAtkObject, data: gpointer){.cdecl, + dynlib: atklib, importc: "atk_object_initialize".} +proc atk_role_get_name*(role: TAtkRole): cstring{.cdecl, dynlib: atklib, + importc: "atk_role_get_name".} +proc atk_role_for_name*(name: cstring): TAtkRole{.cdecl, dynlib: atklib, + importc: "atk_role_for_name".} +proc ATK_TYPE_ACTION*(): GType +proc ATK_IS_ACTION*(obj: pointer): bool +proc ATK_ACTION*(obj: pointer): PAtkAction +proc ATK_ACTION_GET_IFACE*(obj: pointer): PAtkActionIface +proc atk_action_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_action_get_type".} +proc atk_action_do_action*(action: PAtkAction, i: gint): gboolean{.cdecl, + dynlib: atklib, importc: "atk_action_do_action".} +proc atk_action_get_n_actions*(action: PAtkAction): gint{.cdecl, dynlib: atklib, + importc: "atk_action_get_n_actions".} +proc atk_action_get_description*(action: PAtkAction, i: gint): cstring{.cdecl, + dynlib: atklib, importc: "atk_action_get_description".} +proc atk_action_get_name*(action: PAtkAction, i: gint): cstring{.cdecl, + dynlib: atklib, importc: "atk_action_get_name".} +proc atk_action_get_keybinding*(action: PAtkAction, i: gint): cstring{.cdecl, + dynlib: atklib, importc: "atk_action_get_keybinding".} +proc atk_action_set_description*(action: PAtkAction, i: gint, desc: cstring): gboolean{. + cdecl, dynlib: atklib, importc: "atk_action_set_description".} +proc ATK_TYPE_COMPONENT*(): GType +proc ATK_IS_COMPONENT*(obj: pointer): bool +proc ATK_COMPONENT*(obj: pointer): PAtkComponent +proc ATK_COMPONENT_GET_IFACE*(obj: pointer): PAtkComponentIface +proc atk_component_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_component_get_type".} +proc atk_component_add_focus_handler*(component: PAtkComponent, + handler: TAtkFocusHandler): guint{.cdecl, + dynlib: atklib, importc: "atk_component_add_focus_handler".} +proc atk_component_contains*(component: PAtkComponent, x, y: gint, + coord_type: TAtkCoordType): gboolean{.cdecl, + dynlib: atklib, importc: "atk_component_contains".} +proc atk_component_ref_accessible_at_point*(component: PAtkComponent, + x, y: gint, coord_type: TAtkCoordType): PAtkObject{.cdecl, dynlib: atklib, + importc: "atk_component_ref_accessible_at_point".} +proc atk_component_get_extents*(component: PAtkComponent, + x, y, width, height: Pgint, + coord_type: TAtkCoordType){.cdecl, + dynlib: atklib, importc: "atk_component_get_extents".} +proc atk_component_get_position*(component: PAtkComponent, x: Pgint, y: Pgint, + coord_type: TAtkCoordType){.cdecl, + dynlib: atklib, importc: "atk_component_get_position".} +proc atk_component_get_size*(component: PAtkComponent, width: Pgint, + height: Pgint){.cdecl, dynlib: atklib, + importc: "atk_component_get_size".} +proc atk_component_get_layer*(component: PAtkComponent): TAtkLayer{.cdecl, + dynlib: atklib, importc: "atk_component_get_layer".} +proc atk_component_get_mdi_zorder*(component: PAtkComponent): gint{.cdecl, + dynlib: atklib, importc: "atk_component_get_mdi_zorder".} +proc atk_component_grab_focus*(component: PAtkComponent): gboolean{.cdecl, + dynlib: atklib, importc: "atk_component_grab_focus".} +proc atk_component_remove_focus_handler*(component: PAtkComponent, + handler_id: guint){.cdecl, dynlib: atklib, + importc: "atk_component_remove_focus_handler".} +proc atk_component_set_extents*(component: PAtkComponent, x: gint, y: gint, + width: gint, height: gint, + coord_type: TAtkCoordType): gboolean{.cdecl, + dynlib: atklib, importc: "atk_component_set_extents".} +proc atk_component_set_position*(component: PAtkComponent, x: gint, y: gint, + coord_type: TAtkCoordType): gboolean{.cdecl, + dynlib: atklib, importc: "atk_component_set_position".} +proc atk_component_set_size*(component: PAtkComponent, width: gint, height: gint): gboolean{. + cdecl, dynlib: atklib, importc: "atk_component_set_size".} +proc ATK_TYPE_DOCUMENT*(): GType +proc ATK_IS_DOCUMENT*(obj: pointer): bool +proc ATK_DOCUMENT*(obj: pointer): PAtkDocument +proc ATK_DOCUMENT_GET_IFACE*(obj: pointer): PAtkDocumentIface +proc atk_document_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_document_get_type".} +proc atk_document_get_document_type*(document: PAtkDocument): cstring{.cdecl, + dynlib: atklib, importc: "atk_document_get_document_type".} +proc atk_document_get_document*(document: PAtkDocument): gpointer{.cdecl, + dynlib: atklib, importc: "atk_document_get_document".} +proc ATK_TYPE_EDITABLE_TEXT*(): GType +proc ATK_IS_EDITABLE_TEXT*(obj: pointer): bool +proc ATK_EDITABLE_TEXT*(obj: pointer): PAtkEditableText +proc ATK_EDITABLE_TEXT_GET_IFACE*(obj: pointer): PAtkEditableTextIface +proc atk_editable_text_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_editable_text_get_type".} +proc atk_editable_text_set_run_attributes*(text: PAtkEditableText, + attrib_set: PAtkAttributeSet, start_offset: gint, end_offset: gint): gboolean{. + cdecl, dynlib: atklib, importc: "atk_editable_text_set_run_attributes".} +proc atk_editable_text_set_text_contents*(text: PAtkEditableText, string: cstring){. + cdecl, dynlib: atklib, importc: "atk_editable_text_set_text_contents".} +proc atk_editable_text_insert_text*(text: PAtkEditableText, `string`: cstring, + length: gint, position: Pgint){.cdecl, + dynlib: atklib, importc: "atk_editable_text_insert_text".} +proc atk_editable_text_copy_text*(text: PAtkEditableText, start_pos: gint, + end_pos: gint){.cdecl, dynlib: atklib, + importc: "atk_editable_text_copy_text".} +proc atk_editable_text_cut_text*(text: PAtkEditableText, start_pos: gint, + end_pos: gint){.cdecl, dynlib: atklib, + importc: "atk_editable_text_cut_text".} +proc atk_editable_text_delete_text*(text: PAtkEditableText, start_pos: gint, + end_pos: gint){.cdecl, dynlib: atklib, + importc: "atk_editable_text_delete_text".} +proc atk_editable_text_paste_text*(text: PAtkEditableText, position: gint){. + cdecl, dynlib: atklib, importc: "atk_editable_text_paste_text".} +proc ATK_TYPE_GOBJECT_ACCESSIBLE*(): GType +proc ATK_GOBJECT_ACCESSIBLE*(obj: pointer): PAtkGObjectAccessible +proc ATK_GOBJECT_ACCESSIBLE_CLASS*(klass: pointer): PAtkGObjectAccessibleClass +proc ATK_IS_GOBJECT_ACCESSIBLE*(obj: pointer): bool +proc ATK_IS_GOBJECT_ACCESSIBLE_CLASS*(klass: pointer): bool +proc ATK_GOBJECT_ACCESSIBLE_GET_CLASS*(obj: pointer): PAtkGObjectAccessibleClass +proc atk_gobject_accessible_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_gobject_accessible_get_type".} +proc atk_gobject_accessible_for_object*(obj: PGObject): PAtkObject{.cdecl, + dynlib: atklib, importc: "atk_gobject_accessible_for_object".} +proc atk_gobject_accessible_get_object*(obj: PAtkGObjectAccessible): PGObject{. + cdecl, dynlib: atklib, importc: "atk_gobject_accessible_get_object".} +proc ATK_TYPE_HYPERLINK*(): GType +proc ATK_HYPERLINK*(obj: pointer): PAtkHyperlink +proc ATK_HYPERLINK_CLASS*(klass: pointer): PAtkHyperlinkClass +proc ATK_IS_HYPERLINK*(obj: pointer): bool +proc ATK_IS_HYPERLINK_CLASS*(klass: pointer): bool +proc ATK_HYPERLINK_GET_CLASS*(obj: pointer): PAtkHyperlinkClass +proc atk_hyperlink_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_hyperlink_get_type".} +proc atk_hyperlink_get_uri*(link: PAtkHyperlink, i: gint): cstring{.cdecl, + dynlib: atklib, importc: "atk_hyperlink_get_uri".} +proc atk_hyperlink_get_object*(link: PAtkHyperlink, i: gint): PAtkObject{.cdecl, + dynlib: atklib, importc: "atk_hyperlink_get_object".} +proc atk_hyperlink_get_end_index*(link: PAtkHyperlink): gint{.cdecl, + dynlib: atklib, importc: "atk_hyperlink_get_end_index".} +proc atk_hyperlink_get_start_index*(link: PAtkHyperlink): gint{.cdecl, + dynlib: atklib, importc: "atk_hyperlink_get_start_index".} +proc atk_hyperlink_is_valid*(link: PAtkHyperlink): gboolean{.cdecl, + dynlib: atklib, importc: "atk_hyperlink_is_valid".} +proc atk_hyperlink_get_n_anchors*(link: PAtkHyperlink): gint{.cdecl, + dynlib: atklib, importc: "atk_hyperlink_get_n_anchors".} +proc ATK_TYPE_HYPERTEXT*(): GType +proc ATK_IS_HYPERTEXT*(obj: pointer): bool +proc ATK_HYPERTEXT*(obj: pointer): PAtkHypertext +proc ATK_HYPERTEXT_GET_IFACE*(obj: pointer): PAtkHypertextIface +proc atk_hypertext_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_hypertext_get_type".} +proc atk_hypertext_get_link*(hypertext: PAtkHypertext, link_index: gint): PAtkHyperlink{. + cdecl, dynlib: atklib, importc: "atk_hypertext_get_link".} +proc atk_hypertext_get_n_links*(hypertext: PAtkHypertext): gint{.cdecl, + dynlib: atklib, importc: "atk_hypertext_get_n_links".} +proc atk_hypertext_get_link_index*(hypertext: PAtkHypertext, char_index: gint): gint{. + cdecl, dynlib: atklib, importc: "atk_hypertext_get_link_index".} +proc ATK_TYPE_IMAGE*(): GType +proc ATK_IS_IMAGE*(obj: pointer): bool +proc ATK_IMAGE*(obj: pointer): PAtkImage +proc ATK_IMAGE_GET_IFACE*(obj: pointer): PAtkImageIface +proc atk_image_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_image_get_type".} +proc atk_image_get_image_description*(image: PAtkImage): cstring{.cdecl, + dynlib: atklib, importc: "atk_image_get_image_description".} +proc atk_image_get_image_size*(image: PAtkImage, width: Pgint, height: Pgint){. + cdecl, dynlib: atklib, importc: "atk_image_get_image_size".} +proc atk_image_set_image_description*(image: PAtkImage, description: cstring): gboolean{. + cdecl, dynlib: atklib, importc: "atk_image_set_image_description".} +proc atk_image_get_image_position*(image: PAtkImage, x: Pgint, y: Pgint, + coord_type: TAtkCoordType){.cdecl, + dynlib: atklib, importc: "atk_image_get_image_position".} +proc ATK_TYPE_OBJECT_FACTORY*(): GType +proc ATK_OBJECT_FACTORY*(obj: pointer): PAtkObjectFactory +proc ATK_OBJECT_FACTORY_CLASS*(klass: pointer): PAtkObjectFactoryClass +proc ATK_IS_OBJECT_FACTORY*(obj: pointer): bool +proc ATK_IS_OBJECT_FACTORY_CLASS*(klass: pointer): bool +proc ATK_OBJECT_FACTORY_GET_CLASS*(obj: pointer): PAtkObjectFactoryClass +proc atk_object_factory_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_object_factory_get_type".} +proc atk_object_factory_create_accessible*(factory: PAtkObjectFactory, + obj: PGObject): PAtkObject{.cdecl, dynlib: atklib, + importc: "atk_object_factory_create_accessible".} +proc atk_object_factory_invalidate*(factory: PAtkObjectFactory){.cdecl, + dynlib: atklib, importc: "atk_object_factory_invalidate".} +proc atk_object_factory_get_accessible_type*(factory: PAtkObjectFactory): GType{. + cdecl, dynlib: atklib, importc: "atk_object_factory_get_accessible_type".} +proc ATK_TYPE_REGISTRY*(): GType +proc ATK_REGISTRY*(obj: pointer): PAtkRegistry +proc ATK_REGISTRY_CLASS*(klass: pointer): PAtkRegistryClass +proc ATK_IS_REGISTRY*(obj: pointer): bool +proc ATK_IS_REGISTRY_CLASS*(klass: pointer): bool +proc ATK_REGISTRY_GET_CLASS*(obj: pointer): PAtkRegistryClass +proc atk_registry_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_registry_get_type".} +proc atk_registry_set_factory_type*(registry: PAtkRegistry, `type`: GType, + factory_type: GType){.cdecl, dynlib: atklib, + importc: "atk_registry_set_factory_type".} +proc atk_registry_get_factory_type*(registry: PAtkRegistry, `type`: GType): GType{. + cdecl, dynlib: atklib, importc: "atk_registry_get_factory_type".} +proc atk_registry_get_factory*(registry: PAtkRegistry, `type`: GType): PAtkObjectFactory{. + cdecl, dynlib: atklib, importc: "atk_registry_get_factory".} +proc atk_get_default_registry*(): PAtkRegistry{.cdecl, dynlib: atklib, + importc: "atk_get_default_registry".} +proc ATK_TYPE_RELATION*(): GType +proc ATK_RELATION*(obj: pointer): PAtkRelation +proc ATK_RELATION_CLASS*(klass: pointer): PAtkRelationClass +proc ATK_IS_RELATION*(obj: pointer): bool +proc ATK_IS_RELATION_CLASS*(klass: pointer): bool +proc ATK_RELATION_GET_CLASS*(obj: pointer): PAtkRelationClass +proc atk_relation_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_relation_get_type".} +proc atk_relation_type_register*(name: cstring): TAtkRelationType{.cdecl, + dynlib: atklib, importc: "atk_relation_type_register".} +proc atk_relation_type_get_name*(`type`: TAtkRelationType): cstring{.cdecl, + dynlib: atklib, importc: "atk_relation_type_get_name".} +proc atk_relation_type_for_name*(name: cstring): TAtkRelationType{.cdecl, + dynlib: atklib, importc: "atk_relation_type_for_name".} +proc atk_relation_new*(targets: PPAtkObject, n_targets: gint, + relationship: TAtkRelationType): PAtkRelation{.cdecl, + dynlib: atklib, importc: "atk_relation_new".} +proc atk_relation_get_relation_type*(relation: PAtkRelation): TAtkRelationType{. + cdecl, dynlib: atklib, importc: "atk_relation_get_relation_type".} +proc atk_relation_get_target*(relation: PAtkRelation): PGPtrArray{.cdecl, + dynlib: atklib, importc: "atk_relation_get_target".} +proc ATK_TYPE_RELATION_SET*(): GType +proc ATK_RELATION_SET*(obj: pointer): PAtkRelationSet +proc ATK_RELATION_SET_CLASS*(klass: pointer): PAtkRelationSetClass +proc ATK_IS_RELATION_SET*(obj: pointer): bool +proc ATK_IS_RELATION_SET_CLASS*(klass: pointer): bool +proc ATK_RELATION_SET_GET_CLASS*(obj: pointer): PAtkRelationSetClass +proc atk_relation_set_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_relation_set_get_type".} +proc atk_relation_set_new*(): PAtkRelationSet{.cdecl, dynlib: atklib, + importc: "atk_relation_set_new".} +proc atk_relation_set_contains*(RelationSet: PAtkRelationSet, + relationship: TAtkRelationType): gboolean{. + cdecl, dynlib: atklib, importc: "atk_relation_set_contains".} +proc atk_relation_set_remove*(RelationSet: PAtkRelationSet, + relation: PAtkRelation){.cdecl, dynlib: atklib, + importc: "atk_relation_set_remove".} +proc atk_relation_set_add*(RelationSet: PAtkRelationSet, relation: PAtkRelation){. + cdecl, dynlib: atklib, importc: "atk_relation_set_add".} +proc atk_relation_set_get_n_relations*(RelationSet: PAtkRelationSet): gint{. + cdecl, dynlib: atklib, importc: "atk_relation_set_get_n_relations".} +proc atk_relation_set_get_relation*(RelationSet: PAtkRelationSet, i: gint): PAtkRelation{. + cdecl, dynlib: atklib, importc: "atk_relation_set_get_relation".} +proc atk_relation_set_get_relation_by_type*(RelationSet: PAtkRelationSet, + relationship: TAtkRelationType): PAtkRelation{.cdecl, dynlib: atklib, + importc: "atk_relation_set_get_relation_by_type".} +proc ATK_TYPE_SELECTION*(): GType +proc ATK_IS_SELECTION*(obj: pointer): bool +proc ATK_SELECTION*(obj: pointer): PAtkSelection +proc ATK_SELECTION_GET_IFACE*(obj: pointer): PAtkSelectionIface +proc atk_selection_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_selection_get_type".} +proc atk_selection_add_selection*(selection: PAtkSelection, i: gint): gboolean{. + cdecl, dynlib: atklib, importc: "atk_selection_add_selection".} +proc atk_selection_clear_selection*(selection: PAtkSelection): gboolean{.cdecl, + dynlib: atklib, importc: "atk_selection_clear_selection".} +proc atk_selection_ref_selection*(selection: PAtkSelection, i: gint): PAtkObject{. + cdecl, dynlib: atklib, importc: "atk_selection_ref_selection".} +proc atk_selection_get_selection_count*(selection: PAtkSelection): gint{.cdecl, + dynlib: atklib, importc: "atk_selection_get_selection_count".} +proc atk_selection_is_child_selected*(selection: PAtkSelection, i: gint): gboolean{. + cdecl, dynlib: atklib, importc: "atk_selection_is_child_selected".} +proc atk_selection_remove_selection*(selection: PAtkSelection, i: gint): gboolean{. + cdecl, dynlib: atklib, importc: "atk_selection_remove_selection".} +proc atk_selection_select_all_selection*(selection: PAtkSelection): gboolean{. + cdecl, dynlib: atklib, importc: "atk_selection_select_all_selection".} +proc atk_state_type_register*(name: cstring): TAtkStateType{.cdecl, + dynlib: atklib, importc: "atk_state_type_register".} +proc atk_state_type_get_name*(`type`: TAtkStateType): cstring{.cdecl, + dynlib: atklib, importc: "atk_state_type_get_name".} +proc atk_state_type_for_name*(name: cstring): TAtkStateType{.cdecl, + dynlib: atklib, importc: "atk_state_type_for_name".} +proc ATK_TYPE_STATE_SET*(): GType +proc ATK_STATE_SET*(obj: pointer): PAtkStateSet +proc ATK_STATE_SET_CLASS*(klass: pointer): PAtkStateSetClass +proc ATK_IS_STATE_SET*(obj: pointer): bool +proc ATK_IS_STATE_SET_CLASS*(klass: pointer): bool +proc ATK_STATE_SET_GET_CLASS*(obj: pointer): PAtkStateSetClass +proc atk_state_set_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_state_set_get_type".} +proc atk_state_set_new*(): PAtkStateSet{.cdecl, dynlib: atklib, + importc: "atk_state_set_new".} +proc atk_state_set_is_empty*(StateSet: PAtkStateSet): gboolean{.cdecl, + dynlib: atklib, importc: "atk_state_set_is_empty".} +proc atk_state_set_add_state*(StateSet: PAtkStateSet, `type`: TAtkStateType): gboolean{. + cdecl, dynlib: atklib, importc: "atk_state_set_add_state".} +proc atk_state_set_add_states*(StateSet: PAtkStateSet, types: PAtkStateType, + n_types: gint){.cdecl, dynlib: atklib, + importc: "atk_state_set_add_states".} +proc atk_state_set_clear_states*(StateSet: PAtkStateSet){.cdecl, dynlib: atklib, + importc: "atk_state_set_clear_states".} +proc atk_state_set_contains_state*(StateSet: PAtkStateSet, `type`: TAtkStateType): gboolean{. + cdecl, dynlib: atklib, importc: "atk_state_set_contains_state".} +proc atk_state_set_contains_states*(StateSet: PAtkStateSet, + types: PAtkStateType, n_types: gint): gboolean{. + cdecl, dynlib: atklib, importc: "atk_state_set_contains_states".} +proc atk_state_set_remove_state*(StateSet: PAtkStateSet, `type`: TAtkStateType): gboolean{. + cdecl, dynlib: atklib, importc: "atk_state_set_remove_state".} +proc atk_state_set_and_sets*(StateSet: PAtkStateSet, compare_set: PAtkStateSet): PAtkStateSet{. + cdecl, dynlib: atklib, importc: "atk_state_set_and_sets".} +proc atk_state_set_or_sets*(StateSet: PAtkStateSet, compare_set: PAtkStateSet): PAtkStateSet{. + cdecl, dynlib: atklib, importc: "atk_state_set_or_sets".} +proc atk_state_set_xor_sets*(StateSet: PAtkStateSet, compare_set: PAtkStateSet): PAtkStateSet{. + cdecl, dynlib: atklib, importc: "atk_state_set_xor_sets".} +proc ATK_TYPE_STREAMABLE_CONTENT*(): GType +proc ATK_IS_STREAMABLE_CONTENT*(obj: pointer): bool +proc ATK_STREAMABLE_CONTENT*(obj: pointer): PAtkStreamableContent +proc ATK_STREAMABLE_CONTENT_GET_IFACE*(obj: pointer): PAtkStreamableContentIface +proc atk_streamable_content_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_streamable_content_get_type".} +proc atk_streamable_content_get_n_mime_types*(streamable: PAtkStreamableContent): gint{. + cdecl, dynlib: atklib, importc: "atk_streamable_content_get_n_mime_types".} +proc atk_streamable_content_get_mime_type*(streamable: PAtkStreamableContent, + i: gint): cstring{.cdecl, dynlib: atklib, + importc: "atk_streamable_content_get_mime_type".} +proc atk_streamable_content_get_stream*(streamable: PAtkStreamableContent, + mime_type: cstring): PGIOChannel{.cdecl, + dynlib: atklib, importc: "atk_streamable_content_get_stream".} +proc ATK_TYPE_TABLE*(): GType +proc ATK_IS_TABLE*(obj: pointer): bool +proc ATK_TABLE*(obj: pointer): PAtkTable +proc ATK_TABLE_GET_IFACE*(obj: pointer): PAtkTableIface +proc atk_table_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_table_get_type".} +proc atk_table_ref_at*(table: PAtkTable, row, column: gint): PAtkObject{.cdecl, + dynlib: atklib, importc: "atk_table_ref_at".} +proc atk_table_get_index_at*(table: PAtkTable, row, column: gint): gint{.cdecl, + dynlib: atklib, importc: "atk_table_get_index_at".} +proc atk_table_get_column_at_index*(table: PAtkTable, index: gint): gint{.cdecl, + dynlib: atklib, importc: "atk_table_get_column_at_index".} +proc atk_table_get_row_at_index*(table: PAtkTable, index: gint): gint{.cdecl, + dynlib: atklib, importc: "atk_table_get_row_at_index".} +proc atk_table_get_n_columns*(table: PAtkTable): gint{.cdecl, dynlib: atklib, + importc: "atk_table_get_n_columns".} +proc atk_table_get_n_rows*(table: PAtkTable): gint{.cdecl, dynlib: atklib, + importc: "atk_table_get_n_rows".} +proc atk_table_get_column_extent_at*(table: PAtkTable, row: gint, column: gint): gint{. + cdecl, dynlib: atklib, importc: "atk_table_get_column_extent_at".} +proc atk_table_get_row_extent_at*(table: PAtkTable, row: gint, column: gint): gint{. + cdecl, dynlib: atklib, importc: "atk_table_get_row_extent_at".} +proc atk_table_get_caption*(table: PAtkTable): PAtkObject{.cdecl, + dynlib: atklib, importc: "atk_table_get_caption".} +proc atk_table_get_column_description*(table: PAtkTable, column: gint): cstring{. + cdecl, dynlib: atklib, importc: "atk_table_get_column_description".} +proc atk_table_get_column_header*(table: PAtkTable, column: gint): PAtkObject{. + cdecl, dynlib: atklib, importc: "atk_table_get_column_header".} +proc atk_table_get_row_description*(table: PAtkTable, row: gint): cstring{.cdecl, + dynlib: atklib, importc: "atk_table_get_row_description".} +proc atk_table_get_row_header*(table: PAtkTable, row: gint): PAtkObject{.cdecl, + dynlib: atklib, importc: "atk_table_get_row_header".} +proc atk_table_get_summary*(table: PAtkTable): PAtkObject{.cdecl, + dynlib: atklib, importc: "atk_table_get_summary".} +proc atk_table_set_caption*(table: PAtkTable, caption: PAtkObject){.cdecl, + dynlib: atklib, importc: "atk_table_set_caption".} +proc atk_table_set_column_description*(table: PAtkTable, column: gint, + description: cstring){.cdecl, + dynlib: atklib, importc: "atk_table_set_column_description".} +proc atk_table_set_column_header*(table: PAtkTable, column: gint, + header: PAtkObject){.cdecl, dynlib: atklib, + importc: "atk_table_set_column_header".} +proc atk_table_set_row_description*(table: PAtkTable, row: gint, + description: cstring){.cdecl, dynlib: atklib, + importc: "atk_table_set_row_description".} +proc atk_table_set_row_header*(table: PAtkTable, row: gint, header: PAtkObject){. + cdecl, dynlib: atklib, importc: "atk_table_set_row_header".} +proc atk_table_set_summary*(table: PAtkTable, accessible: PAtkObject){.cdecl, + dynlib: atklib, importc: "atk_table_set_summary".} +proc atk_table_get_selected_columns*(table: PAtkTable, selected: PPgint): gint{. + cdecl, dynlib: atklib, importc: "atk_table_get_selected_columns".} +proc atk_table_get_selected_rows*(table: PAtkTable, selected: PPgint): gint{. + cdecl, dynlib: atklib, importc: "atk_table_get_selected_rows".} +proc atk_table_is_column_selected*(table: PAtkTable, column: gint): gboolean{. + cdecl, dynlib: atklib, importc: "atk_table_is_column_selected".} +proc atk_table_is_row_selected*(table: PAtkTable, row: gint): gboolean{.cdecl, + dynlib: atklib, importc: "atk_table_is_row_selected".} +proc atk_table_is_selected*(table: PAtkTable, row: gint, column: gint): gboolean{. + cdecl, dynlib: atklib, importc: "atk_table_is_selected".} +proc atk_table_add_row_selection*(table: PAtkTable, row: gint): gboolean{.cdecl, + dynlib: atklib, importc: "atk_table_add_row_selection".} +proc atk_table_remove_row_selection*(table: PAtkTable, row: gint): gboolean{. + cdecl, dynlib: atklib, importc: "atk_table_remove_row_selection".} +proc atk_table_add_column_selection*(table: PAtkTable, column: gint): gboolean{. + cdecl, dynlib: atklib, importc: "atk_table_add_column_selection".} +proc atk_table_remove_column_selection*(table: PAtkTable, column: gint): gboolean{. + cdecl, dynlib: atklib, importc: "atk_table_remove_column_selection".} +proc atk_text_attribute_register*(name: cstring): TAtkTextAttribute{.cdecl, + dynlib: atklib, importc: "atk_text_attribute_register".} +proc ATK_TYPE_TEXT*(): GType +proc ATK_IS_TEXT*(obj: pointer): bool +proc ATK_TEXT*(obj: pointer): PAtkText +proc ATK_TEXT_GET_IFACE*(obj: pointer): PAtkTextIface +proc atk_text_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_text_get_type".} +proc atk_text_get_text*(text: PAtkText, start_offset: gint, end_offset: gint): cstring{. + cdecl, dynlib: atklib, importc: "atk_text_get_text".} +proc atk_text_get_character_at_offset*(text: PAtkText, offset: gint): gunichar{. + cdecl, dynlib: atklib, importc: "atk_text_get_character_at_offset".} +proc atk_text_get_text_after_offset*(text: PAtkText, offset: gint, + boundary_type: TAtkTextBoundary, + start_offset: Pgint, end_offset: Pgint): cstring{. + cdecl, dynlib: atklib, importc: "atk_text_get_text_after_offset".} +proc atk_text_get_text_at_offset*(text: PAtkText, offset: gint, + boundary_type: TAtkTextBoundary, + start_offset: Pgint, end_offset: Pgint): cstring{. + cdecl, dynlib: atklib, importc: "atk_text_get_text_at_offset".} +proc atk_text_get_text_before_offset*(text: PAtkText, offset: gint, + boundary_type: TAtkTextBoundary, + start_offset: Pgint, end_offset: Pgint): cstring{. + cdecl, dynlib: atklib, importc: "atk_text_get_text_before_offset".} +proc atk_text_get_caret_offset*(text: PAtkText): gint{.cdecl, dynlib: atklib, + importc: "atk_text_get_caret_offset".} +proc atk_text_get_character_extents*(text: PAtkText, offset: gint, x: Pgint, + y: Pgint, width: Pgint, height: Pgint, + coords: TAtkCoordType){.cdecl, + dynlib: atklib, importc: "atk_text_get_character_extents".} +proc atk_text_get_run_attributes*(text: PAtkText, offset: gint, + start_offset: Pgint, end_offset: Pgint): PAtkAttributeSet{. + cdecl, dynlib: atklib, importc: "atk_text_get_run_attributes".} +proc atk_text_get_default_attributes*(text: PAtkText): PAtkAttributeSet{.cdecl, + dynlib: atklib, importc: "atk_text_get_default_attributes".} +proc atk_text_get_character_count*(text: PAtkText): gint{.cdecl, dynlib: atklib, + importc: "atk_text_get_character_count".} +proc atk_text_get_offset_at_point*(text: PAtkText, x: gint, y: gint, + coords: TAtkCoordType): gint{.cdecl, + dynlib: atklib, importc: "atk_text_get_offset_at_point".} +proc atk_text_get_n_selections*(text: PAtkText): gint{.cdecl, dynlib: atklib, + importc: "atk_text_get_n_selections".} +proc atk_text_get_selection*(text: PAtkText, selection_num: gint, + start_offset: Pgint, end_offset: Pgint): cstring{. + cdecl, dynlib: atklib, importc: "atk_text_get_selection".} +proc atk_text_add_selection*(text: PAtkText, start_offset: gint, + end_offset: gint): gboolean{.cdecl, dynlib: atklib, + importc: "atk_text_add_selection".} +proc atk_text_remove_selection*(text: PAtkText, selection_num: gint): gboolean{. + cdecl, dynlib: atklib, importc: "atk_text_remove_selection".} +proc atk_text_set_selection*(text: PAtkText, selection_num: gint, + start_offset: gint, end_offset: gint): gboolean{. + cdecl, dynlib: atklib, importc: "atk_text_set_selection".} +proc atk_text_set_caret_offset*(text: PAtkText, offset: gint): gboolean{.cdecl, + dynlib: atklib, importc: "atk_text_set_caret_offset".} +proc atk_attribute_set_free*(attrib_set: PAtkAttributeSet){.cdecl, + dynlib: atklib, importc: "atk_attribute_set_free".} +proc atk_text_attribute_get_name*(attr: TAtkTextAttribute): cstring{.cdecl, + dynlib: atklib, importc: "atk_text_attribute_get_name".} +proc atk_text_attribute_for_name*(name: cstring): TAtkTextAttribute{.cdecl, + dynlib: atklib, importc: "atk_text_attribute_for_name".} +proc atk_text_attribute_get_value*(attr: TAtkTextAttribute, index: gint): cstring{. + cdecl, dynlib: atklib, importc: "atk_text_attribute_get_value".} +proc ATK_TYPE_UTIL*(): GType +proc ATK_IS_UTIL*(obj: pointer): bool +proc ATK_UTIL*(obj: pointer): PAtkUtil +proc ATK_UTIL_CLASS*(klass: pointer): PAtkUtilClass +proc ATK_IS_UTIL_CLASS*(klass: pointer): bool +proc ATK_UTIL_GET_CLASS*(obj: pointer): PAtkUtilClass +proc atk_util_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_util_get_type".} +proc atk_add_focus_tracker*(focus_tracker: TAtkEventListener): guint{.cdecl, + dynlib: atklib, importc: "atk_add_focus_tracker".} +proc atk_remove_focus_tracker*(tracker_id: guint){.cdecl, dynlib: atklib, + importc: "atk_remove_focus_tracker".} +proc atk_focus_tracker_init*(add_function: TAtkEventListenerInit){.cdecl, + dynlib: atklib, importc: "atk_focus_tracker_init".} +proc atk_focus_tracker_notify*(anObject: PAtkObject){.cdecl, dynlib: atklib, + importc: "atk_focus_tracker_notify".} +proc atk_add_global_event_listener*(listener: TGSignalEmissionHook, + event_type: cstring): guint{.cdecl, + dynlib: atklib, importc: "atk_add_global_event_listener".} +proc atk_remove_global_event_listener*(listener_id: guint){.cdecl, + dynlib: atklib, importc: "atk_remove_global_event_listener".} +proc atk_add_key_event_listener*(listener: TAtkKeySnoopFunc, data: gpointer): guint{. + cdecl, dynlib: atklib, importc: "atk_add_key_event_listener".} +proc atk_remove_key_event_listener*(listener_id: guint){.cdecl, dynlib: atklib, + importc: "atk_remove_key_event_listener".} +proc atk_get_root*(): PAtkObject{.cdecl, dynlib: atklib, importc: "atk_get_root".} +proc atk_get_toolkit_name*(): cstring{.cdecl, dynlib: atklib, + importc: "atk_get_toolkit_name".} +proc atk_get_toolkit_version*(): cstring{.cdecl, dynlib: atklib, + importc: "atk_get_toolkit_version".} +proc ATK_TYPE_VALUE*(): GType +proc ATK_IS_VALUE*(obj: pointer): bool +proc ATK_VALUE*(obj: pointer): PAtkValue +proc ATK_VALUE_GET_IFACE*(obj: pointer): PAtkValueIface +proc atk_value_get_type*(): GType{.cdecl, dynlib: atklib, + importc: "atk_value_get_type".} +proc atk_value_get_current_value*(obj: PAtkValue, value: PGValue){.cdecl, + dynlib: atklib, importc: "atk_value_get_current_value".} +proc atk_value_get_maximum_value*(obj: PAtkValue, value: PGValue){.cdecl, + dynlib: atklib, importc: "atk_value_get_maximum_value".} +proc atk_value_get_minimum_value*(obj: PAtkValue, value: PGValue){.cdecl, + dynlib: atklib, importc: "atk_value_get_minimum_value".} +proc atk_value_set_current_value*(obj: PAtkValue, value: PGValue): gboolean{. + cdecl, dynlib: atklib, importc: "atk_value_set_current_value".} +proc ATK_TYPE_OBJECT*(): GType = + result = atk_object_get_type() + +proc ATK_OBJECT*(obj: pointer): PAtkObject = + result = cast[PAtkObject](G_TYPE_CHECK_INSTANCE_CAST(obj, ATK_TYPE_OBJECT())) + +proc ATK_OBJECT_CLASS*(klass: pointer): PAtkObjectClass = + result = cast[PAtkObjectClass](G_TYPE_CHECK_CLASS_CAST(klass, ATK_TYPE_OBJECT())) + +proc ATK_IS_OBJECT*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_OBJECT()) + +proc ATK_IS_OBJECT_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, ATK_TYPE_OBJECT()) + +proc ATK_OBJECT_GET_CLASS*(obj: pointer): PAtkObjectClass = + result = cast[PAtkObjectClass](G_TYPE_INSTANCE_GET_CLASS(obj, ATK_TYPE_OBJECT())) + +proc ATK_TYPE_IMPLEMENTOR*(): GType = + result = atk_implementor_get_type() + +proc ATK_IS_IMPLEMENTOR*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_IMPLEMENTOR()) + +proc ATK_IMPLEMENTOR*(obj: pointer): PAtkImplementor = + result = PAtkImplementor(G_TYPE_CHECK_INSTANCE_CAST(obj, ATK_TYPE_IMPLEMENTOR())) + +proc ATK_IMPLEMENTOR_GET_IFACE*(obj: pointer): PAtkImplementorIface = + result = cast[PAtkImplementorIface](G_TYPE_INSTANCE_GET_INTERFACE(obj, + ATK_TYPE_IMPLEMENTOR())) + +proc ATK_TYPE_ACTION*(): GType = + result = atk_action_get_type() + +proc ATK_IS_ACTION*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_ACTION()) + +proc ATK_ACTION*(obj: pointer): PAtkAction = + result = PAtkAction(G_TYPE_CHECK_INSTANCE_CAST(obj, ATK_TYPE_ACTION())) + +proc ATK_ACTION_GET_IFACE*(obj: pointer): PAtkActionIface = + result = cast[PAtkActionIface](G_TYPE_INSTANCE_GET_INTERFACE(obj, + ATK_TYPE_ACTION())) + +proc ATK_TYPE_COMPONENT*(): GType = + result = atk_component_get_type() + +proc ATK_IS_COMPONENT*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_COMPONENT()) + +proc ATK_COMPONENT*(obj: pointer): PAtkComponent = + result = PAtkComponent(G_TYPE_CHECK_INSTANCE_CAST(obj, ATK_TYPE_COMPONENT())) + +proc ATK_COMPONENT_GET_IFACE*(obj: pointer): PAtkComponentIface = + result = cast[PAtkComponentIface](G_TYPE_INSTANCE_GET_INTERFACE(obj, + ATK_TYPE_COMPONENT())) + +proc ATK_TYPE_DOCUMENT*(): GType = + result = atk_document_get_type() + +proc ATK_IS_DOCUMENT*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_DOCUMENT()) + +proc ATK_DOCUMENT*(obj: pointer): PAtkDocument = + result = cast[PAtkDocument](G_TYPE_CHECK_INSTANCE_CAST(obj, + ATK_TYPE_DOCUMENT())) + +proc ATK_DOCUMENT_GET_IFACE*(obj: pointer): PAtkDocumentIface = + result = cast[PAtkDocumentIface](G_TYPE_INSTANCE_GET_INTERFACE(obj, + ATK_TYPE_DOCUMENT())) + +proc ATK_TYPE_EDITABLE_TEXT*(): GType = + result = atk_editable_text_get_type() + +proc ATK_IS_EDITABLE_TEXT*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_EDITABLE_TEXT()) + +proc ATK_EDITABLE_TEXT*(obj: pointer): PAtkEditableText = + result = cast[PAtkEditableText](G_TYPE_CHECK_INSTANCE_CAST(obj, + ATK_TYPE_EDITABLE_TEXT())) + +proc ATK_EDITABLE_TEXT_GET_IFACE*(obj: pointer): PAtkEditableTextIface = + result = cast[PAtkEditableTextIface](G_TYPE_INSTANCE_GET_INTERFACE(obj, + ATK_TYPE_EDITABLE_TEXT())) + +proc ATK_TYPE_GOBJECT_ACCESSIBLE*(): GType = + result = atk_gobject_accessible_get_type() + +proc ATK_GOBJECT_ACCESSIBLE*(obj: pointer): PAtkGObjectAccessible = + result = cast[PAtkGObjectAccessible](G_TYPE_CHECK_INSTANCE_CAST(obj, + ATK_TYPE_GOBJECT_ACCESSIBLE())) + +proc ATK_GOBJECT_ACCESSIBLE_CLASS*(klass: pointer): PAtkGObjectAccessibleClass = + result = cast[PAtkGObjectAccessibleClass](G_TYPE_CHECK_CLASS_CAST(klass, + ATK_TYPE_GOBJECT_ACCESSIBLE())) + +proc ATK_IS_GOBJECT_ACCESSIBLE*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_GOBJECT_ACCESSIBLE()) + +proc ATK_IS_GOBJECT_ACCESSIBLE_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, ATK_TYPE_GOBJECT_ACCESSIBLE()) + +proc ATK_GOBJECT_ACCESSIBLE_GET_CLASS*(obj: pointer): PAtkGObjectAccessibleClass = + result = cast[PAtkGObjectAccessibleClass](G_TYPE_INSTANCE_GET_CLASS(obj, + ATK_TYPE_GOBJECT_ACCESSIBLE())) + +proc ATK_TYPE_HYPERLINK*(): GType = + result = atk_hyperlink_get_type() + +proc ATK_HYPERLINK*(obj: pointer): PAtkHyperlink = + result = cast[PAtkHyperlink](G_TYPE_CHECK_INSTANCE_CAST(obj, + ATK_TYPE_HYPERLINK())) + +proc ATK_HYPERLINK_CLASS*(klass: pointer): PAtkHyperlinkClass = + result = cast[PAtkHyperlinkClass](G_TYPE_CHECK_CLASS_CAST(klass, + ATK_TYPE_HYPERLINK())) + +proc ATK_IS_HYPERLINK*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_HYPERLINK()) + +proc ATK_IS_HYPERLINK_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, ATK_TYPE_HYPERLINK()) + +proc ATK_HYPERLINK_GET_CLASS*(obj: pointer): PAtkHyperlinkClass = + result = cast[PAtkHyperlinkClass](G_TYPE_INSTANCE_GET_CLASS(obj, ATK_TYPE_HYPERLINK())) + +proc ATK_TYPE_HYPERTEXT*(): GType = + result = atk_hypertext_get_type() + +proc ATK_IS_HYPERTEXT*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_HYPERTEXT()) + +proc ATK_HYPERTEXT*(obj: pointer): PAtkHypertext = + result = cast[PAtkHypertext](G_TYPE_CHECK_INSTANCE_CAST(obj, ATK_TYPE_HYPERTEXT())) + +proc ATK_HYPERTEXT_GET_IFACE*(obj: pointer): PAtkHypertextIface = + result = cast[PAtkHypertextIface](G_TYPE_INSTANCE_GET_INTERFACE(obj, + ATK_TYPE_HYPERTEXT())) + +proc ATK_TYPE_IMAGE*(): GType = + result = atk_image_get_type() + +proc ATK_IS_IMAGE*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_IMAGE()) + +proc ATK_IMAGE*(obj: pointer): PAtkImage = + result = cast[PAtkImage](G_TYPE_CHECK_INSTANCE_CAST(obj, ATK_TYPE_IMAGE())) + +proc ATK_IMAGE_GET_IFACE*(obj: pointer): PAtkImageIface = + result = cast[PAtkImageIface](G_TYPE_INSTANCE_GET_INTERFACE(obj, ATK_TYPE_IMAGE())) + +proc ATK_TYPE_OBJECT_FACTORY*(): GType = + result = atk_object_factory_get_type() + +proc ATK_OBJECT_FACTORY*(obj: pointer): PAtkObjectFactory = + result = cast[PAtkObjectFactory](G_TYPE_CHECK_INSTANCE_CAST(obj, + ATK_TYPE_OBJECT_FACTORY())) + +proc ATK_OBJECT_FACTORY_CLASS*(klass: pointer): PAtkObjectFactoryClass = + result = cast[PAtkObjectFactoryClass](G_TYPE_CHECK_CLASS_CAST(klass, + ATK_TYPE_OBJECT_FACTORY())) + +proc ATK_IS_OBJECT_FACTORY*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_OBJECT_FACTORY()) + +proc ATK_IS_OBJECT_FACTORY_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, ATK_TYPE_OBJECT_FACTORY()) + +proc ATK_OBJECT_FACTORY_GET_CLASS*(obj: pointer): PAtkObjectFactoryClass = + result = cast[PAtkObjectFactoryClass](G_TYPE_INSTANCE_GET_CLASS(obj, + ATK_TYPE_OBJECT_FACTORY())) + +proc ATK_TYPE_REGISTRY*(): GType = + result = atk_registry_get_type() + +proc ATK_REGISTRY*(obj: pointer): PAtkRegistry = + result = cast[PAtkRegistry](G_TYPE_CHECK_INSTANCE_CAST(obj, ATK_TYPE_REGISTRY())) + +proc ATK_REGISTRY_CLASS*(klass: pointer): PAtkRegistryClass = + result = cast[PAtkRegistryClass](G_TYPE_CHECK_CLASS_CAST(klass, + ATK_TYPE_REGISTRY())) + +proc ATK_IS_REGISTRY*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_REGISTRY()) + +proc ATK_IS_REGISTRY_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, ATK_TYPE_REGISTRY()) + +proc ATK_REGISTRY_GET_CLASS*(obj: pointer): PAtkRegistryClass = + result = cast[PAtkRegistryClass](G_TYPE_INSTANCE_GET_CLASS(obj, ATK_TYPE_REGISTRY())) + +proc ATK_TYPE_RELATION*(): GType = + result = atk_relation_get_type() + +proc ATK_RELATION*(obj: pointer): PAtkRelation = + result = cast[PAtkRelation](G_TYPE_CHECK_INSTANCE_CAST(obj, ATK_TYPE_RELATION())) + +proc ATK_RELATION_CLASS*(klass: pointer): PAtkRelationClass = + result = cast[PAtkRelationClass](G_TYPE_CHECK_CLASS_CAST(klass, ATK_TYPE_RELATION())) + +proc ATK_IS_RELATION*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_RELATION()) + +proc ATK_IS_RELATION_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, ATK_TYPE_RELATION()) + +proc ATK_RELATION_GET_CLASS*(obj: pointer): PAtkRelationClass = + result = cast[PAtkRelationClass](G_TYPE_INSTANCE_GET_CLASS(obj, + ATK_TYPE_RELATION())) + +proc ATK_TYPE_RELATION_SET*(): GType = + result = atk_relation_set_get_type() + +proc ATK_RELATION_SET*(obj: pointer): PAtkRelationSet = + result = cast[PAtkRelationSet](G_TYPE_CHECK_INSTANCE_CAST(obj, + ATK_TYPE_RELATION_SET())) + +proc ATK_RELATION_SET_CLASS*(klass: pointer): PAtkRelationSetClass = + result = cast[PAtkRelationSetClass](G_TYPE_CHECK_CLASS_CAST(klass, + ATK_TYPE_RELATION_SET())) + +proc ATK_IS_RELATION_SET*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_RELATION_SET()) + +proc ATK_IS_RELATION_SET_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, ATK_TYPE_RELATION_SET()) + +proc ATK_RELATION_SET_GET_CLASS*(obj: pointer): PAtkRelationSetClass = + result = cast[PAtkRelationSetClass](G_TYPE_INSTANCE_GET_CLASS(obj, + ATK_TYPE_RELATION_SET())) + +proc ATK_TYPE_SELECTION*(): GType = + result = atk_selection_get_type() + +proc ATK_IS_SELECTION*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_SELECTION()) + +proc ATK_SELECTION*(obj: pointer): PAtkSelection = + result = cast[PAtkSelection](G_TYPE_CHECK_INSTANCE_CAST(obj, ATK_TYPE_SELECTION())) + +proc ATK_SELECTION_GET_IFACE*(obj: pointer): PAtkSelectionIface = + result = cast[PAtkSelectionIface](G_TYPE_INSTANCE_GET_INTERFACE(obj, + ATK_TYPE_SELECTION())) + +proc ATK_TYPE_STATE_SET*(): GType = + result = atk_state_set_get_type() + +proc ATK_STATE_SET*(obj: pointer): PAtkStateSet = + result = cast[PAtkStateSet](G_TYPE_CHECK_INSTANCE_CAST(obj, + ATK_TYPE_STATE_SET())) + +proc ATK_STATE_SET_CLASS*(klass: pointer): PAtkStateSetClass = + result = cast[PAtkStateSetClass](G_TYPE_CHECK_CLASS_CAST(klass, + ATK_TYPE_STATE_SET())) + +proc ATK_IS_STATE_SET*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_STATE_SET()) + +proc ATK_IS_STATE_SET_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, ATK_TYPE_STATE_SET()) + +proc ATK_STATE_SET_GET_CLASS*(obj: pointer): PAtkStateSetClass = + result = cast[PAtkStateSetClass](G_TYPE_INSTANCE_GET_CLASS(obj, + ATK_TYPE_STATE_SET())) + +proc ATK_TYPE_STREAMABLE_CONTENT*(): GType = + result = atk_streamable_content_get_type() + +proc ATK_IS_STREAMABLE_CONTENT*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_STREAMABLE_CONTENT()) + +proc ATK_STREAMABLE_CONTENT*(obj: pointer): PAtkStreamableContent = + result = cast[PAtkStreamableContent](G_TYPE_CHECK_INSTANCE_CAST(obj, + ATK_TYPE_STREAMABLE_CONTENT())) + +proc ATK_STREAMABLE_CONTENT_GET_IFACE*(obj: pointer): PAtkStreamableContentIface = + result = cast[PAtkStreamableContentIface](G_TYPE_INSTANCE_GET_INTERFACE(obj, + ATK_TYPE_STREAMABLE_CONTENT())) + +proc ATK_TYPE_TABLE*(): GType = + result = atk_table_get_type() + +proc ATK_IS_TABLE*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_TABLE()) + +proc ATK_TABLE*(obj: pointer): PAtkTable = + result = cast[PAtkTable](G_TYPE_CHECK_INSTANCE_CAST(obj, ATK_TYPE_TABLE())) + +proc ATK_TABLE_GET_IFACE*(obj: pointer): PAtkTableIface = + result = cast[PAtkTableIface](G_TYPE_INSTANCE_GET_INTERFACE(obj, ATK_TYPE_TABLE())) + +proc ATK_TYPE_TEXT*(): GType = + result = atk_text_get_type() + +proc ATK_IS_TEXT*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_TEXT()) + +proc ATK_TEXT*(obj: pointer): PAtkText = + result = cast[PAtkText](G_TYPE_CHECK_INSTANCE_CAST(obj, ATK_TYPE_TEXT())) + +proc ATK_TEXT_GET_IFACE*(obj: pointer): PAtkTextIface = + result = cast[PAtkTextIface](G_TYPE_INSTANCE_GET_INTERFACE(obj, ATK_TYPE_TEXT())) + +proc ATK_TYPE_UTIL*(): GType = + result = atk_util_get_type() + +proc ATK_IS_UTIL*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_UTIL()) + +proc ATK_UTIL*(obj: pointer): PAtkUtil = + result = cast[PAtkUtil](G_TYPE_CHECK_INSTANCE_CAST(obj, ATK_TYPE_UTIL())) + +proc ATK_UTIL_CLASS*(klass: pointer): PAtkUtilClass = + result = cast[PAtkUtilClass](G_TYPE_CHECK_CLASS_CAST(klass, ATK_TYPE_UTIL())) + +proc ATK_IS_UTIL_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, ATK_TYPE_UTIL()) + +proc ATK_UTIL_GET_CLASS*(obj: pointer): PAtkUtilClass = + result = cast[PAtkUtilClass](G_TYPE_INSTANCE_GET_CLASS(obj, ATK_TYPE_UTIL())) + +proc ATK_TYPE_VALUE*(): GType = + result = atk_value_get_type() + +proc ATK_IS_VALUE*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, ATK_TYPE_VALUE()) + +proc ATK_VALUE*(obj: pointer): PAtkValue = + result = cast[PAtkValue](G_TYPE_CHECK_INSTANCE_CAST(obj, ATK_TYPE_VALUE())) + +proc ATK_VALUE_GET_IFACE*(obj: pointer): PAtkValueIface = + result = cast[PAtkValueIface](G_TYPE_INSTANCE_GET_INTERFACE(obj, ATK_TYPE_VALUE())) diff --git a/lib/oldwrappers/gtk/gdk2.nim b/lib/oldwrappers/gtk/gdk2.nim new file mode 100644 index 000000000..0ca5056b5 --- /dev/null +++ b/lib/oldwrappers/gtk/gdk2.nim @@ -0,0 +1,3958 @@ +{.deadCodeElim: on.} + +import + glib2, gdk2pixbuf, pango + +when defined(win32): + const + gdklib = "libgdk-win32-2.0-0.dll" + GDK_HAVE_WCHAR_H = 1 + GDK_HAVE_WCTYPE_H = 1 +elif defined(darwin): + # linklib gtk-x11-2.0 + # linklib gdk-x11-2.0 + # linklib pango-1.0.0 + # linklib glib-2.0.0 + # linklib gobject-2.0.0 + # linklib gdk_pixbuf-2.0.0 + # linklib atk-1.0.0 + const + gdklib = "gdk-x11-2.0" +else: + const + gdklib = "libgdk-x11-2.0.so" +const + NUMPTSTOBUFFER* = 200 + GDK_MAX_TIMECOORD_AXES* = 128 + +type + PGdkDeviceClass* = ptr TGdkDeviceClass + TGdkDeviceClass* = object of TGObjectClass + + PGdkVisualClass* = ptr TGdkVisualClass + TGdkVisualClass* = object of TGObjectClass + + PGdkColor* = ptr TGdkColor + TGdkColor* {.final, pure.} = object + pixel*: guint32 + red*: guint16 + green*: guint16 + blue*: guint16 + + PGdkColormap* = ptr TGdkColormap + PGdkDrawable* = ptr TGdkDrawable + TGdkDrawable* = object of TGObject + + PGdkWindow* = ptr TGdkWindow + TGdkWindow* = TGdkDrawable + PGdkPixmap* = ptr TGdkPixmap + TGdkPixmap* = TGdkDrawable + PGdkBitmap* = ptr TGdkBitmap + TGdkBitmap* = TGdkDrawable + PGdkFontType* = ptr TGdkFontType + TGdkFontType* = enum + GDK_FONT_FONT, GDK_FONT_FONTSET + PGdkFont* = ptr TGdkFont + TGdkFont* {.final, pure.} = object + `type`*: TGdkFontType + ascent*: gint + descent*: gint + + PGdkFunction* = ptr TGdkFunction + TGdkFunction* = enum + GDK_COPY, GDK_INVERT, GDK_XOR, GDK_CLEAR, GDK_AND, GDK_AND_REVERSE, + GDK_AND_INVERT, GDK_NOOP, GDK_OR, GDK_EQUIV, GDK_OR_REVERSE, + GDK_COPY_INVERT, GDK_OR_INVERT, GDK_NAND, GDK_NOR, GDK_SET + PGdkCapStyle* = ptr TGdkCapStyle + TGdkCapStyle* = enum + GDK_CAP_NOT_LAST, GDK_CAP_BUTT, GDK_CAP_ROUND, GDK_CAP_PROJECTING + PGdkFill* = ptr TGdkFill + TGdkFill* = enum + GDK_SOLID, GDK_TILED, GDK_STIPPLED, GDK_OPAQUE_STIPPLED + PGdkJoinStyle* = ptr TGdkJoinStyle + TGdkJoinStyle* = enum + GDK_JOIN_MITER, GDK_JOIN_ROUND, GDK_JOIN_BEVEL + PGdkLineStyle* = ptr TGdkLineStyle + TGdkLineStyle* = enum + GDK_LINE_SOLID, GDK_LINE_ON_OFF_DASH, GDK_LINE_DOUBLE_DASH + PGdkSubwindowMode* = ptr TGdkSubwindowMode + TGdkSubwindowMode* = int + PGdkGCValuesMask* = ptr TGdkGCValuesMask + TGdkGCValuesMask* = int32 + PGdkGCValues* = ptr TGdkGCValues + TGdkGCValues* {.final, pure.} = object + foreground*: TGdkColor + background*: TGdkColor + font*: PGdkFont + `function`*: TGdkFunction + fill*: TGdkFill + tile*: PGdkPixmap + stipple*: PGdkPixmap + clip_mask*: PGdkPixmap + subwindow_mode*: TGdkSubwindowMode + ts_x_origin*: gint + ts_y_origin*: gint + clip_x_origin*: gint + clip_y_origin*: gint + graphics_exposures*: gint + line_width*: gint + line_style*: TGdkLineStyle + cap_style*: TGdkCapStyle + join_style*: TGdkJoinStyle + + PGdkGC* = ptr TGdkGC + TGdkGC* = object of TGObject + clip_x_origin*: gint + clip_y_origin*: gint + ts_x_origin*: gint + ts_y_origin*: gint + colormap*: PGdkColormap + + PGdkImageType* = ptr TGdkImageType + TGdkImageType* = enum + GDK_IMAGE_NORMAL, GDK_IMAGE_SHARED, GDK_IMAGE_FASTEST + PGdkImage* = ptr TGdkImage + PGdkDevice* = ptr TGdkDevice + PGdkTimeCoord* = ptr TGdkTimeCoord + PPGdkTimeCoord* = ptr PGdkTimeCoord + PGdkRgbDither* = ptr TGdkRgbDither + TGdkRgbDither* = enum + GDK_RGB_DITHER_NONE, GDK_RGB_DITHER_NORMAL, GDK_RGB_DITHER_MAX + PGdkDisplay* = ptr TGdkDisplay + PGdkScreen* = ptr TGdkScreen + TGdkScreen* = object of TGObject + + PGdkInputCondition* = ptr TGdkInputCondition + TGdkInputCondition* = int32 + PGdkStatus* = ptr TGdkStatus + TGdkStatus* = int32 + TGdkPoint* {.final, pure.} = object + x*: gint + y*: gint + + PGdkPoint* = ptr TGdkPoint + PPGdkPoint* = ptr PGdkPoint + PGdkSpan* = ptr TGdkSpan + PGdkWChar* = ptr TGdkWChar + TGdkWChar* = guint32 + PGdkSegment* = ptr TGdkSegment + TGdkSegment* {.final, pure.} = object + x1*: gint + y1*: gint + x2*: gint + y2*: gint + + PGdkRectangle* = ptr TGdkRectangle + TGdkRectangle* {.final, pure.} = object + x*: gint + y*: gint + width*: gint + height*: gint + + PGdkAtom* = ptr TGdkAtom + TGdkAtom* = gulong + PGdkByteOrder* = ptr TGdkByteOrder + TGdkByteOrder* = enum + GDK_LSB_FIRST, GDK_MSB_FIRST + PGdkModifierType* = ptr TGdkModifierType + TGdkModifierType* = gint + PGdkVisualType* = ptr TGdkVisualType + TGdkVisualType* = enum + GDK_VISUAL_STATIC_GRAY, GDK_VISUAL_GRAYSCALE, GDK_VISUAL_STATIC_COLOR, + GDK_VISUAL_PSEUDO_COLOR, GDK_VISUAL_TRUE_COLOR, GDK_VISUAL_DIRECT_COLOR + PGdkVisual* = ptr TGdkVisual + TGdkVisual* = object of TGObject + TheType*: TGdkVisualType + depth*: gint + byte_order*: TGdkByteOrder + colormap_size*: gint + bits_per_rgb*: gint + red_mask*: guint32 + red_shift*: gint + red_prec*: gint + green_mask*: guint32 + green_shift*: gint + green_prec*: gint + blue_mask*: guint32 + blue_shift*: gint + blue_prec*: gint + screen*: PGdkScreen + + PGdkColormapClass* = ptr TGdkColormapClass + TGdkColormapClass* = object of TGObjectClass + + TGdkColormap* = object of TGObject + size*: gint + colors*: PGdkColor + visual*: PGdkVisual + windowing_data*: gpointer + screen*: PGdkScreen + + PGdkCursorType* = ptr TGdkCursorType + TGdkCursorType* = gint + PGdkCursor* = ptr TGdkCursor + TGdkCursor* {.final, pure.} = object + `type`*: TGdkCursorType + ref_count*: guint + + PGdkDragAction* = ptr TGdkDragAction + TGdkDragAction* = int32 + PGdkDragProtocol* = ptr TGdkDragProtocol + TGdkDragProtocol* = enum + GDK_DRAG_PROTO_MOTIF, GDK_DRAG_PROTO_XDND, GDK_DRAG_PROTO_ROOTWIN, + GDK_DRAG_PROTO_NONE, GDK_DRAG_PROTO_WIN32_DROPFILES, GDK_DRAG_PROTO_OLE2, + GDK_DRAG_PROTO_LOCAL + PGdkDragContext* = ptr TGdkDragContext + TGdkDragContext* = object of TGObject + protocol*: TGdkDragProtocol + is_source*: gboolean + source_window*: PGdkWindow + dest_window*: PGdkWindow + targets*: PGList + actions*: TGdkDragAction + suggested_action*: TGdkDragAction + action*: TGdkDragAction + start_time*: guint32 + windowing_data*: gpointer + + PGdkDragContextClass* = ptr TGdkDragContextClass + TGdkDragContextClass* = object of TGObjectClass + + PGdkRegionBox* = ptr TGdkRegionBox + TGdkRegionBox* = TGdkSegment + PGdkRegion* = ptr TGdkRegion + TGdkRegion* {.final, pure.} = object + size*: int32 + numRects*: int32 + rects*: PGdkRegionBox + extents*: TGdkRegionBox + + PPOINTBLOCK* = ptr TPOINTBLOCK + TPOINTBLOCK* {.final, pure.} = object + pts*: array[0..(NUMPTSTOBUFFER) - 1, TGdkPoint] + next*: PPOINTBLOCK + + PGdkDrawableClass* = ptr TGdkDrawableClass + TGdkDrawableClass* = object of TGObjectClass + create_gc*: proc (drawable: PGdkDrawable, values: PGdkGCValues, + mask: TGdkGCValuesMask): PGdkGC{.cdecl.} + draw_rectangle*: proc (drawable: PGdkDrawable, gc: PGdkGC, filled: gint, + x: gint, y: gint, width: gint, height: gint){.cdecl.} + draw_arc*: proc (drawable: PGdkDrawable, gc: PGdkGC, filled: gint, x: gint, + y: gint, width: gint, height: gint, angle1: gint, + angle2: gint){.cdecl.} + draw_polygon*: proc (drawable: PGdkDrawable, gc: PGdkGC, filled: gint, + points: PGdkPoint, npoints: gint){.cdecl.} + draw_text*: proc (drawable: PGdkDrawable, font: PGdkFont, gc: PGdkGC, + x: gint, y: gint, text: cstring, text_length: gint){.cdecl.} + draw_text_wc*: proc (drawable: PGdkDrawable, font: PGdkFont, gc: PGdkGC, + x: gint, y: gint, text: PGdkWChar, text_length: gint){. + cdecl.} + draw_drawable*: proc (drawable: PGdkDrawable, gc: PGdkGC, src: PGdkDrawable, + xsrc: gint, ysrc: gint, xdest: gint, ydest: gint, + width: gint, height: gint){.cdecl.} + draw_points*: proc (drawable: PGdkDrawable, gc: PGdkGC, points: PGdkPoint, + npoints: gint){.cdecl.} + draw_segments*: proc (drawable: PGdkDrawable, gc: PGdkGC, segs: PGdkSegment, + nsegs: gint){.cdecl.} + draw_lines*: proc (drawable: PGdkDrawable, gc: PGdkGC, points: PGdkPoint, + npoints: gint){.cdecl.} + draw_glyphs*: proc (drawable: PGdkDrawable, gc: PGdkGC, font: PPangoFont, + x: gint, y: gint, glyphs: PPangoGlyphString){.cdecl.} + draw_image*: proc (drawable: PGdkDrawable, gc: PGdkGC, image: PGdkImage, + xsrc: gint, ysrc: gint, xdest: gint, ydest: gint, + width: gint, height: gint){.cdecl.} + get_depth*: proc (drawable: PGdkDrawable): gint{.cdecl.} + get_size*: proc (drawable: PGdkDrawable, width: Pgint, height: Pgint){.cdecl.} + set_colormap*: proc (drawable: PGdkDrawable, cmap: PGdkColormap){.cdecl.} + get_colormap*: proc (drawable: PGdkDrawable): PGdkColormap{.cdecl.} + get_visual*: proc (drawable: PGdkDrawable): PGdkVisual{.cdecl.} + get_screen*: proc (drawable: PGdkDrawable): PGdkScreen{.cdecl.} + get_image*: proc (drawable: PGdkDrawable, x: gint, y: gint, width: gint, + height: gint): PGdkImage{.cdecl.} + get_clip_region*: proc (drawable: PGdkDrawable): PGdkRegion{.cdecl.} + get_visible_region*: proc (drawable: PGdkDrawable): PGdkRegion{.cdecl.} + get_composite_drawable*: proc (drawable: PGdkDrawable, x: gint, y: gint, + width: gint, height: gint, + composite_x_offset: Pgint, + composite_y_offset: Pgint): PGdkDrawable{. + cdecl.} + `draw_pixbuf`*: proc (drawable: PGdkDrawable, gc: PGdkGC, + pixbuf: PGdkPixbuf, src_x: gint, src_y: gint, + dest_x: gint, dest_y: gint, width: gint, height: gint, + dither: TGdkRgbDither, x_dither: gint, y_dither: gint){. + cdecl.} + `copy_to_image`*: proc (drawable: PGdkDrawable, image: PGdkImage, + src_x: gint, src_y: gint, dest_x: gint, + dest_y: gint, width: gint, height: gint): PGdkImage{. + cdecl.} + `gdk_reserved1`: proc (){.cdecl.} + `gdk_reserved2`: proc (){.cdecl.} + `gdk_reserved3`: proc (){.cdecl.} + `gdk_reserved4`: proc (){.cdecl.} + `gdk_reserved5`: proc (){.cdecl.} + `gdk_reserved6`: proc (){.cdecl.} + `gdk_reserved7`: proc (){.cdecl.} + `gdk_reserved9`: proc (){.cdecl.} + `gdk_reserved10`: proc (){.cdecl.} + `gdk_reserved11`: proc (){.cdecl.} + `gdk_reserved12`: proc (){.cdecl.} + `gdk_reserved13`: proc (){.cdecl.} + `gdk_reserved14`: proc (){.cdecl.} + `gdk_reserved15`: proc (){.cdecl.} + `gdk_reserved16`: proc (){.cdecl.} + + PGdkEvent* = ptr TGdkEvent + TGdkEventFunc* = proc (event: PGdkEvent, data: gpointer){.cdecl.} + PGdkXEvent* = ptr TGdkXEvent + TGdkXEvent* = proc () + PGdkFilterReturn* = ptr TGdkFilterReturn + TGdkFilterReturn* = enum + GDK_FILTER_CONTINUE, GDK_FILTER_TRANSLATE, GDK_FILTER_REMOVE + TGdkFilterFunc* = proc (xevent: PGdkXEvent, event: PGdkEvent, data: gpointer): TGdkFilterReturn{. + cdecl.} + PGdkEventType* = ptr TGdkEventType + TGdkEventType* = gint + PGdkEventMask* = ptr TGdkEventMask + TGdkEventMask* = gint32 + PGdkVisibilityState* = ptr TGdkVisibilityState + TGdkVisibilityState* = enum + GDK_VISIBILITY_UNOBSCURED, GDK_VISIBILITY_PARTIAL, + GDK_VISIBILITY_FULLY_OBSCURED + PGdkScrollDirection* = ptr TGdkScrollDirection + TGdkScrollDirection* = enum + GDK_SCROLL_UP, GDK_SCROLL_DOWN, GDK_SCROLL_LEFT, GDK_SCROLL_RIGHT + PGdkNotifyType* = ptr TGdkNotifyType + TGdkNotifyType* = int + PGdkCrossingMode* = ptr TGdkCrossingMode + TGdkCrossingMode* = enum + GDK_CROSSING_NORMAL, GDK_CROSSING_GRAB, GDK_CROSSING_UNGRAB + PGdkPropertyState* = ptr TGdkPropertyState + TGdkPropertyState* = enum + GDK_PROPERTY_NEW_VALUE, GDK_PROPERTY_STATE_DELETE + PGdkWindowState* = ptr TGdkWindowState + TGdkWindowState* = gint + PGdkSettingAction* = ptr TGdkSettingAction + TGdkSettingAction* = enum + GDK_SETTING_ACTION_NEW, GDK_SETTING_ACTION_CHANGED, + GDK_SETTING_ACTION_DELETED + PGdkEventAny* = ptr TGdkEventAny + TGdkEventAny* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + + PGdkEventExpose* = ptr TGdkEventExpose + TGdkEventExpose* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + area*: TGdkRectangle + region*: PGdkRegion + count*: gint + + PGdkEventNoExpose* = ptr TGdkEventNoExpose + TGdkEventNoExpose* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + + PGdkEventVisibility* = ptr TGdkEventVisibility + TGdkEventVisibility* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + state*: TGdkVisibilityState + + PGdkEventMotion* = ptr TGdkEventMotion + TGdkEventMotion* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + time*: guint32 + x*: gdouble + y*: gdouble + axes*: Pgdouble + state*: guint + is_hint*: gint16 + device*: PGdkDevice + x_root*: gdouble + y_root*: gdouble + + PGdkEventButton* = ptr TGdkEventButton + TGdkEventButton* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + time*: guint32 + x*: gdouble + y*: gdouble + axes*: Pgdouble + state*: guint + button*: guint + device*: PGdkDevice + x_root*: gdouble + y_root*: gdouble + + PGdkEventScroll* = ptr TGdkEventScroll + TGdkEventScroll* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + time*: guint32 + x*: gdouble + y*: gdouble + state*: guint + direction*: TGdkScrollDirection + device*: PGdkDevice + x_root*: gdouble + y_root*: gdouble + + PGdkEventKey* = ptr TGdkEventKey + TGdkEventKey* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + time*: guint32 + state*: guint + keyval*: guint + length*: gint + `string`*: cstring + hardware_keycode*: guint16 + group*: guint8 + + PGdkEventCrossing* = ptr TGdkEventCrossing + TGdkEventCrossing* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + subwindow*: PGdkWindow + time*: guint32 + x*: gdouble + y*: gdouble + x_root*: gdouble + y_root*: gdouble + mode*: TGdkCrossingMode + detail*: TGdkNotifyType + focus*: gboolean + state*: guint + + PGdkEventFocus* = ptr TGdkEventFocus + TGdkEventFocus* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + `in`*: gint16 + + PGdkEventConfigure* = ptr TGdkEventConfigure + TGdkEventConfigure* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + x*: gint + y*: gint + width*: gint + height*: gint + + PGdkEventProperty* = ptr TGdkEventProperty + TGdkEventProperty* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + atom*: TGdkAtom + time*: guint32 + state*: guint + + TGdkNativeWindow* = pointer + PGdkEventSelection* = ptr TGdkEventSelection + TGdkEventSelection* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + selection*: TGdkAtom + target*: TGdkAtom + `property`*: TGdkAtom + time*: guint32 + requestor*: TGdkNativeWindow + + PGdkEventProximity* = ptr TGdkEventProximity + TGdkEventProximity* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + time*: guint32 + device*: PGdkDevice + + PmatDUMMY* = ptr TmatDUMMY + TmatDUMMY* {.final, pure.} = object + b*: array[0..19, char] + + PGdkEventClient* = ptr TGdkEventClient + TGdkEventClient* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + message_type*: TGdkAtom + data_format*: gushort + b*: array[0..19, char] + + PGdkEventSetting* = ptr TGdkEventSetting + TGdkEventSetting* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + action*: TGdkSettingAction + name*: cstring + + PGdkEventWindowState* = ptr TGdkEventWindowState + TGdkEventWindowState* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + changed_mask*: TGdkWindowState + new_window_state*: TGdkWindowState + + PGdkEventDND* = ptr TGdkEventDND + TGdkEventDND* {.final, pure.} = object + `type`*: TGdkEventType + window*: PGdkWindow + send_event*: gint8 + context*: PGdkDragContext + time*: guint32 + x_root*: gshort + y_root*: gshort + + TGdkEvent* {.final, pure.} = object + data*: array[0..255, char] # union of + # `type`: TGdkEventType + # any: TGdkEventAny + # expose: TGdkEventExpose + # no_expose: TGdkEventNoExpose + # visibility: TGdkEventVisibility + # motion: TGdkEventMotion + # button: TGdkEventButton + # scroll: TGdkEventScroll + # key: TGdkEventKey + # crossing: TGdkEventCrossing + # focus_change: TGdkEventFocus + # configure: TGdkEventConfigure + # `property`: TGdkEventProperty + # selection: TGdkEventSelection + # proximity: TGdkEventProximity + # client: TGdkEventClient + # dnd: TGdkEventDND + # window_state: TGdkEventWindowState + # setting: TGdkEventSetting + + PGdkGCClass* = ptr TGdkGCClass + TGdkGCClass* = object of TGObjectClass + get_values*: proc (gc: PGdkGC, values: PGdkGCValues){.cdecl.} + set_values*: proc (gc: PGdkGC, values: PGdkGCValues, mask: TGdkGCValuesMask){. + cdecl.} + set_dashes*: proc (gc: PGdkGC, dash_offset: gint, + dash_list: openarray[gint8]){.cdecl.} + `gdk_reserved1`*: proc (){.cdecl.} + `gdk_reserved2`*: proc (){.cdecl.} + `gdk_reserved3`*: proc (){.cdecl.} + `gdk_reserved4`*: proc (){.cdecl.} + + PGdkImageClass* = ptr TGdkImageClass + TGdkImageClass* = object of TGObjectClass + + TGdkImage* = object of TGObject + `type`*: TGdkImageType + visual*: PGdkVisual + byte_order*: TGdkByteOrder + width*: gint + height*: gint + depth*: guint16 + bpp*: guint16 + bpl*: guint16 + bits_per_pixel*: guint16 + mem*: gpointer + colormap*: PGdkColormap + windowing_data*: gpointer + + PGdkExtensionMode* = ptr TGdkExtensionMode + TGdkExtensionMode* = enum + GDK_EXTENSION_EVENTS_NONE, GDK_EXTENSION_EVENTS_ALL, + GDK_EXTENSION_EVENTS_CURSOR + PGdkInputSource* = ptr TGdkInputSource + TGdkInputSource* = enum + GDK_SOURCE_MOUSE, GDK_SOURCE_PEN, GDK_SOURCE_ERASER, GDK_SOURCE_CURSOR + PGdkInputMode* = ptr TGdkInputMode + TGdkInputMode* = enum + GDK_MODE_DISABLED, GDK_MODE_SCREEN, GDK_MODE_WINDOW + PGdkAxisUse* = ptr TGdkAxisUse + TGdkAxisUse* = int32 + PGdkDeviceKey* = ptr TGdkDeviceKey + TGdkDeviceKey* {.final, pure.} = object + keyval*: guint + modifiers*: TGdkModifierType + + PGdkDeviceAxis* = ptr TGdkDeviceAxis + TGdkDeviceAxis* {.final, pure.} = object + use*: TGdkAxisUse + min*: gdouble + max*: gdouble + + TGdkDevice* = object of TGObject + name*: cstring + source*: TGdkInputSource + mode*: TGdkInputMode + has_cursor*: gboolean + num_axes*: gint + axes*: PGdkDeviceAxis + num_keys*: gint + keys*: PGdkDeviceKey + + TGdkTimeCoord* {.final, pure.} = object + time*: guint32 + axes*: array[0..(GDK_MAX_TIMECOORD_AXES) - 1, gdouble] + + PGdkKeymapKey* = ptr TGdkKeymapKey + TGdkKeymapKey* {.final, pure.} = object + keycode*: guint + group*: gint + level*: gint + + PGdkKeymap* = ptr TGdkKeymap + TGdkKeymap* = object of TGObject + display*: PGdkDisplay + + PGdkKeymapClass* = ptr TGdkKeymapClass + TGdkKeymapClass* = object of TGObjectClass + direction_changed*: proc (keymap: PGdkKeymap){.cdecl.} + + PGdkPangoAttrStipple* = ptr TGdkPangoAttrStipple + TGdkPangoAttrStipple* {.final, pure.} = object + attr*: TPangoAttribute + stipple*: PGdkBitmap + + PGdkPangoAttrEmbossed* = ptr TGdkPangoAttrEmbossed + TGdkPangoAttrEmbossed* {.final, pure.} = object + attr*: TPangoAttribute + embossed*: gboolean + + PGdkPixmapObject* = ptr TGdkPixmapObject + TGdkPixmapObject* = object of TGdkDrawable + impl*: PGdkDrawable + depth*: gint + + PGdkPixmapObjectClass* = ptr TGdkPixmapObjectClass + TGdkPixmapObjectClass* = object of TGdkDrawableClass + + PGdkPropMode* = ptr TGdkPropMode + TGdkPropMode* = enum + GDK_PROP_MODE_REPLACE, GDK_PROP_MODE_PREPEND, GDK_PROP_MODE_APPEND + PGdkFillRule* = ptr TGdkFillRule + TGdkFillRule* = enum + GDK_EVEN_ODD_RULE, GDK_WINDING_RULE + PGdkOverlapType* = ptr TGdkOverlapType + TGdkOverlapType* = enum + GDK_OVERLAP_RECTANGLE_IN, GDK_OVERLAP_RECTANGLE_OUT, + GDK_OVERLAP_RECTANGLE_PART + TGdkSpanFunc* = proc (span: PGdkSpan, data: gpointer){.cdecl.} + PGdkRgbCmap* = ptr TGdkRgbCmap + TGdkRgbCmap* {.final, pure.} = object + colors*: array[0..255, guint32] + n_colors*: gint + info_list*: PGSList + + TGdkDisplay* = object of TGObject + queued_events*: PGList + queued_tail*: PGList + button_click_time*: array[0..1, guint32] + button_window*: array[0..1, PGdkWindow] + button_number*: array[0..1, guint] + double_click_time*: guint + + PGdkDisplayClass* = ptr TGdkDisplayClass + TGdkDisplayClass* = object of TGObjectClass + get_display_name*: proc (display: PGdkDisplay): cstring{.cdecl.} + get_n_screens*: proc (display: PGdkDisplay): gint{.cdecl.} + get_screen*: proc (display: PGdkDisplay, screen_num: gint): PGdkScreen{. + cdecl.} + get_default_screen*: proc (display: PGdkDisplay): PGdkScreen{.cdecl.} + + PGdkScreenClass* = ptr TGdkScreenClass + TGdkScreenClass* = object of TGObjectClass + get_display*: proc (screen: PGdkScreen): PGdkDisplay{.cdecl.} + get_width*: proc (screen: PGdkScreen): gint{.cdecl.} + get_height*: proc (screen: PGdkScreen): gint{.cdecl.} + get_width_mm*: proc (screen: PGdkScreen): gint{.cdecl.} + get_height_mm*: proc (screen: PGdkScreen): gint{.cdecl.} + get_root_depth*: proc (screen: PGdkScreen): gint{.cdecl.} + get_screen_num*: proc (screen: PGdkScreen): gint{.cdecl.} + get_root_window*: proc (screen: PGdkScreen): PGdkWindow{.cdecl.} + get_default_colormap*: proc (screen: PGdkScreen): PGdkColormap{.cdecl.} + set_default_colormap*: proc (screen: PGdkScreen, colormap: PGdkColormap){. + cdecl.} + get_window_at_pointer*: proc (screen: PGdkScreen, win_x: Pgint, win_y: Pgint): PGdkWindow{. + cdecl.} + get_n_monitors*: proc (screen: PGdkScreen): gint{.cdecl.} + get_monitor_geometry*: proc (screen: PGdkScreen, monitor_num: gint, + dest: PGdkRectangle){.cdecl.} + + PGdkGrabStatus* = ptr TGdkGrabStatus + TGdkGrabStatus* = int + TGdkInputFunction* = proc (data: gpointer, source: gint, + condition: TGdkInputCondition){.cdecl.} + TGdkDestroyNotify* = proc (data: gpointer){.cdecl.} + TGdkSpan* {.final, pure.} = object + x*: gint + y*: gint + width*: gint + + PGdkWindowClass* = ptr TGdkWindowClass + TGdkWindowClass* = enum + GDK_INPUT_OUTPUT, GDK_INPUT_ONLY + PGdkWindowType* = ptr TGdkWindowType + TGdkWindowType* = enum + GDK_WINDOW_ROOT, GDK_WINDOW_TOPLEVEL, GDK_WINDOW_CHILD, GDK_WINDOW_DIALOG, + GDK_WINDOW_TEMP, GDK_WINDOW_FOREIGN + PGdkWindowAttributesType* = ptr TGdkWindowAttributesType + TGdkWindowAttributesType* = int32 + PGdkWindowHints* = ptr TGdkWindowHints + TGdkWindowHints* = int32 + PGdkWindowTypeHint* = ptr TGdkWindowTypeHint + TGdkWindowTypeHint* = enum + GDK_WINDOW_TYPE_HINT_NORMAL, GDK_WINDOW_TYPE_HINT_DIALOG, + GDK_WINDOW_TYPE_HINT_MENU, GDK_WINDOW_TYPE_HINT_TOOLBAR + PGdkWMDecoration* = ptr TGdkWMDecoration + TGdkWMDecoration* = int32 + PGdkWMFunction* = ptr TGdkWMFunction + TGdkWMFunction* = int32 + PGdkGravity* = ptr TGdkGravity + TGdkGravity* = int + PGdkWindowEdge* = ptr TGdkWindowEdge + TGdkWindowEdge* = enum + GDK_WINDOW_EDGE_NORTH_WEST, GDK_WINDOW_EDGE_NORTH, + GDK_WINDOW_EDGE_NORTH_EAST, GDK_WINDOW_EDGE_WEST, GDK_WINDOW_EDGE_EAST, + GDK_WINDOW_EDGE_SOUTH_WEST, GDK_WINDOW_EDGE_SOUTH, + GDK_WINDOW_EDGE_SOUTH_EAST + PGdkWindowAttr* = ptr TGdkWindowAttr + TGdkWindowAttr* {.final, pure.} = object + title*: cstring + event_mask*: gint + x*: gint + y*: gint + width*: gint + height*: gint + wclass*: TGdkWindowClass + visual*: PGdkVisual + colormap*: PGdkColormap + window_type*: TGdkWindowType + cursor*: PGdkCursor + wmclass_name*: cstring + wmclass_class*: cstring + override_redirect*: gboolean + + PGdkGeometry* = ptr TGdkGeometry + TGdkGeometry* {.final, pure.} = object + min_width*: gint + min_height*: gint + max_width*: gint + max_height*: gint + base_width*: gint + base_height*: gint + width_inc*: gint + height_inc*: gint + min_aspect*: gdouble + max_aspect*: gdouble + win_gravity*: TGdkGravity + + PGdkPointerHooks* = ptr TGdkPointerHooks + TGdkPointerHooks* {.final, pure.} = object + get_pointer*: proc (window: PGdkWindow, x: Pgint, y: Pgint, + mask: PGdkModifierType): PGdkWindow{.cdecl.} + window_at_pointer*: proc (screen: PGdkScreen, win_x: Pgint, win_y: Pgint): PGdkWindow{. + cdecl.} + + PGdkWindowObject* = ptr TGdkWindowObject + TGdkWindowObject* = object of TGdkDrawable + impl*: PGdkDrawable + parent*: PGdkWindowObject + user_data*: gpointer + x*: gint + y*: gint + extension_events*: gint + filters*: PGList + children*: PGList + bg_color*: TGdkColor + bg_pixmap*: PGdkPixmap + paint_stack*: PGSList + update_area*: PGdkRegion + update_freeze_count*: guint + window_type*: guint8 + depth*: guint8 + resize_count*: guint8 + state*: TGdkWindowState + flag0*: guint16 + event_mask*: TGdkEventMask + + PGdkWindowObjectClass* = ptr TGdkWindowObjectClass + TGdkWindowObjectClass* = object of TGdkDrawableClass + + gdk_window_invalidate_maybe_recurse_child_func* = proc (para1: PGdkWindow, + para2: gpointer): gboolean + +proc GDK_TYPE_COLORMAP*(): GType +proc GDK_COLORMAP*(anObject: pointer): PGdkColormap +proc GDK_COLORMAP_CLASS*(klass: pointer): PGdkColormapClass +proc GDK_IS_COLORMAP*(anObject: pointer): bool +proc GDK_IS_COLORMAP_CLASS*(klass: pointer): bool +proc GDK_COLORMAP_GET_CLASS*(obj: pointer): PGdkColormapClass +proc GDK_TYPE_COLOR*(): GType +proc gdk_colormap_get_type*(): GType{.cdecl, dynlib: gdklib, + importc: "gdk_colormap_get_type".} +proc gdk_colormap_new*(visual: PGdkVisual, allocate: gboolean): PGdkColormap{. + cdecl, dynlib: gdklib, importc: "gdk_colormap_new".} +proc gdk_colormap_alloc_colors*(colormap: PGdkColormap, colors: PGdkColor, + ncolors: gint, writeable: gboolean, + best_match: gboolean, success: Pgboolean): gint{. + cdecl, dynlib: gdklib, importc: "gdk_colormap_alloc_colors".} +proc gdk_colormap_alloc_color*(colormap: PGdkColormap, color: PGdkColor, + writeable: gboolean, best_match: gboolean): gboolean{. + cdecl, dynlib: gdklib, importc: "gdk_colormap_alloc_color".} +proc gdk_colormap_free_colors*(colormap: PGdkColormap, colors: PGdkColor, + ncolors: gint){.cdecl, dynlib: gdklib, + importc: "gdk_colormap_free_colors".} +proc gdk_colormap_query_color*(colormap: PGdkColormap, pixel: gulong, + result: PGdkColor){.cdecl, dynlib: gdklib, + importc: "gdk_colormap_query_color".} +proc gdk_colormap_get_visual*(colormap: PGdkColormap): PGdkVisual{.cdecl, + dynlib: gdklib, importc: "gdk_colormap_get_visual".} +proc gdk_color_copy*(color: PGdkColor): PGdkColor{.cdecl, dynlib: gdklib, + importc: "gdk_color_copy".} +proc gdk_color_free*(color: PGdkColor){.cdecl, dynlib: gdklib, + importc: "gdk_color_free".} +proc gdk_color_parse*(spec: cstring, color: PGdkColor): gint{.cdecl, + dynlib: gdklib, importc: "gdk_color_parse".} +proc gdk_color_hash*(colora: PGdkColor): guint{.cdecl, dynlib: gdklib, + importc: "gdk_color_hash".} +proc gdk_color_equal*(colora: PGdkColor, colorb: PGdkColor): gboolean{.cdecl, + dynlib: gdklib, importc: "gdk_color_equal".} +proc gdk_color_get_type*(): GType{.cdecl, dynlib: gdklib, + importc: "gdk_color_get_type".} +const + GDK_CURSOR_IS_PIXMAP* = - (1) + GDK_X_CURSOR* = 0 + GDK_ARROW* = 2 + GDK_BASED_ARROW_DOWN* = 4 + GDK_BASED_ARROW_UP* = 6 + GDK_BOAT* = 8 + GDK_BOGOSITY* = 10 + GDK_BOTTOM_LEFT_CORNER* = 12 + GDK_BOTTOM_RIGHT_CORNER* = 14 + GDK_BOTTOM_SIDE* = 16 + GDK_BOTTOM_TEE* = 18 + GDK_BOX_SPIRAL* = 20 + GDK_CENTER_PTR* = 22 + GDK_CIRCLE* = 24 + GDK_CLOCK* = 26 + GDK_COFFEE_MUG* = 28 + GDK_CROSS* = 30 + GDK_CROSS_REVERSE* = 32 + GDK_CROSSHAIR* = 34 + GDK_DIAMOND_CROSS* = 36 + GDK_DOT* = 38 + GDK_DOTBOX* = 40 + GDK_DOUBLE_ARROW* = 42 + GDK_DRAFT_LARGE* = 44 + GDK_DRAFT_SMALL* = 46 + GDK_DRAPED_BOX* = 48 + GDK_EXCHANGE* = 50 + GDK_FLEUR* = 52 + GDK_GOBBLER* = 54 + GDK_GUMBY* = 56 + GDK_HAND1* = 58 + GDK_HAND2* = 60 + GDK_HEART* = 62 + GDK_ICON* = 64 + GDK_IRON_CROSS* = 66 + GDK_LEFT_PTR* = 68 + GDK_LEFT_SIDE* = 70 + GDK_LEFT_TEE* = 72 + GDK_LEFTBUTTON* = 74 + GDK_LL_ANGLE* = 76 + GDK_LR_ANGLE* = 78 + GDK_MAN* = 80 + GDK_MIDDLEBUTTON* = 82 + GDK_MOUSE* = 84 + GDK_PENCIL* = 86 + GDK_PIRATE* = 88 + GDK_PLUS* = 90 + GDK_QUESTION_ARROW* = 92 + GDK_RIGHT_PTR* = 94 + GDK_RIGHT_SIDE* = 96 + GDK_RIGHT_TEE* = 98 + GDK_RIGHTBUTTON* = 100 + GDK_RTL_LOGO* = 102 + GDK_SAILBOAT* = 104 + GDK_SB_DOWN_ARROW* = 106 + GDK_SB_H_DOUBLE_ARROW* = 108 + GDK_SB_LEFT_ARROW* = 110 + GDK_SB_RIGHT_ARROW* = 112 + GDK_SB_UP_ARROW* = 114 + GDK_SB_V_DOUBLE_ARROW* = 116 + GDK_SHUTTLE* = 118 + GDK_SIZING* = 120 + GDK_SPIDER* = 122 + GDK_SPRAYCAN* = 124 + GDK_STAR* = 126 + GDK_TARGET* = 128 + GDK_TCROSS* = 130 + GDK_TOP_LEFT_ARROW* = 132 + GDK_TOP_LEFT_CORNER* = 134 + GDK_TOP_RIGHT_CORNER* = 136 + GDK_TOP_SIDE* = 138 + GDK_TOP_TEE* = 140 + GDK_TREK* = 142 + GDK_UL_ANGLE* = 144 + GDK_UMBRELLA* = 146 + GDK_UR_ANGLE* = 148 + GDK_WATCH* = 150 + GDK_XTERM* = 152 + GDK_LAST_CURSOR* = GDK_XTERM + 1 + +proc GDK_TYPE_CURSOR*(): GType +proc gdk_cursor_get_type*(): GType{.cdecl, dynlib: gdklib, + importc: "gdk_cursor_get_type".} +proc gdk_cursor_new_for_screen*(screen: PGdkScreen, cursor_type: TGdkCursorType): PGdkCursor{. + cdecl, dynlib: gdklib, importc: "gdk_cursor_new_for_screen".} +proc gdk_cursor_new_from_pixmap*(source: PGdkPixmap, mask: PGdkPixmap, + fg: PGdkColor, bg: PGdkColor, x: gint, y: gint): PGdkCursor{. + cdecl, dynlib: gdklib, importc: "gdk_cursor_new_from_pixmap".} +proc gdk_cursor_get_screen*(cursor: PGdkCursor): PGdkScreen{.cdecl, + dynlib: gdklib, importc: "gdk_cursor_get_screen".} +proc gdk_cursor_ref*(cursor: PGdkCursor): PGdkCursor{.cdecl, dynlib: gdklib, + importc: "gdk_cursor_ref".} +proc gdk_cursor_unref*(cursor: PGdkCursor){.cdecl, dynlib: gdklib, + importc: "gdk_cursor_unref".} +const + GDK_ACTION_DEFAULT* = 1 shl 0 + GDK_ACTION_COPY* = 1 shl 1 + GDK_ACTION_MOVE* = 1 shl 2 + GDK_ACTION_LINK* = 1 shl 3 + GDK_ACTION_PRIVATE* = 1 shl 4 + GDK_ACTION_ASK* = 1 shl 5 + +proc GDK_TYPE_DRAG_CONTEXT*(): GType +proc GDK_DRAG_CONTEXT*(anObject: Pointer): PGdkDragContext +proc GDK_DRAG_CONTEXT_CLASS*(klass: Pointer): PGdkDragContextClass +proc GDK_IS_DRAG_CONTEXT*(anObject: Pointer): bool +proc GDK_IS_DRAG_CONTEXT_CLASS*(klass: Pointer): bool +proc GDK_DRAG_CONTEXT_GET_CLASS*(obj: Pointer): PGdkDragContextClass +proc gdk_drag_context_get_type*(): GType{.cdecl, dynlib: gdklib, + importc: "gdk_drag_context_get_type".} +proc gdk_drag_context_new*(): PGdkDragContext{.cdecl, dynlib: gdklib, + importc: "gdk_drag_context_new".} +proc gdk_drag_status*(context: PGdkDragContext, action: TGdkDragAction, + time: guint32){.cdecl, dynlib: gdklib, + importc: "gdk_drag_status".} +proc gdk_drop_reply*(context: PGdkDragContext, ok: gboolean, time: guint32){. + cdecl, dynlib: gdklib, importc: "gdk_drop_reply".} +proc gdk_drop_finish*(context: PGdkDragContext, success: gboolean, time: guint32){. + cdecl, dynlib: gdklib, importc: "gdk_drop_finish".} +proc gdk_drag_get_selection*(context: PGdkDragContext): TGdkAtom{.cdecl, + dynlib: gdklib, importc: "gdk_drag_get_selection".} +proc gdk_drag_begin*(window: PGdkWindow, targets: PGList): PGdkDragContext{. + cdecl, dynlib: gdklib, importc: "gdk_drag_begin".} +proc gdk_drag_get_protocol_for_display*(display: PGdkDisplay, xid: guint32, + protocol: PGdkDragProtocol): guint32{. + cdecl, dynlib: gdklib, importc: "gdk_drag_get_protocol_for_display".} +proc gdk_drag_find_window*(context: PGdkDragContext, drag_window: PGdkWindow, + x_root: gint, y_root: gint, w: var PGdkWindow, + protocol: PGdkDragProtocol){.cdecl, dynlib: gdklib, + importc: "gdk_drag_find_window".} +proc gdk_drag_motion*(context: PGdkDragContext, dest_window: PGdkWindow, + protocol: TGdkDragProtocol, x_root: gint, y_root: gint, + suggested_action: TGdkDragAction, + possible_actions: TGdkDragAction, time: guint32): gboolean{. + cdecl, dynlib: gdklib, importc: "gdk_drag_motion".} +proc gdk_drag_drop*(context: PGdkDragContext, time: guint32){.cdecl, + dynlib: gdklib, importc: "gdk_drag_drop".} +proc gdk_drag_abort*(context: PGdkDragContext, time: guint32){.cdecl, + dynlib: gdklib, importc: "gdk_drag_abort".} +proc gdkregion_EXTENTCHECK*(r1, r2: PGdkRegionBox): bool +proc gdkregion_EXTENTS*(r: PGdkRegionBox, idRect: PGdkRegion) +proc gdkregion_MEMCHECK*(reg: PGdkRegion, ARect, firstrect: var PGdkRegionBox): bool +proc gdkregion_CHECK_PREVIOUS*(Reg: PGdkRegion, R: PGdkRegionBox, + Rx1, Ry1, Rx2, Ry2: gint): bool +proc gdkregion_ADDRECT*(reg: PGdkRegion, r: PGdkRegionBox, + rx1, ry1, rx2, ry2: gint) +proc gdkregion_ADDRECTNOX*(reg: PGdkRegion, r: PGdkRegionBox, + rx1, ry1, rx2, ry2: gint) +proc gdkregion_EMPTY_REGION*(pReg: PGdkRegion): bool +proc gdkregion_REGION_NOT_EMPTY*(pReg: PGdkRegion): bool +proc gdkregion_INBOX*(r: TGdkRegionBox, x, y: gint): bool +proc GDK_TYPE_DRAWABLE*(): GType +proc GDK_DRAWABLE*(anObject: Pointer): PGdkDrawable +proc GDK_DRAWABLE_CLASS*(klass: Pointer): PGdkDrawableClass +proc GDK_IS_DRAWABLE*(anObject: Pointer): bool +proc GDK_IS_DRAWABLE_CLASS*(klass: Pointer): bool +proc GDK_DRAWABLE_GET_CLASS*(obj: Pointer): PGdkDrawableClass +proc gdk_drawable_get_type*(): GType{.cdecl, dynlib: gdklib, + importc: "gdk_drawable_get_type".} +proc gdk_drawable_get_size*(drawable: PGdkDrawable, width: Pgint, height: Pgint){. + cdecl, dynlib: gdklib, importc: "gdk_drawable_get_size".} +proc gdk_drawable_set_colormap*(drawable: PGdkDrawable, colormap: PGdkColormap){. + cdecl, dynlib: gdklib, importc: "gdk_drawable_set_colormap".} +proc gdk_drawable_get_colormap*(drawable: PGdkDrawable): PGdkColormap{.cdecl, + dynlib: gdklib, importc: "gdk_drawable_get_colormap".} +proc gdk_drawable_get_visual*(drawable: PGdkDrawable): PGdkVisual{.cdecl, + dynlib: gdklib, importc: "gdk_drawable_get_visual".} +proc gdk_drawable_get_depth*(drawable: PGdkDrawable): gint{.cdecl, + dynlib: gdklib, importc: "gdk_drawable_get_depth".} +proc gdk_drawable_get_screen*(drawable: PGdkDrawable): PGdkScreen{.cdecl, + dynlib: gdklib, importc: "gdk_drawable_get_screen".} +proc gdk_drawable_get_display*(drawable: PGdkDrawable): PGdkDisplay{.cdecl, + dynlib: gdklib, importc: "gdk_drawable_get_display".} +proc gdk_draw_point*(drawable: PGdkDrawable, gc: PGdkGC, x: gint, y: gint){. + cdecl, dynlib: gdklib, importc: "gdk_draw_point".} +proc gdk_draw_line*(drawable: PGdkDrawable, gc: PGdkGC, x1: gint, y1: gint, + x2: gint, y2: gint){.cdecl, dynlib: gdklib, + importc: "gdk_draw_line".} +proc gdk_draw_rectangle*(drawable: PGdkDrawable, gc: PGdkGC, filled: gint, + x: gint, y: gint, width: gint, height: gint){.cdecl, + dynlib: gdklib, importc: "gdk_draw_rectangle".} +proc gdk_draw_arc*(drawable: PGdkDrawable, gc: PGdkGC, filled: gint, x: gint, + y: gint, width: gint, height: gint, angle1: gint, + angle2: gint){.cdecl, dynlib: gdklib, importc: "gdk_draw_arc".} +proc gdk_draw_polygon*(drawable: PGdkDrawable, gc: PGdkGC, filled: gint, + points: PGdkPoint, npoints: gint){.cdecl, dynlib: gdklib, + importc: "gdk_draw_polygon".} +proc gdk_draw_drawable*(drawable: PGdkDrawable, gc: PGdkGC, src: PGdkDrawable, + xsrc: gint, ysrc: gint, xdest: gint, ydest: gint, + width: gint, height: gint){.cdecl, dynlib: gdklib, + importc: "gdk_draw_drawable".} +proc gdk_draw_image*(drawable: PGdkDrawable, gc: PGdkGC, image: PGdkImage, + xsrc: gint, ysrc: gint, xdest: gint, ydest: gint, + width: gint, height: gint){.cdecl, dynlib: gdklib, + importc: "gdk_draw_image".} +proc gdk_draw_points*(drawable: PGdkDrawable, gc: PGdkGC, points: PGdkPoint, + npoints: gint){.cdecl, dynlib: gdklib, + importc: "gdk_draw_points".} +proc gdk_draw_segments*(drawable: PGdkDrawable, gc: PGdkGC, segs: PGdkSegment, + nsegs: gint){.cdecl, dynlib: gdklib, + importc: "gdk_draw_segments".} +proc gdk_draw_lines*(drawable: PGdkDrawable, gc: PGdkGC, points: PGdkPoint, + npoints: gint){.cdecl, dynlib: gdklib, + importc: "gdk_draw_lines".} +proc gdk_draw_glyphs*(drawable: PGdkDrawable, gc: PGdkGC, font: PPangoFont, + x: gint, y: gint, glyphs: PPangoGlyphString){.cdecl, + dynlib: gdklib, importc: "gdk_draw_glyphs".} +proc gdk_draw_layout_line*(drawable: PGdkDrawable, gc: PGdkGC, x: gint, y: gint, + line: PPangoLayoutLine){.cdecl, dynlib: gdklib, + importc: "gdk_draw_layout_line".} +proc gdk_draw_layout*(drawable: PGdkDrawable, gc: PGdkGC, x: gint, y: gint, + layout: PPangoLayout){.cdecl, dynlib: gdklib, + importc: "gdk_draw_layout".} +proc gdk_draw_layout_line_with_colors*(drawable: PGdkDrawable, gc: PGdkGC, + x: gint, y: gint, line: PPangoLayoutLine, + foreground: PGdkColor, + background: PGdkColor){.cdecl, + dynlib: gdklib, importc: "gdk_draw_layout_line_with_colors".} +proc gdk_draw_layout_with_colors*(drawable: PGdkDrawable, gc: PGdkGC, x: gint, + y: gint, layout: PPangoLayout, + foreground: PGdkColor, background: PGdkColor){. + cdecl, dynlib: gdklib, importc: "gdk_draw_layout_with_colors".} +proc gdk_drawable_get_image*(drawable: PGdkDrawable, x: gint, y: gint, + width: gint, height: gint): PGdkImage{.cdecl, + dynlib: gdklib, importc: "gdk_drawable_get_image".} +proc gdk_drawable_get_clip_region*(drawable: PGdkDrawable): PGdkRegion{.cdecl, + dynlib: gdklib, importc: "gdk_drawable_get_clip_region".} +proc gdk_drawable_get_visible_region*(drawable: PGdkDrawable): PGdkRegion{. + cdecl, dynlib: gdklib, importc: "gdk_drawable_get_visible_region".} +const + GDK_NOTHING* = - (1) + GDK_DELETE* = 0 + GDK_DESTROY* = 1 + GDK_EXPOSE* = 2 + GDK_MOTION_NOTIFY* = 3 + GDK_BUTTON_PRESS* = 4 + GDK_2BUTTON_PRESS* = 5 + GDK_3BUTTON_PRESS* = 6 + GDK_BUTTON_RELEASE* = 7 + GDK_KEY_PRESS* = 8 + GDK_KEY_RELEASE* = 9 + GDK_ENTER_NOTIFY* = 10 + GDK_LEAVE_NOTIFY* = 11 + GDK_FOCUS_CHANGE* = 12 + GDK_CONFIGURE* = 13 + GDK_MAP* = 14 + GDK_UNMAP* = 15 + GDK_PROPERTY_NOTIFY* = 16 + GDK_SELECTION_CLEAR* = 17 + GDK_SELECTION_REQUEST* = 18 + GDK_SELECTION_NOTIFY* = 19 + GDK_PROXIMITY_IN* = 20 + GDK_PROXIMITY_OUT* = 21 + GDK_DRAG_ENTER* = 22 + GDK_DRAG_LEAVE* = 23 + GDK_DRAG_MOTION_EVENT* = 24 + GDK_DRAG_STATUS_EVENT* = 25 + GDK_DROP_START* = 26 + GDK_DROP_FINISHED* = 27 + GDK_CLIENT_EVENT* = 28 + GDK_VISIBILITY_NOTIFY* = 29 + GDK_NO_EXPOSE* = 30 + GDK_SCROLL* = 31 + GDK_WINDOW_STATE* = 32 + GDK_SETTING* = 33 + GDK_NOTIFY_ANCESTOR* = 0 + GDK_NOTIFY_VIRTUAL* = 1 + GDK_NOTIFY_INFERIOR* = 2 + GDK_NOTIFY_NONLINEAR* = 3 + GDK_NOTIFY_NONLINEAR_VIRTUAL* = 4 + GDK_NOTIFY_UNKNOWN* = 5 + +proc GDK_TYPE_EVENT*(): GType +const + G_PRIORITY_DEFAULT* = 0 + GDK_PRIORITY_EVENTS* = G_PRIORITY_DEFAULT + #GDK_PRIORITY_REDRAW* = G_PRIORITY_HIGH_IDLE + 20 + GDK_EXPOSURE_MASK* = 1 shl 1 + GDK_POINTER_MOTION_MASK* = 1 shl 2 + GDK_POINTER_MOTION_HINT_MASK* = 1 shl 3 + GDK_BUTTON_MOTION_MASK* = 1 shl 4 + GDK_BUTTON1_MOTION_MASK* = 1 shl 5 + GDK_BUTTON2_MOTION_MASK* = 1 shl 6 + GDK_BUTTON3_MOTION_MASK* = 1 shl 7 + GDK_BUTTON_PRESS_MASK* = 1 shl 8 + GDK_BUTTON_RELEASE_MASK* = 1 shl 9 + GDK_KEY_PRESS_MASK* = 1 shl 10 + GDK_KEY_RELEASE_MASK* = 1 shl 11 + GDK_ENTER_NOTIFY_MASK* = 1 shl 12 + GDK_LEAVE_NOTIFY_MASK* = 1 shl 13 + GDK_FOCUS_CHANGE_MASK* = 1 shl 14 + GDK_STRUCTURE_MASK* = 1 shl 15 + GDK_PROPERTY_CHANGE_MASK* = 1 shl 16 + GDK_VISIBILITY_NOTIFY_MASK* = 1 shl 17 + GDK_PROXIMITY_IN_MASK* = 1 shl 18 + GDK_PROXIMITY_OUT_MASK* = 1 shl 19 + GDK_SUBSTRUCTURE_MASK* = 1 shl 20 + GDK_SCROLL_MASK* = 1 shl 21 + GDK_ALL_EVENTS_MASK* = 0x003FFFFE + GDK_WINDOW_STATE_WITHDRAWN* = 1 shl 0 + GDK_WINDOW_STATE_ICONIFIED* = 1 shl 1 + GDK_WINDOW_STATE_MAXIMIZED* = 1 shl 2 + GDK_WINDOW_STATE_STICKY* = 1 shl 3 + +proc gdk_event_get_type*(): GType{.cdecl, dynlib: gdklib, + importc: "gdk_event_get_type".} +proc gdk_events_pending*(): gboolean{.cdecl, dynlib: gdklib, + importc: "gdk_events_pending".} +proc gdk_event_get*(): PGdkEvent{.cdecl, dynlib: gdklib, + importc: "gdk_event_get".} +proc gdk_event_peek*(): PGdkEvent{.cdecl, dynlib: gdklib, + importc: "gdk_event_peek".} +proc gdk_event_get_graphics_expose*(window: PGdkWindow): PGdkEvent{.cdecl, + dynlib: gdklib, importc: "gdk_event_get_graphics_expose".} +proc gdk_event_put*(event: PGdkEvent){.cdecl, dynlib: gdklib, + importc: "gdk_event_put".} +proc gdk_event_copy*(event: PGdkEvent): PGdkEvent{.cdecl, dynlib: gdklib, + importc: "gdk_event_copy".} +proc gdk_event_free*(event: PGdkEvent){.cdecl, dynlib: gdklib, + importc: "gdk_event_free".} +proc gdk_event_get_time*(event: PGdkEvent): guint32{.cdecl, dynlib: gdklib, + importc: "gdk_event_get_time".} +proc gdk_event_get_state*(event: PGdkEvent, state: PGdkModifierType): gboolean{. + cdecl, dynlib: gdklib, importc: "gdk_event_get_state".} +proc gdk_event_get_coords*(event: PGdkEvent, x_win: Pgdouble, y_win: Pgdouble): gboolean{. + cdecl, dynlib: gdklib, importc: "gdk_event_get_coords".} +proc gdk_event_get_root_coords*(event: PGdkEvent, x_root: Pgdouble, + y_root: Pgdouble): gboolean{.cdecl, + dynlib: gdklib, importc: "gdk_event_get_root_coords".} +proc gdk_event_get_axis*(event: PGdkEvent, axis_use: TGdkAxisUse, + value: Pgdouble): gboolean{.cdecl, dynlib: gdklib, + importc: "gdk_event_get_axis".} +proc gdk_event_handler_set*(func: TGdkEventFunc, data: gpointer, + notify: TGDestroyNotify){.cdecl, dynlib: gdklib, + importc: "gdk_event_handler_set".} +proc gdk_set_show_events*(show_events: gboolean){.cdecl, dynlib: gdklib, + importc: "gdk_set_show_events".} +proc gdk_get_show_events*(): gboolean{.cdecl, dynlib: gdklib, + importc: "gdk_get_show_events".} +proc GDK_TYPE_FONT*(): GType +proc gdk_font_get_type*(): GType{.cdecl, dynlib: gdklib, + importc: "gdk_font_get_type".} +proc gdk_font_load_for_display*(display: PGdkDisplay, font_name: cstring): PGdkFont{. + cdecl, dynlib: gdklib, importc: "gdk_font_load_for_display".} +proc gdk_fontset_load_for_display*(display: PGdkDisplay, fontset_name: cstring): PGdkFont{. + cdecl, dynlib: gdklib, importc: "gdk_fontset_load_for_display".} +proc gdk_font_from_description_for_display*(display: PGdkDisplay, + font_desc: PPangoFontDescription): PGdkFont{.cdecl, dynlib: gdklib, + importc: "gdk_font_from_description_for_display".} +proc gdk_font_ref*(font: PGdkFont): PGdkFont{.cdecl, dynlib: gdklib, + importc: "gdk_font_ref".} +proc gdk_font_unref*(font: PGdkFont){.cdecl, dynlib: gdklib, + importc: "gdk_font_unref".} +proc gdk_font_id*(font: PGdkFont): gint{.cdecl, dynlib: gdklib, + importc: "gdk_font_id".} +proc gdk_font_equal*(fonta: PGdkFont, fontb: PGdkFont): gboolean{.cdecl, + dynlib: gdklib, importc: "gdk_font_equal".} +proc gdk_string_width*(font: PGdkFont, `string`: cstring): gint{.cdecl, + dynlib: gdklib, importc: "gdk_string_width".} +proc gdk_text_width*(font: PGdkFont, text: cstring, text_length: gint): gint{. + cdecl, dynlib: gdklib, importc: "gdk_text_width".} +proc gdk_text_width_wc*(font: PGdkFont, text: PGdkWChar, text_length: gint): gint{. + cdecl, dynlib: gdklib, importc: "gdk_text_width_wc".} +proc gdk_char_width*(font: PGdkFont, character: gchar): gint{.cdecl, + dynlib: gdklib, importc: "gdk_char_width".} +proc gdk_char_width_wc*(font: PGdkFont, character: TGdkWChar): gint{.cdecl, + dynlib: gdklib, importc: "gdk_char_width_wc".} +proc gdk_string_measure*(font: PGdkFont, `string`: cstring): gint{.cdecl, + dynlib: gdklib, importc: "gdk_string_measure".} +proc gdk_text_measure*(font: PGdkFont, text: cstring, text_length: gint): gint{. + cdecl, dynlib: gdklib, importc: "gdk_text_measure".} +proc gdk_char_measure*(font: PGdkFont, character: gchar): gint{.cdecl, + dynlib: gdklib, importc: "gdk_char_measure".} +proc gdk_string_height*(font: PGdkFont, `string`: cstring): gint{.cdecl, + dynlib: gdklib, importc: "gdk_string_height".} +proc gdk_text_height*(font: PGdkFont, text: cstring, text_length: gint): gint{. + cdecl, dynlib: gdklib, importc: "gdk_text_height".} +proc gdk_char_height*(font: PGdkFont, character: gchar): gint{.cdecl, + dynlib: gdklib, importc: "gdk_char_height".} +proc gdk_text_extents*(font: PGdkFont, text: cstring, text_length: gint, + lbearing: Pgint, rbearing: Pgint, width: Pgint, + ascent: Pgint, descent: Pgint){.cdecl, dynlib: gdklib, + importc: "gdk_text_extents".} +proc gdk_text_extents_wc*(font: PGdkFont, text: PGdkWChar, text_length: gint, + lbearing: Pgint, rbearing: Pgint, width: Pgint, + ascent: Pgint, descent: Pgint){.cdecl, dynlib: gdklib, + importc: "gdk_text_extents_wc".} +proc gdk_string_extents*(font: PGdkFont, `string`: cstring, lbearing: Pgint, + rbearing: Pgint, width: Pgint, ascent: Pgint, + descent: Pgint){.cdecl, dynlib: gdklib, + importc: "gdk_string_extents".} +proc gdk_font_get_display*(font: PGdkFont): PGdkDisplay{.cdecl, dynlib: gdklib, + importc: "gdk_font_get_display".} +const + GDK_GC_FOREGROUND* = 1 shl 0 + GDK_GC_BACKGROUND* = 1 shl 1 + GDK_GC_FONT* = 1 shl 2 + GDK_GC_FUNCTION* = 1 shl 3 + GDK_GC_FILL* = 1 shl 4 + GDK_GC_TILE* = 1 shl 5 + GDK_GC_STIPPLE* = 1 shl 6 + GDK_GC_CLIP_MASK* = 1 shl 7 + GDK_GC_SUBWINDOW* = 1 shl 8 + GDK_GC_TS_X_ORIGIN* = 1 shl 9 + GDK_GC_TS_Y_ORIGIN* = 1 shl 10 + GDK_GC_CLIP_X_ORIGIN* = 1 shl 11 + GDK_GC_CLIP_Y_ORIGIN* = 1 shl 12 + GDK_GC_EXPOSURES* = 1 shl 13 + GDK_GC_LINE_WIDTH* = 1 shl 14 + GDK_GC_LINE_STYLE* = 1 shl 15 + GDK_GC_CAP_STYLE* = 1 shl 16 + GDK_GC_JOIN_STYLE* = 1 shl 17 + GDK_CLIP_BY_CHILDREN* = 0 + GDK_INCLUDE_INFERIORS* = 1 + +proc GDK_TYPE_GC*(): GType +proc GDK_GC*(anObject: Pointer): PGdkGC +proc GDK_GC_CLASS*(klass: Pointer): PGdkGCClass +proc GDK_IS_GC*(anObject: Pointer): bool +proc GDK_IS_GC_CLASS*(klass: Pointer): bool +proc GDK_GC_GET_CLASS*(obj: Pointer): PGdkGCClass +proc gdk_gc_get_type*(): GType{.cdecl, dynlib: gdklib, + importc: "gdk_gc_get_type".} +proc gdk_gc_new*(drawable: PGdkDrawable): PGdkGC{.cdecl, dynlib: gdklib, + importc: "gdk_gc_new".} +proc gdk_gc_new_with_values*(drawable: PGdkDrawable, values: PGdkGCValues, + values_mask: TGdkGCValuesMask): PGdkGC{.cdecl, + dynlib: gdklib, importc: "gdk_gc_new_with_values".} +proc gdk_gc_get_values*(gc: PGdkGC, values: PGdkGCValues){.cdecl, + dynlib: gdklib, importc: "gdk_gc_get_values".} +proc gdk_gc_set_values*(gc: PGdkGC, values: PGdkGCValues, + values_mask: TGdkGCValuesMask){.cdecl, dynlib: gdklib, + importc: "gdk_gc_set_values".} +proc gdk_gc_set_foreground*(gc: PGdkGC, color: PGdkColor){.cdecl, + dynlib: gdklib, importc: "gdk_gc_set_foreground".} +proc gdk_gc_set_background*(gc: PGdkGC, color: PGdkColor){.cdecl, + dynlib: gdklib, importc: "gdk_gc_set_background".} +proc gdk_gc_set_function*(gc: PGdkGC, `function`: TGdkFunction){.cdecl, + dynlib: gdklib, importc: "gdk_gc_set_function".} +proc gdk_gc_set_fill*(gc: PGdkGC, fill: TGdkFill){.cdecl, dynlib: gdklib, + importc: "gdk_gc_set_fill".} +proc gdk_gc_set_tile*(gc: PGdkGC, tile: PGdkPixmap){.cdecl, dynlib: gdklib, + importc: "gdk_gc_set_tile".} +proc gdk_gc_set_stipple*(gc: PGdkGC, stipple: PGdkPixmap){.cdecl, + dynlib: gdklib, importc: "gdk_gc_set_stipple".} +proc gdk_gc_set_ts_origin*(gc: PGdkGC, x: gint, y: gint){.cdecl, dynlib: gdklib, + importc: "gdk_gc_set_ts_origin".} +proc gdk_gc_set_clip_origin*(gc: PGdkGC, x: gint, y: gint){.cdecl, + dynlib: gdklib, importc: "gdk_gc_set_clip_origin".} +proc gdk_gc_set_clip_mask*(gc: PGdkGC, mask: PGdkBitmap){.cdecl, dynlib: gdklib, + importc: "gdk_gc_set_clip_mask".} +proc gdk_gc_set_clip_rectangle*(gc: PGdkGC, rectangle: PGdkRectangle){.cdecl, + dynlib: gdklib, importc: "gdk_gc_set_clip_rectangle".} +proc gdk_gc_set_clip_region*(gc: PGdkGC, region: PGdkRegion){.cdecl, + dynlib: gdklib, importc: "gdk_gc_set_clip_region".} +proc gdk_gc_set_subwindow*(gc: PGdkGC, mode: TGdkSubwindowMode){.cdecl, + dynlib: gdklib, importc: "gdk_gc_set_subwindow".} +proc gdk_gc_set_exposures*(gc: PGdkGC, exposures: gboolean){.cdecl, + dynlib: gdklib, importc: "gdk_gc_set_exposures".} +proc gdk_gc_set_line_attributes*(gc: PGdkGC, line_width: gint, + line_style: TGdkLineStyle, + cap_style: TGdkCapStyle, + join_style: TGdkJoinStyle){.cdecl, + dynlib: gdklib, importc: "gdk_gc_set_line_attributes".} +proc gdk_gc_set_dashes*(gc: PGdkGC, dash_offset: gint, + dash_list: openarray[gint8]){.cdecl, dynlib: gdklib, + importc: "gdk_gc_set_dashes".} +proc gdk_gc_offset*(gc: PGdkGC, x_offset: gint, y_offset: gint){.cdecl, + dynlib: gdklib, importc: "gdk_gc_offset".} +proc gdk_gc_copy*(dst_gc: PGdkGC, src_gc: PGdkGC){.cdecl, dynlib: gdklib, + importc: "gdk_gc_copy".} +proc gdk_gc_set_colormap*(gc: PGdkGC, colormap: PGdkColormap){.cdecl, + dynlib: gdklib, importc: "gdk_gc_set_colormap".} +proc gdk_gc_get_colormap*(gc: PGdkGC): PGdkColormap{.cdecl, dynlib: gdklib, + importc: "gdk_gc_get_colormap".} +proc gdk_gc_set_rgb_fg_color*(gc: PGdkGC, color: PGdkColor){.cdecl, + dynlib: gdklib, importc: "gdk_gc_set_rgb_fg_color".} +proc gdk_gc_set_rgb_bg_color*(gc: PGdkGC, color: PGdkColor){.cdecl, + dynlib: gdklib, importc: "gdk_gc_set_rgb_bg_color".} +proc gdk_gc_get_screen*(gc: PGdkGC): PGdkScreen{.cdecl, dynlib: gdklib, + importc: "gdk_gc_get_screen".} +proc GDK_TYPE_IMAGE*(): GType +proc GDK_IMAGE*(anObject: Pointer): PGdkImage +proc GDK_IMAGE_CLASS*(klass: Pointer): PGdkImageClass +proc GDK_IS_IMAGE*(anObject: Pointer): bool +proc GDK_IS_IMAGE_CLASS*(klass: Pointer): bool +proc GDK_IMAGE_GET_CLASS*(obj: Pointer): PGdkImageClass +proc gdk_image_get_type*(): GType{.cdecl, dynlib: gdklib, + importc: "gdk_image_get_type".} +proc gdk_image_new*(`type`: TGdkImageType, visual: PGdkVisual, width: gint, + height: gint): PGdkImage{.cdecl, dynlib: gdklib, + importc: "gdk_image_new".} +proc gdk_image_put_pixel*(image: PGdkImage, x: gint, y: gint, pixel: guint32){. + cdecl, dynlib: gdklib, importc: "gdk_image_put_pixel".} +proc gdk_image_get_pixel*(image: PGdkImage, x: gint, y: gint): guint32{.cdecl, + dynlib: gdklib, importc: "gdk_image_get_pixel".} +proc gdk_image_set_colormap*(image: PGdkImage, colormap: PGdkColormap){.cdecl, + dynlib: gdklib, importc: "gdk_image_set_colormap".} +proc gdk_image_get_colormap*(image: PGdkImage): PGdkColormap{.cdecl, + dynlib: gdklib, importc: "gdk_image_get_colormap".} +const + GDK_AXIS_IGNORE* = 0 + GDK_AXIS_X* = 1 + GDK_AXIS_Y* = 2 + GDK_AXIS_PRESSURE* = 3 + GDK_AXIS_XTILT* = 4 + GDK_AXIS_YTILT* = 5 + GDK_AXIS_WHEEL* = 6 + GDK_AXIS_LAST* = 7 + +proc GDK_TYPE_DEVICE*(): GType +proc GDK_DEVICE*(anObject: Pointer): PGdkDevice +proc GDK_DEVICE_CLASS*(klass: Pointer): PGdkDeviceClass +proc GDK_IS_DEVICE*(anObject: Pointer): bool +proc GDK_IS_DEVICE_CLASS*(klass: Pointer): bool +proc GDK_DEVICE_GET_CLASS*(obj: Pointer): PGdkDeviceClass +proc gdk_device_get_type*(): GType{.cdecl, dynlib: gdklib, + importc: "gdk_device_get_type".} +proc gdk_device_set_source*(device: PGdkDevice, source: TGdkInputSource){.cdecl, + dynlib: gdklib, importc: "gdk_device_set_source".} +proc gdk_device_set_mode*(device: PGdkDevice, mode: TGdkInputMode): gboolean{. + cdecl, dynlib: gdklib, importc: "gdk_device_set_mode".} +proc gdk_device_set_key*(device: PGdkDevice, index: guint, keyval: guint, + modifiers: TGdkModifierType){.cdecl, dynlib: gdklib, + importc: "gdk_device_set_key".} +proc gdk_device_set_axis_use*(device: PGdkDevice, index: guint, use: TGdkAxisUse){. + cdecl, dynlib: gdklib, importc: "gdk_device_set_axis_use".} +proc gdk_device_get_state*(device: PGdkDevice, window: PGdkWindow, + axes: Pgdouble, mask: PGdkModifierType){.cdecl, + dynlib: gdklib, importc: "gdk_device_get_state".} +proc gdk_device_get_history*(device: PGdkDevice, window: PGdkWindow, + start: guint32, stop: guint32, + s: var PPGdkTimeCoord, n_events: Pgint): gboolean{. + cdecl, dynlib: gdklib, importc: "gdk_device_get_history".} +proc gdk_device_free_history*(events: PPGdkTimeCoord, n_events: gint){.cdecl, + dynlib: gdklib, importc: "gdk_device_free_history".} +proc gdk_device_get_axis*(device: PGdkDevice, axes: Pgdouble, use: TGdkAxisUse, + value: Pgdouble): gboolean{.cdecl, dynlib: gdklib, + importc: "gdk_device_get_axis".} +proc gdk_input_set_extension_events*(window: PGdkWindow, mask: gint, + mode: TGdkExtensionMode){.cdecl, + dynlib: gdklib, importc: "gdk_input_set_extension_events".} +proc gdk_device_get_core_pointer*(): PGdkDevice{.cdecl, dynlib: gdklib, + importc: "gdk_device_get_core_pointer".} +proc GDK_TYPE_KEYMAP*(): GType +proc GDK_KEYMAP*(anObject: Pointer): PGdkKeymap +proc GDK_KEYMAP_CLASS*(klass: Pointer): PGdkKeymapClass +proc GDK_IS_KEYMAP*(anObject: Pointer): bool +proc GDK_IS_KEYMAP_CLASS*(klass: Pointer): bool +proc GDK_KEYMAP_GET_CLASS*(obj: Pointer): PGdkKeymapClass +proc gdk_keymap_get_type*(): GType{.cdecl, dynlib: gdklib, + importc: "gdk_keymap_get_type".} +proc gdk_keymap_get_for_display*(display: PGdkDisplay): PGdkKeymap{.cdecl, + dynlib: gdklib, importc: "gdk_keymap_get_for_display".} +proc gdk_keymap_lookup_key*(keymap: PGdkKeymap, key: PGdkKeymapKey): guint{. + cdecl, dynlib: gdklib, importc: "gdk_keymap_lookup_key".} +proc gdk_keymap_translate_keyboard_state*(keymap: PGdkKeymap, + hardware_keycode: guint, state: TGdkModifierType, group: gint, + keyval: Pguint, effective_group: Pgint, level: Pgint, + consumed_modifiers: PGdkModifierType): gboolean{.cdecl, dynlib: gdklib, + importc: "gdk_keymap_translate_keyboard_state".} +proc gdk_keymap_get_entries_for_keyval*(keymap: PGdkKeymap, keyval: guint, + s: var PGdkKeymapKey, n_keys: Pgint): gboolean{. + cdecl, dynlib: gdklib, importc: "gdk_keymap_get_entries_for_keyval".} +proc gdk_keymap_get_entries_for_keycode*(keymap: PGdkKeymap, + hardware_keycode: guint, s: var PGdkKeymapKey, sasdf: var Pguint, + n_entries: Pgint): gboolean{.cdecl, dynlib: gdklib, + importc: "gdk_keymap_get_entries_for_keycode".} +proc gdk_keymap_get_direction*(keymap: PGdkKeymap): TPangoDirection{.cdecl, + dynlib: gdklib, importc: "gdk_keymap_get_direction".} +proc gdk_keyval_name*(keyval: guint): cstring{.cdecl, dynlib: gdklib, + importc: "gdk_keyval_name".} +proc gdk_keyval_from_name*(keyval_name: cstring): guint{.cdecl, dynlib: gdklib, + importc: "gdk_keyval_from_name".} +proc gdk_keyval_convert_case*(symbol: guint, lower: Pguint, upper: Pguint){. + cdecl, dynlib: gdklib, importc: "gdk_keyval_convert_case".} +proc gdk_keyval_to_upper*(keyval: guint): guint{.cdecl, dynlib: gdklib, + importc: "gdk_keyval_to_upper".} +proc gdk_keyval_to_lower*(keyval: guint): guint{.cdecl, dynlib: gdklib, + importc: "gdk_keyval_to_lower".} +proc gdk_keyval_is_upper*(keyval: guint): gboolean{.cdecl, dynlib: gdklib, + importc: "gdk_keyval_is_upper".} +proc gdk_keyval_is_lower*(keyval: guint): gboolean{.cdecl, dynlib: gdklib, + importc: "gdk_keyval_is_lower".} +proc gdk_keyval_to_unicode*(keyval: guint): guint32{.cdecl, dynlib: gdklib, + importc: "gdk_keyval_to_unicode".} +proc gdk_unicode_to_keyval*(wc: guint32): guint{.cdecl, dynlib: gdklib, + importc: "gdk_unicode_to_keyval".} +const + GDK_KEY_VoidSymbol* = 0x00FFFFFF + GDK_KEY_BackSpace* = 0x0000FF08 + GDK_KEY_Tab* = 0x0000FF09 + GDK_KEY_Linefeed* = 0x0000FF0A + GDK_KEY_Clear* = 0x0000FF0B + GDK_KEY_Return* = 0x0000FF0D + GDK_KEY_Pause* = 0x0000FF13 + GDK_KEY_Scroll_Lock* = 0x0000FF14 + GDK_KEY_Sys_Req* = 0x0000FF15 + GDK_KEY_Escape* = 0x0000FF1B + GDK_KEY_Delete* = 0x0000FFFF + GDK_KEY_Multi_key* = 0x0000FF20 + GDK_KEY_Codeinput* = 0x0000FF37 + GDK_KEY_SingleCandidate* = 0x0000FF3C + GDK_KEY_MultipleCandidate* = 0x0000FF3D + GDK_KEY_PreviousCandidate* = 0x0000FF3E + GDK_KEY_Kanji* = 0x0000FF21 + GDK_KEY_Muhenkan* = 0x0000FF22 + GDK_KEY_Henkan_Mode* = 0x0000FF23 + GDK_KEY_Henkan* = 0x0000FF23 + GDK_KEY_Romaji* = 0x0000FF24 + GDK_KEY_Hiragana* = 0x0000FF25 + GDK_KEY_Katakana* = 0x0000FF26 + GDK_KEY_Hiragana_Katakana* = 0x0000FF27 + GDK_KEY_Zenkaku* = 0x0000FF28 + GDK_KEY_Hankaku* = 0x0000FF29 + GDK_KEY_Zenkaku_Hankaku* = 0x0000FF2A + GDK_KEY_Touroku* = 0x0000FF2B + GDK_KEY_Massyo* = 0x0000FF2C + GDK_KEY_Kana_Lock* = 0x0000FF2D + GDK_KEY_Kana_Shift* = 0x0000FF2E + GDK_KEY_Eisu_Shift* = 0x0000FF2F + GDK_KEY_Eisu_toggle* = 0x0000FF30 + GDK_KEY_Kanji_Bangou* = 0x0000FF37 + GDK_KEY_Zen_Koho* = 0x0000FF3D + GDK_KEY_Mae_Koho* = 0x0000FF3E + GDK_KEY_Home* = 0x0000FF50 + GDK_KEY_Left* = 0x0000FF51 + GDK_KEY_Up* = 0x0000FF52 + GDK_KEY_Right* = 0x0000FF53 + GDK_KEY_Down* = 0x0000FF54 + GDK_KEY_Prior* = 0x0000FF55 + GDK_KEY_Page_Up* = 0x0000FF55 + GDK_KEY_Next* = 0x0000FF56 + GDK_KEY_Page_Down* = 0x0000FF56 + GDK_KEY_End* = 0x0000FF57 + GDK_KEY_Begin* = 0x0000FF58 + GDK_KEY_Select* = 0x0000FF60 + GDK_KEY_Print* = 0x0000FF61 + GDK_KEY_Execute* = 0x0000FF62 + GDK_KEY_Insert* = 0x0000FF63 + GDK_KEY_Undo* = 0x0000FF65 + GDK_KEY_Redo* = 0x0000FF66 + GDK_KEY_Menu* = 0x0000FF67 + GDK_KEY_Find* = 0x0000FF68 + GDK_KEY_Cancel* = 0x0000FF69 + GDK_KEY_Help* = 0x0000FF6A + GDK_KEY_Break* = 0x0000FF6B + GDK_KEY_Mode_switch* = 0x0000FF7E + GDK_KEY_script_switch* = 0x0000FF7E + GDK_KEY_Num_Lock* = 0x0000FF7F + GDK_KEY_KP_Space* = 0x0000FF80 + GDK_KEY_KP_Tab* = 0x0000FF89 + GDK_KEY_KP_Enter* = 0x0000FF8D + GDK_KEY_KP_F1* = 0x0000FF91 + GDK_KEY_KP_F2* = 0x0000FF92 + GDK_KEY_KP_F3* = 0x0000FF93 + GDK_KEY_KP_F4* = 0x0000FF94 + GDK_KEY_KP_Home* = 0x0000FF95 + GDK_KEY_KP_Left* = 0x0000FF96 + GDK_KEY_KP_Up* = 0x0000FF97 + GDK_KEY_KP_Right* = 0x0000FF98 + GDK_KEY_KP_Down* = 0x0000FF99 + GDK_KEY_KP_Prior* = 0x0000FF9A + GDK_KEY_KP_Page_Up* = 0x0000FF9A + GDK_KEY_KP_Next* = 0x0000FF9B + GDK_KEY_KP_Page_Down* = 0x0000FF9B + GDK_KEY_KP_End* = 0x0000FF9C + GDK_KEY_KP_Begin* = 0x0000FF9D + GDK_KEY_KP_Insert* = 0x0000FF9E + GDK_KEY_KP_Delete* = 0x0000FF9F + GDK_KEY_KP_Equal* = 0x0000FFBD + GDK_KEY_KP_Multiply* = 0x0000FFAA + GDK_KEY_KP_Add* = 0x0000FFAB + GDK_KEY_KP_Separator* = 0x0000FFAC + GDK_KEY_KP_Subtract* = 0x0000FFAD + GDK_KEY_KP_Decimal* = 0x0000FFAE + GDK_KEY_KP_Divide* = 0x0000FFAF + GDK_KEY_KP_0* = 0x0000FFB0 + GDK_KEY_KP_1* = 0x0000FFB1 + GDK_KEY_KP_2* = 0x0000FFB2 + GDK_KEY_KP_3* = 0x0000FFB3 + GDK_KEY_KP_4* = 0x0000FFB4 + GDK_KEY_KP_5* = 0x0000FFB5 + GDK_KEY_KP_6* = 0x0000FFB6 + GDK_KEY_KP_7* = 0x0000FFB7 + GDK_KEY_KP_8* = 0x0000FFB8 + GDK_KEY_KP_9* = 0x0000FFB9 + GDK_KEY_F1* = 0x0000FFBE + GDK_KEY_F2* = 0x0000FFBF + GDK_KEY_F3* = 0x0000FFC0 + GDK_KEY_F4* = 0x0000FFC1 + GDK_KEY_F5* = 0x0000FFC2 + GDK_KEY_F6* = 0x0000FFC3 + GDK_KEY_F7* = 0x0000FFC4 + GDK_KEY_F8* = 0x0000FFC5 + GDK_KEY_F9* = 0x0000FFC6 + GDK_KEY_F10* = 0x0000FFC7 + GDK_KEY_F11* = 0x0000FFC8 + GDK_KEY_L1* = 0x0000FFC8 + GDK_KEY_F12* = 0x0000FFC9 + GDK_KEY_L2* = 0x0000FFC9 + GDK_KEY_F13* = 0x0000FFCA + GDK_KEY_L3* = 0x0000FFCA + GDK_KEY_F14* = 0x0000FFCB + GDK_KEY_L4* = 0x0000FFCB + GDK_KEY_F15* = 0x0000FFCC + GDK_KEY_L5* = 0x0000FFCC + GDK_KEY_F16* = 0x0000FFCD + GDK_KEY_L6* = 0x0000FFCD + GDK_KEY_F17* = 0x0000FFCE + GDK_KEY_L7* = 0x0000FFCE + GDK_KEY_F18* = 0x0000FFCF + GDK_KEY_L8* = 0x0000FFCF + GDK_KEY_F19* = 0x0000FFD0 + GDK_KEY_L9* = 0x0000FFD0 + GDK_KEY_F20* = 0x0000FFD1 + GDK_KEY_L10* = 0x0000FFD1 + GDK_KEY_F21* = 0x0000FFD2 + GDK_KEY_R1* = 0x0000FFD2 + GDK_KEY_F22* = 0x0000FFD3 + GDK_KEY_R2* = 0x0000FFD3 + GDK_KEY_F23* = 0x0000FFD4 + GDK_KEY_R3* = 0x0000FFD4 + GDK_KEY_F24* = 0x0000FFD5 + GDK_KEY_R4* = 0x0000FFD5 + GDK_KEY_F25* = 0x0000FFD6 + GDK_KEY_R5* = 0x0000FFD6 + GDK_KEY_F26* = 0x0000FFD7 + GDK_KEY_R6* = 0x0000FFD7 + GDK_KEY_F27* = 0x0000FFD8 + GDK_KEY_R7* = 0x0000FFD8 + GDK_KEY_F28* = 0x0000FFD9 + GDK_KEY_R8* = 0x0000FFD9 + GDK_KEY_F29* = 0x0000FFDA + GDK_KEY_R9* = 0x0000FFDA + GDK_KEY_F30* = 0x0000FFDB + GDK_KEY_R10* = 0x0000FFDB + GDK_KEY_F31* = 0x0000FFDC + GDK_KEY_R11* = 0x0000FFDC + GDK_KEY_F32* = 0x0000FFDD + GDK_KEY_R12* = 0x0000FFDD + GDK_KEY_F33* = 0x0000FFDE + GDK_KEY_R13* = 0x0000FFDE + GDK_KEY_F34* = 0x0000FFDF + GDK_KEY_R14* = 0x0000FFDF + GDK_KEY_F35* = 0x0000FFE0 + GDK_KEY_R15* = 0x0000FFE0 + GDK_KEY_Shift_L* = 0x0000FFE1 + GDK_KEY_Shift_R* = 0x0000FFE2 + GDK_KEY_Control_L* = 0x0000FFE3 + GDK_KEY_Control_R* = 0x0000FFE4 + GDK_KEY_Caps_Lock* = 0x0000FFE5 + GDK_KEY_Shift_Lock* = 0x0000FFE6 + GDK_KEY_Meta_L* = 0x0000FFE7 + GDK_KEY_Meta_R* = 0x0000FFE8 + GDK_KEY_Alt_L* = 0x0000FFE9 + GDK_KEY_Alt_R* = 0x0000FFEA + GDK_KEY_Super_L* = 0x0000FFEB + GDK_KEY_Super_R* = 0x0000FFEC + GDK_KEY_Hyper_L* = 0x0000FFED + GDK_KEY_Hyper_R* = 0x0000FFEE + GDK_KEY_ISO_Lock* = 0x0000FE01 + GDK_KEY_ISO_Level2_Latch* = 0x0000FE02 + GDK_KEY_ISO_Level3_Shift* = 0x0000FE03 + GDK_KEY_ISO_Level3_Latch* = 0x0000FE04 + GDK_KEY_ISO_Level3_Lock* = 0x0000FE05 + GDK_KEY_ISO_Group_Shift* = 0x0000FF7E + GDK_KEY_ISO_Group_Latch* = 0x0000FE06 + GDK_KEY_ISO_Group_Lock* = 0x0000FE07 + GDK_KEY_ISO_Next_Group* = 0x0000FE08 + GDK_KEY_ISO_Next_Group_Lock* = 0x0000FE09 + GDK_KEY_ISO_Prev_Group* = 0x0000FE0A + GDK_KEY_ISO_Prev_Group_Lock* = 0x0000FE0B + GDK_KEY_ISO_First_Group* = 0x0000FE0C + GDK_KEY_ISO_First_Group_Lock* = 0x0000FE0D + GDK_KEY_ISO_Last_Group* = 0x0000FE0E + GDK_KEY_ISO_Last_Group_Lock* = 0x0000FE0F + GDK_KEY_ISO_Left_Tab* = 0x0000FE20 + GDK_KEY_ISO_Move_Line_Up* = 0x0000FE21 + GDK_KEY_ISO_Move_Line_Down* = 0x0000FE22 + GDK_KEY_ISO_Partial_Line_Up* = 0x0000FE23 + GDK_KEY_ISO_Partial_Line_Down* = 0x0000FE24 + GDK_KEY_ISO_Partial_Space_Left* = 0x0000FE25 + GDK_KEY_ISO_Partial_Space_Right* = 0x0000FE26 + GDK_KEY_ISO_Set_Margin_Left* = 0x0000FE27 + GDK_KEY_ISO_Set_Margin_Right* = 0x0000FE28 + GDK_KEY_ISO_Release_Margin_Left* = 0x0000FE29 + GDK_KEY_ISO_Release_Margin_Right* = 0x0000FE2A + GDK_KEY_ISO_Release_Both_Margins* = 0x0000FE2B + GDK_KEY_ISO_Fast_Cursor_Left* = 0x0000FE2C + GDK_KEY_ISO_Fast_Cursor_Right* = 0x0000FE2D + GDK_KEY_ISO_Fast_Cursor_Up* = 0x0000FE2E + GDK_KEY_ISO_Fast_Cursor_Down* = 0x0000FE2F + GDK_KEY_ISO_Continuous_Underline* = 0x0000FE30 + GDK_KEY_ISO_Discontinuous_Underline* = 0x0000FE31 + GDK_KEY_ISO_Emphasize* = 0x0000FE32 + GDK_KEY_ISO_Center_Object* = 0x0000FE33 + GDK_KEY_ISO_Enter* = 0x0000FE34 + GDK_KEY_dead_grave* = 0x0000FE50 + GDK_KEY_dead_acute* = 0x0000FE51 + GDK_KEY_dead_circumflex* = 0x0000FE52 + GDK_KEY_dead_tilde* = 0x0000FE53 + GDK_KEY_dead_macron* = 0x0000FE54 + GDK_KEY_dead_breve* = 0x0000FE55 + GDK_KEY_dead_abovedot* = 0x0000FE56 + GDK_KEY_dead_diaeresis* = 0x0000FE57 + GDK_KEY_dead_abovering* = 0x0000FE58 + GDK_KEY_dead_doubleacute* = 0x0000FE59 + GDK_KEY_dead_caron* = 0x0000FE5A + GDK_KEY_dead_cedilla* = 0x0000FE5B + GDK_KEY_dead_ogonek* = 0x0000FE5C + GDK_KEY_dead_iota* = 0x0000FE5D + GDK_KEY_dead_voiced_sound* = 0x0000FE5E + GDK_KEY_dead_semivoiced_sound* = 0x0000FE5F + GDK_KEY_dead_belowdot* = 0x0000FE60 + GDK_KEY_First_Virtual_Screen* = 0x0000FED0 + GDK_KEY_Prev_Virtual_Screen* = 0x0000FED1 + GDK_KEY_Next_Virtual_Screen* = 0x0000FED2 + GDK_KEY_Last_Virtual_Screen* = 0x0000FED4 + GDK_KEY_Terminate_Server* = 0x0000FED5 + GDK_KEY_AccessX_Enable* = 0x0000FE70 + GDK_KEY_AccessX_Feedback_Enable* = 0x0000FE71 + GDK_KEY_RepeatKeys_Enable* = 0x0000FE72 + GDK_KEY_SlowKeys_Enable* = 0x0000FE73 + GDK_KEY_BounceKeys_Enable* = 0x0000FE74 + GDK_KEY_StickyKeys_Enable* = 0x0000FE75 + GDK_KEY_MouseKeys_Enable* = 0x0000FE76 + GDK_KEY_MouseKeys_Accel_Enable* = 0x0000FE77 + GDK_KEY_Overlay1_Enable* = 0x0000FE78 + GDK_KEY_Overlay2_Enable* = 0x0000FE79 + GDK_KEY_AudibleBell_Enable* = 0x0000FE7A + GDK_KEY_Pointer_Left* = 0x0000FEE0 + GDK_KEY_Pointer_Right* = 0x0000FEE1 + GDK_KEY_Pointer_Up* = 0x0000FEE2 + GDK_KEY_Pointer_Down* = 0x0000FEE3 + GDK_KEY_Pointer_UpLeft* = 0x0000FEE4 + GDK_KEY_Pointer_UpRight* = 0x0000FEE5 + GDK_KEY_Pointer_DownLeft* = 0x0000FEE6 + GDK_KEY_Pointer_DownRight* = 0x0000FEE7 + GDK_KEY_Pointer_Button_Dflt* = 0x0000FEE8 + GDK_KEY_Pointer_Button1* = 0x0000FEE9 + GDK_KEY_Pointer_Button2* = 0x0000FEEA + GDK_KEY_Pointer_Button3* = 0x0000FEEB + GDK_KEY_Pointer_Button4* = 0x0000FEEC + GDK_KEY_Pointer_Button5* = 0x0000FEED + GDK_KEY_Pointer_DblClick_Dflt* = 0x0000FEEE + GDK_KEY_Pointer_DblClick1* = 0x0000FEEF + GDK_KEY_Pointer_DblClick2* = 0x0000FEF0 + GDK_KEY_Pointer_DblClick3* = 0x0000FEF1 + GDK_KEY_Pointer_DblClick4* = 0x0000FEF2 + GDK_KEY_Pointer_DblClick5* = 0x0000FEF3 + GDK_KEY_Pointer_Drag_Dflt* = 0x0000FEF4 + GDK_KEY_Pointer_Drag1* = 0x0000FEF5 + GDK_KEY_Pointer_Drag2* = 0x0000FEF6 + GDK_KEY_Pointer_Drag3* = 0x0000FEF7 + GDK_KEY_Pointer_Drag4* = 0x0000FEF8 + GDK_KEY_Pointer_Drag5* = 0x0000FEFD + GDK_KEY_Pointer_EnableKeys* = 0x0000FEF9 + GDK_KEY_Pointer_Accelerate* = 0x0000FEFA + GDK_KEY_Pointer_DfltBtnNext* = 0x0000FEFB + GDK_KEY_Pointer_DfltBtnPrev* = 0x0000FEFC + GDK_KEY_3270_Duplicate* = 0x0000FD01 + GDK_KEY_3270_FieldMark* = 0x0000FD02 + GDK_KEY_3270_Right2* = 0x0000FD03 + GDK_KEY_3270_Left2* = 0x0000FD04 + GDK_KEY_3270_BackTab* = 0x0000FD05 + GDK_KEY_3270_EraseEOF* = 0x0000FD06 + GDK_KEY_3270_EraseInput* = 0x0000FD07 + GDK_KEY_3270_Reset* = 0x0000FD08 + GDK_KEY_3270_Quit* = 0x0000FD09 + GDK_KEY_3270_PA1* = 0x0000FD0A + GDK_KEY_3270_PA2* = 0x0000FD0B + GDK_KEY_3270_PA3* = 0x0000FD0C + GDK_KEY_3270_Test* = 0x0000FD0D + GDK_KEY_3270_Attn* = 0x0000FD0E + GDK_KEY_3270_CursorBlink* = 0x0000FD0F + GDK_KEY_3270_AltCursor* = 0x0000FD10 + GDK_KEY_3270_KeyClick* = 0x0000FD11 + GDK_KEY_3270_Jump* = 0x0000FD12 + GDK_KEY_3270_Ident* = 0x0000FD13 + GDK_KEY_3270_Rule* = 0x0000FD14 + GDK_KEY_3270_Copy* = 0x0000FD15 + GDK_KEY_3270_Play* = 0x0000FD16 + GDK_KEY_3270_Setup* = 0x0000FD17 + GDK_KEY_3270_Record* = 0x0000FD18 + GDK_KEY_3270_ChangeScreen* = 0x0000FD19 + GDK_KEY_3270_DeleteWord* = 0x0000FD1A + GDK_KEY_3270_ExSelect* = 0x0000FD1B + GDK_KEY_3270_CursorSelect* = 0x0000FD1C + GDK_KEY_3270_PrintScreen* = 0x0000FD1D + GDK_KEY_3270_Enter* = 0x0000FD1E + GDK_KEY_space* = 0x00000020 + GDK_KEY_exclam* = 0x00000021 + GDK_KEY_quotedbl* = 0x00000022 + GDK_KEY_numbersign* = 0x00000023 + GDK_KEY_dollar* = 0x00000024 + GDK_KEY_percent* = 0x00000025 + GDK_KEY_ampersand* = 0x00000026 + GDK_KEY_apostrophe* = 0x00000027 + GDK_KEY_quoteright* = 0x00000027 + GDK_KEY_parenleft* = 0x00000028 + GDK_KEY_parenright* = 0x00000029 + GDK_KEY_asterisk* = 0x0000002A + GDK_KEY_plus* = 0x0000002B + GDK_KEY_comma* = 0x0000002C + GDK_KEY_minus* = 0x0000002D + GDK_KEY_period* = 0x0000002E + GDK_KEY_slash* = 0x0000002F + GDK_KEY_0* = 0x00000030 + GDK_KEY_1* = 0x00000031 + GDK_KEY_2* = 0x00000032 + GDK_KEY_3* = 0x00000033 + GDK_KEY_4* = 0x00000034 + GDK_KEY_5* = 0x00000035 + GDK_KEY_6* = 0x00000036 + GDK_KEY_7* = 0x00000037 + GDK_KEY_8* = 0x00000038 + GDK_KEY_9* = 0x00000039 + GDK_KEY_colon* = 0x0000003A + GDK_KEY_semicolon* = 0x0000003B + GDK_KEY_less* = 0x0000003C + GDK_KEY_equal* = 0x0000003D + GDK_KEY_greater* = 0x0000003E + GDK_KEY_question* = 0x0000003F + GDK_KEY_at* = 0x00000040 + GDK_KEY_CAPITAL_A* = 0x00000041 + GDK_KEY_CAPITAL_B* = 0x00000042 + GDK_KEY_CAPITAL_C* = 0x00000043 + GDK_KEY_CAPITAL_D* = 0x00000044 + GDK_KEY_CAPITAL_E* = 0x00000045 + GDK_KEY_CAPITAL_F* = 0x00000046 + GDK_KEY_CAPITAL_G* = 0x00000047 + GDK_KEY_CAPITAL_H* = 0x00000048 + GDK_KEY_CAPITAL_I* = 0x00000049 + GDK_KEY_CAPITAL_J* = 0x0000004A + GDK_KEY_CAPITAL_K* = 0x0000004B + GDK_KEY_CAPITAL_L* = 0x0000004C + GDK_KEY_CAPITAL_M* = 0x0000004D + GDK_KEY_CAPITAL_N* = 0x0000004E + GDK_KEY_CAPITAL_O* = 0x0000004F + GDK_KEY_CAPITAL_P* = 0x00000050 + GDK_KEY_CAPITAL_Q* = 0x00000051 + GDK_KEY_CAPITAL_R* = 0x00000052 + GDK_KEY_CAPITAL_S* = 0x00000053 + GDK_KEY_CAPITAL_T* = 0x00000054 + GDK_KEY_CAPITAL_U* = 0x00000055 + GDK_KEY_CAPITAL_V* = 0x00000056 + GDK_KEY_CAPITAL_W* = 0x00000057 + GDK_KEY_CAPITAL_X* = 0x00000058 + GDK_KEY_CAPITAL_Y* = 0x00000059 + GDK_KEY_CAPITAL_Z* = 0x0000005A + GDK_KEY_bracketleft* = 0x0000005B + GDK_KEY_backslash* = 0x0000005C + GDK_KEY_bracketright* = 0x0000005D + GDK_KEY_asciicircum* = 0x0000005E + GDK_KEY_underscore* = 0x0000005F + GDK_KEY_grave* = 0x00000060 + GDK_KEY_quoteleft* = 0x00000060 + GDK_KEY_a* = 0x00000061 + GDK_KEY_b* = 0x00000062 + GDK_KEY_c* = 0x00000063 + GDK_KEY_d* = 0x00000064 + GDK_KEY_e* = 0x00000065 + GDK_KEY_f* = 0x00000066 + GDK_KEY_g* = 0x00000067 + GDK_KEY_h* = 0x00000068 + GDK_KEY_i* = 0x00000069 + GDK_KEY_j* = 0x0000006A + GDK_KEY_k* = 0x0000006B + GDK_KEY_l* = 0x0000006C + GDK_KEY_m* = 0x0000006D + GDK_KEY_n* = 0x0000006E + GDK_KEY_o* = 0x0000006F + GDK_KEY_p* = 0x00000070 + GDK_KEY_q* = 0x00000071 + GDK_KEY_r* = 0x00000072 + GDK_KEY_s* = 0x00000073 + GDK_KEY_t* = 0x00000074 + GDK_KEY_u* = 0x00000075 + GDK_KEY_v* = 0x00000076 + GDK_KEY_w* = 0x00000077 + GDK_KEY_x* = 0x00000078 + GDK_KEY_y* = 0x00000079 + GDK_KEY_z* = 0x0000007A + GDK_KEY_braceleft* = 0x0000007B + GDK_KEY_bar* = 0x0000007C + GDK_KEY_braceright* = 0x0000007D + GDK_KEY_asciitilde* = 0x0000007E + GDK_KEY_nobreakspace* = 0x000000A0 + GDK_KEY_exclamdown* = 0x000000A1 + GDK_KEY_cent* = 0x000000A2 + GDK_KEY_sterling* = 0x000000A3 + GDK_KEY_currency* = 0x000000A4 + GDK_KEY_yen* = 0x000000A5 + GDK_KEY_brokenbar* = 0x000000A6 + GDK_KEY_section* = 0x000000A7 + GDK_KEY_diaeresis* = 0x000000A8 + GDK_KEY_copyright* = 0x000000A9 + GDK_KEY_ordfeminine* = 0x000000AA + GDK_KEY_guillemotleft* = 0x000000AB + GDK_KEY_notsign* = 0x000000AC + GDK_KEY_hyphen* = 0x000000AD + GDK_KEY_registered* = 0x000000AE + GDK_KEY_macron* = 0x000000AF + GDK_KEY_degree* = 0x000000B0 + GDK_KEY_plusminus* = 0x000000B1 + GDK_KEY_twosuperior* = 0x000000B2 + GDK_KEY_threesuperior* = 0x000000B3 + GDK_KEY_acute* = 0x000000B4 + GDK_KEY_mu* = 0x000000B5 + GDK_KEY_paragraph* = 0x000000B6 + GDK_KEY_periodcentered* = 0x000000B7 + GDK_KEY_cedilla* = 0x000000B8 + GDK_KEY_onesuperior* = 0x000000B9 + GDK_KEY_masculine* = 0x000000BA + GDK_KEY_guillemotright* = 0x000000BB + GDK_KEY_onequarter* = 0x000000BC + GDK_KEY_onehalf* = 0x000000BD + GDK_KEY_threequarters* = 0x000000BE + GDK_KEY_questiondown* = 0x000000BF + GDK_KEY_CAPITAL_Agrave* = 0x000000C0 + GDK_KEY_CAPITAL_Aacute* = 0x000000C1 + GDK_KEY_CAPITAL_Acircumflex* = 0x000000C2 + GDK_KEY_CAPITAL_Atilde* = 0x000000C3 + GDK_KEY_CAPITAL_Adiaeresis* = 0x000000C4 + GDK_KEY_CAPITAL_Aring* = 0x000000C5 + GDK_KEY_CAPITAL_AE* = 0x000000C6 + GDK_KEY_CAPITAL_Ccedilla* = 0x000000C7 + GDK_KEY_CAPITAL_Egrave* = 0x000000C8 + GDK_KEY_CAPITAL_Eacute* = 0x000000C9 + GDK_KEY_CAPITAL_Ecircumflex* = 0x000000CA + GDK_KEY_CAPITAL_Ediaeresis* = 0x000000CB + GDK_KEY_CAPITAL_Igrave* = 0x000000CC + GDK_KEY_CAPITAL_Iacute* = 0x000000CD + GDK_KEY_CAPITAL_Icircumflex* = 0x000000CE + GDK_KEY_CAPITAL_Idiaeresis* = 0x000000CF + GDK_KEY_CAPITAL_ETH* = 0x000000D0 + GDK_KEY_CAPITAL_Ntilde* = 0x000000D1 + GDK_KEY_CAPITAL_Ograve* = 0x000000D2 + GDK_KEY_CAPITAL_Oacute* = 0x000000D3 + GDK_KEY_CAPITAL_Ocircumflex* = 0x000000D4 + GDK_KEY_CAPITAL_Otilde* = 0x000000D5 + GDK_KEY_CAPITAL_Odiaeresis* = 0x000000D6 + GDK_KEY_multiply* = 0x000000D7 + GDK_KEY_Ooblique* = 0x000000D8 + GDK_KEY_CAPITAL_Ugrave* = 0x000000D9 + GDK_KEY_CAPITAL_Uacute* = 0x000000DA + GDK_KEY_CAPITAL_Ucircumflex* = 0x000000DB + GDK_KEY_CAPITAL_Udiaeresis* = 0x000000DC + GDK_KEY_CAPITAL_Yacute* = 0x000000DD + GDK_KEY_CAPITAL_THORN* = 0x000000DE + GDK_KEY_ssharp* = 0x000000DF + GDK_KEY_agrave* = 0x000000E0 + GDK_KEY_aacute* = 0x000000E1 + GDK_KEY_acircumflex* = 0x000000E2 + GDK_KEY_atilde* = 0x000000E3 + GDK_KEY_adiaeresis* = 0x000000E4 + GDK_KEY_aring* = 0x000000E5 + GDK_KEY_ae* = 0x000000E6 + GDK_KEY_ccedilla* = 0x000000E7 + GDK_KEY_egrave* = 0x000000E8 + GDK_KEY_eacute* = 0x000000E9 + GDK_KEY_ecircumflex* = 0x000000EA + GDK_KEY_ediaeresis* = 0x000000EB + GDK_KEY_igrave* = 0x000000EC + GDK_KEY_iacute* = 0x000000ED + GDK_KEY_icircumflex* = 0x000000EE + GDK_KEY_idiaeresis* = 0x000000EF + GDK_KEY_eth* = 0x000000F0 + GDK_KEY_ntilde* = 0x000000F1 + GDK_KEY_ograve* = 0x000000F2 + GDK_KEY_oacute* = 0x000000F3 + GDK_KEY_ocircumflex* = 0x000000F4 + GDK_KEY_otilde* = 0x000000F5 + GDK_KEY_odiaeresis* = 0x000000F6 + GDK_KEY_division* = 0x000000F7 + GDK_KEY_oslash* = 0x000000F8 + GDK_KEY_ugrave* = 0x000000F9 + GDK_KEY_uacute* = 0x000000FA + GDK_KEY_ucircumflex* = 0x000000FB + GDK_KEY_udiaeresis* = 0x000000FC + GDK_KEY_yacute* = 0x000000FD + GDK_KEY_thorn* = 0x000000FE + GDK_KEY_ydiaeresis* = 0x000000FF + GDK_KEY_CAPITAL_Aogonek* = 0x000001A1 + GDK_KEY_breve* = 0x000001A2 + GDK_KEY_CAPITAL_Lstroke* = 0x000001A3 + GDK_KEY_CAPITAL_Lcaron* = 0x000001A5 + GDK_KEY_CAPITAL_Sacute* = 0x000001A6 + GDK_KEY_CAPITAL_Scaron* = 0x000001A9 + GDK_KEY_CAPITAL_Scedilla* = 0x000001AA + GDK_KEY_CAPITAL_Tcaron* = 0x000001AB + GDK_KEY_CAPITAL_Zacute* = 0x000001AC + GDK_KEY_CAPITAL_Zcaron* = 0x000001AE + GDK_KEY_CAPITAL_Zabovedot* = 0x000001AF + GDK_KEY_aogonek* = 0x000001B1 + GDK_KEY_ogonek* = 0x000001B2 + GDK_KEY_lstroke* = 0x000001B3 + GDK_KEY_lcaron* = 0x000001B5 + GDK_KEY_sacute* = 0x000001B6 + GDK_KEY_caron* = 0x000001B7 + GDK_KEY_scaron* = 0x000001B9 + GDK_KEY_scedilla* = 0x000001BA + GDK_KEY_tcaron* = 0x000001BB + GDK_KEY_zacute* = 0x000001BC + GDK_KEY_doubleacute* = 0x000001BD + GDK_KEY_zcaron* = 0x000001BE + GDK_KEY_zabovedot* = 0x000001BF + GDK_KEY_CAPITAL_Racute* = 0x000001C0 + GDK_KEY_CAPITAL_Abreve* = 0x000001C3 + GDK_KEY_CAPITAL_Lacute* = 0x000001C5 + GDK_KEY_CAPITAL_Cacute* = 0x000001C6 + GDK_KEY_CAPITAL_Ccaron* = 0x000001C8 + GDK_KEY_CAPITAL_Eogonek* = 0x000001CA + GDK_KEY_CAPITAL_Ecaron* = 0x000001CC + GDK_KEY_CAPITAL_Dcaron* = 0x000001CF + GDK_KEY_CAPITAL_Dstroke* = 0x000001D0 + GDK_KEY_CAPITAL_Nacute* = 0x000001D1 + GDK_KEY_CAPITAL_Ncaron* = 0x000001D2 + GDK_KEY_CAPITAL_Odoubleacute* = 0x000001D5 + GDK_KEY_CAPITAL_Rcaron* = 0x000001D8 + GDK_KEY_CAPITAL_Uring* = 0x000001D9 + GDK_KEY_CAPITAL_Udoubleacute* = 0x000001DB + GDK_KEY_CAPITAL_Tcedilla* = 0x000001DE + GDK_KEY_racute* = 0x000001E0 + GDK_KEY_abreve* = 0x000001E3 + GDK_KEY_lacute* = 0x000001E5 + GDK_KEY_cacute* = 0x000001E6 + GDK_KEY_ccaron* = 0x000001E8 + GDK_KEY_eogonek* = 0x000001EA + GDK_KEY_ecaron* = 0x000001EC + GDK_KEY_dcaron* = 0x000001EF + GDK_KEY_dstroke* = 0x000001F0 + GDK_KEY_nacute* = 0x000001F1 + GDK_KEY_ncaron* = 0x000001F2 + GDK_KEY_odoubleacute* = 0x000001F5 + GDK_KEY_udoubleacute* = 0x000001FB + GDK_KEY_rcaron* = 0x000001F8 + GDK_KEY_uring* = 0x000001F9 + GDK_KEY_tcedilla* = 0x000001FE + GDK_KEY_abovedot* = 0x000001FF + GDK_KEY_CAPITAL_Hstroke* = 0x000002A1 + GDK_KEY_CAPITAL_Hcircumflex* = 0x000002A6 + GDK_KEY_CAPITAL_Iabovedot* = 0x000002A9 + GDK_KEY_CAPITAL_Gbreve* = 0x000002AB + GDK_KEY_CAPITAL_Jcircumflex* = 0x000002AC + GDK_KEY_hstroke* = 0x000002B1 + GDK_KEY_hcircumflex* = 0x000002B6 + GDK_KEY_idotless* = 0x000002B9 + GDK_KEY_gbreve* = 0x000002BB + GDK_KEY_jcircumflex* = 0x000002BC + GDK_KEY_CAPITAL_Cabovedot* = 0x000002C5 + GDK_KEY_CAPITAL_Ccircumflex* = 0x000002C6 + GDK_KEY_CAPITAL_Gabovedot* = 0x000002D5 + GDK_KEY_CAPITAL_Gcircumflex* = 0x000002D8 + GDK_KEY_CAPITAL_Ubreve* = 0x000002DD + GDK_KEY_CAPITAL_Scircumflex* = 0x000002DE + GDK_KEY_cabovedot* = 0x000002E5 + GDK_KEY_ccircumflex* = 0x000002E6 + GDK_KEY_gabovedot* = 0x000002F5 + GDK_KEY_gcircumflex* = 0x000002F8 + GDK_KEY_ubreve* = 0x000002FD + GDK_KEY_scircumflex* = 0x000002FE + GDK_KEY_kra* = 0x000003A2 + GDK_KEY_kappa* = 0x000003A2 + GDK_KEY_CAPITAL_Rcedilla* = 0x000003A3 + GDK_KEY_CAPITAL_Itilde* = 0x000003A5 + GDK_KEY_CAPITAL_Lcedilla* = 0x000003A6 + GDK_KEY_CAPITAL_Emacron* = 0x000003AA + GDK_KEY_CAPITAL_Gcedilla* = 0x000003AB + GDK_KEY_CAPITAL_Tslash* = 0x000003AC + GDK_KEY_rcedilla* = 0x000003B3 + GDK_KEY_itilde* = 0x000003B5 + GDK_KEY_lcedilla* = 0x000003B6 + GDK_KEY_emacron* = 0x000003BA + GDK_KEY_gcedilla* = 0x000003BB + GDK_KEY_tslash* = 0x000003BC + GDK_KEY_CAPITAL_ENG* = 0x000003BD + GDK_KEY_eng* = 0x000003BF + GDK_KEY_CAPITAL_Amacron* = 0x000003C0 + GDK_KEY_CAPITAL_Iogonek* = 0x000003C7 + GDK_KEY_CAPITAL_Eabovedot* = 0x000003CC + GDK_KEY_CAPITAL_Imacron* = 0x000003CF + GDK_KEY_CAPITAL_Ncedilla* = 0x000003D1 + GDK_KEY_CAPITAL_Omacron* = 0x000003D2 + GDK_KEY_CAPITAL_Kcedilla* = 0x000003D3 + GDK_KEY_CAPITAL_Uogonek* = 0x000003D9 + GDK_KEY_CAPITAL_Utilde* = 0x000003DD + GDK_KEY_CAPITAL_Umacron* = 0x000003DE + GDK_KEY_amacron* = 0x000003E0 + GDK_KEY_iogonek* = 0x000003E7 + GDK_KEY_eabovedot* = 0x000003EC + GDK_KEY_imacron* = 0x000003EF + GDK_KEY_ncedilla* = 0x000003F1 + GDK_KEY_omacron* = 0x000003F2 + GDK_KEY_kcedilla* = 0x000003F3 + GDK_KEY_uogonek* = 0x000003F9 + GDK_KEY_utilde* = 0x000003FD + GDK_KEY_umacron* = 0x000003FE + GDK_KEY_CAPITAL_OE* = 0x000013BC + GDK_KEY_oe* = 0x000013BD + GDK_KEY_CAPITAL_Ydiaeresis* = 0x000013BE + GDK_KEY_overline* = 0x0000047E + GDK_KEY_kana_fullstop* = 0x000004A1 + GDK_KEY_kana_openingbracket* = 0x000004A2 + GDK_KEY_kana_closingbracket* = 0x000004A3 + GDK_KEY_kana_comma* = 0x000004A4 + GDK_KEY_kana_conjunctive* = 0x000004A5 + GDK_KEY_kana_middledot* = 0x000004A5 + GDK_KEY_kana_WO* = 0x000004A6 + GDK_KEY_kana_a* = 0x000004A7 + GDK_KEY_kana_i* = 0x000004A8 + GDK_KEY_kana_u* = 0x000004A9 + GDK_KEY_kana_e* = 0x000004AA + GDK_KEY_kana_o* = 0x000004AB + GDK_KEY_kana_ya* = 0x000004AC + GDK_KEY_kana_yu* = 0x000004AD + GDK_KEY_kana_yo* = 0x000004AE + GDK_KEY_kana_tsu* = 0x000004AF + GDK_KEY_kana_tu* = 0x000004AF + GDK_KEY_prolongedsound* = 0x000004B0 + GDK_KEY_kana_CAPITAL_A* = 0x000004B1 + GDK_KEY_kana_CAPITAL_I* = 0x000004B2 + GDK_KEY_kana_CAPITAL_U* = 0x000004B3 + GDK_KEY_kana_CAPITAL_E* = 0x000004B4 + GDK_KEY_kana_CAPITAL_O* = 0x000004B5 + GDK_KEY_kana_KA* = 0x000004B6 + GDK_KEY_kana_KI* = 0x000004B7 + GDK_KEY_kana_KU* = 0x000004B8 + GDK_KEY_kana_KE* = 0x000004B9 + GDK_KEY_kana_KO* = 0x000004BA + GDK_KEY_kana_SA* = 0x000004BB + GDK_KEY_kana_SHI* = 0x000004BC + GDK_KEY_kana_SU* = 0x000004BD + GDK_KEY_kana_SE* = 0x000004BE + GDK_KEY_kana_SO* = 0x000004BF + GDK_KEY_kana_TA* = 0x000004C0 + GDK_KEY_kana_CHI* = 0x000004C1 + GDK_KEY_kana_TI* = 0x000004C1 + GDK_KEY_kana_CAPITAL_TSU* = 0x000004C2 + GDK_KEY_kana_CAPITAL_TU* = 0x000004C2 + GDK_KEY_kana_TE* = 0x000004C3 + GDK_KEY_kana_TO* = 0x000004C4 + GDK_KEY_kana_NA* = 0x000004C5 + GDK_KEY_kana_NI* = 0x000004C6 + GDK_KEY_kana_NU* = 0x000004C7 + GDK_KEY_kana_NE* = 0x000004C8 + GDK_KEY_kana_NO* = 0x000004C9 + GDK_KEY_kana_HA* = 0x000004CA + GDK_KEY_kana_HI* = 0x000004CB + GDK_KEY_kana_FU* = 0x000004CC + GDK_KEY_kana_HU* = 0x000004CC + GDK_KEY_kana_HE* = 0x000004CD + GDK_KEY_kana_HO* = 0x000004CE + GDK_KEY_kana_MA* = 0x000004CF + GDK_KEY_kana_MI* = 0x000004D0 + GDK_KEY_kana_MU* = 0x000004D1 + GDK_KEY_kana_ME* = 0x000004D2 + GDK_KEY_kana_MO* = 0x000004D3 + GDK_KEY_kana_CAPITAL_YA* = 0x000004D4 + GDK_KEY_kana_CAPITAL_YU* = 0x000004D5 + GDK_KEY_kana_CAPITAL_YO* = 0x000004D6 + GDK_KEY_kana_RA* = 0x000004D7 + GDK_KEY_kana_RI* = 0x000004D8 + GDK_KEY_kana_RU* = 0x000004D9 + GDK_KEY_kana_RE* = 0x000004DA + GDK_KEY_kana_RO* = 0x000004DB + GDK_KEY_kana_WA* = 0x000004DC + GDK_KEY_kana_N* = 0x000004DD + GDK_KEY_voicedsound* = 0x000004DE + GDK_KEY_semivoicedsound* = 0x000004DF + GDK_KEY_kana_switch* = 0x0000FF7E + GDK_KEY_Arabic_comma* = 0x000005AC + GDK_KEY_Arabic_semicolon* = 0x000005BB + GDK_KEY_Arabic_question_mark* = 0x000005BF + GDK_KEY_Arabic_hamza* = 0x000005C1 + GDK_KEY_Arabic_maddaonalef* = 0x000005C2 + GDK_KEY_Arabic_hamzaonalef* = 0x000005C3 + GDK_KEY_Arabic_hamzaonwaw* = 0x000005C4 + GDK_KEY_Arabic_hamzaunderalef* = 0x000005C5 + GDK_KEY_Arabic_hamzaonyeh* = 0x000005C6 + GDK_KEY_Arabic_alef* = 0x000005C7 + GDK_KEY_Arabic_beh* = 0x000005C8 + GDK_KEY_Arabic_tehmarbuta* = 0x000005C9 + GDK_KEY_Arabic_teh* = 0x000005CA + GDK_KEY_Arabic_theh* = 0x000005CB + GDK_KEY_Arabic_jeem* = 0x000005CC + GDK_KEY_Arabic_hah* = 0x000005CD + GDK_KEY_Arabic_khah* = 0x000005CE + GDK_KEY_Arabic_dal* = 0x000005CF + GDK_KEY_Arabic_thal* = 0x000005D0 + GDK_KEY_Arabic_ra* = 0x000005D1 + GDK_KEY_Arabic_zain* = 0x000005D2 + GDK_KEY_Arabic_seen* = 0x000005D3 + GDK_KEY_Arabic_sheen* = 0x000005D4 + GDK_KEY_Arabic_sad* = 0x000005D5 + GDK_KEY_Arabic_dad* = 0x000005D6 + GDK_KEY_Arabic_tah* = 0x000005D7 + GDK_KEY_Arabic_zah* = 0x000005D8 + GDK_KEY_Arabic_ain* = 0x000005D9 + GDK_KEY_Arabic_ghain* = 0x000005DA + GDK_KEY_Arabic_tatweel* = 0x000005E0 + GDK_KEY_Arabic_feh* = 0x000005E1 + GDK_KEY_Arabic_qaf* = 0x000005E2 + GDK_KEY_Arabic_kaf* = 0x000005E3 + GDK_KEY_Arabic_lam* = 0x000005E4 + GDK_KEY_Arabic_meem* = 0x000005E5 + GDK_KEY_Arabic_noon* = 0x000005E6 + GDK_KEY_Arabic_ha* = 0x000005E7 + GDK_KEY_Arabic_heh* = 0x000005E7 + GDK_KEY_Arabic_waw* = 0x000005E8 + GDK_KEY_Arabic_alefmaksura* = 0x000005E9 + GDK_KEY_Arabic_yeh* = 0x000005EA + GDK_KEY_Arabic_fathatan* = 0x000005EB + GDK_KEY_Arabic_dammatan* = 0x000005EC + GDK_KEY_Arabic_kasratan* = 0x000005ED + GDK_KEY_Arabic_fatha* = 0x000005EE + GDK_KEY_Arabic_damma* = 0x000005EF + GDK_KEY_Arabic_kasra* = 0x000005F0 + GDK_KEY_Arabic_shadda* = 0x000005F1 + GDK_KEY_Arabic_sukun* = 0x000005F2 + GDK_KEY_Arabic_switch* = 0x0000FF7E + GDK_KEY_Serbian_dje* = 0x000006A1 + GDK_KEY_Macedonia_gje* = 0x000006A2 + GDK_KEY_Cyrillic_io* = 0x000006A3 + GDK_KEY_Ukrainian_ie* = 0x000006A4 + GDK_KEY_Ukranian_je* = 0x000006A4 + GDK_KEY_Macedonia_dse* = 0x000006A5 + GDK_KEY_Ukrainian_i* = 0x000006A6 + GDK_KEY_Ukranian_i* = 0x000006A6 + GDK_KEY_Ukrainian_yi* = 0x000006A7 + GDK_KEY_Ukranian_yi* = 0x000006A7 + GDK_KEY_Cyrillic_je* = 0x000006A8 + GDK_KEY_Serbian_je* = 0x000006A8 + GDK_KEY_Cyrillic_lje* = 0x000006A9 + GDK_KEY_Serbian_lje* = 0x000006A9 + GDK_KEY_Cyrillic_nje* = 0x000006AA + GDK_KEY_Serbian_nje* = 0x000006AA + GDK_KEY_Serbian_tshe* = 0x000006AB + GDK_KEY_Macedonia_kje* = 0x000006AC + GDK_KEY_Byelorussian_shortu* = 0x000006AE + GDK_KEY_Cyrillic_dzhe* = 0x000006AF + GDK_KEY_Serbian_dze* = 0x000006AF + GDK_KEY_numerosign* = 0x000006B0 + GDK_KEY_Serbian_CAPITAL_DJE* = 0x000006B1 + GDK_KEY_Macedonia_CAPITAL_GJE* = 0x000006B2 + GDK_KEY_Cyrillic_CAPITAL_IO* = 0x000006B3 + GDK_KEY_Ukrainian_CAPITAL_IE* = 0x000006B4 + GDK_KEY_Ukranian_CAPITAL_JE* = 0x000006B4 + GDK_KEY_Macedonia_CAPITAL_DSE* = 0x000006B5 + GDK_KEY_Ukrainian_CAPITAL_I* = 0x000006B6 + GDK_KEY_Ukranian_CAPITAL_I* = 0x000006B6 + GDK_KEY_Ukrainian_CAPITAL_YI* = 0x000006B7 + GDK_KEY_Ukranian_CAPITAL_YI* = 0x000006B7 + GDK_KEY_Cyrillic_CAPITAL_JE* = 0x000006B8 + GDK_KEY_Serbian_CAPITAL_JE* = 0x000006B8 + GDK_KEY_Cyrillic_CAPITAL_LJE* = 0x000006B9 + GDK_KEY_Serbian_CAPITAL_LJE* = 0x000006B9 + GDK_KEY_Cyrillic_CAPITAL_NJE* = 0x000006BA + GDK_KEY_Serbian_CAPITAL_NJE* = 0x000006BA + GDK_KEY_Serbian_CAPITAL_TSHE* = 0x000006BB + GDK_KEY_Macedonia_CAPITAL_KJE* = 0x000006BC + GDK_KEY_Byelorussian_CAPITAL_SHORTU* = 0x000006BE + GDK_KEY_Cyrillic_CAPITAL_DZHE* = 0x000006BF + GDK_KEY_Serbian_CAPITAL_DZE* = 0x000006BF + GDK_KEY_Cyrillic_yu* = 0x000006C0 + GDK_KEY_Cyrillic_a* = 0x000006C1 + GDK_KEY_Cyrillic_be* = 0x000006C2 + GDK_KEY_Cyrillic_tse* = 0x000006C3 + GDK_KEY_Cyrillic_de* = 0x000006C4 + GDK_KEY_Cyrillic_ie* = 0x000006C5 + GDK_KEY_Cyrillic_ef* = 0x000006C6 + GDK_KEY_Cyrillic_ghe* = 0x000006C7 + GDK_KEY_Cyrillic_ha* = 0x000006C8 + GDK_KEY_Cyrillic_i* = 0x000006C9 + GDK_KEY_Cyrillic_shorti* = 0x000006CA + GDK_KEY_Cyrillic_ka* = 0x000006CB + GDK_KEY_Cyrillic_el* = 0x000006CC + GDK_KEY_Cyrillic_em* = 0x000006CD + GDK_KEY_Cyrillic_en* = 0x000006CE + GDK_KEY_Cyrillic_o* = 0x000006CF + GDK_KEY_Cyrillic_pe* = 0x000006D0 + GDK_KEY_Cyrillic_ya* = 0x000006D1 + GDK_KEY_Cyrillic_er* = 0x000006D2 + GDK_KEY_Cyrillic_es* = 0x000006D3 + GDK_KEY_Cyrillic_te* = 0x000006D4 + GDK_KEY_Cyrillic_u* = 0x000006D5 + GDK_KEY_Cyrillic_zhe* = 0x000006D6 + GDK_KEY_Cyrillic_ve* = 0x000006D7 + GDK_KEY_Cyrillic_softsign* = 0x000006D8 + GDK_KEY_Cyrillic_yeru* = 0x000006D9 + GDK_KEY_Cyrillic_ze* = 0x000006DA + GDK_KEY_Cyrillic_sha* = 0x000006DB + GDK_KEY_Cyrillic_e* = 0x000006DC + GDK_KEY_Cyrillic_shcha* = 0x000006DD + GDK_KEY_Cyrillic_che* = 0x000006DE + GDK_KEY_Cyrillic_hardsign* = 0x000006DF + GDK_KEY_Cyrillic_CAPITAL_YU* = 0x000006E0 + GDK_KEY_Cyrillic_CAPITAL_A* = 0x000006E1 + GDK_KEY_Cyrillic_CAPITAL_BE* = 0x000006E2 + GDK_KEY_Cyrillic_CAPITAL_TSE* = 0x000006E3 + GDK_KEY_Cyrillic_CAPITAL_DE* = 0x000006E4 + GDK_KEY_Cyrillic_CAPITAL_IE* = 0x000006E5 + GDK_KEY_Cyrillic_CAPITAL_EF* = 0x000006E6 + GDK_KEY_Cyrillic_CAPITAL_GHE* = 0x000006E7 + GDK_KEY_Cyrillic_CAPITAL_HA* = 0x000006E8 + GDK_KEY_Cyrillic_CAPITAL_I* = 0x000006E9 + GDK_KEY_Cyrillic_CAPITAL_SHORTI* = 0x000006EA + GDK_KEY_Cyrillic_CAPITAL_KA* = 0x000006EB + GDK_KEY_Cyrillic_CAPITAL_EL* = 0x000006EC + GDK_KEY_Cyrillic_CAPITAL_EM* = 0x000006ED + GDK_KEY_Cyrillic_CAPITAL_EN* = 0x000006EE + GDK_KEY_Cyrillic_CAPITAL_O* = 0x000006EF + GDK_KEY_Cyrillic_CAPITAL_PE* = 0x000006F0 + GDK_KEY_Cyrillic_CAPITAL_YA* = 0x000006F1 + GDK_KEY_Cyrillic_CAPITAL_ER* = 0x000006F2 + GDK_KEY_Cyrillic_CAPITAL_ES* = 0x000006F3 + GDK_KEY_Cyrillic_CAPITAL_TE* = 0x000006F4 + GDK_KEY_Cyrillic_CAPITAL_U* = 0x000006F5 + GDK_KEY_Cyrillic_CAPITAL_ZHE* = 0x000006F6 + GDK_KEY_Cyrillic_CAPITAL_VE* = 0x000006F7 + GDK_KEY_Cyrillic_CAPITAL_SOFTSIGN* = 0x000006F8 + GDK_KEY_Cyrillic_CAPITAL_YERU* = 0x000006F9 + GDK_KEY_Cyrillic_CAPITAL_ZE* = 0x000006FA + GDK_KEY_Cyrillic_CAPITAL_SHA* = 0x000006FB + GDK_KEY_Cyrillic_CAPITAL_E* = 0x000006FC + GDK_KEY_Cyrillic_CAPITAL_SHCHA* = 0x000006FD + GDK_KEY_Cyrillic_CAPITAL_CHE* = 0x000006FE + GDK_KEY_Cyrillic_CAPITAL_HARDSIGN* = 0x000006FF + GDK_KEY_Greek_CAPITAL_ALPHAaccent* = 0x000007A1 + GDK_KEY_Greek_CAPITAL_EPSILONaccent* = 0x000007A2 + GDK_KEY_Greek_CAPITAL_ETAaccent* = 0x000007A3 + GDK_KEY_Greek_CAPITAL_IOTAaccent* = 0x000007A4 + GDK_KEY_Greek_CAPITAL_IOTAdiaeresis* = 0x000007A5 + GDK_KEY_Greek_CAPITAL_OMICRONaccent* = 0x000007A7 + GDK_KEY_Greek_CAPITAL_UPSILONaccent* = 0x000007A8 + GDK_KEY_Greek_CAPITAL_UPSILONdieresis* = 0x000007A9 + GDK_KEY_Greek_CAPITAL_OMEGAaccent* = 0x000007AB + GDK_KEY_Greek_accentdieresis* = 0x000007AE + GDK_KEY_Greek_horizbar* = 0x000007AF + GDK_KEY_Greek_alphaaccent* = 0x000007B1 + GDK_KEY_Greek_epsilonaccent* = 0x000007B2 + GDK_KEY_Greek_etaaccent* = 0x000007B3 + GDK_KEY_Greek_iotaaccent* = 0x000007B4 + GDK_KEY_Greek_iotadieresis* = 0x000007B5 + GDK_KEY_Greek_iotaaccentdieresis* = 0x000007B6 + GDK_KEY_Greek_omicronaccent* = 0x000007B7 + GDK_KEY_Greek_upsilonaccent* = 0x000007B8 + GDK_KEY_Greek_upsilondieresis* = 0x000007B9 + GDK_KEY_Greek_upsilonaccentdieresis* = 0x000007BA + GDK_KEY_Greek_omegaaccent* = 0x000007BB + GDK_KEY_Greek_CAPITAL_ALPHA* = 0x000007C1 + GDK_KEY_Greek_CAPITAL_BETA* = 0x000007C2 + GDK_KEY_Greek_CAPITAL_GAMMA* = 0x000007C3 + GDK_KEY_Greek_CAPITAL_DELTA* = 0x000007C4 + GDK_KEY_Greek_CAPITAL_EPSILON* = 0x000007C5 + GDK_KEY_Greek_CAPITAL_ZETA* = 0x000007C6 + GDK_KEY_Greek_CAPITAL_ETA* = 0x000007C7 + GDK_KEY_Greek_CAPITAL_THETA* = 0x000007C8 + GDK_KEY_Greek_CAPITAL_IOTA* = 0x000007C9 + GDK_KEY_Greek_CAPITAL_KAPPA* = 0x000007CA + GDK_KEY_Greek_CAPITAL_LAMDA* = 0x000007CB + GDK_KEY_Greek_CAPITAL_LAMBDA* = 0x000007CB + GDK_KEY_Greek_CAPITAL_MU* = 0x000007CC + GDK_KEY_Greek_CAPITAL_NU* = 0x000007CD + GDK_KEY_Greek_CAPITAL_XI* = 0x000007CE + GDK_KEY_Greek_CAPITAL_OMICRON* = 0x000007CF + GDK_KEY_Greek_CAPITAL_PI* = 0x000007D0 + GDK_KEY_Greek_CAPITAL_RHO* = 0x000007D1 + GDK_KEY_Greek_CAPITAL_SIGMA* = 0x000007D2 + GDK_KEY_Greek_CAPITAL_TAU* = 0x000007D4 + GDK_KEY_Greek_CAPITAL_UPSILON* = 0x000007D5 + GDK_KEY_Greek_CAPITAL_PHI* = 0x000007D6 + GDK_KEY_Greek_CAPITAL_CHI* = 0x000007D7 + GDK_KEY_Greek_CAPITAL_PSI* = 0x000007D8 + GDK_KEY_Greek_CAPITAL_OMEGA* = 0x000007D9 + GDK_KEY_Greek_alpha* = 0x000007E1 + GDK_KEY_Greek_beta* = 0x000007E2 + GDK_KEY_Greek_gamma* = 0x000007E3 + GDK_KEY_Greek_delta* = 0x000007E4 + GDK_KEY_Greek_epsilon* = 0x000007E5 + GDK_KEY_Greek_zeta* = 0x000007E6 + GDK_KEY_Greek_eta* = 0x000007E7 + GDK_KEY_Greek_theta* = 0x000007E8 + GDK_KEY_Greek_iota* = 0x000007E9 + GDK_KEY_Greek_kappa* = 0x000007EA + GDK_KEY_Greek_lamda* = 0x000007EB + GDK_KEY_Greek_lambda* = 0x000007EB + GDK_KEY_Greek_mu* = 0x000007EC + GDK_KEY_Greek_nu* = 0x000007ED + GDK_KEY_Greek_xi* = 0x000007EE + GDK_KEY_Greek_omicron* = 0x000007EF + GDK_KEY_Greek_pi* = 0x000007F0 + GDK_KEY_Greek_rho* = 0x000007F1 + GDK_KEY_Greek_sigma* = 0x000007F2 + GDK_KEY_Greek_finalsmallsigma* = 0x000007F3 + GDK_KEY_Greek_tau* = 0x000007F4 + GDK_KEY_Greek_upsilon* = 0x000007F5 + GDK_KEY_Greek_phi* = 0x000007F6 + GDK_KEY_Greek_chi* = 0x000007F7 + GDK_KEY_Greek_psi* = 0x000007F8 + GDK_KEY_Greek_omega* = 0x000007F9 + GDK_KEY_Greek_switch* = 0x0000FF7E + GDK_KEY_leftradical* = 0x000008A1 + GDK_KEY_topleftradical* = 0x000008A2 + GDK_KEY_horizconnector* = 0x000008A3 + GDK_KEY_topintegral* = 0x000008A4 + GDK_KEY_botintegral* = 0x000008A5 + GDK_KEY_vertconnector* = 0x000008A6 + GDK_KEY_topleftsqbracket* = 0x000008A7 + GDK_KEY_botleftsqbracket* = 0x000008A8 + GDK_KEY_toprightsqbracket* = 0x000008A9 + GDK_KEY_botrightsqbracket* = 0x000008AA + GDK_KEY_topleftparens* = 0x000008AB + GDK_KEY_botleftparens* = 0x000008AC + GDK_KEY_toprightparens* = 0x000008AD + GDK_KEY_botrightparens* = 0x000008AE + GDK_KEY_leftmiddlecurlybrace* = 0x000008AF + GDK_KEY_rightmiddlecurlybrace* = 0x000008B0 + GDK_KEY_topleftsummation* = 0x000008B1 + GDK_KEY_botleftsummation* = 0x000008B2 + GDK_KEY_topvertsummationconnector* = 0x000008B3 + GDK_KEY_botvertsummationconnector* = 0x000008B4 + GDK_KEY_toprightsummation* = 0x000008B5 + GDK_KEY_botrightsummation* = 0x000008B6 + GDK_KEY_rightmiddlesummation* = 0x000008B7 + GDK_KEY_lessthanequal* = 0x000008BC + GDK_KEY_notequal* = 0x000008BD + GDK_KEY_greaterthanequal* = 0x000008BE + GDK_KEY_integral* = 0x000008BF + GDK_KEY_therefore* = 0x000008C0 + GDK_KEY_variation* = 0x000008C1 + GDK_KEY_infinity* = 0x000008C2 + GDK_KEY_nabla* = 0x000008C5 + GDK_KEY_approximate* = 0x000008C8 + GDK_KEY_similarequal* = 0x000008C9 + GDK_KEY_ifonlyif* = 0x000008CD + GDK_KEY_implies* = 0x000008CE + GDK_KEY_identical* = 0x000008CF + GDK_KEY_radical* = 0x000008D6 + GDK_KEY_includedin* = 0x000008DA + GDK_KEY_includes* = 0x000008DB + GDK_KEY_intersection* = 0x000008DC + GDK_KEY_union* = 0x000008DD + GDK_KEY_logicaland* = 0x000008DE + GDK_KEY_logicalor* = 0x000008DF + GDK_KEY_partialderivative* = 0x000008EF + GDK_KEY_function* = 0x000008F6 + GDK_KEY_leftarrow* = 0x000008FB + GDK_KEY_uparrow* = 0x000008FC + GDK_KEY_rightarrow* = 0x000008FD + GDK_KEY_downarrow* = 0x000008FE + GDK_KEY_blank* = 0x000009DF + GDK_KEY_soliddiamond* = 0x000009E0 + GDK_KEY_checkerboard* = 0x000009E1 + GDK_KEY_ht* = 0x000009E2 + GDK_KEY_ff* = 0x000009E3 + GDK_KEY_cr* = 0x000009E4 + GDK_KEY_lf* = 0x000009E5 + GDK_KEY_nl* = 0x000009E8 + GDK_KEY_vt* = 0x000009E9 + GDK_KEY_lowrightcorner* = 0x000009EA + GDK_KEY_uprightcorner* = 0x000009EB + GDK_KEY_upleftcorner* = 0x000009EC + GDK_KEY_lowleftcorner* = 0x000009ED + GDK_KEY_crossinglines* = 0x000009EE + GDK_KEY_horizlinescan1* = 0x000009EF + GDK_KEY_horizlinescan3* = 0x000009F0 + GDK_KEY_horizlinescan5* = 0x000009F1 + GDK_KEY_horizlinescan7* = 0x000009F2 + GDK_KEY_horizlinescan9* = 0x000009F3 + GDK_KEY_leftt* = 0x000009F4 + GDK_KEY_rightt* = 0x000009F5 + GDK_KEY_bott* = 0x000009F6 + GDK_KEY_topt* = 0x000009F7 + GDK_KEY_vertbar* = 0x000009F8 + GDK_KEY_emspace* = 0x00000AA1 + GDK_KEY_enspace* = 0x00000AA2 + GDK_KEY_em3space* = 0x00000AA3 + GDK_KEY_em4space* = 0x00000AA4 + GDK_KEY_digitspace* = 0x00000AA5 + GDK_KEY_punctspace* = 0x00000AA6 + GDK_KEY_thinspace* = 0x00000AA7 + GDK_KEY_hairspace* = 0x00000AA8 + GDK_KEY_emdash* = 0x00000AA9 + GDK_KEY_endash* = 0x00000AAA + GDK_KEY_signifblank* = 0x00000AAC + GDK_KEY_ellipsis* = 0x00000AAE + GDK_KEY_doubbaselinedot* = 0x00000AAF + GDK_KEY_onethird* = 0x00000AB0 + GDK_KEY_twothirds* = 0x00000AB1 + GDK_KEY_onefifth* = 0x00000AB2 + GDK_KEY_twofifths* = 0x00000AB3 + GDK_KEY_threefifths* = 0x00000AB4 + GDK_KEY_fourfifths* = 0x00000AB5 + GDK_KEY_onesixth* = 0x00000AB6 + GDK_KEY_fivesixths* = 0x00000AB7 + GDK_KEY_careof* = 0x00000AB8 + GDK_KEY_figdash* = 0x00000ABB + GDK_KEY_leftanglebracket* = 0x00000ABC + GDK_KEY_decimalpoint* = 0x00000ABD + GDK_KEY_rightanglebracket* = 0x00000ABE + GDK_KEY_marker* = 0x00000ABF + GDK_KEY_oneeighth* = 0x00000AC3 + GDK_KEY_threeeighths* = 0x00000AC4 + GDK_KEY_fiveeighths* = 0x00000AC5 + GDK_KEY_seveneighths* = 0x00000AC6 + GDK_KEY_trademark* = 0x00000AC9 + GDK_KEY_signaturemark* = 0x00000ACA + GDK_KEY_trademarkincircle* = 0x00000ACB + GDK_KEY_leftopentriangle* = 0x00000ACC + GDK_KEY_rightopentriangle* = 0x00000ACD + GDK_KEY_emopencircle* = 0x00000ACE + GDK_KEY_emopenrectangle* = 0x00000ACF + GDK_KEY_leftsinglequotemark* = 0x00000AD0 + GDK_KEY_rightsinglequotemark* = 0x00000AD1 + GDK_KEY_leftdoublequotemark* = 0x00000AD2 + GDK_KEY_rightdoublequotemark* = 0x00000AD3 + GDK_KEY_prescription* = 0x00000AD4 + GDK_KEY_minutes* = 0x00000AD6 + GDK_KEY_seconds* = 0x00000AD7 + GDK_KEY_latincross* = 0x00000AD9 + GDK_KEY_hexagram* = 0x00000ADA + GDK_KEY_filledrectbullet* = 0x00000ADB + GDK_KEY_filledlefttribullet* = 0x00000ADC + GDK_KEY_filledrighttribullet* = 0x00000ADD + GDK_KEY_emfilledcircle* = 0x00000ADE + GDK_KEY_emfilledrect* = 0x00000ADF + GDK_KEY_enopencircbullet* = 0x00000AE0 + GDK_KEY_enopensquarebullet* = 0x00000AE1 + GDK_KEY_openrectbullet* = 0x00000AE2 + GDK_KEY_opentribulletup* = 0x00000AE3 + GDK_KEY_opentribulletdown* = 0x00000AE4 + GDK_KEY_openstar* = 0x00000AE5 + GDK_KEY_enfilledcircbullet* = 0x00000AE6 + GDK_KEY_enfilledsqbullet* = 0x00000AE7 + GDK_KEY_filledtribulletup* = 0x00000AE8 + GDK_KEY_filledtribulletdown* = 0x00000AE9 + GDK_KEY_leftpointer* = 0x00000AEA + GDK_KEY_rightpointer* = 0x00000AEB + GDK_KEY_club* = 0x00000AEC + GDK_KEY_diamond* = 0x00000AED + GDK_KEY_heart* = 0x00000AEE + GDK_KEY_maltesecross* = 0x00000AF0 + GDK_KEY_dagger* = 0x00000AF1 + GDK_KEY_doubledagger* = 0x00000AF2 + GDK_KEY_checkmark* = 0x00000AF3 + GDK_KEY_ballotcross* = 0x00000AF4 + GDK_KEY_musicalsharp* = 0x00000AF5 + GDK_KEY_musicalflat* = 0x00000AF6 + GDK_KEY_malesymbol* = 0x00000AF7 + GDK_KEY_femalesymbol* = 0x00000AF8 + GDK_KEY_telephone* = 0x00000AF9 + GDK_KEY_telephonerecorder* = 0x00000AFA + GDK_KEY_phonographcopyright* = 0x00000AFB + GDK_KEY_caret* = 0x00000AFC + GDK_KEY_singlelowquotemark* = 0x00000AFD + GDK_KEY_doublelowquotemark* = 0x00000AFE + GDK_KEY_cursor* = 0x00000AFF + GDK_KEY_leftcaret* = 0x00000BA3 + GDK_KEY_rightcaret* = 0x00000BA6 + GDK_KEY_downcaret* = 0x00000BA8 + GDK_KEY_upcaret* = 0x00000BA9 + GDK_KEY_overbar* = 0x00000BC0 + GDK_KEY_downtack* = 0x00000BC2 + GDK_KEY_upshoe* = 0x00000BC3 + GDK_KEY_downstile* = 0x00000BC4 + GDK_KEY_underbar* = 0x00000BC6 + GDK_KEY_jot* = 0x00000BCA + GDK_KEY_quad* = 0x00000BCC + GDK_KEY_uptack* = 0x00000BCE + GDK_KEY_circle* = 0x00000BCF + GDK_KEY_upstile* = 0x00000BD3 + GDK_KEY_downshoe* = 0x00000BD6 + GDK_KEY_rightshoe* = 0x00000BD8 + GDK_KEY_leftshoe* = 0x00000BDA + GDK_KEY_lefttack* = 0x00000BDC + GDK_KEY_righttack* = 0x00000BFC + GDK_KEY_hebrew_doublelowline* = 0x00000CDF + GDK_KEY_hebrew_aleph* = 0x00000CE0 + GDK_KEY_hebrew_bet* = 0x00000CE1 + GDK_KEY_hebrew_beth* = 0x00000CE1 + GDK_KEY_hebrew_gimel* = 0x00000CE2 + GDK_KEY_hebrew_gimmel* = 0x00000CE2 + GDK_KEY_hebrew_dalet* = 0x00000CE3 + GDK_KEY_hebrew_daleth* = 0x00000CE3 + GDK_KEY_hebrew_he* = 0x00000CE4 + GDK_KEY_hebrew_waw* = 0x00000CE5 + GDK_KEY_hebrew_zain* = 0x00000CE6 + GDK_KEY_hebrew_zayin* = 0x00000CE6 + GDK_KEY_hebrew_chet* = 0x00000CE7 + GDK_KEY_hebrew_het* = 0x00000CE7 + GDK_KEY_hebrew_tet* = 0x00000CE8 + GDK_KEY_hebrew_teth* = 0x00000CE8 + GDK_KEY_hebrew_yod* = 0x00000CE9 + GDK_KEY_hebrew_finalkaph* = 0x00000CEA + GDK_KEY_hebrew_kaph* = 0x00000CEB + GDK_KEY_hebrew_lamed* = 0x00000CEC + GDK_KEY_hebrew_finalmem* = 0x00000CED + GDK_KEY_hebrew_mem* = 0x00000CEE + GDK_KEY_hebrew_finalnun* = 0x00000CEF + GDK_KEY_hebrew_nun* = 0x00000CF0 + GDK_KEY_hebrew_samech* = 0x00000CF1 + GDK_KEY_hebrew_samekh* = 0x00000CF1 + GDK_KEY_hebrew_ayin* = 0x00000CF2 + GDK_KEY_hebrew_finalpe* = 0x00000CF3 + GDK_KEY_hebrew_pe* = 0x00000CF4 + GDK_KEY_hebrew_finalzade* = 0x00000CF5 + GDK_KEY_hebrew_finalzadi* = 0x00000CF5 + GDK_KEY_hebrew_zade* = 0x00000CF6 + GDK_KEY_hebrew_zadi* = 0x00000CF6 + GDK_KEY_hebrew_qoph* = 0x00000CF7 + GDK_KEY_hebrew_kuf* = 0x00000CF7 + GDK_KEY_hebrew_resh* = 0x00000CF8 + GDK_KEY_hebrew_shin* = 0x00000CF9 + GDK_KEY_hebrew_taw* = 0x00000CFA + GDK_KEY_hebrew_taf* = 0x00000CFA + GDK_KEY_Hebrew_switch* = 0x0000FF7E + GDK_KEY_Thai_kokai* = 0x00000DA1 + GDK_KEY_Thai_khokhai* = 0x00000DA2 + GDK_KEY_Thai_khokhuat* = 0x00000DA3 + GDK_KEY_Thai_khokhwai* = 0x00000DA4 + GDK_KEY_Thai_khokhon* = 0x00000DA5 + GDK_KEY_Thai_khorakhang* = 0x00000DA6 + GDK_KEY_Thai_ngongu* = 0x00000DA7 + GDK_KEY_Thai_chochan* = 0x00000DA8 + GDK_KEY_Thai_choching* = 0x00000DA9 + GDK_KEY_Thai_chochang* = 0x00000DAA + GDK_KEY_Thai_soso* = 0x00000DAB + GDK_KEY_Thai_chochoe* = 0x00000DAC + GDK_KEY_Thai_yoying* = 0x00000DAD + GDK_KEY_Thai_dochada* = 0x00000DAE + GDK_KEY_Thai_topatak* = 0x00000DAF + GDK_KEY_Thai_thothan* = 0x00000DB0 + GDK_KEY_Thai_thonangmontho* = 0x00000DB1 + GDK_KEY_Thai_thophuthao* = 0x00000DB2 + GDK_KEY_Thai_nonen* = 0x00000DB3 + GDK_KEY_Thai_dodek* = 0x00000DB4 + GDK_KEY_Thai_totao* = 0x00000DB5 + GDK_KEY_Thai_thothung* = 0x00000DB6 + GDK_KEY_Thai_thothahan* = 0x00000DB7 + GDK_KEY_Thai_thothong* = 0x00000DB8 + GDK_KEY_Thai_nonu* = 0x00000DB9 + GDK_KEY_Thai_bobaimai* = 0x00000DBA + GDK_KEY_Thai_popla* = 0x00000DBB + GDK_KEY_Thai_phophung* = 0x00000DBC + GDK_KEY_Thai_fofa* = 0x00000DBD + GDK_KEY_Thai_phophan* = 0x00000DBE + GDK_KEY_Thai_fofan* = 0x00000DBF + GDK_KEY_Thai_phosamphao* = 0x00000DC0 + GDK_KEY_Thai_moma* = 0x00000DC1 + GDK_KEY_Thai_yoyak* = 0x00000DC2 + GDK_KEY_Thai_rorua* = 0x00000DC3 + GDK_KEY_Thai_ru* = 0x00000DC4 + GDK_KEY_Thai_loling* = 0x00000DC5 + GDK_KEY_Thai_lu* = 0x00000DC6 + GDK_KEY_Thai_wowaen* = 0x00000DC7 + GDK_KEY_Thai_sosala* = 0x00000DC8 + GDK_KEY_Thai_sorusi* = 0x00000DC9 + GDK_KEY_Thai_sosua* = 0x00000DCA + GDK_KEY_Thai_hohip* = 0x00000DCB + GDK_KEY_Thai_lochula* = 0x00000DCC + GDK_KEY_Thai_oang* = 0x00000DCD + GDK_KEY_Thai_honokhuk* = 0x00000DCE + GDK_KEY_Thai_paiyannoi* = 0x00000DCF + GDK_KEY_Thai_saraa* = 0x00000DD0 + GDK_KEY_Thai_maihanakat* = 0x00000DD1 + GDK_KEY_Thai_saraaa* = 0x00000DD2 + GDK_KEY_Thai_saraam* = 0x00000DD3 + GDK_KEY_Thai_sarai* = 0x00000DD4 + GDK_KEY_Thai_saraii* = 0x00000DD5 + GDK_KEY_Thai_saraue* = 0x00000DD6 + GDK_KEY_Thai_sarauee* = 0x00000DD7 + GDK_KEY_Thai_sarau* = 0x00000DD8 + GDK_KEY_Thai_sarauu* = 0x00000DD9 + GDK_KEY_Thai_phinthu* = 0x00000DDA + GDK_KEY_Thai_maihanakat_maitho* = 0x00000DDE + GDK_KEY_Thai_baht* = 0x00000DDF + GDK_KEY_Thai_sarae* = 0x00000DE0 + GDK_KEY_Thai_saraae* = 0x00000DE1 + GDK_KEY_Thai_sarao* = 0x00000DE2 + GDK_KEY_Thai_saraaimaimuan* = 0x00000DE3 + GDK_KEY_Thai_saraaimaimalai* = 0x00000DE4 + GDK_KEY_Thai_lakkhangyao* = 0x00000DE5 + GDK_KEY_Thai_maiyamok* = 0x00000DE6 + GDK_KEY_Thai_maitaikhu* = 0x00000DE7 + GDK_KEY_Thai_maiek* = 0x00000DE8 + GDK_KEY_Thai_maitho* = 0x00000DE9 + GDK_KEY_Thai_maitri* = 0x00000DEA + GDK_KEY_Thai_maichattawa* = 0x00000DEB + GDK_KEY_Thai_thanthakhat* = 0x00000DEC + GDK_KEY_Thai_nikhahit* = 0x00000DED + GDK_KEY_Thai_leksun* = 0x00000DF0 + GDK_KEY_Thai_leknung* = 0x00000DF1 + GDK_KEY_Thai_leksong* = 0x00000DF2 + GDK_KEY_Thai_leksam* = 0x00000DF3 + GDK_KEY_Thai_leksi* = 0x00000DF4 + GDK_KEY_Thai_lekha* = 0x00000DF5 + GDK_KEY_Thai_lekhok* = 0x00000DF6 + GDK_KEY_Thai_lekchet* = 0x00000DF7 + GDK_KEY_Thai_lekpaet* = 0x00000DF8 + GDK_KEY_Thai_lekkao* = 0x00000DF9 + GDK_KEY_Hangul* = 0x0000FF31 + GDK_KEY_Hangul_Start* = 0x0000FF32 + GDK_KEY_Hangul_End* = 0x0000FF33 + GDK_KEY_Hangul_Hanja* = 0x0000FF34 + GDK_KEY_Hangul_Jamo* = 0x0000FF35 + GDK_KEY_Hangul_Romaja* = 0x0000FF36 + GDK_KEY_Hangul_Codeinput* = 0x0000FF37 + GDK_KEY_Hangul_Jeonja* = 0x0000FF38 + GDK_KEY_Hangul_Banja* = 0x0000FF39 + GDK_KEY_Hangul_PreHanja* = 0x0000FF3A + GDK_KEY_Hangul_PostHanja* = 0x0000FF3B + GDK_KEY_Hangul_SingleCandidate* = 0x0000FF3C + GDK_KEY_Hangul_MultipleCandidate* = 0x0000FF3D + GDK_KEY_Hangul_PreviousCandidate* = 0x0000FF3E + GDK_KEY_Hangul_Special* = 0x0000FF3F + GDK_KEY_Hangul_switch* = 0x0000FF7E + GDK_KEY_Hangul_Kiyeog* = 0x00000EA1 + GDK_KEY_Hangul_SsangKiyeog* = 0x00000EA2 + GDK_KEY_Hangul_KiyeogSios* = 0x00000EA3 + GDK_KEY_Hangul_Nieun* = 0x00000EA4 + GDK_KEY_Hangul_NieunJieuj* = 0x00000EA5 + GDK_KEY_Hangul_NieunHieuh* = 0x00000EA6 + GDK_KEY_Hangul_Dikeud* = 0x00000EA7 + GDK_KEY_Hangul_SsangDikeud* = 0x00000EA8 + GDK_KEY_Hangul_Rieul* = 0x00000EA9 + GDK_KEY_Hangul_RieulKiyeog* = 0x00000EAA + GDK_KEY_Hangul_RieulMieum* = 0x00000EAB + GDK_KEY_Hangul_RieulPieub* = 0x00000EAC + GDK_KEY_Hangul_RieulSios* = 0x00000EAD + GDK_KEY_Hangul_RieulTieut* = 0x00000EAE + GDK_KEY_Hangul_RieulPhieuf* = 0x00000EAF + GDK_KEY_Hangul_RieulHieuh* = 0x00000EB0 + GDK_KEY_Hangul_Mieum* = 0x00000EB1 + GDK_KEY_Hangul_Pieub* = 0x00000EB2 + GDK_KEY_Hangul_SsangPieub* = 0x00000EB3 + GDK_KEY_Hangul_PieubSios* = 0x00000EB4 + GDK_KEY_Hangul_Sios* = 0x00000EB5 + GDK_KEY_Hangul_SsangSios* = 0x00000EB6 + GDK_KEY_Hangul_Ieung* = 0x00000EB7 + GDK_KEY_Hangul_Jieuj* = 0x00000EB8 + GDK_KEY_Hangul_SsangJieuj* = 0x00000EB9 + GDK_KEY_Hangul_Cieuc* = 0x00000EBA + GDK_KEY_Hangul_Khieuq* = 0x00000EBB + GDK_KEY_Hangul_Tieut* = 0x00000EBC + GDK_KEY_Hangul_Phieuf* = 0x00000EBD + GDK_KEY_Hangul_Hieuh* = 0x00000EBE + GDK_KEY_Hangul_A* = 0x00000EBF + GDK_KEY_Hangul_AE* = 0x00000EC0 + GDK_KEY_Hangul_YA* = 0x00000EC1 + GDK_KEY_Hangul_YAE* = 0x00000EC2 + GDK_KEY_Hangul_EO* = 0x00000EC3 + GDK_KEY_Hangul_E* = 0x00000EC4 + GDK_KEY_Hangul_YEO* = 0x00000EC5 + GDK_KEY_Hangul_YE* = 0x00000EC6 + GDK_KEY_Hangul_O* = 0x00000EC7 + GDK_KEY_Hangul_WA* = 0x00000EC8 + GDK_KEY_Hangul_WAE* = 0x00000EC9 + GDK_KEY_Hangul_OE* = 0x00000ECA + GDK_KEY_Hangul_YO* = 0x00000ECB + GDK_KEY_Hangul_U* = 0x00000ECC + GDK_KEY_Hangul_WEO* = 0x00000ECD + GDK_KEY_Hangul_WE* = 0x00000ECE + GDK_KEY_Hangul_WI* = 0x00000ECF + GDK_KEY_Hangul_YU* = 0x00000ED0 + GDK_KEY_Hangul_EU* = 0x00000ED1 + GDK_KEY_Hangul_YI* = 0x00000ED2 + GDK_KEY_Hangul_I* = 0x00000ED3 + GDK_KEY_Hangul_J_Kiyeog* = 0x00000ED4 + GDK_KEY_Hangul_J_SsangKiyeog* = 0x00000ED5 + GDK_KEY_Hangul_J_KiyeogSios* = 0x00000ED6 + GDK_KEY_Hangul_J_Nieun* = 0x00000ED7 + GDK_KEY_Hangul_J_NieunJieuj* = 0x00000ED8 + GDK_KEY_Hangul_J_NieunHieuh* = 0x00000ED9 + GDK_KEY_Hangul_J_Dikeud* = 0x00000EDA + GDK_KEY_Hangul_J_Rieul* = 0x00000EDB + GDK_KEY_Hangul_J_RieulKiyeog* = 0x00000EDC + GDK_KEY_Hangul_J_RieulMieum* = 0x00000EDD + GDK_KEY_Hangul_J_RieulPieub* = 0x00000EDE + GDK_KEY_Hangul_J_RieulSios* = 0x00000EDF + GDK_KEY_Hangul_J_RieulTieut* = 0x00000EE0 + GDK_KEY_Hangul_J_RieulPhieuf* = 0x00000EE1 + GDK_KEY_Hangul_J_RieulHieuh* = 0x00000EE2 + GDK_KEY_Hangul_J_Mieum* = 0x00000EE3 + GDK_KEY_Hangul_J_Pieub* = 0x00000EE4 + GDK_KEY_Hangul_J_PieubSios* = 0x00000EE5 + GDK_KEY_Hangul_J_Sios* = 0x00000EE6 + GDK_KEY_Hangul_J_SsangSios* = 0x00000EE7 + GDK_KEY_Hangul_J_Ieung* = 0x00000EE8 + GDK_KEY_Hangul_J_Jieuj* = 0x00000EE9 + GDK_KEY_Hangul_J_Cieuc* = 0x00000EEA + GDK_KEY_Hangul_J_Khieuq* = 0x00000EEB + GDK_KEY_Hangul_J_Tieut* = 0x00000EEC + GDK_KEY_Hangul_J_Phieuf* = 0x00000EED + GDK_KEY_Hangul_J_Hieuh* = 0x00000EEE + GDK_KEY_Hangul_RieulYeorinHieuh* = 0x00000EEF + GDK_KEY_Hangul_SunkyeongeumMieum* = 0x00000EF0 + GDK_KEY_Hangul_SunkyeongeumPieub* = 0x00000EF1 + GDK_KEY_Hangul_PanSios* = 0x00000EF2 + GDK_KEY_Hangul_KkogjiDalrinIeung* = 0x00000EF3 + GDK_KEY_Hangul_SunkyeongeumPhieuf* = 0x00000EF4 + GDK_KEY_Hangul_YeorinHieuh* = 0x00000EF5 + GDK_KEY_Hangul_AraeA* = 0x00000EF6 + GDK_KEY_Hangul_AraeAE* = 0x00000EF7 + GDK_KEY_Hangul_J_PanSios* = 0x00000EF8 + GDK_KEY_Hangul_J_KkogjiDalrinIeung* = 0x00000EF9 + GDK_KEY_Hangul_J_YeorinHieuh* = 0x00000EFA + GDK_KEY_Korean_Won* = 0x00000EFF + GDK_KEY_EcuSign* = 0x000020A0 + GDK_KEY_ColonSign* = 0x000020A1 + GDK_KEY_CruzeiroSign* = 0x000020A2 + GDK_KEY_FFrancSign* = 0x000020A3 + GDK_KEY_LiraSign* = 0x000020A4 + GDK_KEY_MillSign* = 0x000020A5 + GDK_KEY_NairaSign* = 0x000020A6 + GDK_KEY_PesetaSign* = 0x000020A7 + GDK_KEY_RupeeSign* = 0x000020A8 + GDK_KEY_WonSign* = 0x000020A9 + GDK_KEY_NewSheqelSign* = 0x000020AA + GDK_KEY_DongSign* = 0x000020AB + GDK_KEY_EuroSign* = 0x000020AC + +proc gdk_pango_context_get_for_screen*(screen: PGdkScreen): PPangoContext{. + cdecl, dynlib: gdklib, importc: "gdk_pango_context_get_for_screen".} +proc gdk_pango_context_set_colormap*(context: PPangoContext, + colormap: PGdkColormap){.cdecl, + dynlib: gdklib, importc: "gdk_pango_context_set_colormap".} +proc gdk_pango_layout_line_get_clip_region*(line: PPangoLayoutLine, + x_origin: gint, y_origin: gint, index_ranges: Pgint, n_ranges: gint): PGdkRegion{. + cdecl, dynlib: gdklib, importc: "gdk_pango_layout_line_get_clip_region".} +proc gdk_pango_layout_get_clip_region*(layout: PPangoLayout, x_origin: gint, + y_origin: gint, index_ranges: Pgint, + n_ranges: gint): PGdkRegion{.cdecl, + dynlib: gdklib, importc: "gdk_pango_layout_get_clip_region".} +proc gdk_pango_attr_stipple_new*(stipple: PGdkBitmap): PPangoAttribute{.cdecl, + dynlib: gdklib, importc: "gdk_pango_attr_stipple_new".} +proc gdk_pango_attr_embossed_new*(embossed: gboolean): PPangoAttribute{.cdecl, + dynlib: gdklib, importc: "gdk_pango_attr_embossed_new".} +proc gdk_pixbuf_render_threshold_alpha*(pixbuf: PGdkPixbuf, bitmap: PGdkBitmap, + src_x: int32, src_y: int32, + dest_x: int32, dest_y: int32, + width: int32, height: int32, + alpha_threshold: int32){.cdecl, + dynlib: gdklib, importc: "gdk_pixbuf_render_threshold_alpha".} +proc gdk_pixbuf_render_to_drawable*(pixbuf: PGdkPixbuf, drawable: PGdkDrawable, + gc: PGdkGC, src_x: int32, src_y: int32, + dest_x: int32, dest_y: int32, width: int32, + height: int32, dither: TGdkRgbDither, + x_dither: int32, y_dither: int32){.cdecl, + dynlib: gdklib, importc: "gdk_pixbuf_render_to_drawable".} +proc gdk_pixbuf_render_to_drawable_alpha*(pixbuf: PGdkPixbuf, + drawable: PGdkDrawable, src_x: int32, src_y: int32, dest_x: int32, + dest_y: int32, width: int32, height: int32, alpha_mode: TGdkPixbufAlphaMode, + alpha_threshold: int32, dither: TGdkRgbDither, x_dither: int32, + y_dither: int32){.cdecl, dynlib: gdklib, + importc: "gdk_pixbuf_render_to_drawable_alpha".} +proc gdk_pixbuf_render_pixmap_and_mask_for_colormap*(pixbuf: PGdkPixbuf, + colormap: PGdkColormap, n: var PGdkPixmap, nasdfdsafw4e: var PGdkBitmap, + alpha_threshold: int32){.cdecl, dynlib: gdklib, importc: "gdk_pixbuf_render_pixmap_and_mask_for_colormap".} +proc gdk_pixbuf_get_from_drawable*(dest: PGdkPixbuf, src: PGdkDrawable, + cmap: PGdkColormap, src_x: int32, + src_y: int32, dest_x: int32, dest_y: int32, + width: int32, height: int32): PGdkPixbuf{. + cdecl, dynlib: gdklib, importc: "gdk_pixbuf_get_from_drawable".} +proc gdk_pixbuf_get_from_image*(dest: PGdkPixbuf, src: PGdkImage, + cmap: PGdkColormap, src_x: int32, src_y: int32, + dest_x: int32, dest_y: int32, width: int32, + height: int32): PGdkPixbuf{.cdecl, + dynlib: gdklib, importc: "gdk_pixbuf_get_from_image".} +proc GDK_TYPE_PIXMAP*(): GType +proc GDK_PIXMAP*(anObject: Pointer): PGdkPixmap +proc GDK_PIXMAP_CLASS*(klass: Pointer): PGdkPixmapObjectClass +proc GDK_IS_PIXMAP*(anObject: Pointer): bool +proc GDK_IS_PIXMAP_CLASS*(klass: Pointer): bool +proc GDK_PIXMAP_GET_CLASS*(obj: Pointer): PGdkPixmapObjectClass +proc GDK_PIXMAP_OBJECT*(anObject: Pointer): PGdkPixmapObject +proc gdk_pixmap_get_type*(): GType{.cdecl, dynlib: gdklib, + importc: "gdk_pixmap_get_type".} +proc gdk_pixmap_new*(window: PGdkWindow, width: gint, height: gint, depth: gint): PGdkPixmap{. + cdecl, dynlib: gdklib, importc: "gdk_pixmap_new".} +proc gdk_bitmap_create_from_data*(window: PGdkWindow, data: cstring, width: gint, + height: gint): PGdkBitmap{.cdecl, + dynlib: gdklib, importc: "gdk_bitmap_create_from_data".} +proc gdk_pixmap_create_from_data*(window: PGdkWindow, data: cstring, width: gint, + height: gint, depth: gint, fg: PGdkColor, + bg: PGdkColor): PGdkPixmap{.cdecl, + dynlib: gdklib, importc: "gdk_pixmap_create_from_data".} +proc gdk_pixmap_create_from_xpm*(window: PGdkWindow, k: var PGdkBitmap, + transparent_color: PGdkColor, filename: cstring): PGdkPixmap{. + cdecl, dynlib: gdklib, importc: "gdk_pixmap_create_from_xpm".} +proc gdk_pixmap_colormap_create_from_xpm*(window: PGdkWindow, + colormap: PGdkColormap, k: var PGdkBitmap, transparent_color: PGdkColor, + filename: cstring): PGdkPixmap{.cdecl, dynlib: gdklib, importc: "gdk_pixmap_colormap_create_from_xpm".} +proc gdk_pixmap_create_from_xpm_d*(window: PGdkWindow, k: var PGdkBitmap, + transparent_color: PGdkColor, data: PPgchar): PGdkPixmap{. + cdecl, dynlib: gdklib, importc: "gdk_pixmap_create_from_xpm_d".} +proc gdk_pixmap_colormap_create_from_xpm_d*(window: PGdkWindow, + colormap: PGdkColormap, k: var PGdkBitmap, transparent_color: PGdkColor, + data: PPgchar): PGdkPixmap{.cdecl, dynlib: gdklib, importc: "gdk_pixmap_colormap_create_from_xpm_d".} +proc gdk_pixmap_foreign_new_for_display*(display: PGdkDisplay, + anid: TGdkNativeWindow): PGdkPixmap{.cdecl, dynlib: gdklib, + importc: "gdk_pixmap_foreign_new_for_display".} +proc gdk_pixmap_lookup_for_display*(display: PGdkDisplay, anid: TGdkNativeWindow): PGdkPixmap{. + cdecl, dynlib: gdklib, importc: "gdk_pixmap_lookup_for_display".} +proc gdk_atom_intern*(atom_name: cstring, only_if_exists: gboolean): TGdkAtom{. + cdecl, dynlib: gdklib, importc: "gdk_atom_intern".} +proc gdk_atom_name*(atom: TGdkAtom): cstring{.cdecl, dynlib: gdklib, + importc: "gdk_atom_name".} +proc gdk_property_get*(window: PGdkWindow, `property`: TGdkAtom, + `type`: TGdkAtom, offset: gulong, length: gulong, + pdelete: gint, actual_property_type: PGdkAtom, + actual_format: Pgint, actual_length: Pgint, + data: PPguchar): gboolean{.cdecl, dynlib: gdklib, + importc: "gdk_property_get".} +proc gdk_property_change*(window: PGdkWindow, `property`: TGdkAtom, + `type`: TGdkAtom, format: gint, mode: TGdkPropMode, + data: Pguchar, nelements: gint){.cdecl, + dynlib: gdklib, importc: "gdk_property_change".} +proc gdk_property_delete*(window: PGdkWindow, `property`: TGdkAtom){.cdecl, + dynlib: gdklib, importc: "gdk_property_delete".} +proc gdk_text_property_to_text_list_for_display*(display: PGdkDisplay, + encoding: TGdkAtom, format: gint, text: Pguchar, length: gint, + t: var PPgchar): gint{.cdecl, dynlib: gdklib, importc: "gdk_text_property_to_text_list_for_display".} +proc gdk_text_property_to_utf8_list_for_display*(display: PGdkDisplay, + encoding: TGdkAtom, format: gint, text: Pguchar, length: gint, + t: var PPgchar): gint{.cdecl, dynlib: gdklib, importc: "gdk_text_property_to_utf8_list_for_display".} +proc gdk_utf8_to_string_target*(str: cstring): cstring{.cdecl, dynlib: gdklib, + importc: "gdk_utf8_to_string_target".} +proc gdk_string_to_compound_text_for_display*(display: PGdkDisplay, str: cstring, + encoding: PGdkAtom, format: Pgint, ctext: PPguchar, length: Pgint): gint{. + cdecl, dynlib: gdklib, importc: "gdk_string_to_compound_text_for_display".} +proc gdk_utf8_to_compound_text_for_display*(display: PGdkDisplay, str: cstring, + encoding: PGdkAtom, format: Pgint, ctext: PPguchar, length: Pgint): gboolean{. + cdecl, dynlib: gdklib, importc: "gdk_utf8_to_compound_text_for_display".} +proc gdk_free_text_list*(list: PPgchar){.cdecl, dynlib: gdklib, + importc: "gdk_free_text_list".} +proc gdk_free_compound_text*(ctext: Pguchar){.cdecl, dynlib: gdklib, + importc: "gdk_free_compound_text".} +proc gdk_region_new*(): PGdkRegion{.cdecl, dynlib: gdklib, + importc: "gdk_region_new".} +proc gdk_region_polygon*(points: PGdkPoint, npoints: gint, + fill_rule: TGdkFillRule): PGdkRegion{.cdecl, + dynlib: gdklib, importc: "gdk_region_polygon".} +proc gdk_region_copy*(region: PGdkRegion): PGdkRegion{.cdecl, dynlib: gdklib, + importc: "gdk_region_copy".} +proc gdk_region_rectangle*(rectangle: PGdkRectangle): PGdkRegion{.cdecl, + dynlib: gdklib, importc: "gdk_region_rectangle".} +proc gdk_region_destroy*(region: PGdkRegion){.cdecl, dynlib: gdklib, + importc: "gdk_region_destroy".} +proc gdk_region_get_clipbox*(region: PGdkRegion, rectangle: PGdkRectangle){. + cdecl, dynlib: gdklib, importc: "gdk_region_get_clipbox".} +proc gdk_region_get_rectangles*(region: PGdkRegion, s: var PGdkRectangle, + n_rectangles: Pgint){.cdecl, dynlib: gdklib, + importc: "gdk_region_get_rectangles".} +proc gdk_region_empty*(region: PGdkRegion): gboolean{.cdecl, dynlib: gdklib, + importc: "gdk_region_empty".} +proc gdk_region_equal*(region1: PGdkRegion, region2: PGdkRegion): gboolean{. + cdecl, dynlib: gdklib, importc: "gdk_region_equal".} +proc gdk_region_point_in*(region: PGdkRegion, x: int32, y: int32): gboolean{. + cdecl, dynlib: gdklib, importc: "gdk_region_point_in".} +proc gdk_region_rect_in*(region: PGdkRegion, rect: PGdkRectangle): TGdkOverlapType{. + cdecl, dynlib: gdklib, importc: "gdk_region_rect_in".} +proc gdk_region_offset*(region: PGdkRegion, dx: gint, dy: gint){.cdecl, + dynlib: gdklib, importc: "gdk_region_offset".} +proc gdk_region_shrink*(region: PGdkRegion, dx: gint, dy: gint){.cdecl, + dynlib: gdklib, importc: "gdk_region_shrink".} +proc gdk_region_union_with_rect*(region: PGdkRegion, rect: PGdkRectangle){. + cdecl, dynlib: gdklib, importc: "gdk_region_union_with_rect".} +proc gdk_region_intersect*(source1: PGdkRegion, source2: PGdkRegion){.cdecl, + dynlib: gdklib, importc: "gdk_region_intersect".} +proc gdk_region_union*(source1: PGdkRegion, source2: PGdkRegion){.cdecl, + dynlib: gdklib, importc: "gdk_region_union".} +proc gdk_region_subtract*(source1: PGdkRegion, source2: PGdkRegion){.cdecl, + dynlib: gdklib, importc: "gdk_region_subtract".} +proc gdk_region_xor*(source1: PGdkRegion, source2: PGdkRegion){.cdecl, + dynlib: gdklib, importc: "gdk_region_xor".} +proc gdk_region_spans_intersect_foreach*(region: PGdkRegion, spans: PGdkSpan, + n_spans: int32, sorted: gboolean, `function`: TGdkSpanFunc, data: gpointer){. + cdecl, dynlib: gdklib, importc: "gdk_region_spans_intersect_foreach".} +proc gdk_rgb_find_color*(colormap: PGdkColormap, color: PGdkColor){.cdecl, + dynlib: gdklib, importc: "gdk_rgb_find_color".} +proc gdk_draw_rgb_image*(drawable: PGdkDrawable, gc: PGdkGC, x: gint, y: gint, + width: gint, height: gint, dith: TGdkRgbDither, + rgb_buf: Pguchar, rowstride: gint){.cdecl, + dynlib: gdklib, importc: "gdk_draw_rgb_image".} +proc gdk_draw_rgb_image_dithalign*(drawable: PGdkDrawable, gc: PGdkGC, x: gint, + y: gint, width: gint, height: gint, + dith: TGdkRgbDither, rgb_buf: Pguchar, + rowstride: gint, xdith: gint, ydith: gint){. + cdecl, dynlib: gdklib, importc: "gdk_draw_rgb_image_dithalign".} +proc gdk_draw_rgb_32_image*(drawable: PGdkDrawable, gc: PGdkGC, x: gint, + y: gint, width: gint, height: gint, + dith: TGdkRgbDither, buf: Pguchar, rowstride: gint){. + cdecl, dynlib: gdklib, importc: "gdk_draw_rgb_32_image".} +proc gdk_draw_rgb_32_image_dithalign*(drawable: PGdkDrawable, gc: PGdkGC, + x: gint, y: gint, width: gint, + height: gint, dith: TGdkRgbDither, + buf: Pguchar, rowstride: gint, + xdith: gint, ydith: gint){.cdecl, + dynlib: gdklib, importc: "gdk_draw_rgb_32_image_dithalign".} +proc gdk_draw_gray_image*(drawable: PGdkDrawable, gc: PGdkGC, x: gint, y: gint, + width: gint, height: gint, dith: TGdkRgbDither, + buf: Pguchar, rowstride: gint){.cdecl, dynlib: gdklib, + importc: "gdk_draw_gray_image".} +proc gdk_draw_indexed_image*(drawable: PGdkDrawable, gc: PGdkGC, x: gint, + y: gint, width: gint, height: gint, + dith: TGdkRgbDither, buf: Pguchar, rowstride: gint, + cmap: PGdkRgbCmap){.cdecl, dynlib: gdklib, + importc: "gdk_draw_indexed_image".} +proc gdk_rgb_cmap_new*(colors: Pguint32, n_colors: gint): PGdkRgbCmap{.cdecl, + dynlib: gdklib, importc: "gdk_rgb_cmap_new".} +proc gdk_rgb_cmap_free*(cmap: PGdkRgbCmap){.cdecl, dynlib: gdklib, + importc: "gdk_rgb_cmap_free".} +proc gdk_rgb_set_verbose*(verbose: gboolean){.cdecl, dynlib: gdklib, + importc: "gdk_rgb_set_verbose".} +proc gdk_rgb_set_install*(install: gboolean){.cdecl, dynlib: gdklib, + importc: "gdk_rgb_set_install".} +proc gdk_rgb_set_min_colors*(min_colors: gint){.cdecl, dynlib: gdklib, + importc: "gdk_rgb_set_min_colors".} +proc GDK_TYPE_DISPLAY*(): GType +proc GDK_DISPLAY_OBJECT*(anObject: pointer): PGdkDisplay +proc GDK_DISPLAY_CLASS*(klass: pointer): PGdkDisplayClass +proc GDK_IS_DISPLAY*(anObject: pointer): bool +proc GDK_IS_DISPLAY_CLASS*(klass: pointer): bool +proc GDK_DISPLAY_GET_CLASS*(obj: pointer): PGdkDisplayClass +proc gdk_display_open*(display_name: cstring): PGdkDisplay{.cdecl, + dynlib: gdklib, importc: "gdk_display_open".} +proc gdk_display_get_name*(display: PGdkDisplay): cstring{.cdecl, dynlib: gdklib, + importc: "gdk_display_get_name".} +proc gdk_display_get_n_screens*(display: PGdkDisplay): gint{.cdecl, + dynlib: gdklib, importc: "gdk_display_get_n_screens".} +proc gdk_display_get_screen*(display: PGdkDisplay, screen_num: gint): PGdkScreen{. + cdecl, dynlib: gdklib, importc: "gdk_display_get_screen".} +proc gdk_display_get_default_screen*(display: PGdkDisplay): PGdkScreen{.cdecl, + dynlib: gdklib, importc: "gdk_display_get_default_screen".} +proc gdk_display_pointer_ungrab*(display: PGdkDisplay, time: guint32){.cdecl, + dynlib: gdklib, importc: "gdk_display_pointer_ungrab".} +proc gdk_display_keyboard_ungrab*(display: PGdkDisplay, time: guint32){.cdecl, + dynlib: gdklib, importc: "gdk_display_keyboard_ungrab".} +proc gdk_display_pointer_is_grabbed*(display: PGdkDisplay): gboolean{.cdecl, + dynlib: gdklib, importc: "gdk_display_pointer_is_grabbed".} +proc gdk_display_beep*(display: PGdkDisplay){.cdecl, dynlib: gdklib, + importc: "gdk_display_beep".} +proc gdk_display_sync*(display: PGdkDisplay){.cdecl, dynlib: gdklib, + importc: "gdk_display_sync".} +proc gdk_display_close*(display: PGdkDisplay){.cdecl, dynlib: gdklib, + importc: "gdk_display_close".} +proc gdk_display_list_devices*(display: PGdkDisplay): PGList{.cdecl, + dynlib: gdklib, importc: "gdk_display_list_devices".} +proc gdk_display_get_event*(display: PGdkDisplay): PGdkEvent{.cdecl, + dynlib: gdklib, importc: "gdk_display_get_event".} +proc gdk_display_peek_event*(display: PGdkDisplay): PGdkEvent{.cdecl, + dynlib: gdklib, importc: "gdk_display_peek_event".} +proc gdk_display_put_event*(display: PGdkDisplay, event: PGdkEvent){.cdecl, + dynlib: gdklib, importc: "gdk_display_put_event".} +proc gdk_display_add_client_message_filter*(display: PGdkDisplay, + message_type: TGdkAtom, func: TGdkFilterFunc, data: gpointer){.cdecl, + dynlib: gdklib, importc: "gdk_display_add_client_message_filter".} +proc gdk_display_set_double_click_time*(display: PGdkDisplay, msec: guint){. + cdecl, dynlib: gdklib, importc: "gdk_display_set_double_click_time".} +proc gdk_display_set_sm_client_id*(display: PGdkDisplay, sm_client_id: cstring){. + cdecl, dynlib: gdklib, importc: "gdk_display_set_sm_client_id".} +proc gdk_set_default_display*(display: PGdkDisplay){.cdecl, dynlib: gdklib, + importc: "gdk_set_default_display".} +proc gdk_get_default_display*(): PGdkDisplay{.cdecl, dynlib: gdklib, + importc: "gdk_get_default_display".} +proc GDK_TYPE_SCREEN*(): GType +proc GDK_SCREEN*(anObject: Pointer): PGdkScreen +proc GDK_SCREEN_CLASS*(klass: Pointer): PGdkScreenClass +proc GDK_IS_SCREEN*(anObject: Pointer): bool +proc GDK_IS_SCREEN_CLASS*(klass: Pointer): bool +proc GDK_SCREEN_GET_CLASS*(obj: Pointer): PGdkScreenClass +proc gdk_screen_get_default_colormap*(screen: PGdkScreen): PGdkColormap{.cdecl, + dynlib: gdklib, importc: "gdk_screen_get_default_colormap".} +proc gdk_screen_set_default_colormap*(screen: PGdkScreen, colormap: PGdkColormap){. + cdecl, dynlib: gdklib, importc: "gdk_screen_set_default_colormap".} +proc gdk_screen_get_system_colormap*(screen: PGdkScreen): PGdkColormap{.cdecl, + dynlib: gdklib, importc: "gdk_screen_get_system_colormap".} +proc gdk_screen_get_system_visual*(screen: PGdkScreen): PGdkVisual{.cdecl, + dynlib: gdklib, importc: "gdk_screen_get_system_visual".} +proc gdk_screen_get_rgb_colormap*(screen: PGdkScreen): PGdkColormap{.cdecl, + dynlib: gdklib, importc: "gdk_screen_get_rgb_colormap".} +proc gdk_screen_get_rgb_visual*(screen: PGdkScreen): PGdkVisual{.cdecl, + dynlib: gdklib, importc: "gdk_screen_get_rgb_visual".} +proc gdk_screen_get_root_window*(screen: PGdkScreen): PGdkWindow{.cdecl, + dynlib: gdklib, importc: "gdk_screen_get_root_window".} +proc gdk_screen_get_display*(screen: PGdkScreen): PGdkDisplay{.cdecl, + dynlib: gdklib, importc: "gdk_screen_get_display".} +proc gdk_screen_get_number*(screen: PGdkScreen): gint{.cdecl, dynlib: gdklib, + importc: "gdk_screen_get_number".} +proc gdk_screen_get_window_at_pointer*(screen: PGdkScreen, win_x: Pgint, + win_y: Pgint): PGdkWindow{.cdecl, + dynlib: gdklib, importc: "gdk_screen_get_window_at_pointer".} +proc gdk_screen_get_width*(screen: PGdkScreen): gint{.cdecl, dynlib: gdklib, + importc: "gdk_screen_get_width".} +proc gdk_screen_get_height*(screen: PGdkScreen): gint{.cdecl, dynlib: gdklib, + importc: "gdk_screen_get_height".} +proc gdk_screen_get_width_mm*(screen: PGdkScreen): gint{.cdecl, dynlib: gdklib, + importc: "gdk_screen_get_width_mm".} +proc gdk_screen_get_height_mm*(screen: PGdkScreen): gint{.cdecl, dynlib: gdklib, + importc: "gdk_screen_get_height_mm".} +proc gdk_screen_close*(screen: PGdkScreen){.cdecl, dynlib: gdklib, + importc: "gdk_screen_close".} +proc gdk_screen_list_visuals*(screen: PGdkScreen): PGList{.cdecl, + dynlib: gdklib, importc: "gdk_screen_list_visuals".} +proc gdk_screen_get_toplevel_windows*(screen: PGdkScreen): PGList{.cdecl, + dynlib: gdklib, importc: "gdk_screen_get_toplevel_windows".} +proc gdk_screen_get_n_monitors*(screen: PGdkScreen): gint{.cdecl, + dynlib: gdklib, importc: "gdk_screen_get_n_monitors".} +proc gdk_screen_get_monitor_geometry*(screen: PGdkScreen, monitor_num: gint, + dest: PGdkRectangle){.cdecl, + dynlib: gdklib, importc: "gdk_screen_get_monitor_geometry".} +proc gdk_screen_get_monitor_at_point*(screen: PGdkScreen, x: gint, y: gint): gint{. + cdecl, dynlib: gdklib, importc: "gdk_screen_get_monitor_at_point".} +proc gdk_screen_get_monitor_at_window*(screen: PGdkScreen, window: PGdkWindow): gint{. + cdecl, dynlib: gdklib, importc: "gdk_screen_get_monitor_at_window".} +proc gdk_screen_broadcast_client_message*(screen: PGdkScreen, event: PGdkEvent){. + cdecl, dynlib: gdklib, importc: "gdk_screen_broadcast_client_message".} +proc gdk_get_default_screen*(): PGdkScreen{.cdecl, dynlib: gdklib, + importc: "gdk_get_default_screen".} +proc gdk_screen_get_setting*(screen: PGdkScreen, name: cstring, value: PGValue): gboolean{. + cdecl, dynlib: gdklib, importc: "gdk_screen_get_setting".} +proc GDK_SELECTION_PRIMARY*(): TGdkAtom +proc GDK_SELECTION_SECONDARY*(): TGdkAtom +proc GDK_SELECTION_CLIPBOARD*(): TGdkAtom +proc GDK_TARGET_BITMAP*(): TGdkAtom +proc GDK_TARGET_COLORMAP*(): TGdkAtom +proc GDK_TARGET_DRAWABLE*(): TGdkAtom +proc GDK_TARGET_PIXMAP*(): TGdkAtom +proc GDK_TARGET_STRING*(): TGdkAtom +proc GDK_SELECTION_TYPE_ATOM*(): TGdkAtom +proc GDK_SELECTION_TYPE_BITMAP*(): TGdkAtom +proc GDK_SELECTION_TYPE_COLORMAP*(): TGdkAtom +proc GDK_SELECTION_TYPE_DRAWABLE*(): TGdkAtom +proc GDK_SELECTION_TYPE_INTEGER*(): TGdkAtom +proc GDK_SELECTION_TYPE_PIXMAP*(): TGdkAtom +proc GDK_SELECTION_TYPE_WINDOW*(): TGdkAtom +proc GDK_SELECTION_TYPE_STRING*(): TGdkAtom +proc gdk_selection_owner_set_for_display*(display: PGdkDisplay, + owner: PGdkWindow, selection: TGdkAtom, time: guint32, send_event: gboolean): gboolean{. + cdecl, dynlib: gdklib, importc: "gdk_selection_owner_set_for_display".} +proc gdk_selection_owner_get_for_display*(display: PGdkDisplay, + selection: TGdkAtom): PGdkWindow{.cdecl, dynlib: gdklib, importc: "gdk_selection_owner_get_for_display".} +proc gdk_selection_convert*(requestor: PGdkWindow, selection: TGdkAtom, + target: TGdkAtom, time: guint32){.cdecl, + dynlib: gdklib, importc: "gdk_selection_convert".} +proc gdk_selection_property_get*(requestor: PGdkWindow, data: PPguchar, + prop_type: PGdkAtom, prop_format: Pgint): gboolean{. + cdecl, dynlib: gdklib, importc: "gdk_selection_property_get".} +proc gdk_selection_send_notify_for_display*(display: PGdkDisplay, + requestor: guint32, selection: TGdkAtom, target: TGdkAtom, + `property`: TGdkAtom, time: guint32){.cdecl, dynlib: gdklib, + importc: "gdk_selection_send_notify_for_display".} +const + GDK_CURRENT_TIME* = 0 + GDK_PARENT_RELATIVE* = 1 + GDK_OK* = 0 + GDK_ERROR* = - (1) + GDK_ERROR_PARAM* = - (2) + GDK_ERROR_FILE* = - (3) + GDK_ERROR_MEM* = - (4) + GDK_SHIFT_MASK* = 1 shl 0 + GDK_LOCK_MASK* = 1 shl 1 + GDK_CONTROL_MASK* = 1 shl 2 + GDK_MOD1_MASK* = 1 shl 3 + GDK_MOD2_MASK* = 1 shl 4 + GDK_MOD3_MASK* = 1 shl 5 + GDK_MOD4_MASK* = 1 shl 6 + GDK_MOD5_MASK* = 1 shl 7 + GDK_BUTTON1_MASK* = 1 shl 8 + GDK_BUTTON2_MASK* = 1 shl 9 + GDK_BUTTON3_MASK* = 1 shl 10 + GDK_BUTTON4_MASK* = 1 shl 11 + GDK_BUTTON5_MASK* = 1 shl 12 + GDK_RELEASE_MASK* = 1 shl 30 + GDK_MODIFIER_MASK* = ord(GDK_RELEASE_MASK) or 0x00001FFF + GDK_INPUT_READ* = 1 shl 0 + GDK_INPUT_WRITE* = 1 shl 1 + GDK_INPUT_EXCEPTION* = 1 shl 2 + GDK_GRAB_SUCCESS* = 0 + GDK_GRAB_ALREADY_GRABBED* = 1 + GDK_GRAB_INVALID_TIME* = 2 + GDK_GRAB_NOT_VIEWABLE* = 3 + GDK_GRAB_FROZEN* = 4 + +proc GDK_ATOM_TO_POINTER*(atom: TGdkAtom): Pointer +proc GDK_POINTER_TO_ATOM*(p: Pointer): TGdkAtom +proc `GDK_MAKE_ATOM`*(val: guint): TGdkAtom +proc GDK_NONE*(): TGdkAtom +proc GDK_TYPE_VISUAL*(): GType +proc GDK_VISUAL*(anObject: Pointer): PGdkVisual +proc GDK_VISUAL_CLASS*(klass: Pointer): PGdkVisualClass +proc GDK_IS_VISUAL*(anObject: Pointer): bool +proc GDK_IS_VISUAL_CLASS*(klass: Pointer): bool +proc GDK_VISUAL_GET_CLASS*(obj: Pointer): PGdkVisualClass +proc gdk_visual_get_type*(): GType{.cdecl, dynlib: gdklib, + importc: "gdk_visual_get_type".} +const + GDK_WA_TITLE* = 1 shl 1 + GDK_WA_X* = 1 shl 2 + GDK_WA_Y* = 1 shl 3 + GDK_WA_CURSOR* = 1 shl 4 + GDK_WA_COLORMAP* = 1 shl 5 + GDK_WA_VISUAL* = 1 shl 6 + GDK_WA_WMCLASS* = 1 shl 7 + GDK_WA_NOREDIR* = 1 shl 8 + GDK_HINT_POS* = 1 shl 0 + GDK_HINT_MIN_SIZE* = 1 shl 1 + GDK_HINT_MAX_SIZE* = 1 shl 2 + GDK_HINT_BASE_SIZE* = 1 shl 3 + GDK_HINT_ASPECT* = 1 shl 4 + GDK_HINT_RESIZE_INC* = 1 shl 5 + GDK_HINT_WIN_GRAVITY* = 1 shl 6 + GDK_HINT_USER_POS* = 1 shl 7 + GDK_HINT_USER_SIZE* = 1 shl 8 + GDK_DECOR_ALL* = 1 shl 0 + GDK_DECOR_BORDER* = 1 shl 1 + GDK_DECOR_RESIZEH* = 1 shl 2 + GDK_DECOR_TITLE* = 1 shl 3 + GDK_DECOR_MENU* = 1 shl 4 + GDK_DECOR_MINIMIZE* = 1 shl 5 + GDK_DECOR_MAXIMIZE* = 1 shl 6 + GDK_FUNC_ALL* = 1 shl 0 + GDK_FUNC_RESIZE* = 1 shl 1 + GDK_FUNC_MOVE* = 1 shl 2 + GDK_FUNC_MINIMIZE* = 1 shl 3 + GDK_FUNC_MAXIMIZE* = 1 shl 4 + GDK_FUNC_CLOSE* = 1 shl 5 + GDK_GRAVITY_NORTH_WEST* = 1 + GDK_GRAVITY_NORTH* = 2 + GDK_GRAVITY_NORTH_EAST* = 3 + GDK_GRAVITY_WEST* = 4 + GDK_GRAVITY_CENTER* = 5 + GDK_GRAVITY_EAST* = 6 + GDK_GRAVITY_SOUTH_WEST* = 7 + GDK_GRAVITY_SOUTH* = 8 + GDK_GRAVITY_SOUTH_EAST* = 9 + GDK_GRAVITY_STATIC* = 10 + +proc GDK_TYPE_WINDOW*(): GType +proc GDK_WINDOW*(anObject: Pointer): PGdkWindow +proc GDK_WINDOW_CLASS*(klass: Pointer): PGdkWindowObjectClass +proc GDK_IS_WINDOW*(anObject: Pointer): bool +proc GDK_IS_WINDOW_CLASS*(klass: Pointer): bool +proc GDK_WINDOW_GET_CLASS*(obj: Pointer): PGdkWindowObjectClass +proc GDK_WINDOW_OBJECT*(anObject: Pointer): PGdkWindowObject +const + bm_TGdkWindowObject_guffaw_gravity* = 0x00000001'i16 + bp_TGdkWindowObject_guffaw_gravity* = 0'i16 + bm_TGdkWindowObject_input_only* = 0x00000002'i16 + bp_TGdkWindowObject_input_only* = 1'i16 + bm_TGdkWindowObject_modal_hint* = 0x00000004'i16 + bp_TGdkWindowObject_modal_hint* = 2'i16 + bm_TGdkWindowObject_destroyed* = 0x00000018'i16 + bp_TGdkWindowObject_destroyed* = 3'i16 + +proc GdkWindowObject_guffaw_gravity*(a: var TGdkWindowObject): guint +proc GdkWindowObject_set_guffaw_gravity*(a: var TGdkWindowObject, + `guffaw_gravity`: guint) +proc GdkWindowObject_input_only*(a: var TGdkWindowObject): guint +proc GdkWindowObject_set_input_only*(a: var TGdkWindowObject, + `input_only`: guint) +proc GdkWindowObject_modal_hint*(a: var TGdkWindowObject): guint +proc GdkWindowObject_set_modal_hint*(a: var TGdkWindowObject, + `modal_hint`: guint) +proc GdkWindowObject_destroyed*(a: var TGdkWindowObject): guint +proc GdkWindowObject_set_destroyed*(a: var TGdkWindowObject, `destroyed`: guint) +proc gdk_window_object_get_type*(): GType{.cdecl, dynlib: gdklib, + importc: "gdk_window_object_get_type".} +proc gdk_window_new*(parent: PGdkWindow, attributes: PGdkWindowAttr, + attributes_mask: gint): PGdkWindow{.cdecl, dynlib: gdklib, + importc: "gdk_window_new".} +proc gdk_window_destroy*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_destroy".} +proc gdk_window_get_window_type*(window: PGdkWindow): TGdkWindowType{.cdecl, + dynlib: gdklib, importc: "gdk_window_get_window_type".} +proc gdk_window_at_pointer*(win_x: Pgint, win_y: Pgint): PGdkWindow{.cdecl, + dynlib: gdklib, importc: "gdk_window_at_pointer".} +proc gdk_window_show*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_show".} +proc gdk_window_hide*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_hide".} +proc gdk_window_withdraw*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_withdraw".} +proc gdk_window_show_unraised*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_show_unraised".} +proc gdk_window_move*(window: PGdkWindow, x: gint, y: gint){.cdecl, + dynlib: gdklib, importc: "gdk_window_move".} +proc gdk_window_resize*(window: PGdkWindow, width: gint, height: gint){.cdecl, + dynlib: gdklib, importc: "gdk_window_resize".} +proc gdk_window_move_resize*(window: PGdkWindow, x: gint, y: gint, width: gint, + height: gint){.cdecl, dynlib: gdklib, + importc: "gdk_window_move_resize".} +proc gdk_window_reparent*(window: PGdkWindow, new_parent: PGdkWindow, x: gint, + y: gint){.cdecl, dynlib: gdklib, + importc: "gdk_window_reparent".} +proc gdk_window_clear*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_clear".} +proc gdk_window_clear_area*(window: PGdkWindow, x: gint, y: gint, width: gint, + height: gint){.cdecl, dynlib: gdklib, + importc: "gdk_window_clear_area".} +proc gdk_window_clear_area_e*(window: PGdkWindow, x: gint, y: gint, width: gint, + height: gint){.cdecl, dynlib: gdklib, + importc: "gdk_window_clear_area_e".} +proc gdk_window_raise*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_raise".} +proc gdk_window_lower*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_lower".} +proc gdk_window_focus*(window: PGdkWindow, timestamp: guint32){.cdecl, + dynlib: gdklib, importc: "gdk_window_focus".} +proc gdk_window_set_user_data*(window: PGdkWindow, user_data: gpointer){.cdecl, + dynlib: gdklib, importc: "gdk_window_set_user_data".} +proc gdk_window_set_override_redirect*(window: PGdkWindow, + override_redirect: gboolean){.cdecl, + dynlib: gdklib, importc: "gdk_window_set_override_redirect".} +proc gdk_window_add_filter*(window: PGdkWindow, `function`: TGdkFilterFunc, + data: gpointer){.cdecl, dynlib: gdklib, + importc: "gdk_window_add_filter".} +proc gdk_window_remove_filter*(window: PGdkWindow, `function`: TGdkFilterFunc, + data: gpointer){.cdecl, dynlib: gdklib, + importc: "gdk_window_remove_filter".} +proc gdk_window_scroll*(window: PGdkWindow, dx: gint, dy: gint){.cdecl, + dynlib: gdklib, importc: "gdk_window_scroll".} +proc gdk_window_shape_combine_mask*(window: PGdkWindow, mask: PGdkBitmap, + x: gint, y: gint){.cdecl, dynlib: gdklib, + importc: "gdk_window_shape_combine_mask".} +proc gdk_window_shape_combine_region*(window: PGdkWindow, + shape_region: PGdkRegion, offset_x: gint, + offset_y: gint){.cdecl, dynlib: gdklib, + importc: "gdk_window_shape_combine_region".} +proc gdk_window_set_child_shapes*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_set_child_shapes".} +proc gdk_window_merge_child_shapes*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_merge_child_shapes".} +proc gdk_window_is_visible*(window: PGdkWindow): gboolean{.cdecl, + dynlib: gdklib, importc: "gdk_window_is_visible".} +proc gdk_window_is_viewable*(window: PGdkWindow): gboolean{.cdecl, + dynlib: gdklib, importc: "gdk_window_is_viewable".} +proc gdk_window_get_state*(window: PGdkWindow): TGdkWindowState{.cdecl, + dynlib: gdklib, importc: "gdk_window_get_state".} +proc gdk_window_set_static_gravities*(window: PGdkWindow, use_static: gboolean): gboolean{. + cdecl, dynlib: gdklib, importc: "gdk_window_set_static_gravities".} +proc gdk_window_foreign_new_for_display*(display: PGdkDisplay, + anid: TGdkNativeWindow): PGdkWindow{.cdecl, dynlib: gdklib, + importc: "gdk_window_foreign_new_for_display".} +proc gdk_window_lookup_for_display*(display: PGdkDisplay, anid: TGdkNativeWindow): PGdkWindow{. + cdecl, dynlib: gdklib, importc: "gdk_window_lookup_for_display".} +proc gdk_window_set_type_hint*(window: PGdkWindow, hint: TGdkWindowTypeHint){. + cdecl, dynlib: gdklib, importc: "gdk_window_set_type_hint".} +proc gdk_window_set_modal_hint*(window: PGdkWindow, modal: gboolean){.cdecl, + dynlib: gdklib, importc: "gdk_window_set_modal_hint".} +proc gdk_window_set_geometry_hints*(window: PGdkWindow, geometry: PGdkGeometry, + geom_mask: TGdkWindowHints){.cdecl, + dynlib: gdklib, importc: "gdk_window_set_geometry_hints".} +proc gdk_set_sm_client_id*(sm_client_id: cstring){.cdecl, dynlib: gdklib, + importc: "gdk_set_sm_client_id".} +proc gdk_window_begin_paint_rect*(window: PGdkWindow, rectangle: PGdkRectangle){. + cdecl, dynlib: gdklib, importc: "gdk_window_begin_paint_rect".} +proc gdk_window_begin_paint_region*(window: PGdkWindow, region: PGdkRegion){. + cdecl, dynlib: gdklib, importc: "gdk_window_begin_paint_region".} +proc gdk_window_end_paint*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_end_paint".} +proc gdk_window_set_title*(window: PGdkWindow, title: cstring){.cdecl, + dynlib: gdklib, importc: "gdk_window_set_title".} +proc gdk_window_set_role*(window: PGdkWindow, role: cstring){.cdecl, + dynlib: gdklib, importc: "gdk_window_set_role".} +proc gdk_window_set_transient_for*(window: PGdkWindow, parent: PGdkWindow){. + cdecl, dynlib: gdklib, importc: "gdk_window_set_transient_for".} +proc gdk_window_set_background*(window: PGdkWindow, color: PGdkColor){.cdecl, + dynlib: gdklib, importc: "gdk_window_set_background".} +proc gdk_window_set_back_pixmap*(window: PGdkWindow, pixmap: PGdkPixmap, + parent_relative: gboolean){.cdecl, + dynlib: gdklib, importc: "gdk_window_set_back_pixmap".} +proc gdk_window_set_cursor*(window: PGdkWindow, cursor: PGdkCursor){.cdecl, + dynlib: gdklib, importc: "gdk_window_set_cursor".} +proc gdk_window_get_user_data*(window: PGdkWindow, data: gpointer){.cdecl, + dynlib: gdklib, importc: "gdk_window_get_user_data".} +proc gdk_window_get_geometry*(window: PGdkWindow, x: Pgint, y: Pgint, + width: Pgint, height: Pgint, depth: Pgint){.cdecl, + dynlib: gdklib, importc: "gdk_window_get_geometry".} +proc gdk_window_get_position*(window: PGdkWindow, x: Pgint, y: Pgint){.cdecl, + dynlib: gdklib, importc: "gdk_window_get_position".} +proc gdk_window_get_origin*(window: PGdkWindow, x: Pgint, y: Pgint): gint{. + cdecl, dynlib: gdklib, importc: "gdk_window_get_origin".} +proc gdk_window_get_root_origin*(window: PGdkWindow, x: Pgint, y: Pgint){.cdecl, + dynlib: gdklib, importc: "gdk_window_get_root_origin".} +proc gdk_window_get_frame_extents*(window: PGdkWindow, rect: PGdkRectangle){. + cdecl, dynlib: gdklib, importc: "gdk_window_get_frame_extents".} +proc gdk_window_get_pointer*(window: PGdkWindow, x: Pgint, y: Pgint, + mask: PGdkModifierType): PGdkWindow{.cdecl, + dynlib: gdklib, importc: "gdk_window_get_pointer".} +proc gdk_window_get_parent*(window: PGdkWindow): PGdkWindow{.cdecl, + dynlib: gdklib, importc: "gdk_window_get_parent".} +proc gdk_window_get_toplevel*(window: PGdkWindow): PGdkWindow{.cdecl, + dynlib: gdklib, importc: "gdk_window_get_toplevel".} +proc gdk_window_get_children*(window: PGdkWindow): PGList{.cdecl, + dynlib: gdklib, importc: "gdk_window_get_children".} +proc gdk_window_peek_children*(window: PGdkWindow): PGList{.cdecl, + dynlib: gdklib, importc: "gdk_window_peek_children".} +proc gdk_window_get_events*(window: PGdkWindow): TGdkEventMask{.cdecl, + dynlib: gdklib, importc: "gdk_window_get_events".} +proc gdk_window_set_events*(window: PGdkWindow, event_mask: TGdkEventMask){. + cdecl, dynlib: gdklib, importc: "gdk_window_set_events".} +proc gdk_window_set_icon_list*(window: PGdkWindow, pixbufs: PGList){.cdecl, + dynlib: gdklib, importc: "gdk_window_set_icon_list".} +proc gdk_window_set_icon*(window: PGdkWindow, icon_window: PGdkWindow, + pixmap: PGdkPixmap, mask: PGdkBitmap){.cdecl, + dynlib: gdklib, importc: "gdk_window_set_icon".} +proc gdk_window_set_icon_name*(window: PGdkWindow, name: cstring){.cdecl, + dynlib: gdklib, importc: "gdk_window_set_icon_name".} +proc gdk_window_set_group*(window: PGdkWindow, leader: PGdkWindow){.cdecl, + dynlib: gdklib, importc: "gdk_window_set_group".} +proc gdk_window_set_decorations*(window: PGdkWindow, + decorations: TGdkWMDecoration){.cdecl, + dynlib: gdklib, importc: "gdk_window_set_decorations".} +proc gdk_window_get_decorations*(window: PGdkWindow, + decorations: PGdkWMDecoration): gboolean{. + cdecl, dynlib: gdklib, importc: "gdk_window_get_decorations".} +proc gdk_window_set_functions*(window: PGdkWindow, functions: TGdkWMFunction){. + cdecl, dynlib: gdklib, importc: "gdk_window_set_functions".} +proc gdk_window_iconify*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_iconify".} +proc gdk_window_deiconify*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_deiconify".} +proc gdk_window_stick*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_stick".} +proc gdk_window_unstick*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_unstick".} +proc gdk_window_maximize*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_maximize".} +proc gdk_window_unmaximize*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_unmaximize".} +proc gdk_window_register_dnd*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_register_dnd".} +proc gdk_window_begin_resize_drag*(window: PGdkWindow, edge: TGdkWindowEdge, + button: gint, root_x: gint, root_y: gint, + timestamp: guint32){.cdecl, dynlib: gdklib, + importc: "gdk_window_begin_resize_drag".} +proc gdk_window_begin_move_drag*(window: PGdkWindow, button: gint, root_x: gint, + root_y: gint, timestamp: guint32){.cdecl, + dynlib: gdklib, importc: "gdk_window_begin_move_drag".} +proc gdk_window_invalidate_rect*(window: PGdkWindow, rect: PGdkRectangle, + invalidate_children: gboolean){.cdecl, + dynlib: gdklib, importc: "gdk_window_invalidate_rect".} +proc gdk_window_invalidate_region*(window: PGdkWindow, region: PGdkRegion, + invalidate_children: gboolean){.cdecl, + dynlib: gdklib, importc: "gdk_window_invalidate_region".} +proc gdk_window_invalidate_maybe_recurse*(window: PGdkWindow, + region: PGdkRegion, + child_func: gdk_window_invalidate_maybe_recurse_child_func, + user_data: gpointer){.cdecl, dynlib: gdklib, + importc: "gdk_window_invalidate_maybe_recurse".} +proc gdk_window_get_update_area*(window: PGdkWindow): PGdkRegion{.cdecl, + dynlib: gdklib, importc: "gdk_window_get_update_area".} +proc gdk_window_freeze_updates*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_freeze_updates".} +proc gdk_window_thaw_updates*(window: PGdkWindow){.cdecl, dynlib: gdklib, + importc: "gdk_window_thaw_updates".} +proc gdk_window_process_all_updates*(){.cdecl, dynlib: gdklib, importc: "gdk_window_process_all_updates".} +proc gdk_window_process_updates*(window: PGdkWindow, update_children: gboolean){. + cdecl, dynlib: gdklib, importc: "gdk_window_process_updates".} +proc gdk_window_set_debug_updates*(setting: gboolean){.cdecl, dynlib: gdklib, + importc: "gdk_window_set_debug_updates".} +proc gdk_window_constrain_size*(geometry: PGdkGeometry, flags: guint, + width: gint, height: gint, new_width: Pgint, + new_height: Pgint){.cdecl, dynlib: gdklib, + importc: "gdk_window_constrain_size".} +proc gdk_window_get_internal_paint_info*(window: PGdkWindow, + e: var PGdkDrawable, x_offset: Pgint, y_offset: Pgint){.cdecl, + dynlib: gdklib, importc: "gdk_window_get_internal_paint_info".} +proc gdk_set_pointer_hooks*(new_hooks: PGdkPointerHooks): PGdkPointerHooks{. + cdecl, dynlib: gdklib, importc: "gdk_set_pointer_hooks".} +proc gdk_get_default_root_window*(): PGdkWindow{.cdecl, dynlib: gdklib, + importc: "gdk_get_default_root_window".} +proc gdk_parse_args*(argc: Pgint, v: var PPgchar){.cdecl, dynlib: gdklib, + importc: "gdk_parse_args".} +proc gdk_init*(argc: Pgint, v: var PPgchar){.cdecl, dynlib: gdklib, + importc: "gdk_init".} +proc gdk_init_check*(argc: Pgint, v: var PPgchar): gboolean{.cdecl, + dynlib: gdklib, importc: "gdk_init_check".} +when not defined(GDK_DISABLE_DEPRECATED): + proc gdk_exit*(error_code: gint){.cdecl, dynlib: gdklib, importc: "gdk_exit".} +proc gdk_set_locale*(): cstring{.cdecl, dynlib: gdklib, importc: "gdk_set_locale".} +proc gdk_get_program_class*(): cstring{.cdecl, dynlib: gdklib, + importc: "gdk_get_program_class".} +proc gdk_set_program_class*(program_class: cstring){.cdecl, dynlib: gdklib, + importc: "gdk_set_program_class".} +proc gdk_error_trap_push*(){.cdecl, dynlib: gdklib, + importc: "gdk_error_trap_push".} +proc gdk_error_trap_pop*(): gint{.cdecl, dynlib: gdklib, + importc: "gdk_error_trap_pop".} +when not defined(GDK_DISABLE_DEPRECATED): + proc gdk_set_use_xshm*(use_xshm: gboolean){.cdecl, dynlib: gdklib, + importc: "gdk_set_use_xshm".} + proc gdk_get_use_xshm*(): gboolean{.cdecl, dynlib: gdklib, + importc: "gdk_get_use_xshm".} +proc gdk_get_display*(): cstring{.cdecl, dynlib: gdklib, + importc: "gdk_get_display".} +proc gdk_get_display_arg_name*(): cstring{.cdecl, dynlib: gdklib, + importc: "gdk_get_display_arg_name".} +when not defined(GDK_DISABLE_DEPRECATED): + proc gdk_input_add_full*(source: gint, condition: TGdkInputCondition, + `function`: TGdkInputFunction, data: gpointer, + destroy: TGdkDestroyNotify): gint{.cdecl, + dynlib: gdklib, importc: "gdk_input_add_full".} + proc gdk_input_add*(source: gint, condition: TGdkInputCondition, + `function`: TGdkInputFunction, data: gpointer): gint{. + cdecl, dynlib: gdklib, importc: "gdk_input_add".} + proc gdk_input_remove*(tag: gint){.cdecl, dynlib: gdklib, + importc: "gdk_input_remove".} +proc gdk_pointer_grab*(window: PGdkWindow, owner_events: gboolean, + event_mask: TGdkEventMask, confine_to: PGdkWindow, + cursor: PGdkCursor, time: guint32): TGdkGrabStatus{. + cdecl, dynlib: gdklib, importc: "gdk_pointer_grab".} +proc gdk_keyboard_grab*(window: PGdkWindow, owner_events: gboolean, + time: guint32): TGdkGrabStatus{.cdecl, dynlib: gdklib, + importc: "gdk_keyboard_grab".} +when not defined(GDK_MULTIHEAD_SAFE): + proc gdk_pointer_ungrab*(time: guint32){.cdecl, dynlib: gdklib, + importc: "gdk_pointer_ungrab".} + proc gdk_keyboard_ungrab*(time: guint32){.cdecl, dynlib: gdklib, + importc: "gdk_keyboard_ungrab".} + proc gdk_pointer_is_grabbed*(): gboolean{.cdecl, dynlib: gdklib, + importc: "gdk_pointer_is_grabbed".} + proc gdk_screen_width*(): gint{.cdecl, dynlib: gdklib, + importc: "gdk_screen_width".} + proc gdk_screen_height*(): gint{.cdecl, dynlib: gdklib, + importc: "gdk_screen_height".} + proc gdk_screen_width_mm*(): gint{.cdecl, dynlib: gdklib, + importc: "gdk_screen_width_mm".} + proc gdk_screen_height_mm*(): gint{.cdecl, dynlib: gdklib, + importc: "gdk_screen_height_mm".} + proc gdk_beep*(){.cdecl, dynlib: gdklib, importc: "gdk_beep".} +proc gdk_flush*(){.cdecl, dynlib: gdklib, importc: "gdk_flush".} +when not defined(GDK_MULTIHEAD_SAFE): + proc gdk_set_double_click_time*(msec: guint){.cdecl, dynlib: gdklib, + importc: "gdk_set_double_click_time".} +proc gdk_rectangle_intersect*(src1: PGdkRectangle, src2: PGdkRectangle, + dest: PGdkRectangle): gboolean{.cdecl, + dynlib: gdklib, importc: "gdk_rectangle_intersect".} +proc gdk_rectangle_union*(src1: PGdkRectangle, src2: PGdkRectangle, + dest: PGdkRectangle){.cdecl, dynlib: gdklib, + importc: "gdk_rectangle_union".} +proc gdk_rectangle_get_type*(): GType{.cdecl, dynlib: gdklib, + importc: "gdk_rectangle_get_type".} +proc GDK_TYPE_RECTANGLE*(): GType +proc gdk_wcstombs*(src: PGdkWChar): cstring{.cdecl, dynlib: gdklib, + importc: "gdk_wcstombs".} +proc gdk_mbstowcs*(dest: PGdkWChar, src: cstring, dest_max: gint): gint{.cdecl, + dynlib: gdklib, importc: "gdk_mbstowcs".} +when not defined(GDK_MULTIHEAD_SAFE): + proc gdk_event_send_client_message*(event: PGdkEvent, xid: guint32): gboolean{. + cdecl, dynlib: gdklib, importc: "gdk_event_send_client_message".} + proc gdk_event_send_clientmessage_toall*(event: PGdkEvent){.cdecl, + dynlib: gdklib, importc: "gdk_event_send_clientmessage_toall".} +proc gdk_event_send_client_message_for_display*(display: PGdkDisplay, + event: PGdkEvent, xid: guint32): gboolean{.cdecl, dynlib: gdklib, + importc: "gdk_event_send_client_message_for_display".} +proc gdk_threads_enter*(){.cdecl, dynlib: gdklib, importc: "gdk_threads_enter".} +proc gdk_threads_leave*(){.cdecl, dynlib: gdklib, importc: "gdk_threads_leave".} +proc gdk_threads_init*(){.cdecl, dynlib: gdklib, importc: "gdk_threads_init".} + +proc GDK_TYPE_RECTANGLE*(): GType = + result = gdk_rectangle_get_type() + +proc GDK_TYPE_COLORMAP*(): GType = + result = gdk_colormap_get_type() + +proc GDK_COLORMAP*(anObject: pointer): PGdkColormap = + result = cast[PGdkColormap](G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_COLORMAP())) + +proc GDK_COLORMAP_CLASS*(klass: pointer): PGdkColormapClass = + result = cast[PGdkColormapClass](G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_COLORMAP())) + +proc GDK_IS_COLORMAP*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_COLORMAP()) + +proc GDK_IS_COLORMAP_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_COLORMAP()) + +proc GDK_COLORMAP_GET_CLASS*(obj: pointer): PGdkColormapClass = + result = cast[PGdkColormapClass](G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_COLORMAP())) + +proc GDK_TYPE_COLOR*(): GType = + result = gdk_color_get_type() + +proc gdk_cursor_destroy*(cursor: PGdkCursor) = + gdk_cursor_unref(cursor) + +proc GDK_TYPE_CURSOR*(): GType = + result = gdk_cursor_get_type() + +proc GDK_TYPE_DRAG_CONTEXT*(): GType = + result = gdk_drag_context_get_type() + +proc GDK_DRAG_CONTEXT*(anObject: Pointer): PGdkDragContext = + result = cast[PGdkDragContext](G_TYPE_CHECK_INSTANCE_CAST(anObject, + GDK_TYPE_DRAG_CONTEXT())) + +proc GDK_DRAG_CONTEXT_CLASS*(klass: Pointer): PGdkDragContextClass = + result = cast[PGdkDragContextClass](G_TYPE_CHECK_CLASS_CAST(klass, + GDK_TYPE_DRAG_CONTEXT())) + +proc GDK_IS_DRAG_CONTEXT*(anObject: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_DRAG_CONTEXT()) + +proc GDK_IS_DRAG_CONTEXT_CLASS*(klass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_DRAG_CONTEXT()) + +proc GDK_DRAG_CONTEXT_GET_CLASS*(obj: Pointer): PGdkDragContextClass = + result = cast[PGdkDragContextClass](G_TYPE_INSTANCE_GET_CLASS(obj, + GDK_TYPE_DRAG_CONTEXT())) + +proc gdkregion_EXTENTCHECK*(r1, r2: PGdkRegionBox): bool = + result = ((r1.x2) > r2.x1) and ((r1.x1) < r2.x2) and + ((r1.y2) > r2.y1) and ((r1.y1) < r2.y2) + +proc gdkregion_EXTENTS*(r: PGdkRegionBox, idRect: PGdkRegion) = + if ((r.x1) < idRect.extents.x1): + idRect.extents.x1 = r.x1 + if (r.y1) < idRect.extents.y1: + idRect.extents.y1 = r.y1 + if (r.x2) > idRect.extents.x2: + idRect.extents.x2 = r.x2 + +proc gdkregion_MEMCHECK*(reg: PGdkRegion, ARect, firstrect: var PGdkRegionBox): bool = + assert(false) # to implement + +proc gdkregion_CHECK_PREVIOUS*(Reg: PGdkRegion, R: PGdkRegionBox, + Rx1, Ry1, Rx2, Ry2: gint): bool = + assert(false) # to implement + +proc gdkregion_ADDRECT*(reg: PGdkRegion, r: PGdkRegionBox, + rx1, ry1, rx2, ry2: gint) = + if (((rx1) < rx2) and ((ry1) < ry2) and + gdkregion_CHECK_PREVIOUS(reg, r, rx1, ry1, rx2, ry2)): + r.x1 = rx1 + r.y1 = ry1 + r.x2 = rx2 + r.y2 = ry2 + +proc gdkregion_ADDRECTNOX*(reg: PGdkRegion, r: PGdkRegionBox, + rx1, ry1, rx2, ry2: gint) = + if (((rx1) < rx2) and ((ry1) < ry2) and + gdkregion_CHECK_PREVIOUS(reg, r, rx1, ry1, rx2, ry2)): + r.x1 = rx1 + r.y1 = ry1 + r.x2 = rx2 + r.y2 = ry2 + inc(reg . numRects) + +proc gdkregion_EMPTY_REGION*(pReg: PGdkRegion): bool = + result = pReg.numRects == 0'i32 + +proc gdkregion_REGION_NOT_EMPTY*(pReg: PGdkRegion): bool = + result = pReg.numRects != 0'i32 + +proc gdkregion_INBOX*(r: TGdkRegionBox, x, y: gint): bool = + result = ((((r.x2) > x) and ((r.x1) <= x)) and + ((r.y2) > y)) and ((r.y1) <= y) + +proc GDK_TYPE_DRAWABLE*(): GType = + result = gdk_drawable_get_type() + +proc GDK_DRAWABLE*(anObject: Pointer): PGdkDrawable = + result = cast[PGdkDrawable](G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_DRAWABLE())) + +proc GDK_DRAWABLE_CLASS*(klass: Pointer): PGdkDrawableClass = + result = cast[PGdkDrawableClass](G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_DRAWABLE())) + +proc GDK_IS_DRAWABLE*(anObject: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_DRAWABLE()) + +proc GDK_IS_DRAWABLE_CLASS*(klass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_DRAWABLE()) + +proc GDK_DRAWABLE_GET_CLASS*(obj: Pointer): PGdkDrawableClass = + result = cast[PGdkDrawableClass](G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_DRAWABLE())) + +proc gdk_draw_pixmap*(drawable: PGdkDrawable, gc: PGdkGC, src: PGdkDrawable, + xsrc: gint, ysrc: gint, xdest: gint, ydest: gint, + width: gint, height: gint) = + gdk_draw_drawable(drawable, gc, src, xsrc, ysrc, xdest, ydest, width, height) + +proc gdk_draw_bitmap*(drawable: PGdkDrawable, gc: PGdkGC, src: PGdkDrawable, + xsrc: gint, ysrc: gint, xdest: gint, ydest: gint, + width: gint, height: gint) = + gdk_draw_drawable(drawable, gc, src, xsrc, ysrc, xdest, ydest, width, height) + +proc GDK_TYPE_EVENT*(): GType = + result = gdk_event_get_type() + +proc GDK_TYPE_FONT*(): GType = + result = gdk_font_get_type() + +proc GDK_TYPE_GC*(): GType = + result = gdk_gc_get_type() + +proc GDK_GC*(anObject: Pointer): PGdkGC = + result = cast[PGdkGC](G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_GC())) + +proc GDK_GC_CLASS*(klass: Pointer): PGdkGCClass = + result = cast[PGdkGCClass](G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_GC())) + +proc GDK_IS_GC*(anObject: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_GC()) + +proc GDK_IS_GC_CLASS*(klass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_GC()) + +proc GDK_GC_GET_CLASS*(obj: Pointer): PGdkGCClass = + result = cast[PGdkGCClass](G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_GC())) + +proc gdk_gc_destroy*(gc: PGdkGC) = + g_object_unref(G_OBJECT(gc)) + +proc GDK_TYPE_IMAGE*(): GType = + result = gdk_image_get_type() + +proc GDK_IMAGE*(anObject: Pointer): PGdkImage = + result = cast[PGdkImage](G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_IMAGE())) + +proc GDK_IMAGE_CLASS*(klass: Pointer): PGdkImageClass = + result = cast[PGdkImageClass](G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_IMAGE())) + +proc GDK_IS_IMAGE*(anObject: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_IMAGE()) + +proc GDK_IS_IMAGE_CLASS*(klass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_IMAGE()) + +proc GDK_IMAGE_GET_CLASS*(obj: Pointer): PGdkImageClass = + result = cast[PGdkImageClass](G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_IMAGE())) + +proc gdk_image_destroy*(image: PGdkImage) = + g_object_unref(G_OBJECT(image)) + +proc GDK_TYPE_DEVICE*(): GType = + result = gdk_device_get_type() + +proc GDK_DEVICE*(anObject: Pointer): PGdkDevice = + result = cast[PGdkDevice](G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_DEVICE())) + +proc GDK_DEVICE_CLASS*(klass: Pointer): PGdkDeviceClass = + result = cast[PGdkDeviceClass](G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_DEVICE())) + +proc GDK_IS_DEVICE*(anObject: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_DEVICE()) + +proc GDK_IS_DEVICE_CLASS*(klass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_DEVICE()) + +proc GDK_DEVICE_GET_CLASS*(obj: Pointer): PGdkDeviceClass = + result = cast[PGdkDeviceClass](G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_DEVICE())) + +proc GDK_TYPE_KEYMAP*(): GType = + result = gdk_keymap_get_type() + +proc GDK_KEYMAP*(anObject: Pointer): PGdkKeymap = + result = cast[PGdkKeymap](G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_KEYMAP())) + +proc GDK_KEYMAP_CLASS*(klass: Pointer): PGdkKeymapClass = + result = cast[PGdkKeymapClass](G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_KEYMAP())) + +proc GDK_IS_KEYMAP*(anObject: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_KEYMAP()) + +proc GDK_IS_KEYMAP_CLASS*(klass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_KEYMAP()) + +proc GDK_KEYMAP_GET_CLASS*(obj: Pointer): PGdkKeymapClass = + result = cast[PGdkKeymapClass](G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_KEYMAP())) + +proc GDK_TYPE_PIXMAP*(): GType = + result = gdk_pixmap_get_type() + +proc GDK_PIXMAP*(anObject: Pointer): PGdkPixmap = + result = cast[PGdkPixmap](G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_PIXMAP())) + +proc GDK_PIXMAP_CLASS*(klass: Pointer): PGdkPixmapObjectClass = + result = cast[PGdkPixmapObjectClass](G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_PIXMAP())) + +proc GDK_IS_PIXMAP*(anObject: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_PIXMAP()) + +proc GDK_IS_PIXMAP_CLASS*(klass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_PIXMAP()) + +proc GDK_PIXMAP_GET_CLASS*(obj: Pointer): PGdkPixmapObjectClass = + result = cast[PGdkPixmapObjectClass](G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_PIXMAP())) + +proc GDK_PIXMAP_OBJECT*(anObject: Pointer): PGdkPixmapObject = + result = cast[PGdkPixmapObject](GDK_PIXMAP(anObject)) + +proc gdk_bitmap_ref*(drawable: PGdkDrawable): PGdkDrawable = + result = GDK_DRAWABLE(g_object_ref(G_OBJECT(drawable))) + +proc gdk_bitmap_unref*(drawable: PGdkDrawable) = + g_object_unref(G_OBJECT(drawable)) + +proc gdk_pixmap_ref*(drawable: PGdkDrawable): PGdkDrawable = + result = GDK_DRAWABLE(g_object_ref(G_OBJECT(drawable))) + +proc gdk_pixmap_unref*(drawable: PGdkDrawable) = + g_object_unref(G_OBJECT(drawable)) + +proc gdk_rgb_get_cmap*(): PGdkColormap = + result = nil #gdk_rgb_get_colormap() + +proc GDK_TYPE_DISPLAY*(): GType = + nil + #result = nil + +proc GDK_DISPLAY_OBJECT*(anObject: pointer): PGdkDisplay = + result = cast[PGdkDisplay](G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_DISPLAY())) + +proc GDK_DISPLAY_CLASS*(klass: pointer): PGdkDisplayClass = + result = cast[PGdkDisplayClass](G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_DISPLAY())) + +proc GDK_IS_DISPLAY*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_DISPLAY()) + +proc GDK_IS_DISPLAY_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_DISPLAY()) + +proc GDK_DISPLAY_GET_CLASS*(obj: pointer): PGdkDisplayClass = + result = cast[PGdkDisplayClass](G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_DISPLAY())) + +proc GDK_TYPE_SCREEN*(): GType = + nil + +proc GDK_SCREEN*(anObject: Pointer): PGdkScreen = + result = cast[PGdkScreen](G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_SCREEN())) + +proc GDK_SCREEN_CLASS*(klass: Pointer): PGdkScreenClass = + result = cast[PGdkScreenClass](G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_SCREEN())) + +proc GDK_IS_SCREEN*(anObject: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_SCREEN()) + +proc GDK_IS_SCREEN_CLASS*(klass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_SCREEN()) + +proc GDK_SCREEN_GET_CLASS*(obj: Pointer): PGdkScreenClass = + result = cast[PGdkScreenClass](G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_SCREEN())) + +proc GDK_SELECTION_PRIMARY*(): TGdkAtom = + result = `GDK_MAKE_ATOM`(1) + +proc GDK_SELECTION_SECONDARY*(): TGdkAtom = + result = `GDK_MAKE_ATOM`(2) + +proc GDK_SELECTION_CLIPBOARD*(): TGdkAtom = + result = `GDK_MAKE_ATOM`(69) + +proc GDK_TARGET_BITMAP*(): TGdkAtom = + result = `GDK_MAKE_ATOM`(5) + +proc GDK_TARGET_COLORMAP*(): TGdkAtom = + result = `GDK_MAKE_ATOM`(7) + +proc GDK_TARGET_DRAWABLE*(): TGdkAtom = + result = `GDK_MAKE_ATOM`(17) + +proc GDK_TARGET_PIXMAP*(): TGdkAtom = + result = `GDK_MAKE_ATOM`(20) + +proc GDK_TARGET_STRING*(): TGdkAtom = + result = `GDK_MAKE_ATOM`(31) + +proc GDK_SELECTION_TYPE_ATOM*(): TGdkAtom = + result = `GDK_MAKE_ATOM`(4) + +proc GDK_SELECTION_TYPE_BITMAP*(): TGdkAtom = + result = `GDK_MAKE_ATOM`(5) + +proc GDK_SELECTION_TYPE_COLORMAP*(): TGdkAtom = + result = `GDK_MAKE_ATOM`(7) + +proc GDK_SELECTION_TYPE_DRAWABLE*(): TGdkAtom = + result = `GDK_MAKE_ATOM`(17) + +proc GDK_SELECTION_TYPE_INTEGER*(): TGdkAtom = + result = `GDK_MAKE_ATOM`(19) + +proc GDK_SELECTION_TYPE_PIXMAP*(): TGdkAtom = + result = `GDK_MAKE_ATOM`(20) + +proc GDK_SELECTION_TYPE_WINDOW*(): TGdkAtom = + result = `GDK_MAKE_ATOM`(33) + +proc GDK_SELECTION_TYPE_STRING*(): TGdkAtom = + result = `GDK_MAKE_ATOM`(31) + +proc GDK_ATOM_TO_POINTER*(atom: TGdkAtom): pointer = + result = cast[Pointer](atom) + +proc GDK_POINTER_TO_ATOM*(p: Pointer): TGdkAtom = + result = cast[TGdkAtom](p) + +proc `GDK_MAKE_ATOM`*(val: guint): TGdkAtom = + result = cast[TGdkAtom](val) + +proc GDK_NONE*(): TGdkAtom = + result = `GDK_MAKE_ATOM`(0) + +proc GDK_TYPE_VISUAL*(): GType = + result = gdk_visual_get_type() + +proc GDK_VISUAL*(anObject: Pointer): PGdkVisual = + result = cast[PGdkVisual](G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_VISUAL())) + +proc GDK_VISUAL_CLASS*(klass: Pointer): PGdkVisualClass = + result = cast[PGdkVisualClass](G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_VISUAL())) + +proc GDK_IS_VISUAL*(anObject: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_VISUAL()) + +proc GDK_IS_VISUAL_CLASS*(klass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_VISUAL()) + +proc GDK_VISUAL_GET_CLASS*(obj: Pointer): PGdkVisualClass = + result = cast[PGdkVisualClass](G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_VISUAL())) + +proc gdk_visual_ref*(v: PGdkVisual) = + discard g_object_ref(v) + +proc gdk_visual_unref*(v: PGdkVisual) = + g_object_unref(v) + +proc GDK_TYPE_WINDOW*(): GType = + result = gdk_window_object_get_type() + +proc GDK_WINDOW*(anObject: Pointer): PGdkWindow = + result = cast[PGdkWindow](G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_WINDOW())) + +proc GDK_WINDOW_CLASS*(klass: Pointer): PGdkWindowObjectClass = + result = cast[PGdkWindowObjectClass](G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_WINDOW())) + +proc GDK_IS_WINDOW*(anObject: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_WINDOW()) + +proc GDK_IS_WINDOW_CLASS*(klass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_WINDOW()) + +proc GDK_WINDOW_GET_CLASS*(obj: Pointer): PGdkWindowObjectClass = + result = cast[PGdkWindowObjectClass](G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_WINDOW())) + +proc GDK_WINDOW_OBJECT*(anObject: Pointer): PGdkWindowObject = + result = cast[PGdkWindowObject](GDK_WINDOW(anObject)) + +proc GdkWindowObject_guffaw_gravity*(a: var TGdkWindowObject): guint = + result = (a.flag0 and bm_TGdkWindowObject_guffaw_gravity) shr + bp_TGdkWindowObject_guffaw_gravity + +proc GdkWindowObject_set_guffaw_gravity*(a: var TGdkWindowObject, + `guffaw_gravity`: guint) = + a.flag0 = a.flag0 or + (int16(`guffaw_gravity` shl bp_TGdkWindowObject_guffaw_gravity) and + bm_TGdkWindowObject_guffaw_gravity) + +proc GdkWindowObject_input_only*(a: var TGdkWindowObject): guint = + result = (a.flag0 and bm_TGdkWindowObject_input_only) shr + bp_TGdkWindowObject_input_only + +proc GdkWindowObject_set_input_only*(a: var TGdkWindowObject, + `input_only`: guint) = + a.flag0 = a.flag0 or + (int16(`input_only` shl bp_TGdkWindowObject_input_only) and + bm_TGdkWindowObject_input_only) + +proc GdkWindowObject_modal_hint*(a: var TGdkWindowObject): guint = + result = (a.flag0 and bm_TGdkWindowObject_modal_hint) shr + bp_TGdkWindowObject_modal_hint + +proc GdkWindowObject_set_modal_hint*(a: var TGdkWindowObject, + `modal_hint`: guint) = + a.flag0 = a.flag0 or + (int16(`modal_hint` shl bp_TGdkWindowObject_modal_hint) and + bm_TGdkWindowObject_modal_hint) + +proc GdkWindowObject_destroyed*(a: var TGdkWindowObject): guint = + result = (a.flag0 and bm_TGdkWindowObject_destroyed) shr + bp_TGdkWindowObject_destroyed + +proc GdkWindowObject_set_destroyed*(a: var TGdkWindowObject, `destroyed`: guint) = + a.flag0 = a.flag0 or + (int16(`destroyed` shl bp_TGdkWindowObject_destroyed) and + bm_TGdkWindowObject_destroyed) + +proc GDK_ROOT_PARENT*(): PGdkWindow = + result = gdk_get_default_root_window() + +proc gdk_window_get_size*(drawable: PGdkDrawable, width: Pgint, height: Pgint) = + gdk_drawable_get_size(drawable, width, height) + +proc gdk_window_get_type*(window: PGdkWindow): TGdkWindowType = + result = gdk_window_get_window_type(window) + +proc gdk_window_get_colormap*(drawable: PGdkDrawable): PGdkColormap = + result = gdk_drawable_get_colormap(drawable) + +proc gdk_window_set_colormap*(drawable: PGdkDrawable, colormap: PGdkColormap) = + gdk_drawable_set_colormap(drawable, colormap) + +proc gdk_window_get_visual*(drawable: PGdkDrawable): PGdkVisual = + result = gdk_drawable_get_visual(drawable) + +proc gdk_window_ref*(drawable: PGdkDrawable): PGdkDrawable = + result = GDK_DRAWABLE(g_object_ref(G_OBJECT(drawable))) + +proc gdk_window_unref*(drawable: PGdkDrawable) = + g_object_unref(G_OBJECT(drawable)) + +proc gdk_window_copy_area*(drawable: PGdkDrawable, gc: PGdkGC, x, y: gint, + source_drawable: PGdkDrawable, + source_x, source_y: gint, width, height: gint) = + gdk_draw_pixmap(drawable, gc, source_drawable, source_x, source_y, x, y, + width, height) diff --git a/lib/oldwrappers/gtk/gdk2pixbuf.nim b/lib/oldwrappers/gtk/gdk2pixbuf.nim new file mode 100644 index 000000000..daaa1479b --- /dev/null +++ b/lib/oldwrappers/gtk/gdk2pixbuf.nim @@ -0,0 +1,277 @@ +{.deadCodeElim: on.} + +import + glib2 + +when defined(win32): + const + gdkpixbuflib = "libgdk_pixbuf-2.0-0.dll" +elif defined(darwin): + const + gdkpixbuflib = "gdk_pixbuf-2.0.0" + # linklib gtk-x11-2.0 + # linklib gdk-x11-2.0 + # linklib pango-1.0.0 + # linklib glib-2.0.0 + # linklib gobject-2.0.0 + # linklib gdk_pixbuf-2.0.0 + # linklib atk-1.0.0 +else: + const + gdkpixbuflib = "libgdk_pixbuf-2.0.so" + +type + PGdkPixbuf* = pointer + PGdkPixbufAnimation* = pointer + PGdkPixbufAnimationIter* = pointer + PGdkPixbufAlphaMode* = ptr TGdkPixbufAlphaMode + TGdkPixbufAlphaMode* = enum + GDK_PIXBUF_ALPHA_BILEVEL, GDK_PIXBUF_ALPHA_FULL + PGdkColorspace* = ptr TGdkColorspace + TGdkColorspace* = enum + GDK_COLORSPACE_RGB + TGdkPixbufDestroyNotify* = proc (pixels: Pguchar, data: gpointer){.cdecl.} + PGdkPixbufError* = ptr TGdkPixbufError + TGdkPixbufError* = enum + GDK_PIXBUF_ERROR_CORRUPT_IMAGE, GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY, + GDK_PIXBUF_ERROR_BAD_OPTION, GDK_PIXBUF_ERROR_UNKNOWN_TYPE, + GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION, GDK_PIXBUF_ERROR_FAILED + PGdkInterpType* = ptr TGdkInterpType + TGdkInterpType* = enum + GDK_INTERP_NEAREST, GDK_INTERP_TILES, GDK_INTERP_BILINEAR, GDK_INTERP_HYPER + +proc GDK_TYPE_PIXBUF*(): GType +proc GDK_PIXBUF*(anObject: pointer): PGdkPixbuf +proc GDK_IS_PIXBUF*(anObject: pointer): bool +proc GDK_TYPE_PIXBUF_ANIMATION*(): GType +proc GDK_PIXBUF_ANIMATION*(anObject: pointer): PGdkPixbufAnimation +proc GDK_IS_PIXBUF_ANIMATION*(anObject: pointer): bool +proc GDK_TYPE_PIXBUF_ANIMATION_ITER*(): GType +proc GDK_PIXBUF_ANIMATION_ITER*(anObject: pointer): PGdkPixbufAnimationIter +proc GDK_IS_PIXBUF_ANIMATION_ITER*(anObject: pointer): bool +proc GDK_PIXBUF_ERROR*(): TGQuark +proc gdk_pixbuf_error_quark*(): TGQuark{.cdecl, dynlib: gdkpixbuflib, + importc: "gdk_pixbuf_error_quark".} +proc gdk_pixbuf_get_type*(): GType{.cdecl, dynlib: gdkpixbuflib, + importc: "gdk_pixbuf_get_type".} +when not defined(GDK_PIXBUF_DISABLE_DEPRECATED): + proc gdk_pixbuf_ref*(pixbuf: PGdkPixbuf): PGdkPixbuf{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_ref".} + proc gdk_pixbuf_unref*(pixbuf: PGdkPixbuf){.cdecl, dynlib: gdkpixbuflib, + importc: "gdk_pixbuf_unref".} +proc gdk_pixbuf_get_colorspace*(pixbuf: PGdkPixbuf): TGdkColorspace{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_get_colorspace".} +proc gdk_pixbuf_get_n_channels*(pixbuf: PGdkPixbuf): int32{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_get_n_channels".} +proc gdk_pixbuf_get_has_alpha*(pixbuf: PGdkPixbuf): gboolean{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_get_has_alpha".} +proc gdk_pixbuf_get_bits_per_sample*(pixbuf: PGdkPixbuf): int32{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_get_bits_per_sample".} +proc gdk_pixbuf_get_pixels*(pixbuf: PGdkPixbuf): Pguchar{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_get_pixels".} +proc gdk_pixbuf_get_width*(pixbuf: PGdkPixbuf): int32{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_get_width".} +proc gdk_pixbuf_get_height*(pixbuf: PGdkPixbuf): int32{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_get_height".} +proc gdk_pixbuf_get_rowstride*(pixbuf: PGdkPixbuf): int32{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_get_rowstride".} +proc gdk_pixbuf_new*(colorspace: TGdkColorspace, has_alpha: gboolean, + bits_per_sample: int32, width: int32, height: int32): PGdkPixbuf{. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_new".} +proc gdk_pixbuf_copy*(pixbuf: PGdkPixbuf): PGdkPixbuf{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_copy".} +proc gdk_pixbuf_new_subpixbuf*(src_pixbuf: PGdkPixbuf, src_x: int32, + src_y: int32, width: int32, height: int32): PGdkPixbuf{. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_new_subpixbuf".} +proc gdk_pixbuf_new_from_file*(filename: cstring, error: pointer): PGdkPixbuf{. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_new_from_file".} +proc gdk_pixbuf_new_from_data*(data: Pguchar, colorspace: TGdkColorspace, + has_alpha: gboolean, bits_per_sample: int32, + width: int32, height: int32, rowstride: int32, + destroy_fn: TGdkPixbufDestroyNotify, + destroy_fn_data: gpointer): PGdkPixbuf{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_new_from_data".} +proc gdk_pixbuf_new_from_xpm_data*(data: PPchar): PGdkPixbuf{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_new_from_xpm_data".} +proc gdk_pixbuf_new_from_inline*(data_length: gint, a: var guint8, + copy_pixels: gboolean, error: pointer): PGdkPixbuf{. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_new_from_inline".} +proc gdk_pixbuf_new_from_file_at_size*(filename: cstring, width, height: gint, + error: pointer): PGdkPixbuf{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_new_from_file_at_size".} +proc gdk_pixbuf_new_from_file_at_scale*(filename: cstring, width, height: gint, + preserve_aspect_ratio: gboolean, error: pointer): PGdkPixbuf{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_new_from_file_at_scale".} +proc gdk_pixbuf_fill*(pixbuf: PGdkPixbuf, pixel: guint32){.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_fill".} +proc gdk_pixbuf_save*(pixbuf: PGdkPixbuf, filename: cstring, `type`: cstring, + error: pointer): gboolean{.cdecl, varargs, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_save".} +proc gdk_pixbuf_savev*(pixbuf: PGdkPixbuf, filename: cstring, `type`: cstring, + option_keys: PPchar, option_values: PPchar, + error: pointer): gboolean{.cdecl, dynlib: gdkpixbuflib, + importc: "gdk_pixbuf_savev".} +proc gdk_pixbuf_add_alpha*(pixbuf: PGdkPixbuf, substitute_color: gboolean, + r: guchar, g: guchar, b: guchar): PGdkPixbuf{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_add_alpha".} +proc gdk_pixbuf_copy_area*(src_pixbuf: PGdkPixbuf, src_x: int32, src_y: int32, + width: int32, height: int32, dest_pixbuf: PGdkPixbuf, + dest_x: int32, dest_y: int32){.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_copy_area".} +proc gdk_pixbuf_saturate_and_pixelate*(src: PGdkPixbuf, dest: PGdkPixbuf, + saturation: gfloat, pixelate: gboolean){. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_saturate_and_pixelate".} +proc gdk_pixbuf_scale*(src: PGdkPixbuf, dest: PGdkPixbuf, dest_x: int32, + dest_y: int32, dest_width: int32, dest_height: int32, + offset_x: float64, offset_y: float64, scale_x: float64, + scale_y: float64, interp_type: TGdkInterpType){.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_scale".} +proc gdk_pixbuf_composite*(src: PGdkPixbuf, dest: PGdkPixbuf, dest_x: int32, + dest_y: int32, dest_width: int32, dest_height: int32, + offset_x: float64, offset_y: float64, + scale_x: float64, scale_y: float64, + interp_type: TGdkInterpType, overall_alpha: int32){. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_composite".} +proc gdk_pixbuf_composite_color*(src: PGdkPixbuf, dest: PGdkPixbuf, + dest_x: int32, dest_y: int32, + dest_width: int32, dest_height: int32, + offset_x: float64, offset_y: float64, + scale_x: float64, scale_y: float64, + interp_type: TGdkInterpType, + overall_alpha: int32, check_x: int32, + check_y: int32, check_size: int32, + color1: guint32, color2: guint32){.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_composite_color".} +proc gdk_pixbuf_scale_simple*(src: PGdkPixbuf, dest_width: int32, + dest_height: int32, interp_type: TGdkInterpType): PGdkPixbuf{. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_scale_simple".} +proc gdk_pixbuf_composite_color_simple*(src: PGdkPixbuf, dest_width: int32, + dest_height: int32, + interp_type: TGdkInterpType, + overall_alpha: int32, check_size: int32, + color1: guint32, color2: guint32): PGdkPixbuf{. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_composite_color_simple".} +proc gdk_pixbuf_animation_get_type*(): GType{.cdecl, dynlib: gdkpixbuflib, + importc: "gdk_pixbuf_animation_get_type".} +proc gdk_pixbuf_animation_new_from_file*(filename: cstring, error: pointer): PGdkPixbufAnimation{. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_animation_new_from_file".} +when not defined(GDK_PIXBUF_DISABLE_DEPRECATED): + proc gdk_pixbuf_animation_ref*(animation: PGdkPixbufAnimation): PGdkPixbufAnimation{. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_animation_ref".} + proc gdk_pixbuf_animation_unref*(animation: PGdkPixbufAnimation){.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_animation_unref".} +proc gdk_pixbuf_animation_get_width*(animation: PGdkPixbufAnimation): int32{. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_animation_get_width".} +proc gdk_pixbuf_animation_get_height*(animation: PGdkPixbufAnimation): int32{. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_animation_get_height".} +proc gdk_pixbuf_animation_is_static_image*(animation: PGdkPixbufAnimation): gboolean{. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_animation_is_static_image".} +proc gdk_pixbuf_animation_get_static_image*(animation: PGdkPixbufAnimation): PGdkPixbuf{. + cdecl, dynlib: gdkpixbuflib, + importc: "gdk_pixbuf_animation_get_static_image".} +proc gdk_pixbuf_animation_get_iter*(animation: PGdkPixbufAnimation, + e: var TGTimeVal): PGdkPixbufAnimationIter{. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_animation_get_iter".} +proc gdk_pixbuf_animation_iter_get_type*(): GType{.cdecl, dynlib: gdkpixbuflib, + importc: "gdk_pixbuf_animation_iter_get_type".} +proc gdk_pixbuf_animation_iter_get_delay_time*(iter: PGdkPixbufAnimationIter): int32{. + cdecl, dynlib: gdkpixbuflib, + importc: "gdk_pixbuf_animation_iter_get_delay_time".} +proc gdk_pixbuf_animation_iter_get_pixbuf*(iter: PGdkPixbufAnimationIter): PGdkPixbuf{. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_animation_iter_get_pixbuf".} +proc gdk_pixbuf_animation_iter_on_currently_loading_frame*( + iter: PGdkPixbufAnimationIter): gboolean{.cdecl, dynlib: gdkpixbuflib, + importc: "gdk_pixbuf_animation_iter_on_currently_loading_frame".} +proc gdk_pixbuf_animation_iter_advance*(iter: PGdkPixbufAnimationIter, + e: var TGTimeVal): gboolean{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_animation_iter_advance".} +proc gdk_pixbuf_get_option*(pixbuf: PGdkPixbuf, key: cstring): cstring{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_get_option".} +type + PGdkPixbufLoader* = ptr TGdkPixbufLoader + TGdkPixbufLoader* {.final, pure.} = object + parent_instance*: TGObject + priv*: gpointer + + PGdkPixbufLoaderClass* = ptr TGdkPixbufLoaderClass + TGdkPixbufLoaderClass* {.final, pure.} = object + parent_class*: TGObjectClass + area_prepared*: proc (loader: PGdkPixbufLoader){.cdecl.} + area_updated*: proc (loader: PGdkPixbufLoader, x: int32, y: int32, + width: int32, height: int32){.cdecl.} + closed*: proc (loader: PGdkPixbufLoader){.cdecl.} + + +proc GDK_TYPE_PIXBUF_LOADER*(): GType +proc GDK_PIXBUF_LOADER*(obj: pointer): PGdkPixbufLoader +proc GDK_PIXBUF_LOADER_CLASS*(klass: pointer): PGdkPixbufLoaderClass +proc GDK_IS_PIXBUF_LOADER*(obj: pointer): bool +proc GDK_IS_PIXBUF_LOADER_CLASS*(klass: pointer): bool +proc GDK_PIXBUF_LOADER_GET_CLASS*(obj: pointer): PGdkPixbufLoaderClass +proc gdk_pixbuf_loader_get_type*(): GType{.cdecl, dynlib: gdkpixbuflib, + importc: "gdk_pixbuf_loader_get_type".} +proc gdk_pixbuf_loader_new*(): PGdkPixbufLoader{.cdecl, dynlib: gdkpixbuflib, + importc: "gdk_pixbuf_loader_new".} +proc gdk_pixbuf_loader_new_with_type*(image_type: cstring, error: pointer): PGdkPixbufLoader{. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_loader_new_with_type".} +proc gdk_pixbuf_loader_write*(loader: PGdkPixbufLoader, buf: Pguchar, + count: gsize, error: pointer): gboolean{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_loader_write".} +proc gdk_pixbuf_loader_get_pixbuf*(loader: PGdkPixbufLoader): PGdkPixbuf{.cdecl, + dynlib: gdkpixbuflib, importc: "gdk_pixbuf_loader_get_pixbuf".} +proc gdk_pixbuf_loader_get_animation*(loader: PGdkPixbufLoader): PGdkPixbufAnimation{. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_loader_get_animation".} +proc gdk_pixbuf_loader_close*(loader: PGdkPixbufLoader, error: pointer): gboolean{. + cdecl, dynlib: gdkpixbuflib, importc: "gdk_pixbuf_loader_close".} +proc GDK_TYPE_PIXBUF_LOADER*(): GType = + result = gdk_pixbuf_loader_get_type() + +proc GDK_PIXBUF_LOADER*(obj: pointer): PGdkPixbufLoader = + result = cast[PGdkPixbufLoader](G_TYPE_CHECK_INSTANCE_CAST(obj, + GDK_TYPE_PIXBUF_LOADER())) + +proc GDK_PIXBUF_LOADER_CLASS*(klass: pointer): PGdkPixbufLoaderClass = + result = cast[PGdkPixbufLoaderClass](G_TYPE_CHECK_CLASS_CAST(klass, + GDK_TYPE_PIXBUF_LOADER())) + +proc GDK_IS_PIXBUF_LOADER*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, GDK_TYPE_PIXBUF_LOADER()) + +proc GDK_IS_PIXBUF_LOADER_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_PIXBUF_LOADER()) + +proc GDK_PIXBUF_LOADER_GET_CLASS*(obj: pointer): PGdkPixbufLoaderClass = + result = cast[PGdkPixbufLoaderClass](G_TYPE_INSTANCE_GET_CLASS(obj, + GDK_TYPE_PIXBUF_LOADER())) + +proc GDK_TYPE_PIXBUF*(): GType = + result = gdk_pixbuf_get_type() + +proc GDK_PIXBUF*(anObject: pointer): PGdkPixbuf = + result = cast[PGdkPixbuf](G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_PIXBUF())) + +proc GDK_IS_PIXBUF*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_PIXBUF()) + +proc GDK_TYPE_PIXBUF_ANIMATION*(): GType = + result = gdk_pixbuf_animation_get_type() + +proc GDK_PIXBUF_ANIMATION*(anObject: pointer): PGdkPixbufAnimation = + result = cast[PGdkPixbufAnimation](G_TYPE_CHECK_INSTANCE_CAST(anObject, + GDK_TYPE_PIXBUF_ANIMATION())) + +proc GDK_IS_PIXBUF_ANIMATION*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_PIXBUF_ANIMATION()) + +proc GDK_TYPE_PIXBUF_ANIMATION_ITER*(): GType = + result = gdk_pixbuf_animation_iter_get_type() + +proc GDK_PIXBUF_ANIMATION_ITER*(anObject: pointer): PGdkPixbufAnimationIter = + result = cast[PGdkPixbufAnimationIter](G_TYPE_CHECK_INSTANCE_CAST(anObject, + GDK_TYPE_PIXBUF_ANIMATION_ITER())) + +proc GDK_IS_PIXBUF_ANIMATION_ITER*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_PIXBUF_ANIMATION_ITER()) + +proc GDK_PIXBUF_ERROR*(): TGQuark = + result = gdk_pixbuf_error_quark() diff --git a/lib/oldwrappers/gtk/gdkglext.nim b/lib/oldwrappers/gtk/gdkglext.nim new file mode 100644 index 000000000..524b5f730 --- /dev/null +++ b/lib/oldwrappers/gtk/gdkglext.nim @@ -0,0 +1,564 @@ +{.deadCodeElim: on.} + +import + Glib2, Gdk2 + +when defined(WIN32): + const + GdkGLExtLib = "libgdkglext-win32-1.0-0.dll" +else: + const + GdkGLExtLib = "libgdkglext-x11-1.0.so" +type + TGdkGLConfigAttrib* = int32 + TGdkGLConfigCaveat* = int32 + TGdkGLVisualType* = int32 + TGdkGLTransparentType* = int32 + TGdkGLDrawableTypeMask* = int32 + TGdkGLRenderTypeMask* = int32 + TGdkGLBufferMask* = int32 + TGdkGLConfigError* = int32 + TGdkGLRenderType* = int32 + TGdkGLDrawableAttrib* = int32 + TGdkGLPbufferAttrib* = int32 + TGdkGLEventMask* = int32 + TGdkGLEventType* = int32 + TGdkGLDrawableType* = int32 + TGdkGLProc* = Pointer + PGdkGLConfig* = ptr TGdkGLConfig + PGdkGLContext* = ptr TGdkGLContext + PGdkGLDrawable* = ptr TGdkGLDrawable + PGdkGLPixmap* = ptr TGdkGLPixmap + PGdkGLWindow* = ptr TGdkGLWindow + TGdkGLConfig* = object of TGObject + layer_plane*: gint + n_aux_buffers*: gint + n_sample_buffers*: gint + flag0*: int16 + + PGdkGLConfigClass* = ptr TGdkGLConfigClass + TGdkGLConfigClass* = object of TGObjectClass + + TGdkGLContext* = object of TGObject + + PGdkGLContextClass* = ptr TGdkGLContextClass + TGdkGLContextClass* = object of TGObjectClass + + TGdkGLDrawable* = object of TGObject + + PGdkGLDrawableClass* = ptr TGdkGLDrawableClass + TGdkGLDrawableClass* = object of TGTypeInterface + create_new_context*: proc (gldrawable: PGdkGLDrawable, + share_list: PGdkGLContext, direct: gboolean, + render_type: int32): PGdkGLContext{.cdecl.} + make_context_current*: proc (draw: PGdkGLDrawable, a_read: PGdkGLDrawable, + glcontext: PGdkGLContext): gboolean{.cdecl.} + is_double_buffered*: proc (gldrawable: PGdkGLDrawable): gboolean{.cdecl.} + swap_buffers*: proc (gldrawable: PGdkGLDrawable){.cdecl.} + wait_gl*: proc (gldrawable: PGdkGLDrawable){.cdecl.} + wait_gdk*: proc (gldrawable: PGdkGLDrawable){.cdecl.} + gl_begin*: proc (draw: PGdkGLDrawable, a_read: PGdkGLDrawable, + glcontext: PGdkGLContext): gboolean{.cdecl.} + gl_end*: proc (gldrawable: PGdkGLDrawable){.cdecl.} + get_gl_config*: proc (gldrawable: PGdkGLDrawable): PGdkGLConfig{.cdecl.} + get_size*: proc (gldrawable: PGdkGLDrawable, width, height: PGInt){.cdecl.} + + TGdkGLPixmap* = object of TGObject + drawable*: PGdkDrawable + + PGdkGLPixmapClass* = ptr TGdkGLPixmapClass + TGdkGLPixmapClass* = object of TGObjectClass + + TGdkGLWindow* = object of TGObject + drawable*: PGdkDrawable + + PGdkGLWindowClass* = ptr TGdkGLWindowClass + TGdkGLWindowClass* = object of TGObjectClass + + +const + HEADER_GDKGLEXT_MAJOR_VERSION* = 1 + HEADER_GDKGLEXT_MINOR_VERSION* = 0 + HEADER_GDKGLEXT_MICRO_VERSION* = 6 + HEADER_GDKGLEXT_INTERFACE_AGE* = 4 + HEADER_GDKGLEXT_BINARY_AGE* = 6 + +proc HEADER_GDKGLEXT_CHECK_VERSION*(major, minor, micro: guint): bool +var + gdkglext_major_version*{.importc, dynlib: GdkGLExtLib.}: guint + gdkglext_minor_version*{.importc, dynlib: GdkGLExtLib.}: guint + gdkglext_micro_version*{.importc, dynlib: GdkGLExtLib.}: guint + gdkglext_interface_age*{.importc, dynlib: GdkGLExtLib.}: guint + gdkglext_binary_age*{.importc, dynlib: GdkGLExtLib.}: guint + +const + GDK_GL_SUCCESS* = 0 + GDK_GL_ATTRIB_LIST_NONE* = 0 + GDK_GL_USE_GL* = 1 + GDK_GL_BUFFER_SIZE* = 2 + GDK_GL_LEVEL* = 3 + GDK_GL_RGBA* = 4 + GDK_GL_DOUBLEBUFFER* = 5 + GDK_GL_STEREO* = 6 + GDK_GL_AUX_BUFFERS* = 7 + GDK_GL_RED_SIZE* = 8 + GDK_GL_GREEN_SIZE* = 9 + GDK_GL_BLUE_SIZE* = 10 + GDK_GL_ALPHA_SIZE* = 11 + GDK_GL_DEPTH_SIZE* = 12 + GDK_GL_STENCIL_SIZE* = 13 + GDK_GL_ACCUM_RED_SIZE* = 14 + GDK_GL_ACCUM_GREEN_SIZE* = 15 + GDK_GL_ACCUM_BLUE_SIZE* = 16 + GDK_GL_ACCUM_ALPHA_SIZE* = 17 + GDK_GL_CONFIG_CAVEAT* = 0x00000020 + GDK_GL_X_VISUAL_TYPE* = 0x00000022 + GDK_GL_TRANSPARENT_TYPE* = 0x00000023 + GDK_GL_TRANSPARENT_INDEX_VALUE* = 0x00000024 + GDK_GL_TRANSPARENT_RED_VALUE* = 0x00000025 + GDK_GL_TRANSPARENT_GREEN_VALUE* = 0x00000026 + GDK_GL_TRANSPARENT_BLUE_VALUE* = 0x00000027 + GDK_GL_TRANSPARENT_ALPHA_VALUE* = 0x00000028 + GDK_GL_DRAWABLE_TYPE* = 0x00008010 + GDK_GL_RENDER_TYPE* = 0x00008011 + GDK_GL_X_RENDERABLE* = 0x00008012 + GDK_GL_FBCONFIG_ID* = 0x00008013 + GDK_GL_MAX_PBUFFER_WIDTH* = 0x00008016 + GDK_GL_MAX_PBUFFER_HEIGHT* = 0x00008017 + GDK_GL_MAX_PBUFFER_PIXELS* = 0x00008018 + GDK_GL_VISUAL_ID* = 0x0000800B + GDK_GL_SCREEN* = 0x0000800C + GDK_GL_SAMPLE_BUFFERS* = 100000 + GDK_GL_SAMPLES* = 100001 + GDK_GL_DONT_CARE* = 0xFFFFFFFF + GDK_GL_NONE* = 0x00008000 + GDK_GL_CONFIG_CAVEAT_DONT_CARE* = 0xFFFFFFFF + GDK_GL_CONFIG_CAVEAT_NONE* = 0x00008000 + GDK_GL_SLOW_CONFIG* = 0x00008001 + GDK_GL_NON_CONFORMANT_CONFIG* = 0x0000800D + GDK_GL_VISUAL_TYPE_DONT_CARE* = 0xFFFFFFFF + GDK_GL_TRUE_COLOR* = 0x00008002 + GDK_GL_DIRECT_COLOR* = 0x00008003 + GDK_GL_PSEUDO_COLOR* = 0x00008004 + GDK_GL_STATIC_COLOR* = 0x00008005 + GDK_GL_GRAY_SCALE* = 0x00008006 + GDK_GL_STATIC_GRAY* = 0x00008007 + GDK_GL_TRANSPARENT_NONE* = 0x00008000 + GDK_GL_TRANSPARENT_RGB* = 0x00008008 + GDK_GL_TRANSPARENT_INDEX* = 0x00008009 + GDK_GL_WINDOW_BIT* = 1 shl 0 + GDK_GL_PIXMAP_BIT* = 1 shl 1 + GDK_GL_PBUFFER_BIT* = 1 shl 2 + GDK_GL_RGBA_BIT* = 1 shl 0 + GDK_GL_COLOR_INDEX_BIT* = 1 shl 1 + GDK_GL_FRONT_LEFT_BUFFER_BIT* = 1 shl 0 + GDK_GL_FRONT_RIGHT_BUFFER_BIT* = 1 shl 1 + GDK_GL_BACK_LEFT_BUFFER_BIT* = 1 shl 2 + GDK_GL_BACK_RIGHT_BUFFER_BIT* = 1 shl 3 + GDK_GL_AUX_BUFFERS_BIT* = 1 shl 4 + GDK_GL_DEPTH_BUFFER_BIT* = 1 shl 5 + GDK_GL_STENCIL_BUFFER_BIT* = 1 shl 6 + GDK_GL_ACCUM_BUFFER_BIT* = 1 shl 7 + GDK_GL_BAD_SCREEN* = 1 + GDK_GL_BAD_ATTRIBUTE* = 2 + GDK_GL_NO_EXTENSION* = 3 + GDK_GL_BAD_VISUAL* = 4 + GDK_GL_BAD_CONTEXT* = 5 + GDK_GL_BAD_VALUE* = 6 + GDK_GL_BAD_ENUM* = 7 + GDK_GL_RGBA_TYPE* = 0x00008014 + GDK_GL_COLOR_INDEX_TYPE* = 0x00008015 + GDK_GL_PRESERVED_CONTENTS* = 0x0000801B + GDK_GL_LARGEST_PBUFFER* = 0x0000801C + GDK_GL_WIDTH* = 0x0000801D + GDK_GL_HEIGHT* = 0x0000801E + GDK_GL_EVENT_MASK* = 0x0000801F + GDK_GL_PBUFFER_PRESERVED_CONTENTS* = 0x0000801B + GDK_GL_PBUFFER_LARGEST_PBUFFER* = 0x0000801C + GDK_GL_PBUFFER_HEIGHT* = 0x00008040 + GDK_GL_PBUFFER_WIDTH* = 0x00008041 + GDK_GL_PBUFFER_CLOBBER_MASK* = 1 shl 27 + GDK_GL_DAMAGED* = 0x00008020 + GDK_GL_SAVED* = 0x00008021 + GDK_GL_WINDOW_VALUE* = 0x00008022 + GDK_GL_PBUFFER* = 0x00008023 + +proc gdk_gl_config_attrib_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_config_attrib_get_type".} +proc GDK_TYPE_GL_CONFIG_ATTRIB*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_config_attrib_get_type".} +proc gdk_gl_config_caveat_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_config_caveat_get_type".} +proc GDK_TYPE_GL_CONFIG_CAVEAT*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_config_caveat_get_type".} +proc gdk_gl_visual_type_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_visual_type_get_type".} +proc GDK_TYPE_GL_VISUAL_TYPE*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_visual_type_get_type".} +proc gdk_gl_transparent_type_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_transparent_type_get_type".} +proc GDK_TYPE_GL_TRANSPARENT_TYPE*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_transparent_type_get_type".} +proc gdk_gl_drawable_type_mask_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_drawable_type_mask_get_type".} +proc GDK_TYPE_GL_DRAWABLE_TYPE_MASK*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_drawable_type_mask_get_type".} +proc gdk_gl_render_type_mask_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_render_type_mask_get_type".} +proc GDK_TYPE_GL_RENDER_TYPE_MASK*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_render_type_mask_get_type".} +proc gdk_gl_buffer_mask_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_buffer_mask_get_type".} +proc GDK_TYPE_GL_BUFFER_MASK*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_buffer_mask_get_type".} +proc gdk_gl_config_error_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_config_error_get_type".} +proc GDK_TYPE_GL_CONFIG_ERROR*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_config_error_get_type".} +proc gdk_gl_render_type_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_render_type_get_type".} +proc GDK_TYPE_GL_RENDER_TYPE*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_render_type_get_type".} +proc gdk_gl_drawable_attrib_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_drawable_attrib_get_type".} +proc GDK_TYPE_GL_DRAWABLE_ATTRIB*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_drawable_attrib_get_type".} +proc gdk_gl_pbuffer_attrib_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_pbuffer_attrib_get_type".} +proc GDK_TYPE_GL_PBUFFER_ATTRIB*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_pbuffer_attrib_get_type".} +proc gdk_gl_event_mask_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_event_mask_get_type".} +proc GDK_TYPE_GL_EVENT_MASK*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_event_mask_get_type".} +proc gdk_gl_event_type_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_event_type_get_type".} +proc GDK_TYPE_GL_EVENT_TYPE*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_event_type_get_type".} +proc gdk_gl_drawable_type_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_drawable_type_get_type".} +proc GDK_TYPE_GL_DRAWABLE_TYPE*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_drawable_type_get_type".} +proc gdk_gl_config_mode_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_config_mode_get_type".} +proc GDK_TYPE_GL_CONFIG_MODE*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_config_mode_get_type".} +proc gdk_gl_parse_args*(argc: var int32, argv: ptr cstringArray): gboolean{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_parse_args".} +proc gdk_gl_init_check*(argc: var int32, argv: ptr cstringArray): gboolean{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_init_check".} +proc gdk_gl_init*(argc: var int32, argv: ptr cstringArray){. + cdecl, dynlib: GdkGLExtLib, importc: "gdk_gl_init".} +proc gdk_gl_query_gl_extension*(extension: cstring): gboolean{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_query_gl_extension".} +proc gdk_gl_get_proc_address*(proc_name: cstring): TGdkGLProc{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_get_proc_address".} +const + bm_TGdkGLConfig_is_rgba* = 1 shl 0 + bp_TGdkGLConfig_is_rgba* = 0 + bm_TGdkGLConfig_is_double_buffered* = 1 shl 1 + bp_TGdkGLConfig_is_double_buffered* = 1 + bm_TGdkGLConfig_as_single_mode* = 1 shl 2 + bp_TGdkGLConfig_as_single_mode* = 2 + bm_TGdkGLConfig_is_stereo* = 1 shl 3 + bp_TGdkGLConfig_is_stereo* = 3 + bm_TGdkGLConfig_has_alpha* = 1 shl 4 + bp_TGdkGLConfig_has_alpha* = 4 + bm_TGdkGLConfig_has_depth_buffer* = 1 shl 5 + bp_TGdkGLConfig_has_depth_buffer* = 5 + bm_TGdkGLConfig_has_stencil_buffer* = 1 shl 6 + bp_TGdkGLConfig_has_stencil_buffer* = 6 + bm_TGdkGLConfig_has_accum_buffer* = 1 shl 7 + bp_TGdkGLConfig_has_accum_buffer* = 7 + +const + GDK_GL_MODE_RGB* = 0 + GDK_GL_MODE_RGBA* = 0 + GDK_GL_MODE_INDEX* = 1 shl 0 + GDK_GL_MODE_SINGLE* = 0 + GDK_GL_MODE_DOUBLE* = 1 shl 1 + GDK_GL_MODE_STEREO* = 1 shl 2 + GDK_GL_MODE_ALPHA* = 1 shl 3 + GDK_GL_MODE_DEPTH* = 1 shl 4 + GDK_GL_MODE_STENCIL* = 1 shl 5 + GDK_GL_MODE_ACCUM* = 1 shl 6 + GDK_GL_MODE_MULTISAMPLE* = 1 shl 7 + +type + TGdkGLConfigMode* = int32 + PGdkGLConfigMode* = ptr TGdkGLConfigMode + +proc GDK_TYPE_GL_CONFIG*(): GType +proc GDK_GL_CONFIG*(anObject: Pointer): PGdkGLConfig +proc GDK_GL_CONFIG_CLASS*(klass: Pointer): PGdkGLConfigClass +proc GDK_IS_GL_CONFIG*(anObject: Pointer): bool +proc GDK_IS_GL_CONFIG_CLASS*(klass: Pointer): bool +proc GDK_GL_CONFIG_GET_CLASS*(obj: Pointer): PGdkGLConfigClass +proc gdk_gl_config_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_config_get_type".} +proc gdk_gl_config_get_screen*(glconfig: PGdkGLConfig): PGdkScreen{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_config_get_screen".} +proc gdk_gl_config_get_attrib*(glconfig: PGdkGLConfig, attribute: int, + value: var cint): gboolean{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_config_get_attrib".} +proc gdk_gl_config_get_colormap*(glconfig: PGdkGLConfig): PGdkColormap{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_config_get_colormap".} +proc gdk_gl_config_get_visual*(glconfig: PGdkGLConfig): PGdkVisual{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_config_get_visual".} +proc gdk_gl_config_get_depth*(glconfig: PGdkGLConfig): gint{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_config_get_depth".} +proc gdk_gl_config_get_layer_plane*(glconfig: PGdkGLConfig): gint{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_config_get_layer_plane".} +proc gdk_gl_config_get_n_aux_buffers*(glconfig: PGdkGLConfig): gint{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_config_get_n_aux_buffers".} +proc gdk_gl_config_get_n_sample_buffers*(glconfig: PGdkGLConfig): gint{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_config_get_n_sample_buffers".} +proc gdk_gl_config_is_rgba*(glconfig: PGdkGLConfig): gboolean{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_config_is_rgba".} +proc gdk_gl_config_is_double_buffered*(glconfig: PGdkGLConfig): gboolean{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_config_is_double_buffered".} +proc gdk_gl_config_is_stereo*(glconfig: PGdkGLConfig): gboolean{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_config_is_stereo".} +proc gdk_gl_config_has_alpha*(glconfig: PGdkGLConfig): gboolean{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_config_has_alpha".} +proc gdk_gl_config_has_depth_buffer*(glconfig: PGdkGLConfig): gboolean{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_config_has_depth_buffer".} +proc gdk_gl_config_has_stencil_buffer*(glconfig: PGdkGLConfig): gboolean{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_config_has_stencil_buffer".} +proc gdk_gl_config_has_accum_buffer*(glconfig: PGdkGLConfig): gboolean{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_config_has_accum_buffer".} +proc GDK_TYPE_GL_CONTEXT*(): GType +proc GDK_GL_CONTEXT*(anObject: Pointer): PGdkGLContext +proc GDK_GL_CONTEXT_CLASS*(klass: Pointer): PGdkGLContextClass +proc GDK_IS_GL_CONTEXT*(anObject: Pointer): bool +proc GDK_IS_GL_CONTEXT_CLASS*(klass: Pointer): bool +proc GDK_GL_CONTEXT_GET_CLASS*(obj: Pointer): PGdkGLContextClass +proc gdk_gl_context_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_context_get_type".} +proc gdk_gl_context_new*(gldrawable: PGdkGLDrawable, share_list: PGdkGLContext, + direct: gboolean, render_type: int32): PGdkGLContext{. + cdecl, dynlib: GdkGLExtLib, importc: "gdk_gl_context_new".} +proc gdk_gl_context_destroy*(glcontext: PGdkGLContext){.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_context_destroy".} +proc gdk_gl_context_copy*(glcontext: PGdkGLContext, src: PGdkGLContext, + mask: int32): gboolean{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_context_copy".} +proc gdk_gl_context_get_gl_drawable*(glcontext: PGdkGLContext): PGdkGLDrawable{. + cdecl, dynlib: GdkGLExtLib, importc: "gdk_gl_context_get_gl_drawable".} +proc gdk_gl_context_get_gl_config*(glcontext: PGdkGLContext): PGdkGLConfig{. + cdecl, dynlib: GdkGLExtLib, importc: "gdk_gl_context_get_gl_config".} +proc gdk_gl_context_get_share_list*(glcontext: PGdkGLContext): PGdkGLContext{. + cdecl, dynlib: GdkGLExtLib, importc: "gdk_gl_context_get_share_list".} +proc gdk_gl_context_is_direct*(glcontext: PGdkGLContext): gboolean{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_context_is_direct".} +proc gdk_gl_context_get_render_type*(glcontext: PGdkGLContext): int32{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_context_get_render_type".} +proc gdk_gl_context_get_current*(): PGdkGLContext{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_context_get_current".} +proc GDK_TYPE_GL_DRAWABLE*(): GType +proc GDK_GL_DRAWABLE*(inst: Pointer): PGdkGLDrawable +proc GDK_GL_DRAWABLE_CLASS*(vtable: Pointer): PGdkGLDrawableClass +proc GDK_IS_GL_DRAWABLE*(inst: Pointer): bool +proc GDK_IS_GL_DRAWABLE_CLASS*(vtable: Pointer): bool +proc GDK_GL_DRAWABLE_GET_CLASS*(inst: Pointer): PGdkGLDrawableClass +proc gdk_gl_drawable_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_drawable_get_type".} +proc gdk_gl_drawable_make_current*(gldrawable: PGdkGLDrawable, + glcontext: PGdkGLContext): gboolean{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_drawable_make_current".} +proc gdk_gl_drawable_is_double_buffered*(gldrawable: PGdkGLDrawable): gboolean{. + cdecl, dynlib: GdkGLExtLib, importc: "gdk_gl_drawable_is_double_buffered".} +proc gdk_gl_drawable_swap_buffers*(gldrawable: PGdkGLDrawable){.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_drawable_swap_buffers".} +proc gdk_gl_drawable_wait_gl*(gldrawable: PGdkGLDrawable){.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_drawable_wait_gl".} +proc gdk_gl_drawable_wait_gdk*(gldrawable: PGdkGLDrawable){.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_drawable_wait_gdk".} +proc gdk_gl_drawable_gl_begin*(gldrawable: PGdkGLDrawable, + glcontext: PGdkGLContext): gboolean{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_drawable_gl_begin".} +proc gdk_gl_drawable_gl_end*(gldrawable: PGdkGLDrawable){.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_drawable_gl_end".} +proc gdk_gl_drawable_get_gl_config*(gldrawable: PGdkGLDrawable): PGdkGLConfig{. + cdecl, dynlib: GdkGLExtLib, importc: "gdk_gl_drawable_get_gl_config".} +proc gdk_gl_drawable_get_size*(gldrawable: PGdkGLDrawable, width, height: PGInt){. + cdecl, dynlib: GdkGLExtLib, importc: "gdk_gl_drawable_get_size".} +proc gdk_gl_drawable_get_current*(): PGdkGLDrawable{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_drawable_get_current".} +proc GDK_TYPE_GL_PIXMAP*(): GType +proc GDK_GL_PIXMAP*(anObject: Pointer): PGdkGLPixmap +proc GDK_GL_PIXMAP_CLASS*(klass: Pointer): PGdkGLPixmapClass +proc GDK_IS_GL_PIXMAP*(anObject: Pointer): bool +proc GDK_IS_GL_PIXMAP_CLASS*(klass: Pointer): bool +proc GDK_GL_PIXMAP_GET_CLASS*(obj: Pointer): PGdkGLPixmapClass +proc gdk_gl_pixmap_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_pixmap_get_type".} +proc gdk_gl_pixmap_new*(glconfig: PGdkGLConfig, pixmap: PGdkPixmap, + attrib_list: ptr int32): PGdkGLPixmap{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_pixmap_new".} +proc gdk_gl_pixmap_destroy*(glpixmap: PGdkGLPixmap){.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_pixmap_destroy".} +proc gdk_gl_pixmap_get_pixmap*(glpixmap: PGdkGLPixmap): PGdkPixmap{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_pixmap_get_pixmap".} +proc gdk_pixmap_set_gl_capability*(pixmap: PGdkPixmap, glconfig: PGdkGLConfig, + attrib_list: ptr int32): PGdkGLPixmap{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_pixmap_set_gl_capability".} +proc gdk_pixmap_unset_gl_capability*(pixmap: PGdkPixmap){.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_pixmap_unset_gl_capability".} +proc gdk_pixmap_is_gl_capable*(pixmap: PGdkPixmap): gboolean{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_pixmap_is_gl_capable".} +proc gdk_pixmap_get_gl_pixmap*(pixmap: PGdkPixmap): PGdkGLPixmap{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_pixmap_get_gl_pixmap".} +proc gdk_pixmap_get_gl_drawable*(pixmap: PGdkPixmap): PGdkGLDrawable +proc GDK_TYPE_GL_WINDOW*(): GType +proc GDK_GL_WINDOW*(anObject: Pointer): PGdkGLWindow +proc GDK_GL_WINDOW_CLASS*(klass: Pointer): PGdkGLWindowClass +proc GDK_IS_GL_WINDOW*(anObject: Pointer): bool +proc GDK_IS_GL_WINDOW_CLASS*(klass: Pointer): bool +proc GDK_GL_WINDOW_GET_CLASS*(obj: Pointer): PGdkGLWindowClass +proc gdk_gl_window_get_type*(): GType{.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_window_get_type".} +proc gdk_gl_window_new*(glconfig: PGdkGLConfig, window: PGdkWindow, + attrib_list: ptr int32): PGdkGLWindow{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_window_new".} +proc gdk_gl_window_destroy*(glwindow: PGdkGLWindow){.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_window_destroy".} +proc gdk_gl_window_get_window*(glwindow: PGdkGLWindow): PGdkWindow{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_window_get_window".} +proc gdk_window_set_gl_capability*(window: PGdkWindow, glconfig: PGdkGLConfig, + attrib_list: ptr int32): PGdkGLWindow{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_window_set_gl_capability".} +proc gdk_window_unset_gl_capability*(window: PGdkWindow){.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_window_unset_gl_capability".} +proc gdk_window_is_gl_capable*(window: PGdkWindow): gboolean{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_window_is_gl_capable".} +proc gdk_window_get_gl_window*(window: PGdkWindow): PGdkGLWindow{.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_window_get_gl_window".} +proc gdk_window_get_gl_drawable*(window: PGdkWindow): PGdkGLDrawable +proc gdk_gl_draw_cube*(solid: gboolean, size: float64){.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_draw_cube".} +proc gdk_gl_draw_sphere*(solid: gboolean, radius: float64, slices: int32, + stacks: int32){.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_draw_sphere".} +proc gdk_gl_draw_cone*(solid: gboolean, base: float64, height: float64, + slices: int32, stacks: int32){.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_draw_cone".} +proc gdk_gl_draw_torus*(solid: gboolean, inner_radius: float64, + outer_radius: float64, nsides: int32, rings: int32){. + cdecl, dynlib: GdkGLExtLib, importc: "gdk_gl_draw_torus".} +proc gdk_gl_draw_tetrahedron*(solid: gboolean){.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_draw_tetrahedron".} +proc gdk_gl_draw_octahedron*(solid: gboolean){.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_draw_octahedron".} +proc gdk_gl_draw_dodecahedron*(solid: gboolean){.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_draw_dodecahedron".} +proc gdk_gl_draw_icosahedron*(solid: gboolean){.cdecl, dynlib: GdkGLExtLib, + importc: "gdk_gl_draw_icosahedron".} +proc gdk_gl_draw_teapot*(solid: gboolean, scale: float64){.cdecl, + dynlib: GdkGLExtLib, importc: "gdk_gl_draw_teapot".} +proc HEADER_GDKGLEXT_CHECK_VERSION*(major, minor, micro: guint): bool = + result = (HEADER_GDKGLEXT_MAJOR_VERSION > major) or + ((HEADER_GDKGLEXT_MAJOR_VERSION == major) and + (HEADER_GDKGLEXT_MINOR_VERSION > minor)) or + ((HEADER_GDKGLEXT_MAJOR_VERSION == major) and + (HEADER_GDKGLEXT_MINOR_VERSION == minor) and + (HEADER_GDKGLEXT_MICRO_VERSION >= micro)) + +proc GDK_TYPE_GL_CONFIG*(): GType = + result = gdk_gl_config_get_type() + +proc GDK_GL_CONFIG*(anObject: Pointer): PGdkGLConfig = + result = cast[PGdkGLConfig](G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_GL_CONFIG())) + +proc GDK_GL_CONFIG_CLASS*(klass: Pointer): PGdkGLConfigClass = + result = cast[PGdkGLConfigClass](G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_GL_CONFIG())) + +proc GDK_IS_GL_CONFIG*(anObject: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_GL_CONFIG()) + +proc GDK_IS_GL_CONFIG_CLASS*(klass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_GL_CONFIG()) + +proc GDK_GL_CONFIG_GET_CLASS*(obj: Pointer): PGdkGLConfigClass = + result = cast[PGdkGLConfigClass](G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_GL_CONFIG())) + +proc GDK_TYPE_GL_CONTEXT*(): GType = + result = gdk_gl_context_get_type() + +proc GDK_GL_CONTEXT*(anObject: Pointer): PGdkGLContext = + result = cast[PGdkGLContext](G_TYPE_CHECK_INSTANCE_CAST(anObject, + GDK_TYPE_GL_CONTEXT())) + +proc GDK_GL_CONTEXT_CLASS*(klass: Pointer): PGdkGLContextClass = + result = cast[PGdkGLContextClass](G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_GL_CONTEXT())) + +proc GDK_IS_GL_CONTEXT*(anObject: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_GL_CONTEXT()) + +proc GDK_IS_GL_CONTEXT_CLASS*(klass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_GL_CONTEXT()) + +proc GDK_GL_CONTEXT_GET_CLASS*(obj: Pointer): PGdkGLContextClass = + result = cast[PGdkGLContextClass](G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_GL_CONTEXT())) + +proc GDK_TYPE_GL_DRAWABLE*(): GType = + result = gdk_gl_drawable_get_type() + +proc GDK_GL_DRAWABLE*(inst: Pointer): PGdkGLDrawable = + result = cast[PGdkGLDrawable](G_TYPE_CHECK_INSTANCE_CAST(inst, GDK_TYPE_GL_DRAWABLE())) + +proc GDK_GL_DRAWABLE_CLASS*(vtable: Pointer): PGdkGLDrawableClass = + result = cast[PGdkGLDrawableClass](G_TYPE_CHECK_CLASS_CAST(vtable, + GDK_TYPE_GL_DRAWABLE())) + +proc GDK_IS_GL_DRAWABLE*(inst: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(inst, GDK_TYPE_GL_DRAWABLE()) + +proc GDK_IS_GL_DRAWABLE_CLASS*(vtable: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(vtable, GDK_TYPE_GL_DRAWABLE()) + +proc GDK_GL_DRAWABLE_GET_CLASS*(inst: Pointer): PGdkGLDrawableClass = + result = cast[PGdkGLDrawableClass](G_TYPE_INSTANCE_GET_INTERFACE(inst, + GDK_TYPE_GL_DRAWABLE())) + +proc GDK_TYPE_GL_PIXMAP*(): GType = + result = gdk_gl_pixmap_get_type() + +proc GDK_GL_PIXMAP*(anObject: Pointer): PGdkGLPixmap = + result = cast[PGdkGLPixmap](G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_GL_PIXMAP())) + +proc GDK_GL_PIXMAP_CLASS*(klass: Pointer): PGdkGLPixmapClass = + result = cast[PGdkGLPixmapClass](G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_GL_PIXMAP())) + +proc GDK_IS_GL_PIXMAP*(anObject: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_GL_PIXMAP()) + +proc GDK_IS_GL_PIXMAP_CLASS*(klass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_GL_PIXMAP()) + +proc GDK_GL_PIXMAP_GET_CLASS*(obj: Pointer): PGdkGLPixmapClass = + result = cast[PGdkGLPixmapClass](G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_GL_PIXMAP())) + +proc gdk_pixmap_get_gl_drawable*(pixmap: PGdkPixmap): PGdkGLDrawable = + result = GDK_GL_DRAWABLE(gdk_pixmap_get_gl_pixmap(pixmap)) + +proc GDK_TYPE_GL_WINDOW*(): GType = + result = gdk_gl_window_get_type() + +proc GDK_GL_WINDOW*(anObject: Pointer): PGdkGLWindow = + result = cast[PGdkGLWindow](G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_GL_WINDOW())) + +proc GDK_GL_WINDOW_CLASS*(klass: Pointer): PGdkGLWindowClass = + result = cast[PGdkGLWindowClass](G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_GL_WINDOW())) + +proc GDK_IS_GL_WINDOW*(anObject: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_GL_WINDOW()) + +proc GDK_IS_GL_WINDOW_CLASS*(klass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_GL_WINDOW()) + +proc GDK_GL_WINDOW_GET_CLASS*(obj: Pointer): PGdkGLWindowClass = + result = cast[PGdkGLWindowClass](G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_GL_WINDOW())) + +proc gdk_window_get_gl_drawable*(window: PGdkWindow): PGdkGLDrawable = + result = GDK_GL_DRAWABLE(gdk_window_get_gl_window(window)) diff --git a/lib/oldwrappers/gtk/glib2.nim b/lib/oldwrappers/gtk/glib2.nim new file mode 100644 index 000000000..3f33501e8 --- /dev/null +++ b/lib/oldwrappers/gtk/glib2.nim @@ -0,0 +1,4503 @@ +{.deadCodeElim: on.} + +when defined(windows): + const + gliblib = "libglib-2.0-0.dll" + gmodulelib = "libgmodule-2.0-0.dll" + gobjectlib = "libgobject-2.0-0.dll" +else: + const + gliblib = "libglib-2.0.so" + gmodulelib = "libgmodule-2.0.so" + gobjectlib = "libgobject-2.0.so" + +# gthreadlib = "libgthread-2.0.so" + +type + PGTypePlugin* = pointer + PGParamSpecPool* = pointer + PPchar* = ptr cstring + PPPchar* = ptr PPchar + PPPgchar* = ptr PPgchar + PPgchar* = ptr cstring + gchar* = char + gshort* = cshort + glong* = clong + gint* = cint + gboolean* = bool + guchar* = char + gushort* = int16 + gulong* = int + guint* = cint + gfloat* = cfloat + gdouble* = cdouble + gpointer* = pointer + Pgshort* = ptr gshort + Pglong* = ptr glong + Pgint* = ptr gint + PPgint* = ptr Pgint + Pgboolean* = ptr gboolean + Pguchar* = ptr guchar + PPguchar* = ptr Pguchar + Pgushort* = ptr gushort + Pgulong* = ptr gulong + Pguint* = ptr guint + Pgfloat* = ptr gfloat + Pgdouble* = ptr gdouble + pgpointer* = ptr gpointer + gconstpointer* = pointer + PGCompareFunc* = ptr TGCompareFunc + TGCompareFunc* = proc (a, b: gconstpointer): gint{.cdecl.} + PGCompareDataFunc* = ptr TGCompareDataFunc + TGCompareDataFunc* = proc (a, b: gconstpointer, user_data: gpointer): gint{. + cdecl.} + PGEqualFunc* = ptr TGEqualFunc + TGEqualFunc* = proc (a, b: gconstpointer): gboolean{.cdecl.} + PGDestroyNotify* = ptr TGDestroyNotify + TGDestroyNotify* = proc (data: gpointer){.cdecl.} + PGFunc* = ptr TGFunc + TGFunc* = proc (data, userdata: gpointer, key: gconstpointer){.cdecl.} + PGHashFunc* = ptr TGHashFunc + TGHashFunc* = proc (key: gconstpointer): guint{.cdecl.} + PGHFunc* = ptr TGHFunc + TGHFunc* = proc (key, value, user_data: gpointer){.cdecl.} + PGFreeFunc* = proc (data: gpointer){.cdecl.} + PGTimeVal* = ptr TGTimeVal + TGTimeVal* {.final.} = object + tv_sec*: glong + tv_usec*: glong + + guint64* = int64 + gint8* = int8 + guint8* = int8 + gint16* = int16 + guint16* = int16 + gint32* = int32 + guint32* = int32 + gint64* = int64 + gssize* = int32 + gsize* = int32 + Pgint8* = ptr gint8 + Pguint8* = ptr guint8 + Pgint16* = ptr gint16 + Pguint16* = ptr guint16 + Pgint32* = ptr gint32 + Pguint32* = ptr guint32 + Pgint64* = ptr gint64 + Pguint64* = ptr guint64 + pgssize* = ptr gssize + pgsize* = ptr gsize + TGQuark* = guint32 + PGQuark* = ptr TGQuark + PGTypeCValue* = ptr TGTypeCValue + TGTypeCValue* {.final.} = object + v_double*: gdouble + + GType* = gulong + PGType* = ptr GType + PGTypeClass* = ptr TGTypeClass + TGTypeClass* {.final.} = object + g_type*: GType + + PGTypeInstance* = ptr TGTypeInstance + TGTypeInstance* {.final.} = object + g_class*: PGTypeClass + + PGTypeInterface* = ptr TGTypeInterface + TGTypeInterface* {.pure.} = object + g_type*: GType + g_instance_type*: GType + + PGTypeQuery* = ptr TGTypeQuery + TGTypeQuery* {.final.} = object + theType*: GType + type_name*: cstring + class_size*: guint + instance_size*: guint + + PGValue* = ptr TGValue + TGValue* {.final.} = object + g_type*: GType + data*: array[0..1, gdouble] + + PGData* = pointer + PPGData* = ptr PGData + PGSList* = ptr TGSList + PPGSList* = ptr PGSList + TGSList* {.final.} = object + data*: gpointer + next*: PGSList + + PGList* = ptr TGList + TGList* {.final.} = object + data*: gpointer + next*: PGList + prev*: PGList + + TGParamFlags* = int32 + PGParamFlags* = ptr TGParamFlags + PGParamSpec* = ptr TGParamSpec + PPGParamSpec* = ptr PGParamSpec + TGParamSpec* {.final.} = object + g_type_instance*: TGTypeInstance + name*: cstring + flags*: TGParamFlags + value_type*: GType + owner_type*: GType + nick*: cstring + blurb*: cstring + qdata*: PGData + ref_count*: guint + param_id*: guint + + PGParamSpecClass* = ptr TGParamSpecClass + TGParamSpecClass* {.final.} = object + g_type_class*: TGTypeClass + value_type*: GType + finalize*: proc (pspec: PGParamSpec){.cdecl.} + value_set_default*: proc (pspec: PGParamSpec, value: PGValue){.cdecl.} + value_validate*: proc (pspec: PGParamSpec, value: PGValue): gboolean{.cdecl.} + values_cmp*: proc (pspec: PGParamSpec, value1: PGValue, value2: PGValue): gint{. + cdecl.} + dummy*: array[0..3, gpointer] + + PGParameter* = ptr TGParameter + TGParameter* {.final.} = object + name*: cstring + value*: TGValue + + TGBoxedCopyFunc* = proc (boxed: gpointer): gpointer{.cdecl.} + TGBoxedFreeFunc* = proc (boxed: gpointer){.cdecl.} + + PGsource = pointer # I don't know and don't care + +const + G_TYPE_FUNDAMENTAL_SHIFT* = 2 + G_TYPE_FUNDAMENTAL_MAX* = 255 shl G_TYPE_FUNDAMENTAL_SHIFT + G_TYPE_INVALID* = GType(0 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_NONE* = GType(1 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_INTERFACE* = GType(2 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_CHAR* = GType(3 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_UCHAR* = GType(4 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_BOOLEAN* = GType(5 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_INT* = GType(6 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_UINT* = GType(7 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_LONG* = GType(8 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_ULONG* = GType(9 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_INT64* = GType(10 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_UINT64* = GType(11 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_ENUM* = GType(12 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_FLAGS* = GType(13 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_FLOAT* = GType(14 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_DOUBLE* = GType(15 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_STRING* = GType(16 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_POINTER* = GType(17 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_BOXED* = GType(18 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_PARAM* = GType(19 shl G_TYPE_FUNDAMENTAL_SHIFT) + G_TYPE_OBJECT* = GType(20 shl G_TYPE_FUNDAMENTAL_SHIFT) + +proc G_TYPE_MAKE_FUNDAMENTAL*(x: int): GType +const + G_TYPE_RESERVED_GLIB_FIRST* = 21 + G_TYPE_RESERVED_GLIB_LAST* = 31 + G_TYPE_RESERVED_BSE_FIRST* = 32 + G_TYPE_RESERVED_BSE_LAST* = 48 + G_TYPE_RESERVED_USER_FIRST* = 49 + +proc G_TYPE_IS_FUNDAMENTAL*(theType: GType): bool +proc G_TYPE_IS_DERIVED*(theType: GType): bool +proc G_TYPE_IS_INTERFACE*(theType: GType): bool +proc G_TYPE_IS_CLASSED*(theType: GType): gboolean +proc G_TYPE_IS_INSTANTIATABLE*(theType: GType): bool +proc G_TYPE_IS_DERIVABLE*(theType: GType): bool +proc G_TYPE_IS_DEEP_DERIVABLE*(theType: GType): bool +proc G_TYPE_IS_ABSTRACT*(theType: GType): bool +proc G_TYPE_IS_VALUE_ABSTRACT*(theType: GType): bool +proc G_TYPE_IS_VALUE_TYPE*(theType: GType): bool +proc G_TYPE_HAS_VALUE_TABLE*(theType: GType): bool +proc G_TYPE_CHECK_INSTANCE*(instance: Pointer): gboolean +proc G_TYPE_CHECK_INSTANCE_CAST*(instance: Pointer, g_type: GType): PGTypeInstance +proc G_TYPE_CHECK_INSTANCE_TYPE*(instance: Pointer, g_type: GType): bool +proc G_TYPE_INSTANCE_GET_CLASS*(instance: Pointer, g_type: GType): PGTypeClass +proc G_TYPE_INSTANCE_GET_INTERFACE*(instance: Pointer, g_type: GType): Pointer +proc G_TYPE_CHECK_CLASS_CAST*(g_class: pointer, g_type: GType): Pointer +proc G_TYPE_CHECK_CLASS_TYPE*(g_class: pointer, g_type: GType): bool +proc G_TYPE_CHECK_VALUE*(value: Pointer): bool +proc G_TYPE_CHECK_VALUE_TYPE*(value: pointer, g_type: GType): bool +proc G_TYPE_FROM_INSTANCE*(instance: Pointer): GType +proc G_TYPE_FROM_CLASS*(g_class: Pointer): GType +proc G_TYPE_FROM_INTERFACE*(g_iface: Pointer): GType +type + TGTypeDebugFlags* = int32 + PGTypeDebugFlags* = ptr TGTypeDebugFlags + +const + G_TYPE_DEBUG_NONE* = 0 + G_TYPE_DEBUG_OBJECTS* = 1 shl 0 + G_TYPE_DEBUG_SIGNALS* = 1 shl 1 + G_TYPE_DEBUG_MASK* = 0x00000003 + +proc g_type_init*(){.cdecl, dynlib: gobjectlib, importc: "g_type_init".} +proc g_type_init_with_debug_flags*(debug_flags: TGTypeDebugFlags){.cdecl, + dynlib: gobjectlib, importc: "g_type_init_with_debug_flags".} +proc g_type_name*(theType: GType): cstring{.cdecl, dynlib: gobjectlib, + importc: "g_type_name".} +proc g_type_qname*(theType: GType): TGQuark{.cdecl, dynlib: gobjectlib, + importc: "g_type_qname".} +proc g_type_from_name*(name: cstring): GType{.cdecl, dynlib: gobjectlib, + importc: "g_type_from_name".} +proc g_type_parent*(theType: GType): GType{.cdecl, dynlib: gobjectlib, + importc: "g_type_parent".} +proc g_type_depth*(theType: GType): guint{.cdecl, dynlib: gobjectlib, + importc: "g_type_depth".} +proc g_type_next_base*(leaf_type: GType, root_type: GType): GType{.cdecl, + dynlib: gobjectlib, importc: "g_type_next_base".} +proc g_type_is_a*(theType: GType, is_a_type: GType): gboolean{.cdecl, + dynlib: gobjectlib, importc: "g_type_is_a".} +proc g_type_class_ref*(theType: GType): gpointer{.cdecl, dynlib: gobjectlib, + importc: "g_type_class_ref".} +proc g_type_class_peek*(theType: GType): gpointer{.cdecl, dynlib: gobjectlib, + importc: "g_type_class_peek".} +proc g_type_class_unref*(g_class: gpointer){.cdecl, dynlib: gobjectlib, + importc: "g_type_class_unref".} +proc g_type_class_peek_parent*(g_class: gpointer): gpointer{.cdecl, + dynlib: gobjectlib, importc: "g_type_class_peek_parent".} +proc g_type_interface_peek*(instance_class: gpointer, iface_type: GType): gpointer{. + cdecl, dynlib: gobjectlib, importc: "g_type_interface_peek".} +proc g_type_interface_peek_parent*(g_iface: gpointer): gpointer{.cdecl, + dynlib: gobjectlib, importc: "g_type_interface_peek_parent".} +proc g_type_children*(theType: GType, n_children: Pguint): PGType{.cdecl, + dynlib: gobjectlib, importc: "g_type_children".} +proc g_type_interfaces*(theType: GType, n_interfaces: Pguint): PGType{.cdecl, + dynlib: gobjectlib, importc: "g_type_interfaces".} +proc g_type_set_qdata*(theType: GType, quark: TGQuark, data: gpointer){.cdecl, + dynlib: gobjectlib, importc: "g_type_set_qdata".} +proc g_type_get_qdata*(theType: GType, quark: TGQuark): gpointer{.cdecl, + dynlib: gobjectlib, importc: "g_type_get_qdata".} +proc g_type_query*(theType: GType, query: PGTypeQuery){.cdecl, + dynlib: gobjectlib, importc: "g_type_query".} +type + TGBaseInitFunc* = proc (g_class: gpointer){.cdecl.} + TGBaseFinalizeFunc* = proc (g_class: gpointer){.cdecl.} + TGClassInitFunc* = proc (g_class: gpointer, class_data: gpointer){.cdecl.} + TGClassFinalizeFunc* = proc (g_class: gpointer, class_data: gpointer){.cdecl.} + TGInstanceInitFunc* = proc (instance: PGTypeInstance, g_class: gpointer){. + cdecl.} + TGInterfaceInitFunc* = proc (g_iface: gpointer, iface_data: gpointer){.cdecl.} + TGInterfaceFinalizeFunc* = proc (g_iface: gpointer, iface_data: gpointer){. + cdecl.} + TGTypeClassCacheFunc* = proc (cache_data: gpointer, g_class: PGTypeClass): gboolean{. + cdecl.} + TGTypeFundamentalFlags* = int32 + PGTypeFundamentalFlags* = ptr TGTypeFundamentalFlags + +const + G_TYPE_FLAG_CLASSED* = 1 shl 0 + G_TYPE_FLAG_INSTANTIATABLE* = 1 shl 1 + G_TYPE_FLAG_DERIVABLE* = 1 shl 2 + G_TYPE_FLAG_DEEP_DERIVABLE* = 1 shl 3 + +type + TGTypeFlags* = int32 + PGTypeFlags* = ptr TGTypeFlags + +const + G_TYPE_FLAG_ABSTRACT* = 1 shl 4 + G_TYPE_FLAG_VALUE_ABSTRACT* = 1 shl 5 + +type + PGTypeValueTable* = ptr TGTypeValueTable + TGTypeValueTable* {.final.} = object + value_init*: proc (value: PGValue){.cdecl.} + value_free*: proc (value: PGValue){.cdecl.} + value_copy*: proc (src_value: PGValue, dest_value: PGValue){.cdecl.} + value_peek_pointer*: proc (value: PGValue): gpointer{.cdecl.} + collect_format*: cstring + collect_value*: proc (value: PGValue, n_collect_values: guint, + collect_values: PGTypeCValue, collect_flags: guint): cstring{. + cdecl.} + lcopy_format*: cstring + lcopy_value*: proc (value: PGValue, n_collect_values: guint, + collect_values: PGTypeCValue, collect_flags: guint): cstring{. + cdecl.} + + PGTypeInfo* = ptr TGTypeInfo + TGTypeInfo* {.final.} = object + class_size*: guint16 + base_init*: TGBaseInitFunc + base_finalize*: TGBaseFinalizeFunc + class_init*: TGClassInitFunc + class_finalize*: TGClassFinalizeFunc + class_data*: gconstpointer + instance_size*: guint16 + n_preallocs*: guint16 + instance_init*: TGInstanceInitFunc + value_table*: PGTypeValueTable + + PGTypeFundamentalInfo* = ptr TGTypeFundamentalInfo + TGTypeFundamentalInfo* {.final.} = object + type_flags*: TGTypeFundamentalFlags + + PGInterfaceInfo* = ptr TGInterfaceInfo + TGInterfaceInfo* {.final.} = object + interface_init*: TGInterfaceInitFunc + interface_finalize*: TGInterfaceFinalizeFunc + interface_data*: gpointer + + +proc g_type_register_static*(parent_type: GType, type_name: cstring, + info: PGTypeInfo, flags: TGTypeFlags): GType{. + cdecl, dynlib: gobjectlib, importc: "g_type_register_static".} +proc g_type_register_dynamic*(parent_type: GType, type_name: cstring, + plugin: PGTypePlugin, flags: TGTypeFlags): GType{. + cdecl, dynlib: gobjectlib, importc: "g_type_register_dynamic".} +proc g_type_register_fundamental*(type_id: GType, type_name: cstring, + info: PGTypeInfo, + finfo: PGTypeFundamentalInfo, + flags: TGTypeFlags): GType{.cdecl, + dynlib: gobjectlib, importc: "g_type_register_fundamental".} +proc g_type_add_interface_static*(instance_type: GType, interface_type: GType, + info: PGInterfaceInfo){.cdecl, + dynlib: gobjectlib, importc: "g_type_add_interface_static".} +proc g_type_add_interface_dynamic*(instance_type: GType, interface_type: GType, + plugin: PGTypePlugin){.cdecl, + dynlib: gobjectlib, importc: "g_type_add_interface_dynamic".} +proc g_type_interface_add_prerequisite*(interface_type: GType, + prerequisite_type: GType){.cdecl, + dynlib: gobjectlib, importc: "g_type_interface_add_prerequisite".} +proc g_type_get_plugin*(theType: GType): PGTypePlugin{.cdecl, + dynlib: gobjectlib, importc: "g_type_get_plugin".} +proc g_type_interface_get_plugin*(instance_type: GType, + implementation_type: GType): PGTypePlugin{. + cdecl, dynlib: gobjectlib, importc: "g_type_interface_get_plugin".} +proc g_type_fundamental_next*(): GType{.cdecl, dynlib: gobjectlib, + importc: "g_type_fundamental_next".} +proc g_type_fundamental*(type_id: GType): GType{.cdecl, dynlib: gobjectlib, + importc: "g_type_fundamental".} +proc g_type_create_instance*(theType: GType): PGTypeInstance{.cdecl, + dynlib: gobjectlib, importc: "g_type_create_instance".} +proc g_type_free_instance*(instance: PGTypeInstance){.cdecl, dynlib: gobjectlib, + importc: "g_type_free_instance".} +proc g_type_add_class_cache_func*(cache_data: gpointer, + cache_func: TGTypeClassCacheFunc){.cdecl, + dynlib: gobjectlib, importc: "g_type_add_class_cache_func".} +proc g_type_remove_class_cache_func*(cache_data: gpointer, + cache_func: TGTypeClassCacheFunc){.cdecl, + dynlib: gobjectlib, importc: "g_type_remove_class_cache_func".} +proc g_type_class_unref_uncached*(g_class: gpointer){.cdecl, dynlib: gobjectlib, + importc: "g_type_class_unref_uncached".} +proc g_type_value_table_peek*(theType: GType): PGTypeValueTable{.cdecl, + dynlib: gobjectlib, importc: "g_type_value_table_peek".} +proc private_g_type_check_instance*(instance: PGTypeInstance): gboolean{.cdecl, + dynlib: gobjectlib, importc: "g_type_check_instance".} +proc private_g_type_check_instance_cast*(instance: PGTypeInstance, + iface_type: GType): PGTypeInstance{.cdecl, dynlib: gobjectlib, + importc: "g_type_check_instance_cast".} +proc private_g_type_check_instance_is_a*(instance: PGTypeInstance, + iface_type: GType): gboolean{.cdecl, dynlib: gobjectlib, + importc: "g_type_check_instance_is_a".} +proc private_g_type_check_class_cast*(g_class: PGTypeClass, is_a_type: GType): PGTypeClass{. + cdecl, dynlib: gobjectlib, importc: "g_type_check_class_cast".} +proc private_g_type_check_class_is_a*(g_class: PGTypeClass, is_a_type: GType): gboolean{. + cdecl, dynlib: gobjectlib, importc: "g_type_check_class_is_a".} +proc private_g_type_check_is_value_type*(theType: GType): gboolean{.cdecl, + dynlib: gobjectlib, importc: "g_type_check_is_value_type".} +proc private_g_type_check_value*(value: PGValue): gboolean{.cdecl, + dynlib: gobjectlib, importc: "g_type_check_value".} +proc private_g_type_check_value_holds*(value: PGValue, theType: GType): gboolean{. + cdecl, dynlib: gobjectlib, importc: "g_type_check_value_holds".} +proc private_g_type_test_flags*(theType: GType, flags: guint): gboolean{.cdecl, + dynlib: gobjectlib, importc: "g_type_test_flags".} +proc g_type_name_from_instance*(instance: PGTypeInstance): cstring{.cdecl, + dynlib: gobjectlib, importc: "g_type_name_from_instance".} +proc g_type_name_from_class*(g_class: PGTypeClass): cstring{.cdecl, + dynlib: gobjectlib, importc: "g_type_name_from_class".} +const + G_TYPE_FLAG_RESERVED_ID_BIT* = GType(1 shl 0) + +proc G_TYPE_IS_VALUE*(theType: GType): bool +proc G_IS_VALUE*(value: pointer): bool +proc G_VALUE_TYPE*(value: Pointer): GType +proc G_VALUE_TYPE_NAME*(value: Pointer): cstring +proc G_VALUE_HOLDS*(value: pointer, g_type: GType): bool +type + TGValueTransform* = proc (src_value: PGValue, dest_value: PGValue){.cdecl.} + +proc g_value_init*(value: PGValue, g_type: GType): PGValue{.cdecl, + dynlib: gobjectlib, importc: "g_value_init".} +proc g_value_copy*(src_value: PGValue, dest_value: PGValue){.cdecl, + dynlib: gobjectlib, importc: "g_value_copy".} +proc g_value_reset*(value: PGValue): PGValue{.cdecl, dynlib: gobjectlib, + importc: "g_value_reset".} +proc g_value_unset*(value: PGValue){.cdecl, dynlib: gobjectlib, + importc: "g_value_unset".} +proc g_value_set_instance*(value: PGValue, instance: gpointer){.cdecl, + dynlib: gobjectlib, importc: "g_value_set_instance".} +proc g_value_fits_pointer*(value: PGValue): gboolean{.cdecl, dynlib: gobjectlib, + importc: "g_value_fits_pointer".} +proc g_value_peek_pointer*(value: PGValue): gpointer{.cdecl, dynlib: gobjectlib, + importc: "g_value_peek_pointer".} +proc g_value_type_compatible*(src_type: GType, dest_type: GType): gboolean{. + cdecl, dynlib: gobjectlib, importc: "g_value_type_compatible".} +proc g_value_type_transformable*(src_type: GType, dest_type: GType): gboolean{. + cdecl, dynlib: gobjectlib, importc: "g_value_type_transformable".} +proc g_value_transform*(src_value: PGValue, dest_value: PGValue): gboolean{. + cdecl, dynlib: gobjectlib, importc: "g_value_transform".} +proc g_value_register_transform_func*(src_type: GType, dest_type: GType, + transform_func: TGValueTransform){.cdecl, + dynlib: gobjectlib, importc: "g_value_register_transform_func".} +const + G_VALUE_NOCOPY_CONTENTS* = 1 shl 27 + +type + PGValueArray* = ptr TGValueArray + TGValueArray* {.final.} = object + n_values*: guint + values*: PGValue + n_prealloced*: guint + + +proc g_value_array_get_nth*(value_array: PGValueArray, index: guint): PGValue{. + cdecl, dynlib: gobjectlib, importc: "g_value_array_get_nth".} +proc g_value_array_new*(n_prealloced: guint): PGValueArray{.cdecl, + dynlib: gobjectlib, importc: "g_value_array_new".} +proc g_value_array_free*(value_array: PGValueArray){.cdecl, dynlib: gobjectlib, + importc: "g_value_array_free".} +proc g_value_array_copy*(value_array: PGValueArray): PGValueArray{.cdecl, + dynlib: gobjectlib, importc: "g_value_array_copy".} +proc g_value_array_prepend*(value_array: PGValueArray, value: PGValue): PGValueArray{. + cdecl, dynlib: gobjectlib, importc: "g_value_array_prepend".} +proc g_value_array_append*(value_array: PGValueArray, value: PGValue): PGValueArray{. + cdecl, dynlib: gobjectlib, importc: "g_value_array_append".} +proc g_value_array_insert*(value_array: PGValueArray, index: guint, + value: PGValue): PGValueArray{.cdecl, + dynlib: gobjectlib, importc: "g_value_array_insert".} +proc g_value_array_remove*(value_array: PGValueArray, index: guint): PGValueArray{. + cdecl, dynlib: gobjectlib, importc: "g_value_array_remove".} +proc g_value_array_sort*(value_array: PGValueArray, compare_func: TGCompareFunc): PGValueArray{. + cdecl, dynlib: gobjectlib, importc: "g_value_array_sort".} +proc g_value_array_sort_with_data*(value_array: PGValueArray, + compare_func: TGCompareDataFunc, + user_data: gpointer): PGValueArray{.cdecl, + dynlib: gobjectlib, importc: "g_value_array_sort_with_data".} +const + G_VALUE_COLLECT_INT* = 'i' + G_VALUE_COLLECT_LONG* = 'l' + G_VALUE_COLLECT_INT64* = 'q' + G_VALUE_COLLECT_DOUBLE* = 'd' + G_VALUE_COLLECT_POINTER* = 'p' + G_VALUE_COLLECT_FORMAT_MAX_LENGTH* = 8 + +proc G_VALUE_HOLDS_CHAR*(value: PGValue): bool +proc G_VALUE_HOLDS_UCHAR*(value: PGValue): bool +proc G_VALUE_HOLDS_BOOLEAN*(value: PGValue): bool +proc G_VALUE_HOLDS_INT*(value: PGValue): bool +proc G_VALUE_HOLDS_UINT*(value: PGValue): bool +proc G_VALUE_HOLDS_LONG*(value: PGValue): bool +proc G_VALUE_HOLDS_ULONG*(value: PGValue): bool +proc G_VALUE_HOLDS_INT64*(value: PGValue): bool +proc G_VALUE_HOLDS_UINT64*(value: PGValue): bool +proc G_VALUE_HOLDS_FLOAT*(value: PGValue): bool +proc G_VALUE_HOLDS_DOUBLE*(value: PGValue): bool +proc G_VALUE_HOLDS_STRING*(value: PGValue): bool +proc G_VALUE_HOLDS_POINTER*(value: PGValue): bool +proc g_value_set_char*(value: PGValue, v_char: gchar){.cdecl, + dynlib: gobjectlib, importc: "g_value_set_char".} +proc g_value_get_char*(value: PGValue): gchar{.cdecl, dynlib: gobjectlib, + importc: "g_value_get_char".} +proc g_value_set_uchar*(value: PGValue, v_uchar: guchar){.cdecl, + dynlib: gobjectlib, importc: "g_value_set_uchar".} +proc g_value_get_uchar*(value: PGValue): guchar{.cdecl, dynlib: gobjectlib, + importc: "g_value_get_uchar".} +proc g_value_set_boolean*(value: PGValue, v_boolean: gboolean){.cdecl, + dynlib: gobjectlib, importc: "g_value_set_boolean".} +proc g_value_get_boolean*(value: PGValue): gboolean{.cdecl, dynlib: gobjectlib, + importc: "g_value_get_boolean".} +proc g_value_set_int*(value: PGValue, v_int: gint){.cdecl, dynlib: gobjectlib, + importc: "g_value_set_int".} +proc g_value_get_int*(value: PGValue): gint{.cdecl, dynlib: gobjectlib, + importc: "g_value_get_int".} +proc g_value_set_uint*(value: PGValue, v_uint: guint){.cdecl, + dynlib: gobjectlib, importc: "g_value_set_uint".} +proc g_value_get_uint*(value: PGValue): guint{.cdecl, dynlib: gobjectlib, + importc: "g_value_get_uint".} +proc g_value_set_long*(value: PGValue, v_long: glong){.cdecl, + dynlib: gobjectlib, importc: "g_value_set_long".} +proc g_value_get_long*(value: PGValue): glong{.cdecl, dynlib: gobjectlib, + importc: "g_value_get_long".} +proc g_value_set_ulong*(value: PGValue, v_ulong: gulong){.cdecl, + dynlib: gobjectlib, importc: "g_value_set_ulong".} +proc g_value_get_ulong*(value: PGValue): gulong{.cdecl, dynlib: gobjectlib, + importc: "g_value_get_ulong".} +proc g_value_set_int64*(value: PGValue, v_int64: gint64){.cdecl, + dynlib: gobjectlib, importc: "g_value_set_int64".} +proc g_value_get_int64*(value: PGValue): gint64{.cdecl, dynlib: gobjectlib, + importc: "g_value_get_int64".} +proc g_value_set_uint64*(value: PGValue, v_uint64: guint64){.cdecl, + dynlib: gobjectlib, importc: "g_value_set_uint64".} +proc g_value_get_uint64*(value: PGValue): guint64{.cdecl, dynlib: gobjectlib, + importc: "g_value_get_uint64".} +proc g_value_set_float*(value: PGValue, v_float: gfloat){.cdecl, + dynlib: gobjectlib, importc: "g_value_set_float".} +proc g_value_get_float*(value: PGValue): gfloat{.cdecl, dynlib: gobjectlib, + importc: "g_value_get_float".} +proc g_value_set_double*(value: PGValue, v_double: gdouble){.cdecl, + dynlib: gobjectlib, importc: "g_value_set_double".} +proc g_value_get_double*(value: PGValue): gdouble{.cdecl, dynlib: gobjectlib, + importc: "g_value_get_double".} +proc g_value_set_string*(value: PGValue, v_string: cstring){.cdecl, + dynlib: gobjectlib, importc: "g_value_set_string".} +proc g_value_set_static_string*(value: PGValue, v_string: cstring){.cdecl, + dynlib: gobjectlib, importc: "g_value_set_static_string".} +proc g_value_get_string*(value: PGValue): cstring{.cdecl, dynlib: gobjectlib, + importc: "g_value_get_string".} +proc g_value_dup_string*(value: PGValue): cstring{.cdecl, dynlib: gobjectlib, + importc: "g_value_dup_string".} +proc g_value_set_pointer*(value: PGValue, v_pointer: gpointer){.cdecl, + dynlib: gobjectlib, importc: "g_value_set_pointer".} +proc g_value_get_pointer*(value: PGValue): gpointer{.cdecl, dynlib: gobjectlib, + importc: "g_value_get_pointer".} +proc g_pointer_type_register_static*(name: cstring): GType{.cdecl, + dynlib: gobjectlib, importc: "g_pointer_type_register_static".} +proc g_strdup_value_contents*(value: PGValue): cstring{.cdecl, + dynlib: gobjectlib, importc: "g_strdup_value_contents".} +proc g_value_set_string_take_ownership*(value: PGValue, v_string: cstring){. + cdecl, dynlib: gobjectlib, importc: "g_value_set_string_take_ownership".} +type + Tgchararray* = gchar + Pgchararray* = ptr Tgchararray + +proc G_TYPE_IS_PARAM*(theType: GType): bool +proc G_PARAM_SPEC*(pspec: Pointer): PGParamSpec +proc G_IS_PARAM_SPEC*(pspec: Pointer): bool +proc G_PARAM_SPEC_CLASS*(pclass: Pointer): PGParamSpecClass +proc G_IS_PARAM_SPEC_CLASS*(pclass: Pointer): bool +proc G_PARAM_SPEC_GET_CLASS*(pspec: Pointer): PGParamSpecClass +proc G_PARAM_SPEC_TYPE*(pspec: Pointer): GType +proc G_PARAM_SPEC_TYPE_NAME*(pspec: Pointer): cstring +proc G_PARAM_SPEC_VALUE_TYPE*(pspec: Pointer): GType +proc G_VALUE_HOLDS_PARAM*(value: Pointer): bool +const + G_PARAM_READABLE* = 1 shl 0 + G_PARAM_WRITABLE* = 1 shl 1 + G_PARAM_CONSTRUCT* = 1 shl 2 + G_PARAM_CONSTRUCT_ONLY* = 1 shl 3 + G_PARAM_LAX_VALIDATION* = 1 shl 4 + G_PARAM_PRIVATE* = 1 shl 5 + G_PARAM_READWRITE* = G_PARAM_READABLE or G_PARAM_WRITABLE + G_PARAM_MASK* = 0x000000FF + G_PARAM_USER_SHIFT* = 8 + +proc g_param_spec_ref*(pspec: PGParamSpec): PGParamSpec{.cdecl, dynlib: gliblib, + importc: "g_param_spec_ref".} +proc g_param_spec_unref*(pspec: PGParamSpec){.cdecl, dynlib: gliblib, + importc: "g_param_spec_unref".} +proc g_param_spec_sink*(pspec: PGParamSpec){.cdecl, dynlib: gliblib, + importc: "g_param_spec_sink".} +proc g_param_spec_get_qdata*(pspec: PGParamSpec, quark: TGQuark): gpointer{. + cdecl, dynlib: gliblib, importc: "g_param_spec_get_qdata".} +proc g_param_spec_set_qdata*(pspec: PGParamSpec, quark: TGQuark, data: gpointer){. + cdecl, dynlib: gliblib, importc: "g_param_spec_set_qdata".} +proc g_param_spec_set_qdata_full*(pspec: PGParamSpec, quark: TGQuark, + data: gpointer, destroy: TGDestroyNotify){. + cdecl, dynlib: gliblib, importc: "g_param_spec_set_qdata_full".} +proc g_param_spec_steal_qdata*(pspec: PGParamSpec, quark: TGQuark): gpointer{. + cdecl, dynlib: gliblib, importc: "g_param_spec_steal_qdata".} +proc g_param_value_set_default*(pspec: PGParamSpec, value: PGValue){.cdecl, + dynlib: gliblib, importc: "g_param_value_set_default".} +proc g_param_value_defaults*(pspec: PGParamSpec, value: PGValue): gboolean{. + cdecl, dynlib: gliblib, importc: "g_param_value_defaults".} +proc g_param_value_validate*(pspec: PGParamSpec, value: PGValue): gboolean{. + cdecl, dynlib: gliblib, importc: "g_param_value_validate".} +proc g_param_value_convert*(pspec: PGParamSpec, src_value: PGValue, + dest_value: PGValue, strict_validation: gboolean): gboolean{. + cdecl, dynlib: gliblib, importc: "g_param_value_convert".} +proc g_param_values_cmp*(pspec: PGParamSpec, value1: PGValue, value2: PGValue): gint{. + cdecl, dynlib: gliblib, importc: "g_param_values_cmp".} +proc g_param_spec_get_name*(pspec: PGParamSpec): cstring{.cdecl, + dynlib: gliblib, importc: "g_param_spec_get_name".} +proc g_param_spec_get_nick*(pspec: PGParamSpec): cstring{.cdecl, + dynlib: gliblib, importc: "g_param_spec_get_nick".} +proc g_param_spec_get_blurb*(pspec: PGParamSpec): cstring{.cdecl, + dynlib: gliblib, importc: "g_param_spec_get_blurb".} +proc g_value_set_param*(value: PGValue, param: PGParamSpec){.cdecl, + dynlib: gliblib, importc: "g_value_set_param".} +proc g_value_get_param*(value: PGValue): PGParamSpec{.cdecl, dynlib: gliblib, + importc: "g_value_get_param".} +proc g_value_dup_param*(value: PGValue): PGParamSpec{.cdecl, dynlib: gliblib, + importc: "g_value_dup_param".} +proc g_value_set_param_take_ownership*(value: PGValue, param: PGParamSpec){. + cdecl, dynlib: gliblib, importc: "g_value_set_param_take_ownership".} +type + PGParamSpecTypeInfo* = ptr TGParamSpecTypeInfo + TGParamSpecTypeInfo* {.final.} = object + instance_size*: guint16 + n_preallocs*: guint16 + instance_init*: proc (pspec: PGParamSpec){.cdecl.} + value_type*: GType + finalize*: proc (pspec: PGParamSpec){.cdecl.} + value_set_default*: proc (pspec: PGParamSpec, value: PGValue){.cdecl.} + value_validate*: proc (pspec: PGParamSpec, value: PGValue): gboolean{.cdecl.} + values_cmp*: proc (pspec: PGParamSpec, value1: PGValue, value2: PGValue): gint{. + cdecl.} + + +proc g_param_type_register_static*(name: cstring, + pspec_info: PGParamSpecTypeInfo): GType{. + cdecl, dynlib: gliblib, importc: "g_param_type_register_static".} +proc g_param_type_register_static_constant*(name: cstring, + pspec_info: PGParamSpecTypeInfo, opt_type: GType): GType{.cdecl, + dynlib: gliblib, importc: "`g_param_type_register_static_constant`".} +proc g_param_spec_internal*(param_type: GType, name: cstring, nick: cstring, + blurb: cstring, flags: TGParamFlags): gpointer{. + cdecl, dynlib: gliblib, importc: "g_param_spec_internal".} +proc g_param_spec_pool_new*(type_prefixing: gboolean): PGParamSpecPool{.cdecl, + dynlib: gliblib, importc: "g_param_spec_pool_new".} +proc g_param_spec_pool_insert*(pool: PGParamSpecPool, pspec: PGParamSpec, + owner_type: GType){.cdecl, dynlib: gliblib, + importc: "g_param_spec_pool_insert".} +proc g_param_spec_pool_remove*(pool: PGParamSpecPool, pspec: PGParamSpec){. + cdecl, dynlib: gliblib, importc: "g_param_spec_pool_remove".} +proc g_param_spec_pool_lookup*(pool: PGParamSpecPool, param_name: cstring, + owner_type: GType, walk_ancestors: gboolean): PGParamSpec{. + cdecl, dynlib: gliblib, importc: "g_param_spec_pool_lookup".} +proc g_param_spec_pool_list_owned*(pool: PGParamSpecPool, owner_type: GType): PGList{. + cdecl, dynlib: gliblib, importc: "g_param_spec_pool_list_owned".} +proc g_param_spec_pool_list*(pool: PGParamSpecPool, owner_type: GType, + n_pspecs_p: Pguint): PPGParamSpec{.cdecl, + dynlib: gliblib, importc: "g_param_spec_pool_list".} +type + PGClosure* = ptr TGClosure + PGClosureNotifyData* = ptr TGClosureNotifyData + TGClosureNotify* = proc (data: gpointer, closure: PGClosure){.cdecl.} + TGClosure* {.final.} = object + flag0*: int32 + marshal*: proc (closure: PGClosure, return_value: PGValue, + n_param_values: guint, param_values: PGValue, + invocation_hint, marshal_data: gpointer){.cdecl.} + data*: gpointer + notifiers*: PGClosureNotifyData + + TGCallBackProcedure* = proc () {.cdecl.} + TGCallback* = proc () {.cdecl.} + TGClosureMarshal* = proc (closure: PGClosure, return_value: PGValue, + n_param_values: guint, param_values: PGValue, + invocation_hint: gpointer, marshal_data: gpointer){. + cdecl.} + TGClosureNotifyData* {.final.} = object + data*: gpointer + notify*: TGClosureNotify + + +proc G_CLOSURE_NEEDS_MARSHAL*(closure: Pointer): bool +proc G_CLOSURE_N_NOTIFIERS*(cl: PGClosure): int32 +proc G_CCLOSURE_SWAP_DATA*(cclosure: PGClosure): int32 +proc G_CALLBACK*(f: pointer): TGCallback +const + bm_TGClosure_ref_count* = 0x00007FFF'i32 + bp_TGClosure_ref_count* = 0'i32 + bm_TGClosure_meta_marshal* = 0x00008000'i32 + bp_TGClosure_meta_marshal* = 15'i32 + bm_TGClosure_n_guards* = 0x00010000'i32 + bp_TGClosure_n_guards* = 16'i32 + bm_TGClosure_n_fnotifiers* = 0x00060000'i32 + bp_TGClosure_n_fnotifiers* = 17'i32 + bm_TGClosure_n_inotifiers* = 0x07F80000'i32 + bp_TGClosure_n_inotifiers* = 19'i32 + bm_TGClosure_in_inotify* = 0x08000000'i32 + bp_TGClosure_in_inotify* = 27'i32 + bm_TGClosure_floating* = 0x10000000'i32 + bp_TGClosure_floating* = 28'i32 + bm_TGClosure_derivative_flag* = 0x20000000'i32 + bp_TGClosure_derivative_flag* = 29'i32 + bm_TGClosure_in_marshal* = 0x40000000'i32 + bp_TGClosure_in_marshal* = 30'i32 + bm_TGClosure_is_invalid* = 0x80000000'i32 + bp_TGClosure_is_invalid* = 31'i32 + +proc ref_count*(a: var TGClosure): guint +proc set_ref_count*(a: var TGClosure, ref_count: guint) +proc meta_marshal*(a: PGClosure): guint +proc set_meta_marshal*(a: var TGClosure, meta_marshal: guint) +proc n_guards*(a: PGClosure): guint +proc set_n_guards*(a: var TGClosure, n_guards: guint) +proc n_fnotifiers*(a: PGClosure): guint +proc set_n_fnotifiers*(a: var TGClosure, n_fnotifiers: guint) +proc n_inotifiers*(a: PGClosure): guint +proc in_inotify*(a: var TGClosure): guint +proc set_in_inotify*(a: var TGClosure, in_inotify: guint) +proc floating*(a: var TGClosure): guint +proc set_floating*(a: var TGClosure, floating: guint) +proc derivative_flag*(a: PGClosure): guint +proc set_derivative_flag*(a: var TGClosure, derivative_flag: guint) +proc in_marshal*(a: var TGClosure): guint +proc set_in_marshal*(a: var TGClosure, in_marshal: guint) +proc is_invalid*(a: var TGClosure): guint +proc set_is_invalid*(a: var TGClosure, is_invalid: guint) +type + PGCClosure* = ptr TGCClosure + TGCClosure* {.final.} = object + closure*: TGClosure + callback*: gpointer + + +proc g_cclosure_new*(callback_func: TGCallback, user_data: gpointer, + destroy_data: TGClosureNotify): PGClosure{.cdecl, + dynlib: gliblib, importc: "g_cclosure_new".} +proc g_cclosure_new_swap*(callback_func: TGCallback, user_data: gpointer, + destroy_data: TGClosureNotify): PGClosure{.cdecl, + dynlib: gliblib, importc: "g_cclosure_new_swap".} +proc g_signal_type_cclosure_new*(itype: GType, struct_offset: guint): PGClosure{. + cdecl, dynlib: gliblib, importc: "g_signal_type_cclosure_new".} +proc g_closure_ref*(closure: PGClosure): PGClosure{.cdecl, dynlib: gliblib, + importc: "g_closure_ref".} +proc g_closure_sink*(closure: PGClosure){.cdecl, dynlib: gliblib, + importc: "g_closure_sink".} +proc g_closure_unref*(closure: PGClosure){.cdecl, dynlib: gliblib, + importc: "g_closure_unref".} +proc g_closure_new_simple*(sizeof_closure: guint, data: gpointer): PGClosure{. + cdecl, dynlib: gliblib, importc: "g_closure_new_simple".} +proc g_closure_add_finalize_notifier*(closure: PGClosure, notify_data: gpointer, + notify_func: TGClosureNotify){.cdecl, + dynlib: gliblib, importc: "g_closure_add_finalize_notifier".} +proc g_closure_remove_finalize_notifier*(closure: PGClosure, + notify_data: gpointer, notify_func: TGClosureNotify){.cdecl, + dynlib: gliblib, importc: "g_closure_remove_finalize_notifier".} +proc g_closure_add_invalidate_notifier*(closure: PGClosure, + notify_data: gpointer, + notify_func: TGClosureNotify){.cdecl, + dynlib: gliblib, importc: "g_closure_add_invalidate_notifier".} +proc g_closure_remove_invalidate_notifier*(closure: PGClosure, + notify_data: gpointer, notify_func: TGClosureNotify){.cdecl, + dynlib: gliblib, importc: "g_closure_remove_invalidate_notifier".} +proc g_closure_add_marshal_guards*(closure: PGClosure, + pre_marshal_data: gpointer, + pre_marshal_notify: TGClosureNotify, + post_marshal_data: gpointer, + post_marshal_notify: TGClosureNotify){.cdecl, + dynlib: gliblib, importc: "g_closure_add_marshal_guards".} +proc g_closure_set_marshal*(closure: PGClosure, marshal: TGClosureMarshal){. + cdecl, dynlib: gliblib, importc: "g_closure_set_marshal".} +proc g_closure_set_meta_marshal*(closure: PGClosure, marshal_data: gpointer, + meta_marshal: TGClosureMarshal){.cdecl, + dynlib: gliblib, importc: "g_closure_set_meta_marshal".} +proc g_closure_invalidate*(closure: PGClosure){.cdecl, dynlib: gliblib, + importc: "g_closure_invalidate".} +proc g_closure_invoke*(closure: PGClosure, return_value: PGValue, + n_param_values: guint, param_values: PGValue, + invocation_hint: gpointer){.cdecl, dynlib: gliblib, + importc: "g_closure_invoke".} +type + PGSignalInvocationHint* = ptr TGSignalInvocationHint + PGSignalCMarshaller* = ptr TGSignalCMarshaller + TGSignalCMarshaller* = TGClosureMarshal + TGSignalEmissionHook* = proc (ihint: PGSignalInvocationHint, + n_param_values: guint, param_values: PGValue, + data: gpointer): gboolean{.cdecl.} + TGSignalAccumulator* = proc (ihint: PGSignalInvocationHint, + return_accu: PGValue, handler_return: PGValue, + data: gpointer): gboolean{.cdecl.} + PGSignalFlags* = ptr TGSignalFlags + TGSignalFlags* = int32 + TGSignalInvocationHint* {.final.} = object + signal_id*: guint + detail*: TGQuark + run_type*: TGSignalFlags + + PGSignalQuery* = ptr TGSignalQuery + TGSignalQuery* {.final.} = object + signal_id*: guint + signal_name*: cstring + itype*: GType + signal_flags*: TGSignalFlags + return_type*: GType + n_params*: guint + param_types*: PGType + + +const + G_SIGNAL_RUN_FIRST* = 1 shl 0 + G_SIGNAL_RUN_LAST* = 1 shl 1 + G_SIGNAL_RUN_CLEANUP* = 1 shl 2 + G_SIGNAL_NO_RECURSE* = 1 shl 3 + G_SIGNAL_DETAILED* = 1 shl 4 + G_SIGNAL_ACTION* = 1 shl 5 + G_SIGNAL_NO_HOOKS* = 1 shl 6 + G_SIGNAL_FLAGS_MASK* = 0x0000007F + +type + PGConnectFlags* = ptr TGConnectFlags + TGConnectFlags* = int32 + +const + G_CONNECT_AFTER* = 1 shl 0 + G_CONNECT_SWAPPED* = 1 shl 1 + +type + PGSignalMatchType* = ptr TGSignalMatchType + TGSignalMatchType* = int32 + +const + G_SIGNAL_MATCH_ID* = 1 shl 0 + G_SIGNAL_MATCH_DETAIL* = 1 shl 1 + G_SIGNAL_MATCH_CLOSURE* = 1 shl 2 + G_SIGNAL_MATCH_FUNC* = 1 shl 3 + G_SIGNAL_MATCH_DATA* = 1 shl 4 + G_SIGNAL_MATCH_UNBLOCKED* = 1 shl 5 + G_SIGNAL_MATCH_MASK* = 0x0000003F + G_SIGNAL_TYPE_STATIC_SCOPE* = G_TYPE_FLAG_RESERVED_ID_BIT + +proc g_signal_newv*(signal_name: cstring, itype: GType, + signal_flags: TGSignalFlags, class_closure: PGClosure, + accumulator: TGSignalAccumulator, accu_data: gpointer, + c_marshaller: TGSignalCMarshaller, return_type: GType, + n_params: guint, param_types: PGType): guint{.cdecl, + dynlib: gobjectlib, importc: "g_signal_newv".} +proc g_signal_emitv*(instance_and_params: PGValue, signal_id: guint, + detail: TGQuark, return_value: PGValue){.cdecl, + dynlib: gobjectlib, importc: "g_signal_emitv".} +proc g_signal_lookup*(name: cstring, itype: GType): guint{.cdecl, + dynlib: gobjectlib, importc: "g_signal_lookup".} +proc g_signal_name*(signal_id: guint): cstring{.cdecl, dynlib: gobjectlib, + importc: "g_signal_name".} +proc g_signal_query*(signal_id: guint, query: PGSignalQuery){.cdecl, + dynlib: gobjectlib, importc: "g_signal_query".} +proc g_signal_list_ids*(itype: GType, n_ids: Pguint): Pguint{.cdecl, + dynlib: gobjectlib, importc: "g_signal_list_ids".} +proc g_signal_parse_name*(detailed_signal: cstring, itype: GType, + signal_id_p: Pguint, detail_p: PGQuark, + force_detail_quark: gboolean): gboolean{.cdecl, + dynlib: gobjectlib, importc: "g_signal_parse_name".} +proc g_signal_get_invocation_hint*(instance: gpointer): PGSignalInvocationHint{. + cdecl, dynlib: gobjectlib, importc: "g_signal_get_invocation_hint".} +proc g_signal_stop_emission*(instance: gpointer, signal_id: guint, + detail: TGQuark){.cdecl, dynlib: gobjectlib, + importc: "g_signal_stop_emission".} +proc g_signal_stop_emission_by_name*(instance: gpointer, + detailed_signal: cstring){.cdecl, + dynlib: gobjectlib, importc: "g_signal_stop_emission_by_name".} +proc g_signal_add_emission_hook*(signal_id: guint, quark: TGQuark, + hook_func: TGSignalEmissionHook, + hook_data: gpointer, + data_destroy: TGDestroyNotify): gulong{.cdecl, + dynlib: gobjectlib, importc: "g_signal_add_emission_hook".} +proc g_signal_remove_emission_hook*(signal_id: guint, hook_id: gulong){.cdecl, + dynlib: gobjectlib, importc: "g_signal_remove_emission_hook".} +proc g_signal_has_handler_pending*(instance: gpointer, signal_id: guint, + detail: TGQuark, may_be_blocked: gboolean): gboolean{. + cdecl, dynlib: gobjectlib, importc: "g_signal_has_handler_pending".} +proc g_signal_connect_closure_by_id*(instance: gpointer, signal_id: guint, + detail: TGQuark, closure: PGClosure, + after: gboolean): gulong{.cdecl, + dynlib: gobjectlib, importc: "g_signal_connect_closure_by_id".} +proc g_signal_connect_closure*(instance: gpointer, detailed_signal: cstring, + closure: PGClosure, after: gboolean): gulong{. + cdecl, dynlib: gobjectlib, importc: "g_signal_connect_closure".} +proc g_signal_connect_data*(instance: gpointer, detailed_signal: cstring, + c_handler: TGCallback, data: gpointer, + destroy_data: TGClosureNotify, + connect_flags: TGConnectFlags): gulong{.cdecl, + dynlib: gobjectlib, importc: "g_signal_connect_data".} +proc g_signal_handler_block*(instance: gpointer, handler_id: gulong){.cdecl, + dynlib: gobjectlib, importc: "g_signal_handler_block".} +proc g_signal_handler_unblock*(instance: gpointer, handler_id: gulong){.cdecl, + dynlib: gobjectlib, importc: "g_signal_handler_unblock".} +proc g_signal_handler_disconnect*(instance: gpointer, handler_id: gulong){. + cdecl, dynlib: gobjectlib, importc: "g_signal_handler_disconnect".} +proc g_signal_handler_is_connected*(instance: gpointer, handler_id: gulong): gboolean{. + cdecl, dynlib: gobjectlib, importc: "g_signal_handler_is_connected".} +proc g_signal_handler_find*(instance: gpointer, mask: TGSignalMatchType, + signal_id: guint, detail: TGQuark, + closure: PGClosure, func: gpointer, data: gpointer): gulong{. + cdecl, dynlib: gobjectlib, importc: "g_signal_handler_find".} +proc g_signal_handlers_block_matched*(instance: gpointer, + mask: TGSignalMatchType, signal_id: guint, + detail: TGQuark, closure: PGClosure, + func: gpointer, data: gpointer): guint{. + cdecl, dynlib: gobjectlib, importc: "g_signal_handlers_block_matched".} +proc g_signal_handlers_unblock_matched*(instance: gpointer, + mask: TGSignalMatchType, + signal_id: guint, detail: TGQuark, + closure: PGClosure, func: gpointer, + data: gpointer): guint{.cdecl, + dynlib: gobjectlib, importc: "g_signal_handlers_unblock_matched".} +proc g_signal_handlers_disconnect_matched*(instance: gpointer, + mask: TGSignalMatchType, signal_id: guint, detail: TGQuark, + closure: PGClosure, func: gpointer, data: gpointer): guint{.cdecl, + dynlib: gobjectlib, importc: "g_signal_handlers_disconnect_matched".} +proc g_signal_override_class_closure*(signal_id: guint, instance_type: GType, + class_closure: PGClosure){.cdecl, + dynlib: gobjectlib, importc: "g_signal_override_class_closure".} +proc g_signal_chain_from_overridden*(instance_and_params: PGValue, + return_value: PGValue){.cdecl, + dynlib: gobjectlib, importc: "g_signal_chain_from_overridden".} +proc g_signal_connect*(instance: gpointer, detailed_signal: cstring, + c_handler: TGCallback, data: gpointer): gulong +proc g_signal_connect_after*(instance: gpointer, detailed_signal: cstring, + c_handler: TGCallback, data: gpointer): gulong +proc g_signal_connect_swapped*(instance: gpointer, detailed_signal: cstring, + c_handler: TGCallback, data: gpointer): gulong +proc g_signal_handlers_disconnect_by_func*(instance: gpointer, + func, data: gpointer): guint +proc g_signal_handlers_block_by_func*(instance: gpointer, func, data: gpointer) +proc g_signal_handlers_unblock_by_func*(instance: gpointer, func, data: gpointer) +proc g_signal_handlers_destroy*(instance: gpointer){.cdecl, dynlib: gobjectlib, + importc: "g_signal_handlers_destroy".} +proc g_signals_destroy*(itype: GType){.cdecl, dynlib: gobjectlib, + importc: "`g_signals_destroy`".} +type + TGTypePluginUse* = proc (plugin: PGTypePlugin){.cdecl.} + TGTypePluginUnuse* = proc (plugin: PGTypePlugin){.cdecl.} + TGTypePluginCompleteTypeInfo* = proc (plugin: PGTypePlugin, g_type: GType, + info: PGTypeInfo, + value_table: PGTypeValueTable){.cdecl.} + TGTypePluginCompleteInterfaceInfo* = proc (plugin: PGTypePlugin, + instance_type: GType, interface_type: GType, info: PGInterfaceInfo){.cdecl.} + PGTypePluginClass* = ptr TGTypePluginClass + TGTypePluginClass* {.final.} = object + base_iface*: TGTypeInterface + use_plugin*: TGTypePluginUse + unuse_plugin*: TGTypePluginUnuse + complete_type_info*: TGTypePluginCompleteTypeInfo + complete_interface_info*: TGTypePluginCompleteInterfaceInfo + + +proc G_TYPE_TYPE_PLUGIN*(): GType +proc G_TYPE_PLUGIN*(inst: Pointer): PGTypePlugin +proc G_TYPE_PLUGIN_CLASS*(vtable: Pointer): PGTypePluginClass +proc G_IS_TYPE_PLUGIN*(inst: Pointer): bool +proc G_IS_TYPE_PLUGIN_CLASS*(vtable: Pointer): bool +proc G_TYPE_PLUGIN_GET_CLASS*(inst: Pointer): PGTypePluginClass +proc g_type_plugin_get_type*(): GType{.cdecl, dynlib: gliblib, + importc: "g_type_plugin_get_type".} +proc g_type_plugin_use*(plugin: PGTypePlugin){.cdecl, dynlib: gliblib, + importc: "g_type_plugin_use".} +proc g_type_plugin_unuse*(plugin: PGTypePlugin){.cdecl, dynlib: gliblib, + importc: "g_type_plugin_unuse".} +proc g_type_plugin_complete_type_info*(plugin: PGTypePlugin, g_type: GType, + info: PGTypeInfo, + value_table: PGTypeValueTable){.cdecl, + dynlib: gliblib, importc: "g_type_plugin_complete_type_info".} +proc g_type_plugin_complete_interface_info*(plugin: PGTypePlugin, + instance_type: GType, interface_type: GType, info: PGInterfaceInfo){.cdecl, + dynlib: gliblib, importc: "g_type_plugin_complete_interface_info".} +type + PGObject* = ptr TGObject + TGObject* {.pure.} = object + g_type_instance*: TGTypeInstance + ref_count*: guint + qdata*: PGData + + TGObjectGetPropertyFunc* = proc (anObject: PGObject, property_id: guint, + value: PGValue, pspec: PGParamSpec){.cdecl.} + TGObjectSetPropertyFunc* = proc (anObject: PGObject, property_id: guint, + value: PGValue, pspec: PGParamSpec){.cdecl.} + TGObjectFinalizeFunc* = proc (anObject: PGObject){.cdecl.} + TGWeakNotify* = proc (data: gpointer, where_the_object_was: PGObject){.cdecl.} + PGObjectConstructParam* = ptr TGObjectConstructParam + PGObjectClass* = ptr TGObjectClass + TGObjectClass* {.pure.} = object + g_type_class*: TGTypeClass + construct_properties*: PGSList + constructor*: proc (theType: GType, n_construct_properties: guint, + construct_properties: PGObjectConstructParam): PGObject{. + cdecl.} + set_property*: proc (anObject: PGObject, property_id: guint, value: PGValue, + pspec: PGParamSpec){.cdecl.} + get_property*: proc (anObject: PGObject, property_id: guint, value: PGValue, + pspec: PGParamSpec){.cdecl.} + dispose*: proc (anObject: PGObject){.cdecl.} + finalize*: proc (anObject: PGObject){.cdecl.} + dispatch_properties_changed*: proc (anObject: PGObject, n_pspecs: guint, + pspecs: PPGParamSpec){.cdecl.} + notify*: proc (anObject: PGObject, pspec: PGParamSpec){.cdecl.} + pdummy*: array[0..7, gpointer] + + TGObjectConstructParam* {.final.} = object + pspec*: PGParamSpec + value*: PGValue + + +proc G_TYPE_IS_OBJECT*(theType: GType): bool +proc G_OBJECT*(anObject: pointer): PGObject +proc G_OBJECT_CLASS*(class: Pointer): PGObjectClass +proc G_IS_OBJECT*(anObject: pointer): bool +proc G_IS_OBJECT_CLASS*(class: Pointer): bool +proc G_OBJECT_GET_CLASS*(anObject: pointer): PGObjectClass +proc G_OBJECT_TYPE*(anObject: pointer): GType +proc G_OBJECT_TYPE_NAME*(anObject: pointer): cstring +proc G_OBJECT_CLASS_TYPE*(class: Pointer): GType +proc G_OBJECT_CLASS_NAME*(class: Pointer): cstring +proc G_VALUE_HOLDS_OBJECT*(value: Pointer): bool +proc g_object_class_install_property*(oclass: PGObjectClass, property_id: guint, + pspec: PGParamSpec){.cdecl, + dynlib: gobjectlib, importc: "g_object_class_install_property".} +proc g_object_class_find_property*(oclass: PGObjectClass, property_name: cstring): PGParamSpec{. + cdecl, dynlib: gobjectlib, importc: "g_object_class_find_property".} +proc g_object_class_list_properties*(oclass: PGObjectClass, n_properties: Pguint): PPGParamSpec{. + cdecl, dynlib: gobjectlib, importc: "g_object_class_list_properties".} +proc g_object_set_property*(anObject: PGObject, property_name: cstring, + value: PGValue){.cdecl, dynlib: gobjectlib, + importc: "g_object_set_property".} +proc g_object_get_property*(anObject: PGObject, property_name: cstring, + value: PGValue){.cdecl, dynlib: gobjectlib, + importc: "g_object_get_property".} +proc g_object_freeze_notify*(anObject: PGObject){.cdecl, dynlib: gobjectlib, + importc: "g_object_freeze_notify".} +proc g_object_notify*(anObject: PGObject, property_name: cstring){.cdecl, + dynlib: gobjectlib, importc: "g_object_notify".} +proc g_object_thaw_notify*(anObject: PGObject){.cdecl, dynlib: gobjectlib, + importc: "g_object_thaw_notify".} +proc g_object_ref*(anObject: gpointer): gpointer{.cdecl, dynlib: gobjectlib, + importc: "g_object_ref".} +proc g_object_unref*(anObject: gpointer){.cdecl, dynlib: gobjectlib, + importc: "g_object_unref".} +proc g_object_weak_ref*(anObject: PGObject, notify: TGWeakNotify, data: gpointer){. + cdecl, dynlib: gobjectlib, importc: "g_object_weak_ref".} +proc g_object_weak_unref*(anObject: PGObject, notify: TGWeakNotify, + data: gpointer){.cdecl, dynlib: gobjectlib, + importc: "g_object_weak_unref".} +proc g_object_add_weak_pointer*(anObject: PGObject, + weak_pointer_location: Pgpointer){.cdecl, + dynlib: gobjectlib, importc: "g_object_add_weak_pointer".} +proc g_object_remove_weak_pointer*(anObject: PGObject, + weak_pointer_location: Pgpointer){.cdecl, + dynlib: gobjectlib, importc: "g_object_remove_weak_pointer".} +proc g_object_get_qdata*(anObject: PGObject, quark: TGQuark): gpointer{.cdecl, + dynlib: gobjectlib, importc: "g_object_get_qdata".} +proc g_object_set_qdata*(anObject: PGObject, quark: TGQuark, data: gpointer){. + cdecl, dynlib: gobjectlib, importc: "g_object_set_qdata".} +proc g_object_set_qdata_full*(anObject: PGObject, quark: TGQuark, + data: gpointer, destroy: TGDestroyNotify){.cdecl, + dynlib: gobjectlib, importc: "g_object_set_qdata_full".} +proc g_object_steal_qdata*(anObject: PGObject, quark: TGQuark): gpointer{.cdecl, + dynlib: gobjectlib, importc: "g_object_steal_qdata".} +proc g_object_get_data*(anObject: PGObject, key: cstring): gpointer{.cdecl, + dynlib: gobjectlib, importc: "g_object_get_data".} +proc g_object_set_data*(anObject: PGObject, key: cstring, data: gpointer){. + cdecl, dynlib: gobjectlib, importc: "g_object_set_data".} +proc g_object_set_data_full*(anObject: PGObject, key: cstring, data: gpointer, + destroy: TGDestroyNotify){.cdecl, + dynlib: gobjectlib, importc: "g_object_set_data_full".} +proc g_object_steal_data*(anObject: PGObject, key: cstring): gpointer{.cdecl, + dynlib: gobjectlib, importc: "g_object_steal_data".} +proc g_object_watch_closure*(anObject: PGObject, closure: PGClosure){.cdecl, + dynlib: gobjectlib, importc: "g_object_watch_closure".} +proc g_cclosure_new_object*(callback_func: TGCallback, anObject: PGObject): PGClosure{. + cdecl, dynlib: gobjectlib, importc: "g_cclosure_new_object".} +proc g_cclosure_new_object_swap*(callback_func: TGCallback, anObject: PGObject): PGClosure{. + cdecl, dynlib: gobjectlib, importc: "g_cclosure_new_object_swap".} +proc g_closure_new_object*(sizeof_closure: guint, anObject: PGObject): PGClosure{. + cdecl, dynlib: gobjectlib, importc: "g_closure_new_object".} +proc g_value_set_object*(value: PGValue, v_object: gpointer){.cdecl, + dynlib: gobjectlib, importc: "g_value_set_object".} +proc g_value_get_object*(value: PGValue): gpointer{.cdecl, dynlib: gobjectlib, + importc: "g_value_get_object".} +proc g_value_dup_object*(value: PGValue): PGObject{.cdecl, dynlib: gobjectlib, + importc: "g_value_dup_object".} +proc g_signal_connect_object*(instance: gpointer, detailed_signal: cstring, + c_handler: TGCallback, gobject: gpointer, + connect_flags: TGConnectFlags): gulong{.cdecl, + dynlib: gobjectlib, importc: "g_signal_connect_object".} +proc g_object_run_dispose*(anObject: PGObject){.cdecl, dynlib: gobjectlib, + importc: "g_object_run_dispose".} +proc g_value_set_object_take_ownership*(value: PGValue, v_object: gpointer){. + cdecl, dynlib: gobjectlib, importc: "g_value_set_object_take_ownership".} +proc G_OBJECT_WARN_INVALID_PSPEC*(anObject: gpointer, pname: cstring, + property_id: gint, pspec: gpointer) +proc G_OBJECT_WARN_INVALID_PROPERTY_ID*(anObject: gpointer, property_id: gint, + pspec: gpointer) +type + G_FLAGS_TYPE* = GType + +const + G_E* = 2.7182818284590451 + G_LN2* = 0.6931471805599452 + G_LN10* = 2.3025850929940455 + G_PI* = 3.1415926535897936 + G_PI_2* = 1.5707963267948968 + G_PI_4* = 0.7853981633974483 + G_SQRT2* = 1.4142135623730951 + G_LITTLE_ENDIAN* = 1234 + G_BIG_ENDIAN* = 4321 + G_PDP_ENDIAN* = 3412 + +proc GUINT16_SWAP_LE_BE_CONSTANT*(val: guint16): guint16 +proc GUINT32_SWAP_LE_BE_CONSTANT*(val: guint32): guint32 +type + PGEnumClass* = ptr TGEnumClass + PGEnumValue* = ptr TGEnumValue + TGEnumClass* {.final.} = object + g_type_class*: TGTypeClass + minimum*: gint + maximum*: gint + n_values*: guint + values*: PGEnumValue + + TGEnumValue* {.final.} = object + value*: gint + value_name*: cstring + value_nick*: cstring + + PGFlagsClass* = ptr TGFlagsClass + PGFlagsValue* = ptr TGFlagsValue + TGFlagsClass* {.final.} = object + g_type_class*: TGTypeClass + mask*: guint + n_values*: guint + values*: PGFlagsValue + + TGFlagsValue* {.final.} = object + value*: guint + value_name*: cstring + value_nick*: cstring + + +proc G_TYPE_IS_ENUM*(theType: GType): gboolean +proc G_ENUM_CLASS*(class: pointer): PGEnumClass +proc G_IS_ENUM_CLASS*(class: pointer): gboolean +proc G_ENUM_CLASS_TYPE*(class: pointer): GType +proc G_ENUM_CLASS_TYPE_NAME*(class: pointer): cstring +proc G_TYPE_IS_FLAGS*(theType: GType): gboolean +proc G_FLAGS_CLASS*(class: pointer): PGFlagsClass +proc G_IS_FLAGS_CLASS*(class: pointer): gboolean +proc G_FLAGS_CLASS_TYPE*(class: pointer): GType +proc G_FLAGS_CLASS_TYPE_NAME*(class: pointer): cstring +proc G_VALUE_HOLDS_ENUM*(value: pointer): gboolean +proc G_VALUE_HOLDS_FLAGS*(value: pointer): gboolean +proc g_enum_get_value*(enum_class: PGEnumClass, value: gint): PGEnumValue{. + cdecl, dynlib: gliblib, importc: "g_enum_get_value".} +proc g_enum_get_value_by_name*(enum_class: PGEnumClass, name: cstring): PGEnumValue{. + cdecl, dynlib: gliblib, importc: "g_enum_get_value_by_name".} +proc g_enum_get_value_by_nick*(enum_class: PGEnumClass, nick: cstring): PGEnumValue{. + cdecl, dynlib: gliblib, importc: "g_enum_get_value_by_nick".} +proc g_flags_get_first_value*(flags_class: PGFlagsClass, value: guint): PGFlagsValue{. + cdecl, dynlib: gliblib, importc: "g_flags_get_first_value".} +proc g_flags_get_value_by_name*(flags_class: PGFlagsClass, name: cstring): PGFlagsValue{. + cdecl, dynlib: gliblib, importc: "g_flags_get_value_by_name".} +proc g_flags_get_value_by_nick*(flags_class: PGFlagsClass, nick: cstring): PGFlagsValue{. + cdecl, dynlib: gliblib, importc: "g_flags_get_value_by_nick".} +proc g_value_set_enum*(value: PGValue, v_enum: gint){.cdecl, dynlib: gliblib, + importc: "g_value_set_enum".} +proc g_value_get_enum*(value: PGValue): gint{.cdecl, dynlib: gliblib, + importc: "g_value_get_enum".} +proc g_value_set_flags*(value: PGValue, v_flags: guint){.cdecl, dynlib: gliblib, + importc: "g_value_set_flags".} +proc g_value_get_flags*(value: PGValue): guint{.cdecl, dynlib: gliblib, + importc: "g_value_get_flags".} +proc g_enum_register_static*(name: cstring, const_static_values: PGEnumValue): GType{. + cdecl, dynlib: gliblib, importc: "g_enum_register_static".} +proc g_flags_register_static*(name: cstring, const_static_values: PGFlagsValue): GType{. + cdecl, dynlib: gliblib, importc: "g_flags_register_static".} +proc g_enum_complete_type_info*(g_enum_type: GType, info: PGTypeInfo, + const_values: PGEnumValue){.cdecl, + dynlib: gliblib, importc: "g_enum_complete_type_info".} +proc g_flags_complete_type_info*(g_flags_type: GType, info: PGTypeInfo, + const_values: PGFlagsValue){.cdecl, + dynlib: gliblib, importc: "g_flags_complete_type_info".} +const + G_MINFLOAT* = 0.0 + G_MAXFLOAT* = 1.6999999999999995E308 + G_MINDOUBLE* = G_MINFLOAT + G_MAXDOUBLE* = G_MAXFLOAT + G_MAXSHORT* = 32767 + G_MINSHORT* = - G_MAXSHORT - 1 + G_MAXUSHORT* = 2 * G_MAXSHORT + 1 + G_MAXINT* = 2147483647 + G_MININT* = - G_MAXINT - 1 + G_MAXUINT* = -1 + G_MINLONG* = G_MININT + G_MAXLONG* = G_MAXINT + G_MAXULONG* = G_MAXUINT + G_MAXINT64* = high(int64) + G_MININT64* = low(int64) + +const + G_GINT16_FORMAT* = "hi" + G_GUINT16_FORMAT* = "hu" + G_GINT32_FORMAT* = 'i' + G_GUINT32_FORMAT* = 'u' + G_HAVE_GINT64* = 1 + G_GINT64_FORMAT* = "I64i" + G_GUINT64_FORMAT* = "I64u" + GLIB_SIZEOF_VOID_P* = SizeOf(Pointer) + GLIB_SIZEOF_LONG* = SizeOf(int32) + GLIB_SIZEOF_SIZE_T* = SizeOf(int32) + +type + PGSystemThread* = ptr TGSystemThread + TGSystemThread* {.final.} = object + data*: array[0..3, char] + dummy_double*: float64 + dummy_pointer*: pointer + dummy_long*: int32 + + +const + GLIB_SYSDEF_POLLIN* = 1 + GLIB_SYSDEF_POLLOUT* = 4 + GLIB_SYSDEF_POLLPRI* = 2 + GLIB_SYSDEF_POLLERR* = 8 + GLIB_SYSDEF_POLLHUP* = 16 + GLIB_SYSDEF_POLLNVAL* = 32 + +proc GUINT_TO_POINTER*(i: guint): pointer +type + PGAsciiType* = ptr TGAsciiType + TGAsciiType* = int32 + +const + G_ASCII_ALNUM* = 1 shl 0 + G_ASCII_ALPHA* = 1 shl 1 + G_ASCII_CNTRL* = 1 shl 2 + G_ASCII_DIGIT* = 1 shl 3 + G_ASCII_GRAPH* = 1 shl 4 + G_ASCII_LOWER* = 1 shl 5 + G_ASCII_PRINT* = 1 shl 6 + G_ASCII_PUNCT* = 1 shl 7 + G_ASCII_SPACE* = 1 shl 8 + G_ASCII_UPPER* = 1 shl 9 + G_ASCII_XDIGIT* = 1 shl 10 + +proc g_ascii_tolower*(c: gchar): gchar{.cdecl, dynlib: gliblib, + importc: "g_ascii_tolower".} +proc g_ascii_toupper*(c: gchar): gchar{.cdecl, dynlib: gliblib, + importc: "g_ascii_toupper".} +proc g_ascii_digit_value*(c: gchar): gint{.cdecl, dynlib: gliblib, + importc: "g_ascii_digit_value".} +proc g_ascii_xdigit_value*(c: gchar): gint{.cdecl, dynlib: gliblib, + importc: "g_ascii_xdigit_value".} +const + G_STR_DELIMITERS* = "``-|> <." + +proc g_strdelimit*(str: cstring, delimiters: cstring, new_delimiter: gchar): cstring{. + cdecl, dynlib: gliblib, importc: "g_strdelimit".} +proc g_strcanon*(str: cstring, valid_chars: cstring, substitutor: gchar): cstring{. + cdecl, dynlib: gliblib, importc: "g_strcanon".} +proc g_strerror*(errnum: gint): cstring{.cdecl, dynlib: gliblib, + importc: "g_strerror".} +proc g_strsignal*(signum: gint): cstring{.cdecl, dynlib: gliblib, + importc: "g_strsignal".} +proc g_strreverse*(str: cstring): cstring{.cdecl, dynlib: gliblib, + importc: "g_strreverse".} +proc g_strlcpy*(dest: cstring, src: cstring, dest_size: gsize): gsize{.cdecl, + dynlib: gliblib, importc: "g_strlcpy".} +proc g_strlcat*(dest: cstring, src: cstring, dest_size: gsize): gsize{.cdecl, + dynlib: gliblib, importc: "g_strlcat".} +proc g_strstr_len*(haystack: cstring, haystack_len: gssize, needle: cstring): cstring{. + cdecl, dynlib: gliblib, importc: "g_strstr_len".} +proc g_strrstr*(haystack: cstring, needle: cstring): cstring{.cdecl, + dynlib: gliblib, importc: "g_strrstr".} +proc g_strrstr_len*(haystack: cstring, haystack_len: gssize, needle: cstring): cstring{. + cdecl, dynlib: gliblib, importc: "g_strrstr_len".} +proc g_str_has_suffix*(str: cstring, suffix: cstring): gboolean{.cdecl, + dynlib: gliblib, importc: "g_str_has_suffix".} +proc g_str_has_prefix*(str: cstring, prefix: cstring): gboolean{.cdecl, + dynlib: gliblib, importc: "g_str_has_prefix".} +proc g_strtod*(nptr: cstring, endptr: PPgchar): gdouble{.cdecl, dynlib: gliblib, + importc: "g_strtod".} +proc g_ascii_strtod*(nptr: cstring, endptr: PPgchar): gdouble{.cdecl, + dynlib: gliblib, importc: "g_ascii_strtod".} +const + G_ASCII_DTOSTR_BUF_SIZE* = 29 + 10 + +proc g_ascii_dtostr*(buffer: cstring, buf_len: gint, d: gdouble): cstring{. + cdecl, dynlib: gliblib, importc: "g_ascii_dtostr".} +proc g_ascii_formatd*(buffer: cstring, buf_len: gint, format: cstring, + d: gdouble): cstring{.cdecl, dynlib: gliblib, + importc: "g_ascii_formatd".} +proc g_strchug*(str: cstring): cstring{.cdecl, dynlib: gliblib, + importc: "g_strchug".} +proc g_strchomp*(str: cstring): cstring{.cdecl, dynlib: gliblib, + importc: "g_strchomp".} +proc g_ascii_strcasecmp*(s1: cstring, s2: cstring): gint{.cdecl, + dynlib: gliblib, importc: "g_ascii_strcasecmp".} +proc g_ascii_strncasecmp*(s1: cstring, s2: cstring, n: gsize): gint{.cdecl, + dynlib: gliblib, importc: "g_ascii_strncasecmp".} +proc g_ascii_strdown*(str: cstring, len: gssize): cstring{.cdecl, + dynlib: gliblib, importc: "g_ascii_strdown".} +proc g_ascii_strup*(str: cstring, len: gssize): cstring{.cdecl, dynlib: gliblib, + importc: "g_ascii_strup".} +proc g_strdup*(str: cstring): cstring{.cdecl, dynlib: gliblib, + importc: "g_strdup".} +proc g_strndup*(str: cstring, n: gsize): cstring{.cdecl, dynlib: gliblib, + importc: "g_strndup".} +proc g_strnfill*(length: gsize, fill_char: gchar): cstring{.cdecl, + dynlib: gliblib, importc: "g_strnfill".} +proc g_strcompress*(source: cstring): cstring{.cdecl, dynlib: gliblib, + importc: "g_strcompress".} +proc g_strescape*(source: cstring, exceptions: cstring): cstring{.cdecl, + dynlib: gliblib, importc: "g_strescape".} +proc g_memdup*(mem: gconstpointer, byte_size: guint): gpointer{.cdecl, + dynlib: gliblib, importc: "g_memdup".} +proc g_strsplit*(str: cstring, delimiter: cstring, max_tokens: gint): PPgchar{. + cdecl, dynlib: gliblib, importc: "g_strsplit".} +proc g_strjoinv*(separator: cstring, str_array: PPgchar): cstring{.cdecl, + dynlib: gliblib, importc: "g_strjoinv".} +proc g_strfreev*(str_array: PPgchar){.cdecl, dynlib: gliblib, + importc: "g_strfreev".} +proc g_strdupv*(str_array: PPgchar): PPgchar{.cdecl, dynlib: gliblib, + importc: "g_strdupv".} +proc g_stpcpy*(dest: cstring, src: cstring): cstring{.cdecl, dynlib: gliblib, + importc: "g_stpcpy".} +proc g_get_user_name*(): cstring{.cdecl, dynlib: gliblib, + importc: "g_get_user_name".} +proc g_get_real_name*(): cstring{.cdecl, dynlib: gliblib, + importc: "g_get_real_name".} +proc g_get_home_dir*(): cstring{.cdecl, dynlib: gliblib, + importc: "g_get_home_dir".} +proc g_get_tmp_dir*(): cstring{.cdecl, dynlib: gliblib, importc: "g_get_tmp_dir".} +proc g_get_prgname*(): cstring{.cdecl, dynlib: gliblib, importc: "g_get_prgname".} +proc g_set_prgname*(prgname: cstring){.cdecl, dynlib: gliblib, + importc: "g_set_prgname".} +type + PGDebugKey* = ptr TGDebugKey + TGDebugKey* {.final.} = object + key*: cstring + value*: guint + + +proc g_parse_debug_string*(str: cstring, keys: PGDebugKey, nkeys: guint): guint{. + cdecl, dynlib: gliblib, importc: "g_parse_debug_string".} +proc g_path_is_absolute*(file_name: cstring): gboolean{.cdecl, dynlib: gliblib, + importc: "g_path_is_absolute".} +proc g_path_skip_root*(file_name: cstring): cstring{.cdecl, dynlib: gliblib, + importc: "g_path_skip_root".} +proc g_basename*(file_name: cstring): cstring{.cdecl, dynlib: gliblib, + importc: "g_basename".} +proc g_dirname*(file_name: cstring): cstring{.cdecl, dynlib: gliblib, + importc: "g_path_get_dirname".} +proc g_get_current_dir*(): cstring{.cdecl, dynlib: gliblib, + importc: "g_get_current_dir".} +proc g_path_get_basename*(file_name: cstring): cstring{.cdecl, dynlib: gliblib, + importc: "g_path_get_basename".} +proc g_path_get_dirname*(file_name: cstring): cstring{.cdecl, dynlib: gliblib, + importc: "g_path_get_dirname".} +proc g_nullify_pointer*(nullify_location: Pgpointer){.cdecl, dynlib: gliblib, + importc: "g_nullify_pointer".} +proc g_getenv*(variable: cstring): cstring{.cdecl, dynlib: gliblib, + importc: "g_getenv".} +type + TGVoidFunc* = proc (){.cdecl.} + +proc g_atexit*(func: TGVoidFunc){.cdecl, dynlib: gliblib, importc: "g_atexit".} +proc g_find_program_in_path*(program: cstring): cstring{.cdecl, dynlib: gliblib, + importc: "g_find_program_in_path".} +proc g_bit_nth_lsf*(mask: gulong, nth_bit: gint): gint{.cdecl, dynlib: gliblib, + importc: "g_bit_nth_lsf".} +proc g_bit_nth_msf*(mask: gulong, nth_bit: gint): gint{.cdecl, dynlib: gliblib, + importc: "g_bit_nth_msf".} +proc g_bit_storage*(number: gulong): guint{.cdecl, dynlib: gliblib, + importc: "g_bit_storage".} +type + PPGTrashStack* = ptr PGTrashStack + PGTrashStack* = ptr TGTrashStack + TGTrashStack* {.final.} = object + next*: PGTrashStack + + +proc g_trash_stack_push*(stack_p: PPGTrashStack, data_p: gpointer){.cdecl, + dynlib: gliblib, importc: "g_trash_stack_push".} +proc g_trash_stack_pop*(stack_p: PPGTrashStack): gpointer{.cdecl, + dynlib: gliblib, importc: "g_trash_stack_pop".} +proc g_trash_stack_peek*(stack_p: PPGTrashStack): gpointer{.cdecl, + dynlib: gliblib, importc: "g_trash_stack_peek".} +proc g_trash_stack_height*(stack_p: PPGTrashStack): guint{.cdecl, + dynlib: gliblib, importc: "g_trash_stack_height".} +type + PGHashTable* = pointer + TGHRFunc* = proc (key, value, user_data: gpointer): gboolean{.cdecl.} + +proc g_hash_table_new*(hash_func: TGHashFunc, key_equal_func: TGEqualFunc): PGHashTable{. + cdecl, dynlib: gliblib, importc: "g_hash_table_new".} +proc g_hash_table_new_full*(hash_func: TGHashFunc, key_equal_func: TGEqualFunc, + key_destroy_func: TGDestroyNotify, + value_destroy_func: TGDestroyNotify): PGHashTable{. + cdecl, dynlib: gliblib, importc: "g_hash_table_new_full".} +proc g_hash_table_destroy*(hash_table: PGHashTable){.cdecl, dynlib: gliblib, + importc: "g_hash_table_destroy".} +proc g_hash_table_insert*(hash_table: PGHashTable, key: gpointer, + value: gpointer){.cdecl, dynlib: gliblib, + importc: "g_hash_table_insert".} +proc g_hash_table_replace*(hash_table: PGHashTable, key: gpointer, + value: gpointer){.cdecl, dynlib: gliblib, + importc: "g_hash_table_replace".} +proc g_hash_table_remove*(hash_table: PGHashTable, key: gconstpointer): gboolean{. + cdecl, dynlib: gliblib, importc: "g_hash_table_remove".} +proc g_hash_table_steal*(hash_table: PGHashTable, key: gconstpointer): gboolean{. + cdecl, dynlib: gliblib, importc: "g_hash_table_steal".} +proc g_hash_table_lookup*(hash_table: PGHashTable, key: gconstpointer): gpointer{. + cdecl, dynlib: gliblib, importc: "g_hash_table_lookup".} +proc g_hash_table_lookup_extended*(hash_table: PGHashTable, + lookup_key: gconstpointer, + orig_key: Pgpointer, value: Pgpointer): gboolean{. + cdecl, dynlib: gliblib, importc: "g_hash_table_lookup_extended".} +proc g_hash_table_foreach*(hash_table: PGHashTable, func: TGHFunc, + user_data: gpointer){.cdecl, dynlib: gliblib, + importc: "g_hash_table_foreach".} +proc g_hash_table_foreach_remove*(hash_table: PGHashTable, func: TGHRFunc, + user_data: gpointer): guint{.cdecl, + dynlib: gliblib, importc: "g_hash_table_foreach_remove".} +proc g_hash_table_foreach_steal*(hash_table: PGHashTable, func: TGHRFunc, + user_data: gpointer): guint{.cdecl, + dynlib: gliblib, importc: "g_hash_table_foreach_steal".} +proc g_hash_table_size*(hash_table: PGHashTable): guint{.cdecl, dynlib: gliblib, + importc: "g_hash_table_size".} +proc g_str_equal*(v: gconstpointer, v2: gconstpointer): gboolean{.cdecl, + dynlib: gliblib, importc: "g_str_equal".} +proc g_str_hash*(v: gconstpointer): guint{.cdecl, dynlib: gliblib, + importc: "g_str_hash".} +proc g_int_equal*(v: gconstpointer, v2: gconstpointer): gboolean{.cdecl, + dynlib: gliblib, importc: "g_int_equal".} +proc g_int_hash*(v: gconstpointer): guint{.cdecl, dynlib: gliblib, + importc: "g_int_hash".} +proc g_direct_hash*(v: gconstpointer): guint{.cdecl, dynlib: gliblib, + importc: "g_direct_hash".} +proc g_direct_equal*(v: gconstpointer, v2: gconstpointer): gboolean{.cdecl, + dynlib: gliblib, importc: "g_direct_equal".} +proc g_quark_try_string*(str: cstring): TGQuark{.cdecl, dynlib: gliblib, + importc: "g_quark_try_string".} +proc g_quark_from_static_string*(str: cstring): TGQuark{.cdecl, dynlib: gliblib, + importc: "g_quark_from_static_string".} +proc g_quark_from_string*(str: cstring): TGQuark{.cdecl, dynlib: gliblib, + importc: "g_quark_from_string".} +proc g_quark_to_string*(quark: TGQuark): cstring{.cdecl, dynlib: gliblib, + importc: "g_quark_to_string".} +const + G_MEM_ALIGN* = GLIB_SIZEOF_VOID_P + +type + PGMemVTable* = ptr TGMemVTable + TGMemVTable* {.final.} = object + malloc*: proc (n_bytes: gsize): gpointer{.cdecl.} + realloc*: proc (mem: gpointer, n_bytes: gsize): gpointer{.cdecl.} + free*: proc (mem: gpointer){.cdecl.} + calloc*: proc (n_blocks: gsize, n_block_bytes: gsize): gpointer{.cdecl.} + try_malloc*: proc (n_bytes: gsize): gpointer{.cdecl.} + try_realloc*: proc (mem: gpointer, n_bytes: gsize): gpointer{.cdecl.} + + PGMemChunk* = pointer + PGAllocator* = pointer + +proc g_malloc*(n_bytes: gulong): gpointer{.cdecl, dynlib: gliblib, + importc: "g_malloc".} +proc g_malloc0*(n_bytes: gulong): gpointer{.cdecl, dynlib: gliblib, + importc: "g_malloc0".} +proc g_realloc*(mem: gpointer, n_bytes: gulong): gpointer{.cdecl, + dynlib: gliblib, importc: "g_realloc".} +proc g_free*(mem: gpointer){.cdecl, dynlib: gliblib, importc: "g_free".} +proc g_try_malloc*(n_bytes: gulong): gpointer{.cdecl, dynlib: gliblib, + importc: "g_try_malloc".} +proc g_try_realloc*(mem: gpointer, n_bytes: gulong): gpointer{.cdecl, + dynlib: gliblib, importc: "g_try_realloc".} +#proc g_new*(bytes_per_struct, n_structs: gsize): gpointer +#proc g_new0*(bytes_per_struct, n_structs: gsize): gpointer +#proc g_renew*(struct_size: gsize, OldMem: gpointer, n_structs: gsize): gpointer +proc g_mem_set_vtable*(vtable: PGMemVTable){.cdecl, dynlib: gliblib, + importc: "g_mem_set_vtable".} +proc g_mem_is_system_malloc*(): gboolean{.cdecl, dynlib: gliblib, + importc: "g_mem_is_system_malloc".} +proc g_mem_profile*(){.cdecl, dynlib: gliblib, importc: "g_mem_profile".} +proc g_chunk_new*(chunk: Pointer): Pointer +proc g_chunk_new0*(chunk: Pointer): Pointer +proc g_chunk_free*(mem_chunk: PGMemChunk, mem: gpointer) +const + G_ALLOC_ONLY* = 1 + G_ALLOC_AND_FREE* = 2 + +proc g_mem_chunk_new*(name: cstring, atom_size: gint, area_size: gulong, + theType: gint): PGMemChunk{.cdecl, dynlib: gliblib, + importc: "g_mem_chunk_new".} +proc g_mem_chunk_destroy*(mem_chunk: PGMemChunk){.cdecl, dynlib: gliblib, + importc: "g_mem_chunk_destroy".} +proc g_mem_chunk_alloc*(mem_chunk: PGMemChunk): gpointer{.cdecl, + dynlib: gliblib, importc: "g_mem_chunk_alloc".} +proc g_mem_chunk_alloc0*(mem_chunk: PGMemChunk): gpointer{.cdecl, + dynlib: gliblib, importc: "g_mem_chunk_alloc0".} +proc g_mem_chunk_free*(mem_chunk: PGMemChunk, mem: gpointer){.cdecl, + dynlib: gliblib, importc: "g_mem_chunk_free".} +proc g_mem_chunk_clean*(mem_chunk: PGMemChunk){.cdecl, dynlib: gliblib, + importc: "g_mem_chunk_clean".} +proc g_mem_chunk_reset*(mem_chunk: PGMemChunk){.cdecl, dynlib: gliblib, + importc: "g_mem_chunk_reset".} +proc g_mem_chunk_print*(mem_chunk: PGMemChunk){.cdecl, dynlib: gliblib, + importc: "g_mem_chunk_print".} +proc g_mem_chunk_info*(){.cdecl, dynlib: gliblib, importc: "g_mem_chunk_info".} +proc g_blow_chunks*(){.cdecl, dynlib: gliblib, importc: "g_blow_chunks".} +proc g_allocator_new*(name: cstring, n_preallocs: guint): PGAllocator{.cdecl, + dynlib: gliblib, importc: "g_allocator_new".} +proc g_allocator_free*(allocator: PGAllocator){.cdecl, dynlib: gliblib, + importc: "g_allocator_free".} +const + G_ALLOCATOR_LIST* = 1 + G_ALLOCATOR_SLIST* = 2 + G_ALLOCATOR_NODE* = 3 + +proc g_slist_push_allocator*(allocator: PGAllocator){.cdecl, dynlib: gliblib, + importc: "g_slist_push_allocator".} +proc g_slist_pop_allocator*(){.cdecl, dynlib: gliblib, + importc: "g_slist_pop_allocator".} +proc g_slist_alloc*(): PGSList{.cdecl, dynlib: gliblib, importc: "g_slist_alloc".} +proc g_slist_free*(list: PGSList){.cdecl, dynlib: gliblib, + importc: "g_slist_free".} +proc g_slist_free_1*(list: PGSList){.cdecl, dynlib: gliblib, + importc: "g_slist_free_1".} +proc g_slist_append*(list: PGSList, data: gpointer): PGSList{.cdecl, + dynlib: gliblib, importc: "g_slist_append".} +proc g_slist_prepend*(list: PGSList, data: gpointer): PGSList{.cdecl, + dynlib: gliblib, importc: "g_slist_prepend".} +proc g_slist_insert*(list: PGSList, data: gpointer, position: gint): PGSList{. + cdecl, dynlib: gliblib, importc: "g_slist_insert".} +proc g_slist_insert_sorted*(list: PGSList, data: gpointer, func: TGCompareFunc): PGSList{. + cdecl, dynlib: gliblib, importc: "g_slist_insert_sorted".} +proc g_slist_insert_before*(slist: PGSList, sibling: PGSList, data: gpointer): PGSList{. + cdecl, dynlib: gliblib, importc: "g_slist_insert_before".} +proc g_slist_concat*(list1: PGSList, list2: PGSList): PGSList{.cdecl, + dynlib: gliblib, importc: "g_slist_concat".} +proc g_slist_remove*(list: PGSList, data: gconstpointer): PGSList{.cdecl, + dynlib: gliblib, importc: "g_slist_remove".} +proc g_slist_remove_all*(list: PGSList, data: gconstpointer): PGSList{.cdecl, + dynlib: gliblib, importc: "g_slist_remove_all".} +proc g_slist_remove_link*(list: PGSList, link: PGSList): PGSList{.cdecl, + dynlib: gliblib, importc: "g_slist_remove_link".} +proc g_slist_delete_link*(list: PGSList, link: PGSList): PGSList{.cdecl, + dynlib: gliblib, importc: "g_slist_delete_link".} +proc g_slist_reverse*(list: PGSList): PGSList{.cdecl, dynlib: gliblib, + importc: "g_slist_reverse".} +proc g_slist_copy*(list: PGSList): PGSList{.cdecl, dynlib: gliblib, + importc: "g_slist_copy".} +proc g_slist_nth*(list: PGSList, n: guint): PGSList{.cdecl, dynlib: gliblib, + importc: "g_slist_nth".} +proc g_slist_find*(list: PGSList, data: gconstpointer): PGSList{.cdecl, + dynlib: gliblib, importc: "g_slist_find".} +proc g_slist_find_custom*(list: PGSList, data: gconstpointer, + func: TGCompareFunc): PGSList{.cdecl, dynlib: gliblib, + importc: "g_slist_find_custom".} +proc g_slist_position*(list: PGSList, llink: PGSList): gint{.cdecl, + dynlib: gliblib, importc: "g_slist_position".} +proc g_slist_index*(list: PGSList, data: gconstpointer): gint{.cdecl, + dynlib: gliblib, importc: "g_slist_index".} +proc g_slist_last*(list: PGSList): PGSList{.cdecl, dynlib: gliblib, + importc: "g_slist_last".} +proc g_slist_length*(list: PGSList): guint{.cdecl, dynlib: gliblib, + importc: "g_slist_length".} +proc g_slist_foreach*(list: PGSList, func: TGFunc, user_data: gpointer){.cdecl, + dynlib: gliblib, importc: "g_slist_foreach".} +proc g_slist_sort*(list: PGSList, compare_func: TGCompareFunc): PGSList{.cdecl, + dynlib: gliblib, importc: "g_slist_sort".} +proc g_slist_sort_with_data*(list: PGSList, compare_func: TGCompareDataFunc, + user_data: gpointer): PGSList{.cdecl, + dynlib: gliblib, importc: "g_slist_sort_with_data".} +proc g_slist_nth_data*(list: PGSList, n: guint): gpointer{.cdecl, + dynlib: gliblib, importc: "g_slist_nth_data".} +proc g_slist_next*(slist: PGSList): PGSList +proc g_list_push_allocator*(allocator: PGAllocator){.cdecl, dynlib: gliblib, + importc: "g_list_push_allocator".} +proc g_list_pop_allocator*(){.cdecl, dynlib: gliblib, + importc: "g_list_pop_allocator".} +proc g_list_alloc*(): PGList{.cdecl, dynlib: gliblib, importc: "g_list_alloc".} +proc g_list_free*(list: PGList){.cdecl, dynlib: gliblib, importc: "g_list_free".} +proc g_list_free_1*(list: PGList){.cdecl, dynlib: gliblib, + importc: "g_list_free_1".} +proc g_list_append*(list: PGList, data: gpointer): PGList{.cdecl, + dynlib: gliblib, importc: "g_list_append".} +proc g_list_prepend*(list: PGList, data: gpointer): PGList{.cdecl, + dynlib: gliblib, importc: "g_list_prepend".} +proc g_list_insert*(list: PGList, data: gpointer, position: gint): PGList{. + cdecl, dynlib: gliblib, importc: "g_list_insert".} +proc g_list_insert_sorted*(list: PGList, data: gpointer, func: TGCompareFunc): PGList{. + cdecl, dynlib: gliblib, importc: "g_list_insert_sorted".} +proc g_list_insert_before*(list: PGList, sibling: PGList, data: gpointer): PGList{. + cdecl, dynlib: gliblib, importc: "g_list_insert_before".} +proc g_list_concat*(list1: PGList, list2: PGList): PGList{.cdecl, + dynlib: gliblib, importc: "g_list_concat".} +proc g_list_remove*(list: PGList, data: gconstpointer): PGList{.cdecl, + dynlib: gliblib, importc: "g_list_remove".} +proc g_list_remove_all*(list: PGList, data: gconstpointer): PGList{.cdecl, + dynlib: gliblib, importc: "g_list_remove_all".} +proc g_list_remove_link*(list: PGList, llink: PGList): PGList{.cdecl, + dynlib: gliblib, importc: "g_list_remove_link".} +proc g_list_delete_link*(list: PGList, link: PGList): PGList{.cdecl, + dynlib: gliblib, importc: "g_list_delete_link".} +proc g_list_reverse*(list: PGList): PGList{.cdecl, dynlib: gliblib, + importc: "g_list_reverse".} +proc g_list_copy*(list: PGList): PGList{.cdecl, dynlib: gliblib, + importc: "g_list_copy".} +proc g_list_nth*(list: PGList, n: guint): PGList{.cdecl, dynlib: gliblib, + importc: "g_list_nth".} +proc g_list_nth_prev*(list: PGList, n: guint): PGList{.cdecl, dynlib: gliblib, + importc: "g_list_nth_prev".} +proc g_list_find*(list: PGList, data: gconstpointer): PGList{.cdecl, + dynlib: gliblib, importc: "g_list_find".} +proc g_list_find_custom*(list: PGList, data: gconstpointer, func: TGCompareFunc): PGList{. + cdecl, dynlib: gliblib, importc: "g_list_find_custom".} +proc g_list_position*(list: PGList, llink: PGList): gint{.cdecl, + dynlib: gliblib, importc: "g_list_position".} +proc g_list_index*(list: PGList, data: gconstpointer): gint{.cdecl, + dynlib: gliblib, importc: "g_list_index".} +proc g_list_last*(list: PGList): PGList{.cdecl, dynlib: gliblib, + importc: "g_list_last".} +proc g_list_first*(list: PGList): PGList{.cdecl, dynlib: gliblib, + importc: "g_list_first".} +proc g_list_length*(list: PGList): guint{.cdecl, dynlib: gliblib, + importc: "g_list_length".} +proc g_list_foreach*(list: PGList, func: TGFunc, user_data: gpointer){.cdecl, + dynlib: gliblib, importc: "g_list_foreach".} +proc g_list_sort*(list: PGList, compare_func: TGCompareFunc): PGList{.cdecl, + dynlib: gliblib, importc: "g_list_sort".} +proc g_list_sort_with_data*(list: PGList, compare_func: TGCompareDataFunc, + user_data: gpointer): PGList{.cdecl, + dynlib: gliblib, importc: "g_list_sort_with_data".} +proc g_list_nth_data*(list: PGList, n: guint): gpointer{.cdecl, dynlib: gliblib, + importc: "g_list_nth_data".} +proc g_list_previous*(list: PGList): PGList +proc g_list_next*(list: PGList): PGList +type + PGCache* = pointer + TGCacheNewFunc* = proc (key: gpointer): gpointer{.cdecl.} + TGCacheDupFunc* = proc (value: gpointer): gpointer{.cdecl.} + TGCacheDestroyFunc* = proc (value: gpointer){.cdecl.} + +proc g_cache_new*(value_new_func: TGCacheNewFunc, + value_destroy_func: TGCacheDestroyFunc, + key_dup_func: TGCacheDupFunc, + key_destroy_func: TGCacheDestroyFunc, + hash_key_func: TGHashFunc, hash_value_func: TGHashFunc, + key_equal_func: TGEqualFunc): PGCache{.cdecl, dynlib: gliblib, + importc: "g_cache_new".} +proc g_cache_destroy*(cache: PGCache){.cdecl, dynlib: gliblib, + importc: "g_cache_destroy".} +proc g_cache_insert*(cache: PGCache, key: gpointer): gpointer{.cdecl, + dynlib: gliblib, importc: "g_cache_insert".} +proc g_cache_remove*(cache: PGCache, value: gconstpointer){.cdecl, + dynlib: gliblib, importc: "g_cache_remove".} +proc g_cache_key_foreach*(cache: PGCache, func: TGHFunc, user_data: gpointer){. + cdecl, dynlib: gliblib, importc: "g_cache_key_foreach".} +proc g_cache_value_foreach*(cache: PGCache, func: TGHFunc, user_data: gpointer){. + cdecl, dynlib: gliblib, importc: "g_cache_value_foreach".} +type + PGCompletionFunc* = ptr TGCompletionFunc + TGCompletionFunc* = gchar + TGCompletionStrncmpFunc* = proc (s1: cstring, s2: cstring, n: gsize): gint{. + cdecl.} + PGCompletion* = ptr TGCompletion + TGCompletion* {.final.} = object + items*: PGList + func*: TGCompletionFunc + prefix*: cstring + cache*: PGList + strncmp_func*: TGCompletionStrncmpFunc + + +proc g_completion_new*(func: TGCompletionFunc): PGCompletion{.cdecl, + dynlib: gliblib, importc: "g_completion_new".} +proc g_completion_add_items*(cmp: PGCompletion, items: PGList){.cdecl, + dynlib: gliblib, importc: "g_completion_add_items".} +proc g_completion_remove_items*(cmp: PGCompletion, items: PGList){.cdecl, + dynlib: gliblib, importc: "g_completion_remove_items".} +proc g_completion_clear_items*(cmp: PGCompletion){.cdecl, dynlib: gliblib, + importc: "g_completion_clear_items".} +proc g_completion_complete*(cmp: PGCompletion, prefix: cstring, + new_prefix: PPgchar): PGList{.cdecl, + dynlib: gliblib, importc: "g_completion_complete".} +proc g_completion_set_compare*(cmp: PGCompletion, + strncmp_func: TGCompletionStrncmpFunc){.cdecl, + dynlib: gliblib, importc: "g_completion_set_compare".} +proc g_completion_free*(cmp: PGCompletion){.cdecl, dynlib: gliblib, + importc: "g_completion_free".} +type + PGConvertError* = ptr TGConvertError + TGConvertError* = enum + G_CONVERT_ERROR_NO_CONVERSION, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, + G_CONVERT_ERROR_FAILED, G_CONVERT_ERROR_PARTIAL_INPUT, + G_CONVERT_ERROR_BAD_URI, G_CONVERT_ERROR_NOT_ABSOLUTE_PATH + +proc G_CONVERT_ERROR*(): TGQuark +proc g_convert_error_quark*(): TGQuark{.cdecl, dynlib: gliblib, + importc: "g_convert_error_quark".} +type + PGIConv* = ptr TGIConv + TGIConv* = pointer + +proc g_iconv_open*(to_codeset: cstring, from_codeset: cstring): TGIConv{.cdecl, + dynlib: gliblib, importc: "g_iconv_open".} +proc g_iconv*(`converter`: TGIConv, inbuf: PPgchar, inbytes_left: Pgsize, + outbuf: PPgchar, outbytes_left: Pgsize): gsize{.cdecl, + dynlib: gliblib, importc: "g_iconv".} +proc g_iconv_close*(`converter`: TGIConv): gint{.cdecl, dynlib: gliblib, + importc: "g_iconv_close".} +proc g_convert*(str: cstring, len: gssize, to_codeset: cstring, + from_codeset: cstring, bytes_read: Pgsize, + bytes_written: Pgsize, error: pointer): cstring{.cdecl, + dynlib: gliblib, importc: "g_convert".} +proc g_convert_with_iconv*(str: cstring, len: gssize, `converter`: TGIConv, + bytes_read: Pgsize, bytes_written: Pgsize, + error: pointer): cstring{.cdecl, dynlib: gliblib, + importc: "g_convert_with_iconv".} +proc g_convert_with_fallback*(str: cstring, len: gssize, to_codeset: cstring, + from_codeset: cstring, fallback: cstring, + bytes_read: Pgsize, bytes_written: Pgsize, + error: pointer): cstring{.cdecl, dynlib: gliblib, + importc: "g_convert_with_fallback".} +proc g_locale_to_utf8*(opsysstring: cstring, len: gssize, bytes_read: Pgsize, + bytes_written: Pgsize, error: pointer): cstring{.cdecl, + dynlib: gliblib, importc: "g_locale_to_utf8".} +proc g_locale_from_utf8*(utf8string: cstring, len: gssize, bytes_read: Pgsize, + bytes_written: Pgsize, error: pointer): cstring{. + cdecl, dynlib: gliblib, importc: "g_locale_from_utf8".} +proc g_filename_to_utf8*(opsysstring: cstring, len: gssize, bytes_read: Pgsize, + bytes_written: Pgsize, error: pointer): cstring{. + cdecl, dynlib: gliblib, importc: "g_filename_to_utf8".} +proc g_filename_from_utf8*(utf8string: cstring, len: gssize, bytes_read: Pgsize, + bytes_written: Pgsize, error: pointer): cstring{. + cdecl, dynlib: gliblib, importc: "g_filename_from_utf8".} +proc g_filename_from_uri*(uri: cstring, hostname: PPchar, error: pointer): cstring{. + cdecl, dynlib: gliblib, importc: "g_filename_from_uri".} +proc g_filename_to_uri*(filename: cstring, hostname: cstring, error: pointer): cstring{. + cdecl, dynlib: gliblib, importc: "g_filename_to_uri".} +type + TGDataForeachFunc* = proc (key_id: TGQuark, data: gpointer, + user_data: gpointer){.cdecl.} + +proc g_datalist_init*(datalist: PPGData){.cdecl, dynlib: gliblib, + importc: "g_datalist_init".} +proc g_datalist_clear*(datalist: PPGData){.cdecl, dynlib: gliblib, + importc: "g_datalist_clear".} +proc g_datalist_id_get_data*(datalist: PPGData, key_id: TGQuark): gpointer{. + cdecl, dynlib: gliblib, importc: "g_datalist_id_get_data".} +proc g_datalist_id_set_data_full*(datalist: PPGData, key_id: TGQuark, + data: gpointer, destroy_func: TGDestroyNotify){. + cdecl, dynlib: gliblib, importc: "g_datalist_id_set_data_full".} +proc g_datalist_id_remove_no_notify*(datalist: PPGData, key_id: TGQuark): gpointer{. + cdecl, dynlib: gliblib, importc: "g_datalist_id_remove_no_notify".} +proc g_datalist_foreach*(datalist: PPGData, func: TGDataForeachFunc, + user_data: gpointer){.cdecl, dynlib: gliblib, + importc: "g_datalist_foreach".} +proc g_datalist_id_set_data*(datalist: PPGData, key_id: TGQuark, data: gpointer) +proc g_datalist_id_remove_data*(datalist: PPGData, key_id: TGQuark) +proc g_datalist_get_data*(datalist: PPGData, key_str: cstring): PPGData +proc g_datalist_set_data_full*(datalist: PPGData, key_str: cstring, + data: gpointer, destroy_func: TGDestroyNotify) +proc g_datalist_set_data*(datalist: PPGData, key_str: cstring, data: gpointer) +proc g_datalist_remove_no_notify*(datalist: PPGData, key_str: cstring) +proc g_datalist_remove_data*(datalist: PPGData, key_str: cstring) +proc g_dataset_id_get_data*(dataset_location: gconstpointer, key_id: TGQuark): gpointer{. + cdecl, dynlib: gliblib, importc: "g_dataset_id_get_data".} +proc g_dataset_id_set_data_full*(dataset_location: gconstpointer, + key_id: TGQuark, data: gpointer, + destroy_func: TGDestroyNotify){.cdecl, + dynlib: gliblib, importc: "g_dataset_id_set_data_full".} +proc g_dataset_id_remove_no_notify*(dataset_location: gconstpointer, + key_id: TGQuark): gpointer{.cdecl, + dynlib: gliblib, importc: "g_dataset_id_remove_no_notify".} +proc g_dataset_foreach*(dataset_location: gconstpointer, + func: TGDataForeachFunc, user_data: gpointer){.cdecl, + dynlib: gliblib, importc: "g_dataset_foreach".} +proc g_dataset_id_set_data*(location: gconstpointer, key_id: TGQuark, + data: gpointer) +proc g_dataset_id_remove_data*(location: gconstpointer, key_id: TGQuark) +proc g_dataset_get_data*(location: gconstpointer, key_str: cstring): gpointer +proc g_dataset_set_data_full*(location: gconstpointer, key_str: cstring, + data: gpointer, destroy_func: TGDestroyNotify) +proc g_dataset_remove_no_notify*(location: gconstpointer, key_str: cstring) +proc g_dataset_set_data*(location: gconstpointer, key_str: cstring, + data: gpointer) +proc g_dataset_remove_data*(location: gconstpointer, key_str: cstring) +type + PGTime* = ptr TGTime + TGTime* = gint32 + PGDateYear* = ptr TGDateYear + TGDateYear* = guint16 + PGDateDay* = ptr TGDateDay + TGDateDay* = guint8 + Ptm* = ptr Ttm + Ttm* {.final.} = object + tm_sec*: gint + tm_min*: gint + tm_hour*: gint + tm_mday*: gint + tm_mon*: gint + tm_year*: gint + tm_wday*: gint + tm_yday*: gint + tm_isdst*: gint + tm_gmtoff*: glong + tm_zone*: cstring + + +type + PGDateDMY* = ptr TGDateDMY + TGDateDMY* = int + +const + G_DATE_DAY* = 0 + G_DATE_MONTH* = 1 + G_DATE_YEAR* = 2 + +type + PGDateWeekday* = ptr TGDateWeekday + TGDateWeekday* = int + +const + G_DATE_BAD_WEEKDAY* = 0 + G_DATE_MONDAY* = 1 + G_DATE_TUESDAY* = 2 + G_DATE_WEDNESDAY* = 3 + G_DATE_THURSDAY* = 4 + G_DATE_FRIDAY* = 5 + G_DATE_SATURDAY* = 6 + G_DATE_SUNDAY* = 7 + +type + PGDateMonth* = ptr TGDateMonth + TGDateMonth* = int + +const + G_DATE_BAD_MONTH* = 0 + G_DATE_JANUARY* = 1 + G_DATE_FEBRUARY* = 2 + G_DATE_MARCH* = 3 + G_DATE_APRIL* = 4 + G_DATE_MAY* = 5 + G_DATE_JUNE* = 6 + G_DATE_JULY* = 7 + G_DATE_AUGUST* = 8 + G_DATE_SEPTEMBER* = 9 + G_DATE_OCTOBER* = 10 + G_DATE_NOVEMBER* = 11 + G_DATE_DECEMBER* = 12 + +const + G_DATE_BAD_JULIAN* = 0 + G_DATE_BAD_DAY* = 0 + G_DATE_BAD_YEAR* = 0 + +type + PGDate* = ptr TGDate + TGDate* {.final.} = object + flag0*: int32 + flag1*: int32 + + +proc g_date_new*(): PGDate{.cdecl, dynlib: gliblib, importc: "g_date_new".} +proc g_date_new_dmy*(day: TGDateDay, month: TGDateMonth, year: TGDateYear): PGDate{. + cdecl, dynlib: gliblib, importc: "g_date_new_dmy".} +proc g_date_new_julian*(julian_day: guint32): PGDate{.cdecl, dynlib: gliblib, + importc: "g_date_new_julian".} +proc g_date_free*(date: PGDate){.cdecl, dynlib: gliblib, importc: "g_date_free".} +proc g_date_valid*(date: PGDate): gboolean{.cdecl, dynlib: gliblib, + importc: "g_date_valid".} +proc g_date_valid_month*(month: TGDateMonth): gboolean{.cdecl, dynlib: gliblib, + importc: "g_date_valid_month".} +proc g_date_valid_year*(year: TGDateYear): gboolean{.cdecl, dynlib: gliblib, + importc: "g_date_valid_year".} +proc g_date_valid_weekday*(weekday: TGDateWeekday): gboolean{.cdecl, + dynlib: gliblib, importc: "g_date_valid_weekday".} +proc g_date_valid_julian*(julian_date: guint32): gboolean{.cdecl, + dynlib: gliblib, importc: "g_date_valid_julian".} +proc g_date_get_weekday*(date: PGDate): TGDateWeekday{.cdecl, dynlib: gliblib, + importc: "g_date_get_weekday".} +proc g_date_get_month*(date: PGDate): TGDateMonth{.cdecl, dynlib: gliblib, + importc: "g_date_get_month".} +proc g_date_get_year*(date: PGDate): TGDateYear{.cdecl, dynlib: gliblib, + importc: "g_date_get_year".} +proc g_date_get_day*(date: PGDate): TGDateDay{.cdecl, dynlib: gliblib, + importc: "g_date_get_day".} +proc g_date_get_julian*(date: PGDate): guint32{.cdecl, dynlib: gliblib, + importc: "g_date_get_julian".} +proc g_date_get_day_of_year*(date: PGDate): guint{.cdecl, dynlib: gliblib, + importc: "g_date_get_day_of_year".} +proc g_date_get_monday_week_of_year*(date: PGDate): guint{.cdecl, + dynlib: gliblib, importc: "g_date_get_monday_week_of_year".} +proc g_date_get_sunday_week_of_year*(date: PGDate): guint{.cdecl, + dynlib: gliblib, importc: "g_date_get_sunday_week_of_year".} +proc g_date_clear*(date: PGDate, n_dates: guint){.cdecl, dynlib: gliblib, + importc: "g_date_clear".} +proc g_date_set_parse*(date: PGDate, str: cstring){.cdecl, dynlib: gliblib, + importc: "g_date_set_parse".} +proc g_date_set_time*(date: PGDate, time: TGTime){.cdecl, dynlib: gliblib, + importc: "g_date_set_time".} +proc g_date_set_month*(date: PGDate, month: TGDateMonth){.cdecl, + dynlib: gliblib, importc: "g_date_set_month".} +proc g_date_set_day*(date: PGDate, day: TGDateDay){.cdecl, dynlib: gliblib, + importc: "g_date_set_day".} +proc g_date_set_year*(date: PGDate, year: TGDateYear){.cdecl, dynlib: gliblib, + importc: "g_date_set_year".} +proc g_date_set_dmy*(date: PGDate, day: TGDateDay, month: TGDateMonth, + y: TGDateYear){.cdecl, dynlib: gliblib, + importc: "g_date_set_dmy".} +proc g_date_set_julian*(date: PGDate, julian_date: guint32){.cdecl, + dynlib: gliblib, importc: "g_date_set_julian".} +proc g_date_is_first_of_month*(date: PGDate): gboolean{.cdecl, dynlib: gliblib, + importc: "g_date_is_first_of_month".} +proc g_date_is_last_of_month*(date: PGDate): gboolean{.cdecl, dynlib: gliblib, + importc: "g_date_is_last_of_month".} +proc g_date_add_days*(date: PGDate, n_days: guint){.cdecl, dynlib: gliblib, + importc: "g_date_add_days".} +proc g_date_subtract_days*(date: PGDate, n_days: guint){.cdecl, dynlib: gliblib, + importc: "g_date_subtract_days".} +proc g_date_add_months*(date: PGDate, n_months: guint){.cdecl, dynlib: gliblib, + importc: "g_date_add_months".} +proc g_date_subtract_months*(date: PGDate, n_months: guint){.cdecl, + dynlib: gliblib, importc: "g_date_subtract_months".} +proc g_date_add_years*(date: PGDate, n_years: guint){.cdecl, dynlib: gliblib, + importc: "g_date_add_years".} +proc g_date_subtract_years*(date: PGDate, n_years: guint){.cdecl, + dynlib: gliblib, importc: "g_date_subtract_years".} +proc g_date_is_leap_year*(year: TGDateYear): gboolean{.cdecl, dynlib: gliblib, + importc: "g_date_is_leap_year".} +proc g_date_get_days_in_month*(month: TGDateMonth, year: TGDateYear): guint8{. + cdecl, dynlib: gliblib, importc: "g_date_get_days_in_month".} +proc g_date_get_monday_weeks_in_year*(year: TGDateYear): guint8{.cdecl, + dynlib: gliblib, importc: "g_date_get_monday_weeks_in_year".} +proc g_date_get_sunday_weeks_in_year*(year: TGDateYear): guint8{.cdecl, + dynlib: gliblib, importc: "g_date_get_sunday_weeks_in_year".} +proc g_date_days_between*(date1: PGDate, date2: PGDate): gint{.cdecl, + dynlib: gliblib, importc: "g_date_days_between".} +proc g_date_compare*(lhs: PGDate, rhs: PGDate): gint{.cdecl, dynlib: gliblib, + importc: "g_date_compare".} +proc g_date_to_struct_tm*(date: PGDate, tm: Ptm){.cdecl, dynlib: gliblib, + importc: "g_date_to_struct_tm".} +proc g_date_clamp*(date: PGDate, min_date: PGDate, max_date: PGDate){.cdecl, + dynlib: gliblib, importc: "g_date_clamp".} +proc g_date_order*(date1: PGDate, date2: PGDate){.cdecl, dynlib: gliblib, + importc: "g_date_order".} +proc g_date_strftime*(s: cstring, slen: gsize, format: cstring, date: PGDate): gsize{. + cdecl, dynlib: gliblib, importc: "g_date_strftime".} +type + PGDir* = pointer + +proc g_dir_open*(path: cstring, flags: guint, error: pointer): PGDir{.cdecl, + dynlib: gliblib, importc: "g_dir_open".} +proc g_dir_read_name*(dir: PGDir): cstring{.cdecl, dynlib: gliblib, + importc: "g_dir_read_name".} +proc g_dir_rewind*(dir: PGDir){.cdecl, dynlib: gliblib, importc: "g_dir_rewind".} +proc g_dir_close*(dir: PGDir){.cdecl, dynlib: gliblib, importc: "g_dir_close".} +type + PGFileError* = ptr TGFileError + TGFileError* = gint + +type + PGFileTest* = ptr TGFileTest + TGFileTest* = int + +const + G_FILE_TEST_IS_REGULAR* = 1 shl 0 + G_FILE_TEST_IS_SYMLINK* = 1 shl 1 + G_FILE_TEST_IS_DIR* = 1 shl 2 + G_FILE_TEST_IS_EXECUTABLE* = 1 shl 3 + G_FILE_TEST_EXISTS* = 1 shl 4 + +const + G_FILE_ERROR_EXIST* = 0 + G_FILE_ERROR_ISDIR* = 1 + G_FILE_ERROR_ACCES* = 2 + G_FILE_ERROR_NAMETOOLONG* = 3 + G_FILE_ERROR_NOENT* = 4 + G_FILE_ERROR_NOTDIR* = 5 + G_FILE_ERROR_NXIO* = 6 + G_FILE_ERROR_NODEV* = 7 + G_FILE_ERROR_ROFS* = 8 + G_FILE_ERROR_TXTBSY* = 9 + G_FILE_ERROR_FAULT* = 10 + G_FILE_ERROR_LOOP* = 11 + G_FILE_ERROR_NOSPC* = 12 + G_FILE_ERROR_NOMEM* = 13 + G_FILE_ERROR_MFILE* = 14 + G_FILE_ERROR_NFILE* = 15 + G_FILE_ERROR_BADF* = 16 + G_FILE_ERROR_INVAL* = 17 + G_FILE_ERROR_PIPE* = 18 + G_FILE_ERROR_AGAIN* = 19 + G_FILE_ERROR_INTR* = 20 + G_FILE_ERROR_IO* = 21 + G_FILE_ERROR_PERM* = 22 + G_FILE_ERROR_FAILED* = 23 + +proc G_FILE_ERROR*(): TGQuark +proc g_file_error_quark*(): TGQuark{.cdecl, dynlib: gliblib, + importc: "g_file_error_quark".} +proc g_file_error_from_errno*(err_no: gint): TGFileError{.cdecl, + dynlib: gliblib, importc: "g_file_error_from_errno".} +proc g_file_test*(filename: cstring, test: TGFileTest): gboolean{.cdecl, + dynlib: gliblib, importc: "g_file_test".} +proc g_file_get_contents*(filename: cstring, contents: PPgchar, length: Pgsize, + error: pointer): gboolean{.cdecl, dynlib: gliblib, + importc: "g_file_get_contents".} +proc g_mkstemp*(tmpl: cstring): int32{.cdecl, dynlib: gliblib, + importc: "g_mkstemp".} +proc g_file_open_tmp*(tmpl: cstring, name_used: PPchar, error: pointer): int32{. + cdecl, dynlib: gliblib, importc: "g_file_open_tmp".} +type + PGHook* = ptr TGHook + TGHook* {.final.} = object + data*: gpointer + next*: PGHook + prev*: PGHook + ref_count*: guint + hook_id*: gulong + flags*: guint + func*: gpointer + destroy*: TGDestroyNotify + + PGHookList* = ptr TGHookList + TGHookCompareFunc* = proc (new_hook: PGHook, sibling: PGHook): gint{.cdecl.} + TGHookFindFunc* = proc (hook: PGHook, data: gpointer): gboolean{.cdecl.} + TGHookMarshaller* = proc (hook: PGHook, marshal_data: gpointer){.cdecl.} + TGHookCheckMarshaller* = proc (hook: PGHook, marshal_data: gpointer): gboolean{. + cdecl.} + TGHookFunc* = proc (data: gpointer){.cdecl.} + TGHookCheckFunc* = proc (data: gpointer): gboolean{.cdecl.} + TGHookFinalizeFunc* = proc (hook_list: PGHookList, hook: PGHook){.cdecl.} + TGHookList* {.final.} = object + seq_id*: gulong + flag0*: int32 + hooks*: PGHook + hook_memchunk*: PGMemChunk + finalize_hook*: TGHookFinalizeFunc + dummy*: array[0..1, gpointer] + + +type + PGHookFlagMask* = ptr TGHookFlagMask + TGHookFlagMask* = int + +const + G_HOOK_FLAG_ACTIVE* = 1'i32 shl 0'i32 + G_HOOK_FLAG_IN_CALL* = 1'i32 shl 1'i32 + G_HOOK_FLAG_MASK* = 0x0000000F'i32 + +const + G_HOOK_FLAG_USER_SHIFT* = 4'i32 + bm_TGHookList_hook_size* = 0x0000FFFF'i32 + bp_TGHookList_hook_size* = 0'i32 + bm_TGHookList_is_setup* = 0x00010000'i32 + bp_TGHookList_is_setup* = 16'i32 + +proc TGHookList_hook_size*(a: var TGHookList): guint +proc TGHookList_set_hook_size*(a: var TGHookList, `hook_size`: guint) +proc TGHookList_is_setup*(a: var TGHookList): guint +proc TGHookList_set_is_setup*(a: var TGHookList, `is_setup`: guint) +proc G_HOOK*(hook: pointer): PGHook +proc G_HOOK_FLAGS*(hook: PGHook): guint +proc G_HOOK_ACTIVE*(hook: PGHook): bool +proc G_HOOK_IN_CALL*(hook: PGHook): bool +proc G_HOOK_IS_VALID*(hook: PGHook): bool +proc G_HOOK_IS_UNLINKED*(hook: PGHook): bool +proc g_hook_list_init*(hook_list: PGHookList, hook_size: guint){.cdecl, + dynlib: gliblib, importc: "g_hook_list_init".} +proc g_hook_list_clear*(hook_list: PGHookList){.cdecl, dynlib: gliblib, + importc: "g_hook_list_clear".} +proc g_hook_alloc*(hook_list: PGHookList): PGHook{.cdecl, dynlib: gliblib, + importc: "g_hook_alloc".} +proc g_hook_free*(hook_list: PGHookList, hook: PGHook){.cdecl, dynlib: gliblib, + importc: "g_hook_free".} +proc g_hook_ref*(hook_list: PGHookList, hook: PGHook){.cdecl, dynlib: gliblib, + importc: "g_hook_ref".} +proc g_hook_unref*(hook_list: PGHookList, hook: PGHook){.cdecl, dynlib: gliblib, + importc: "g_hook_unref".} +proc g_hook_destroy*(hook_list: PGHookList, hook_id: gulong): gboolean{.cdecl, + dynlib: gliblib, importc: "g_hook_destroy".} +proc g_hook_destroy_link*(hook_list: PGHookList, hook: PGHook){.cdecl, + dynlib: gliblib, importc: "g_hook_destroy_link".} +proc g_hook_prepend*(hook_list: PGHookList, hook: PGHook){.cdecl, + dynlib: gliblib, importc: "g_hook_prepend".} +proc g_hook_insert_before*(hook_list: PGHookList, sibling: PGHook, hook: PGHook){. + cdecl, dynlib: gliblib, importc: "g_hook_insert_before".} +proc g_hook_insert_sorted*(hook_list: PGHookList, hook: PGHook, + func: TGHookCompareFunc){.cdecl, dynlib: gliblib, + importc: "g_hook_insert_sorted".} +proc g_hook_get*(hook_list: PGHookList, hook_id: gulong): PGHook{.cdecl, + dynlib: gliblib, importc: "g_hook_get".} +proc g_hook_find*(hook_list: PGHookList, need_valids: gboolean, + func: TGHookFindFunc, data: gpointer): PGHook{.cdecl, + dynlib: gliblib, importc: "g_hook_find".} +proc g_hook_find_data*(hook_list: PGHookList, need_valids: gboolean, + data: gpointer): PGHook{.cdecl, dynlib: gliblib, + importc: "g_hook_find_data".} +proc g_hook_find_func*(hook_list: PGHookList, need_valids: gboolean, + func: gpointer): PGHook{.cdecl, dynlib: gliblib, + importc: "g_hook_find_func".} +proc g_hook_find_func_data*(hook_list: PGHookList, need_valids: gboolean, + func: gpointer, data: gpointer): PGHook{.cdecl, + dynlib: gliblib, importc: "g_hook_find_func_data".} +proc g_hook_first_valid*(hook_list: PGHookList, may_be_in_call: gboolean): PGHook{. + cdecl, dynlib: gliblib, importc: "g_hook_first_valid".} +proc g_hook_next_valid*(hook_list: PGHookList, hook: PGHook, + may_be_in_call: gboolean): PGHook{.cdecl, + dynlib: gliblib, importc: "g_hook_next_valid".} +proc g_hook_compare_ids*(new_hook: PGHook, sibling: PGHook): gint{.cdecl, + dynlib: gliblib, importc: "g_hook_compare_ids".} +proc g_hook_append*(hook_list: PGHookList, hook: PGHook) +proc g_hook_list_invoke_check*(hook_list: PGHookList, may_recurse: gboolean){. + cdecl, dynlib: gliblib, importc: "g_hook_list_invoke_check".} +proc g_hook_list_marshal*(hook_list: PGHookList, may_recurse: gboolean, + marshaller: TGHookMarshaller, marshal_data: gpointer){. + cdecl, dynlib: gliblib, importc: "g_hook_list_marshal".} +proc g_hook_list_marshal_check*(hook_list: PGHookList, may_recurse: gboolean, + marshaller: TGHookCheckMarshaller, + marshal_data: gpointer){.cdecl, dynlib: gliblib, + importc: "g_hook_list_marshal_check".} +type + PGThreadPool* = ptr TGThreadPool + TGThreadPool* {.final.} = object + func*: TGFunc + user_data*: gpointer + exclusive*: gboolean + + +proc g_thread_pool_new*(func: TGFunc, user_data: gpointer, max_threads: gint, + exclusive: gboolean, error: pointer): PGThreadPool{. + cdecl, dynlib: gliblib, importc: "g_thread_pool_new".} +proc g_thread_pool_push*(pool: PGThreadPool, data: gpointer, error: pointer){. + cdecl, dynlib: gliblib, importc: "g_thread_pool_push".} +proc g_thread_pool_set_max_threads*(pool: PGThreadPool, max_threads: gint, + error: pointer){.cdecl, dynlib: gliblib, + importc: "g_thread_pool_set_max_threads".} +proc g_thread_pool_get_max_threads*(pool: PGThreadPool): gint{.cdecl, + dynlib: gliblib, importc: "g_thread_pool_get_max_threads".} +proc g_thread_pool_get_num_threads*(pool: PGThreadPool): guint{.cdecl, + dynlib: gliblib, importc: "g_thread_pool_get_num_threads".} +proc g_thread_pool_unprocessed*(pool: PGThreadPool): guint{.cdecl, + dynlib: gliblib, importc: "g_thread_pool_unprocessed".} +proc g_thread_pool_free*(pool: PGThreadPool, immediate: gboolean, wait: gboolean){. + cdecl, dynlib: gliblib, importc: "g_thread_pool_free".} +proc g_thread_pool_set_max_unused_threads*(max_threads: gint){.cdecl, + dynlib: gliblib, importc: "g_thread_pool_set_max_unused_threads".} +proc g_thread_pool_get_max_unused_threads*(): gint{.cdecl, dynlib: gliblib, + importc: "g_thread_pool_get_max_unused_threads".} +proc g_thread_pool_get_num_unused_threads*(): guint{.cdecl, dynlib: gliblib, + importc: "g_thread_pool_get_num_unused_threads".} +proc g_thread_pool_stop_unused_threads*(){.cdecl, dynlib: gliblib, + importc: "g_thread_pool_stop_unused_threads".} +type + PGTimer* = pointer + +const + G_USEC_PER_SEC* = 1000000 + +proc g_timer_new*(): PGTimer{.cdecl, dynlib: gliblib, importc: "g_timer_new".} +proc g_timer_destroy*(timer: PGTimer){.cdecl, dynlib: gliblib, + importc: "g_timer_destroy".} +proc g_timer_start*(timer: PGTimer){.cdecl, dynlib: gliblib, + importc: "g_timer_start".} +proc g_timer_stop*(timer: PGTimer){.cdecl, dynlib: gliblib, + importc: "g_timer_stop".} +proc g_timer_reset*(timer: PGTimer){.cdecl, dynlib: gliblib, + importc: "g_timer_reset".} +proc g_timer_elapsed*(timer: PGTimer, microseconds: Pgulong): gdouble{.cdecl, + dynlib: gliblib, importc: "g_timer_elapsed".} +proc g_usleep*(microseconds: gulong){.cdecl, dynlib: gliblib, + importc: "g_usleep".} +proc g_time_val_add*(time: PGTimeVal, microseconds: glong){.cdecl, + dynlib: gliblib, importc: "g_time_val_add".} +type + Pgunichar* = ptr gunichar + gunichar* = guint32 + Pgunichar2* = ptr gunichar2 + gunichar2* = guint16 + PGUnicodeType* = ptr TGUnicodeType + TGUnicodeType* = enum + G_UNICODE_CONTROL, G_UNICODE_FORMAT, G_UNICODE_UNASSIGNED, + G_UNICODE_PRIVATE_USE, G_UNICODE_SURROGATE, G_UNICODE_LOWERCASE_LETTER, + G_UNICODE_MODIFIER_LETTER, G_UNICODE_OTHER_LETTER, + G_UNICODE_TITLECASE_LETTER, G_UNICODE_UPPERCASE_LETTER, + G_UNICODE_COMBINING_MARK, G_UNICODE_ENCLOSING_MARK, + G_UNICODE_NON_SPACING_MARK, G_UNICODE_DECIMAL_NUMBER, + G_UNICODE_LETTER_NUMBER, G_UNICODE_OTHER_NUMBER, + G_UNICODE_CONNECT_PUNCTUATION, G_UNICODE_DASH_PUNCTUATION, + G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_FINAL_PUNCTUATION, + G_UNICODE_INITIAL_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, + G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_CURRENCY_SYMBOL, + G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_OTHER_SYMBOL, + G_UNICODE_LINE_SEPARATOR, G_UNICODE_PARAGRAPH_SEPARATOR, + G_UNICODE_SPACE_SEPARATOR + PGUnicodeBreakType* = ptr TGUnicodeBreakType + TGUnicodeBreakType* = enum + G_UNICODE_BREAK_MANDATORY, G_UNICODE_BREAK_CARRIAGE_RETURN, + G_UNICODE_BREAK_LINE_FEED, G_UNICODE_BREAK_COMBINING_MARK, + G_UNICODE_BREAK_SURROGATE, G_UNICODE_BREAK_ZERO_WIDTH_SPACE, + G_UNICODE_BREAK_INSEPARABLE, G_UNICODE_BREAK_NON_BREAKING_GLUE, + G_UNICODE_BREAK_CONTINGENT, G_UNICODE_BREAK_SPACE, G_UNICODE_BREAK_AFTER, + G_UNICODE_BREAK_BEFORE, G_UNICODE_BREAK_BEFORE_AND_AFTER, + G_UNICODE_BREAK_HYPHEN, G_UNICODE_BREAK_NON_STARTER, + G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, + G_UNICODE_BREAK_QUOTATION, G_UNICODE_BREAK_EXCLAMATION, + G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_NUMERIC, + G_UNICODE_BREAK_INFIX_SEPARATOR, G_UNICODE_BREAK_SYMBOL, + G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_POSTFIX, + G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_AMBIGUOUS, + G_UNICODE_BREAK_UNKNOWN + +proc g_get_charset*(charset: PPchar): gboolean{.cdecl, dynlib: gliblib, + importc: "g_get_charset".} +proc g_unichar_isalnum*(c: gunichar): gboolean{.cdecl, dynlib: gliblib, + importc: "g_unichar_isalnum".} +proc g_unichar_isalpha*(c: gunichar): gboolean{.cdecl, dynlib: gliblib, + importc: "g_unichar_isalpha".} +proc g_unichar_iscntrl*(c: gunichar): gboolean{.cdecl, dynlib: gliblib, + importc: "g_unichar_iscntrl".} +proc g_unichar_isdigit*(c: gunichar): gboolean{.cdecl, dynlib: gliblib, + importc: "g_unichar_isdigit".} +proc g_unichar_isgraph*(c: gunichar): gboolean{.cdecl, dynlib: gliblib, + importc: "g_unichar_isgraph".} +proc g_unichar_islower*(c: gunichar): gboolean{.cdecl, dynlib: gliblib, + importc: "g_unichar_islower".} +proc g_unichar_isprint*(c: gunichar): gboolean{.cdecl, dynlib: gliblib, + importc: "g_unichar_isprint".} +proc g_unichar_ispunct*(c: gunichar): gboolean{.cdecl, dynlib: gliblib, + importc: "g_unichar_ispunct".} +proc g_unichar_isspace*(c: gunichar): gboolean{.cdecl, dynlib: gliblib, + importc: "g_unichar_isspace".} +proc g_unichar_isupper*(c: gunichar): gboolean{.cdecl, dynlib: gliblib, + importc: "g_unichar_isupper".} +proc g_unichar_isxdigit*(c: gunichar): gboolean{.cdecl, dynlib: gliblib, + importc: "g_unichar_isxdigit".} +proc g_unichar_istitle*(c: gunichar): gboolean{.cdecl, dynlib: gliblib, + importc: "g_unichar_istitle".} +proc g_unichar_isdefined*(c: gunichar): gboolean{.cdecl, dynlib: gliblib, + importc: "g_unichar_isdefined".} +proc g_unichar_iswide*(c: gunichar): gboolean{.cdecl, dynlib: gliblib, + importc: "g_unichar_iswide".} +proc g_unichar_toupper*(c: gunichar): gunichar{.cdecl, dynlib: gliblib, + importc: "g_unichar_toupper".} +proc g_unichar_tolower*(c: gunichar): gunichar{.cdecl, dynlib: gliblib, + importc: "g_unichar_tolower".} +proc g_unichar_totitle*(c: gunichar): gunichar{.cdecl, dynlib: gliblib, + importc: "g_unichar_totitle".} +proc g_unichar_digit_value*(c: gunichar): gint{.cdecl, dynlib: gliblib, + importc: "g_unichar_digit_value".} +proc g_unichar_xdigit_value*(c: gunichar): gint{.cdecl, dynlib: gliblib, + importc: "g_unichar_xdigit_value".} +proc g_unichar_type*(c: gunichar): TGUnicodeType{.cdecl, dynlib: gliblib, + importc: "g_unichar_type".} +proc g_unichar_break_type*(c: gunichar): TGUnicodeBreakType{.cdecl, + dynlib: gliblib, importc: "g_unichar_break_type".} +proc g_unicode_canonical_ordering*(str: Pgunichar, len: gsize){.cdecl, + dynlib: gliblib, importc: "g_unicode_canonical_ordering".} +proc g_unicode_canonical_decomposition*(ch: gunichar, result_len: Pgsize): Pgunichar{. + cdecl, dynlib: gliblib, importc: "g_unicode_canonical_decomposition".} +proc g_utf8_next_char*(p: pguchar): pguchar +proc g_utf8_get_char*(p: cstring): gunichar{.cdecl, dynlib: gliblib, + importc: "g_utf8_get_char".} +proc g_utf8_get_char_validated*(p: cstring, max_len: gssize): gunichar{.cdecl, + dynlib: gliblib, importc: "g_utf8_get_char_validated".} +proc g_utf8_offset_to_pointer*(str: cstring, offset: glong): cstring{.cdecl, + dynlib: gliblib, importc: "g_utf8_offset_to_pointer".} +proc g_utf8_pointer_to_offset*(str: cstring, pos: cstring): glong{.cdecl, + dynlib: gliblib, importc: "g_utf8_pointer_to_offset".} +proc g_utf8_prev_char*(p: cstring): cstring{.cdecl, dynlib: gliblib, + importc: "g_utf8_prev_char".} +proc g_utf8_find_next_char*(p: cstring, `end`: cstring): cstring{.cdecl, + dynlib: gliblib, importc: "g_utf8_find_next_char".} +proc g_utf8_find_prev_char*(str: cstring, p: cstring): cstring{.cdecl, + dynlib: gliblib, importc: "g_utf8_find_prev_char".} +proc g_utf8_strlen*(p: cstring, max: gssize): glong{.cdecl, dynlib: gliblib, + importc: "g_utf8_strlen".} +proc g_utf8_strncpy*(dest: cstring, src: cstring, n: gsize): cstring{.cdecl, + dynlib: gliblib, importc: "g_utf8_strncpy".} +proc g_utf8_strchr*(p: cstring, len: gssize, c: gunichar): cstring{.cdecl, + dynlib: gliblib, importc: "g_utf8_strchr".} +proc g_utf8_strrchr*(p: cstring, len: gssize, c: gunichar): cstring{.cdecl, + dynlib: gliblib, importc: "g_utf8_strrchr".} +proc g_utf8_to_utf16*(str: cstring, len: glong, items_read: Pglong, + items_written: Pglong, error: pointer): Pgunichar2{. + cdecl, dynlib: gliblib, importc: "g_utf8_to_utf16".} +proc g_utf8_to_ucs4*(str: cstring, len: glong, items_read: Pglong, + items_written: Pglong, error: pointer): Pgunichar{.cdecl, + dynlib: gliblib, importc: "g_utf8_to_ucs4".} +proc g_utf8_to_ucs4_fast*(str: cstring, len: glong, items_written: Pglong): Pgunichar{. + cdecl, dynlib: gliblib, importc: "g_utf8_to_ucs4_fast".} +proc g_utf16_to_ucs4*(str: Pgunichar2, len: glong, items_read: Pglong, + items_written: Pglong, error: pointer): Pgunichar{.cdecl, + dynlib: gliblib, importc: "g_utf16_to_ucs4".} +proc g_utf16_to_utf8*(str: Pgunichar2, len: glong, items_read: Pglong, + items_written: Pglong, error: pointer): cstring{.cdecl, + dynlib: gliblib, importc: "g_utf16_to_utf8".} +proc g_ucs4_to_utf16*(str: Pgunichar, len: glong, items_read: Pglong, + items_written: Pglong, error: pointer): Pgunichar2{. + cdecl, dynlib: gliblib, importc: "g_ucs4_to_utf16".} +proc g_ucs4_to_utf8*(str: Pgunichar, len: glong, items_read: Pglong, + items_written: Pglong, error: pointer): cstring{.cdecl, + dynlib: gliblib, importc: "g_ucs4_to_utf8".} +proc g_unichar_to_utf8*(c: gunichar, outbuf: cstring): gint{.cdecl, + dynlib: gliblib, importc: "g_unichar_to_utf8".} +proc g_utf8_validate*(str: cstring, max_len: gssize, `end`: PPgchar): gboolean{. + cdecl, dynlib: gliblib, importc: "g_utf8_validate".} +proc g_unichar_validate*(ch: gunichar): gboolean{.cdecl, dynlib: gliblib, + importc: "g_unichar_validate".} +proc g_utf8_strup*(str: cstring, len: gssize): cstring{.cdecl, dynlib: gliblib, + importc: "g_utf8_strup".} +proc g_utf8_strdown*(str: cstring, len: gssize): cstring{.cdecl, + dynlib: gliblib, importc: "g_utf8_strdown".} +proc g_utf8_casefold*(str: cstring, len: gssize): cstring{.cdecl, + dynlib: gliblib, importc: "g_utf8_casefold".} +type + PGNormalizeMode* = ptr TGNormalizeMode + TGNormalizeMode* = gint + +const + G_NORMALIZE_DEFAULT* = 0 + G_NORMALIZE_NFD* = G_NORMALIZE_DEFAULT + G_NORMALIZE_DEFAULT_COMPOSE* = 1 + G_NORMALIZE_NFC* = G_NORMALIZE_DEFAULT_COMPOSE + G_NORMALIZE_ALL* = 2 + G_NORMALIZE_NFKD* = G_NORMALIZE_ALL + G_NORMALIZE_ALL_COMPOSE* = 3 + G_NORMALIZE_NFKC* = G_NORMALIZE_ALL_COMPOSE + +proc g_utf8_normalize*(str: cstring, len: gssize, mode: TGNormalizeMode): cstring{. + cdecl, dynlib: gliblib, importc: "g_utf8_normalize".} +proc g_utf8_collate*(str1: cstring, str2: cstring): gint{.cdecl, + dynlib: gliblib, importc: "g_utf8_collate".} +proc g_utf8_collate_key*(str: cstring, len: gssize): cstring{.cdecl, + dynlib: gliblib, importc: "g_utf8_collate_key".} +type + PGString* = ptr TGString + TGString* {.final.} = object + str*: cstring + len*: gsize + allocated_len*: gsize + + PGStringChunk* = pointer + +proc g_string_chunk_new*(size: gsize): PGStringChunk{.cdecl, dynlib: gliblib, + importc: "g_string_chunk_new".} +proc g_string_chunk_free*(chunk: PGStringChunk){.cdecl, dynlib: gliblib, + importc: "g_string_chunk_free".} +proc g_string_chunk_insert*(chunk: PGStringChunk, str: cstring): cstring{.cdecl, + dynlib: gliblib, importc: "g_string_chunk_insert".} +proc g_string_chunk_insert_const*(chunk: PGStringChunk, str: cstring): cstring{. + cdecl, dynlib: gliblib, importc: "g_string_chunk_insert_const".} +proc g_string_new*(init: cstring): PGString{.cdecl, dynlib: gliblib, + importc: "g_string_new".} +proc g_string_new_len*(init: cstring, len: gssize): PGString{.cdecl, + dynlib: gliblib, importc: "g_string_new_len".} +proc g_string_sized_new*(dfl_size: gsize): PGString{.cdecl, dynlib: gliblib, + importc: "g_string_sized_new".} +proc g_string_free*(str: PGString, free_segment: gboolean): cstring{.cdecl, + dynlib: gliblib, importc: "g_string_free".} +proc g_string_equal*(v: PGString, v2: PGString): gboolean{.cdecl, + dynlib: gliblib, importc: "g_string_equal".} +proc g_string_hash*(str: PGString): guint{.cdecl, dynlib: gliblib, + importc: "g_string_hash".} +proc g_string_assign*(str: PGString, rval: cstring): PGString{.cdecl, + dynlib: gliblib, importc: "g_string_assign".} +proc g_string_truncate*(str: PGString, len: gsize): PGString{.cdecl, + dynlib: gliblib, importc: "g_string_truncate".} +proc g_string_set_size*(str: PGString, len: gsize): PGString{.cdecl, + dynlib: gliblib, importc: "g_string_set_size".} +proc g_string_insert_len*(str: PGString, pos: gssize, val: cstring, len: gssize): PGString{. + cdecl, dynlib: gliblib, importc: "g_string_insert_len".} +proc g_string_append*(str: PGString, val: cstring): PGString{.cdecl, + dynlib: gliblib, importc: "g_string_append".} +proc g_string_append_len*(str: PGString, val: cstring, len: gssize): PGString{. + cdecl, dynlib: gliblib, importc: "g_string_append_len".} +proc g_string_append_c*(str: PGString, c: gchar): PGString{.cdecl, + dynlib: gliblib, importc: "g_string_append_c".} +proc g_string_append_unichar*(str: PGString, wc: gunichar): PGString{.cdecl, + dynlib: gliblib, importc: "g_string_append_unichar".} +proc g_string_prepend*(str: PGString, val: cstring): PGString{.cdecl, + dynlib: gliblib, importc: "g_string_prepend".} +proc g_string_prepend_c*(str: PGString, c: gchar): PGString{.cdecl, + dynlib: gliblib, importc: "g_string_prepend_c".} +proc g_string_prepend_unichar*(str: PGString, wc: gunichar): PGString{.cdecl, + dynlib: gliblib, importc: "g_string_prepend_unichar".} +proc g_string_prepend_len*(str: PGString, val: cstring, len: gssize): PGString{. + cdecl, dynlib: gliblib, importc: "g_string_prepend_len".} +proc g_string_insert*(str: PGString, pos: gssize, val: cstring): PGString{. + cdecl, dynlib: gliblib, importc: "g_string_insert".} +proc g_string_insert_c*(str: PGString, pos: gssize, c: gchar): PGString{.cdecl, + dynlib: gliblib, importc: "g_string_insert_c".} +proc g_string_insert_unichar*(str: PGString, pos: gssize, wc: gunichar): PGString{. + cdecl, dynlib: gliblib, importc: "g_string_insert_unichar".} +proc g_string_erase*(str: PGString, pos: gssize, len: gssize): PGString{.cdecl, + dynlib: gliblib, importc: "g_string_erase".} +proc g_string_ascii_down*(str: PGString): PGString{.cdecl, dynlib: gliblib, + importc: "g_string_ascii_down".} +proc g_string_ascii_up*(str: PGString): PGString{.cdecl, dynlib: gliblib, + importc: "g_string_ascii_up".} +proc g_string_down*(str: PGString): PGString{.cdecl, dynlib: gliblib, + importc: "g_string_down".} +proc g_string_up*(str: PGString): PGString{.cdecl, dynlib: gliblib, + importc: "g_string_up".} +type + PGIOError* = ptr TGIOError + TGIOError* = enum + G_IO_ERROR_NONE, G_IO_ERROR_AGAIN, G_IO_ERROR_INVAL, G_IO_ERROR_UNKNOWN + +proc G_IO_CHANNEL_ERROR*(): TGQuark +type + PGIOChannelError* = ptr TGIOChannelError + TGIOChannelError* = enum + G_IO_CHANNEL_ERROR_FBIG, G_IO_CHANNEL_ERROR_INVAL, G_IO_CHANNEL_ERROR_IO, + G_IO_CHANNEL_ERROR_ISDIR, G_IO_CHANNEL_ERROR_NOSPC, G_IO_CHANNEL_ERROR_NXIO, + G_IO_CHANNEL_ERROR_OVERFLOW, G_IO_CHANNEL_ERROR_PIPE, + G_IO_CHANNEL_ERROR_FAILED + PGIOStatus* = ptr TGIOStatus + TGIOStatus* = enum + G_IO_STATUS_ERROR, G_IO_STATUS_NORMAL, G_IO_STATUS_EOF, G_IO_STATUS_AGAIN + PGSeekType* = ptr TGSeekType + TGSeekType* = enum + G_SEEK_CUR, G_SEEK_SET, G_SEEK_END + PGIOCondition* = ptr TGIOCondition + TGIOCondition* = gint + +const + G_IO_IN* = GLIB_SYSDEF_POLLIN + G_IO_OUT* = GLIB_SYSDEF_POLLOUT + G_IO_PRI* = GLIB_SYSDEF_POLLPRI + G_IO_ERR* = GLIB_SYSDEF_POLLERR + G_IO_HUP* = GLIB_SYSDEF_POLLHUP + G_IO_NVAL* = GLIB_SYSDEF_POLLNVAL + +type + PGIOFlags* = ptr TGIOFlags + TGIOFlags* = gint + +const + G_IO_FLAG_APPEND* = 1 shl 0 + G_IO_FLAG_NONBLOCK* = 1 shl 1 + G_IO_FLAG_IS_READABLE* = 1 shl 2 + G_IO_FLAG_IS_WRITEABLE* = 1 shl 3 + G_IO_FLAG_IS_SEEKABLE* = 1 shl 4 + G_IO_FLAG_MASK* = (1 shl 5) - 1 + G_IO_FLAG_GET_MASK* = G_IO_FLAG_MASK + G_IO_FLAG_SET_MASK* = G_IO_FLAG_APPEND or G_IO_FLAG_NONBLOCK + +type + PGIOChannel* = ptr TGIOChannel + TGIOFunc* = proc (source: PGIOChannel, condition: TGIOCondition, + data: gpointer): gboolean{.cdecl.} + PGIOFuncs* = ptr TGIOFuncs + TGIOFuncs* {.final.} = object + io_read*: proc (channel: PGIOChannel, buf: cstring, count: gsize, + bytes_read: Pgsize, err: pointer): TGIOStatus{.cdecl.} + io_write*: proc (channel: PGIOChannel, buf: cstring, count: gsize, + bytes_written: Pgsize, err: pointer): TGIOStatus{.cdecl.} + io_seek*: proc (channel: PGIOChannel, offset: gint64, theType: TGSeekType, + err: pointer): TGIOStatus{.cdecl.} + io_close*: proc (channel: PGIOChannel, err: pointer): TGIOStatus{.cdecl.} + io_create_watch*: proc (channel: PGIOChannel, condition: TGIOCondition): PGSource{. + cdecl.} + io_free*: proc (channel: PGIOChannel){.cdecl.} + io_set_flags*: proc (channel: PGIOChannel, flags: TGIOFlags, err: pointer): TGIOStatus{. + cdecl.} + io_get_flags*: proc (channel: PGIOChannel): TGIOFlags{.cdecl.} + + TGIOChannel* {.final.} = object + ref_count*: guint + funcs*: PGIOFuncs + encoding*: cstring + read_cd*: TGIConv + write_cd*: TGIConv + line_term*: cstring + line_term_len*: guint + buf_size*: gsize + read_buf*: PGString + encoded_read_buf*: PGString + write_buf*: PGString + partial_write_buf*: array[0..5, gchar] + flag0*: guint16 + reserved1*: gpointer + reserved2*: gpointer + + +const + bm_TGIOChannel_use_buffer* = 0x00000001'i16 + bp_TGIOChannel_use_buffer* = 0'i16 + bm_TGIOChannel_do_encode* = 0x00000002'i16 + bp_TGIOChannel_do_encode* = 1'i16 + bm_TGIOChannel_close_on_unref* = 0x00000004'i16 + bp_TGIOChannel_close_on_unref* = 2'i16 + bm_TGIOChannel_is_readable* = 0x00000008'i16 + bp_TGIOChannel_is_readable* = 3'i16 + bm_TGIOChannel_is_writeable* = 0x00000010'i16 + bp_TGIOChannel_is_writeable* = 4'i16 + bm_TGIOChannel_is_seekable* = 0x00000020'i16 + bp_TGIOChannel_is_seekable* = 5'i16 + +proc TGIOChannel_use_buffer*(a: var TGIOChannel): guint +proc TGIOChannel_set_use_buffer*(a: var TGIOChannel, `use_buffer`: guint) +proc TGIOChannel_do_encode*(a: var TGIOChannel): guint +proc TGIOChannel_set_do_encode*(a: var TGIOChannel, `do_encode`: guint) +proc TGIOChannel_close_on_unref*(a: var TGIOChannel): guint +proc TGIOChannel_set_close_on_unref*(a: var TGIOChannel, `close_on_unref`: guint) +proc TGIOChannel_is_readable*(a: var TGIOChannel): guint +proc TGIOChannel_set_is_readable*(a: var TGIOChannel, `is_readable`: guint) +proc TGIOChannel_is_writeable*(a: var TGIOChannel): guint +proc TGIOChannel_set_is_writeable*(a: var TGIOChannel, `is_writeable`: guint) +proc TGIOChannel_is_seekable*(a: var TGIOChannel): guint +proc TGIOChannel_set_is_seekable*(a: var TGIOChannel, `is_seekable`: guint) +proc g_io_channel_init*(channel: PGIOChannel){.cdecl, dynlib: gliblib, + importc: "g_io_channel_init".} +proc g_io_channel_ref*(channel: PGIOChannel){.cdecl, dynlib: gliblib, + importc: "g_io_channel_ref".} +proc g_io_channel_unref*(channel: PGIOChannel){.cdecl, dynlib: gliblib, + importc: "g_io_channel_unref".} +proc g_io_channel_read*(channel: PGIOChannel, buf: cstring, count: gsize, + bytes_read: Pgsize): TGIOError{.cdecl, dynlib: gliblib, + importc: "g_io_channel_read".} +proc g_io_channel_write*(channel: PGIOChannel, buf: cstring, count: gsize, + bytes_written: Pgsize): TGIOError{.cdecl, + dynlib: gliblib, importc: "g_io_channel_write".} +proc g_io_channel_seek*(channel: PGIOChannel, offset: gint64, + theType: TGSeekType): TGIOError{.cdecl, dynlib: gliblib, + importc: "g_io_channel_seek".} +proc g_io_channel_close*(channel: PGIOChannel){.cdecl, dynlib: gliblib, + importc: "g_io_channel_close".} +proc g_io_channel_shutdown*(channel: PGIOChannel, flush: gboolean, err: pointer): TGIOStatus{. + cdecl, dynlib: gliblib, importc: "g_io_channel_shutdown".} +proc g_io_add_watch_full*(channel: PGIOChannel, priority: gint, + condition: TGIOCondition, func: TGIOFunc, + user_data: gpointer, notify: TGDestroyNotify): guint{. + cdecl, dynlib: gliblib, importc: "g_io_add_watch_full".} +proc g_io_create_watch*(channel: PGIOChannel, condition: TGIOCondition): PGSource{. + cdecl, dynlib: gliblib, importc: "g_io_create_watch".} +proc g_io_add_watch*(channel: PGIOChannel, condition: TGIOCondition, + func: TGIOFunc, user_data: gpointer): guint{.cdecl, + dynlib: gliblib, importc: "g_io_add_watch".} +proc g_io_channel_set_buffer_size*(channel: PGIOChannel, size: gsize){.cdecl, + dynlib: gliblib, importc: "g_io_channel_set_buffer_size".} +proc g_io_channel_get_buffer_size*(channel: PGIOChannel): gsize{.cdecl, + dynlib: gliblib, importc: "g_io_channel_get_buffer_size".} +proc g_io_channel_get_buffer_condition*(channel: PGIOChannel): TGIOCondition{. + cdecl, dynlib: gliblib, importc: "g_io_channel_get_buffer_condition".} +proc g_io_channel_set_flags*(channel: PGIOChannel, flags: TGIOFlags, + error: pointer): TGIOStatus{.cdecl, + dynlib: gliblib, importc: "g_io_channel_set_flags".} +proc g_io_channel_get_flags*(channel: PGIOChannel): TGIOFlags{.cdecl, + dynlib: gliblib, importc: "g_io_channel_get_flags".} +proc g_io_channel_set_line_term*(channel: PGIOChannel, line_term: cstring, + length: gint){.cdecl, dynlib: gliblib, + importc: "g_io_channel_set_line_term".} +proc g_io_channel_get_line_term*(channel: PGIOChannel, length: Pgint): cstring{. + cdecl, dynlib: gliblib, importc: "g_io_channel_get_line_term".} +proc g_io_channel_set_buffered*(channel: PGIOChannel, buffered: gboolean){. + cdecl, dynlib: gliblib, importc: "g_io_channel_set_buffered".} +proc g_io_channel_get_buffered*(channel: PGIOChannel): gboolean{.cdecl, + dynlib: gliblib, importc: "g_io_channel_get_buffered".} +proc g_io_channel_set_encoding*(channel: PGIOChannel, encoding: cstring, + error: pointer): TGIOStatus{.cdecl, + dynlib: gliblib, importc: "g_io_channel_set_encoding".} +proc g_io_channel_get_encoding*(channel: PGIOChannel): cstring{.cdecl, + dynlib: gliblib, importc: "g_io_channel_get_encoding".} +proc g_io_channel_set_close_on_unref*(channel: PGIOChannel, do_close: gboolean){. + cdecl, dynlib: gliblib, importc: "g_io_channel_set_close_on_unref".} +proc g_io_channel_get_close_on_unref*(channel: PGIOChannel): gboolean{.cdecl, + dynlib: gliblib, importc: "g_io_channel_get_close_on_unref".} +proc g_io_channel_flush*(channel: PGIOChannel, error: pointer): TGIOStatus{. + cdecl, dynlib: gliblib, importc: "g_io_channel_flush".} +proc g_io_channel_read_line*(channel: PGIOChannel, str_return: PPgchar, + length: Pgsize, terminator_pos: Pgsize, + error: pointer): TGIOStatus{.cdecl, + dynlib: gliblib, importc: "g_io_channel_read_line".} +proc g_io_channel_read_line_string*(channel: PGIOChannel, buffer: PGString, + terminator_pos: Pgsize, error: pointer): TGIOStatus{. + cdecl, dynlib: gliblib, importc: "g_io_channel_read_line_string".} +proc g_io_channel_read_to_end*(channel: PGIOChannel, str_return: PPgchar, + length: Pgsize, error: pointer): TGIOStatus{. + cdecl, dynlib: gliblib, importc: "g_io_channel_read_to_end".} +proc g_io_channel_read_chars*(channel: PGIOChannel, buf: cstring, count: gsize, + bytes_read: Pgsize, error: pointer): TGIOStatus{. + cdecl, dynlib: gliblib, importc: "g_io_channel_read_chars".} +proc g_io_channel_read_unichar*(channel: PGIOChannel, thechar: Pgunichar, + error: pointer): TGIOStatus{.cdecl, + dynlib: gliblib, importc: "g_io_channel_read_unichar".} +proc g_io_channel_write_chars*(channel: PGIOChannel, buf: cstring, + count: gssize, bytes_written: Pgsize, + error: pointer): TGIOStatus{.cdecl, + dynlib: gliblib, importc: "g_io_channel_write_chars".} +proc g_io_channel_write_unichar*(channel: PGIOChannel, thechar: gunichar, + error: pointer): TGIOStatus{.cdecl, + dynlib: gliblib, importc: "g_io_channel_write_unichar".} +proc g_io_channel_seek_position*(channel: PGIOChannel, offset: gint64, + theType: TGSeekType, error: pointer): TGIOStatus{. + cdecl, dynlib: gliblib, importc: "g_io_channel_seek_position".} +proc g_io_channel_new_file*(filename: cstring, mode: cstring, error: pointer): PGIOChannel{. + cdecl, dynlib: gliblib, importc: "g_io_channel_new_file".} +proc g_io_channel_error_quark*(): TGQuark{.cdecl, dynlib: gliblib, + importc: "g_io_channel_error_quark".} +proc g_io_channel_error_from_errno*(en: gint): TGIOChannelError{.cdecl, + dynlib: gliblib, importc: "g_io_channel_error_from_errno".} +proc g_io_channel_unix_new*(fd: int32): PGIOChannel{.cdecl, dynlib: gliblib, + importc: "g_io_channel_unix_new".} +proc g_io_channel_unix_get_fd*(channel: PGIOChannel): gint{.cdecl, + dynlib: gliblib, importc: "g_io_channel_unix_get_fd".} +const + G_LOG_LEVEL_USER_SHIFT* = 8 + +type + PGLogLevelFlags* = ptr TGLogLevelFlags + TGLogLevelFlags* = int32 + +const + G_LOG_FLAG_RECURSION* = 1 shl 0 + G_LOG_FLAG_FATAL* = 1 shl 1 + G_LOG_LEVEL_ERROR* = 1 shl 2 + G_LOG_LEVEL_CRITICAL* = 1 shl 3 + G_LOG_LEVEL_WARNING* = 1 shl 4 + G_LOG_LEVEL_MESSAGE* = 1 shl 5 + G_LOG_LEVEL_INFO* = 1 shl 6 + G_LOG_LEVEL_DEBUG* = 1 shl 7 + G_LOG_LEVEL_MASK* = not 3 + +const + G_LOG_FATAL_MASK* = 5 + +type + TGLogFunc* = proc (log_domain: cstring, log_level: TGLogLevelFlags, + TheMessage: cstring, user_data: gpointer){.cdecl.} + +proc g_log_set_handler*(log_domain: cstring, log_levels: TGLogLevelFlags, + log_func: TGLogFunc, user_data: gpointer): guint{.cdecl, + dynlib: gliblib, importc: "g_log_set_handler".} +proc g_log_remove_handler*(log_domain: cstring, handler_id: guint){.cdecl, + dynlib: gliblib, importc: "g_log_remove_handler".} +proc g_log_default_handler*(log_domain: cstring, log_level: TGLogLevelFlags, + TheMessage: cstring, unused_data: gpointer){.cdecl, + dynlib: gliblib, importc: "g_log_default_handler".} +proc g_log_set_fatal_mask*(log_domain: cstring, fatal_mask: TGLogLevelFlags): TGLogLevelFlags{. + cdecl, dynlib: gliblib, importc: "g_log_set_fatal_mask".} +proc g_log_set_always_fatal*(fatal_mask: TGLogLevelFlags): TGLogLevelFlags{. + cdecl, dynlib: gliblib, importc: "g_log_set_always_fatal".} +proc `g_log_fallback_handler`*(log_domain: cstring, log_level: TGLogLevelFlags, + message: cstring, unused_data: gpointer){.cdecl, + dynlib: gliblib, importc: "g_log_fallback_handler".} +const + G_LOG_DOMAIN* = nil + +when false: + proc g_error*(format: cstring){.varargs.} + proc g_message*(format: cstring){.varargs.} + proc g_critical*(format: cstring){.varargs.} + proc g_warning*(format: cstring){.varargs.} + +type + TGPrintFunc* = proc (str: cstring) + +proc g_set_print_handler*(func: TGPrintFunc): TGPrintFunc{.cdecl, + dynlib: gliblib, importc: "g_set_print_handler".} +proc g_set_printerr_handler*(func: TGPrintFunc): TGPrintFunc{.cdecl, + dynlib: gliblib, importc: "g_set_printerr_handler".} +type + PGMarkupError* = ptr TGMarkupError + TGMarkupError* = enum + G_MARKUP_ERROR_BAD_UTF8, G_MARKUP_ERROR_EMPTY, G_MARKUP_ERROR_PARSE, + G_MARKUP_ERROR_UNKNOWN_ELEMENT, G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, + G_MARKUP_ERROR_INVALID_CONTENT + +proc G_MARKUP_ERROR*(): TGQuark +proc g_markup_error_quark*(): TGQuark{.cdecl, dynlib: gliblib, + importc: "g_markup_error_quark".} +type + PGMarkupParseFlags* = ptr TGMarkupParseFlags + TGMarkupParseFlags* = int + +const + G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG* = 1 shl 0 + +type + PGMarkupParseContext* = ptr TGMarkupParseContext + TGMarkupParseContext* = pointer + PGMarkupParser* = ptr TGMarkupParser + TGMarkupParser* {.final.} = object + start_element*: proc (context: PGMarkupParseContext, element_name: cstring, + attribute_names: PPgchar, attribute_values: PPgchar, + user_data: gpointer, error: pointer){.cdecl.} + end_element*: proc (context: PGMarkupParseContext, element_name: cstring, + user_data: gpointer, error: pointer){.cdecl.} + text*: proc (context: PGMarkupParseContext, text: cstring, text_len: gsize, + user_data: gpointer, error: pointer){.cdecl.} + passthrough*: proc (context: PGMarkupParseContext, + passthrough_text: cstring, text_len: gsize, + user_data: gpointer, error: pointer){.cdecl.} + error*: proc (context: PGMarkupParseContext, error: pointer, + user_data: gpointer){.cdecl.} + + +proc g_markup_parse_context_new*(parser: PGMarkupParser, + flags: TGMarkupParseFlags, user_data: gpointer, + user_data_dnotify: TGDestroyNotify): PGMarkupParseContext{. + cdecl, dynlib: gliblib, importc: "g_markup_parse_context_new".} +proc g_markup_parse_context_free*(context: PGMarkupParseContext){.cdecl, + dynlib: gliblib, importc: "g_markup_parse_context_free".} +proc g_markup_parse_context_parse*(context: PGMarkupParseContext, text: cstring, + text_len: gssize, error: pointer): gboolean{. + cdecl, dynlib: gliblib, importc: "g_markup_parse_context_parse".} +proc g_markup_parse_context_end_parse*(context: PGMarkupParseContext, + error: pointer): gboolean{.cdecl, + dynlib: gliblib, importc: "g_markup_parse_context_end_parse".} +proc g_markup_parse_context_get_position*(context: PGMarkupParseContext, + line_number: Pgint, char_number: Pgint){.cdecl, dynlib: gliblib, + importc: "g_markup_parse_context_get_position".} +proc g_markup_escape_text*(text: cstring, length: gssize): cstring{.cdecl, + dynlib: gliblib, importc: "g_markup_escape_text".} +type + PGNode* = ptr TGNode + TGNode* {.final.} = object + data*: gpointer + next*: PGNode + prev*: PGNode + parent*: PGNode + children*: PGNode + + PGTraverseFlags* = ptr TGTraverseFlags + TGTraverseFlags* = gint + +const + G_TRAVERSE_LEAFS* = 1 shl 0 + G_TRAVERSE_NON_LEAFS* = 1 shl 1 + G_TRAVERSE_ALL* = G_TRAVERSE_LEAFS or G_TRAVERSE_NON_LEAFS + G_TRAVERSE_MASK* = 0x00000003 + +type + PGTraverseType* = ptr TGTraverseType + TGTraverseType* = enum + G_IN_ORDER, G_PRE_ORDER, G_POST_ORDER, G_LEVEL_ORDER + TGNodeTraverseFunc* = proc (node: PGNode, data: gpointer): gboolean{.cdecl.} + TGNodeForeachFunc* = proc (node: PGNode, data: gpointer){.cdecl.} + +proc G_NODE_IS_ROOT*(node: PGNode): bool +proc G_NODE_IS_LEAF*(node: PGNode): bool +proc g_node_push_allocator*(allocator: PGAllocator){.cdecl, dynlib: gliblib, + importc: "g_node_push_allocator".} +proc g_node_pop_allocator*(){.cdecl, dynlib: gliblib, + importc: "g_node_pop_allocator".} +proc g_node_new*(data: gpointer): PGNode{.cdecl, dynlib: gliblib, + importc: "g_node_new".} +proc g_node_destroy*(root: PGNode){.cdecl, dynlib: gliblib, + importc: "g_node_destroy".} +proc g_node_unlink*(node: PGNode){.cdecl, dynlib: gliblib, + importc: "g_node_unlink".} +proc g_node_copy*(node: PGNode): PGNode{.cdecl, dynlib: gliblib, + importc: "g_node_copy".} +proc g_node_insert*(parent: PGNode, position: gint, node: PGNode): PGNode{. + cdecl, dynlib: gliblib, importc: "g_node_insert".} +proc g_node_insert_before*(parent: PGNode, sibling: PGNode, node: PGNode): PGNode{. + cdecl, dynlib: gliblib, importc: "g_node_insert_before".} +proc g_node_insert_after*(parent: PGNode, sibling: PGNode, node: PGNode): PGNode{. + cdecl, dynlib: gliblib, importc: "g_node_insert_after".} +proc g_node_prepend*(parent: PGNode, node: PGNode): PGNode{.cdecl, + dynlib: gliblib, importc: "g_node_prepend".} +proc g_node_n_nodes*(root: PGNode, flags: TGTraverseFlags): guint{.cdecl, + dynlib: gliblib, importc: "g_node_n_nodes".} +proc g_node_get_root*(node: PGNode): PGNode{.cdecl, dynlib: gliblib, + importc: "g_node_get_root".} +proc g_node_is_ancestor*(node: PGNode, descendant: PGNode): gboolean{.cdecl, + dynlib: gliblib, importc: "g_node_is_ancestor".} +proc g_node_depth*(node: PGNode): guint{.cdecl, dynlib: gliblib, + importc: "g_node_depth".} +proc g_node_find*(root: PGNode, order: TGTraverseType, flags: TGTraverseFlags, + data: gpointer): PGNode{.cdecl, dynlib: gliblib, + importc: "g_node_find".} +proc g_node_append*(parent: PGNode, node: PGNode): PGNode +proc g_node_insert_data*(parent: PGNode, position: gint, data: gpointer): PGNode +proc g_node_insert_data_before*(parent: PGNode, sibling: PGNode, data: gpointer): PGNode +proc g_node_prepend_data*(parent: PGNode, data: gpointer): PGNode +proc g_node_append_data*(parent: PGNode, data: gpointer): PGNode +proc g_node_traverse*(root: PGNode, order: TGTraverseType, + flags: TGTraverseFlags, max_depth: gint, + func: TGNodeTraverseFunc, data: gpointer): guint{.cdecl, + dynlib: gliblib, importc: "g_node_traverse".} +proc g_node_max_height*(root: PGNode): guint{.cdecl, dynlib: gliblib, + importc: "g_node_max_height".} +proc g_node_children_foreach*(node: PGNode, flags: TGTraverseFlags, + func: TGNodeForeachFunc, data: gpointer){.cdecl, + dynlib: gliblib, importc: "g_node_children_foreach".} +proc g_node_reverse_children*(node: PGNode){.cdecl, dynlib: gliblib, + importc: "g_node_reverse_children".} +proc g_node_n_children*(node: PGNode): guint{.cdecl, dynlib: gliblib, + importc: "g_node_n_children".} +proc g_node_nth_child*(node: PGNode, n: guint): PGNode{.cdecl, dynlib: gliblib, + importc: "g_node_nth_child".} +proc g_node_last_child*(node: PGNode): PGNode{.cdecl, dynlib: gliblib, + importc: "g_node_last_child".} +proc g_node_find_child*(node: PGNode, flags: TGTraverseFlags, data: gpointer): PGNode{. + cdecl, dynlib: gliblib, importc: "g_node_find_child".} +proc g_node_child_position*(node: PGNode, child: PGNode): gint{.cdecl, + dynlib: gliblib, importc: "g_node_child_position".} +proc g_node_child_index*(node: PGNode, data: gpointer): gint{.cdecl, + dynlib: gliblib, importc: "g_node_child_index".} +proc g_node_first_sibling*(node: PGNode): PGNode{.cdecl, dynlib: gliblib, + importc: "g_node_first_sibling".} +proc g_node_last_sibling*(node: PGNode): PGNode{.cdecl, dynlib: gliblib, + importc: "g_node_last_sibling".} +proc g_node_prev_sibling*(node: PGNode): PGNode +proc g_node_next_sibling*(node: PGNode): PGNode +proc g_node_first_child*(node: PGNode): PGNode +type + PGTree* = pointer + TGTraverseFunc* = proc (key: gpointer, value: gpointer, data: gpointer): gboolean{. + cdecl.} + +proc g_tree_new*(key_compare_func: TGCompareFunc): PGTree{.cdecl, + dynlib: gliblib, importc: "g_tree_new".} +proc g_tree_new_with_data*(key_compare_func: TGCompareDataFunc, + key_compare_data: gpointer): PGTree{.cdecl, + dynlib: gliblib, importc: "g_tree_new_with_data".} +proc g_tree_new_full*(key_compare_func: TGCompareDataFunc, + key_compare_data: gpointer, + key_destroy_func: TGDestroyNotify, + value_destroy_func: TGDestroyNotify): PGTree{.cdecl, + dynlib: gliblib, importc: "g_tree_new_full".} +proc g_tree_destroy*(tree: PGTree){.cdecl, dynlib: gliblib, + importc: "g_tree_destroy".} +proc g_tree_insert*(tree: PGTree, key: gpointer, value: gpointer){.cdecl, + dynlib: gliblib, importc: "g_tree_insert".} +proc g_tree_replace*(tree: PGTree, key: gpointer, value: gpointer){.cdecl, + dynlib: gliblib, importc: "g_tree_replace".} +proc g_tree_remove*(tree: PGTree, key: gconstpointer){.cdecl, dynlib: gliblib, + importc: "g_tree_remove".} +proc g_tree_steal*(tree: PGTree, key: gconstpointer){.cdecl, dynlib: gliblib, + importc: "g_tree_steal".} +proc g_tree_lookup*(tree: PGTree, key: gconstpointer): gpointer{.cdecl, + dynlib: gliblib, importc: "g_tree_lookup".} +proc g_tree_lookup_extended*(tree: PGTree, lookup_key: gconstpointer, + orig_key: Pgpointer, value: Pgpointer): gboolean{. + cdecl, dynlib: gliblib, importc: "g_tree_lookup_extended".} +proc g_tree_foreach*(tree: PGTree, func: TGTraverseFunc, user_data: gpointer){. + cdecl, dynlib: gliblib, importc: "g_tree_foreach".} +proc g_tree_search*(tree: PGTree, search_func: TGCompareFunc, + user_data: gconstpointer): gpointer{.cdecl, dynlib: gliblib, + importc: "g_tree_search".} +proc g_tree_height*(tree: PGTree): gint{.cdecl, dynlib: gliblib, + importc: "g_tree_height".} +proc g_tree_nnodes*(tree: PGTree): gint{.cdecl, dynlib: gliblib, + importc: "g_tree_nnodes".} +type + PGPatternSpec* = pointer + +proc g_pattern_spec_new*(pattern: cstring): PGPatternSpec{.cdecl, + dynlib: gliblib, importc: "g_pattern_spec_new".} +proc g_pattern_spec_free*(pspec: PGPatternSpec){.cdecl, dynlib: gliblib, + importc: "g_pattern_spec_free".} +proc g_pattern_spec_equal*(pspec1: PGPatternSpec, pspec2: PGPatternSpec): gboolean{. + cdecl, dynlib: gliblib, importc: "g_pattern_spec_equal".} +proc g_pattern_match*(pspec: PGPatternSpec, string_length: guint, str: cstring, + string_reversed: cstring): gboolean{.cdecl, + dynlib: gliblib, importc: "g_pattern_match".} +proc g_pattern_match_string*(pspec: PGPatternSpec, str: cstring): gboolean{. + cdecl, dynlib: gliblib, importc: "g_pattern_match_string".} +proc g_pattern_match_simple*(pattern: cstring, str: cstring): gboolean{.cdecl, + dynlib: gliblib, importc: "g_pattern_match_simple".} +proc g_spaced_primes_closest*(num: guint): guint{.cdecl, dynlib: gliblib, + importc: "g_spaced_primes_closest".} +proc g_qsort_with_data*(pbase: gconstpointer, total_elems: gint, size: gsize, + compare_func: TGCompareDataFunc, user_data: gpointer){. + cdecl, dynlib: gliblib, importc: "g_qsort_with_data".} +type + PGQueue* = ptr TGQueue + TGQueue* {.final.} = object + head*: PGList + tail*: PGList + length*: guint + + +proc g_queue_new*(): PGQueue{.cdecl, dynlib: gliblib, importc: "g_queue_new".} +proc g_queue_free*(queue: PGQueue){.cdecl, dynlib: gliblib, + importc: "g_queue_free".} +proc g_queue_push_head*(queue: PGQueue, data: gpointer){.cdecl, dynlib: gliblib, + importc: "g_queue_push_head".} +proc g_queue_push_tail*(queue: PGQueue, data: gpointer){.cdecl, dynlib: gliblib, + importc: "g_queue_push_tail".} +proc g_queue_pop_head*(queue: PGQueue): gpointer{.cdecl, dynlib: gliblib, + importc: "g_queue_pop_head".} +proc g_queue_pop_tail*(queue: PGQueue): gpointer{.cdecl, dynlib: gliblib, + importc: "g_queue_pop_tail".} +proc g_queue_is_empty*(queue: PGQueue): gboolean{.cdecl, dynlib: gliblib, + importc: "g_queue_is_empty".} +proc g_queue_peek_head*(queue: PGQueue): gpointer{.cdecl, dynlib: gliblib, + importc: "g_queue_peek_head".} +proc g_queue_peek_tail*(queue: PGQueue): gpointer{.cdecl, dynlib: gliblib, + importc: "g_queue_peek_tail".} +proc g_queue_push_head_link*(queue: PGQueue, link: PGList){.cdecl, + dynlib: gliblib, importc: "g_queue_push_head_link".} +proc g_queue_push_tail_link*(queue: PGQueue, link: PGList){.cdecl, + dynlib: gliblib, importc: "g_queue_push_tail_link".} +proc g_queue_pop_head_link*(queue: PGQueue): PGList{.cdecl, dynlib: gliblib, + importc: "g_queue_pop_head_link".} +proc g_queue_pop_tail_link*(queue: PGQueue): PGList{.cdecl, dynlib: gliblib, + importc: "g_queue_pop_tail_link".} +type + PGRand* = pointer + +proc g_rand_new_with_seed*(seed: guint32): PGRand{.cdecl, dynlib: gliblib, + importc: "g_rand_new_with_seed".} +proc g_rand_new*(): PGRand{.cdecl, dynlib: gliblib, importc: "g_rand_new".} +proc g_rand_free*(rand: PGRand){.cdecl, dynlib: gliblib, importc: "g_rand_free".} +proc g_rand_set_seed*(rand: PGRand, seed: guint32){.cdecl, dynlib: gliblib, + importc: "g_rand_set_seed".} +proc g_rand_boolean*(rand: PGRand): gboolean +proc g_rand_int*(rand: PGRand): guint32{.cdecl, dynlib: gliblib, + importc: "g_rand_int".} +proc g_rand_int_range*(rand: PGRand, `begin`: gint32, `end`: gint32): gint32{. + cdecl, dynlib: gliblib, importc: "g_rand_int_range".} +proc g_rand_double*(rand: PGRand): gdouble{.cdecl, dynlib: gliblib, + importc: "g_rand_double".} +proc g_rand_double_range*(rand: PGRand, `begin`: gdouble, `end`: gdouble): gdouble{. + cdecl, dynlib: gliblib, importc: "g_rand_double_range".} +proc g_random_set_seed*(seed: guint32){.cdecl, dynlib: gliblib, + importc: "g_random_set_seed".} +proc g_random_boolean*(): gboolean +proc g_random_int*(): guint32{.cdecl, dynlib: gliblib, importc: "g_random_int".} +proc g_random_int_range*(`begin`: gint32, `end`: gint32): gint32{.cdecl, + dynlib: gliblib, importc: "g_random_int_range".} +proc g_random_double*(): gdouble{.cdecl, dynlib: gliblib, + importc: "g_random_double".} +proc g_random_double_range*(`begin`: gdouble, `end`: gdouble): gdouble{.cdecl, + dynlib: gliblib, importc: "g_random_double_range".} +type + PGTuples* = ptr TGTuples + TGTuples* {.final.} = object + len*: guint + + PGRelation* = pointer + +proc g_relation_new*(fields: gint): PGRelation{.cdecl, dynlib: gliblib, + importc: "g_relation_new".} +proc g_relation_destroy*(relation: PGRelation){.cdecl, dynlib: gliblib, + importc: "g_relation_destroy".} +proc g_relation_index*(relation: PGRelation, field: gint, hash_func: TGHashFunc, + key_equal_func: TGEqualFunc){.cdecl, dynlib: gliblib, + importc: "g_relation_index".} +proc g_relation_delete*(relation: PGRelation, key: gconstpointer, field: gint): gint{. + cdecl, dynlib: gliblib, importc: "g_relation_delete".} +proc g_relation_select*(relation: PGRelation, key: gconstpointer, field: gint): PGTuples{. + cdecl, dynlib: gliblib, importc: "g_relation_select".} +proc g_relation_count*(relation: PGRelation, key: gconstpointer, field: gint): gint{. + cdecl, dynlib: gliblib, importc: "g_relation_count".} +proc g_relation_print*(relation: PGRelation){.cdecl, dynlib: gliblib, + importc: "g_relation_print".} +proc g_tuples_destroy*(tuples: PGTuples){.cdecl, dynlib: gliblib, + importc: "g_tuples_destroy".} +proc g_tuples_index*(tuples: PGTuples, index: gint, field: gint): gpointer{. + cdecl, dynlib: gliblib, importc: "g_tuples_index".} +type + PGTokenType* = ptr TGTokenType + TGTokenType* = gint + +const + G_TOKEN_LEFT_PAREN* = 40 + G_TOKEN_RIGHT_PAREN* = 41 + G_TOKEN_LEFT_CURLY* = 123 + G_TOKEN_RIGHT_CURLY* = 125 + G_TOKEN_LEFT_BRACE* = 91 + G_TOKEN_RIGHT_BRACE* = 93 + G_TOKEN_EQUAL_SIGN* = 61 + G_TOKEN_COMMA* = 44 + G_TOKEN_NONE* = 256 + G_TOKEN_ERROR* = 257 + G_TOKEN_CHAR* = 258 + G_TOKEN_OCTAL* = 260 + G_TOKEN_INT* = 261 + G_TOKEN_HEX* = 262 + G_TOKEN_FLOAT* = 263 + G_TOKEN_STRING* = 264 + G_TOKEN_SYMBOL* = 265 + G_TOKEN_IDENTIFIER* = 266 + G_TOKEN_IDENTIFIER_NULL* = 267 + G_TOKEN_COMMENT_SINGLE* = 268 + G_TOKEN_COMMENT_MULTI* = 269 + G_TOKEN_LAST* = 270 + +type + PGScanner* = ptr TGScanner + PGScannerConfig* = ptr TGScannerConfig + PGTokenValue* = ptr TGTokenValue + TGTokenValue* {.final.} = object + v_float*: gdouble + + TGScannerMsgFunc* = proc (scanner: PGScanner, message: cstring, + error: gboolean){.cdecl.} + TGScanner* {.final.} = object + user_data*: gpointer + max_parse_errors*: guint + parse_errors*: guint + input_name*: cstring + qdata*: PGData + config*: PGScannerConfig + token*: TGTokenType + value*: TGTokenValue + line*: guint + position*: guint + next_token*: TGTokenType + next_value*: TGTokenValue + next_line*: guint + next_position*: guint + symbol_table*: PGHashTable + input_fd*: gint + text*: cstring + text_end*: cstring + buffer*: cstring + scope_id*: guint + msg_handler*: TGScannerMsgFunc + + TGScannerConfig* {.final.} = object + cset_skip_characters*: cstring + cset_identifier_first*: cstring + cset_identifier_nth*: cstring + cpair_comment_single*: cstring + flag0*: int32 + padding_dummy*: guint + + +const + G_CSET_A_2_Z_UCASE* = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + G_CSET_a_2_z_lcase* = "abcdefghijklmnopqrstuvwxyz" + G_CSET_DIGITS* = "0123456789" + +const + bm_TGScannerConfig_case_sensitive* = 0x00000001'i32 + bp_TGScannerConfig_case_sensitive* = 0'i32 + bm_TGScannerConfig_skip_comment_multi* = 0x00000002'i32 + bp_TGScannerConfig_skip_comment_multi* = 1'i32 + bm_TGScannerConfig_skip_comment_single* = 0x00000004'i32 + bp_TGScannerConfig_skip_comment_single* = 2'i32 + bm_TGScannerConfig_scan_comment_multi* = 0x00000008'i32 + bp_TGScannerConfig_scan_comment_multi* = 3'i32 + bm_TGScannerConfig_scan_identifier* = 0x00000010'i32 + bp_TGScannerConfig_scan_identifier* = 4'i32 + bm_TGScannerConfig_scan_identifier_1char* = 0x00000020'i32 + bp_TGScannerConfig_scan_identifier_1char* = 5'i32 + bm_TGScannerConfig_scan_identifier_NULL* = 0x00000040'i32 + bp_TGScannerConfig_scan_identifier_NULL* = 6'i32 + bm_TGScannerConfig_scan_symbols* = 0x00000080'i32 + bp_TGScannerConfig_scan_symbols* = 7'i32 + bm_TGScannerConfig_scan_binary* = 0x00000100'i32 + bp_TGScannerConfig_scan_binary* = 8'i32 + bm_TGScannerConfig_scan_octal* = 0x00000200'i32 + bp_TGScannerConfig_scan_octal* = 9'i32 + bm_TGScannerConfig_scan_float* = 0x00000400'i32 + bp_TGScannerConfig_scan_float* = 10'i32 + bm_TGScannerConfig_scan_hex* = 0x00000800'i32 + bp_TGScannerConfig_scan_hex* = 11'i32 + bm_TGScannerConfig_scan_hex_dollar* = 0x00001000'i32 + bp_TGScannerConfig_scan_hex_dollar* = 12'i32 + bm_TGScannerConfig_scan_string_sq* = 0x00002000'i32 + bp_TGScannerConfig_scan_string_sq* = 13'i32 + bm_TGScannerConfig_scan_string_dq* = 0x00004000'i32 + bp_TGScannerConfig_scan_string_dq* = 14'i32 + bm_TGScannerConfig_numbers_2_int* = 0x00008000'i32 + bp_TGScannerConfig_numbers_2_int* = 15'i32 + bm_TGScannerConfig_int_2_float* = 0x00010000'i32 + bp_TGScannerConfig_int_2_float* = 16'i32 + bm_TGScannerConfig_identifier_2_string* = 0x00020000'i32 + bp_TGScannerConfig_identifier_2_string* = 17'i32 + bm_TGScannerConfig_char_2_token* = 0x00040000'i32 + bp_TGScannerConfig_char_2_token* = 18'i32 + bm_TGScannerConfig_symbol_2_token* = 0x00080000'i32 + bp_TGScannerConfig_symbol_2_token* = 19'i32 + bm_TGScannerConfig_scope_0_fallback* = 0x00100000'i32 + bp_TGScannerConfig_scope_0_fallback* = 20'i32 + +proc TGScannerConfig_case_sensitive*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_case_sensitive*(a: var TGScannerConfig, + `case_sensitive`: guint) +proc TGScannerConfig_skip_comment_multi*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_skip_comment_multi*(a: var TGScannerConfig, + `skip_comment_multi`: guint) +proc TGScannerConfig_skip_comment_single*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_skip_comment_single*(a: var TGScannerConfig, + `skip_comment_single`: guint) +proc TGScannerConfig_scan_comment_multi*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_scan_comment_multi*(a: var TGScannerConfig, + `scan_comment_multi`: guint) +proc TGScannerConfig_scan_identifier*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_scan_identifier*(a: var TGScannerConfig, + `scan_identifier`: guint) +proc TGScannerConfig_scan_identifier_1char*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_scan_identifier_1char*(a: var TGScannerConfig, + `scan_identifier_1char`: guint) +proc TGScannerConfig_scan_identifier_NULL*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_scan_identifier_NULL*(a: var TGScannerConfig, + `scan_identifier_NULL`: guint) +proc TGScannerConfig_scan_symbols*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_scan_symbols*(a: var TGScannerConfig, + `scan_symbols`: guint) +proc TGScannerConfig_scan_binary*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_scan_binary*(a: var TGScannerConfig, + `scan_binary`: guint) +proc TGScannerConfig_scan_octal*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_scan_octal*(a: var TGScannerConfig, `scan_octal`: guint) +proc TGScannerConfig_scan_float*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_scan_float*(a: var TGScannerConfig, `scan_float`: guint) +proc TGScannerConfig_scan_hex*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_scan_hex*(a: var TGScannerConfig, `scan_hex`: guint) +proc TGScannerConfig_scan_hex_dollar*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_scan_hex_dollar*(a: var TGScannerConfig, + `scan_hex_dollar`: guint) +proc TGScannerConfig_scan_string_sq*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_scan_string_sq*(a: var TGScannerConfig, + `scan_string_sq`: guint) +proc TGScannerConfig_scan_string_dq*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_scan_string_dq*(a: var TGScannerConfig, + `scan_string_dq`: guint) +proc TGScannerConfig_numbers_2_int*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_numbers_2_int*(a: var TGScannerConfig, + `numbers_2_int`: guint) +proc TGScannerConfig_int_2_float*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_int_2_float*(a: var TGScannerConfig, + `int_2_float`: guint) +proc TGScannerConfig_identifier_2_string*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_identifier_2_string*(a: var TGScannerConfig, + `identifier_2_string`: guint) +proc TGScannerConfig_char_2_token*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_char_2_token*(a: var TGScannerConfig, + `char_2_token`: guint) +proc TGScannerConfig_symbol_2_token*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_symbol_2_token*(a: var TGScannerConfig, + `symbol_2_token`: guint) +proc TGScannerConfig_scope_0_fallback*(a: var TGScannerConfig): guint +proc TGScannerConfig_set_scope_0_fallback*(a: var TGScannerConfig, + `scope_0_fallback`: guint) +proc g_scanner_new*(config_templ: PGScannerConfig): PGScanner{.cdecl, + dynlib: gliblib, importc: "g_scanner_new".} +proc g_scanner_destroy*(scanner: PGScanner){.cdecl, dynlib: gliblib, + importc: "g_scanner_destroy".} +proc g_scanner_input_file*(scanner: PGScanner, input_fd: gint){.cdecl, + dynlib: gliblib, importc: "g_scanner_input_file".} +proc g_scanner_sync_file_offset*(scanner: PGScanner){.cdecl, dynlib: gliblib, + importc: "g_scanner_sync_file_offset".} +proc g_scanner_input_text*(scanner: PGScanner, text: cstring, text_len: guint){. + cdecl, dynlib: gliblib, importc: "g_scanner_input_text".} +proc g_scanner_get_next_token*(scanner: PGScanner): TGTokenType{.cdecl, + dynlib: gliblib, importc: "g_scanner_get_next_token".} +proc g_scanner_peek_next_token*(scanner: PGScanner): TGTokenType{.cdecl, + dynlib: gliblib, importc: "g_scanner_peek_next_token".} +proc g_scanner_cur_token*(scanner: PGScanner): TGTokenType{.cdecl, + dynlib: gliblib, importc: "g_scanner_cur_token".} +proc g_scanner_cur_value*(scanner: PGScanner): TGTokenValue{.cdecl, + dynlib: gliblib, importc: "g_scanner_cur_value".} +proc g_scanner_cur_line*(scanner: PGScanner): guint{.cdecl, dynlib: gliblib, + importc: "g_scanner_cur_line".} +proc g_scanner_cur_position*(scanner: PGScanner): guint{.cdecl, dynlib: gliblib, + importc: "g_scanner_cur_position".} +proc g_scanner_eof*(scanner: PGScanner): gboolean{.cdecl, dynlib: gliblib, + importc: "g_scanner_eof".} +proc g_scanner_set_scope*(scanner: PGScanner, scope_id: guint): guint{.cdecl, + dynlib: gliblib, importc: "g_scanner_set_scope".} +proc g_scanner_scope_add_symbol*(scanner: PGScanner, scope_id: guint, + symbol: cstring, value: gpointer){.cdecl, + dynlib: gliblib, importc: "g_scanner_scope_add_symbol".} +proc g_scanner_scope_remove_symbol*(scanner: PGScanner, scope_id: guint, + symbol: cstring){.cdecl, dynlib: gliblib, + importc: "g_scanner_scope_remove_symbol".} +proc g_scanner_scope_lookup_symbol*(scanner: PGScanner, scope_id: guint, + symbol: cstring): gpointer{.cdecl, + dynlib: gliblib, importc: "g_scanner_scope_lookup_symbol".} +proc g_scanner_scope_foreach_symbol*(scanner: PGScanner, scope_id: guint, + func: TGHFunc, user_data: gpointer){.cdecl, + dynlib: gliblib, importc: "g_scanner_scope_foreach_symbol".} +proc g_scanner_lookup_symbol*(scanner: PGScanner, symbol: cstring): gpointer{. + cdecl, dynlib: gliblib, importc: "g_scanner_lookup_symbol".} +proc g_scanner_unexp_token*(scanner: PGScanner, expected_token: TGTokenType, + identifier_spec: cstring, symbol_spec: cstring, + symbol_name: cstring, `message`: cstring, + is_error: gint){.cdecl, dynlib: gliblib, + importc: "g_scanner_unexp_token".} +proc G_SHELL_ERROR*(): TGQuark +type + PGShellError* = ptr TGShellError + TGShellError* = enum + G_SHELL_ERROR_BAD_QUOTING, G_SHELL_ERROR_EMPTY_STRING, G_SHELL_ERROR_FAILED + +proc g_shell_error_quark*(): TGQuark{.cdecl, dynlib: gliblib, + importc: "g_shell_error_quark".} +proc g_shell_quote*(unquoted_string: cstring): cstring{.cdecl, dynlib: gliblib, + importc: "g_shell_quote".} +proc g_shell_unquote*(quoted_string: cstring, error: pointer): cstring{.cdecl, + dynlib: gliblib, importc: "g_shell_unquote".} +proc g_shell_parse_argv*(command_line: cstring, argcp: Pgint, argvp: PPPgchar, + error: pointer): gboolean{.cdecl, dynlib: gliblib, + importc: "g_shell_parse_argv".} +proc G_SPAWN_ERROR*(): TGQuark +type + PGSpawnError* = ptr TGSpawnError + TGSpawnError* = enum + G_SPAWN_ERROR_FORK, G_SPAWN_ERROR_READ, G_SPAWN_ERROR_CHDIR, + G_SPAWN_ERROR_ACCES, G_SPAWN_ERROR_PERM, G_SPAWN_ERROR_2BIG, + G_SPAWN_ERROR_NOEXEC, G_SPAWN_ERROR_NAMETOOLONG, G_SPAWN_ERROR_NOENT, + G_SPAWN_ERROR_NOMEM, G_SPAWN_ERROR_NOTDIR, G_SPAWN_ERROR_LOOP, + G_SPAWN_ERROR_TXTBUSY, G_SPAWN_ERROR_IO, G_SPAWN_ERROR_NFILE, + G_SPAWN_ERROR_MFILE, G_SPAWN_ERROR_INVAL, G_SPAWN_ERROR_ISDIR, + G_SPAWN_ERROR_LIBBAD, G_SPAWN_ERROR_FAILED + TGSpawnChildSetupFunc* = proc (user_data: gpointer){.cdecl.} + PGSpawnFlags* = ptr TGSpawnFlags + TGSpawnFlags* = int + +const + G_SPAWN_LEAVE_DESCRIPTORS_OPEN* = 1 shl 0 + G_SPAWN_DO_NOT_REAP_CHILD* = 1 shl 1 + G_SPAWN_SEARCH_PATH* = 1 shl 2 + G_SPAWN_STDOUT_TO_DEV_NULL* = 1 shl 3 + G_SPAWN_STDERR_TO_DEV_NULL* = 1 shl 4 + G_SPAWN_CHILD_INHERITS_STDIN* = 1 shl 5 + G_SPAWN_FILE_AND_ARGV_ZERO* = 1 shl 6 + +proc g_spawn_error_quark*(): TGQuark{.cdecl, dynlib: gliblib, + importc: "g_spawn_error_quark".} +proc g_spawn_async*(working_directory: cstring, argv: PPgchar, envp: PPgchar, + flags: TGSpawnFlags, child_setup: TGSpawnChildSetupFunc, + user_data: gpointer, child_pid: Pgint, error: pointer): gboolean{. + cdecl, dynlib: gliblib, importc: "g_spawn_async".} +proc g_spawn_async_with_pipes*(working_directory: cstring, argv: PPgchar, + envp: PPgchar, flags: TGSpawnFlags, + child_setup: TGSpawnChildSetupFunc, + user_data: gpointer, child_pid: Pgint, + standard_input: Pgint, standard_output: Pgint, + standard_error: Pgint, error: pointer): gboolean{. + cdecl, dynlib: gliblib, importc: "g_spawn_async_with_pipes".} +proc g_spawn_sync*(working_directory: cstring, argv: PPgchar, envp: PPgchar, + flags: TGSpawnFlags, child_setup: TGSpawnChildSetupFunc, + user_data: gpointer, standard_output: PPgchar, + standard_error: PPgchar, exit_status: Pgint, error: pointer): gboolean{. + cdecl, dynlib: gliblib, importc: "g_spawn_sync".} +proc g_spawn_command_line_sync*(command_line: cstring, standard_output: PPgchar, + standard_error: PPgchar, exit_status: Pgint, + error: pointer): gboolean{.cdecl, + dynlib: gliblib, importc: "g_spawn_command_line_sync".} +proc g_spawn_command_line_async*(command_line: cstring, error: pointer): gboolean{. + cdecl, dynlib: gliblib, importc: "g_spawn_command_line_async".} +proc G_TYPE_IS_BOXED*(theType: GType): gboolean +proc G_VALUE_HOLDS_BOXED*(value: PGValue): gboolean +proc G_TYPE_CLOSURE*(): GType +proc G_TYPE_VALUE*(): GType +proc G_TYPE_VALUE_ARRAY*(): GType +proc G_TYPE_GSTRING*(): GType +proc g_boxed_copy*(boxed_type: GType, src_boxed: gconstpointer): gpointer{. + cdecl, dynlib: gobjectlib, importc: "g_boxed_copy".} +proc g_boxed_free*(boxed_type: GType, boxed: gpointer){.cdecl, + dynlib: gobjectlib, importc: "g_boxed_free".} +proc g_value_set_boxed*(value: PGValue, v_boxed: gconstpointer){.cdecl, + dynlib: gobjectlib, importc: "g_value_set_boxed".} +proc g_value_set_static_boxed*(value: PGValue, v_boxed: gconstpointer){.cdecl, + dynlib: gobjectlib, importc: "g_value_set_static_boxed".} +proc g_value_get_boxed*(value: PGValue): gpointer{.cdecl, dynlib: gobjectlib, + importc: "g_value_get_boxed".} +proc g_value_dup_boxed*(value: PGValue): gpointer{.cdecl, dynlib: gobjectlib, + importc: "g_value_dup_boxed".} +proc g_boxed_type_register_static*(name: cstring, boxed_copy: TGBoxedCopyFunc, + boxed_free: TGBoxedFreeFunc): GType{.cdecl, + dynlib: gobjectlib, importc: "g_boxed_type_register_static".} +proc g_value_set_boxed_take_ownership*(value: PGValue, v_boxed: gconstpointer){. + cdecl, dynlib: gobjectlib, importc: "g_value_set_boxed_take_ownership".} +proc g_closure_get_type*(): GType{.cdecl, dynlib: gobjectlib, + importc: "g_closure_get_type".} +proc g_value_get_type*(): GType{.cdecl, dynlib: gobjectlib, + importc: "g_value_get_type".} +proc g_value_array_get_type*(): GType{.cdecl, dynlib: gobjectlib, + importc: "g_value_array_get_type".} +proc g_gstring_get_type*(): GType{.cdecl, dynlib: gobjectlib, + importc: "g_gstring_get_type".} +type + PGModule* = pointer + TGModuleFlags* = int32 + TGModuleCheckInit* = proc (module: PGModule): cstring{.cdecl.} + TGModuleUnload* = proc (module: PGModule){.cdecl.} + +const + G_MODULE_BIND_LAZY* = 1 shl 0 + G_MODULE_BIND_MASK* = 1 + +proc g_module_supported*(): gboolean{.cdecl, dynlib: gmodulelib, + importc: "g_module_supported".} +proc g_module_open*(file_name: cstring, flags: TGModuleFlags): PGModule{.cdecl, + dynlib: gmodulelib, importc: "g_module_open".} +proc g_module_close*(module: PGModule): gboolean{.cdecl, dynlib: gmodulelib, + importc: "g_module_close".} +proc g_module_make_resident*(module: PGModule){.cdecl, dynlib: gmodulelib, + importc: "g_module_make_resident".} +proc g_module_error*(): cstring{.cdecl, dynlib: gmodulelib, + importc: "g_module_error".} +proc g_module_symbol*(module: PGModule, symbol_name: cstring, symbol: Pgpointer): gboolean{. + cdecl, dynlib: gmodulelib, importc: "g_module_symbol".} +proc g_module_name*(module: PGModule): cstring{.cdecl, dynlib: gmodulelib, + importc: "g_module_name".} +proc g_module_build_path*(directory: cstring, module_name: cstring): cstring{. + cdecl, dynlib: gmodulelib, importc: "g_module_build_path".} +proc g_cclosure_marshal_VOID_VOID*(closure: PGClosure, return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__VOID".} +proc g_cclosure_marshal_VOID_BOOLEAN*(closure: PGClosure, + return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__BOOLEAN".} +proc g_cclosure_marshal_VOID_CHAR*(closure: PGClosure, return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__CHAR".} +proc g_cclosure_marshal_VOID_UCHAR*(closure: PGClosure, return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__UCHAR".} +proc g_cclosure_marshal_VOID_INT*(closure: PGClosure, return_value: PGValue, + n_param_values: GUInt, param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__INT".} +proc g_cclosure_marshal_VOID_UINT*(closure: PGClosure, return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__UINT".} +proc g_cclosure_marshal_VOID_LONG*(closure: PGClosure, return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__LONG".} +proc g_cclosure_marshal_VOID_ULONG*(closure: PGClosure, return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__ULONG".} +proc g_cclosure_marshal_VOID_ENUM*(closure: PGClosure, return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__ENUM".} +proc g_cclosure_marshal_VOID_FLAGS*(closure: PGClosure, return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__FLAGS".} +proc g_cclosure_marshal_VOID_FLOAT*(closure: PGClosure, return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__FLOAT".} +proc g_cclosure_marshal_VOID_DOUBLE*(closure: PGClosure, return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__DOUBLE".} +proc g_cclosure_marshal_VOID_STRING*(closure: PGClosure, return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__STRING".} +proc g_cclosure_marshal_VOID_PARAM*(closure: PGClosure, return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__PARAM".} +proc g_cclosure_marshal_VOID_BOXED*(closure: PGClosure, return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__BOXED".} +proc g_cclosure_marshal_VOID_POINTER*(closure: PGClosure, + return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__POINTER".} +proc g_cclosure_marshal_VOID_OBJECT*(closure: PGClosure, return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__OBJECT".} +proc g_cclosure_marshal_STRING_OBJECT_POINTER*(closure: PGClosure, + return_value: PGValue, n_param_values: GUInt, param_values: PGValue, + invocation_hint: GPointer, marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_STRING__OBJECT_POINTER".} +proc g_cclosure_marshal_VOID_UINT_POINTER*(closure: PGClosure, + return_value: PGValue, n_param_values: GUInt, param_values: PGValue, + invocation_hint: GPointer, marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_VOID__UINT_POINTER".} +proc g_cclosure_marshal_BOOLEAN_FLAGS*(closure: PGClosure, + return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gobjectlib, importc: "g_cclosure_marshal_BOOLEAN__FLAGS".} +proc g_cclosure_marshal_BOOL_FLAGS*(closure: PGClosure, return_value: PGValue, + n_param_values: GUInt, + param_values: PGValue, + invocation_hint: GPointer, + marshal_data: GPointer){.cdecl, + dynlib: gliblib, importc: "g_cclosure_marshal_BOOLEAN__FLAGS".} + +proc GUINT16_SWAP_LE_BE_CONSTANT*(val: guint16): guint16 = + Result = ((val and 0x00FF'i16) shl 8'i16) or ((val and 0xFF00'i16) shr 8'i16) + +proc GUINT32_SWAP_LE_BE_CONSTANT*(val: guint32): guint32 = + Result = ((val and 0x000000FF'i32) shl 24'i32) or ((val and 0x0000FF00'i32) shl 8'i32) or + ((val and 0x00FF0000'i32) shr 8'i32) or ((val and 0xFF000000'i32) shr 24'i32) + +proc GUINT_TO_POINTER*(i: guint): pointer = + Result = cast[Pointer](TAddress(i)) + + +when false: + + type + PGArray* = pointer + + proc g_array_append_val*(a: PGArray, v: gpointer): PGArray = + result = g_array_append_vals(a, addr(v), 1) + + proc g_array_prepend_val*(a: PGArray, v: gpointer): PGArray = + result = g_array_prepend_vals(a, addr(v), 1) + + proc g_array_insert_val*(a: PGArray, i: guint, v: gpointer): PGArray = + result = g_array_insert_vals(a, i, addr(v), 1) + + proc g_ptr_array_index*(parray: PGPtrArray, index: guint): gpointer = + result = cast[PGPointer](cast[int](parray ^. pdata) + + index * SizeOf(GPointer))^ + + proc G_THREAD_ERROR*(): TGQuark = + result = g_thread_error_quark() + + proc g_mutex_lock*(mutex: PGMutex) = + if g_threads_got_initialized: + g_thread_functions_for_glib_use.mutex_lock(mutex) + + proc g_mutex_trylock*(mutex: PGMutex): gboolean = + if g_threads_got_initialized: + result = g_thread_functions_for_glib_use.mutex_trylock(mutex) + else: + result = true + + proc g_mutex_unlock*(mutex: PGMutex) = + if g_threads_got_initialized: + g_thread_functions_for_glib_use.mutex_unlock(mutex) + + proc g_mutex_free*(mutex: PGMutex) = + if g_threads_got_initialized: + g_thread_functions_for_glib_use.mutex_free(mutex) + + proc g_cond_wait*(cond: PGCond, mutex: PGMutex) = + if g_threads_got_initialized: + g_thread_functions_for_glib_use.cond_wait(cond, mutex) + + proc g_cond_timed_wait*(cond: PGCond, mutex: PGMutex, end_time: PGTimeVal): gboolean = + if g_threads_got_initialized: + result = g_thread_functions_for_glib_use.cond_timed_wait(cond, mutex, + end_time) + else: + result = true + + proc g_thread_supported*(): gboolean = + result = g_threads_got_initialized + + proc g_mutex_new*(): PGMutex = + result = g_thread_functions_for_glib_use.mutex_new() + + proc g_cond_new*(): PGCond = + result = g_thread_functions_for_glib_use.cond_new() + + proc g_cond_signal*(cond: PGCond) = + if g_threads_got_initialized: + g_thread_functions_for_glib_use.cond_signal(cond) + + proc g_cond_broadcast*(cond: PGCond) = + if g_threads_got_initialized: + g_thread_functions_for_glib_use.cond_broadcast(cond) + + proc g_cond_free*(cond: PGCond) = + if g_threads_got_initialized: + g_thread_functions_for_glib_use.cond_free(cond) + + proc g_private_new*(dest: TGDestroyNotify): PGPrivate = + result = g_thread_functions_for_glib_use.private_new(dest) + + proc g_private_get*(private_key: PGPrivate): gpointer = + if g_threads_got_initialized: + result = g_thread_functions_for_glib_use.private_get(private_key) + else: + result = private_key + + proc g_private_set*(private_key: var PGPrivate, data: gpointer) = + if g_threads_got_initialized: + nil + else: + private_key = data + + proc g_thread_yield*() = + if g_threads_got_initialized: + g_thread_functions_for_glib_use.thread_yield + + proc g_thread_create*(func: TGThreadFunc, data: gpointer, joinable: gboolean, + error: pointer): PGThread = + result = g_thread_create_full(func, data, 0, joinable, false, + G_THREAD_PRIORITY_NORMAL, error) + + proc g_static_mutex_get_mutex*(mutex: PPGMutex): PGMutex = + result = g_static_mutex_get_mutex_impl(mutex) + + proc g_static_mutex_lock*(mutex: PGStaticMutex) = + g_mutex_lock(g_static_mutex_get_mutex_impl(PPGMutex(mutex))) + + proc g_static_mutex_trylock*(mutex: PGStaticMutex): gboolean = + result = g_mutex_trylock(g_static_mutex_get_mutex(PPGMutex(mutex))) + + proc g_static_mutex_unlock*(mutex: PGStaticMutex) = + g_mutex_unlock(g_static_mutex_get_mutex_impl(PPGMutex(mutex))) + + proc g_main_new*(is_running: gboolean): PGMainLoop = + result = g_main_loop_new(nil, is_running) + + proc g_main_iteration*(may_block: gboolean): gboolean = + result = g_main_context_iteration(nil, may_block) + + proc g_main_pending*(): gboolean = + result = g_main_context_pending(nil) + + proc g_main_set_poll_func*(func: TGPollFunc) = + g_main_context_set_poll_func(nil, func) + +proc g_slist_next*(slist: PGSList): PGSList = + if slist != nil: + result = slist.next + else: + result = nil + +proc g_new*(bytes_per_struct, n_structs: int): gpointer = + result = g_malloc(n_structs * bytes_per_struct) + +proc g_new0*(bytes_per_struct, n_structs: int): gpointer = + result = g_malloc0(n_structs * bytes_per_struct) + +proc g_renew*(struct_size: int, OldMem: gpointer, n_structs: int): gpointer = + result = g_realloc(OldMem, struct_size * n_structs) + +proc g_chunk_new*(chunk: Pointer): Pointer = + result = g_mem_chunk_alloc(chunk) + +proc g_chunk_new0*(chunk: Pointer): Pointer = + result = g_mem_chunk_alloc0(chunk) + +proc g_chunk_free*(mem_chunk: PGMemChunk, mem: gpointer) = + g_mem_chunk_free(mem_chunk, mem) + +proc g_list_previous*(list: PGList): PGList = + if list != nil: + result = list.prev + else: + result = nil + +proc g_list_next*(list: PGList): PGList = + if list != nil: + result = list.next + else: + result = nil + +proc G_CONVERT_ERROR*(): TGQuark = + result = g_convert_error_quark() + +proc g_datalist_id_set_data*(datalist: PPGData, key_id: TGQuark, data: gpointer) = + g_datalist_id_set_data_full(datalist, key_id, data, TGDestroyNotify(nil)) + +proc g_datalist_id_remove_data*(datalist: PPGData, key_id: TGQuark) = + g_datalist_id_set_data(datalist, key_id, nil) + +proc g_datalist_get_data*(datalist: PPGData, key_str: cstring): PPGData = + result = cast[PPGData](g_datalist_id_get_data(datalist, + g_quark_try_string(key_str))) + +proc g_datalist_set_data_full*(datalist: PPGData, key_str: cstring, + data: gpointer, destroy_func: TGDestroyNotify) = + g_datalist_id_set_data_full(datalist, g_quark_from_string(key_str), data, + destroy_func) + +proc g_datalist_set_data*(datalist: PPGData, key_str: cstring, data: gpointer) = + g_datalist_set_data_full(datalist, key_str, data, nil) + +proc g_datalist_remove_no_notify*(datalist: PPGData, key_str: cstring) = + discard g_datalist_id_remove_no_notify(datalist, g_quark_try_string(key_str)) + +proc g_datalist_remove_data*(datalist: PPGData, key_str: cstring) = + g_datalist_id_set_data(datalist, g_quark_try_string(key_str), nil) + +proc g_dataset_id_set_data*(location: gconstpointer, key_id: TGQuark, + data: gpointer) = + g_dataset_id_set_data_full(location, key_id, data, nil) + +proc g_dataset_id_remove_data*(location: gconstpointer, key_id: TGQuark) = + g_dataset_id_set_data(location, key_id, nil) + +proc g_dataset_get_data*(location: gconstpointer, key_str: cstring): gpointer = + result = g_dataset_id_get_data(location, g_quark_try_string(key_str)) + +proc g_dataset_set_data_full*(location: gconstpointer, key_str: cstring, + data: gpointer, destroy_func: TGDestroyNotify) = + g_dataset_id_set_data_full(location, g_quark_from_string(key_str), data, + destroy_func) + +proc g_dataset_remove_no_notify*(location: gconstpointer, key_str: cstring) = + discard g_dataset_id_remove_no_notify(location, g_quark_try_string(key_str)) + +proc g_dataset_set_data*(location: gconstpointer, key_str: cstring, + data: gpointer) = + g_dataset_set_data_full(location, key_str, data, nil) + +proc g_dataset_remove_data*(location: gconstpointer, key_str: cstring) = + g_dataset_id_set_data(location, g_quark_try_string(key_str), nil) + +proc G_FILE_ERROR*(): TGQuark = + result = g_file_error_quark() + +proc TGHookList_hook_size*(a: var TGHookList): guint = + result = (a.flag0 and bm_TGHookList_hook_size) shr bp_TGHookList_hook_size + +proc TGHookList_set_hook_size*(a: var TGHookList, `hook_size`: guint) = + a.flag0 = a.flag0 or + ((`hook_size` shl bp_TGHookList_hook_size) and bm_TGHookList_hook_size) + +proc TGHookList_is_setup*(a: var TGHookList): guint = + result = (a.flag0 and bm_TGHookList_is_setup) shr bp_TGHookList_is_setup + +proc TGHookList_set_is_setup*(a: var TGHookList, `is_setup`: guint) = + a.flag0 = a.flag0 or + ((`is_setup` shl bp_TGHookList_is_setup) and bm_TGHookList_is_setup) + +proc G_HOOK*(hook: pointer): PGHook = + result = cast[PGHook](hook) + +proc G_HOOK_FLAGS*(hook: PGHook): guint = + result = hook.flags + +proc G_HOOK_ACTIVE*(hook: PGHook): bool = + result = (hook.flags and G_HOOK_FLAG_ACTIVE) != 0'i32 + +proc G_HOOK_IN_CALL*(hook: PGHook): bool = + result = (hook.flags and G_HOOK_FLAG_IN_CALL) != 0'i32 + +proc G_HOOK_IS_VALID*(hook: PGHook): bool = + result = (hook.hook_id != 0) and G_HOOK_ACTIVE(hook) + +proc G_HOOK_IS_UNLINKED*(hook: PGHook): bool = + result = (hook.next == nil) and (hook.prev == nil) and + (hook.hook_id == 0) and (hook.ref_count == 0'i32) + +proc g_hook_append*(hook_list: PGHookList, hook: PGHook) = + g_hook_insert_before(hook_list, nil, hook) + +proc G_IO_CHANNEL_ERROR*(): TGQuark = + result = g_io_channel_error_quark() + +proc TGIOChannel_use_buffer*(a: var TGIOChannel): guint = + result = (a.flag0 and bm_TGIOChannel_use_buffer) shr + bp_TGIOChannel_use_buffer + +proc TGIOChannel_set_use_buffer*(a: var TGIOChannel, `use_buffer`: guint) = + a.flag0 = a.flag0 or + (int16(`use_buffer` shl bp_TGIOChannel_use_buffer) and + bm_TGIOChannel_use_buffer) + +proc TGIOChannel_do_encode*(a: var TGIOChannel): guint = + result = (a.flag0 and bm_TGIOChannel_do_encode) shr + bp_TGIOChannel_do_encode + +proc TGIOChannel_set_do_encode*(a: var TGIOChannel, `do_encode`: guint) = + a.flag0 = a.flag0 or + (int16(`do_encode` shl bp_TGIOChannel_do_encode) and + bm_TGIOChannel_do_encode) + +proc TGIOChannel_close_on_unref*(a: var TGIOChannel): guint = + result = (a.flag0 and bm_TGIOChannel_close_on_unref) shr + bp_TGIOChannel_close_on_unref + +proc TGIOChannel_set_close_on_unref*(a: var TGIOChannel, `close_on_unref`: guint) = + a.flag0 = a.flag0 or + (int16(`close_on_unref` shl bp_TGIOChannel_close_on_unref) and + bm_TGIOChannel_close_on_unref) + +proc TGIOChannel_is_readable*(a: var TGIOChannel): guint = + result = (a.flag0 and bm_TGIOChannel_is_readable) shr + bp_TGIOChannel_is_readable + +proc TGIOChannel_set_is_readable*(a: var TGIOChannel, `is_readable`: guint) = + a.flag0 = a.flag0 or + (int16(`is_readable` shl bp_TGIOChannel_is_readable) and + bm_TGIOChannel_is_readable) + +proc TGIOChannel_is_writeable*(a: var TGIOChannel): guint = + result = (a.flag0 and bm_TGIOChannel_is_writeable) shr + bp_TGIOChannel_is_writeable + +proc TGIOChannel_set_is_writeable*(a: var TGIOChannel, `is_writeable`: guint) = + a.flag0 = a.flag0 or + (int16(`is_writeable` shl bp_TGIOChannel_is_writeable) and + bm_TGIOChannel_is_writeable) + +proc TGIOChannel_is_seekable*(a: var TGIOChannel): guint = + result = (a.flag0 and bm_TGIOChannel_is_seekable) shr + bp_TGIOChannel_is_seekable + +proc TGIOChannel_set_is_seekable*(a: var TGIOChannel, `is_seekable`: guint) = + a.flag0 = a.flag0 or + (int16(`is_seekable` shl bp_TGIOChannel_is_seekable) and + bm_TGIOChannel_is_seekable) + +proc g_utf8_next_char*(p: pguchar): pguchar = + result = cast[pguchar](cast[TAddress](p)+1) # p + ord((g_utf8_skip + p^ )^ ) + +when false: + proc GLIB_CHECK_VERSION*(major, minor, micro: guint): bool = + result = ((GLIB_MAJOR_VERSION > major) or + ((GLIB_MAJOR_VERSION == major) and (GLIB_MINOR_VERSION > minor)) or + ((GLIB_MAJOR_VERSION == major) and (GLIB_MINOR_VERSION == minor) and + (GLIB_MICRO_VERSION >= micro))) + + proc g_error*(format: cstring) = + g_log(G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format) + + proc g_message*(format: cstring) = + g_log(G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format) + + proc g_critical*(format: cstring) = + g_log(G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, format) + + proc g_warning*(format: cstring) = + g_log(G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, format) + +proc G_MARKUP_ERROR*(): TGQuark = + result = g_markup_error_quark() + +proc G_NODE_IS_ROOT*(node: PGNode): bool = + result = (node . parent == nil) and (node . next == nil) and + (node . prev == nil) + +proc G_NODE_IS_LEAF*(node: PGNode): bool = + result = node . children == nil + +proc g_node_append*(parent: PGNode, node: PGNode): PGNode = + result = g_node_insert_before(parent, nil, node) + +proc g_node_insert_data*(parent: PGNode, position: gint, data: gpointer): PGNode = + result = g_node_insert(parent, position, g_node_new(data)) + +proc g_node_insert_data_before*(parent: PGNode, sibling: PGNode, data: gpointer): PGNode = + result = g_node_insert_before(parent, sibling, g_node_new(data)) + +proc g_node_prepend_data*(parent: PGNode, data: gpointer): PGNode = + result = g_node_prepend(parent, g_node_new(data)) + +proc g_node_append_data*(parent: PGNode, data: gpointer): PGNode = + result = g_node_insert_before(parent, nil, g_node_new(data)) + +proc g_node_prev_sibling*(node: PGNode): PGNode = + if node != nil: + result = node.prev + else: + result = nil + +proc g_node_next_sibling*(node: PGNode): PGNode = + if node != nil: + result = node.next + else: + result = nil + +proc g_node_first_child*(node: PGNode): PGNode = + if node != nil: + result = node.children + else: + result = nil + +proc g_rand_boolean*(rand: PGRand): gboolean = + result = (int(g_rand_int(rand)) and (1 shl 15)) != 0 + +proc g_random_boolean*(): gboolean = + result = (int(g_random_int()) and (1 shl 15)) != 0 + +proc TGScannerConfig_case_sensitive*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_case_sensitive) shr + bp_TGScannerConfig_case_sensitive + +proc TGScannerConfig_set_case_sensitive*(a: var TGScannerConfig, + `case_sensitive`: guint) = + a.flag0 = a.flag0 or + ((`case_sensitive` shl bp_TGScannerConfig_case_sensitive) and + bm_TGScannerConfig_case_sensitive) + +proc TGScannerConfig_skip_comment_multi*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_skip_comment_multi) shr + bp_TGScannerConfig_skip_comment_multi + +proc TGScannerConfig_set_skip_comment_multi*(a: var TGScannerConfig, + `skip_comment_multi`: guint) = + a.flag0 = a.flag0 or + ((`skip_comment_multi` shl bp_TGScannerConfig_skip_comment_multi) and + bm_TGScannerConfig_skip_comment_multi) + +proc TGScannerConfig_skip_comment_single*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_skip_comment_single) shr + bp_TGScannerConfig_skip_comment_single + +proc TGScannerConfig_set_skip_comment_single*(a: var TGScannerConfig, + `skip_comment_single`: guint) = + a.flag0 = a.flag0 or + ((`skip_comment_single` shl bp_TGScannerConfig_skip_comment_single) and + bm_TGScannerConfig_skip_comment_single) + +proc TGScannerConfig_scan_comment_multi*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_scan_comment_multi) shr + bp_TGScannerConfig_scan_comment_multi + +proc TGScannerConfig_set_scan_comment_multi*(a: var TGScannerConfig, + `scan_comment_multi`: guint) = + a.flag0 = a.flag0 or + ((`scan_comment_multi` shl bp_TGScannerConfig_scan_comment_multi) and + bm_TGScannerConfig_scan_comment_multi) + +proc TGScannerConfig_scan_identifier*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_scan_identifier) shr + bp_TGScannerConfig_scan_identifier + +proc TGScannerConfig_set_scan_identifier*(a: var TGScannerConfig, + `scan_identifier`: guint) = + a.flag0 = a.flag0 or + ((`scan_identifier` shl bp_TGScannerConfig_scan_identifier) and + bm_TGScannerConfig_scan_identifier) + +proc TGScannerConfig_scan_identifier_1char*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_scan_identifier_1char) shr + bp_TGScannerConfig_scan_identifier_1char + +proc TGScannerConfig_set_scan_identifier_1char*(a: var TGScannerConfig, + `scan_identifier_1char`: guint) = + a.flag0 = a.flag0 or + ((`scan_identifier_1char` shl bp_TGScannerConfig_scan_identifier_1char) and + bm_TGScannerConfig_scan_identifier_1char) + +proc TGScannerConfig_scan_identifier_NULL*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_scan_identifier_NULL) shr + bp_TGScannerConfig_scan_identifier_NULL + +proc TGScannerConfig_set_scan_identifier_NULL*(a: var TGScannerConfig, + `scan_identifier_NULL`: guint) = + a.flag0 = a.flag0 or + ((`scan_identifier_NULL` shl bp_TGScannerConfig_scan_identifier_NULL) and + bm_TGScannerConfig_scan_identifier_NULL) + +proc TGScannerConfig_scan_symbols*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_scan_symbols) shr + bp_TGScannerConfig_scan_symbols + +proc TGScannerConfig_set_scan_symbols*(a: var TGScannerConfig, + `scan_symbols`: guint) = + a.flag0 = a.flag0 or + ((`scan_symbols` shl bp_TGScannerConfig_scan_symbols) and + bm_TGScannerConfig_scan_symbols) + +proc TGScannerConfig_scan_binary*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_scan_binary) shr + bp_TGScannerConfig_scan_binary + +proc TGScannerConfig_set_scan_binary*(a: var TGScannerConfig, + `scan_binary`: guint) = + a.flag0 = a.flag0 or + ((`scan_binary` shl bp_TGScannerConfig_scan_binary) and + bm_TGScannerConfig_scan_binary) + +proc TGScannerConfig_scan_octal*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_scan_octal) shr + bp_TGScannerConfig_scan_octal + +proc TGScannerConfig_set_scan_octal*(a: var TGScannerConfig, `scan_octal`: guint) = + a.flag0 = a.flag0 or + ((`scan_octal` shl bp_TGScannerConfig_scan_octal) and + bm_TGScannerConfig_scan_octal) + +proc TGScannerConfig_scan_float*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_scan_float) shr + bp_TGScannerConfig_scan_float + +proc TGScannerConfig_set_scan_float*(a: var TGScannerConfig, `scan_float`: guint) = + a.flag0 = a.flag0 or + ((`scan_float` shl bp_TGScannerConfig_scan_float) and + bm_TGScannerConfig_scan_float) + +proc TGScannerConfig_scan_hex*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_scan_hex) shr + bp_TGScannerConfig_scan_hex + +proc TGScannerConfig_set_scan_hex*(a: var TGScannerConfig, `scan_hex`: guint) = + a.flag0 = a.flag0 or + ((`scan_hex` shl bp_TGScannerConfig_scan_hex) and + bm_TGScannerConfig_scan_hex) + +proc TGScannerConfig_scan_hex_dollar*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_scan_hex_dollar) shr + bp_TGScannerConfig_scan_hex_dollar + +proc TGScannerConfig_set_scan_hex_dollar*(a: var TGScannerConfig, + `scan_hex_dollar`: guint) = + a.flag0 = a.flag0 or + ((`scan_hex_dollar` shl bp_TGScannerConfig_scan_hex_dollar) and + bm_TGScannerConfig_scan_hex_dollar) + +proc TGScannerConfig_scan_string_sq*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_scan_string_sq) shr + bp_TGScannerConfig_scan_string_sq + +proc TGScannerConfig_set_scan_string_sq*(a: var TGScannerConfig, + `scan_string_sq`: guint) = + a.flag0 = a.flag0 or + ((`scan_string_sq` shl bp_TGScannerConfig_scan_string_sq) and + bm_TGScannerConfig_scan_string_sq) + +proc TGScannerConfig_scan_string_dq*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_scan_string_dq) shr + bp_TGScannerConfig_scan_string_dq + +proc TGScannerConfig_set_scan_string_dq*(a: var TGScannerConfig, + `scan_string_dq`: guint) = + a.flag0 = a.flag0 or + ((`scan_string_dq` shl bp_TGScannerConfig_scan_string_dq) and + bm_TGScannerConfig_scan_string_dq) + +proc TGScannerConfig_numbers_2_int*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_numbers_2_int) shr + bp_TGScannerConfig_numbers_2_int + +proc TGScannerConfig_set_numbers_2_int*(a: var TGScannerConfig, + `numbers_2_int`: guint) = + a.flag0 = a.flag0 or + ((`numbers_2_int` shl bp_TGScannerConfig_numbers_2_int) and + bm_TGScannerConfig_numbers_2_int) + +proc TGScannerConfig_int_2_float*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_int_2_float) shr + bp_TGScannerConfig_int_2_float + +proc TGScannerConfig_set_int_2_float*(a: var TGScannerConfig, + `int_2_float`: guint) = + a.flag0 = a.flag0 or + ((`int_2_float` shl bp_TGScannerConfig_int_2_float) and + bm_TGScannerConfig_int_2_float) + +proc TGScannerConfig_identifier_2_string*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_identifier_2_string) shr + bp_TGScannerConfig_identifier_2_string + +proc TGScannerConfig_set_identifier_2_string*(a: var TGScannerConfig, + `identifier_2_string`: guint) = + a.flag0 = a.flag0 or + ((`identifier_2_string` shl bp_TGScannerConfig_identifier_2_string) and + bm_TGScannerConfig_identifier_2_string) + +proc TGScannerConfig_char_2_token*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_char_2_token) shr + bp_TGScannerConfig_char_2_token + +proc TGScannerConfig_set_char_2_token*(a: var TGScannerConfig, + `char_2_token`: guint) = + a.flag0 = a.flag0 or + ((`char_2_token` shl bp_TGScannerConfig_char_2_token) and + bm_TGScannerConfig_char_2_token) + +proc TGScannerConfig_symbol_2_token*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_symbol_2_token) shr + bp_TGScannerConfig_symbol_2_token + +proc TGScannerConfig_set_symbol_2_token*(a: var TGScannerConfig, + `symbol_2_token`: guint) = + a.flag0 = a.flag0 or + ((`symbol_2_token` shl bp_TGScannerConfig_symbol_2_token) and + bm_TGScannerConfig_symbol_2_token) + +proc TGScannerConfig_scope_0_fallback*(a: var TGScannerConfig): guint = + result = (a.flag0 and bm_TGScannerConfig_scope_0_fallback) shr + bp_TGScannerConfig_scope_0_fallback + +proc TGScannerConfig_set_scope_0_fallback*(a: var TGScannerConfig, + `scope_0_fallback`: guint) = + a.flag0 = a.flag0 or + ((`scope_0_fallback` shl bp_TGScannerConfig_scope_0_fallback) and + bm_TGScannerConfig_scope_0_fallback) + +proc g_scanner_freeze_symbol_table*(scanner: PGScanner) = + if Scanner == nil: nil + +proc g_scanner_thaw_symbol_table*(scanner: PGScanner) = + if Scanner == nil: nil + +proc G_SHELL_ERROR*(): TGQuark = + result = g_shell_error_quark() + +proc G_SPAWN_ERROR*(): TGQuark = + result = g_spawn_error_quark() + +when false: + proc g_ascii_isalnum*(c: gchar): bool = + result = ((g_ascii_table[guchar(c)]) and G_ASCII_ALNUM) != 0 + + proc g_ascii_isalpha*(c: gchar): bool = + result = ((g_ascii_table[guchar(c)]) and G_ASCII_ALPHA) != 0 + + proc g_ascii_iscntrl*(c: gchar): bool = + result = ((g_ascii_table[guchar(c)]) and G_ASCII_CNTRL) != 0 + + proc g_ascii_isdigit*(c: gchar): bool = + result = ((g_ascii_table[guchar(c)]) and G_ASCII_DIGIT) != 0 + + proc g_ascii_isgraph*(c: gchar): bool = + result = ((g_ascii_table[guchar(c)]) and G_ASCII_GRAPH) != 0 + + proc g_ascii_islower*(c: gchar): bool = + result = ((g_ascii_table[guchar(c)]) and G_ASCII_LOWER) != 0 + + proc g_ascii_isprint*(c: gchar): bool = + result = ((g_ascii_table[guchar(c)]) and G_ASCII_PRINT) != 0 + + proc g_ascii_ispunct*(c: gchar): bool = + result = ((g_ascii_table[guchar(c)]) and G_ASCII_PUNCT) != 0 + + proc g_ascii_isspace*(c: gchar): bool = + result = ((g_ascii_table[guchar(c)]) and G_ASCII_SPACE) != 0 + + proc g_ascii_isupper*(c: gchar): bool = + result = ((g_ascii_table[guchar(c)]) and G_ASCII_UPPER) != 0 + + proc g_ascii_isxdigit*(c: gchar): bool = + result = ((g_ascii_table[guchar(c)]) and G_ASCII_XDIGIT) != 0 + + proc g_strstrip*(str: cstring): cstring = + result = g_strchomp(g_strchug(str)) + +proc G_TYPE_MAKE_FUNDAMENTAL*(x: int): GType = + result = GType(x shl G_TYPE_FUNDAMENTAL_SHIFT) + +proc G_TYPE_IS_FUNDAMENTAL*(theType: GType): bool = + result = theType <= G_TYPE_FUNDAMENTAL_MAX + +proc G_TYPE_IS_DERIVED*(theType: GType): bool = + result = theType > G_TYPE_FUNDAMENTAL_MAX + +proc G_TYPE_IS_INTERFACE*(theType: GType): bool = + result = (G_TYPE_FUNDAMENTAL(theType)) == G_TYPE_INTERFACE + +proc G_TYPE_IS_CLASSED*(theType: GType): gboolean = + result = private_g_type_test_flags(theType, G_TYPE_FLAG_CLASSED) + +proc G_TYPE_IS_INSTANTIATABLE*(theType: GType): bool = + result = private_g_type_test_flags(theType, G_TYPE_FLAG_INSTANTIATABLE) + +proc G_TYPE_IS_DERIVABLE*(theType: GType): bool = + result = private_g_type_test_flags(theType, G_TYPE_FLAG_DERIVABLE) + +proc G_TYPE_IS_DEEP_DERIVABLE*(theType: GType): bool = + result = private_g_type_test_flags(theType, G_TYPE_FLAG_DEEP_DERIVABLE) + +proc G_TYPE_IS_ABSTRACT*(theType: GType): bool = + result = private_g_type_test_flags(theType, G_TYPE_FLAG_ABSTRACT) + +proc G_TYPE_IS_VALUE_ABSTRACT*(theType: GType): bool = + result = private_g_type_test_flags(theType, G_TYPE_FLAG_VALUE_ABSTRACT) + +proc G_TYPE_IS_VALUE_TYPE*(theType: GType): bool = + result = private_g_type_check_is_value_type(theType) + +proc G_TYPE_HAS_VALUE_TABLE*(theType: GType): bool = + result = (g_type_value_table_peek(theType)) != nil + +proc G_TYPE_CHECK_INSTANCE*(instance: Pointer): gboolean = + result = private_g_type_check_instance(cast[PGTypeInstance](instance)) + +proc G_TYPE_CHECK_INSTANCE_CAST*(instance: Pointer, g_type: GType): PGTypeInstance = + result = cast[PGTypeInstance](private_g_type_check_instance_cast( + cast[PGTypeInstance](instance), g_type)) + +proc G_TYPE_CHECK_INSTANCE_TYPE*(instance: Pointer, g_type: GType): bool = + result = private_g_type_check_instance_is_a( + cast[PGTypeInstance](instance), g_type) + +proc G_TYPE_INSTANCE_GET_CLASS*(instance: Pointer, g_type: GType): PGTypeClass = + result = cast[PGTypeInstance](Instance).g_class + result = private_g_type_check_class_cast(result, g_type) + +proc G_TYPE_INSTANCE_GET_INTERFACE*(instance: Pointer, g_type: GType): Pointer = + result = g_type_interface_peek((cast[PGTypeInstance](instance)).g_class, g_type) + +proc G_TYPE_CHECK_CLASS_CAST*(g_class: pointer, g_type: GType): Pointer = + result = private_g_type_check_class_cast(cast[PGTypeClass](g_class), g_type) + +proc G_TYPE_CHECK_CLASS_TYPE*(g_class: pointer, g_type: GType): bool = + result = private_g_type_check_class_is_a(cast[PGTypeClass](g_class), g_type) + +proc G_TYPE_CHECK_VALUE*(value: Pointer): bool = + result = private_g_type_check_value(cast[PGValue](Value)) + +proc G_TYPE_CHECK_VALUE_TYPE*(value: pointer, g_type: GType): bool = + result = private_g_type_check_value_holds(cast[PGValue](value), g_type) + +proc G_TYPE_FROM_INSTANCE*(instance: Pointer): GType = + result = G_TYPE_FROM_CLASS((cast[PGTypeInstance](instance)) . g_class) + +proc G_TYPE_FROM_CLASS*(g_class: Pointer): GType = + result = (cast[PGTypeClass](g_class)) . g_type + +proc G_TYPE_FROM_INTERFACE*(g_iface: Pointer): GType = + result = (cast[PGTypeInterface](g_iface)) . g_type + +proc G_TYPE_IS_VALUE*(theType: GType): bool = + result = private_g_type_check_is_value_type(theType) + +proc G_IS_VALUE*(value: Pointer): bool = + result = G_TYPE_CHECK_VALUE(value) + +proc G_VALUE_TYPE*(value: Pointer): GType = + result = (cast[PGValue](value)) . g_type + +proc G_VALUE_TYPE_NAME*(value: Pointer): cstring = + result = g_type_name(G_VALUE_TYPE(value)) + +proc G_VALUE_HOLDS*(value: pointer, g_type: GType): bool = + result = G_TYPE_CHECK_VALUE_TYPE(value, g_type) + +proc G_TYPE_IS_PARAM*(theType: GType): bool = + result = (G_TYPE_FUNDAMENTAL(theType)) == G_TYPE_PARAM + +proc G_PARAM_SPEC*(pspec: Pointer): PGParamSpec = + result = cast[PGParamSpec](G_TYPE_CHECK_INSTANCE_CAST(pspec, G_TYPE_PARAM)) + +proc G_IS_PARAM_SPEC*(pspec: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(pspec, G_TYPE_PARAM) + +proc G_PARAM_SPEC_CLASS*(pclass: Pointer): PGParamSpecClass = + result = cast[PGParamSpecClass]( + G_TYPE_CHECK_CLASS_CAST(pclass, G_TYPE_PARAM)) + +proc G_IS_PARAM_SPEC_CLASS*(pclass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(pclass, G_TYPE_PARAM) + +proc G_PARAM_SPEC_GET_CLASS*(pspec: Pointer): PGParamSpecClass = + result = cast[PGParamSpecClass](G_TYPE_INSTANCE_GET_CLASS(pspec, G_TYPE_PARAM)) + +proc G_PARAM_SPEC_TYPE*(pspec: Pointer): GType = + result = G_TYPE_FROM_INSTANCE(pspec) + +proc G_PARAM_SPEC_TYPE_NAME*(pspec: Pointer): cstring = + result = g_type_name(G_PARAM_SPEC_TYPE(pspec)) + +proc G_PARAM_SPEC_VALUE_TYPE*(pspec: Pointer): GType = + result = (G_PARAM_SPEC(pspec)) . value_type + +proc G_VALUE_HOLDS_PARAM*(value: Pointer): bool = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_PARAM) + +proc G_CLOSURE_NEEDS_MARSHAL*(closure: Pointer): bool = + result = cast[PGClosure](closure).marshal == nil + +proc G_CLOSURE_N_NOTIFIERS*(cl: PGClosure): int32 = + result = ((meta_marshal(cl) + ((n_guards(cl)) shl 1'i32)) + (n_fnotifiers(cl))) + + (n_inotifiers(cl)) + +proc G_CCLOSURE_SWAP_DATA*(cclosure: PGClosure): int32 = + result = derivative_flag(cclosure) + +proc G_CALLBACK*(f: pointer): TGCallback = + result = cast[TGCallback](f) + +proc ref_count*(a: var TGClosure): guint = + result = (a.flag0 and bm_TGClosure_ref_count) shr bp_TGClosure_ref_count + +proc set_ref_count*(a: var TGClosure, `ref_count`: guint) = + a.flag0 = a.flag0 or + ((`ref_count` shl bp_TGClosure_ref_count) and bm_TGClosure_ref_count) + +proc meta_marshal*(a: PGClosure): guint = + result = (a . flag0 and bm_TGClosure_meta_marshal) shr + bp_TGClosure_meta_marshal + +proc set_meta_marshal*(a: var TGClosure, `meta_marshal`: guint) = + a.flag0 = a.flag0 or + ((`meta_marshal` shl bp_TGClosure_meta_marshal) and + bm_TGClosure_meta_marshal) + +proc n_guards*(a: PGClosure): guint = + result = (a . flag0 and bm_TGClosure_n_guards) shr bp_TGClosure_n_guards + +proc set_n_guards*(a: var TGClosure, `n_guards`: guint) = + a.flag0 = a.flag0 or + ((`n_guards` shl bp_TGClosure_n_guards) and bm_TGClosure_n_guards) + +proc n_fnotifiers*(a: PGClosure): guint = + result = (a . flag0 and bm_TGClosure_n_fnotifiers) shr + bp_TGClosure_n_fnotifiers + +proc set_n_fnotifiers*(a: var TGClosure, `n_fnotifiers`: guint) = + a.flag0 = a.flag0 or + ((`n_fnotifiers` shl bp_TGClosure_n_fnotifiers) and + bm_TGClosure_n_fnotifiers) + +proc n_inotifiers*(a: PGClosure): guint = + result = (a . flag0 and bm_TGClosure_n_inotifiers) shr + bp_TGClosure_n_inotifiers + +proc set_n_inotifiers*(a: var TGClosure, `n_inotifiers`: guint) = + a.flag0 = a.flag0 or + ((`n_inotifiers` shl bp_TGClosure_n_inotifiers) and + bm_TGClosure_n_inotifiers) + +proc in_inotify*(a: var TGClosure): guint = + result = (a.flag0 and bm_TGClosure_in_inotify) shr bp_TGClosure_in_inotify + +proc set_in_inotify*(a: var TGClosure, `in_inotify`: guint) = + a.flag0 = a.flag0 or + ((`in_inotify` shl bp_TGClosure_in_inotify) and bm_TGClosure_in_inotify) + +proc floating*(a: var TGClosure): guint = + result = (a.flag0 and bm_TGClosure_floating) shr bp_TGClosure_floating + +proc set_floating*(a: var TGClosure, `floating`: guint) = + a.flag0 = a.flag0 or + ((`floating` shl bp_TGClosure_floating) and bm_TGClosure_floating) + +proc derivative_flag*(a: PGClosure): guint = + result = (a . flag0 and bm_TGClosure_derivative_flag) shr + bp_TGClosure_derivative_flag + +proc set_derivative_flag*(a: var TGClosure, `derivative_flag`: guint) = + a.flag0 = a.flag0 or + ((`derivative_flag` shl bp_TGClosure_derivative_flag) and + bm_TGClosure_derivative_flag) + +proc in_marshal*(a: var TGClosure): guint = + result = (a.flag0 and bm_TGClosure_in_marshal) shr bp_TGClosure_in_marshal + +proc set_in_marshal*(a: var TGClosure, in_marshal: guint) = + a.flag0 = a.flag0 or + ((in_marshal shl bp_TGClosure_in_marshal) and bm_TGClosure_in_marshal) + +proc is_invalid*(a: var TGClosure): guint = + result = (a.flag0 and bm_TGClosure_is_invalid) shr bp_TGClosure_is_invalid + +proc set_is_invalid*(a: var TGClosure, is_invalid: guint) = + a.flag0 = a.flag0 or + ((is_invalid shl bp_TGClosure_is_invalid) and bm_TGClosure_is_invalid) + +proc g_signal_connect*(instance: gpointer, detailed_signal: cstring, + c_handler: TGCallback, data: gpointer): gulong = + result = g_signal_connect_data(instance, detailed_signal, c_handler, data, + nil, TGConnectFlags(0)) + +proc g_signal_connect_after*(instance: gpointer, detailed_signal: cstring, + c_handler: TGCallback, data: gpointer): gulong = + result = g_signal_connect_data(instance, detailed_signal, c_handler, data, + nil, G_CONNECT_AFTER) + +proc g_signal_connect_swapped*(instance: gpointer, detailed_signal: cstring, + c_handler: TGCallback, data: gpointer): gulong = + result = g_signal_connect_data(instance, detailed_signal, c_handler, data, + nil, G_CONNECT_SWAPPED) + +proc g_signal_handlers_disconnect_by_func*(instance: gpointer, + func, data: gpointer): guint = + result = g_signal_handlers_disconnect_matched(instance, + TGSignalMatchType(G_SIGNAL_MATCH_FUNC or G_SIGNAL_MATCH_DATA), 0, 0, nil, + func, data) + +proc g_signal_handlers_block_by_func*(instance: gpointer, func, data: gpointer) = + discard g_signal_handlers_block_matched(instance, TGSignalMatchType( + G_SIGNAL_MATCH_FUNC or G_SIGNAL_MATCH_DATA), 0, 0, nil, func, data) + +proc g_signal_handlers_unblock_by_func*(instance: gpointer, func, data: gpointer) = + discard g_signal_handlers_unblock_matched(instance, TGSignalMatchType( + G_SIGNAL_MATCH_FUNC or G_SIGNAL_MATCH_DATA), 0, 0, nil, func, data) + +proc G_TYPE_IS_OBJECT*(theType: GType): bool = + result = (G_TYPE_FUNDAMENTAL(theType)) == G_TYPE_OBJECT + +proc G_OBJECT*(anObject: pointer): PGObject = + result = cast[PGObject](G_TYPE_CHECK_INSTANCE_CAST(anObject, G_TYPE_OBJECT)) + +proc G_OBJECT_CLASS*(class: Pointer): PGObjectClass = + result = cast[PGObjectClass](G_TYPE_CHECK_CLASS_CAST(class, G_TYPE_OBJECT)) + +proc G_IS_OBJECT*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, G_TYPE_OBJECT) + +proc G_IS_OBJECT_CLASS*(class: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(class, G_TYPE_OBJECT) + +proc G_OBJECT_GET_CLASS*(anObject: pointer): PGObjectClass = + result = cast[PGObjectClass](G_TYPE_INSTANCE_GET_CLASS(anObject, G_TYPE_OBJECT)) + +proc G_OBJECT_TYPE*(anObject: pointer): GType = + result = G_TYPE_FROM_INSTANCE(anObject) + +proc G_OBJECT_TYPE_NAME*(anObject: pointer): cstring = + result = g_type_name(G_OBJECT_TYPE(anObject)) + +proc G_OBJECT_CLASS_TYPE*(class: Pointer): GType = + result = G_TYPE_FROM_CLASS(class) + +proc G_OBJECT_CLASS_NAME*(class: Pointer): cstring = + result = g_type_name(G_OBJECT_CLASS_TYPE(class)) + +proc G_VALUE_HOLDS_OBJECT*(value: Pointer): bool = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_OBJECT) + +proc G_OBJECT_WARN_INVALID_PROPERTY_ID*(anObject: gpointer, property_id: gint, + pspec: gpointer) = + G_OBJECT_WARN_INVALID_PSPEC(anObject, "property", property_id, pspec) + +proc G_OBJECT_WARN_INVALID_PSPEC*(anObject: gpointer, pname: cstring, + property_id: gint, pspec: gpointer) = + var + theObject: PGObject + pspec2: PGParamSpec + property_id: guint + theObject = cast[PGObject](anObject) + pspec2 = cast[PGParamSpec](pspec) + property_id = (property_id) + write(stdout, "invalid thingy\n") + #g_warning("%s: invalid %s id %u for \"%s\" of type `%s\' in `%s\'", "", pname, + # `property_id`, `pspec` . name, + # g_type_name(G_PARAM_SPEC_TYPE(`pspec`)), + # G_OBJECT_TYPE_NAME(theobject)) + +proc G_TYPE_TYPE_PLUGIN*(): GType = + result = g_type_plugin_get_type() + +proc G_TYPE_PLUGIN*(inst: Pointer): PGTypePlugin = + result = PGTypePlugin(G_TYPE_CHECK_INSTANCE_CAST(inst, G_TYPE_TYPE_PLUGIN())) + +proc G_TYPE_PLUGIN_CLASS*(vtable: Pointer): PGTypePluginClass = + result = cast[PGTypePluginClass](G_TYPE_CHECK_CLASS_CAST(vtable, + G_TYPE_TYPE_PLUGIN())) + +proc G_IS_TYPE_PLUGIN*(inst: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(inst, G_TYPE_TYPE_PLUGIN()) + +proc G_IS_TYPE_PLUGIN_CLASS*(vtable: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(vtable, G_TYPE_TYPE_PLUGIN()) + +proc G_TYPE_PLUGIN_GET_CLASS*(inst: Pointer): PGTypePluginClass = + result = cast[PGTypePluginClass](G_TYPE_INSTANCE_GET_INTERFACE(inst, + G_TYPE_TYPE_PLUGIN())) + +proc G_TYPE_IS_ENUM*(theType: GType): gboolean = + result = (G_TYPE_FUNDAMENTAL(theType) == G_TYPE_ENUM) + +proc G_ENUM_CLASS*(class: pointer): PGEnumClass = + result = cast[PGEnumClass](G_TYPE_CHECK_CLASS_CAST(class, G_TYPE_ENUM)) + +proc G_IS_ENUM_CLASS*(class: pointer): gboolean = + result = G_TYPE_CHECK_CLASS_TYPE(class, G_TYPE_ENUM) + +proc G_ENUM_CLASS_TYPE*(class: pointer): GType = + result = G_TYPE_FROM_CLASS(class) + +proc G_ENUM_CLASS_TYPE_NAME*(class: pointer): cstring = + result = g_type_name(G_ENUM_CLASS_TYPE(class)) + +proc G_TYPE_IS_FLAGS*(theType: GType): gboolean = + result = (G_TYPE_FUNDAMENTAL(theType)) == G_TYPE_FLAGS + +proc G_FLAGS_CLASS*(class: pointer): PGFlagsClass = + result = cast[PGFlagsClass](G_TYPE_CHECK_CLASS_CAST(class, G_TYPE_FLAGS)) + +proc G_IS_FLAGS_CLASS*(class: pointer): gboolean = + result = G_TYPE_CHECK_CLASS_TYPE(class, G_TYPE_FLAGS) + +proc G_FLAGS_CLASS_TYPE*(class: pointer): GType = + result = G_TYPE_FROM_CLASS(class) + +proc G_FLAGS_CLASS_TYPE_NAME*(class: pointer): cstring = + result = g_type_name(G_FLAGS_TYPE(cast[TAddress](class))) + +proc G_VALUE_HOLDS_ENUM*(value: pointer): gboolean = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_ENUM) + +proc G_VALUE_HOLDS_FLAGS*(value: pointer): gboolean = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_FLAGS) + +proc CLAMP*(x, MinX, MaxX: int): int = + if x < MinX: + result = MinX + elif x > MaxX: + result = MaxX + else: + result = x + +proc GPOINTER_TO_SIZE*(p: GPointer): GSize = + result = GSize(cast[TAddress](p)) + +proc GSIZE_TO_POINTER*(s: GSize): GPointer = + result = cast[GPointer](s) + +proc G_VALUE_HOLDS_CHAR*(value: PGValue): bool = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_CHAR) + +proc G_VALUE_HOLDS_UCHAR*(value: PGValue): bool = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_UCHAR) + +proc G_VALUE_HOLDS_BOOLEAN*(value: PGValue): bool = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_BOOLEAN) + +proc G_VALUE_HOLDS_INT*(value: PGValue): bool = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_INT) + +proc G_VALUE_HOLDS_UINT*(value: PGValue): bool = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_UINT) + +proc G_VALUE_HOLDS_LONG*(value: PGValue): bool = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_LONG) + +proc G_VALUE_HOLDS_ULONG*(value: PGValue): bool = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_ULONG) + +proc G_VALUE_HOLDS_INT64*(value: PGValue): bool = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_INT64) + +proc G_VALUE_HOLDS_UINT64*(value: PGValue): bool = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_UINT64) + +proc G_VALUE_HOLDS_FLOAT*(value: PGValue): bool = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_FLOAT) + +proc G_VALUE_HOLDS_DOUBLE*(value: PGValue): bool = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_DOUBLE) + +proc G_VALUE_HOLDS_STRING*(value: PGValue): bool = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_STRING) + +proc G_VALUE_HOLDS_POINTER*(value: PGValue): bool = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_POINTER) + +proc G_TYPE_IS_BOXED*(theType: GType): gboolean = + result = (G_TYPE_FUNDAMENTAL(theType)) == G_TYPE_BOXED + +proc G_VALUE_HOLDS_BOXED*(value: PGValue): gboolean = + result = G_TYPE_CHECK_VALUE_TYPE(value, G_TYPE_BOXED) + +proc G_TYPE_CLOSURE*(): GType = + result = g_closure_get_type() + +proc G_TYPE_VALUE*(): GType = + result = g_value_get_type() + +proc G_TYPE_VALUE_ARRAY*(): GType = + result = g_value_array_get_type() + +proc G_TYPE_GSTRING*(): GType = + result = g_gstring_get_type() diff --git a/lib/oldwrappers/gtk/gtk2.nim b/lib/oldwrappers/gtk/gtk2.nim new file mode 100644 index 000000000..e7c5be7be --- /dev/null +++ b/lib/oldwrappers/gtk/gtk2.nim @@ -0,0 +1,17271 @@ +{.deadCodeElim: on.} + +import + glib2, atk, pango, gdk2pixbuf, gdk2 + +when defined(win32): + const + gtklib = "libgtk-win32-2.0-0.dll" +elif defined(darwin): + const + gtklib = "gtk-x11-2.0" + # linklib gtk-x11-2.0 + # linklib gdk-x11-2.0 + # linklib pango-1.0.0 + # linklib glib-2.0.0 + # linklib gobject-2.0.0 + # linklib gdk_pixbuf-2.0.0 + # linklib atk-1.0.0 +else: + const + gtklib = "libgtk-x11-2.0.so" +type + PPPchar* = PPPgchar + +const + GTK_MAX_COMPOSE_LEN* = 7 + +type + PGtkObject* = ptr TGtkObject + PPGtkObject* = ptr PGtkObject + PGtkArg* = ptr TGtkArg + PGtkType* = ptr TGtkType + TGtkType* = GType + PGtkWidget* = ptr TGtkWidget + PGtkMisc* = ptr TGtkMisc + PGtkLabel* = ptr TGtkLabel + PGtkMenu* = ptr TGtkMenu + PGtkAnchorType* = ptr TGtkAnchorType + TGtkAnchorType* = int32 + PGtkArrowType* = ptr TGtkArrowType + TGtkArrowType* = int32 + PGtkAttachOptions* = ptr TGtkAttachOptions + TGtkAttachOptions* = int32 + PGtkButtonBoxStyle* = ptr TGtkButtonBoxStyle + TGtkButtonBoxStyle* = int32 + PGtkCurveType* = ptr TGtkCurveType + TGtkCurveType* = int32 + PGtkDeleteType* = ptr TGtkDeleteType + TGtkDeleteType* = int32 + PGtkDirectionType* = ptr TGtkDirectionType + TGtkDirectionType* = int32 + PGtkExpanderStyle* = ptr TGtkExpanderStyle + TGtkExpanderStyle* = int32 + PPGtkIconSize* = ptr PGtkIconSize + PGtkIconSize* = ptr TGtkIconSize + TGtkIconSize* = int32 + PGtkTextDirection* = ptr TGtkTextDirection + TGtkTextDirection* = int32 + PGtkJustification* = ptr TGtkJustification + TGtkJustification* = int32 + PGtkMenuDirectionType* = ptr TGtkMenuDirectionType + TGtkMenuDirectionType* = int32 + PGtkMetricType* = ptr TGtkMetricType + TGtkMetricType* = int32 + PGtkMovementStep* = ptr TGtkMovementStep + TGtkMovementStep* = int32 + PGtkOrientation* = ptr TGtkOrientation + TGtkOrientation* = int32 + PGtkCornerType* = ptr TGtkCornerType + TGtkCornerType* = int32 + PGtkPackType* = ptr TGtkPackType + TGtkPackType* = int32 + PGtkPathPriorityType* = ptr TGtkPathPriorityType + TGtkPathPriorityType* = int32 + PGtkPathType* = ptr TGtkPathType + TGtkPathType* = int32 + PGtkPolicyType* = ptr TGtkPolicyType + TGtkPolicyType* = int32 + PGtkPositionType* = ptr TGtkPositionType + TGtkPositionType* = int32 + PGtkReliefStyle* = ptr TGtkReliefStyle + TGtkReliefStyle* = int32 + PGtkResizeMode* = ptr TGtkResizeMode + TGtkResizeMode* = int32 + PGtkScrollType* = ptr TGtkScrollType + TGtkScrollType* = int32 + PGtkSelectionMode* = ptr TGtkSelectionMode + TGtkSelectionMode* = int32 + PGtkShadowType* = ptr TGtkShadowType + TGtkShadowType* = int32 + PGtkStateType* = ptr TGtkStateType + TGtkStateType* = int32 + PGtkSubmenuDirection* = ptr TGtkSubmenuDirection + TGtkSubmenuDirection* = int32 + PGtkSubmenuPlacement* = ptr TGtkSubmenuPlacement + TGtkSubmenuPlacement* = int32 + PGtkToolbarStyle* = ptr TGtkToolbarStyle + TGtkToolbarStyle* = int32 + PGtkUpdateType* = ptr TGtkUpdateType + TGtkUpdateType* = int32 + PGtkVisibility* = ptr TGtkVisibility + TGtkVisibility* = int32 + PGtkWindowPosition* = ptr TGtkWindowPosition + TGtkWindowPosition* = int32 + PGtkWindowType* = ptr TGtkWindowType + TGtkWindowType* = int32 + PGtkWrapMode* = ptr TGtkWrapMode + TGtkWrapMode* = int32 + PGtkSortType* = ptr TGtkSortType + TGtkSortType* = int32 + PGtkStyle* = ptr TGtkStyle + PPGtkTreeModel* = ptr PGtkTreeModel + PGtkTreeModel* = pointer + PGtkTreePath* = pointer + PGtkTreeIter* = ptr TGtkTreeIter + PGtkSelectionData* = ptr TGtkSelectionData + PGtkTextTagTable* = ptr TGtkTextTagTable + PGtkTextBTreeNode* = pointer + PGtkTextBTree* = pointer + PGtkTextLine* = ptr TGtkTextLine + PGtkTreeViewColumn* = ptr TGtkTreeViewColumn + PGtkTreeView* = ptr TGtkTreeView + TGtkTreeViewColumnDropFunc* = proc (tree_view: PGtkTreeView, + column: PGtkTreeViewColumn, + prev_column: PGtkTreeViewColumn, + next_column: PGtkTreeViewColumn, + data: gpointer): gboolean{.cdecl.} + TGtkTreeViewMappingFunc* = proc (tree_view: PGtkTreeView, path: PGtkTreePath, + user_data: gpointer){.cdecl.} + TGtkTreeViewSearchEqualFunc* = proc (model: PGtkTreeModel, column: gint, + key: cstring, iter: PGtkTreeIter, + search_data: gpointer): gboolean{.cdecl.} + TGtkTreeDestroyCountFunc* = proc (tree_view: PGtkTreeView, path: PGtkTreePath, + children: gint, user_data: gpointer){.cdecl.} + PGtkTreeViewDropPosition* = ptr TGtkTreeViewDropPosition + TGtkTreeViewDropPosition* = enum + GTK_TREE_VIEW_DROP_BEFORE, GTK_TREE_VIEW_DROP_AFTER, + GTK_TREE_VIEW_DROP_INTO_OR_BEFORE, GTK_TREE_VIEW_DROP_INTO_OR_AFTER + PGtkObjectFlags* = ptr TGtkObjectFlags + TGtkObjectFlags* = int32 + TGtkObject* = object of TGObject + flags*: guint32 + + PGtkObjectClass* = ptr TGtkObjectClass + TGtkObjectClass* = object of TGObjectClass + set_arg*: proc (anObject: PGtkObject, arg: PGtkArg, arg_id: guint){.cdecl.} + get_arg*: proc (anObject: PGtkObject, arg: PGtkArg, arg_id: guint){.cdecl.} + destroy*: proc (anObject: PGtkObject){.cdecl.} + + PGtkFundamentalType* = ptr TGtkFundamentalType + TGtkFundamentalType* = GType + TGtkFunction* = proc (data: gpointer): gboolean{.cdecl.} + TGtkDestroyNotify* = proc (data: gpointer){.cdecl.} + TGtkCallbackMarshal* = proc (anObject: PGtkObject, data: gpointer, + n_args: guint, args: PGtkArg){.cdecl.} + TGtkSignalFuncProc* = proc () + TGtkSignalFunc* = proc (para1: TGtkSignalFuncProc){.cdecl.} + PGtkSignalMarshaller* = ptr TGtkSignalMarshaller + TGtkSignalMarshaller* = TGSignalCMarshaller + TGtkArgSignalData* {.final, pure.} = object + f*: TGtkSignalFunc + d*: gpointer + + TGtkArg* {.final, pure.} = object + `type`*: TGtkType + name*: cstring + d*: gdouble # was a union type + + PGtkTypeInfo* = ptr TGtkTypeInfo + TGtkTypeInfo* {.final, pure.} = object + type_name*: cstring + object_size*: guint + class_size*: guint + class_init_func*: pointer #TGtkClassInitFunc + object_init_func*: pointer #TGtkObjectInitFunc + reserved_1*: gpointer + reserved_2*: gpointer + base_class_init_func*: pointer #TGtkClassInitFunc + + PGtkEnumValue* = ptr TGtkEnumValue + TGtkEnumValue* = TGEnumValue + PGtkFlagValue* = ptr TGtkFlagValue + TGtkFlagValue* = TGFlagsValue + PGtkWidgetFlags* = ptr TGtkWidgetFlags + TGtkWidgetFlags* = int32 + PGtkWidgetHelpType* = ptr TGtkWidgetHelpType + TGtkWidgetHelpType* = enum + GTK_WIDGET_HELP_TOOLTIP, GTK_WIDGET_HELP_WHATS_THIS + PGtkAllocation* = ptr TGtkAllocation + TGtkAllocation* = TGdkRectangle + TGtkCallback* = proc (widget: PGtkWidget, data: gpointer){.cdecl.} + PGtkRequisition* = ptr TGtkRequisition + TGtkRequisition* {.final, pure.} = object + width*: gint + height*: gint + + TGtkWidget* = object of TGtkObject + private_flags*: guint16 + state*: guint8 + saved_state*: guint8 + name*: cstring + style*: PGtkStyle + requisition*: TGtkRequisition + allocation*: TGtkAllocation + window*: PGdkWindow + parent*: PGtkWidget + + PGtkWidgetClass* = ptr TGtkWidgetClass + TGtkWidgetClass* = object of TGtkObjectClass + activate_signal*: guint + set_scroll_adjustments_signal*: guint + dispatch_child_properties_changed*: proc (widget: PGtkWidget, + n_pspecs: guint, pspecs: PPGParamSpec){.cdecl.} + show*: proc (widget: PGtkWidget){.cdecl.} + show_all*: proc (widget: PGtkWidget){.cdecl.} + hide*: proc (widget: PGtkWidget){.cdecl.} + hide_all*: proc (widget: PGtkWidget){.cdecl.} + map*: proc (widget: PGtkWidget){.cdecl.} + unmap*: proc (widget: PGtkWidget){.cdecl.} + realize*: proc (widget: PGtkWidget){.cdecl.} + unrealize*: proc (widget: PGtkWidget){.cdecl.} + size_request*: proc (widget: PGtkWidget, requisition: PGtkRequisition){. + cdecl.} + size_allocate*: proc (widget: PGtkWidget, allocation: PGtkAllocation){.cdecl.} + state_changed*: proc (widget: PGtkWidget, previous_state: TGtkStateType){. + cdecl.} + parent_set*: proc (widget: PGtkWidget, previous_parent: PGtkWidget){.cdecl.} + hierarchy_changed*: proc (widget: PGtkWidget, previous_toplevel: PGtkWidget){. + cdecl.} + style_set*: proc (widget: PGtkWidget, previous_style: PGtkStyle){.cdecl.} + direction_changed*: proc (widget: PGtkWidget, + previous_direction: TGtkTextDirection){.cdecl.} + grab_notify*: proc (widget: PGtkWidget, was_grabbed: gboolean){.cdecl.} + child_notify*: proc (widget: PGtkWidget, pspec: PGParamSpec){.cdecl.} + mnemonic_activate*: proc (widget: PGtkWidget, group_cycling: gboolean): gboolean{. + cdecl.} + grab_focus*: proc (widget: PGtkWidget){.cdecl.} + focus*: proc (widget: PGtkWidget, direction: TGtkDirectionType): gboolean{. + cdecl.} + event*: proc (widget: PGtkWidget, event: PGdkEvent): gboolean{.cdecl.} + button_press_event*: proc (widget: PGtkWidget, event: PGdkEventButton): gboolean{. + cdecl.} + button_release_event*: proc (widget: PGtkWidget, event: PGdkEventButton): gboolean{. + cdecl.} + scroll_event*: proc (widget: PGtkWidget, event: PGdkEventScroll): gboolean{. + cdecl.} + motion_notify_event*: proc (widget: PGtkWidget, event: PGdkEventMotion): gboolean{. + cdecl.} + delete_event*: proc (widget: PGtkWidget, event: PGdkEventAny): gboolean{. + cdecl.} + destroy_event*: proc (widget: PGtkWidget, event: PGdkEventAny): gboolean{. + cdecl.} + expose_event*: proc (widget: PGtkWidget, event: PGdkEventExpose): gboolean{. + cdecl.} + key_press_event*: proc (widget: PGtkWidget, event: PGdkEventKey): gboolean{. + cdecl.} + key_release_event*: proc (widget: PGtkWidget, event: PGdkEventKey): gboolean{. + cdecl.} + enter_notify_event*: proc (widget: PGtkWidget, event: PGdkEventCrossing): gboolean{. + cdecl.} + leave_notify_event*: proc (widget: PGtkWidget, event: PGdkEventCrossing): gboolean{. + cdecl.} + configure_event*: proc (widget: PGtkWidget, event: PGdkEventConfigure): gboolean{. + cdecl.} + focus_in_event*: proc (widget: PGtkWidget, event: PGdkEventFocus): gboolean{. + cdecl.} + focus_out_event*: proc (widget: PGtkWidget, event: PGdkEventFocus): gboolean{. + cdecl.} + map_event*: proc (widget: PGtkWidget, event: PGdkEventAny): gboolean{.cdecl.} + unmap_event*: proc (widget: PGtkWidget, event: PGdkEventAny): gboolean{. + cdecl.} + property_notify_event*: proc (widget: PGtkWidget, event: PGdkEventProperty): gboolean{. + cdecl.} + selection_clear_event*: proc (widget: PGtkWidget, event: PGdkEventSelection): gboolean{. + cdecl.} + selection_request_event*: proc (widget: PGtkWidget, + event: PGdkEventSelection): gboolean{.cdecl.} + selection_notify_event*: proc (widget: PGtkWidget, event: PGdkEventSelection): gboolean{. + cdecl.} + proximity_in_event*: proc (widget: PGtkWidget, event: PGdkEventProximity): gboolean{. + cdecl.} + proximity_out_event*: proc (widget: PGtkWidget, event: PGdkEventProximity): gboolean{. + cdecl.} + visibility_notify_event*: proc (widget: PGtkWidget, + event: PGdkEventVisibility): gboolean{.cdecl.} + client_event*: proc (widget: PGtkWidget, event: PGdkEventClient): gboolean{. + cdecl.} + no_expose_event*: proc (widget: PGtkWidget, event: PGdkEventAny): gboolean{. + cdecl.} + window_state_event*: proc (widget: PGtkWidget, event: PGdkEventWindowState): gboolean{. + cdecl.} + selection_get*: proc (widget: PGtkWidget, selection_data: PGtkSelectionData, + info: guint, time: guint){.cdecl.} + selection_received*: proc (widget: PGtkWidget, + selection_data: PGtkSelectionData, time: guint){. + cdecl.} + drag_begin*: proc (widget: PGtkWidget, context: PGdkDragContext){.cdecl.} + drag_end*: proc (widget: PGtkWidget, context: PGdkDragContext){.cdecl.} + drag_data_get*: proc (widget: PGtkWidget, context: PGdkDragContext, + selection_data: PGtkSelectionData, info: guint, + time: guint){.cdecl.} + drag_data_delete*: proc (widget: PGtkWidget, context: PGdkDragContext){. + cdecl.} + drag_leave*: proc (widget: PGtkWidget, context: PGdkDragContext, time: guint){. + cdecl.} + drag_motion*: proc (widget: PGtkWidget, context: PGdkDragContext, x: gint, + y: gint, time: guint): gboolean{.cdecl.} + drag_drop*: proc (widget: PGtkWidget, context: PGdkDragContext, x: gint, + y: gint, time: guint): gboolean{.cdecl.} + drag_data_received*: proc (widget: PGtkWidget, context: PGdkDragContext, + x: gint, y: gint, + selection_data: PGtkSelectionData, info: guint, + time: guint){.cdecl.} + popup_menu*: proc (widget: PGtkWidget): gboolean{.cdecl.} + show_help*: proc (widget: PGtkWidget, help_type: TGtkWidgetHelpType): gboolean{. + cdecl.} + get_accessible*: proc (widget: PGtkWidget): PAtkObject{.cdecl.} + gtk_reserved1: proc (){.cdecl.} + gtk_reserved2: proc (){.cdecl.} + gtk_reserved3: proc (){.cdecl.} + gtk_reserved4: proc (){.cdecl.} + gtk_reserved5*: proc (){.cdecl.} + gtk_reserved6*: proc (){.cdecl.} + gtk_reserved7*: proc (){.cdecl.} + gtk_reserved8*: proc (){.cdecl.} + + PGtkWidgetAuxInfo* = ptr TGtkWidgetAuxInfo + TGtkWidgetAuxInfo* {.final, pure.} = object + x*: gint + y*: gint + width*: gint + height*: gint + flag0*: guint16 + + PGtkWidgetShapeInfo* = ptr TGtkWidgetShapeInfo + TGtkWidgetShapeInfo* {.final, pure.} = object + offset_x*: gint16 + offset_y*: gint16 + shape_mask*: PGdkBitmap + + TGtkMisc* = object of TGtkWidget + xalign*: gfloat + yalign*: gfloat + xpad*: guint16 + ypad*: guint16 + + PGtkMiscClass* = ptr TGtkMiscClass + TGtkMiscClass* = object of TGtkWidgetClass + + PGtkAccelFlags* = ptr TGtkAccelFlags + TGtkAccelFlags* = int32 + PGtkAccelGroup* = ptr TGtkAccelGroup + PGtkAccelGroupEntry* = ptr TGtkAccelGroupEntry + TGtkAccelGroupActivate* = proc (accel_group: PGtkAccelGroup, + acceleratable: PGObject, keyval: guint, + modifier: TGdkModifierType): gboolean{.cdecl.} + TGtkAccelGroup* = object of TGObject + lock_count*: guint + modifier_mask*: TGdkModifierType + acceleratables*: PGSList + n_accels*: guint + priv_accels*: PGtkAccelGroupEntry + + PGtkAccelGroupClass* = ptr TGtkAccelGroupClass + TGtkAccelGroupClass* = object of TGObjectClass + accel_changed*: proc (accel_group: PGtkAccelGroup, keyval: guint, + modifier: TGdkModifierType, accel_closure: PGClosure){. + cdecl.} + gtk_reserved1: proc (){.cdecl.} + gtk_reserved2: proc (){.cdecl.} + gtk_reserved3: proc (){.cdecl.} + gtk_reserved4: proc (){.cdecl.} + + PGtkAccelKey* = ptr TGtkAccelKey + TGtkAccelKey* {.final, pure.} = object + accel_key*: guint + accel_mods*: TGdkModifierType + flag0*: guint16 + + TGtkAccelGroupEntry* {.final, pure.} = object + key*: TGtkAccelKey + closure*: PGClosure + accel_path_quark*: TGQuark + + Tgtk_accel_group_find_func* = proc (key: PGtkAccelKey, closure: PGClosure, + data: gpointer): gboolean{.cdecl.} + PGtkContainer* = ptr TGtkContainer + TGtkContainer* = object of TGtkWidget + focus_child*: PGtkWidget + GtkContainer_flag0*: int32 + + PGtkContainerClass* = ptr TGtkContainerClass + TGtkContainerClass* = object of TGtkWidgetClass + add*: proc (container: PGtkContainer, widget: PGtkWidget){.cdecl.} + remove*: proc (container: PGtkContainer, widget: PGtkWidget){.cdecl.} + check_resize*: proc (container: PGtkContainer){.cdecl.} + forall*: proc (container: PGtkContainer, include_internals: gboolean, + callback: TGtkCallback, callback_data: gpointer){.cdecl.} + set_focus_child*: proc (container: PGtkContainer, widget: PGtkWidget){.cdecl.} + child_type*: proc (container: PGtkContainer): TGtkType{.cdecl.} + composite_name*: proc (container: PGtkContainer, child: PGtkWidget): cstring{. + cdecl.} + set_child_property*: proc (container: PGtkContainer, child: PGtkWidget, + property_id: guint, value: PGValue, + pspec: PGParamSpec){.cdecl.} + get_child_property*: proc (container: PGtkContainer, child: PGtkWidget, + property_id: guint, value: PGValue, + pspec: PGParamSpec){.cdecl.} + gtk_reserved20: proc (){.cdecl.} + gtk_reserved21: proc (){.cdecl.} + gtk_reserved23: proc (){.cdecl.} + gtk_reserved24: proc (){.cdecl.} + + PGtkBin* = ptr TGtkBin + TGtkBin* = object of TGtkContainer + child*: PGtkWidget + + PGtkBinClass* = ptr TGtkBinClass + TGtkBinClass* = object of TGtkContainerClass + + PGtkWindowGeometryInfo* = pointer + PGtkWindowGroup* = ptr TGtkWindowGroup + PGtkWindow* = ptr TGtkWindow + TGtkWindow* = object of TGtkBin + title*: cstring + wmclass_name*: cstring + wmclass_class*: cstring + wm_role*: cstring + focus_widget*: PGtkWidget + default_widget*: PGtkWidget + transient_parent*: PGtkWindow + geometry_info*: PGtkWindowGeometryInfo + frame*: PGdkWindow + group*: PGtkWindowGroup + configure_request_count*: guint16 + gtkwindow_flag0*: int32 + frame_left*: guint + frame_top*: guint + frame_right*: guint + frame_bottom*: guint + keys_changed_handler*: guint + mnemonic_modifier*: TGdkModifierType + screen*: PGdkScreen + + PGtkWindowClass* = ptr TGtkWindowClass + TGtkWindowClass* = object of TGtkBinClass + set_focus*: proc (window: PGtkWindow, focus: PGtkWidget){.cdecl.} + frame_event*: proc (window: PGtkWindow, event: PGdkEvent): gboolean{.cdecl.} + activate_focus*: proc (window: PGtkWindow){.cdecl.} + activate_default*: proc (window: PGtkWindow){.cdecl.} + move_focus*: proc (window: PGtkWindow, direction: TGtkDirectionType){.cdecl.} + keys_changed*: proc (window: PGtkWindow){.cdecl.} + gtk_reserved30: proc (){.cdecl.} + gtk_reserved31: proc (){.cdecl.} + gtk_reserved32: proc (){.cdecl.} + gtk_reserved33: proc (){.cdecl.} + + TGtkWindowGroup* = object of TGObject + grabs*: PGSList + + PGtkWindowGroupClass* = ptr TGtkWindowGroupClass + TGtkWindowGroupClass* = object of TGObjectClass + gtk_reserved40: proc (){.cdecl.} + gtk_reserved41: proc (){.cdecl.} + gtk_reserved42: proc (){.cdecl.} + gtk_reserved43: proc (){.cdecl.} + + TGtkWindowKeysForeachFunc* = proc (window: PGtkWindow, keyval: guint, + modifiers: TGdkModifierType, + is_mnemonic: gboolean, data: gpointer){. + cdecl.} + PGtkLabelSelectionInfo* = pointer + TGtkLabel* = object of TGtkMisc + `label`*: cstring + GtkLabel_flag0*: guint16 + mnemonic_keyval*: guint + text*: cstring + attrs*: PPangoAttrList + effective_attrs*: PPangoAttrList + layout*: PPangoLayout + mnemonic_widget*: PGtkWidget + mnemonic_window*: PGtkWindow + select_info*: PGtkLabelSelectionInfo + + PGtkLabelClass* = ptr TGtkLabelClass + TGtkLabelClass* = object of TGtkMiscClass + move_cursor*: proc (`label`: PGtkLabel, step: TGtkMovementStep, count: gint, + extend_selection: gboolean){.cdecl.} + copy_clipboard*: proc (`label`: PGtkLabel){.cdecl.} + populate_popup*: proc (`label`: PGtkLabel, menu: PGtkMenu){.cdecl.} + gtk_reserved50: proc (){.cdecl.} + gtk_reserved51: proc (){.cdecl.} + gtk_reserved52: proc (){.cdecl.} + gtk_reserved53: proc (){.cdecl.} + + PGtkAccelLabel* = ptr TGtkAccelLabel + TGtkAccelLabel* = object of TGtkLabel + queue_id*: guint + accel_padding*: guint + accel_widget*: PGtkWidget + accel_closure*: PGClosure + accel_group*: PGtkAccelGroup + accel_string*: cstring + accel_string_width*: guint16 + + PGtkAccelLabelClass* = ptr TGtkAccelLabelClass + TGtkAccelLabelClass* = object of TGtkLabelClass + signal_quote1*: cstring + signal_quote2*: cstring + mod_name_shift*: cstring + mod_name_control*: cstring + mod_name_alt*: cstring + mod_separator*: cstring + accel_seperator*: cstring + GtkAccelLabelClass_flag0*: guint16 + gtk_reserved61: proc (){.cdecl.} + gtk_reserved62: proc (){.cdecl.} + gtk_reserved63: proc (){.cdecl.} + gtk_reserved64: proc (){.cdecl.} + + TGtkAccelMapForeach* = proc (data: gpointer, accel_path: cstring, + accel_key: guint, accel_mods: TGdkModifierType, + changed: gboolean){.cdecl.} + PGtkAccessible* = ptr TGtkAccessible + TGtkAccessible* = object of TAtkObject + widget*: PGtkWidget + + PGtkAccessibleClass* = ptr TGtkAccessibleClass + TGtkAccessibleClass* = object of TAtkObjectClass + connect_widget_destroyed*: proc (accessible: PGtkAccessible){.cdecl.} + gtk_reserved71: proc (){.cdecl.} + gtk_reserved72: proc (){.cdecl.} + gtk_reserved73: proc (){.cdecl.} + gtk_reserved74: proc (){.cdecl.} + + PGtkAdjustment* = ptr TGtkAdjustment + TGtkAdjustment* = object of TGtkObject + lower*: gdouble + upper*: gdouble + value*: gdouble + step_increment*: gdouble + page_increment*: gdouble + page_size*: gdouble + + PGtkAdjustmentClass* = ptr TGtkAdjustmentClass + TGtkAdjustmentClass* = object of TGtkObjectClass + changed*: proc (adjustment: PGtkAdjustment){.cdecl.} + value_changed*: proc (adjustment: PGtkAdjustment){.cdecl.} + gtk_reserved81: proc (){.cdecl.} + gtk_reserved82: proc (){.cdecl.} + gtk_reserved83: proc (){.cdecl.} + gtk_reserved84: proc (){.cdecl.} + + PGtkAlignment* = ptr TGtkAlignment + TGtkAlignment* = object of TGtkBin + xalign*: gfloat + yalign*: gfloat + xscale*: gfloat + yscale*: gfloat + + PGtkAlignmentClass* = ptr TGtkAlignmentClass + TGtkAlignmentClass* = object of TGtkBinClass + + PGtkFrame* = ptr TGtkFrame + TGtkFrame* = object of TGtkBin + label_widget*: PGtkWidget + shadow_type*: gint16 + label_xalign*: gfloat + label_yalign*: gfloat + child_allocation*: TGtkAllocation + + PGtkFrameClass* = ptr TGtkFrameClass + TGtkFrameClass* = object of TGtkBinClass + compute_child_allocation*: proc (frame: PGtkFrame, + allocation: PGtkAllocation){.cdecl.} + + PGtkAspectFrame* = ptr TGtkAspectFrame + TGtkAspectFrame* = object of TGtkFrame + xalign*: gfloat + yalign*: gfloat + ratio*: gfloat + obey_child*: gboolean + center_allocation*: TGtkAllocation + + PGtkAspectFrameClass* = ptr TGtkAspectFrameClass + TGtkAspectFrameClass* = object of TGtkFrameClass + + PGtkArrow* = ptr TGtkArrow + TGtkArrow* = object of TGtkMisc + arrow_type*: gint16 + shadow_type*: gint16 + + PGtkArrowClass* = ptr TGtkArrowClass + TGtkArrowClass* = object of TGtkMiscClass + + PGtkBindingEntry* = ptr TGtkBindingEntry + PGtkBindingSignal* = ptr TGtkBindingSignal + PGtkBindingArg* = ptr TGtkBindingArg + PGtkBindingSet* = ptr TGtkBindingSet + TGtkBindingSet* {.final, pure.} = object + set_name*: cstring + priority*: gint + widget_path_pspecs*: PGSList + widget_class_pspecs*: PGSList + class_branch_pspecs*: PGSList + entries*: PGtkBindingEntry + current*: PGtkBindingEntry + flag0*: guint16 + + TGtkBindingEntry* {.final, pure.} = object + keyval*: guint + modifiers*: TGdkModifierType + binding_set*: PGtkBindingSet + flag0*: guint16 + set_next*: PGtkBindingEntry + hash_next*: PGtkBindingEntry + signals*: PGtkBindingSignal + + TGtkBindingSignal* {.final, pure.} = object + next*: PGtkBindingSignal + signal_name*: cstring + n_args*: guint + args*: PGtkBindingArg + + TGtkBindingArg* {.final, pure.} = object + arg_type*: TGtkType + d*: gdouble + + PGtkBox* = ptr TGtkBox + TGtkBox* = object of TGtkContainer + children*: PGList + spacing*: gint16 + gtkbox_flag0*: guint16 + + PGtkBoxClass* = ptr TGtkBoxClass + TGtkBoxClass* = object of TGtkContainerClass + + PGtkBoxChild* = ptr TGtkBoxChild + TGtkBoxChild* {.final, pure.} = object + widget*: PGtkWidget + padding*: guint16 + flag0*: guint16 + + PGtkButtonBox* = ptr TGtkButtonBox + TGtkButtonBox* = object of TGtkBox + child_min_width*: gint + child_min_height*: gint + child_ipad_x*: gint + child_ipad_y*: gint + layout_style*: TGtkButtonBoxStyle + + PGtkButtonBoxClass* = ptr TGtkButtonBoxClass + TGtkButtonBoxClass* = object of TGtkBoxClass + + PGtkButton* = ptr TGtkButton + TGtkButton* = object of TGtkBin + event_window*: PGdkWindow + label_text*: cstring + activate_timeout*: guint + gtkbutton_flag0*: guint16 + + PGtkButtonClass* = ptr TGtkButtonClass + TGtkButtonClass* = object of TGtkBinClass + pressed*: proc (button: PGtkButton){.cdecl.} + released*: proc (button: PGtkButton){.cdecl.} + clicked*: proc (button: PGtkButton){.cdecl.} + enter*: proc (button: PGtkButton){.cdecl.} + leave*: proc (button: PGtkButton){.cdecl.} + activate*: proc (button: PGtkButton){.cdecl.} + gtk_reserved101: proc (){.cdecl.} + gtk_reserved102: proc (){.cdecl.} + gtk_reserved103: proc (){.cdecl.} + gtk_reserved104: proc (){.cdecl.} + + PGtkCalendarDisplayOptions* = ptr TGtkCalendarDisplayOptions + TGtkCalendarDisplayOptions* = int32 + PGtkCalendar* = ptr TGtkCalendar + TGtkCalendar* = object of TGtkWidget + header_style*: PGtkStyle + label_style*: PGtkStyle + month*: gint + year*: gint + selected_day*: gint + day_month*: array[0..5, array[0..6, gint]] + day*: array[0..5, array[0..6, gint]] + num_marked_dates*: gint + marked_date*: array[0..30, gint] + display_flags*: TGtkCalendarDisplayOptions + marked_date_color*: array[0..30, TGdkColor] + gc*: PGdkGC + xor_gc*: PGdkGC + focus_row*: gint + focus_col*: gint + highlight_row*: gint + highlight_col*: gint + private_data*: gpointer + grow_space*: array[0..31, gchar] + gtk_reserved111: proc (){.cdecl.} + gtk_reserved112: proc (){.cdecl.} + gtk_reserved113: proc (){.cdecl.} + gtk_reserved114: proc (){.cdecl.} + + PGtkCalendarClass* = ptr TGtkCalendarClass + TGtkCalendarClass* = object of TGtkWidgetClass + month_changed*: proc (calendar: PGtkCalendar){.cdecl.} + day_selected*: proc (calendar: PGtkCalendar){.cdecl.} + day_selected_double_click*: proc (calendar: PGtkCalendar){.cdecl.} + prev_month*: proc (calendar: PGtkCalendar){.cdecl.} + next_month*: proc (calendar: PGtkCalendar){.cdecl.} + prev_year*: proc (calendar: PGtkCalendar){.cdecl.} + next_year*: proc (calendar: PGtkCalendar){.cdecl.} + + PGtkCellEditable* = pointer + PGtkCellEditableIface* = ptr TGtkCellEditableIface + TGtkCellEditableIface* = object of TGTypeInterface + editing_done*: proc (cell_editable: PGtkCellEditable){.cdecl.} + remove_widget*: proc (cell_editable: PGtkCellEditable){.cdecl.} + start_editing*: proc (cell_editable: PGtkCellEditable, event: PGdkEvent){. + cdecl.} + + PGtkCellRendererState* = ptr TGtkCellRendererState + TGtkCellRendererState* = int32 + PGtkCellRendererMode* = ptr TGtkCellRendererMode + TGtkCellRendererMode* = enum + GTK_CELL_RENDERER_MODE_INERT, GTK_CELL_RENDERER_MODE_ACTIVATABLE, + GTK_CELL_RENDERER_MODE_EDITABLE + PGtkCellRenderer* = ptr TGtkCellRenderer + TGtkCellRenderer* = object of TGtkObject + xalign*: gfloat + yalign*: gfloat + width*: gint + height*: gint + xpad*: guint16 + ypad*: guint16 + GtkCellRenderer_flag0*: guint16 + + PGtkCellRendererClass* = ptr TGtkCellRendererClass + TGtkCellRendererClass* = object of TGtkObjectClass + get_size*: proc (cell: PGtkCellRenderer, widget: PGtkWidget, + cell_area: PGdkRectangle, x_offset: Pgint, y_offset: Pgint, + width: Pgint, height: Pgint){.cdecl.} + render*: proc (cell: PGtkCellRenderer, window: PGdkWindow, + widget: PGtkWidget, background_area: PGdkRectangle, + cell_area: PGdkRectangle, expose_area: PGdkRectangle, + flags: TGtkCellRendererState){.cdecl.} + activate*: proc (cell: PGtkCellRenderer, event: PGdkEvent, + widget: PGtkWidget, path: cstring, + background_area: PGdkRectangle, cell_area: PGdkRectangle, + flags: TGtkCellRendererState): gboolean{.cdecl.} + start_editing*: proc (cell: PGtkCellRenderer, event: PGdkEvent, + widget: PGtkWidget, path: cstring, + background_area: PGdkRectangle, + cell_area: PGdkRectangle, flags: TGtkCellRendererState): PGtkCellEditable{. + cdecl.} + gtk_reserved121: proc (){.cdecl.} + gtk_reserved122: proc (){.cdecl.} + gtk_reserved123: proc (){.cdecl.} + gtk_reserved124: proc (){.cdecl.} + + PGtkCellRendererText* = ptr TGtkCellRendererText + TGtkCellRendererText* = object of TGtkCellRenderer + text*: cstring + font*: PPangoFontDescription + font_scale*: gdouble + foreground*: TPangoColor + background*: TPangoColor + extra_attrs*: PPangoAttrList + underline_style*: TPangoUnderline + rise*: gint + fixed_height_rows*: gint + GtkCellRendererText_flag0*: guint16 + + PGtkCellRendererTextClass* = ptr TGtkCellRendererTextClass + TGtkCellRendererTextClass* = object of TGtkCellRendererClass + edited*: proc (cell_renderer_text: PGtkCellRendererText, path: cstring, + new_text: cstring){.cdecl.} + gtk_reserved131: proc (){.cdecl.} + gtk_reserved132: proc (){.cdecl.} + gtk_reserved133: proc (){.cdecl.} + gtk_reserved134: proc (){.cdecl.} + + PGtkCellRendererToggle* = ptr TGtkCellRendererToggle + TGtkCellRendererToggle* = object of TGtkCellRenderer + GtkCellRendererToggle_flag0*: guint16 + + PGtkCellRendererToggleClass* = ptr TGtkCellRendererToggleClass + TGtkCellRendererToggleClass* = object of TGtkCellRendererClass + toggled*: proc (cell_renderer_toggle: PGtkCellRendererToggle, path: cstring){. + cdecl.} + gtk_reserved141: proc (){.cdecl.} + gtk_reserved142: proc (){.cdecl.} + gtk_reserved143: proc (){.cdecl.} + gtk_reserved144: proc (){.cdecl.} + + PGtkCellRendererPixbuf* = ptr TGtkCellRendererPixbuf + TGtkCellRendererPixbuf* = object of TGtkCellRenderer + pixbuf*: PGdkPixbuf + pixbuf_expander_open*: PGdkPixbuf + pixbuf_expander_closed*: PGdkPixbuf + + PGtkCellRendererPixbufClass* = ptr TGtkCellRendererPixbufClass + TGtkCellRendererPixbufClass* = object of TGtkCellRendererClass + gtk_reserved151: proc (){.cdecl.} + gtk_reserved152: proc (){.cdecl.} + gtk_reserved153: proc (){.cdecl.} + gtk_reserved154: proc (){.cdecl.} + + PGtkItem* = ptr TGtkItem + TGtkItem* = object of TGtkBin + + PGtkItemClass* = ptr TGtkItemClass + TGtkItemClass* = object of TGtkBinClass + select*: proc (item: PGtkItem){.cdecl.} + deselect*: proc (item: PGtkItem){.cdecl.} + toggle*: proc (item: PGtkItem){.cdecl.} + gtk_reserved161: proc (){.cdecl.} + gtk_reserved162: proc (){.cdecl.} + gtk_reserved163: proc (){.cdecl.} + gtk_reserved164: proc (){.cdecl.} + + PGtkMenuItem* = ptr TGtkMenuItem + TGtkMenuItem* = object of TGtkItem + submenu*: PGtkWidget + event_window*: PGdkWindow + toggle_size*: guint16 + accelerator_width*: guint16 + accel_path*: cstring + GtkMenuItem_flag0*: guint16 + timer*: guint + + PGtkMenuItemClass* = ptr TGtkMenuItemClass + TGtkMenuItemClass* = object of TGtkItemClass + GtkMenuItemClass_flag0*: guint16 + activate*: proc (menu_item: PGtkMenuItem){.cdecl.} + activate_item*: proc (menu_item: PGtkMenuItem){.cdecl.} + toggle_size_request*: proc (menu_item: PGtkMenuItem, requisition: Pgint){. + cdecl.} + toggle_size_allocate*: proc (menu_item: PGtkMenuItem, allocation: gint){. + cdecl.} + gtk_reserved171: proc (){.cdecl.} + gtk_reserved172: proc (){.cdecl.} + gtk_reserved173: proc (){.cdecl.} + gtk_reserved174: proc (){.cdecl.} + + PGtkToggleButton* = ptr TGtkToggleButton + TGtkToggleButton* = object of TGtkButton + GtkToggleButton_flag0*: guint16 + + PGtkToggleButtonClass* = ptr TGtkToggleButtonClass + TGtkToggleButtonClass* = object of TGtkButtonClass + toggled*: proc (toggle_button: PGtkToggleButton){.cdecl.} + gtk_reserved171: proc (){.cdecl.} + gtk_reserved172: proc (){.cdecl.} + gtk_reserved173: proc (){.cdecl.} + gtk_reserved174: proc (){.cdecl.} + + PGtkCheckButton* = ptr TGtkCheckButton + TGtkCheckButton* = object of TGtkToggleButton + + PGtkCheckButtonClass* = ptr TGtkCheckButtonClass + TGtkCheckButtonClass* = object of TGtkToggleButtonClass + draw_indicator*: proc (check_button: PGtkCheckButton, area: PGdkRectangle){. + cdecl.} + gtk_reserved181: proc (){.cdecl.} + gtk_reserved182: proc (){.cdecl.} + gtk_reserved183: proc (){.cdecl.} + gtk_reserved184: proc (){.cdecl.} + + PGtkCheckMenuItem* = ptr TGtkCheckMenuItem + TGtkCheckMenuItem* = object of TGtkMenuItem + GtkCheckMenuItem_flag0*: guint16 + + PGtkCheckMenuItemClass* = ptr TGtkCheckMenuItemClass + TGtkCheckMenuItemClass* = object of TGtkMenuItemClass + toggled*: proc (check_menu_item: PGtkCheckMenuItem){.cdecl.} + draw_indicator*: proc (check_menu_item: PGtkCheckMenuItem, + area: PGdkRectangle){.cdecl.} + gtk_reserved191: proc (){.cdecl.} + gtk_reserved192: proc (){.cdecl.} + gtk_reserved193: proc (){.cdecl.} + gtk_reserved194: proc (){.cdecl.} + + PGtkClipboard* = pointer + TGtkClipboardReceivedFunc* = proc (clipboard: PGtkClipboard, + selection_data: PGtkSelectionData, + data: gpointer){.cdecl.} + TGtkClipboardTextReceivedFunc* = proc (clipboard: PGtkClipboard, text: cstring, + data: gpointer){.cdecl.} + TGtkClipboardGetFunc* = proc (clipboard: PGtkClipboard, + selection_data: PGtkSelectionData, info: guint, + user_data_or_owner: gpointer){.cdecl.} + TGtkClipboardClearFunc* = proc (clipboard: PGtkClipboard, + user_data_or_owner: gpointer){.cdecl.} + PGtkCList* = ptr TGtkCList + PGtkCListColumn* = ptr TGtkCListColumn + PGtkCListRow* = ptr TGtkCListRow + PGtkCell* = ptr TGtkCell + PGtkCellType* = ptr TGtkCellType + TGtkCellType* = enum + GTK_CELL_EMPTY, GTK_CELL_TEXT, GTK_CELL_PIXMAP, GTK_CELL_PIXTEXT, + GTK_CELL_WIDGET + PGtkCListDragPos* = ptr TGtkCListDragPos + TGtkCListDragPos* = enum + GTK_CLIST_DRAG_NONE, GTK_CLIST_DRAG_BEFORE, GTK_CLIST_DRAG_INTO, + GTK_CLIST_DRAG_AFTER + PGtkButtonAction* = ptr TGtkButtonAction + TGtkButtonAction* = int32 + TGtkCListCompareFunc* = proc (clist: PGtkCList, ptr1: gconstpointer, + ptr2: gconstpointer): gint{.cdecl.} + PGtkCListCellInfo* = ptr TGtkCListCellInfo + TGtkCListCellInfo* {.final, pure.} = object + row*: gint + column*: gint + + PGtkCListDestInfo* = ptr TGtkCListDestInfo + TGtkCListDestInfo* {.final, pure.} = object + cell*: TGtkCListCellInfo + insert_pos*: TGtkCListDragPos + + TGtkCList* = object of TGtkContainer + GtkCList_flags*: guint16 + row_mem_chunk*: PGMemChunk + cell_mem_chunk*: PGMemChunk + freeze_count*: guint + internal_allocation*: TGdkRectangle + rows*: gint + row_height*: gint + row_list*: PGList + row_list_end*: PGList + columns*: gint + column_title_area*: TGdkRectangle + title_window*: PGdkWindow + column*: PGtkCListColumn + clist_window*: PGdkWindow + clist_window_width*: gint + clist_window_height*: gint + hoffset*: gint + voffset*: gint + shadow_type*: TGtkShadowType + selection_mode*: TGtkSelectionMode + selection*: PGList + selection_end*: PGList + undo_selection*: PGList + undo_unselection*: PGList + undo_anchor*: gint + button_actions*: array[0..4, guint8] + drag_button*: guint8 + click_cell*: TGtkCListCellInfo + hadjustment*: PGtkAdjustment + vadjustment*: PGtkAdjustment + xor_gc*: PGdkGC + fg_gc*: PGdkGC + bg_gc*: PGdkGC + cursor_drag*: PGdkCursor + x_drag*: gint + focus_row*: gint + focus_header_column*: gint + anchor*: gint + anchor_state*: TGtkStateType + drag_pos*: gint + htimer*: gint + vtimer*: gint + sort_type*: TGtkSortType + compare*: TGtkCListCompareFunc + sort_column*: gint + drag_highlight_row*: gint + drag_highlight_pos*: TGtkCListDragPos + + PGtkCListClass* = ptr TGtkCListClass + TGtkCListClass* = object of TGtkContainerClass + set_scroll_adjustments*: proc (clist: PGtkCList, + hadjustment: PGtkAdjustment, + vadjustment: PGtkAdjustment){.cdecl.} + refresh*: proc (clist: PGtkCList){.cdecl.} + select_row*: proc (clist: PGtkCList, row: gint, column: gint, + event: PGdkEvent){.cdecl.} + unselect_row*: proc (clist: PGtkCList, row: gint, column: gint, + event: PGdkEvent){.cdecl.} + row_move*: proc (clist: PGtkCList, source_row: gint, dest_row: gint){.cdecl.} + click_column*: proc (clist: PGtkCList, column: gint){.cdecl.} + resize_column*: proc (clist: PGtkCList, column: gint, width: gint){.cdecl.} + toggle_focus_row*: proc (clist: PGtkCList){.cdecl.} + select_all*: proc (clist: PGtkCList){.cdecl.} + unselect_all*: proc (clist: PGtkCList){.cdecl.} + undo_selection*: proc (clist: PGtkCList){.cdecl.} + start_selection*: proc (clist: PGtkCList){.cdecl.} + end_selection*: proc (clist: PGtkCList){.cdecl.} + extend_selection*: proc (clist: PGtkCList, scroll_type: TGtkScrollType, + position: gfloat, auto_start_selection: gboolean){. + cdecl.} + scroll_horizontal*: proc (clist: PGtkCList, scroll_type: TGtkScrollType, + position: gfloat){.cdecl.} + scroll_vertical*: proc (clist: PGtkCList, scroll_type: TGtkScrollType, + position: gfloat){.cdecl.} + toggle_add_mode*: proc (clist: PGtkCList){.cdecl.} + abort_column_resize*: proc (clist: PGtkCList){.cdecl.} + resync_selection*: proc (clist: PGtkCList, event: PGdkEvent){.cdecl.} + selection_find*: proc (clist: PGtkCList, row_number: gint, + row_list_element: PGList): PGList{.cdecl.} + draw_row*: proc (clist: PGtkCList, area: PGdkRectangle, row: gint, + clist_row: PGtkCListRow){.cdecl.} + draw_drag_highlight*: proc (clist: PGtkCList, target_row: PGtkCListRow, + target_row_number: gint, + drag_pos: TGtkCListDragPos){.cdecl.} + clear*: proc (clist: PGtkCList){.cdecl.} + fake_unselect_all*: proc (clist: PGtkCList, row: gint){.cdecl.} + sort_list*: proc (clist: PGtkCList){.cdecl.} + insert_row*: proc (clist: PGtkCList, row: gint): gint{.cdecl, varargs.} + remove_row*: proc (clist: PGtkCList, row: gint){.cdecl.} + set_cell_contents*: proc (clist: PGtkCList, clist_row: PGtkCListRow, + column: gint, thetype: TGtkCellType, text: cstring, + spacing: guint8, pixmap: PGdkPixmap, + mask: PGdkBitmap){.cdecl.} + cell_size_request*: proc (clist: PGtkCList, clist_row: PGtkCListRow, + column: gint, requisition: PGtkRequisition){.cdecl.} + + PGPtrArray = pointer + PGArray = pointer + TGtkCListColumn* {.final, pure.} = object + title*: cstring + area*: TGdkRectangle + button*: PGtkWidget + window*: PGdkWindow + width*: gint + min_width*: gint + max_width*: gint + justification*: TGtkJustification + flag0*: guint16 + + TGtkCListRow* {.final, pure.} = object + cell*: PGtkCell + state*: TGtkStateType + foreground*: TGdkColor + background*: TGdkColor + style*: PGtkStyle + data*: gpointer + destroy*: TGtkDestroyNotify + flag0*: guint16 + + PGtkCellText* = ptr TGtkCellText + TGtkCellText* {.final, pure.} = object + `type`*: TGtkCellType + vertical*: gint16 + horizontal*: gint16 + style*: PGtkStyle + text*: cstring + + PGtkCellPixmap* = ptr TGtkCellPixmap + TGtkCellPixmap* {.final, pure.} = object + `type`*: TGtkCellType + vertical*: gint16 + horizontal*: gint16 + style*: PGtkStyle + pixmap*: PGdkPixmap + mask*: PGdkBitmap + + PGtkCellPixText* = ptr TGtkCellPixText + TGtkCellPixText* {.final, pure.} = object + `type`*: TGtkCellType + vertical*: gint16 + horizontal*: gint16 + style*: PGtkStyle + text*: cstring + spacing*: guint8 + pixmap*: PGdkPixmap + mask*: PGdkBitmap + + PGtkCellWidget* = ptr TGtkCellWidget + TGtkCellWidget* {.final, pure.} = object + `type`*: TGtkCellType + vertical*: gint16 + horizontal*: gint16 + style*: PGtkStyle + widget*: PGtkWidget + + TGtkCell* {.final, pure.} = object + `type`*: TGtkCellType + vertical*: gint16 + horizontal*: gint16 + style*: PGtkStyle + text*: cstring + spacing*: guint8 + pixmap*: PGdkPixmap + mask*: PGdkBitmap + + PGtkDialogFlags* = ptr TGtkDialogFlags + TGtkDialogFlags* = int32 + PGtkResponseType* = ptr TGtkResponseType + TGtkResponseType* = int32 + PGtkDialog* = ptr TGtkDialog + TGtkDialog* = object of TGtkWindow + vbox*: PGtkWidget + action_area*: PGtkWidget + separator*: PGtkWidget + + PGtkDialogClass* = ptr TGtkDialogClass + TGtkDialogClass* = object of TGtkWindowClass + response*: proc (dialog: PGtkDialog, response_id: gint){.cdecl.} + closeFile*: proc (dialog: PGtkDialog){.cdecl.} + gtk_reserved201: proc (){.cdecl.} + gtk_reserved202: proc (){.cdecl.} + gtk_reserved203: proc (){.cdecl.} + gtk_reserved204: proc (){.cdecl.} + + PGtkVBox* = ptr TGtkVBox + TGtkVBox* = object of TGtkBox + + PGtkVBoxClass* = ptr TGtkVBoxClass + TGtkVBoxClass* = object of TGtkBoxClass + + TGtkColorSelectionChangePaletteFunc* = proc (colors: PGdkColor, n_colors: gint){. + cdecl.} + TGtkColorSelectionChangePaletteWithScreenFunc* = proc (screen: PGdkScreen, + colors: PGdkColor, n_colors: gint){.cdecl.} + PGtkColorSelection* = ptr TGtkColorSelection + TGtkColorSelection* = object of TGtkVBox + private_data*: gpointer + + PGtkColorSelectionClass* = ptr TGtkColorSelectionClass + TGtkColorSelectionClass* = object of TGtkVBoxClass + color_changed*: proc (color_selection: PGtkColorSelection){.cdecl.} + gtk_reserved211: proc (){.cdecl.} + gtk_reserved212: proc (){.cdecl.} + gtk_reserved213: proc (){.cdecl.} + gtk_reserved214: proc (){.cdecl.} + + PGtkColorSelectionDialog* = ptr TGtkColorSelectionDialog + TGtkColorSelectionDialog* = object of TGtkDialog + colorsel*: PGtkWidget + ok_button*: PGtkWidget + cancel_button*: PGtkWidget + help_button*: PGtkWidget + + PGtkColorSelectionDialogClass* = ptr TGtkColorSelectionDialogClass + TGtkColorSelectionDialogClass* = object of TGtkDialogClass + gtk_reserved221: proc (){.cdecl.} + gtk_reserved222: proc (){.cdecl.} + gtk_reserved223: proc (){.cdecl.} + gtk_reserved224: proc (){.cdecl.} + + PGtkHBox* = ptr TGtkHBox + TGtkHBox* = object of TGtkBox + + PGtkHBoxClass* = ptr TGtkHBoxClass + TGtkHBoxClass* = object of TGtkBoxClass + + PGtkCombo* = ptr TGtkCombo + TGtkCombo* = object of TGtkHBox + entry*: PGtkWidget + button*: PGtkWidget + popup*: PGtkWidget + popwin*: PGtkWidget + list*: PGtkWidget + entry_change_id*: guint + list_change_id*: guint + GtkCombo_flag0*: guint16 + current_button*: guint16 + activate_id*: guint + + PGtkComboClass* = ptr TGtkComboClass + TGtkComboClass* = object of TGtkHBoxClass + gtk_reserved231: proc (){.cdecl.} + gtk_reserved232: proc (){.cdecl.} + gtk_reserved233: proc (){.cdecl.} + gtk_reserved234: proc (){.cdecl.} + + PGtkCTreePos* = ptr TGtkCTreePos + TGtkCTreePos* = enum + GTK_CTREE_POS_BEFORE, GTK_CTREE_POS_AS_CHILD, GTK_CTREE_POS_AFTER + PGtkCTreeLineStyle* = ptr TGtkCTreeLineStyle + TGtkCTreeLineStyle* = enum + GTK_CTREE_LINES_NONE, GTK_CTREE_LINES_SOLID, GTK_CTREE_LINES_DOTTED, + GTK_CTREE_LINES_TABBED + PGtkCTreeExpanderStyle* = ptr TGtkCTreeExpanderStyle + TGtkCTreeExpanderStyle* = enum + GTK_CTREE_EXPANDER_NONE, GTK_CTREE_EXPANDER_SQUARE, + GTK_CTREE_EXPANDER_TRIANGLE, GTK_CTREE_EXPANDER_CIRCULAR + PGtkCTreeExpansionType* = ptr TGtkCTreeExpansionType + TGtkCTreeExpansionType* = enum + GTK_CTREE_EXPANSION_EXPAND, GTK_CTREE_EXPANSION_EXPAND_RECURSIVE, + GTK_CTREE_EXPANSION_COLLAPSE, GTK_CTREE_EXPANSION_COLLAPSE_RECURSIVE, + GTK_CTREE_EXPANSION_TOGGLE, GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE + PGtkCTree* = ptr TGtkCTree + PGtkCTreeNode* = ptr TGtkCTreeNode + TGtkCTreeFunc* = proc (ctree: PGtkCTree, node: PGtkCTreeNode, data: gpointer){. + cdecl.} + TGtkCTreeGNodeFunc* = proc (ctree: PGtkCTree, depth: guint, gnode: PGNode, + cnode: PGtkCTreeNode, data: gpointer): gboolean{. + cdecl.} + TGtkCTreeCompareDragFunc* = proc (ctree: PGtkCTree, + source_node: PGtkCTreeNode, + new_parent: PGtkCTreeNode, + new_sibling: PGtkCTreeNode): gboolean{.cdecl.} + TGtkCTree* = object of TGtkCList + lines_gc*: PGdkGC + tree_indent*: gint + tree_spacing*: gint + tree_column*: gint + GtkCTree_flag0*: guint16 + drag_compare*: TGtkCTreeCompareDragFunc + + PGtkCTreeClass* = ptr TGtkCTreeClass + TGtkCTreeClass* = object of TGtkCListClass + tree_select_row*: proc (ctree: PGtkCTree, row: PGtkCTreeNode, column: gint){. + cdecl.} + tree_unselect_row*: proc (ctree: PGtkCTree, row: PGtkCTreeNode, column: gint){. + cdecl.} + tree_expand*: proc (ctree: PGtkCTree, node: PGtkCTreeNode){.cdecl.} + tree_collapse*: proc (ctree: PGtkCTree, node: PGtkCTreeNode){.cdecl.} + tree_move*: proc (ctree: PGtkCTree, node: PGtkCTreeNode, + new_parent: PGtkCTreeNode, new_sibling: PGtkCTreeNode){. + cdecl.} + change_focus_row_expansion*: proc (ctree: PGtkCTree, + action: TGtkCTreeExpansionType){.cdecl.} + + PGtkCTreeRow* = ptr TGtkCTreeRow + TGtkCTreeRow* {.final, pure.} = object + row*: TGtkCListRow + parent*: PGtkCTreeNode + sibling*: PGtkCTreeNode + children*: PGtkCTreeNode + pixmap_closed*: PGdkPixmap + mask_closed*: PGdkBitmap + pixmap_opened*: PGdkPixmap + mask_opened*: PGdkBitmap + level*: guint16 + GtkCTreeRow_flag0*: guint16 + + TGtkCTreeNode* {.final, pure.} = object + list*: TGList + + PGtkDrawingArea* = ptr TGtkDrawingArea + TGtkDrawingArea* = object of TGtkWidget + draw_data*: gpointer + + PGtkDrawingAreaClass* = ptr TGtkDrawingAreaClass + TGtkDrawingAreaClass* = object of TGtkWidgetClass + gtk_reserved241: proc (){.cdecl.} + gtk_reserved242: proc (){.cdecl.} + gtk_reserved243: proc (){.cdecl.} + gtk_reserved244: proc (){.cdecl.} + + Tctlpoint* = array[0..1, gfloat] + Pctlpoint* = ptr Tctlpoint + PGtkCurve* = ptr TGtkCurve + TGtkCurve* = object of TGtkDrawingArea + cursor_type*: gint + min_x*: gfloat + max_x*: gfloat + min_y*: gfloat + max_y*: gfloat + pixmap*: PGdkPixmap + curve_type*: TGtkCurveType + height*: gint + grab_point*: gint + last*: gint + num_points*: gint + point*: PGdkPoint + num_ctlpoints*: gint + ctlpoint*: Pctlpoint + + PGtkCurveClass* = ptr TGtkCurveClass + TGtkCurveClass* = object of TGtkDrawingAreaClass + curve_type_changed*: proc (curve: PGtkCurve){.cdecl.} + gtk_reserved251: proc (){.cdecl.} + gtk_reserved252: proc (){.cdecl.} + gtk_reserved253: proc (){.cdecl.} + gtk_reserved254: proc (){.cdecl.} + + PGtkDestDefaults* = ptr TGtkDestDefaults + TGtkDestDefaults* = int32 + PGtkTargetFlags* = ptr TGtkTargetFlags + TGtkTargetFlags* = int32 + PGtkEditable* = pointer + PGtkEditableClass* = ptr TGtkEditableClass + TGtkEditableClass* = object of TGTypeInterface + insert_text*: proc (editable: PGtkEditable, text: cstring, length: gint, + position: Pgint){.cdecl.} + delete_text*: proc (editable: PGtkEditable, start_pos: gint, end_pos: gint){. + cdecl.} + changed*: proc (editable: PGtkEditable){.cdecl.} + do_insert_text*: proc (editable: PGtkEditable, text: cstring, length: gint, + position: Pgint){.cdecl.} + do_delete_text*: proc (editable: PGtkEditable, start_pos: gint, + end_pos: gint){.cdecl.} + get_chars*: proc (editable: PGtkEditable, start_pos: gint, end_pos: gint): cstring{. + cdecl.} + set_selection_bounds*: proc (editable: PGtkEditable, start_pos: gint, + end_pos: gint){.cdecl.} + get_selection_bounds*: proc (editable: PGtkEditable, start_pos: Pgint, + end_pos: Pgint): gboolean{.cdecl.} + set_position*: proc (editable: PGtkEditable, position: gint){.cdecl.} + get_position*: proc (editable: PGtkEditable): gint{.cdecl.} + + PGtkIMContext* = ptr TGtkIMContext + TGtkIMContext* = object of TGObject + + PGtkIMContextClass* = ptr TGtkIMContextClass + TGtkIMContextClass* = object of TGtkObjectClass + preedit_start*: proc (context: PGtkIMContext){.cdecl.} + preedit_end*: proc (context: PGtkIMContext){.cdecl.} + preedit_changed*: proc (context: PGtkIMContext){.cdecl.} + commit*: proc (context: PGtkIMContext, str: cstring){.cdecl.} + retrieve_surrounding*: proc (context: PGtkIMContext): gboolean{.cdecl.} + delete_surrounding*: proc (context: PGtkIMContext, offset: gint, + n_chars: gint): gboolean{.cdecl.} + set_client_window*: proc (context: PGtkIMContext, window: PGdkWindow){.cdecl.} + get_preedit_string*: proc (context: PGtkIMContext, str: PPgchar, + attrs: var PPangoAttrList, cursor_pos: Pgint){. + cdecl.} + filter_keypress*: proc (context: PGtkIMContext, event: PGdkEventKey): gboolean{. + cdecl.} + focus_in*: proc (context: PGtkIMContext){.cdecl.} + focus_out*: proc (context: PGtkIMContext){.cdecl.} + reset*: proc (context: PGtkIMContext){.cdecl.} + set_cursor_location*: proc (context: PGtkIMContext, area: PGdkRectangle){. + cdecl.} + set_use_preedit*: proc (context: PGtkIMContext, use_preedit: gboolean){. + cdecl.} + set_surrounding*: proc (context: PGtkIMContext, text: cstring, len: gint, + cursor_index: gint){.cdecl.} + get_surrounding*: proc (context: PGtkIMContext, text: PPgchar, + cursor_index: Pgint): gboolean{.cdecl.} + gtk_reserved261: proc (){.cdecl.} + gtk_reserved262: proc (){.cdecl.} + gtk_reserved263: proc (){.cdecl.} + gtk_reserved264: proc (){.cdecl.} + gtk_reserved265: proc (){.cdecl.} + gtk_reserved266: proc (){.cdecl.} + + PGtkMenuShell* = ptr TGtkMenuShell + TGtkMenuShell* = object of TGtkContainer + children*: PGList + active_menu_item*: PGtkWidget + parent_menu_shell*: PGtkWidget + button*: guint + activate_time*: guint32 + GtkMenuShell_flag0*: guint16 + + PGtkMenuShellClass* = ptr TGtkMenuShellClass + TGtkMenuShellClass* = object of TGtkContainerClass + GtkMenuShellClass_flag0*: guint16 + deactivate*: proc (menu_shell: PGtkMenuShell){.cdecl.} + selection_done*: proc (menu_shell: PGtkMenuShell){.cdecl.} + move_current*: proc (menu_shell: PGtkMenuShell, + direction: TGtkMenuDirectionType){.cdecl.} + activate_current*: proc (menu_shell: PGtkMenuShell, force_hide: gboolean){. + cdecl.} + cancel*: proc (menu_shell: PGtkMenuShell){.cdecl.} + select_item*: proc (menu_shell: PGtkMenuShell, menu_item: PGtkWidget){.cdecl.} + insert*: proc (menu_shell: PGtkMenuShell, child: PGtkWidget, position: gint){. + cdecl.} + gtk_reserved271: proc (){.cdecl.} + gtk_reserved272: proc (){.cdecl.} + gtk_reserved273: proc (){.cdecl.} + gtk_reserved274: proc (){.cdecl.} + + TGtkMenuPositionFunc* = proc (menu: PGtkMenu, x: Pgint, y: Pgint, + push_in: Pgboolean, user_data: gpointer){.cdecl.} + TGtkMenuDetachFunc* = proc (attach_widget: PGtkWidget, menu: PGtkMenu){.cdecl.} + TGtkMenu* = object of TGtkMenuShell + parent_menu_item*: PGtkWidget + old_active_menu_item*: PGtkWidget + accel_group*: PGtkAccelGroup + accel_path*: cstring + position_func*: TGtkMenuPositionFunc + position_func_data*: gpointer + toggle_size*: guint + toplevel*: PGtkWidget + tearoff_window*: PGtkWidget + tearoff_hbox*: PGtkWidget + tearoff_scrollbar*: PGtkWidget + tearoff_adjustment*: PGtkAdjustment + view_window*: PGdkWindow + bin_window*: PGdkWindow + scroll_offset*: gint + saved_scroll_offset*: gint + scroll_step*: gint + timeout_id*: guint + navigation_region*: PGdkRegion + navigation_timeout*: guint + GtkMenu_flag0*: guint16 + + PGtkMenuClass* = ptr TGtkMenuClass + TGtkMenuClass* = object of TGtkMenuShellClass + gtk_reserved281: proc (){.cdecl.} + gtk_reserved282: proc (){.cdecl.} + gtk_reserved283: proc (){.cdecl.} + gtk_reserved284: proc (){.cdecl.} + + PGtkEntry* = ptr TGtkEntry + TGtkEntry* = object of TGtkWidget + text*: cstring + GtkEntry_flag0*: guint16 + text_length*: guint16 + text_max_length*: guint16 + text_area*: PGdkWindow + im_context*: PGtkIMContext + popup_menu*: PGtkWidget + current_pos*: gint + selection_bound*: gint + cached_layout*: PPangoLayout + flag1*: guint16 + button*: guint + blink_timeout*: guint + recompute_idle*: guint + scroll_offset*: gint + ascent*: gint + descent*: gint + text_size*: guint16 + n_bytes*: guint16 + preedit_length*: guint16 + preedit_cursor*: guint16 + dnd_position*: gint + drag_start_x*: gint + drag_start_y*: gint + invisible_char*: gunichar + width_chars*: gint + + PGtkEntryClass* = ptr TGtkEntryClass + TGtkEntryClass* = object of TGtkWidgetClass + populate_popup*: proc (entry: PGtkEntry, menu: PGtkMenu){.cdecl.} + activate*: proc (entry: PGtkEntry){.cdecl.} + move_cursor*: proc (entry: PGtkEntry, step: TGtkMovementStep, count: gint, + extend_selection: gboolean){.cdecl.} + insert_at_cursor*: proc (entry: PGtkEntry, str: cstring){.cdecl.} + delete_from_cursor*: proc (entry: PGtkEntry, thetype: TGtkDeleteType, + count: gint){.cdecl.} + cut_clipboard*: proc (entry: PGtkEntry){.cdecl.} + copy_clipboard*: proc (entry: PGtkEntry){.cdecl.} + paste_clipboard*: proc (entry: PGtkEntry){.cdecl.} + toggle_overwrite*: proc (entry: PGtkEntry){.cdecl.} + gtk_reserved291: proc (){.cdecl.} + gtk_reserved292: proc (){.cdecl.} + gtk_reserved293: proc (){.cdecl.} + gtk_reserved294: proc (){.cdecl.} + + PGtkEventBox* = ptr TGtkEventBox + TGtkEventBox* = object of TGtkBin + + PGtkEventBoxClass* = ptr TGtkEventBoxClass + TGtkEventBoxClass* = object of TGtkBinClass + + PGtkFileSelection* = ptr TGtkFileSelection + TGtkFileSelection* = object of TGtkDialog + dir_list*: PGtkWidget + file_list*: PGtkWidget + selection_entry*: PGtkWidget + selection_text*: PGtkWidget + main_vbox*: PGtkWidget + ok_button*: PGtkWidget + cancel_button*: PGtkWidget + help_button*: PGtkWidget + history_pulldown*: PGtkWidget + history_menu*: PGtkWidget + history_list*: PGList + fileop_dialog*: PGtkWidget + fileop_entry*: PGtkWidget + fileop_file*: cstring + cmpl_state*: gpointer + fileop_c_dir*: PGtkWidget + fileop_del_file*: PGtkWidget + fileop_ren_file*: PGtkWidget + button_area*: PGtkWidget + gtkFileSelection_action_area*: PGtkWidget + selected_names*: PGPtrArray + last_selected*: cstring + + PGtkFileSelectionClass* = ptr TGtkFileSelectionClass + TGtkFileSelectionClass* = object of TGtkDialogClass + gtk_reserved301: proc (){.cdecl.} + gtk_reserved302: proc (){.cdecl.} + gtk_reserved303: proc (){.cdecl.} + gtk_reserved304: proc (){.cdecl.} + + PGtkFixed* = ptr TGtkFixed + TGtkFixed* = object of TGtkContainer + children*: PGList + + PGtkFixedClass* = ptr TGtkFixedClass + TGtkFixedClass* = object of TGtkContainerClass + + PGtkFixedChild* = ptr TGtkFixedChild + TGtkFixedChild* {.final, pure.} = object + widget*: PGtkWidget + x*: gint + y*: gint + + PGtkFontSelection* = ptr TGtkFontSelection + TGtkFontSelection* = object of TGtkVBox + font_entry*: PGtkWidget + family_list*: PGtkWidget + font_style_entry*: PGtkWidget + face_list*: PGtkWidget + size_entry*: PGtkWidget + size_list*: PGtkWidget + pixels_button*: PGtkWidget + points_button*: PGtkWidget + filter_button*: PGtkWidget + preview_entry*: PGtkWidget + family*: PPangoFontFamily + face*: PPangoFontFace + size*: gint + font*: PGdkFont + + PGtkFontSelectionClass* = ptr TGtkFontSelectionClass + TGtkFontSelectionClass* = object of TGtkVBoxClass + gtk_reserved311: proc (){.cdecl.} + gtk_reserved312: proc (){.cdecl.} + gtk_reserved313: proc (){.cdecl.} + gtk_reserved314: proc (){.cdecl.} + + PGtkFontSelectionDialog* = ptr TGtkFontSelectionDialog + TGtkFontSelectionDialog* = object of TGtkDialog + fontsel*: PGtkWidget + main_vbox*: PGtkWidget + GtkFontSelectionDialog_action_area*: PGtkWidget + ok_button*: PGtkWidget + apply_button*: PGtkWidget + cancel_button*: PGtkWidget + dialog_width*: gint + auto_resize*: gboolean + + PGtkFontSelectionDialogClass* = ptr TGtkFontSelectionDialogClass + TGtkFontSelectionDialogClass* = object of TGtkDialogClass + gtk_reserved321: proc (){.cdecl.} + gtk_reserved322: proc (){.cdecl.} + gtk_reserved323: proc (){.cdecl.} + gtk_reserved324: proc (){.cdecl.} + + PGtkGammaCurve* = ptr TGtkGammaCurve + TGtkGammaCurve* = object of TGtkVBox + table*: PGtkWidget + curve*: PGtkWidget + button*: array[0..4, PGtkWidget] + gamma*: gfloat + gamma_dialog*: PGtkWidget + gamma_text*: PGtkWidget + + PGtkGammaCurveClass* = ptr TGtkGammaCurveClass + TGtkGammaCurveClass* = object of TGtkVBoxClass + gtk_reserved331: proc (){.cdecl.} + gtk_reserved332: proc (){.cdecl.} + gtk_reserved333: proc (){.cdecl.} + gtk_reserved334: proc (){.cdecl.} + + PGtkHandleBox* = ptr TGtkHandleBox + TGtkHandleBox* = object of TGtkBin + bin_window*: PGdkWindow + float_window*: PGdkWindow + shadow_type*: TGtkShadowType + GtkHandleBox_flag0*: guint16 + deskoff_x*: gint + deskoff_y*: gint + attach_allocation*: TGtkAllocation + float_allocation*: TGtkAllocation + + PGtkHandleBoxClass* = ptr TGtkHandleBoxClass + TGtkHandleBoxClass* = object of TGtkBinClass + child_attached*: proc (handle_box: PGtkHandleBox, child: PGtkWidget){.cdecl.} + child_detached*: proc (handle_box: PGtkHandleBox, child: PGtkWidget){.cdecl.} + gtk_reserved341: proc (){.cdecl.} + gtk_reserved342: proc (){.cdecl.} + gtk_reserved343: proc (){.cdecl.} + gtk_reserved344: proc (){.cdecl.} + + PGtkPaned* = ptr TGtkPaned + TGtkPaned* = object of TGtkContainer + child1*: PGtkWidget + child2*: PGtkWidget + handle*: PGdkWindow + xor_gc*: PGdkGC + cursor_type*: TGdkCursorType + handle_pos*: TGdkRectangle + child1_size*: gint + last_allocation*: gint + min_position*: gint + max_position*: gint + GtkPaned_flag0*: guint16 + last_child1_focus*: PGtkWidget + last_child2_focus*: PGtkWidget + saved_focus*: PGtkWidget + drag_pos*: gint + original_position*: gint + + PGtkPanedClass* = ptr TGtkPanedClass + TGtkPanedClass* = object of TGtkContainerClass + cycle_child_focus*: proc (paned: PGtkPaned, reverse: gboolean): gboolean{. + cdecl.} + toggle_handle_focus*: proc (paned: PGtkPaned): gboolean{.cdecl.} + move_handle*: proc (paned: PGtkPaned, scroll: TGtkScrollType): gboolean{. + cdecl.} + cycle_handle_focus*: proc (paned: PGtkPaned, reverse: gboolean): gboolean{. + cdecl.} + accept_position*: proc (paned: PGtkPaned): gboolean{.cdecl.} + cancel_position*: proc (paned: PGtkPaned): gboolean{.cdecl.} + gtk_reserved351: proc (){.cdecl.} + gtk_reserved352: proc (){.cdecl.} + gtk_reserved353: proc (){.cdecl.} + gtk_reserved354: proc (){.cdecl.} + + PGtkHButtonBox* = ptr TGtkHButtonBox + TGtkHButtonBox* = object of TGtkButtonBox + + PGtkHButtonBoxClass* = ptr TGtkHButtonBoxClass + TGtkHButtonBoxClass* = object of TGtkButtonBoxClass + + PGtkHPaned* = ptr TGtkHPaned + TGtkHPaned* = object of TGtkPaned + + PGtkHPanedClass* = ptr TGtkHPanedClass + TGtkHPanedClass* = object of TGtkPanedClass + + PGtkRulerMetric* = ptr TGtkRulerMetric + PGtkRuler* = ptr TGtkRuler + TGtkRuler* = object of TGtkWidget + backing_store*: PGdkPixmap + non_gr_exp_gc*: PGdkGC + metric*: PGtkRulerMetric + xsrc*: gint + ysrc*: gint + slider_size*: gint + lower*: gdouble + upper*: gdouble + position*: gdouble + max_size*: gdouble + + PGtkRulerClass* = ptr TGtkRulerClass + TGtkRulerClass* = object of TGtkWidgetClass + draw_ticks*: proc (ruler: PGtkRuler){.cdecl.} + draw_pos*: proc (ruler: PGtkRuler){.cdecl.} + gtk_reserved361: proc (){.cdecl.} + gtk_reserved362: proc (){.cdecl.} + gtk_reserved363: proc (){.cdecl.} + gtk_reserved364: proc (){.cdecl.} + + TGtkRulerMetric* {.final, pure.} = object + metric_name*: cstring + abbrev*: cstring + pixels_per_unit*: gdouble + ruler_scale*: array[0..9, gdouble] + subdivide*: array[0..4, gint] + + PGtkHRuler* = ptr TGtkHRuler + TGtkHRuler* = object of TGtkRuler + + PGtkHRulerClass* = ptr TGtkHRulerClass + TGtkHRulerClass* = object of TGtkRulerClass + + PGtkRcContext* = pointer + PGtkSettings* = ptr TGtkSettings + TGtkSettings* = object of TGObject + queued_settings*: PGData + property_values*: PGValue + rc_context*: PGtkRcContext + screen*: PGdkScreen + + PGtkSettingsClass* = ptr TGtkSettingsClass + TGtkSettingsClass* = object of TGObjectClass + + PGtkSettingsValue* = ptr TGtkSettingsValue + TGtkSettingsValue* {.final, pure.} = object + origin*: cstring + value*: TGValue + + PGtkRcFlags* = ptr TGtkRcFlags + TGtkRcFlags* = int32 + PGtkRcStyle* = ptr TGtkRcStyle + TGtkRcStyle* = object of TGObject + name*: cstring + bg_pixmap_name*: array[0..4, cstring] + font_desc*: PPangoFontDescription + color_flags*: array[0..4, TGtkRcFlags] + fg*: array[0..4, TGdkColor] + bg*: array[0..4, TGdkColor] + text*: array[0..4, TGdkColor] + base*: array[0..4, TGdkColor] + xthickness*: gint + ythickness*: gint + rc_properties*: PGArray + rc_style_lists*: PGSList + icon_factories*: PGSList + GtkRcStyle_flag0*: guint16 + + PGtkRcStyleClass* = ptr TGtkRcStyleClass + TGtkRcStyleClass* = object of TGObjectClass + create_rc_style*: proc (rc_style: PGtkRcStyle): PGtkRcStyle{.cdecl.} + parse*: proc (rc_style: PGtkRcStyle, settings: PGtkSettings, + scanner: PGScanner): guint{.cdecl.} + merge*: proc (dest: PGtkRcStyle, src: PGtkRcStyle){.cdecl.} + create_style*: proc (rc_style: PGtkRcStyle): PGtkStyle{.cdecl.} + gtk_reserved371: proc (){.cdecl.} + gtk_reserved372: proc (){.cdecl.} + gtk_reserved373: proc (){.cdecl.} + gtk_reserved374: proc (){.cdecl.} + + PGtkRcTokenType* = ptr TGtkRcTokenType + TGtkRcTokenType* = enum + GTK_RC_TOKEN_INVALID, GTK_RC_TOKEN_INCLUDE, GTK_RC_TOKEN_NORMAL, + GTK_RC_TOKEN_ACTIVE, GTK_RC_TOKEN_PRELIGHT, GTK_RC_TOKEN_SELECTED, + GTK_RC_TOKEN_INSENSITIVE, GTK_RC_TOKEN_FG, GTK_RC_TOKEN_BG, + GTK_RC_TOKEN_TEXT, GTK_RC_TOKEN_BASE, GTK_RC_TOKEN_XTHICKNESS, + GTK_RC_TOKEN_YTHICKNESS, GTK_RC_TOKEN_FONT, GTK_RC_TOKEN_FONTSET, + GTK_RC_TOKEN_FONT_NAME, GTK_RC_TOKEN_BG_PIXMAP, GTK_RC_TOKEN_PIXMAP_PATH, + GTK_RC_TOKEN_STYLE, GTK_RC_TOKEN_BINDING, GTK_RC_TOKEN_BIND, + GTK_RC_TOKEN_WIDGET, GTK_RC_TOKEN_WIDGET_CLASS, GTK_RC_TOKEN_CLASS, + GTK_RC_TOKEN_LOWEST, GTK_RC_TOKEN_GTK, GTK_RC_TOKEN_APPLICATION, + GTK_RC_TOKEN_THEME, GTK_RC_TOKEN_RC, GTK_RC_TOKEN_HIGHEST, + GTK_RC_TOKEN_ENGINE, GTK_RC_TOKEN_MODULE_PATH, GTK_RC_TOKEN_IM_MODULE_PATH, + GTK_RC_TOKEN_IM_MODULE_FILE, GTK_RC_TOKEN_STOCK, GTK_RC_TOKEN_LTR, + GTK_RC_TOKEN_RTL, GTK_RC_TOKEN_LAST + PGtkRcProperty* = ptr TGtkRcProperty + TGtkRcProperty* {.final, pure.} = object + type_name*: TGQuark + property_name*: TGQuark + origin*: cstring + value*: TGValue + + PGtkIconSource* = pointer + TGtkRcPropertyParser* = proc (pspec: PGParamSpec, rc_string: PGString, + property_value: PGValue): gboolean{.cdecl.} + TGtkStyle* = object of TGObject + fg*: array[0..4, TGdkColor] + bg*: array[0..4, TGdkColor] + light*: array[0..4, TGdkColor] + dark*: array[0..4, TGdkColor] + mid*: array[0..4, TGdkColor] + text*: array[0..4, TGdkColor] + base*: array[0..4, TGdkColor] + text_aa*: array[0..4, TGdkColor] + black*: TGdkColor + white*: TGdkColor + font_desc*: PPangoFontDescription + xthickness*: gint + ythickness*: gint + fg_gc*: array[0..4, PGdkGC] + bg_gc*: array[0..4, PGdkGC] + light_gc*: array[0..4, PGdkGC] + dark_gc*: array[0..4, PGdkGC] + mid_gc*: array[0..4, PGdkGC] + text_gc*: array[0..4, PGdkGC] + base_gc*: array[0..4, PGdkGC] + text_aa_gc*: array[0..4, PGdkGC] + black_gc*: PGdkGC + white_gc*: PGdkGC + bg_pixmap*: array[0..4, PGdkPixmap] + attach_count*: gint + depth*: gint + colormap*: PGdkColormap + private_font*: PGdkFont + private_font_desc*: PPangoFontDescription + rc_style*: PGtkRcStyle + styles*: PGSList + property_cache*: PGArray + icon_factories*: PGSList + + PGtkStyleClass* = ptr TGtkStyleClass + TGtkStyleClass* = object of TGObjectClass + realize*: proc (style: PGtkStyle){.cdecl.} + unrealize*: proc (style: PGtkStyle){.cdecl.} + copy*: proc (style: PGtkStyle, src: PGtkStyle){.cdecl.} + clone*: proc (style: PGtkStyle): PGtkStyle{.cdecl.} + init_from_rc*: proc (style: PGtkStyle, rc_style: PGtkRcStyle){.cdecl.} + set_background*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType){.cdecl.} + render_icon*: proc (style: PGtkStyle, source: PGtkIconSource, + direction: TGtkTextDirection, state: TGtkStateType, + size: TGtkIconSize, widget: PGtkWidget, detail: cstring): PGdkPixbuf{. + cdecl.} + draw_hline*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, area: PGdkRectangle, + widget: PGtkWidget, detail: cstring, x1: gint, x2: gint, + y: gint){.cdecl.} + draw_vline*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, area: PGdkRectangle, + widget: PGtkWidget, detail: cstring, y1: gint, y2: gint, + x: gint){.cdecl.} + draw_shadow*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, width: gint, height: gint){.cdecl.} + draw_polygon*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, + detail: cstring, point: PGdkPoint, npoints: gint, + fill: gboolean){.cdecl.} + draw_arrow*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + arrow_type: TGtkArrowType, fill: gboolean, x: gint, + y: gint, width: gint, height: gint){.cdecl.} + draw_diamond*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, + detail: cstring, x: gint, y: gint, width: gint, + height: gint){.cdecl.} + draw_string*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, area: PGdkRectangle, + widget: PGtkWidget, detail: cstring, x: gint, y: gint, + `string`: cstring){.cdecl.} + draw_box*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, width: gint, height: gint){.cdecl.} + draw_flat_box*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, + shadow_type: TGtkShadowType, area: PGdkRectangle, + widget: PGtkWidget, detail: cstring, x: gint, y: gint, + width: gint, height: gint){.cdecl.} + draw_check*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, width: gint, height: gint){.cdecl.} + draw_option*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, width: gint, height: gint){.cdecl.} + draw_tab*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, width: gint, height: gint){.cdecl.} + draw_shadow_gap*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, + shadow_type: TGtkShadowType, area: PGdkRectangle, + widget: PGtkWidget, detail: cstring, x: gint, + y: gint, width: gint, height: gint, + gap_side: TGtkPositionType, gap_x: gint, + gap_width: gint){.cdecl.} + draw_box_gap*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, + detail: cstring, x: gint, y: gint, width: gint, + height: gint, gap_side: TGtkPositionType, gap_x: gint, + gap_width: gint){.cdecl.} + draw_extension*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, + shadow_type: TGtkShadowType, area: PGdkRectangle, + widget: PGtkWidget, detail: cstring, x: gint, y: gint, + width: gint, height: gint, gap_side: TGtkPositionType){. + cdecl.} + draw_focus*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, area: PGdkRectangle, + widget: PGtkWidget, detail: cstring, x: gint, y: gint, + width: gint, height: gint){.cdecl.} + draw_slider*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, width: gint, height: gint, + orientation: TGtkOrientation){.cdecl.} + draw_handle*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, width: gint, height: gint, + orientation: TGtkOrientation){.cdecl.} + draw_expander*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, area: PGdkRectangle, + widget: PGtkWidget, detail: cstring, x: gint, y: gint, + expander_style: TGtkExpanderStyle){.cdecl.} + draw_layout*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, use_text: gboolean, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, layout: PPangoLayout){.cdecl.} + draw_resize_grip*: proc (style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, area: PGdkRectangle, + widget: PGtkWidget, detail: cstring, + edge: TGdkWindowEdge, x: gint, y: gint, + width: gint, height: gint){.cdecl.} + gtk_reserved381: proc (){.cdecl.} + gtk_reserved382: proc (){.cdecl.} + gtk_reserved383: proc (){.cdecl.} + gtk_reserved384: proc (){.cdecl.} + gtk_reserved385: proc (){.cdecl.} + gtk_reserved386: proc (){.cdecl.} + gtk_reserved387: proc (){.cdecl.} + gtk_reserved388: proc (){.cdecl.} + gtk_reserved389: proc (){.cdecl.} + gtk_reserved3810: proc (){.cdecl.} + gtk_reserved3811: proc (){.cdecl.} + gtk_reserved3812: proc (){.cdecl.} + + PGtkBorder* = ptr TGtkBorder + TGtkBorder* {.final, pure.} = object + left*: gint + right*: gint + top*: gint + bottom*: gint + + PGtkRangeLayout* = pointer + PGtkRangeStepTimer* = pointer + PGtkRange* = ptr TGtkRange + TGtkRange* = object of TGtkWidget + adjustment*: PGtkAdjustment + update_policy*: TGtkUpdateType + GtkRange_flag0*: guint16 + min_slider_size*: gint + orientation*: TGtkOrientation + range_rect*: TGdkRectangle + slider_start*: gint + slider_end*: gint + round_digits*: gint + flag1*: guint16 + layout*: PGtkRangeLayout + timer*: PGtkRangeStepTimer + slide_initial_slider_position*: gint + slide_initial_coordinate*: gint + update_timeout_id*: guint + event_window*: PGdkWindow + + PGtkRangeClass* = ptr TGtkRangeClass + TGtkRangeClass* = object of TGtkWidgetClass + slider_detail*: cstring + stepper_detail*: cstring + value_changed*: proc (range: PGtkRange){.cdecl.} + adjust_bounds*: proc (range: PGtkRange, new_value: gdouble){.cdecl.} + move_slider*: proc (range: PGtkRange, scroll: TGtkScrollType){.cdecl.} + get_range_border*: proc (range: PGtkRange, border: PGtkBorder){.cdecl.} + gtk_reserved401: proc (){.cdecl.} + gtk_reserved402: proc (){.cdecl.} + gtk_reserved403: proc (){.cdecl.} + gtk_reserved404: proc (){.cdecl.} + + PGtkScale* = ptr TGtkScale + TGtkScale* = object of TGtkRange + digits*: gint + GtkScale_flag0*: guint16 + + PGtkScaleClass* = ptr TGtkScaleClass + TGtkScaleClass* = object of TGtkRangeClass + format_value*: proc (scale: PGtkScale, value: gdouble): cstring{.cdecl.} + draw_value*: proc (scale: PGtkScale){.cdecl.} + gtk_reserved411: proc (){.cdecl.} + gtk_reserved412: proc (){.cdecl.} + gtk_reserved413: proc (){.cdecl.} + gtk_reserved414: proc (){.cdecl.} + + PGtkHScale* = ptr TGtkHScale + TGtkHScale* = object of TGtkScale + + PGtkHScaleClass* = ptr TGtkHScaleClass + TGtkHScaleClass* = object of TGtkScaleClass + + PGtkScrollbar* = ptr TGtkScrollbar + TGtkScrollbar* = object of TGtkRange + + PGtkScrollbarClass* = ptr TGtkScrollbarClass + TGtkScrollbarClass* = object of TGtkRangeClass + gtk_reserved421: proc (){.cdecl.} + gtk_reserved422: proc (){.cdecl.} + gtk_reserved423: proc (){.cdecl.} + gtk_reserved424: proc (){.cdecl.} + + PGtkHScrollbar* = ptr TGtkHScrollbar + TGtkHScrollbar* = object of TGtkScrollbar + + PGtkHScrollbarClass* = ptr TGtkHScrollbarClass + TGtkHScrollbarClass* = object of TGtkScrollbarClass + + PGtkSeparator* = ptr TGtkSeparator + TGtkSeparator* = object of TGtkWidget + + PGtkSeparatorClass* = ptr TGtkSeparatorClass + TGtkSeparatorClass* = object of TGtkWidgetClass + + PGtkHSeparator* = ptr TGtkHSeparator + TGtkHSeparator* = object of TGtkSeparator + + PGtkHSeparatorClass* = ptr TGtkHSeparatorClass + TGtkHSeparatorClass* = object of TGtkSeparatorClass + + PGtkIconFactory* = ptr TGtkIconFactory + TGtkIconFactory* = object of TGObject + icons*: PGHashTable + + PGtkIconFactoryClass* = ptr TGtkIconFactoryClass + TGtkIconFactoryClass* = object of TGObjectClass + gtk_reserved431: proc (){.cdecl.} + gtk_reserved432: proc (){.cdecl.} + gtk_reserved433: proc (){.cdecl.} + gtk_reserved434: proc (){.cdecl.} + + PGtkIconSet* = pointer + PGtkImagePixmapData* = ptr TGtkImagePixmapData + TGtkImagePixmapData* {.final, pure.} = object + pixmap*: PGdkPixmap + + PGtkImageImageData* = ptr TGtkImageImageData + TGtkImageImageData* {.final, pure.} = object + image*: PGdkImage + + PGtkImagePixbufData* = ptr TGtkImagePixbufData + TGtkImagePixbufData* {.final, pure.} = object + pixbuf*: PGdkPixbuf + + PGtkImageStockData* = ptr TGtkImageStockData + TGtkImageStockData* {.final, pure.} = object + stock_id*: cstring + + PGtkImageIconSetData* = ptr TGtkImageIconSetData + TGtkImageIconSetData* {.final, pure.} = object + icon_set*: PGtkIconSet + + PGtkImageAnimationData* = ptr TGtkImageAnimationData + TGtkImageAnimationData* {.final, pure.} = object + anim*: PGdkPixbufAnimation + iter*: PGdkPixbufAnimationIter + frame_timeout*: guint + + PGtkImageType* = ptr TGtkImageType + TGtkImageType* = enum + GTK_IMAGE_EMPTY, GTK_IMAGE_PIXMAP, GTK_IMAGE_IMAGE, GTK_IMAGE_PIXBUF, + GTK_IMAGE_STOCK, GTK_IMAGE_ICON_SET, GTK_IMAGE_ANIMATION + PGtkImage* = ptr TGtkImage + TGtkImage* = object of TGtkMisc + storage_type*: TGtkImageType + pixmap*: TGtkImagePixmapData + mask*: PGdkBitmap + icon_size*: TGtkIconSize + + PGtkImageClass* = ptr TGtkImageClass + TGtkImageClass* = object of TGtkMiscClass + gtk_reserved441: proc (){.cdecl.} + gtk_reserved442: proc (){.cdecl.} + gtk_reserved443: proc (){.cdecl.} + gtk_reserved444: proc (){.cdecl.} + + PGtkImageMenuItem* = ptr TGtkImageMenuItem + TGtkImageMenuItem* = object of TGtkMenuItem + image*: PGtkWidget + + PGtkImageMenuItemClass* = ptr TGtkImageMenuItemClass + TGtkImageMenuItemClass* = object of TGtkMenuItemClass + + PGtkIMContextSimple* = ptr TGtkIMContextSimple + TGtkIMContextSimple* = object of TGtkIMContext + tables*: PGSList + compose_buffer*: array[0..(GTK_MAX_COMPOSE_LEN + 1) - 1, guint] + tentative_match*: gunichar + tentative_match_len*: gint + GtkIMContextSimple_flag0*: guint16 + + PGtkIMContextSimpleClass* = ptr TGtkIMContextSimpleClass + TGtkIMContextSimpleClass* = object of TGtkIMContextClass + + PGtkIMMulticontext* = ptr TGtkIMMulticontext + TGtkIMMulticontext* = object of TGtkIMContext + slave*: PGtkIMContext + client_window*: PGdkWindow + context_id*: cstring + + PGtkIMMulticontextClass* = ptr TGtkIMMulticontextClass + TGtkIMMulticontextClass* = object of TGtkIMContextClass + gtk_reserved451: proc (){.cdecl.} + gtk_reserved452: proc (){.cdecl.} + gtk_reserved453: proc (){.cdecl.} + gtk_reserved454: proc (){.cdecl.} + + PGtkInputDialog* = ptr TGtkInputDialog + TGtkInputDialog* = object of TGtkDialog + axis_list*: PGtkWidget + axis_listbox*: PGtkWidget + mode_optionmenu*: PGtkWidget + close_button*: PGtkWidget + save_button*: PGtkWidget + axis_items*: array[0..(GDK_AXIS_LAST) - 1, PGtkWidget] + current_device*: PGdkDevice + keys_list*: PGtkWidget + keys_listbox*: PGtkWidget + + PGtkInputDialogClass* = ptr TGtkInputDialogClass + TGtkInputDialogClass* = object of TGtkDialogClass + enable_device*: proc (inputd: PGtkInputDialog, device: PGdkDevice){.cdecl.} + disable_device*: proc (inputd: PGtkInputDialog, device: PGdkDevice){.cdecl.} + gtk_reserved461: proc (){.cdecl.} + gtk_reserved462: proc (){.cdecl.} + gtk_reserved463: proc (){.cdecl.} + gtk_reserved464: proc (){.cdecl.} + + PGtkInvisible* = ptr TGtkInvisible + TGtkInvisible* = object of TGtkWidget + has_user_ref_count*: gboolean + screen*: PGdkScreen + + PGtkInvisibleClass* = ptr TGtkInvisibleClass + TGtkInvisibleClass* = object of TGtkWidgetClass + gtk_reserved701: proc (){.cdecl.} + gtk_reserved702: proc (){.cdecl.} + gtk_reserved703: proc (){.cdecl.} + gtk_reserved704: proc (){.cdecl.} + + TGtkPrintFunc* = proc (func_data: gpointer, str: cstring){.cdecl.} + PGtkTranslateFunc* = ptr TGtkTranslateFunc + TGtkTranslateFunc* = gchar + TGtkItemFactoryCallback* = proc (){.cdecl.} + TGtkItemFactoryCallback1* = proc (callback_data: gpointer, + callback_action: guint, widget: PGtkWidget){. + cdecl.} + PGtkItemFactory* = ptr TGtkItemFactory + TGtkItemFactory* = object of TGtkObject + path*: cstring + accel_group*: PGtkAccelGroup + widget*: PGtkWidget + items*: PGSList + translate_func*: TGtkTranslateFunc + translate_data*: gpointer + translate_notify*: TGtkDestroyNotify + + PGtkItemFactoryClass* = ptr TGtkItemFactoryClass + TGtkItemFactoryClass* = object of TGtkObjectClass + item_ht*: PGHashTable + gtk_reserved471: proc (){.cdecl.} + gtk_reserved472: proc (){.cdecl.} + gtk_reserved473: proc (){.cdecl.} + gtk_reserved474: proc (){.cdecl.} + + PGtkItemFactoryEntry* = ptr TGtkItemFactoryEntry + TGtkItemFactoryEntry* {.final, pure.} = object + path*: cstring + accelerator*: cstring + callback*: TGtkItemFactoryCallback + callback_action*: guint + item_type*: cstring + extra_data*: gconstpointer + + PGtkItemFactoryItem* = ptr TGtkItemFactoryItem + TGtkItemFactoryItem* {.final, pure.} = object + path*: cstring + widgets*: PGSList + + PGtkLayout* = ptr TGtkLayout + TGtkLayout* = object of TGtkContainer + children*: PGList + width*: guint + height*: guint + hadjustment*: PGtkAdjustment + vadjustment*: PGtkAdjustment + bin_window*: PGdkWindow + visibility*: TGdkVisibilityState + scroll_x*: gint + scroll_y*: gint + freeze_count*: guint + + PGtkLayoutClass* = ptr TGtkLayoutClass + TGtkLayoutClass* = object of TGtkContainerClass + set_scroll_adjustments*: proc (layout: PGtkLayout, + hadjustment: PGtkAdjustment, + vadjustment: PGtkAdjustment){.cdecl.} + gtk_reserved481: proc (){.cdecl.} + gtk_reserved482: proc (){.cdecl.} + gtk_reserved483: proc (){.cdecl.} + gtk_reserved484: proc (){.cdecl.} + + PGtkList* = ptr TGtkList + TGtkList* = object of TGtkContainer + children*: PGList + selection*: PGList + undo_selection*: PGList + undo_unselection*: PGList + last_focus_child*: PGtkWidget + undo_focus_child*: PGtkWidget + htimer*: guint + vtimer*: guint + anchor*: gint + drag_pos*: gint + anchor_state*: TGtkStateType + GtkList_flag0*: guint16 + + PGtkListClass* = ptr TGtkListClass + TGtkListClass* = object of TGtkContainerClass + selection_changed*: proc (list: PGtkList){.cdecl.} + select_child*: proc (list: PGtkList, child: PGtkWidget){.cdecl.} + unselect_child*: proc (list: PGtkList, child: PGtkWidget){.cdecl.} + + TGtkTreeModelForeachFunc* = proc (model: PGtkTreeModel, path: PGtkTreePath, + iter: PGtkTreeIter, data: gpointer): gboolean{. + cdecl.} + PGtkTreeModelFlags* = ptr TGtkTreeModelFlags + TGtkTreeModelFlags* = int32 + TGtkTreeIter* {.final, pure.} = object + stamp*: gint + user_data*: gpointer + user_data2*: gpointer + user_data3*: gpointer + + PGtkTreeModelIface* = ptr TGtkTreeModelIface + TGtkTreeModelIface* = object of TGTypeInterface + row_changed*: proc (tree_model: PGtkTreeModel, path: PGtkTreePath, + iter: PGtkTreeIter){.cdecl.} + row_inserted*: proc (tree_model: PGtkTreeModel, path: PGtkTreePath, + iter: PGtkTreeIter){.cdecl.} + row_has_child_toggled*: proc (tree_model: PGtkTreeModel, path: PGtkTreePath, + iter: PGtkTreeIter){.cdecl.} + row_deleted*: proc (tree_model: PGtkTreeModel, path: PGtkTreePath){.cdecl.} + rows_reordered*: proc (tree_model: PGtkTreeModel, path: PGtkTreePath, + iter: PGtkTreeIter, new_order: Pgint){.cdecl.} + get_flags*: proc (tree_model: PGtkTreeModel): TGtkTreeModelFlags{.cdecl.} + get_n_columns*: proc (tree_model: PGtkTreeModel): gint{.cdecl.} + get_column_type*: proc (tree_model: PGtkTreeModel, index: gint): GType{. + cdecl.} + get_iter*: proc (tree_model: PGtkTreeModel, iter: PGtkTreeIter, + path: PGtkTreePath): gboolean{.cdecl.} + get_path*: proc (tree_model: PGtkTreeModel, iter: PGtkTreeIter): PGtkTreePath{. + cdecl.} + get_value*: proc (tree_model: PGtkTreeModel, iter: PGtkTreeIter, + column: gint, value: PGValue){.cdecl.} + iter_next*: proc (tree_model: PGtkTreeModel, iter: PGtkTreeIter): gboolean{. + cdecl.} + iter_children*: proc (tree_model: PGtkTreeModel, iter: PGtkTreeIter, + parent: PGtkTreeIter): gboolean{.cdecl.} + iter_has_child*: proc (tree_model: PGtkTreeModel, iter: PGtkTreeIter): gboolean{. + cdecl.} + iter_n_children*: proc (tree_model: PGtkTreeModel, iter: PGtkTreeIter): gint{. + cdecl.} + iter_nth_child*: proc (tree_model: PGtkTreeModel, iter: PGtkTreeIter, + parent: PGtkTreeIter, n: gint): gboolean{.cdecl.} + iter_parent*: proc (tree_model: PGtkTreeModel, iter: PGtkTreeIter, + child: PGtkTreeIter): gboolean{.cdecl.} + ref_node*: proc (tree_model: PGtkTreeModel, iter: PGtkTreeIter){.cdecl.} + unref_node*: proc (tree_model: PGtkTreeModel, iter: PGtkTreeIter){.cdecl.} + + PGtkTreeSortable* = pointer + TGtkTreeIterCompareFunc* = proc (model: PGtkTreeModel, a: PGtkTreeIter, + b: PGtkTreeIter, user_data: gpointer): gint{. + cdecl.} + PGtkTreeSortableIface* = ptr TGtkTreeSortableIface + TGtkTreeSortableIface* = object of TGTypeInterface + sort_column_changed*: proc (sortable: PGtkTreeSortable){.cdecl.} + get_sort_column_id*: proc (sortable: PGtkTreeSortable, + sort_column_id: Pgint, order: PGtkSortType): gboolean{. + cdecl.} + set_sort_column_id*: proc (sortable: PGtkTreeSortable, sort_column_id: gint, + order: TGtkSortType){.cdecl.} + set_sort_func*: proc (sortable: PGtkTreeSortable, sort_column_id: gint, + func: TGtkTreeIterCompareFunc, data: gpointer, + destroy: TGtkDestroyNotify){.cdecl.} + set_default_sort_func*: proc (sortable: PGtkTreeSortable, + func: TGtkTreeIterCompareFunc, data: gpointer, + destroy: TGtkDestroyNotify){.cdecl.} + has_default_sort_func*: proc (sortable: PGtkTreeSortable): gboolean{.cdecl.} + + PGtkTreeModelSort* = ptr TGtkTreeModelSort + TGtkTreeModelSort* = object of TGObject + root*: gpointer + stamp*: gint + child_flags*: guint + child_model*: PGtkTreeModel + zero_ref_count*: gint + sort_list*: PGList + sort_column_id*: gint + order*: TGtkSortType + default_sort_func*: TGtkTreeIterCompareFunc + default_sort_data*: gpointer + default_sort_destroy*: TGtkDestroyNotify + changed_id*: guint + inserted_id*: guint + has_child_toggled_id*: guint + deleted_id*: guint + reordered_id*: guint + + PGtkTreeModelSortClass* = ptr TGtkTreeModelSortClass + TGtkTreeModelSortClass* = object of TGObjectClass + gtk_reserved491: proc (){.cdecl.} + gtk_reserved492: proc (){.cdecl.} + gtk_reserved493: proc (){.cdecl.} + gtk_reserved494: proc (){.cdecl.} + + PGtkListStore* = ptr TGtkListStore + TGtkListStore* = object of TGObject + stamp*: gint + root*: gpointer + tail*: gpointer + sort_list*: PGList + n_columns*: gint + sort_column_id*: gint + order*: TGtkSortType + column_headers*: PGType + length*: gint + default_sort_func*: TGtkTreeIterCompareFunc + default_sort_data*: gpointer + default_sort_destroy*: TGtkDestroyNotify + GtkListStore_flag0*: guint16 + + PGtkListStoreClass* = ptr TGtkListStoreClass + TGtkListStoreClass* = object of TGObjectClass + gtk_reserved501: proc (){.cdecl.} + gtk_reserved502: proc (){.cdecl.} + gtk_reserved503: proc (){.cdecl.} + gtk_reserved504: proc (){.cdecl.} + + TGtkModuleInitFunc* = proc (argc: Pgint, argv: PPPgchar){.cdecl.} + TGtkKeySnoopFunc* = proc (grab_widget: PGtkWidget, event: PGdkEventKey, + func_data: gpointer): gint{.cdecl.} + PGtkMenuBar* = ptr TGtkMenuBar + TGtkMenuBar* = object of TGtkMenuShell + + PGtkMenuBarClass* = ptr TGtkMenuBarClass + TGtkMenuBarClass* = object of TGtkMenuShellClass + gtk_reserved511: proc (){.cdecl.} + gtk_reserved512: proc (){.cdecl.} + gtk_reserved513: proc (){.cdecl.} + gtk_reserved514: proc (){.cdecl.} + + PGtkMessageType* = ptr TGtkMessageType + TGtkMessageType* = enum + GTK_MESSAGE_INFO, GTK_MESSAGE_WARNING, GTK_MESSAGE_QUESTION, + GTK_MESSAGE_ERROR + PGtkButtonsType* = ptr TGtkButtonsType + TGtkButtonsType* = enum + GTK_BUTTONS_NONE, GTK_BUTTONS_OK, GTK_BUTTONS_CLOSE, GTK_BUTTONS_CANCEL, + GTK_BUTTONS_YES_NO, GTK_BUTTONS_OK_CANCEL + PGtkMessageDialog* = ptr TGtkMessageDialog + TGtkMessageDialog* = object of TGtkDialog + image*: PGtkWidget + label*: PGtkWidget + + PGtkMessageDialogClass* = ptr TGtkMessageDialogClass + TGtkMessageDialogClass* = object of TGtkDialogClass + gtk_reserved521: proc (){.cdecl.} + gtk_reserved522: proc (){.cdecl.} + gtk_reserved523: proc (){.cdecl.} + gtk_reserved524: proc (){.cdecl.} + + PGtkNotebookPage* = pointer + PGtkNotebookTab* = ptr TGtkNotebookTab + TGtkNotebookTab* = enum + GTK_NOTEBOOK_TAB_FIRST, GTK_NOTEBOOK_TAB_LAST + PGtkNotebook* = ptr TGtkNotebook + TGtkNotebook* = object of TGtkContainer + cur_page*: PGtkNotebookPage + children*: PGList + first_tab*: PGList + focus_tab*: PGList + menu*: PGtkWidget + event_window*: PGdkWindow + timer*: guint32 + tab_hborder*: guint16 + tab_vborder*: guint16 + GtkNotebook_flag0*: guint16 + + PGtkNotebookClass* = ptr TGtkNotebookClass + TGtkNotebookClass* = object of TGtkContainerClass + switch_page*: proc (notebook: PGtkNotebook, page: PGtkNotebookPage, + page_num: guint){.cdecl.} + select_page*: proc (notebook: PGtkNotebook, move_focus: gboolean): gboolean{. + cdecl.} + focus_tab*: proc (notebook: PGtkNotebook, thetype: TGtkNotebookTab): gboolean{. + cdecl.} + change_current_page*: proc (notebook: PGtkNotebook, offset: gint){.cdecl.} + move_focus_out*: proc (notebook: PGtkNotebook, direction: TGtkDirectionType){. + cdecl.} + gtk_reserved531: proc (){.cdecl.} + gtk_reserved532: proc (){.cdecl.} + gtk_reserved533: proc (){.cdecl.} + gtk_reserved534: proc (){.cdecl.} + + PGtkOldEditable* = ptr TGtkOldEditable + TGtkOldEditable* = object of TGtkWidget + current_pos*: guint + selection_start_pos*: guint + selection_end_pos*: guint + GtkOldEditable_flag0*: guint16 + clipboard_text*: cstring + + TGtkTextFunction* = proc (editable: PGtkOldEditable, time: guint32){.cdecl.} + PGtkOldEditableClass* = ptr TGtkOldEditableClass + TGtkOldEditableClass* = object of TGtkWidgetClass + activate*: proc (editable: PGtkOldEditable){.cdecl.} + set_editable*: proc (editable: PGtkOldEditable, is_editable: gboolean){. + cdecl.} + move_cursor*: proc (editable: PGtkOldEditable, x: gint, y: gint){.cdecl.} + move_word*: proc (editable: PGtkOldEditable, n: gint){.cdecl.} + move_page*: proc (editable: PGtkOldEditable, x: gint, y: gint){.cdecl.} + move_to_row*: proc (editable: PGtkOldEditable, row: gint){.cdecl.} + move_to_column*: proc (editable: PGtkOldEditable, row: gint){.cdecl.} + kill_char*: proc (editable: PGtkOldEditable, direction: gint){.cdecl.} + kill_word*: proc (editable: PGtkOldEditable, direction: gint){.cdecl.} + kill_line*: proc (editable: PGtkOldEditable, direction: gint){.cdecl.} + cut_clipboard*: proc (editable: PGtkOldEditable){.cdecl.} + copy_clipboard*: proc (editable: PGtkOldEditable){.cdecl.} + paste_clipboard*: proc (editable: PGtkOldEditable){.cdecl.} + update_text*: proc (editable: PGtkOldEditable, start_pos: gint, + end_pos: gint){.cdecl.} + get_chars*: proc (editable: PGtkOldEditable, start_pos: gint, end_pos: gint): cstring{. + cdecl.} + set_selection*: proc (editable: PGtkOldEditable, start_pos: gint, + end_pos: gint){.cdecl.} + set_position*: proc (editable: PGtkOldEditable, position: gint){.cdecl.} + + PGtkOptionMenu* = ptr TGtkOptionMenu + TGtkOptionMenu* = object of TGtkButton + menu*: PGtkWidget + menu_item*: PGtkWidget + width*: guint16 + height*: guint16 + + PGtkOptionMenuClass* = ptr TGtkOptionMenuClass + TGtkOptionMenuClass* = object of TGtkButtonClass + changed*: proc (option_menu: PGtkOptionMenu){.cdecl.} + gtk_reserved541: proc (){.cdecl.} + gtk_reserved542: proc (){.cdecl.} + gtk_reserved543: proc (){.cdecl.} + gtk_reserved544: proc (){.cdecl.} + + PGtkPixmap* = ptr TGtkPixmap + TGtkPixmap* = object of TGtkMisc + pixmap*: PGdkPixmap + mask*: PGdkBitmap + pixmap_insensitive*: PGdkPixmap + GtkPixmap_flag0*: guint16 + + PGtkPixmapClass* = ptr TGtkPixmapClass + TGtkPixmapClass* = object of TGtkMiscClass + + PGtkPlug* = ptr TGtkPlug + TGtkPlug* = object of TGtkWindow + socket_window*: PGdkWindow + modality_window*: PGtkWidget + modality_group*: PGtkWindowGroup + grabbed_keys*: PGHashTable + GtkPlug_flag0*: guint16 + + PGtkPlugClass* = ptr TGtkPlugClass + TGtkPlugClass* = object of TGtkWindowClass + embedded*: proc (plug: PGtkPlug){.cdecl.} + gtk_reserved551: proc (){.cdecl.} + gtk_reserved552: proc (){.cdecl.} + gtk_reserved553: proc (){.cdecl.} + gtk_reserved554: proc (){.cdecl.} + + PGtkPreview* = ptr TGtkPreview + TGtkPreview* = object of TGtkWidget + buffer*: Pguchar + buffer_width*: guint16 + buffer_height*: guint16 + bpp*: guint16 + rowstride*: guint16 + dither*: TGdkRgbDither + GtkPreview_flag0*: guint16 + + PGtkPreviewInfo* = ptr TGtkPreviewInfo + TGtkPreviewInfo* {.final, pure.} = object + lookup*: Pguchar + gamma*: gdouble + + PGtkDitherInfo* = ptr TGtkDitherInfo + TGtkDitherInfo* {.final, pure.} = object + c*: array[0..3, guchar] + + PGtkPreviewClass* = ptr TGtkPreviewClass + TGtkPreviewClass* = object of TGtkWidgetClass + info*: TGtkPreviewInfo + + PGtkProgress* = ptr TGtkProgress + TGtkProgress* = object of TGtkWidget + adjustment*: PGtkAdjustment + offscreen_pixmap*: PGdkPixmap + format*: cstring + x_align*: gfloat + y_align*: gfloat + GtkProgress_flag0*: guint16 + + PGtkProgressClass* = ptr TGtkProgressClass + TGtkProgressClass* = object of TGtkWidgetClass + paint*: proc (progress: PGtkProgress){.cdecl.} + update*: proc (progress: PGtkProgress){.cdecl.} + act_mode_enter*: proc (progress: PGtkProgress){.cdecl.} + gtk_reserved561: proc (){.cdecl.} + gtk_reserved562: proc (){.cdecl.} + gtk_reserved563: proc (){.cdecl.} + gtk_reserved564: proc (){.cdecl.} + + PGtkProgressBarStyle* = ptr TGtkProgressBarStyle + TGtkProgressBarStyle* = enum + GTK_PROGRESS_CONTINUOUS, GTK_PROGRESS_DISCRETE + PGtkProgressBarOrientation* = ptr TGtkProgressBarOrientation + TGtkProgressBarOrientation* = enum + GTK_PROGRESS_LEFT_TO_RIGHT, GTK_PROGRESS_RIGHT_TO_LEFT, + GTK_PROGRESS_BOTTOM_TO_TOP, GTK_PROGRESS_TOP_TO_BOTTOM + PGtkProgressBar* = ptr TGtkProgressBar + TGtkProgressBar* = object of TGtkProgress + bar_style*: TGtkProgressBarStyle + orientation*: TGtkProgressBarOrientation + blocks*: guint + in_block*: gint + activity_pos*: gint + activity_step*: guint + activity_blocks*: guint + pulse_fraction*: gdouble + GtkProgressBar_flag0*: guint16 + + PGtkProgressBarClass* = ptr TGtkProgressBarClass + TGtkProgressBarClass* = object of TGtkProgressClass + gtk_reserved571: proc (){.cdecl.} + gtk_reserved572: proc (){.cdecl.} + gtk_reserved573: proc (){.cdecl.} + gtk_reserved574: proc (){.cdecl.} + + PGtkRadioButton* = ptr TGtkRadioButton + TGtkRadioButton* = object of TGtkCheckButton + group*: PGSList + + PGtkRadioButtonClass* = ptr TGtkRadioButtonClass + TGtkRadioButtonClass* = object of TGtkCheckButtonClass + gtk_reserved581: proc (){.cdecl.} + gtk_reserved582: proc (){.cdecl.} + gtk_reserved583: proc (){.cdecl.} + gtk_reserved584: proc (){.cdecl.} + + PGtkRadioMenuItem* = ptr TGtkRadioMenuItem + TGtkRadioMenuItem* = object of TGtkCheckMenuItem + group*: PGSList + + PGtkRadioMenuItemClass* = ptr TGtkRadioMenuItemClass + TGtkRadioMenuItemClass* = object of TGtkCheckMenuItemClass + gtk_reserved591: proc (){.cdecl.} + gtk_reserved592: proc (){.cdecl.} + gtk_reserved593: proc (){.cdecl.} + gtk_reserved594: proc (){.cdecl.} + + PGtkScrolledWindow* = ptr TGtkScrolledWindow + TGtkScrolledWindow* = object of TGtkBin + hscrollbar*: PGtkWidget + vscrollbar*: PGtkWidget + GtkScrolledWindow_flag0*: guint16 + shadow_type*: guint16 + + PGtkScrolledWindowClass* = ptr TGtkScrolledWindowClass + TGtkScrolledWindowClass* = object of TGtkBinClass + scrollbar_spacing*: gint + scroll_child*: proc (scrolled_window: PGtkScrolledWindow, + scroll: TGtkScrollType, horizontal: gboolean){.cdecl.} + move_focus_out*: proc (scrolled_window: PGtkScrolledWindow, + direction: TGtkDirectionType){.cdecl.} + gtk_reserved601: proc (){.cdecl.} + gtk_reserved602: proc (){.cdecl.} + gtk_reserved603: proc (){.cdecl.} + gtk_reserved604: proc (){.cdecl.} + + TGtkSelectionData* {.final, pure.} = object + selection*: TGdkAtom + target*: TGdkAtom + thetype*: TGdkAtom + format*: gint + data*: Pguchar + length*: gint + display*: PGdkDisplay + + PGtkTargetEntry* = ptr TGtkTargetEntry + TGtkTargetEntry* {.final, pure.} = object + target*: cstring + flags*: guint + info*: guint + + PGtkTargetList* = ptr TGtkTargetList + TGtkTargetList* {.final, pure.} = object + list*: PGList + ref_count*: guint + + PGtkTargetPair* = ptr TGtkTargetPair + TGtkTargetPair* {.final, pure.} = object + target*: TGdkAtom + flags*: guint + info*: guint + + PGtkSeparatorMenuItem* = ptr TGtkSeparatorMenuItem + TGtkSeparatorMenuItem* = object of TGtkMenuItem + + PGtkSeparatorMenuItemClass* = ptr TGtkSeparatorMenuItemClass + TGtkSeparatorMenuItemClass* = object of TGtkMenuItemClass + + PGtkSizeGroup* = ptr TGtkSizeGroup + TGtkSizeGroup* = object of TGObject + widgets*: PGSList + mode*: guint8 + GtkSizeGroup_flag0*: guint16 + requisition*: TGtkRequisition + + PGtkSizeGroupClass* = ptr TGtkSizeGroupClass + TGtkSizeGroupClass* = object of TGObjectClass + gtk_reserved611: proc (){.cdecl.} + gtk_reserved612: proc (){.cdecl.} + gtk_reserved613: proc (){.cdecl.} + gtk_reserved614: proc (){.cdecl.} + + PGtkSizeGroupMode* = ptr TGtkSizeGroupMode + TGtkSizeGroupMode* = enum + GTK_SIZE_GROUP_NONE, GTK_SIZE_GROUP_HORIZONTAL, GTK_SIZE_GROUP_VERTICAL, + GTK_SIZE_GROUP_BOTH + PGtkSocket* = ptr TGtkSocket + TGtkSocket* = object of TGtkContainer + request_width*: guint16 + request_height*: guint16 + current_width*: guint16 + current_height*: guint16 + plug_window*: PGdkWindow + plug_widget*: PGtkWidget + xembed_version*: gshort + GtkSocket_flag0*: guint16 + accel_group*: PGtkAccelGroup + toplevel*: PGtkWidget + + PGtkSocketClass* = ptr TGtkSocketClass + TGtkSocketClass* = object of TGtkContainerClass + plug_added*: proc (socket: PGtkSocket){.cdecl.} + plug_removed*: proc (socket: PGtkSocket): gboolean{.cdecl.} + gtk_reserved621: proc (){.cdecl.} + gtk_reserved622: proc (){.cdecl.} + gtk_reserved623: proc (){.cdecl.} + gtk_reserved624: proc (){.cdecl.} + + PGtkSpinButtonUpdatePolicy* = ptr TGtkSpinButtonUpdatePolicy + TGtkSpinButtonUpdatePolicy* = enum + GTK_UPDATE_ALWAYS, GTK_UPDATE_IF_VALID + PGtkSpinType* = ptr TGtkSpinType + TGtkSpinType* = enum + GTK_SPIN_STEP_FORWARD, GTK_SPIN_STEP_BACKWARD, GTK_SPIN_PAGE_FORWARD, + GTK_SPIN_PAGE_BACKWARD, GTK_SPIN_HOME, GTK_SPIN_END, GTK_SPIN_USER_DEFINED + PGtkSpinButton* = ptr TGtkSpinButton + TGtkSpinButton* = object of TGtkEntry + adjustment*: PGtkAdjustment + panel*: PGdkWindow + timer*: guint32 + climb_rate*: gdouble + timer_step*: gdouble + update_policy*: TGtkSpinButtonUpdatePolicy + GtkSpinButton_flag0*: int32 + + PGtkSpinButtonClass* = ptr TGtkSpinButtonClass + TGtkSpinButtonClass* = object of TGtkEntryClass + input*: proc (spin_button: PGtkSpinButton, new_value: Pgdouble): gint{.cdecl.} + output*: proc (spin_button: PGtkSpinButton): gint{.cdecl.} + value_changed*: proc (spin_button: PGtkSpinButton){.cdecl.} + change_value*: proc (spin_button: PGtkSpinButton, scroll: TGtkScrollType){. + cdecl.} + gtk_reserved631: proc (){.cdecl.} + gtk_reserved632: proc (){.cdecl.} + gtk_reserved633: proc (){.cdecl.} + gtk_reserved634: proc (){.cdecl.} + + PGtkStockItem* = ptr TGtkStockItem + TGtkStockItem* {.final, pure.} = object + stock_id*: cstring + label*: cstring + modifier*: TGdkModifierType + keyval*: guint + translation_domain*: cstring + + PGtkStatusbar* = ptr TGtkStatusbar + TGtkStatusbar* = object of TGtkHBox + frame*: PGtkWidget + `label`*: PGtkWidget + messages*: PGSList + keys*: PGSList + seq_context_id*: guint + seq_message_id*: guint + grip_window*: PGdkWindow + GtkStatusbar_flag0*: guint16 + + PGtkStatusbarClass* = ptr TGtkStatusbarClass + TGtkStatusbarClass* = object of TGtkHBoxClass + messages_mem_chunk*: PGMemChunk + text_pushed*: proc (statusbar: PGtkStatusbar, context_id: guint, + text: cstring){.cdecl.} + text_popped*: proc (statusbar: PGtkStatusbar, context_id: guint, + text: cstring){.cdecl.} + gtk_reserved641: proc (){.cdecl.} + gtk_reserved642: proc (){.cdecl.} + gtk_reserved643: proc (){.cdecl.} + gtk_reserved644: proc (){.cdecl.} + + PGtkTableRowCol* = ptr TGtkTableRowCol + PGtkTable* = ptr TGtkTable + TGtkTable* = object of TGtkContainer + children*: PGList + rows*: PGtkTableRowCol + cols*: PGtkTableRowCol + nrows*: guint16 + ncols*: guint16 + column_spacing*: guint16 + row_spacing*: guint16 + GtkTable_flag0*: guint16 + + PGtkTableClass* = ptr TGtkTableClass + TGtkTableClass* = object of TGtkContainerClass + + PGtkTableChild* = ptr TGtkTableChild + TGtkTableChild* {.final, pure.} = object + widget*: PGtkWidget + left_attach*: guint16 + right_attach*: guint16 + top_attach*: guint16 + bottom_attach*: guint16 + xpadding*: guint16 + ypadding*: guint16 + GtkTableChild_flag0*: guint16 + + TGtkTableRowCol* {.final, pure.} = object + requisition*: guint16 + allocation*: guint16 + spacing*: guint16 + flag0*: guint16 + + PGtkTearoffMenuItem* = ptr TGtkTearoffMenuItem + TGtkTearoffMenuItem* = object of TGtkMenuItem + GtkTearoffMenuItem_flag0*: guint16 + + PGtkTearoffMenuItemClass* = ptr TGtkTearoffMenuItemClass + TGtkTearoffMenuItemClass* = object of TGtkMenuItemClass + gtk_reserved651: proc (){.cdecl.} + gtk_reserved652: proc (){.cdecl.} + gtk_reserved653: proc (){.cdecl.} + gtk_reserved654: proc (){.cdecl.} + + PGtkTextFont* = pointer + PGtkPropertyMark* = ptr TGtkPropertyMark + TGtkPropertyMark* {.final, pure.} = object + `property`*: PGList + offset*: guint + index*: guint + + PGtkText* = ptr TGtkText + TGtkText* = object of TGtkOldEditable + text_area*: PGdkWindow + hadj*: PGtkAdjustment + vadj*: PGtkAdjustment + gc*: PGdkGC + line_wrap_bitmap*: PGdkPixmap + line_arrow_bitmap*: PGdkPixmap + text*: Pguchar + text_len*: guint + gap_position*: guint + gap_size*: guint + text_end*: guint + line_start_cache*: PGList + first_line_start_index*: guint + first_cut_pixels*: guint + first_onscreen_hor_pixel*: guint + first_onscreen_ver_pixel*: guint + GtkText_flag0*: guint16 + freeze_count*: guint + text_properties*: PGList + text_properties_end*: PGList + point*: TGtkPropertyMark + scratch_buffer*: Pguchar + scratch_buffer_len*: guint + last_ver_value*: gint + cursor_pos_x*: gint + cursor_pos_y*: gint + cursor_mark*: TGtkPropertyMark + cursor_char*: TGdkWChar + cursor_char_offset*: gchar + cursor_virtual_x*: gint + cursor_drawn_level*: gint + current_line*: PGList + tab_stops*: PGList + default_tab_width*: gint + current_font*: PGtkTextFont + timer*: gint + button*: guint + bg_gc*: PGdkGC + + PGtkTextClass* = ptr TGtkTextClass + TGtkTextClass* = object of TGtkOldEditableClass + set_scroll_adjustments*: proc (text: PGtkText, hadjustment: PGtkAdjustment, + vadjustment: PGtkAdjustment){.cdecl.} + + PGtkTextSearchFlags* = ptr TGtkTextSearchFlags + TGtkTextSearchFlags* = int32 + PGtkTextIter* = ptr TGtkTextIter + TGtkTextIter* {.final, pure.} = object + dummy1*: gpointer + dummy2*: gpointer + dummy3*: gint + dummy4*: gint + dummy5*: gint + dummy6*: gint + dummy7*: gint + dummy8*: gint + dummy9*: gpointer + dummy10*: gpointer + dummy11*: gint + dummy12*: gint + dummy13*: gint + dummy14*: gpointer + + TGtkTextCharPredicate* = proc (ch: gunichar, user_data: gpointer): gboolean{. + cdecl.} + PGtkTextTagClass* = ptr TGtkTextTagClass + PGtkTextAttributes* = ptr TGtkTextAttributes + PGtkTextTag* = ptr TGtkTextTag + PPGtkTextTag* = ptr PGtkTextTag + TGtkTextTag* = object of TGObject + table*: PGtkTextTagTable + name*: cstring + priority*: int32 + values*: PGtkTextAttributes + GtkTextTag_flag0*: int32 + + TGtkTextTagClass* = object of TGObjectClass + event*: proc (tag: PGtkTextTag, event_object: PGObject, event: PGdkEvent, + iter: PGtkTextIter): gboolean{.cdecl.} + gtk_reserved661: proc (){.cdecl.} + gtk_reserved662: proc (){.cdecl.} + gtk_reserved663: proc (){.cdecl.} + gtk_reserved664: proc (){.cdecl.} + + PGtkTextAppearance* = ptr TGtkTextAppearance + TGtkTextAppearance* {.final, pure.} = object + bg_color*: TGdkColor + fg_color*: TGdkColor + bg_stipple*: PGdkBitmap + fg_stipple*: PGdkBitmap + rise*: gint + padding1*: gpointer + flag0*: guint16 + + TGtkTextAttributes* {.final, pure.} = object + refcount*: guint + appearance*: TGtkTextAppearance + justification*: TGtkJustification + direction*: TGtkTextDirection + font*: PPangoFontDescription + font_scale*: gdouble + left_margin*: gint + indent*: gint + right_margin*: gint + pixels_above_lines*: gint + pixels_below_lines*: gint + pixels_inside_wrap*: gint + tabs*: PPangoTabArray + wrap_mode*: TGtkWrapMode + language*: PPangoLanguage + padding1*: gpointer + flag0*: guint16 + + TGtkTextTagTableForeach* = proc (tag: PGtkTextTag, data: gpointer){.cdecl.} + TGtkTextTagTable* = object of TGObject + hash*: PGHashTable + anonymous*: PGSList + anon_count*: gint + buffers*: PGSList + + PGtkTextTagTableClass* = ptr TGtkTextTagTableClass + TGtkTextTagTableClass* = object of TGObjectClass + tag_changed*: proc (table: PGtkTextTagTable, tag: PGtkTextTag, + size_changed: gboolean){.cdecl.} + tag_added*: proc (table: PGtkTextTagTable, tag: PGtkTextTag){.cdecl.} + tag_removed*: proc (table: PGtkTextTagTable, tag: PGtkTextTag){.cdecl.} + gtk_reserved1: proc (){.cdecl.} + gtk_reserved2: proc (){.cdecl.} + gtk_reserved3: proc (){.cdecl.} + gtk_reserved4: proc (){.cdecl.} + + PGtkTextMark* = ptr TGtkTextMark + TGtkTextMark* = object of TGObject + segment*: gpointer + + PGtkTextMarkClass* = ptr TGtkTextMarkClass + TGtkTextMarkClass* = object of TGObjectClass + gtk_reserved1: proc (){.cdecl.} + gtk_reserved2: proc (){.cdecl.} + gtk_reserved3: proc (){.cdecl.} + gtk_reserved4: proc (){.cdecl.} + + PGtkTextMarkBody* = ptr TGtkTextMarkBody + TGtkTextMarkBody* {.final, pure.} = object + obj*: PGtkTextMark + name*: cstring + tree*: PGtkTextBTree + line*: PGtkTextLine + flag0*: guint16 + + PGtkTextChildAnchor* = ptr TGtkTextChildAnchor + TGtkTextChildAnchor* = object of TGObject + segment*: gpointer + + PGtkTextChildAnchorClass* = ptr TGtkTextChildAnchorClass + TGtkTextChildAnchorClass* = object of TGObjectClass + gtk_reserved1: proc (){.cdecl.} + gtk_reserved2: proc (){.cdecl.} + gtk_reserved3: proc (){.cdecl.} + gtk_reserved4: proc (){.cdecl.} + + PGtkTextPixbuf* = ptr TGtkTextPixbuf + TGtkTextPixbuf* {.final, pure.} = object + pixbuf*: PGdkPixbuf + + PGtkTextChildBody* = ptr TGtkTextChildBody + TGtkTextChildBody* {.final, pure.} = object + obj*: PGtkTextChildAnchor + widgets*: PGSList + tree*: PGtkTextBTree + line*: PGtkTextLine + + PGtkTextLineSegment* = ptr TGtkTextLineSegment + PGtkTextLineSegmentClass* = ptr TGtkTextLineSegmentClass + PGtkTextTagInfo* = ptr TGtkTextTagInfo + TGtkTextTagInfo* {.final, pure.} = object + tag*: PGtkTextTag + tag_root*: PGtkTextBTreeNode + toggle_count*: gint + + PGtkTextToggleBody* = ptr TGtkTextToggleBody + TGtkTextToggleBody* {.final, pure.} = object + info*: PGtkTextTagInfo + inNodeCounts*: gboolean + + TGtkTextLineSegment* {.final, pure.} = object + `type`*: PGtkTextLineSegmentClass + next*: PGtkTextLineSegment + char_count*: int32 + byte_count*: int32 + body*: TGtkTextChildBody + + PGtkTextSegSplitFunc* = ptr TGtkTextSegSplitFunc + TGtkTextSegSplitFunc* = TGtkTextLineSegment + TGtkTextSegDeleteFunc* = proc (seg: PGtkTextLineSegment, line: PGtkTextLine, + tree_gone: gboolean): gboolean{.cdecl.} + PGtkTextSegCleanupFunc* = ptr TGtkTextSegCleanupFunc + TGtkTextSegCleanupFunc* = TGtkTextLineSegment + TGtkTextSegLineChangeFunc* = proc (seg: PGtkTextLineSegment, + line: PGtkTextLine){.cdecl.} + TGtkTextSegCheckFunc* = proc (seg: PGtkTextLineSegment, line: PGtkTextLine){. + cdecl.} + TGtkTextLineSegmentClass* {.final, pure.} = object + name*: cstring + leftGravity*: gboolean + splitFunc*: TGtkTextSegSplitFunc + deleteFunc*: TGtkTextSegDeleteFunc + cleanupFunc*: TGtkTextSegCleanupFunc + lineChangeFunc*: TGtkTextSegLineChangeFunc + checkFunc*: TGtkTextSegCheckFunc + + PGtkTextLineData* = ptr TGtkTextLineData + TGtkTextLineData* {.final, pure.} = object + view_id*: gpointer + next*: PGtkTextLineData + height*: gint + flag0*: int32 + + TGtkTextLine* {.final, pure.} = object + parent*: PGtkTextBTreeNode + next*: PGtkTextLine + segments*: PGtkTextLineSegment + views*: PGtkTextLineData + + PGtkTextLogAttrCache* = pointer + PGtkTextBuffer* = ptr TGtkTextBuffer + TGtkTextBuffer* = object of TGObject + tag_table*: PGtkTextTagTable + btree*: PGtkTextBTree + clipboard_contents_buffers*: PGSList + selection_clipboards*: PGSList + log_attr_cache*: PGtkTextLogAttrCache + user_action_count*: guint + GtkTextBuffer_flag0*: guint16 + + PGtkTextBufferClass* = ptr TGtkTextBufferClass + TGtkTextBufferClass* = object of TGObjectClass + insert_text*: proc (buffer: PGtkTextBuffer, pos: PGtkTextIter, text: cstring, + length: gint){.cdecl.} + insert_pixbuf*: proc (buffer: PGtkTextBuffer, pos: PGtkTextIter, + pixbuf: PGdkPixbuf){.cdecl.} + insert_child_anchor*: proc (buffer: PGtkTextBuffer, pos: PGtkTextIter, + anchor: PGtkTextChildAnchor){.cdecl.} + delete_range*: proc (buffer: PGtkTextBuffer, start: PGtkTextIter, + theEnd: PGtkTextIter){.cdecl.} + changed*: proc (buffer: PGtkTextBuffer){.cdecl.} + modified_changed*: proc (buffer: PGtkTextBuffer){.cdecl.} + mark_set*: proc (buffer: PGtkTextBuffer, location: PGtkTextIter, + mark: PGtkTextMark){.cdecl.} + mark_deleted*: proc (buffer: PGtkTextBuffer, mark: PGtkTextMark){.cdecl.} + apply_tag*: proc (buffer: PGtkTextBuffer, tag: PGtkTextTag, + start_char: PGtkTextIter, end_char: PGtkTextIter){.cdecl.} + remove_tag*: proc (buffer: PGtkTextBuffer, tag: PGtkTextTag, + start_char: PGtkTextIter, end_char: PGtkTextIter){.cdecl.} + begin_user_action*: proc (buffer: PGtkTextBuffer){.cdecl.} + end_user_action*: proc (buffer: PGtkTextBuffer){.cdecl.} + gtk_reserved1: proc (){.cdecl.} + gtk_reserved2: proc (){.cdecl.} + gtk_reserved3: proc (){.cdecl.} + gtk_reserved4: proc (){.cdecl.} + gtk_reserved5: proc (){.cdecl.} + gtk_reserved6: proc (){.cdecl.} + + PGtkTextLineDisplay* = ptr TGtkTextLineDisplay + PGtkTextLayout* = ptr TGtkTextLayout + TGtkTextLayout* = object of TGObject + screen_width*: gint + width*: gint + height*: gint + buffer*: PGtkTextBuffer + default_style*: PGtkTextAttributes + ltr_context*: PPangoContext + rtl_context*: PPangoContext + one_style_cache*: PGtkTextAttributes + one_display_cache*: PGtkTextLineDisplay + wrap_loop_count*: gint + GtkTextLayout_flag0*: guint16 + preedit_string*: cstring + preedit_attrs*: PPangoAttrList + preedit_len*: gint + preedit_cursor*: gint + + PGtkTextLayoutClass* = ptr TGtkTextLayoutClass + TGtkTextLayoutClass* = object of TGObjectClass + invalidated*: proc (layout: PGtkTextLayout){.cdecl.} + changed*: proc (layout: PGtkTextLayout, y: gint, old_height: gint, + new_height: gint){.cdecl.} + wrap*: proc (layout: PGtkTextLayout, line: PGtkTextLine, + line_data: PGtkTextLineData): PGtkTextLineData{.cdecl.} + get_log_attrs*: proc (layout: PGtkTextLayout, line: PGtkTextLine, + attrs: var PPangoLogAttr, n_attrs: Pgint){.cdecl.} + invalidate*: proc (layout: PGtkTextLayout, start: PGtkTextIter, + theEnd: PGtkTextIter){.cdecl.} + free_line_data*: proc (layout: PGtkTextLayout, line: PGtkTextLine, + line_data: PGtkTextLineData){.cdecl.} + allocate_child*: proc (layout: PGtkTextLayout, child: PGtkWidget, x: gint, + y: gint){.cdecl.} + gtk_reserved1: proc (){.cdecl.} + gtk_reserved2: proc (){.cdecl.} + gtk_reserved3: proc (){.cdecl.} + gtk_reserved4: proc (){.cdecl.} + + PGtkTextAttrAppearance* = ptr TGtkTextAttrAppearance + TGtkTextAttrAppearance* {.final, pure.} = object + attr*: TPangoAttribute + appearance*: TGtkTextAppearance + + PGtkTextCursorDisplay* = ptr TGtkTextCursorDisplay + TGtkTextCursorDisplay* {.final, pure.} = object + x*: gint + y*: gint + height*: gint + flag0*: guint16 + + TGtkTextLineDisplay* {.final, pure.} = object + layout*: PPangoLayout + cursors*: PGSList + shaped_objects*: PGSList + direction*: TGtkTextDirection + width*: gint + total_width*: gint + height*: gint + x_offset*: gint + left_margin*: gint + right_margin*: gint + top_margin*: gint + bottom_margin*: gint + insert_index*: gint + size_only*: gboolean + line*: PGtkTextLine + + PGtkTextWindow* = pointer + PGtkTextPendingScroll* = pointer + PGtkTextWindowType* = ptr TGtkTextWindowType + TGtkTextWindowType* = enum + GTK_TEXT_WINDOW_PRIVATE, GTK_TEXT_WINDOW_WIDGET, GTK_TEXT_WINDOW_TEXT, + GTK_TEXT_WINDOW_LEFT, GTK_TEXT_WINDOW_RIGHT, GTK_TEXT_WINDOW_TOP, + GTK_TEXT_WINDOW_BOTTOM + PGtkTextView* = ptr TGtkTextView + TGtkTextView* = object of TGtkContainer + layout*: PGtkTextLayout + buffer*: PGtkTextBuffer + selection_drag_handler*: guint + scroll_timeout*: guint + pixels_above_lines*: gint + pixels_below_lines*: gint + pixels_inside_wrap*: gint + wrap_mode*: TGtkWrapMode + justify*: TGtkJustification + left_margin*: gint + right_margin*: gint + indent*: gint + tabs*: PPangoTabArray + GtkTextView_flag0*: guint16 + text_window*: PGtkTextWindow + left_window*: PGtkTextWindow + right_window*: PGtkTextWindow + top_window*: PGtkTextWindow + bottom_window*: PGtkTextWindow + hadjustment*: PGtkAdjustment + vadjustment*: PGtkAdjustment + xoffset*: gint + yoffset*: gint + width*: gint + height*: gint + virtual_cursor_x*: gint + virtual_cursor_y*: gint + first_para_mark*: PGtkTextMark + first_para_pixels*: gint + dnd_mark*: PGtkTextMark + blink_timeout*: guint + first_validate_idle*: guint + incremental_validate_idle*: guint + im_context*: PGtkIMContext + popup_menu*: PGtkWidget + drag_start_x*: gint + drag_start_y*: gint + children*: PGSList + pending_scroll*: PGtkTextPendingScroll + pending_place_cursor_button*: gint + + PGtkTextViewClass* = ptr TGtkTextViewClass + TGtkTextViewClass* = object of TGtkContainerClass + set_scroll_adjustments*: proc (text_view: PGtkTextView, + hadjustment: PGtkAdjustment, + vadjustment: PGtkAdjustment){.cdecl.} + populate_popup*: proc (text_view: PGtkTextView, menu: PGtkMenu){.cdecl.} + move_cursor*: proc (text_view: PGtkTextView, step: TGtkMovementStep, + count: gint, extend_selection: gboolean){.cdecl.} + page_horizontally*: proc (text_view: PGtkTextView, count: gint, + extend_selection: gboolean){.cdecl.} + set_anchor*: proc (text_view: PGtkTextView){.cdecl.} + insert_at_cursor*: proc (text_view: PGtkTextView, str: cstring){.cdecl.} + delete_from_cursor*: proc (text_view: PGtkTextView, thetype: TGtkDeleteType, + count: gint){.cdecl.} + cut_clipboard*: proc (text_view: PGtkTextView){.cdecl.} + copy_clipboard*: proc (text_view: PGtkTextView){.cdecl.} + paste_clipboard*: proc (text_view: PGtkTextView){.cdecl.} + toggle_overwrite*: proc (text_view: PGtkTextView){.cdecl.} + move_focus*: proc (text_view: PGtkTextView, direction: TGtkDirectionType){. + cdecl.} + gtk_reserved711: proc (){.cdecl.} + gtk_reserved712: proc (){.cdecl.} + gtk_reserved713: proc (){.cdecl.} + gtk_reserved714: proc (){.cdecl.} + gtk_reserved715: proc (){.cdecl.} + gtk_reserved716: proc (){.cdecl.} + gtk_reserved717: proc (){.cdecl.} + gtk_reserved718: proc (){.cdecl.} + + PGtkTipsQuery* = ptr TGtkTipsQuery + TGtkTipsQuery* = object of TGtkLabel + GtkTipsQuery_flag0*: guint16 + label_inactive*: cstring + label_no_tip*: cstring + caller*: PGtkWidget + last_crossed*: PGtkWidget + query_cursor*: PGdkCursor + + PGtkTipsQueryClass* = ptr TGtkTipsQueryClass + TGtkTipsQueryClass* = object of TGtkLabelClass + start_query*: proc (tips_query: PGtkTipsQuery){.cdecl.} + stop_query*: proc (tips_query: PGtkTipsQuery){.cdecl.} + widget_entered*: proc (tips_query: PGtkTipsQuery, widget: PGtkWidget, + tip_text: cstring, tip_private: cstring){.cdecl.} + widget_selected*: proc (tips_query: PGtkTipsQuery, widget: PGtkWidget, + tip_text: cstring, tip_private: cstring, + event: PGdkEventButton): gint{.cdecl.} + gtk_reserved721: proc (){.cdecl.} + gtk_reserved722: proc (){.cdecl.} + gtk_reserved723: proc (){.cdecl.} + gtk_reserved724: proc (){.cdecl.} + + PGtkTooltips* = ptr TGtkTooltips + PGtkTooltipsData* = ptr TGtkTooltipsData + TGtkTooltipsData* {.final, pure.} = object + tooltips*: PGtkTooltips + widget*: PGtkWidget + tip_text*: cstring + tip_private*: cstring + + TGtkTooltips* = object of TGtkObject + tip_window*: PGtkWidget + tip_label*: PGtkWidget + active_tips_data*: PGtkTooltipsData + tips_data_list*: PGList + GtkTooltips_flag0*: int32 + flag1*: guint16 + timer_tag*: gint + last_popdown*: TGTimeVal + + PGtkTooltipsClass* = ptr TGtkTooltipsClass + TGtkTooltipsClass* = object of TGtkObjectClass + gtk_reserved1: proc (){.cdecl.} + gtk_reserved2: proc (){.cdecl.} + gtk_reserved3: proc (){.cdecl.} + gtk_reserved4: proc (){.cdecl.} + + PGtkToolbarChildType* = ptr TGtkToolbarChildType + TGtkToolbarChildType* = enum + GTK_TOOLBAR_CHILD_SPACE, GTK_TOOLBAR_CHILD_BUTTON, + GTK_TOOLBAR_CHILD_TOGGLEBUTTON, GTK_TOOLBAR_CHILD_RADIOBUTTON, + GTK_TOOLBAR_CHILD_WIDGET + PGtkToolbarSpaceStyle* = ptr TGtkToolbarSpaceStyle + TGtkToolbarSpaceStyle* = enum + GTK_TOOLBAR_SPACE_EMPTY, GTK_TOOLBAR_SPACE_LINE + PGtkToolbarChild* = ptr TGtkToolbarChild + TGtkToolbarChild* {.final, pure.} = object + `type`*: TGtkToolbarChildType + widget*: PGtkWidget + icon*: PGtkWidget + label*: PGtkWidget + + PGtkToolbar* = ptr TGtkToolbar + TGtkToolbar* = object of TGtkContainer + num_children*: gint + children*: PGList + orientation*: TGtkOrientation + GtkToolbar_style*: TGtkToolbarStyle + icon_size*: TGtkIconSize + tooltips*: PGtkTooltips + button_maxw*: gint + button_maxh*: gint + style_set_connection*: guint + icon_size_connection*: guint + GtkToolbar_flag0*: guint16 + + PGtkToolbarClass* = ptr TGtkToolbarClass + TGtkToolbarClass* = object of TGtkContainerClass + orientation_changed*: proc (toolbar: PGtkToolbar, + orientation: TGtkOrientation){.cdecl.} + style_changed*: proc (toolbar: PGtkToolbar, style: TGtkToolbarStyle){.cdecl.} + gtk_reserved731: proc (){.cdecl.} + gtk_reserved732: proc (){.cdecl.} + gtk_reserved733: proc (){.cdecl.} + gtk_reserved734: proc (){.cdecl.} + + PGtkTreeViewMode* = ptr TGtkTreeViewMode + TGtkTreeViewMode* = enum + GTK_TREE_VIEW_LINE, GTK_TREE_VIEW_ITEM + PGtkTree* = ptr TGtkTree + TGtkTree* = object of TGtkContainer + children*: PGList + root_tree*: PGtkTree + tree_owner*: PGtkWidget + selection*: PGList + level*: guint + indent_value*: guint + current_indent*: guint + GtkTree_flag0*: guint16 + + PGtkTreeClass* = ptr TGtkTreeClass + TGtkTreeClass* = object of TGtkContainerClass + selection_changed*: proc (tree: PGtkTree){.cdecl.} + select_child*: proc (tree: PGtkTree, child: PGtkWidget){.cdecl.} + unselect_child*: proc (tree: PGtkTree, child: PGtkWidget){.cdecl.} + + PGtkTreeDragSource* = pointer + PGtkTreeDragDest* = pointer + PGtkTreeDragSourceIface* = ptr TGtkTreeDragSourceIface + TGtkTreeDragSourceIface* = object of TGTypeInterface + row_draggable*: proc (drag_source: PGtkTreeDragSource, path: PGtkTreePath): gboolean{. + cdecl.} + drag_data_get*: proc (drag_source: PGtkTreeDragSource, path: PGtkTreePath, + selection_data: PGtkSelectionData): gboolean{.cdecl.} + drag_data_delete*: proc (drag_source: PGtkTreeDragSource, path: PGtkTreePath): gboolean{. + cdecl.} + + PGtkTreeDragDestIface* = ptr TGtkTreeDragDestIface + TGtkTreeDragDestIface* = object of TGTypeInterface + drag_data_received*: proc (drag_dest: PGtkTreeDragDest, dest: PGtkTreePath, + selection_data: PGtkSelectionData): gboolean{. + cdecl.} + row_drop_possible*: proc (drag_dest: PGtkTreeDragDest, + dest_path: PGtkTreePath, + selection_data: PGtkSelectionData): gboolean{. + cdecl.} + + PGtkTreeItem* = ptr TGtkTreeItem + TGtkTreeItem* = object of TGtkItem + subtree*: PGtkWidget + pixmaps_box*: PGtkWidget + plus_pix_widget*: PGtkWidget + minus_pix_widget*: PGtkWidget + pixmaps*: PGList + GtkTreeItem_flag0*: guint16 + + PGtkTreeItemClass* = ptr TGtkTreeItemClass + TGtkTreeItemClass* = object of TGtkItemClass + expand*: proc (tree_item: PGtkTreeItem){.cdecl.} + collapse*: proc (tree_item: PGtkTreeItem){.cdecl.} + + PGtkTreeSelection* = ptr TGtkTreeSelection + TGtkTreeSelectionFunc* = proc (selection: PGtkTreeSelection, + model: PGtkTreeModel, path: PGtkTreePath, + path_currently_selected: gboolean, + data: gpointer): gboolean{.cdecl.} + TGtkTreeSelectionForeachFunc* = proc (model: PGtkTreeModel, + path: PGtkTreePath, iter: PGtkTreeIter, + data: gpointer){.cdecl.} + TGtkTreeSelection* = object of TGObject + tree_view*: PGtkTreeView + thetype*: TGtkSelectionMode + user_func*: TGtkTreeSelectionFunc + user_data*: gpointer + destroy*: TGtkDestroyNotify + + PGtkTreeSelectionClass* = ptr TGtkTreeSelectionClass + TGtkTreeSelectionClass* = object of TGObjectClass + changed*: proc (selection: PGtkTreeSelection){.cdecl.} + gtk_reserved741: proc (){.cdecl.} + gtk_reserved742: proc (){.cdecl.} + gtk_reserved743: proc (){.cdecl.} + gtk_reserved744: proc (){.cdecl.} + + PGtkTreeStore* = ptr TGtkTreeStore + TGtkTreeStore* = object of TGObject + stamp*: gint + root*: gpointer + last*: gpointer + n_columns*: gint + sort_column_id*: gint + sort_list*: PGList + order*: TGtkSortType + column_headers*: PGType + default_sort_func*: TGtkTreeIterCompareFunc + default_sort_data*: gpointer + default_sort_destroy*: TGtkDestroyNotify + GtkTreeStore_flag0*: guint16 + + PGtkTreeStoreClass* = ptr TGtkTreeStoreClass + TGtkTreeStoreClass* = object of TGObjectClass + gtk_reserved751: proc (){.cdecl.} + gtk_reserved752: proc (){.cdecl.} + gtk_reserved753: proc (){.cdecl.} + gtk_reserved754: proc (){.cdecl.} + + PGtkTreeViewColumnSizing* = ptr TGtkTreeViewColumnSizing + TGtkTreeViewColumnSizing* = enum + GTK_TREE_VIEW_COLUMN_GROW_ONLY, GTK_TREE_VIEW_COLUMN_AUTOSIZE, + GTK_TREE_VIEW_COLUMN_FIXED + TGtkTreeCellDataFunc* = proc (tree_column: PGtkTreeViewColumn, + cell: PGtkCellRenderer, + tree_model: PGtkTreeModel, iter: PGtkTreeIter, + data: gpointer){.cdecl.} + TGtkTreeViewColumn* = object of TGtkObject + tree_view*: PGtkWidget + button*: PGtkWidget + child*: PGtkWidget + arrow*: PGtkWidget + alignment*: PGtkWidget + window*: PGdkWindow + editable_widget*: PGtkCellEditable + xalign*: gfloat + property_changed_signal*: guint + spacing*: gint + column_type*: TGtkTreeViewColumnSizing + requested_width*: gint + button_request*: gint + resized_width*: gint + width*: gint + fixed_width*: gint + min_width*: gint + max_width*: gint + drag_x*: gint + drag_y*: gint + title*: cstring + cell_list*: PGList + sort_clicked_signal*: guint + sort_column_changed_signal*: guint + sort_column_id*: gint + sort_order*: TGtkSortType + GtkTreeViewColumn_flag0*: guint16 + + PGtkTreeViewColumnClass* = ptr TGtkTreeViewColumnClass + TGtkTreeViewColumnClass* = object of TGtkObjectClass + clicked*: proc (tree_column: PGtkTreeViewColumn){.cdecl.} + gtk_reserved751: proc (){.cdecl.} + gtk_reserved752: proc (){.cdecl.} + gtk_reserved753: proc (){.cdecl.} + gtk_reserved754: proc (){.cdecl.} + + PGtkRBNodeColor* = ptr TGtkRBNodeColor + TGtkRBNodeColor* = int32 + PGtkRBTree* = ptr TGtkRBTree + PGtkRBNode* = ptr TGtkRBNode + TGtkRBTreeTraverseFunc* = proc (tree: PGtkRBTree, node: PGtkRBNode, + data: gpointer){.cdecl.} + TGtkRBTree* {.final, pure.} = object + root*: PGtkRBNode + `nil`*: PGtkRBNode + parent_tree*: PGtkRBTree + parent_node*: PGtkRBNode + + TGtkRBNode* {.final, pure.} = object + flag0*: guint16 + left*: PGtkRBNode + right*: PGtkRBNode + parent*: PGtkRBNode + count*: gint + offset*: gint + children*: PGtkRBTree + + PGtkTreeRowReference* = pointer + PGtkTreeViewFlags* = ptr TGtkTreeViewFlags + TGtkTreeViewFlags* = int32 + TGtkTreeViewSearchDialogPositionFunc* = proc (tree_view: PGtkTreeView, + search_dialog: PGtkWidget){.cdecl.} + PGtkTreeViewColumnReorder* = ptr TGtkTreeViewColumnReorder + TGtkTreeViewColumnReorder* {.final, pure.} = object + left_align*: gint + right_align*: gint + left_column*: PGtkTreeViewColumn + right_column*: PGtkTreeViewColumn + + PGtkTreeViewPrivate* = ptr TGtkTreeViewPrivate + TGtkTreeViewPrivate* {.final, pure.} = object + model*: PGtkTreeModel + flags*: guint + tree*: PGtkRBTree + button_pressed_node*: PGtkRBNode + button_pressed_tree*: PGtkRBTree + children*: PGList + width*: gint + height*: gint + expander_size*: gint + hadjustment*: PGtkAdjustment + vadjustment*: PGtkAdjustment + bin_window*: PGdkWindow + header_window*: PGdkWindow + drag_window*: PGdkWindow + drag_highlight_window*: PGdkWindow + drag_column*: PGtkTreeViewColumn + last_button_press*: PGtkTreeRowReference + last_button_press_2*: PGtkTreeRowReference + top_row*: PGtkTreeRowReference + top_row_dy*: gint + dy*: gint + drag_column_x*: gint + expander_column*: PGtkTreeViewColumn + edited_column*: PGtkTreeViewColumn + presize_handler_timer*: guint + validate_rows_timer*: guint + scroll_sync_timer*: guint + focus_column*: PGtkTreeViewColumn + anchor*: PGtkTreeRowReference + cursor*: PGtkTreeRowReference + drag_pos*: gint + x_drag*: gint + prelight_node*: PGtkRBNode + prelight_tree*: PGtkRBTree + expanded_collapsed_node*: PGtkRBNode + expanded_collapsed_tree*: PGtkRBTree + expand_collapse_timeout*: guint + selection*: PGtkTreeSelection + n_columns*: gint + columns*: PGList + header_height*: gint + column_drop_func*: TGtkTreeViewColumnDropFunc + column_drop_func_data*: gpointer + column_drop_func_data_destroy*: TGtkDestroyNotify + column_drag_info*: PGList + cur_reorder*: PGtkTreeViewColumnReorder + destroy_count_func*: TGtkTreeDestroyCountFunc + destroy_count_data*: gpointer + destroy_count_destroy*: TGtkDestroyNotify + scroll_timeout*: guint + drag_dest_row*: PGtkTreeRowReference + drag_dest_pos*: TGtkTreeViewDropPosition + open_dest_timeout*: guint + pressed_button*: gint + press_start_x*: gint + press_start_y*: gint + scroll_to_path*: PGtkTreeRowReference + scroll_to_column*: PGtkTreeViewColumn + scroll_to_row_align*: gfloat + scroll_to_col_align*: gfloat + flag0*: guint16 + search_column*: gint + search_dialog_position_func*: TGtkTreeViewSearchDialogPositionFunc + search_equal_func*: TGtkTreeViewSearchEqualFunc + search_user_data*: gpointer + search_destroy*: TGtkDestroyNotify + + TGtkTreeView* = object of TGtkContainer + priv*: PGtkTreeViewPrivate + + PGtkTreeViewClass* = ptr TGtkTreeViewClass + TGtkTreeViewClass* = object of TGtkContainerClass + set_scroll_adjustments*: proc (tree_view: PGtkTreeView, + hadjustment: PGtkAdjustment, + vadjustment: PGtkAdjustment){.cdecl.} + row_activated*: proc (tree_view: PGtkTreeView, path: PGtkTreePath, + column: PGtkTreeViewColumn){.cdecl.} + test_expand_row*: proc (tree_view: PGtkTreeView, iter: PGtkTreeIter, + path: PGtkTreePath): gboolean{.cdecl.} + test_collapse_row*: proc (tree_view: PGtkTreeView, iter: PGtkTreeIter, + path: PGtkTreePath): gboolean{.cdecl.} + row_expanded*: proc (tree_view: PGtkTreeView, iter: PGtkTreeIter, + path: PGtkTreePath){.cdecl.} + row_collapsed*: proc (tree_view: PGtkTreeView, iter: PGtkTreeIter, + path: PGtkTreePath){.cdecl.} + columns_changed*: proc (tree_view: PGtkTreeView){.cdecl.} + cursor_changed*: proc (tree_view: PGtkTreeView){.cdecl.} + move_cursor*: proc (tree_view: PGtkTreeView, step: TGtkMovementStep, + count: gint): gboolean{.cdecl.} + select_all*: proc (tree_view: PGtkTreeView){.cdecl.} + unselect_all*: proc (tree_view: PGtkTreeView){.cdecl.} + select_cursor_row*: proc (tree_view: PGtkTreeView, start_editing: gboolean){. + cdecl.} + toggle_cursor_row*: proc (tree_view: PGtkTreeView){.cdecl.} + expand_collapse_cursor_row*: proc (tree_view: PGtkTreeView, + logical: gboolean, expand: gboolean, + open_all: gboolean){.cdecl.} + select_cursor_parent*: proc (tree_view: PGtkTreeView){.cdecl.} + start_interactive_search*: proc (tree_view: PGtkTreeView){.cdecl.} + gtk_reserved760: proc (){.cdecl.} + gtk_reserved761: proc (){.cdecl.} + gtk_reserved762: proc (){.cdecl.} + gtk_reserved763: proc (){.cdecl.} + gtk_reserved764: proc (){.cdecl.} + + PGtkVButtonBox* = ptr TGtkVButtonBox + TGtkVButtonBox* = object of TGtkButtonBox + + PGtkVButtonBoxClass* = ptr TGtkVButtonBoxClass + TGtkVButtonBoxClass* = object of TGtkButtonBoxClass + + PGtkViewport* = ptr TGtkViewport + TGtkViewport* = object of TGtkBin + shadow_type*: TGtkShadowType + view_window*: PGdkWindow + bin_window*: PGdkWindow + hadjustment*: PGtkAdjustment + vadjustment*: PGtkAdjustment + + PGtkViewportClass* = ptr TGtkViewportClass + TGtkViewportClass* = object of TGtkBinClass + set_scroll_adjustments*: proc (viewport: PGtkViewport, + hadjustment: PGtkAdjustment, + vadjustment: PGtkAdjustment){.cdecl.} + + PGtkVPaned* = ptr TGtkVPaned + TGtkVPaned* = object of TGtkPaned + + PGtkVPanedClass* = ptr TGtkVPanedClass + TGtkVPanedClass* = object of TGtkPanedClass + + PGtkVRuler* = ptr TGtkVRuler + TGtkVRuler* = object of TGtkRuler + + PGtkVRulerClass* = ptr TGtkVRulerClass + TGtkVRulerClass* = object of TGtkRulerClass + + PGtkVScale* = ptr TGtkVScale + TGtkVScale* = object of TGtkScale + + PGtkVScaleClass* = ptr TGtkVScaleClass + TGtkVScaleClass* = object of TGtkScaleClass + + PGtkVScrollbar* = ptr TGtkVScrollbar + TGtkVScrollbar* = object of TGtkScrollbar + + PGtkVScrollbarClass* = ptr TGtkVScrollbarClass + TGtkVScrollbarClass* = object of TGtkScrollbarClass + + PGtkVSeparator* = ptr TGtkVSeparator + TGtkVSeparator* = object of TGtkSeparator + + PGtkVSeparatorClass* = ptr TGtkVSeparatorClass + TGtkVSeparatorClass* = object of TGtkSeparatorClass + + +const + GTK_IN_DESTRUCTION* = 1 shl 0 + GTK_FLOATING* = 1 shl 1 + GTK_RESERVED_1* = 1 shl 2 + GTK_RESERVED_2* = 1 shl 3 + GTK_ARG_READABLE* = G_PARAM_READABLE + GTK_ARG_WRITABLE* = G_PARAM_WRITABLE + GTK_ARG_CONSTRUCT* = G_PARAM_CONSTRUCT + GTK_ARG_CONSTRUCT_ONLY* = G_PARAM_CONSTRUCT_ONLY + GTK_ARG_CHILD_ARG* = 1 shl 4 + +proc GTK_TYPE_OBJECT*(): GType +proc GTK_OBJECT*(anObject: pointer): PGtkObject +proc GTK_OBJECT_CLASS*(klass: pointer): PGtkObjectClass +proc GTK_IS_OBJECT*(anObject: pointer): bool +proc GTK_IS_OBJECT_CLASS*(klass: pointer): bool +proc GTK_OBJECT_GET_CLASS*(anObject: pointer): PGtkObjectClass +proc GTK_OBJECT_TYPE*(anObject: pointer): GType +proc GTK_OBJECT_TYPE_NAME*(anObject: pointer): cstring +proc GTK_OBJECT_FLAGS*(obj: pointer): guint32 +proc GTK_OBJECT_FLOATING*(obj: pointer): gboolean +proc GTK_OBJECT_SET_FLAGS*(obj: pointer, flag: guint32) +proc GTK_OBJECT_UNSET_FLAGS*(obj: pointer, flag: guint32) +proc gtk_object_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_object_get_type".} +proc gtk_object_new*(thetype: TGtkType, first_property_name: cstring): PGtkObject{. + cdecl, varargs, dynlib: gtklib, importc: "gtk_object_new".} +proc gtk_object_sink*(anObject: PGtkObject){.cdecl, dynlib: gtklib, + importc: "gtk_object_sink".} +proc gtk_object_destroy*(anObject: PGtkObject){.cdecl, dynlib: gtklib, + importc: "gtk_object_destroy".} +const + GTK_TYPE_INVALID* = G_TYPE_INVALID + GTK_TYPE_NONE* = G_TYPE_NONE + GTK_TYPE_ENUM* = G_TYPE_ENUM + GTK_TYPE_FLAGS* = G_TYPE_FLAGS + GTK_TYPE_CHAR* = G_TYPE_CHAR + GTK_TYPE_UCHAR* = G_TYPE_UCHAR + GTK_TYPE_BOOL* = G_TYPE_BOOLEAN + GTK_TYPE_INT* = G_TYPE_INT + GTK_TYPE_UINT* = G_TYPE_UINT + GTK_TYPE_LONG* = G_TYPE_LONG + GTK_TYPE_ULONG* = G_TYPE_ULONG + GTK_TYPE_FLOAT* = G_TYPE_FLOAT + GTK_TYPE_DOUBLE* = G_TYPE_DOUBLE + GTK_TYPE_STRING* = G_TYPE_STRING + GTK_TYPE_BOXED* = G_TYPE_BOXED + GTK_TYPE_POINTER* = G_TYPE_POINTER + +proc GTK_TYPE_IDENTIFIER*(): GType +proc gtk_identifier_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_identifier_get_type".} +proc GTK_SIGNAL_FUNC*(f: pointer): TGtkSignalFunc +proc gtk_type_class*(thetype: TGtkType): gpointer{.cdecl, dynlib: gtklib, + importc: "gtk_type_class".} +const + GTK_TOPLEVEL* = 1 shl 4 + GTK_NO_WINDOW* = 1 shl 5 + GTK_REALIZED* = 1 shl 6 + GTK_MAPPED* = 1 shl 7 + GTK_VISIBLE* = 1 shl 8 + GTK_SENSITIVE* = 1 shl 9 + GTK_PARENT_SENSITIVE* = 1 shl 10 + GTK_CAN_FOCUS* = 1 shl 11 + GTK_HAS_FOCUS* = 1 shl 12 + GTK_CAN_DEFAULT* = 1 shl 13 + GTK_HAS_DEFAULT* = 1 shl 14 + GTK_HAS_GRAB* = 1 shl 15 + GTK_RC_STYLE* = 1 shl 16 + GTK_COMPOSITE_CHILD* = 1 shl 17 + GTK_NO_REPARENT* = 1 shl 18 + GTK_APP_PAINTABLE* = 1 shl 19 + GTK_RECEIVES_DEFAULT* = 1 shl 20 + GTK_DOUBLE_BUFFERED* = 1 shl 21 + +const + bm_TGtkWidgetAuxInfo_x_set* = 0x00000001'i16 + bp_TGtkWidgetAuxInfo_x_set* = 0'i16 + bm_TGtkWidgetAuxInfo_y_set* = 0x00000002'i16 + bp_TGtkWidgetAuxInfo_y_set* = 1'i16 + +proc GTK_TYPE_WIDGET*(): GType +proc GTK_WIDGET*(widget: pointer): PGtkWidget +proc GTK_WIDGET_CLASS*(klass: pointer): PGtkWidgetClass +proc GTK_IS_WIDGET*(widget: pointer): bool +proc GTK_IS_WIDGET_CLASS*(klass: pointer): bool +proc GTK_WIDGET_GET_CLASS*(obj: pointer): PGtkWidgetClass +proc GTK_WIDGET_TYPE*(wid: pointer): GType +proc GTK_WIDGET_STATE*(wid: pointer): int32 +proc GTK_WIDGET_SAVED_STATE*(wid: pointer): int32 +proc GTK_WIDGET_FLAGS*(wid: pointer): guint32 +proc GTK_WIDGET_TOPLEVEL*(wid: pointer): gboolean +proc GTK_WIDGET_NO_WINDOW*(wid: pointer): gboolean +proc GTK_WIDGET_REALIZED*(wid: pointer): gboolean +proc GTK_WIDGET_MAPPED*(wid: pointer): gboolean +proc GTK_WIDGET_VISIBLE*(wid: pointer): gboolean +proc GTK_WIDGET_DRAWABLE*(wid: pointer): gboolean +proc GTK_WIDGET_SENSITIVE*(wid: pointer): gboolean +proc GTK_WIDGET_PARENT_SENSITIVE*(wid: pointer): gboolean +proc GTK_WIDGET_IS_SENSITIVE*(wid: pointer): gboolean +proc GTK_WIDGET_CAN_FOCUS*(wid: pointer): gboolean +proc GTK_WIDGET_HAS_FOCUS*(wid: pointer): gboolean +proc GTK_WIDGET_CAN_DEFAULT*(wid: pointer): gboolean +proc GTK_WIDGET_HAS_DEFAULT*(wid: pointer): gboolean +proc GTK_WIDGET_HAS_GRAB*(wid: pointer): gboolean +proc GTK_WIDGET_RC_STYLE*(wid: pointer): gboolean +proc GTK_WIDGET_COMPOSITE_CHILD*(wid: pointer): gboolean +proc GTK_WIDGET_APP_PAINTABLE*(wid: pointer): gboolean +proc GTK_WIDGET_RECEIVES_DEFAULT*(wid: pointer): gboolean +proc GTK_WIDGET_DOUBLE_BUFFERED*(wid: pointer): gboolean +proc GTK_WIDGET_SET_FLAGS*(wid: PGtkWidget, flags: TGtkWidgetFlags): TGtkWidgetFlags +proc GTK_WIDGET_UNSET_FLAGS*(wid: PGtkWidget, flags: TGtkWidgetFlags): TGtkWidgetFlags +proc GTK_TYPE_REQUISITION*(): GType +proc x_set*(a: var TGtkWidgetAuxInfo): guint +proc set_x_set*(a: var TGtkWidgetAuxInfo, x_set: guint) +proc y_set*(a: var TGtkWidgetAuxInfo): guint +proc set_y_set*(a: var TGtkWidgetAuxInfo, y_set: guint) +proc gtk_widget_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_widget_get_type".} +proc gtk_widget_ref*(widget: PGtkWidget): PGtkWidget{.cdecl, dynlib: gtklib, + importc: "gtk_widget_ref".} +proc gtk_widget_unref*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_unref".} +proc gtk_widget_destroy*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_destroy".} +proc gtk_widget_destroyed*(widget: PGtkWidget, r: var PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_widget_destroyed".} +proc gtk_widget_unparent*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_unparent".} +proc gtk_widget_show*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_show".} +proc gtk_widget_show_now*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_show_now".} +proc gtk_widget_hide*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_hide".} +proc gtk_widget_show_all*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_show_all".} +proc gtk_widget_hide_all*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_hide_all".} +proc gtk_widget_map*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_map".} +proc gtk_widget_unmap*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_unmap".} +proc gtk_widget_realize*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_realize".} +proc gtk_widget_unrealize*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_unrealize".} +proc gtk_widget_queue_draw*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_queue_draw".} +proc gtk_widget_queue_draw_area*(widget: PGtkWidget, x: gint, y: gint, + width: gint, height: gint){.cdecl, + dynlib: gtklib, importc: "gtk_widget_queue_draw_area".} +proc gtk_widget_queue_resize*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_queue_resize".} +proc gtk_widget_size_request*(widget: PGtkWidget, requisition: PGtkRequisition){. + cdecl, dynlib: gtklib, importc: "gtk_widget_size_request".} +proc gtk_widget_size_allocate*(widget: PGtkWidget, allocation: PGtkAllocation){. + cdecl, dynlib: gtklib, importc: "gtk_widget_size_allocate".} +proc gtk_widget_get_child_requisition*(widget: PGtkWidget, + requisition: PGtkRequisition){.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_child_requisition".} +proc gtk_widget_add_accelerator*(widget: PGtkWidget, accel_signal: cstring, + accel_group: PGtkAccelGroup, accel_key: guint, + accel_mods: TGdkModifierType, + accel_flags: TGtkAccelFlags){.cdecl, + dynlib: gtklib, importc: "gtk_widget_add_accelerator".} +proc gtk_widget_remove_accelerator*(widget: PGtkWidget, + accel_group: PGtkAccelGroup, + accel_key: guint, + accel_mods: TGdkModifierType): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_widget_remove_accelerator".} +proc gtk_widget_set_accel_path*(widget: PGtkWidget, accel_path: cstring, + accel_group: PGtkAccelGroup){.cdecl, + dynlib: gtklib, importc: "gtk_widget_set_accel_path".} +proc gtk_widget_get_accel_path*(widget: PGtkWidget, locked: Pgboolean): cstring{. + cdecl, dynlib: gtklib, importc: "_gtk_widget_get_accel_path".} +proc gtk_widget_list_accel_closures*(widget: PGtkWidget): PGList{.cdecl, + dynlib: gtklib, importc: "gtk_widget_list_accel_closures".} +proc gtk_widget_mnemonic_activate*(widget: PGtkWidget, group_cycling: gboolean): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_widget_mnemonic_activate".} +proc gtk_widget_event*(widget: PGtkWidget, event: PGdkEvent): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_widget_event".} +proc gtk_widget_send_expose*(widget: PGtkWidget, event: PGdkEvent): gint{.cdecl, + dynlib: gtklib, importc: "gtk_widget_send_expose".} +proc gtk_widget_activate*(widget: PGtkWidget): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_widget_activate".} +proc gtk_widget_set_scroll_adjustments*(widget: PGtkWidget, + hadjustment: PGtkAdjustment, + vadjustment: PGtkAdjustment): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_widget_set_scroll_adjustments".} +proc gtk_widget_reparent*(widget: PGtkWidget, new_parent: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_widget_reparent".} +proc gtk_widget_intersect*(widget: PGtkWidget, area: PGdkRectangle, + intersection: PGdkRectangle): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_widget_intersect".} +proc gtk_widget_region_intersect*(widget: PGtkWidget, region: PGdkRegion): PGdkRegion{. + cdecl, dynlib: gtklib, importc: "gtk_widget_region_intersect".} +proc gtk_widget_freeze_child_notify*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_freeze_child_notify".} +proc gtk_widget_child_notify*(widget: PGtkWidget, child_property: cstring){. + cdecl, dynlib: gtklib, importc: "gtk_widget_child_notify".} +proc gtk_widget_thaw_child_notify*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_thaw_child_notify".} +proc gtk_widget_is_focus*(widget: PGtkWidget): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_widget_is_focus".} +proc gtk_widget_grab_focus*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_grab_focus".} +proc gtk_widget_grab_default*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_grab_default".} +proc gtk_widget_set_name*(widget: PGtkWidget, name: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_widget_set_name".} +proc gtk_widget_get_name*(widget: PGtkWidget): cstring{.cdecl, dynlib: gtklib, + importc: "gtk_widget_get_name".} +proc gtk_widget_set_state*(widget: PGtkWidget, state: TGtkStateType){.cdecl, + dynlib: gtklib, importc: "gtk_widget_set_state".} +proc gtk_widget_set_sensitive*(widget: PGtkWidget, sensitive: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_widget_set_sensitive".} +proc gtk_widget_set_app_paintable*(widget: PGtkWidget, app_paintable: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_widget_set_app_paintable".} +proc gtk_widget_set_double_buffered*(widget: PGtkWidget, + double_buffered: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_widget_set_double_buffered".} +proc gtk_widget_set_redraw_on_allocate*(widget: PGtkWidget, + redraw_on_allocate: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_widget_set_redraw_on_allocate".} +proc gtk_widget_set_parent*(widget: PGtkWidget, parent: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_widget_set_parent".} +proc gtk_widget_set_parent_window*(widget: PGtkWidget, parent_window: PGdkWindow){. + cdecl, dynlib: gtklib, importc: "gtk_widget_set_parent_window".} +proc gtk_widget_set_child_visible*(widget: PGtkWidget, is_visible: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_widget_set_child_visible".} +proc gtk_widget_get_child_visible*(widget: PGtkWidget): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_child_visible".} +proc gtk_widget_get_parent*(widget: PGtkWidget): PGtkWidget{.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_parent".} +proc gtk_widget_get_parent_window*(widget: PGtkWidget): PGdkWindow{.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_parent_window".} +proc gtk_widget_child_focus*(widget: PGtkWidget, direction: TGtkDirectionType): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_widget_child_focus".} +proc gtk_widget_set_size_request*(widget: PGtkWidget, width: gint, height: gint){. + cdecl, dynlib: gtklib, importc: "gtk_widget_set_size_request".} +proc gtk_widget_get_size_request*(widget: PGtkWidget, width: Pgint, + height: Pgint){.cdecl, dynlib: gtklib, + importc: "gtk_widget_get_size_request".} +proc gtk_widget_set_events*(widget: PGtkWidget, events: gint){.cdecl, + dynlib: gtklib, importc: "gtk_widget_set_events".} +proc gtk_widget_add_events*(widget: PGtkWidget, events: gint){.cdecl, + dynlib: gtklib, importc: "gtk_widget_add_events".} +proc gtk_widget_set_extension_events*(widget: PGtkWidget, + mode: TGdkExtensionMode){.cdecl, + dynlib: gtklib, importc: "gtk_widget_set_extension_events".} +proc gtk_widget_get_extension_events*(widget: PGtkWidget): TGdkExtensionMode{. + cdecl, dynlib: gtklib, importc: "gtk_widget_get_extension_events".} +proc gtk_widget_get_toplevel*(widget: PGtkWidget): PGtkWidget{.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_toplevel".} +proc gtk_widget_get_ancestor*(widget: PGtkWidget, widget_type: TGtkType): PGtkWidget{. + cdecl, dynlib: gtklib, importc: "gtk_widget_get_ancestor".} +proc gtk_widget_get_colormap*(widget: PGtkWidget): PGdkColormap{.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_colormap".} +proc gtk_widget_get_visual*(widget: PGtkWidget): PGdkVisual{.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_visual".} +proc gtk_widget_get_screen*(widget: PGtkWidget): PGdkScreen{.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_screen".} +proc gtk_widget_has_screen*(widget: PGtkWidget): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_widget_has_screen".} +proc gtk_widget_get_display*(widget: PGtkWidget): PGdkDisplay{.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_display".} +proc gtk_widget_get_root_window*(widget: PGtkWidget): PGdkWindow{.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_root_window".} +proc gtk_widget_get_settings*(widget: PGtkWidget): PGtkSettings{.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_settings".} +proc gtk_widget_get_clipboard*(widget: PGtkWidget, selection: TGdkAtom): PGtkClipboard{. + cdecl, dynlib: gtklib, importc: "gtk_widget_get_clipboard".} +proc gtk_widget_get_accessible*(widget: PGtkWidget): PAtkObject{.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_accessible".} +proc gtk_widget_set_colormap*(widget: PGtkWidget, colormap: PGdkColormap){. + cdecl, dynlib: gtklib, importc: "gtk_widget_set_colormap".} +proc gtk_widget_get_events*(widget: PGtkWidget): gint{.cdecl, dynlib: gtklib, + importc: "gtk_widget_get_events".} +proc gtk_widget_get_pointer*(widget: PGtkWidget, x: Pgint, y: Pgint){.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_pointer".} +proc gtk_widget_is_ancestor*(widget: PGtkWidget, ancestor: PGtkWidget): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_widget_is_ancestor".} +proc gtk_widget_translate_coordinates*(src_widget: PGtkWidget, + dest_widget: PGtkWidget, src_x: gint, + src_y: gint, dest_x: Pgint, dest_y: Pgint): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_widget_translate_coordinates".} +proc gtk_widget_hide_on_delete*(widget: PGtkWidget): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_widget_hide_on_delete".} +proc gtk_widget_set_style*(widget: PGtkWidget, style: PGtkStyle){.cdecl, + dynlib: gtklib, importc: "gtk_widget_set_style".} +proc gtk_widget_ensure_style*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_ensure_style".} +proc gtk_widget_get_style*(widget: PGtkWidget): PGtkStyle{.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_style".} +proc gtk_widget_modify_style*(widget: PGtkWidget, style: PGtkRcStyle){.cdecl, + dynlib: gtklib, importc: "gtk_widget_modify_style".} +proc gtk_widget_get_modifier_style*(widget: PGtkWidget): PGtkRcStyle{.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_modifier_style".} +proc gtk_widget_modify_fg*(widget: PGtkWidget, state: TGtkStateType, + color: PGdkColor){.cdecl, dynlib: gtklib, + importc: "gtk_widget_modify_fg".} +proc gtk_widget_modify_bg*(widget: PGtkWidget, state: TGtkStateType, + color: PGdkColor){.cdecl, dynlib: gtklib, + importc: "gtk_widget_modify_bg".} +proc gtk_widget_modify_text*(widget: PGtkWidget, state: TGtkStateType, + color: PGdkColor){.cdecl, dynlib: gtklib, + importc: "gtk_widget_modify_text".} +proc gtk_widget_modify_base*(widget: PGtkWidget, state: TGtkStateType, + color: PGdkColor){.cdecl, dynlib: gtklib, + importc: "gtk_widget_modify_base".} +proc gtk_widget_modify_font*(widget: PGtkWidget, + font_desc: PPangoFontDescription){.cdecl, + dynlib: gtklib, importc: "gtk_widget_modify_font".} +proc gtk_widget_create_pango_context*(widget: PGtkWidget): PPangoContext{.cdecl, + dynlib: gtklib, importc: "gtk_widget_create_pango_context".} +proc gtk_widget_get_pango_context*(widget: PGtkWidget): PPangoContext{.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_pango_context".} +proc gtk_widget_create_pango_layout*(widget: PGtkWidget, text: cstring): PPangoLayout{. + cdecl, dynlib: gtklib, importc: "gtk_widget_create_pango_layout".} +proc gtk_widget_render_icon*(widget: PGtkWidget, stock_id: cstring, + size: TGtkIconSize, detail: cstring): PGdkPixbuf{. + cdecl, dynlib: gtklib, importc: "gtk_widget_render_icon".} +proc gtk_widget_set_composite_name*(widget: PGtkWidget, name: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_widget_set_composite_name".} +proc gtk_widget_get_composite_name*(widget: PGtkWidget): cstring{.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_composite_name".} +proc gtk_widget_reset_rc_styles*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_reset_rc_styles".} +proc gtk_widget_push_colormap*(cmap: PGdkColormap){.cdecl, dynlib: gtklib, + importc: "gtk_widget_push_colormap".} +proc gtk_widget_push_composite_child*(){.cdecl, dynlib: gtklib, + importc: "gtk_widget_push_composite_child".} +proc gtk_widget_pop_composite_child*(){.cdecl, dynlib: gtklib, importc: "gtk_widget_pop_composite_child".} +proc gtk_widget_pop_colormap*(){.cdecl, dynlib: gtklib, + importc: "gtk_widget_pop_colormap".} +proc gtk_widget_class_install_style_property*(klass: PGtkWidgetClass, + pspec: PGParamSpec){.cdecl, dynlib: gtklib, + importc: "gtk_widget_class_install_style_property".} +proc gtk_widget_class_install_style_property_parser*(klass: PGtkWidgetClass, + pspec: PGParamSpec, parser: TGtkRcPropertyParser){.cdecl, dynlib: gtklib, + importc: "gtk_widget_class_install_style_property_parser".} +proc gtk_widget_class_find_style_property*(klass: PGtkWidgetClass, + property_name: cstring): PGParamSpec{.cdecl, dynlib: gtklib, + importc: "gtk_widget_class_find_style_property".} +proc gtk_widget_class_list_style_properties*(klass: PGtkWidgetClass, + n_properties: Pguint): PPGParamSpec{.cdecl, dynlib: gtklib, + importc: "gtk_widget_class_list_style_properties".} +proc gtk_widget_style_get_property*(widget: PGtkWidget, property_name: cstring, + value: PGValue){.cdecl, dynlib: gtklib, + importc: "gtk_widget_style_get_property".} +proc gtk_widget_set_default_colormap*(colormap: PGdkColormap){.cdecl, + dynlib: gtklib, importc: "gtk_widget_set_default_colormap".} +proc gtk_widget_get_default_style*(): PGtkStyle{.cdecl, dynlib: gtklib, + importc: "gtk_widget_get_default_style".} +proc gtk_widget_set_direction*(widget: PGtkWidget, dir: TGtkTextDirection){. + cdecl, dynlib: gtklib, importc: "gtk_widget_set_direction".} +proc gtk_widget_get_direction*(widget: PGtkWidget): TGtkTextDirection{.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_direction".} +proc gtk_widget_set_default_direction*(dir: TGtkTextDirection){.cdecl, + dynlib: gtklib, importc: "gtk_widget_set_default_direction".} +proc gtk_widget_get_default_direction*(): TGtkTextDirection{.cdecl, + dynlib: gtklib, importc: "gtk_widget_get_default_direction".} +proc gtk_widget_shape_combine_mask*(widget: PGtkWidget, shape_mask: PGdkBitmap, + offset_x: gint, offset_y: gint){.cdecl, + dynlib: gtklib, importc: "gtk_widget_shape_combine_mask".} +proc gtk_widget_reset_shapes*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_widget_reset_shapes".} +proc gtk_widget_path*(widget: PGtkWidget, path_length: Pguint, path: PPgchar, + path_reversed: PPgchar){.cdecl, dynlib: gtklib, + importc: "gtk_widget_path".} +proc gtk_widget_class_path*(widget: PGtkWidget, path_length: Pguint, + path: PPgchar, path_reversed: PPgchar){.cdecl, + dynlib: gtklib, importc: "gtk_widget_class_path".} +proc gtk_requisition_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_requisition_get_type".} +proc gtk_requisition_copy*(requisition: PGtkRequisition): PGtkRequisition{. + cdecl, dynlib: gtklib, importc: "gtk_requisition_copy".} +proc gtk_requisition_free*(requisition: PGtkRequisition){.cdecl, dynlib: gtklib, + importc: "gtk_requisition_free".} +proc gtk_widget_get_aux_info*(widget: PGtkWidget, create: gboolean): PGtkWidgetAuxInfo{. + cdecl, dynlib: gtklib, importc: "gtk_widget_get_aux_info".} +proc gtk_widget_propagate_hierarchy_changed*(widget: PGtkWidget, + previous_toplevel: PGtkWidget){.cdecl, dynlib: gtklib, importc: "_gtk_widget_propagate_hierarchy_changed".} +proc gtk_widget_peek_colormap*(): PGdkColormap{.cdecl, dynlib: gtklib, + importc: "_gtk_widget_peek_colormap".} +proc GTK_TYPE_MISC*(): GType +proc GTK_MISC*(obj: pointer): PGtkMisc +proc GTK_MISC_CLASS*(klass: pointer): PGtkMiscClass +proc GTK_IS_MISC*(obj: pointer): bool +proc GTK_IS_MISC_CLASS*(klass: pointer): bool +proc GTK_MISC_GET_CLASS*(obj: pointer): PGtkMiscClass +proc gtk_misc_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_misc_get_type".} +proc gtk_misc_set_alignment*(misc: PGtkMisc, xalign: gfloat, yalign: gfloat){. + cdecl, dynlib: gtklib, importc: "gtk_misc_set_alignment".} +proc gtk_misc_get_alignment*(misc: PGtkMisc, xalign, yalign: var Pgfloat){. + cdecl, dynlib: gtklib, importc: "gtk_misc_get_alignment".} +proc gtk_misc_set_padding*(misc: PGtkMisc, xpad: gint, ypad: gint){.cdecl, + dynlib: gtklib, importc: "gtk_misc_set_padding".} +proc gtk_misc_get_padding*(misc: PGtkMisc, xpad, ypad: var Pgint){.cdecl, + dynlib: gtklib, importc: "gtk_misc_get_padding".} +const + GTK_ACCEL_VISIBLE* = 1 shl 0 + GTK_ACCEL_LOCKED* = 1 shl 1 + GTK_ACCEL_MASK* = 0x00000007 + bm_TGtkAccelKey_accel_flags* = 0x0000FFFF'i16 + bp_TGtkAccelKey_accel_flags* = 0'i16 + +proc GTK_TYPE_ACCEL_GROUP*(): GType +proc GTK_ACCEL_GROUP*(anObject: pointer): PGtkAccelGroup +proc GTK_ACCEL_GROUP_CLASS*(klass: pointer): PGtkAccelGroupClass +proc GTK_IS_ACCEL_GROUP*(anObject: pointer): bool +proc GTK_IS_ACCEL_GROUP_CLASS*(klass: pointer): bool +proc GTK_ACCEL_GROUP_GET_CLASS*(obj: pointer): PGtkAccelGroupClass +proc accel_flags*(a: var TGtkAccelKey): guint +proc set_accel_flags*(a: var TGtkAccelKey, `accel_flags`: guint) +proc gtk_accel_group_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_accel_group_get_type".} +proc gtk_accel_group_new*(): PGtkAccelGroup{.cdecl, dynlib: gtklib, + importc: "gtk_accel_group_new".} +proc gtk_accel_group_lock*(accel_group: PGtkAccelGroup){.cdecl, dynlib: gtklib, + importc: "gtk_accel_group_lock".} +proc gtk_accel_group_unlock*(accel_group: PGtkAccelGroup){.cdecl, + dynlib: gtklib, importc: "gtk_accel_group_unlock".} +proc gtk_accel_group_connect*(accel_group: PGtkAccelGroup, accel_key: guint, + accel_mods: TGdkModifierType, + accel_flags: TGtkAccelFlags, closure: PGClosure){. + cdecl, dynlib: gtklib, importc: "gtk_accel_group_connect".} +proc gtk_accel_group_connect_by_path*(accel_group: PGtkAccelGroup, + accel_path: cstring, closure: PGClosure){. + cdecl, dynlib: gtklib, importc: "gtk_accel_group_connect_by_path".} +proc gtk_accel_group_disconnect*(accel_group: PGtkAccelGroup, closure: PGClosure): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_accel_group_disconnect".} +proc gtk_accel_group_disconnect_key*(accel_group: PGtkAccelGroup, + accel_key: guint, + accel_mods: TGdkModifierType): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_accel_group_disconnect_key".} +proc gtk_accel_group_attach*(accel_group: PGtkAccelGroup, anObject: PGObject){. + cdecl, dynlib: gtklib, importc: "_gtk_accel_group_attach".} +proc gtk_accel_group_detach*(accel_group: PGtkAccelGroup, anObject: PGObject){. + cdecl, dynlib: gtklib, importc: "_gtk_accel_group_detach".} +proc gtk_accel_groups_activate*(anObject: PGObject, accel_key: guint, + accel_mods: TGdkModifierType): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_accel_groups_activate".} +proc gtk_accel_groups_from_object*(anObject: PGObject): PGSList{.cdecl, + dynlib: gtklib, importc: "gtk_accel_groups_from_object".} +proc gtk_accel_group_find*(accel_group: PGtkAccelGroup, + find_func: Tgtk_accel_group_find_func, data: gpointer): PGtkAccelKey{. + cdecl, dynlib: gtklib, importc: "gtk_accel_group_find".} +proc gtk_accel_group_from_accel_closure*(closure: PGClosure): PGtkAccelGroup{. + cdecl, dynlib: gtklib, importc: "gtk_accel_group_from_accel_closure".} +proc gtk_accelerator_valid*(keyval: guint, modifiers: TGdkModifierType): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_accelerator_valid".} +proc gtk_accelerator_parse*(accelerator: cstring, accelerator_key: Pguint, + accelerator_mods: PGdkModifierType){.cdecl, + dynlib: gtklib, importc: "gtk_accelerator_parse".} +proc gtk_accelerator_name*(accelerator_key: guint, + accelerator_mods: TGdkModifierType): cstring{.cdecl, + dynlib: gtklib, importc: "gtk_accelerator_name".} +proc gtk_accelerator_set_default_mod_mask*(default_mod_mask: TGdkModifierType){. + cdecl, dynlib: gtklib, importc: "gtk_accelerator_set_default_mod_mask".} +proc gtk_accelerator_get_default_mod_mask*(): guint{.cdecl, dynlib: gtklib, + importc: "gtk_accelerator_get_default_mod_mask".} +proc gtk_accel_group_query*(accel_group: PGtkAccelGroup, accel_key: guint, + accel_mods: TGdkModifierType, n_entries: Pguint): PGtkAccelGroupEntry{. + cdecl, dynlib: gtklib, importc: "gtk_accel_group_query".} +proc gtk_accel_group_reconnect*(accel_group: PGtkAccelGroup, + accel_path_quark: TGQuark){.cdecl, + dynlib: gtklib, importc: "_gtk_accel_group_reconnect".} +const + bm_TGtkContainer_border_width* = 0x0000FFFF'i32 + bp_TGtkContainer_border_width* = 0'i32 + bm_TGtkContainer_need_resize* = 0x00010000'i32 + bp_TGtkContainer_need_resize* = 16'i32 + bm_TGtkContainer_resize_mode* = 0x00060000'i32 + bp_TGtkContainer_resize_mode* = 17'i32 + bm_TGtkContainer_reallocate_redraws* = 0x00080000'i32 + bp_TGtkContainer_reallocate_redraws* = 19'i32 + bm_TGtkContainer_has_focus_chain* = 0x00100000'i32 + bp_TGtkContainer_has_focus_chain* = 20'i32 + +proc GTK_TYPE_CONTAINER*(): GType +proc GTK_CONTAINER*(obj: pointer): PGtkContainer +proc GTK_CONTAINER_CLASS*(klass: pointer): PGtkContainerClass +proc GTK_IS_CONTAINER*(obj: pointer): bool +proc GTK_IS_CONTAINER_CLASS*(klass: pointer): bool +proc GTK_CONTAINER_GET_CLASS*(obj: pointer): PGtkContainerClass +proc GTK_IS_RESIZE_CONTAINER*(widget: pointer): bool +proc border_width*(a: var TGtkContainer): guint +proc set_border_width*(a: var TGtkContainer, `border_width`: guint) +proc need_resize*(a: var TGtkContainer): guint +proc set_need_resize*(a: var TGtkContainer, `need_resize`: guint) +proc resize_mode*(a: PGtkContainer): guint +proc set_resize_mode*(a: var TGtkContainer, `resize_mode`: guint) +proc reallocate_redraws*(a: var TGtkContainer): guint +proc set_reallocate_redraws*(a: var TGtkContainer, `reallocate_redraws`: guint) +proc has_focus_chain*(a: var TGtkContainer): guint +proc set_has_focus_chain*(a: var TGtkContainer, `has_focus_chain`: guint) +proc gtk_container_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_container_get_type".} +proc gtk_container_set_border_width*(container: PGtkContainer, + border_width: guint){.cdecl, + dynlib: gtklib, importc: "gtk_container_set_border_width".} +proc gtk_container_get_border_width*(container: PGtkContainer): guint{.cdecl, + dynlib: gtklib, importc: "gtk_container_get_border_width".} +proc gtk_container_add*(container: PGtkContainer, widget: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_container_add".} +proc gtk_container_remove*(container: PGtkContainer, widget: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_container_remove".} +proc gtk_container_set_resize_mode*(container: PGtkContainer, + resize_mode: TGtkResizeMode){.cdecl, + dynlib: gtklib, importc: "gtk_container_set_resize_mode".} +proc gtk_container_get_resize_mode*(container: PGtkContainer): TGtkResizeMode{. + cdecl, dynlib: gtklib, importc: "gtk_container_get_resize_mode".} +proc gtk_container_check_resize*(container: PGtkContainer){.cdecl, + dynlib: gtklib, importc: "gtk_container_check_resize".} +proc gtk_container_foreach*(container: PGtkContainer, callback: TGtkCallback, + callback_data: gpointer){.cdecl, dynlib: gtklib, + importc: "gtk_container_foreach".} +proc gtk_container_get_children*(container: PGtkContainer): PGList{.cdecl, + dynlib: gtklib, importc: "gtk_container_get_children".} +proc gtk_container_propagate_expose*(container: PGtkContainer, + child: PGtkWidget, event: PGdkEventExpose){. + cdecl, dynlib: gtklib, importc: "gtk_container_propagate_expose".} +proc gtk_container_set_focus_chain*(container: PGtkContainer, + focusable_widgets: PGList){.cdecl, + dynlib: gtklib, importc: "gtk_container_set_focus_chain".} +proc gtk_container_get_focus_chain*(container: PGtkContainer, s: var PGList): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_container_get_focus_chain".} +proc gtk_container_unset_focus_chain*(container: PGtkContainer){.cdecl, + dynlib: gtklib, importc: "gtk_container_unset_focus_chain".} +proc gtk_container_set_reallocate_redraws*(container: PGtkContainer, + needs_redraws: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_container_set_reallocate_redraws".} +proc gtk_container_set_focus_child*(container: PGtkContainer, child: PGtkWidget){. + cdecl, dynlib: gtklib, importc: "gtk_container_set_focus_child".} +proc gtk_container_set_focus_vadjustment*(container: PGtkContainer, + adjustment: PGtkAdjustment){.cdecl, dynlib: gtklib, + importc: "gtk_container_set_focus_vadjustment".} +proc gtk_container_get_focus_vadjustment*(container: PGtkContainer): PGtkAdjustment{. + cdecl, dynlib: gtklib, importc: "gtk_container_get_focus_vadjustment".} +proc gtk_container_set_focus_hadjustment*(container: PGtkContainer, + adjustment: PGtkAdjustment){.cdecl, dynlib: gtklib, + importc: "gtk_container_set_focus_hadjustment".} +proc gtk_container_get_focus_hadjustment*(container: PGtkContainer): PGtkAdjustment{. + cdecl, dynlib: gtklib, importc: "gtk_container_get_focus_hadjustment".} +proc gtk_container_resize_children*(container: PGtkContainer){.cdecl, + dynlib: gtklib, importc: "gtk_container_resize_children".} +proc gtk_container_child_type*(container: PGtkContainer): TGtkType{.cdecl, + dynlib: gtklib, importc: "gtk_container_child_type".} +proc gtk_container_class_install_child_property*(cclass: PGtkContainerClass, + property_id: guint, pspec: PGParamSpec){.cdecl, dynlib: gtklib, + importc: "gtk_container_class_install_child_property".} +proc gtk_container_class_find_child_property*(cclass: PGObjectClass, + property_name: cstring): PGParamSpec{.cdecl, dynlib: gtklib, + importc: "gtk_container_class_find_child_property".} +proc gtk_container_class_list_child_properties*(cclass: PGObjectClass, + n_properties: Pguint): PPGParamSpec{.cdecl, dynlib: gtklib, + importc: "gtk_container_class_list_child_properties".} +proc gtk_container_child_set_property*(container: PGtkContainer, + child: PGtkWidget, property_name: cstring, + value: PGValue){.cdecl, dynlib: gtklib, + importc: "gtk_container_child_set_property".} +proc gtk_container_child_get_property*(container: PGtkContainer, + child: PGtkWidget, property_name: cstring, + value: PGValue){.cdecl, dynlib: gtklib, + importc: "gtk_container_child_get_property".} +proc GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID*(anObject: pointer, + property_id: guint, pspec: pointer) +proc gtk_container_forall*(container: PGtkContainer, callback: TGtkCallback, + callback_data: gpointer){.cdecl, dynlib: gtklib, + importc: "gtk_container_forall".} +proc gtk_container_queue_resize*(container: PGtkContainer){.cdecl, + dynlib: gtklib, importc: "_gtk_container_queue_resize".} +proc gtk_container_clear_resize_widgets*(container: PGtkContainer){.cdecl, + dynlib: gtklib, importc: "_gtk_container_clear_resize_widgets".} +proc gtk_container_child_composite_name*(container: PGtkContainer, + child: PGtkWidget): cstring{.cdecl, dynlib: gtklib, + importc: "_gtk_container_child_composite_name".} +proc gtk_container_dequeue_resize_handler*(container: PGtkContainer){.cdecl, + dynlib: gtklib, importc: "_gtk_container_dequeue_resize_handler".} +proc gtk_container_focus_sort*(container: PGtkContainer, children: PGList, + direction: TGtkDirectionType, + old_focus: PGtkWidget): PGList{.cdecl, + dynlib: gtklib, importc: "_gtk_container_focus_sort".} +proc GTK_TYPE_BIN*(): GType +proc GTK_BIN*(obj: pointer): PGtkBin +proc GTK_BIN_CLASS*(klass: pointer): PGtkBinClass +proc GTK_IS_BIN*(obj: pointer): bool +proc GTK_IS_BIN_CLASS*(klass: pointer): bool +proc GTK_BIN_GET_CLASS*(obj: pointer): PGtkBinClass +proc gtk_bin_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_bin_get_type".} +proc gtk_bin_get_child*(bin: PGtkBin): PGtkWidget{.cdecl, dynlib: gtklib, + importc: "gtk_bin_get_child".} +const + bm_TGtkWindow_allow_shrink* = 0x00000001'i32 + bp_TGtkWindow_allow_shrink* = 0'i32 + bm_TGtkWindow_allow_grow* = 0x00000002'i32 + bp_TGtkWindow_allow_grow* = 1'i32 + bm_TGtkWindow_configure_notify_received* = 0x00000004'i32 + bp_TGtkWindow_configure_notify_received* = 2'i32 + bm_TGtkWindow_need_default_position* = 0x00000008'i32 + bp_TGtkWindow_need_default_position* = 3'i32 + bm_TGtkWindow_need_default_size* = 0x00000010'i32 + bp_TGtkWindow_need_default_size* = 4'i32 + bm_TGtkWindow_position* = 0x000000E0'i32 + bp_TGtkWindow_position* = 5'i32 + bm_TGtkWindow_type* = 0x00000F00'i32 + bp_TGtkWindow_type* = 8'i32 + bm_TGtkWindow_has_user_ref_count* = 0x00001000'i32 + bp_TGtkWindow_has_user_ref_count* = 12'i32 + bm_TGtkWindow_has_focus* = 0x00002000'i32 + bp_TGtkWindow_has_focus* = 13'i32 + bm_TGtkWindow_modal* = 0x00004000'i32 + bp_TGtkWindow_modal* = 14'i32 + bm_TGtkWindow_destroy_with_parent* = 0x00008000'i32 + bp_TGtkWindow_destroy_with_parent* = 15'i32 + bm_TGtkWindow_has_frame* = 0x00010000'i32 + bp_TGtkWindow_has_frame* = 16'i32 + bm_TGtkWindow_iconify_initially* = 0x00020000'i32 + bp_TGtkWindow_iconify_initially* = 17'i32 + bm_TGtkWindow_stick_initially* = 0x00040000'i32 + bp_TGtkWindow_stick_initially* = 18'i32 + bm_TGtkWindow_maximize_initially* = 0x00080000'i32 + bp_TGtkWindow_maximize_initially* = 19'i32 + bm_TGtkWindow_decorated* = 0x00100000'i32 + bp_TGtkWindow_decorated* = 20'i32 + bm_TGtkWindow_type_hint* = 0x00E00000'i32 + bp_TGtkWindow_type_hint* = 21'i32 + bm_TGtkWindow_gravity* = 0x1F000000'i32 + bp_TGtkWindow_gravity* = 24'i32 + +proc GTK_TYPE_WINDOW*(): GType +proc GTK_WINDOW*(obj: pointer): PGtkWindow +proc GTK_WINDOW_CLASS*(klass: pointer): PGtkWindowClass +proc GTK_IS_WINDOW*(obj: pointer): bool +proc GTK_IS_WINDOW_CLASS*(klass: pointer): bool +proc GTK_WINDOW_GET_CLASS*(obj: pointer): PGtkWindowClass +proc allow_shrink*(a: var TGtkWindow): guint +proc set_allow_shrink*(a: var TGtkWindow, `allow_shrink`: guint) +proc allow_grow*(a: var TGtkWindow): guint +proc set_allow_grow*(a: var TGtkWindow, `allow_grow`: guint) +proc configure_notify_received*(a: var TGtkWindow): guint +proc set_configure_notify_received*(a: var TGtkWindow, + `configure_notify_received`: guint) +proc need_default_position*(a: var TGtkWindow): guint +proc set_need_default_position*(a: var TGtkWindow, + `need_default_position`: guint) +proc need_default_size*(a: var TGtkWindow): guint +proc set_need_default_size*(a: var TGtkWindow, `need_default_size`: guint) +proc position*(a: var TGtkWindow): guint +proc set_position*(a: var TGtkWindow, `position`: guint) +proc get_type*(a: var TGtkWindow): guint +proc set_type*(a: var TGtkWindow, `type`: guint) +proc has_user_ref_count*(a: var TGtkWindow): guint +proc set_has_user_ref_count*(a: var TGtkWindow, `has_user_ref_count`: guint) +proc has_focus*(a: var TGtkWindow): guint +proc set_has_focus*(a: var TGtkWindow, `has_focus`: guint) +proc modal*(a: var TGtkWindow): guint +proc set_modal*(a: var TGtkWindow, `modal`: guint) +proc destroy_with_parent*(a: var TGtkWindow): guint +proc set_destroy_with_parent*(a: var TGtkWindow, `destroy_with_parent`: guint) +proc has_frame*(a: var TGtkWindow): guint +proc set_has_frame*(a: var TGtkWindow, `has_frame`: guint) +proc iconify_initially*(a: var TGtkWindow): guint +proc set_iconify_initially*(a: var TGtkWindow, `iconify_initially`: guint) +proc stick_initially*(a: var TGtkWindow): guint +proc set_stick_initially*(a: var TGtkWindow, `stick_initially`: guint) +proc maximize_initially*(a: var TGtkWindow): guint +proc set_maximize_initially*(a: var TGtkWindow, `maximize_initially`: guint) +proc decorated*(a: var TGtkWindow): guint +proc set_decorated*(a: var TGtkWindow, `decorated`: guint) +proc type_hint*(a: var TGtkWindow): guint +proc set_type_hint*(a: var TGtkWindow, `type_hint`: guint) +proc gravity*(a: var TGtkWindow): guint +proc set_gravity*(a: var TGtkWindow, `gravity`: guint) +proc GTK_TYPE_WINDOW_GROUP*(): GType +proc GTK_WINDOW_GROUP*(anObject: pointer): PGtkWindowGroup +proc GTK_WINDOW_GROUP_CLASS*(klass: pointer): PGtkWindowGroupClass +proc GTK_IS_WINDOW_GROUP*(anObject: pointer): bool +proc GTK_IS_WINDOW_GROUP_CLASS*(klass: pointer): bool +proc GTK_WINDOW_GROUP_GET_CLASS*(obj: pointer): PGtkWindowGroupClass +proc gtk_window_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_window_get_type".} +proc gtk_window_new*(thetype: TGtkWindowType): PGtkWindow {.cdecl, + dynlib: gtklib, importc: "gtk_window_new".} +proc gtk_window_set_title*(window: PGtkWindow, title: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_window_set_title".} +proc gtk_window_get_title*(window: PGtkWindow): cstring{.cdecl, dynlib: gtklib, + importc: "gtk_window_get_title".} +proc gtk_window_set_wmclass*(window: PGtkWindow, wmclass_name: cstring, + wmclass_class: cstring){.cdecl, dynlib: gtklib, + importc: "gtk_window_set_wmclass".} +proc gtk_window_set_role*(window: PGtkWindow, role: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_window_set_role".} +proc gtk_window_get_role*(window: PGtkWindow): cstring{.cdecl, dynlib: gtklib, + importc: "gtk_window_get_role".} +proc gtk_window_add_accel_group*(window: PGtkWindow, accel_group: PGtkAccelGroup){. + cdecl, dynlib: gtklib, importc: "gtk_window_add_accel_group".} +proc gtk_window_remove_accel_group*(window: PGtkWindow, + accel_group: PGtkAccelGroup){.cdecl, + dynlib: gtklib, importc: "gtk_window_remove_accel_group".} +proc gtk_window_set_position*(window: PGtkWindow, position: TGtkWindowPosition){. + cdecl, dynlib: gtklib, importc: "gtk_window_set_position".} +proc gtk_window_activate_focus*(window: PGtkWindow): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_window_activate_focus".} +proc gtk_window_set_focus*(window: PGtkWindow, focus: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_window_set_focus".} +proc gtk_window_get_focus*(window: PGtkWindow): PGtkWidget{.cdecl, + dynlib: gtklib, importc: "gtk_window_get_focus".} +proc gtk_window_set_default*(window: PGtkWindow, default_widget: PGtkWidget){. + cdecl, dynlib: gtklib, importc: "gtk_window_set_default".} +proc gtk_window_activate_default*(window: PGtkWindow): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_window_activate_default".} +proc gtk_window_set_transient_for*(window: PGtkWindow, parent: PGtkWindow){. + cdecl, dynlib: gtklib, importc: "gtk_window_set_transient_for".} +proc gtk_window_get_transient_for*(window: PGtkWindow): PGtkWindow{.cdecl, + dynlib: gtklib, importc: "gtk_window_get_transient_for".} +proc gtk_window_set_type_hint*(window: PGtkWindow, hint: TGdkWindowTypeHint){. + cdecl, dynlib: gtklib, importc: "gtk_window_set_type_hint".} +proc gtk_window_get_type_hint*(window: PGtkWindow): TGdkWindowTypeHint{.cdecl, + dynlib: gtklib, importc: "gtk_window_get_type_hint".} +proc gtk_window_set_destroy_with_parent*(window: PGtkWindow, setting: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_window_set_destroy_with_parent".} +proc gtk_window_get_destroy_with_parent*(window: PGtkWindow): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_window_get_destroy_with_parent".} +proc gtk_window_set_resizable*(window: PGtkWindow, resizable: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_window_set_resizable".} +proc gtk_window_get_resizable*(window: PGtkWindow): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_window_get_resizable".} +proc gtk_window_set_gravity*(window: PGtkWindow, gravity: TGdkGravity){.cdecl, + dynlib: gtklib, importc: "gtk_window_set_gravity".} +proc gtk_window_get_gravity*(window: PGtkWindow): TGdkGravity{.cdecl, + dynlib: gtklib, importc: "gtk_window_get_gravity".} +proc gtk_window_set_geometry_hints*(window: PGtkWindow, + geometry_widget: PGtkWidget, + geometry: PGdkGeometry, + geom_mask: TGdkWindowHints){.cdecl, + dynlib: gtklib, importc: "gtk_window_set_geometry_hints".} +proc gtk_window_set_screen*(window: PGtkWindow, screen: PGdkScreen){.cdecl, + dynlib: gtklib, importc: "gtk_window_set_screen".} +proc gtk_window_get_screen*(window: PGtkWindow): PGdkScreen{.cdecl, + dynlib: gtklib, importc: "gtk_window_get_screen".} +proc gtk_window_set_has_frame*(window: PGtkWindow, setting: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_window_set_has_frame".} +proc gtk_window_get_has_frame*(window: PGtkWindow): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_window_get_has_frame".} +proc gtk_window_set_frame_dimensions*(window: PGtkWindow, left: gint, top: gint, + right: gint, bottom: gint){.cdecl, + dynlib: gtklib, importc: "gtk_window_set_frame_dimensions".} +proc gtk_window_get_frame_dimensions*(window: PGtkWindow, left: Pgint, + top: Pgint, right: Pgint, bottom: Pgint){. + cdecl, dynlib: gtklib, importc: "gtk_window_get_frame_dimensions".} +proc gtk_window_set_decorated*(window: PGtkWindow, setting: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_window_set_decorated".} +proc gtk_window_get_decorated*(window: PGtkWindow): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_window_get_decorated".} +proc gtk_window_set_icon_list*(window: PGtkWindow, list: PGList){.cdecl, + dynlib: gtklib, importc: "gtk_window_set_icon_list".} +proc gtk_window_get_icon_list*(window: PGtkWindow): PGList{.cdecl, + dynlib: gtklib, importc: "gtk_window_get_icon_list".} +proc gtk_window_set_icon*(window: PGtkWindow, icon: PGdkPixbuf){.cdecl, + dynlib: gtklib, importc: "gtk_window_set_icon".} +proc gtk_window_get_icon*(window: PGtkWindow): PGdkPixbuf{.cdecl, + dynlib: gtklib, importc: "gtk_window_get_icon".} +proc gtk_window_set_default_icon_list*(list: PGList){.cdecl, dynlib: gtklib, + importc: "gtk_window_set_default_icon_list".} +proc gtk_window_get_default_icon_list*(): PGList{.cdecl, dynlib: gtklib, + importc: "gtk_window_get_default_icon_list".} +proc gtk_window_set_modal*(window: PGtkWindow, modal: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_window_set_modal".} +proc gtk_window_get_modal*(window: PGtkWindow): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_window_get_modal".} +proc gtk_window_list_toplevels*(): PGList{.cdecl, dynlib: gtklib, + importc: "gtk_window_list_toplevels".} +proc gtk_window_add_mnemonic*(window: PGtkWindow, keyval: guint, + target: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_window_add_mnemonic".} +proc gtk_window_remove_mnemonic*(window: PGtkWindow, keyval: guint, + target: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_window_remove_mnemonic".} +proc gtk_window_mnemonic_activate*(window: PGtkWindow, keyval: guint, + modifier: TGdkModifierType): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_window_mnemonic_activate".} +proc gtk_window_set_mnemonic_modifier*(window: PGtkWindow, + modifier: TGdkModifierType){.cdecl, + dynlib: gtklib, importc: "gtk_window_set_mnemonic_modifier".} +proc gtk_window_get_mnemonic_modifier*(window: PGtkWindow): TGdkModifierType{. + cdecl, dynlib: gtklib, importc: "gtk_window_get_mnemonic_modifier".} +proc gtk_window_present*(window: PGtkWindow){.cdecl, dynlib: gtklib, + importc: "gtk_window_present".} +proc gtk_window_iconify*(window: PGtkWindow){.cdecl, dynlib: gtklib, + importc: "gtk_window_iconify".} +proc gtk_window_deiconify*(window: PGtkWindow){.cdecl, dynlib: gtklib, + importc: "gtk_window_deiconify".} +proc gtk_window_stick*(window: PGtkWindow){.cdecl, dynlib: gtklib, + importc: "gtk_window_stick".} +proc gtk_window_unstick*(window: PGtkWindow){.cdecl, dynlib: gtklib, + importc: "gtk_window_unstick".} +proc gtk_window_maximize*(window: PGtkWindow){.cdecl, dynlib: gtklib, + importc: "gtk_window_maximize".} +proc gtk_window_unmaximize*(window: PGtkWindow){.cdecl, dynlib: gtklib, + importc: "gtk_window_unmaximize".} +proc gtk_window_begin_resize_drag*(window: PGtkWindow, edge: TGdkWindowEdge, + button: gint, root_x: gint, root_y: gint, + timestamp: guint32){.cdecl, dynlib: gtklib, + importc: "gtk_window_begin_resize_drag".} +proc gtk_window_begin_move_drag*(window: PGtkWindow, button: gint, root_x: gint, + root_y: gint, timestamp: guint32){.cdecl, + dynlib: gtklib, importc: "gtk_window_begin_move_drag".} +proc gtk_window_set_default_size*(window: PGtkWindow, width: gint, height: gint){. + cdecl, dynlib: gtklib, importc: "gtk_window_set_default_size".} +proc gtk_window_get_default_size*(window: PGtkWindow, width: Pgint, + height: Pgint){.cdecl, dynlib: gtklib, + importc: "gtk_window_get_default_size".} +proc gtk_window_resize*(window: PGtkWindow, width: gint, height: gint){.cdecl, + dynlib: gtklib, importc: "gtk_window_resize".} +proc gtk_window_get_size*(window: PGtkWindow, width: Pgint, height: Pgint){. + cdecl, dynlib: gtklib, importc: "gtk_window_get_size".} +proc gtk_window_move*(window: PGtkWindow, x: gint, y: gint){.cdecl, + dynlib: gtklib, importc: "gtk_window_move".} +proc gtk_window_get_position*(window: PGtkWindow, root_x: Pgint, root_y: Pgint){. + cdecl, dynlib: gtklib, importc: "gtk_window_get_position".} +proc gtk_window_parse_geometry*(window: PGtkWindow, geometry: cstring): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_window_parse_geometry".} +proc gtk_window_reshow_with_initial_size*(window: PGtkWindow){.cdecl, + dynlib: gtklib, importc: "gtk_window_reshow_with_initial_size".} +proc gtk_window_group_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_window_group_get_type".} +proc gtk_window_group_new*(): PGtkWindowGroup{.cdecl, dynlib: gtklib, + importc: "gtk_window_group_new".} +proc gtk_window_group_add_window*(window_group: PGtkWindowGroup, + window: PGtkWindow){.cdecl, dynlib: gtklib, + importc: "gtk_window_group_add_window".} +proc gtk_window_group_remove_window*(window_group: PGtkWindowGroup, + window: PGtkWindow){.cdecl, dynlib: gtklib, + importc: "gtk_window_group_remove_window".} +proc gtk_window_set_default_icon_name*(name: cstring) {. + cdecl, dynlib: gtklib, importc.} +proc gtk_window_internal_set_focus*(window: PGtkWindow, focus: PGtkWidget){. + cdecl, dynlib: gtklib, importc: "_gtk_window_internal_set_focus".} +proc gtk_window_remove_embedded_xid*(window: PGtkWindow, xid: guint){.cdecl, + dynlib: gtklib, importc: "gtk_window_remove_embedded_xid".} +proc gtk_window_add_embedded_xid*(window: PGtkWindow, xid: guint){.cdecl, + dynlib: gtklib, importc: "gtk_window_add_embedded_xid".} +proc gtk_window_reposition*(window: PGtkWindow, x: gint, y: gint){.cdecl, + dynlib: gtklib, importc: "_gtk_window_reposition".} +proc gtk_window_constrain_size*(window: PGtkWindow, width: gint, height: gint, + new_width: Pgint, new_height: Pgint){.cdecl, + dynlib: gtklib, importc: "_gtk_window_constrain_size".} +proc gtk_window_get_group*(window: PGtkWindow): PGtkWindowGroup{.cdecl, + dynlib: gtklib, importc: "_gtk_window_get_group".} +proc gtk_window_activate_key*(window: PGtkWindow, event: PGdkEventKey): gboolean{. + cdecl, dynlib: gtklib, importc: "_gtk_window_activate_key".} +proc gtk_window_keys_foreach*(window: PGtkWindow, + func: TGtkWindowKeysForeachFunc, + func_data: gpointer){.cdecl, dynlib: gtklib, + importc: "_gtk_window_keys_foreach".} +proc gtk_window_query_nonaccels*(window: PGtkWindow, accel_key: guint, + accel_mods: TGdkModifierType): gboolean{. + cdecl, dynlib: gtklib, importc: "_gtk_window_query_nonaccels".} +const + bm_TGtkLabel_jtype* = 0x00000003'i16 + bp_TGtkLabel_jtype* = 0'i16 + bm_TGtkLabel_wrap* = 0x00000004'i16 + bp_TGtkLabel_wrap* = 2'i16 + bm_TGtkLabel_use_underline* = 0x00000008'i16 + bp_TGtkLabel_use_underline* = 3'i16 + bm_TGtkLabel_use_markup* = 0x00000010'i16 + bp_TGtkLabel_use_markup* = 4'i16 + +proc GTK_TYPE_LABEL*(): GType +proc GTK_LABEL*(obj: pointer): PGtkLabel +proc GTK_LABEL_CLASS*(klass: pointer): PGtkLabelClass +proc GTK_IS_LABEL*(obj: pointer): bool +proc GTK_IS_LABEL_CLASS*(klass: pointer): bool +proc GTK_LABEL_GET_CLASS*(obj: pointer): PGtkLabelClass +proc jtype*(a: var TGtkLabel): guint +proc set_jtype*(a: var TGtkLabel, `jtype`: guint) +proc wrap*(a: var TGtkLabel): guint +proc set_wrap*(a: var TGtkLabel, `wrap`: guint) +proc use_underline*(a: var TGtkLabel): guint +proc set_use_underline*(a: var TGtkLabel, `use_underline`: guint) +proc use_markup*(a: var TGtkLabel): guint +proc set_use_markup*(a: var TGtkLabel, `use_markup`: guint) +proc gtk_label_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_label_get_type".} +proc gtk_label_new*(str: cstring): PGtkLabel {.cdecl, dynlib: gtklib, + importc: "gtk_label_new".} +proc gtk_label_new_with_mnemonic*(str: cstring): PGtkLabel {.cdecl, + dynlib: gtklib, importc: "gtk_label_new_with_mnemonic".} +proc gtk_label_set_text*(`label`: PGtkLabel, str: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_label_set_text".} +proc gtk_label_get_text*(`label`: PGtkLabel): cstring{.cdecl, dynlib: gtklib, + importc: "gtk_label_get_text".} +proc gtk_label_set_attributes*(`label`: PGtkLabel, attrs: PPangoAttrList){. + cdecl, dynlib: gtklib, importc: "gtk_label_set_attributes".} +proc gtk_label_get_attributes*(`label`: PGtkLabel): PPangoAttrList{.cdecl, + dynlib: gtklib, importc: "gtk_label_get_attributes".} +proc gtk_label_set_label*(`label`: PGtkLabel, str: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_label_set_label".} +proc gtk_label_get_label*(`label`: PGtkLabel): cstring{.cdecl, dynlib: gtklib, + importc: "gtk_label_get_label".} +proc gtk_label_set_markup*(`label`: PGtkLabel, str: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_label_set_markup".} +proc gtk_label_set_use_markup*(`label`: PGtkLabel, setting: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_label_set_use_markup".} +proc gtk_label_get_use_markup*(`label`: PGtkLabel): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_label_get_use_markup".} +proc gtk_label_set_use_underline*(`label`: PGtkLabel, setting: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_label_set_use_underline".} +proc gtk_label_get_use_underline*(`label`: PGtkLabel): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_label_get_use_underline".} +proc gtk_label_set_markup_with_mnemonic*(`label`: PGtkLabel, str: cstring){. + cdecl, dynlib: gtklib, importc: "gtk_label_set_markup_with_mnemonic".} +proc gtk_label_get_mnemonic_keyval*(`label`: PGtkLabel): guint{.cdecl, + dynlib: gtklib, importc: "gtk_label_get_mnemonic_keyval".} +proc gtk_label_set_mnemonic_widget*(`label`: PGtkLabel, widget: PGtkWidget){. + cdecl, dynlib: gtklib, importc: "gtk_label_set_mnemonic_widget".} +proc gtk_label_get_mnemonic_widget*(`label`: PGtkLabel): PGtkWidget{.cdecl, + dynlib: gtklib, importc: "gtk_label_get_mnemonic_widget".} +proc gtk_label_set_text_with_mnemonic*(`label`: PGtkLabel, str: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_label_set_text_with_mnemonic".} +proc gtk_label_set_justify*(`label`: PGtkLabel, jtype: TGtkJustification){. + cdecl, dynlib: gtklib, importc: "gtk_label_set_justify".} +proc gtk_label_get_justify*(`label`: PGtkLabel): TGtkJustification{.cdecl, + dynlib: gtklib, importc: "gtk_label_get_justify".} +proc gtk_label_set_pattern*(`label`: PGtkLabel, pattern: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_label_set_pattern".} +proc gtk_label_set_line_wrap*(`label`: PGtkLabel, wrap: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_label_set_line_wrap".} +proc gtk_label_get_line_wrap*(`label`: PGtkLabel): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_label_get_line_wrap".} +proc gtk_label_set_selectable*(`label`: PGtkLabel, setting: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_label_set_selectable".} +proc gtk_label_get_selectable*(`label`: PGtkLabel): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_label_get_selectable".} +proc gtk_label_select_region*(`label`: PGtkLabel, start_offset: gint, + end_offset: gint){.cdecl, dynlib: gtklib, + importc: "gtk_label_select_region".} +proc gtk_label_get_selection_bounds*(`label`: PGtkLabel, start: Pgint, + theEnd: Pgint): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_label_get_selection_bounds".} +proc gtk_label_get_layout*(`label`: PGtkLabel): PPangoLayout{.cdecl, + dynlib: gtklib, importc: "gtk_label_get_layout".} +proc gtk_label_get_layout_offsets*(`label`: PGtkLabel, x: Pgint, y: Pgint){. + cdecl, dynlib: gtklib, importc: "gtk_label_get_layout_offsets".} +const + bm_TGtkAccelLabelClass_latin1_to_char* = 0x00000001'i16 + bp_TGtkAccelLabelClass_latin1_to_char* = 0'i16 + +proc GTK_TYPE_ACCEL_LABEL*(): GType +proc GTK_ACCEL_LABEL*(obj: pointer): PGtkAccelLabel +proc GTK_ACCEL_LABEL_CLASS*(klass: pointer): PGtkAccelLabelClass +proc GTK_IS_ACCEL_LABEL*(obj: pointer): bool +proc GTK_IS_ACCEL_LABEL_CLASS*(klass: pointer): bool +proc GTK_ACCEL_LABEL_GET_CLASS*(obj: pointer): PGtkAccelLabelClass +proc latin1_to_char*(a: var TGtkAccelLabelClass): guint +proc set_latin1_to_char*(a: var TGtkAccelLabelClass, `latin1_to_char`: guint) +proc gtk_accel_label_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_accel_label_get_type".} +proc gtk_accel_label_new*(`string`: cstring): PGtkAccelLabel {.cdecl, dynlib: gtklib, + importc: "gtk_accel_label_new".} +proc gtk_accel_label_get_accel_widget*(accel_label: PGtkAccelLabel): PGtkWidget{. + cdecl, dynlib: gtklib, importc: "gtk_accel_label_get_accel_widget".} +proc gtk_accel_label_get_accel_width*(accel_label: PGtkAccelLabel): guint{. + cdecl, dynlib: gtklib, importc: "gtk_accel_label_get_accel_width".} +proc gtk_accel_label_set_accel_widget*(accel_label: PGtkAccelLabel, + accel_widget: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_accel_label_set_accel_widget".} +proc gtk_accel_label_set_accel_closure*(accel_label: PGtkAccelLabel, + accel_closure: PGClosure){.cdecl, + dynlib: gtklib, importc: "gtk_accel_label_set_accel_closure".} +proc gtk_accel_label_refetch*(accel_label: PGtkAccelLabel): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_accel_label_refetch".} +proc gtk_accel_map_add_entry*(accel_path: cstring, accel_key: guint, + accel_mods: TGdkModifierType){.cdecl, + dynlib: gtklib, importc: "gtk_accel_map_add_entry".} +proc gtk_accel_map_lookup_entry*(accel_path: cstring, key: PGtkAccelKey): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_accel_map_lookup_entry".} +proc gtk_accel_map_change_entry*(accel_path: cstring, accel_key: guint, + accel_mods: TGdkModifierType, replace: gboolean): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_accel_map_change_entry".} +proc gtk_accel_map_load*(file_name: cstring){.cdecl, dynlib: gtklib, + importc: "gtk_accel_map_load".} +proc gtk_accel_map_save*(file_name: cstring){.cdecl, dynlib: gtklib, + importc: "gtk_accel_map_save".} +proc gtk_accel_map_foreach*(data: gpointer, foreach_func: TGtkAccelMapForeach){. + cdecl, dynlib: gtklib, importc: "gtk_accel_map_foreach".} +proc gtk_accel_map_load_fd*(fd: gint){.cdecl, dynlib: gtklib, + importc: "gtk_accel_map_load_fd".} +proc gtk_accel_map_load_scanner*(scanner: PGScanner){.cdecl, dynlib: gtklib, + importc: "gtk_accel_map_load_scanner".} +proc gtk_accel_map_save_fd*(fd: gint){.cdecl, dynlib: gtklib, + importc: "gtk_accel_map_save_fd".} +proc gtk_accel_map_add_filter*(filter_pattern: cstring){.cdecl, dynlib: gtklib, + importc: "gtk_accel_map_add_filter".} +proc gtk_accel_map_foreach_unfiltered*(data: gpointer, + foreach_func: TGtkAccelMapForeach){. + cdecl, dynlib: gtklib, importc: "gtk_accel_map_foreach_unfiltered".} +proc gtk_accel_map_init*(){.cdecl, dynlib: gtklib, + importc: "_gtk_accel_map_init".} +proc gtk_accel_map_add_group*(accel_path: cstring, accel_group: PGtkAccelGroup){. + cdecl, dynlib: gtklib, importc: "_gtk_accel_map_add_group".} +proc gtk_accel_map_remove_group*(accel_path: cstring, + accel_group: PGtkAccelGroup){.cdecl, + dynlib: gtklib, importc: "_gtk_accel_map_remove_group".} +proc gtk_accel_path_is_valid*(accel_path: cstring): gboolean{.cdecl, + dynlib: gtklib, importc: "_gtk_accel_path_is_valid".} +proc GTK_TYPE_ACCESSIBLE*(): GType +proc GTK_ACCESSIBLE*(obj: pointer): PGtkAccessible +proc GTK_ACCESSIBLE_CLASS*(klass: pointer): PGtkAccessibleClass +proc GTK_IS_ACCESSIBLE*(obj: pointer): bool +proc GTK_IS_ACCESSIBLE_CLASS*(klass: pointer): bool +proc GTK_ACCESSIBLE_GET_CLASS*(obj: pointer): PGtkAccessibleClass +proc gtk_accessible_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_accessible_get_type".} +proc gtk_accessible_connect_widget_destroyed*(accessible: PGtkAccessible){. + cdecl, dynlib: gtklib, importc: "gtk_accessible_connect_widget_destroyed".} +proc GTK_TYPE_ADJUSTMENT*(): GType +proc GTK_ADJUSTMENT*(obj: pointer): PGtkAdjustment +proc GTK_ADJUSTMENT_CLASS*(klass: pointer): PGtkAdjustmentClass +proc GTK_IS_ADJUSTMENT*(obj: pointer): bool +proc GTK_IS_ADJUSTMENT_CLASS*(klass: pointer): bool +proc GTK_ADJUSTMENT_GET_CLASS*(obj: pointer): PGtkAdjustmentClass +proc gtk_adjustment_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_adjustment_get_type".} +proc gtk_adjustment_new*(value: gdouble, lower: gdouble, upper: gdouble, + step_increment: gdouble, page_increment: gdouble, + page_size: gdouble): PGtkAdjustment {.cdecl, dynlib: gtklib, + importc: "gtk_adjustment_new".} +proc gtk_adjustment_changed*(adjustment: PGtkAdjustment){.cdecl, dynlib: gtklib, + importc: "gtk_adjustment_changed".} +proc gtk_adjustment_value_changed*(adjustment: PGtkAdjustment){.cdecl, + dynlib: gtklib, importc: "gtk_adjustment_value_changed".} +proc gtk_adjustment_clamp_page*(adjustment: PGtkAdjustment, lower: gdouble, + upper: gdouble){.cdecl, dynlib: gtklib, + importc: "gtk_adjustment_clamp_page".} +proc gtk_adjustment_get_value*(adjustment: PGtkAdjustment): gdouble{.cdecl, + dynlib: gtklib, importc: "gtk_adjustment_get_value".} +proc gtk_adjustment_set_value*(adjustment: PGtkAdjustment, value: gdouble){. + cdecl, dynlib: gtklib, importc: "gtk_adjustment_set_value".} +proc GTK_TYPE_ALIGNMENT*(): GType +proc GTK_ALIGNMENT*(obj: pointer): PGtkAlignment +proc GTK_ALIGNMENT_CLASS*(klass: pointer): PGtkAlignmentClass +proc GTK_IS_ALIGNMENT*(obj: pointer): bool +proc GTK_IS_ALIGNMENT_CLASS*(klass: pointer): bool +proc GTK_ALIGNMENT_GET_CLASS*(obj: pointer): PGtkAlignmentClass +proc gtk_alignment_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_alignment_get_type".} +proc gtk_alignment_new*(xalign: gfloat, yalign: gfloat, xscale: gfloat, + yscale: gfloat): PGtkAlignment {.cdecl, dynlib: gtklib, + importc: "gtk_alignment_new".} +proc gtk_alignment_set*(alignment: PGtkAlignment, xalign: gfloat, + yalign: gfloat, xscale: gfloat, yscale: gfloat){.cdecl, + dynlib: gtklib, importc: "gtk_alignment_set".} +proc GTK_TYPE_FRAME*(): GType +proc GTK_FRAME*(obj: pointer): PGtkFrame +proc GTK_FRAME_CLASS*(klass: pointer): PGtkFrameClass +proc GTK_IS_FRAME*(obj: pointer): bool +proc GTK_IS_FRAME_CLASS*(klass: pointer): bool +proc GTK_FRAME_GET_CLASS*(obj: pointer): PGtkFrameClass +proc gtk_frame_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_frame_get_type".} +proc gtk_frame_new*(`label`: cstring): PGtkFrame {.cdecl, dynlib: gtklib, + importc: "gtk_frame_new".} +proc gtk_frame_set_label*(frame: PGtkFrame, `label`: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_frame_set_label".} +proc gtk_frame_get_label*(frame: PGtkFrame): cstring{.cdecl, dynlib: gtklib, + importc: "gtk_frame_get_label".} +proc gtk_frame_set_label_widget*(frame: PGtkFrame, label_widget: PGtkWidget){. + cdecl, dynlib: gtklib, importc: "gtk_frame_set_label_widget".} +proc gtk_frame_get_label_widget*(frame: PGtkFrame): PGtkWidget{.cdecl, + dynlib: gtklib, importc: "gtk_frame_get_label_widget".} +proc gtk_frame_set_label_align*(frame: PGtkFrame, xalign: gfloat, yalign: gfloat){. + cdecl, dynlib: gtklib, importc: "gtk_frame_set_label_align".} +proc gtk_frame_get_label_align*(frame: PGtkFrame, xalign: Pgfloat, + yalign: Pgfloat){.cdecl, dynlib: gtklib, + importc: "gtk_frame_get_label_align".} +proc gtk_frame_set_shadow_type*(frame: PGtkFrame, thetype: TGtkShadowType){. + cdecl, dynlib: gtklib, importc: "gtk_frame_set_shadow_type".} +proc gtk_frame_get_shadow_type*(frame: PGtkFrame): TGtkShadowType{.cdecl, + dynlib: gtklib, importc: "gtk_frame_get_shadow_type".} +proc GTK_TYPE_ASPECT_FRAME*(): GType +proc GTK_ASPECT_FRAME*(obj: pointer): PGtkAspectFrame +proc GTK_ASPECT_FRAME_CLASS*(klass: pointer): PGtkAspectFrameClass +proc GTK_IS_ASPECT_FRAME*(obj: pointer): bool +proc GTK_IS_ASPECT_FRAME_CLASS*(klass: pointer): bool +proc GTK_ASPECT_FRAME_GET_CLASS*(obj: pointer): PGtkAspectFrameClass +proc gtk_aspect_frame_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_aspect_frame_get_type".} +proc gtk_aspect_frame_new*(`label`: cstring, xalign: gfloat, yalign: gfloat, + ratio: gfloat, obey_child: gboolean): PGtkAspectFrame {. + cdecl, dynlib: gtklib, importc: "gtk_aspect_frame_new".} +proc gtk_aspect_frame_set*(aspect_frame: PGtkAspectFrame, xalign: gfloat, + yalign: gfloat, ratio: gfloat, obey_child: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_aspect_frame_set".} +proc GTK_TYPE_ARROW*(): GType +proc GTK_ARROW*(obj: pointer): PGtkArrow +proc GTK_ARROW_CLASS*(klass: pointer): PGtkArrowClass +proc GTK_IS_ARROW*(obj: pointer): bool +proc GTK_IS_ARROW_CLASS*(klass: pointer): bool +proc GTK_ARROW_GET_CLASS*(obj: pointer): PGtkArrowClass +proc gtk_arrow_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_arrow_get_type".} +proc gtk_arrow_new*(arrow_type: TGtkArrowType, shadow_type: TGtkShadowType): PGtkArrow{. + cdecl, dynlib: gtklib, importc: "gtk_arrow_new".} +proc gtk_arrow_set*(arrow: PGtkArrow, arrow_type: TGtkArrowType, + shadow_type: TGtkShadowType){.cdecl, dynlib: gtklib, + importc: "gtk_arrow_set".} +const + bm_TGtkBindingSet_parsed* = 0x00000001'i16 + bp_TGtkBindingSet_parsed* = 0'i16 + bm_TGtkBindingEntry_destroyed* = 0x00000001'i16 + bp_TGtkBindingEntry_destroyed* = 0'i16 + bm_TGtkBindingEntry_in_emission* = 0x00000002'i16 + bp_TGtkBindingEntry_in_emission* = 1'i16 + +proc gtk_binding_entry_add*(binding_set: PGtkBindingSet, keyval: guint, + modifiers: TGdkModifierType) +proc parsed*(a: var TGtkBindingSet): guint +proc set_parsed*(a: var TGtkBindingSet, `parsed`: guint) +proc destroyed*(a: var TGtkBindingEntry): guint +proc set_destroyed*(a: var TGtkBindingEntry, `destroyed`: guint) +proc in_emission*(a: var TGtkBindingEntry): guint +proc set_in_emission*(a: var TGtkBindingEntry, `in_emission`: guint) +proc gtk_binding_set_new*(set_name: cstring): PGtkBindingSet{.cdecl, + dynlib: gtklib, importc: "gtk_binding_set_new".} +proc gtk_binding_set_by_class*(object_class: gpointer): PGtkBindingSet{.cdecl, + dynlib: gtklib, importc: "gtk_binding_set_by_class".} +proc gtk_binding_set_find*(set_name: cstring): PGtkBindingSet{.cdecl, + dynlib: gtklib, importc: "gtk_binding_set_find".} +proc gtk_bindings_activate*(anObject: PGtkObject, keyval: guint, + modifiers: TGdkModifierType): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_bindings_activate".} +proc gtk_binding_set_activate*(binding_set: PGtkBindingSet, keyval: guint, + modifiers: TGdkModifierType, anObject: PGtkObject): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_binding_set_activate".} +proc gtk_binding_entry_clear*(binding_set: PGtkBindingSet, keyval: guint, + modifiers: TGdkModifierType){.cdecl, + dynlib: gtklib, importc: "gtk_binding_entry_clear".} +proc gtk_binding_set_add_path*(binding_set: PGtkBindingSet, + path_type: TGtkPathType, path_pattern: cstring, + priority: TGtkPathPriorityType){.cdecl, + dynlib: gtklib, importc: "gtk_binding_set_add_path".} +proc gtk_binding_entry_remove*(binding_set: PGtkBindingSet, keyval: guint, + modifiers: TGdkModifierType){.cdecl, + dynlib: gtklib, importc: "gtk_binding_entry_remove".} +proc gtk_binding_entry_add_signall*(binding_set: PGtkBindingSet, keyval: guint, + modifiers: TGdkModifierType, + signal_name: cstring, binding_args: PGSList){. + cdecl, dynlib: gtklib, importc: "gtk_binding_entry_add_signall".} +proc gtk_binding_parse_binding*(scanner: PGScanner): guint{.cdecl, + dynlib: gtklib, importc: "gtk_binding_parse_binding".} +proc gtk_bindings_activate_event*(anObject: PGtkObject, event: PGdkEventKey): gboolean{. + cdecl, dynlib: gtklib, importc: "_gtk_bindings_activate_event".} +proc gtk_binding_reset_parsed*(){.cdecl, dynlib: gtklib, + importc: "_gtk_binding_reset_parsed".} +const + bm_TGtkBox_homogeneous* = 0x00000001'i16 + bp_TGtkBox_homogeneous* = 0'i16 + bm_TGtkBoxChild_expand* = 0x00000001'i16 + bp_TGtkBoxChild_expand* = 0'i16 + bm_TGtkBoxChild_fill* = 0x00000002'i16 + bp_TGtkBoxChild_fill* = 1'i16 + bm_TGtkBoxChild_pack* = 0x00000004'i16 + bp_TGtkBoxChild_pack* = 2'i16 + bm_TGtkBoxChild_is_secondary* = 0x00000008'i16 + bp_TGtkBoxChild_is_secondary* = 3'i16 + +proc GTK_TYPE_BOX*(): GType +proc GTK_BOX*(obj: pointer): PGtkBox +proc GTK_BOX_CLASS*(klass: pointer): PGtkBoxClass +proc GTK_IS_BOX*(obj: pointer): bool +proc GTK_IS_BOX_CLASS*(klass: pointer): bool +proc GTK_BOX_GET_CLASS*(obj: pointer): PGtkBoxClass +proc homogeneous*(a: var TGtkBox): guint +proc set_homogeneous*(a: var TGtkBox, `homogeneous`: guint) +proc expand*(a: var TGtkBoxChild): guint +proc set_expand*(a: var TGtkBoxChild, `expand`: guint) +proc fill*(a: var TGtkBoxChild): guint +proc set_fill*(a: var TGtkBoxChild, `fill`: guint) +proc pack*(a: var TGtkBoxChild): guint +proc set_pack*(a: var TGtkBoxChild, `pack`: guint) +proc is_secondary*(a: var TGtkBoxChild): guint +proc set_is_secondary*(a: var TGtkBoxChild, `is_secondary`: guint) +proc gtk_box_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_box_get_type".} +proc gtk_box_pack_start*(box: PGtkBox, child: PGtkWidget, expand: gboolean, + fill: gboolean, padding: guint){.cdecl, dynlib: gtklib, + importc: "gtk_box_pack_start".} +proc gtk_box_pack_end*(box: PGtkBox, child: PGtkWidget, expand: gboolean, + fill: gboolean, padding: guint){.cdecl, dynlib: gtklib, + importc: "gtk_box_pack_end".} +proc gtk_box_pack_start_defaults*(box: PGtkBox, widget: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_box_pack_start_defaults".} +proc gtk_box_pack_end_defaults*(box: PGtkBox, widget: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_box_pack_end_defaults".} +proc gtk_box_set_homogeneous*(box: PGtkBox, homogeneous: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_box_set_homogeneous".} +proc gtk_box_get_homogeneous*(box: PGtkBox): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_box_get_homogeneous".} +proc gtk_box_set_spacing*(box: PGtkBox, spacing: gint){.cdecl, dynlib: gtklib, + importc: "gtk_box_set_spacing".} +proc gtk_box_get_spacing*(box: PGtkBox): gint{.cdecl, dynlib: gtklib, + importc: "gtk_box_get_spacing".} +proc gtk_box_reorder_child*(box: PGtkBox, child: PGtkWidget, position: gint){. + cdecl, dynlib: gtklib, importc: "gtk_box_reorder_child".} +proc gtk_box_query_child_packing*(box: PGtkBox, child: PGtkWidget, + expand: Pgboolean, fill: Pgboolean, + padding: Pguint, pack_type: PGtkPackType){. + cdecl, dynlib: gtklib, importc: "gtk_box_query_child_packing".} +proc gtk_box_set_child_packing*(box: PGtkBox, child: PGtkWidget, + expand: gboolean, fill: gboolean, + padding: guint, pack_type: TGtkPackType){.cdecl, + dynlib: gtklib, importc: "gtk_box_set_child_packing".} +const + GTK_BUTTONBOX_DEFAULT* = - (1) + +proc GTK_TYPE_BUTTON_BOX*(): GType +proc GTK_BUTTON_BOX*(obj: pointer): PGtkButtonBox +proc GTK_BUTTON_BOX_CLASS*(klass: pointer): PGtkButtonBoxClass +proc GTK_IS_BUTTON_BOX*(obj: pointer): bool +proc GTK_IS_BUTTON_BOX_CLASS*(klass: pointer): bool +proc GTK_BUTTON_BOX_GET_CLASS*(obj: pointer): PGtkButtonBoxClass +proc gtk_button_box_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_button_box_get_type".} +proc gtk_button_box_get_layout*(widget: PGtkButtonBox): TGtkButtonBoxStyle{. + cdecl, dynlib: gtklib, importc: "gtk_button_box_get_layout".} +proc gtk_button_box_set_layout*(widget: PGtkButtonBox, + layout_style: TGtkButtonBoxStyle){.cdecl, + dynlib: gtklib, importc: "gtk_button_box_set_layout".} +proc gtk_button_box_set_child_secondary*(widget: PGtkButtonBox, + child: PGtkWidget, is_secondary: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_button_box_set_child_secondary".} +proc gtk_button_box_child_requisition*(widget: PGtkWidget, + nvis_children: var int32, nvis_secondaries: var int32, width: var int32, + height: var int32){.cdecl, dynlib: gtklib, + importc: "_gtk_button_box_child_requisition".} +const + bm_TGtkButton_constructed* = 0x00000001'i16 + bp_TGtkButton_constructed* = 0'i16 + bm_TGtkButton_in_button* = 0x00000002'i16 + bp_TGtkButton_in_button* = 1'i16 + bm_TGtkButton_button_down* = 0x00000004'i16 + bp_TGtkButton_button_down* = 2'i16 + bm_TGtkButton_relief* = 0x00000018'i16 + bp_TGtkButton_relief* = 3'i16 + bm_TGtkButton_use_underline* = 0x00000020'i16 + bp_TGtkButton_use_underline* = 5'i16 + bm_TGtkButton_use_stock* = 0x00000040'i16 + bp_TGtkButton_use_stock* = 6'i16 + bm_TGtkButton_depressed* = 0x00000080'i16 + bp_TGtkButton_depressed* = 7'i16 + bm_TGtkButton_depress_on_activate* = 0x00000100'i16 + bp_TGtkButton_depress_on_activate* = 8'i16 + +proc GTK_TYPE_BUTTON*(): GType +proc GTK_BUTTON*(obj: pointer): PGtkButton +proc GTK_BUTTON_CLASS*(klass: pointer): PGtkButtonClass +proc GTK_IS_BUTTON*(obj: pointer): bool +proc GTK_IS_BUTTON_CLASS*(klass: pointer): bool +proc GTK_BUTTON_GET_CLASS*(obj: pointer): PGtkButtonClass +proc constructed*(a: var TGtkButton): guint +proc set_constructed*(a: var TGtkButton, `constructed`: guint) +proc in_button*(a: var TGtkButton): guint +proc set_in_button*(a: var TGtkButton, `in_button`: guint) +proc button_down*(a: var TGtkButton): guint +proc set_button_down*(a: var TGtkButton, `button_down`: guint) +proc relief*(a: var TGtkButton): guint +proc set_relief*(a: var TGtkButton, `relief`: guint) +proc use_underline*(a: var TGtkButton): guint +proc set_use_underline*(a: var TGtkButton, `use_underline`: guint) +proc use_stock*(a: var TGtkButton): guint +proc set_use_stock*(a: var TGtkButton, `use_stock`: guint) +proc depressed*(a: var TGtkButton): guint +proc set_depressed*(a: var TGtkButton, `depressed`: guint) +proc depress_on_activate*(a: var TGtkButton): guint +proc set_depress_on_activate*(a: var TGtkButton, `depress_on_activate`: guint) +proc gtk_button_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_button_get_type".} +proc gtk_button_new*(): PGtkButton {.cdecl, dynlib: gtklib, + importc: "gtk_button_new".} +proc gtk_button_new_with_label*(`label`: cstring): PGtkButton {.cdecl, + dynlib: gtklib, importc: "gtk_button_new_with_label".} +proc gtk_button_new_from_stock*(stock_id: cstring): PGtkButton {.cdecl, + dynlib: gtklib, importc: "gtk_button_new_from_stock".} +proc gtk_button_new_with_mnemonic*(`label`: cstring): PGtkButton {.cdecl, + dynlib: gtklib, importc: "gtk_button_new_with_mnemonic".} +proc gtk_button_pressed*(button: PGtkButton){.cdecl, dynlib: gtklib, + importc: "gtk_button_pressed".} +proc gtk_button_released*(button: PGtkButton){.cdecl, dynlib: gtklib, + importc: "gtk_button_released".} +proc gtk_button_clicked*(button: PGtkButton){.cdecl, dynlib: gtklib, + importc: "gtk_button_clicked".} +proc gtk_button_enter*(button: PGtkButton){.cdecl, dynlib: gtklib, + importc: "gtk_button_enter".} +proc gtk_button_leave*(button: PGtkButton){.cdecl, dynlib: gtklib, + importc: "gtk_button_leave".} +proc gtk_button_set_relief*(button: PGtkButton, newstyle: TGtkReliefStyle){. + cdecl, dynlib: gtklib, importc: "gtk_button_set_relief".} +proc gtk_button_get_relief*(button: PGtkButton): TGtkReliefStyle{.cdecl, + dynlib: gtklib, importc: "gtk_button_get_relief".} +proc gtk_button_set_label*(button: PGtkButton, `label`: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_button_set_label".} +proc gtk_button_get_label*(button: PGtkButton): cstring{.cdecl, dynlib: gtklib, + importc: "gtk_button_get_label".} +proc gtk_button_set_use_underline*(button: PGtkButton, use_underline: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_button_set_use_underline".} +proc gtk_button_get_use_underline*(button: PGtkButton): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_button_get_use_underline".} +proc gtk_button_set_use_stock*(button: PGtkButton, use_stock: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_button_set_use_stock".} +proc gtk_button_get_use_stock*(button: PGtkButton): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_button_get_use_stock".} +proc gtk_button_set_depressed*(button: PGtkButton, depressed: gboolean){. + cdecl, dynlib: gtklib, importc: "_gtk_button_set_depressed".} +proc gtk_button_paint*(button: PGtkButton, area: PGdkRectangle, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + main_detail: cstring, default_detail: cstring){.cdecl, + dynlib: gtklib, importc: "_gtk_button_paint".} +proc gtk_button_set_image*(button: PGtkButton, image: PGtkWidget) {.cdecl, + dynlib: gtklib, importc.} +proc gtk_button_get_image*(button: PGtkButton): PGtkWidget {.cdecl, + dynlib: gtklib, importc.} + +const + GTK_CALENDAR_SHOW_HEADING* = 1 shl 0 + GTK_CALENDAR_SHOW_DAY_NAMES* = 1 shl 1 + GTK_CALENDAR_NO_MONTH_CHANGE* = 1 shl 2 + GTK_CALENDAR_SHOW_WEEK_NUMBERS* = 1 shl 3 + GTK_CALENDAR_WEEK_START_MONDAY* = 1 shl 4 + +proc GTK_TYPE_CALENDAR*(): GType +proc GTK_CALENDAR*(obj: pointer): PGtkCalendar +proc GTK_CALENDAR_CLASS*(klass: pointer): PGtkCalendarClass +proc GTK_IS_CALENDAR*(obj: pointer): bool +proc GTK_IS_CALENDAR_CLASS*(klass: pointer): bool +proc GTK_CALENDAR_GET_CLASS*(obj: pointer): PGtkCalendarClass +proc gtk_calendar_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_calendar_get_type".} +proc gtk_calendar_new*(): PGtkCalendar {.cdecl, dynlib: gtklib, + importc: "gtk_calendar_new".} +proc gtk_calendar_select_month*(calendar: PGtkCalendar, month: guint, + year: guint): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_calendar_select_month".} +proc gtk_calendar_select_day*(calendar: PGtkCalendar, day: guint){.cdecl, + dynlib: gtklib, importc: "gtk_calendar_select_day".} +proc gtk_calendar_mark_day*(calendar: PGtkCalendar, day: guint): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_calendar_mark_day".} +proc gtk_calendar_unmark_day*(calendar: PGtkCalendar, day: guint): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_calendar_unmark_day".} +proc gtk_calendar_clear_marks*(calendar: PGtkCalendar){.cdecl, dynlib: gtklib, + importc: "gtk_calendar_clear_marks".} +proc gtk_calendar_display_options*(calendar: PGtkCalendar, + flags: TGtkCalendarDisplayOptions){.cdecl, + dynlib: gtklib, importc: "gtk_calendar_display_options".} +proc gtk_calendar_get_date*(calendar: PGtkCalendar, year: Pguint, month: Pguint, + day: Pguint){.cdecl, dynlib: gtklib, + importc: "gtk_calendar_get_date".} +proc gtk_calendar_freeze*(calendar: PGtkCalendar){.cdecl, dynlib: gtklib, + importc: "gtk_calendar_freeze".} +proc gtk_calendar_thaw*(calendar: PGtkCalendar){.cdecl, dynlib: gtklib, + importc: "gtk_calendar_thaw".} +proc GTK_TYPE_CELL_EDITABLE*(): GType +proc GTK_CELL_EDITABLE*(obj: pointer): PGtkCellEditable +proc GTK_CELL_EDITABLE_CLASS*(obj: pointer): PGtkCellEditableIface +proc GTK_IS_CELL_EDITABLE*(obj: pointer): bool +proc GTK_CELL_EDITABLE_GET_IFACE*(obj: pointer): PGtkCellEditableIface +proc gtk_cell_editable_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_cell_editable_get_type".} +proc gtk_cell_editable_start_editing*(cell_editable: PGtkCellEditable, + event: PGdkEvent){.cdecl, dynlib: gtklib, + importc: "gtk_cell_editable_start_editing".} +proc gtk_cell_editable_editing_done*(cell_editable: PGtkCellEditable){.cdecl, + dynlib: gtklib, importc: "gtk_cell_editable_editing_done".} +proc gtk_cell_editable_remove_widget*(cell_editable: PGtkCellEditable){.cdecl, + dynlib: gtklib, importc: "gtk_cell_editable_remove_widget".} +const + GTK_CELL_RENDERER_SELECTED* = 1 shl 0 + GTK_CELL_RENDERER_PRELIT* = 1 shl 1 + GTK_CELL_RENDERER_INSENSITIVE* = 1 shl 2 + GTK_CELL_RENDERER_SORTED* = 1 shl 3 + +const + bm_TGtkCellRenderer_mode* = 0x00000003'i16 + bp_TGtkCellRenderer_mode* = 0'i16 + bm_TGtkCellRenderer_visible* = 0x00000004'i16 + bp_TGtkCellRenderer_visible* = 2'i16 + bm_TGtkCellRenderer_is_expander* = 0x00000008'i16 + bp_TGtkCellRenderer_is_expander* = 3'i16 + bm_TGtkCellRenderer_is_expanded* = 0x00000010'i16 + bp_TGtkCellRenderer_is_expanded* = 4'i16 + bm_TGtkCellRenderer_cell_background_set* = 0x00000020'i16 + bp_TGtkCellRenderer_cell_background_set* = 5'i16 + +proc GTK_TYPE_CELL_RENDERER*(): GType +proc GTK_CELL_RENDERER*(obj: pointer): PGtkCellRenderer +proc GTK_CELL_RENDERER_CLASS*(klass: pointer): PGtkCellRendererClass +proc GTK_IS_CELL_RENDERER*(obj: pointer): bool +proc GTK_IS_CELL_RENDERER_CLASS*(klass: pointer): bool +proc GTK_CELL_RENDERER_GET_CLASS*(obj: pointer): PGtkCellRendererClass +proc mode*(a: var TGtkCellRenderer): guint +proc set_mode*(a: var TGtkCellRenderer, `mode`: guint) +proc visible*(a: var TGtkCellRenderer): guint +proc set_visible*(a: var TGtkCellRenderer, `visible`: guint) +proc is_expander*(a: var TGtkCellRenderer): guint +proc set_is_expander*(a: var TGtkCellRenderer, `is_expander`: guint) +proc is_expanded*(a: var TGtkCellRenderer): guint +proc set_is_expanded*(a: var TGtkCellRenderer, `is_expanded`: guint) +proc cell_background_set*(a: var TGtkCellRenderer): guint +proc set_cell_background_set*(a: var TGtkCellRenderer, + `cell_background_set`: guint) +proc gtk_cell_renderer_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_cell_renderer_get_type".} +proc gtk_cell_renderer_get_size*(cell: PGtkCellRenderer, widget: PGtkWidget, + cell_area: PGdkRectangle, x_offset: Pgint, + y_offset: Pgint, width: Pgint, height: Pgint){. + cdecl, dynlib: gtklib, importc: "gtk_cell_renderer_get_size".} +proc gtk_cell_renderer_render*(cell: PGtkCellRenderer, window: PGdkWindow, + widget: PGtkWidget, + background_area: PGdkRectangle, + cell_area: PGdkRectangle, + expose_area: PGdkRectangle, + flags: TGtkCellRendererState){.cdecl, + dynlib: gtklib, importc: "gtk_cell_renderer_render".} +proc gtk_cell_renderer_activate*(cell: PGtkCellRenderer, event: PGdkEvent, + widget: PGtkWidget, path: cstring, + background_area: PGdkRectangle, + cell_area: PGdkRectangle, + flags: TGtkCellRendererState): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_cell_renderer_activate".} +proc gtk_cell_renderer_start_editing*(cell: PGtkCellRenderer, event: PGdkEvent, + widget: PGtkWidget, path: cstring, + background_area: PGdkRectangle, + cell_area: PGdkRectangle, + flags: TGtkCellRendererState): PGtkCellEditable{. + cdecl, dynlib: gtklib, importc: "gtk_cell_renderer_start_editing".} +proc gtk_cell_renderer_set_fixed_size*(cell: PGtkCellRenderer, width: gint, + height: gint){.cdecl, dynlib: gtklib, + importc: "gtk_cell_renderer_set_fixed_size".} +proc gtk_cell_renderer_get_fixed_size*(cell: PGtkCellRenderer, width: Pgint, + height: Pgint){.cdecl, dynlib: gtklib, + importc: "gtk_cell_renderer_get_fixed_size".} +const + bm_TGtkCellRendererText_strikethrough* = 0x00000001'i16 + bp_TGtkCellRendererText_strikethrough* = 0'i16 + bm_TGtkCellRendererText_editable* = 0x00000002'i16 + bp_TGtkCellRendererText_editable* = 1'i16 + bm_TGtkCellRendererText_scale_set* = 0x00000004'i16 + bp_TGtkCellRendererText_scale_set* = 2'i16 + bm_TGtkCellRendererText_foreground_set* = 0x00000008'i16 + bp_TGtkCellRendererText_foreground_set* = 3'i16 + bm_TGtkCellRendererText_background_set* = 0x00000010'i16 + bp_TGtkCellRendererText_background_set* = 4'i16 + bm_TGtkCellRendererText_underline_set* = 0x00000020'i16 + bp_TGtkCellRendererText_underline_set* = 5'i16 + bm_TGtkCellRendererText_rise_set* = 0x00000040'i16 + bp_TGtkCellRendererText_rise_set* = 6'i16 + bm_TGtkCellRendererText_strikethrough_set* = 0x00000080'i16 + bp_TGtkCellRendererText_strikethrough_set* = 7'i16 + bm_TGtkCellRendererText_editable_set* = 0x00000100'i16 + bp_TGtkCellRendererText_editable_set* = 8'i16 + bm_TGtkCellRendererText_calc_fixed_height* = 0x00000200'i16 + bp_TGtkCellRendererText_calc_fixed_height* = 9'i16 + +proc GTK_TYPE_CELL_RENDERER_TEXT*(): GType +proc GTK_CELL_RENDERER_TEXT*(obj: pointer): PGtkCellRendererText +proc GTK_CELL_RENDERER_TEXT_CLASS*(klass: pointer): PGtkCellRendererTextClass +proc GTK_IS_CELL_RENDERER_TEXT*(obj: pointer): bool +proc GTK_IS_CELL_RENDERER_TEXT_CLASS*(klass: pointer): bool +proc GTK_CELL_RENDERER_TEXT_GET_CLASS*(obj: pointer): PGtkCellRendererTextClass +proc strikethrough*(a: var TGtkCellRendererText): guint +proc set_strikethrough*(a: var TGtkCellRendererText, `strikethrough`: guint) +proc editable*(a: var TGtkCellRendererText): guint +proc set_editable*(a: var TGtkCellRendererText, `editable`: guint) +proc scale_set*(a: var TGtkCellRendererText): guint +proc set_scale_set*(a: var TGtkCellRendererText, `scale_set`: guint) +proc foreground_set*(a: var TGtkCellRendererText): guint +proc set_foreground_set*(a: var TGtkCellRendererText, `foreground_set`: guint) +proc background_set*(a: var TGtkCellRendererText): guint +proc set_background_set*(a: var TGtkCellRendererText, `background_set`: guint) +proc underline_set*(a: var TGtkCellRendererText): guint +proc set_underline_set*(a: var TGtkCellRendererText, `underline_set`: guint) +proc rise_set*(a: var TGtkCellRendererText): guint +proc set_rise_set*(a: var TGtkCellRendererText, `rise_set`: guint) +proc strikethrough_set*(a: var TGtkCellRendererText): guint +proc set_strikethrough_set*(a: var TGtkCellRendererText, + `strikethrough_set`: guint) +proc editable_set*(a: var TGtkCellRendererText): guint +proc set_editable_set*(a: var TGtkCellRendererText, `editable_set`: guint) +proc calc_fixed_height*(a: var TGtkCellRendererText): guint +proc set_calc_fixed_height*(a: var TGtkCellRendererText, + `calc_fixed_height`: guint) +proc gtk_cell_renderer_text_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_cell_renderer_text_get_type".} +proc gtk_cell_renderer_text_new*(): PGtkCellRenderer{.cdecl, dynlib: gtklib, + importc: "gtk_cell_renderer_text_new".} +proc gtk_cell_renderer_text_set_fixed_height_from_font*( + renderer: PGtkCellRendererText, number_of_rows: gint){.cdecl, + dynlib: gtklib, importc: "gtk_cell_renderer_text_set_fixed_height_from_font".} +const + bm_TGtkCellRendererToggle_active* = 0x00000001'i16 + bp_TGtkCellRendererToggle_active* = 0'i16 + bm_TGtkCellRendererToggle_activatable* = 0x00000002'i16 + bp_TGtkCellRendererToggle_activatable* = 1'i16 + bm_TGtkCellRendererToggle_radio* = 0x00000004'i16 + bp_TGtkCellRendererToggle_radio* = 2'i16 + +proc GTK_TYPE_CELL_RENDERER_TOGGLE*(): GType +proc GTK_CELL_RENDERER_TOGGLE*(obj: pointer): PGtkCellRendererToggle +proc GTK_CELL_RENDERER_TOGGLE_CLASS*(klass: pointer): PGtkCellRendererToggleClass +proc GTK_IS_CELL_RENDERER_TOGGLE*(obj: pointer): bool +proc GTK_IS_CELL_RENDERER_TOGGLE_CLASS*(klass: pointer): bool +proc GTK_CELL_RENDERER_TOGGLE_GET_CLASS*(obj: pointer): PGtkCellRendererToggleClass +proc active*(a: var TGtkCellRendererToggle): guint +proc set_active*(a: var TGtkCellRendererToggle, `active`: guint) +proc activatable*(a: var TGtkCellRendererToggle): guint +proc set_activatable*(a: var TGtkCellRendererToggle, `activatable`: guint) +proc radio*(a: var TGtkCellRendererToggle): guint +proc set_radio*(a: var TGtkCellRendererToggle, `radio`: guint) +proc gtk_cell_renderer_toggle_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_cell_renderer_toggle_get_type".} +proc gtk_cell_renderer_toggle_new*(): PGtkCellRenderer{.cdecl, dynlib: gtklib, + importc: "gtk_cell_renderer_toggle_new".} +proc gtk_cell_renderer_toggle_get_radio*(toggle: PGtkCellRendererToggle): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_cell_renderer_toggle_get_radio".} +proc gtk_cell_renderer_toggle_set_radio*(toggle: PGtkCellRendererToggle, + radio: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_cell_renderer_toggle_set_radio".} +proc gtk_cell_renderer_toggle_get_active*(toggle: PGtkCellRendererToggle): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_cell_renderer_toggle_get_active".} +proc gtk_cell_renderer_toggle_set_active*(toggle: PGtkCellRendererToggle, + setting: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_cell_renderer_toggle_set_active".} +proc GTK_TYPE_CELL_RENDERER_PIXBUF*(): GType +proc GTK_CELL_RENDERER_PIXBUF*(obj: pointer): PGtkCellRendererPixbuf +proc GTK_CELL_RENDERER_PIXBUF_CLASS*(klass: pointer): PGtkCellRendererPixbufClass +proc GTK_IS_CELL_RENDERER_PIXBUF*(obj: pointer): bool +proc GTK_IS_CELL_RENDERER_PIXBUF_CLASS*(klass: pointer): bool +proc GTK_CELL_RENDERER_PIXBUF_GET_CLASS*(obj: pointer): PGtkCellRendererPixbufClass +proc gtk_cell_renderer_pixbuf_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_cell_renderer_pixbuf_get_type".} +proc gtk_cell_renderer_pixbuf_new*(): PGtkCellRenderer{.cdecl, dynlib: gtklib, + importc: "gtk_cell_renderer_pixbuf_new".} +proc GTK_TYPE_ITEM*(): GType +proc GTK_ITEM*(obj: pointer): PGtkItem +proc GTK_ITEM_CLASS*(klass: pointer): PGtkItemClass +proc GTK_IS_ITEM*(obj: pointer): bool +proc GTK_IS_ITEM_CLASS*(klass: pointer): bool +proc GTK_ITEM_GET_CLASS*(obj: pointer): PGtkItemClass +proc gtk_item_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_item_get_type".} +proc gtk_item_select*(item: PGtkItem){.cdecl, dynlib: gtklib, + importc: "gtk_item_select".} +proc gtk_item_deselect*(item: PGtkItem){.cdecl, dynlib: gtklib, + importc: "gtk_item_deselect".} +proc gtk_item_toggle*(item: PGtkItem){.cdecl, dynlib: gtklib, + importc: "gtk_item_toggle".} +const + bm_TGtkMenuItem_show_submenu_indicator* = 0x00000001'i16 + bp_TGtkMenuItem_show_submenu_indicator* = 0'i16 + bm_TGtkMenuItem_submenu_placement* = 0x00000002'i16 + bp_TGtkMenuItem_submenu_placement* = 1'i16 + bm_TGtkMenuItem_submenu_direction* = 0x00000004'i16 + bp_TGtkMenuItem_submenu_direction* = 2'i16 + bm_TGtkMenuItem_right_justify* = 0x00000008'i16 + bp_TGtkMenuItem_right_justify* = 3'i16 + bm_TGtkMenuItem_timer_from_keypress* = 0x00000010'i16 + bp_TGtkMenuItem_timer_from_keypress* = 4'i16 + bm_TGtkMenuItemClass_hide_on_activate* = 0x00000001'i16 + bp_TGtkMenuItemClass_hide_on_activate* = 0'i16 + +proc GTK_TYPE_MENU_ITEM*(): GType +proc GTK_MENU_ITEM*(obj: pointer): PGtkMenuItem +proc GTK_MENU_ITEM_CLASS*(klass: pointer): PGtkMenuItemClass +proc GTK_IS_MENU_ITEM*(obj: pointer): bool +proc GTK_IS_MENU_ITEM_CLASS*(klass: pointer): bool +proc GTK_MENU_ITEM_GET_CLASS*(obj: pointer): PGtkMenuItemClass +proc show_submenu_indicator*(a: var TGtkMenuItem): guint +proc set_show_submenu_indicator*(a: var TGtkMenuItem, + `show_submenu_indicator`: guint) +proc submenu_placement*(a: var TGtkMenuItem): guint +proc set_submenu_placement*(a: var TGtkMenuItem, `submenu_placement`: guint) +proc submenu_direction*(a: var TGtkMenuItem): guint +proc set_submenu_direction*(a: var TGtkMenuItem, `submenu_direction`: guint) +proc right_justify*(a: var TGtkMenuItem): guint +proc set_right_justify*(a: var TGtkMenuItem, `right_justify`: guint) +proc timer_from_keypress*(a: var TGtkMenuItem): guint +proc set_timer_from_keypress*(a: var TGtkMenuItem, `timer_from_keypress`: guint) +proc hide_on_activate*(a: var TGtkMenuItemClass): guint +proc set_hide_on_activate*(a: var TGtkMenuItemClass, `hide_on_activate`: guint) +proc gtk_menu_item_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_menu_item_get_type".} +proc gtk_menu_item_new*(): PGtkMenuItem {.cdecl, dynlib: gtklib, + importc: "gtk_menu_item_new".} +proc gtk_menu_item_new_with_label*(`label`: cstring): PGtkMenuItem {.cdecl, + dynlib: gtklib, importc: "gtk_menu_item_new_with_label".} +proc gtk_menu_item_new_with_mnemonic*(`label`: cstring): PGtkMenuItem {.cdecl, + dynlib: gtklib, importc: "gtk_menu_item_new_with_mnemonic".} +proc gtk_menu_item_set_submenu*(menu_item: PGtkMenuItem, submenu: PGtkWidget){. + cdecl, dynlib: gtklib, importc: "gtk_menu_item_set_submenu".} +proc gtk_menu_item_get_submenu*(menu_item: PGtkMenuItem): PGtkWidget{.cdecl, + dynlib: gtklib, importc: "gtk_menu_item_get_submenu".} +proc gtk_menu_item_remove_submenu*(menu_item: PGtkMenuItem){.cdecl, + dynlib: gtklib, importc: "gtk_menu_item_remove_submenu".} +proc gtk_menu_item_select*(menu_item: PGtkMenuItem){.cdecl, dynlib: gtklib, + importc: "gtk_menu_item_select".} +proc gtk_menu_item_deselect*(menu_item: PGtkMenuItem){.cdecl, dynlib: gtklib, + importc: "gtk_menu_item_deselect".} +proc gtk_menu_item_activate*(menu_item: PGtkMenuItem){.cdecl, dynlib: gtklib, + importc: "gtk_menu_item_activate".} +proc gtk_menu_item_toggle_size_request*(menu_item: PGtkMenuItem, + requisition: Pgint){.cdecl, + dynlib: gtklib, importc: "gtk_menu_item_toggle_size_request".} +proc gtk_menu_item_toggle_size_allocate*(menu_item: PGtkMenuItem, + allocation: gint){.cdecl, dynlib: gtklib, + importc: "gtk_menu_item_toggle_size_allocate".} +proc gtk_menu_item_set_right_justified*(menu_item: PGtkMenuItem, + right_justified: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_menu_item_set_right_justified".} +proc gtk_menu_item_get_right_justified*(menu_item: PGtkMenuItem): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_menu_item_get_right_justified".} +proc gtk_menu_item_set_accel_path*(menu_item: PGtkMenuItem, accel_path: cstring){. + cdecl, dynlib: gtklib, importc: "gtk_menu_item_set_accel_path".} +proc gtk_menu_item_refresh_accel_path*(menu_item: PGtkMenuItem, + prefix: cstring, accel_group: PGtkAccelGroup, group_changed: gboolean){. + cdecl, dynlib: gtklib, importc: "_gtk_menu_item_refresh_accel_path".} +proc gtk_menu_item_is_selectable*(menu_item: PGtkWidget): gboolean{.cdecl, + dynlib: gtklib, importc: "_gtk_menu_item_is_selectable".} +const + bm_TGtkToggleButton_active* = 0x00000001'i16 + bp_TGtkToggleButton_active* = 0'i16 + bm_TGtkToggleButton_draw_indicator* = 0x00000002'i16 + bp_TGtkToggleButton_draw_indicator* = 1'i16 + bm_TGtkToggleButton_inconsistent* = 0x00000004'i16 + bp_TGtkToggleButton_inconsistent* = 2'i16 + +proc GTK_TYPE_TOGGLE_BUTTON*(): GType +proc GTK_TOGGLE_BUTTON*(obj: pointer): PGtkToggleButton +proc GTK_TOGGLE_BUTTON_CLASS*(klass: pointer): PGtkToggleButtonClass +proc GTK_IS_TOGGLE_BUTTON*(obj: pointer): bool +proc GTK_IS_TOGGLE_BUTTON_CLASS*(klass: pointer): bool +proc GTK_TOGGLE_BUTTON_GET_CLASS*(obj: pointer): PGtkToggleButtonClass +proc active*(a: var TGtkToggleButton): guint +proc set_active*(a: var TGtkToggleButton, `active`: guint) +proc draw_indicator*(a: var TGtkToggleButton): guint +proc set_draw_indicator*(a: var TGtkToggleButton, `draw_indicator`: guint) +proc inconsistent*(a: var TGtkToggleButton): guint +proc set_inconsistent*(a: var TGtkToggleButton, `inconsistent`: guint) +proc gtk_toggle_button_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_toggle_button_get_type".} +proc gtk_toggle_button_new*(): PGtkToggleButton {.cdecl, dynlib: gtklib, + importc: "gtk_toggle_button_new".} +proc gtk_toggle_button_new_with_label*(`label`: cstring): PGtkToggleButton {.cdecl, + dynlib: gtklib, importc: "gtk_toggle_button_new_with_label".} +proc gtk_toggle_button_new_with_mnemonic*(`label`: cstring): PGtkToggleButton {.cdecl, + dynlib: gtklib, importc: "gtk_toggle_button_new_with_mnemonic".} +proc gtk_toggle_button_set_mode*(toggle_button: PGtkToggleButton, + draw_indicator: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_toggle_button_set_mode".} +proc gtk_toggle_button_get_mode*(toggle_button: PGtkToggleButton): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_toggle_button_get_mode".} +proc gtk_toggle_button_set_active*(toggle_button: PGtkToggleButton, + is_active: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_toggle_button_set_active".} +proc gtk_toggle_button_get_active*(toggle_button: PGtkToggleButton): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_toggle_button_get_active".} +proc gtk_toggle_button_toggled*(toggle_button: PGtkToggleButton){.cdecl, + dynlib: gtklib, importc: "gtk_toggle_button_toggled".} +proc gtk_toggle_button_set_inconsistent*(toggle_button: PGtkToggleButton, + setting: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_toggle_button_set_inconsistent".} +proc gtk_toggle_button_get_inconsistent*(toggle_button: PGtkToggleButton): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_toggle_button_get_inconsistent".} +proc GTK_TYPE_CHECK_BUTTON*(): GType +proc GTK_CHECK_BUTTON*(obj: pointer): PGtkCheckButton +proc GTK_CHECK_BUTTON_CLASS*(klass: pointer): PGtkCheckButtonClass +proc GTK_IS_CHECK_BUTTON*(obj: pointer): bool +proc GTK_IS_CHECK_BUTTON_CLASS*(klass: pointer): bool +proc GTK_CHECK_BUTTON_GET_CLASS*(obj: pointer): PGtkCheckButtonClass +proc gtk_check_button_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_check_button_get_type".} +proc gtk_check_button_new*(): PGtkCheckButton{.cdecl, dynlib: gtklib, + importc: "gtk_check_button_new".} +proc gtk_check_button_new_with_label*(`label`: cstring): PGtkCheckButton{.cdecl, + dynlib: gtklib, importc: "gtk_check_button_new_with_label".} +proc gtk_check_button_new_with_mnemonic*(`label`: cstring): PGtkCheckButton {.cdecl, + dynlib: gtklib, importc: "gtk_check_button_new_with_mnemonic".} +proc gtk_check_button_get_props*(check_button: PGtkCheckButton, + indicator_size: Pgint, + indicator_spacing: Pgint){.cdecl, + dynlib: gtklib, importc: "_gtk_check_button_get_props".} +const + bm_TGtkCheckMenuItem_active* = 0x00000001'i16 + bp_TGtkCheckMenuItem_active* = 0'i16 + bm_TGtkCheckMenuItem_always_show_toggle* = 0x00000002'i16 + bp_TGtkCheckMenuItem_always_show_toggle* = 1'i16 + bm_TGtkCheckMenuItem_inconsistent* = 0x00000004'i16 + bp_TGtkCheckMenuItem_inconsistent* = 2'i16 + +proc GTK_TYPE_CHECK_MENU_ITEM*(): GType +proc GTK_CHECK_MENU_ITEM*(obj: pointer): PGtkCheckMenuItem +proc GTK_CHECK_MENU_ITEM_CLASS*(klass: pointer): PGtkCheckMenuItemClass +proc GTK_IS_CHECK_MENU_ITEM*(obj: pointer): bool +proc GTK_IS_CHECK_MENU_ITEM_CLASS*(klass: pointer): bool +proc GTK_CHECK_MENU_ITEM_GET_CLASS*(obj: pointer): PGtkCheckMenuItemClass +proc active*(a: var TGtkCheckMenuItem): guint +proc set_active*(a: var TGtkCheckMenuItem, `active`: guint) +proc always_show_toggle*(a: var TGtkCheckMenuItem): guint +proc set_always_show_toggle*(a: var TGtkCheckMenuItem, + `always_show_toggle`: guint) +proc inconsistent*(a: var TGtkCheckMenuItem): guint +proc set_inconsistent*(a: var TGtkCheckMenuItem, `inconsistent`: guint) +proc gtk_check_menu_item_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_check_menu_item_get_type".} +proc gtk_check_menu_item_new*(): PGtkWidget{.cdecl, dynlib: gtklib, + importc: "gtk_check_menu_item_new".} +proc gtk_check_menu_item_new_with_label*(`label`: cstring): PGtkWidget{.cdecl, + dynlib: gtklib, importc: "gtk_check_menu_item_new_with_label".} +proc gtk_check_menu_item_new_with_mnemonic*(`label`: cstring): PGtkWidget{.cdecl, + dynlib: gtklib, importc: "gtk_check_menu_item_new_with_mnemonic".} +proc gtk_check_menu_item_set_active*(check_menu_item: PGtkCheckMenuItem, + is_active: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_check_menu_item_set_active".} +proc gtk_check_menu_item_get_active*(check_menu_item: PGtkCheckMenuItem): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_check_menu_item_get_active".} +proc gtk_check_menu_item_toggled*(check_menu_item: PGtkCheckMenuItem){.cdecl, + dynlib: gtklib, importc: "gtk_check_menu_item_toggled".} +proc gtk_check_menu_item_set_inconsistent*(check_menu_item: PGtkCheckMenuItem, + setting: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_check_menu_item_set_inconsistent".} +proc gtk_check_menu_item_get_inconsistent*(check_menu_item: PGtkCheckMenuItem): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_check_menu_item_get_inconsistent".} +proc gtk_clipboard_get_for_display*(display: PGdkDisplay, selection: TGdkAtom): PGtkClipboard{. + cdecl, dynlib: gtklib, importc: "gtk_clipboard_get_for_display".} +proc gtk_clipboard_get_display*(clipboard: PGtkClipboard): PGdkDisplay{.cdecl, + dynlib: gtklib, importc: "gtk_clipboard_get_display".} +proc gtk_clipboard_set_with_data*(clipboard: PGtkClipboard, + targets: PGtkTargetEntry, n_targets: guint, + get_func: TGtkClipboardGetFunc, + clear_func: TGtkClipboardClearFunc, + user_data: gpointer): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_clipboard_set_with_data".} +proc gtk_clipboard_set_with_owner*(clipboard: PGtkClipboard, + targets: PGtkTargetEntry, n_targets: guint, + get_func: TGtkClipboardGetFunc, + clear_func: TGtkClipboardClearFunc, + owner: PGObject): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_clipboard_set_with_owner".} +proc gtk_clipboard_get_owner*(clipboard: PGtkClipboard): PGObject{.cdecl, + dynlib: gtklib, importc: "gtk_clipboard_get_owner".} +proc gtk_clipboard_clear*(clipboard: PGtkClipboard){.cdecl, dynlib: gtklib, + importc: "gtk_clipboard_clear".} +proc gtk_clipboard_set_text*(clipboard: PGtkClipboard, text: cstring, len: gint){. + cdecl, dynlib: gtklib, importc: "gtk_clipboard_set_text".} +proc gtk_clipboard_request_contents*(clipboard: PGtkClipboard, target: TGdkAtom, + callback: TGtkClipboardReceivedFunc, + user_data: gpointer){.cdecl, + dynlib: gtklib, importc: "gtk_clipboard_request_contents".} +proc gtk_clipboard_request_text*(clipboard: PGtkClipboard, + callback: TGtkClipboardTextReceivedFunc, + user_data: gpointer){.cdecl, dynlib: gtklib, + importc: "gtk_clipboard_request_text".} +proc gtk_clipboard_wait_for_contents*(clipboard: PGtkClipboard, target: TGdkAtom): PGtkSelectionData{. + cdecl, dynlib: gtklib, importc: "gtk_clipboard_wait_for_contents".} +proc gtk_clipboard_wait_for_text*(clipboard: PGtkClipboard): cstring{.cdecl, + dynlib: gtklib, importc: "gtk_clipboard_wait_for_text".} +proc gtk_clipboard_wait_is_text_available*(clipboard: PGtkClipboard): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_clipboard_wait_is_text_available".} +const + GTK_CLIST_IN_DRAG* = 1 shl 0 + GTK_CLIST_ROW_HEIGHT_SET* = 1 shl 1 + GTK_CLIST_SHOW_TITLES* = 1 shl 2 + GTK_CLIST_ADD_MODE* = 1 shl 4 + GTK_CLIST_AUTO_SORT* = 1 shl 5 + GTK_CLIST_AUTO_RESIZE_BLOCKED* = 1 shl 6 + GTK_CLIST_REORDERABLE* = 1 shl 7 + GTK_CLIST_USE_DRAG_ICONS* = 1 shl 8 + GTK_CLIST_DRAW_DRAG_LINE* = 1 shl 9 + GTK_CLIST_DRAW_DRAG_RECT* = 1 shl 10 + GTK_BUTTON_IGNORED* = 0 + GTK_BUTTON_SELECTS* = 1 shl 0 + GTK_BUTTON_DRAGS* = 1 shl 1 + GTK_BUTTON_EXPANDS* = 1 shl 2 + +const + bm_TGtkCListColumn_visible* = 0x00000001'i16 + bp_TGtkCListColumn_visible* = 0'i16 + bm_TGtkCListColumn_width_set* = 0x00000002'i16 + bp_TGtkCListColumn_width_set* = 1'i16 + bm_TGtkCListColumn_resizeable* = 0x00000004'i16 + bp_TGtkCListColumn_resizeable* = 2'i16 + bm_TGtkCListColumn_auto_resize* = 0x00000008'i16 + bp_TGtkCListColumn_auto_resize* = 3'i16 + bm_TGtkCListColumn_button_passive* = 0x00000010'i16 + bp_TGtkCListColumn_button_passive* = 4'i16 + bm_TGtkCListRow_fg_set* = 0x00000001'i16 + bp_TGtkCListRow_fg_set* = 0'i16 + bm_TGtkCListRow_bg_set* = 0x00000002'i16 + bp_TGtkCListRow_bg_set* = 1'i16 + bm_TGtkCListRow_selectable* = 0x00000004'i16 + bp_TGtkCListRow_selectable* = 2'i16 + +proc GTK_TYPE_CLIST*(): GType +proc GTK_CLIST*(obj: pointer): PGtkCList +proc GTK_CLIST_CLASS*(klass: pointer): PGtkCListClass +proc GTK_IS_CLIST*(obj: pointer): bool +proc GTK_IS_CLIST_CLASS*(klass: pointer): bool +proc GTK_CLIST_GET_CLASS*(obj: pointer): PGtkCListClass +proc GTK_CLIST_FLAGS*(clist: pointer): guint16 +proc GTK_CLIST_SET_FLAG*(clist: PGtkCList, flag: guint16) +proc GTK_CLIST_UNSET_FLAG*(clist: PGtkCList, flag: guint16) +#proc GTK_CLIST_IN_DRAG_get*(clist: pointer): bool +#proc GTK_CLIST_ROW_HEIGHT_SET_get*(clist: pointer): bool +#proc GTK_CLIST_SHOW_TITLES_get*(clist: pointer): bool +#proc GTK_CLIST_ADD_MODE_get*(clist: pointer): bool +#proc GTK_CLIST_AUTO_SORT_get*(clist: pointer): bool +#proc GTK_CLIST_AUTO_RESIZE_BLOCKED_get*(clist: pointer): bool +#proc GTK_CLIST_REORDERABLE_get*(clist: pointer): bool +#proc GTK_CLIST_USE_DRAG_ICONS_get*(clist: pointer): bool +#proc GTK_CLIST_DRAW_DRAG_LINE_get*(clist: pointer): bool +#proc GTK_CLIST_DRAW_DRAG_RECT_get*(clist: pointer): bool +#proc GTK_CLIST_ROW_get*(glist: PGList): PGtkCListRow +#proc GTK_CELL_TEXT_get*(cell: pointer): PGtkCellText +#proc GTK_CELL_PIXMAP_get*(cell: pointer): PGtkCellPixmap +#proc GTK_CELL_PIXTEXT_get*(cell: pointer): PGtkCellPixText +#proc GTK_CELL_WIDGET_get*(cell: pointer): PGtkCellWidget +proc visible*(a: var TGtkCListColumn): guint +proc set_visible*(a: var TGtkCListColumn, `visible`: guint) +proc width_set*(a: var TGtkCListColumn): guint +proc set_width_set*(a: var TGtkCListColumn, `width_set`: guint) +proc resizeable*(a: var TGtkCListColumn): guint +proc set_resizeable*(a: var TGtkCListColumn, `resizeable`: guint) +proc auto_resize*(a: var TGtkCListColumn): guint +proc set_auto_resize*(a: var TGtkCListColumn, `auto_resize`: guint) +proc button_passive*(a: var TGtkCListColumn): guint +proc set_button_passive*(a: var TGtkCListColumn, `button_passive`: guint) +proc fg_set*(a: var TGtkCListRow): guint +proc set_fg_set*(a: var TGtkCListRow, `fg_set`: guint) +proc bg_set*(a: var TGtkCListRow): guint +proc set_bg_set*(a: var TGtkCListRow, `bg_set`: guint) +proc selectable*(a: var TGtkCListRow): guint +proc set_selectable*(a: var TGtkCListRow, `selectable`: guint) +proc gtk_clist_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_clist_get_type".} +proc gtk_clist_new*(columns: gint): PGtkCList {.cdecl, dynlib: gtklib, + importc: "gtk_clist_new".} +proc gtk_clist_set_hadjustment*(clist: PGtkCList, adjustment: PGtkAdjustment){. + cdecl, dynlib: gtklib, importc: "gtk_clist_set_hadjustment".} +proc gtk_clist_set_vadjustment*(clist: PGtkCList, adjustment: PGtkAdjustment){. + cdecl, dynlib: gtklib, importc: "gtk_clist_set_vadjustment".} +proc gtk_clist_get_hadjustment*(clist: PGtkCList): PGtkAdjustment{.cdecl, + dynlib: gtklib, importc: "gtk_clist_get_hadjustment".} +proc gtk_clist_get_vadjustment*(clist: PGtkCList): PGtkAdjustment{.cdecl, + dynlib: gtklib, importc: "gtk_clist_get_vadjustment".} +proc gtk_clist_set_shadow_type*(clist: PGtkCList, thetype: TGtkShadowType){. + cdecl, dynlib: gtklib, importc: "gtk_clist_set_shadow_type".} +proc gtk_clist_set_selection_mode*(clist: PGtkCList, mode: TGtkSelectionMode){. + cdecl, dynlib: gtklib, importc: "gtk_clist_set_selection_mode".} +proc gtk_clist_set_reorderable*(clist: PGtkCList, reorderable: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_clist_set_reorderable".} +proc gtk_clist_set_use_drag_icons*(clist: PGtkCList, use_icons: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_clist_set_use_drag_icons".} +proc gtk_clist_set_button_actions*(clist: PGtkCList, button: guint, + button_actions: guint8){.cdecl, + dynlib: gtklib, importc: "gtk_clist_set_button_actions".} +proc gtk_clist_freeze*(clist: PGtkCList){.cdecl, dynlib: gtklib, + importc: "gtk_clist_freeze".} +proc gtk_clist_thaw*(clist: PGtkCList){.cdecl, dynlib: gtklib, + importc: "gtk_clist_thaw".} +proc gtk_clist_column_titles_show*(clist: PGtkCList){.cdecl, dynlib: gtklib, + importc: "gtk_clist_column_titles_show".} +proc gtk_clist_column_titles_hide*(clist: PGtkCList){.cdecl, dynlib: gtklib, + importc: "gtk_clist_column_titles_hide".} +proc gtk_clist_column_title_active*(clist: PGtkCList, column: gint){.cdecl, + dynlib: gtklib, importc: "gtk_clist_column_title_active".} +proc gtk_clist_column_title_passive*(clist: PGtkCList, column: gint){.cdecl, + dynlib: gtklib, importc: "gtk_clist_column_title_passive".} +proc gtk_clist_column_titles_active*(clist: PGtkCList){.cdecl, dynlib: gtklib, + importc: "gtk_clist_column_titles_active".} +proc gtk_clist_column_titles_passive*(clist: PGtkCList){.cdecl, dynlib: gtklib, + importc: "gtk_clist_column_titles_passive".} +proc gtk_clist_set_column_title*(clist: PGtkCList, column: gint, title: cstring){. + cdecl, dynlib: gtklib, importc: "gtk_clist_set_column_title".} +proc gtk_clist_get_column_title*(clist: PGtkCList, column: gint): cstring{.cdecl, + dynlib: gtklib, importc: "gtk_clist_get_column_title".} +proc gtk_clist_set_column_widget*(clist: PGtkCList, column: gint, + widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_clist_set_column_widget".} +proc gtk_clist_get_column_widget*(clist: PGtkCList, column: gint): PGtkWidget{. + cdecl, dynlib: gtklib, importc: "gtk_clist_get_column_widget".} +proc gtk_clist_set_column_justification*(clist: PGtkCList, column: gint, + justification: TGtkJustification){.cdecl, dynlib: gtklib, importc: "gtk_clist_set_column_justification".} +proc gtk_clist_set_column_visibility*(clist: PGtkCList, column: gint, + visible: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_clist_set_column_visibility".} +proc gtk_clist_set_column_resizeable*(clist: PGtkCList, column: gint, + resizeable: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_clist_set_column_resizeable".} +proc gtk_clist_set_column_auto_resize*(clist: PGtkCList, column: gint, + auto_resize: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_clist_set_column_auto_resize".} +proc gtk_clist_columns_autosize*(clist: PGtkCList): gint{.cdecl, dynlib: gtklib, + importc: "gtk_clist_columns_autosize".} +proc gtk_clist_optimal_column_width*(clist: PGtkCList, column: gint): gint{. + cdecl, dynlib: gtklib, importc: "gtk_clist_optimal_column_width".} +proc gtk_clist_set_column_width*(clist: PGtkCList, column: gint, width: gint){. + cdecl, dynlib: gtklib, importc: "gtk_clist_set_column_width".} +proc gtk_clist_set_column_min_width*(clist: PGtkCList, column: gint, + min_width: gint){.cdecl, dynlib: gtklib, + importc: "gtk_clist_set_column_min_width".} +proc gtk_clist_set_column_max_width*(clist: PGtkCList, column: gint, + max_width: gint){.cdecl, dynlib: gtklib, + importc: "gtk_clist_set_column_max_width".} +proc gtk_clist_set_row_height*(clist: PGtkCList, height: guint){.cdecl, + dynlib: gtklib, importc: "gtk_clist_set_row_height".} +proc gtk_clist_moveto*(clist: PGtkCList, row: gint, column: gint, + row_align: gfloat, col_align: gfloat){.cdecl, + dynlib: gtklib, importc: "gtk_clist_moveto".} +proc gtk_clist_row_is_visible*(clist: PGtkCList, row: gint): TGtkVisibility{. + cdecl, dynlib: gtklib, importc: "gtk_clist_row_is_visible".} +proc gtk_clist_get_cell_type*(clist: PGtkCList, row: gint, column: gint): TGtkCellType{. + cdecl, dynlib: gtklib, importc: "gtk_clist_get_cell_type".} +proc gtk_clist_set_text*(clist: PGtkCList, row: gint, column: gint, text: cstring){. + cdecl, dynlib: gtklib, importc: "gtk_clist_set_text".} +proc gtk_clist_get_text*(clist: PGtkCList, row: gint, column: gint, + text: PPgchar): gint{.cdecl, dynlib: gtklib, + importc: "gtk_clist_get_text".} +proc gtk_clist_set_pixmap*(clist: PGtkCList, row: gint, column: gint, + pixmap: PGdkPixmap, mask: PGdkBitmap){.cdecl, + dynlib: gtklib, importc: "gtk_clist_set_pixmap".} +proc gtk_clist_get_pixmap*(clist: PGtkCList, row: gint, column: gint, + pixmap: var PGdkPixmap, mask: var PGdkBitmap): gint{. + cdecl, dynlib: gtklib, importc: "gtk_clist_get_pixmap".} +proc gtk_clist_set_pixtext*(clist: PGtkCList, row: gint, column: gint, + text: cstring, spacing: guint8, pixmap: PGdkPixmap, + mask: PGdkBitmap){.cdecl, dynlib: gtklib, + importc: "gtk_clist_set_pixtext".} +proc gtk_clist_set_foreground*(clist: PGtkCList, row: gint, color: PGdkColor){. + cdecl, dynlib: gtklib, importc: "gtk_clist_set_foreground".} +proc gtk_clist_set_background*(clist: PGtkCList, row: gint, color: PGdkColor){. + cdecl, dynlib: gtklib, importc: "gtk_clist_set_background".} +proc gtk_clist_set_cell_style*(clist: PGtkCList, row: gint, column: gint, + style: PGtkStyle){.cdecl, dynlib: gtklib, + importc: "gtk_clist_set_cell_style".} +proc gtk_clist_get_cell_style*(clist: PGtkCList, row: gint, column: gint): PGtkStyle{. + cdecl, dynlib: gtklib, importc: "gtk_clist_get_cell_style".} +proc gtk_clist_set_row_style*(clist: PGtkCList, row: gint, style: PGtkStyle){. + cdecl, dynlib: gtklib, importc: "gtk_clist_set_row_style".} +proc gtk_clist_get_row_style*(clist: PGtkCList, row: gint): PGtkStyle{.cdecl, + dynlib: gtklib, importc: "gtk_clist_get_row_style".} +proc gtk_clist_set_shift*(clist: PGtkCList, row: gint, column: gint, + vertical: gint, horizontal: gint){.cdecl, + dynlib: gtklib, importc: "gtk_clist_set_shift".} +proc gtk_clist_set_selectable*(clist: PGtkCList, row: gint, selectable: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_clist_set_selectable".} +proc gtk_clist_get_selectable*(clist: PGtkCList, row: gint): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_clist_get_selectable".} +proc gtk_clist_remove*(clist: PGtkCList, row: gint){.cdecl, dynlib: gtklib, + importc: "gtk_clist_remove".} +proc gtk_clist_set_row_data*(clist: PGtkCList, row: gint, data: gpointer){. + cdecl, dynlib: gtklib, importc: "gtk_clist_set_row_data".} +proc gtk_clist_set_row_data_full*(clist: PGtkCList, row: gint, data: gpointer, + destroy: TGtkDestroyNotify){.cdecl, + dynlib: gtklib, importc: "gtk_clist_set_row_data_full".} +proc gtk_clist_get_row_data*(clist: PGtkCList, row: gint): gpointer{.cdecl, + dynlib: gtklib, importc: "gtk_clist_get_row_data".} +proc gtk_clist_find_row_from_data*(clist: PGtkCList, data: gpointer): gint{. + cdecl, dynlib: gtklib, importc: "gtk_clist_find_row_from_data".} +proc gtk_clist_select_row*(clist: PGtkCList, row: gint, column: gint){.cdecl, + dynlib: gtklib, importc: "gtk_clist_select_row".} +proc gtk_clist_unselect_row*(clist: PGtkCList, row: gint, column: gint){.cdecl, + dynlib: gtklib, importc: "gtk_clist_unselect_row".} +proc gtk_clist_undo_selection*(clist: PGtkCList){.cdecl, dynlib: gtklib, + importc: "gtk_clist_undo_selection".} +proc gtk_clist_clear*(clist: PGtkCList){.cdecl, dynlib: gtklib, + importc: "gtk_clist_clear".} +proc gtk_clist_get_selection_info*(clist: PGtkCList, x: gint, y: gint, + row: Pgint, column: Pgint): gint{.cdecl, + dynlib: gtklib, importc: "gtk_clist_get_selection_info".} +proc gtk_clist_select_all*(clist: PGtkCList){.cdecl, dynlib: gtklib, + importc: "gtk_clist_select_all".} +proc gtk_clist_unselect_all*(clist: PGtkCList){.cdecl, dynlib: gtklib, + importc: "gtk_clist_unselect_all".} +proc gtk_clist_swap_rows*(clist: PGtkCList, row1: gint, row2: gint){.cdecl, + dynlib: gtklib, importc: "gtk_clist_swap_rows".} +proc gtk_clist_row_move*(clist: PGtkCList, source_row: gint, dest_row: gint){. + cdecl, dynlib: gtklib, importc: "gtk_clist_row_move".} +proc gtk_clist_set_compare_func*(clist: PGtkCList, + cmp_func: TGtkCListCompareFunc){.cdecl, + dynlib: gtklib, importc: "gtk_clist_set_compare_func".} +proc gtk_clist_set_sort_column*(clist: PGtkCList, column: gint){.cdecl, + dynlib: gtklib, importc: "gtk_clist_set_sort_column".} +proc gtk_clist_set_sort_type*(clist: PGtkCList, sort_type: TGtkSortType){.cdecl, + dynlib: gtklib, importc: "gtk_clist_set_sort_type".} +proc gtk_clist_sort*(clist: PGtkCList){.cdecl, dynlib: gtklib, + importc: "gtk_clist_sort".} +proc gtk_clist_set_auto_sort*(clist: PGtkCList, auto_sort: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_clist_set_auto_sort".} +proc gtk_clist_create_cell_layout*(clist: PGtkCList, clist_row: PGtkCListRow, + column: gint): PPangoLayout{.cdecl, + dynlib: gtklib, importc: "_gtk_clist_create_cell_layout".} +const + GTK_DIALOG_MODAL* = 1 shl 0 + GTK_DIALOG_DESTROY_WITH_PARENT* = 1 shl 1 + GTK_DIALOG_NO_SEPARATOR* = 1 shl 2 + GTK_RESPONSE_NONE* = - (1) + GTK_RESPONSE_REJECT* = - (2) + GTK_RESPONSE_ACCEPT* = - (3) + GTK_RESPONSE_DELETE_EVENT* = - (4) + GTK_RESPONSE_OK* = - (5) + GTK_RESPONSE_CANCEL* = - (6) + GTK_RESPONSE_CLOSE* = - (7) + GTK_RESPONSE_YES* = - (8) + GTK_RESPONSE_NO* = - (9) + GTK_RESPONSE_APPLY* = - (10) + GTK_RESPONSE_HELP* = - (11) + +proc GTK_TYPE_DIALOG*(): GType +proc GTK_DIALOG*(obj: pointer): PGtkDialog +proc GTK_DIALOG_CLASS*(klass: pointer): PGtkDialogClass +proc GTK_IS_DIALOG*(obj: pointer): bool +proc GTK_IS_DIALOG_CLASS*(klass: pointer): bool +proc GTK_DIALOG_GET_CLASS*(obj: pointer): PGtkDialogClass +proc gtk_dialog_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_dialog_get_type".} +proc gtk_dialog_new*(): PGtkDialog {.cdecl, dynlib: gtklib, + importc: "gtk_dialog_new".} +proc gtk_dialog_add_action_widget*(dialog: PGtkDialog, child: PGtkWidget, + response_id: gint){.cdecl, dynlib: gtklib, + importc: "gtk_dialog_add_action_widget".} +proc gtk_dialog_add_button*(dialog: PGtkDialog, button_text: cstring, + response_id: gint): PGtkWidget{.cdecl, + dynlib: gtklib, importc: "gtk_dialog_add_button".} +proc gtk_dialog_set_response_sensitive*(dialog: PGtkDialog, response_id: gint, + setting: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_dialog_set_response_sensitive".} +proc gtk_dialog_set_default_response*(dialog: PGtkDialog, response_id: gint){. + cdecl, dynlib: gtklib, importc: "gtk_dialog_set_default_response".} +proc gtk_dialog_set_has_separator*(dialog: PGtkDialog, setting: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_dialog_set_has_separator".} +proc gtk_dialog_get_has_separator*(dialog: PGtkDialog): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_dialog_get_has_separator".} +proc gtk_dialog_response*(dialog: PGtkDialog, response_id: gint){.cdecl, + dynlib: gtklib, importc: "gtk_dialog_response".} +proc gtk_dialog_run*(dialog: PGtkDialog): gint{.cdecl, dynlib: gtklib, + importc: "gtk_dialog_run".} +proc gtk_show_about_dialog*(parent: PGtkWindow, firstPropertyName: cstring) {. + cdecl, dynlib: gtklib, importc: "gtk_show_about_dialog", varargs.} + +proc GTK_TYPE_VBOX*(): GType +proc GTK_VBOX*(obj: pointer): PGtkVBox +proc GTK_VBOX_CLASS*(klass: pointer): PGtkVBoxClass +proc GTK_IS_VBOX*(obj: pointer): bool +proc GTK_IS_VBOX_CLASS*(klass: pointer): bool +proc GTK_VBOX_GET_CLASS*(obj: pointer): PGtkVBoxClass +proc gtk_vbox_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_vbox_get_type".} +proc gtk_vbox_new*(homogeneous: gboolean, spacing: gint): PGtkVBox {.cdecl, + dynlib: gtklib, importc: "gtk_vbox_new".} +proc GTK_TYPE_COLOR_SELECTION*(): GType +proc GTK_COLOR_SELECTION*(obj: pointer): PGtkColorSelection +proc GTK_COLOR_SELECTION_CLASS*(klass: pointer): PGtkColorSelectionClass +proc GTK_IS_COLOR_SELECTION*(obj: pointer): bool +proc GTK_IS_COLOR_SELECTION_CLASS*(klass: pointer): bool +proc GTK_COLOR_SELECTION_GET_CLASS*(obj: pointer): PGtkColorSelectionClass +proc gtk_color_selection_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_color_selection_get_type".} +proc gtk_color_selection_new*(): PGtkColorSelection {.cdecl, dynlib: gtklib, + importc: "gtk_color_selection_new".} +proc gtk_color_selection_get_has_opacity_control*(colorsel: PGtkColorSelection): gboolean{. + cdecl, dynlib: gtklib, + importc: "gtk_color_selection_get_has_opacity_control".} +proc gtk_color_selection_set_has_opacity_control*(colorsel: PGtkColorSelection, + has_opacity: gboolean){.cdecl, dynlib: gtklib, importc: "gtk_color_selection_set_has_opacity_control".} +proc gtk_color_selection_get_has_palette*(colorsel: PGtkColorSelection): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_color_selection_get_has_palette".} +proc gtk_color_selection_set_has_palette*(colorsel: PGtkColorSelection, + has_palette: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_color_selection_set_has_palette".} +proc gtk_color_selection_set_current_color*(colorsel: PGtkColorSelection, + color: PGdkColor){.cdecl, dynlib: gtklib, + importc: "gtk_color_selection_set_current_color".} +proc gtk_color_selection_set_current_alpha*(colorsel: PGtkColorSelection, + alpha: guint16){.cdecl, dynlib: gtklib, + importc: "gtk_color_selection_set_current_alpha".} +proc gtk_color_selection_get_current_color*(colorsel: PGtkColorSelection, + color: PGdkColor){.cdecl, dynlib: gtklib, + importc: "gtk_color_selection_get_current_color".} +proc gtk_color_selection_get_current_alpha*(colorsel: PGtkColorSelection): guint16{. + cdecl, dynlib: gtklib, importc: "gtk_color_selection_get_current_alpha".} +proc gtk_color_selection_set_previous_color*(colorsel: PGtkColorSelection, + color: PGdkColor){.cdecl, dynlib: gtklib, + importc: "gtk_color_selection_set_previous_color".} +proc gtk_color_selection_set_previous_alpha*(colorsel: PGtkColorSelection, + alpha: guint16){.cdecl, dynlib: gtklib, + importc: "gtk_color_selection_set_previous_alpha".} +proc gtk_color_selection_get_previous_color*(colorsel: PGtkColorSelection, + color: PGdkColor){.cdecl, dynlib: gtklib, + importc: "gtk_color_selection_get_previous_color".} +proc gtk_color_selection_get_previous_alpha*(colorsel: PGtkColorSelection): guint16{. + cdecl, dynlib: gtklib, importc: "gtk_color_selection_get_previous_alpha".} +proc gtk_color_selection_is_adjusting*(colorsel: PGtkColorSelection): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_color_selection_is_adjusting".} +proc gtk_color_selection_palette_from_string*(str: cstring, + colors: var PGdkColor, n_colors: Pgint): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_color_selection_palette_from_string".} +proc gtk_color_selection_palette_to_string*(colors: PGdkColor, n_colors: gint): cstring{. + cdecl, dynlib: gtklib, importc: "gtk_color_selection_palette_to_string".} +proc gtk_color_selection_set_change_palette_with_screen_hook*( + func: TGtkColorSelectionChangePaletteWithScreenFunc): TGtkColorSelectionChangePaletteWithScreenFunc{. + cdecl, dynlib: gtklib, + importc: "gtk_color_selection_set_change_palette_with_screen_hook".} +proc GTK_TYPE_COLOR_SELECTION_DIALOG*(): GType +proc GTK_COLOR_SELECTION_DIALOG*(obj: pointer): PGtkColorSelectionDialog +proc GTK_COLOR_SELECTION_DIALOG_CLASS*(klass: pointer): PGtkColorSelectionDialogClass +proc GTK_IS_COLOR_SELECTION_DIALOG*(obj: pointer): bool +proc GTK_IS_COLOR_SELECTION_DIALOG_CLASS*(klass: pointer): bool +proc GTK_COLOR_SELECTION_DIALOG_GET_CLASS*(obj: pointer): PGtkColorSelectionDialogClass +proc gtk_color_selection_dialog_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_color_selection_dialog_get_type".} +proc gtk_color_selection_dialog_new*(title: cstring): PGtkColorSelectionDialog {.cdecl, + dynlib: gtklib, importc: "gtk_color_selection_dialog_new".} +proc GTK_TYPE_HBOX*(): GType +proc GTK_HBOX*(obj: pointer): PGtkHBox +proc GTK_HBOX_CLASS*(klass: pointer): PGtkHBoxClass +proc GTK_IS_HBOX*(obj: pointer): bool +proc GTK_IS_HBOX_CLASS*(klass: pointer): bool +proc GTK_HBOX_GET_CLASS*(obj: pointer): PGtkHBoxClass +proc gtk_hbox_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_hbox_get_type".} +proc gtk_hbox_new*(homogeneous: gboolean, spacing: gint): PGtkHBox {.cdecl, + dynlib: gtklib, importc: "gtk_hbox_new".} +const + bm_TGtkCombo_value_in_list* = 0x00000001'i16 + bp_TGtkCombo_value_in_list* = 0'i16 + bm_TGtkCombo_ok_if_empty* = 0x00000002'i16 + bp_TGtkCombo_ok_if_empty* = 1'i16 + bm_TGtkCombo_case_sensitive* = 0x00000004'i16 + bp_TGtkCombo_case_sensitive* = 2'i16 + bm_TGtkCombo_use_arrows* = 0x00000008'i16 + bp_TGtkCombo_use_arrows* = 3'i16 + bm_TGtkCombo_use_arrows_always* = 0x00000010'i16 + bp_TGtkCombo_use_arrows_always* = 4'i16 + +proc GTK_TYPE_COMBO*(): GType +proc GTK_COMBO*(obj: pointer): PGtkCombo +proc GTK_COMBO_CLASS*(klass: pointer): PGtkComboClass +proc GTK_IS_COMBO*(obj: pointer): bool +proc GTK_IS_COMBO_CLASS*(klass: pointer): bool +proc GTK_COMBO_GET_CLASS*(obj: pointer): PGtkComboClass +proc value_in_list*(a: var TGtkCombo): guint +proc set_value_in_list*(a: var TGtkCombo, `value_in_list`: guint) +proc ok_if_empty*(a: var TGtkCombo): guint +proc set_ok_if_empty*(a: var TGtkCombo, `ok_if_empty`: guint) +proc case_sensitive*(a: var TGtkCombo): guint +proc set_case_sensitive*(a: var TGtkCombo, `case_sensitive`: guint) +proc use_arrows*(a: var TGtkCombo): guint +proc set_use_arrows*(a: var TGtkCombo, `use_arrows`: guint) +proc use_arrows_always*(a: var TGtkCombo): guint +proc set_use_arrows_always*(a: var TGtkCombo, `use_arrows_always`: guint) +proc gtk_combo_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_combo_get_type".} +proc gtk_combo_new*(): PGtkCombo {.cdecl, dynlib: gtklib, + importc: "gtk_combo_new".} +proc gtk_combo_set_value_in_list*(combo: PGtkCombo, val: gboolean, + ok_if_empty: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_combo_set_value_in_list".} +proc gtk_combo_set_use_arrows*(combo: PGtkCombo, val: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_combo_set_use_arrows".} +proc gtk_combo_set_use_arrows_always*(combo: PGtkCombo, val: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_combo_set_use_arrows_always".} +proc gtk_combo_set_case_sensitive*(combo: PGtkCombo, val: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_combo_set_case_sensitive".} +proc gtk_combo_set_item_string*(combo: PGtkCombo, item: PGtkItem, + item_value: cstring){.cdecl, dynlib: gtklib, + importc: "gtk_combo_set_item_string".} +proc gtk_combo_set_popdown_strings*(combo: PGtkCombo, strings: PGList){.cdecl, + dynlib: gtklib, importc: "gtk_combo_set_popdown_strings".} +proc gtk_combo_disable_activate*(combo: PGtkCombo){.cdecl, dynlib: gtklib, + importc: "gtk_combo_disable_activate".} +const + bm_TGtkCTree_line_style* = 0x00000003'i16 + bp_TGtkCTree_line_style* = 0'i16 + bm_TGtkCTree_expander_style* = 0x0000000C'i16 + bp_TGtkCTree_expander_style* = 2'i16 + bm_TGtkCTree_show_stub* = 0x00000010'i16 + bp_TGtkCTree_show_stub* = 4'i16 + bm_TGtkCTreeRow_is_leaf* = 0x00000001'i16 + bp_TGtkCTreeRow_is_leaf* = 0'i16 + bm_TGtkCTreeRow_expanded* = 0x00000002'i16 + bp_TGtkCTreeRow_expanded* = 1'i16 + +proc GTK_TYPE_CTREE*(): GType +proc GTK_CTREE*(obj: pointer): PGtkCTree +proc GTK_CTREE_CLASS*(klass: pointer): PGtkCTreeClass +proc GTK_IS_CTREE*(obj: pointer): bool +proc GTK_IS_CTREE_CLASS*(klass: pointer): bool +proc GTK_CTREE_GET_CLASS*(obj: pointer): PGtkCTreeClass +proc GTK_CTREE_ROW*(`node`: TAddress): PGtkCTreeRow +proc GTK_CTREE_NODE*(`node`: TAddress): PGtkCTreeNode +proc GTK_CTREE_NODE_NEXT*(`nnode`: TAddress): PGtkCTreeNode +proc GTK_CTREE_NODE_PREV*(`pnode`: TAddress): PGtkCTreeNode +proc GTK_CTREE_FUNC*(`func`: TAddress): TGtkCTreeFunc +proc GTK_TYPE_CTREE_NODE*(): GType +proc line_style*(a: var TGtkCTree): guint +proc set_line_style*(a: var TGtkCTree, `line_style`: guint) +proc expander_style*(a: var TGtkCTree): guint +proc set_expander_style*(a: var TGtkCTree, `expander_style`: guint) +proc show_stub*(a: var TGtkCTree): guint +proc set_show_stub*(a: var TGtkCTree, `show_stub`: guint) +proc is_leaf*(a: var TGtkCTreeRow): guint +proc set_is_leaf*(a: var TGtkCTreeRow, `is_leaf`: guint) +proc expanded*(a: var TGtkCTreeRow): guint +proc set_expanded*(a: var TGtkCTreeRow, `expanded`: guint) +proc gtk_ctree_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_ctree_get_type".} +proc gtk_ctree_new*(columns: gint, tree_column: gint): PGtkCTree {.cdecl, + dynlib: gtklib, importc: "gtk_ctree_new".} +proc gtk_ctree_insert_node*(ctree: PGtkCTree, parent: PGtkCTreeNode, + sibling: PGtkCTreeNode, text: openarray[cstring], + spacing: guint8, pixmap_closed: PGdkPixmap, + mask_closed: PGdkBitmap, pixmap_opened: PGdkPixmap, + mask_opened: PGdkBitmap, is_leaf: gboolean, + expanded: gboolean): PGtkCTreeNode{.cdecl, + dynlib: gtklib, importc: "gtk_ctree_insert_node".} +proc gtk_ctree_remove_node*(ctree: PGtkCTree, node: PGtkCTreeNode){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_remove_node".} +proc gtk_ctree_insert_gnode*(ctree: PGtkCTree, parent: PGtkCTreeNode, + sibling: PGtkCTreeNode, gnode: PGNode, + fun: TGtkCTreeGNodeFunc, data: gpointer): PGtkCTreeNode{. + cdecl, dynlib: gtklib, importc: "gtk_ctree_insert_gnode".} +proc gtk_ctree_export_to_gnode*(ctree: PGtkCTree, parent: PGNode, + sibling: PGNode, node: PGtkCTreeNode, + fun: TGtkCTreeGNodeFunc, data: gpointer): PGNode{. + cdecl, dynlib: gtklib, importc: "gtk_ctree_export_to_gnode".} +proc gtk_ctree_post_recursive*(ctree: PGtkCTree, node: PGtkCTreeNode, + fun: TGtkCTreeFunc, data: gpointer){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_post_recursive".} +proc gtk_ctree_post_recursive_to_depth*(ctree: PGtkCTree, node: PGtkCTreeNode, + depth: gint, fun: TGtkCTreeFunc, + data: gpointer){.cdecl, dynlib: gtklib, + importc: "gtk_ctree_post_recursive_to_depth".} +proc gtk_ctree_pre_recursive*(ctree: PGtkCTree, node: PGtkCTreeNode, + fun: TGtkCTreeFunc, data: gpointer){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_pre_recursive".} +proc gtk_ctree_pre_recursive_to_depth*(ctree: PGtkCTree, node: PGtkCTreeNode, + depth: gint, fun: TGtkCTreeFunc, + data: gpointer){.cdecl, dynlib: gtklib, + importc: "gtk_ctree_pre_recursive_to_depth".} +proc gtk_ctree_is_viewable*(ctree: PGtkCTree, node: PGtkCTreeNode): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_ctree_is_viewable".} +proc gtk_ctree_last*(ctree: PGtkCTree, node: PGtkCTreeNode): PGtkCTreeNode{. + cdecl, dynlib: gtklib, importc: "gtk_ctree_last".} +proc gtk_ctree_find_node_ptr*(ctree: PGtkCTree, ctree_row: PGtkCTreeRow): PGtkCTreeNode{. + cdecl, dynlib: gtklib, importc: "gtk_ctree_find_node_ptr".} +proc gtk_ctree_node_nth*(ctree: PGtkCTree, row: guint): PGtkCTreeNode{.cdecl, + dynlib: gtklib, importc: "gtk_ctree_node_nth".} +proc gtk_ctree_find*(ctree: PGtkCTree, node: PGtkCTreeNode, + child: PGtkCTreeNode): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_ctree_find".} +proc gtk_ctree_is_ancestor*(ctree: PGtkCTree, node: PGtkCTreeNode, + child: PGtkCTreeNode): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_ctree_is_ancestor".} +proc gtk_ctree_find_by_row_data*(ctree: PGtkCTree, node: PGtkCTreeNode, + data: gpointer): PGtkCTreeNode{.cdecl, + dynlib: gtklib, importc: "gtk_ctree_find_by_row_data".} +proc gtk_ctree_find_all_by_row_data*(ctree: PGtkCTree, node: PGtkCTreeNode, + data: gpointer): PGList{.cdecl, + dynlib: gtklib, importc: "gtk_ctree_find_all_by_row_data".} +proc gtk_ctree_find_by_row_data_custom*(ctree: PGtkCTree, node: PGtkCTreeNode, + data: gpointer, fun: TGCompareFunc): PGtkCTreeNode{. + cdecl, dynlib: gtklib, importc: "gtk_ctree_find_by_row_data_custom".} +proc gtk_ctree_find_all_by_row_data_custom*(ctree: PGtkCTree, + node: PGtkCTreeNode, data: gpointer, fun: TGCompareFunc): PGList{.cdecl, + dynlib: gtklib, importc: "gtk_ctree_find_all_by_row_data_custom".} +proc gtk_ctree_is_hot_spot*(ctree: PGtkCTree, x: gint, y: gint): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_ctree_is_hot_spot".} +proc gtk_ctree_move*(ctree: PGtkCTree, node: PGtkCTreeNode, + new_parent: PGtkCTreeNode, new_sibling: PGtkCTreeNode){. + cdecl, dynlib: gtklib, importc: "gtk_ctree_move".} +proc gtk_ctree_expand*(ctree: PGtkCTree, node: PGtkCTreeNode){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_expand".} +proc gtk_ctree_expand_recursive*(ctree: PGtkCTree, node: PGtkCTreeNode){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_expand_recursive".} +proc gtk_ctree_expand_to_depth*(ctree: PGtkCTree, node: PGtkCTreeNode, + depth: gint){.cdecl, dynlib: gtklib, + importc: "gtk_ctree_expand_to_depth".} +proc gtk_ctree_collapse*(ctree: PGtkCTree, node: PGtkCTreeNode){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_collapse".} +proc gtk_ctree_collapse_recursive*(ctree: PGtkCTree, node: PGtkCTreeNode){. + cdecl, dynlib: gtklib, importc: "gtk_ctree_collapse_recursive".} +proc gtk_ctree_collapse_to_depth*(ctree: PGtkCTree, node: PGtkCTreeNode, + depth: gint){.cdecl, dynlib: gtklib, + importc: "gtk_ctree_collapse_to_depth".} +proc gtk_ctree_toggle_expansion*(ctree: PGtkCTree, node: PGtkCTreeNode){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_toggle_expansion".} +proc gtk_ctree_toggle_expansion_recursive*(ctree: PGtkCTree, + node: PGtkCTreeNode){.cdecl, dynlib: gtklib, + importc: "gtk_ctree_toggle_expansion_recursive".} +proc gtk_ctree_select*(ctree: PGtkCTree, node: PGtkCTreeNode){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_select".} +proc gtk_ctree_select_recursive*(ctree: PGtkCTree, node: PGtkCTreeNode){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_select_recursive".} +proc gtk_ctree_unselect*(ctree: PGtkCTree, node: PGtkCTreeNode){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_unselect".} +proc gtk_ctree_unselect_recursive*(ctree: PGtkCTree, node: PGtkCTreeNode){. + cdecl, dynlib: gtklib, importc: "gtk_ctree_unselect_recursive".} +proc gtk_ctree_real_select_recursive*(ctree: PGtkCTree, node: PGtkCTreeNode, + state: gint){.cdecl, dynlib: gtklib, + importc: "gtk_ctree_real_select_recursive".} +proc gtk_ctree_node_set_text*(ctree: PGtkCTree, node: PGtkCTreeNode, + column: gint, text: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_node_set_text".} +proc gtk_ctree_node_set_pixmap*(ctree: PGtkCTree, node: PGtkCTreeNode, + column: gint, pixmap: PGdkPixmap, + mask: PGdkBitmap){.cdecl, dynlib: gtklib, + importc: "gtk_ctree_node_set_pixmap".} +proc gtk_ctree_node_set_pixtext*(ctree: PGtkCTree, node: PGtkCTreeNode, + column: gint, text: cstring, spacing: guint8, + pixmap: PGdkPixmap, mask: PGdkBitmap){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_node_set_pixtext".} +proc gtk_ctree_set_node_info*(ctree: PGtkCTree, node: PGtkCTreeNode, + text: cstring, spacing: guint8, + pixmap_closed: PGdkPixmap, + mask_closed: PGdkBitmap, + pixmap_opened: PGdkPixmap, + mask_opened: PGdkBitmap, is_leaf: gboolean, + expanded: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_ctree_set_node_info".} +proc gtk_ctree_node_set_shift*(ctree: PGtkCTree, node: PGtkCTreeNode, + column: gint, vertical: gint, horizontal: gint){. + cdecl, dynlib: gtklib, importc: "gtk_ctree_node_set_shift".} +proc gtk_ctree_node_set_selectable*(ctree: PGtkCTree, node: PGtkCTreeNode, + selectable: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_node_set_selectable".} +proc gtk_ctree_node_get_selectable*(ctree: PGtkCTree, node: PGtkCTreeNode): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_ctree_node_get_selectable".} +proc gtk_ctree_node_get_cell_type*(ctree: PGtkCTree, node: PGtkCTreeNode, + column: gint): TGtkCellType{.cdecl, + dynlib: gtklib, importc: "gtk_ctree_node_get_cell_type".} +proc gtk_ctree_node_get_text*(ctree: PGtkCTree, node: PGtkCTreeNode, + column: gint, text: PPgchar): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_ctree_node_get_text".} +proc gtk_ctree_node_set_row_style*(ctree: PGtkCTree, node: PGtkCTreeNode, + style: PGtkStyle){.cdecl, dynlib: gtklib, + importc: "gtk_ctree_node_set_row_style".} +proc gtk_ctree_node_get_row_style*(ctree: PGtkCTree, node: PGtkCTreeNode): PGtkStyle{. + cdecl, dynlib: gtklib, importc: "gtk_ctree_node_get_row_style".} +proc gtk_ctree_node_set_cell_style*(ctree: PGtkCTree, node: PGtkCTreeNode, + column: gint, style: PGtkStyle){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_node_set_cell_style".} +proc gtk_ctree_node_get_cell_style*(ctree: PGtkCTree, node: PGtkCTreeNode, + column: gint): PGtkStyle{.cdecl, + dynlib: gtklib, importc: "gtk_ctree_node_get_cell_style".} +proc gtk_ctree_node_set_foreground*(ctree: PGtkCTree, node: PGtkCTreeNode, + color: PGdkColor){.cdecl, dynlib: gtklib, + importc: "gtk_ctree_node_set_foreground".} +proc gtk_ctree_node_set_background*(ctree: PGtkCTree, node: PGtkCTreeNode, + color: PGdkColor){.cdecl, dynlib: gtklib, + importc: "gtk_ctree_node_set_background".} +proc gtk_ctree_node_set_row_data*(ctree: PGtkCTree, node: PGtkCTreeNode, + data: gpointer){.cdecl, dynlib: gtklib, + importc: "gtk_ctree_node_set_row_data".} +proc gtk_ctree_node_set_row_data_full*(ctree: PGtkCTree, node: PGtkCTreeNode, + data: gpointer, + destroy: TGtkDestroyNotify){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_node_set_row_data_full".} +proc gtk_ctree_node_get_row_data*(ctree: PGtkCTree, node: PGtkCTreeNode): gpointer{. + cdecl, dynlib: gtklib, importc: "gtk_ctree_node_get_row_data".} +proc gtk_ctree_node_moveto*(ctree: PGtkCTree, node: PGtkCTreeNode, + column: gint, row_align: gfloat, col_align: gfloat){. + cdecl, dynlib: gtklib, importc: "gtk_ctree_node_moveto".} +proc gtk_ctree_node_is_visible*(ctree: PGtkCTree, node: PGtkCTreeNode): TGtkVisibility{. + cdecl, dynlib: gtklib, importc: "gtk_ctree_node_is_visible".} +proc gtk_ctree_set_indent*(ctree: PGtkCTree, indent: gint){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_set_indent".} +proc gtk_ctree_set_spacing*(ctree: PGtkCTree, spacing: gint){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_set_spacing".} +proc gtk_ctree_set_show_stub*(ctree: PGtkCTree, show_stub: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_set_show_stub".} +proc gtk_ctree_set_line_style*(ctree: PGtkCTree, line_style: TGtkCTreeLineStyle){. + cdecl, dynlib: gtklib, importc: "gtk_ctree_set_line_style".} +proc gtk_ctree_set_expander_style*(ctree: PGtkCTree, + expander_style: TGtkCTreeExpanderStyle){. + cdecl, dynlib: gtklib, importc: "gtk_ctree_set_expander_style".} +proc gtk_ctree_set_drag_compare_func*(ctree: PGtkCTree, + cmp_func: TGtkCTreeCompareDragFunc){. + cdecl, dynlib: gtklib, importc: "gtk_ctree_set_drag_compare_func".} +proc gtk_ctree_sort_node*(ctree: PGtkCTree, node: PGtkCTreeNode){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_sort_node".} +proc gtk_ctree_sort_recursive*(ctree: PGtkCTree, node: PGtkCTreeNode){.cdecl, + dynlib: gtklib, importc: "gtk_ctree_sort_recursive".} +proc gtk_ctree_set_reorderable*(t: pointer, r: bool) +proc gtk_ctree_node_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_ctree_node_get_type".} +proc GTK_TYPE_DRAWING_AREA*(): GType +proc GTK_DRAWING_AREA*(obj: pointer): PGtkDrawingArea +proc GTK_DRAWING_AREA_CLASS*(klass: pointer): PGtkDrawingAreaClass +proc GTK_IS_DRAWING_AREA*(obj: pointer): bool +proc GTK_IS_DRAWING_AREA_CLASS*(klass: pointer): bool +proc GTK_DRAWING_AREA_GET_CLASS*(obj: pointer): PGtkDrawingAreaClass +proc gtk_drawing_area_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_drawing_area_get_type".} +proc gtk_drawing_area_new*(): PGtkDrawingArea {.cdecl, dynlib: gtklib, + importc: "gtk_drawing_area_new".} +proc GTK_TYPE_CURVE*(): GType +proc GTK_CURVE*(obj: pointer): PGtkCurve +proc GTK_CURVE_CLASS*(klass: pointer): PGtkCurveClass +proc GTK_IS_CURVE*(obj: pointer): bool +proc GTK_IS_CURVE_CLASS*(klass: pointer): bool +proc GTK_CURVE_GET_CLASS*(obj: pointer): PGtkCurveClass +proc gtk_curve_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_curve_get_type".} +proc gtk_curve_new*(): PGtkCurve {.cdecl, dynlib: gtklib, + importc: "gtk_curve_new".} +proc gtk_curve_reset*(curve: PGtkCurve){.cdecl, dynlib: gtklib, + importc: "gtk_curve_reset".} +proc gtk_curve_set_gamma*(curve: PGtkCurve, gamma: gfloat){.cdecl, + dynlib: gtklib, importc: "gtk_curve_set_gamma".} +proc gtk_curve_set_range*(curve: PGtkCurve, min_x: gfloat, max_x: gfloat, + min_y: gfloat, max_y: gfloat){.cdecl, dynlib: gtklib, + importc: "gtk_curve_set_range".} +proc gtk_curve_set_curve_type*(curve: PGtkCurve, thetype: TGtkCurveType){.cdecl, + dynlib: gtklib, importc: "gtk_curve_set_curve_type".} +const + GTK_DEST_DEFAULT_MOTION* = 1 shl 0 + GTK_DEST_DEFAULT_HIGHLIGHT* = 1 shl 1 + GTK_DEST_DEFAULT_DROP* = 1 shl 2 + GTK_DEST_DEFAULT_ALL* = 0x00000007 + GTK_TARGET_SAME_APP* = 1 shl 0 + GTK_TARGET_SAME_WIDGET* = 1 shl 1 + +proc gtk_drag_get_data*(widget: PGtkWidget, context: PGdkDragContext, + target: TGdkAtom, time: guint32){.cdecl, dynlib: gtklib, + importc: "gtk_drag_get_data".} +proc gtk_drag_finish*(context: PGdkDragContext, success: gboolean, + del: gboolean, time: guint32){.cdecl, dynlib: gtklib, + importc: "gtk_drag_finish".} +proc gtk_drag_get_source_widget*(context: PGdkDragContext): PGtkWidget{.cdecl, + dynlib: gtklib, importc: "gtk_drag_get_source_widget".} +proc gtk_drag_highlight*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_drag_highlight".} +proc gtk_drag_unhighlight*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_drag_unhighlight".} +proc gtk_drag_dest_set*(widget: PGtkWidget, flags: TGtkDestDefaults, + targets: PGtkTargetEntry, n_targets: gint, + actions: TGdkDragAction){.cdecl, dynlib: gtklib, + importc: "gtk_drag_dest_set".} +proc gtk_drag_dest_set_proxy*(widget: PGtkWidget, proxy_window: PGdkWindow, + protocol: TGdkDragProtocol, + use_coordinates: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_drag_dest_set_proxy".} +proc gtk_drag_dest_unset*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_drag_dest_unset".} +proc gtk_drag_dest_find_target*(widget: PGtkWidget, context: PGdkDragContext, + target_list: PGtkTargetList): TGdkAtom{.cdecl, + dynlib: gtklib, importc: "gtk_drag_dest_find_target".} +proc gtk_drag_dest_get_target_list*(widget: PGtkWidget): PGtkTargetList{.cdecl, + dynlib: gtklib, importc: "gtk_drag_dest_get_target_list".} +proc gtk_drag_dest_set_target_list*(widget: PGtkWidget, + target_list: PGtkTargetList){.cdecl, + dynlib: gtklib, importc: "gtk_drag_dest_set_target_list".} +proc gtk_drag_source_set*(widget: PGtkWidget, + start_button_mask: TGdkModifierType, + targets: PGtkTargetEntry, n_targets: gint, + actions: TGdkDragAction){.cdecl, dynlib: gtklib, + importc: "gtk_drag_source_set".} +proc gtk_drag_source_unset*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_drag_source_unset".} +proc gtk_drag_source_set_icon*(widget: PGtkWidget, colormap: PGdkColormap, + pixmap: PGdkPixmap, mask: PGdkBitmap){.cdecl, + dynlib: gtklib, importc: "gtk_drag_source_set_icon".} +proc gtk_drag_source_set_icon_pixbuf*(widget: PGtkWidget, pixbuf: PGdkPixbuf){. + cdecl, dynlib: gtklib, importc: "gtk_drag_source_set_icon_pixbuf".} +proc gtk_drag_source_set_icon_stock*(widget: PGtkWidget, stock_id: cstring){. + cdecl, dynlib: gtklib, importc: "gtk_drag_source_set_icon_stock".} +proc gtk_drag_begin*(widget: PGtkWidget, targets: PGtkTargetList, + actions: TGdkDragAction, button: gint, event: PGdkEvent): PGdkDragContext{. + cdecl, dynlib: gtklib, importc: "gtk_drag_begin".} +proc gtk_drag_set_icon_widget*(context: PGdkDragContext, widget: PGtkWidget, + hot_x: gint, hot_y: gint){.cdecl, dynlib: gtklib, + importc: "gtk_drag_set_icon_widget".} +proc gtk_drag_set_icon_pixmap*(context: PGdkDragContext, colormap: PGdkColormap, + pixmap: PGdkPixmap, mask: PGdkBitmap, + hot_x: gint, hot_y: gint){.cdecl, dynlib: gtklib, + importc: "gtk_drag_set_icon_pixmap".} +proc gtk_drag_set_icon_pixbuf*(context: PGdkDragContext, pixbuf: PGdkPixbuf, + hot_x: gint, hot_y: gint){.cdecl, dynlib: gtklib, + importc: "gtk_drag_set_icon_pixbuf".} +proc gtk_drag_set_icon_stock*(context: PGdkDragContext, stock_id: cstring, + hot_x: gint, hot_y: gint){.cdecl, dynlib: gtklib, + importc: "gtk_drag_set_icon_stock".} +proc gtk_drag_set_icon_default*(context: PGdkDragContext){.cdecl, + dynlib: gtklib, importc: "gtk_drag_set_icon_default".} +proc gtk_drag_check_threshold*(widget: PGtkWidget, start_x: gint, start_y: gint, + current_x: gint, current_y: gint): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_drag_check_threshold".} +proc gtk_drag_source_handle_event*(widget: PGtkWidget, event: PGdkEvent){. + cdecl, dynlib: gtklib, importc: "_gtk_drag_source_handle_event".} +proc gtk_drag_dest_handle_event*(toplevel: PGtkWidget, event: PGdkEvent){. + cdecl, dynlib: gtklib, importc: "_gtk_drag_dest_handle_event".} +proc GTK_TYPE_EDITABLE*(): GType +proc GTK_EDITABLE*(obj: pointer): PGtkEditable +proc GTK_EDITABLE_CLASS*(vtable: pointer): PGtkEditableClass +proc GTK_IS_EDITABLE*(obj: pointer): bool +proc GTK_IS_EDITABLE_CLASS*(vtable: pointer): bool +proc GTK_EDITABLE_GET_CLASS*(inst: pointer): PGtkEditableClass +proc gtk_editable_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_editable_get_type".} +proc gtk_editable_select_region*(editable: PGtkEditable, start: gint, + theEnd: gint){.cdecl, dynlib: gtklib, + importc: "gtk_editable_select_region".} +proc gtk_editable_get_selection_bounds*(editable: PGtkEditable, start: Pgint, + theEnd: Pgint): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_editable_get_selection_bounds".} +proc gtk_editable_insert_text*(editable: PGtkEditable, new_text: cstring, + new_text_length: gint, position: Pgint){.cdecl, + dynlib: gtklib, importc: "gtk_editable_insert_text".} +proc gtk_editable_delete_text*(editable: PGtkEditable, start_pos: gint, + end_pos: gint){.cdecl, dynlib: gtklib, + importc: "gtk_editable_delete_text".} +proc gtk_editable_get_chars*(editable: PGtkEditable, start_pos: gint, + end_pos: gint): cstring{.cdecl, dynlib: gtklib, + importc: "gtk_editable_get_chars".} +proc gtk_editable_cut_clipboard*(editable: PGtkEditable){.cdecl, dynlib: gtklib, + importc: "gtk_editable_cut_clipboard".} +proc gtk_editable_copy_clipboard*(editable: PGtkEditable){.cdecl, + dynlib: gtklib, importc: "gtk_editable_copy_clipboard".} +proc gtk_editable_paste_clipboard*(editable: PGtkEditable){.cdecl, + dynlib: gtklib, importc: "gtk_editable_paste_clipboard".} +proc gtk_editable_delete_selection*(editable: PGtkEditable){.cdecl, + dynlib: gtklib, importc: "gtk_editable_delete_selection".} +proc gtk_editable_set_position*(editable: PGtkEditable, position: gint){.cdecl, + dynlib: gtklib, importc: "gtk_editable_set_position".} +proc gtk_editable_get_position*(editable: PGtkEditable): gint{.cdecl, + dynlib: gtklib, importc: "gtk_editable_get_position".} +proc gtk_editable_set_editable*(editable: PGtkEditable, is_editable: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_editable_set_editable".} +proc gtk_editable_get_editable*(editable: PGtkEditable): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_editable_get_editable".} +proc GTK_TYPE_IM_CONTEXT*(): GType +proc GTK_IM_CONTEXT*(obj: pointer): PGtkIMContext +proc GTK_IM_CONTEXT_CLASS*(klass: pointer): PGtkIMContextClass +proc GTK_IS_IM_CONTEXT*(obj: pointer): bool +proc GTK_IS_IM_CONTEXT_CLASS*(klass: pointer): bool +proc GTK_IM_CONTEXT_GET_CLASS*(obj: pointer): PGtkIMContextClass +proc gtk_im_context_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_im_context_get_type".} +proc gtk_im_context_set_client_window*(context: PGtkIMContext, + window: PGdkWindow){.cdecl, + dynlib: gtklib, importc: "gtk_im_context_set_client_window".} +proc gtk_im_context_filter_keypress*(context: PGtkIMContext, event: PGdkEventKey): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_im_context_filter_keypress".} +proc gtk_im_context_focus_in*(context: PGtkIMContext){.cdecl, dynlib: gtklib, + importc: "gtk_im_context_focus_in".} +proc gtk_im_context_focus_out*(context: PGtkIMContext){.cdecl, dynlib: gtklib, + importc: "gtk_im_context_focus_out".} +proc gtk_im_context_reset*(context: PGtkIMContext){.cdecl, dynlib: gtklib, + importc: "gtk_im_context_reset".} +proc gtk_im_context_set_cursor_location*(context: PGtkIMContext, + area: PGdkRectangle){.cdecl, dynlib: gtklib, + importc: "gtk_im_context_set_cursor_location".} +proc gtk_im_context_set_use_preedit*(context: PGtkIMContext, + use_preedit: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_im_context_set_use_preedit".} +proc gtk_im_context_set_surrounding*(context: PGtkIMContext, text: cstring, + len: gint, cursor_index: gint){.cdecl, + dynlib: gtklib, importc: "gtk_im_context_set_surrounding".} +proc gtk_im_context_get_surrounding*(context: PGtkIMContext, text: PPgchar, + cursor_index: Pgint): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_im_context_get_surrounding".} +proc gtk_im_context_delete_surrounding*(context: PGtkIMContext, offset: gint, + n_chars: gint): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_im_context_delete_surrounding".} +const + bm_TGtkMenuShell_active* = 0x00000001'i16 + bp_TGtkMenuShell_active* = 0'i16 + bm_TGtkMenuShell_have_grab* = 0x00000002'i16 + bp_TGtkMenuShell_have_grab* = 1'i16 + bm_TGtkMenuShell_have_xgrab* = 0x00000004'i16 + bp_TGtkMenuShell_have_xgrab* = 2'i16 + bm_TGtkMenuShell_ignore_leave* = 0x00000008'i16 + bp_TGtkMenuShell_ignore_leave* = 3'i16 + bm_TGtkMenuShell_menu_flag* = 0x00000010'i16 + bp_TGtkMenuShell_menu_flag* = 4'i16 + bm_TGtkMenuShell_ignore_enter* = 0x00000020'i16 + bp_TGtkMenuShell_ignore_enter* = 5'i16 + bm_TGtkMenuShellClass_submenu_placement* = 0x00000001'i16 + bp_TGtkMenuShellClass_submenu_placement* = 0'i16 + +proc GTK_TYPE_MENU_SHELL*(): GType +proc GTK_MENU_SHELL*(obj: pointer): PGtkMenuShell +proc GTK_MENU_SHELL_CLASS*(klass: pointer): PGtkMenuShellClass +proc GTK_IS_MENU_SHELL*(obj: pointer): bool +proc GTK_IS_MENU_SHELL_CLASS*(klass: pointer): bool +proc GTK_MENU_SHELL_GET_CLASS*(obj: pointer): PGtkMenuShellClass +proc active*(a: var TGtkMenuShell): guint +proc set_active*(a: var TGtkMenuShell, `active`: guint) +proc have_grab*(a: var TGtkMenuShell): guint +proc set_have_grab*(a: var TGtkMenuShell, `have_grab`: guint) +proc have_xgrab*(a: var TGtkMenuShell): guint +proc set_have_xgrab*(a: var TGtkMenuShell, `have_xgrab`: guint) +proc ignore_leave*(a: var TGtkMenuShell): guint +proc set_ignore_leave*(a: var TGtkMenuShell, `ignore_leave`: guint) +proc menu_flag*(a: var TGtkMenuShell): guint +proc set_menu_flag*(a: var TGtkMenuShell, `menu_flag`: guint) +proc ignore_enter*(a: var TGtkMenuShell): guint +proc set_ignore_enter*(a: var TGtkMenuShell, `ignore_enter`: guint) +proc submenu_placement*(a: var TGtkMenuShellClass): guint +proc set_submenu_placement*(a: var TGtkMenuShellClass, + `submenu_placement`: guint) +proc gtk_menu_shell_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_menu_shell_get_type".} +proc gtk_menu_shell_append*(menu_shell: PGtkMenuShell, child: PGtkWidget){. + cdecl, dynlib: gtklib, importc: "gtk_menu_shell_append".} +proc gtk_menu_shell_prepend*(menu_shell: PGtkMenuShell, child: PGtkWidget){. + cdecl, dynlib: gtklib, importc: "gtk_menu_shell_prepend".} +proc gtk_menu_shell_insert*(menu_shell: PGtkMenuShell, child: PGtkWidget, + position: gint){.cdecl, dynlib: gtklib, + importc: "gtk_menu_shell_insert".} +proc gtk_menu_shell_deactivate*(menu_shell: PGtkMenuShell){.cdecl, + dynlib: gtklib, importc: "gtk_menu_shell_deactivate".} +proc gtk_menu_shell_select_item*(menu_shell: PGtkMenuShell, + menu_item: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_menu_shell_select_item".} +proc gtk_menu_shell_deselect*(menu_shell: PGtkMenuShell){.cdecl, dynlib: gtklib, + importc: "gtk_menu_shell_deselect".} +proc gtk_menu_shell_activate_item*(menu_shell: PGtkMenuShell, + menu_item: PGtkWidget, + force_deactivate: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_menu_shell_activate_item".} +proc gtk_menu_shell_select_first*(menu_shell: PGtkMenuShell){.cdecl, + dynlib: gtklib, importc: "_gtk_menu_shell_select_first".} +proc gtk_menu_shell_activate*(menu_shell: PGtkMenuShell){.cdecl, + dynlib: gtklib, importc: "_gtk_menu_shell_activate".} +const + bm_TGtkMenu_needs_destruction_ref_count* = 0x00000001'i16 + bp_TGtkMenu_needs_destruction_ref_count* = 0'i16 + bm_TGtkMenu_torn_off* = 0x00000002'i16 + bp_TGtkMenu_torn_off* = 1'i16 + bm_TGtkMenu_tearoff_active* = 0x00000004'i16 + bp_TGtkMenu_tearoff_active* = 2'i16 + bm_TGtkMenu_scroll_fast* = 0x00000008'i16 + bp_TGtkMenu_scroll_fast* = 3'i16 + bm_TGtkMenu_upper_arrow_visible* = 0x00000010'i16 + bp_TGtkMenu_upper_arrow_visible* = 4'i16 + bm_TGtkMenu_lower_arrow_visible* = 0x00000020'i16 + bp_TGtkMenu_lower_arrow_visible* = 5'i16 + bm_TGtkMenu_upper_arrow_prelight* = 0x00000040'i16 + bp_TGtkMenu_upper_arrow_prelight* = 6'i16 + bm_TGtkMenu_lower_arrow_prelight* = 0x00000080'i16 + bp_TGtkMenu_lower_arrow_prelight* = 7'i16 + +proc GTK_TYPE_MENU*(): GType +proc GTK_MENU*(obj: pointer): PGtkMenu +proc GTK_MENU_CLASS*(klass: pointer): PGtkMenuClass +proc GTK_IS_MENU*(obj: pointer): bool +proc GTK_IS_MENU_CLASS*(klass: pointer): bool +proc GTK_MENU_GET_CLASS*(obj: pointer): PGtkMenuClass +proc needs_destruction_ref_count*(a: var TGtkMenu): guint +proc set_needs_destruction_ref_count*(a: var TGtkMenu, + `needs_destruction_ref_count`: guint) +proc torn_off*(a: var TGtkMenu): guint +proc set_torn_off*(a: var TGtkMenu, `torn_off`: guint) +proc tearoff_active*(a: var TGtkMenu): guint +proc set_tearoff_active*(a: var TGtkMenu, `tearoff_active`: guint) +proc scroll_fast*(a: var TGtkMenu): guint +proc set_scroll_fast*(a: var TGtkMenu, `scroll_fast`: guint) +proc upper_arrow_visible*(a: var TGtkMenu): guint +proc set_upper_arrow_visible*(a: var TGtkMenu, `upper_arrow_visible`: guint) +proc lower_arrow_visible*(a: var TGtkMenu): guint +proc set_lower_arrow_visible*(a: var TGtkMenu, `lower_arrow_visible`: guint) +proc upper_arrow_prelight*(a: var TGtkMenu): guint +proc set_upper_arrow_prelight*(a: var TGtkMenu, `upper_arrow_prelight`: guint) +proc lower_arrow_prelight*(a: var TGtkMenu): guint +proc set_lower_arrow_prelight*(a: var TGtkMenu, `lower_arrow_prelight`: guint) +proc gtk_menu_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_menu_get_type".} +proc gtk_menu_new*(): PGtkMenu {.cdecl, dynlib: gtklib, importc: "gtk_menu_new".} +proc gtk_menu_popup*(menu: PGtkMenu, parent_menu_shell: PGtkWidget, + parent_menu_item: PGtkWidget, fun: TGtkMenuPositionFunc, + data: gpointer, button: guint, activate_time: guint32){. + cdecl, dynlib: gtklib, importc: "gtk_menu_popup".} +proc gtk_menu_reposition*(menu: PGtkMenu){.cdecl, dynlib: gtklib, + importc: "gtk_menu_reposition".} +proc gtk_menu_popdown*(menu: PGtkMenu){.cdecl, dynlib: gtklib, + importc: "gtk_menu_popdown".} +proc gtk_menu_get_active*(menu: PGtkMenu): PGtkWidget{.cdecl, dynlib: gtklib, + importc: "gtk_menu_get_active".} +proc gtk_menu_set_active*(menu: PGtkMenu, index: guint){.cdecl, dynlib: gtklib, + importc: "gtk_menu_set_active".} +proc gtk_menu_set_accel_group*(menu: PGtkMenu, accel_group: PGtkAccelGroup){. + cdecl, dynlib: gtklib, importc: "gtk_menu_set_accel_group".} +proc gtk_menu_get_accel_group*(menu: PGtkMenu): PGtkAccelGroup{.cdecl, + dynlib: gtklib, importc: "gtk_menu_get_accel_group".} +proc gtk_menu_set_accel_path*(menu: PGtkMenu, accel_path: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_menu_set_accel_path".} +proc gtk_menu_attach_to_widget*(menu: PGtkMenu, attach_widget: PGtkWidget, + detacher: TGtkMenuDetachFunc){.cdecl, + dynlib: gtklib, importc: "gtk_menu_attach_to_widget".} +proc gtk_menu_detach*(menu: PGtkMenu){.cdecl, dynlib: gtklib, + importc: "gtk_menu_detach".} +proc gtk_menu_get_attach_widget*(menu: PGtkMenu): PGtkWidget{.cdecl, + dynlib: gtklib, importc: "gtk_menu_get_attach_widget".} +proc gtk_menu_set_tearoff_state*(menu: PGtkMenu, torn_off: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_menu_set_tearoff_state".} +proc gtk_menu_get_tearoff_state*(menu: PGtkMenu): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_menu_get_tearoff_state".} +proc gtk_menu_set_title*(menu: PGtkMenu, title: cstring){.cdecl, dynlib: gtklib, + importc: "gtk_menu_set_title".} +proc gtk_menu_get_title*(menu: PGtkMenu): cstring{.cdecl, dynlib: gtklib, + importc: "gtk_menu_get_title".} +proc gtk_menu_reorder_child*(menu: PGtkMenu, child: PGtkWidget, position: gint){. + cdecl, dynlib: gtklib, importc: "gtk_menu_reorder_child".} +proc gtk_menu_set_screen*(menu: PGtkMenu, screen: PGdkScreen){.cdecl, + dynlib: gtklib, importc: "gtk_menu_set_screen".} +const + bm_TGtkEntry_editable* = 0x00000001'i16 + bp_TGtkEntry_editable* = 0'i16 + bm_TGtkEntry_visible* = 0x00000002'i16 + bp_TGtkEntry_visible* = 1'i16 + bm_TGtkEntry_overwrite_mode* = 0x00000004'i16 + bp_TGtkEntry_overwrite_mode* = 2'i16 + bm_TGtkEntry_in_drag* = 0x00000008'i16 + bp_TGtkEntry_in_drag* = 3'i16 + bm_TGtkEntry_cache_includes_preedit* = 0x00000001'i16 + bp_TGtkEntry_cache_includes_preedit* = 0'i16 + bm_TGtkEntry_need_im_reset* = 0x00000002'i16 + bp_TGtkEntry_need_im_reset* = 1'i16 + bm_TGtkEntry_has_frame* = 0x00000004'i16 + bp_TGtkEntry_has_frame* = 2'i16 + bm_TGtkEntry_activates_default* = 0x00000008'i16 + bp_TGtkEntry_activates_default* = 3'i16 + bm_TGtkEntry_cursor_visible* = 0x00000010'i16 + bp_TGtkEntry_cursor_visible* = 4'i16 + bm_TGtkEntry_in_click* = 0x00000020'i16 + bp_TGtkEntry_in_click* = 5'i16 + bm_TGtkEntry_is_cell_renderer* = 0x00000040'i16 + bp_TGtkEntry_is_cell_renderer* = 6'i16 + bm_TGtkEntry_editing_canceled* = 0x00000080'i16 + bp_TGtkEntry_editing_canceled* = 7'i16 + bm_TGtkEntry_mouse_cursor_obscured* = 0x00000100'i16 + bp_TGtkEntry_mouse_cursor_obscured* = 8'i16 + +proc GTK_TYPE_ENTRY*(): GType +proc GTK_ENTRY*(obj: pointer): PGtkEntry +proc GTK_ENTRY_CLASS*(klass: pointer): PGtkEntryClass +proc GTK_IS_ENTRY*(obj: pointer): bool +proc GTK_IS_ENTRY_CLASS*(klass: pointer): bool +proc GTK_ENTRY_GET_CLASS*(obj: pointer): PGtkEntryClass +proc editable*(a: var TGtkEntry): guint +proc set_editable*(a: var TGtkEntry, `editable`: guint) +proc visible*(a: var TGtkEntry): guint +proc set_visible*(a: var TGtkEntry, `visible`: guint) +proc overwrite_mode*(a: var TGtkEntry): guint +proc set_overwrite_mode*(a: var TGtkEntry, `overwrite_mode`: guint) +proc in_drag*(a: var TGtkEntry): guint +proc set_in_drag*(a: var TGtkEntry, `in_drag`: guint) +proc cache_includes_preedit*(a: var TGtkEntry): guint +proc set_cache_includes_preedit*(a: var TGtkEntry, + `cache_includes_preedit`: guint) +proc need_im_reset*(a: var TGtkEntry): guint +proc set_need_im_reset*(a: var TGtkEntry, `need_im_reset`: guint) +proc has_frame*(a: var TGtkEntry): guint +proc set_has_frame*(a: var TGtkEntry, `has_frame`: guint) +proc activates_default*(a: var TGtkEntry): guint +proc set_activates_default*(a: var TGtkEntry, `activates_default`: guint) +proc cursor_visible*(a: var TGtkEntry): guint +proc set_cursor_visible*(a: var TGtkEntry, `cursor_visible`: guint) +proc in_click*(a: var TGtkEntry): guint +proc set_in_click*(a: var TGtkEntry, `in_click`: guint) +proc is_cell_renderer*(a: var TGtkEntry): guint +proc set_is_cell_renderer*(a: var TGtkEntry, `is_cell_renderer`: guint) +proc editing_canceled*(a: var TGtkEntry): guint +proc set_editing_canceled*(a: var TGtkEntry, `editing_canceled`: guint) +proc mouse_cursor_obscured*(a: var TGtkEntry): guint +proc set_mouse_cursor_obscured*(a: var TGtkEntry, `mouse_cursor_obscured`: guint) +proc gtk_entry_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_entry_get_type".} +proc gtk_entry_new*(): PGtkEntry {.cdecl, dynlib: gtklib, + importc: "gtk_entry_new".} +proc gtk_entry_set_visibility*(entry: PGtkEntry, visible: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_entry_set_visibility".} +proc gtk_entry_get_visibility*(entry: PGtkEntry): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_entry_get_visibility".} +proc gtk_entry_set_invisible_char*(entry: PGtkEntry, ch: gunichar){.cdecl, + dynlib: gtklib, importc: "gtk_entry_set_invisible_char".} +proc gtk_entry_get_invisible_char*(entry: PGtkEntry): gunichar{.cdecl, + dynlib: gtklib, importc: "gtk_entry_get_invisible_char".} +proc gtk_entry_set_has_frame*(entry: PGtkEntry, setting: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_entry_set_has_frame".} +proc gtk_entry_get_has_frame*(entry: PGtkEntry): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_entry_get_has_frame".} +proc gtk_entry_set_max_length*(entry: PGtkEntry, max: gint){.cdecl, + dynlib: gtklib, importc: "gtk_entry_set_max_length".} +proc gtk_entry_get_max_length*(entry: PGtkEntry): gint{.cdecl, dynlib: gtklib, + importc: "gtk_entry_get_max_length".} +proc gtk_entry_set_activates_default*(entry: PGtkEntry, setting: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_entry_set_activates_default".} +proc gtk_entry_get_activates_default*(entry: PGtkEntry): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_entry_get_activates_default".} +proc gtk_entry_set_width_chars*(entry: PGtkEntry, n_chars: gint){.cdecl, + dynlib: gtklib, importc: "gtk_entry_set_width_chars".} +proc gtk_entry_get_width_chars*(entry: PGtkEntry): gint{.cdecl, dynlib: gtklib, + importc: "gtk_entry_get_width_chars".} +proc gtk_entry_set_text*(entry: PGtkEntry, text: cstring){.cdecl, dynlib: gtklib, + importc: "gtk_entry_set_text".} +proc gtk_entry_get_text*(entry: PGtkEntry): cstring{.cdecl, dynlib: gtklib, + importc: "gtk_entry_get_text".} +proc gtk_entry_get_layout*(entry: PGtkEntry): PPangoLayout{.cdecl, + dynlib: gtklib, importc: "gtk_entry_get_layout".} +proc gtk_entry_get_layout_offsets*(entry: PGtkEntry, x: Pgint, y: Pgint){.cdecl, + dynlib: gtklib, importc: "gtk_entry_get_layout_offsets".} +const + GTK_ANCHOR_CENTER* = 0 + GTK_ANCHOR_NORTH* = 1 + GTK_ANCHOR_NORTH_WEST* = 2 + GTK_ANCHOR_NORTH_EAST* = 3 + GTK_ANCHOR_SOUTH* = 4 + GTK_ANCHOR_SOUTH_WEST* = 5 + GTK_ANCHOR_SOUTH_EAST* = 6 + GTK_ANCHOR_WEST* = 7 + GTK_ANCHOR_EAST* = 8 + GTK_ANCHOR_N* = GTK_ANCHOR_NORTH + GTK_ANCHOR_NW* = GTK_ANCHOR_NORTH_WEST + GTK_ANCHOR_NE* = GTK_ANCHOR_NORTH_EAST + GTK_ANCHOR_S* = GTK_ANCHOR_SOUTH + GTK_ANCHOR_SW* = GTK_ANCHOR_SOUTH_WEST + GTK_ANCHOR_SE* = GTK_ANCHOR_SOUTH_EAST + GTK_ANCHOR_W* = GTK_ANCHOR_WEST + GTK_ANCHOR_E* = GTK_ANCHOR_EAST + GTK_ARROW_UP* = 0 + GTK_ARROW_DOWN* = 1 + GTK_ARROW_LEFT* = 2 + GTK_ARROW_RIGHT* = 3 + GTK_EXPAND* = 1 shl 0 + GTK_SHRINK* = 1 shl 1 + GTK_FILL* = 1 shl 2 + GTK_BUTTONBOX_DEFAULT_STYLE* = 0 + GTK_BUTTONBOX_SPREAD* = 1 + GTK_BUTTONBOX_EDGE* = 2 + GTK_BUTTONBOX_START* = 3 + GTK_BUTTONBOX_END* = 4 + GTK_CURVE_TYPE_LINEAR* = 0 + GTK_CURVE_TYPE_SPLINE* = 1 + GTK_CURVE_TYPE_FREE* = 2 + GTK_DELETE_CHARS* = 0 + GTK_DELETE_WORD_ENDS* = 1 + GTK_DELETE_WORDS* = 2 + GTK_DELETE_DISPLAY_LINES* = 3 + GTK_DELETE_DISPLAY_LINE_ENDS* = 4 + GTK_DELETE_PARAGRAPH_ENDS* = 5 + GTK_DELETE_PARAGRAPHS* = 6 + GTK_DELETE_WHITESPACE* = 7 + GTK_DIR_TAB_FORWARD* = 0 + GTK_DIR_TAB_BACKWARD* = 1 + GTK_DIR_UP* = 2 + GTK_DIR_DOWN* = 3 + GTK_DIR_LEFT* = 4 + GTK_DIR_RIGHT* = 5 + GTK_EXPANDER_COLLAPSED* = 0 + GTK_EXPANDER_SEMI_COLLAPSED* = 1 + GTK_EXPANDER_SEMI_EXPANDED* = 2 + GTK_EXPANDER_EXPANDED* = 3 + GTK_ICON_SIZE_INVALID* = 0 + GTK_ICON_SIZE_MENU* = 1 + GTK_ICON_SIZE_SMALL_TOOLBAR* = 2 + GTK_ICON_SIZE_LARGE_TOOLBAR* = 3 + GTK_ICON_SIZE_BUTTON* = 4 + GTK_ICON_SIZE_DND* = 5 + GTK_ICON_SIZE_DIALOG* = 6 + GTK_TEXT_DIR_NONE* = 0 + GTK_TEXT_DIR_LTR* = 1 + GTK_TEXT_DIR_RTL* = 2 + GTK_JUSTIFY_LEFT* = 0 + GTK_JUSTIFY_RIGHT* = 1 + GTK_JUSTIFY_CENTER* = 2 + GTK_JUSTIFY_FILL* = 3 + GTK_MENU_DIR_PARENT* = 0 + GTK_MENU_DIR_CHILD* = 1 + GTK_MENU_DIR_NEXT* = 2 + GTK_MENU_DIR_PREV* = 3 + GTK_PIXELS* = 0 + GTK_INCHES* = 1 + GTK_CENTIMETERS* = 2 + GTK_MOVEMENT_LOGICAL_POSITIONS* = 0 + GTK_MOVEMENT_VISUAL_POSITIONS* = 1 + GTK_MOVEMENT_WORDS* = 2 + GTK_MOVEMENT_DISPLAY_LINES* = 3 + GTK_MOVEMENT_DISPLAY_LINE_ENDS* = 4 + GTK_MOVEMENT_PARAGRAPHS* = 5 + GTK_MOVEMENT_PARAGRAPH_ENDS* = 6 + GTK_MOVEMENT_PAGES* = 7 + GTK_MOVEMENT_BUFFER_ENDS* = 8 + GTK_ORIENTATION_HORIZONTAL* = 0 + GTK_ORIENTATION_VERTICAL* = 1 + GTK_CORNER_TOP_LEFT* = 0 + GTK_CORNER_BOTTOM_LEFT* = 1 + GTK_CORNER_TOP_RIGHT* = 2 + GTK_CORNER_BOTTOM_RIGHT* = 3 + GTK_PACK_START* = 0 + GTK_PACK_END* = 1 + GTK_PATH_PRIO_LOWEST* = 0 + GTK_PATH_PRIO_GTK* = 4 + GTK_PATH_PRIO_APPLICATION* = 8 + GTK_PATH_PRIO_THEME* = 10 + GTK_PATH_PRIO_RC* = 12 + GTK_PATH_PRIO_HIGHEST* = 15 + GTK_PATH_WIDGET* = 0 + GTK_PATH_WIDGET_CLASS* = 1 + GTK_PATH_CLASS* = 2 + GTK_POLICY_ALWAYS* = 0 + GTK_POLICY_AUTOMATIC* = 1 + GTK_POLICY_NEVER* = 2 + GTK_POS_LEFT* = 0 + GTK_POS_RIGHT* = 1 + GTK_POS_TOP* = 2 + GTK_POS_BOTTOM* = 3 + GTK_PREVIEW_COLOR* = 0 + GTK_PREVIEW_GRAYSCALE* = 1 + GTK_RELIEF_NORMAL* = 0 + GTK_RELIEF_HALF* = 1 + GTK_RELIEF_NONE* = 2 + GTK_RESIZE_PARENT* = 0 + GTK_RESIZE_QUEUE* = 1 + GTK_RESIZE_IMMEDIATE* = 2 + GTK_SCROLL_NONE* = 0 + GTK_SCROLL_JUMP* = 1 + GTK_SCROLL_STEP_BACKWARD* = 2 + GTK_SCROLL_STEP_FORWARD* = 3 + GTK_SCROLL_PAGE_BACKWARD* = 4 + GTK_SCROLL_PAGE_FORWARD* = 5 + GTK_SCROLL_STEP_UP* = 6 + GTK_SCROLL_STEP_DOWN* = 7 + GTK_SCROLL_PAGE_UP* = 8 + GTK_SCROLL_PAGE_DOWN* = 9 + GTK_SCROLL_STEP_LEFT* = 10 + GTK_SCROLL_STEP_RIGHT* = 11 + GTK_SCROLL_PAGE_LEFT* = 12 + GTK_SCROLL_PAGE_RIGHT* = 13 + GTK_SCROLL_START* = 14 + GTK_SCROLL_END* = 15 + GTK_SELECTION_NONE* = 0 + GTK_SELECTION_SINGLE* = 1 + GTK_SELECTION_BROWSE* = 2 + GTK_SELECTION_MULTIPLE* = 3 + GTK_SELECTION_EXTENDED* = GTK_SELECTION_MULTIPLE + GTK_SHADOW_NONE* = 0 + GTK_SHADOW_IN* = 1 + GTK_SHADOW_OUT* = 2 + GTK_SHADOW_ETCHED_IN* = 3 + GTK_SHADOW_ETCHED_OUT* = 4 + GTK_STATE_NORMAL* = 0 + GTK_STATE_ACTIVE* = 1 + GTK_STATE_PRELIGHT* = 2 + GTK_STATE_SELECTED* = 3 + GTK_STATE_INSENSITIVE* = 4 + GTK_DIRECTION_LEFT* = 0 + GTK_DIRECTION_RIGHT* = 1 + GTK_TOP_BOTTOM* = 0 + GTK_LEFT_RIGHT* = 1 + GTK_TOOLBAR_ICONS* = 0 + GTK_TOOLBAR_TEXT* = 1 + GTK_TOOLBAR_BOTH* = 2 + GTK_TOOLBAR_BOTH_HORIZ* = 3 + GTK_UPDATE_CONTINUOUS* = 0 + GTK_UPDATE_DISCONTINUOUS* = 1 + GTK_UPDATE_DELAYED* = 2 + GTK_VISIBILITY_NONE* = 0 + GTK_VISIBILITY_PARTIAL* = 1 + GTK_VISIBILITY_FULL* = 2 + GTK_WIN_POS_NONE* = 0 + GTK_WIN_POS_CENTER* = 1 + GTK_WIN_POS_MOUSE* = 2 + GTK_WIN_POS_CENTER_ALWAYS* = 3 + GTK_WIN_POS_CENTER_ON_PARENT* = 4 + GTK_WINDOW_TOPLEVEL* = 0 + GTK_WINDOW_POPUP* = 1 + GTK_WRAP_NONE* = 0 + GTK_WRAP_CHAR* = 1 + GTK_WRAP_WORD* = 2 + GTK_SORT_ASCENDING* = 0 + GTK_SORT_DESCENDING* = 1 + +proc GTK_TYPE_EVENT_BOX*(): GType +proc GTK_EVENT_BOX*(obj: pointer): PGtkEventBox +proc GTK_EVENT_BOX_CLASS*(klass: pointer): PGtkEventBoxClass +proc GTK_IS_EVENT_BOX*(obj: pointer): bool +proc GTK_IS_EVENT_BOX_CLASS*(klass: pointer): bool +proc GTK_EVENT_BOX_GET_CLASS*(obj: pointer): PGtkEventBoxClass +proc gtk_event_box_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_event_box_get_type".} +proc gtk_event_box_new*(): PGtkEventBox {.cdecl, dynlib: gtklib, + importc: "gtk_event_box_new".} +const + FNM_PATHNAME* = 1 shl 0 + FNM_NOESCAPE* = 1 shl 1 + FNM_PERIOD* = 1 shl 2 + +const + FNM_FILE_NAME* = FNM_PATHNAME + FNM_LEADING_DIR* = 1 shl 3 + FNM_CASEFOLD* = 1 shl 4 + +const + FNM_NOMATCH* = 1 + +proc fnmatch*(`pattern`: char, `string`: char, `flags`: gint): gint{.cdecl, + dynlib: gtklib, importc: "fnmatch".} +proc GTK_TYPE_FILE_SELECTION*(): GType +proc GTK_FILE_SELECTION*(obj: pointer): PGtkFileSelection +proc GTK_FILE_SELECTION_CLASS*(klass: pointer): PGtkFileSelectionClass +proc GTK_IS_FILE_SELECTION*(obj: pointer): bool +proc GTK_IS_FILE_SELECTION_CLASS*(klass: pointer): bool +proc GTK_FILE_SELECTION_GET_CLASS*(obj: pointer): PGtkFileSelectionClass +proc gtk_file_selection_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_file_selection_get_type".} +proc gtk_file_selection_new*(title: cstring): PGtkFileSelection {.cdecl, dynlib: gtklib, + importc: "gtk_file_selection_new".} +proc gtk_file_selection_set_filename*(filesel: PGtkFileSelection, + filename: cstring){.cdecl, dynlib: gtklib, + importc: "gtk_file_selection_set_filename".} +proc gtk_file_selection_get_filename*(filesel: PGtkFileSelection): cstring{. + cdecl, dynlib: gtklib, importc: "gtk_file_selection_get_filename".} +proc gtk_file_selection_complete*(filesel: PGtkFileSelection, pattern: cstring){. + cdecl, dynlib: gtklib, importc: "gtk_file_selection_complete".} +proc gtk_file_selection_show_fileop_buttons*(filesel: PGtkFileSelection){.cdecl, + dynlib: gtklib, importc: "gtk_file_selection_show_fileop_buttons".} +proc gtk_file_selection_hide_fileop_buttons*(filesel: PGtkFileSelection){.cdecl, + dynlib: gtklib, importc: "gtk_file_selection_hide_fileop_buttons".} +proc gtk_file_selection_get_selections*(filesel: PGtkFileSelection): PPgchar{. + cdecl, dynlib: gtklib, importc: "gtk_file_selection_get_selections".} +proc gtk_file_selection_set_select_multiple*(filesel: PGtkFileSelection, + select_multiple: gboolean){.cdecl, dynlib: gtklib, importc: "gtk_file_selection_set_select_multiple".} +proc gtk_file_selection_get_select_multiple*(filesel: PGtkFileSelection): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_file_selection_get_select_multiple".} +proc GTK_TYPE_FIXED*(): GType +proc GTK_FIXED*(obj: pointer): PGtkFixed +proc GTK_FIXED_CLASS*(klass: pointer): PGtkFixedClass +proc GTK_IS_FIXED*(obj: pointer): bool +proc GTK_IS_FIXED_CLASS*(klass: pointer): bool +proc GTK_FIXED_GET_CLASS*(obj: pointer): PGtkFixedClass +proc gtk_fixed_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_fixed_get_type".} +proc gtk_fixed_new*(): PGtkFixed {.cdecl, dynlib: gtklib, + importc: "gtk_fixed_new".} +proc gtk_fixed_put*(fixed: PGtkFixed, widget: PGtkWidget, x: gint, y: gint){. + cdecl, dynlib: gtklib, importc: "gtk_fixed_put".} +proc gtk_fixed_move*(fixed: PGtkFixed, widget: PGtkWidget, x: gint, y: gint){. + cdecl, dynlib: gtklib, importc: "gtk_fixed_move".} +proc gtk_fixed_set_has_window*(fixed: PGtkFixed, has_window: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_fixed_set_has_window".} +proc gtk_fixed_get_has_window*(fixed: PGtkFixed): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_fixed_get_has_window".} +proc GTK_TYPE_FONT_SELECTION*(): GType +proc GTK_FONT_SELECTION*(obj: pointer): PGtkFontSelection +proc GTK_FONT_SELECTION_CLASS*(klass: pointer): PGtkFontSelectionClass +proc GTK_IS_FONT_SELECTION*(obj: pointer): bool +proc GTK_IS_FONT_SELECTION_CLASS*(klass: pointer): bool +proc GTK_FONT_SELECTION_GET_CLASS*(obj: pointer): PGtkFontSelectionClass +proc GTK_TYPE_FONT_SELECTION_DIALOG*(): GType +proc GTK_FONT_SELECTION_DIALOG*(obj: pointer): PGtkFontSelectionDialog +proc GTK_FONT_SELECTION_DIALOG_CLASS*(klass: pointer): PGtkFontSelectionDialogClass +proc GTK_IS_FONT_SELECTION_DIALOG*(obj: pointer): bool +proc GTK_IS_FONT_SELECTION_DIALOG_CLASS*(klass: pointer): bool +proc GTK_FONT_SELECTION_DIALOG_GET_CLASS*(obj: pointer): PGtkFontSelectionDialogClass +proc gtk_font_selection_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_font_selection_get_type".} +proc gtk_font_selection_new*(): PGtkFontSelection{.cdecl, dynlib: gtklib, + importc: "gtk_font_selection_new".} +proc gtk_font_selection_get_font_name*(fontsel: PGtkFontSelection): cstring{. + cdecl, dynlib: gtklib, importc: "gtk_font_selection_get_font_name".} +proc gtk_font_selection_set_font_name*(fontsel: PGtkFontSelection, + fontname: cstring): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_font_selection_set_font_name".} +proc gtk_font_selection_get_preview_text*(fontsel: PGtkFontSelection): cstring{. + cdecl, dynlib: gtklib, importc: "gtk_font_selection_get_preview_text".} +proc gtk_font_selection_set_preview_text*(fontsel: PGtkFontSelection, + text: cstring){.cdecl, dynlib: gtklib, + importc: "gtk_font_selection_set_preview_text".} +proc gtk_font_selection_dialog_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_font_selection_dialog_get_type".} +proc gtk_font_selection_dialog_new*(title: cstring): PGtkFontSelectionDialog{.cdecl, + dynlib: gtklib, importc: "gtk_font_selection_dialog_new".} +proc gtk_font_selection_dialog_get_font_name*(fsd: PGtkFontSelectionDialog): cstring{. + cdecl, dynlib: gtklib, importc: "gtk_font_selection_dialog_get_font_name".} +proc gtk_font_selection_dialog_set_font_name*(fsd: PGtkFontSelectionDialog, + fontname: cstring): gboolean{.cdecl, dynlib: gtklib, importc: "gtk_font_selection_dialog_set_font_name".} +proc gtk_font_selection_dialog_get_preview_text*(fsd: PGtkFontSelectionDialog): cstring{. + cdecl, dynlib: gtklib, importc: "gtk_font_selection_dialog_get_preview_text".} +proc gtk_font_selection_dialog_set_preview_text*(fsd: PGtkFontSelectionDialog, + text: cstring){.cdecl, dynlib: gtklib, + importc: "gtk_font_selection_dialog_set_preview_text".} +proc GTK_TYPE_GAMMA_CURVE*(): GType +proc GTK_GAMMA_CURVE*(obj: pointer): PGtkGammaCurve +proc GTK_GAMMA_CURVE_CLASS*(klass: pointer): PGtkGammaCurveClass +proc GTK_IS_GAMMA_CURVE*(obj: pointer): bool +proc GTK_IS_GAMMA_CURVE_CLASS*(klass: pointer): bool +proc GTK_GAMMA_CURVE_GET_CLASS*(obj: pointer): PGtkGammaCurveClass +proc gtk_gamma_curve_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_gamma_curve_get_type".} +proc gtk_gamma_curve_new*(): PGtkGammaCurve{.cdecl, dynlib: gtklib, + importc: "gtk_gamma_curve_new".} +proc gtk_gc_get*(depth: gint, colormap: PGdkColormap, values: PGdkGCValues, + values_mask: TGdkGCValuesMask): PGdkGC{.cdecl, dynlib: gtklib, + importc: "gtk_gc_get".} +proc gtk_gc_release*(gc: PGdkGC){.cdecl, dynlib: gtklib, + importc: "gtk_gc_release".} +const + bm_TGtkHandleBox_handle_position* = 0x00000003'i16 + bp_TGtkHandleBox_handle_position* = 0'i16 + bm_TGtkHandleBox_float_window_mapped* = 0x00000004'i16 + bp_TGtkHandleBox_float_window_mapped* = 2'i16 + bm_TGtkHandleBox_child_detached* = 0x00000008'i16 + bp_TGtkHandleBox_child_detached* = 3'i16 + bm_TGtkHandleBox_in_drag* = 0x00000010'i16 + bp_TGtkHandleBox_in_drag* = 4'i16 + bm_TGtkHandleBox_shrink_on_detach* = 0x00000020'i16 + bp_TGtkHandleBox_shrink_on_detach* = 5'i16 + bm_TGtkHandleBox_snap_edge* = 0x000001C0'i16 + bp_TGtkHandleBox_snap_edge* = 6'i16 + +proc GTK_TYPE_HANDLE_BOX*(): GType +proc GTK_HANDLE_BOX*(obj: pointer): PGtkHandleBox +proc GTK_HANDLE_BOX_CLASS*(klass: pointer): PGtkHandleBoxClass +proc GTK_IS_HANDLE_BOX*(obj: pointer): bool +proc GTK_IS_HANDLE_BOX_CLASS*(klass: pointer): bool +proc GTK_HANDLE_BOX_GET_CLASS*(obj: pointer): PGtkHandleBoxClass +proc handle_position*(a: var TGtkHandleBox): guint +proc set_handle_position*(a: var TGtkHandleBox, `handle_position`: guint) +proc float_window_mapped*(a: var TGtkHandleBox): guint +proc set_float_window_mapped*(a: var TGtkHandleBox, `float_window_mapped`: guint) +proc child_detached*(a: var TGtkHandleBox): guint +proc set_child_detached*(a: var TGtkHandleBox, `child_detached`: guint) +proc in_drag*(a: var TGtkHandleBox): guint +proc set_in_drag*(a: var TGtkHandleBox, `in_drag`: guint) +proc shrink_on_detach*(a: var TGtkHandleBox): guint +proc set_shrink_on_detach*(a: var TGtkHandleBox, `shrink_on_detach`: guint) +proc snap_edge*(a: var TGtkHandleBox): gint +proc set_snap_edge*(a: var TGtkHandleBox, `snap_edge`: gint) +proc gtk_handle_box_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_handle_box_get_type".} +proc gtk_handle_box_new*(): PGtkHandleBox{.cdecl, dynlib: gtklib, + importc: "gtk_handle_box_new".} +proc gtk_handle_box_set_shadow_type*(handle_box: PGtkHandleBox, + thetype: TGtkShadowType){.cdecl, + dynlib: gtklib, importc: "gtk_handle_box_set_shadow_type".} +proc gtk_handle_box_get_shadow_type*(handle_box: PGtkHandleBox): TGtkShadowType{. + cdecl, dynlib: gtklib, importc: "gtk_handle_box_get_shadow_type".} +proc gtk_handle_box_set_handle_position*(handle_box: PGtkHandleBox, + position: TGtkPositionType){.cdecl, dynlib: gtklib, + importc: "gtk_handle_box_set_handle_position".} +proc gtk_handle_box_get_handle_position*(handle_box: PGtkHandleBox): TGtkPositionType{. + cdecl, dynlib: gtklib, importc: "gtk_handle_box_get_handle_position".} +proc gtk_handle_box_set_snap_edge*(handle_box: PGtkHandleBox, + edge: TGtkPositionType){.cdecl, + dynlib: gtklib, importc: "gtk_handle_box_set_snap_edge".} +proc gtk_handle_box_get_snap_edge*(handle_box: PGtkHandleBox): TGtkPositionType{. + cdecl, dynlib: gtklib, importc: "gtk_handle_box_get_snap_edge".} +const + bm_TGtkPaned_position_set* = 0x00000001'i16 + bp_TGtkPaned_position_set* = 0'i16 + bm_TGtkPaned_in_drag* = 0x00000002'i16 + bp_TGtkPaned_in_drag* = 1'i16 + bm_TGtkPaned_child1_shrink* = 0x00000004'i16 + bp_TGtkPaned_child1_shrink* = 2'i16 + bm_TGtkPaned_child1_resize* = 0x00000008'i16 + bp_TGtkPaned_child1_resize* = 3'i16 + bm_TGtkPaned_child2_shrink* = 0x00000010'i16 + bp_TGtkPaned_child2_shrink* = 4'i16 + bm_TGtkPaned_child2_resize* = 0x00000020'i16 + bp_TGtkPaned_child2_resize* = 5'i16 + bm_TGtkPaned_orientation* = 0x00000040'i16 + bp_TGtkPaned_orientation* = 6'i16 + bm_TGtkPaned_in_recursion* = 0x00000080'i16 + bp_TGtkPaned_in_recursion* = 7'i16 + bm_TGtkPaned_handle_prelit* = 0x00000100'i16 + bp_TGtkPaned_handle_prelit* = 8'i16 + +proc GTK_TYPE_PANED*(): GType +proc GTK_PANED*(obj: pointer): PGtkPaned +proc GTK_PANED_CLASS*(klass: pointer): PGtkPanedClass +proc GTK_IS_PANED*(obj: pointer): bool +proc GTK_IS_PANED_CLASS*(klass: pointer): bool +proc GTK_PANED_GET_CLASS*(obj: pointer): PGtkPanedClass +proc position_set*(a: var TGtkPaned): guint +proc set_position_set*(a: var TGtkPaned, `position_set`: guint) +proc in_drag*(a: var TGtkPaned): guint +proc set_in_drag*(a: var TGtkPaned, `in_drag`: guint) +proc child1_shrink*(a: var TGtkPaned): guint +proc set_child1_shrink*(a: var TGtkPaned, `child1_shrink`: guint) +proc child1_resize*(a: var TGtkPaned): guint +proc set_child1_resize*(a: var TGtkPaned, `child1_resize`: guint) +proc child2_shrink*(a: var TGtkPaned): guint +proc set_child2_shrink*(a: var TGtkPaned, `child2_shrink`: guint) +proc child2_resize*(a: var TGtkPaned): guint +proc set_child2_resize*(a: var TGtkPaned, `child2_resize`: guint) +proc orientation*(a: var TGtkPaned): guint +proc set_orientation*(a: var TGtkPaned, `orientation`: guint) +proc in_recursion*(a: var TGtkPaned): guint +proc set_in_recursion*(a: var TGtkPaned, `in_recursion`: guint) +proc handle_prelit*(a: var TGtkPaned): guint +proc set_handle_prelit*(a: var TGtkPaned, `handle_prelit`: guint) +proc gtk_paned_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_paned_get_type".} +proc gtk_paned_add1*(paned: PGtkPaned, child: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_paned_add1".} +proc gtk_paned_add2*(paned: PGtkPaned, child: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_paned_add2".} +proc gtk_paned_pack1*(paned: PGtkPaned, child: PGtkWidget, resize: gboolean, + shrink: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_paned_pack1".} +proc gtk_paned_pack2*(paned: PGtkPaned, child: PGtkWidget, resize: gboolean, + shrink: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_paned_pack2".} +proc gtk_paned_get_position*(paned: PGtkPaned): gint{.cdecl, dynlib: gtklib, + importc: "gtk_paned_get_position".} +proc gtk_paned_set_position*(paned: PGtkPaned, position: gint){.cdecl, + dynlib: gtklib, importc: "gtk_paned_set_position".} +proc gtk_paned_compute_position*(paned: PGtkPaned, allocation: gint, + child1_req: gint, child2_req: gint){.cdecl, + dynlib: gtklib, importc: "gtk_paned_compute_position".} +proc GTK_TYPE_HBUTTON_BOX*(): GType +proc GTK_HBUTTON_BOX*(obj: pointer): PGtkHButtonBox +proc GTK_HBUTTON_BOX_CLASS*(klass: pointer): PGtkHButtonBoxClass +proc GTK_IS_HBUTTON_BOX*(obj: pointer): bool +proc GTK_IS_HBUTTON_BOX_CLASS*(klass: pointer): bool +proc GTK_HBUTTON_BOX_GET_CLASS*(obj: pointer): PGtkHButtonBoxClass +proc gtk_hbutton_box_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_hbutton_box_get_type".} +proc gtk_hbutton_box_new*(): PGtkHButtonBox{.cdecl, dynlib: gtklib, + importc: "gtk_hbutton_box_new".} +proc GTK_TYPE_HPANED*(): GType +proc GTK_HPANED*(obj: pointer): PGtkHPaned +proc GTK_HPANED_CLASS*(klass: pointer): PGtkHPanedClass +proc GTK_IS_HPANED*(obj: pointer): bool +proc GTK_IS_HPANED_CLASS*(klass: pointer): bool +proc GTK_HPANED_GET_CLASS*(obj: pointer): PGtkHPanedClass +proc gtk_hpaned_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_hpaned_get_type".} +proc gtk_hpaned_new*(): PGtkHPaned{.cdecl, dynlib: gtklib, + importc: "gtk_hpaned_new".} +proc GTK_TYPE_RULER*(): GType +proc GTK_RULER*(obj: pointer): PGtkRuler +proc GTK_RULER_CLASS*(klass: pointer): PGtkRulerClass +proc GTK_IS_RULER*(obj: pointer): bool +proc GTK_IS_RULER_CLASS*(klass: pointer): bool +proc GTK_RULER_GET_CLASS*(obj: pointer): PGtkRulerClass +proc gtk_ruler_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_ruler_get_type".} +proc gtk_ruler_set_metric*(ruler: PGtkRuler, metric: TGtkMetricType){.cdecl, + dynlib: gtklib, importc: "gtk_ruler_set_metric".} +proc gtk_ruler_set_range*(ruler: PGtkRuler, lower: gdouble, upper: gdouble, + position: gdouble, max_size: gdouble){.cdecl, + dynlib: gtklib, importc: "gtk_ruler_set_range".} +proc gtk_ruler_draw_ticks*(ruler: PGtkRuler){.cdecl, dynlib: gtklib, + importc: "gtk_ruler_draw_ticks".} +proc gtk_ruler_draw_pos*(ruler: PGtkRuler){.cdecl, dynlib: gtklib, + importc: "gtk_ruler_draw_pos".} +proc gtk_ruler_get_metric*(ruler: PGtkRuler): TGtkMetricType{.cdecl, + dynlib: gtklib, importc: "gtk_ruler_get_metric".} +proc gtk_ruler_get_range*(ruler: PGtkRuler, lower: Pgdouble, upper: Pgdouble, + position: Pgdouble, max_size: Pgdouble){.cdecl, + dynlib: gtklib, importc: "gtk_ruler_get_range".} +proc GTK_TYPE_HRULER*(): GType +proc GTK_HRULER*(obj: pointer): PGtkHRuler +proc GTK_HRULER_CLASS*(klass: pointer): PGtkHRulerClass +proc GTK_IS_HRULER*(obj: pointer): bool +proc GTK_IS_HRULER_CLASS*(klass: pointer): bool +proc GTK_HRULER_GET_CLASS*(obj: pointer): PGtkHRulerClass +proc gtk_hruler_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_hruler_get_type".} +proc gtk_hruler_new*(): PGtkHRuler{.cdecl, dynlib: gtklib, + importc: "gtk_hruler_new".} +proc GTK_TYPE_SETTINGS*(): GType +proc GTK_SETTINGS*(obj: pointer): PGtkSettings +proc GTK_SETTINGS_CLASS*(klass: pointer): PGtkSettingsClass +proc GTK_IS_SETTINGS*(obj: pointer): bool +proc GTK_IS_SETTINGS_CLASS*(klass: pointer): bool +proc GTK_SETTINGS_GET_CLASS*(obj: pointer): PGtkSettingsClass +proc gtk_settings_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_settings_get_type".} +proc gtk_settings_get_for_screen*(screen: PGdkScreen): PGtkSettings{.cdecl, + dynlib: gtklib, importc: "gtk_settings_get_for_screen".} +proc gtk_settings_install_property*(pspec: PGParamSpec){.cdecl, dynlib: gtklib, + importc: "gtk_settings_install_property".} +proc gtk_settings_install_property_parser*(pspec: PGParamSpec, + parser: TGtkRcPropertyParser){.cdecl, dynlib: gtklib, importc: "gtk_settings_install_property_parser".} +proc gtk_rc_property_parse_color*(pspec: PGParamSpec, gstring: PGString, + property_value: PGValue): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_rc_property_parse_color".} +proc gtk_rc_property_parse_enum*(pspec: PGParamSpec, gstring: PGString, + property_value: PGValue): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_rc_property_parse_enum".} +proc gtk_rc_property_parse_flags*(pspec: PGParamSpec, gstring: PGString, + property_value: PGValue): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_rc_property_parse_flags".} +proc gtk_rc_property_parse_requisition*(pspec: PGParamSpec, gstring: PGString, + property_value: PGValue): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_rc_property_parse_requisition".} +proc gtk_rc_property_parse_border*(pspec: PGParamSpec, gstring: PGString, + property_value: PGValue): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_rc_property_parse_border".} +proc gtk_settings_set_property_value*(settings: PGtkSettings, name: cstring, + svalue: PGtkSettingsValue){.cdecl, + dynlib: gtklib, importc: "gtk_settings_set_property_value".} +proc gtk_settings_set_string_property*(settings: PGtkSettings, name: cstring, + v_string: cstring, origin: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_settings_set_string_property".} +proc gtk_settings_set_long_property*(settings: PGtkSettings, name: cstring, + v_long: glong, origin: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_settings_set_long_property".} +proc gtk_settings_set_double_property*(settings: PGtkSettings, name: cstring, + v_double: gdouble, origin: cstring){. + cdecl, dynlib: gtklib, importc: "gtk_settings_set_double_property".} +proc gtk_settings_handle_event*(event: PGdkEventSetting){.cdecl, + dynlib: gtklib, importc: "_gtk_settings_handle_event".} +proc gtk_rc_property_parser_from_type*(thetype: GType): TGtkRcPropertyParser{. + cdecl, dynlib: gtklib, importc: "_gtk_rc_property_parser_from_type".} +proc gtk_settings_parse_convert*(parser: TGtkRcPropertyParser, + src_value: PGValue, pspec: PGParamSpec, + dest_value: PGValue): gboolean{.cdecl, + dynlib: gtklib, importc: "_gtk_settings_parse_convert".} +const + GTK_RC_FG* = 1 shl 0 + GTK_RC_BG* = 1 shl 1 + GTK_RC_TEXT* = 1 shl 2 + GTK_RC_BASE* = 1 shl 3 + bm_TGtkRcStyle_engine_specified* = 0x00000001'i16 + bp_TGtkRcStyle_engine_specified* = 0'i16 + +proc GTK_TYPE_RC_STYLE*(): GType +proc GTK_RC_STYLE_get*(anObject: pointer): PGtkRcStyle +proc GTK_RC_STYLE_CLASS*(klass: pointer): PGtkRcStyleClass +proc GTK_IS_RC_STYLE*(anObject: pointer): bool +proc GTK_IS_RC_STYLE_CLASS*(klass: pointer): bool +proc GTK_RC_STYLE_GET_CLASS*(obj: pointer): PGtkRcStyleClass +proc engine_specified*(a: var TGtkRcStyle): guint +proc set_engine_specified*(a: var TGtkRcStyle, `engine_specified`: guint) +proc gtk_rc_init*(){.cdecl, dynlib: gtklib, importc: "_gtk_rc_init".} +proc gtk_rc_add_default_file*(filename: cstring){.cdecl, dynlib: gtklib, + importc: "gtk_rc_add_default_file".} +proc gtk_rc_set_default_files*(filenames: PPgchar){.cdecl, dynlib: gtklib, + importc: "gtk_rc_set_default_files".} +proc gtk_rc_get_default_files*(): PPgchar{.cdecl, dynlib: gtklib, + importc: "gtk_rc_get_default_files".} +proc gtk_rc_get_style*(widget: PGtkWidget): PGtkStyle{.cdecl, dynlib: gtklib, + importc: "gtk_rc_get_style".} +proc gtk_rc_get_style_by_paths*(settings: PGtkSettings, widget_path: cstring, + class_path: cstring, thetype: GType): PGtkStyle{. + cdecl, dynlib: gtklib, importc: "gtk_rc_get_style_by_paths".} +proc gtk_rc_reparse_all_for_settings*(settings: PGtkSettings, + force_load: gboolean): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_rc_reparse_all_for_settings".} +proc gtk_rc_find_pixmap_in_path*(settings: PGtkSettings, scanner: PGScanner, + pixmap_file: cstring): cstring{.cdecl, + dynlib: gtklib, importc: "gtk_rc_find_pixmap_in_path".} +proc gtk_rc_parse*(filename: cstring){.cdecl, dynlib: gtklib, + importc: "gtk_rc_parse".} +proc gtk_rc_parse_string*(rc_string: cstring){.cdecl, dynlib: gtklib, + importc: "gtk_rc_parse_string".} +proc gtk_rc_reparse_all*(): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_rc_reparse_all".} +proc gtk_rc_style_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_rc_style_get_type".} +proc gtk_rc_style_new*(): PGtkRcStyle{.cdecl, dynlib: gtklib, + importc: "gtk_rc_style_new".} +proc gtk_rc_style_copy*(orig: PGtkRcStyle): PGtkRcStyle{.cdecl, dynlib: gtklib, + importc: "gtk_rc_style_copy".} +proc gtk_rc_style_ref*(rc_style: PGtkRcStyle){.cdecl, dynlib: gtklib, + importc: "gtk_rc_style_ref".} +proc gtk_rc_style_unref*(rc_style: PGtkRcStyle){.cdecl, dynlib: gtklib, + importc: "gtk_rc_style_unref".} +proc gtk_rc_find_module_in_path*(module_file: cstring): cstring{.cdecl, + dynlib: gtklib, importc: "gtk_rc_find_module_in_path".} +proc gtk_rc_get_theme_dir*(): cstring{.cdecl, dynlib: gtklib, + importc: "gtk_rc_get_theme_dir".} +proc gtk_rc_get_module_dir*(): cstring{.cdecl, dynlib: gtklib, + importc: "gtk_rc_get_module_dir".} +proc gtk_rc_get_im_module_path*(): cstring{.cdecl, dynlib: gtklib, + importc: "gtk_rc_get_im_module_path".} +proc gtk_rc_get_im_module_file*(): cstring{.cdecl, dynlib: gtklib, + importc: "gtk_rc_get_im_module_file".} +proc gtk_rc_scanner_new*(): PGScanner{.cdecl, dynlib: gtklib, + importc: "gtk_rc_scanner_new".} +proc gtk_rc_parse_color*(scanner: PGScanner, color: PGdkColor): guint{.cdecl, + dynlib: gtklib, importc: "gtk_rc_parse_color".} +proc gtk_rc_parse_state*(scanner: PGScanner, state: PGtkStateType): guint{. + cdecl, dynlib: gtklib, importc: "gtk_rc_parse_state".} +proc gtk_rc_parse_priority*(scanner: PGScanner, priority: PGtkPathPriorityType): guint{. + cdecl, dynlib: gtklib, importc: "gtk_rc_parse_priority".} +proc gtk_rc_style_lookup_rc_property*(rc_style: PGtkRcStyle, + type_name: TGQuark, + property_name: TGQuark): PGtkRcProperty{. + cdecl, dynlib: gtklib, importc: "_gtk_rc_style_lookup_rc_property".} +proc gtk_rc_context_get_default_font_name*(settings: PGtkSettings): cstring{. + cdecl, dynlib: gtklib, importc: "_gtk_rc_context_get_default_font_name".} +proc GTK_TYPE_STYLE*(): GType +proc GTK_STYLE*(anObject: pointer): PGtkStyle +proc GTK_STYLE_CLASS*(klass: pointer): PGtkStyleClass +proc GTK_IS_STYLE*(anObject: pointer): bool +proc GTK_IS_STYLE_CLASS*(klass: pointer): bool +proc GTK_STYLE_GET_CLASS*(obj: pointer): PGtkStyleClass +proc GTK_TYPE_BORDER*(): GType +proc GTK_STYLE_ATTACHED*(style: pointer): bool +proc gtk_style_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_style_get_type".} +proc gtk_style_new*(): PGtkStyle{.cdecl, dynlib: gtklib, + importc: "gtk_style_new".} +proc gtk_style_copy*(style: PGtkStyle): PGtkStyle{.cdecl, dynlib: gtklib, + importc: "gtk_style_copy".} +proc gtk_style_attach*(style: PGtkStyle, window: PGdkWindow): PGtkStyle{.cdecl, + dynlib: gtklib, importc: "gtk_style_attach".} +proc gtk_style_detach*(style: PGtkStyle){.cdecl, dynlib: gtklib, + importc: "gtk_style_detach".} +proc gtk_style_set_background*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType){.cdecl, + dynlib: gtklib, importc: "gtk_style_set_background".} +proc gtk_style_apply_default_background*(style: PGtkStyle, window: PGdkWindow, + set_bg: gboolean, state_type: TGtkStateType, area: PGdkRectangle, x: gint, + y: gint, width: gint, height: gint){.cdecl, dynlib: gtklib, + importc: "gtk_style_apply_default_background".} +proc gtk_style_lookup_icon_set*(style: PGtkStyle, stock_id: cstring): PGtkIconSet{. + cdecl, dynlib: gtklib, importc: "gtk_style_lookup_icon_set".} +proc gtk_style_render_icon*(style: PGtkStyle, source: PGtkIconSource, + direction: TGtkTextDirection, state: TGtkStateType, + size: TGtkIconSize, widget: PGtkWidget, + detail: cstring): PGdkPixbuf{.cdecl, dynlib: gtklib, + importc: "gtk_style_render_icon".} +proc gtk_paint_hline*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, area: PGdkRectangle, + widget: PGtkWidget, detail: cstring, x1: gint, x2: gint, + y: gint){.cdecl, dynlib: gtklib, + importc: "gtk_paint_hline".} +proc gtk_paint_vline*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, area: PGdkRectangle, + widget: PGtkWidget, detail: cstring, y1: gint, y2: gint, + x: gint){.cdecl, dynlib: gtklib, + importc: "gtk_paint_vline".} +proc gtk_paint_shadow*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, width: gint, height: gint){.cdecl, + dynlib: gtklib, importc: "gtk_paint_shadow".} +proc gtk_paint_polygon*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + points: PGdkPoint, npoints: gint, fill: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_paint_polygon".} +proc gtk_paint_arrow*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + arrow_type: TGtkArrowType, fill: gboolean, x: gint, + y: gint, width: gint, height: gint){.cdecl, + dynlib: gtklib, importc: "gtk_paint_arrow".} +proc gtk_paint_diamond*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, width: gint, height: gint){.cdecl, + dynlib: gtklib, importc: "gtk_paint_diamond".} +proc gtk_paint_box*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, width: gint, height: gint){.cdecl, + dynlib: gtklib, importc: "gtk_paint_box".} +proc gtk_paint_flat_box*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, + detail: cstring, x: gint, y: gint, width: gint, + height: gint){.cdecl, dynlib: gtklib, + importc: "gtk_paint_flat_box".} +proc gtk_paint_check*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, width: gint, height: gint){.cdecl, + dynlib: gtklib, importc: "gtk_paint_check".} +proc gtk_paint_option*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, width: gint, height: gint){.cdecl, + dynlib: gtklib, importc: "gtk_paint_option".} +proc gtk_paint_tab*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, width: gint, height: gint){.cdecl, + dynlib: gtklib, importc: "gtk_paint_tab".} +proc gtk_paint_shadow_gap*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, + shadow_type: TGtkShadowType, area: PGdkRectangle, + widget: PGtkWidget, detail: cstring, x: gint, y: gint, + width: gint, height: gint, + gap_side: TGtkPositionType, gap_x: gint, + gap_width: gint){.cdecl, dynlib: gtklib, + importc: "gtk_paint_shadow_gap".} +proc gtk_paint_box_gap*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, width: gint, height: gint, + gap_side: TGtkPositionType, gap_x: gint, gap_width: gint){. + cdecl, dynlib: gtklib, importc: "gtk_paint_box_gap".} +proc gtk_paint_extension*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, + shadow_type: TGtkShadowType, area: PGdkRectangle, + widget: PGtkWidget, detail: cstring, x: gint, y: gint, + width: gint, height: gint, gap_side: TGtkPositionType){. + cdecl, dynlib: gtklib, importc: "gtk_paint_extension".} +proc gtk_paint_focus*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, area: PGdkRectangle, + widget: PGtkWidget, detail: cstring, x: gint, y: gint, + width: gint, height: gint){.cdecl, dynlib: gtklib, + importc: "gtk_paint_focus".} +proc gtk_paint_slider*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, width: gint, height: gint, + orientation: TGtkOrientation){.cdecl, dynlib: gtklib, + importc: "gtk_paint_slider".} +proc gtk_paint_handle*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, shadow_type: TGtkShadowType, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, width: gint, height: gint, + orientation: TGtkOrientation){.cdecl, dynlib: gtklib, + importc: "gtk_paint_handle".} +proc gtk_paint_expander*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, area: PGdkRectangle, + widget: PGtkWidget, detail: cstring, x: gint, y: gint, + expander_style: TGtkExpanderStyle){.cdecl, + dynlib: gtklib, importc: "gtk_paint_expander".} +proc gtk_paint_layout*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, use_text: gboolean, + area: PGdkRectangle, widget: PGtkWidget, detail: cstring, + x: gint, y: gint, layout: PPangoLayout){.cdecl, + dynlib: gtklib, importc: "gtk_paint_layout".} +proc gtk_paint_resize_grip*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, area: PGdkRectangle, + widget: PGtkWidget, detail: cstring, + edge: TGdkWindowEdge, x: gint, y: gint, width: gint, + height: gint){.cdecl, dynlib: gtklib, + importc: "gtk_paint_resize_grip".} +proc gtk_border_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_border_get_type".} +proc gtk_border_copy*(border: PGtkBorder): PGtkBorder{.cdecl, dynlib: gtklib, + importc: "gtk_border_copy".} +proc gtk_border_free*(border: PGtkBorder){.cdecl, dynlib: gtklib, + importc: "gtk_border_free".} +proc gtk_style_peek_property_value*(style: PGtkStyle, widget_type: GType, + pspec: PGParamSpec, + parser: TGtkRcPropertyParser): PGValue{. + cdecl, dynlib: gtklib, importc: "_gtk_style_peek_property_value".} +proc gtk_get_insertion_cursor_gc*(widget: PGtkWidget, is_primary: gboolean): PGdkGC{. + cdecl, dynlib: gtklib, importc: "_gtk_get_insertion_cursor_gc".} +proc gtk_draw_insertion_cursor*(widget: PGtkWidget, drawable: PGdkDrawable, + gc: PGdkGC, location: PGdkRectangle, + direction: TGtkTextDirection, + draw_arrow: gboolean){.cdecl, dynlib: gtklib, + importc: "_gtk_draw_insertion_cursor".} +const + bm_TGtkRange_inverted* = 0x00000001'i16 + bp_TGtkRange_inverted* = 0'i16 + bm_TGtkRange_flippable* = 0x00000002'i16 + bp_TGtkRange_flippable* = 1'i16 + bm_TGtkRange_has_stepper_a* = 0x00000004'i16 + bp_TGtkRange_has_stepper_a* = 2'i16 + bm_TGtkRange_has_stepper_b* = 0x00000008'i16 + bp_TGtkRange_has_stepper_b* = 3'i16 + bm_TGtkRange_has_stepper_c* = 0x00000010'i16 + bp_TGtkRange_has_stepper_c* = 4'i16 + bm_TGtkRange_has_stepper_d* = 0x00000020'i16 + bp_TGtkRange_has_stepper_d* = 5'i16 + bm_TGtkRange_need_recalc* = 0x00000040'i16 + bp_TGtkRange_need_recalc* = 6'i16 + bm_TGtkRange_slider_size_fixed* = 0x00000080'i16 + bp_TGtkRange_slider_size_fixed* = 7'i16 + bm_TGtkRange_trough_click_forward* = 0x00000001'i16 + bp_TGtkRange_trough_click_forward* = 0'i16 + bm_TGtkRange_update_pending* = 0x00000002'i16 + bp_TGtkRange_update_pending* = 1'i16 + +proc GTK_TYPE_RANGE*(): GType +proc GTK_RANGE*(obj: pointer): PGtkRange +proc GTK_RANGE_CLASS*(klass: pointer): PGtkRangeClass +proc GTK_IS_RANGE*(obj: pointer): bool +proc GTK_IS_RANGE_CLASS*(klass: pointer): bool +proc GTK_RANGE_GET_CLASS*(obj: pointer): PGtkRangeClass +proc inverted*(a: var TGtkRange): guint +proc set_inverted*(a: var TGtkRange, `inverted`: guint) +proc flippable*(a: var TGtkRange): guint +proc set_flippable*(a: var TGtkRange, `flippable`: guint) +proc has_stepper_a*(a: var TGtkRange): guint +proc set_has_stepper_a*(a: var TGtkRange, `has_stepper_a`: guint) +proc has_stepper_b*(a: var TGtkRange): guint +proc set_has_stepper_b*(a: var TGtkRange, `has_stepper_b`: guint) +proc has_stepper_c*(a: var TGtkRange): guint +proc set_has_stepper_c*(a: var TGtkRange, `has_stepper_c`: guint) +proc has_stepper_d*(a: var TGtkRange): guint +proc set_has_stepper_d*(a: var TGtkRange, `has_stepper_d`: guint) +proc need_recalc*(a: var TGtkRange): guint +proc set_need_recalc*(a: var TGtkRange, `need_recalc`: guint) +proc slider_size_fixed*(a: var TGtkRange): guint +proc set_slider_size_fixed*(a: var TGtkRange, `slider_size_fixed`: guint) +proc trough_click_forward*(a: var TGtkRange): guint +proc set_trough_click_forward*(a: var TGtkRange, `trough_click_forward`: guint) +proc update_pending*(a: var TGtkRange): guint +proc set_update_pending*(a: var TGtkRange, `update_pending`: guint) +proc gtk_range_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_range_get_type".} +proc gtk_range_set_update_policy*(range: PGtkRange, policy: TGtkUpdateType){. + cdecl, dynlib: gtklib, importc: "gtk_range_set_update_policy".} +proc gtk_range_get_update_policy*(range: PGtkRange): TGtkUpdateType{.cdecl, + dynlib: gtklib, importc: "gtk_range_get_update_policy".} +proc gtk_range_set_adjustment*(range: PGtkRange, adjustment: PGtkAdjustment){. + cdecl, dynlib: gtklib, importc: "gtk_range_set_adjustment".} +proc gtk_range_get_adjustment*(range: PGtkRange): PGtkAdjustment{.cdecl, + dynlib: gtklib, importc: "gtk_range_get_adjustment".} +proc gtk_range_set_inverted*(range: PGtkRange, setting: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_range_set_inverted".} +proc gtk_range_get_inverted*(range: PGtkRange): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_range_get_inverted".} +proc gtk_range_set_increments*(range: PGtkRange, step: gdouble, page: gdouble){. + cdecl, dynlib: gtklib, importc: "gtk_range_set_increments".} +proc gtk_range_set_range*(range: PGtkRange, min: gdouble, max: gdouble){.cdecl, + dynlib: gtklib, importc: "gtk_range_set_range".} +proc gtk_range_set_value*(range: PGtkRange, value: gdouble){.cdecl, + dynlib: gtklib, importc: "gtk_range_set_value".} +proc gtk_range_get_value*(range: PGtkRange): gdouble{.cdecl, dynlib: gtklib, + importc: "gtk_range_get_value".} +const + bm_TGtkScale_draw_value* = 0x00000001'i16 + bp_TGtkScale_draw_value* = 0'i16 + bm_TGtkScale_value_pos* = 0x00000006'i16 + bp_TGtkScale_value_pos* = 1'i16 + +proc GTK_TYPE_SCALE*(): GType +proc GTK_SCALE*(obj: pointer): PGtkScale +proc GTK_SCALE_CLASS*(klass: pointer): PGtkScaleClass +proc GTK_IS_SCALE*(obj: pointer): bool +proc GTK_IS_SCALE_CLASS*(klass: pointer): bool +proc GTK_SCALE_GET_CLASS*(obj: pointer): PGtkScaleClass +proc draw_value*(a: var TGtkScale): guint +proc set_draw_value*(a: var TGtkScale, `draw_value`: guint) +proc value_pos*(a: var TGtkScale): guint +proc set_value_pos*(a: var TGtkScale, `value_pos`: guint) +proc gtk_scale_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_scale_get_type".} +proc gtk_scale_set_digits*(scale: PGtkScale, digits: gint){.cdecl, + dynlib: gtklib, importc: "gtk_scale_set_digits".} +proc gtk_scale_get_digits*(scale: PGtkScale): gint{.cdecl, dynlib: gtklib, + importc: "gtk_scale_get_digits".} +proc gtk_scale_set_draw_value*(scale: PGtkScale, draw_value: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_scale_set_draw_value".} +proc gtk_scale_get_draw_value*(scale: PGtkScale): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_scale_get_draw_value".} +proc gtk_scale_set_value_pos*(scale: PGtkScale, pos: TGtkPositionType){.cdecl, + dynlib: gtklib, importc: "gtk_scale_set_value_pos".} +proc gtk_scale_get_value_pos*(scale: PGtkScale): TGtkPositionType{.cdecl, + dynlib: gtklib, importc: "gtk_scale_get_value_pos".} +proc gtk_scale_get_value_size*(scale: PGtkScale, width: Pgint, height: Pgint){. + cdecl, dynlib: gtklib, importc: "_gtk_scale_get_value_size".} +proc gtk_scale_format_value*(scale: PGtkScale, value: gdouble): cstring{.cdecl, + dynlib: gtklib, importc: "_gtk_scale_format_value".} +proc GTK_TYPE_HSCALE*(): GType +proc GTK_HSCALE*(obj: pointer): PGtkHScale +proc GTK_HSCALE_CLASS*(klass: pointer): PGtkHScaleClass +proc GTK_IS_HSCALE*(obj: pointer): bool +proc GTK_IS_HSCALE_CLASS*(klass: pointer): bool +proc GTK_HSCALE_GET_CLASS*(obj: pointer): PGtkHScaleClass +proc gtk_hscale_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_hscale_get_type".} +proc gtk_hscale_new*(adjustment: PGtkAdjustment): PGtkHScale{.cdecl, + dynlib: gtklib, importc: "gtk_hscale_new".} +proc gtk_hscale_new_with_range*(min: gdouble, max: gdouble, step: gdouble): PGtkHScale{. + cdecl, dynlib: gtklib, importc: "gtk_hscale_new_with_range".} +proc GTK_TYPE_SCROLLBAR*(): GType +proc GTK_SCROLLBAR*(obj: pointer): PGtkScrollbar +proc GTK_SCROLLBAR_CLASS*(klass: pointer): PGtkScrollbarClass +proc GTK_IS_SCROLLBAR*(obj: pointer): bool +proc GTK_IS_SCROLLBAR_CLASS*(klass: pointer): bool +proc GTK_SCROLLBAR_GET_CLASS*(obj: pointer): PGtkScrollbarClass +proc gtk_scrollbar_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_scrollbar_get_type".} +proc GTK_TYPE_HSCROLLBAR*(): GType +proc GTK_HSCROLLBAR*(obj: pointer): PGtkHScrollbar +proc GTK_HSCROLLBAR_CLASS*(klass: pointer): PGtkHScrollbarClass +proc GTK_IS_HSCROLLBAR*(obj: pointer): bool +proc GTK_IS_HSCROLLBAR_CLASS*(klass: pointer): bool +proc GTK_HSCROLLBAR_GET_CLASS*(obj: pointer): PGtkHScrollbarClass +proc gtk_hscrollbar_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_hscrollbar_get_type".} +proc gtk_hscrollbar_new*(adjustment: PGtkAdjustment): PGtkHScrollbar{.cdecl, + dynlib: gtklib, importc: "gtk_hscrollbar_new".} +proc GTK_TYPE_SEPARATOR*(): GType +proc GTK_SEPARATOR*(obj: pointer): PGtkSeparator +proc GTK_SEPARATOR_CLASS*(klass: pointer): PGtkSeparatorClass +proc GTK_IS_SEPARATOR*(obj: pointer): bool +proc GTK_IS_SEPARATOR_CLASS*(klass: pointer): bool +proc GTK_SEPARATOR_GET_CLASS*(obj: pointer): PGtkSeparatorClass +proc gtk_separator_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_separator_get_type".} +proc GTK_TYPE_HSEPARATOR*(): GType +proc GTK_HSEPARATOR*(obj: pointer): PGtkHSeparator +proc GTK_HSEPARATOR_CLASS*(klass: pointer): PGtkHSeparatorClass +proc GTK_IS_HSEPARATOR*(obj: pointer): bool +proc GTK_IS_HSEPARATOR_CLASS*(klass: pointer): bool +proc GTK_HSEPARATOR_GET_CLASS*(obj: pointer): PGtkHSeparatorClass +proc gtk_hseparator_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_hseparator_get_type".} +proc gtk_hseparator_new*(): PGtkHSeparator{.cdecl, dynlib: gtklib, + importc: "gtk_hseparator_new".} +proc GTK_TYPE_ICON_FACTORY*(): GType +proc GTK_ICON_FACTORY*(anObject: pointer): PGtkIconFactory +proc GTK_ICON_FACTORY_CLASS*(klass: pointer): PGtkIconFactoryClass +proc GTK_IS_ICON_FACTORY*(anObject: pointer): bool +proc GTK_IS_ICON_FACTORY_CLASS*(klass: pointer): bool +proc GTK_ICON_FACTORY_GET_CLASS*(obj: pointer): PGtkIconFactoryClass +proc GTK_TYPE_ICON_SET*(): GType +proc GTK_TYPE_ICON_SOURCE*(): GType +proc gtk_icon_factory_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_icon_factory_get_type".} +proc gtk_icon_factory_new*(): PGtkIconFactory{.cdecl, dynlib: gtklib, + importc: "gtk_icon_factory_new".} +proc gtk_icon_factory_add*(factory: PGtkIconFactory, stock_id: cstring, + icon_set: PGtkIconSet){.cdecl, dynlib: gtklib, + importc: "gtk_icon_factory_add".} +proc gtk_icon_factory_lookup*(factory: PGtkIconFactory, stock_id: cstring): PGtkIconSet{. + cdecl, dynlib: gtklib, importc: "gtk_icon_factory_lookup".} +proc gtk_icon_factory_add_default*(factory: PGtkIconFactory){.cdecl, + dynlib: gtklib, importc: "gtk_icon_factory_add_default".} +proc gtk_icon_factory_remove_default*(factory: PGtkIconFactory){.cdecl, + dynlib: gtklib, importc: "gtk_icon_factory_remove_default".} +proc gtk_icon_factory_lookup_default*(stock_id: cstring): PGtkIconSet{.cdecl, + dynlib: gtklib, importc: "gtk_icon_factory_lookup_default".} +proc gtk_icon_size_lookup*(size: TGtkIconSize, width: Pgint, height: Pgint): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_icon_size_lookup".} +proc gtk_icon_size_register*(name: cstring, width: gint, height: gint): TGtkIconSize{. + cdecl, dynlib: gtklib, importc: "gtk_icon_size_register".} +proc gtk_icon_size_register_alias*(alias: cstring, target: TGtkIconSize){.cdecl, + dynlib: gtklib, importc: "gtk_icon_size_register_alias".} +proc gtk_icon_size_from_name*(name: cstring): TGtkIconSize{.cdecl, + dynlib: gtklib, importc: "gtk_icon_size_from_name".} +proc gtk_icon_size_get_name*(size: TGtkIconSize): cstring{.cdecl, dynlib: gtklib, + importc: "gtk_icon_size_get_name".} +proc gtk_icon_set_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_icon_set_get_type".} +proc gtk_icon_set_new*(): PGtkIconSet{.cdecl, dynlib: gtklib, + importc: "gtk_icon_set_new".} +proc gtk_icon_set_new_from_pixbuf*(pixbuf: PGdkPixbuf): PGtkIconSet{.cdecl, + dynlib: gtklib, importc: "gtk_icon_set_new_from_pixbuf".} +proc gtk_icon_set_ref*(icon_set: PGtkIconSet): PGtkIconSet{.cdecl, + dynlib: gtklib, importc: "gtk_icon_set_ref".} +proc gtk_icon_set_unref*(icon_set: PGtkIconSet){.cdecl, dynlib: gtklib, + importc: "gtk_icon_set_unref".} +proc gtk_icon_set_copy*(icon_set: PGtkIconSet): PGtkIconSet{.cdecl, + dynlib: gtklib, importc: "gtk_icon_set_copy".} +proc gtk_icon_set_render_icon*(icon_set: PGtkIconSet, style: PGtkStyle, + direction: TGtkTextDirection, + state: TGtkStateType, size: TGtkIconSize, + widget: PGtkWidget, detail: cstring): PGdkPixbuf{. + cdecl, dynlib: gtklib, importc: "gtk_icon_set_render_icon".} +proc gtk_icon_set_add_source*(icon_set: PGtkIconSet, source: PGtkIconSource){. + cdecl, dynlib: gtklib, importc: "gtk_icon_set_add_source".} +proc gtk_icon_set_get_sizes*(icon_set: PGtkIconSet, sizes: PPGtkIconSize, + n_sizes: pgint){.cdecl, dynlib: gtklib, + importc: "gtk_icon_set_get_sizes".} +proc gtk_icon_source_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_icon_source_get_type".} +proc gtk_icon_source_new*(): PGtkIconSource{.cdecl, dynlib: gtklib, + importc: "gtk_icon_source_new".} +proc gtk_icon_source_copy*(source: PGtkIconSource): PGtkIconSource{.cdecl, + dynlib: gtklib, importc: "gtk_icon_source_copy".} +proc gtk_icon_source_free*(source: PGtkIconSource){.cdecl, dynlib: gtklib, + importc: "gtk_icon_source_free".} +proc gtk_icon_source_set_filename*(source: PGtkIconSource, filename: cstring){. + cdecl, dynlib: gtklib, importc: "gtk_icon_source_set_filename".} +proc gtk_icon_source_set_pixbuf*(source: PGtkIconSource, pixbuf: PGdkPixbuf){. + cdecl, dynlib: gtklib, importc: "gtk_icon_source_set_pixbuf".} +proc gtk_icon_source_get_filename*(source: PGtkIconSource): cstring{.cdecl, + dynlib: gtklib, importc: "gtk_icon_source_get_filename".} +proc gtk_icon_source_get_pixbuf*(source: PGtkIconSource): PGdkPixbuf{.cdecl, + dynlib: gtklib, importc: "gtk_icon_source_get_pixbuf".} +proc gtk_icon_source_set_direction_wildcarded*(source: PGtkIconSource, + setting: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_icon_source_set_direction_wildcarded".} +proc gtk_icon_source_set_state_wildcarded*(source: PGtkIconSource, + setting: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_icon_source_set_state_wildcarded".} +proc gtk_icon_source_set_size_wildcarded*(source: PGtkIconSource, + setting: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_icon_source_set_size_wildcarded".} +proc gtk_icon_source_get_size_wildcarded*(source: PGtkIconSource): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_icon_source_get_size_wildcarded".} +proc gtk_icon_source_get_state_wildcarded*(source: PGtkIconSource): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_icon_source_get_state_wildcarded".} +proc gtk_icon_source_get_direction_wildcarded*(source: PGtkIconSource): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_icon_source_get_direction_wildcarded".} +proc gtk_icon_source_set_direction*(source: PGtkIconSource, + direction: TGtkTextDirection){.cdecl, + dynlib: gtklib, importc: "gtk_icon_source_set_direction".} +proc gtk_icon_source_set_state*(source: PGtkIconSource, state: TGtkStateType){. + cdecl, dynlib: gtklib, importc: "gtk_icon_source_set_state".} +proc gtk_icon_source_set_size*(source: PGtkIconSource, size: TGtkIconSize){. + cdecl, dynlib: gtklib, importc: "gtk_icon_source_set_size".} +proc gtk_icon_source_get_direction*(source: PGtkIconSource): TGtkTextDirection{. + cdecl, dynlib: gtklib, importc: "gtk_icon_source_get_direction".} +proc gtk_icon_source_get_state*(source: PGtkIconSource): TGtkStateType{.cdecl, + dynlib: gtklib, importc: "gtk_icon_source_get_state".} +proc gtk_icon_source_get_size*(source: PGtkIconSource): TGtkIconSize{.cdecl, + dynlib: gtklib, importc: "gtk_icon_source_get_size".} +proc gtk_icon_set_invalidate_caches*(){.cdecl, dynlib: gtklib, + importc: "_gtk_icon_set_invalidate_caches".} +proc gtk_icon_factory_list_ids*(): PGSList{.cdecl, dynlib: gtklib, + importc: "_gtk_icon_factory_list_ids".} +proc GTK_TYPE_IMAGE*(): GType +proc GTK_IMAGE*(obj: pointer): PGtkImage +proc GTK_IMAGE_CLASS*(klass: pointer): PGtkImageClass +proc GTK_IS_IMAGE*(obj: pointer): bool +proc GTK_IS_IMAGE_CLASS*(klass: pointer): bool +proc GTK_IMAGE_GET_CLASS*(obj: pointer): PGtkImageClass +proc gtk_image_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_image_get_type".} +proc gtk_image_new*(): PGtkImage{.cdecl, dynlib: gtklib, + importc: "gtk_image_new".} +proc gtk_image_new_from_pixmap*(pixmap: PGdkPixmap, mask: PGdkBitmap): PGtkImage{. + cdecl, dynlib: gtklib, importc: "gtk_image_new_from_pixmap".} +proc gtk_image_new_from_image*(image: PGdkImage, mask: PGdkBitmap): PGtkImage{. + cdecl, dynlib: gtklib, importc: "gtk_image_new_from_image".} +proc gtk_image_new_from_file*(filename: cstring): PGtkImage{.cdecl, + dynlib: gtklib, importc: "gtk_image_new_from_file".} +proc gtk_image_new_from_pixbuf*(pixbuf: PGdkPixbuf): PGtkImage{.cdecl, + dynlib: gtklib, importc: "gtk_image_new_from_pixbuf".} +proc gtk_image_new_from_stock*(stock_id: cstring, size: TGtkIconSize): PGtkImage{. + cdecl, dynlib: gtklib, importc: "gtk_image_new_from_stock".} +proc gtk_image_new_from_icon_set*(icon_set: PGtkIconSet, size: TGtkIconSize): PGtkImage{. + cdecl, dynlib: gtklib, importc: "gtk_image_new_from_icon_set".} +proc gtk_image_new_from_animation*(animation: PGdkPixbufAnimation): PGtkImage{. + cdecl, dynlib: gtklib, importc: "gtk_image_new_from_animation".} +proc gtk_image_set_from_pixmap*(image: PGtkImage, pixmap: PGdkPixmap, + mask: PGdkBitmap){.cdecl, dynlib: gtklib, + importc: "gtk_image_set_from_pixmap".} +proc gtk_image_set_from_image*(image: PGtkImage, gdk_image: PGdkImage, + mask: PGdkBitmap){.cdecl, dynlib: gtklib, + importc: "gtk_image_set_from_image".} +proc gtk_image_set_from_file*(image: PGtkImage, filename: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_image_set_from_file".} +proc gtk_image_set_from_pixbuf*(image: PGtkImage, pixbuf: PGdkPixbuf){.cdecl, + dynlib: gtklib, importc: "gtk_image_set_from_pixbuf".} +proc gtk_image_set_from_stock*(image: PGtkImage, stock_id: cstring, + size: TGtkIconSize){.cdecl, dynlib: gtklib, + importc: "gtk_image_set_from_stock".} +proc gtk_image_set_from_icon_set*(image: PGtkImage, icon_set: PGtkIconSet, + size: TGtkIconSize){.cdecl, dynlib: gtklib, + importc: "gtk_image_set_from_icon_set".} +proc gtk_image_set_from_animation*(image: PGtkImage, + animation: PGdkPixbufAnimation){.cdecl, + dynlib: gtklib, importc: "gtk_image_set_from_animation".} +proc gtk_image_get_storage_type*(image: PGtkImage): TGtkImageType{.cdecl, + dynlib: gtklib, importc: "gtk_image_get_storage_type".} +proc gtk_image_get_pixbuf*(image: PGtkImage): PGdkPixbuf{.cdecl, dynlib: gtklib, + importc: "gtk_image_get_pixbuf".} +proc gtk_image_get_stock*(image: PGtkImage, stock_id: PPgchar, + size: PGtkIconSize){.cdecl, dynlib: gtklib, + importc: "gtk_image_get_stock".} +proc gtk_image_get_animation*(image: PGtkImage): PGdkPixbufAnimation{.cdecl, + dynlib: gtklib, importc: "gtk_image_get_animation".} +proc GTK_TYPE_IMAGE_MENU_ITEM*(): GType +proc GTK_IMAGE_MENU_ITEM*(obj: pointer): PGtkImageMenuItem +proc GTK_IMAGE_MENU_ITEM_CLASS*(klass: pointer): PGtkImageMenuItemClass +proc GTK_IS_IMAGE_MENU_ITEM*(obj: pointer): bool +proc GTK_IS_IMAGE_MENU_ITEM_CLASS*(klass: pointer): bool +proc GTK_IMAGE_MENU_ITEM_GET_CLASS*(obj: pointer): PGtkImageMenuItemClass +proc gtk_image_menu_item_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_image_menu_item_get_type".} +proc gtk_image_menu_item_new*(): PGtkImageMenuItem{.cdecl, dynlib: gtklib, + importc: "gtk_image_menu_item_new".} +proc gtk_image_menu_item_new_with_label*(`label`: cstring): PGtkImageMenuItem{.cdecl, + dynlib: gtklib, importc: "gtk_image_menu_item_new_with_label".} +proc gtk_image_menu_item_new_with_mnemonic*(`label`: cstring): PGtkImageMenuItem{.cdecl, + dynlib: gtklib, importc: "gtk_image_menu_item_new_with_mnemonic".} +proc gtk_image_menu_item_new_from_stock*(stock_id: cstring, + accel_group: PGtkAccelGroup): PGtkImageMenuItem{.cdecl, dynlib: gtklib, + importc: "gtk_image_menu_item_new_from_stock".} +proc gtk_image_menu_item_set_image*(image_menu_item: PGtkImageMenuItem, + image: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_image_menu_item_set_image".} +proc gtk_image_menu_item_get_image*(image_menu_item: PGtkImageMenuItem): PGtkWidget{. + cdecl, dynlib: gtklib, importc: "gtk_image_menu_item_get_image".} +const + bm_TGtkIMContextSimple_in_hex_sequence* = 0x00000001'i16 + bp_TGtkIMContextSimple_in_hex_sequence* = 0'i16 + +proc GTK_TYPE_IM_CONTEXT_SIMPLE*(): GType +proc GTK_IM_CONTEXT_SIMPLE*(obj: pointer): PGtkIMContextSimple +proc GTK_IM_CONTEXT_SIMPLE_CLASS*(klass: pointer): PGtkIMContextSimpleClass +proc GTK_IS_IM_CONTEXT_SIMPLE*(obj: pointer): bool +proc GTK_IS_IM_CONTEXT_SIMPLE_CLASS*(klass: pointer): bool +proc GTK_IM_CONTEXT_SIMPLE_GET_CLASS*(obj: pointer): PGtkIMContextSimpleClass +proc in_hex_sequence*(a: var TGtkIMContextSimple): guint +proc set_in_hex_sequence*(a: var TGtkIMContextSimple, `in_hex_sequence`: guint) +proc gtk_im_context_simple_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_im_context_simple_get_type".} +proc gtk_im_context_simple_new*(): PGtkIMContext{.cdecl, dynlib: gtklib, + importc: "gtk_im_context_simple_new".} +proc gtk_im_context_simple_add_table*(context_simple: PGtkIMContextSimple, + data: Pguint16, max_seq_len: gint, + n_seqs: gint){.cdecl, dynlib: gtklib, + importc: "gtk_im_context_simple_add_table".} +proc GTK_TYPE_IM_MULTICONTEXT*(): GType +proc GTK_IM_MULTICONTEXT*(obj: pointer): PGtkIMMulticontext +proc GTK_IM_MULTICONTEXT_CLASS*(klass: pointer): PGtkIMMulticontextClass +proc GTK_IS_IM_MULTICONTEXT*(obj: pointer): bool +proc GTK_IS_IM_MULTICONTEXT_CLASS*(klass: pointer): bool +proc GTK_IM_MULTICONTEXT_GET_CLASS*(obj: pointer): PGtkIMMulticontextClass +proc gtk_im_multicontext_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_im_multicontext_get_type".} +proc gtk_im_multicontext_new*(): PGtkIMContext{.cdecl, dynlib: gtklib, + importc: "gtk_im_multicontext_new".} +proc gtk_im_multicontext_append_menuitems*(context: PGtkIMMulticontext, + menushell: PGtkMenuShell){.cdecl, dynlib: gtklib, + importc: "gtk_im_multicontext_append_menuitems".} +proc GTK_TYPE_INPUT_DIALOG*(): GType +proc GTK_INPUT_DIALOG*(obj: pointer): PGtkInputDialog +proc GTK_INPUT_DIALOG_CLASS*(klass: pointer): PGtkInputDialogClass +proc GTK_IS_INPUT_DIALOG*(obj: pointer): bool +proc GTK_IS_INPUT_DIALOG_CLASS*(klass: pointer): bool +proc GTK_INPUT_DIALOG_GET_CLASS*(obj: pointer): PGtkInputDialogClass +proc gtk_input_dialog_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_input_dialog_get_type".} +proc gtk_input_dialog_new*(): PGtkInputDialog{.cdecl, dynlib: gtklib, + importc: "gtk_input_dialog_new".} +proc GTK_TYPE_INVISIBLE*(): GType +proc GTK_INVISIBLE*(obj: pointer): PGtkInvisible +proc GTK_INVISIBLE_CLASS*(klass: pointer): PGtkInvisibleClass +proc GTK_IS_INVISIBLE*(obj: pointer): bool +proc GTK_IS_INVISIBLE_CLASS*(klass: pointer): bool +proc GTK_INVISIBLE_GET_CLASS*(obj: pointer): PGtkInvisibleClass +proc gtk_invisible_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_invisible_get_type".} +proc gtk_invisible_new*(): PGtkInvisible{.cdecl, dynlib: gtklib, + importc: "gtk_invisible_new".} +proc gtk_invisible_new_for_screen*(screen: PGdkScreen): PGtkInvisible{.cdecl, + dynlib: gtklib, importc: "gtk_invisible_new_for_screen".} +proc gtk_invisible_set_screen*(invisible: PGtkInvisible, screen: PGdkScreen){. + cdecl, dynlib: gtklib, importc: "gtk_invisible_set_screen".} +proc gtk_invisible_get_screen*(invisible: PGtkInvisible): PGdkScreen{.cdecl, + dynlib: gtklib, importc: "gtk_invisible_get_screen".} +proc GTK_TYPE_ITEM_FACTORY*(): GType +proc GTK_ITEM_FACTORY*(anObject: pointer): PGtkItemFactory +proc GTK_ITEM_FACTORY_CLASS*(klass: pointer): PGtkItemFactoryClass +proc GTK_IS_ITEM_FACTORY*(anObject: pointer): bool +proc GTK_IS_ITEM_FACTORY_CLASS*(klass: pointer): bool +proc GTK_ITEM_FACTORY_GET_CLASS*(obj: pointer): PGtkItemFactoryClass +proc gtk_item_factory_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_item_factory_get_type".} +proc gtk_item_factory_new*(container_type: TGtkType, path: cstring, + accel_group: PGtkAccelGroup): PGtkItemFactory{.cdecl, + dynlib: gtklib, importc: "gtk_item_factory_new".} +proc gtk_item_factory_construct*(ifactory: PGtkItemFactory, + container_type: TGtkType, path: cstring, + accel_group: PGtkAccelGroup){.cdecl, + dynlib: gtklib, importc: "gtk_item_factory_construct".} +proc gtk_item_factory_add_foreign*(accel_widget: PGtkWidget, full_path: cstring, + accel_group: PGtkAccelGroup, keyval: guint, + modifiers: TGdkModifierType){.cdecl, + dynlib: gtklib, importc: "gtk_item_factory_add_foreign".} +proc gtk_item_factory_from_widget*(widget: PGtkWidget): PGtkItemFactory{.cdecl, + dynlib: gtklib, importc: "gtk_item_factory_from_widget".} +proc gtk_item_factory_path_from_widget*(widget: PGtkWidget): cstring{.cdecl, + dynlib: gtklib, importc: "gtk_item_factory_path_from_widget".} +proc gtk_item_factory_get_item*(ifactory: PGtkItemFactory, path: cstring): PGtkWidget{. + cdecl, dynlib: gtklib, importc: "gtk_item_factory_get_item".} +proc gtk_item_factory_get_widget*(ifactory: PGtkItemFactory, path: cstring): PGtkWidget{. + cdecl, dynlib: gtklib, importc: "gtk_item_factory_get_widget".} +proc gtk_item_factory_get_widget_by_action*(ifactory: PGtkItemFactory, + action: guint): PGtkWidget{.cdecl, dynlib: gtklib, importc: "gtk_item_factory_get_widget_by_action".} +proc gtk_item_factory_get_item_by_action*(ifactory: PGtkItemFactory, + action: guint): PGtkWidget{.cdecl, dynlib: gtklib, + importc: "gtk_item_factory_get_item_by_action".} +proc gtk_item_factory_create_item*(ifactory: PGtkItemFactory, + entry: PGtkItemFactoryEntry, + callback_data: gpointer, callback_type: guint){. + cdecl, dynlib: gtklib, importc: "gtk_item_factory_create_item".} +proc gtk_item_factory_create_items*(ifactory: PGtkItemFactory, n_entries: guint, + entries: PGtkItemFactoryEntry, + callback_data: gpointer){.cdecl, + dynlib: gtklib, importc: "gtk_item_factory_create_items".} +proc gtk_item_factory_delete_item*(ifactory: PGtkItemFactory, path: cstring){. + cdecl, dynlib: gtklib, importc: "gtk_item_factory_delete_item".} +proc gtk_item_factory_delete_entry*(ifactory: PGtkItemFactory, + entry: PGtkItemFactoryEntry){.cdecl, + dynlib: gtklib, importc: "gtk_item_factory_delete_entry".} +proc gtk_item_factory_delete_entries*(ifactory: PGtkItemFactory, + n_entries: guint, + entries: PGtkItemFactoryEntry){.cdecl, + dynlib: gtklib, importc: "gtk_item_factory_delete_entries".} +proc gtk_item_factory_popup*(ifactory: PGtkItemFactory, x: guint, y: guint, + mouse_button: guint, time: guint32){.cdecl, + dynlib: gtklib, importc: "gtk_item_factory_popup".} +proc gtk_item_factory_popup_with_data*(ifactory: PGtkItemFactory, + popup_data: gpointer, + destroy: TGtkDestroyNotify, x: guint, + y: guint, mouse_button: guint, + time: guint32){.cdecl, dynlib: gtklib, + importc: "gtk_item_factory_popup_with_data".} +proc gtk_item_factory_popup_data*(ifactory: PGtkItemFactory): gpointer{.cdecl, + dynlib: gtklib, importc: "gtk_item_factory_popup_data".} +proc gtk_item_factory_popup_data_from_widget*(widget: PGtkWidget): gpointer{. + cdecl, dynlib: gtklib, importc: "gtk_item_factory_popup_data_from_widget".} +proc gtk_item_factory_set_translate_func*(ifactory: PGtkItemFactory, + fun: TGtkTranslateFunc, data: gpointer, notify: TGtkDestroyNotify){.cdecl, + dynlib: gtklib, importc: "gtk_item_factory_set_translate_func".} +proc GTK_TYPE_LAYOUT*(): GType +proc GTK_LAYOUT*(obj: pointer): PGtkLayout +proc GTK_LAYOUT_CLASS*(klass: pointer): PGtkLayoutClass +proc GTK_IS_LAYOUT*(obj: pointer): bool +proc GTK_IS_LAYOUT_CLASS*(klass: pointer): bool +proc GTK_LAYOUT_GET_CLASS*(obj: pointer): PGtkLayoutClass +proc gtk_layout_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_layout_get_type".} +proc gtk_layout_new*(hadjustment: PGtkAdjustment, vadjustment: PGtkAdjustment): PGtkLayout{. + cdecl, dynlib: gtklib, importc: "gtk_layout_new".} +proc gtk_layout_put*(layout: PGtkLayout, child_widget: PGtkWidget, x: gint, + y: gint){.cdecl, dynlib: gtklib, importc: "gtk_layout_put".} +proc gtk_layout_move*(layout: PGtkLayout, child_widget: PGtkWidget, x: gint, + y: gint){.cdecl, dynlib: gtklib, + importc: "gtk_layout_move".} +proc gtk_layout_set_size*(layout: PGtkLayout, width: guint, height: guint){. + cdecl, dynlib: gtklib, importc: "gtk_layout_set_size".} +proc gtk_layout_get_size*(layout: PGtkLayout, width: Pguint, height: Pguint){. + cdecl, dynlib: gtklib, importc: "gtk_layout_get_size".} +proc gtk_layout_get_hadjustment*(layout: PGtkLayout): PGtkAdjustment{.cdecl, + dynlib: gtklib, importc: "gtk_layout_get_hadjustment".} +proc gtk_layout_get_vadjustment*(layout: PGtkLayout): PGtkAdjustment{.cdecl, + dynlib: gtklib, importc: "gtk_layout_get_vadjustment".} +proc gtk_layout_set_hadjustment*(layout: PGtkLayout, adjustment: PGtkAdjustment){. + cdecl, dynlib: gtklib, importc: "gtk_layout_set_hadjustment".} +proc gtk_layout_set_vadjustment*(layout: PGtkLayout, adjustment: PGtkAdjustment){. + cdecl, dynlib: gtklib, importc: "gtk_layout_set_vadjustment".} +const + bm_TGtkList_selection_mode* = 0x00000003'i16 + bp_TGtkList_selection_mode* = 0'i16 + bm_TGtkList_drag_selection* = 0x00000004'i16 + bp_TGtkList_drag_selection* = 2'i16 + bm_TGtkList_add_mode* = 0x00000008'i16 + bp_TGtkList_add_mode* = 3'i16 + +proc GTK_TYPE_LIST*(): GType +proc GTK_LIST*(obj: pointer): PGtkList +proc GTK_LIST_CLASS*(klass: pointer): PGtkListClass +proc GTK_IS_LIST*(obj: pointer): bool +proc GTK_IS_LIST_CLASS*(klass: pointer): bool +proc GTK_LIST_GET_CLASS*(obj: pointer): PGtkListClass +proc selection_mode*(a: var TGtkList): guint +proc set_selection_mode*(a: var TGtkList, `selection_mode`: guint) +proc drag_selection*(a: var TGtkList): guint +proc set_drag_selection*(a: var TGtkList, `drag_selection`: guint) +proc add_mode*(a: var TGtkList): guint +proc set_add_mode*(a: var TGtkList, `add_mode`: guint) +proc gtk_list_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_list_get_type".} +proc gtk_list_new*(): PGtkList{.cdecl, dynlib: gtklib, importc: "gtk_list_new".} +proc gtk_list_insert_items*(list: PGtkList, items: PGList, position: gint){. + cdecl, dynlib: gtklib, importc: "gtk_list_insert_items".} +proc gtk_list_append_items*(list: PGtkList, items: PGList){.cdecl, + dynlib: gtklib, importc: "gtk_list_append_items".} +proc gtk_list_prepend_items*(list: PGtkList, items: PGList){.cdecl, + dynlib: gtklib, importc: "gtk_list_prepend_items".} +proc gtk_list_remove_items*(list: PGtkList, items: PGList){.cdecl, + dynlib: gtklib, importc: "gtk_list_remove_items".} +proc gtk_list_remove_items_no_unref*(list: PGtkList, items: PGList){.cdecl, + dynlib: gtklib, importc: "gtk_list_remove_items_no_unref".} +proc gtk_list_clear_items*(list: PGtkList, start: gint, theEnd: gint){.cdecl, + dynlib: gtklib, importc: "gtk_list_clear_items".} +proc gtk_list_select_item*(list: PGtkList, item: gint){.cdecl, dynlib: gtklib, + importc: "gtk_list_select_item".} +proc gtk_list_unselect_item*(list: PGtkList, item: gint){.cdecl, dynlib: gtklib, + importc: "gtk_list_unselect_item".} +proc gtk_list_select_child*(list: PGtkList, child: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_list_select_child".} +proc gtk_list_unselect_child*(list: PGtkList, child: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_list_unselect_child".} +proc gtk_list_child_position*(list: PGtkList, child: PGtkWidget): gint{.cdecl, + dynlib: gtklib, importc: "gtk_list_child_position".} +proc gtk_list_set_selection_mode*(list: PGtkList, mode: TGtkSelectionMode){. + cdecl, dynlib: gtklib, importc: "gtk_list_set_selection_mode".} +proc gtk_list_extend_selection*(list: PGtkList, scroll_type: TGtkScrollType, + position: gfloat, auto_start_selection: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_list_extend_selection".} +proc gtk_list_start_selection*(list: PGtkList){.cdecl, dynlib: gtklib, + importc: "gtk_list_start_selection".} +proc gtk_list_end_selection*(list: PGtkList){.cdecl, dynlib: gtklib, + importc: "gtk_list_end_selection".} +proc gtk_list_select_all*(list: PGtkList){.cdecl, dynlib: gtklib, + importc: "gtk_list_select_all".} +proc gtk_list_unselect_all*(list: PGtkList){.cdecl, dynlib: gtklib, + importc: "gtk_list_unselect_all".} +proc gtk_list_scroll_horizontal*(list: PGtkList, scroll_type: TGtkScrollType, + position: gfloat){.cdecl, dynlib: gtklib, + importc: "gtk_list_scroll_horizontal".} +proc gtk_list_scroll_vertical*(list: PGtkList, scroll_type: TGtkScrollType, + position: gfloat){.cdecl, dynlib: gtklib, + importc: "gtk_list_scroll_vertical".} +proc gtk_list_toggle_add_mode*(list: PGtkList){.cdecl, dynlib: gtklib, + importc: "gtk_list_toggle_add_mode".} +proc gtk_list_toggle_focus_row*(list: PGtkList){.cdecl, dynlib: gtklib, + importc: "gtk_list_toggle_focus_row".} +proc gtk_list_toggle_row*(list: PGtkList, item: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_list_toggle_row".} +proc gtk_list_undo_selection*(list: PGtkList){.cdecl, dynlib: gtklib, + importc: "gtk_list_undo_selection".} +proc gtk_list_end_drag_selection*(list: PGtkList){.cdecl, dynlib: gtklib, + importc: "gtk_list_end_drag_selection".} +const + GTK_TREE_MODEL_ITERS_PERSIST* = 1 shl 0 + GTK_TREE_MODEL_LIST_ONLY* = 1 shl 1 + +proc GTK_TYPE_TREE_MODEL*(): GType +proc GTK_TREE_MODEL*(obj: pointer): PGtkTreeModel +proc GTK_IS_TREE_MODEL*(obj: pointer): bool +proc GTK_TREE_MODEL_GET_IFACE*(obj: pointer): PGtkTreeModelIface +proc GTK_TYPE_TREE_ITER*(): GType +proc GTK_TYPE_TREE_PATH*(): GType +proc gtk_tree_path_new*(): PGtkTreePath{.cdecl, dynlib: gtklib, + importc: "gtk_tree_path_new".} +proc gtk_tree_path_new_from_string*(path: cstring): PGtkTreePath{.cdecl, + dynlib: gtklib, importc: "gtk_tree_path_new_from_string".} +proc gtk_tree_path_to_string*(path: PGtkTreePath): cstring{.cdecl, + dynlib: gtklib, importc: "gtk_tree_path_to_string".} +proc gtk_tree_path_new_root*(): PGtkTreePath +proc gtk_tree_path_new_first*(): PGtkTreePath{.cdecl, dynlib: gtklib, + importc: "gtk_tree_path_new_first".} +proc gtk_tree_path_append_index*(path: PGtkTreePath, index: gint){.cdecl, + dynlib: gtklib, importc: "gtk_tree_path_append_index".} +proc gtk_tree_path_prepend_index*(path: PGtkTreePath, index: gint){.cdecl, + dynlib: gtklib, importc: "gtk_tree_path_prepend_index".} +proc gtk_tree_path_get_depth*(path: PGtkTreePath): gint{.cdecl, dynlib: gtklib, + importc: "gtk_tree_path_get_depth".} +proc gtk_tree_path_get_indices*(path: PGtkTreePath): Pgint{.cdecl, + dynlib: gtklib, importc: "gtk_tree_path_get_indices".} +proc gtk_tree_path_free*(path: PGtkTreePath){.cdecl, dynlib: gtklib, + importc: "gtk_tree_path_free".} +proc gtk_tree_path_copy*(path: PGtkTreePath): PGtkTreePath{.cdecl, + dynlib: gtklib, importc: "gtk_tree_path_copy".} +proc gtk_tree_path_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_tree_path_get_type".} +proc gtk_tree_path_compare*(a: PGtkTreePath, b: PGtkTreePath): gint{.cdecl, + dynlib: gtklib, importc: "gtk_tree_path_compare".} +proc gtk_tree_path_next*(path: PGtkTreePath){.cdecl, dynlib: gtklib, + importc: "gtk_tree_path_next".} +proc gtk_tree_path_prev*(path: PGtkTreePath): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_tree_path_prev".} +proc gtk_tree_path_up*(path: PGtkTreePath): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_tree_path_up".} +proc gtk_tree_path_down*(path: PGtkTreePath){.cdecl, dynlib: gtklib, + importc: "gtk_tree_path_down".} +proc gtk_tree_path_is_ancestor*(path: PGtkTreePath, descendant: PGtkTreePath): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_path_is_ancestor".} +proc gtk_tree_path_is_descendant*(path: PGtkTreePath, ancestor: PGtkTreePath): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_path_is_descendant".} +proc gtk_tree_row_reference_new*(model: PGtkTreeModel, path: PGtkTreePath): PGtkTreeRowReference{. + cdecl, dynlib: gtklib, importc: "gtk_tree_row_reference_new".} +proc gtk_tree_row_reference_new_proxy*(proxy: PGObject, model: PGtkTreeModel, + path: PGtkTreePath): PGtkTreeRowReference{. + cdecl, dynlib: gtklib, importc: "gtk_tree_row_reference_new_proxy".} +proc gtk_tree_row_reference_get_path*(reference: PGtkTreeRowReference): PGtkTreePath{. + cdecl, dynlib: gtklib, importc: "gtk_tree_row_reference_get_path".} +proc gtk_tree_row_reference_valid*(reference: PGtkTreeRowReference): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_row_reference_valid".} +proc gtk_tree_row_reference_free*(reference: PGtkTreeRowReference){.cdecl, + dynlib: gtklib, importc: "gtk_tree_row_reference_free".} +proc gtk_tree_row_reference_inserted*(proxy: PGObject, path: PGtkTreePath){. + cdecl, dynlib: gtklib, importc: "gtk_tree_row_reference_inserted".} +proc gtk_tree_row_reference_deleted*(proxy: PGObject, path: PGtkTreePath){. + cdecl, dynlib: gtklib, importc: "gtk_tree_row_reference_deleted".} +proc gtk_tree_row_reference_reordered*(proxy: PGObject, path: PGtkTreePath, + iter: PGtkTreeIter, new_order: Pgint){. + cdecl, dynlib: gtklib, importc: "gtk_tree_row_reference_reordered".} +proc gtk_tree_iter_copy*(iter: PGtkTreeIter): PGtkTreeIter{.cdecl, + dynlib: gtklib, importc: "gtk_tree_iter_copy".} +proc gtk_tree_iter_free*(iter: PGtkTreeIter){.cdecl, dynlib: gtklib, + importc: "gtk_tree_iter_free".} +proc gtk_tree_iter_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_tree_iter_get_type".} +proc gtk_tree_model_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_tree_model_get_type".} +proc gtk_tree_model_get_flags*(tree_model: PGtkTreeModel): TGtkTreeModelFlags{. + cdecl, dynlib: gtklib, importc: "gtk_tree_model_get_flags".} +proc gtk_tree_model_get_n_columns*(tree_model: PGtkTreeModel): gint{.cdecl, + dynlib: gtklib, importc: "gtk_tree_model_get_n_columns".} +proc gtk_tree_model_get_column_type*(tree_model: PGtkTreeModel, index: gint): GType{. + cdecl, dynlib: gtklib, importc: "gtk_tree_model_get_column_type".} +proc gtk_tree_model_get_iter*(tree_model: PGtkTreeModel, iter: PGtkTreeIter, + path: PGtkTreePath): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_tree_model_get_iter".} +proc gtk_tree_model_get_iter_from_string*(tree_model: PGtkTreeModel, + iter: PGtkTreeIter, path_string: cstring): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_tree_model_get_iter_from_string".} +proc gtk_tree_model_get_iter_root*(tree_model: PGtkTreeModel, iter: PGtkTreeIter): gboolean +proc gtk_tree_model_get_iter_first*(tree_model: PGtkTreeModel, + iter: PGtkTreeIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_tree_model_get_iter_first".} +proc gtk_tree_model_get_path*(tree_model: PGtkTreeModel, iter: PGtkTreeIter): PGtkTreePath{. + cdecl, dynlib: gtklib, importc: "gtk_tree_model_get_path".} +proc gtk_tree_model_get_value*(tree_model: PGtkTreeModel, iter: PGtkTreeIter, + column: gint, value: PGValue){.cdecl, + dynlib: gtklib, importc: "gtk_tree_model_get_value".} +proc gtk_tree_model_iter_next*(tree_model: PGtkTreeModel, iter: PGtkTreeIter): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_model_iter_next".} +proc gtk_tree_model_iter_children*(tree_model: PGtkTreeModel, + iter: PGtkTreeIter, parent: PGtkTreeIter): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_model_iter_children".} +proc gtk_tree_model_iter_has_child*(tree_model: PGtkTreeModel, + iter: PGtkTreeIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_tree_model_iter_has_child".} +proc gtk_tree_model_iter_n_children*(tree_model: PGtkTreeModel, + iter: PGtkTreeIter): gint{.cdecl, + dynlib: gtklib, importc: "gtk_tree_model_iter_n_children".} +proc gtk_tree_model_iter_nth_child*(tree_model: PGtkTreeModel, + iter: PGtkTreeIter, parent: PGtkTreeIter, + n: gint): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_tree_model_iter_nth_child".} +proc gtk_tree_model_iter_parent*(tree_model: PGtkTreeModel, iter: PGtkTreeIter, + child: PGtkTreeIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_tree_model_iter_parent".} +proc gtk_tree_model_ref_node*(tree_model: PGtkTreeModel, iter: PGtkTreeIter){. + cdecl, dynlib: gtklib, importc: "gtk_tree_model_ref_node".} +proc gtk_tree_model_unref_node*(tree_model: PGtkTreeModel, iter: PGtkTreeIter){. + cdecl, dynlib: gtklib, importc: "gtk_tree_model_unref_node".} +proc gtk_tree_model_foreach*(model: PGtkTreeModel, + fun: TGtkTreeModelForeachFunc, + user_data: gpointer){.cdecl, dynlib: gtklib, + importc: "gtk_tree_model_foreach".} +proc gtk_tree_model_row_changed*(tree_model: PGtkTreeModel, path: PGtkTreePath, + iter: PGtkTreeIter){.cdecl, dynlib: gtklib, + importc: "gtk_tree_model_row_changed".} +proc gtk_tree_model_row_inserted*(tree_model: PGtkTreeModel, path: PGtkTreePath, + iter: PGtkTreeIter){.cdecl, dynlib: gtklib, + importc: "gtk_tree_model_row_inserted".} +proc gtk_tree_model_row_has_child_toggled*(tree_model: PGtkTreeModel, + path: PGtkTreePath, iter: PGtkTreeIter){.cdecl, dynlib: gtklib, + importc: "gtk_tree_model_row_has_child_toggled".} +proc gtk_tree_model_row_deleted*(tree_model: PGtkTreeModel, path: PGtkTreePath){. + cdecl, dynlib: gtklib, importc: "gtk_tree_model_row_deleted".} +proc gtk_tree_model_rows_reordered*(tree_model: PGtkTreeModel, + path: PGtkTreePath, iter: PGtkTreeIter, + new_order: Pgint){.cdecl, dynlib: gtklib, + importc: "gtk_tree_model_rows_reordered".} +const + GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID* = - (1) + +proc GTK_TYPE_TREE_SORTABLE*(): GType +proc GTK_TREE_SORTABLE*(obj: pointer): PGtkTreeSortable +proc GTK_TREE_SORTABLE_CLASS*(obj: pointer): PGtkTreeSortableIface +proc GTK_IS_TREE_SORTABLE*(obj: pointer): bool +proc GTK_TREE_SORTABLE_GET_IFACE*(obj: pointer): PGtkTreeSortableIface +proc gtk_tree_sortable_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_tree_sortable_get_type".} +proc gtk_tree_sortable_sort_column_changed*(sortable: PGtkTreeSortable){.cdecl, + dynlib: gtklib, importc: "gtk_tree_sortable_sort_column_changed".} +proc gtk_tree_sortable_get_sort_column_id*(sortable: PGtkTreeSortable, + sort_column_id: Pgint, order: PGtkSortType): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_tree_sortable_get_sort_column_id".} +proc gtk_tree_sortable_set_sort_column_id*(sortable: PGtkTreeSortable, + sort_column_id: gint, order: TGtkSortType){.cdecl, dynlib: gtklib, + importc: "gtk_tree_sortable_set_sort_column_id".} +proc gtk_tree_sortable_set_sort_func*(sortable: PGtkTreeSortable, + sort_column_id: gint, + sort_func: TGtkTreeIterCompareFunc, + user_data: gpointer, + destroy: TGtkDestroyNotify){.cdecl, + dynlib: gtklib, importc: "gtk_tree_sortable_set_sort_func".} +proc gtk_tree_sortable_set_default_sort_func*(sortable: PGtkTreeSortable, + sort_func: TGtkTreeIterCompareFunc, user_data: gpointer, + destroy: TGtkDestroyNotify){.cdecl, dynlib: gtklib, importc: "gtk_tree_sortable_set_default_sort_func".} +proc gtk_tree_sortable_has_default_sort_func*(sortable: PGtkTreeSortable): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_sortable_has_default_sort_func".} +proc GTK_TYPE_TREE_MODEL_SORT*(): GType +proc GTK_TREE_MODEL_SORT*(obj: pointer): PGtkTreeModelSort +proc GTK_TREE_MODEL_SORT_CLASS*(klass: pointer): PGtkTreeModelSortClass +proc GTK_IS_TREE_MODEL_SORT*(obj: pointer): bool +proc GTK_IS_TREE_MODEL_SORT_CLASS*(klass: pointer): bool +proc GTK_TREE_MODEL_SORT_GET_CLASS*(obj: pointer): PGtkTreeModelSortClass +proc gtk_tree_model_sort_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_tree_model_sort_get_type".} +proc gtk_tree_model_sort_new_with_model*(child_model: PGtkTreeModel): PGtkTreeModel{. + cdecl, dynlib: gtklib, importc: "gtk_tree_model_sort_new_with_model".} +proc gtk_tree_model_sort_get_model*(tree_model: PGtkTreeModelSort): PGtkTreeModel{. + cdecl, dynlib: gtklib, importc: "gtk_tree_model_sort_get_model".} +proc gtk_tree_model_sort_convert_child_path_to_path*( + tree_model_sort: PGtkTreeModelSort, child_path: PGtkTreePath): PGtkTreePath{. + cdecl, dynlib: gtklib, + importc: "gtk_tree_model_sort_convert_child_path_to_path".} +proc gtk_tree_model_sort_convert_child_iter_to_iter*( + tree_model_sort: PGtkTreeModelSort, sort_iter: PGtkTreeIter, + child_iter: PGtkTreeIter){.cdecl, dynlib: gtklib, importc: "gtk_tree_model_sort_convert_child_iter_to_iter".} +proc gtk_tree_model_sort_convert_path_to_child_path*( + tree_model_sort: PGtkTreeModelSort, sorted_path: PGtkTreePath): PGtkTreePath{. + cdecl, dynlib: gtklib, + importc: "gtk_tree_model_sort_convert_path_to_child_path".} +proc gtk_tree_model_sort_convert_iter_to_child_iter*( + tree_model_sort: PGtkTreeModelSort, child_iter: PGtkTreeIter, + sorted_iter: PGtkTreeIter){.cdecl, dynlib: gtklib, importc: "gtk_tree_model_sort_convert_iter_to_child_iter".} +proc gtk_tree_model_sort_reset_default_sort_func*( + tree_model_sort: PGtkTreeModelSort){.cdecl, dynlib: gtklib, + importc: "gtk_tree_model_sort_reset_default_sort_func".} +proc gtk_tree_model_sort_clear_cache*(tree_model_sort: PGtkTreeModelSort){. + cdecl, dynlib: gtklib, importc: "gtk_tree_model_sort_clear_cache".} +const + bm_TGtkListStore_columns_dirty* = 0x00000001'i16 + bp_TGtkListStore_columns_dirty* = 0'i16 + +proc GTK_TYPE_LIST_STORE*(): GType +proc GTK_LIST_STORE*(obj: pointer): PGtkListStore +proc GTK_LIST_STORE_CLASS*(klass: pointer): PGtkListStoreClass +proc GTK_IS_LIST_STORE*(obj: pointer): bool +proc GTK_IS_LIST_STORE_CLASS*(klass: pointer): bool +proc GTK_LIST_STORE_GET_CLASS*(obj: pointer): PGtkListStoreClass +proc columns_dirty*(a: var TGtkListStore): guint +proc set_columns_dirty*(a: var TGtkListStore, `columns_dirty`: guint) +proc gtk_list_store_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_list_store_get_type".} +proc gtk_list_store_newv*(n_columns: gint, types: PGType): PGtkListStore{.cdecl, + dynlib: gtklib, importc: "gtk_list_store_newv".} +proc gtk_list_store_set_column_types*(list_store: PGtkListStore, + n_columns: gint, types: PGType){.cdecl, + dynlib: gtklib, importc: "gtk_list_store_set_column_types".} +proc gtk_list_store_set_value*(list_store: PGtkListStore, iter: PGtkTreeIter, + column: gint, value: PGValue){.cdecl, + dynlib: gtklib, importc: "gtk_list_store_set_value".} +proc gtk_list_store_remove*(list_store: PGtkListStore, iter: PGtkTreeIter){. + cdecl, dynlib: gtklib, importc: "gtk_list_store_remove".} +proc gtk_list_store_insert*(list_store: PGtkListStore, iter: PGtkTreeIter, + position: gint){.cdecl, dynlib: gtklib, + importc: "gtk_list_store_insert".} +proc gtk_list_store_insert_before*(list_store: PGtkListStore, + iter: PGtkTreeIter, sibling: PGtkTreeIter){. + cdecl, dynlib: gtklib, importc: "gtk_list_store_insert_before".} +proc gtk_list_store_insert_after*(list_store: PGtkListStore, iter: PGtkTreeIter, + sibling: PGtkTreeIter){.cdecl, dynlib: gtklib, + importc: "gtk_list_store_insert_after".} +proc gtk_list_store_prepend*(list_store: PGtkListStore, iter: PGtkTreeIter){. + cdecl, dynlib: gtklib, importc: "gtk_list_store_prepend".} +proc gtk_list_store_append*(list_store: PGtkListStore, iter: PGtkTreeIter){. + cdecl, dynlib: gtklib, importc: "gtk_list_store_append".} +proc gtk_list_store_clear*(list_store: PGtkListStore){.cdecl, dynlib: gtklib, + importc: "gtk_list_store_clear".} + +when false: + const + GTK_PRIORITY_RESIZE* = G_PRIORITY_HIGH_IDLE + 10 + +proc gtk_check_version*(required_major: guint, required_minor: guint, + required_micro: guint): cstring{.cdecl, dynlib: gtklib, + importc: "gtk_check_version".} +proc gtk_disable_setlocale*(){.cdecl, dynlib: gtklib, + importc: "gtk_disable_setlocale".} +proc gtk_set_locale*(): cstring{.cdecl, dynlib: gtklib, importc: "gtk_set_locale".} +proc gtk_get_default_language*(): PPangoLanguage{.cdecl, dynlib: gtklib, + importc: "gtk_get_default_language".} +proc gtk_events_pending*(): gint{.cdecl, dynlib: gtklib, + importc: "gtk_events_pending".} +proc gtk_main_do_event*(event: PGdkEvent){.cdecl, dynlib: gtklib, + importc: "gtk_main_do_event".} +proc gtk_main*(){.cdecl, dynlib: gtklib, importc: "gtk_main".} +proc gtk_init*(argc, argv: pointer){.cdecl, dynlib: gtklib, importc: "gtk_init".} +proc gtk_main_level*(): guint{.cdecl, dynlib: gtklib, importc: "gtk_main_level".} +proc gtk_main_quit*(){.cdecl, dynlib: gtklib, importc: "gtk_main_quit".} +proc gtk_main_iteration*(): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_main_iteration".} +proc gtk_main_iteration_do*(blocking: gboolean): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_main_iteration_do".} +proc gtk_true*(): gboolean{.cdecl, dynlib: gtklib, importc: "gtk_true".} +proc gtk_false*(): gboolean{.cdecl, dynlib: gtklib, importc: "gtk_false".} +proc gtk_grab_add*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_grab_add".} +proc gtk_grab_get_current*(): PGtkWidget{.cdecl, dynlib: gtklib, + importc: "gtk_grab_get_current".} +proc gtk_grab_remove*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_grab_remove".} +proc gtk_init_add*(`function`: TGtkFunction, data: gpointer){.cdecl, + dynlib: gtklib, importc: "gtk_init_add".} +proc gtk_quit_add_destroy*(main_level: guint, anObject: PGtkObject){.cdecl, + dynlib: gtklib, importc: "gtk_quit_add_destroy".} +proc gtk_quit_add*(main_level: guint, `function`: TGtkFunction, data: gpointer): guint{. + cdecl, dynlib: gtklib, importc: "gtk_quit_add".} +proc gtk_quit_add_full*(main_level: guint, `function`: TGtkFunction, + marshal: TGtkCallbackMarshal, data: gpointer, + destroy: TGtkDestroyNotify): guint{.cdecl, + dynlib: gtklib, importc: "gtk_quit_add_full".} +proc gtk_quit_remove*(quit_handler_id: guint){.cdecl, dynlib: gtklib, + importc: "gtk_quit_remove".} +proc gtk_quit_remove_by_data*(data: gpointer){.cdecl, dynlib: gtklib, + importc: "gtk_quit_remove_by_data".} +proc gtk_timeout_add*(interval: guint32, `function`: TGtkFunction, + data: gpointer): guint{.cdecl, dynlib: gtklib, + importc: "gtk_timeout_add".} +proc gtk_timeout_add_full*(interval: guint32, `function`: TGtkFunction, + marshal: TGtkCallbackMarshal, data: gpointer, + destroy: TGtkDestroyNotify): guint{.cdecl, + dynlib: gtklib, importc: "gtk_timeout_add_full".} +proc gtk_timeout_remove*(timeout_handler_id: guint){.cdecl, dynlib: gtklib, + importc: "gtk_timeout_remove".} +proc gtk_idle_add*(`function`: TGtkFunction, data: gpointer): guint{.cdecl, + dynlib: gtklib, importc: "gtk_idle_add".} +proc gtk_idle_add_priority*(priority: gint, `function`: TGtkFunction, + data: gpointer): guint{.cdecl, dynlib: gtklib, + importc: "gtk_idle_add_priority".} +proc gtk_idle_add_full*(priority: gint, `function`: TGtkFunction, + marshal: TGtkCallbackMarshal, data: gpointer, + destroy: TGtkDestroyNotify): guint{.cdecl, + dynlib: gtklib, importc: "gtk_idle_add_full".} +proc gtk_idle_remove*(idle_handler_id: guint){.cdecl, dynlib: gtklib, + importc: "gtk_idle_remove".} +proc gtk_idle_remove_by_data*(data: gpointer){.cdecl, dynlib: gtklib, + importc: "gtk_idle_remove_by_data".} +proc gtk_input_add_full*(source: gint, condition: TGdkInputCondition, + `function`: TGdkInputFunction, + marshal: TGtkCallbackMarshal, data: gpointer, + destroy: TGtkDestroyNotify): guint{.cdecl, + dynlib: gtklib, importc: "gtk_input_add_full".} +proc gtk_input_remove*(input_handler_id: guint){.cdecl, dynlib: gtklib, + importc: "gtk_input_remove".} +proc gtk_key_snooper_install*(snooper: TGtkKeySnoopFunc, func_data: gpointer): guint{. + cdecl, dynlib: gtklib, importc: "gtk_key_snooper_install".} +proc gtk_key_snooper_remove*(snooper_handler_id: guint){.cdecl, dynlib: gtklib, + importc: "gtk_key_snooper_remove".} +proc gtk_get_current_event*(): PGdkEvent{.cdecl, dynlib: gtklib, + importc: "gtk_get_current_event".} +proc gtk_get_current_event_time*(): guint32{.cdecl, dynlib: gtklib, + importc: "gtk_get_current_event_time".} +proc gtk_get_current_event_state*(state: PGdkModifierType): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_get_current_event_state".} +proc gtk_get_event_widget*(event: PGdkEvent): PGtkWidget{.cdecl, dynlib: gtklib, + importc: "gtk_get_event_widget".} +proc gtk_propagate_event*(widget: PGtkWidget, event: PGdkEvent){.cdecl, + dynlib: gtklib, importc: "gtk_propagate_event".} +proc gtk_boolean_handled_accumulator*(ihint: PGSignalInvocationHint, + return_accu: PGValue, + handler_return: PGValue, dummy: gpointer): gboolean{. + cdecl, dynlib: gtklib, importc: "_gtk_boolean_handled_accumulator".} +proc gtk_find_module*(name: cstring, thetype: cstring): cstring{.cdecl, + dynlib: gtklib, importc: "_gtk_find_module".} +proc gtk_get_module_path*(thetype: cstring): PPgchar{.cdecl, dynlib: gtklib, + importc: "_gtk_get_module_path".} +proc GTK_TYPE_MENU_BAR*(): GType +proc GTK_MENU_BAR*(obj: pointer): PGtkMenuBar +proc GTK_MENU_BAR_CLASS*(klass: pointer): PGtkMenuBarClass +proc GTK_IS_MENU_BAR*(obj: pointer): bool +proc GTK_IS_MENU_BAR_CLASS*(klass: pointer): bool +proc GTK_MENU_BAR_GET_CLASS*(obj: pointer): PGtkMenuBarClass +proc gtk_menu_bar_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_menu_bar_get_type".} +proc gtk_menu_bar_new*(): PGtkMenuBar{.cdecl, dynlib: gtklib, + importc: "gtk_menu_bar_new".} +proc gtk_menu_bar_cycle_focus*(menubar: PGtkMenuBar, dir: TGtkDirectionType){. + cdecl, dynlib: gtklib, importc: "_gtk_menu_bar_cycle_focus".} +proc GTK_TYPE_MESSAGE_DIALOG*(): GType +proc GTK_MESSAGE_DIALOG*(obj: pointer): PGtkMessageDialog +proc GTK_MESSAGE_DIALOG_CLASS*(klass: pointer): PGtkMessageDialogClass +proc GTK_IS_MESSAGE_DIALOG*(obj: pointer): bool +proc GTK_IS_MESSAGE_DIALOG_CLASS*(klass: pointer): bool +proc GTK_MESSAGE_DIALOG_GET_CLASS*(obj: pointer): PGtkMessageDialogClass +proc gtk_message_dialog_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_message_dialog_get_type".} +const + bm_TGtkNotebook_show_tabs* = 0x00000001'i16 + bp_TGtkNotebook_show_tabs* = 0'i16 + bm_TGtkNotebook_homogeneous* = 0x00000002'i16 + bp_TGtkNotebook_homogeneous* = 1'i16 + bm_TGtkNotebook_show_border* = 0x00000004'i16 + bp_TGtkNotebook_show_border* = 2'i16 + bm_TGtkNotebook_tab_pos* = 0x00000018'i16 + bp_TGtkNotebook_tab_pos* = 3'i16 + bm_TGtkNotebook_scrollable* = 0x00000020'i16 + bp_TGtkNotebook_scrollable* = 5'i16 + bm_TGtkNotebook_in_child* = 0x000000C0'i16 + bp_TGtkNotebook_in_child* = 6'i16 + bm_TGtkNotebook_click_child* = 0x00000300'i16 + bp_TGtkNotebook_click_child* = 8'i16 + bm_TGtkNotebook_button* = 0x00000C00'i16 + bp_TGtkNotebook_button* = 10'i16 + bm_TGtkNotebook_need_timer* = 0x00001000'i16 + bp_TGtkNotebook_need_timer* = 12'i16 + bm_TGtkNotebook_child_has_focus* = 0x00002000'i16 + bp_TGtkNotebook_child_has_focus* = 13'i16 + bm_TGtkNotebook_have_visible_child* = 0x00004000'i16 + bp_TGtkNotebook_have_visible_child* = 14'i16 + bm_TGtkNotebook_focus_out* = 0x00008000'i16 + bp_TGtkNotebook_focus_out* = 15'i16 + +proc GTK_TYPE_NOTEBOOK*(): GType +proc GTK_NOTEBOOK*(obj: pointer): PGtkNotebook +proc GTK_NOTEBOOK_CLASS*(klass: pointer): PGtkNotebookClass +proc GTK_IS_NOTEBOOK*(obj: pointer): bool +proc GTK_IS_NOTEBOOK_CLASS*(klass: pointer): bool +proc GTK_NOTEBOOK_GET_CLASS*(obj: pointer): PGtkNotebookClass +proc show_tabs*(a: var TGtkNotebook): guint +proc set_show_tabs*(a: var TGtkNotebook, `show_tabs`: guint) +proc homogeneous*(a: var TGtkNotebook): guint +proc set_homogeneous*(a: var TGtkNotebook, `homogeneous`: guint) +proc show_border*(a: var TGtkNotebook): guint +proc set_show_border*(a: var TGtkNotebook, `show_border`: guint) +proc tab_pos*(a: var TGtkNotebook): guint +proc set_tab_pos*(a: var TGtkNotebook, `tab_pos`: guint) +proc scrollable*(a: var TGtkNotebook): guint +proc set_scrollable*(a: var TGtkNotebook, `scrollable`: guint) +proc in_child*(a: var TGtkNotebook): guint +proc set_in_child*(a: var TGtkNotebook, `in_child`: guint) +proc click_child*(a: var TGtkNotebook): guint +proc set_click_child*(a: var TGtkNotebook, `click_child`: guint) +proc button*(a: var TGtkNotebook): guint +proc set_button*(a: var TGtkNotebook, `button`: guint) +proc need_timer*(a: var TGtkNotebook): guint +proc set_need_timer*(a: var TGtkNotebook, `need_timer`: guint) +proc child_has_focus*(a: var TGtkNotebook): guint +proc set_child_has_focus*(a: var TGtkNotebook, `child_has_focus`: guint) +proc have_visible_child*(a: var TGtkNotebook): guint +proc set_have_visible_child*(a: var TGtkNotebook, `have_visible_child`: guint) +proc focus_out*(a: var TGtkNotebook): guint +proc set_focus_out*(a: var TGtkNotebook, `focus_out`: guint) +proc gtk_notebook_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_notebook_get_type".} +proc gtk_notebook_new*(): PGtkNotebook{.cdecl, dynlib: gtklib, + importc: "gtk_notebook_new".} +proc gtk_notebook_append_page*(notebook: PGtkNotebook, child: PGtkWidget, + tab_label: PGtkWidget): gint{.cdecl, + dynlib: gtklib, importc: "gtk_notebook_append_page".} +proc gtk_notebook_append_page_menu*(notebook: PGtkNotebook, child: PGtkWidget, + tab_label: PGtkWidget, + menu_label: PGtkWidget): gint{.cdecl, + dynlib: gtklib, importc: "gtk_notebook_append_page_menu".} +proc gtk_notebook_prepend_page*(notebook: PGtkNotebook, child: PGtkWidget, + tab_label: PGtkWidget): gint{.cdecl, + dynlib: gtklib, importc: "gtk_notebook_prepend_page".} +proc gtk_notebook_prepend_page_menu*(notebook: PGtkNotebook, child: PGtkWidget, + tab_label: PGtkWidget, + menu_label: PGtkWidget): gint{.cdecl, + dynlib: gtklib, importc: "gtk_notebook_prepend_page_menu".} +proc gtk_notebook_insert_page*(notebook: PGtkNotebook, child: PGtkWidget, + tab_label: PGtkWidget, position: gint): gint{. + cdecl, dynlib: gtklib, importc: "gtk_notebook_insert_page".} +proc gtk_notebook_insert_page_menu*(notebook: PGtkNotebook, child: PGtkWidget, + tab_label: PGtkWidget, + menu_label: PGtkWidget, position: gint): gint{. + cdecl, dynlib: gtklib, importc: "gtk_notebook_insert_page_menu".} +proc gtk_notebook_remove_page*(notebook: PGtkNotebook, page_num: gint){.cdecl, + dynlib: gtklib, importc: "gtk_notebook_remove_page".} +proc gtk_notebook_get_current_page*(notebook: PGtkNotebook): gint{.cdecl, + dynlib: gtklib, importc: "gtk_notebook_get_current_page".} +proc gtk_notebook_get_n_pages*(notebook: PGtkNotebook): gint {.cdecl, + dynlib: gtklib, importc.} +proc gtk_notebook_get_nth_page*(notebook: PGtkNotebook, page_num: gint): PGtkWidget{. + cdecl, dynlib: gtklib, importc: "gtk_notebook_get_nth_page".} +proc gtk_notebook_page_num*(notebook: PGtkNotebook, child: PGtkWidget): gint{. + cdecl, dynlib: gtklib, importc: "gtk_notebook_page_num".} +proc gtk_notebook_set_current_page*(notebook: PGtkNotebook, page_num: gint){. + cdecl, dynlib: gtklib, importc: "gtk_notebook_set_current_page".} +proc gtk_notebook_next_page*(notebook: PGtkNotebook){.cdecl, dynlib: gtklib, + importc: "gtk_notebook_next_page".} +proc gtk_notebook_prev_page*(notebook: PGtkNotebook){.cdecl, dynlib: gtklib, + importc: "gtk_notebook_prev_page".} +proc gtk_notebook_set_show_border*(notebook: PGtkNotebook, show_border: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_notebook_set_show_border".} +proc gtk_notebook_get_show_border*(notebook: PGtkNotebook): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_notebook_get_show_border".} +proc gtk_notebook_set_show_tabs*(notebook: PGtkNotebook, show_tabs: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_notebook_set_show_tabs".} +proc gtk_notebook_get_show_tabs*(notebook: PGtkNotebook): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_notebook_get_show_tabs".} +proc gtk_notebook_set_tab_pos*(notebook: PGtkNotebook, pos: TGtkPositionType){. + cdecl, dynlib: gtklib, importc: "gtk_notebook_set_tab_pos".} +proc gtk_notebook_get_tab_pos*(notebook: PGtkNotebook): TGtkPositionType{.cdecl, + dynlib: gtklib, importc: "gtk_notebook_get_tab_pos".} +proc gtk_notebook_set_scrollable*(notebook: PGtkNotebook, scrollable: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_notebook_set_scrollable".} +proc gtk_notebook_get_scrollable*(notebook: PGtkNotebook): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_notebook_get_scrollable".} +proc gtk_notebook_popup_enable*(notebook: PGtkNotebook){.cdecl, dynlib: gtklib, + importc: "gtk_notebook_popup_enable".} +proc gtk_notebook_popup_disable*(notebook: PGtkNotebook){.cdecl, dynlib: gtklib, + importc: "gtk_notebook_popup_disable".} +proc gtk_notebook_get_tab_label*(notebook: PGtkNotebook, child: PGtkWidget): PGtkWidget{. + cdecl, dynlib: gtklib, importc: "gtk_notebook_get_tab_label".} +proc gtk_notebook_set_tab_label*(notebook: PGtkNotebook, child: PGtkWidget, + tab_label: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_notebook_set_tab_label".} +proc gtk_notebook_set_tab_label_text*(notebook: PGtkNotebook, child: PGtkWidget, + tab_text: cstring){.cdecl, dynlib: gtklib, + importc: "gtk_notebook_set_tab_label_text".} +proc gtk_notebook_get_tab_label_text*(notebook: PGtkNotebook, child: PGtkWidget): cstring{. + cdecl, dynlib: gtklib, importc: "gtk_notebook_get_tab_label_text".} +proc gtk_notebook_get_menu_label*(notebook: PGtkNotebook, child: PGtkWidget): PGtkWidget{. + cdecl, dynlib: gtklib, importc: "gtk_notebook_get_menu_label".} +proc gtk_notebook_set_menu_label*(notebook: PGtkNotebook, child: PGtkWidget, + menu_label: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_notebook_set_menu_label".} +proc gtk_notebook_set_menu_label_text*(notebook: PGtkNotebook, + child: PGtkWidget, menu_text: cstring){. + cdecl, dynlib: gtklib, importc: "gtk_notebook_set_menu_label_text".} +proc gtk_notebook_get_menu_label_text*(notebook: PGtkNotebook, child: PGtkWidget): cstring{. + cdecl, dynlib: gtklib, importc: "gtk_notebook_get_menu_label_text".} +proc gtk_notebook_query_tab_label_packing*(notebook: PGtkNotebook, + child: PGtkWidget, expand: Pgboolean, fill: Pgboolean, + pack_type: PGtkPackType){.cdecl, dynlib: gtklib, + importc: "gtk_notebook_query_tab_label_packing".} +proc gtk_notebook_set_tab_label_packing*(notebook: PGtkNotebook, + child: PGtkWidget, expand: gboolean, fill: gboolean, pack_type: TGtkPackType){. + cdecl, dynlib: gtklib, importc: "gtk_notebook_set_tab_label_packing".} +proc gtk_notebook_reorder_child*(notebook: PGtkNotebook, child: PGtkWidget, + position: gint){.cdecl, dynlib: gtklib, + importc: "gtk_notebook_reorder_child".} +const + bm_TGtkOldEditable_has_selection* = 0x00000001'i16 + bp_TGtkOldEditable_has_selection* = 0'i16 + bm_TGtkOldEditable_editable* = 0x00000002'i16 + bp_TGtkOldEditable_editable* = 1'i16 + bm_TGtkOldEditable_visible* = 0x00000004'i16 + bp_TGtkOldEditable_visible* = 2'i16 + +proc GTK_TYPE_OLD_EDITABLE*(): GType +proc GTK_OLD_EDITABLE*(obj: pointer): PGtkOldEditable +proc GTK_OLD_EDITABLE_CLASS*(klass: pointer): PGtkOldEditableClass +proc GTK_IS_OLD_EDITABLE*(obj: pointer): bool +proc GTK_IS_OLD_EDITABLE_CLASS*(klass: pointer): bool +proc GTK_OLD_EDITABLE_GET_CLASS*(obj: pointer): PGtkOldEditableClass +proc has_selection*(a: var TGtkOldEditable): guint +proc set_has_selection*(a: var TGtkOldEditable, `has_selection`: guint) +proc editable*(a: var TGtkOldEditable): guint +proc set_editable*(a: var TGtkOldEditable, `editable`: guint) +proc visible*(a: var TGtkOldEditable): guint +proc set_visible*(a: var TGtkOldEditable, `visible`: guint) +proc gtk_old_editable_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_old_editable_get_type".} +proc gtk_old_editable_claim_selection*(old_editable: PGtkOldEditable, + claim: gboolean, time: guint32){.cdecl, + dynlib: gtklib, importc: "gtk_old_editable_claim_selection".} +proc gtk_old_editable_changed*(old_editable: PGtkOldEditable){.cdecl, + dynlib: gtklib, importc: "gtk_old_editable_changed".} +proc GTK_TYPE_OPTION_MENU*(): GType +proc GTK_OPTION_MENU*(obj: pointer): PGtkOptionMenu +proc GTK_OPTION_MENU_CLASS*(klass: pointer): PGtkOptionMenuClass +proc GTK_IS_OPTION_MENU*(obj: pointer): bool +proc GTK_IS_OPTION_MENU_CLASS*(klass: pointer): bool +proc GTK_OPTION_MENU_GET_CLASS*(obj: pointer): PGtkOptionMenuClass +proc gtk_option_menu_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_option_menu_get_type".} +proc gtk_option_menu_new*(): PGtkOptionMenu{.cdecl, dynlib: gtklib, + importc: "gtk_option_menu_new".} +proc gtk_option_menu_get_menu*(option_menu: PGtkOptionMenu): PGtkWidget{.cdecl, + dynlib: gtklib, importc: "gtk_option_menu_get_menu".} +proc gtk_option_menu_set_menu*(option_menu: PGtkOptionMenu, menu: PGtkWidget){. + cdecl, dynlib: gtklib, importc: "gtk_option_menu_set_menu".} +proc gtk_option_menu_remove_menu*(option_menu: PGtkOptionMenu){.cdecl, + dynlib: gtklib, importc: "gtk_option_menu_remove_menu".} +proc gtk_option_menu_get_history*(option_menu: PGtkOptionMenu): gint{.cdecl, + dynlib: gtklib, importc: "gtk_option_menu_get_history".} +proc gtk_option_menu_set_history*(option_menu: PGtkOptionMenu, index: guint){. + cdecl, dynlib: gtklib, importc: "gtk_option_menu_set_history".} +const + bm_TGtkPixmap_build_insensitive* = 0x00000001'i16 + bp_TGtkPixmap_build_insensitive* = 0'i16 + +proc GTK_TYPE_PIXMAP*(): GType +proc GTK_PIXMAP*(obj: pointer): PGtkPixmap +proc GTK_PIXMAP_CLASS*(klass: pointer): PGtkPixmapClass +proc GTK_IS_PIXMAP*(obj: pointer): bool +proc GTK_IS_PIXMAP_CLASS*(klass: pointer): bool +proc GTK_PIXMAP_GET_CLASS*(obj: pointer): PGtkPixmapClass +proc build_insensitive*(a: var TGtkPixmap): guint +proc set_build_insensitive*(a: var TGtkPixmap, `build_insensitive`: guint) +proc gtk_pixmap_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_pixmap_get_type".} +proc gtk_pixmap_new*(pixmap: PGdkPixmap, mask: PGdkBitmap): PGtkPixmap{.cdecl, + dynlib: gtklib, importc: "gtk_pixmap_new".} +proc gtk_pixmap_set*(pixmap: PGtkPixmap, val: PGdkPixmap, mask: PGdkBitmap){. + cdecl, dynlib: gtklib, importc: "gtk_pixmap_set".} +proc gtk_pixmap_get*(pixmap: PGtkPixmap, val: var PGdkPixmap, + mask: var PGdkBitmap){.cdecl, dynlib: gtklib, + importc: "gtk_pixmap_get".} +proc gtk_pixmap_set_build_insensitive*(pixmap: PGtkPixmap, build: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_pixmap_set_build_insensitive".} +const + bm_TGtkPlug_same_app* = 0x00000001'i16 + bp_TGtkPlug_same_app* = 0'i16 + +proc GTK_TYPE_PLUG*(): GType +proc GTK_PLUG*(obj: pointer): PGtkPlug +proc GTK_PLUG_CLASS*(klass: pointer): PGtkPlugClass +proc GTK_IS_PLUG*(obj: pointer): bool +proc GTK_IS_PLUG_CLASS*(klass: pointer): bool +proc GTK_PLUG_GET_CLASS*(obj: pointer): PGtkPlugClass +proc same_app*(a: var TGtkPlug): guint +proc set_same_app*(a: var TGtkPlug, `same_app`: guint) +proc gtk_plug_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_plug_get_type".} +proc gtk_plug_construct_for_display*(plug: PGtkPlug, display: PGdkDisplay, + socket_id: TGdkNativeWindow){.cdecl, + dynlib: gtklib, importc: "gtk_plug_construct_for_display".} +proc gtk_plug_new_for_display*(display: PGdkDisplay, socket_id: TGdkNativeWindow): PGtkPlug{. + cdecl, dynlib: gtklib, importc: "gtk_plug_new_for_display".} +proc gtk_plug_get_id*(plug: PGtkPlug): TGdkNativeWindow{.cdecl, dynlib: gtklib, + importc: "gtk_plug_get_id".} +proc gtk_plug_add_to_socket*(plug: PGtkPlug, socket: PGtkSocket){.cdecl, + dynlib: gtklib, importc: "_gtk_plug_add_to_socket".} +proc gtk_plug_remove_from_socket*(plug: PGtkPlug, socket: PGtkSocket){.cdecl, + dynlib: gtklib, importc: "_gtk_plug_remove_from_socket".} +const + bm_TGtkPreview_type* = 0x00000001'i16 + bp_TGtkPreview_type* = 0'i16 + bm_TGtkPreview_expand* = 0x00000002'i16 + bp_TGtkPreview_expand* = 1'i16 + +proc GTK_TYPE_PREVIEW*(): GType +proc GTK_PREVIEW*(obj: pointer): PGtkPreview +proc GTK_PREVIEW_CLASS*(klass: pointer): PGtkPreviewClass +proc GTK_IS_PREVIEW*(obj: pointer): bool +proc GTK_IS_PREVIEW_CLASS*(klass: pointer): bool +proc GTK_PREVIEW_GET_CLASS*(obj: pointer): PGtkPreviewClass +proc get_type*(a: var TGtkPreview): guint +proc set_type*(a: var TGtkPreview, `type`: guint) +proc get_expand*(a: var TGtkPreview): guint +proc set_expand*(a: var TGtkPreview, `expand`: guint) +proc gtk_preview_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_preview_get_type".} +proc gtk_preview_uninit*(){.cdecl, dynlib: gtklib, importc: "gtk_preview_uninit".} +proc gtk_preview_new*(thetype: TGtkPreviewClass): PGtkPreview{.cdecl, + dynlib: gtklib, importc: "gtk_preview_new".} +proc gtk_preview_size*(preview: PGtkPreview, width: gint, height: gint){.cdecl, + dynlib: gtklib, importc: "gtk_preview_size".} +proc gtk_preview_put*(preview: PGtkPreview, window: PGdkWindow, gc: PGdkGC, + srcx: gint, srcy: gint, destx: gint, desty: gint, + width: gint, height: gint){.cdecl, dynlib: gtklib, + importc: "gtk_preview_put".} +proc gtk_preview_draw_row*(preview: PGtkPreview, data: Pguchar, x: gint, + y: gint, w: gint){.cdecl, dynlib: gtklib, + importc: "gtk_preview_draw_row".} +proc gtk_preview_set_expand*(preview: PGtkPreview, expand: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_preview_set_expand".} +proc gtk_preview_set_gamma*(gamma: float64){.cdecl, dynlib: gtklib, + importc: "gtk_preview_set_gamma".} +proc gtk_preview_set_color_cube*(nred_shades: guint, ngreen_shades: guint, + nblue_shades: guint, ngray_shades: guint){. + cdecl, dynlib: gtklib, importc: "gtk_preview_set_color_cube".} +proc gtk_preview_set_install_cmap*(install_cmap: gint){.cdecl, dynlib: gtklib, + importc: "gtk_preview_set_install_cmap".} +proc gtk_preview_set_reserved*(nreserved: gint){.cdecl, dynlib: gtklib, + importc: "gtk_preview_set_reserved".} +proc gtk_preview_set_dither*(preview: PGtkPreview, dither: TGdkRgbDither){. + cdecl, dynlib: gtklib, importc: "gtk_preview_set_dither".} +proc gtk_preview_get_info*(): PGtkPreviewInfo{.cdecl, dynlib: gtklib, + importc: "gtk_preview_get_info".} +proc gtk_preview_reset*(){.cdecl, dynlib: gtklib, importc: "gtk_preview_reset".} +const + bm_TGtkProgress_show_text* = 0x00000001'i16 + bp_TGtkProgress_show_text* = 0'i16 + bm_TGtkProgress_activity_mode* = 0x00000002'i16 + bp_TGtkProgress_activity_mode* = 1'i16 + bm_TGtkProgress_use_text_format* = 0x00000004'i16 + bp_TGtkProgress_use_text_format* = 2'i16 + +proc show_text*(a: var TGtkProgress): guint +proc set_show_text*(a: var TGtkProgress, `show_text`: guint) +proc activity_mode*(a: var TGtkProgress): guint +proc set_activity_mode*(a: var TGtkProgress, `activity_mode`: guint) +proc use_text_format*(a: var TGtkProgress): guint +proc set_use_text_format*(a: var TGtkProgress, `use_text_format`: guint) +const + bm_TGtkProgressBar_activity_dir* = 0x00000001'i16 + bp_TGtkProgressBar_activity_dir* = 0'i16 + +proc GTK_TYPE_PROGRESS_BAR*(): GType +proc GTK_PROGRESS_BAR*(obj: pointer): PGtkProgressBar +proc GTK_PROGRESS_BAR_CLASS*(klass: pointer): PGtkProgressBarClass +proc GTK_IS_PROGRESS_BAR*(obj: pointer): bool +proc GTK_IS_PROGRESS_BAR_CLASS*(klass: pointer): bool +proc GTK_PROGRESS_BAR_GET_CLASS*(obj: pointer): PGtkProgressBarClass +proc activity_dir*(a: var TGtkProgressBar): guint +proc set_activity_dir*(a: var TGtkProgressBar, `activity_dir`: guint) +proc gtk_progress_bar_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_progress_bar_get_type".} +proc gtk_progress_bar_new*(): PGtkProgressBar{.cdecl, dynlib: gtklib, + importc: "gtk_progress_bar_new".} +proc gtk_progress_bar_pulse*(pbar: PGtkProgressBar){.cdecl, dynlib: gtklib, + importc: "gtk_progress_bar_pulse".} +proc gtk_progress_bar_set_text*(pbar: PGtkProgressBar, text: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_progress_bar_set_text".} +proc gtk_progress_bar_set_fraction*(pbar: PGtkProgressBar, fraction: gdouble){. + cdecl, dynlib: gtklib, importc: "gtk_progress_bar_set_fraction".} +proc gtk_progress_bar_set_pulse_step*(pbar: PGtkProgressBar, fraction: gdouble){. + cdecl, dynlib: gtklib, importc: "gtk_progress_bar_set_pulse_step".} +proc gtk_progress_bar_set_orientation*(pbar: PGtkProgressBar, + orientation: TGtkProgressBarOrientation){. + cdecl, dynlib: gtklib, importc: "gtk_progress_bar_set_orientation".} +proc gtk_progress_bar_get_text*(pbar: PGtkProgressBar): cstring{.cdecl, + dynlib: gtklib, importc: "gtk_progress_bar_get_text".} +proc gtk_progress_bar_get_fraction*(pbar: PGtkProgressBar): gdouble{.cdecl, + dynlib: gtklib, importc: "gtk_progress_bar_get_fraction".} +proc gtk_progress_bar_get_pulse_step*(pbar: PGtkProgressBar): gdouble{.cdecl, + dynlib: gtklib, importc: "gtk_progress_bar_get_pulse_step".} +proc gtk_progress_bar_get_orientation*(pbar: PGtkProgressBar): TGtkProgressBarOrientation{. + cdecl, dynlib: gtklib, importc: "gtk_progress_bar_get_orientation".} +proc GTK_TYPE_RADIO_BUTTON*(): GType +proc GTK_RADIO_BUTTON*(obj: pointer): PGtkRadioButton +proc GTK_RADIO_BUTTON_CLASS*(klass: pointer): PGtkRadioButtonClass +proc GTK_IS_RADIO_BUTTON*(obj: pointer): bool +proc GTK_IS_RADIO_BUTTON_CLASS*(klass: pointer): bool +proc GTK_RADIO_BUTTON_GET_CLASS*(obj: pointer): PGtkRadioButtonClass +proc gtk_radio_button_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_radio_button_get_type".} +proc gtk_radio_button_new*(group: PGSList): PGtkRadioButton{.cdecl, dynlib: gtklib, + importc: "gtk_radio_button_new".} +proc gtk_radio_button_new_from_widget*(group: PGtkRadioButton): PGtkRadioButton{. + cdecl, dynlib: gtklib, importc: "gtk_radio_button_new_from_widget".} +proc gtk_radio_button_new_with_label*(group: PGSList, `label`: cstring): PGtkRadioButton{. + cdecl, dynlib: gtklib, importc: "gtk_radio_button_new_with_label".} +proc gtk_radio_button_new_with_label_from_widget*(group: PGtkRadioButton, + `label`: cstring): PGtkRadioButton{.cdecl, dynlib: gtklib, importc: "gtk_radio_button_new_with_label_from_widget".} +proc gtk_radio_button_new_with_mnemonic*(group: PGSList, `label`: cstring): PGtkRadioButton{. + cdecl, dynlib: gtklib, importc: "gtk_radio_button_new_with_mnemonic".} +proc gtk_radio_button_new_with_mnemonic_from_widget*(group: PGtkRadioButton, + `label`: cstring): PGtkRadioButton{.cdecl, dynlib: gtklib, importc: "gtk_radio_button_new_with_mnemonic_from_widget".} +proc gtk_radio_button_get_group*(radio_button: PGtkRadioButton): PGSList{.cdecl, + dynlib: gtklib, importc: "gtk_radio_button_get_group".} +proc gtk_radio_button_set_group*(radio_button: PGtkRadioButton, group: PGSList){. + cdecl, dynlib: gtklib, importc: "gtk_radio_button_set_group".} +proc GTK_TYPE_RADIO_MENU_ITEM*(): GType +proc GTK_RADIO_MENU_ITEM*(obj: pointer): PGtkRadioMenuItem +proc GTK_RADIO_MENU_ITEM_CLASS*(klass: pointer): PGtkRadioMenuItemClass +proc GTK_IS_RADIO_MENU_ITEM*(obj: pointer): bool +proc GTK_IS_RADIO_MENU_ITEM_CLASS*(klass: pointer): bool +proc GTK_RADIO_MENU_ITEM_GET_CLASS*(obj: pointer): PGtkRadioMenuItemClass +proc gtk_radio_menu_item_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_radio_menu_item_get_type".} +proc gtk_radio_menu_item_new*(group: PGSList): PGtkRadioMenuItem{.cdecl, + dynlib: gtklib, importc: "gtk_radio_menu_item_new".} +proc gtk_radio_menu_item_new_with_label*(group: PGSList, `label`: cstring): PGtkRadioMenuItem{. + cdecl, dynlib: gtklib, importc: "gtk_radio_menu_item_new_with_label".} +proc gtk_radio_menu_item_new_with_mnemonic*(group: PGSList, `label`: cstring): PGtkRadioMenuItem{. + cdecl, dynlib: gtklib, importc: "gtk_radio_menu_item_new_with_mnemonic".} +proc gtk_radio_menu_item_get_group*(radio_menu_item: PGtkRadioMenuItem): PGSList{. + cdecl, dynlib: gtklib, importc: "gtk_radio_menu_item_get_group".} +proc gtk_radio_menu_item_set_group*(radio_menu_item: PGtkRadioMenuItem, + group: PGSList){.cdecl, dynlib: gtklib, + importc: "gtk_radio_menu_item_set_group".} +const + bm_TGtkScrolledWindow_hscrollbar_policy* = 0x00000003'i16 + bp_TGtkScrolledWindow_hscrollbar_policy* = 0'i16 + bm_TGtkScrolledWindow_vscrollbar_policy* = 0x0000000C'i16 + bp_TGtkScrolledWindow_vscrollbar_policy* = 2'i16 + bm_TGtkScrolledWindow_hscrollbar_visible* = 0x00000010'i16 + bp_TGtkScrolledWindow_hscrollbar_visible* = 4'i16 + bm_TGtkScrolledWindow_vscrollbar_visible* = 0x00000020'i16 + bp_TGtkScrolledWindow_vscrollbar_visible* = 5'i16 + bm_TGtkScrolledWindow_window_placement* = 0x000000C0'i16 + bp_TGtkScrolledWindow_window_placement* = 6'i16 + bm_TGtkScrolledWindow_focus_out* = 0x00000100'i16 + bp_TGtkScrolledWindow_focus_out* = 8'i16 + +proc GTK_TYPE_SCROLLED_WINDOW*(): GType +proc GTK_SCROLLED_WINDOW*(obj: pointer): PGtkScrolledWindow +proc GTK_SCROLLED_WINDOW_CLASS*(klass: pointer): PGtkScrolledWindowClass +proc GTK_IS_SCROLLED_WINDOW*(obj: pointer): bool +proc GTK_IS_SCROLLED_WINDOW_CLASS*(klass: pointer): bool +proc GTK_SCROLLED_WINDOW_GET_CLASS*(obj: pointer): PGtkScrolledWindowClass +proc hscrollbar_policy*(a: var TGtkScrolledWindow): guint +proc set_hscrollbar_policy*(a: var TGtkScrolledWindow, + `hscrollbar_policy`: guint) +proc vscrollbar_policy*(a: var TGtkScrolledWindow): guint +proc set_vscrollbar_policy*(a: var TGtkScrolledWindow, + `vscrollbar_policy`: guint) +proc hscrollbar_visible*(a: var TGtkScrolledWindow): guint +proc set_hscrollbar_visible*(a: var TGtkScrolledWindow, + `hscrollbar_visible`: guint) +proc vscrollbar_visible*(a: var TGtkScrolledWindow): guint +proc set_vscrollbar_visible*(a: var TGtkScrolledWindow, + `vscrollbar_visible`: guint) +proc window_placement*(a: var TGtkScrolledWindow): guint +proc set_window_placement*(a: var TGtkScrolledWindow, `window_placement`: guint) +proc focus_out*(a: var TGtkScrolledWindow): guint +proc set_focus_out*(a: var TGtkScrolledWindow, `focus_out`: guint) +proc gtk_scrolled_window_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_scrolled_window_get_type".} +proc gtk_scrolled_window_new*(hadjustment: PGtkAdjustment, + vadjustment: PGtkAdjustment): PGtkScrolledWindow{.cdecl, + dynlib: gtklib, importc: "gtk_scrolled_window_new".} +proc gtk_scrolled_window_set_hadjustment*(scrolled_window: PGtkScrolledWindow, + hadjustment: PGtkAdjustment){.cdecl, dynlib: gtklib, importc: "gtk_scrolled_window_set_hadjustment".} +proc gtk_scrolled_window_set_vadjustment*(scrolled_window: PGtkScrolledWindow, + hadjustment: PGtkAdjustment){.cdecl, dynlib: gtklib, importc: "gtk_scrolled_window_set_vadjustment".} +proc gtk_scrolled_window_get_hadjustment*(scrolled_window: PGtkScrolledWindow): PGtkAdjustment{. + cdecl, dynlib: gtklib, importc: "gtk_scrolled_window_get_hadjustment".} +proc gtk_scrolled_window_get_vadjustment*(scrolled_window: PGtkScrolledWindow): PGtkAdjustment{. + cdecl, dynlib: gtklib, importc: "gtk_scrolled_window_get_vadjustment".} +proc gtk_scrolled_window_set_policy*(scrolled_window: PGtkScrolledWindow, + hscrollbar_policy: TGtkPolicyType, + vscrollbar_policy: TGtkPolicyType){.cdecl, + dynlib: gtklib, importc: "gtk_scrolled_window_set_policy".} +proc gtk_scrolled_window_get_policy*(scrolled_window: PGtkScrolledWindow, + hscrollbar_policy: PGtkPolicyType, + vscrollbar_policy: PGtkPolicyType){.cdecl, + dynlib: gtklib, importc: "gtk_scrolled_window_get_policy".} +proc gtk_scrolled_window_set_placement*(scrolled_window: PGtkScrolledWindow, + window_placement: TGtkCornerType){. + cdecl, dynlib: gtklib, importc: "gtk_scrolled_window_set_placement".} +proc gtk_scrolled_window_get_placement*(scrolled_window: PGtkScrolledWindow): TGtkCornerType{. + cdecl, dynlib: gtklib, importc: "gtk_scrolled_window_get_placement".} +proc gtk_scrolled_window_set_shadow_type*(scrolled_window: PGtkScrolledWindow, + thetype: TGtkShadowType){.cdecl, dynlib: gtklib, + importc: "gtk_scrolled_window_set_shadow_type".} +proc gtk_scrolled_window_get_shadow_type*(scrolled_window: PGtkScrolledWindow): TGtkShadowType{. + cdecl, dynlib: gtklib, importc: "gtk_scrolled_window_get_shadow_type".} +proc gtk_scrolled_window_add_with_viewport*(scrolled_window: PGtkScrolledWindow, + child: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_scrolled_window_add_with_viewport".} +proc GTK_TYPE_SELECTION_DATA*(): GType +proc gtk_target_list_new*(targets: PGtkTargetEntry, ntargets: guint): PGtkTargetList{. + cdecl, dynlib: gtklib, importc: "gtk_target_list_new".} +proc gtk_target_list_ref*(list: PGtkTargetList){.cdecl, dynlib: gtklib, + importc: "gtk_target_list_ref".} +proc gtk_target_list_unref*(list: PGtkTargetList){.cdecl, dynlib: gtklib, + importc: "gtk_target_list_unref".} +proc gtk_target_list_add*(list: PGtkTargetList, target: TGdkAtom, flags: guint, + info: guint){.cdecl, dynlib: gtklib, + importc: "gtk_target_list_add".} +proc gtk_target_list_add_table*(list: PGtkTargetList, targets: PGtkTargetEntry, + ntargets: guint){.cdecl, dynlib: gtklib, + importc: "gtk_target_list_add_table".} +proc gtk_target_list_remove*(list: PGtkTargetList, target: TGdkAtom){.cdecl, + dynlib: gtklib, importc: "gtk_target_list_remove".} +proc gtk_target_list_find*(list: PGtkTargetList, target: TGdkAtom, info: Pguint): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_target_list_find".} +proc gtk_selection_owner_set*(widget: PGtkWidget, selection: TGdkAtom, + time: guint32): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_selection_owner_set".} +proc gtk_selection_owner_set_for_display*(display: PGdkDisplay, + widget: PGtkWidget, selection: TGdkAtom, time: guint32): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_selection_owner_set_for_display".} +proc gtk_selection_add_target*(widget: PGtkWidget, selection: TGdkAtom, + target: TGdkAtom, info: guint){.cdecl, + dynlib: gtklib, importc: "gtk_selection_add_target".} +proc gtk_selection_add_targets*(widget: PGtkWidget, selection: TGdkAtom, + targets: PGtkTargetEntry, ntargets: guint){. + cdecl, dynlib: gtklib, importc: "gtk_selection_add_targets".} +proc gtk_selection_clear_targets*(widget: PGtkWidget, selection: TGdkAtom){. + cdecl, dynlib: gtklib, importc: "gtk_selection_clear_targets".} +proc gtk_selection_convert*(widget: PGtkWidget, selection: TGdkAtom, + target: TGdkAtom, time: guint32): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_selection_convert".} +proc gtk_selection_data_set*(selection_data: PGtkSelectionData, + thetype: TGdkAtom, format: gint, data: Pguchar, + length: gint){.cdecl, dynlib: gtklib, + importc: "gtk_selection_data_set".} +proc gtk_selection_data_set_text*(selection_data: PGtkSelectionData, + str: cstring, len: gint): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_selection_data_set_text".} +proc gtk_selection_data_get_text*(selection_data: PGtkSelectionData): Pguchar{. + cdecl, dynlib: gtklib, importc: "gtk_selection_data_get_text".} +proc gtk_selection_data_targets_include_text*(selection_data: PGtkSelectionData): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_selection_data_targets_include_text".} +proc gtk_selection_remove_all*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_selection_remove_all".} +proc gtk_selection_clear*(widget: PGtkWidget, event: PGdkEventSelection): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_selection_clear".} +proc gtk_selection_request*(widget: PGtkWidget, event: PGdkEventSelection): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_selection_request".} +proc gtk_selection_incr_event*(window: PGdkWindow, event: PGdkEventProperty): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_selection_incr_event".} +proc gtk_selection_notify*(widget: PGtkWidget, event: PGdkEventSelection): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_selection_notify".} +proc gtk_selection_property_notify*(widget: PGtkWidget, event: PGdkEventProperty): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_selection_property_notify".} +proc gtk_selection_data_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_selection_data_get_type".} +proc gtk_selection_data_copy*(data: PGtkSelectionData): PGtkSelectionData{. + cdecl, dynlib: gtklib, importc: "gtk_selection_data_copy".} +proc gtk_selection_data_free*(data: PGtkSelectionData){.cdecl, dynlib: gtklib, + importc: "gtk_selection_data_free".} +proc GTK_TYPE_SEPARATOR_MENU_ITEM*(): GType +proc GTK_SEPARATOR_MENU_ITEM*(obj: pointer): PGtkSeparatorMenuItem +proc GTK_SEPARATOR_MENU_ITEM_CLASS*(klass: pointer): PGtkSeparatorMenuItemClass +proc GTK_IS_SEPARATOR_MENU_ITEM*(obj: pointer): bool +proc GTK_IS_SEPARATOR_MENU_ITEM_CLASS*(klass: pointer): bool +proc GTK_SEPARATOR_MENU_ITEM_GET_CLASS*(obj: pointer): PGtkSeparatorMenuItemClass +proc gtk_separator_menu_item_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_separator_menu_item_get_type".} +proc gtk_separator_menu_item_new*(): PGtkSeparatorMenuItem{.cdecl, dynlib: gtklib, + importc: "gtk_separator_menu_item_new".} +const + bm_TGtkSizeGroup_have_width* = 0x00000001'i16 + bp_TGtkSizeGroup_have_width* = 0'i16 + bm_TGtkSizeGroup_have_height* = 0x00000002'i16 + bp_TGtkSizeGroup_have_height* = 1'i16 + +proc GTK_TYPE_SIZE_GROUP*(): GType +proc GTK_SIZE_GROUP*(obj: pointer): PGtkSizeGroup +proc GTK_SIZE_GROUP_CLASS*(klass: pointer): PGtkSizeGroupClass +proc GTK_IS_SIZE_GROUP*(obj: pointer): bool +proc GTK_IS_SIZE_GROUP_CLASS*(klass: pointer): bool +proc GTK_SIZE_GROUP_GET_CLASS*(obj: pointer): PGtkSizeGroupClass +proc have_width*(a: var TGtkSizeGroup): guint +proc set_have_width*(a: var TGtkSizeGroup, `have_width`: guint) +proc have_height*(a: var TGtkSizeGroup): guint +proc set_have_height*(a: var TGtkSizeGroup, `have_height`: guint) +proc gtk_size_group_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_size_group_get_type".} +proc gtk_size_group_new*(mode: TGtkSizeGroupMode): PGtkSizeGroup{.cdecl, + dynlib: gtklib, importc: "gtk_size_group_new".} +proc gtk_size_group_set_mode*(size_group: PGtkSizeGroup, mode: TGtkSizeGroupMode){. + cdecl, dynlib: gtklib, importc: "gtk_size_group_set_mode".} +proc gtk_size_group_get_mode*(size_group: PGtkSizeGroup): TGtkSizeGroupMode{. + cdecl, dynlib: gtklib, importc: "gtk_size_group_get_mode".} +proc gtk_size_group_add_widget*(size_group: PGtkSizeGroup, widget: PGtkWidget){. + cdecl, dynlib: gtklib, importc: "gtk_size_group_add_widget".} +proc gtk_size_group_remove_widget*(size_group: PGtkSizeGroup, widget: PGtkWidget){. + cdecl, dynlib: gtklib, importc: "gtk_size_group_remove_widget".} +proc gtk_size_group_get_child_requisition*(widget: PGtkWidget, + requisition: PGtkRequisition){.cdecl, dynlib: gtklib, importc: "_gtk_size_group_get_child_requisition".} +proc gtk_size_group_compute_requisition*(widget: PGtkWidget, + requisition: PGtkRequisition){.cdecl, dynlib: gtklib, importc: "_gtk_size_group_compute_requisition".} +proc gtk_size_group_queue_resize*(widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "_gtk_size_group_queue_resize".} +const + bm_TGtkSocket_same_app* = 0x00000001'i16 + bp_TGtkSocket_same_app* = 0'i16 + bm_TGtkSocket_focus_in* = 0x00000002'i16 + bp_TGtkSocket_focus_in* = 1'i16 + bm_TGtkSocket_have_size* = 0x00000004'i16 + bp_TGtkSocket_have_size* = 2'i16 + bm_TGtkSocket_need_map* = 0x00000008'i16 + bp_TGtkSocket_need_map* = 3'i16 + bm_TGtkSocket_is_mapped* = 0x00000010'i16 + bp_TGtkSocket_is_mapped* = 4'i16 + +proc GTK_TYPE_SOCKET*(): GType +proc GTK_SOCKET*(obj: pointer): PGtkSocket +proc GTK_SOCKET_CLASS*(klass: pointer): PGtkSocketClass +proc GTK_IS_SOCKET*(obj: pointer): bool +proc GTK_IS_SOCKET_CLASS*(klass: pointer): bool +proc GTK_SOCKET_GET_CLASS*(obj: pointer): PGtkSocketClass +proc same_app*(a: var TGtkSocket): guint +proc set_same_app*(a: var TGtkSocket, `same_app`: guint) +proc focus_in*(a: var TGtkSocket): guint +proc set_focus_in*(a: var TGtkSocket, `focus_in`: guint) +proc have_size*(a: var TGtkSocket): guint +proc set_have_size*(a: var TGtkSocket, `have_size`: guint) +proc need_map*(a: var TGtkSocket): guint +proc set_need_map*(a: var TGtkSocket, `need_map`: guint) +proc is_mapped*(a: var TGtkSocket): guint +proc set_is_mapped*(a: var TGtkSocket, `is_mapped`: guint) +proc gtk_socket_new*(): PGtkSocket {.cdecl, dynlib: gtklib, + importc: "gtk_socket_new".} +proc gtk_socket_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_socket_get_type".} +proc gtk_socket_add_id*(socket: PGtkSocket, window_id: TGdkNativeWindow){.cdecl, + dynlib: gtklib, importc: "gtk_socket_add_id".} +proc gtk_socket_get_id*(socket: PGtkSocket): TGdkNativeWindow{.cdecl, + dynlib: gtklib, importc: "gtk_socket_get_id".} +const + GTK_INPUT_ERROR* = - (1) + bm_TGtkSpinButton_in_child* = 0x00000003'i32 + bp_TGtkSpinButton_in_child* = 0'i32 + bm_TGtkSpinButton_click_child* = 0x0000000C'i32 + bp_TGtkSpinButton_click_child* = 2'i32 + bm_TGtkSpinButton_button* = 0x00000030'i32 + bp_TGtkSpinButton_button* = 4'i32 + bm_TGtkSpinButton_need_timer* = 0x00000040'i32 + bp_TGtkSpinButton_need_timer* = 6'i32 + bm_TGtkSpinButton_timer_calls* = 0x00000380'i32 + bp_TGtkSpinButton_timer_calls* = 7'i32 + bm_TGtkSpinButton_digits* = 0x000FFC00'i32 + bp_TGtkSpinButton_digits* = 10'i32 + bm_TGtkSpinButton_numeric* = 0x00100000'i32 + bp_TGtkSpinButton_numeric* = 20'i32 + bm_TGtkSpinButton_wrap* = 0x00200000'i32 + bp_TGtkSpinButton_wrap* = 21'i32 + bm_TGtkSpinButton_snap_to_ticks* = 0x00400000'i32 + bp_TGtkSpinButton_snap_to_ticks* = 22'i32 + +proc GTK_TYPE_SPIN_BUTTON*(): GType +proc GTK_SPIN_BUTTON*(obj: pointer): PGtkSpinButton +proc GTK_SPIN_BUTTON_CLASS*(klass: pointer): PGtkSpinButtonClass +proc GTK_IS_SPIN_BUTTON*(obj: pointer): bool +proc GTK_IS_SPIN_BUTTON_CLASS*(klass: pointer): bool +proc GTK_SPIN_BUTTON_GET_CLASS*(obj: pointer): PGtkSpinButtonClass +proc in_child*(a: var TGtkSpinButton): guint +proc set_in_child*(a: var TGtkSpinButton, `in_child`: guint) +proc click_child*(a: var TGtkSpinButton): guint +proc set_click_child*(a: var TGtkSpinButton, `click_child`: guint) +proc button*(a: var TGtkSpinButton): guint +proc set_button*(a: var TGtkSpinButton, `button`: guint) +proc need_timer*(a: var TGtkSpinButton): guint +proc set_need_timer*(a: var TGtkSpinButton, `need_timer`: guint) +proc timer_calls*(a: var TGtkSpinButton): guint +proc set_timer_calls*(a: var TGtkSpinButton, `timer_calls`: guint) +proc digits*(a: var TGtkSpinButton): guint +proc set_digits*(a: var TGtkSpinButton, `digits`: guint) +proc numeric*(a: var TGtkSpinButton): guint +proc set_numeric*(a: var TGtkSpinButton, `numeric`: guint) +proc wrap*(a: var TGtkSpinButton): guint +proc set_wrap*(a: var TGtkSpinButton, `wrap`: guint) +proc snap_to_ticks*(a: var TGtkSpinButton): guint +proc set_snap_to_ticks*(a: var TGtkSpinButton, `snap_to_ticks`: guint) +proc gtk_spin_button_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_spin_button_get_type".} +proc gtk_spin_button_configure*(spin_button: PGtkSpinButton, + adjustment: PGtkAdjustment, climb_rate: gdouble, + digits: guint){.cdecl, dynlib: gtklib, + importc: "gtk_spin_button_configure".} +proc gtk_spin_button_new*(adjustment: PGtkAdjustment, climb_rate: gdouble, + digits: guint): PGtkSpinButton{.cdecl, dynlib: gtklib, + importc: "gtk_spin_button_new".} +proc gtk_spin_button_new_with_range*(min: gdouble, max: gdouble, step: gdouble): PGtkSpinButton{. + cdecl, dynlib: gtklib, importc: "gtk_spin_button_new_with_range".} +proc gtk_spin_button_set_adjustment*(spin_button: PGtkSpinButton, + adjustment: PGtkAdjustment){.cdecl, + dynlib: gtklib, importc: "gtk_spin_button_set_adjustment".} +proc gtk_spin_button_get_adjustment*(spin_button: PGtkSpinButton): PGtkAdjustment{. + cdecl, dynlib: gtklib, importc: "gtk_spin_button_get_adjustment".} +proc gtk_spin_button_set_digits*(spin_button: PGtkSpinButton, digits: guint){. + cdecl, dynlib: gtklib, importc: "gtk_spin_button_set_digits".} +proc gtk_spin_button_get_digits*(spin_button: PGtkSpinButton): guint{.cdecl, + dynlib: gtklib, importc: "gtk_spin_button_get_digits".} +proc gtk_spin_button_set_increments*(spin_button: PGtkSpinButton, step: gdouble, + page: gdouble){.cdecl, dynlib: gtklib, + importc: "gtk_spin_button_set_increments".} +proc gtk_spin_button_get_increments*(spin_button: PGtkSpinButton, + step: Pgdouble, page: Pgdouble){.cdecl, + dynlib: gtklib, importc: "gtk_spin_button_get_increments".} +proc gtk_spin_button_set_range*(spin_button: PGtkSpinButton, min: gdouble, + max: gdouble){.cdecl, dynlib: gtklib, + importc: "gtk_spin_button_set_range".} +proc gtk_spin_button_get_range*(spin_button: PGtkSpinButton, min: Pgdouble, + max: Pgdouble){.cdecl, dynlib: gtklib, + importc: "gtk_spin_button_get_range".} +proc gtk_spin_button_get_value*(spin_button: PGtkSpinButton): gdouble{.cdecl, + dynlib: gtklib, importc: "gtk_spin_button_get_value".} +proc gtk_spin_button_get_value_as_int*(spin_button: PGtkSpinButton): gint{. + cdecl, dynlib: gtklib, importc: "gtk_spin_button_get_value_as_int".} +proc gtk_spin_button_set_value*(spin_button: PGtkSpinButton, value: gdouble){. + cdecl, dynlib: gtklib, importc: "gtk_spin_button_set_value".} +proc gtk_spin_button_set_update_policy*(spin_button: PGtkSpinButton, + policy: TGtkSpinButtonUpdatePolicy){. + cdecl, dynlib: gtklib, importc: "gtk_spin_button_set_update_policy".} +proc gtk_spin_button_get_update_policy*(spin_button: PGtkSpinButton): TGtkSpinButtonUpdatePolicy{. + cdecl, dynlib: gtklib, importc: "gtk_spin_button_get_update_policy".} +proc gtk_spin_button_set_numeric*(spin_button: PGtkSpinButton, numeric: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_spin_button_set_numeric".} +proc gtk_spin_button_get_numeric*(spin_button: PGtkSpinButton): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_spin_button_get_numeric".} +proc gtk_spin_button_spin*(spin_button: PGtkSpinButton, direction: TGtkSpinType, + increment: gdouble){.cdecl, dynlib: gtklib, + importc: "gtk_spin_button_spin".} +proc gtk_spin_button_set_wrap*(spin_button: PGtkSpinButton, wrap: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_spin_button_set_wrap".} +proc gtk_spin_button_get_wrap*(spin_button: PGtkSpinButton): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_spin_button_get_wrap".} +proc gtk_spin_button_set_snap_to_ticks*(spin_button: PGtkSpinButton, + snap_to_ticks: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_spin_button_set_snap_to_ticks".} +proc gtk_spin_button_get_snap_to_ticks*(spin_button: PGtkSpinButton): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_spin_button_get_snap_to_ticks".} +proc gtk_spin_button_update*(spin_button: PGtkSpinButton){.cdecl, + dynlib: gtklib, importc: "gtk_spin_button_update".} +const + GTK_STOCK_DIALOG_INFO* = "gtk-dialog-info" + GTK_STOCK_DIALOG_WARNING* = "gtk-dialog-warning" + GTK_STOCK_DIALOG_ERROR* = "gtk-dialog-error" + GTK_STOCK_DIALOG_QUESTION* = "gtk-dialog-question" + GTK_STOCK_DND* = "gtk-dnd" + GTK_STOCK_DND_MULTIPLE* = "gtk-dnd-multiple" + GTK_STOCK_ABOUT* = "gtk-about" + GTK_STOCK_ADD_name* = "gtk-add" + GTK_STOCK_APPLY* = "gtk-apply" + GTK_STOCK_BOLD* = "gtk-bold" + GTK_STOCK_CANCEL* = "gtk-cancel" + GTK_STOCK_CDROM* = "gtk-cdrom" + GTK_STOCK_CLEAR* = "gtk-clear" + GTK_STOCK_CLOSE* = "gtk-close" + GTK_STOCK_COLOR_PICKER* = "gtk-color-picker" + GTK_STOCK_CONVERT* = "gtk-convert" + GTK_STOCK_CONNECT* = "gtk-connect" + GTK_STOCK_COPY* = "gtk-copy" + GTK_STOCK_CUT* = "gtk-cut" + GTK_STOCK_DELETE* = "gtk-delete" + GTK_STOCK_EDIT* = "gtk-edit" + GTK_STOCK_EXECUTE* = "gtk-execute" + GTK_STOCK_FIND* = "gtk-find" + GTK_STOCK_FIND_AND_REPLACE* = "gtk-find-and-replace" + GTK_STOCK_FLOPPY* = "gtk-floppy" + GTK_STOCK_GOTO_BOTTOM* = "gtk-goto-bottom" + GTK_STOCK_GOTO_FIRST* = "gtk-goto-first" + GTK_STOCK_GOTO_LAST* = "gtk-goto-last" + GTK_STOCK_GOTO_TOP* = "gtk-goto-top" + GTK_STOCK_GO_BACK* = "gtk-go-back" + GTK_STOCK_GO_DOWN* = "gtk-go-down" + GTK_STOCK_GO_FORWARD* = "gtk-go-forward" + GTK_STOCK_GO_UP* = "gtk-go-up" + GTK_STOCK_HELP* = "gtk-help" + GTK_STOCK_HOME* = "gtk-home" + GTK_STOCK_INDEX* = "gtk-index" + GTK_STOCK_ITALIC* = "gtk-italic" + GTK_STOCK_JUMP_TO* = "gtk-jump-to" + GTK_STOCK_JUSTIFY_CENTER* = "gtk-justify-center" + GTK_STOCK_JUSTIFY_FILL* = "gtk-justify-fill" + GTK_STOCK_JUSTIFY_LEFT* = "gtk-justify-left" + GTK_STOCK_JUSTIFY_RIGHT* = "gtk-justify-right" + GTK_STOCK_MEDIA_FORWARD* = "gtk-media-forward" + GTK_STOCK_MEDIA_NEXT* = "gtk-media-next" + GTK_STOCK_MEDIA_PAUSE* = "gtk-media-pause" + GTK_STOCK_MEDIA_PLAY* = "gtk-media-play" + GTK_STOCK_MEDIA_PREVIOUS* = "gtk-media-previous" + GTK_STOCK_MEDIA_RECORD* = "gtk-media-record" + GTK_STOCK_MEDIA_REWIND* = "gtk-media-rewind" + GTK_STOCK_MEDIA_STOP* = "gtk-media-stop" + GTK_STOCK_MISSING_IMAGE* = "gtk-missing-image" + GTK_STOCK_NEW* = "gtk-new" + GTK_STOCK_NO* = "gtk-no" + GTK_STOCK_OK* = "gtk-ok" + GTK_STOCK_OPEN* = "gtk-open" + GTK_STOCK_PASTE* = "gtk-paste" + GTK_STOCK_PREFERENCES* = "gtk-preferences" + GTK_STOCK_PRINT* = "gtk-print" + GTK_STOCK_PRINT_PREVIEW* = "gtk-print-preview" + GTK_STOCK_PROPERTIES* = "gtk-properties" + GTK_STOCK_QUIT* = "gtk-quit" + GTK_STOCK_REDO* = "gtk-redo" + GTK_STOCK_REFRESH* = "gtk-refresh" + GTK_STOCK_REMOVE* = "gtk-remove" + GTK_STOCK_REVERT_TO_SAVED* = "gtk-revert-to-saved" + GTK_STOCK_SAVE* = "gtk-save" + GTK_STOCK_SAVE_AS* = "gtk-save-as" + GTK_STOCK_SELECT_COLOR* = "gtk-select-color" + GTK_STOCK_SELECT_FONT* = "gtk-select-font" + GTK_STOCK_SORT_ASCENDING* = "gtk-sort-ascending" + GTK_STOCK_SORT_DESCENDING* = "gtk-sort-descending" + GTK_STOCK_SPELL_CHECK* = "gtk-spell-check" + GTK_STOCK_STOP* = "gtk-stop" + GTK_STOCK_STRIKETHROUGH* = "gtk-strikethrough" + GTK_STOCK_UNDELETE* = "gtk-undelete" + GTK_STOCK_UNDERLINE* = "gtk-underline" + GTK_STOCK_UNDO* = "gtk-undo" + GTK_STOCK_YES* = "gtk-yes" + GTK_STOCK_ZOOM_100* = "gtk-zoom-100" + GTK_STOCK_ZOOM_FIT* = "gtk-zoom-fit" + GTK_STOCK_ZOOM_IN* = "gtk-zoom-in" + GTK_STOCK_ZOOM_OUT* = "gtk-zoom-out" + +proc gtk_stock_add*(items: PGtkStockItem, n_items: guint){.cdecl, + dynlib: gtklib, importc: "gtk_stock_add".} +proc gtk_stock_add_static*(items: PGtkStockItem, n_items: guint){.cdecl, + dynlib: gtklib, importc: "gtk_stock_add_static".} +proc gtk_stock_lookup*(stock_id: cstring, item: PGtkStockItem): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_stock_lookup".} +proc gtk_stock_list_ids*(): PGSList{.cdecl, dynlib: gtklib, + importc: "gtk_stock_list_ids".} +proc gtk_stock_item_copy*(item: PGtkStockItem): PGtkStockItem{.cdecl, + dynlib: gtklib, importc: "gtk_stock_item_copy".} +proc gtk_stock_item_free*(item: PGtkStockItem){.cdecl, dynlib: gtklib, + importc: "gtk_stock_item_free".} +proc GTK_TYPE_STATUSBAR*(): GType +proc GTK_STATUSBAR*(obj: pointer): PGtkStatusbar +proc GTK_STATUSBAR_CLASS*(klass: pointer): PGtkStatusbarClass +proc GTK_IS_STATUSBAR*(obj: pointer): bool +proc GTK_IS_STATUSBAR_CLASS*(klass: pointer): bool +proc GTK_STATUSBAR_GET_CLASS*(obj: pointer): PGtkStatusbarClass +const + bm_TGtkStatusbar_has_resize_grip* = 0x00000001'i16 + bp_TGtkStatusbar_has_resize_grip* = 0'i16 + +proc has_resize_grip*(a: var TGtkStatusbar): guint +proc set_has_resize_grip*(a: var TGtkStatusbar, `has_resize_grip`: guint) +proc gtk_statusbar_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_statusbar_get_type".} +proc gtk_statusbar_new*(): PGtkStatusbar{.cdecl, dynlib: gtklib, + importc: "gtk_statusbar_new".} +proc gtk_statusbar_get_context_id*(statusbar: PGtkStatusbar, + context_description: cstring): guint{.cdecl, + dynlib: gtklib, importc: "gtk_statusbar_get_context_id".} +proc gtk_statusbar_push*(statusbar: PGtkStatusbar, context_id: guint, + text: cstring): guint{.cdecl, dynlib: gtklib, + importc: "gtk_statusbar_push".} +proc gtk_statusbar_pop*(statusbar: PGtkStatusbar, context_id: guint){.cdecl, + dynlib: gtklib, importc: "gtk_statusbar_pop".} +proc gtk_statusbar_remove*(statusbar: PGtkStatusbar, context_id: guint, + message_id: guint){.cdecl, dynlib: gtklib, + importc: "gtk_statusbar_remove".} +proc gtk_statusbar_set_has_resize_grip*(statusbar: PGtkStatusbar, + setting: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_statusbar_set_has_resize_grip".} +proc gtk_statusbar_get_has_resize_grip*(statusbar: PGtkStatusbar): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_statusbar_get_has_resize_grip".} +const + bm_TGtkTable_homogeneous* = 0x00000001'i16 + bp_TGtkTable_homogeneous* = 0'i16 + bm_TGtkTableChild_xexpand* = 0x00000001'i16 + bp_TGtkTableChild_xexpand* = 0'i16 + bm_TGtkTableChild_yexpand* = 0x00000002'i16 + bp_TGtkTableChild_yexpand* = 1'i16 + bm_TGtkTableChild_xshrink* = 0x00000004'i16 + bp_TGtkTableChild_xshrink* = 2'i16 + bm_TGtkTableChild_yshrink* = 0x00000008'i16 + bp_TGtkTableChild_yshrink* = 3'i16 + bm_TGtkTableChild_xfill* = 0x00000010'i16 + bp_TGtkTableChild_xfill* = 4'i16 + bm_TGtkTableChild_yfill* = 0x00000020'i16 + bp_TGtkTableChild_yfill* = 5'i16 + bm_TGtkTableRowCol_need_expand* = 0x00000001'i16 + bp_TGtkTableRowCol_need_expand* = 0'i16 + bm_TGtkTableRowCol_need_shrink* = 0x00000002'i16 + bp_TGtkTableRowCol_need_shrink* = 1'i16 + bm_TGtkTableRowCol_expand* = 0x00000004'i16 + bp_TGtkTableRowCol_expand* = 2'i16 + bm_TGtkTableRowCol_shrink* = 0x00000008'i16 + bp_TGtkTableRowCol_shrink* = 3'i16 + bm_TGtkTableRowCol_empty* = 0x00000010'i16 + bp_TGtkTableRowCol_empty* = 4'i16 + +proc GTK_TYPE_TABLE*(): GType +proc GTK_TABLE*(obj: pointer): PGtkTable +proc GTK_TABLE_CLASS*(klass: pointer): PGtkTableClass +proc GTK_IS_TABLE*(obj: pointer): bool +proc GTK_IS_TABLE_CLASS*(klass: pointer): bool +proc GTK_TABLE_GET_CLASS*(obj: pointer): PGtkTableClass +proc homogeneous*(a: var TGtkTable): guint +proc set_homogeneous*(a: var TGtkTable, `homogeneous`: guint) +proc xexpand*(a: var TGtkTableChild): guint +proc set_xexpand*(a: var TGtkTableChild, `xexpand`: guint) +proc yexpand*(a: var TGtkTableChild): guint +proc set_yexpand*(a: var TGtkTableChild, `yexpand`: guint) +proc xshrink*(a: var TGtkTableChild): guint +proc set_xshrink*(a: var TGtkTableChild, `xshrink`: guint) +proc yshrink*(a: var TGtkTableChild): guint +proc set_yshrink*(a: var TGtkTableChild, `yshrink`: guint) +proc xfill*(a: var TGtkTableChild): guint +proc set_xfill*(a: var TGtkTableChild, `xfill`: guint) +proc yfill*(a: var TGtkTableChild): guint +proc set_yfill*(a: var TGtkTableChild, `yfill`: guint) +proc need_expand*(a: var TGtkTableRowCol): guint +proc set_need_expand*(a: var TGtkTableRowCol, `need_expand`: guint) +proc need_shrink*(a: var TGtkTableRowCol): guint +proc set_need_shrink*(a: var TGtkTableRowCol, `need_shrink`: guint) +proc expand*(a: var TGtkTableRowCol): guint +proc set_expand*(a: var TGtkTableRowCol, `expand`: guint) +proc shrink*(a: var TGtkTableRowCol): guint +proc set_shrink*(a: var TGtkTableRowCol, `shrink`: guint) +proc empty*(a: var TGtkTableRowCol): guint +proc set_empty*(a: var TGtkTableRowCol, `empty`: guint) +proc gtk_table_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_table_get_type".} +proc gtk_table_new*(rows: guint, columns: guint, homogeneous: gboolean): PGtkTable{. + cdecl, dynlib: gtklib, importc: "gtk_table_new".} +proc gtk_table_resize*(table: PGtkTable, rows: guint, columns: guint){.cdecl, + dynlib: gtklib, importc: "gtk_table_resize".} +proc gtk_table_attach*(table: PGtkTable, child: PGtkWidget, left_attach: guint, + right_attach: guint, top_attach: guint, + bottom_attach: guint, xoptions: TGtkAttachOptions, + yoptions: TGtkAttachOptions, xpadding: guint, + ypadding: guint){.cdecl, dynlib: gtklib, + importc: "gtk_table_attach".} +proc gtk_table_attach_defaults*(table: PGtkTable, widget: PGtkWidget, + left_attach: guint, right_attach: guint, + top_attach: guint, bottom_attach: guint){.cdecl, + dynlib: gtklib, importc: "gtk_table_attach_defaults".} +proc gtk_table_set_row_spacing*(table: PGtkTable, row: guint, spacing: guint){. + cdecl, dynlib: gtklib, importc: "gtk_table_set_row_spacing".} +proc gtk_table_get_row_spacing*(table: PGtkTable, row: guint): guint{.cdecl, + dynlib: gtklib, importc: "gtk_table_get_row_spacing".} +proc gtk_table_set_col_spacing*(table: PGtkTable, column: guint, spacing: guint){. + cdecl, dynlib: gtklib, importc: "gtk_table_set_col_spacing".} +proc gtk_table_get_col_spacing*(table: PGtkTable, column: guint): guint{.cdecl, + dynlib: gtklib, importc: "gtk_table_get_col_spacing".} +proc gtk_table_set_row_spacings*(table: PGtkTable, spacing: guint){.cdecl, + dynlib: gtklib, importc: "gtk_table_set_row_spacings".} +proc gtk_table_get_default_row_spacing*(table: PGtkTable): guint{.cdecl, + dynlib: gtklib, importc: "gtk_table_get_default_row_spacing".} +proc gtk_table_set_col_spacings*(table: PGtkTable, spacing: guint){.cdecl, + dynlib: gtklib, importc: "gtk_table_set_col_spacings".} +proc gtk_table_get_default_col_spacing*(table: PGtkTable): guint{.cdecl, + dynlib: gtklib, importc: "gtk_table_get_default_col_spacing".} +proc gtk_table_set_homogeneous*(table: PGtkTable, homogeneous: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_table_set_homogeneous".} +proc gtk_table_get_homogeneous*(table: PGtkTable): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_table_get_homogeneous".} +const + bm_TGtkTearoffMenuItem_torn_off* = 0x00000001'i16 + bp_TGtkTearoffMenuItem_torn_off* = 0'i16 + +proc GTK_TYPE_TEAROFF_MENU_ITEM*(): GType +proc GTK_TEAROFF_MENU_ITEM*(obj: pointer): PGtkTearoffMenuItem +proc GTK_TEAROFF_MENU_ITEM_CLASS*(klass: pointer): PGtkTearoffMenuItemClass +proc GTK_IS_TEAROFF_MENU_ITEM*(obj: pointer): bool +proc GTK_IS_TEAROFF_MENU_ITEM_CLASS*(klass: pointer): bool +proc GTK_TEAROFF_MENU_ITEM_GET_CLASS*(obj: pointer): PGtkTearoffMenuItemClass +proc torn_off*(a: var TGtkTearoffMenuItem): guint +proc set_torn_off*(a: var TGtkTearoffMenuItem, `torn_off`: guint) +proc gtk_tearoff_menu_item_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_tearoff_menu_item_get_type".} +proc gtk_tearoff_menu_item_new*(): PGtkTearoffMenuItem{.cdecl, dynlib: gtklib, + importc: "gtk_tearoff_menu_item_new".} +const + bm_TGtkText_line_wrap* = 0x00000001'i16 + bp_TGtkText_line_wrap* = 0'i16 + bm_TGtkText_word_wrap* = 0x00000002'i16 + bp_TGtkText_word_wrap* = 1'i16 + bm_TGtkText_use_wchar* = 0x00000004'i16 + bp_TGtkText_use_wchar* = 2'i16 + +proc GTK_TYPE_TEXT*(): GType +proc GTK_TEXT*(obj: pointer): PGtkText +proc GTK_TEXT_CLASS*(klass: pointer): PGtkTextClass +proc GTK_IS_TEXT*(obj: pointer): bool +proc GTK_IS_TEXT_CLASS*(klass: pointer): bool +proc GTK_TEXT_GET_CLASS*(obj: pointer): PGtkTextClass +proc line_wrap*(a: PGtkText): guint +proc set_line_wrap*(a: PGtkText, `line_wrap`: guint) +proc word_wrap*(a: PGtkText): guint +proc set_word_wrap*(a: PGtkText, `word_wrap`: guint) +proc use_wchar*(a: PGtkText): gboolean +proc set_use_wchar*(a: PGtkText, `use_wchar`: gboolean) +proc gtk_text_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_text_get_type".} +proc gtk_text_new*(hadj: PGtkAdjustment, vadj: PGtkAdjustment): PGtkText{. + cdecl, dynlib: gtklib, importc: "gtk_text_new".} +proc gtk_text_set_editable*(text: PGtkText, editable: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_text_set_editable".} +proc gtk_text_set_word_wrap*(text: PGtkText, word_wrap: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_text_set_word_wrap".} +proc gtk_text_set_line_wrap*(text: PGtkText, line_wrap: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_text_set_line_wrap".} +proc gtk_text_set_adjustments*(text: PGtkText, hadj: PGtkAdjustment, + vadj: PGtkAdjustment){.cdecl, dynlib: gtklib, + importc: "gtk_text_set_adjustments".} +proc gtk_text_set_point*(text: PGtkText, index: guint){.cdecl, dynlib: gtklib, + importc: "gtk_text_set_point".} +proc gtk_text_get_point*(text: PGtkText): guint{.cdecl, dynlib: gtklib, + importc: "gtk_text_get_point".} +proc gtk_text_get_length*(text: PGtkText): guint{.cdecl, dynlib: gtklib, + importc: "gtk_text_get_length".} +proc gtk_text_freeze*(text: PGtkText){.cdecl, dynlib: gtklib, + importc: "gtk_text_freeze".} +proc gtk_text_thaw*(text: PGtkText){.cdecl, dynlib: gtklib, + importc: "gtk_text_thaw".} +proc gtk_text_insert*(text: PGtkText, font: PGdkFont, fore: PGdkColor, + back: PGdkColor, chars: cstring, length: gint){.cdecl, + dynlib: gtklib, importc: "gtk_text_insert".} +proc gtk_text_backward_delete*(text: PGtkText, nchars: guint): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_backward_delete".} +proc gtk_text_forward_delete*(text: PGtkText, nchars: guint): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_forward_delete".} +proc GTK_TEXT_INDEX_WCHAR*(t: PGtkText, index: guint): guint32 +proc GTK_TEXT_INDEX_UCHAR*(t: PGtkText, index: guint): GUChar +const + GTK_TEXT_SEARCH_VISIBLE_ONLY* = 0 + GTK_TEXT_SEARCH_TEXT_ONLY* = 1 + +proc GTK_TYPE_TEXT_ITER*(): GType +proc gtk_text_iter_get_buffer*(iter: PGtkTextIter): PGtkTextBuffer{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_get_buffer".} +proc gtk_text_iter_copy*(iter: PGtkTextIter): PGtkTextIter{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_copy".} +proc gtk_text_iter_free*(iter: PGtkTextIter){.cdecl, dynlib: gtklib, + importc: "gtk_text_iter_free".} +proc gtk_text_iter_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_text_iter_get_type".} +proc gtk_text_iter_get_offset*(iter: PGtkTextIter): gint{.cdecl, dynlib: gtklib, + importc: "gtk_text_iter_get_offset".} +proc gtk_text_iter_get_line*(iter: PGtkTextIter): gint{.cdecl, dynlib: gtklib, + importc: "gtk_text_iter_get_line".} +proc gtk_text_iter_get_line_offset*(iter: PGtkTextIter): gint{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_get_line_offset".} +proc gtk_text_iter_get_line_index*(iter: PGtkTextIter): gint{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_get_line_index".} +proc gtk_text_iter_get_visible_line_offset*(iter: PGtkTextIter): gint{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_get_visible_line_offset".} +proc gtk_text_iter_get_visible_line_index*(iter: PGtkTextIter): gint{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_get_visible_line_index".} +proc gtk_text_iter_get_char*(iter: PGtkTextIter): gunichar{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_get_char".} +proc gtk_text_iter_get_slice*(start: PGtkTextIter, theEnd: PGtkTextIter): cstring{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_get_slice".} +proc gtk_text_iter_get_text*(start: PGtkTextIter, theEnd: PGtkTextIter): cstring{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_get_text".} +proc gtk_text_iter_get_visible_slice*(start: PGtkTextIter, theEnd: PGtkTextIter): cstring{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_get_visible_slice".} +proc gtk_text_iter_get_visible_text*(start: PGtkTextIter, theEnd: PGtkTextIter): cstring{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_get_visible_text".} +proc gtk_text_iter_get_pixbuf*(iter: PGtkTextIter): PGdkPixbuf{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_get_pixbuf".} +proc gtk_text_iter_get_marks*(iter: PGtkTextIter): PGSList{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_get_marks".} +proc gtk_text_iter_get_child_anchor*(iter: PGtkTextIter): PGtkTextChildAnchor{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_get_child_anchor".} +proc gtk_text_iter_get_toggled_tags*(iter: PGtkTextIter, toggled_on: gboolean): PGSList{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_get_toggled_tags".} +proc gtk_text_iter_begins_tag*(iter: PGtkTextIter, tag: PGtkTextTag): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_begins_tag".} +proc gtk_text_iter_ends_tag*(iter: PGtkTextIter, tag: PGtkTextTag): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_ends_tag".} +proc gtk_text_iter_toggles_tag*(iter: PGtkTextIter, tag: PGtkTextTag): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_toggles_tag".} +proc gtk_text_iter_has_tag*(iter: PGtkTextIter, tag: PGtkTextTag): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_has_tag".} +proc gtk_text_iter_get_tags*(iter: PGtkTextIter): PGSList{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_get_tags".} +proc gtk_text_iter_editable*(iter: PGtkTextIter, default_setting: gboolean): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_editable".} +proc gtk_text_iter_can_insert*(iter: PGtkTextIter, default_editability: gboolean): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_can_insert".} +proc gtk_text_iter_starts_word*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_starts_word".} +proc gtk_text_iter_ends_word*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_ends_word".} +proc gtk_text_iter_inside_word*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_inside_word".} +proc gtk_text_iter_starts_sentence*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_starts_sentence".} +proc gtk_text_iter_ends_sentence*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_ends_sentence".} +proc gtk_text_iter_inside_sentence*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_inside_sentence".} +proc gtk_text_iter_starts_line*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_starts_line".} +proc gtk_text_iter_ends_line*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_ends_line".} +proc gtk_text_iter_is_cursor_position*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_is_cursor_position".} +proc gtk_text_iter_get_chars_in_line*(iter: PGtkTextIter): gint{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_get_chars_in_line".} +proc gtk_text_iter_get_bytes_in_line*(iter: PGtkTextIter): gint{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_get_bytes_in_line".} +proc gtk_text_iter_get_attributes*(iter: PGtkTextIter, + values: PGtkTextAttributes): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_get_attributes".} +proc gtk_text_iter_get_language*(iter: PGtkTextIter): PPangoLanguage{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_get_language".} +proc gtk_text_iter_is_end*(iter: PGtkTextIter): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_text_iter_is_end".} +proc gtk_text_iter_is_start*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_is_start".} +proc gtk_text_iter_forward_char*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_forward_char".} +proc gtk_text_iter_backward_char*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_backward_char".} +proc gtk_text_iter_forward_chars*(iter: PGtkTextIter, count: gint): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_forward_chars".} +proc gtk_text_iter_backward_chars*(iter: PGtkTextIter, count: gint): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_backward_chars".} +proc gtk_text_iter_forward_line*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_forward_line".} +proc gtk_text_iter_backward_line*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_backward_line".} +proc gtk_text_iter_forward_lines*(iter: PGtkTextIter, count: gint): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_forward_lines".} +proc gtk_text_iter_backward_lines*(iter: PGtkTextIter, count: gint): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_backward_lines".} +proc gtk_text_iter_forward_word_end*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_forward_word_end".} +proc gtk_text_iter_backward_word_start*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_backward_word_start".} +proc gtk_text_iter_forward_word_ends*(iter: PGtkTextIter, count: gint): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_forward_word_ends".} +proc gtk_text_iter_backward_word_starts*(iter: PGtkTextIter, count: gint): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_backward_word_starts".} +proc gtk_text_iter_forward_sentence_end*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_forward_sentence_end".} +proc gtk_text_iter_backward_sentence_start*(iter: PGtkTextIter): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_backward_sentence_start".} +proc gtk_text_iter_forward_sentence_ends*(iter: PGtkTextIter, count: gint): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_forward_sentence_ends".} +proc gtk_text_iter_backward_sentence_starts*(iter: PGtkTextIter, count: gint): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_backward_sentence_starts".} +proc gtk_text_iter_forward_cursor_position*(iter: PGtkTextIter): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_forward_cursor_position".} +proc gtk_text_iter_backward_cursor_position*(iter: PGtkTextIter): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_backward_cursor_position".} +proc gtk_text_iter_forward_cursor_positions*(iter: PGtkTextIter, count: gint): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_forward_cursor_positions".} +proc gtk_text_iter_backward_cursor_positions*(iter: PGtkTextIter, count: gint): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_backward_cursor_positions".} +proc gtk_text_iter_set_offset*(iter: PGtkTextIter, char_offset: gint){.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_set_offset".} +proc gtk_text_iter_set_line*(iter: PGtkTextIter, line_number: gint){.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_set_line".} +proc gtk_text_iter_set_line_offset*(iter: PGtkTextIter, char_on_line: gint){. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_set_line_offset".} +proc gtk_text_iter_set_line_index*(iter: PGtkTextIter, byte_on_line: gint){. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_set_line_index".} +proc gtk_text_iter_forward_to_end*(iter: PGtkTextIter){.cdecl, dynlib: gtklib, + importc: "gtk_text_iter_forward_to_end".} +proc gtk_text_iter_forward_to_line_end*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_forward_to_line_end".} +proc gtk_text_iter_set_visible_line_offset*(iter: PGtkTextIter, + char_on_line: gint){.cdecl, dynlib: gtklib, + importc: "gtk_text_iter_set_visible_line_offset".} +proc gtk_text_iter_set_visible_line_index*(iter: PGtkTextIter, + byte_on_line: gint){.cdecl, dynlib: gtklib, + importc: "gtk_text_iter_set_visible_line_index".} +proc gtk_text_iter_forward_to_tag_toggle*(iter: PGtkTextIter, tag: PGtkTextTag): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_forward_to_tag_toggle".} +proc gtk_text_iter_backward_to_tag_toggle*(iter: PGtkTextIter, tag: PGtkTextTag): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_backward_to_tag_toggle".} +proc gtk_text_iter_forward_find_char*(iter: PGtkTextIter, + pred: TGtkTextCharPredicate, + user_data: gpointer, limit: PGtkTextIter): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_forward_find_char".} +proc gtk_text_iter_backward_find_char*(iter: PGtkTextIter, + pred: TGtkTextCharPredicate, + user_data: gpointer, limit: PGtkTextIter): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_backward_find_char".} +proc gtk_text_iter_forward_search*(iter: PGtkTextIter, str: cstring, + flags: TGtkTextSearchFlags, + match_start: PGtkTextIter, + match_end: PGtkTextIter, limit: PGtkTextIter): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_forward_search".} +proc gtk_text_iter_backward_search*(iter: PGtkTextIter, str: cstring, + flags: TGtkTextSearchFlags, + match_start: PGtkTextIter, + match_end: PGtkTextIter, limit: PGtkTextIter): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_backward_search".} +proc gtk_text_iter_equal*(lhs: PGtkTextIter, rhs: PGtkTextIter): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_iter_equal".} +proc gtk_text_iter_compare*(lhs: PGtkTextIter, rhs: PGtkTextIter): gint{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_compare".} +proc gtk_text_iter_in_range*(iter: PGtkTextIter, start: PGtkTextIter, + theEnd: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_in_range".} +proc gtk_text_iter_order*(first: PGtkTextIter, second: PGtkTextIter){.cdecl, + dynlib: gtklib, importc: "gtk_text_iter_order".} +proc GTK_TYPE_TEXT_TAG*(): GType +proc GTK_TEXT_TAG*(obj: pointer): PGtkTextTag +proc GTK_TEXT_TAG_CLASS*(klass: pointer): PGtkTextTagClass +proc GTK_IS_TEXT_TAG*(obj: pointer): bool +proc GTK_IS_TEXT_TAG_CLASS*(klass: pointer): bool +proc GTK_TEXT_TAG_GET_CLASS*(obj: pointer): PGtkTextTagClass +proc GTK_TYPE_TEXT_ATTRIBUTES*(): GType +proc gtk_text_tag_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_text_tag_get_type".} +proc gtk_text_tag_new*(name: cstring): PGtkTextTag{.cdecl, dynlib: gtklib, + importc: "gtk_text_tag_new".} +proc gtk_text_tag_get_priority*(tag: PGtkTextTag): gint{.cdecl, dynlib: gtklib, + importc: "gtk_text_tag_get_priority".} +proc gtk_text_tag_set_priority*(tag: PGtkTextTag, priority: gint){.cdecl, + dynlib: gtklib, importc: "gtk_text_tag_set_priority".} +proc gtk_text_tag_event*(tag: PGtkTextTag, event_object: PGObject, + event: PGdkEvent, iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_tag_event".} +proc gtk_text_attributes_new*(): PGtkTextAttributes{.cdecl, dynlib: gtklib, + importc: "gtk_text_attributes_new".} +proc gtk_text_attributes_copy*(src: PGtkTextAttributes): PGtkTextAttributes{. + cdecl, dynlib: gtklib, importc: "gtk_text_attributes_copy".} +proc gtk_text_attributes_copy_values*(src: PGtkTextAttributes, + dest: PGtkTextAttributes){.cdecl, + dynlib: gtklib, importc: "gtk_text_attributes_copy_values".} +proc gtk_text_attributes_unref*(values: PGtkTextAttributes){.cdecl, + dynlib: gtklib, importc: "gtk_text_attributes_unref".} +proc gtk_text_attributes_ref*(values: PGtkTextAttributes){.cdecl, + dynlib: gtklib, importc: "gtk_text_attributes_ref".} +proc gtk_text_attributes_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_text_attributes_get_type".} +const + bm_TGtkTextTag_bg_color_set* = 0x00000001'i32 + bp_TGtkTextTag_bg_color_set* = 0'i32 + bm_TGtkTextTag_bg_stipple_set* = 0x00000002'i32 + bp_TGtkTextTag_bg_stipple_set* = 1'i32 + bm_TGtkTextTag_fg_color_set* = 0x00000004'i32 + bp_TGtkTextTag_fg_color_set* = 2'i32 + bm_TGtkTextTag_scale_set* = 0x00000008'i32 + bp_TGtkTextTag_scale_set* = 3'i32 + bm_TGtkTextTag_fg_stipple_set* = 0x00000010'i32 + bp_TGtkTextTag_fg_stipple_set* = 4'i32 + bm_TGtkTextTag_justification_set* = 0x00000020'i32 + bp_TGtkTextTag_justification_set* = 5'i32 + bm_TGtkTextTag_left_margin_set* = 0x00000040'i32 + bp_TGtkTextTag_left_margin_set* = 6'i32 + bm_TGtkTextTag_indent_set* = 0x00000080'i32 + bp_TGtkTextTag_indent_set* = 7'i32 + bm_TGtkTextTag_rise_set* = 0x00000100'i32 + bp_TGtkTextTag_rise_set* = 8'i32 + bm_TGtkTextTag_strikethrough_set* = 0x00000200'i32 + bp_TGtkTextTag_strikethrough_set* = 9'i32 + bm_TGtkTextTag_right_margin_set* = 0x00000400'i32 + bp_TGtkTextTag_right_margin_set* = 10'i32 + bm_TGtkTextTag_pixels_above_lines_set* = 0x00000800'i32 + bp_TGtkTextTag_pixels_above_lines_set* = 11'i32 + bm_TGtkTextTag_pixels_below_lines_set* = 0x00001000'i32 + bp_TGtkTextTag_pixels_below_lines_set* = 12'i32 + bm_TGtkTextTag_pixels_inside_wrap_set* = 0x00002000'i32 + bp_TGtkTextTag_pixels_inside_wrap_set* = 13'i32 + bm_TGtkTextTag_tabs_set* = 0x00004000'i32 + bp_TGtkTextTag_tabs_set* = 14'i32 + bm_TGtkTextTag_underline_set* = 0x00008000'i32 + bp_TGtkTextTag_underline_set* = 15'i32 + bm_TGtkTextTag_wrap_mode_set* = 0x00010000'i32 + bp_TGtkTextTag_wrap_mode_set* = 16'i32 + bm_TGtkTextTag_bg_full_height_set* = 0x00020000'i32 + bp_TGtkTextTag_bg_full_height_set* = 17'i32 + bm_TGtkTextTag_invisible_set* = 0x00040000'i32 + bp_TGtkTextTag_invisible_set* = 18'i32 + bm_TGtkTextTag_editable_set* = 0x00080000'i32 + bp_TGtkTextTag_editable_set* = 19'i32 + bm_TGtkTextTag_language_set* = 0x00100000'i32 + bp_TGtkTextTag_language_set* = 20'i32 + bm_TGtkTextTag_pad1* = 0x00200000'i32 + bp_TGtkTextTag_pad1* = 21'i32 + bm_TGtkTextTag_pad2* = 0x00400000'i32 + bp_TGtkTextTag_pad2* = 22'i32 + bm_TGtkTextTag_pad3* = 0x00800000'i32 + bp_TGtkTextTag_pad3* = 23'i32 + +proc bg_color_set*(a: var TGtkTextTag): guint +proc set_bg_color_set*(a: var TGtkTextTag, `bg_color_set`: guint) +proc bg_stipple_set*(a: var TGtkTextTag): guint +proc set_bg_stipple_set*(a: var TGtkTextTag, `bg_stipple_set`: guint) +proc fg_color_set*(a: var TGtkTextTag): guint +proc set_fg_color_set*(a: var TGtkTextTag, `fg_color_set`: guint) +proc scale_set*(a: var TGtkTextTag): guint +proc set_scale_set*(a: var TGtkTextTag, `scale_set`: guint) +proc fg_stipple_set*(a: var TGtkTextTag): guint +proc set_fg_stipple_set*(a: var TGtkTextTag, `fg_stipple_set`: guint) +proc justification_set*(a: var TGtkTextTag): guint +proc set_justification_set*(a: var TGtkTextTag, `justification_set`: guint) +proc left_margin_set*(a: var TGtkTextTag): guint +proc set_left_margin_set*(a: var TGtkTextTag, `left_margin_set`: guint) +proc indent_set*(a: var TGtkTextTag): guint +proc set_indent_set*(a: var TGtkTextTag, `indent_set`: guint) +proc rise_set*(a: var TGtkTextTag): guint +proc set_rise_set*(a: var TGtkTextTag, `rise_set`: guint) +proc strikethrough_set*(a: var TGtkTextTag): guint +proc set_strikethrough_set*(a: var TGtkTextTag, `strikethrough_set`: guint) +proc right_margin_set*(a: var TGtkTextTag): guint +proc set_right_margin_set*(a: var TGtkTextTag, `right_margin_set`: guint) +proc pixels_above_lines_set*(a: var TGtkTextTag): guint +proc set_pixels_above_lines_set*(a: var TGtkTextTag, + `pixels_above_lines_set`: guint) +proc pixels_below_lines_set*(a: var TGtkTextTag): guint +proc set_pixels_below_lines_set*(a: var TGtkTextTag, + `pixels_below_lines_set`: guint) +proc pixels_inside_wrap_set*(a: var TGtkTextTag): guint +proc set_pixels_inside_wrap_set*(a: var TGtkTextTag, + `pixels_inside_wrap_set`: guint) +proc tabs_set*(a: var TGtkTextTag): guint +proc set_tabs_set*(a: var TGtkTextTag, `tabs_set`: guint) +proc underline_set*(a: var TGtkTextTag): guint +proc set_underline_set*(a: var TGtkTextTag, `underline_set`: guint) +proc wrap_mode_set*(a: var TGtkTextTag): guint +proc set_wrap_mode_set*(a: var TGtkTextTag, `wrap_mode_set`: guint) +proc bg_full_height_set*(a: var TGtkTextTag): guint +proc set_bg_full_height_set*(a: var TGtkTextTag, `bg_full_height_set`: guint) +proc invisible_set*(a: var TGtkTextTag): guint +proc set_invisible_set*(a: var TGtkTextTag, `invisible_set`: guint) +proc editable_set*(a: var TGtkTextTag): guint +proc set_editable_set*(a: var TGtkTextTag, `editable_set`: guint) +proc language_set*(a: var TGtkTextTag): guint +proc set_language_set*(a: var TGtkTextTag, `language_set`: guint) +proc pad1*(a: var TGtkTextTag): guint +proc set_pad1*(a: var TGtkTextTag, `pad1`: guint) +proc pad2*(a: var TGtkTextTag): guint +proc set_pad2*(a: var TGtkTextTag, `pad2`: guint) +proc pad3*(a: var TGtkTextTag): guint +proc set_pad3*(a: var TGtkTextTag, `pad3`: guint) +const + bm_TGtkTextAppearance_underline* = 0x0000000F'i16 + bp_TGtkTextAppearance_underline* = 0'i16 + bm_TGtkTextAppearance_strikethrough* = 0x00000010'i16 + bp_TGtkTextAppearance_strikethrough* = 4'i16 + bm_TGtkTextAppearance_draw_bg* = 0x00000020'i16 + bp_TGtkTextAppearance_draw_bg* = 5'i16 + bm_TGtkTextAppearance_inside_selection* = 0x00000040'i16 + bp_TGtkTextAppearance_inside_selection* = 6'i16 + bm_TGtkTextAppearance_is_text* = 0x00000080'i16 + bp_TGtkTextAppearance_is_text* = 7'i16 + bm_TGtkTextAppearance_pad1* = 0x00000100'i16 + bp_TGtkTextAppearance_pad1* = 8'i16 + bm_TGtkTextAppearance_pad2* = 0x00000200'i16 + bp_TGtkTextAppearance_pad2* = 9'i16 + bm_TGtkTextAppearance_pad3* = 0x00000400'i16 + bp_TGtkTextAppearance_pad3* = 10'i16 + bm_TGtkTextAppearance_pad4* = 0x00000800'i16 + bp_TGtkTextAppearance_pad4* = 11'i16 + +proc underline*(a: var TGtkTextAppearance): guint +proc set_underline*(a: var TGtkTextAppearance, `underline`: guint) +proc strikethrough*(a: var TGtkTextAppearance): guint +proc set_strikethrough*(a: var TGtkTextAppearance, `strikethrough`: guint) +proc draw_bg*(a: var TGtkTextAppearance): guint +proc set_draw_bg*(a: var TGtkTextAppearance, `draw_bg`: guint) +proc inside_selection*(a: var TGtkTextAppearance): guint +proc set_inside_selection*(a: var TGtkTextAppearance, `inside_selection`: guint) +proc is_text*(a: var TGtkTextAppearance): guint +proc set_is_text*(a: var TGtkTextAppearance, `is_text`: guint) +proc pad1*(a: var TGtkTextAppearance): guint +proc set_pad1*(a: var TGtkTextAppearance, `pad1`: guint) +proc pad2*(a: var TGtkTextAppearance): guint +proc set_pad2*(a: var TGtkTextAppearance, `pad2`: guint) +proc pad3*(a: var TGtkTextAppearance): guint +proc set_pad3*(a: var TGtkTextAppearance, `pad3`: guint) +proc pad4*(a: var TGtkTextAppearance): guint +proc set_pad4*(a: var TGtkTextAppearance, `pad4`: guint) +const + bm_TGtkTextAttributes_invisible* = 0x00000001'i16 + bp_TGtkTextAttributes_invisible* = 0'i16 + bm_TGtkTextAttributes_bg_full_height* = 0x00000002'i16 + bp_TGtkTextAttributes_bg_full_height* = 1'i16 + bm_TGtkTextAttributes_editable* = 0x00000004'i16 + bp_TGtkTextAttributes_editable* = 2'i16 + bm_TGtkTextAttributes_realized* = 0x00000008'i16 + bp_TGtkTextAttributes_realized* = 3'i16 + bm_TGtkTextAttributes_pad1* = 0x00000010'i16 + bp_TGtkTextAttributes_pad1* = 4'i16 + bm_TGtkTextAttributes_pad2* = 0x00000020'i16 + bp_TGtkTextAttributes_pad2* = 5'i16 + bm_TGtkTextAttributes_pad3* = 0x00000040'i16 + bp_TGtkTextAttributes_pad3* = 6'i16 + bm_TGtkTextAttributes_pad4* = 0x00000080'i16 + bp_TGtkTextAttributes_pad4* = 7'i16 + +proc invisible*(a: var TGtkTextAttributes): guint +proc set_invisible*(a: var TGtkTextAttributes, `invisible`: guint) +proc bg_full_height*(a: var TGtkTextAttributes): guint +proc set_bg_full_height*(a: var TGtkTextAttributes, `bg_full_height`: guint) +proc editable*(a: var TGtkTextAttributes): guint +proc set_editable*(a: var TGtkTextAttributes, `editable`: guint) +proc realized*(a: var TGtkTextAttributes): guint +proc set_realized*(a: var TGtkTextAttributes, `realized`: guint) +proc pad1*(a: var TGtkTextAttributes): guint +proc set_pad1*(a: var TGtkTextAttributes, `pad1`: guint) +proc pad2*(a: var TGtkTextAttributes): guint +proc set_pad2*(a: var TGtkTextAttributes, `pad2`: guint) +proc pad3*(a: var TGtkTextAttributes): guint +proc set_pad3*(a: var TGtkTextAttributes, `pad3`: guint) +proc pad4*(a: var TGtkTextAttributes): guint +proc set_pad4*(a: var TGtkTextAttributes, `pad4`: guint) +proc GTK_TYPE_TEXT_TAG_TABLE*(): GType +proc GTK_TEXT_TAG_TABLE*(obj: pointer): PGtkTextTagTable +proc GTK_TEXT_TAG_TABLE_CLASS*(klass: pointer): PGtkTextTagTableClass +proc GTK_IS_TEXT_TAG_TABLE*(obj: pointer): bool +proc GTK_IS_TEXT_TAG_TABLE_CLASS*(klass: pointer): bool +proc GTK_TEXT_TAG_TABLE_GET_CLASS*(obj: pointer): PGtkTextTagTableClass +proc gtk_text_tag_table_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_text_tag_table_get_type".} +proc gtk_text_tag_table_new*(): PGtkTextTagTable{.cdecl, dynlib: gtklib, + importc: "gtk_text_tag_table_new".} +proc gtk_text_tag_table_add*(table: PGtkTextTagTable, tag: PGtkTextTag){.cdecl, + dynlib: gtklib, importc: "gtk_text_tag_table_add".} +proc gtk_text_tag_table_remove*(table: PGtkTextTagTable, tag: PGtkTextTag){. + cdecl, dynlib: gtklib, importc: "gtk_text_tag_table_remove".} +proc gtk_text_tag_table_lookup*(table: PGtkTextTagTable, name: cstring): PGtkTextTag{. + cdecl, dynlib: gtklib, importc: "gtk_text_tag_table_lookup".} +proc gtk_text_tag_table_foreach*(table: PGtkTextTagTable, + fun: TGtkTextTagTableForeach, data: gpointer){. + cdecl, dynlib: gtklib, importc: "gtk_text_tag_table_foreach".} +proc gtk_text_tag_table_get_size*(table: PGtkTextTagTable): gint{.cdecl, + dynlib: gtklib, importc: "gtk_text_tag_table_get_size".} +proc gtk_text_tag_table_add_buffer*(table: PGtkTextTagTable, buffer: gpointer){. + cdecl, dynlib: gtklib, importc: "_gtk_text_tag_table_add_buffer".} +proc gtk_text_tag_table_remove_buffer*(table: PGtkTextTagTable, + buffer: gpointer){.cdecl, dynlib: gtklib, + importc: "_gtk_text_tag_table_remove_buffer".} +proc GTK_TYPE_TEXT_MARK*(): GType +proc GTK_TEXT_MARK*(anObject: pointer): PGtkTextMark +proc GTK_TEXT_MARK_CLASS*(klass: pointer): PGtkTextMarkClass +proc GTK_IS_TEXT_MARK*(anObject: pointer): bool +proc GTK_IS_TEXT_MARK_CLASS*(klass: pointer): bool +proc GTK_TEXT_MARK_GET_CLASS*(obj: pointer): PGtkTextMarkClass +proc gtk_text_mark_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_text_mark_get_type".} +proc gtk_text_mark_set_visible*(mark: PGtkTextMark, setting: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_text_mark_set_visible".} +proc gtk_text_mark_get_visible*(mark: PGtkTextMark): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_mark_get_visible".} +proc gtk_text_mark_get_name*(mark: PGtkTextMark): cstring{.cdecl, dynlib: gtklib, + importc: "gtk_text_mark_get_name".} +proc gtk_text_mark_get_deleted*(mark: PGtkTextMark): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_mark_get_deleted".} +proc gtk_text_mark_get_buffer*(mark: PGtkTextMark): PGtkTextBuffer{.cdecl, + dynlib: gtklib, importc: "gtk_text_mark_get_buffer".} +proc gtk_text_mark_get_left_gravity*(mark: PGtkTextMark): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_mark_get_left_gravity".} +const + bm_TGtkTextMarkBody_visible* = 0x00000001'i16 + bp_TGtkTextMarkBody_visible* = 0'i16 + bm_TGtkTextMarkBody_not_deleteable* = 0x00000002'i16 + bp_TGtkTextMarkBody_not_deleteable* = 1'i16 + +proc visible*(a: var TGtkTextMarkBody): guint +proc set_visible*(a: var TGtkTextMarkBody, `visible`: guint) +proc not_deleteable*(a: var TGtkTextMarkBody): guint +proc set_not_deleteable*(a: var TGtkTextMarkBody, `not_deleteable`: guint) +proc gtk_mark_segment_new*(tree: PGtkTextBTree, left_gravity: gboolean, + name: cstring): PGtkTextLineSegment{.cdecl, + dynlib: gtklib, importc: "_gtk_mark_segment_new".} +proc GTK_TYPE_TEXT_CHILD_ANCHOR*(): GType +proc GTK_TEXT_CHILD_ANCHOR*(anObject: pointer): PGtkTextChildAnchor +proc GTK_TEXT_CHILD_ANCHOR_CLASS*(klass: pointer): PGtkTextChildAnchorClass +proc GTK_IS_TEXT_CHILD_ANCHOR*(anObject: pointer): bool +proc GTK_IS_TEXT_CHILD_ANCHOR_CLASS*(klass: pointer): bool +proc GTK_TEXT_CHILD_ANCHOR_GET_CLASS*(obj: pointer): PGtkTextChildAnchorClass +proc gtk_text_child_anchor_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_text_child_anchor_get_type".} +proc gtk_text_child_anchor_new*(): PGtkTextChildAnchor{.cdecl, dynlib: gtklib, + importc: "gtk_text_child_anchor_new".} +proc gtk_text_child_anchor_get_widgets*(anchor: PGtkTextChildAnchor): PGList{. + cdecl, dynlib: gtklib, importc: "gtk_text_child_anchor_get_widgets".} +proc gtk_text_child_anchor_get_deleted*(anchor: PGtkTextChildAnchor): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_child_anchor_get_deleted".} +proc gtk_pixbuf_segment_new*(pixbuf: PGdkPixbuf): PGtkTextLineSegment{.cdecl, + dynlib: gtklib, importc: "_gtk_pixbuf_segment_new".} +proc gtk_widget_segment_new*(anchor: PGtkTextChildAnchor): PGtkTextLineSegment{. + cdecl, dynlib: gtklib, importc: "_gtk_widget_segment_new".} +proc gtk_widget_segment_add*(widget_segment: PGtkTextLineSegment, + child: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "_gtk_widget_segment_add".} +proc gtk_widget_segment_remove*(widget_segment: PGtkTextLineSegment, + child: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "_gtk_widget_segment_remove".} +proc gtk_widget_segment_ref*(widget_segment: PGtkTextLineSegment){.cdecl, + dynlib: gtklib, importc: "_gtk_widget_segment_ref".} +proc gtk_widget_segment_unref*(widget_segment: PGtkTextLineSegment){.cdecl, + dynlib: gtklib, importc: "_gtk_widget_segment_unref".} +proc gtk_anchored_child_get_layout*(child: PGtkWidget): PGtkTextLayout{.cdecl, + dynlib: gtklib, importc: "_gtk_anchored_child_get_layout".} +proc gtk_text_line_segment_split*(iter: PGtkTextIter): PGtkTextLineSegment{. + cdecl, dynlib: gtklib, importc: "gtk_text_line_segment_split".} +proc gtk_char_segment_new*(text: cstring, len: guint): PGtkTextLineSegment{. + cdecl, dynlib: gtklib, importc: "_gtk_char_segment_new".} +proc gtk_char_segment_new_from_two_strings*(text1: cstring, len1: guint, + text2: cstring, len2: guint): PGtkTextLineSegment{.cdecl, dynlib: gtklib, + importc: "_gtk_char_segment_new_from_two_strings".} +proc gtk_toggle_segment_new*(info: PGtkTextTagInfo, StateOn: gboolean): PGtkTextLineSegment{. + cdecl, dynlib: gtklib, importc: "_gtk_toggle_segment_new".} +proc gtk_text_btree_new*(table: PGtkTextTagTable, buffer: PGtkTextBuffer): PGtkTextBTree{. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_new".} +proc gtk_text_btree_ref*(tree: PGtkTextBTree){.cdecl, dynlib: gtklib, + importc: "_gtk_text_btree_ref".} +proc gtk_text_btree_unref*(tree: PGtkTextBTree){.cdecl, dynlib: gtklib, + importc: "_gtk_text_btree_unref".} +proc gtk_text_btree_get_buffer*(tree: PGtkTextBTree): PGtkTextBuffer{.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_get_buffer".} +proc gtk_text_btree_get_chars_changed_stamp*(tree: PGtkTextBTree): guint{. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_get_chars_changed_stamp".} +proc gtk_text_btree_get_segments_changed_stamp*(tree: PGtkTextBTree): guint{. + cdecl, dynlib: gtklib, + importc: "_gtk_text_btree_get_segments_changed_stamp".} +proc gtk_text_btree_segments_changed*(tree: PGtkTextBTree){.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_segments_changed".} +proc gtk_text_btree_is_end*(tree: PGtkTextBTree, line: PGtkTextLine, + seg: PGtkTextLineSegment, byte_index: int32, + char_offset: int32): gboolean{.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_is_end".} +proc gtk_text_btree_delete*(start: PGtkTextIter, theEnd: PGtkTextIter){.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_delete".} +proc gtk_text_btree_insert*(iter: PGtkTextIter, text: cstring, len: gint){. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_insert".} +proc gtk_text_btree_insert_pixbuf*(iter: PGtkTextIter, pixbuf: PGdkPixbuf){. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_insert_pixbuf".} +proc gtk_text_btree_insert_child_anchor*(iter: PGtkTextIter, + anchor: PGtkTextChildAnchor){.cdecl, dynlib: gtklib, importc: "_gtk_text_btree_insert_child_anchor".} +proc gtk_text_btree_unregister_child_anchor*(anchor: PGtkTextChildAnchor){. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_unregister_child_anchor".} +proc gtk_text_btree_find_line_by_y*(tree: PGtkTextBTree, view_id: gpointer, + ypixel: gint, line_top_y: Pgint): PGtkTextLine{. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_find_line_by_y".} +proc gtk_text_btree_find_line_top*(tree: PGtkTextBTree, line: PGtkTextLine, + view_id: gpointer): gint{.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_find_line_top".} +proc gtk_text_btree_add_view*(tree: PGtkTextBTree, layout: PGtkTextLayout){. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_add_view".} +proc gtk_text_btree_remove_view*(tree: PGtkTextBTree, view_id: gpointer){. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_remove_view".} +proc gtk_text_btree_invalidate_region*(tree: PGtkTextBTree, + start: PGtkTextIter, theEnd: PGtkTextIter){.cdecl, dynlib: gtklib, + importc: "_gtk_text_btree_invalidate_region".} +proc gtk_text_btree_get_view_size*(tree: PGtkTextBTree, view_id: gpointer, + width: Pgint, height: Pgint){.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_get_view_size".} +proc gtk_text_btree_is_valid*(tree: PGtkTextBTree, view_id: gpointer): gboolean{. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_is_valid".} +proc gtk_text_btree_validate*(tree: PGtkTextBTree, view_id: gpointer, + max_pixels: gint, y: Pgint, old_height: Pgint, + new_height: Pgint): gboolean{.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_validate".} +proc gtk_text_btree_validate_line*(tree: PGtkTextBTree, line: PGtkTextLine, + view_id: gpointer){.cdecl, dynlib: gtklib, + importc: "_gtk_text_btree_validate_line".} +proc gtk_text_btree_tag*(start: PGtkTextIter, theEnd: PGtkTextIter, + tag: PGtkTextTag, apply: gboolean){.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_tag".} +proc gtk_text_btree_get_line*(tree: PGtkTextBTree, line_number: gint, + real_line_number: Pgint): PGtkTextLine{.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_get_line".} +proc gtk_text_btree_get_line_no_last*(tree: PGtkTextBTree, line_number: gint, + real_line_number: Pgint): PGtkTextLine{. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_get_line_no_last".} +proc gtk_text_btree_get_end_iter_line*(tree: PGtkTextBTree): PGtkTextLine{. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_get_end_iter_line".} +proc gtk_text_btree_get_line_at_char*(tree: PGtkTextBTree, char_index: gint, + line_start_index: Pgint, + real_char_index: Pgint): PGtkTextLine{. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_get_line_at_char".} +proc gtk_text_btree_get_tags*(iter: PGtkTextIter, num_tags: Pgint): PPGtkTextTag{. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_get_tags".} +proc gtk_text_btree_get_text*(start: PGtkTextIter, theEnd: PGtkTextIter, + include_hidden: gboolean, + include_nonchars: gboolean): cstring{.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_get_text".} +proc gtk_text_btree_line_count*(tree: PGtkTextBTree): gint{.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_line_count".} +proc gtk_text_btree_char_count*(tree: PGtkTextBTree): gint{.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_char_count".} +proc gtk_text_btree_char_is_invisible*(iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_char_is_invisible".} +proc gtk_text_btree_get_iter_at_char*(tree: PGtkTextBTree, iter: PGtkTextIter, + char_index: gint){.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_get_iter_at_char".} +proc gtk_text_btree_get_iter_at_line_char*(tree: PGtkTextBTree, + iter: PGtkTextIter, line_number: gint, char_index: gint){.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_get_iter_at_line_char".} +proc gtk_text_btree_get_iter_at_line_byte*(tree: PGtkTextBTree, + iter: PGtkTextIter, line_number: gint, byte_index: gint){.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_get_iter_at_line_byte".} +proc gtk_text_btree_get_iter_from_string*(tree: PGtkTextBTree, + iter: PGtkTextIter, `string`: cstring): gboolean{.cdecl, dynlib: gtklib, + importc: "_gtk_text_btree_get_iter_from_string".} +proc gtk_text_btree_get_iter_at_mark_name*(tree: PGtkTextBTree, + iter: PGtkTextIter, mark_name: cstring): gboolean{.cdecl, dynlib: gtklib, + importc: "_gtk_text_btree_get_iter_at_mark_name".} +proc gtk_text_btree_get_iter_at_mark*(tree: PGtkTextBTree, iter: PGtkTextIter, + mark: PGtkTextMark){.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_get_iter_at_mark".} +proc gtk_text_btree_get_end_iter*(tree: PGtkTextBTree, iter: PGtkTextIter){. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_get_end_iter".} +proc gtk_text_btree_get_iter_at_line*(tree: PGtkTextBTree, iter: PGtkTextIter, + line: PGtkTextLine, byte_offset: gint){. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_get_iter_at_line".} +proc gtk_text_btree_get_iter_at_first_toggle*(tree: PGtkTextBTree, + iter: PGtkTextIter, tag: PGtkTextTag): gboolean{.cdecl, dynlib: gtklib, + importc: "_gtk_text_btree_get_iter_at_first_toggle".} +proc gtk_text_btree_get_iter_at_last_toggle*(tree: PGtkTextBTree, + iter: PGtkTextIter, tag: PGtkTextTag): gboolean{.cdecl, dynlib: gtklib, + importc: "_gtk_text_btree_get_iter_at_last_toggle".} +proc gtk_text_btree_get_iter_at_child_anchor*(tree: PGtkTextBTree, + iter: PGtkTextIter, anchor: PGtkTextChildAnchor){.cdecl, dynlib: gtklib, + importc: "_gtk_text_btree_get_iter_at_child_anchor".} +proc gtk_text_btree_set_mark*(tree: PGtkTextBTree, + existing_mark: PGtkTextMark, name: cstring, + left_gravity: gboolean, index: PGtkTextIter, + should_exist: gboolean): PGtkTextMark{.cdecl, + dynlib: gtklib, importc: "_gtk_text_btree_set_mark".} +proc gtk_text_btree_remove_mark_by_name*(tree: PGtkTextBTree, name: cstring){. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_remove_mark_by_name".} +proc gtk_text_btree_remove_mark*(tree: PGtkTextBTree, segment: PGtkTextMark){. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_remove_mark".} +proc gtk_text_btree_get_selection_bounds*(tree: PGtkTextBTree, + start: PGtkTextIter, theEnd: PGtkTextIter): gboolean{.cdecl, dynlib: gtklib, + importc: "_gtk_text_btree_get_selection_bounds".} +proc gtk_text_btree_place_cursor*(tree: PGtkTextBTree, `where`: PGtkTextIter){. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_place_cursor".} +proc gtk_text_btree_mark_is_insert*(tree: PGtkTextBTree, segment: PGtkTextMark): gboolean{. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_mark_is_insert".} +proc gtk_text_btree_mark_is_selection_bound*(tree: PGtkTextBTree, + segment: PGtkTextMark): gboolean{.cdecl, dynlib: gtklib, importc: "_gtk_text_btree_mark_is_selection_bound".} +proc gtk_text_btree_get_mark_by_name*(tree: PGtkTextBTree, name: cstring): PGtkTextMark{. + cdecl, dynlib: gtklib, importc: "_gtk_text_btree_get_mark_by_name".} +proc gtk_text_btree_first_could_contain_tag*(tree: PGtkTextBTree, + tag: PGtkTextTag): PGtkTextLine{.cdecl, dynlib: gtklib, importc: "_gtk_text_btree_first_could_contain_tag".} +proc gtk_text_btree_last_could_contain_tag*(tree: PGtkTextBTree, + tag: PGtkTextTag): PGtkTextLine{.cdecl, dynlib: gtklib, importc: "_gtk_text_btree_last_could_contain_tag".} +const + bm_TGtkTextLineData_width* = 0x00FFFFFF'i32 + bp_TGtkTextLineData_width* = 0'i32 + bm_TGtkTextLineData_valid* = 0xFF000000'i32 + bp_TGtkTextLineData_valid* = 24'i32 + +proc width*(a: PGtkTextLineData): gint +proc set_width*(a: PGtkTextLineData, NewWidth: gint) +proc valid*(a: PGtkTextLineData): gint +proc set_valid*(a: PGtkTextLineData, `valid`: gint) +proc gtk_text_line_get_number*(line: PGtkTextLine): gint{.cdecl, + dynlib: gtklib, importc: "_gtk_text_line_get_number".} +proc gtk_text_line_char_has_tag*(line: PGtkTextLine, tree: PGtkTextBTree, + char_in_line: gint, tag: PGtkTextTag): gboolean{. + cdecl, dynlib: gtklib, importc: "_gtk_text_line_char_has_tag".} +proc gtk_text_line_byte_has_tag*(line: PGtkTextLine, tree: PGtkTextBTree, + byte_in_line: gint, tag: PGtkTextTag): gboolean{. + cdecl, dynlib: gtklib, importc: "_gtk_text_line_byte_has_tag".} +proc gtk_text_line_is_last*(line: PGtkTextLine, tree: PGtkTextBTree): gboolean{. + cdecl, dynlib: gtklib, importc: "_gtk_text_line_is_last".} +proc gtk_text_line_contains_end_iter*(line: PGtkTextLine, tree: PGtkTextBTree): gboolean{. + cdecl, dynlib: gtklib, importc: "_gtk_text_line_contains_end_iter".} +proc gtk_text_line_next*(line: PGtkTextLine): PGtkTextLine{.cdecl, + dynlib: gtklib, importc: "_gtk_text_line_next".} +proc gtk_text_line_next_excluding_last*(line: PGtkTextLine): PGtkTextLine{. + cdecl, dynlib: gtklib, importc: "_gtk_text_line_next_excluding_last".} +proc gtk_text_line_previous*(line: PGtkTextLine): PGtkTextLine{.cdecl, + dynlib: gtklib, importc: "_gtk_text_line_previous".} +proc gtk_text_line_add_data*(line: PGtkTextLine, data: PGtkTextLineData){. + cdecl, dynlib: gtklib, importc: "_gtk_text_line_add_data".} +proc gtk_text_line_remove_data*(line: PGtkTextLine, view_id: gpointer): gpointer{. + cdecl, dynlib: gtklib, importc: "_gtk_text_line_remove_data".} +proc gtk_text_line_get_data*(line: PGtkTextLine, view_id: gpointer): gpointer{. + cdecl, dynlib: gtklib, importc: "_gtk_text_line_get_data".} +proc gtk_text_line_invalidate_wrap*(line: PGtkTextLine, ld: PGtkTextLineData){. + cdecl, dynlib: gtklib, importc: "_gtk_text_line_invalidate_wrap".} +proc gtk_text_line_char_count*(line: PGtkTextLine): gint{.cdecl, + dynlib: gtklib, importc: "_gtk_text_line_char_count".} +proc gtk_text_line_byte_count*(line: PGtkTextLine): gint{.cdecl, + dynlib: gtklib, importc: "_gtk_text_line_byte_count".} +proc gtk_text_line_char_index*(line: PGtkTextLine): gint{.cdecl, + dynlib: gtklib, importc: "_gtk_text_line_char_index".} +proc gtk_text_line_byte_to_segment*(line: PGtkTextLine, byte_offset: gint, + seg_offset: Pgint): PGtkTextLineSegment{. + cdecl, dynlib: gtklib, importc: "_gtk_text_line_byte_to_segment".} +proc gtk_text_line_char_to_segment*(line: PGtkTextLine, char_offset: gint, + seg_offset: Pgint): PGtkTextLineSegment{. + cdecl, dynlib: gtklib, importc: "_gtk_text_line_char_to_segment".} +proc gtk_text_line_byte_to_char_offsets*(line: PGtkTextLine, + byte_offset: gint, line_char_offset: Pgint, seg_char_offset: Pgint){.cdecl, + dynlib: gtklib, importc: "_gtk_text_line_byte_to_char_offsets".} +proc gtk_text_line_char_to_byte_offsets*(line: PGtkTextLine, + char_offset: gint, line_byte_offset: Pgint, seg_byte_offset: Pgint){.cdecl, + dynlib: gtklib, importc: "_gtk_text_line_char_to_byte_offsets".} +proc gtk_text_line_byte_to_any_segment*(line: PGtkTextLine, byte_offset: gint, + seg_offset: Pgint): PGtkTextLineSegment{.cdecl, dynlib: gtklib, + importc: "_gtk_text_line_byte_to_any_segment".} +proc gtk_text_line_char_to_any_segment*(line: PGtkTextLine, char_offset: gint, + seg_offset: Pgint): PGtkTextLineSegment{.cdecl, dynlib: gtklib, + importc: "_gtk_text_line_char_to_any_segment".} +proc gtk_text_line_byte_to_char*(line: PGtkTextLine, byte_offset: gint): gint{. + cdecl, dynlib: gtklib, importc: "_gtk_text_line_byte_to_char".} +proc gtk_text_line_char_to_byte*(line: PGtkTextLine, char_offset: gint): gint{. + cdecl, dynlib: gtklib, importc: "_gtk_text_line_char_to_byte".} +proc gtk_text_line_next_could_contain_tag*(line: PGtkTextLine, + tree: PGtkTextBTree, tag: PGtkTextTag): PGtkTextLine{.cdecl, dynlib: gtklib, + importc: "_gtk_text_line_next_could_contain_tag".} +proc gtk_text_line_previous_could_contain_tag*(line: PGtkTextLine, + tree: PGtkTextBTree, tag: PGtkTextTag): PGtkTextLine{.cdecl, dynlib: gtklib, + importc: "_gtk_text_line_previous_could_contain_tag".} +proc gtk_text_line_data_new*(layout: PGtkTextLayout, line: PGtkTextLine): PGtkTextLineData{. + cdecl, dynlib: gtklib, importc: "_gtk_text_line_data_new".} +proc gtk_text_btree_check*(tree: PGtkTextBTree){.cdecl, dynlib: gtklib, + importc: "_gtk_text_btree_check".} +proc gtk_text_btree_spew*(tree: PGtkTextBTree){.cdecl, dynlib: gtklib, + importc: "_gtk_text_btree_spew".} +proc gtk_toggle_segment_check_func*(segPtr: PGtkTextLineSegment, + line: PGtkTextLine){.cdecl, + dynlib: gtklib, importc: "_gtk_toggle_segment_check_func".} +proc gtk_change_node_toggle_count*(node: PGtkTextBTreeNode, + info: PGtkTextTagInfo, delta: gint){.cdecl, + dynlib: gtklib, importc: "_gtk_change_node_toggle_count".} +proc gtk_text_btree_release_mark_segment*(tree: PGtkTextBTree, + segment: PGtkTextLineSegment){.cdecl, dynlib: gtklib, importc: "_gtk_text_btree_release_mark_segment".} +proc gtk_text_btree_notify_will_remove_tag*(tree: PGtkTextBTree, + tag: PGtkTextTag){.cdecl, dynlib: gtklib, + importc: "_gtk_text_btree_notify_will_remove_tag".} +const + bm_TGtkTextBuffer_modified* = 0x00000001'i16 + bp_TGtkTextBuffer_modified* = 0'i16 + +proc GTK_TYPE_TEXT_BUFFER*(): GType +proc GTK_TEXT_BUFFER*(obj: pointer): PGtkTextBuffer +proc GTK_TEXT_BUFFER_CLASS*(klass: pointer): PGtkTextBufferClass +proc GTK_IS_TEXT_BUFFER*(obj: pointer): bool +proc GTK_IS_TEXT_BUFFER_CLASS*(klass: pointer): bool +proc GTK_TEXT_BUFFER_GET_CLASS*(obj: pointer): PGtkTextBufferClass +proc modified*(a: var TGtkTextBuffer): guint +proc set_modified*(a: var TGtkTextBuffer, `modified`: guint) +proc gtk_text_buffer_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_text_buffer_get_type".} +proc gtk_text_buffer_new*(table: PGtkTextTagTable): PGtkTextBuffer{.cdecl, + dynlib: gtklib, importc: "gtk_text_buffer_new".} +proc gtk_text_buffer_get_line_count*(buffer: PGtkTextBuffer): gint{.cdecl, + dynlib: gtklib, importc: "gtk_text_buffer_get_line_count".} +proc gtk_text_buffer_get_char_count*(buffer: PGtkTextBuffer): gint{.cdecl, + dynlib: gtklib, importc: "gtk_text_buffer_get_char_count".} +proc gtk_text_buffer_get_tag_table*(buffer: PGtkTextBuffer): PGtkTextTagTable{. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_get_tag_table".} +proc gtk_text_buffer_set_text*(buffer: PGtkTextBuffer, text: cstring, len: gint){. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_set_text".} +proc gtk_text_buffer_insert*(buffer: PGtkTextBuffer, iter: PGtkTextIter, + text: cstring, len: gint){.cdecl, dynlib: gtklib, + importc: "gtk_text_buffer_insert".} +proc gtk_text_buffer_insert_at_cursor*(buffer: PGtkTextBuffer, text: cstring, + len: gint){.cdecl, dynlib: gtklib, + importc: "gtk_text_buffer_insert_at_cursor".} +proc gtk_text_buffer_insert_interactive*(buffer: PGtkTextBuffer, + iter: PGtkTextIter, text: cstring, len: gint, default_editable: gboolean): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_insert_interactive".} +proc gtk_text_buffer_insert_interactive_at_cursor*(buffer: PGtkTextBuffer, + text: cstring, len: gint, default_editable: gboolean): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_buffer_insert_interactive_at_cursor".} +proc gtk_text_buffer_insert_range*(buffer: PGtkTextBuffer, iter: PGtkTextIter, + start: PGtkTextIter, theEnd: PGtkTextIter){. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_insert_range".} +proc gtk_text_buffer_insert_range_interactive*(buffer: PGtkTextBuffer, + iter: PGtkTextIter, start: PGtkTextIter, theEnd: PGtkTextIter, + default_editable: gboolean): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_text_buffer_insert_range_interactive".} +proc gtk_text_buffer_delete*(buffer: PGtkTextBuffer, start: PGtkTextIter, + theEnd: PGtkTextIter){.cdecl, dynlib: gtklib, + importc: "gtk_text_buffer_delete".} +proc gtk_text_buffer_delete_interactive*(buffer: PGtkTextBuffer, + start_iter: PGtkTextIter, end_iter: PGtkTextIter, default_editable: gboolean): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_delete_interactive".} +proc gtk_text_buffer_get_text*(buffer: PGtkTextBuffer, start: PGtkTextIter, + theEnd: PGtkTextIter, + include_hidden_chars: gboolean): cstring{.cdecl, + dynlib: gtklib, importc: "gtk_text_buffer_get_text".} +proc gtk_text_buffer_get_slice*(buffer: PGtkTextBuffer, start: PGtkTextIter, + theEnd: PGtkTextIter, + include_hidden_chars: gboolean): cstring{.cdecl, + dynlib: gtklib, importc: "gtk_text_buffer_get_slice".} +proc gtk_text_buffer_insert_pixbuf*(buffer: PGtkTextBuffer, iter: PGtkTextIter, + pixbuf: PGdkPixbuf){.cdecl, dynlib: gtklib, + importc: "gtk_text_buffer_insert_pixbuf".} +proc gtk_text_buffer_insert_child_anchor*(buffer: PGtkTextBuffer, + iter: PGtkTextIter, anchor: PGtkTextChildAnchor){.cdecl, dynlib: gtklib, + importc: "gtk_text_buffer_insert_child_anchor".} +proc gtk_text_buffer_create_child_anchor*(buffer: PGtkTextBuffer, + iter: PGtkTextIter): PGtkTextChildAnchor{.cdecl, dynlib: gtklib, + importc: "gtk_text_buffer_create_child_anchor".} +proc gtk_text_buffer_create_mark*(buffer: PGtkTextBuffer, mark_name: cstring, + `where`: PGtkTextIter, left_gravity: gboolean): PGtkTextMark{. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_create_mark".} +proc gtk_text_buffer_move_mark*(buffer: PGtkTextBuffer, mark: PGtkTextMark, + `where`: PGtkTextIter){.cdecl, dynlib: gtklib, + importc: "gtk_text_buffer_move_mark".} +proc gtk_text_buffer_delete_mark*(buffer: PGtkTextBuffer, mark: PGtkTextMark){. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_delete_mark".} +proc gtk_text_buffer_get_mark*(buffer: PGtkTextBuffer, name: cstring): PGtkTextMark{. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_get_mark".} +proc gtk_text_buffer_move_mark_by_name*(buffer: PGtkTextBuffer, name: cstring, + `where`: PGtkTextIter){.cdecl, + dynlib: gtklib, importc: "gtk_text_buffer_move_mark_by_name".} +proc gtk_text_buffer_delete_mark_by_name*(buffer: PGtkTextBuffer, name: cstring){. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_delete_mark_by_name".} +proc gtk_text_buffer_get_insert*(buffer: PGtkTextBuffer): PGtkTextMark{.cdecl, + dynlib: gtklib, importc: "gtk_text_buffer_get_insert".} +proc gtk_text_buffer_get_selection_bound*(buffer: PGtkTextBuffer): PGtkTextMark{. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_get_selection_bound".} +proc gtk_text_buffer_place_cursor*(buffer: PGtkTextBuffer, `where`: PGtkTextIter){. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_place_cursor".} +proc gtk_text_buffer_apply_tag*(buffer: PGtkTextBuffer, tag: PGtkTextTag, + start: PGtkTextIter, theEnd: PGtkTextIter){. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_apply_tag".} +proc gtk_text_buffer_remove_tag*(buffer: PGtkTextBuffer, tag: PGtkTextTag, + start: PGtkTextIter, theEnd: PGtkTextIter){. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_remove_tag".} +proc gtk_text_buffer_apply_tag_by_name*(buffer: PGtkTextBuffer, name: cstring, + start: PGtkTextIter, + theEnd: PGtkTextIter){.cdecl, + dynlib: gtklib, importc: "gtk_text_buffer_apply_tag_by_name".} +proc gtk_text_buffer_remove_tag_by_name*(buffer: PGtkTextBuffer, name: cstring, + start: PGtkTextIter, theEnd: PGtkTextIter){.cdecl, dynlib: gtklib, + importc: "gtk_text_buffer_remove_tag_by_name".} +proc gtk_text_buffer_remove_all_tags*(buffer: PGtkTextBuffer, + start: PGtkTextIter, theEnd: PGtkTextIter){. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_remove_all_tags".} +proc gtk_text_buffer_get_iter_at_line_offset*(buffer: PGtkTextBuffer, + iter: PGtkTextIter, line_number: gint, char_offset: gint){.cdecl, + dynlib: gtklib, importc: "gtk_text_buffer_get_iter_at_line_offset".} +proc gtk_text_buffer_get_iter_at_line_index*(buffer: PGtkTextBuffer, + iter: PGtkTextIter, line_number: gint, byte_index: gint){.cdecl, + dynlib: gtklib, importc: "gtk_text_buffer_get_iter_at_line_index".} +proc gtk_text_buffer_get_iter_at_offset*(buffer: PGtkTextBuffer, + iter: PGtkTextIter, char_offset: gint){.cdecl, dynlib: gtklib, + importc: "gtk_text_buffer_get_iter_at_offset".} +proc gtk_text_buffer_get_iter_at_line*(buffer: PGtkTextBuffer, + iter: PGtkTextIter, line_number: gint){. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_get_iter_at_line".} +proc gtk_text_buffer_get_start_iter*(buffer: PGtkTextBuffer, iter: PGtkTextIter){. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_get_start_iter".} +proc gtk_text_buffer_get_end_iter*(buffer: PGtkTextBuffer, iter: PGtkTextIter){. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_get_end_iter".} +proc gtk_text_buffer_get_bounds*(buffer: PGtkTextBuffer, start: PGtkTextIter, + theEnd: PGtkTextIter){.cdecl, dynlib: gtklib, + importc: "gtk_text_buffer_get_bounds".} +proc gtk_text_buffer_get_iter_at_mark*(buffer: PGtkTextBuffer, + iter: PGtkTextIter, mark: PGtkTextMark){. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_get_iter_at_mark".} +proc gtk_text_buffer_get_iter_at_child_anchor*(buffer: PGtkTextBuffer, + iter: PGtkTextIter, anchor: PGtkTextChildAnchor){.cdecl, dynlib: gtklib, + importc: "gtk_text_buffer_get_iter_at_child_anchor".} +proc gtk_text_buffer_get_modified*(buffer: PGtkTextBuffer): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_buffer_get_modified".} +proc gtk_text_buffer_set_modified*(buffer: PGtkTextBuffer, setting: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_set_modified".} +proc gtk_text_buffer_add_selection_clipboard*(buffer: PGtkTextBuffer, + clipboard: PGtkClipboard){.cdecl, dynlib: gtklib, importc: "gtk_text_buffer_add_selection_clipboard".} +proc gtk_text_buffer_remove_selection_clipboard*(buffer: PGtkTextBuffer, + clipboard: PGtkClipboard){.cdecl, dynlib: gtklib, importc: "gtk_text_buffer_remove_selection_clipboard".} +proc gtk_text_buffer_cut_clipboard*(buffer: PGtkTextBuffer, + clipboard: PGtkClipboard, + default_editable: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_text_buffer_cut_clipboard".} +proc gtk_text_buffer_copy_clipboard*(buffer: PGtkTextBuffer, + clipboard: PGtkClipboard){.cdecl, + dynlib: gtklib, importc: "gtk_text_buffer_copy_clipboard".} +proc gtk_text_buffer_paste_clipboard*(buffer: PGtkTextBuffer, + clipboard: PGtkClipboard, + override_location: PGtkTextIter, + default_editable: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_text_buffer_paste_clipboard".} +proc gtk_text_buffer_get_selection_bounds*(buffer: PGtkTextBuffer, + start: PGtkTextIter, theEnd: PGtkTextIter): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_text_buffer_get_selection_bounds".} +proc gtk_text_buffer_delete_selection*(buffer: PGtkTextBuffer, + interactive: gboolean, + default_editable: gboolean): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_buffer_delete_selection".} +proc gtk_text_buffer_begin_user_action*(buffer: PGtkTextBuffer){.cdecl, + dynlib: gtklib, importc: "gtk_text_buffer_begin_user_action".} +proc gtk_text_buffer_end_user_action*(buffer: PGtkTextBuffer){.cdecl, + dynlib: gtklib, importc: "gtk_text_buffer_end_user_action".} +proc gtk_text_buffer_spew*(buffer: PGtkTextBuffer){.cdecl, dynlib: gtklib, + importc: "_gtk_text_buffer_spew".} +proc gtk_text_buffer_get_btree*(buffer: PGtkTextBuffer): PGtkTextBTree{.cdecl, + dynlib: gtklib, importc: "_gtk_text_buffer_get_btree".} +proc gtk_text_buffer_get_line_log_attrs*(buffer: PGtkTextBuffer, + anywhere_in_line: PGtkTextIter, char_len: Pgint): PPangoLogAttr{.cdecl, + dynlib: gtklib, importc: "_gtk_text_buffer_get_line_log_attrs".} +proc gtk_text_buffer_notify_will_remove_tag*(buffer: PGtkTextBuffer, + tag: PGtkTextTag){.cdecl, dynlib: gtklib, + importc: "_gtk_text_buffer_notify_will_remove_tag".} +proc GTK_TYPE_TEXT_LAYOUT*(): GType +proc GTK_TEXT_LAYOUT*(obj: pointer): PGtkTextLayout +proc GTK_TEXT_LAYOUT_CLASS*(klass: pointer): PGtkTextLayoutClass +proc GTK_IS_TEXT_LAYOUT*(obj: pointer): bool +proc GTK_IS_TEXT_LAYOUT_CLASS*(klass: pointer): bool +proc GTK_TEXT_LAYOUT_GET_CLASS*(obj: pointer): PGtkTextLayoutClass +const + bm_TGtkTextLayout_cursor_visible* = 0x00000001'i16 + bp_TGtkTextLayout_cursor_visible* = 0'i16 + bm_TGtkTextLayout_cursor_direction* = 0x00000006'i16 + bp_TGtkTextLayout_cursor_direction* = 1'i16 + +proc cursor_visible*(a: var TGtkTextLayout): guint +proc set_cursor_visible*(a: var TGtkTextLayout, `cursor_visible`: guint) +proc cursor_direction*(a: var TGtkTextLayout): gint +proc set_cursor_direction*(a: var TGtkTextLayout, `cursor_direction`: gint) +const + bm_TGtkTextCursorDisplay_is_strong* = 0x00000001'i16 + bp_TGtkTextCursorDisplay_is_strong* = 0'i16 + bm_TGtkTextCursorDisplay_is_weak* = 0x00000002'i16 + bp_TGtkTextCursorDisplay_is_weak* = 1'i16 + +proc is_strong*(a: var TGtkTextCursorDisplay): guint +proc set_is_strong*(a: var TGtkTextCursorDisplay, `is_strong`: guint) +proc is_weak*(a: var TGtkTextCursorDisplay): guint +proc set_is_weak*(a: var TGtkTextCursorDisplay, `is_weak`: guint) +proc gtk_text_layout_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_text_layout_get_type".} +proc gtk_text_layout_new*(): PGtkTextLayout{.cdecl, dynlib: gtklib, + importc: "gtk_text_layout_new".} +proc gtk_text_layout_set_buffer*(layout: PGtkTextLayout, buffer: PGtkTextBuffer){. + cdecl, dynlib: gtklib, importc: "gtk_text_layout_set_buffer".} +proc gtk_text_layout_get_buffer*(layout: PGtkTextLayout): PGtkTextBuffer{.cdecl, + dynlib: gtklib, importc: "gtk_text_layout_get_buffer".} +proc gtk_text_layout_set_default_style*(layout: PGtkTextLayout, + values: PGtkTextAttributes){.cdecl, + dynlib: gtklib, importc: "gtk_text_layout_set_default_style".} +proc gtk_text_layout_set_contexts*(layout: PGtkTextLayout, + ltr_context: PPangoContext, + rtl_context: PPangoContext){.cdecl, + dynlib: gtklib, importc: "gtk_text_layout_set_contexts".} +proc gtk_text_layout_set_cursor_direction*(layout: PGtkTextLayout, + direction: TGtkTextDirection){.cdecl, dynlib: gtklib, importc: "gtk_text_layout_set_cursor_direction".} +proc gtk_text_layout_default_style_changed*(layout: PGtkTextLayout){.cdecl, + dynlib: gtklib, importc: "gtk_text_layout_default_style_changed".} +proc gtk_text_layout_set_screen_width*(layout: PGtkTextLayout, width: gint){. + cdecl, dynlib: gtklib, importc: "gtk_text_layout_set_screen_width".} +proc gtk_text_layout_set_preedit_string*(layout: PGtkTextLayout, + preedit_string: cstring, preedit_attrs: PPangoAttrList, cursor_pos: gint){. + cdecl, dynlib: gtklib, importc: "gtk_text_layout_set_preedit_string".} +proc gtk_text_layout_set_cursor_visible*(layout: PGtkTextLayout, + cursor_visible: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_text_layout_set_cursor_visible".} +proc gtk_text_layout_get_cursor_visible*(layout: PGtkTextLayout): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_layout_get_cursor_visible".} +proc gtk_text_layout_get_size*(layout: PGtkTextLayout, width: Pgint, + height: Pgint){.cdecl, dynlib: gtklib, + importc: "gtk_text_layout_get_size".} +proc gtk_text_layout_get_lines*(layout: PGtkTextLayout, top_y: gint, + bottom_y: gint, first_line_y: Pgint): PGSList{. + cdecl, dynlib: gtklib, importc: "gtk_text_layout_get_lines".} +proc gtk_text_layout_wrap_loop_start*(layout: PGtkTextLayout){.cdecl, + dynlib: gtklib, importc: "gtk_text_layout_wrap_loop_start".} +proc gtk_text_layout_wrap_loop_end*(layout: PGtkTextLayout){.cdecl, + dynlib: gtklib, importc: "gtk_text_layout_wrap_loop_end".} +proc gtk_text_layout_get_line_display*(layout: PGtkTextLayout, + line: PGtkTextLine, size_only: gboolean): PGtkTextLineDisplay{. + cdecl, dynlib: gtklib, importc: "gtk_text_layout_get_line_display".} +proc gtk_text_layout_free_line_display*(layout: PGtkTextLayout, + display: PGtkTextLineDisplay){.cdecl, + dynlib: gtklib, importc: "gtk_text_layout_free_line_display".} +proc gtk_text_layout_get_line_at_y*(layout: PGtkTextLayout, + target_iter: PGtkTextIter, y: gint, + line_top: Pgint){.cdecl, dynlib: gtklib, + importc: "gtk_text_layout_get_line_at_y".} +proc gtk_text_layout_get_iter_at_pixel*(layout: PGtkTextLayout, + iter: PGtkTextIter, x: gint, y: gint){. + cdecl, dynlib: gtklib, importc: "gtk_text_layout_get_iter_at_pixel".} +proc gtk_text_layout_invalidate*(layout: PGtkTextLayout, start: PGtkTextIter, + theEnd: PGtkTextIter){.cdecl, dynlib: gtklib, + importc: "gtk_text_layout_invalidate".} +proc gtk_text_layout_free_line_data*(layout: PGtkTextLayout, line: PGtkTextLine, + line_data: PGtkTextLineData){.cdecl, + dynlib: gtklib, importc: "gtk_text_layout_free_line_data".} +proc gtk_text_layout_is_valid*(layout: PGtkTextLayout): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_layout_is_valid".} +proc gtk_text_layout_validate_yrange*(layout: PGtkTextLayout, + anchor_line: PGtkTextIter, y0: gint, + y1: gint){.cdecl, dynlib: gtklib, + importc: "gtk_text_layout_validate_yrange".} +proc gtk_text_layout_validate*(layout: PGtkTextLayout, max_pixels: gint){.cdecl, + dynlib: gtklib, importc: "gtk_text_layout_validate".} +proc gtk_text_layout_wrap*(layout: PGtkTextLayout, line: PGtkTextLine, + line_data: PGtkTextLineData): PGtkTextLineData{. + cdecl, dynlib: gtklib, importc: "gtk_text_layout_wrap".} +proc gtk_text_layout_changed*(layout: PGtkTextLayout, y: gint, old_height: gint, + new_height: gint){.cdecl, dynlib: gtklib, + importc: "gtk_text_layout_changed".} +proc gtk_text_layout_get_iter_location*(layout: PGtkTextLayout, + iter: PGtkTextIter, rect: PGdkRectangle){. + cdecl, dynlib: gtklib, importc: "gtk_text_layout_get_iter_location".} +proc gtk_text_layout_get_line_yrange*(layout: PGtkTextLayout, + iter: PGtkTextIter, y: Pgint, + height: Pgint){.cdecl, dynlib: gtklib, + importc: "gtk_text_layout_get_line_yrange".} +proc gtk_text_layout_get_line_xrange*(layout: PGtkTextLayout, + iter: PGtkTextIter, x: Pgint, + width: Pgint){.cdecl, dynlib: gtklib, + importc: "_gtk_text_layout_get_line_xrange".} +proc gtk_text_layout_get_cursor_locations*(layout: PGtkTextLayout, + iter: PGtkTextIter, strong_pos: PGdkRectangle, weak_pos: PGdkRectangle){. + cdecl, dynlib: gtklib, importc: "gtk_text_layout_get_cursor_locations".} +proc gtk_text_layout_clamp_iter_to_vrange*(layout: PGtkTextLayout, + iter: PGtkTextIter, top: gint, bottom: gint): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_layout_clamp_iter_to_vrange".} +proc gtk_text_layout_move_iter_to_line_end*(layout: PGtkTextLayout, + iter: PGtkTextIter, direction: gint): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_text_layout_move_iter_to_line_end".} +proc gtk_text_layout_move_iter_to_previous_line*(layout: PGtkTextLayout, + iter: PGtkTextIter): gboolean{.cdecl, dynlib: gtklib, importc: "gtk_text_layout_move_iter_to_previous_line".} +proc gtk_text_layout_move_iter_to_next_line*(layout: PGtkTextLayout, + iter: PGtkTextIter): gboolean{.cdecl, dynlib: gtklib, importc: "gtk_text_layout_move_iter_to_next_line".} +proc gtk_text_layout_move_iter_to_x*(layout: PGtkTextLayout, iter: PGtkTextIter, + x: gint){.cdecl, dynlib: gtklib, + importc: "gtk_text_layout_move_iter_to_x".} +proc gtk_text_layout_move_iter_visually*(layout: PGtkTextLayout, + iter: PGtkTextIter, count: gint): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_text_layout_move_iter_visually".} +proc gtk_text_layout_iter_starts_line*(layout: PGtkTextLayout, + iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_layout_iter_starts_line".} +proc gtk_text_layout_get_iter_at_line*(layout: PGtkTextLayout, + iter: PGtkTextIter, line: PGtkTextLine, + byte_offset: gint){.cdecl, + dynlib: gtklib, importc: "gtk_text_layout_get_iter_at_line".} +proc gtk_text_child_anchor_register_child*(anchor: PGtkTextChildAnchor, + child: PGtkWidget, layout: PGtkTextLayout){.cdecl, dynlib: gtklib, + importc: "gtk_text_child_anchor_register_child".} +proc gtk_text_child_anchor_unregister_child*(anchor: PGtkTextChildAnchor, + child: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_text_child_anchor_unregister_child".} +proc gtk_text_child_anchor_queue_resize*(anchor: PGtkTextChildAnchor, + layout: PGtkTextLayout){.cdecl, dynlib: gtklib, + importc: "gtk_text_child_anchor_queue_resize".} +proc gtk_text_anchored_child_set_layout*(child: PGtkWidget, + layout: PGtkTextLayout){.cdecl, dynlib: gtklib, + importc: "gtk_text_anchored_child_set_layout".} +proc gtk_text_layout_spew*(layout: PGtkTextLayout){.cdecl, dynlib: gtklib, + importc: "gtk_text_layout_spew".} +const # GTK_TEXT_VIEW_PRIORITY_VALIDATE* = GDK_PRIORITY_REDRAW + 5 + bm_TGtkTextView_editable* = 0x00000001'i16 + bp_TGtkTextView_editable* = 0'i16 + bm_TGtkTextView_overwrite_mode* = 0x00000002'i16 + bp_TGtkTextView_overwrite_mode* = 1'i16 + bm_TGtkTextView_cursor_visible* = 0x00000004'i16 + bp_TGtkTextView_cursor_visible* = 2'i16 + bm_TGtkTextView_need_im_reset* = 0x00000008'i16 + bp_TGtkTextView_need_im_reset* = 3'i16 + bm_TGtkTextView_just_selected_element* = 0x00000010'i16 + bp_TGtkTextView_just_selected_element* = 4'i16 + bm_TGtkTextView_disable_scroll_on_focus* = 0x00000020'i16 + bp_TGtkTextView_disable_scroll_on_focus* = 5'i16 + bm_TGtkTextView_onscreen_validated* = 0x00000040'i16 + bp_TGtkTextView_onscreen_validated* = 6'i16 + bm_TGtkTextView_mouse_cursor_obscured* = 0x00000080'i16 + bp_TGtkTextView_mouse_cursor_obscured* = 7'i16 + +proc GTK_TYPE_TEXT_VIEW*(): GType +proc GTK_TEXT_VIEW*(obj: pointer): PGtkTextView +proc GTK_TEXT_VIEW_CLASS*(klass: pointer): PGtkTextViewClass +proc GTK_IS_TEXT_VIEW*(obj: pointer): bool +proc GTK_IS_TEXT_VIEW_CLASS*(klass: pointer): bool +proc GTK_TEXT_VIEW_GET_CLASS*(obj: pointer): PGtkTextViewClass +proc editable*(a: var TGtkTextView): guint +proc set_editable*(a: var TGtkTextView, `editable`: guint) +proc overwrite_mode*(a: var TGtkTextView): guint +proc set_overwrite_mode*(a: var TGtkTextView, `overwrite_mode`: guint) +proc cursor_visible*(a: var TGtkTextView): guint +proc set_cursor_visible*(a: var TGtkTextView, `cursor_visible`: guint) +proc need_im_reset*(a: var TGtkTextView): guint +proc set_need_im_reset*(a: var TGtkTextView, `need_im_reset`: guint) +proc just_selected_element*(a: var TGtkTextView): guint +proc set_just_selected_element*(a: var TGtkTextView, + `just_selected_element`: guint) +proc disable_scroll_on_focus*(a: var TGtkTextView): guint +proc set_disable_scroll_on_focus*(a: var TGtkTextView, + `disable_scroll_on_focus`: guint) +proc onscreen_validated*(a: var TGtkTextView): guint +proc set_onscreen_validated*(a: var TGtkTextView, `onscreen_validated`: guint) +proc mouse_cursor_obscured*(a: var TGtkTextView): guint +proc set_mouse_cursor_obscured*(a: var TGtkTextView, + `mouse_cursor_obscured`: guint) +proc gtk_text_view_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_text_view_get_type".} +proc gtk_text_view_new*(): PGtkTextView{.cdecl, dynlib: gtklib, + importc: "gtk_text_view_new".} +proc gtk_text_view_new_with_buffer*(buffer: PGtkTextBuffer): PGtkTextView{.cdecl, + dynlib: gtklib, importc: "gtk_text_view_new_with_buffer".} +proc gtk_text_view_set_buffer*(text_view: PGtkTextView, buffer: PGtkTextBuffer){. + cdecl, dynlib: gtklib, importc: "gtk_text_view_set_buffer".} +proc gtk_text_view_get_buffer*(text_view: PGtkTextView): PGtkTextBuffer{.cdecl, + dynlib: gtklib, importc: "gtk_text_view_get_buffer".} +proc gtk_text_view_scroll_to_iter*(text_view: PGtkTextView, iter: PGtkTextIter, + within_margin: gdouble, use_align: gboolean, + xalign: gdouble, yalign: gdouble): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_view_scroll_to_iter".} +proc gtk_text_view_scroll_to_mark*(text_view: PGtkTextView, mark: PGtkTextMark, + within_margin: gdouble, use_align: gboolean, + xalign: gdouble, yalign: gdouble){.cdecl, + dynlib: gtklib, importc: "gtk_text_view_scroll_to_mark".} +proc gtk_text_view_scroll_mark_onscreen*(text_view: PGtkTextView, + mark: PGtkTextMark){.cdecl, dynlib: gtklib, + importc: "gtk_text_view_scroll_mark_onscreen".} +proc gtk_text_view_move_mark_onscreen*(text_view: PGtkTextView, + mark: PGtkTextMark): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_view_move_mark_onscreen".} +proc gtk_text_view_place_cursor_onscreen*(text_view: PGtkTextView): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_view_place_cursor_onscreen".} +proc gtk_text_view_get_visible_rect*(text_view: PGtkTextView, + visible_rect: PGdkRectangle){.cdecl, + dynlib: gtklib, importc: "gtk_text_view_get_visible_rect".} +proc gtk_text_view_set_cursor_visible*(text_view: PGtkTextView, + setting: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_text_view_set_cursor_visible".} +proc gtk_text_view_get_cursor_visible*(text_view: PGtkTextView): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_text_view_get_cursor_visible".} +proc gtk_text_view_get_iter_location*(text_view: PGtkTextView, + iter: PGtkTextIter, + location: PGdkRectangle){.cdecl, + dynlib: gtklib, importc: "gtk_text_view_get_iter_location".} +proc gtk_text_view_get_iter_at_location*(text_view: PGtkTextView, + iter: PGtkTextIter, x: gint, y: gint){.cdecl, dynlib: gtklib, + importc: "gtk_text_view_get_iter_at_location".} +proc gtk_text_view_get_line_yrange*(text_view: PGtkTextView, iter: PGtkTextIter, + y: Pgint, height: Pgint){.cdecl, + dynlib: gtklib, importc: "gtk_text_view_get_line_yrange".} +proc gtk_text_view_get_line_at_y*(text_view: PGtkTextView, + target_iter: PGtkTextIter, y: gint, + line_top: Pgint){.cdecl, dynlib: gtklib, + importc: "gtk_text_view_get_line_at_y".} +proc gtk_text_view_buffer_to_window_coords*(text_view: PGtkTextView, + win: TGtkTextWindowType, buffer_x: gint, buffer_y: gint, window_x: Pgint, + window_y: Pgint){.cdecl, dynlib: gtklib, + importc: "gtk_text_view_buffer_to_window_coords".} +proc gtk_text_view_window_to_buffer_coords*(text_view: PGtkTextView, + win: TGtkTextWindowType, window_x: gint, window_y: gint, buffer_x: Pgint, + buffer_y: Pgint){.cdecl, dynlib: gtklib, + importc: "gtk_text_view_window_to_buffer_coords".} +proc gtk_text_view_get_window*(text_view: PGtkTextView, win: TGtkTextWindowType): PGdkWindow{. + cdecl, dynlib: gtklib, importc: "gtk_text_view_get_window".} +proc gtk_text_view_get_window_type*(text_view: PGtkTextView, window: PGdkWindow): TGtkTextWindowType{. + cdecl, dynlib: gtklib, importc: "gtk_text_view_get_window_type".} +proc gtk_text_view_set_border_window_size*(text_view: PGtkTextView, + thetype: TGtkTextWindowType, size: gint){.cdecl, dynlib: gtklib, + importc: "gtk_text_view_set_border_window_size".} +proc gtk_text_view_get_border_window_size*(text_view: PGtkTextView, + thetype: TGtkTextWindowType): gint{.cdecl, dynlib: gtklib, importc: "gtk_text_view_get_border_window_size".} +proc gtk_text_view_forward_display_line*(text_view: PGtkTextView, + iter: PGtkTextIter): gboolean{.cdecl, dynlib: gtklib, importc: "gtk_text_view_forward_display_line".} +proc gtk_text_view_backward_display_line*(text_view: PGtkTextView, + iter: PGtkTextIter): gboolean{.cdecl, dynlib: gtklib, importc: "gtk_text_view_backward_display_line".} +proc gtk_text_view_forward_display_line_end*(text_view: PGtkTextView, + iter: PGtkTextIter): gboolean{.cdecl, dynlib: gtklib, importc: "gtk_text_view_forward_display_line_end".} +proc gtk_text_view_backward_display_line_start*(text_view: PGtkTextView, + iter: PGtkTextIter): gboolean{.cdecl, dynlib: gtklib, importc: "gtk_text_view_backward_display_line_start".} +proc gtk_text_view_starts_display_line*(text_view: PGtkTextView, + iter: PGtkTextIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_view_starts_display_line".} +proc gtk_text_view_move_visually*(text_view: PGtkTextView, iter: PGtkTextIter, + count: gint): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_text_view_move_visually".} +proc gtk_text_view_add_child_at_anchor*(text_view: PGtkTextView, + child: PGtkWidget, + anchor: PGtkTextChildAnchor){.cdecl, + dynlib: gtklib, importc: "gtk_text_view_add_child_at_anchor".} +proc gtk_text_view_add_child_in_window*(text_view: PGtkTextView, + child: PGtkWidget, + which_window: TGtkTextWindowType, + xpos: gint, ypos: gint){.cdecl, + dynlib: gtklib, importc: "gtk_text_view_add_child_in_window".} +proc gtk_text_view_move_child*(text_view: PGtkTextView, child: PGtkWidget, + xpos: gint, ypos: gint){.cdecl, dynlib: gtklib, + importc: "gtk_text_view_move_child".} +proc gtk_text_view_set_wrap_mode*(text_view: PGtkTextView, + wrap_mode: TGtkWrapMode){.cdecl, + dynlib: gtklib, importc: "gtk_text_view_set_wrap_mode".} +proc gtk_text_view_get_wrap_mode*(text_view: PGtkTextView): TGtkWrapMode{.cdecl, + dynlib: gtklib, importc: "gtk_text_view_get_wrap_mode".} +proc gtk_text_view_set_editable*(text_view: PGtkTextView, setting: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_text_view_set_editable".} +proc gtk_text_view_get_editable*(text_view: PGtkTextView): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_text_view_get_editable".} +proc gtk_text_view_set_pixels_above_lines*(text_view: PGtkTextView, + pixels_above_lines: gint){.cdecl, dynlib: gtklib, + importc: "gtk_text_view_set_pixels_above_lines".} +proc gtk_text_view_get_pixels_above_lines*(text_view: PGtkTextView): gint{. + cdecl, dynlib: gtklib, importc: "gtk_text_view_get_pixels_above_lines".} +proc gtk_text_view_set_pixels_below_lines*(text_view: PGtkTextView, + pixels_below_lines: gint){.cdecl, dynlib: gtklib, + importc: "gtk_text_view_set_pixels_below_lines".} +proc gtk_text_view_get_pixels_below_lines*(text_view: PGtkTextView): gint{. + cdecl, dynlib: gtklib, importc: "gtk_text_view_get_pixels_below_lines".} +proc gtk_text_view_set_pixels_inside_wrap*(text_view: PGtkTextView, + pixels_inside_wrap: gint){.cdecl, dynlib: gtklib, + importc: "gtk_text_view_set_pixels_inside_wrap".} +proc gtk_text_view_get_pixels_inside_wrap*(text_view: PGtkTextView): gint{. + cdecl, dynlib: gtklib, importc: "gtk_text_view_get_pixels_inside_wrap".} +proc gtk_text_view_set_justification*(text_view: PGtkTextView, + justification: TGtkJustification){.cdecl, + dynlib: gtklib, importc: "gtk_text_view_set_justification".} +proc gtk_text_view_get_justification*(text_view: PGtkTextView): TGtkJustification{. + cdecl, dynlib: gtklib, importc: "gtk_text_view_get_justification".} +proc gtk_text_view_set_left_margin*(text_view: PGtkTextView, left_margin: gint){. + cdecl, dynlib: gtklib, importc: "gtk_text_view_set_left_margin".} +proc gtk_text_view_get_left_margin*(text_view: PGtkTextView): gint{.cdecl, + dynlib: gtklib, importc: "gtk_text_view_get_left_margin".} +proc gtk_text_view_set_right_margin*(text_view: PGtkTextView, right_margin: gint){. + cdecl, dynlib: gtklib, importc: "gtk_text_view_set_right_margin".} +proc gtk_text_view_get_right_margin*(text_view: PGtkTextView): gint{.cdecl, + dynlib: gtklib, importc: "gtk_text_view_get_right_margin".} +proc gtk_text_view_set_indent*(text_view: PGtkTextView, indent: gint){.cdecl, + dynlib: gtklib, importc: "gtk_text_view_set_indent".} +proc gtk_text_view_get_indent*(text_view: PGtkTextView): gint{.cdecl, + dynlib: gtklib, importc: "gtk_text_view_get_indent".} +proc gtk_text_view_set_tabs*(text_view: PGtkTextView, tabs: PPangoTabArray){. + cdecl, dynlib: gtklib, importc: "gtk_text_view_set_tabs".} +proc gtk_text_view_get_tabs*(text_view: PGtkTextView): PPangoTabArray{.cdecl, + dynlib: gtklib, importc: "gtk_text_view_get_tabs".} +proc gtk_text_view_get_default_attributes*(text_view: PGtkTextView): PGtkTextAttributes{. + cdecl, dynlib: gtklib, importc: "gtk_text_view_get_default_attributes".} +const + bm_TGtkTipsQuery_emit_always* = 0x00000001'i16 + bp_TGtkTipsQuery_emit_always* = 0'i16 + bm_TGtkTipsQuery_in_query* = 0x00000002'i16 + bp_TGtkTipsQuery_in_query* = 1'i16 + +proc GTK_TYPE_TIPS_QUERY*(): GType +proc GTK_TIPS_QUERY*(obj: pointer): PGtkTipsQuery +proc GTK_TIPS_QUERY_CLASS*(klass: pointer): PGtkTipsQueryClass +proc GTK_IS_TIPS_QUERY*(obj: pointer): bool +proc GTK_IS_TIPS_QUERY_CLASS*(klass: pointer): bool +proc GTK_TIPS_QUERY_GET_CLASS*(obj: pointer): PGtkTipsQueryClass +proc emit_always*(a: var TGtkTipsQuery): guint +proc set_emit_always*(a: var TGtkTipsQuery, `emit_always`: guint) +proc in_query*(a: var TGtkTipsQuery): guint +proc set_in_query*(a: var TGtkTipsQuery, `in_query`: guint) +proc gtk_tips_query_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_tips_query_get_type".} +proc gtk_tips_query_new*(): PGtkTipsQuery{.cdecl, dynlib: gtklib, + importc: "gtk_tips_query_new".} +proc gtk_tips_query_start_query*(tips_query: PGtkTipsQuery){.cdecl, + dynlib: gtklib, importc: "gtk_tips_query_start_query".} +proc gtk_tips_query_stop_query*(tips_query: PGtkTipsQuery){.cdecl, + dynlib: gtklib, importc: "gtk_tips_query_stop_query".} +proc gtk_tips_query_set_caller*(tips_query: PGtkTipsQuery, caller: PGtkWidget){. + cdecl, dynlib: gtklib, importc: "gtk_tips_query_set_caller".} +proc gtk_tips_query_set_labels*(tips_query: PGtkTipsQuery, + label_inactive: cstring, label_no_tip: cstring){. + cdecl, dynlib: gtklib, importc: "gtk_tips_query_set_labels".} +const + bm_TGtkTooltips_delay* = 0x3FFFFFFF'i32 + bp_TGtkTooltips_delay* = 0'i32 + bm_TGtkTooltips_enabled* = 0x40000000'i32 + bp_TGtkTooltips_enabled* = 30'i32 + bm_TGtkTooltips_have_grab* = 0x80000000'i32 + bp_TGtkTooltips_have_grab* = 31'i32 + bm_TGtkTooltips_use_sticky_delay* = 0x00000001'i32 + bp_TGtkTooltips_use_sticky_delay* = 0'i32 + +proc GTK_TYPE_TOOLTIPS*(): GType +proc GTK_TOOLTIPS*(obj: pointer): PGtkTooltips +proc GTK_TOOLTIPS_CLASS*(klass: pointer): PGtkTooltipsClass +proc GTK_IS_TOOLTIPS*(obj: pointer): bool +proc GTK_IS_TOOLTIPS_CLASS*(klass: pointer): bool +proc GTK_TOOLTIPS_GET_CLASS*(obj: pointer): PGtkTooltipsClass +proc delay*(a: var TGtkTooltips): guint +proc set_delay*(a: var TGtkTooltips, `delay`: guint) +proc enabled*(a: var TGtkTooltips): guint +proc set_enabled*(a: var TGtkTooltips, `enabled`: guint) +proc have_grab*(a: var TGtkTooltips): guint +proc set_have_grab*(a: var TGtkTooltips, `have_grab`: guint) +proc use_sticky_delay*(a: var TGtkTooltips): guint +proc set_use_sticky_delay*(a: var TGtkTooltips, `use_sticky_delay`: guint) +proc gtk_tooltips_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_tooltips_get_type".} +proc gtk_tooltips_new*(): PGtkTooltips{.cdecl, dynlib: gtklib, + importc: "gtk_tooltips_new".} +proc gtk_tooltips_enable*(tooltips: PGtkTooltips){.cdecl, dynlib: gtklib, + importc: "gtk_tooltips_enable".} +proc gtk_tooltips_disable*(tooltips: PGtkTooltips){.cdecl, dynlib: gtklib, + importc: "gtk_tooltips_disable".} +proc gtk_tooltips_set_tip*(tooltips: PGtkTooltips, widget: PGtkWidget, + tip_text: cstring, tip_private: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_tooltips_set_tip".} +proc gtk_tooltips_data_get*(widget: PGtkWidget): PGtkTooltipsData{.cdecl, + dynlib: gtklib, importc: "gtk_tooltips_data_get".} +proc gtk_tooltips_force_window*(tooltips: PGtkTooltips){.cdecl, dynlib: gtklib, + importc: "gtk_tooltips_force_window".} +proc gtk_tooltips_toggle_keyboard_mode*(widget: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "_gtk_tooltips_toggle_keyboard_mode".} +const + bm_TGtkToolbar_style_set* = 0x00000001'i16 + bp_TGtkToolbar_style_set* = 0'i16 + bm_TGtkToolbar_icon_size_set* = 0x00000002'i16 + bp_TGtkToolbar_icon_size_set* = 1'i16 + +proc GTK_TYPE_TOOLBAR*(): GType +proc GTK_TOOLBAR*(obj: pointer): PGtkToolbar +proc GTK_TOOLBAR_CLASS*(klass: pointer): PGtkToolbarClass +proc GTK_IS_TOOLBAR*(obj: pointer): bool +proc GTK_IS_TOOLBAR_CLASS*(klass: pointer): bool +proc GTK_TOOLBAR_GET_CLASS*(obj: pointer): PGtkToolbarClass +proc style_set*(a: var TGtkToolbar): guint +proc set_style_set*(a: var TGtkToolbar, `style_set`: guint) +proc icon_size_set*(a: var TGtkToolbar): guint +proc set_icon_size_set*(a: var TGtkToolbar, `icon_size_set`: guint) +proc gtk_toolbar_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_toolbar_get_type".} +proc gtk_toolbar_new*(): PGtkToolbar{.cdecl, dynlib: gtklib, + importc: "gtk_toolbar_new".} +proc gtk_toolbar_append_item*(toolbar: PGtkToolbar, text: cstring, + tooltip_text: cstring, + tooltip_private_text: cstring, icon: PGtkWidget, + callback: TGtkSignalFunc, user_data: gpointer): PGtkWidget{. + cdecl, dynlib: gtklib, importc: "gtk_toolbar_append_item".} +proc gtk_toolbar_prepend_item*(toolbar: PGtkToolbar, text: cstring, + tooltip_text: cstring, + tooltip_private_text: cstring, icon: PGtkWidget, + callback: TGtkSignalFunc, user_data: gpointer): PGtkWidget{. + cdecl, dynlib: gtklib, importc: "gtk_toolbar_prepend_item".} +proc gtk_toolbar_insert_item*(toolbar: PGtkToolbar, text: cstring, + tooltip_text: cstring, + tooltip_private_text: cstring, icon: PGtkWidget, + callback: TGtkSignalFunc, user_data: gpointer, + position: gint): PGtkWidget{.cdecl, + dynlib: gtklib, importc: "gtk_toolbar_insert_item".} +proc gtk_toolbar_insert_stock*(toolbar: PGtkToolbar, stock_id: cstring, + tooltip_text: cstring, + tooltip_private_text: cstring, + callback: TGtkSignalFunc, user_data: gpointer, + position: gint): PGtkWidget{.cdecl, + dynlib: gtklib, importc: "gtk_toolbar_insert_stock".} +proc gtk_toolbar_append_space*(toolbar: PGtkToolbar){.cdecl, dynlib: gtklib, + importc: "gtk_toolbar_append_space".} +proc gtk_toolbar_prepend_space*(toolbar: PGtkToolbar){.cdecl, dynlib: gtklib, + importc: "gtk_toolbar_prepend_space".} +proc gtk_toolbar_insert_space*(toolbar: PGtkToolbar, position: gint){.cdecl, + dynlib: gtklib, importc: "gtk_toolbar_insert_space".} +proc gtk_toolbar_remove_space*(toolbar: PGtkToolbar, position: gint){.cdecl, + dynlib: gtklib, importc: "gtk_toolbar_remove_space".} +proc gtk_toolbar_append_element*(toolbar: PGtkToolbar, + thetype: TGtkToolbarChildType, + widget: PGtkWidget, text: cstring, + tooltip_text: cstring, + tooltip_private_text: cstring, + icon: PGtkWidget, callback: TGtkSignalFunc, + user_data: gpointer): PGtkWidget{.cdecl, + dynlib: gtklib, importc: "gtk_toolbar_append_element".} +proc gtk_toolbar_prepend_element*(toolbar: PGtkToolbar, + thetype: TGtkToolbarChildType, + widget: PGtkWidget, text: cstring, + tooltip_text: cstring, + tooltip_private_text: cstring, + icon: PGtkWidget, callback: TGtkSignalFunc, + user_data: gpointer): PGtkWidget{.cdecl, + dynlib: gtklib, importc: "gtk_toolbar_prepend_element".} +proc gtk_toolbar_insert_element*(toolbar: PGtkToolbar, + thetype: TGtkToolbarChildType, + widget: PGtkWidget, text: cstring, + tooltip_text: cstring, + tooltip_private_text: cstring, + icon: PGtkWidget, callback: TGtkSignalFunc, + user_data: gpointer, position: gint): PGtkWidget{. + cdecl, dynlib: gtklib, importc: "gtk_toolbar_insert_element".} +proc gtk_toolbar_append_widget*(toolbar: PGtkToolbar, widget: PGtkWidget, + tooltip_text: cstring, + tooltip_private_text: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_toolbar_append_widget".} +proc gtk_toolbar_prepend_widget*(toolbar: PGtkToolbar, widget: PGtkWidget, + tooltip_text: cstring, + tooltip_private_text: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_toolbar_prepend_widget".} +proc gtk_toolbar_insert_widget*(toolbar: PGtkToolbar, widget: PGtkWidget, + tooltip_text: cstring, + tooltip_private_text: cstring, position: gint){. + cdecl, dynlib: gtklib, importc: "gtk_toolbar_insert_widget".} +proc gtk_toolbar_set_orientation*(toolbar: PGtkToolbar, + orientation: TGtkOrientation){.cdecl, + dynlib: gtklib, importc: "gtk_toolbar_set_orientation".} +proc gtk_toolbar_set_style*(toolbar: PGtkToolbar, style: TGtkToolbarStyle){. + cdecl, dynlib: gtklib, importc: "gtk_toolbar_set_style".} +proc gtk_toolbar_set_icon_size*(toolbar: PGtkToolbar, icon_size: TGtkIconSize){. + cdecl, dynlib: gtklib, importc: "gtk_toolbar_set_icon_size".} +proc gtk_toolbar_set_tooltips*(toolbar: PGtkToolbar, enable: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_toolbar_set_tooltips".} +proc gtk_toolbar_unset_style*(toolbar: PGtkToolbar){.cdecl, dynlib: gtklib, + importc: "gtk_toolbar_unset_style".} +proc gtk_toolbar_unset_icon_size*(toolbar: PGtkToolbar){.cdecl, dynlib: gtklib, + importc: "gtk_toolbar_unset_icon_size".} +proc gtk_toolbar_get_orientation*(toolbar: PGtkToolbar): TGtkOrientation{.cdecl, + dynlib: gtklib, importc: "gtk_toolbar_get_orientation".} +proc gtk_toolbar_get_style*(toolbar: PGtkToolbar): TGtkToolbarStyle{.cdecl, + dynlib: gtklib, importc: "gtk_toolbar_get_style".} +proc gtk_toolbar_get_icon_size*(toolbar: PGtkToolbar): TGtkIconSize{.cdecl, + dynlib: gtklib, importc: "gtk_toolbar_get_icon_size".} +proc gtk_toolbar_get_tooltips*(toolbar: PGtkToolbar): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_toolbar_get_tooltips".} +const + bm_TGtkTree_selection_mode* = 0x00000003'i16 + bp_TGtkTree_selection_mode* = 0'i16 + bm_TGtkTree_view_mode* = 0x00000004'i16 + bp_TGtkTree_view_mode* = 2'i16 + bm_TGtkTree_view_line* = 0x00000008'i16 + bp_TGtkTree_view_line* = 3'i16 + +proc GTK_TYPE_TREE*(): GType +proc GTK_TREE*(obj: pointer): PGtkTree +proc GTK_TREE_CLASS*(klass: pointer): PGtkTreeClass +proc GTK_IS_TREE*(obj: pointer): bool +proc GTK_IS_TREE_CLASS*(klass: pointer): bool +proc GTK_TREE_GET_CLASS*(obj: pointer): PGtkTreeClass +proc GTK_IS_ROOT_TREE*(obj: pointer): bool +proc GTK_TREE_ROOT_TREE*(obj: pointer): PGtkTree +proc GTK_TREE_SELECTION_OLD*(obj: pointer): PGList +proc selection_mode*(a: var TGtkTree): guint +proc set_selection_mode*(a: var TGtkTree, `selection_mode`: guint) +proc view_mode*(a: var TGtkTree): guint +proc set_view_mode*(a: var TGtkTree, `view_mode`: guint) +proc view_line*(a: var TGtkTree): guint +proc set_view_line*(a: var TGtkTree, `view_line`: guint) +proc gtk_tree_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_tree_get_type".} +proc gtk_tree_new*(): PGtkTree{.cdecl, dynlib: gtklib, importc: "gtk_tree_new".} +proc gtk_tree_append*(tree: PGtkTree, tree_item: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_tree_append".} +proc gtk_tree_prepend*(tree: PGtkTree, tree_item: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_tree_prepend".} +proc gtk_tree_insert*(tree: PGtkTree, tree_item: PGtkWidget, position: gint){. + cdecl, dynlib: gtklib, importc: "gtk_tree_insert".} +proc gtk_tree_remove_items*(tree: PGtkTree, items: PGList){.cdecl, + dynlib: gtklib, importc: "gtk_tree_remove_items".} +proc gtk_tree_clear_items*(tree: PGtkTree, start: gint, theEnd: gint){.cdecl, + dynlib: gtklib, importc: "gtk_tree_clear_items".} +proc gtk_tree_select_item*(tree: PGtkTree, item: gint){.cdecl, dynlib: gtklib, + importc: "gtk_tree_select_item".} +proc gtk_tree_unselect_item*(tree: PGtkTree, item: gint){.cdecl, dynlib: gtklib, + importc: "gtk_tree_unselect_item".} +proc gtk_tree_select_child*(tree: PGtkTree, tree_item: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_tree_select_child".} +proc gtk_tree_unselect_child*(tree: PGtkTree, tree_item: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_tree_unselect_child".} +proc gtk_tree_child_position*(tree: PGtkTree, child: PGtkWidget): gint{.cdecl, + dynlib: gtklib, importc: "gtk_tree_child_position".} +proc gtk_tree_set_selection_mode*(tree: PGtkTree, mode: TGtkSelectionMode){. + cdecl, dynlib: gtklib, importc: "gtk_tree_set_selection_mode".} +proc gtk_tree_set_view_mode*(tree: PGtkTree, mode: TGtkTreeViewMode){.cdecl, + dynlib: gtklib, importc: "gtk_tree_set_view_mode".} +proc gtk_tree_set_view_lines*(tree: PGtkTree, flag: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_tree_set_view_lines".} +proc gtk_tree_remove_item*(tree: PGtkTree, child: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_tree_remove_item".} +proc GTK_TYPE_TREE_DRAG_SOURCE*(): GType +proc GTK_TREE_DRAG_SOURCE*(obj: pointer): PGtkTreeDragSource +proc GTK_IS_TREE_DRAG_SOURCE*(obj: pointer): bool +proc GTK_TREE_DRAG_SOURCE_GET_IFACE*(obj: pointer): PGtkTreeDragSourceIface +proc gtk_tree_drag_source_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_tree_drag_source_get_type".} +proc gtk_tree_drag_source_row_draggable*(drag_source: PGtkTreeDragSource, + path: PGtkTreePath): gboolean{.cdecl, dynlib: gtklib, importc: "gtk_tree_drag_source_row_draggable".} +proc gtk_tree_drag_source_drag_data_delete*(drag_source: PGtkTreeDragSource, + path: PGtkTreePath): gboolean{.cdecl, dynlib: gtklib, importc: "gtk_tree_drag_source_drag_data_delete".} +proc gtk_tree_drag_source_drag_data_get*(drag_source: PGtkTreeDragSource, + path: PGtkTreePath, selection_data: PGtkSelectionData): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_tree_drag_source_drag_data_get".} +proc GTK_TYPE_TREE_DRAG_DEST*(): GType +proc GTK_TREE_DRAG_DEST*(obj: pointer): PGtkTreeDragDest +proc GTK_IS_TREE_DRAG_DEST*(obj: pointer): bool +proc GTK_TREE_DRAG_DEST_GET_IFACE*(obj: pointer): PGtkTreeDragDestIface +proc gtk_tree_drag_dest_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_tree_drag_dest_get_type".} +proc gtk_tree_drag_dest_drag_data_received*(drag_dest: PGtkTreeDragDest, + dest: PGtkTreePath, selection_data: PGtkSelectionData): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_tree_drag_dest_drag_data_received".} +proc gtk_tree_drag_dest_row_drop_possible*(drag_dest: PGtkTreeDragDest, + dest_path: PGtkTreePath, selection_data: PGtkSelectionData): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_drag_dest_row_drop_possible".} +proc gtk_tree_set_row_drag_data*(selection_data: PGtkSelectionData, + tree_model: PGtkTreeModel, path: PGtkTreePath): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_set_row_drag_data".} +const + bm_TGtkTreeItem_expanded* = 0x00000001'i16 + bp_TGtkTreeItem_expanded* = 0'i16 + +proc GTK_TYPE_TREE_ITEM*(): GType +proc GTK_TREE_ITEM*(obj: pointer): PGtkTreeItem +proc GTK_TREE_ITEM_CLASS*(klass: pointer): PGtkTreeItemClass +proc GTK_IS_TREE_ITEM*(obj: pointer): bool +proc GTK_IS_TREE_ITEM_CLASS*(klass: pointer): bool +proc GTK_TREE_ITEM_GET_CLASS*(obj: pointer): PGtkTreeItemClass +proc GTK_TREE_ITEM_SUBTREE*(obj: pointer): PGtkWidget +proc expanded*(a: var TGtkTreeItem): guint +proc set_expanded*(a: var TGtkTreeItem, `expanded`: guint) +proc gtk_tree_item_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_tree_item_get_type".} +proc gtk_tree_item_new*(): PGtkTreeItem{.cdecl, dynlib: gtklib, + importc: "gtk_tree_item_new".} +proc gtk_tree_item_new_with_label*(`label`: cstring): PGtkTreeItem{.cdecl, + dynlib: gtklib, importc: "gtk_tree_item_new_with_label".} +proc gtk_tree_item_set_subtree*(tree_item: PGtkTreeItem, subtree: PGtkWidget){. + cdecl, dynlib: gtklib, importc: "gtk_tree_item_set_subtree".} +proc gtk_tree_item_remove_subtree*(tree_item: PGtkTreeItem){.cdecl, + dynlib: gtklib, importc: "gtk_tree_item_remove_subtree".} +proc gtk_tree_item_select*(tree_item: PGtkTreeItem){.cdecl, dynlib: gtklib, + importc: "gtk_tree_item_select".} +proc gtk_tree_item_deselect*(tree_item: PGtkTreeItem){.cdecl, dynlib: gtklib, + importc: "gtk_tree_item_deselect".} +proc gtk_tree_item_expand*(tree_item: PGtkTreeItem){.cdecl, dynlib: gtklib, + importc: "gtk_tree_item_expand".} +proc gtk_tree_item_collapse*(tree_item: PGtkTreeItem){.cdecl, dynlib: gtklib, + importc: "gtk_tree_item_collapse".} +proc GTK_TYPE_TREE_SELECTION*(): GType +proc GTK_TREE_SELECTION*(obj: pointer): PGtkTreeSelection +proc GTK_TREE_SELECTION_CLASS*(klass: pointer): PGtkTreeSelectionClass +proc GTK_IS_TREE_SELECTION*(obj: pointer): bool +proc GTK_IS_TREE_SELECTION_CLASS*(klass: pointer): bool +proc GTK_TREE_SELECTION_GET_CLASS*(obj: pointer): PGtkTreeSelectionClass +proc gtk_tree_selection_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_tree_selection_get_type".} +proc gtk_tree_selection_set_mode*(selection: PGtkTreeSelection, + thetype: TGtkSelectionMode){.cdecl, + dynlib: gtklib, importc: "gtk_tree_selection_set_mode".} +proc gtk_tree_selection_get_mode*(selection: PGtkTreeSelection): TGtkSelectionMode{. + cdecl, dynlib: gtklib, importc: "gtk_tree_selection_get_mode".} +proc gtk_tree_selection_set_select_function*(selection: PGtkTreeSelection, + fun: TGtkTreeSelectionFunc, data: gpointer, destroy: TGtkDestroyNotify){. + cdecl, dynlib: gtklib, importc: "gtk_tree_selection_set_select_function".} +proc gtk_tree_selection_get_user_data*(selection: PGtkTreeSelection): gpointer{. + cdecl, dynlib: gtklib, importc: "gtk_tree_selection_get_user_data".} +proc gtk_tree_selection_get_tree_view*(selection: PGtkTreeSelection): PGtkTreeView{. + cdecl, dynlib: gtklib, importc: "gtk_tree_selection_get_tree_view".} +proc gtk_tree_selection_get_selected*(selection: PGtkTreeSelection, + model: PPGtkTreeModel, iter: PGtkTreeIter): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_selection_get_selected".} +proc gtk_tree_selection_get_selected_rows*(selection: PGtkTreeSelection, + model: PPGtkTreeModel): PGList{.cdecl, dynlib: gtklib, importc: "gtk_tree_selection_get_selected_rows".} +proc gtk_tree_selection_selected_foreach*(selection: PGtkTreeSelection, + fun: TGtkTreeSelectionForeachFunc, data: gpointer){.cdecl, dynlib: gtklib, + importc: "gtk_tree_selection_selected_foreach".} +proc gtk_tree_selection_select_path*(selection: PGtkTreeSelection, + path: PGtkTreePath){.cdecl, dynlib: gtklib, + importc: "gtk_tree_selection_select_path".} +proc gtk_tree_selection_unselect_path*(selection: PGtkTreeSelection, + path: PGtkTreePath){.cdecl, + dynlib: gtklib, importc: "gtk_tree_selection_unselect_path".} +proc gtk_tree_selection_select_iter*(selection: PGtkTreeSelection, + iter: PGtkTreeIter){.cdecl, dynlib: gtklib, + importc: "gtk_tree_selection_select_iter".} +proc gtk_tree_selection_unselect_iter*(selection: PGtkTreeSelection, + iter: PGtkTreeIter){.cdecl, + dynlib: gtklib, importc: "gtk_tree_selection_unselect_iter".} +proc gtk_tree_selection_path_is_selected*(selection: PGtkTreeSelection, + path: PGtkTreePath): gboolean{.cdecl, dynlib: gtklib, importc: "gtk_tree_selection_path_is_selected".} +proc gtk_tree_selection_iter_is_selected*(selection: PGtkTreeSelection, + iter: PGtkTreeIter): gboolean{.cdecl, dynlib: gtklib, importc: "gtk_tree_selection_iter_is_selected".} +proc gtk_tree_selection_select_all*(selection: PGtkTreeSelection){.cdecl, + dynlib: gtklib, importc: "gtk_tree_selection_select_all".} +proc gtk_tree_selection_unselect_all*(selection: PGtkTreeSelection){.cdecl, + dynlib: gtklib, importc: "gtk_tree_selection_unselect_all".} +proc gtk_tree_selection_select_range*(selection: PGtkTreeSelection, + start_path: PGtkTreePath, + end_path: PGtkTreePath){.cdecl, + dynlib: gtklib, importc: "gtk_tree_selection_select_range".} +const + bm_TGtkTreeStore_columns_dirty* = 0x00000001'i16 + bp_TGtkTreeStore_columns_dirty* = 0'i16 + +proc GTK_TYPE_TREE_STORE*(): GType +proc GTK_TREE_STORE*(obj: pointer): PGtkTreeStore +proc GTK_TREE_STORE_CLASS*(klass: pointer): PGtkTreeStoreClass +proc GTK_IS_TREE_STORE*(obj: pointer): bool +proc GTK_IS_TREE_STORE_CLASS*(klass: pointer): bool +proc GTK_TREE_STORE_GET_CLASS*(obj: pointer): PGtkTreeStoreClass +proc columns_dirty*(a: var TGtkTreeStore): guint +proc set_columns_dirty*(a: var TGtkTreeStore, `columns_dirty`: guint) +proc gtk_tree_store_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_tree_store_get_type".} +proc gtk_tree_store_newv*(n_columns: gint, types: PGType): PGtkTreeStore{.cdecl, + dynlib: gtklib, importc: "gtk_tree_store_newv".} +proc gtk_tree_store_set_column_types*(tree_store: PGtkTreeStore, + n_columns: gint, types: PGType){.cdecl, + dynlib: gtklib, importc: "gtk_tree_store_set_column_types".} +proc gtk_tree_store_set_value*(tree_store: PGtkTreeStore, iter: PGtkTreeIter, + column: gint, value: PGValue){.cdecl, + dynlib: gtklib, importc: "gtk_tree_store_set_value".} +proc gtk_tree_store_remove*(tree_store: PGtkTreeStore, iter: PGtkTreeIter){. + cdecl, dynlib: gtklib, importc: "gtk_tree_store_remove".} +proc gtk_tree_store_insert*(tree_store: PGtkTreeStore, iter: PGtkTreeIter, + parent: PGtkTreeIter, position: gint){.cdecl, + dynlib: gtklib, importc: "gtk_tree_store_insert".} +proc gtk_tree_store_insert_before*(tree_store: PGtkTreeStore, + iter: PGtkTreeIter, parent: PGtkTreeIter, + sibling: PGtkTreeIter){.cdecl, + dynlib: gtklib, importc: "gtk_tree_store_insert_before".} +proc gtk_tree_store_insert_after*(tree_store: PGtkTreeStore, iter: PGtkTreeIter, + parent: PGtkTreeIter, sibling: PGtkTreeIter){. + cdecl, dynlib: gtklib, importc: "gtk_tree_store_insert_after".} +proc gtk_tree_store_prepend*(tree_store: PGtkTreeStore, iter: PGtkTreeIter, + parent: PGtkTreeIter){.cdecl, dynlib: gtklib, + importc: "gtk_tree_store_prepend".} +proc gtk_tree_store_append*(tree_store: PGtkTreeStore, iter: PGtkTreeIter, + parent: PGtkTreeIter){.cdecl, dynlib: gtklib, + importc: "gtk_tree_store_append".} +proc gtk_tree_store_is_ancestor*(tree_store: PGtkTreeStore, iter: PGtkTreeIter, + descendant: PGtkTreeIter): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_tree_store_is_ancestor".} +proc gtk_tree_store_iter_depth*(tree_store: PGtkTreeStore, iter: PGtkTreeIter): gint{. + cdecl, dynlib: gtklib, importc: "gtk_tree_store_iter_depth".} +proc gtk_tree_store_clear*(tree_store: PGtkTreeStore){.cdecl, dynlib: gtklib, + importc: "gtk_tree_store_clear".} +const + bm_TGtkTreeViewColumn_visible* = 0x00000001'i16 + bp_TGtkTreeViewColumn_visible* = 0'i16 + bm_TGtkTreeViewColumn_resizable* = 0x00000002'i16 + bp_TGtkTreeViewColumn_resizable* = 1'i16 + bm_TGtkTreeViewColumn_clickable* = 0x00000004'i16 + bp_TGtkTreeViewColumn_clickable* = 2'i16 + bm_TGtkTreeViewColumn_dirty* = 0x00000008'i16 + bp_TGtkTreeViewColumn_dirty* = 3'i16 + bm_TGtkTreeViewColumn_show_sort_indicator* = 0x00000010'i16 + bp_TGtkTreeViewColumn_show_sort_indicator* = 4'i16 + bm_TGtkTreeViewColumn_maybe_reordered* = 0x00000020'i16 + bp_TGtkTreeViewColumn_maybe_reordered* = 5'i16 + bm_TGtkTreeViewColumn_reorderable* = 0x00000040'i16 + bp_TGtkTreeViewColumn_reorderable* = 6'i16 + bm_TGtkTreeViewColumn_use_resized_width* = 0x00000080'i16 + bp_TGtkTreeViewColumn_use_resized_width* = 7'i16 + +proc GTK_TYPE_TREE_VIEW_COLUMN*(): GType +proc GTK_TREE_VIEW_COLUMN*(obj: pointer): PGtkTreeViewColumn +proc GTK_TREE_VIEW_COLUMN_CLASS*(klass: pointer): PGtkTreeViewColumnClass +proc GTK_IS_TREE_VIEW_COLUMN*(obj: pointer): bool +proc GTK_IS_TREE_VIEW_COLUMN_CLASS*(klass: pointer): bool +proc GTK_TREE_VIEW_COLUMN_GET_CLASS*(obj: pointer): PGtkTreeViewColumnClass +proc visible*(a: var TGtkTreeViewColumn): guint +proc set_visible*(a: var TGtkTreeViewColumn, `visible`: guint) +proc resizable*(a: var TGtkTreeViewColumn): guint +proc set_resizable*(a: var TGtkTreeViewColumn, `resizable`: guint) +proc clickable*(a: var TGtkTreeViewColumn): guint +proc set_clickable*(a: var TGtkTreeViewColumn, `clickable`: guint) +proc dirty*(a: var TGtkTreeViewColumn): guint +proc set_dirty*(a: var TGtkTreeViewColumn, `dirty`: guint) +proc show_sort_indicator*(a: var TGtkTreeViewColumn): guint +proc set_show_sort_indicator*(a: var TGtkTreeViewColumn, + `show_sort_indicator`: guint) +proc maybe_reordered*(a: var TGtkTreeViewColumn): guint +proc set_maybe_reordered*(a: var TGtkTreeViewColumn, `maybe_reordered`: guint) +proc reorderable*(a: var TGtkTreeViewColumn): guint +proc set_reorderable*(a: var TGtkTreeViewColumn, `reorderable`: guint) +proc use_resized_width*(a: var TGtkTreeViewColumn): guint +proc set_use_resized_width*(a: var TGtkTreeViewColumn, + `use_resized_width`: guint) +proc gtk_tree_view_column_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_get_type".} +proc gtk_tree_view_column_new*(): PGtkTreeViewColumn{.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_new".} +proc gtk_tree_view_column_pack_start*(tree_column: PGtkTreeViewColumn, + cell: PGtkCellRenderer, expand: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_pack_start".} +proc gtk_tree_view_column_pack_end*(tree_column: PGtkTreeViewColumn, + cell: PGtkCellRenderer, expand: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_pack_end".} +proc gtk_tree_view_column_clear*(tree_column: PGtkTreeViewColumn){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_column_clear".} +proc gtk_tree_view_column_get_cell_renderers*(tree_column: PGtkTreeViewColumn): PGList{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_cell_renderers".} +proc gtk_tree_view_column_add_attribute*(tree_column: PGtkTreeViewColumn, + cell_renderer: PGtkCellRenderer, attribute: cstring, column: gint){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_column_add_attribute".} +proc gtk_tree_view_column_set_cell_data_func*(tree_column: PGtkTreeViewColumn, + cell_renderer: PGtkCellRenderer, fun: TGtkTreeCellDataFunc, + func_data: gpointer, destroy: TGtkDestroyNotify){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_set_cell_data_func".} +proc gtk_tree_view_column_clear_attributes*(tree_column: PGtkTreeViewColumn, + cell_renderer: PGtkCellRenderer){.cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_clear_attributes".} +proc gtk_tree_view_column_set_spacing*(tree_column: PGtkTreeViewColumn, + spacing: gint){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_set_spacing".} +proc gtk_tree_view_column_get_spacing*(tree_column: PGtkTreeViewColumn): gint{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_spacing".} +proc gtk_tree_view_column_set_visible*(tree_column: PGtkTreeViewColumn, + visible: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_column_set_visible".} +proc gtk_tree_view_column_get_visible*(tree_column: PGtkTreeViewColumn): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_visible".} +proc gtk_tree_view_column_set_resizable*(tree_column: PGtkTreeViewColumn, + resizable: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_set_resizable".} +proc gtk_tree_view_column_get_resizable*(tree_column: PGtkTreeViewColumn): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_resizable".} +proc gtk_tree_view_column_set_sizing*(tree_column: PGtkTreeViewColumn, + thetype: TGtkTreeViewColumnSizing){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_column_set_sizing".} +proc gtk_tree_view_column_get_sizing*(tree_column: PGtkTreeViewColumn): TGtkTreeViewColumnSizing{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_sizing".} +proc gtk_tree_view_column_get_width*(tree_column: PGtkTreeViewColumn): gint{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_width".} +proc gtk_tree_view_column_get_fixed_width*(tree_column: PGtkTreeViewColumn): gint{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_fixed_width".} +proc gtk_tree_view_column_set_fixed_width*(tree_column: PGtkTreeViewColumn, + fixed_width: gint){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_set_fixed_width".} +proc gtk_tree_view_column_set_min_width*(tree_column: PGtkTreeViewColumn, + min_width: gint){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_set_min_width".} +proc gtk_tree_view_column_get_min_width*(tree_column: PGtkTreeViewColumn): gint{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_min_width".} +proc gtk_tree_view_column_set_max_width*(tree_column: PGtkTreeViewColumn, + max_width: gint){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_set_max_width".} +proc gtk_tree_view_column_get_max_width*(tree_column: PGtkTreeViewColumn): gint{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_max_width".} +proc gtk_tree_view_column_clicked*(tree_column: PGtkTreeViewColumn){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_column_clicked".} +proc gtk_tree_view_column_set_title*(tree_column: PGtkTreeViewColumn, + title: cstring){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_set_title".} +proc gtk_tree_view_column_get_title*(tree_column: PGtkTreeViewColumn): cstring{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_title".} +proc gtk_tree_view_column_set_clickable*(tree_column: PGtkTreeViewColumn, + clickable: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_set_clickable".} +proc gtk_tree_view_column_get_clickable*(tree_column: PGtkTreeViewColumn): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_clickable".} +proc gtk_tree_view_column_set_widget*(tree_column: PGtkTreeViewColumn, + widget: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_column_set_widget".} +proc gtk_tree_view_column_get_widget*(tree_column: PGtkTreeViewColumn): PGtkWidget{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_widget".} +proc gtk_tree_view_column_set_alignment*(tree_column: PGtkTreeViewColumn, + xalign: gfloat){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_set_alignment".} +proc gtk_tree_view_column_get_alignment*(tree_column: PGtkTreeViewColumn): gfloat{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_alignment".} +proc gtk_tree_view_column_set_reorderable*(tree_column: PGtkTreeViewColumn, + reorderable: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_set_reorderable".} +proc gtk_tree_view_column_get_reorderable*(tree_column: PGtkTreeViewColumn): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_reorderable".} +proc gtk_tree_view_column_set_sort_column_id*(tree_column: PGtkTreeViewColumn, + sort_column_id: gint){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_set_sort_column_id".} +proc gtk_tree_view_column_get_sort_column_id*(tree_column: PGtkTreeViewColumn): gint{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_sort_column_id".} +proc gtk_tree_view_column_set_sort_indicator*(tree_column: PGtkTreeViewColumn, + setting: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_set_sort_indicator".} +proc gtk_tree_view_column_get_sort_indicator*(tree_column: PGtkTreeViewColumn): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_sort_indicator".} +proc gtk_tree_view_column_set_sort_order*(tree_column: PGtkTreeViewColumn, + order: TGtkSortType){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_set_sort_order".} +proc gtk_tree_view_column_get_sort_order*(tree_column: PGtkTreeViewColumn): TGtkSortType{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_sort_order".} +proc gtk_tree_view_column_cell_set_cell_data*(tree_column: PGtkTreeViewColumn, + tree_model: PGtkTreeModel, iter: PGtkTreeIter, is_expander: gboolean, + is_expanded: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_cell_set_cell_data".} +proc gtk_tree_view_column_cell_get_size*(tree_column: PGtkTreeViewColumn, + cell_area: PGdkRectangle, x_offset: Pgint, y_offset: Pgint, width: Pgint, + height: Pgint){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_cell_get_size".} +proc gtk_tree_view_column_cell_is_visible*(tree_column: PGtkTreeViewColumn): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_cell_is_visible".} +proc gtk_tree_view_column_focus_cell*(tree_column: PGtkTreeViewColumn, + cell: PGtkCellRenderer){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_column_focus_cell".} +proc gtk_tree_view_column_set_expand*(tree_column: PGtkTreeViewColumn, + Expand: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_column_set_expand".} +proc gtk_tree_view_column_get_expand*(tree_column: PGtkTreeViewColumn): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_column_get_expand".} +const + GTK_RBNODE_BLACK* = 1 shl 0 + GTK_RBNODE_RED* = 1 shl 1 + GTK_RBNODE_IS_PARENT* = 1 shl 2 + GTK_RBNODE_IS_SELECTED* = 1 shl 3 + GTK_RBNODE_IS_PRELIT* = 1 shl 4 + GTK_RBNODE_IS_SEMI_COLLAPSED* = 1 shl 5 + GTK_RBNODE_IS_SEMI_EXPANDED* = 1 shl 6 + GTK_RBNODE_INVALID* = 1 shl 7 + GTK_RBNODE_COLUMN_INVALID* = 1 shl 8 + GTK_RBNODE_DESCENDANTS_INVALID* = 1 shl 9 + GTK_RBNODE_NON_COLORS* = GTK_RBNODE_IS_PARENT or GTK_RBNODE_IS_SELECTED or + GTK_RBNODE_IS_PRELIT or GTK_RBNODE_IS_SEMI_COLLAPSED or + GTK_RBNODE_IS_SEMI_EXPANDED or GTK_RBNODE_INVALID or + GTK_RBNODE_COLUMN_INVALID or GTK_RBNODE_DESCENDANTS_INVALID + +const + bm_TGtkRBNode_flags* = 0x00003FFF'i16 + bp_TGtkRBNode_flags* = 0'i16 + bm_TGtkRBNode_parity* = 0x00004000'i16 + bp_TGtkRBNode_parity* = 14'i16 + +proc flags*(a: PGtkRBNode): guint +proc set_flags*(a: PGtkRBNode, `flags`: guint) +proc parity*(a: PGtkRBNode): guint +proc set_parity*(a: PGtkRBNode, `parity`: guint) +proc GTK_RBNODE_GET_COLOR*(node: PGtkRBNode): guint +proc GTK_RBNODE_SET_COLOR*(node: PGtkRBNode, color: guint) +proc GTK_RBNODE_GET_HEIGHT*(node: PGtkRBNode): gint +proc GTK_RBNODE_SET_FLAG*(node: PGtkRBNode, flag: guint16) +proc GTK_RBNODE_UNSET_FLAG*(node: PGtkRBNode, flag: guint16) +proc GTK_RBNODE_FLAG_SET*(node: PGtkRBNode, flag: guint): bool +proc gtk_rbtree_push_allocator*(allocator: PGAllocator){.cdecl, + dynlib: gtklib, importc: "_gtk_rbtree_push_allocator".} +proc gtk_rbtree_pop_allocator*(){.cdecl, dynlib: gtklib, + importc: "_gtk_rbtree_pop_allocator".} +proc gtk_rbtree_new*(): PGtkRBTree{.cdecl, dynlib: gtklib, + importc: "_gtk_rbtree_new".} +proc gtk_rbtree_free*(tree: PGtkRBTree){.cdecl, dynlib: gtklib, + importc: "_gtk_rbtree_free".} +proc gtk_rbtree_remove*(tree: PGtkRBTree){.cdecl, dynlib: gtklib, + importc: "_gtk_rbtree_remove".} +proc gtk_rbtree_destroy*(tree: PGtkRBTree){.cdecl, dynlib: gtklib, + importc: "_gtk_rbtree_destroy".} +proc gtk_rbtree_insert_before*(tree: PGtkRBTree, node: PGtkRBNode, + height: gint, valid: gboolean): PGtkRBNode{. + cdecl, dynlib: gtklib, importc: "_gtk_rbtree_insert_before".} +proc gtk_rbtree_insert_after*(tree: PGtkRBTree, node: PGtkRBNode, + height: gint, valid: gboolean): PGtkRBNode{. + cdecl, dynlib: gtklib, importc: "_gtk_rbtree_insert_after".} +proc gtk_rbtree_remove_node*(tree: PGtkRBTree, node: PGtkRBNode){.cdecl, + dynlib: gtklib, importc: "_gtk_rbtree_remove_node".} +proc gtk_rbtree_reorder*(tree: PGtkRBTree, new_order: Pgint, length: gint){. + cdecl, dynlib: gtklib, importc: "_gtk_rbtree_reorder".} +proc gtk_rbtree_find_count*(tree: PGtkRBTree, count: gint): PGtkRBNode{.cdecl, + dynlib: gtklib, importc: "_gtk_rbtree_find_count".} +proc gtk_rbtree_node_set_height*(tree: PGtkRBTree, node: PGtkRBNode, + height: gint){.cdecl, dynlib: gtklib, + importc: "_gtk_rbtree_node_set_height".} +proc gtk_rbtree_node_mark_invalid*(tree: PGtkRBTree, node: PGtkRBNode){. + cdecl, dynlib: gtklib, importc: "_gtk_rbtree_node_mark_invalid".} +proc gtk_rbtree_node_mark_valid*(tree: PGtkRBTree, node: PGtkRBNode){.cdecl, + dynlib: gtklib, importc: "_gtk_rbtree_node_mark_valid".} +proc gtk_rbtree_column_invalid*(tree: PGtkRBTree){.cdecl, dynlib: gtklib, + importc: "_gtk_rbtree_column_invalid".} +proc gtk_rbtree_mark_invalid*(tree: PGtkRBTree){.cdecl, dynlib: gtklib, + importc: "_gtk_rbtree_mark_invalid".} +proc gtk_rbtree_set_fixed_height*(tree: PGtkRBTree, height: gint){.cdecl, + dynlib: gtklib, importc: "_gtk_rbtree_set_fixed_height".} +proc gtk_rbtree_node_find_offset*(tree: PGtkRBTree, node: PGtkRBNode): gint{. + cdecl, dynlib: gtklib, importc: "_gtk_rbtree_node_find_offset".} +proc gtk_rbtree_node_find_parity*(tree: PGtkRBTree, node: PGtkRBNode): gint{. + cdecl, dynlib: gtklib, importc: "_gtk_rbtree_node_find_parity".} +proc gtk_rbtree_traverse*(tree: PGtkRBTree, node: PGtkRBNode, + order: TGTraverseType, + fun: TGtkRBTreeTraverseFunc, data: gpointer){. + cdecl, dynlib: gtklib, importc: "_gtk_rbtree_traverse".} +proc gtk_rbtree_next*(tree: PGtkRBTree, node: PGtkRBNode): PGtkRBNode{.cdecl, + dynlib: gtklib, importc: "_gtk_rbtree_next".} +proc gtk_rbtree_prev*(tree: PGtkRBTree, node: PGtkRBNode): PGtkRBNode{.cdecl, + dynlib: gtklib, importc: "_gtk_rbtree_prev".} +proc gtk_rbtree_get_depth*(tree: PGtkRBTree): gint{.cdecl, dynlib: gtklib, + importc: "_gtk_rbtree_get_depth".} +const + TREE_VIEW_DRAG_WIDTH* = 6 + GTK_TREE_VIEW_IS_LIST* = 1 shl 0 + GTK_TREE_VIEW_SHOW_EXPANDERS* = 1 shl 1 + GTK_TREE_VIEW_IN_COLUMN_RESIZE* = 1 shl 2 + GTK_TREE_VIEW_ARROW_PRELIT* = 1 shl 3 + GTK_TREE_VIEW_HEADERS_VISIBLE* = 1 shl 4 + GTK_TREE_VIEW_DRAW_KEYFOCUS* = 1 shl 5 + GTK_TREE_VIEW_MODEL_SETUP* = 1 shl 6 + GTK_TREE_VIEW_IN_COLUMN_DRAG* = 1 shl 7 + DRAG_COLUMN_WINDOW_STATE_UNSET* = 0 + DRAG_COLUMN_WINDOW_STATE_ORIGINAL* = 1 + DRAG_COLUMN_WINDOW_STATE_ARROW* = 2 + DRAG_COLUMN_WINDOW_STATE_ARROW_LEFT* = 3 + DRAG_COLUMN_WINDOW_STATE_ARROW_RIGHT* = 4 + +proc GTK_TREE_VIEW_SET_FLAG*(tree_view: PGtkTreeView, flag: guint) +proc GTK_TREE_VIEW_UNSET_FLAG*(tree_view: PGtkTreeView, flag: guint) +proc GTK_TREE_VIEW_FLAG_SET*(tree_view: PGtkTreeView, flag: guint): bool +proc TREE_VIEW_HEADER_HEIGHT*(tree_view: PGtkTreeView): int32 +proc TREE_VIEW_COLUMN_REQUESTED_WIDTH*(column: PGtkTreeViewColumn): int32 +proc TREE_VIEW_DRAW_EXPANDERS*(tree_view: PGtkTreeView): bool +proc TREE_VIEW_COLUMN_DRAG_DEAD_MULTIPLIER*(tree_view: PGtkTreeView): int32 +const + bm_TGtkTreeViewPrivate_scroll_to_use_align* = 0x00000001'i16 + bp_TGtkTreeViewPrivate_scroll_to_use_align* = 0'i16 + bm_TGtkTreeViewPrivate_fixed_height_check* = 0x00000002'i16 + bp_TGtkTreeViewPrivate_fixed_height_check* = 1'i16 + bm_TGtkTreeViewPrivate_reorderable* = 0x00000004'i16 + bp_TGtkTreeViewPrivate_reorderable* = 2'i16 + bm_TGtkTreeViewPrivate_header_has_focus* = 0x00000008'i16 + bp_TGtkTreeViewPrivate_header_has_focus* = 3'i16 + bm_TGtkTreeViewPrivate_drag_column_window_state* = 0x00000070'i16 + bp_TGtkTreeViewPrivate_drag_column_window_state* = 4'i16 + bm_TGtkTreeViewPrivate_has_rules* = 0x00000080'i16 + bp_TGtkTreeViewPrivate_has_rules* = 7'i16 + bm_TGtkTreeViewPrivate_mark_rows_col_dirty* = 0x00000100'i16 + bp_TGtkTreeViewPrivate_mark_rows_col_dirty* = 8'i16 + bm_TGtkTreeViewPrivate_enable_search* = 0x00000200'i16 + bp_TGtkTreeViewPrivate_enable_search* = 9'i16 + bm_TGtkTreeViewPrivate_disable_popdown* = 0x00000400'i16 + bp_TGtkTreeViewPrivate_disable_popdown* = 10'i16 + +proc scroll_to_use_align*(a: var TGtkTreeViewPrivate): guint +proc set_scroll_to_use_align*(a: var TGtkTreeViewPrivate, + `scroll_to_use_align`: guint) +proc fixed_height_check*(a: var TGtkTreeViewPrivate): guint +proc set_fixed_height_check*(a: var TGtkTreeViewPrivate, + `fixed_height_check`: guint) +proc reorderable*(a: var TGtkTreeViewPrivate): guint +proc set_reorderable*(a: var TGtkTreeViewPrivate, `reorderable`: guint) +proc header_has_focus*(a: var TGtkTreeViewPrivate): guint +proc set_header_has_focus*(a: var TGtkTreeViewPrivate, `header_has_focus`: guint) +proc drag_column_window_state*(a: var TGtkTreeViewPrivate): guint +proc set_drag_column_window_state*(a: var TGtkTreeViewPrivate, + `drag_column_window_state`: guint) +proc has_rules*(a: var TGtkTreeViewPrivate): guint +proc set_has_rules*(a: var TGtkTreeViewPrivate, `has_rules`: guint) +proc mark_rows_col_dirty*(a: var TGtkTreeViewPrivate): guint +proc set_mark_rows_col_dirty*(a: var TGtkTreeViewPrivate, + `mark_rows_col_dirty`: guint) +proc enable_search*(a: var TGtkTreeViewPrivate): guint +proc set_enable_search*(a: var TGtkTreeViewPrivate, `enable_search`: guint) +proc disable_popdown*(a: var TGtkTreeViewPrivate): guint +proc set_disable_popdown*(a: var TGtkTreeViewPrivate, `disable_popdown`: guint) +proc gtk_tree_selection_internal_select_node*(selection: PGtkTreeSelection, + node: PGtkRBNode, tree: PGtkRBTree, path: PGtkTreePath, + state: TGdkModifierType, override_browse_mode: gboolean){.cdecl, + dynlib: gtklib, importc: "_gtk_tree_selection_internal_select_node".} +proc gtk_tree_view_find_node*(tree_view: PGtkTreeView, path: PGtkTreePath, + tree: var PGtkRBTree, node: var PGtkRBNode): gboolean{. + cdecl, dynlib: gtklib, importc: "_gtk_tree_view_find_node".} +proc gtk_tree_view_find_path*(tree_view: PGtkTreeView, tree: PGtkRBTree, + node: PGtkRBNode): PGtkTreePath{.cdecl, + dynlib: gtklib, importc: "_gtk_tree_view_find_path".} +proc gtk_tree_view_child_move_resize*(tree_view: PGtkTreeView, + widget: PGtkWidget, x: gint, y: gint, + width: gint, height: gint){.cdecl, + dynlib: gtklib, importc: "_gtk_tree_view_child_move_resize".} +proc gtk_tree_view_queue_draw_node*(tree_view: PGtkTreeView, tree: PGtkRBTree, + node: PGtkRBNode, + clip_rect: PGdkRectangle){.cdecl, + dynlib: gtklib, importc: "_gtk_tree_view_queue_draw_node".} +proc gtk_tree_view_column_realize_button*(column: PGtkTreeViewColumn){.cdecl, + dynlib: gtklib, importc: "_gtk_tree_view_column_realize_button".} +proc gtk_tree_view_column_unrealize_button*(column: PGtkTreeViewColumn){. + cdecl, dynlib: gtklib, importc: "_gtk_tree_view_column_unrealize_button".} +proc gtk_tree_view_column_set_tree_view*(column: PGtkTreeViewColumn, + tree_view: PGtkTreeView){.cdecl, dynlib: gtklib, + importc: "_gtk_tree_view_column_set_tree_view".} +proc gtk_tree_view_column_unset_tree_view*(column: PGtkTreeViewColumn){.cdecl, + dynlib: gtklib, importc: "_gtk_tree_view_column_unset_tree_view".} +proc gtk_tree_view_column_set_width*(column: PGtkTreeViewColumn, width: gint){. + cdecl, dynlib: gtklib, importc: "_gtk_tree_view_column_set_width".} +proc gtk_tree_view_column_start_drag*(tree_view: PGtkTreeView, + column: PGtkTreeViewColumn){.cdecl, + dynlib: gtklib, importc: "_gtk_tree_view_column_start_drag".} +proc gtk_tree_view_column_start_editing*(tree_column: PGtkTreeViewColumn, + editable_widget: PGtkCellEditable){.cdecl, dynlib: gtklib, importc: "_gtk_tree_view_column_start_editing".} +proc gtk_tree_view_column_stop_editing*(tree_column: PGtkTreeViewColumn){. + cdecl, dynlib: gtklib, importc: "_gtk_tree_view_column_stop_editing".} +proc gtk_tree_view_install_mark_rows_col_dirty*(tree_view: PGtkTreeView){. + cdecl, dynlib: gtklib, + importc: "_gtk_tree_view_install_mark_rows_col_dirty".} +proc DOgtk_tree_view_column_autosize*(tree_view: PGtkTreeView, + column: PGtkTreeViewColumn){.cdecl, + dynlib: gtklib, importc: "_gtk_tree_view_column_autosize".} +proc gtk_tree_view_column_has_editable_cell*(column: PGtkTreeViewColumn): gboolean{. + cdecl, dynlib: gtklib, importc: "_gtk_tree_view_column_has_editable_cell".} +proc gtk_tree_view_column_get_edited_cell*(column: PGtkTreeViewColumn): PGtkCellRenderer{. + cdecl, dynlib: gtklib, importc: "_gtk_tree_view_column_get_edited_cell".} +proc gtk_tree_view_column_count_special_cells*(column: PGtkTreeViewColumn): gint{. + cdecl, dynlib: gtklib, importc: "_gtk_tree_view_column_count_special_cells".} +proc gtk_tree_view_column_get_cell_at_pos*(column: PGtkTreeViewColumn, x: gint): PGtkCellRenderer{. + cdecl, dynlib: gtklib, importc: "_gtk_tree_view_column_get_cell_at_pos".} +proc gtk_tree_selection_new*(): PGtkTreeSelection{.cdecl, dynlib: gtklib, + importc: "_gtk_tree_selection_new".} +proc gtk_tree_selection_new_with_tree_view*(tree_view: PGtkTreeView): PGtkTreeSelection{. + cdecl, dynlib: gtklib, importc: "_gtk_tree_selection_new_with_tree_view".} +proc gtk_tree_selection_set_tree_view*(selection: PGtkTreeSelection, + tree_view: PGtkTreeView){.cdecl, dynlib: gtklib, + importc: "_gtk_tree_selection_set_tree_view".} +proc gtk_tree_view_column_cell_render*(tree_column: PGtkTreeViewColumn, + window: PGdkWindow, background_area: PGdkRectangle, + cell_area: PGdkRectangle, expose_area: PGdkRectangle, flags: guint){.cdecl, + dynlib: gtklib, importc: "_gtk_tree_view_column_cell_render".} +proc gtk_tree_view_column_cell_focus*(tree_column: PGtkTreeViewColumn, + direction: gint, left: gboolean, + right: gboolean): gboolean{.cdecl, + dynlib: gtklib, importc: "_gtk_tree_view_column_cell_focus".} +proc gtk_tree_view_column_cell_draw_focus*(tree_column: PGtkTreeViewColumn, + window: PGdkWindow, background_area: PGdkRectangle, + cell_area: PGdkRectangle, expose_area: PGdkRectangle, flags: guint){.cdecl, + dynlib: gtklib, importc: "_gtk_tree_view_column_cell_draw_focus".} +proc gtk_tree_view_column_cell_set_dirty*(tree_column: PGtkTreeViewColumn, + install_handler: gboolean){.cdecl, dynlib: gtklib, importc: "_gtk_tree_view_column_cell_set_dirty".} +proc gtk_tree_view_column_get_neighbor_sizes*(column: PGtkTreeViewColumn, + cell: PGtkCellRenderer, left: Pgint, right: Pgint){.cdecl, dynlib: gtklib, + importc: "_gtk_tree_view_column_get_neighbor_sizes".} +proc GTK_TYPE_TREE_VIEW*(): GType +proc GTK_TREE_VIEW*(obj: pointer): PGtkTreeView +proc GTK_TREE_VIEW_CLASS*(klass: pointer): PGtkTreeViewClass +proc GTK_IS_TREE_VIEW*(obj: pointer): bool +proc GTK_IS_TREE_VIEW_CLASS*(klass: pointer): bool +proc GTK_TREE_VIEW_GET_CLASS*(obj: pointer): PGtkTreeViewClass +proc gtk_tree_view_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_get_type".} +proc gtk_tree_view_new*(): PGtkTreeView{.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_new".} +proc gtk_tree_view_new_with_model*(model: PGtkTreeModel): PGtkTreeView{.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_new_with_model".} +proc gtk_tree_view_get_model*(tree_view: PGtkTreeView): PGtkTreeModel{.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_get_model".} +proc gtk_tree_view_set_model*(tree_view: PGtkTreeView, model: PGtkTreeModel){. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_set_model".} +proc gtk_tree_view_get_selection*(tree_view: PGtkTreeView): PGtkTreeSelection{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_get_selection".} +proc gtk_tree_view_get_hadjustment*(tree_view: PGtkTreeView): PGtkAdjustment{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_get_hadjustment".} +proc gtk_tree_view_set_hadjustment*(tree_view: PGtkTreeView, + adjustment: PGtkAdjustment){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_set_hadjustment".} +proc gtk_tree_view_get_vadjustment*(tree_view: PGtkTreeView): PGtkAdjustment{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_get_vadjustment".} +proc gtk_tree_view_set_vadjustment*(tree_view: PGtkTreeView, + adjustment: PGtkAdjustment){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_set_vadjustment".} +proc gtk_tree_view_get_headers_visible*(tree_view: PGtkTreeView): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_get_headers_visible".} +proc gtk_tree_view_set_headers_visible*(tree_view: PGtkTreeView, + headers_visible: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_set_headers_visible".} +proc gtk_tree_view_columns_autosize*(tree_view: PGtkTreeView){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_columns_autosize".} +proc gtk_tree_view_set_headers_clickable*(tree_view: PGtkTreeView, + setting: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_set_headers_clickable".} +proc gtk_tree_view_set_rules_hint*(tree_view: PGtkTreeView, setting: gboolean){. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_set_rules_hint".} +proc gtk_tree_view_get_rules_hint*(tree_view: PGtkTreeView): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_get_rules_hint".} +proc gtk_tree_view_append_column*(tree_view: PGtkTreeView, + column: PGtkTreeViewColumn): gint{.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_append_column".} +proc gtk_tree_view_remove_column*(tree_view: PGtkTreeView, + column: PGtkTreeViewColumn): gint{.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_remove_column".} +proc gtk_tree_view_insert_column*(tree_view: PGtkTreeView, + column: PGtkTreeViewColumn, position: gint): gint{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_insert_column".} +proc gtk_tree_view_insert_column_with_data_func*(tree_view: PGtkTreeView, + position: gint, title: cstring, cell: PGtkCellRenderer, + fun: TGtkTreeCellDataFunc, data: gpointer, dnotify: TGDestroyNotify): gint{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_insert_column_with_data_func".} +proc gtk_tree_view_get_column*(tree_view: PGtkTreeView, n: gint): PGtkTreeViewColumn{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_get_column".} +proc gtk_tree_view_get_columns*(tree_view: PGtkTreeView): PGList{.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_get_columns".} +proc gtk_tree_view_move_column_after*(tree_view: PGtkTreeView, + column: PGtkTreeViewColumn, + base_column: PGtkTreeViewColumn){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_move_column_after".} +proc gtk_tree_view_set_expander_column*(tree_view: PGtkTreeView, + column: PGtkTreeViewColumn){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_set_expander_column".} +proc gtk_tree_view_get_expander_column*(tree_view: PGtkTreeView): PGtkTreeViewColumn{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_get_expander_column".} +proc gtk_tree_view_set_column_drag_function*(tree_view: PGtkTreeView, + fun: TGtkTreeViewColumnDropFunc, user_data: gpointer, + destroy: TGtkDestroyNotify){.cdecl, dynlib: gtklib, importc: "gtk_tree_view_set_column_drag_function".} +proc gtk_tree_view_scroll_to_point*(tree_view: PGtkTreeView, tree_x: gint, + tree_y: gint){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_scroll_to_point".} +proc gtk_tree_view_scroll_to_cell*(tree_view: PGtkTreeView, path: PGtkTreePath, + column: PGtkTreeViewColumn, + use_align: gboolean, row_align: gfloat, + col_align: gfloat){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_scroll_to_cell".} +proc gtk_tree_view_row_activated*(tree_view: PGtkTreeView, path: PGtkTreePath, + column: PGtkTreeViewColumn){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_row_activated".} +proc gtk_tree_view_expand_all*(tree_view: PGtkTreeView){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_expand_all".} +proc gtk_tree_view_collapse_all*(tree_view: PGtkTreeView){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_collapse_all".} +proc gtk_tree_view_expand_row*(tree_view: PGtkTreeView, path: PGtkTreePath, + open_all: gboolean): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_expand_row".} +proc gtk_tree_view_collapse_row*(tree_view: PGtkTreeView, path: PGtkTreePath): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_collapse_row".} +proc gtk_tree_view_map_expanded_rows*(tree_view: PGtkTreeView, + fun: TGtkTreeViewMappingFunc, + data: gpointer){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_map_expanded_rows".} +proc gtk_tree_view_row_expanded*(tree_view: PGtkTreeView, path: PGtkTreePath): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_row_expanded".} +proc gtk_tree_view_set_reorderable*(tree_view: PGtkTreeView, + reorderable: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_set_reorderable".} +proc gtk_tree_view_get_reorderable*(tree_view: PGtkTreeView): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_get_reorderable".} +proc gtk_tree_view_set_cursor*(tree_view: PGtkTreeView, path: PGtkTreePath, + focus_column: PGtkTreeViewColumn, + start_editing: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_set_cursor".} +proc gtk_tree_view_set_cursor_on_cell*(tree_view: PGtkTreeView, + path: PGtkTreePath, + focus_column: PGtkTreeViewColumn, + focus_cell: PGtkCellRenderer, + start_editing: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_set_cursor_on_cell".} +proc gtk_tree_view_get_bin_window*(tree_view: PGtkTreeView): PGdkWindow{.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_get_bin_window".} +proc gtk_tree_view_get_cell_area*(tree_view: PGtkTreeView, path: PGtkTreePath, + column: PGtkTreeViewColumn, + rect: PGdkRectangle){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_get_cell_area".} +proc gtk_tree_view_get_background_area*(tree_view: PGtkTreeView, + path: PGtkTreePath, + column: PGtkTreeViewColumn, + rect: PGdkRectangle){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_get_background_area".} +proc gtk_tree_view_get_visible_rect*(tree_view: PGtkTreeView, + visible_rect: PGdkRectangle){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_get_visible_rect".} +proc gtk_tree_view_widget_to_tree_coords*(tree_view: PGtkTreeView, wx: gint, + wy: gint, tx: Pgint, ty: Pgint){.cdecl, dynlib: gtklib, importc: "gtk_tree_view_widget_to_tree_coords".} +proc gtk_tree_view_tree_to_widget_coords*(tree_view: PGtkTreeView, tx: gint, + ty: gint, wx: Pgint, wy: Pgint){.cdecl, dynlib: gtklib, importc: "gtk_tree_view_tree_to_widget_coords".} +proc gtk_tree_view_enable_model_drag_source*(tree_view: PGtkTreeView, + start_button_mask: TGdkModifierType, targets: PGtkTargetEntry, + n_targets: gint, actions: TGdkDragAction){.cdecl, dynlib: gtklib, + importc: "gtk_tree_view_enable_model_drag_source".} +proc gtk_tree_view_enable_model_drag_dest*(tree_view: PGtkTreeView, + targets: PGtkTargetEntry, n_targets: gint, actions: TGdkDragAction){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_enable_model_drag_dest".} +proc gtk_tree_view_unset_rows_drag_source*(tree_view: PGtkTreeView){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_unset_rows_drag_source".} +proc gtk_tree_view_unset_rows_drag_dest*(tree_view: PGtkTreeView){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_unset_rows_drag_dest".} +proc gtk_tree_view_set_drag_dest_row*(tree_view: PGtkTreeView, + path: PGtkTreePath, + pos: TGtkTreeViewDropPosition){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_set_drag_dest_row".} +proc gtk_tree_view_create_row_drag_icon*(tree_view: PGtkTreeView, + path: PGtkTreePath): PGdkPixmap{.cdecl, dynlib: gtklib, importc: "gtk_tree_view_create_row_drag_icon".} +proc gtk_tree_view_set_enable_search*(tree_view: PGtkTreeView, + enable_search: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_set_enable_search".} +proc gtk_tree_view_get_enable_search*(tree_view: PGtkTreeView): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_get_enable_search".} +proc gtk_tree_view_get_search_column*(tree_view: PGtkTreeView): gint{.cdecl, + dynlib: gtklib, importc: "gtk_tree_view_get_search_column".} +proc gtk_tree_view_set_search_column*(tree_view: PGtkTreeView, column: gint){. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_set_search_column".} +proc gtk_tree_view_get_search_equal_func*(tree_view: PGtkTreeView): TGtkTreeViewSearchEqualFunc{. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_get_search_equal_func".} +proc gtk_tree_view_set_search_equal_func*(tree_view: PGtkTreeView, + search_equal_func: TGtkTreeViewSearchEqualFunc, search_user_data: gpointer, + search_destroy: TGtkDestroyNotify){.cdecl, dynlib: gtklib, importc: "gtk_tree_view_set_search_equal_func".} +proc gtk_tree_view_set_destroy_count_func*(tree_view: PGtkTreeView, + fun: TGtkTreeDestroyCountFunc, data: gpointer, destroy: TGtkDestroyNotify){. + cdecl, dynlib: gtklib, importc: "gtk_tree_view_set_destroy_count_func".} +proc GTK_TYPE_VBUTTON_BOX*(): GType +proc GTK_VBUTTON_BOX*(obj: pointer): PGtkVButtonBox +proc GTK_VBUTTON_BOX_CLASS*(klass: pointer): PGtkVButtonBoxClass +proc GTK_IS_VBUTTON_BOX*(obj: pointer): bool +proc GTK_IS_VBUTTON_BOX_CLASS*(klass: pointer): bool +proc GTK_VBUTTON_BOX_GET_CLASS*(obj: pointer): PGtkVButtonBoxClass +proc gtk_vbutton_box_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_vbutton_box_get_type".} +proc gtk_vbutton_box_new*(): PGtkVButtonBox{.cdecl, dynlib: gtklib, + importc: "gtk_vbutton_box_new".} +proc GTK_TYPE_VIEWPORT*(): GType +proc GTK_VIEWPORT*(obj: pointer): PGtkViewport +proc GTK_VIEWPORT_CLASS*(klass: pointer): PGtkViewportClass +proc GTK_IS_VIEWPORT*(obj: pointer): bool +proc GTK_IS_VIEWPORT_CLASS*(klass: pointer): bool +proc GTK_VIEWPORT_GET_CLASS*(obj: pointer): PGtkViewportClass +proc gtk_viewport_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_viewport_get_type".} +proc gtk_viewport_new*(hadjustment: PGtkAdjustment, vadjustment: PGtkAdjustment): PGtkViewport{. + cdecl, dynlib: gtklib, importc: "gtk_viewport_new".} +proc gtk_viewport_get_hadjustment*(viewport: PGtkViewport): PGtkAdjustment{. + cdecl, dynlib: gtklib, importc: "gtk_viewport_get_hadjustment".} +proc gtk_viewport_get_vadjustment*(viewport: PGtkViewport): PGtkAdjustment{. + cdecl, dynlib: gtklib, importc: "gtk_viewport_get_vadjustment".} +proc gtk_viewport_set_hadjustment*(viewport: PGtkViewport, + adjustment: PGtkAdjustment){.cdecl, + dynlib: gtklib, importc: "gtk_viewport_set_hadjustment".} +proc gtk_viewport_set_vadjustment*(viewport: PGtkViewport, + adjustment: PGtkAdjustment){.cdecl, + dynlib: gtklib, importc: "gtk_viewport_set_vadjustment".} +proc gtk_viewport_set_shadow_type*(viewport: PGtkViewport, + thetype: TGtkShadowType){.cdecl, + dynlib: gtklib, importc: "gtk_viewport_set_shadow_type".} +proc gtk_viewport_get_shadow_type*(viewport: PGtkViewport): TGtkShadowType{. + cdecl, dynlib: gtklib, importc: "gtk_viewport_get_shadow_type".} +proc GTK_TYPE_VPANED*(): GType +proc GTK_VPANED*(obj: pointer): PGtkVPaned +proc GTK_VPANED_CLASS*(klass: pointer): PGtkVPanedClass +proc GTK_IS_VPANED*(obj: pointer): bool +proc GTK_IS_VPANED_CLASS*(klass: pointer): bool +proc GTK_VPANED_GET_CLASS*(obj: pointer): PGtkVPanedClass +proc gtk_vpaned_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_vpaned_get_type".} +proc gtk_vpaned_new*(): PGtkVPaned{.cdecl, dynlib: gtklib, + importc: "gtk_vpaned_new".} +proc GTK_TYPE_VRULER*(): GType +proc GTK_VRULER*(obj: pointer): PGtkVRuler +proc GTK_VRULER_CLASS*(klass: pointer): PGtkVRulerClass +proc GTK_IS_VRULER*(obj: pointer): bool +proc GTK_IS_VRULER_CLASS*(klass: pointer): bool +proc GTK_VRULER_GET_CLASS*(obj: pointer): PGtkVRulerClass +proc gtk_vruler_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_vruler_get_type".} +proc gtk_vruler_new*(): PGtkVRuler{.cdecl, dynlib: gtklib, + importc: "gtk_vruler_new".} +proc GTK_TYPE_VSCALE*(): GType +proc GTK_VSCALE*(obj: pointer): PGtkVScale +proc GTK_VSCALE_CLASS*(klass: pointer): PGtkVScaleClass +proc GTK_IS_VSCALE*(obj: pointer): bool +proc GTK_IS_VSCALE_CLASS*(klass: pointer): bool +proc GTK_VSCALE_GET_CLASS*(obj: pointer): PGtkVScaleClass +proc gtk_vscale_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_vscale_get_type".} +proc gtk_vscale_new*(adjustment: PGtkAdjustment): PGtkVScale{.cdecl, + dynlib: gtklib, importc: "gtk_vscale_new".} +proc gtk_vscale_new_with_range*(min: gdouble, max: gdouble, step: gdouble): PGtkVScale{. + cdecl, dynlib: gtklib, importc: "gtk_vscale_new_with_range".} +proc GTK_TYPE_VSCROLLBAR*(): GType +proc GTK_VSCROLLBAR*(obj: pointer): PGtkVScrollbar +proc GTK_VSCROLLBAR_CLASS*(klass: pointer): PGtkVScrollbarClass +proc GTK_IS_VSCROLLBAR*(obj: pointer): bool +proc GTK_IS_VSCROLLBAR_CLASS*(klass: pointer): bool +proc GTK_VSCROLLBAR_GET_CLASS*(obj: pointer): PGtkVScrollbarClass +proc gtk_vscrollbar_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_vscrollbar_get_type".} +proc gtk_vscrollbar_new*(adjustment: PGtkAdjustment): PGtkVScrollbar{.cdecl, + dynlib: gtklib, importc: "gtk_vscrollbar_new".} +proc GTK_TYPE_VSEPARATOR*(): GType +proc GTK_VSEPARATOR*(obj: pointer): PGtkVSeparator +proc GTK_VSEPARATOR_CLASS*(klass: pointer): PGtkVSeparatorClass +proc GTK_IS_VSEPARATOR*(obj: pointer): bool +proc GTK_IS_VSEPARATOR_CLASS*(klass: pointer): bool +proc GTK_VSEPARATOR_GET_CLASS*(obj: pointer): PGtkVSeparatorClass +proc gtk_vseparator_get_type*(): TGtkType{.cdecl, dynlib: gtklib, + importc: "gtk_vseparator_get_type".} +proc gtk_vseparator_new*(): PGtkVSeparator{.cdecl, dynlib: gtklib, + importc: "gtk_vseparator_new".} +proc GTK_TYPE_OBJECT*(): GType = + result = gtk_object_get_type() + +proc GTK_CHECK_CAST*(instance: Pointer, g_type: GType): PGTypeInstance = + result = G_TYPE_CHECK_INSTANCE_CAST(instance, g_type) + +proc GTK_CHECK_CLASS_CAST*(g_class: pointer, g_type: GType): Pointer = + result = G_TYPE_CHECK_CLASS_CAST(g_class, g_type) + +proc GTK_CHECK_GET_CLASS*(instance: Pointer, g_type: GType): PGTypeClass = + result = G_TYPE_INSTANCE_GET_CLASS(instance, g_type) + +proc GTK_CHECK_TYPE*(instance: Pointer, g_type: GType): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(instance, g_type) + +proc GTK_CHECK_CLASS_TYPE*(g_class: pointer, g_type: GType): bool = + result = G_TYPE_CHECK_CLASS_TYPE(g_class, g_type) + +proc GTK_OBJECT*(anObject: pointer): PGtkObject = + result = cast[PGtkObject](GTK_CHECK_CAST(anObject, GTK_TYPE_OBJECT())) + +proc GTK_OBJECT_CLASS*(klass: pointer): PGtkObjectClass = + result = cast[PGtkObjectClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_OBJECT())) + +proc GTK_IS_OBJECT*(anObject: pointer): bool = + result = GTK_CHECK_TYPE(anObject, GTK_TYPE_OBJECT()) + +proc GTK_IS_OBJECT_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_OBJECT()) + +proc GTK_OBJECT_GET_CLASS*(anObject: pointer): PGtkObjectClass = + result = cast[PGtkObjectClass](GTK_CHECK_GET_CLASS(anObject, GTK_TYPE_OBJECT())) + +proc GTK_OBJECT_TYPE*(anObject: pointer): GType = + result = G_TYPE_FROM_INSTANCE(anObject) + +proc GTK_OBJECT_TYPE_NAME*(anObject: pointer): cstring = + result = g_type_name(GTK_OBJECT_TYPE(anObject)) + +proc GTK_OBJECT_FLAGS*(obj: pointer): guint32 = + result = (GTK_OBJECT(obj)).flags + +proc GTK_OBJECT_FLOATING*(obj: pointer): gboolean = + result = ((GTK_OBJECT_FLAGS(obj)) and cint(GTK_FLOATING)) != 0'i32 + +proc GTK_OBJECT_SET_FLAGS*(obj: pointer, flag: guint32) = + GTK_OBJECT(obj).flags = GTK_OBJECT(obj).flags or flag + +proc GTK_OBJECT_UNSET_FLAGS*(obj: pointer, flag: guint32) = + GTK_OBJECT(obj) . flags = GTK_OBJECT(obj). flags and not (flag) + +proc gtk_object_data_try_key*(`string`: cstring): TGQuark = + result = g_quark_try_string(`string`) + +proc gtk_object_data_force_id*(`string`: cstring): TGQuark = + result = g_quark_from_string(`string`) + +proc GTK_CLASS_NAME*(`class`: pointer): cstring = + result = g_type_name(G_TYPE_FROM_CLASS(`class`)) + +proc GTK_CLASS_TYPE*(`class`: pointer): GType = + result = G_TYPE_FROM_CLASS(`class`) + +proc GTK_TYPE_IS_OBJECT*(thetype: GType): gboolean = + result = g_type_is_a(thetype, GTK_TYPE_OBJECT()) + +proc GTK_TYPE_IDENTIFIER*(): GType = + result = gtk_identifier_get_type() + +proc GTK_SIGNAL_FUNC*(f: pointer): TGtkSignalFunc = + result = cast[TGtkSignalFunc](f) + +proc gtk_type_name*(thetype: GType): cstring = + result = g_type_name(thetype) + +proc gtk_type_from_name*(name: cstring): GType = + result = g_type_from_name(name) + +proc gtk_type_parent*(thetype: GType): GType = + result = g_type_parent(thetype) + +proc gtk_type_is_a*(thetype, is_a_type: GType): gboolean = + result = g_type_is_a(thetype, is_a_type) + +proc GTK_FUNDAMENTAL_TYPE*(thetype: GType): GType = + result = G_TYPE_FUNDAMENTAL(thetype) + +proc GTK_VALUE_CHAR*(a: TGtkArg): gchar = + var a = a + Result = cast[ptr gchar](addr(a.d))^ + +proc GTK_VALUE_UCHAR*(a: TGtkArg): guchar = + var a = a + Result = cast[ptr guchar](addr(a.d))^ + +proc GTK_VALUE_BOOL*(a: TGtkArg): gboolean = + var a = a + Result = cast[ptr gboolean](addr(a.d))^ + +proc GTK_VALUE_INT*(a: TGtkArg): gint = + var a = a + Result = cast[ptr gint](addr(a.d))^ + +proc GTK_VALUE_UINT*(a: TGtkArg): guint = + var a = a + Result = cast[ptr guint](addr(a.d))^ + +proc GTK_VALUE_LONG*(a: TGtkArg): glong = + var a = a + Result = cast[ptr glong](addr(a.d))^ + +proc GTK_VALUE_ULONG*(a: TGtkArg): gulong = + var a = a + Result = cast[ptr gulong](addr(a.d))^ + +proc GTK_VALUE_FLOAT*(a: TGtkArg): gfloat = + var a = a + Result = cast[ptr gfloat](addr(a.d))^ + +proc GTK_VALUE_DOUBLE*(a: TGtkArg): gdouble = + var a = a + Result = cast[ptr gdouble](addr(a.d))^ + +proc GTK_VALUE_STRING*(a: TGtkArg): cstring = + var a = a + Result = cast[ptr cstring](addr(a.d))^ + +proc GTK_VALUE_ENUM*(a: TGtkArg): gint = + var a = a + Result = cast[ptr gint](addr(a.d))^ + +proc GTK_VALUE_FLAGS*(a: TGtkArg): guint = + var a = a + Result = cast[ptr guint](addr(a.d))^ + +proc GTK_VALUE_BOXED*(a: TGtkArg): gpointer = + var a = a + Result = cast[ptr gpointer](addr(a.d))^ + +proc GTK_VALUE_OBJECT*(a: TGtkArg): PGtkObject = + var a = a + Result = cast[ptr PGtkObject](addr(a.d))^ + +proc GTK_VALUE_POINTER*(a: TGtkArg): GPointer = + var a = a + Result = cast[ptr gpointer](addr(a.d))^ + +proc GTK_VALUE_SIGNAL*(a: TGtkArg): TGtkArgSignalData = + var a = a + Result = cast[ptr TGtkArgSignalData](addr(a.d))^ + +proc GTK_RETLOC_CHAR*(a: TGtkArg): cstring = + var a = a + Result = cast[ptr cstring](addr(a.d))^ + +proc GTK_RETLOC_UCHAR*(a: TGtkArg): Pguchar = + var a = a + Result = cast[ptr pguchar](addr(a.d))^ + +proc GTK_RETLOC_BOOL*(a: TGtkArg): Pgboolean = + var a = a + Result = cast[ptr pgboolean](addr(a.d))^ + +proc GTK_RETLOC_INT*(a: TGtkArg): Pgint = + var a = a + Result = cast[ptr pgint](addr(a.d))^ + +proc GTK_RETLOC_UINT*(a: TGtkArg): Pguint = + var a = a + Result = cast[ptr pguint](addr(a.d))^ + +proc GTK_RETLOC_LONG*(a: TGtkArg): Pglong = + var a = a + Result = cast[ptr pglong](addr(a.d))^ + +proc GTK_RETLOC_ULONG*(a: TGtkArg): Pgulong = + var a = a + Result = cast[ptr pgulong](addr(a.d))^ + +proc GTK_RETLOC_FLOAT*(a: TGtkArg): Pgfloat = + var a = a + Result = cast[ptr pgfloat](addr(a.d))^ + +proc GTK_RETLOC_DOUBLE*(a: TGtkArg): Pgdouble = + var a = a + Result = cast[ptr pgdouble](addr(a.d))^ + +proc GTK_RETLOC_STRING*(a: TGtkArg): Ppgchar = + var a = a + Result = cast[ptr Ppgchar](addr(a.d))^ + +proc GTK_RETLOC_ENUM*(a: TGtkArg): Pgint = + var a = a + Result = cast[ptr Pgint](addr(a.d))^ + +proc GTK_RETLOC_FLAGS*(a: TGtkArg): Pguint = + var a = a + Result = cast[ptr pguint](addr(a.d))^ + +proc GTK_RETLOC_BOXED*(a: TGtkArg): Pgpointer = + var a = a + Result = cast[ptr pgpointer](addr(a.d))^ + +proc GTK_RETLOC_OBJECT*(a: TGtkArg): PPGtkObject = + var a = a + Result = cast[ptr ppgtkobject](addr(a.d))^ + +proc GTK_RETLOC_POINTER*(a: TGtkArg): Pgpointer = + var a = a + Result = cast[ptr pgpointer](addr(a.d))^ + +proc GTK_TYPE_WIDGET*(): GType = + result = gtk_widget_get_type() + +proc GTK_WIDGET*(widget: pointer): PGtkWidget = + result = cast[PGtkWidget](GTK_CHECK_CAST(widget, GTK_TYPE_WIDGET())) + +proc GTK_WIDGET_CLASS*(klass: pointer): PGtkWidgetClass = + result = cast[PGtkWidgetClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_WIDGET())) + +proc GTK_IS_WIDGET*(widget: pointer): bool = + result = GTK_CHECK_TYPE(widget, GTK_TYPE_WIDGET()) + +proc GTK_IS_WIDGET_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_WIDGET()) + +proc GTK_WIDGET_GET_CLASS*(obj: pointer): PGtkWidgetClass = + result = cast[PGtkWidgetClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_WIDGET())) + +proc GTK_WIDGET_TYPE*(wid: pointer): GType = + result = GTK_OBJECT_TYPE(wid) + +proc GTK_WIDGET_STATE*(wid: pointer): int32 = + result = (GTK_WIDGET(wid)) . state + +proc GTK_WIDGET_SAVED_STATE*(wid: pointer): int32 = + result = (GTK_WIDGET(wid)) . saved_state + +proc GTK_WIDGET_FLAGS*(wid: pointer): guint32 = + result = GTK_OBJECT_FLAGS(wid) + +proc GTK_WIDGET_TOPLEVEL*(wid: pointer): gboolean = + result = ((GTK_WIDGET_FLAGS(wid)) and cint(GTK_TOPLEVEL)) != 0'i32 + +proc GTK_WIDGET_NO_WINDOW*(wid: pointer): gboolean = + result = ((GTK_WIDGET_FLAGS(wid)) and cint(GTK_NO_WINDOW)) != 0'i32 + +proc GTK_WIDGET_REALIZED*(wid: pointer): gboolean = + result = ((GTK_WIDGET_FLAGS(wid)) and cint(GTK_REALIZED)) != 0'i32 + +proc GTK_WIDGET_MAPPED*(wid: pointer): gboolean = + result = ((GTK_WIDGET_FLAGS(wid)) and cint(GTK_MAPPED)) != 0'i32 + +proc GTK_WIDGET_VISIBLE*(wid: pointer): gboolean = + result = ((GTK_WIDGET_FLAGS(wid)) and cint(GTK_VISIBLE)) != 0'i32 + +proc GTK_WIDGET_DRAWABLE*(wid: pointer): gboolean = + result = (GTK_WIDGET_VISIBLE(wid)) and (GTK_WIDGET_MAPPED(wid)) + +proc GTK_WIDGET_SENSITIVE*(wid: pointer): gboolean = + result = ((GTK_WIDGET_FLAGS(wid)) and cint(GTK_SENSITIVE)) != 0'i32 + +proc GTK_WIDGET_PARENT_SENSITIVE*(wid: pointer): gboolean = + result = ((GTK_WIDGET_FLAGS(wid)) and cint(GTK_PARENT_SENSITIVE)) != 0'i32 + +proc GTK_WIDGET_IS_SENSITIVE*(wid: pointer): gboolean = + result = (GTK_WIDGET_SENSITIVE(wid)) and (GTK_WIDGET_PARENT_SENSITIVE(wid)) + +proc GTK_WIDGET_CAN_FOCUS*(wid: pointer): gboolean = + result = ((GTK_WIDGET_FLAGS(wid)) and cint(GTK_CAN_FOCUS)) != 0'i32 + +proc GTK_WIDGET_HAS_FOCUS*(wid: pointer): gboolean = + result = ((GTK_WIDGET_FLAGS(wid)) and cint(GTK_HAS_FOCUS)) != 0'i32 + +proc GTK_WIDGET_CAN_DEFAULT*(wid: pointer): gboolean = + result = ((GTK_WIDGET_FLAGS(wid)) and cint(GTK_CAN_DEFAULT)) != 0'i32 + +proc GTK_WIDGET_HAS_DEFAULT*(wid: pointer): gboolean = + result = ((GTK_WIDGET_FLAGS(wid)) and cint(GTK_HAS_DEFAULT)) != 0'i32 + +proc GTK_WIDGET_HAS_GRAB*(wid: pointer): gboolean = + result = ((GTK_WIDGET_FLAGS(wid)) and cint(GTK_HAS_GRAB)) != 0'i32 + +proc GTK_WIDGET_RC_STYLE*(wid: pointer): gboolean = + result = ((GTK_WIDGET_FLAGS(wid)) and cint(GTK_RC_STYLE)) != 0'i32 + +proc GTK_WIDGET_COMPOSITE_CHILD*(wid: pointer): gboolean = + result = ((GTK_WIDGET_FLAGS(wid)) and cint(GTK_COMPOSITE_CHILD)) != 0'i32 + +proc GTK_WIDGET_APP_PAINTABLE*(wid: pointer): gboolean = + result = ((GTK_WIDGET_FLAGS(wid)) and cint(GTK_APP_PAINTABLE)) != 0'i32 + +proc GTK_WIDGET_RECEIVES_DEFAULT*(wid: pointer): gboolean = + result = ((GTK_WIDGET_FLAGS(wid)) and cint(GTK_RECEIVES_DEFAULT)) != 0'i32 + +proc GTK_WIDGET_DOUBLE_BUFFERED*(wid: pointer): gboolean = + result = ((GTK_WIDGET_FLAGS(wid)) and cint(GTK_DOUBLE_BUFFERED)) != 0'i32 + +proc GTK_TYPE_REQUISITION*(): GType = + result = gtk_requisition_get_type() + +proc x_set*(a: var TGtkWidgetAuxInfo): guint = + result = (a.flag0 and bm_TGtkWidgetAuxInfo_x_set) shr + bp_TGtkWidgetAuxInfo_x_set + +proc set_x_set*(a: var TGtkWidgetAuxInfo, `x_set`: guint) = + a.flag0 = a.flag0 or + (int16(`x_set` shl bp_TGtkWidgetAuxInfo_x_set) and + bm_TGtkWidgetAuxInfo_x_set) + +proc y_set*(a: var TGtkWidgetAuxInfo): guint = + result = (a.flag0 and bm_TGtkWidgetAuxInfo_y_set) shr + bp_TGtkWidgetAuxInfo_y_set + +proc set_y_set*(a: var TGtkWidgetAuxInfo, `y_set`: guint) = + a.flag0 = a.flag0 or + (int16(`y_set` shl bp_TGtkWidgetAuxInfo_y_set) and + bm_TGtkWidgetAuxInfo_y_set) + +proc gtk_widget_set_visual*(widget, visual: pointer) = + if (Widget != nil) and (visual != nil): nil + +proc gtk_widget_push_visual*(visual: pointer) = + if (visual != nil): nil + +proc gtk_widget_pop_visual*() = + nil + +proc gtk_widget_set_default_visual*(visual: pointer) = + if (visual != nil): nil + +proc gtk_widget_set_rc_style*(widget: pointer) = + gtk_widget_set_style(cast[PGtkWidget](widget), nil) + +proc gtk_widget_restore_default_style*(widget: pointer) = + gtk_widget_set_style(cast[PGtkWidget](widget), nil) + +proc GTK_WIDGET_SET_FLAGS*(wid: PGtkWidget, flags: TGtkWidgetFlags): TGtkWidgetFlags = + cast[pGtkObject](wid).flags = cast[pGtkObject](wid).flags or (flags) + result = cast[pGtkObject](wid).flags + +proc GTK_WIDGET_UNSET_FLAGS*(wid: PGtkWidget, flags: TGtkWidgetFlags): TGtkWidgetFlags = + cast[pGtkObject](wid).flags = cast[pGtkObject](wid).flags and (not (flags)) + result = cast[pGtkObject](wid).flags + +proc GTK_TYPE_MISC*(): GType = + result = gtk_misc_get_type() + +proc GTK_MISC*(obj: pointer): PGtkMisc = + result = cast[PGtkMisc](GTK_CHECK_CAST(obj, GTK_TYPE_MISC())) + +proc GTK_MISC_CLASS*(klass: pointer): PGtkMiscClass = + result = cast[PGtkMiscClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_MISC())) + +proc GTK_IS_MISC*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_MISC()) + +proc GTK_IS_MISC_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_MISC()) + +proc GTK_MISC_GET_CLASS*(obj: pointer): PGtkMiscClass = + result = cast[PGtkMiscClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_MISC())) + +proc GTK_TYPE_ACCEL_GROUP*(): GType = + result = gtk_accel_group_get_type() + +proc GTK_ACCEL_GROUP*(anObject: pointer): PGtkAccelGroup = + result = cast[PGtkAccelGroup](G_TYPE_CHECK_INSTANCE_CAST(anObject, + GTK_TYPE_ACCEL_GROUP())) + +proc GTK_ACCEL_GROUP_CLASS*(klass: pointer): PGtkAccelGroupClass = + result = cast[PGtkAccelGroupClass](G_TYPE_CHECK_CLASS_CAST(klass, + GTK_TYPE_ACCEL_GROUP())) + +proc GTK_IS_ACCEL_GROUP*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GTK_TYPE_ACCEL_GROUP()) + +proc GTK_IS_ACCEL_GROUP_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GTK_TYPE_ACCEL_GROUP()) + +proc GTK_ACCEL_GROUP_GET_CLASS*(obj: pointer): PGtkAccelGroupClass = + result = cast[PGtkAccelGroupClass](G_TYPE_INSTANCE_GET_CLASS(obj, + GTK_TYPE_ACCEL_GROUP())) + +proc accel_flags*(a: var TGtkAccelKey): guint = + result = (a.flag0 and bm_TGtkAccelKey_accel_flags) shr + bp_TGtkAccelKey_accel_flags + +proc set_accel_flags*(a: var TGtkAccelKey, `accel_flags`: guint) = + a.flag0 = a.flag0 or + (int16(`accel_flags` shl bp_TGtkAccelKey_accel_flags) and + bm_TGtkAccelKey_accel_flags) + +proc gtk_accel_group_ref*(AccelGroup: PGtkAccelGroup) = + discard g_object_ref(AccelGroup) + +proc gtk_accel_group_unref*(AccelGroup: PGtkAccelGroup) = + g_object_unref(AccelGroup) + +proc GTK_TYPE_CONTAINER*(): GType = + result = gtk_container_get_type() + +proc GTK_CONTAINER*(obj: pointer): PGtkContainer = + result = cast[PGtkContainer](GTK_CHECK_CAST(obj, GTK_TYPE_CONTAINER())) + +proc GTK_CONTAINER_CLASS*(klass: pointer): PGtkContainerClass = + result = cast[PGtkContainerClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_CONTAINER())) + +proc GTK_IS_CONTAINER*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_CONTAINER()) + +proc GTK_IS_CONTAINER_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_CONTAINER()) + +proc GTK_CONTAINER_GET_CLASS*(obj: pointer): PGtkContainerClass = + result = cast[PGtkContainerClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_CONTAINER())) + +proc GTK_IS_RESIZE_CONTAINER*(widget: pointer): bool = + result = (GTK_IS_CONTAINER(widget)) and + ((resize_mode(cast[PGtkContainer](widget))) != cint(GTK_RESIZE_PARENT)) + +proc border_width*(a: var TGtkContainer): guint = + result = (a.GtkContainer_flag0 and bm_TGtkContainer_border_width) shr + bp_TGtkContainer_border_width + +proc set_border_width*(a: var TGtkContainer, `border_width`: guint) = + a.GtkContainer_flag0 = a.GtkContainer_flag0 or + ((`border_width` shl bp_TGtkContainer_border_width) and + bm_TGtkContainer_border_width) + +proc need_resize*(a: var TGtkContainer): guint = + result = (a.GtkContainer_flag0 and bm_TGtkContainer_need_resize) shr + bp_TGtkContainer_need_resize + +proc set_need_resize*(a: var TGtkContainer, `need_resize`: guint) = + a.GtkContainer_flag0 = a.GtkContainer_flag0 or + ((`need_resize` shl bp_TGtkContainer_need_resize) and + bm_TGtkContainer_need_resize) + +proc resize_mode*(a: PGtkContainer): guint = + result = (a.GtkContainer_flag0 and bm_TGtkContainer_resize_mode) shr + bp_TGtkContainer_resize_mode + +proc set_resize_mode*(a: var TGtkContainer, `resize_mode`: guint) = + a.GtkContainerflag0 = a.GtkContainerflag0 or + ((`resize_mode` shl bp_TGtkContainer_resize_mode) and + bm_TGtkContainer_resize_mode) + +proc reallocate_redraws*(a: var TGtkContainer): guint = + result = (a.GtkContainerflag0 and bm_TGtkContainer_reallocate_redraws) shr + bp_TGtkContainer_reallocate_redraws + +proc set_reallocate_redraws*(a: var TGtkContainer, `reallocate_redraws`: guint) = + a.GtkContainerflag0 = a.GtkContainerflag0 or + ((`reallocate_redraws` shl bp_TGtkContainer_reallocate_redraws) and + bm_TGtkContainer_reallocate_redraws) + +proc has_focus_chain*(a: var TGtkContainer): guint = + result = (a.GtkContainerflag0 and bm_TGtkContainer_has_focus_chain) shr + bp_TGtkContainer_has_focus_chain + +proc set_has_focus_chain*(a: var TGtkContainer, `has_focus_chain`: guint) = + a.GtkContainerflag0 = a.GtkContainerflag0 or + ((`has_focus_chain` shl bp_TGtkContainer_has_focus_chain) and + bm_TGtkContainer_has_focus_chain) + +proc GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID*(anObject: pointer, + property_id: guint, pspec: pointer) = + write(stdout, "WARNING: invalid child property id\n") + +proc GTK_TYPE_BIN*(): GType = + result = gtk_bin_get_type() + +proc GTK_BIN*(obj: pointer): PGtkBin = + result = cast[PGtkBin](GTK_CHECK_CAST(obj, GTK_TYPE_BIN())) + +proc GTK_BIN_CLASS*(klass: pointer): PGtkBinClass = + result = cast[PGtkBinClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_BIN())) + +proc GTK_IS_BIN*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_BIN()) + +proc GTK_IS_BIN_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_BIN()) + +proc GTK_BIN_GET_CLASS*(obj: pointer): PGtkBinClass = + result = cast[PGtkBinClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_BIN())) + +proc GTK_TYPE_WINDOW*(): GType = + result = gtk_window_get_type() + +proc GTK_WINDOW*(obj: pointer): PGtkWindow = + result = cast[PGtkWindow](GTK_CHECK_CAST(obj, GTK_TYPE_WINDOW())) + +proc GTK_WINDOW_CLASS*(klass: pointer): PGtkWindowClass = + result = cast[PGtkWindowClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_WINDOW())) + +proc GTK_IS_WINDOW*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_WINDOW()) + +proc GTK_IS_WINDOW_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_WINDOW()) + +proc GTK_WINDOW_GET_CLASS*(obj: pointer): PGtkWindowClass = + result = cast[PGtkWindowClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_WINDOW())) + +proc allow_shrink*(a: var TGtkWindow): guint = + result = (a.GtkWindow_flag0 and bm_TGtkWindow_allow_shrink) shr + bp_TGtkWindow_allow_shrink + +proc set_allow_shrink*(a: var TGtkWindow, `allow_shrink`: guint) = + a.GtkWindow_flag0 = a.GtkWindow_flag0 or + ((`allow_shrink` shl bp_TGtkWindow_allow_shrink) and + bm_TGtkWindow_allow_shrink) + +proc allow_grow*(a: var TGtkWindow): guint = + result = (a.GtkWindow_flag0 and bm_TGtkWindow_allow_grow) shr + bp_TGtkWindow_allow_grow + +proc set_allow_grow*(a: var TGtkWindow, `allow_grow`: guint) = + a.GtkWindow_flag0 = a.GtkWindow_flag0 or + ((`allow_grow` shl bp_TGtkWindow_allow_grow) and + bm_TGtkWindow_allow_grow) + +proc configure_notify_received*(a: var TGtkWindow): guint = + result = (a.GtkWindow_flag0 and bm_TGtkWindow_configure_notify_received) shr + bp_TGtkWindow_configure_notify_received + +proc set_configure_notify_received*(a: var TGtkWindow, + `configure_notify_received`: guint) = + a.GtkWindow_flag0 = a.GtkWindow_flag0 or + ((`configure_notify_received` shl + bp_TGtkWindow_configure_notify_received) and + bm_TGtkWindow_configure_notify_received) + +proc need_default_position*(a: var TGtkWindow): guint = + result = (a.GtkWindow_flag0 and bm_TGtkWindow_need_default_position) shr + bp_TGtkWindow_need_default_position + +proc set_need_default_position*(a: var TGtkWindow, + `need_default_position`: guint) = + a.GtkWindow_flag0 = a.GtkWindow_flag0 or + ((`need_default_position` shl bp_TGtkWindow_need_default_position) and + bm_TGtkWindow_need_default_position) + +proc need_default_size*(a: var TGtkWindow): guint = + result = (a.GtkWindow_flag0 and bm_TGtkWindow_need_default_size) shr + bp_TGtkWindow_need_default_size + +proc set_need_default_size*(a: var TGtkWindow, `need_default_size`: guint) = + a.GtkWindow_flag0 = a.GtkWindow_flag0 or + ((`need_default_size` shl bp_TGtkWindow_need_default_size) and + bm_TGtkWindow_need_default_size) + +proc position*(a: var TGtkWindow): guint = + result = (a.GtkWindow_flag0 and bm_TGtkWindow_position) shr bp_TGtkWindow_position + +proc set_position*(a: var TGtkWindow, `position`: guint) = + a.GtkWindow_flag0 = a.GtkWindow_flag0 or + ((`position` shl bp_TGtkWindow_position) and bm_TGtkWindow_position) + +proc get_type*(a: var TGtkWindow): guint = + result = (a.GtkWindow_flag0 and bm_TGtkWindow_type) shr bp_TGtkWindow_type + +proc set_type*(a: var TGtkWindow, `type`: guint) = + a.GtkWindow_flag0 = a.GtkWindow_flag0 or + ((`type` shl bp_TGtkWindow_type) and bm_TGtkWindow_type) + +proc has_user_ref_count*(a: var TGtkWindow): guint = + result = (a.GtkWindow_flag0 and bm_TGtkWindow_has_user_ref_count) shr + bp_TGtkWindow_has_user_ref_count + +proc set_has_user_ref_count*(a: var TGtkWindow, `has_user_ref_count`: guint) = + a.GtkWindow_flag0 = a.GtkWindow_flag0 or + ((`has_user_ref_count` shl bp_TGtkWindow_has_user_ref_count) and + bm_TGtkWindow_has_user_ref_count) + +proc has_focus*(a: var TGtkWindow): guint = + result = (a.GtkWindow_flag0 and bm_TGtkWindow_has_focus) shr bp_TGtkWindow_has_focus + +proc set_has_focus*(a: var TGtkWindow, `has_focus`: guint) = + a.GtkWindow_flag0 = a.GtkWindow_flag0 or + ((`has_focus` shl bp_TGtkWindow_has_focus) and bm_TGtkWindow_has_focus) + +proc modal*(a: var TGtkWindow): guint = + result = (a.GtkWindow_flag0 and bm_TGtkWindow_modal) shr bp_TGtkWindow_modal + +proc set_modal*(a: var TGtkWindow, `modal`: guint) = + a.GtkWindow_flag0 = a.GtkWindow_flag0 or + ((`modal` shl bp_TGtkWindow_modal) and bm_TGtkWindow_modal) + +proc destroy_with_parent*(a: var TGtkWindow): guint = + result = (a.GtkWindow_flag0 and bm_TGtkWindow_destroy_with_parent) shr + bp_TGtkWindow_destroy_with_parent + +proc set_destroy_with_parent*(a: var TGtkWindow, `destroy_with_parent`: guint) = + a.GtkWindowflag0 = a.GtkWindowflag0 or + ((`destroy_with_parent` shl bp_TGtkWindow_destroy_with_parent) and + bm_TGtkWindow_destroy_with_parent) + +proc has_frame*(a: var TGtkWindow): guint = + result = (a.GtkWindowflag0 and bm_TGtkWindow_has_frame) shr bp_TGtkWindow_has_frame + +proc set_has_frame*(a: var TGtkWindow, `has_frame`: guint) = + a.GtkWindowflag0 = a.GtkWindowflag0 or + ((`has_frame` shl bp_TGtkWindow_has_frame) and bm_TGtkWindow_has_frame) + +proc iconify_initially*(a: var TGtkWindow): guint = + result = (a.GtkWindowflag0 and bm_TGtkWindow_iconify_initially) shr + bp_TGtkWindow_iconify_initially + +proc set_iconify_initially*(a: var TGtkWindow, `iconify_initially`: guint) = + a.GtkWindowflag0 = a.GtkWindowflag0 or + ((`iconify_initially` shl bp_TGtkWindow_iconify_initially) and + bm_TGtkWindow_iconify_initially) + +proc stick_initially*(a: var TGtkWindow): guint = + result = (a.GtkWindowflag0 and bm_TGtkWindow_stick_initially) shr + bp_TGtkWindow_stick_initially + +proc set_stick_initially*(a: var TGtkWindow, `stick_initially`: guint) = + a.GtkWindowflag0 = a.GtkWindowflag0 or + ((`stick_initially` shl bp_TGtkWindow_stick_initially) and + bm_TGtkWindow_stick_initially) + +proc maximize_initially*(a: var TGtkWindow): guint = + result = (a.GtkWindowflag0 and bm_TGtkWindow_maximize_initially) shr + bp_TGtkWindow_maximize_initially + +proc set_maximize_initially*(a: var TGtkWindow, `maximize_initially`: guint) = + a.GtkWindowflag0 = a.GtkWindowflag0 or + ((`maximize_initially` shl bp_TGtkWindow_maximize_initially) and + bm_TGtkWindow_maximize_initially) + +proc decorated*(a: var TGtkWindow): guint = + result = (a.GtkWindowflag0 and bm_TGtkWindow_decorated) shr bp_TGtkWindow_decorated + +proc set_decorated*(a: var TGtkWindow, `decorated`: guint) = + a.GtkWindowflag0 = a.GtkWindowflag0 or + ((`decorated` shl bp_TGtkWindow_decorated) and bm_TGtkWindow_decorated) + +proc type_hint*(a: var TGtkWindow): guint = + result = (a.GtkWindowflag0 and bm_TGtkWindow_type_hint) shr bp_TGtkWindow_type_hint + +proc set_type_hint*(a: var TGtkWindow, `type_hint`: guint) = + a.GtkWindowflag0 = a.GtkWindowflag0 or + ((`type_hint` shl bp_TGtkWindow_type_hint) and bm_TGtkWindow_type_hint) + +proc gravity*(a: var TGtkWindow): guint = + result = (a.GtkWindowflag0 and bm_TGtkWindow_gravity) shr bp_TGtkWindow_gravity + +proc set_gravity*(a: var TGtkWindow, `gravity`: guint) = + a.GtkWindowflag0 = a.GtkWindowflag0 or + ((`gravity` shl bp_TGtkWindow_gravity) and bm_TGtkWindow_gravity) + +proc GTK_TYPE_WINDOW_GROUP*(): GType = + result = gtk_window_group_get_type() + +proc GTK_WINDOW_GROUP*(anObject: pointer): PGtkWindowGroup = + result = cast[PGtkWindowGroup](G_TYPE_CHECK_INSTANCE_CAST(anObject, + GTK_TYPE_WINDOW_GROUP())) + +proc GTK_WINDOW_GROUP_CLASS*(klass: pointer): PGtkWindowGroupClass = + result = cast[PGtkWindowGroupClass](G_TYPE_CHECK_CLASS_CAST(klass, + GTK_TYPE_WINDOW_GROUP())) + +proc GTK_IS_WINDOW_GROUP*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GTK_TYPE_WINDOW_GROUP()) + +proc GTK_IS_WINDOW_GROUP_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GTK_TYPE_WINDOW_GROUP()) + +proc GTK_WINDOW_GROUP_GET_CLASS*(obj: pointer): PGtkWindowGroupClass = + result = cast[PGtkWindowGroupClass](G_TYPE_INSTANCE_GET_CLASS(obj, + GTK_TYPE_WINDOW_GROUP())) + +proc gtk_window_position*(window: PGtkWindow, position: TGtkWindowPosition) = + gtk_window_set_position(window, position) + +proc GTK_TYPE_LABEL*(): GType = + result = gtk_label_get_type() + +proc GTK_LABEL*(obj: pointer): PGtkLabel = + result = cast[PGtkLabel](GTK_CHECK_CAST(obj, GTK_TYPE_LABEL())) + +proc GTK_LABEL_CLASS*(klass: pointer): PGtkLabelClass = + result = cast[PGtkLabelClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_LABEL())) + +proc GTK_IS_LABEL*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_LABEL()) + +proc GTK_IS_LABEL_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_LABEL()) + +proc GTK_LABEL_GET_CLASS*(obj: pointer): PGtkLabelClass = + result = cast[PGtkLabelClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_LABEL())) + +proc jtype*(a: var TGtkLabel): guint = + result = (a.GtkLabelflag0 and bm_TGtkLabel_jtype) shr bp_TGtkLabel_jtype + +proc set_jtype*(a: var TGtkLabel, `jtype`: guint) = + a.GtkLabelflag0 = a.GtkLabelflag0 or + (int16(`jtype` shl bp_TGtkLabel_jtype) and bm_TGtkLabel_jtype) + +proc wrap*(a: var TGtkLabel): guint = + result = (a.GtkLabelflag0 and bm_TGtkLabel_wrap) shr bp_TGtkLabel_wrap + +proc set_wrap*(a: var TGtkLabel, `wrap`: guint) = + a.GtkLabelflag0 = a.GtkLabelflag0 or (int16(`wrap` shl bp_TGtkLabel_wrap) and bm_TGtkLabel_wrap) + +proc use_underline*(a: var TGtkLabel): guint = + result = (a.GtkLabelflag0 and bm_TGtkLabel_use_underline) shr + bp_TGtkLabel_use_underline + +proc set_use_underline*(a: var TGtkLabel, `use_underline`: guint) = + a.GtkLabelflag0 = a.GtkLabelflag0 or + (int16(`use_underline` shl bp_TGtkLabel_use_underline) and + bm_TGtkLabel_use_underline) + +proc use_markup*(a: var TGtkLabel): guint = + result = (a.GtkLabelflag0 and bm_TGtkLabel_use_markup) shr bp_TGtkLabel_use_markup + +proc set_use_markup*(a: var TGtkLabel, `use_markup`: guint) = + a.GtkLabelflag0 = a.GtkLabelflag0 or + (int16(`use_markup` shl bp_TGtkLabel_use_markup) and bm_TGtkLabel_use_markup) + +proc GTK_TYPE_ACCEL_LABEL*(): GType = + result = gtk_accel_label_get_type() + +proc GTK_ACCEL_LABEL*(obj: pointer): PGtkAccelLabel = + result = cast[PGtkAccelLabel](GTK_CHECK_CAST(obj, GTK_TYPE_ACCEL_LABEL())) + +proc GTK_ACCEL_LABEL_CLASS*(klass: pointer): PGtkAccelLabelClass = + result = cast[PGtkAccelLabelClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_ACCEL_LABEL())) + +proc GTK_IS_ACCEL_LABEL*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_ACCEL_LABEL()) + +proc GTK_IS_ACCEL_LABEL_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_ACCEL_LABEL()) + +proc GTK_ACCEL_LABEL_GET_CLASS*(obj: pointer): PGtkAccelLabelClass = + result = cast[PGtkAccelLabelClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_ACCEL_LABEL())) + +proc latin1_to_char*(a: var TGtkAccelLabelClass): guint = + result = (a.GtkAccelLabelClassflag0 and bm_TGtkAccelLabelClass_latin1_to_char) shr + bp_TGtkAccelLabelClass_latin1_to_char + +proc set_latin1_to_char*(a: var TGtkAccelLabelClass, `latin1_to_char`: guint) = + a.GtkAccelLabelClassflag0 = a.GtkAccelLabelClassflag0 or + (int16(`latin1_to_char` shl bp_TGtkAccelLabelClass_latin1_to_char) and + bm_TGtkAccelLabelClass_latin1_to_char) + +proc gtk_accel_label_accelerator_width*(accel_label: PGtkAccelLabel): guint = + result = gtk_accel_label_get_accel_width(accel_label) + +proc GTK_TYPE_ACCESSIBLE*(): GType = + result = gtk_accessible_get_type() + +proc GTK_ACCESSIBLE*(obj: pointer): PGtkAccessible = + result = cast[PGtkAccessible](GTK_CHECK_CAST(obj, GTK_TYPE_ACCESSIBLE())) + +proc GTK_ACCESSIBLE_CLASS*(klass: pointer): PGtkAccessibleClass = + result = cast[PGtkAccessibleClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_ACCESSIBLE())) + +proc GTK_IS_ACCESSIBLE*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_ACCESSIBLE()) + +proc GTK_IS_ACCESSIBLE_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_ACCESSIBLE()) + +proc GTK_ACCESSIBLE_GET_CLASS*(obj: pointer): PGtkAccessibleClass = + result = cast[PGtkAccessibleClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_ACCESSIBLE())) + +proc GTK_TYPE_ADJUSTMENT*(): GType = + result = gtk_adjustment_get_type() + +proc GTK_ADJUSTMENT*(obj: pointer): PGtkAdjustment = + result = cast[PGtkAdjustment](GTK_CHECK_CAST(obj, GTK_TYPE_ADJUSTMENT())) + +proc GTK_ADJUSTMENT_CLASS*(klass: pointer): PGtkAdjustmentClass = + result = cast[PGtkAdjustmentClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_ADJUSTMENT())) + +proc GTK_IS_ADJUSTMENT*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_ADJUSTMENT()) + +proc GTK_IS_ADJUSTMENT_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_ADJUSTMENT()) + +proc GTK_ADJUSTMENT_GET_CLASS*(obj: pointer): PGtkAdjustmentClass = + result = cast[PGtkAdjustmentClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_ADJUSTMENT())) + +proc GTK_TYPE_ALIGNMENT*(): GType = + result = gtk_alignment_get_type() + +proc GTK_ALIGNMENT*(obj: pointer): PGtkAlignment = + result = cast[PGtkAlignment](GTK_CHECK_CAST(obj, GTK_TYPE_ALIGNMENT())) + +proc GTK_ALIGNMENT_CLASS*(klass: pointer): PGtkAlignmentClass = + result = cast[PGtkAlignmentClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_ALIGNMENT())) + +proc GTK_IS_ALIGNMENT*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_ALIGNMENT()) + +proc GTK_IS_ALIGNMENT_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_ALIGNMENT()) + +proc GTK_ALIGNMENT_GET_CLASS*(obj: pointer): PGtkAlignmentClass = + result = cast[PGtkAlignmentClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_ALIGNMENT())) + +proc GTK_TYPE_FRAME*(): GType = + result = gtk_frame_get_type() + +proc GTK_FRAME*(obj: pointer): PGtkFrame = + result = cast[PGtkFrame](GTK_CHECK_CAST(obj, GTK_TYPE_FRAME())) + +proc GTK_FRAME_CLASS*(klass: pointer): PGtkFrameClass = + result = cast[PGtkFrameClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_FRAME())) + +proc GTK_IS_FRAME*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_FRAME()) + +proc GTK_IS_FRAME_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_FRAME()) + +proc GTK_FRAME_GET_CLASS*(obj: pointer): PGtkFrameClass = + result = cast[PGtkFrameClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_FRAME())) + +proc GTK_TYPE_ASPECT_FRAME*(): GType = + result = gtk_aspect_frame_get_type() + +proc GTK_ASPECT_FRAME*(obj: pointer): PGtkAspectFrame = + result = cast[PGtkAspectFrame](GTK_CHECK_CAST(obj, GTK_TYPE_ASPECT_FRAME())) + +proc GTK_ASPECT_FRAME_CLASS*(klass: pointer): PGtkAspectFrameClass = + result = cast[PGtkAspectFrameClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_ASPECT_FRAME())) + +proc GTK_IS_ASPECT_FRAME*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_ASPECT_FRAME()) + +proc GTK_IS_ASPECT_FRAME_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_ASPECT_FRAME()) + +proc GTK_ASPECT_FRAME_GET_CLASS*(obj: pointer): PGtkAspectFrameClass = + result = cast[PGtkAspectFrameClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_ASPECT_FRAME())) + +proc GTK_TYPE_ARROW*(): GType = + result = gtk_arrow_get_type() + +proc GTK_ARROW*(obj: pointer): PGtkArrow = + result = cast[PGtkArrow](GTK_CHECK_CAST(obj, GTK_TYPE_ARROW())) + +proc GTK_ARROW_CLASS*(klass: pointer): PGtkArrowClass = + result = cast[PGtkArrowClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_ARROW())) + +proc GTK_IS_ARROW*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_ARROW()) + +proc GTK_IS_ARROW_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_ARROW()) + +proc GTK_ARROW_GET_CLASS*(obj: pointer): PGtkArrowClass = + result = cast[PGtkArrowClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_ARROW())) + +proc parsed*(a: var TGtkBindingSet): guint = + result = (a.flag0 and bm_TGtkBindingSet_parsed) shr + bp_TGtkBindingSet_parsed + +proc set_parsed*(a: var TGtkBindingSet, `parsed`: guint) = + a.flag0 = a.flag0 or + (int16(`parsed` shl bp_TGtkBindingSet_parsed) and bm_TGtkBindingSet_parsed) + +proc destroyed*(a: var TGtkBindingEntry): guint = + result = (a.flag0 and bm_TGtkBindingEntry_destroyed) shr + bp_TGtkBindingEntry_destroyed + +proc set_destroyed*(a: var TGtkBindingEntry, `destroyed`: guint) = + a.flag0 = a.flag0 or + (int16(`destroyed` shl bp_TGtkBindingEntry_destroyed) and + bm_TGtkBindingEntry_destroyed) + +proc in_emission*(a: var TGtkBindingEntry): guint = + result = (a.flag0 and bm_TGtkBindingEntry_in_emission) shr + bp_TGtkBindingEntry_in_emission + +proc set_in_emission*(a: var TGtkBindingEntry, `in_emission`: guint) = + a.flag0 = a.flag0 or + (int16(`in_emission` shl bp_TGtkBindingEntry_in_emission) and + bm_TGtkBindingEntry_in_emission) + +proc gtk_binding_entry_add*(binding_set: PGtkBindingSet, keyval: guint, + modifiers: TGdkModifierType) = + gtk_binding_entry_clear(binding_set, keyval, modifiers) + +proc GTK_TYPE_BOX*(): GType = + result = gtk_box_get_type() + +proc GTK_BOX*(obj: pointer): PGtkBox = + result = cast[PGtkBox](GTK_CHECK_CAST(obj, GTK_TYPE_BOX())) + +proc GTK_BOX_CLASS*(klass: pointer): PGtkBoxClass = + result = cast[PGtkBoxClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_BOX())) + +proc GTK_IS_BOX*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_BOX()) + +proc GTK_IS_BOX_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_BOX()) + +proc GTK_BOX_GET_CLASS*(obj: pointer): PGtkBoxClass = + result = cast[PGtkBoxClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_BOX())) + +proc homogeneous*(a: var TGtkBox): guint = + result = (a.GtkBoxflag0 and bm_TGtkBox_homogeneous) shr bp_TGtkBox_homogeneous + +proc set_homogeneous*(a: var TGtkBox, `homogeneous`: guint) = + a.GtkBoxflag0 = a.GtkBoxflag0 or + (int16(`homogeneous` shl bp_TGtkBox_homogeneous) and bm_TGtkBox_homogeneous) + +proc expand*(a: var TGtkBoxChild): guint = + result = (a.flag0 and bm_TGtkBoxChild_expand) shr bp_TGtkBoxChild_expand + +proc set_expand*(a: var TGtkBoxChild, `expand`: guint) = + a.flag0 = a.flag0 or + (int16(`expand` shl bp_TGtkBoxChild_expand) and bm_TGtkBoxChild_expand) + +proc fill*(a: var TGtkBoxChild): guint = + result = (a.flag0 and bm_TGtkBoxChild_fill) shr bp_TGtkBoxChild_fill + +proc set_fill*(a: var TGtkBoxChild, `fill`: guint) = + a.flag0 = a.flag0 or + (int16(`fill` shl bp_TGtkBoxChild_fill) and bm_TGtkBoxChild_fill) + +proc pack*(a: var TGtkBoxChild): guint = + result = (a.flag0 and bm_TGtkBoxChild_pack) shr bp_TGtkBoxChild_pack + +proc set_pack*(a: var TGtkBoxChild, `pack`: guint) = + a.flag0 = a.flag0 or + (int16(`pack` shl bp_TGtkBoxChild_pack) and bm_TGtkBoxChild_pack) + +proc is_secondary*(a: var TGtkBoxChild): guint = + result = (a.flag0 and bm_TGtkBoxChild_is_secondary) shr + bp_TGtkBoxChild_is_secondary + +proc set_is_secondary*(a: var TGtkBoxChild, `is_secondary`: guint) = + a.flag0 = a.flag0 or + (int16(`is_secondary` shl bp_TGtkBoxChild_is_secondary) and + bm_TGtkBoxChild_is_secondary) + +proc GTK_TYPE_BUTTON_BOX*(): GType = + result = gtk_button_box_get_type() + +proc GTK_BUTTON_BOX*(obj: pointer): PGtkButtonBox = + result = cast[PGtkButtonBox](GTK_CHECK_CAST(obj, GTK_TYPE_BUTTON_BOX())) + +proc GTK_BUTTON_BOX_CLASS*(klass: pointer): PGtkButtonBoxClass = + result = cast[PGtkButtonBoxClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_BUTTON_BOX())) + +proc GTK_IS_BUTTON_BOX*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_BUTTON_BOX()) + +proc GTK_IS_BUTTON_BOX_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_BUTTON_BOX()) + +proc GTK_BUTTON_BOX_GET_CLASS*(obj: pointer): PGtkButtonBoxClass = + result = cast[PGtkButtonBoxClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_BUTTON_BOX())) + +proc gtk_button_box_set_spacing*(b: pointer, s: gint) = + gtk_box_set_spacing(GTK_BOX(b), s) + +proc gtk_button_box_get_spacing*(b: pointer): gint = + result = gtk_box_get_spacing(GTK_BOX(b)) + +proc GTK_TYPE_BUTTON*(): GType = + result = gtk_button_get_type() + +proc GTK_BUTTON*(obj: pointer): PGtkButton = + result = cast[PGtkButton](GTK_CHECK_CAST(obj, GTK_TYPE_BUTTON())) + +proc GTK_BUTTON_CLASS*(klass: pointer): PGtkButtonClass = + result = cast[PGtkButtonClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_BUTTON())) + +proc GTK_IS_BUTTON*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_BUTTON()) + +proc GTK_IS_BUTTON_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_BUTTON()) + +proc GTK_BUTTON_GET_CLASS*(obj: pointer): PGtkButtonClass = + result = cast[PGtkButtonClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_BUTTON())) + +proc constructed*(a: var TGtkButton): guint = + result = (a.GtkButtonflag0 and bm_TGtkButton_constructed) shr + bp_TGtkButton_constructed + +proc set_constructed*(a: var TGtkButton, `constructed`: guint) = + a.GtkButtonflag0 = a.GtkButtonflag0 or + (int16(`constructed` shl bp_TGtkButton_constructed) and + bm_TGtkButton_constructed) + +proc in_button*(a: var TGtkButton): guint = + result = (a.GtkButtonflag0 and bm_TGtkButton_in_button) shr bp_TGtkButton_in_button + +proc set_in_button*(a: var TGtkButton, `in_button`: guint) = + a.GtkButtonflag0 = a.GtkButtonflag0 or + (int16(`in_button` shl bp_TGtkButton_in_button) and bm_TGtkButton_in_button) + +proc button_down*(a: var TGtkButton): guint = + result = (a.GtkButtonflag0 and bm_TGtkButton_button_down) shr + bp_TGtkButton_button_down + +proc set_button_down*(a: var TGtkButton, `button_down`: guint) = + a.GtkButtonflag0 = a.GtkButtonflag0 or + (int16(`button_down` shl bp_TGtkButton_button_down) and + bm_TGtkButton_button_down) + +proc relief*(a: var TGtkButton): guint = + result = (a.GtkButtonflag0 and bm_TGtkButton_relief) shr bp_TGtkButton_relief + +proc set_relief*(a: var TGtkButton, `relief`: guint) = + a.GtkButtonflag0 = a.GtkButtonflag0 or + (int16(`relief` shl bp_TGtkButton_relief) and bm_TGtkButton_relief) + +proc use_underline*(a: var TGtkButton): guint = + result = (a.GtkButtonflag0 and bm_TGtkButton_use_underline) shr + bp_TGtkButton_use_underline + +proc set_use_underline*(a: var TGtkButton, `use_underline`: guint) = + a.GtkButtonflag0 = a.GtkButtonflag0 or + (int16(`use_underline` shl bp_TGtkButton_use_underline) and + bm_TGtkButton_use_underline) + +proc use_stock*(a: var TGtkButton): guint = + result = (a.GtkButtonflag0 and bm_TGtkButton_use_stock) shr bp_TGtkButton_use_stock + +proc set_use_stock*(a: var TGtkButton, `use_stock`: guint) = + a.GtkButtonflag0 = a.GtkButtonflag0 or + (int16(`use_stock` shl bp_TGtkButton_use_stock) and bm_TGtkButton_use_stock) + +proc depressed*(a: var TGtkButton): guint = + result = (a.GtkButtonflag0 and bm_TGtkButton_depressed) shr bp_TGtkButton_depressed + +proc set_depressed*(a: var TGtkButton, `depressed`: guint) = + a.GtkButtonflag0 = a.GtkButtonflag0 or + (int16(`depressed` shl bp_TGtkButton_depressed) and bm_TGtkButton_depressed) + +proc depress_on_activate*(a: var TGtkButton): guint = + result = (a.GtkButtonflag0 and bm_TGtkButton_depress_on_activate) shr + bp_TGtkButton_depress_on_activate + +proc set_depress_on_activate*(a: var TGtkButton, `depress_on_activate`: guint) = + a.GtkButtonflag0 = a.GtkButtonflag0 or + (int16(`depress_on_activate` shl bp_TGtkButton_depress_on_activate) and + bm_TGtkButton_depress_on_activate) + +proc GTK_TYPE_CALENDAR*(): GType = + result = gtk_calendar_get_type() + +proc GTK_CALENDAR*(obj: pointer): PGtkCalendar = + result = cast[PGtkCalendar](GTK_CHECK_CAST(obj, GTK_TYPE_CALENDAR())) + +proc GTK_CALENDAR_CLASS*(klass: pointer): PGtkCalendarClass = + result = cast[PGtkCalendarClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_CALENDAR())) + +proc GTK_IS_CALENDAR*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_CALENDAR()) + +proc GTK_IS_CALENDAR_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_CALENDAR()) + +proc GTK_CALENDAR_GET_CLASS*(obj: pointer): PGtkCalendarClass = + result = cast[PGtkCalendarClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_CALENDAR())) + +proc GTK_TYPE_CELL_EDITABLE*(): GType = + result = gtk_cell_editable_get_type() + +proc GTK_CELL_EDITABLE*(obj: pointer): PGtkCellEditable = + result = cast[PGtkCellEditable](G_TYPE_CHECK_INSTANCE_CAST(obj, + GTK_TYPE_CELL_EDITABLE())) + +proc GTK_CELL_EDITABLE_CLASS*(obj: pointer): PGtkCellEditableIface = + result = cast[PGtkCellEditableIface](G_TYPE_CHECK_CLASS_CAST(obj, + GTK_TYPE_CELL_EDITABLE())) + +proc GTK_IS_CELL_EDITABLE*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, GTK_TYPE_CELL_EDITABLE()) + +proc GTK_CELL_EDITABLE_GET_IFACE*(obj: pointer): PGtkCellEditableIface = + result = cast[PGtkCellEditableIface](G_TYPE_INSTANCE_GET_INTERFACE(obj, + GTK_TYPE_CELL_EDITABLE())) + +proc GTK_TYPE_CELL_RENDERER*(): GType = + result = gtk_cell_renderer_get_type() + +proc GTK_CELL_RENDERER*(obj: pointer): PGtkCellRenderer = + result = cast[PGtkCellRenderer](GTK_CHECK_CAST(obj, GTK_TYPE_CELL_RENDERER())) + +proc GTK_CELL_RENDERER_CLASS*(klass: pointer): PGtkCellRendererClass = + result = cast[PGtkCellRendererClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_CELL_RENDERER())) + +proc GTK_IS_CELL_RENDERER*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_CELL_RENDERER()) + +proc GTK_IS_CELL_RENDERER_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_CELL_RENDERER()) + +proc GTK_CELL_RENDERER_GET_CLASS*(obj: pointer): PGtkCellRendererClass = + result = cast[PGtkCellRendererClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_CELL_RENDERER())) + +proc mode*(a: var TGtkCellRenderer): guint = + result = (a.GtkCellRendererflag0 and bm_TGtkCellRenderer_mode) shr + bp_TGtkCellRenderer_mode + +proc set_mode*(a: var TGtkCellRenderer, `mode`: guint) = + a.GtkCellRendererflag0 = a.GtkCellRendererflag0 or + (int16(`mode` shl bp_TGtkCellRenderer_mode) and bm_TGtkCellRenderer_mode) + +proc visible*(a: var TGtkCellRenderer): guint = + result = (a.GtkCellRendererflag0 and bm_TGtkCellRenderer_visible) shr + bp_TGtkCellRenderer_visible + +proc set_visible*(a: var TGtkCellRenderer, `visible`: guint) = + a.GtkCellRendererflag0 = a.GtkCellRendererflag0 or + (int16(`visible` shl bp_TGtkCellRenderer_visible) and + bm_TGtkCellRenderer_visible) + +proc is_expander*(a: var TGtkCellRenderer): guint = + result = (a.GtkCellRendererflag0 and bm_TGtkCellRenderer_is_expander) shr + bp_TGtkCellRenderer_is_expander + +proc set_is_expander*(a: var TGtkCellRenderer, `is_expander`: guint) = + a.GtkCellRendererflag0 = a.GtkCellRendererflag0 or + (int16(`is_expander` shl bp_TGtkCellRenderer_is_expander) and + bm_TGtkCellRenderer_is_expander) + +proc is_expanded*(a: var TGtkCellRenderer): guint = + result = (a.GtkCellRendererflag0 and bm_TGtkCellRenderer_is_expanded) shr + bp_TGtkCellRenderer_is_expanded + +proc set_is_expanded*(a: var TGtkCellRenderer, `is_expanded`: guint) = + a.GtkCellRendererflag0 = a.GtkCellRendererflag0 or + (int16(`is_expanded` shl bp_TGtkCellRenderer_is_expanded) and + bm_TGtkCellRenderer_is_expanded) + +proc cell_background_set*(a: var TGtkCellRenderer): guint = + result = (a.GtkCellRendererflag0 and bm_TGtkCellRenderer_cell_background_set) shr + bp_TGtkCellRenderer_cell_background_set + +proc set_cell_background_set*(a: var TGtkCellRenderer, + `cell_background_set`: guint) = + a.GtkCellRendererflag0 = a.GtkCellRendererflag0 or + (int16(`cell_background_set` shl bp_TGtkCellRenderer_cell_background_set) and + bm_TGtkCellRenderer_cell_background_set) + +proc GTK_TYPE_CELL_RENDERER_TEXT*(): GType = + result = gtk_cell_renderer_text_get_type() + +proc GTK_CELL_RENDERER_TEXT*(obj: pointer): PGtkCellRendererText = + result = cast[PGtkCellRendererText](GTK_CHECK_CAST(obj, GTK_TYPE_CELL_RENDERER_TEXT())) + +proc GTK_CELL_RENDERER_TEXT_CLASS*(klass: pointer): PGtkCellRendererTextClass = + result = cast[PGtkCellRendererTextClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_CELL_RENDERER_TEXT())) + +proc GTK_IS_CELL_RENDERER_TEXT*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_CELL_RENDERER_TEXT()) + +proc GTK_IS_CELL_RENDERER_TEXT_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_CELL_RENDERER_TEXT()) + +proc GTK_CELL_RENDERER_TEXT_GET_CLASS*(obj: pointer): PGtkCellRendererTextClass = + result = cast[PGtkCellRendererTextClass](GTK_CHECK_GET_CLASS(obj, + GTK_TYPE_CELL_RENDERER_TEXT())) + +proc strikethrough*(a: var TGtkCellRendererText): guint = + result = (a.GtkCellRendererTextflag0 and bm_TGtkCellRendererText_strikethrough) shr + bp_TGtkCellRendererText_strikethrough + +proc set_strikethrough*(a: var TGtkCellRendererText, `strikethrough`: guint) = + a.GtkCellRendererTextflag0 = a.GtkCellRendererTextflag0 or + (int16(`strikethrough` shl bp_TGtkCellRendererText_strikethrough) and + bm_TGtkCellRendererText_strikethrough) + +proc editable*(a: var TGtkCellRendererText): guint = + result = (a.GtkCellRendererTextflag0 and bm_TGtkCellRendererText_editable) shr + bp_TGtkCellRendererText_editable + +proc set_editable*(a: var TGtkCellRendererText, `editable`: guint) = + a.GtkCellRendererTextflag0 = a.GtkCellRendererTextflag0 or + (int16(`editable` shl bp_TGtkCellRendererText_editable) and + bm_TGtkCellRendererText_editable) + +proc scale_set*(a: var TGtkCellRendererText): guint = + result = (a.GtkCellRendererTextflag0 and bm_TGtkCellRendererText_scale_set) shr + bp_TGtkCellRendererText_scale_set + +proc set_scale_set*(a: var TGtkCellRendererText, `scale_set`: guint) = + a.GtkCellRendererTextflag0 = a.GtkCellRendererTextflag0 or + (int16(`scale_set` shl bp_TGtkCellRendererText_scale_set) and + bm_TGtkCellRendererText_scale_set) + +proc foreground_set*(a: var TGtkCellRendererText): guint = + result = (a.GtkCellRendererTextflag0 and bm_TGtkCellRendererText_foreground_set) shr + bp_TGtkCellRendererText_foreground_set + +proc set_foreground_set*(a: var TGtkCellRendererText, `foreground_set`: guint) = + a.GtkCellRendererTextflag0 = a.GtkCellRendererTextflag0 or + (int16(`foreground_set` shl bp_TGtkCellRendererText_foreground_set) and + bm_TGtkCellRendererText_foreground_set) + +proc background_set*(a: var TGtkCellRendererText): guint = + result = (a.GtkCellRendererTextflag0 and bm_TGtkCellRendererText_background_set) shr + bp_TGtkCellRendererText_background_set + +proc set_background_set*(a: var TGtkCellRendererText, `background_set`: guint) = + a.GtkCellRendererTextflag0 = a.GtkCellRendererTextflag0 or + (int16(`background_set` shl bp_TGtkCellRendererText_background_set) and + bm_TGtkCellRendererText_background_set) + +proc underline_set*(a: var TGtkCellRendererText): guint = + result = (a.GtkCellRendererTextflag0 and bm_TGtkCellRendererText_underline_set) shr + bp_TGtkCellRendererText_underline_set + +proc set_underline_set*(a: var TGtkCellRendererText, `underline_set`: guint) = + a.GtkCellRendererTextflag0 = a.GtkCellRendererTextflag0 or + (int16(`underline_set` shl bp_TGtkCellRendererText_underline_set) and + bm_TGtkCellRendererText_underline_set) + +proc rise_set*(a: var TGtkCellRendererText): guint = + result = (a.GtkCellRendererTextflag0 and bm_TGtkCellRendererText_rise_set) shr + bp_TGtkCellRendererText_rise_set + +proc set_rise_set*(a: var TGtkCellRendererText, `rise_set`: guint) = + a.GtkCellRendererTextflag0 = a.GtkCellRendererTextflag0 or + (int16(`rise_set` shl bp_TGtkCellRendererText_rise_set) and + bm_TGtkCellRendererText_rise_set) + +proc strikethrough_set*(a: var TGtkCellRendererText): guint = + result = (a.GtkCellRendererTextflag0 and bm_TGtkCellRendererText_strikethrough_set) shr + bp_TGtkCellRendererText_strikethrough_set + +proc set_strikethrough_set*(a: var TGtkCellRendererText, + `strikethrough_set`: guint) = + a.GtkCellRendererTextflag0 = a.GtkCellRendererTextflag0 or + (int16(`strikethrough_set` shl bp_TGtkCellRendererText_strikethrough_set) and + bm_TGtkCellRendererText_strikethrough_set) + +proc editable_set*(a: var TGtkCellRendererText): guint = + result = (a.GtkCellRendererTextflag0 and bm_TGtkCellRendererText_editable_set) shr + bp_TGtkCellRendererText_editable_set + +proc set_editable_set*(a: var TGtkCellRendererText, `editable_set`: guint) = + a.GtkCellRendererTextflag0 = a.GtkCellRendererTextflag0 or + (int16(`editable_set` shl bp_TGtkCellRendererText_editable_set) and + bm_TGtkCellRendererText_editable_set) + +proc calc_fixed_height*(a: var TGtkCellRendererText): guint = + result = (a.GtkCellRendererTextflag0 and bm_TGtkCellRendererText_calc_fixed_height) shr + bp_TGtkCellRendererText_calc_fixed_height + +proc set_calc_fixed_height*(a: var TGtkCellRendererText, + `calc_fixed_height`: guint) = + a.GtkCellRendererTextflag0 = a.GtkCellRendererTextflag0 or + (int16(`calc_fixed_height` shl bp_TGtkCellRendererText_calc_fixed_height) and + bm_TGtkCellRendererText_calc_fixed_height) + +proc GTK_TYPE_CELL_RENDERER_TOGGLE*(): GType = + result = gtk_cell_renderer_toggle_get_type() + +proc GTK_CELL_RENDERER_TOGGLE*(obj: pointer): PGtkCellRendererToggle = + result = cast[PGtkCellRendererToggle](GTK_CHECK_CAST(obj, + GTK_TYPE_CELL_RENDERER_TOGGLE())) + +proc GTK_CELL_RENDERER_TOGGLE_CLASS*(klass: pointer): PGtkCellRendererToggleClass = + result = cast[PGtkCellRendererToggleClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_CELL_RENDERER_TOGGLE())) + +proc GTK_IS_CELL_RENDERER_TOGGLE*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_CELL_RENDERER_TOGGLE()) + +proc GTK_IS_CELL_RENDERER_TOGGLE_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_CELL_RENDERER_TOGGLE()) + +proc GTK_CELL_RENDERER_TOGGLE_GET_CLASS*(obj: pointer): PGtkCellRendererToggleClass = + result = cast[PGtkCellRendererToggleClass](GTK_CHECK_GET_CLASS(obj, + GTK_TYPE_CELL_RENDERER_TOGGLE())) + +proc active*(a: var TGtkCellRendererToggle): guint = + result = (a.GtkCellRendererToggleflag0 and bm_TGtkCellRendererToggle_active) shr + bp_TGtkCellRendererToggle_active + +proc set_active*(a: var TGtkCellRendererToggle, `active`: guint) = + a.GtkCellRendererToggleflag0 = a.GtkCellRendererToggleflag0 or + (int16(`active` shl bp_TGtkCellRendererToggle_active) and + bm_TGtkCellRendererToggle_active) + +proc activatable*(a: var TGtkCellRendererToggle): guint = + result = (a.GtkCellRendererToggleflag0 and bm_TGtkCellRendererToggle_activatable) shr + bp_TGtkCellRendererToggle_activatable + +proc set_activatable*(a: var TGtkCellRendererToggle, `activatable`: guint) = + a.GtkCellRendererToggleflag0 = a.GtkCellRendererToggleflag0 or + (int16(`activatable` shl bp_TGtkCellRendererToggle_activatable) and + bm_TGtkCellRendererToggle_activatable) + +proc radio*(a: var TGtkCellRendererToggle): guint = + result = (a.GtkCellRendererToggleflag0 and bm_TGtkCellRendererToggle_radio) shr + bp_TGtkCellRendererToggle_radio + +proc set_radio*(a: var TGtkCellRendererToggle, `radio`: guint) = + a.GtkCellRendererToggleflag0 = a.GtkCellRendererToggleflag0 or + (int16(`radio` shl bp_TGtkCellRendererToggle_radio) and + bm_TGtkCellRendererToggle_radio) + +proc GTK_TYPE_CELL_RENDERER_PIXBUF*(): GType = + result = gtk_cell_renderer_pixbuf_get_type() + +proc GTK_CELL_RENDERER_PIXBUF*(obj: pointer): PGtkCellRendererPixbuf = + result = cast[PGtkCellRendererPixbuf](GTK_CHECK_CAST(obj, + GTK_TYPE_CELL_RENDERER_PIXBUF())) + +proc GTK_CELL_RENDERER_PIXBUF_CLASS*(klass: pointer): PGtkCellRendererPixbufClass = + result = cast[PGtkCellRendererPixbufClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_CELL_RENDERER_PIXBUF())) + +proc GTK_IS_CELL_RENDERER_PIXBUF*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_CELL_RENDERER_PIXBUF()) + +proc GTK_IS_CELL_RENDERER_PIXBUF_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_CELL_RENDERER_PIXBUF()) + +proc GTK_CELL_RENDERER_PIXBUF_GET_CLASS*(obj: pointer): PGtkCellRendererPixbufClass = + result = cast[PGtkCellRendererPixbufClass](GTK_CHECK_GET_CLASS(obj, + GTK_TYPE_CELL_RENDERER_PIXBUF())) + +proc GTK_TYPE_ITEM*(): GType = + result = gtk_item_get_type() + +proc GTK_ITEM*(obj: pointer): PGtkItem = + result = cast[PGtkItem](GTK_CHECK_CAST(obj, GTK_TYPE_ITEM())) + +proc GTK_ITEM_CLASS*(klass: pointer): PGtkItemClass = + result = cast[PGtkItemClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_ITEM())) + +proc GTK_IS_ITEM*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_ITEM()) + +proc GTK_IS_ITEM_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_ITEM()) + +proc GTK_ITEM_GET_CLASS*(obj: pointer): PGtkItemClass = + result = cast[PGtkItemClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_ITEM())) + +proc GTK_TYPE_MENU_ITEM*(): GType = + result = gtk_menu_item_get_type() + +proc GTK_MENU_ITEM*(obj: pointer): PGtkMenuItem = + result = cast[PGtkMenuItem](GTK_CHECK_CAST(obj, GTK_TYPE_MENU_ITEM())) + +proc GTK_MENU_ITEM_CLASS*(klass: pointer): PGtkMenuItemClass = + result = cast[PGtkMenuItemClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_MENU_ITEM())) + +proc GTK_IS_MENU_ITEM*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_MENU_ITEM()) + +proc GTK_IS_MENU_ITEM_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_MENU_ITEM()) + +proc GTK_MENU_ITEM_GET_CLASS*(obj: pointer): PGtkMenuItemClass = + result = cast[PGtkMenuItemClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_MENU_ITEM())) + +proc show_submenu_indicator*(a: var TGtkMenuItem): guint = + result = (a.GtkMenuItemflag0 and bm_TGtkMenuItem_show_submenu_indicator) shr + bp_TGtkMenuItem_show_submenu_indicator + +proc set_show_submenu_indicator*(a: var TGtkMenuItem, + `show_submenu_indicator`: guint) = + a.GtkMenuItemflag0 = a.GtkMenuItemflag0 or + (int16(`show_submenu_indicator` shl bp_TGtkMenuItem_show_submenu_indicator) and + bm_TGtkMenuItem_show_submenu_indicator) + +proc submenu_placement*(a: var TGtkMenuItem): guint = + result = (a.GtkMenuItemflag0 and bm_TGtkMenuItem_submenu_placement) shr + bp_TGtkMenuItem_submenu_placement + +proc set_submenu_placement*(a: var TGtkMenuItem, `submenu_placement`: guint) = + a.GtkMenuItemflag0 = a.GtkMenuItemflag0 or + (int16(`submenu_placement` shl bp_TGtkMenuItem_submenu_placement) and + bm_TGtkMenuItem_submenu_placement) + +proc submenu_direction*(a: var TGtkMenuItem): guint = + result = (a.GtkMenuItemflag0 and bm_TGtkMenuItem_submenu_direction) shr + bp_TGtkMenuItem_submenu_direction + +proc set_submenu_direction*(a: var TGtkMenuItem, `submenu_direction`: guint) = + a.GtkMenuItemflag0 = a.GtkMenuItemflag0 or + (int16(`submenu_direction` shl bp_TGtkMenuItem_submenu_direction) and + bm_TGtkMenuItem_submenu_direction) + +proc right_justify*(a: var TGtkMenuItem): guint = + result = (a.GtkMenuItemflag0 and bm_TGtkMenuItem_right_justify) shr + bp_TGtkMenuItem_right_justify + +proc set_right_justify*(a: var TGtkMenuItem, `right_justify`: guint) = + a.GtkMenuItemflag0 = a.GtkMenuItemflag0 or + (int16(`right_justify` shl bp_TGtkMenuItem_right_justify) and + bm_TGtkMenuItem_right_justify) + +proc timer_from_keypress*(a: var TGtkMenuItem): guint = + result = (a.GtkMenuItemflag0 and bm_TGtkMenuItem_timer_from_keypress) shr + bp_TGtkMenuItem_timer_from_keypress + +proc set_timer_from_keypress*(a: var TGtkMenuItem, `timer_from_keypress`: guint) = + a.GtkMenuItemflag0 = a.GtkMenuItemflag0 or + (int16(`timer_from_keypress` shl bp_TGtkMenuItem_timer_from_keypress) and + bm_TGtkMenuItem_timer_from_keypress) + +proc hide_on_activate*(a: var TGtkMenuItemClass): guint = + result = (a.GtkMenuItemClassflag0 and bm_TGtkMenuItemClass_hide_on_activate) shr + bp_TGtkMenuItemClass_hide_on_activate + +proc set_hide_on_activate*(a: var TGtkMenuItemClass, `hide_on_activate`: guint) = + a.GtkMenuItemClassflag0 = a.GtkMenuItemClassflag0 or + (int16(`hide_on_activate` shl bp_TGtkMenuItemClass_hide_on_activate) and + bm_TGtkMenuItemClass_hide_on_activate) + +proc gtk_menu_item_right_justify*(menu_item: PGtkMenuItem) = + gtk_menu_item_set_right_justified(menu_item, true) + +proc GTK_TYPE_TOGGLE_BUTTON*(): GType = + result = gtk_toggle_button_get_type() + +proc GTK_TOGGLE_BUTTON*(obj: pointer): PGtkToggleButton = + result = cast[PGtkToggleButton](GTK_CHECK_CAST(obj, GTK_TYPE_TOGGLE_BUTTON())) + +proc GTK_TOGGLE_BUTTON_CLASS*(klass: pointer): PGtkToggleButtonClass = + result = cast[PGtkToggleButtonClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_TOGGLE_BUTTON())) + +proc GTK_IS_TOGGLE_BUTTON*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_TOGGLE_BUTTON()) + +proc GTK_IS_TOGGLE_BUTTON_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_TOGGLE_BUTTON()) + +proc GTK_TOGGLE_BUTTON_GET_CLASS*(obj: pointer): PGtkToggleButtonClass = + result = cast[PGtkToggleButtonClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_TOGGLE_BUTTON())) + +proc active*(a: var TGtkToggleButton): guint = + result = (a.GtkToggleButtonflag0 and bm_TGtkToggleButton_active) shr + bp_TGtkToggleButton_active + +proc set_active*(a: var TGtkToggleButton, `active`: guint) = + a.GtkToggleButtonflag0 = a.GtkToggleButtonflag0 or + (int16(`active` shl bp_TGtkToggleButton_active) and + bm_TGtkToggleButton_active) + +proc draw_indicator*(a: var TGtkToggleButton): guint = + result = (a.GtkToggleButtonflag0 and bm_TGtkToggleButton_draw_indicator) shr + bp_TGtkToggleButton_draw_indicator + +proc set_draw_indicator*(a: var TGtkToggleButton, `draw_indicator`: guint) = + a.GtkToggleButtonflag0 = a.GtkToggleButtonflag0 or + (int16(`draw_indicator` shl bp_TGtkToggleButton_draw_indicator) and + bm_TGtkToggleButton_draw_indicator) + +proc inconsistent*(a: var TGtkToggleButton): guint = + result = (a.GtkToggleButtonflag0 and bm_TGtkToggleButton_inconsistent) shr + bp_TGtkToggleButton_inconsistent + +proc set_inconsistent*(a: var TGtkToggleButton, `inconsistent`: guint) = + a.GtkToggleButtonflag0 = a.GtkToggleButtonflag0 or + (int16(`inconsistent` shl bp_TGtkToggleButton_inconsistent) and + bm_TGtkToggleButton_inconsistent) + +proc GTK_TYPE_CHECK_BUTTON*(): GType = + result = gtk_check_button_get_type() + +proc GTK_CHECK_BUTTON*(obj: pointer): PGtkCheckButton = + result = cast[PGtkCheckButton](GTK_CHECK_CAST(obj, GTK_TYPE_CHECK_BUTTON())) + +proc GTK_CHECK_BUTTON_CLASS*(klass: pointer): PGtkCheckButtonClass = + result = cast[PGtkCheckButtonClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_CHECK_BUTTON())) + +proc GTK_IS_CHECK_BUTTON*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_CHECK_BUTTON()) + +proc GTK_IS_CHECK_BUTTON_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_CHECK_BUTTON()) + +proc GTK_CHECK_BUTTON_GET_CLASS*(obj: pointer): PGtkCheckButtonClass = + result = cast[PGtkCheckButtonClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_CHECK_BUTTON())) + +proc GTK_TYPE_CHECK_MENU_ITEM*(): GType = + result = gtk_check_menu_item_get_type() + +proc GTK_CHECK_MENU_ITEM*(obj: pointer): PGtkCheckMenuItem = + result = cast[PGtkCheckMenuItem](GTK_CHECK_CAST(obj, GTK_TYPE_CHECK_MENU_ITEM())) + +proc GTK_CHECK_MENU_ITEM_CLASS*(klass: pointer): PGtkCheckMenuItemClass = + result = cast[PGtkCheckMenuItemClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_CHECK_MENU_ITEM())) + +proc GTK_IS_CHECK_MENU_ITEM*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_CHECK_MENU_ITEM()) + +proc GTK_IS_CHECK_MENU_ITEM_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_CHECK_MENU_ITEM()) + +proc GTK_CHECK_MENU_ITEM_GET_CLASS*(obj: pointer): PGtkCheckMenuItemClass = + result = cast[PGtkCheckMenuItemClass](GTK_CHECK_GET_CLASS(obj, + GTK_TYPE_CHECK_MENU_ITEM())) + +proc active*(a: var TGtkCheckMenuItem): guint = + result = (a.GtkCheckMenuItemflag0 and bm_TGtkCheckMenuItem_active) shr + bp_TGtkCheckMenuItem_active + +proc set_active*(a: var TGtkCheckMenuItem, `active`: guint) = + a.GtkCheckMenuItemflag0 = a.GtkCheckMenuItemflag0 or + (int16(`active` shl bp_TGtkCheckMenuItem_active) and + bm_TGtkCheckMenuItem_active) + +proc always_show_toggle*(a: var TGtkCheckMenuItem): guint = + result = (a.GtkCheckMenuItemflag0 and bm_TGtkCheckMenuItem_always_show_toggle) shr + bp_TGtkCheckMenuItem_always_show_toggle + +proc set_always_show_toggle*(a: var TGtkCheckMenuItem, + `always_show_toggle`: guint) = + a.GtkCheckMenuItemflag0 = a.GtkCheckMenuItemflag0 or + (int16(`always_show_toggle` shl bp_TGtkCheckMenuItem_always_show_toggle) and + bm_TGtkCheckMenuItem_always_show_toggle) + +proc inconsistent*(a: var TGtkCheckMenuItem): guint = + result = (a.GtkCheckMenuItemflag0 and bm_TGtkCheckMenuItem_inconsistent) shr + bp_TGtkCheckMenuItem_inconsistent + +proc set_inconsistent*(a: var TGtkCheckMenuItem, `inconsistent`: guint) = + a.GtkCheckMenuItemflag0 = a.GtkCheckMenuItemflag0 or + (int16(`inconsistent` shl bp_TGtkCheckMenuItem_inconsistent) and + bm_TGtkCheckMenuItem_inconsistent) + +proc GTK_TYPE_CLIST*(): GType = + result = gtk_clist_get_type() + +proc GTK_CLIST*(obj: pointer): PGtkCList = + result = cast[PGtkCList](GTK_CHECK_CAST(obj, GTK_TYPE_CLIST())) + +proc GTK_CLIST_CLASS*(klass: pointer): PGtkCListClass = + result = cast[PGtkCListClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_CLIST())) + +proc GTK_IS_CLIST*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_CLIST()) + +proc GTK_IS_CLIST_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_CLIST()) + +proc GTK_CLIST_GET_CLASS*(obj: pointer): PGtkCListClass = + result = cast[PGtkCListClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_CLIST())) + +proc GTK_CLIST_FLAGS*(clist: pointer): guint16 = + result = toU16(GTK_CLIST(clist).flags) + +proc GTK_CLIST_SET_FLAG*(clist: PGtkCList, flag: guint16) = + clist.flags = GTK_CLIST(clist).flags or (flag) + +proc GTK_CLIST_UNSET_FLAG*(clist: PGtkCList, flag: guint16) = + clist.flags = GTK_CLIST(clist).flags and not (flag) + +proc GTK_CLIST_IN_DRAG_get*(clist: pointer): bool = + result = ((GTK_CLIST_FLAGS(clist)) and cint(GTK_CLIST_IN_DRAG)) != 0'i32 + +proc GTK_CLIST_ROW_HEIGHT_SET_get*(clist: pointer): bool = + result = ((GTK_CLIST_FLAGS(clist)) and cint(GTK_CLIST_ROW_HEIGHT_SET)) != 0'i32 + +proc GTK_CLIST_SHOW_TITLES_get*(clist: pointer): bool = + result = ((GTK_CLIST_FLAGS(clist)) and cint(GTK_CLIST_SHOW_TITLES)) != 0'i32 + +proc GTK_CLIST_ADD_MODE_get*(clist: pointer): bool = + result = ((GTK_CLIST_FLAGS(clist)) and cint(GTK_CLIST_ADD_MODE)) != 0'i32 + +proc GTK_CLIST_AUTO_SORT_get*(clist: pointer): bool = + result = ((GTK_CLIST_FLAGS(clist)) and cint(GTK_CLIST_AUTO_SORT)) != 0'i32 + +proc GTK_CLIST_AUTO_RESIZE_BLOCKED_get*(clist: pointer): bool = + result = ((GTK_CLIST_FLAGS(clist)) and cint(GTK_CLIST_AUTO_RESIZE_BLOCKED)) != 0'i32 + +proc GTK_CLIST_REORDERABLE_get*(clist: pointer): bool = + result = ((GTK_CLIST_FLAGS(clist)) and cint(GTK_CLIST_REORDERABLE)) != 0'i32 + +proc GTK_CLIST_USE_DRAG_ICONS_get*(clist: pointer): bool = + result = ((GTK_CLIST_FLAGS(clist)) and cint(GTK_CLIST_USE_DRAG_ICONS)) != 0'i32 + +proc GTK_CLIST_DRAW_DRAG_LINE_get*(clist: pointer): bool = + result = ((GTK_CLIST_FLAGS(clist)) and cint(GTK_CLIST_DRAW_DRAG_LINE)) != 0'i32 + +proc GTK_CLIST_DRAW_DRAG_RECT_get*(clist: pointer): bool = + result = ((GTK_CLIST_FLAGS(clist)) and cint(GTK_CLIST_DRAW_DRAG_RECT)) != 0'i32 + +proc GTK_CLIST_ROW_get*(glist: PGList): PGtkCListRow = + result = cast[PGtkCListRow](glist . data) + +when false: + proc GTK_CELL_TEXT_get*(cell: pointer): PGtkCellText = + result = cast[PGtkCellText](addr((cell))) + + proc GTK_CELL_PIXMAP_get*(cell: pointer): PGtkCellPixmap = + result = cast[PGtkCellPixmap](addr((cell))) + + proc GTK_CELL_PIXTEXT_get*(cell: pointer): PGtkCellPixText = + result = cast[PGtkCellPixText](addr((cell))) + + proc GTK_CELL_WIDGET_get*(cell: pointer): PGtkCellWidget = + result = cast[PGtkCellWidget](addr((cell))) + +proc visible*(a: var TGtkCListColumn): guint = + result = (a.flag0 and bm_TGtkCListColumn_visible) shr + bp_TGtkCListColumn_visible + +proc set_visible*(a: var TGtkCListColumn, `visible`: guint) = + a.flag0 = a.flag0 or + (int16(`visible` shl bp_TGtkCListColumn_visible) and + bm_TGtkCListColumn_visible) + +proc width_set*(a: var TGtkCListColumn): guint = + result = (a.flag0 and bm_TGtkCListColumn_width_set) shr + bp_TGtkCListColumn_width_set + +proc set_width_set*(a: var TGtkCListColumn, `width_set`: guint) = + a.flag0 = a.flag0 or + (int16(`width_set` shl bp_TGtkCListColumn_width_set) and + bm_TGtkCListColumn_width_set) + +proc resizeable*(a: var TGtkCListColumn): guint = + result = (a.flag0 and bm_TGtkCListColumn_resizeable) shr + bp_TGtkCListColumn_resizeable + +proc set_resizeable*(a: var TGtkCListColumn, `resizeable`: guint) = + a.flag0 = a.flag0 or + (int16(`resizeable` shl bp_TGtkCListColumn_resizeable) and + bm_TGtkCListColumn_resizeable) + +proc auto_resize*(a: var TGtkCListColumn): guint = + result = (a.flag0 and bm_TGtkCListColumn_auto_resize) shr + bp_TGtkCListColumn_auto_resize + +proc set_auto_resize*(a: var TGtkCListColumn, `auto_resize`: guint) = + a.flag0 = a.flag0 or + (int16(`auto_resize` shl bp_TGtkCListColumn_auto_resize) and + bm_TGtkCListColumn_auto_resize) + +proc button_passive*(a: var TGtkCListColumn): guint = + result = (a.flag0 and bm_TGtkCListColumn_button_passive) shr + bp_TGtkCListColumn_button_passive + +proc set_button_passive*(a: var TGtkCListColumn, `button_passive`: guint) = + a.flag0 = a.flag0 or + (int16(`button_passive` shl bp_TGtkCListColumn_button_passive) and + bm_TGtkCListColumn_button_passive) + +proc fg_set*(a: var TGtkCListRow): guint = + result = (a.flag0 and bm_TGtkCListRow_fg_set) shr bp_TGtkCListRow_fg_set + +proc set_fg_set*(a: var TGtkCListRow, `fg_set`: guint) = + a.flag0 = a.flag0 or + (int16(`fg_set` shl bp_TGtkCListRow_fg_set) and bm_TGtkCListRow_fg_set) + +proc bg_set*(a: var TGtkCListRow): guint = + result = (a.flag0 and bm_TGtkCListRow_bg_set) shr bp_TGtkCListRow_bg_set + +proc set_bg_set*(a: var TGtkCListRow, `bg_set`: guint) = + a.flag0 = a.flag0 or + (int16(`bg_set` shl bp_TGtkCListRow_bg_set) and bm_TGtkCListRow_bg_set) + +proc selectable*(a: var TGtkCListRow): guint = + result = (a.flag0 and bm_TGtkCListRow_selectable) shr + bp_TGtkCListRow_selectable + +proc set_selectable*(a: var TGtkCListRow, `selectable`: guint) = + a.flag0 = a.flag0 or + (int16(`selectable` shl bp_TGtkCListRow_selectable) and + bm_TGtkCListRow_selectable) + +proc GTK_TYPE_DIALOG*(): GType = + result = gtk_dialog_get_type() + +proc GTK_DIALOG*(obj: pointer): PGtkDialog = + result = cast[PGtkDialog](GTK_CHECK_CAST(obj, GTK_TYPE_DIALOG())) + +proc GTK_DIALOG_CLASS*(klass: pointer): PGtkDialogClass = + result = cast[PGtkDialogClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_DIALOG())) + +proc GTK_IS_DIALOG*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_DIALOG()) + +proc GTK_IS_DIALOG_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_DIALOG()) + +proc GTK_DIALOG_GET_CLASS*(obj: pointer): PGtkDialogClass = + result = cast[PGtkDialogClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_DIALOG())) + +proc GTK_TYPE_VBOX*(): GType = + result = gtk_vbox_get_type() + +proc GTK_VBOX*(obj: pointer): PGtkVBox = + result = cast[PGtkVBox](GTK_CHECK_CAST(obj, GTK_TYPE_VBOX())) + +proc GTK_VBOX_CLASS*(klass: pointer): PGtkVBoxClass = + result = cast[PGtkVBoxClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_VBOX())) + +proc GTK_IS_VBOX*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_VBOX()) + +proc GTK_IS_VBOX_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_VBOX()) + +proc GTK_VBOX_GET_CLASS*(obj: pointer): PGtkVBoxClass = + result = cast[PGtkVBoxClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_VBOX())) + +proc GTK_TYPE_COLOR_SELECTION*(): GType = + result = gtk_color_selection_get_type() + +proc GTK_COLOR_SELECTION*(obj: pointer): PGtkColorSelection = + result = cast[PGtkColorSelection](GTK_CHECK_CAST(obj, GTK_TYPE_COLOR_SELECTION())) + +proc GTK_COLOR_SELECTION_CLASS*(klass: pointer): PGtkColorSelectionClass = + result = cast[PGtkColorSelectionClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_COLOR_SELECTION())) + +proc GTK_IS_COLOR_SELECTION*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_COLOR_SELECTION()) + +proc GTK_IS_COLOR_SELECTION_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_COLOR_SELECTION()) + +proc GTK_COLOR_SELECTION_GET_CLASS*(obj: pointer): PGtkColorSelectionClass = + result = cast[PGtkColorSelectionClass](GTK_CHECK_GET_CLASS(obj, + GTK_TYPE_COLOR_SELECTION())) + +proc GTK_TYPE_COLOR_SELECTION_DIALOG*(): GType = + result = gtk_color_selection_dialog_get_type() + +proc GTK_COLOR_SELECTION_DIALOG*(obj: pointer): PGtkColorSelectionDialog = + result = cast[PGtkColorSelectionDialog](GTK_CHECK_CAST(obj, + GTK_TYPE_COLOR_SELECTION_DIALOG())) + +proc GTK_COLOR_SELECTION_DIALOG_CLASS*(klass: pointer): PGtkColorSelectionDialogClass = + result = cast[PGtkColorSelectionDialogClass]( + GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_COLOR_SELECTION_DIALOG())) + +proc GTK_IS_COLOR_SELECTION_DIALOG*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_COLOR_SELECTION_DIALOG()) + +proc GTK_IS_COLOR_SELECTION_DIALOG_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_COLOR_SELECTION_DIALOG()) + +proc GTK_COLOR_SELECTION_DIALOG_GET_CLASS*(obj: pointer): PGtkColorSelectionDialogClass = + result = cast[PGtkColorSelectionDialogClass]( + GTK_CHECK_GET_CLASS(obj, GTK_TYPE_COLOR_SELECTION_DIALOG())) + +proc GTK_TYPE_HBOX*(): GType = + result = gtk_hbox_get_type() + +proc GTK_HBOX*(obj: pointer): PGtkHBox = + result = cast[PGtkHBox](GTK_CHECK_CAST(obj, GTK_TYPE_HBOX())) + +proc GTK_HBOX_CLASS*(klass: pointer): PGtkHBoxClass = + result = cast[PGtkHBoxClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_HBOX())) + +proc GTK_IS_HBOX*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_HBOX()) + +proc GTK_IS_HBOX_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_HBOX()) + +proc GTK_HBOX_GET_CLASS*(obj: pointer): PGtkHBoxClass = + result = cast[PGtkHBoxClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_HBOX())) + +proc GTK_TYPE_COMBO*(): GType = + result = gtk_combo_get_type() + +proc GTK_COMBO*(obj: pointer): PGtkCombo = + result = cast[PGtkCombo](GTK_CHECK_CAST(obj, GTK_TYPE_COMBO())) + +proc GTK_COMBO_CLASS*(klass: pointer): PGtkComboClass = + result = cast[PGtkComboClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_COMBO())) + +proc GTK_IS_COMBO*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_COMBO()) + +proc GTK_IS_COMBO_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_COMBO()) + +proc GTK_COMBO_GET_CLASS*(obj: pointer): PGtkComboClass = + result = cast[PGtkComboClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_COMBO())) + +proc value_in_list*(a: var TGtkCombo): guint = + result = (a.GtkComboflag0 and bm_TGtkCombo_value_in_list) shr + bp_TGtkCombo_value_in_list + +proc set_value_in_list*(a: var TGtkCombo, `value_in_list`: guint) = + a.GtkComboflag0 = a.GtkComboflag0 or + (int16(`value_in_list` shl bp_TGtkCombo_value_in_list) and + bm_TGtkCombo_value_in_list) + +proc ok_if_empty*(a: var TGtkCombo): guint = + result = (a.GtkComboflag0 and bm_TGtkCombo_ok_if_empty) shr + bp_TGtkCombo_ok_if_empty + +proc set_ok_if_empty*(a: var TGtkCombo, `ok_if_empty`: guint) = + a.GtkComboflag0 = a.GtkComboflag0 or + (int16(`ok_if_empty` shl bp_TGtkCombo_ok_if_empty) and + bm_TGtkCombo_ok_if_empty) + +proc case_sensitive*(a: var TGtkCombo): guint = + result = (a.GtkComboflag0 and bm_TGtkCombo_case_sensitive) shr + bp_TGtkCombo_case_sensitive + +proc set_case_sensitive*(a: var TGtkCombo, `case_sensitive`: guint) = + a.GtkComboflag0 = a.GtkComboflag0 or + (int16(`case_sensitive` shl bp_TGtkCombo_case_sensitive) and + bm_TGtkCombo_case_sensitive) + +proc use_arrows*(a: var TGtkCombo): guint = + result = (a.GtkComboflag0 and bm_TGtkCombo_use_arrows) shr bp_TGtkCombo_use_arrows + +proc set_use_arrows*(a: var TGtkCombo, `use_arrows`: guint) = + a.GtkComboflag0 = a.GtkComboflag0 or + (int16(`use_arrows` shl bp_TGtkCombo_use_arrows) and bm_TGtkCombo_use_arrows) + +proc use_arrows_always*(a: var TGtkCombo): guint = + result = (a.GtkComboflag0 and bm_TGtkCombo_use_arrows_always) shr + bp_TGtkCombo_use_arrows_always + +proc set_use_arrows_always*(a: var TGtkCombo, `use_arrows_always`: guint) = + a.GtkComboflag0 = a.GtkComboflag0 or + (int16(`use_arrows_always` shl bp_TGtkCombo_use_arrows_always) and + bm_TGtkCombo_use_arrows_always) + +proc GTK_TYPE_CTREE*(): GType = + result = gtk_ctree_get_type() + +proc GTK_CTREE*(obj: pointer): PGtkCTree = + result = cast[PGtkCTree](GTK_CHECK_CAST(obj, GTK_TYPE_CTREE())) + +proc GTK_CTREE_CLASS*(klass: pointer): PGtkCTreeClass = + result = cast[PGtkCTreeClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_CTREE())) + +proc GTK_IS_CTREE*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_CTREE()) + +proc GTK_IS_CTREE_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_CTREE()) + +proc GTK_CTREE_GET_CLASS*(obj: pointer): PGtkCTreeClass = + result = cast[PGtkCTreeClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_CTREE())) + +proc GTK_CTREE_ROW*(node: TAddress): PGtkCTreeRow = + result = cast[PGtkCTreeRow]((cast[PGList](node)) . data) + +proc GTK_CTREE_NODE*(node: TAddress): PGtkCTreeNode = + result = cast[PGtkCTreeNode](node) + +proc GTK_CTREE_NODE_NEXT*(nnode: TAddress): PGtkCTreeNode = + result = cast[PGtkCTreeNode]((cast[PGList](nnode)) . next) + +proc GTK_CTREE_NODE_PREV*(`pnode`: TAddress): PGtkCTreeNode = + result = cast[PGtkCTreeNode]((cast[PGList](`pnode`)) . prev) + +proc GTK_CTREE_FUNC*(`func`: TAddress): TGtkCTreeFunc = + result = cast[TGtkCTreeFunc](`func`) + +proc GTK_TYPE_CTREE_NODE*(): GType = + result = gtk_ctree_node_get_type() + +proc line_style*(a: var TGtkCTree): guint = + result = (a.GtkCTreeflag0 and bm_TGtkCTree_line_style) shr bp_TGtkCTree_line_style + +proc set_line_style*(a: var TGtkCTree, `line_style`: guint) = + a.GtkCTreeflag0 = a.GtkCTreeflag0 or + (int16(`line_style` shl bp_TGtkCTree_line_style) and bm_TGtkCTree_line_style) + +proc expander_style*(a: var TGtkCTree): guint = + result = (a.GtkCTreeflag0 and bm_TGtkCTree_expander_style) shr + bp_TGtkCTree_expander_style + +proc set_expander_style*(a: var TGtkCTree, `expander_style`: guint) = + a.GtkCTreeflag0 = a.GtkCTreeflag0 or + (int16(`expander_style` shl bp_TGtkCTree_expander_style) and + bm_TGtkCTree_expander_style) + +proc show_stub*(a: var TGtkCTree): guint = + result = (a.GtkCTreeflag0 and bm_TGtkCTree_show_stub) shr bp_TGtkCTree_show_stub + +proc set_show_stub*(a: var TGtkCTree, `show_stub`: guint) = + a.GtkCTreeflag0 = a.GtkCTreeflag0 or + (int16(`show_stub` shl bp_TGtkCTree_show_stub) and bm_TGtkCTree_show_stub) + +proc is_leaf*(a: var TGtkCTreeRow): guint = + result = (a.GtkCTreeRow_flag0 and bm_TGtkCTreeRow_is_leaf) shr bp_TGtkCTreeRow_is_leaf + +proc set_is_leaf*(a: var TGtkCTreeRow, `is_leaf`: guint) = + a.GtkCTreeRow_flag0 = a.GtkCTreeRow_flag0 or + (int16(`is_leaf` shl bp_TGtkCTreeRow_is_leaf) and bm_TGtkCTreeRow_is_leaf) + +proc expanded*(a: var TGtkCTreeRow): guint = + result = (a.GtkCTreeRow_flag0 and bm_TGtkCTreeRow_expanded) shr + bp_TGtkCTreeRow_expanded + +proc set_expanded*(a: var TGtkCTreeRow, `expanded`: guint) = + a.GtkCTreeRow_flag0 = a.GtkCTreeRowflag0 or + (int16(`expanded` shl bp_TGtkCTreeRow_expanded) and bm_TGtkCTreeRow_expanded) + +proc gtk_ctree_set_reorderable*(t: pointer, r: bool) = + gtk_clist_set_reorderable(cast[PGtkCList](t), r) + +proc GTK_TYPE_DRAWING_AREA*(): GType = + result = gtk_drawing_area_get_type() + +proc GTK_DRAWING_AREA*(obj: pointer): PGtkDrawingArea = + result = cast[PGtkDrawingArea](GTK_CHECK_CAST(obj, GTK_TYPE_DRAWING_AREA())) + +proc GTK_DRAWING_AREA_CLASS*(klass: pointer): PGtkDrawingAreaClass = + result = cast[PGtkDrawingAreaClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_DRAWING_AREA())) + +proc GTK_IS_DRAWING_AREA*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_DRAWING_AREA()) + +proc GTK_IS_DRAWING_AREA_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_DRAWING_AREA()) + +proc GTK_DRAWING_AREA_GET_CLASS*(obj: pointer): PGtkDrawingAreaClass = + result = cast[PGtkDrawingAreaClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_DRAWING_AREA())) + +proc GTK_TYPE_CURVE*(): GType = + result = gtk_curve_get_type() + +proc GTK_CURVE*(obj: pointer): PGtkCurve = + result = cast[PGtkCurve](GTK_CHECK_CAST(obj, GTK_TYPE_CURVE())) + +proc GTK_CURVE_CLASS*(klass: pointer): PGtkCurveClass = + result = cast[PGtkCurveClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_CURVE())) + +proc GTK_IS_CURVE*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_CURVE()) + +proc GTK_IS_CURVE_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_CURVE()) + +proc GTK_CURVE_GET_CLASS*(obj: pointer): PGtkCurveClass = + result = cast[PGtkCurveClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_CURVE())) + +proc GTK_TYPE_EDITABLE*(): GType = + result = gtk_editable_get_type() + +proc GTK_EDITABLE*(obj: pointer): PGtkEditable = + result = cast[PGtkEditable](G_TYPE_CHECK_INSTANCE_CAST(obj, GTK_TYPE_EDITABLE())) + +proc GTK_EDITABLE_CLASS*(vtable: pointer): PGtkEditableClass = + result = cast[PGtkEditableClass](G_TYPE_CHECK_CLASS_CAST(vtable, GTK_TYPE_EDITABLE())) + +proc GTK_IS_EDITABLE*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, GTK_TYPE_EDITABLE()) + +proc GTK_IS_EDITABLE_CLASS*(vtable: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(vtable, GTK_TYPE_EDITABLE()) + +proc GTK_EDITABLE_GET_CLASS*(inst: pointer): PGtkEditableClass = + result = cast[PGtkEditableClass](G_TYPE_INSTANCE_GET_INTERFACE(inst, + GTK_TYPE_EDITABLE())) + +proc GTK_TYPE_IM_CONTEXT*(): GType = + result = gtk_im_context_get_type() + +proc GTK_IM_CONTEXT*(obj: pointer): PGtkIMContext = + result = cast[PGtkIMContext](GTK_CHECK_CAST(obj, GTK_TYPE_IM_CONTEXT())) + +proc GTK_IM_CONTEXT_CLASS*(klass: pointer): PGtkIMContextClass = + result = cast[PGtkIMContextClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_IM_CONTEXT())) + +proc GTK_IS_IM_CONTEXT*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_IM_CONTEXT()) + +proc GTK_IS_IM_CONTEXT_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_IM_CONTEXT()) + +proc GTK_IM_CONTEXT_GET_CLASS*(obj: pointer): PGtkIMContextClass = + result = cast[PGtkIMContextClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_IM_CONTEXT())) + +proc GTK_TYPE_MENU_SHELL*(): GType = + result = gtk_menu_shell_get_type() + +proc GTK_MENU_SHELL*(obj: pointer): PGtkMenuShell = + result = cast[PGtkMenuShell](GTK_CHECK_CAST(obj, GTK_TYPE_MENU_SHELL())) + +proc GTK_MENU_SHELL_CLASS*(klass: pointer): PGtkMenuShellClass = + result = cast[PGtkMenuShellClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_MENU_SHELL())) + +proc GTK_IS_MENU_SHELL*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_MENU_SHELL()) + +proc GTK_IS_MENU_SHELL_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_MENU_SHELL()) + +proc GTK_MENU_SHELL_GET_CLASS*(obj: pointer): PGtkMenuShellClass = + result = cast[PGtkMenuShellClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_MENU_SHELL())) + +proc active*(a: var TGtkMenuShell): guint = + result = (a.GtkMenuShellflag0 and bm_TGtkMenuShell_active) shr bp_TGtkMenuShell_active + +proc set_active*(a: var TGtkMenuShell, `active`: guint) = + a.GtkMenuShellflag0 = a.GtkMenuShellflag0 or + (int16(`active` shl bp_TGtkMenuShell_active) and bm_TGtkMenuShell_active) + +proc have_grab*(a: var TGtkMenuShell): guint = + result = (a.GtkMenuShellflag0 and bm_TGtkMenuShell_have_grab) shr + bp_TGtkMenuShell_have_grab + +proc set_have_grab*(a: var TGtkMenuShell, `have_grab`: guint) = + a.GtkMenuShellflag0 = a.GtkMenuShellflag0 or + (int16(`have_grab` shl bp_TGtkMenuShell_have_grab) and + bm_TGtkMenuShell_have_grab) + +proc have_xgrab*(a: var TGtkMenuShell): guint = + result = (a.GtkMenuShellflag0 and bm_TGtkMenuShell_have_xgrab) shr + bp_TGtkMenuShell_have_xgrab + +proc set_have_xgrab*(a: var TGtkMenuShell, `have_xgrab`: guint) = + a.GtkMenuShellflag0 = a.GtkMenuShellflag0 or + (int16(`have_xgrab` shl bp_TGtkMenuShell_have_xgrab) and + bm_TGtkMenuShell_have_xgrab) + +proc ignore_leave*(a: var TGtkMenuShell): guint = + result = (a.GtkMenuShellflag0 and bm_TGtkMenuShell_ignore_leave) shr + bp_TGtkMenuShell_ignore_leave + +proc set_ignore_leave*(a: var TGtkMenuShell, `ignore_leave`: guint) = + a.GtkMenuShellflag0 = a.GtkMenuShellflag0 or + (int16(`ignore_leave` shl bp_TGtkMenuShell_ignore_leave) and + bm_TGtkMenuShell_ignore_leave) + +proc menu_flag*(a: var TGtkMenuShell): guint = + result = (a.GtkMenuShellflag0 and bm_TGtkMenuShell_menu_flag) shr + bp_TGtkMenuShell_menu_flag + +proc set_menu_flag*(a: var TGtkMenuShell, `menu_flag`: guint) = + a.GtkMenuShellflag0 = a.GtkMenuShellflag0 or + (int16(`menu_flag` shl bp_TGtkMenuShell_menu_flag) and + bm_TGtkMenuShell_menu_flag) + +proc ignore_enter*(a: var TGtkMenuShell): guint = + result = (a.GtkMenuShellflag0 and bm_TGtkMenuShell_ignore_enter) shr + bp_TGtkMenuShell_ignore_enter + +proc set_ignore_enter*(a: var TGtkMenuShell, `ignore_enter`: guint) = + a.GtkMenuShellflag0 = a.GtkMenuShellflag0 or + (int16(`ignore_enter` shl bp_TGtkMenuShell_ignore_enter) and + bm_TGtkMenuShell_ignore_enter) + +proc submenu_placement*(a: var TGtkMenuShellClass): guint = + result = (a.GtkMenuShellClassflag0 and bm_TGtkMenuShellClass_submenu_placement) shr + bp_TGtkMenuShellClass_submenu_placement + +proc set_submenu_placement*(a: var TGtkMenuShellClass, + `submenu_placement`: guint) = + a.GtkMenuShellClassflag0 = a.GtkMenuShellClassflag0 or + (int16(`submenu_placement` shl bp_TGtkMenuShellClass_submenu_placement) and + bm_TGtkMenuShellClass_submenu_placement) + +proc GTK_TYPE_MENU*(): GType = + result = gtk_menu_get_type() + +proc GTK_MENU*(obj: pointer): PGtkMenu = + result = cast[PGtkMenu](GTK_CHECK_CAST(obj, GTK_TYPE_MENU())) + +proc GTK_MENU_CLASS*(klass: pointer): PGtkMenuClass = + result = cast[PGtkMenuClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_MENU())) + +proc GTK_IS_MENU*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_MENU()) + +proc GTK_IS_MENU_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_MENU()) + +proc GTK_MENU_GET_CLASS*(obj: pointer): PGtkMenuClass = + result = cast[PGtkMenuClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_MENU())) + +proc needs_destruction_ref_count*(a: var TGtkMenu): guint = + result = (a.GtkMenuflag0 and bm_TGtkMenu_needs_destruction_ref_count) shr + bp_TGtkMenu_needs_destruction_ref_count + +proc set_needs_destruction_ref_count*(a: var TGtkMenu, + `needs_destruction_ref_count`: guint) = + a.GtkMenuflag0 = a.GtkMenuflag0 or + (int16(`needs_destruction_ref_count` shl + bp_TGtkMenu_needs_destruction_ref_count) and + bm_TGtkMenu_needs_destruction_ref_count) + +proc torn_off*(a: var TGtkMenu): guint = + result = (a.GtkMenuflag0 and bm_TGtkMenu_torn_off) shr bp_TGtkMenu_torn_off + +proc set_torn_off*(a: var TGtkMenu, `torn_off`: guint) = + a.GtkMenuflag0 = a.GtkMenuflag0 or + (int16(`torn_off` shl bp_TGtkMenu_torn_off) and bm_TGtkMenu_torn_off) + +proc tearoff_active*(a: var TGtkMenu): guint = + result = (a.GtkMenuflag0 and bm_TGtkMenu_tearoff_active) shr + bp_TGtkMenu_tearoff_active + +proc set_tearoff_active*(a: var TGtkMenu, `tearoff_active`: guint) = + a.GtkMenuflag0 = a.GtkMenuflag0 or + (int16(`tearoff_active` shl bp_TGtkMenu_tearoff_active) and + bm_TGtkMenu_tearoff_active) + +proc scroll_fast*(a: var TGtkMenu): guint = + result = (a.GtkMenuflag0 and bm_TGtkMenu_scroll_fast) shr bp_TGtkMenu_scroll_fast + +proc set_scroll_fast*(a: var TGtkMenu, `scroll_fast`: guint) = + a.GtkMenuflag0 = a.GtkMenuflag0 or + (int16(`scroll_fast` shl bp_TGtkMenu_scroll_fast) and + bm_TGtkMenu_scroll_fast) + +proc upper_arrow_visible*(a: var TGtkMenu): guint = + result = (a.GtkMenuflag0 and bm_TGtkMenu_upper_arrow_visible) shr + bp_TGtkMenu_upper_arrow_visible + +proc set_upper_arrow_visible*(a: var TGtkMenu, `upper_arrow_visible`: guint) = + a.GtkMenuflag0 = a.GtkMenuflag0 or + (int16(`upper_arrow_visible` shl bp_TGtkMenu_upper_arrow_visible) and + bm_TGtkMenu_upper_arrow_visible) + +proc lower_arrow_visible*(a: var TGtkMenu): guint = + result = (a.GtkMenuflag0 and bm_TGtkMenu_lower_arrow_visible) shr + bp_TGtkMenu_lower_arrow_visible + +proc set_lower_arrow_visible*(a: var TGtkMenu, `lower_arrow_visible`: guint) = + a.GtkMenuflag0 = a.GtkMenuflag0 or + (int16(`lower_arrow_visible` shl bp_TGtkMenu_lower_arrow_visible) and + bm_TGtkMenu_lower_arrow_visible) + +proc upper_arrow_prelight*(a: var TGtkMenu): guint = + result = (a.GtkMenuflag0 and bm_TGtkMenu_upper_arrow_prelight) shr + bp_TGtkMenu_upper_arrow_prelight + +proc set_upper_arrow_prelight*(a: var TGtkMenu, `upper_arrow_prelight`: guint) = + a.GtkMenuflag0 = a.GtkMenuflag0 or + (int16(`upper_arrow_prelight` shl bp_TGtkMenu_upper_arrow_prelight) and + bm_TGtkMenu_upper_arrow_prelight) + +proc lower_arrow_prelight*(a: var TGtkMenu): guint = + result = (a.GtkMenuflag0 and bm_TGtkMenu_lower_arrow_prelight) shr + bp_TGtkMenu_lower_arrow_prelight + +proc set_lower_arrow_prelight*(a: var TGtkMenu, `lower_arrow_prelight`: guint) = + a.GtkMenuflag0 = a.GtkMenuflag0 or + (int16(`lower_arrow_prelight` shl bp_TGtkMenu_lower_arrow_prelight) and + bm_TGtkMenu_lower_arrow_prelight) + +proc gtk_menu_append*(menu, child: PGtkWidget) = + gtk_menu_shell_append(cast[PGtkMenuShell](menu), child) + +proc gtk_menu_prepend*(menu, child: PGtkWidget) = + gtk_menu_shell_prepend(cast[PGtkMenuShell](menu), child) + +proc gtk_menu_insert*(menu, child: PGtkWidget, pos: gint) = + gtk_menu_shell_insert(cast[PGtkMenuShell](menu), child, pos) + +proc GTK_TYPE_ENTRY*(): GType = + result = gtk_entry_get_type() + +proc GTK_ENTRY*(obj: pointer): PGtkEntry = + result = cast[PGtkEntry](GTK_CHECK_CAST(obj, GTK_TYPE_ENTRY())) + +proc GTK_ENTRY_CLASS*(klass: pointer): PGtkEntryClass = + result = cast[PGtkEntryClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_ENTRY())) + +proc GTK_IS_ENTRY*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_ENTRY()) + +proc GTK_IS_ENTRY_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_ENTRY()) + +proc GTK_ENTRY_GET_CLASS*(obj: pointer): PGtkEntryClass = + result = cast[PGtkEntryClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_ENTRY())) + +proc editable*(a: var TGtkEntry): guint = + result = (a.GtkEntryflag0 and bm_TGtkEntry_editable) shr bp_TGtkEntry_editable + +proc set_editable*(a: var TGtkEntry, `editable`: guint) = + a.GtkEntryflag0 = a.GtkEntryflag0 or + (int16(`editable` shl bp_TGtkEntry_editable) and bm_TGtkEntry_editable) + +proc visible*(a: var TGtkEntry): guint = + result = (a.GtkEntryflag0 and bm_TGtkEntry_visible) shr bp_TGtkEntry_visible + +proc set_visible*(a: var TGtkEntry, `visible`: guint) = + a.GtkEntryflag0 = a.GtkEntryflag0 or + (int16(`visible` shl bp_TGtkEntry_visible) and bm_TGtkEntry_visible) + +proc overwrite_mode*(a: var TGtkEntry): guint = + result = (a.GtkEntryflag0 and bm_TGtkEntry_overwrite_mode) shr + bp_TGtkEntry_overwrite_mode + +proc set_overwrite_mode*(a: var TGtkEntry, `overwrite_mode`: guint) = + a.GtkEntryflag0 = a.GtkEntryflag0 or + (int16(`overwrite_mode` shl bp_TGtkEntry_overwrite_mode) and + bm_TGtkEntry_overwrite_mode) + +proc in_drag*(a: var TGtkEntry): guint = + result = (a.GtkEntryflag0 and bm_TGtkEntry_in_drag) shr bp_TGtkEntry_in_drag + +proc set_in_drag*(a: var TGtkEntry, `in_drag`: guint) = + a.GtkEntryflag0 = a.GtkEntryflag0 or + (int16(`in_drag` shl bp_TGtkEntry_in_drag) and bm_TGtkEntry_in_drag) + +proc cache_includes_preedit*(a: var TGtkEntry): guint = + result = (a.flag1 and bm_TGtkEntry_cache_includes_preedit) shr + bp_TGtkEntry_cache_includes_preedit + +proc set_cache_includes_preedit*(a: var TGtkEntry, + `cache_includes_preedit`: guint) = + a.flag1 = a.flag1 or + (int16(`cache_includes_preedit` shl bp_TGtkEntry_cache_includes_preedit) and + bm_TGtkEntry_cache_includes_preedit) + +proc need_im_reset*(a: var TGtkEntry): guint = + result = (a.flag1 and bm_TGtkEntry_need_im_reset) shr + bp_TGtkEntry_need_im_reset + +proc set_need_im_reset*(a: var TGtkEntry, `need_im_reset`: guint) = + a.flag1 = a.flag1 or + (int16(`need_im_reset` shl bp_TGtkEntry_need_im_reset) and + bm_TGtkEntry_need_im_reset) + +proc has_frame*(a: var TGtkEntry): guint = + result = (a.flag1 and bm_TGtkEntry_has_frame) shr bp_TGtkEntry_has_frame + +proc set_has_frame*(a: var TGtkEntry, `has_frame`: guint) = + a.flag1 = a.flag1 or + (int16(`has_frame` shl bp_TGtkEntry_has_frame) and bm_TGtkEntry_has_frame) + +proc activates_default*(a: var TGtkEntry): guint = + result = (a.flag1 and bm_TGtkEntry_activates_default) shr + bp_TGtkEntry_activates_default + +proc set_activates_default*(a: var TGtkEntry, `activates_default`: guint) = + a.flag1 = a.flag1 or + (int16(`activates_default` shl bp_TGtkEntry_activates_default) and + bm_TGtkEntry_activates_default) + +proc cursor_visible*(a: var TGtkEntry): guint = + result = (a.flag1 and bm_TGtkEntry_cursor_visible) shr + bp_TGtkEntry_cursor_visible + +proc set_cursor_visible*(a: var TGtkEntry, `cursor_visible`: guint) = + a.flag1 = a.flag1 or + (int16(`cursor_visible` shl bp_TGtkEntry_cursor_visible) and + bm_TGtkEntry_cursor_visible) + +proc in_click*(a: var TGtkEntry): guint = + result = (a.flag1 and bm_TGtkEntry_in_click) shr bp_TGtkEntry_in_click + +proc set_in_click*(a: var TGtkEntry, `in_click`: guint) = + a.flag1 = a.flag1 or + (int16(`in_click` shl bp_TGtkEntry_in_click) and bm_TGtkEntry_in_click) + +proc is_cell_renderer*(a: var TGtkEntry): guint = + result = (a.flag1 and bm_TGtkEntry_is_cell_renderer) shr + bp_TGtkEntry_is_cell_renderer + +proc set_is_cell_renderer*(a: var TGtkEntry, `is_cell_renderer`: guint) = + a.flag1 = a.flag1 or + (int16(`is_cell_renderer` shl bp_TGtkEntry_is_cell_renderer) and + bm_TGtkEntry_is_cell_renderer) + +proc editing_canceled*(a: var TGtkEntry): guint = + result = (a.flag1 and bm_TGtkEntry_editing_canceled) shr + bp_TGtkEntry_editing_canceled + +proc set_editing_canceled*(a: var TGtkEntry, `editing_canceled`: guint) = + a.flag1 = a.flag1 or + (int16(`editing_canceled` shl bp_TGtkEntry_editing_canceled) and + bm_TGtkEntry_editing_canceled) + +proc mouse_cursor_obscured*(a: var TGtkEntry): guint = + result = (a.flag1 and bm_TGtkEntry_mouse_cursor_obscured) shr + bp_TGtkEntry_mouse_cursor_obscured + +proc set_mouse_cursor_obscured*(a: var TGtkEntry, `mouse_cursor_obscured`: guint) = + a.flag1 = a.flag1 or + (int16(`mouse_cursor_obscured` shl bp_TGtkEntry_mouse_cursor_obscured) and + bm_TGtkEntry_mouse_cursor_obscured) + +proc GTK_TYPE_EVENT_BOX*(): GType = + result = gtk_event_box_get_type() + +proc GTK_EVENT_BOX*(obj: pointer): PGtkEventBox = + result = cast[PGtkEventBox](GTK_CHECK_CAST(obj, GTK_TYPE_EVENT_BOX())) + +proc GTK_EVENT_BOX_CLASS*(klass: pointer): PGtkEventBoxClass = + result = cast[PGtkEventBoxClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_EVENT_BOX())) + +proc GTK_IS_EVENT_BOX*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_EVENT_BOX()) + +proc GTK_IS_EVENT_BOX_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_EVENT_BOX()) + +proc GTK_EVENT_BOX_GET_CLASS*(obj: pointer): PGtkEventBoxClass = + result = cast[PGtkEventBoxClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_EVENT_BOX())) + +proc GTK_TYPE_FILE_SELECTION*(): GType = + result = gtk_file_selection_get_type() + +proc GTK_FILE_SELECTION*(obj: pointer): PGtkFileSelection = + result = cast[PGtkFileSelection](GTK_CHECK_CAST(obj, GTK_TYPE_FILE_SELECTION())) + +proc GTK_FILE_SELECTION_CLASS*(klass: pointer): PGtkFileSelectionClass = + result = cast[PGtkFileSelectionClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_FILE_SELECTION())) + +proc GTK_IS_FILE_SELECTION*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_FILE_SELECTION()) + +proc GTK_IS_FILE_SELECTION_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_FILE_SELECTION()) + +proc GTK_FILE_SELECTION_GET_CLASS*(obj: pointer): PGtkFileSelectionClass = + result = cast[PGtkFileSelectionClass](GTK_CHECK_GET_CLASS(obj, + GTK_TYPE_FILE_SELECTION())) + +proc GTK_TYPE_FIXED*(): GType = + result = gtk_fixed_get_type() + +proc GTK_FIXED*(obj: pointer): PGtkFixed = + result = cast[PGtkFixed](GTK_CHECK_CAST(obj, GTK_TYPE_FIXED())) + +proc GTK_FIXED_CLASS*(klass: pointer): PGtkFixedClass = + result = cast[PGtkFixedClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_FIXED())) + +proc GTK_IS_FIXED*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_FIXED()) + +proc GTK_IS_FIXED_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_FIXED()) + +proc GTK_FIXED_GET_CLASS*(obj: pointer): PGtkFixedClass = + result = cast[PGtkFixedClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_FIXED())) + +proc GTK_TYPE_FONT_SELECTION*(): GType = + result = gtk_font_selection_get_type() + +proc GTK_FONT_SELECTION*(obj: pointer): PGtkFontSelection = + result = cast[PGtkFontSelection](GTK_CHECK_CAST(obj, GTK_TYPE_FONT_SELECTION())) + +proc GTK_FONT_SELECTION_CLASS*(klass: pointer): PGtkFontSelectionClass = + result = cast[PGtkFontSelectionClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_FONT_SELECTION())) + +proc GTK_IS_FONT_SELECTION*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_FONT_SELECTION()) + +proc GTK_IS_FONT_SELECTION_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_FONT_SELECTION()) + +proc GTK_FONT_SELECTION_GET_CLASS*(obj: pointer): PGtkFontSelectionClass = + result = cast[PGtkFontSelectionClass](GTK_CHECK_GET_CLASS(obj, + GTK_TYPE_FONT_SELECTION())) + +proc GTK_TYPE_FONT_SELECTION_DIALOG*(): GType = + result = gtk_font_selection_dialog_get_type() + +proc GTK_FONT_SELECTION_DIALOG*(obj: pointer): PGtkFontSelectionDialog = + result = cast[PGtkFontSelectionDialog](GTK_CHECK_CAST(obj, + GTK_TYPE_FONT_SELECTION_DIALOG())) + +proc GTK_FONT_SELECTION_DIALOG_CLASS*(klass: pointer): PGtkFontSelectionDialogClass = + result = cast[PGtkFontSelectionDialogClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_FONT_SELECTION_DIALOG())) + +proc GTK_IS_FONT_SELECTION_DIALOG*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_FONT_SELECTION_DIALOG()) + +proc GTK_IS_FONT_SELECTION_DIALOG_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_FONT_SELECTION_DIALOG()) + +proc GTK_FONT_SELECTION_DIALOG_GET_CLASS*(obj: pointer): PGtkFontSelectionDialogClass = + result = cast[PGtkFontSelectionDialogClass](GTK_CHECK_GET_CLASS(obj, + GTK_TYPE_FONT_SELECTION_DIALOG())) + +proc GTK_TYPE_GAMMA_CURVE*(): GType = + result = gtk_gamma_curve_get_type() + +proc GTK_GAMMA_CURVE*(obj: pointer): PGtkGammaCurve = + result = cast[PGtkGammaCurve](GTK_CHECK_CAST(obj, GTK_TYPE_GAMMA_CURVE())) + +proc GTK_GAMMA_CURVE_CLASS*(klass: pointer): PGtkGammaCurveClass = + result = cast[PGtkGammaCurveClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_GAMMA_CURVE())) + +proc GTK_IS_GAMMA_CURVE*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_GAMMA_CURVE()) + +proc GTK_IS_GAMMA_CURVE_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_GAMMA_CURVE()) + +proc GTK_GAMMA_CURVE_GET_CLASS*(obj: pointer): PGtkGammaCurveClass = + result = cast[PGtkGammaCurveClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_GAMMA_CURVE())) + +proc GTK_TYPE_HANDLE_BOX*(): GType = + result = gtk_handle_box_get_type() + +proc GTK_HANDLE_BOX*(obj: pointer): PGtkHandleBox = + result = cast[PGtkHandleBox](GTK_CHECK_CAST(obj, GTK_TYPE_HANDLE_BOX())) + +proc GTK_HANDLE_BOX_CLASS*(klass: pointer): PGtkHandleBoxClass = + result = cast[PGtkHandleBoxClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_HANDLE_BOX())) + +proc GTK_IS_HANDLE_BOX*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_HANDLE_BOX()) + +proc GTK_IS_HANDLE_BOX_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_HANDLE_BOX()) + +proc GTK_HANDLE_BOX_GET_CLASS*(obj: pointer): PGtkHandleBoxClass = + result = cast[PGtkHandleBoxClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_HANDLE_BOX())) + +proc handle_position*(a: var TGtkHandleBox): guint = + result = (a.GtkHandleBoxflag0 and bm_TGtkHandleBox_handle_position) shr + bp_TGtkHandleBox_handle_position + +proc set_handle_position*(a: var TGtkHandleBox, `handle_position`: guint) = + a.GtkHandleBoxflag0 = a.GtkHandleBoxflag0 or + (int16(`handle_position` shl bp_TGtkHandleBox_handle_position) and + bm_TGtkHandleBox_handle_position) + +proc float_window_mapped*(a: var TGtkHandleBox): guint = + result = (a.GtkHandleBoxflag0 and bm_TGtkHandleBox_float_window_mapped) shr + bp_TGtkHandleBox_float_window_mapped + +proc set_float_window_mapped*(a: var TGtkHandleBox, `float_window_mapped`: guint) = + a.GtkHandleBoxflag0 = a.GtkHandleBoxflag0 or + (int16(`float_window_mapped` shl bp_TGtkHandleBox_float_window_mapped) and + bm_TGtkHandleBox_float_window_mapped) + +proc child_detached*(a: var TGtkHandleBox): guint = + result = (a.GtkHandleBoxflag0 and bm_TGtkHandleBox_child_detached) shr + bp_TGtkHandleBox_child_detached + +proc set_child_detached*(a: var TGtkHandleBox, `child_detached`: guint) = + a.GtkHandleBoxflag0 = a.GtkHandleBoxflag0 or + (int16(`child_detached` shl bp_TGtkHandleBox_child_detached) and + bm_TGtkHandleBox_child_detached) + +proc in_drag*(a: var TGtkHandleBox): guint = + result = (a.GtkHandleBoxflag0 and bm_TGtkHandleBox_in_drag) shr + bp_TGtkHandleBox_in_drag + +proc set_in_drag*(a: var TGtkHandleBox, `in_drag`: guint) = + a.GtkHandleBoxflag0 = a.GtkHandleBoxflag0 or + (int16(`in_drag` shl bp_TGtkHandleBox_in_drag) and bm_TGtkHandleBox_in_drag) + +proc shrink_on_detach*(a: var TGtkHandleBox): guint = + result = (a.GtkHandleBoxflag0 and bm_TGtkHandleBox_shrink_on_detach) shr + bp_TGtkHandleBox_shrink_on_detach + +proc set_shrink_on_detach*(a: var TGtkHandleBox, `shrink_on_detach`: guint) = + a.GtkHandleBoxflag0 = a.GtkHandleBoxflag0 or + (int16(`shrink_on_detach` shl bp_TGtkHandleBox_shrink_on_detach) and + bm_TGtkHandleBox_shrink_on_detach) + +proc snap_edge*(a: var TGtkHandleBox): gint = + result = (a.GtkHandleBoxflag0 and bm_TGtkHandleBox_snap_edge) shr + bp_TGtkHandleBox_snap_edge + +proc set_snap_edge*(a: var TGtkHandleBox, `snap_edge`: gint) = + a.GtkHandleBoxflag0 = a.GtkHandleBoxflag0 or + (int16(`snap_edge` shl bp_TGtkHandleBox_snap_edge) and + bm_TGtkHandleBox_snap_edge) + +proc GTK_TYPE_PANED*(): GType = + result = gtk_paned_get_type() + +proc GTK_PANED*(obj: pointer): PGtkPaned = + result = cast[PGtkPaned](GTK_CHECK_CAST(obj, GTK_TYPE_PANED())) + +proc GTK_PANED_CLASS*(klass: pointer): PGtkPanedClass = + result = cast[PGtkPanedClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_PANED())) + +proc GTK_IS_PANED*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_PANED()) + +proc GTK_IS_PANED_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_PANED()) + +proc GTK_PANED_GET_CLASS*(obj: pointer): PGtkPanedClass = + result = cast[PGtkPanedClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_PANED())) + +proc position_set*(a: var TGtkPaned): guint = + result = (a.GtkPanedflag0 and bm_TGtkPaned_position_set) shr + bp_TGtkPaned_position_set + +proc set_position_set*(a: var TGtkPaned, `position_set`: guint) = + a.GtkPanedflag0 = a.GtkPanedflag0 or + (int16(`position_set` shl bp_TGtkPaned_position_set) and + bm_TGtkPaned_position_set) + +proc in_drag*(a: var TGtkPaned): guint = + result = (a.GtkPanedflag0 and bm_TGtkPaned_in_drag) shr bp_TGtkPaned_in_drag + +proc set_in_drag*(a: var TGtkPaned, `in_drag`: guint) = + a.GtkPanedflag0 = a.GtkPanedflag0 or + (int16(`in_drag` shl bp_TGtkPaned_in_drag) and bm_TGtkPaned_in_drag) + +proc child1_shrink*(a: var TGtkPaned): guint = + result = (a.GtkPanedflag0 and bm_TGtkPaned_child1_shrink) shr + bp_TGtkPaned_child1_shrink + +proc set_child1_shrink*(a: var TGtkPaned, `child1_shrink`: guint) = + a.GtkPanedflag0 = a.GtkPanedflag0 or + (int16(`child1_shrink` shl bp_TGtkPaned_child1_shrink) and + bm_TGtkPaned_child1_shrink) + +proc child1_resize*(a: var TGtkPaned): guint = + result = (a.GtkPanedflag0 and bm_TGtkPaned_child1_resize) shr + bp_TGtkPaned_child1_resize + +proc set_child1_resize*(a: var TGtkPaned, `child1_resize`: guint) = + a.GtkPanedflag0 = a.GtkPanedflag0 or + (int16(`child1_resize` shl bp_TGtkPaned_child1_resize) and + bm_TGtkPaned_child1_resize) + +proc child2_shrink*(a: var TGtkPaned): guint = + result = (a.GtkPanedflag0 and bm_TGtkPaned_child2_shrink) shr + bp_TGtkPaned_child2_shrink + +proc set_child2_shrink*(a: var TGtkPaned, `child2_shrink`: guint) = + a.GtkPanedflag0 = a.GtkPanedflag0 or + (int16(`child2_shrink` shl bp_TGtkPaned_child2_shrink) and + bm_TGtkPaned_child2_shrink) + +proc child2_resize*(a: var TGtkPaned): guint = + result = (a.GtkPanedflag0 and bm_TGtkPaned_child2_resize) shr + bp_TGtkPaned_child2_resize + +proc set_child2_resize*(a: var TGtkPaned, `child2_resize`: guint) = + a.GtkPanedflag0 = a.GtkPanedflag0 or + (int16(`child2_resize` shl bp_TGtkPaned_child2_resize) and + bm_TGtkPaned_child2_resize) + +proc orientation*(a: var TGtkPaned): guint = + result = (a.GtkPanedflag0 and bm_TGtkPaned_orientation) shr + bp_TGtkPaned_orientation + +proc set_orientation*(a: var TGtkPaned, `orientation`: guint) = + a.GtkPanedflag0 = a.GtkPanedflag0 or + (int16(`orientation` shl bp_TGtkPaned_orientation) and + bm_TGtkPaned_orientation) + +proc in_recursion*(a: var TGtkPaned): guint = + result = (a.GtkPanedflag0 and bm_TGtkPaned_in_recursion) shr + bp_TGtkPaned_in_recursion + +proc set_in_recursion*(a: var TGtkPaned, `in_recursion`: guint) = + a.GtkPanedflag0 = a.GtkPanedflag0 or + (int16(`in_recursion` shl bp_TGtkPaned_in_recursion) and + bm_TGtkPaned_in_recursion) + +proc handle_prelit*(a: var TGtkPaned): guint = + result = (a.GtkPanedflag0 and bm_TGtkPaned_handle_prelit) shr + bp_TGtkPaned_handle_prelit + +proc set_handle_prelit*(a: var TGtkPaned, `handle_prelit`: guint) = + a.GtkPanedflag0 = a.GtkPanedflag0 or + (int16(`handle_prelit` shl bp_TGtkPaned_handle_prelit) and + bm_TGtkPaned_handle_prelit) + +proc gtk_paned_gutter_size*(p: pointer, s: gint) = + if (p != nil) and (s != 0'i32): nil + +proc gtk_paned_set_gutter_size*(p: pointer, s: gint) = + if (p != nil) and (s != 0'i32): nil + +proc GTK_TYPE_HBUTTON_BOX*(): GType = + result = gtk_hbutton_box_get_type() + +proc GTK_HBUTTON_BOX*(obj: pointer): PGtkHButtonBox = + result = cast[PGtkHButtonBox](GTK_CHECK_CAST(obj, GTK_TYPE_HBUTTON_BOX())) + +proc GTK_HBUTTON_BOX_CLASS*(klass: pointer): PGtkHButtonBoxClass = + result = cast[PGtkHButtonBoxClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_HBUTTON_BOX())) + +proc GTK_IS_HBUTTON_BOX*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_HBUTTON_BOX()) + +proc GTK_IS_HBUTTON_BOX_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_HBUTTON_BOX()) + +proc GTK_HBUTTON_BOX_GET_CLASS*(obj: pointer): PGtkHButtonBoxClass = + result = cast[PGtkHButtonBoxClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_HBUTTON_BOX())) + +proc GTK_TYPE_HPANED*(): GType = + result = gtk_hpaned_get_type() + +proc GTK_HPANED*(obj: pointer): PGtkHPaned = + result = cast[PGtkHPaned](GTK_CHECK_CAST(obj, GTK_TYPE_HPANED())) + +proc GTK_HPANED_CLASS*(klass: pointer): PGtkHPanedClass = + result = cast[PGtkHPanedClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_HPANED())) + +proc GTK_IS_HPANED*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_HPANED()) + +proc GTK_IS_HPANED_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_HPANED()) + +proc GTK_HPANED_GET_CLASS*(obj: pointer): PGtkHPanedClass = + result = cast[PGtkHPanedClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_HPANED())) + +proc GTK_TYPE_RULER*(): GType = + result = gtk_ruler_get_type() + +proc GTK_RULER*(obj: pointer): PGtkRuler = + result = cast[PGtkRuler](GTK_CHECK_CAST(obj, GTK_TYPE_RULER())) + +proc GTK_RULER_CLASS*(klass: pointer): PGtkRulerClass = + result = cast[PGtkRulerClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_RULER())) + +proc GTK_IS_RULER*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_RULER()) + +proc GTK_IS_RULER_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_RULER()) + +proc GTK_RULER_GET_CLASS*(obj: pointer): PGtkRulerClass = + result = cast[PGtkRulerClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_RULER())) + +proc GTK_TYPE_HRULER*(): GType = + result = gtk_hruler_get_type() + +proc GTK_HRULER*(obj: pointer): PGtkHRuler = + result = cast[PGtkHRuler](GTK_CHECK_CAST(obj, GTK_TYPE_HRULER())) + +proc GTK_HRULER_CLASS*(klass: pointer): PGtkHRulerClass = + result = cast[PGtkHRulerClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_HRULER())) + +proc GTK_IS_HRULER*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_HRULER()) + +proc GTK_IS_HRULER_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_HRULER()) + +proc GTK_HRULER_GET_CLASS*(obj: pointer): PGtkHRulerClass = + result = cast[PGtkHRulerClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_HRULER())) + +proc GTK_TYPE_SETTINGS*(): GType = + result = gtk_settings_get_type() + +proc GTK_SETTINGS*(obj: pointer): PGtkSettings = + result = cast[PGtkSettings](GTK_CHECK_CAST(obj, GTK_TYPE_SETTINGS())) + +proc GTK_SETTINGS_CLASS*(klass: pointer): PGtkSettingsClass = + result = cast[PGtkSettingsClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_SETTINGS())) + +proc GTK_IS_SETTINGS*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_SETTINGS()) + +proc GTK_IS_SETTINGS_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_SETTINGS()) + +proc GTK_SETTINGS_GET_CLASS*(obj: pointer): PGtkSettingsClass = + result = cast[PGtkSettingsClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_SETTINGS())) + +proc GTK_TYPE_RC_STYLE*(): GType = + result = gtk_rc_style_get_type() + +proc GTK_RC_STYLE_get*(anObject: pointer): PGtkRcStyle = + result = cast[PGtkRcStyle](G_TYPE_CHECK_INSTANCE_CAST(anObject, GTK_TYPE_RC_STYLE())) + +proc GTK_RC_STYLE_CLASS*(klass: pointer): PGtkRcStyleClass = + result = cast[PGtkRcStyleClass](G_TYPE_CHECK_CLASS_CAST(klass, GTK_TYPE_RC_STYLE())) + +proc GTK_IS_RC_STYLE*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GTK_TYPE_RC_STYLE()) + +proc GTK_IS_RC_STYLE_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GTK_TYPE_RC_STYLE()) + +proc GTK_RC_STYLE_GET_CLASS*(obj: pointer): PGtkRcStyleClass = + result = cast[PGtkRcStyleClass](G_TYPE_INSTANCE_GET_CLASS(obj, GTK_TYPE_RC_STYLE())) + +proc engine_specified*(a: var TGtkRcStyle): guint = + result = (a.GtkRcStyleflag0 and bm_TGtkRcStyle_engine_specified) shr + bp_TGtkRcStyle_engine_specified + +proc set_engine_specified*(a: var TGtkRcStyle, `engine_specified`: guint) = + a.GtkRcStyleflag0 = a.GtkRcStyleflag0 or + (int16(`engine_specified` shl bp_TGtkRcStyle_engine_specified) and + bm_TGtkRcStyle_engine_specified) + +proc GTK_TYPE_STYLE*(): GType = + result = gtk_style_get_type() + +proc GTK_STYLE*(anObject: pointer): PGtkStyle = + result = cast[PGtkStyle](G_TYPE_CHECK_INSTANCE_CAST(anObject, GTK_TYPE_STYLE())) + +proc GTK_STYLE_CLASS*(klass: pointer): PGtkStyleClass = + result = cast[PGtkStyleClass](G_TYPE_CHECK_CLASS_CAST(klass, GTK_TYPE_STYLE())) + +proc GTK_IS_STYLE*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GTK_TYPE_STYLE()) + +proc GTK_IS_STYLE_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GTK_TYPE_STYLE()) + +proc GTK_STYLE_GET_CLASS*(obj: pointer): PGtkStyleClass = + result = cast[PGtkStyleClass](G_TYPE_INSTANCE_GET_CLASS(obj, GTK_TYPE_STYLE())) + +proc GTK_TYPE_BORDER*(): GType = + result = gtk_border_get_type() + +proc GTK_STYLE_ATTACHED*(style: pointer): bool = + result = ((GTK_STYLE(style)).attach_count) > 0'i32 + +proc gtk_style_apply_default_pixmap*(style: PGtkStyle, window: PGdkWindow, + state_type: TGtkStateType, + area: PGdkRectangle, x: gint, y: gint, + width: gint, height: gint) = + gtk_style_apply_default_background(style, window, true, state_type, area, x, + y, width, height) + +proc GTK_TYPE_RANGE*(): GType = + result = gtk_range_get_type() + +proc GTK_RANGE*(obj: pointer): PGtkRange = + result = cast[PGtkRange](GTK_CHECK_CAST(obj, GTK_TYPE_RANGE())) + +proc GTK_RANGE_CLASS*(klass: pointer): PGtkRangeClass = + result = cast[PGtkRangeClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_RANGE())) + +proc GTK_IS_RANGE*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_RANGE()) + +proc GTK_IS_RANGE_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_RANGE()) + +proc GTK_RANGE_GET_CLASS*(obj: pointer): PGtkRangeClass = + result = cast[PGtkRangeClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_RANGE())) + +proc inverted*(a: var TGtkRange): guint = + result = (a.GtkRangeflag0 and bm_TGtkRange_inverted) shr bp_TGtkRange_inverted + +proc set_inverted*(a: var TGtkRange, `inverted`: guint) = + a.GtkRangeflag0 = a.GtkRangeflag0 or + (int16(`inverted` shl bp_TGtkRange_inverted) and bm_TGtkRange_inverted) + +proc flippable*(a: var TGtkRange): guint = + result = (a.GtkRangeflag0 and bm_TGtkRange_flippable) shr bp_TGtkRange_flippable + +proc set_flippable*(a: var TGtkRange, `flippable`: guint) = + a.GtkRangeflag0 = a.GtkRangeflag0 or + (int16(`flippable` shl bp_TGtkRange_flippable) and bm_TGtkRange_flippable) + +proc has_stepper_a*(a: var TGtkRange): guint = + result = (a.GtkRangeflag0 and bm_TGtkRange_has_stepper_a) shr + bp_TGtkRange_has_stepper_a + +proc set_has_stepper_a*(a: var TGtkRange, `has_stepper_a`: guint) = + a.GtkRangeflag0 = a.GtkRangeflag0 or + (int16(`has_stepper_a` shl bp_TGtkRange_has_stepper_a) and + bm_TGtkRange_has_stepper_a) + +proc has_stepper_b*(a: var TGtkRange): guint = + result = (a.GtkRangeflag0 and bm_TGtkRange_has_stepper_b) shr + bp_TGtkRange_has_stepper_b + +proc set_has_stepper_b*(a: var TGtkRange, `has_stepper_b`: guint) = + a.GtkRangeflag0 = a.GtkRangeflag0 or + (int16(`has_stepper_b` shl bp_TGtkRange_has_stepper_b) and + bm_TGtkRange_has_stepper_b) + +proc has_stepper_c*(a: var TGtkRange): guint = + result = (a.GtkRangeflag0 and bm_TGtkRange_has_stepper_c) shr + bp_TGtkRange_has_stepper_c + +proc set_has_stepper_c*(a: var TGtkRange, `has_stepper_c`: guint) = + a.GtkRangeflag0 = a.GtkRangeflag0 or + (int16(`has_stepper_c` shl bp_TGtkRange_has_stepper_c) and + bm_TGtkRange_has_stepper_c) + +proc has_stepper_d*(a: var TGtkRange): guint = + result = (a.GtkRangeflag0 and bm_TGtkRange_has_stepper_d) shr + bp_TGtkRange_has_stepper_d + +proc set_has_stepper_d*(a: var TGtkRange, `has_stepper_d`: guint) = + a.GtkRangeflag0 = a.GtkRangeflag0 or + (int16(`has_stepper_d` shl bp_TGtkRange_has_stepper_d) and + bm_TGtkRange_has_stepper_d) + +proc need_recalc*(a: var TGtkRange): guint = + result = (a.GtkRangeflag0 and bm_TGtkRange_need_recalc) shr + bp_TGtkRange_need_recalc + +proc set_need_recalc*(a: var TGtkRange, `need_recalc`: guint) = + a.GtkRangeflag0 = a.GtkRangeflag0 or + (int16(`need_recalc` shl bp_TGtkRange_need_recalc) and + bm_TGtkRange_need_recalc) + +proc slider_size_fixed*(a: var TGtkRange): guint = + result = (a.GtkRangeflag0 and bm_TGtkRange_slider_size_fixed) shr + bp_TGtkRange_slider_size_fixed + +proc set_slider_size_fixed*(a: var TGtkRange, `slider_size_fixed`: guint) = + a.GtkRangeflag0 = a.GtkRangeflag0 or + (int16(`slider_size_fixed` shl bp_TGtkRange_slider_size_fixed) and + bm_TGtkRange_slider_size_fixed) + +proc trough_click_forward*(a: var TGtkRange): guint = + result = (a.flag1 and bm_TGtkRange_trough_click_forward) shr + bp_TGtkRange_trough_click_forward + +proc set_trough_click_forward*(a: var TGtkRange, `trough_click_forward`: guint) = + a.flag1 = a.flag1 or + (int16(`trough_click_forward` shl bp_TGtkRange_trough_click_forward) and + bm_TGtkRange_trough_click_forward) + +proc update_pending*(a: var TGtkRange): guint = + result = (a.flag1 and bm_TGtkRange_update_pending) shr + bp_TGtkRange_update_pending + +proc set_update_pending*(a: var TGtkRange, `update_pending`: guint) = + a.flag1 = a.flag1 or + (int16(`update_pending` shl bp_TGtkRange_update_pending) and + bm_TGtkRange_update_pending) + +proc GTK_TYPE_SCALE*(): GType = + result = gtk_scale_get_type() + +proc GTK_SCALE*(obj: pointer): PGtkScale = + result = cast[PGtkScale](GTK_CHECK_CAST(obj, GTK_TYPE_SCALE())) + +proc GTK_SCALE_CLASS*(klass: pointer): PGtkScaleClass = + result = cast[PGtkScaleClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_SCALE())) + +proc GTK_IS_SCALE*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_SCALE()) + +proc GTK_IS_SCALE_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_SCALE()) + +proc GTK_SCALE_GET_CLASS*(obj: pointer): PGtkScaleClass = + result = cast[PGtkScaleClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_SCALE())) + +proc draw_value*(a: var TGtkScale): guint = + result = (a.GtkScaleflag0 and bm_TGtkScale_draw_value) shr bp_TGtkScale_draw_value + +proc set_draw_value*(a: var TGtkScale, `draw_value`: guint) = + a.GtkScaleflag0 = a.GtkScaleflag0 or + (int16(`draw_value` shl bp_TGtkScale_draw_value) and bm_TGtkScale_draw_value) + +proc value_pos*(a: var TGtkScale): guint = + result = (a.GtkScaleflag0 and bm_TGtkScale_value_pos) shr bp_TGtkScale_value_pos + +proc set_value_pos*(a: var TGtkScale, `value_pos`: guint) = + a.GtkScaleflag0 = a.GtkScaleflag0 or + (int16(`value_pos` shl bp_TGtkScale_value_pos) and bm_TGtkScale_value_pos) + +proc GTK_TYPE_HSCALE*(): GType = + result = gtk_hscale_get_type() + +proc GTK_HSCALE*(obj: pointer): PGtkHScale = + result = cast[PGtkHScale](GTK_CHECK_CAST(obj, GTK_TYPE_HSCALE())) + +proc GTK_HSCALE_CLASS*(klass: pointer): PGtkHScaleClass = + result = cast[PGtkHScaleClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_HSCALE())) + +proc GTK_IS_HSCALE*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_HSCALE()) + +proc GTK_IS_HSCALE_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_HSCALE()) + +proc GTK_HSCALE_GET_CLASS*(obj: pointer): PGtkHScaleClass = + result = cast[PGtkHScaleClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_HSCALE())) + +proc GTK_TYPE_SCROLLBAR*(): GType = + result = gtk_scrollbar_get_type() + +proc GTK_SCROLLBAR*(obj: pointer): PGtkScrollbar = + result = cast[PGtkScrollbar](GTK_CHECK_CAST(obj, GTK_TYPE_SCROLLBAR())) + +proc GTK_SCROLLBAR_CLASS*(klass: pointer): PGtkScrollbarClass = + result = cast[PGtkScrollbarClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_SCROLLBAR())) + +proc GTK_IS_SCROLLBAR*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_SCROLLBAR()) + +proc GTK_IS_SCROLLBAR_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_SCROLLBAR()) + +proc GTK_SCROLLBAR_GET_CLASS*(obj: pointer): PGtkScrollbarClass = + result = cast[PGtkScrollbarClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_SCROLLBAR())) + +proc GTK_TYPE_HSCROLLBAR*(): GType = + result = gtk_hscrollbar_get_type() + +proc GTK_HSCROLLBAR*(obj: pointer): PGtkHScrollbar = + result = cast[PGtkHScrollbar](GTK_CHECK_CAST(obj, GTK_TYPE_HSCROLLBAR())) + +proc GTK_HSCROLLBAR_CLASS*(klass: pointer): PGtkHScrollbarClass = + result = cast[PGtkHScrollbarClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_HSCROLLBAR())) + +proc GTK_IS_HSCROLLBAR*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_HSCROLLBAR()) + +proc GTK_IS_HSCROLLBAR_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_HSCROLLBAR()) + +proc GTK_HSCROLLBAR_GET_CLASS*(obj: pointer): PGtkHScrollbarClass = + result = cast[PGtkHScrollbarClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_HSCROLLBAR())) + +proc GTK_TYPE_SEPARATOR*(): GType = + result = gtk_separator_get_type() + +proc GTK_SEPARATOR*(obj: pointer): PGtkSeparator = + result = cast[PGtkSeparator](GTK_CHECK_CAST(obj, GTK_TYPE_SEPARATOR())) + +proc GTK_SEPARATOR_CLASS*(klass: pointer): PGtkSeparatorClass = + result = cast[PGtkSeparatorClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_SEPARATOR())) + +proc GTK_IS_SEPARATOR*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_SEPARATOR()) + +proc GTK_IS_SEPARATOR_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_SEPARATOR()) + +proc GTK_SEPARATOR_GET_CLASS*(obj: pointer): PGtkSeparatorClass = + result = cast[PGtkSeparatorClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_SEPARATOR())) + +proc GTK_TYPE_HSEPARATOR*(): GType = + result = gtk_hseparator_get_type() + +proc GTK_HSEPARATOR*(obj: pointer): PGtkHSeparator = + result = cast[PGtkHSeparator](GTK_CHECK_CAST(obj, GTK_TYPE_HSEPARATOR())) + +proc GTK_HSEPARATOR_CLASS*(klass: pointer): PGtkHSeparatorClass = + result = cast[PGtkHSeparatorClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_HSEPARATOR())) + +proc GTK_IS_HSEPARATOR*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_HSEPARATOR()) + +proc GTK_IS_HSEPARATOR_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_HSEPARATOR()) + +proc GTK_HSEPARATOR_GET_CLASS*(obj: pointer): PGtkHSeparatorClass = + result = cast[PGtkHSeparatorClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_HSEPARATOR())) + +proc GTK_TYPE_ICON_FACTORY*(): GType = + result = gtk_icon_factory_get_type() + +proc GTK_ICON_FACTORY*(anObject: pointer): PGtkIconFactory = + result = cast[PGtkIconFactory](G_TYPE_CHECK_INSTANCE_CAST(anObject, + GTK_TYPE_ICON_FACTORY())) + +proc GTK_ICON_FACTORY_CLASS*(klass: pointer): PGtkIconFactoryClass = + result = cast[PGtkIconFactoryClass](G_TYPE_CHECK_CLASS_CAST(klass, + GTK_TYPE_ICON_FACTORY())) + +proc GTK_IS_ICON_FACTORY*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GTK_TYPE_ICON_FACTORY()) + +proc GTK_IS_ICON_FACTORY_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GTK_TYPE_ICON_FACTORY()) + +proc GTK_ICON_FACTORY_GET_CLASS*(obj: pointer): PGtkIconFactoryClass = + result = cast[PGtkIconFactoryClass](G_TYPE_INSTANCE_GET_CLASS(obj, + GTK_TYPE_ICON_FACTORY())) + +proc GTK_TYPE_ICON_SET*(): GType = + result = gtk_icon_set_get_type() + +proc GTK_TYPE_ICON_SOURCE*(): GType = + result = gtk_icon_source_get_type() + +proc GTK_TYPE_IMAGE*(): GType = + result = gtk_image_get_type() + +proc GTK_IMAGE*(obj: pointer): PGtkImage = + result = cast[PGtkImage](GTK_CHECK_CAST(obj, GTK_TYPE_IMAGE())) + +proc GTK_IMAGE_CLASS*(klass: pointer): PGtkImageClass = + result = cast[PGtkImageClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_IMAGE())) + +proc GTK_IS_IMAGE*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_IMAGE()) + +proc GTK_IS_IMAGE_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_IMAGE()) + +proc GTK_IMAGE_GET_CLASS*(obj: pointer): PGtkImageClass = + result = cast[PGtkImageClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_IMAGE())) + +proc GTK_TYPE_IMAGE_MENU_ITEM*(): GType = + result = gtk_image_menu_item_get_type() + +proc GTK_IMAGE_MENU_ITEM*(obj: pointer): PGtkImageMenuItem = + result = cast[PGtkImageMenuItem](GTK_CHECK_CAST(obj, GTK_TYPE_IMAGE_MENU_ITEM())) + +proc GTK_IMAGE_MENU_ITEM_CLASS*(klass: pointer): PGtkImageMenuItemClass = + result = cast[PGtkImageMenuItemClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_IMAGE_MENU_ITEM())) + +proc GTK_IS_IMAGE_MENU_ITEM*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_IMAGE_MENU_ITEM()) + +proc GTK_IS_IMAGE_MENU_ITEM_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_IMAGE_MENU_ITEM()) + +proc GTK_IMAGE_MENU_ITEM_GET_CLASS*(obj: pointer): PGtkImageMenuItemClass = + result = cast[PGtkImageMenuItemClass](GTK_CHECK_GET_CLASS(obj, + GTK_TYPE_IMAGE_MENU_ITEM())) + +proc GTK_TYPE_IM_CONTEXT_SIMPLE*(): GType = + result = gtk_im_context_simple_get_type() + +proc GTK_IM_CONTEXT_SIMPLE*(obj: pointer): PGtkIMContextSimple = + result = cast[PGtkIMContextSimple](GTK_CHECK_CAST(obj, GTK_TYPE_IM_CONTEXT_SIMPLE())) + +proc GTK_IM_CONTEXT_SIMPLE_CLASS*(klass: pointer): PGtkIMContextSimpleClass = + result = cast[PGtkIMContextSimpleClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_IM_CONTEXT_SIMPLE())) + +proc GTK_IS_IM_CONTEXT_SIMPLE*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_IM_CONTEXT_SIMPLE()) + +proc GTK_IS_IM_CONTEXT_SIMPLE_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_IM_CONTEXT_SIMPLE()) + +proc GTK_IM_CONTEXT_SIMPLE_GET_CLASS*(obj: pointer): PGtkIMContextSimpleClass = + result = cast[PGtkIMContextSimpleClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_IM_CONTEXT_SIMPLE())) + +proc in_hex_sequence*(a: var TGtkIMContextSimple): guint = + result = (a.GtkIMContextSimpleflag0 and bm_TGtkIMContextSimple_in_hex_sequence) shr + bp_TGtkIMContextSimple_in_hex_sequence + +proc set_in_hex_sequence*(a: var TGtkIMContextSimple, `in_hex_sequence`: guint) = + a.GtkIMContextSimpleflag0 = a.GtkIMContextSimpleflag0 or + (int16(`in_hex_sequence` shl bp_TGtkIMContextSimple_in_hex_sequence) and + bm_TGtkIMContextSimple_in_hex_sequence) + +proc GTK_TYPE_IM_MULTICONTEXT*(): GType = + result = gtk_im_multicontext_get_type() + +proc GTK_IM_MULTICONTEXT*(obj: pointer): PGtkIMMulticontext = + result = cast[PGtkIMMulticontext](GTK_CHECK_CAST(obj, GTK_TYPE_IM_MULTICONTEXT())) + +proc GTK_IM_MULTICONTEXT_CLASS*(klass: pointer): PGtkIMMulticontextClass = + result = cast[PGtkIMMulticontextClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_IM_MULTICONTEXT())) + +proc GTK_IS_IM_MULTICONTEXT*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_IM_MULTICONTEXT()) + +proc GTK_IS_IM_MULTICONTEXT_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_IM_MULTICONTEXT()) + +proc GTK_IM_MULTICONTEXT_GET_CLASS*(obj: pointer): PGtkIMMulticontextClass = + result = cast[PGtkIMMulticontextClass](GTK_CHECK_GET_CLASS(obj, + GTK_TYPE_IM_MULTICONTEXT())) + +proc GTK_TYPE_INPUT_DIALOG*(): GType = + result = gtk_input_dialog_get_type() + +proc GTK_INPUT_DIALOG*(obj: pointer): PGtkInputDialog = + result = cast[PGtkInputDialog](GTK_CHECK_CAST(obj, GTK_TYPE_INPUT_DIALOG())) + +proc GTK_INPUT_DIALOG_CLASS*(klass: pointer): PGtkInputDialogClass = + result = cast[PGtkInputDialogClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_INPUT_DIALOG())) + +proc GTK_IS_INPUT_DIALOG*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_INPUT_DIALOG()) + +proc GTK_IS_INPUT_DIALOG_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_INPUT_DIALOG()) + +proc GTK_INPUT_DIALOG_GET_CLASS*(obj: pointer): PGtkInputDialogClass = + result = cast[PGtkInputDialogClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_INPUT_DIALOG())) + +proc GTK_TYPE_INVISIBLE*(): GType = + result = gtk_invisible_get_type() + +proc GTK_INVISIBLE*(obj: pointer): PGtkInvisible = + result = cast[PGtkInvisible](GTK_CHECK_CAST(obj, GTK_TYPE_INVISIBLE())) + +proc GTK_INVISIBLE_CLASS*(klass: pointer): PGtkInvisibleClass = + result = cast[PGtkInvisibleClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_INVISIBLE())) + +proc GTK_IS_INVISIBLE*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_INVISIBLE()) + +proc GTK_IS_INVISIBLE_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_INVISIBLE()) + +proc GTK_INVISIBLE_GET_CLASS*(obj: pointer): PGtkInvisibleClass = + result = cast[PGtkInvisibleClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_INVISIBLE())) + +proc GTK_TYPE_ITEM_FACTORY*(): GType = + result = gtk_item_factory_get_type() + +proc GTK_ITEM_FACTORY*(anObject: pointer): PGtkItemFactory = + result = cast[PGtkItemFactory](GTK_CHECK_CAST(anObject, GTK_TYPE_ITEM_FACTORY())) + +proc GTK_ITEM_FACTORY_CLASS*(klass: pointer): PGtkItemFactoryClass = + result = cast[PGtkItemFactoryClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_ITEM_FACTORY())) + +proc GTK_IS_ITEM_FACTORY*(anObject: pointer): bool = + result = GTK_CHECK_TYPE(anObject, GTK_TYPE_ITEM_FACTORY()) + +proc GTK_IS_ITEM_FACTORY_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_ITEM_FACTORY()) + +proc GTK_ITEM_FACTORY_GET_CLASS*(obj: pointer): PGtkItemFactoryClass = + result = cast[PGtkItemFactoryClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_ITEM_FACTORY())) + +proc GTK_TYPE_LAYOUT*(): GType = + result = gtk_layout_get_type() + +proc GTK_LAYOUT*(obj: pointer): PGtkLayout = + result = cast[PGtkLayout](GTK_CHECK_CAST(obj, GTK_TYPE_LAYOUT())) + +proc GTK_LAYOUT_CLASS*(klass: pointer): PGtkLayoutClass = + result = cast[PGtkLayoutClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_LAYOUT())) + +proc GTK_IS_LAYOUT*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_LAYOUT()) + +proc GTK_IS_LAYOUT_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_LAYOUT()) + +proc GTK_LAYOUT_GET_CLASS*(obj: pointer): PGtkLayoutClass = + result = cast[PGtkLayoutClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_LAYOUT())) + +proc GTK_TYPE_LIST*(): GType = + result = gtk_list_get_type() + +proc GTK_LIST*(obj: pointer): PGtkList = + result = cast[PGtkList](GTK_CHECK_CAST(obj, GTK_TYPE_LIST())) + +proc GTK_LIST_CLASS*(klass: pointer): PGtkListClass = + result = cast[PGtkListClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_LIST())) + +proc GTK_IS_LIST*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_LIST()) + +proc GTK_IS_LIST_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_LIST()) + +proc GTK_LIST_GET_CLASS*(obj: pointer): PGtkListClass = + result = cast[PGtkListClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_LIST())) + +proc selection_mode*(a: var TGtkList): guint = + result = (a.GtkListflag0 and bm_TGtkList_selection_mode) shr + bp_TGtkList_selection_mode + +proc set_selection_mode*(a: var TGtkList, `selection_mode`: guint) = + a.GtkListflag0 = a.GtkListflag0 or + (int16(`selection_mode` shl bp_TGtkList_selection_mode) and + bm_TGtkList_selection_mode) + +proc drag_selection*(a: var TGtkList): guint = + result = (a.GtkListflag0 and bm_TGtkList_drag_selection) shr + bp_TGtkList_drag_selection + +proc set_drag_selection*(a: var TGtkList, `drag_selection`: guint) = + a.GtkListflag0 = a.GtkListflag0 or + (int16(`drag_selection` shl bp_TGtkList_drag_selection) and + bm_TGtkList_drag_selection) + +proc add_mode*(a: var TGtkList): guint = + result = (a.GtkListflag0 and bm_TGtkList_add_mode) shr bp_TGtkList_add_mode + +proc set_add_mode*(a: var TGtkList, `add_mode`: guint) = + a.GtkListflag0 = a.GtkListflag0 or + (int16(`add_mode` shl bp_TGtkList_add_mode) and bm_TGtkList_add_mode) + +proc gtk_list_item_get_type(): GType {.importc, cdecl, dynlib: gtklib.} + +proc GTK_TYPE_LIST_ITEM*(): GType = + result = gtk_list_item_get_type() + +type + TGtkListItem = object of TGtkItem + TGtkListItemClass = object of TGtkItemClass + PGtkListItem = ptr TGtkListItem + PGtkListItemClass = ptr TGtkListItemClass + +proc GTK_LIST_ITEM*(obj: pointer): PGtkListItem = + result = cast[PGtkListItem](GTK_CHECK_CAST(obj, GTK_TYPE_LIST_ITEM())) + +proc GTK_LIST_ITEM_CLASS*(klass: pointer): PGtkListItemClass = + result = cast[PGtkListItemClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_LIST_ITEM())) + +proc GTK_IS_LIST_ITEM*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_LIST_ITEM()) + +proc GTK_IS_LIST_ITEM_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_LIST_ITEM()) + +proc GTK_LIST_ITEM_GET_CLASS*(obj: pointer): PGtkListItemClass = + result = cast[PGtkListItemClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_LIST_ITEM())) + +#proc gtk_tree_model_get_type(): GType {.importc, cdecl, dynlib: gtklib.} + +proc GTK_TYPE_TREE_MODEL*(): GType = + result = gtk_tree_model_get_type() + +proc GTK_TREE_MODEL*(obj: pointer): PGtkTreeModel = + result = cast[PGtkTreeModel](G_TYPE_CHECK_INSTANCE_CAST(obj, GTK_TYPE_TREE_MODEL())) + +proc GTK_IS_TREE_MODEL*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, GTK_TYPE_TREE_MODEL()) + +proc GTK_TREE_MODEL_GET_IFACE*(obj: pointer): PGtkTreeModelIface = + result = cast[PGtkTreeModelIface](G_TYPE_INSTANCE_GET_INTERFACE(obj, + GTK_TYPE_TREE_MODEL())) + +proc GTK_TYPE_TREE_ITER*(): GType = + result = gtk_tree_iter_get_type() + +proc GTK_TYPE_TREE_PATH*(): GType = + result = gtk_tree_path_get_type() + +proc gtk_tree_path_new_root*(): PGtkTreePath = + result = gtk_tree_path_new_first() + +proc gtk_tree_model_get_iter_root*(tree_model: PGtkTreeModel, iter: PGtkTreeIter): gboolean = + result = gtk_tree_model_get_iter_first(tree_model, iter) + +proc GTK_TYPE_TREE_SORTABLE*(): GType = + result = gtk_tree_sortable_get_type() + +proc GTK_TREE_SORTABLE*(obj: pointer): PGtkTreeSortable = + result = cast[PGtkTreeSortable](G_TYPE_CHECK_INSTANCE_CAST(obj, + GTK_TYPE_TREE_SORTABLE())) + +proc GTK_TREE_SORTABLE_CLASS*(obj: pointer): PGtkTreeSortableIface = + result = cast[PGtkTreeSortableIface](G_TYPE_CHECK_CLASS_CAST(obj, + GTK_TYPE_TREE_SORTABLE())) + +proc GTK_IS_TREE_SORTABLE*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, GTK_TYPE_TREE_SORTABLE()) + +proc GTK_TREE_SORTABLE_GET_IFACE*(obj: pointer): PGtkTreeSortableIface = + result = cast[PGtkTreeSortableIface](G_TYPE_INSTANCE_GET_INTERFACE(obj, + GTK_TYPE_TREE_SORTABLE())) + +proc GTK_TYPE_TREE_MODEL_SORT*(): GType = + result = gtk_tree_model_sort_get_type() + +proc GTK_TREE_MODEL_SORT*(obj: pointer): PGtkTreeModelSort = + result = cast[PGtkTreeModelSort](GTK_CHECK_CAST(obj, GTK_TYPE_TREE_MODEL_SORT())) + +proc GTK_TREE_MODEL_SORT_CLASS*(klass: pointer): PGtkTreeModelSortClass = + result = cast[PGtkTreeModelSortClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_TREE_MODEL_SORT())) + +proc GTK_IS_TREE_MODEL_SORT*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_TREE_MODEL_SORT()) + +proc GTK_IS_TREE_MODEL_SORT_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_TREE_MODEL_SORT()) + +proc GTK_TREE_MODEL_SORT_GET_CLASS*(obj: pointer): PGtkTreeModelSortClass = + result = cast[PGtkTreeModelSortClass](GTK_CHECK_GET_CLASS(obj, + GTK_TYPE_TREE_MODEL_SORT())) + +proc GTK_TYPE_LIST_STORE*(): GType = + result = gtk_list_store_get_type() + +proc GTK_LIST_STORE*(obj: pointer): PGtkListStore = + result = cast[PGtkListStore](GTK_CHECK_CAST(obj, GTK_TYPE_LIST_STORE())) + +proc GTK_LIST_STORE_CLASS*(klass: pointer): PGtkListStoreClass = + result = cast[PGtkListStoreClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_LIST_STORE())) + +proc GTK_IS_LIST_STORE*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_LIST_STORE()) + +proc GTK_IS_LIST_STORE_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_LIST_STORE()) + +proc GTK_LIST_STORE_GET_CLASS*(obj: pointer): PGtkListStoreClass = + result = cast[PGtkListStoreClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_LIST_STORE())) + +proc columns_dirty*(a: var TGtkListStore): guint = + result = (a.GtkListStoreflag0 and bm_TGtkListStore_columns_dirty) shr + bp_TGtkListStore_columns_dirty + +proc set_columns_dirty*(a: var TGtkListStore, `columns_dirty`: guint) = + a.GtkListStoreflag0 = a.GtkListStoreflag0 or + (int16(`columns_dirty` shl bp_TGtkListStore_columns_dirty) and + bm_TGtkListStore_columns_dirty) + +proc GTK_TYPE_MENU_BAR*(): GType = + result = gtk_menu_bar_get_type() + +proc GTK_MENU_BAR*(obj: pointer): PGtkMenuBar = + result = cast[PGtkMenuBar](GTK_CHECK_CAST(obj, GTK_TYPE_MENU_BAR())) + +proc GTK_MENU_BAR_CLASS*(klass: pointer): PGtkMenuBarClass = + result = cast[PGtkMenuBarClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_MENU_BAR())) + +proc GTK_IS_MENU_BAR*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_MENU_BAR()) + +proc GTK_IS_MENU_BAR_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_MENU_BAR()) + +proc GTK_MENU_BAR_GET_CLASS*(obj: pointer): PGtkMenuBarClass = + result = cast[PGtkMenuBarClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_MENU_BAR())) + +proc gtk_menu_bar_append*(menu, child: PGtkWidget) = + gtk_menu_shell_append(cast[PGtkMenuShell](menu), child) + +proc gtk_menu_bar_prepend*(menu, child: PGtkWidget) = + gtk_menu_shell_prepend(cast[PGtkMenuShell](menu), child) + +proc gtk_menu_bar_insert*(menu, child: PGtkWidget, pos: gint) = + gtk_menu_shell_insert(cast[PGtkMenuShell](menu), child, pos) + +proc GTK_TYPE_MESSAGE_DIALOG*(): GType = + result = gtk_message_dialog_get_type() + +proc GTK_MESSAGE_DIALOG*(obj: pointer): PGtkMessageDialog = + result = cast[PGtkMessageDialog](GTK_CHECK_CAST(obj, GTK_TYPE_MESSAGE_DIALOG())) + +proc GTK_MESSAGE_DIALOG_CLASS*(klass: pointer): PGtkMessageDialogClass = + result = cast[PGtkMessageDialogClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_MESSAGE_DIALOG())) + +proc GTK_IS_MESSAGE_DIALOG*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_MESSAGE_DIALOG()) + +proc GTK_IS_MESSAGE_DIALOG_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_MESSAGE_DIALOG()) + +proc GTK_MESSAGE_DIALOG_GET_CLASS*(obj: pointer): PGtkMessageDialogClass = + result = cast[PGtkMessageDialogClass](GTK_CHECK_GET_CLASS(obj, + GTK_TYPE_MESSAGE_DIALOG())) + +proc GTK_TYPE_NOTEBOOK*(): GType = + result = gtk_notebook_get_type() + +proc GTK_NOTEBOOK*(obj: pointer): PGtkNotebook = + result = cast[PGtkNotebook](GTK_CHECK_CAST(obj, GTK_TYPE_NOTEBOOK())) + +proc GTK_NOTEBOOK_CLASS*(klass: pointer): PGtkNotebookClass = + result = cast[PGtkNotebookClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_NOTEBOOK())) + +proc GTK_IS_NOTEBOOK*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_NOTEBOOK()) + +proc GTK_IS_NOTEBOOK_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_NOTEBOOK()) + +proc GTK_NOTEBOOK_GET_CLASS*(obj: pointer): PGtkNotebookClass = + result = cast[PGtkNotebookClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_NOTEBOOK())) + +proc show_tabs*(a: var TGtkNotebook): guint = + result = (a.GtkNotebookflag0 and bm_TGtkNotebook_show_tabs) shr + bp_TGtkNotebook_show_tabs + +proc set_show_tabs*(a: var TGtkNotebook, `show_tabs`: guint) = + a.GtkNotebookflag0 = a.GtkNotebookflag0 or + (int16(`show_tabs` shl bp_TGtkNotebook_show_tabs) and + bm_TGtkNotebook_show_tabs) + +proc homogeneous*(a: var TGtkNotebook): guint = + result = (a.GtkNotebookflag0 and bm_TGtkNotebook_homogeneous) shr + bp_TGtkNotebook_homogeneous + +proc set_homogeneous*(a: var TGtkNotebook, `homogeneous`: guint) = + a.GtkNotebookflag0 = a.GtkNotebookflag0 or + (int16(`homogeneous` shl bp_TGtkNotebook_homogeneous) and + bm_TGtkNotebook_homogeneous) + +proc show_border*(a: var TGtkNotebook): guint = + result = (a.GtkNotebookflag0 and bm_TGtkNotebook_show_border) shr + bp_TGtkNotebook_show_border + +proc set_show_border*(a: var TGtkNotebook, `show_border`: guint) = + a.GtkNotebookflag0 = a.GtkNotebookflag0 or + (int16(`show_border` shl bp_TGtkNotebook_show_border) and + bm_TGtkNotebook_show_border) + +proc tab_pos*(a: var TGtkNotebook): guint = + result = (a.GtkNotebookflag0 and bm_TGtkNotebook_tab_pos) shr bp_TGtkNotebook_tab_pos + +proc set_tab_pos*(a: var TGtkNotebook, `tab_pos`: guint) = + a.GtkNotebookflag0 = a.GtkNotebookflag0 or + (int16(`tab_pos` shl bp_TGtkNotebook_tab_pos) and bm_TGtkNotebook_tab_pos) + +proc scrollable*(a: var TGtkNotebook): guint = + result = (a.GtkNotebookflag0 and bm_TGtkNotebook_scrollable) shr + bp_TGtkNotebook_scrollable + +proc set_scrollable*(a: var TGtkNotebook, `scrollable`: guint) = + a.GtkNotebookflag0 = a.GtkNotebookflag0 or + (int16(`scrollable` shl bp_TGtkNotebook_scrollable) and + bm_TGtkNotebook_scrollable) + +proc in_child*(a: var TGtkNotebook): guint = + result = (a.GtkNotebookflag0 and bm_TGtkNotebook_in_child) shr + bp_TGtkNotebook_in_child + +proc set_in_child*(a: var TGtkNotebook, `in_child`: guint) = + a.GtkNotebookflag0 = a.GtkNotebookflag0 or + (int16(`in_child` shl bp_TGtkNotebook_in_child) and bm_TGtkNotebook_in_child) + +proc click_child*(a: var TGtkNotebook): guint = + result = (a.GtkNotebookflag0 and bm_TGtkNotebook_click_child) shr + bp_TGtkNotebook_click_child + +proc set_click_child*(a: var TGtkNotebook, `click_child`: guint) = + a.GtkNotebookflag0 = a.GtkNotebookflag0 or + (int16(`click_child` shl bp_TGtkNotebook_click_child) and + bm_TGtkNotebook_click_child) + +proc button*(a: var TGtkNotebook): guint = + result = (a.GtkNotebookflag0 and bm_TGtkNotebook_button) shr bp_TGtkNotebook_button + +proc set_button*(a: var TGtkNotebook, `button`: guint) = + a.GtkNotebookflag0 = a.GtkNotebookflag0 or + (int16(`button` shl bp_TGtkNotebook_button) and bm_TGtkNotebook_button) + +proc need_timer*(a: var TGtkNotebook): guint = + result = (a.GtkNotebookflag0 and bm_TGtkNotebook_need_timer) shr + bp_TGtkNotebook_need_timer + +proc set_need_timer*(a: var TGtkNotebook, `need_timer`: guint) = + a.GtkNotebookflag0 = a.GtkNotebookflag0 or + (int16(`need_timer` shl bp_TGtkNotebook_need_timer) and + bm_TGtkNotebook_need_timer) + +proc child_has_focus*(a: var TGtkNotebook): guint = + result = (a.GtkNotebookflag0 and bm_TGtkNotebook_child_has_focus) shr + bp_TGtkNotebook_child_has_focus + +proc set_child_has_focus*(a: var TGtkNotebook, `child_has_focus`: guint) = + a.GtkNotebookflag0 = a.GtkNotebookflag0 or + (int16(`child_has_focus` shl bp_TGtkNotebook_child_has_focus) and + bm_TGtkNotebook_child_has_focus) + +proc have_visible_child*(a: var TGtkNotebook): guint = + result = (a.GtkNotebookflag0 and bm_TGtkNotebook_have_visible_child) shr + bp_TGtkNotebook_have_visible_child + +proc set_have_visible_child*(a: var TGtkNotebook, `have_visible_child`: guint) = + a.GtkNotebookflag0 = a.GtkNotebookflag0 or + (int16(`have_visible_child` shl bp_TGtkNotebook_have_visible_child) and + bm_TGtkNotebook_have_visible_child) + +proc focus_out*(a: var TGtkNotebook): guint = + result = (a.GtkNotebookflag0 and bm_TGtkNotebook_focus_out) shr + bp_TGtkNotebook_focus_out + +proc set_focus_out*(a: var TGtkNotebook, `focus_out`: guint) = + a.GtkNotebookflag0 = a.GtkNotebookflag0 or + (int16(`focus_out` shl bp_TGtkNotebook_focus_out) and + bm_TGtkNotebook_focus_out) + +proc GTK_TYPE_OLD_EDITABLE*(): GType = + result = gtk_old_editable_get_type() + +proc GTK_OLD_EDITABLE*(obj: pointer): PGtkOldEditable = + result = cast[PGtkOldEditable](GTK_CHECK_CAST(obj, GTK_TYPE_OLD_EDITABLE())) + +proc GTK_OLD_EDITABLE_CLASS*(klass: pointer): PGtkOldEditableClass = + result = cast[PGtkOldEditableClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_OLD_EDITABLE())) + +proc GTK_IS_OLD_EDITABLE*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_OLD_EDITABLE()) + +proc GTK_IS_OLD_EDITABLE_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_OLD_EDITABLE()) + +proc GTK_OLD_EDITABLE_GET_CLASS*(obj: pointer): PGtkOldEditableClass = + result = cast[PGtkOldEditableClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_OLD_EDITABLE())) + +proc has_selection*(a: var TGtkOldEditable): guint = + result = (a.GtkOldEditableflag0 and bm_TGtkOldEditable_has_selection) shr + bp_TGtkOldEditable_has_selection + +proc set_has_selection*(a: var TGtkOldEditable, `has_selection`: guint) = + a.GtkOldEditableflag0 = a.GtkOldEditableflag0 or + (int16(`has_selection` shl bp_TGtkOldEditable_has_selection) and + bm_TGtkOldEditable_has_selection) + +proc editable*(a: var TGtkOldEditable): guint = + result = (a.GtkOldEditableflag0 and bm_TGtkOldEditable_editable) shr + bp_TGtkOldEditable_editable + +proc set_editable*(a: var TGtkOldEditable, `editable`: guint) = + a.GtkOldEditableflag0 = a.GtkOldEditableflag0 or + (int16(`editable` shl bp_TGtkOldEditable_editable) and + bm_TGtkOldEditable_editable) + +proc visible*(a: var TGtkOldEditable): guint = + result = (a.GtkOldEditableflag0 and bm_TGtkOldEditable_visible) shr + bp_TGtkOldEditable_visible + +proc set_visible*(a: var TGtkOldEditable, `visible`: guint) = + a.GtkOldEditableflag0 = a.GtkOldEditableflag0 or + (int16(`visible` shl bp_TGtkOldEditable_visible) and + bm_TGtkOldEditable_visible) + +proc GTK_TYPE_OPTION_MENU*(): GType = + result = gtk_option_menu_get_type() + +proc GTK_OPTION_MENU*(obj: pointer): PGtkOptionMenu = + result = cast[PGtkOptionMenu](GTK_CHECK_CAST(obj, GTK_TYPE_OPTION_MENU())) + +proc GTK_OPTION_MENU_CLASS*(klass: pointer): PGtkOptionMenuClass = + result = cast[PGtkOptionMenuClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_OPTION_MENU())) + +proc GTK_IS_OPTION_MENU*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_OPTION_MENU()) + +proc GTK_IS_OPTION_MENU_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_OPTION_MENU()) + +proc GTK_OPTION_MENU_GET_CLASS*(obj: pointer): PGtkOptionMenuClass = + result = cast[PGtkOptionMenuClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_OPTION_MENU())) + +proc GTK_TYPE_PIXMAP*(): GType = + result = gtk_pixmap_get_type() + +proc GTK_PIXMAP*(obj: pointer): PGtkPixmap = + result = cast[PGtkPixmap](GTK_CHECK_CAST(obj, GTK_TYPE_PIXMAP())) + +proc GTK_PIXMAP_CLASS*(klass: pointer): PGtkPixmapClass = + result = cast[PGtkPixmapClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_PIXMAP())) + +proc GTK_IS_PIXMAP*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_PIXMAP()) + +proc GTK_IS_PIXMAP_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_PIXMAP()) + +proc GTK_PIXMAP_GET_CLASS*(obj: pointer): PGtkPixmapClass = + result = cast[PGtkPixmapClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_PIXMAP())) + +proc build_insensitive*(a: var TGtkPixmap): guint = + result = (a.GtkPixmapflag0 and bm_TGtkPixmap_build_insensitive) shr + bp_TGtkPixmap_build_insensitive + +proc set_build_insensitive*(a: var TGtkPixmap, `build_insensitive`: guint) = + a.GtkPixmapflag0 = a.GtkPixmapflag0 or + (int16(`build_insensitive` shl bp_TGtkPixmap_build_insensitive) and + bm_TGtkPixmap_build_insensitive) + +proc GTK_TYPE_PLUG*(): GType = + result = gtk_plug_get_type() + +proc GTK_PLUG*(obj: pointer): PGtkPlug = + result = cast[PGtkPlug](GTK_CHECK_CAST(obj, GTK_TYPE_PLUG())) + +proc GTK_PLUG_CLASS*(klass: pointer): PGtkPlugClass = + result = cast[PGtkPlugClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_PLUG())) + +proc GTK_IS_PLUG*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_PLUG()) + +proc GTK_IS_PLUG_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_PLUG()) + +proc GTK_PLUG_GET_CLASS*(obj: pointer): PGtkPlugClass = + result = cast[PGtkPlugClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_PLUG())) + +proc same_app*(a: var TGtkPlug): guint = + result = (a.GtkPlugflag0 and bm_TGtkPlug_same_app) shr bp_TGtkPlug_same_app + +proc set_same_app*(a: var TGtkPlug, `same_app`: guint) = + a.GtkPlugflag0 = a.GtkPlugflag0 or + (int16(`same_app` shl bp_TGtkPlug_same_app) and bm_TGtkPlug_same_app) + +proc GTK_TYPE_PREVIEW*(): GType = + result = gtk_preview_get_type() + +proc GTK_PREVIEW*(obj: pointer): PGtkPreview = + result = cast[PGtkPreview](GTK_CHECK_CAST(obj, GTK_TYPE_PREVIEW())) + +proc GTK_PREVIEW_CLASS*(klass: pointer): PGtkPreviewClass = + result = cast[PGtkPreviewClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_PREVIEW())) + +proc GTK_IS_PREVIEW*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_PREVIEW()) + +proc GTK_IS_PREVIEW_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_PREVIEW()) + +proc GTK_PREVIEW_GET_CLASS*(obj: pointer): PGtkPreviewClass = + result = cast[PGtkPreviewClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_PREVIEW())) + +proc get_type*(a: var TGtkPreview): guint = + result = (a.GtkPreviewflag0 and bm_TGtkPreview_type) shr bp_TGtkPreview_type + +proc set_type*(a: var TGtkPreview, `type`: guint) = + a.GtkPreviewflag0 = a.GtkPreviewflag0 or + (int16(`type` shl bp_TGtkPreview_type) and bm_TGtkPreview_type) + +proc get_expand*(a: var TGtkPreview): guint = + result = (a.GtkPreviewflag0 and bm_TGtkPreview_expand) shr bp_TGtkPreview_expand + +proc set_expand*(a: var TGtkPreview, `expand`: guint) = + a.GtkPreviewflag0 = a.GtkPreviewflag0 or + (int16(`expand` shl bp_TGtkPreview_expand) and bm_TGtkPreview_expand) + +proc gtk_progress_get_type(): GType {.importc, cdecl, dynlib: gtklib.} + +proc GTK_TYPE_PROGRESS*(): GType = + result = gtk_progress_get_type() + +proc GTK_PROGRESS*(obj: pointer): PGtkProgress = + result = cast[PGtkProgress](GTK_CHECK_CAST(obj, GTK_TYPE_PROGRESS())) + +proc GTK_PROGRESS_CLASS*(klass: pointer): PGtkProgressClass = + result = cast[PGtkProgressClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_PROGRESS())) + +proc GTK_IS_PROGRESS*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_PROGRESS()) + +proc GTK_IS_PROGRESS_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_PROGRESS()) + +proc GTK_PROGRESS_GET_CLASS*(obj: pointer): PGtkProgressClass = + result = cast[PGtkProgressClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_PROGRESS())) + +proc show_text*(a: var TGtkProgress): guint = + result = (a.GtkProgressflag0 and bm_TGtkProgress_show_text) shr + bp_TGtkProgress_show_text + +proc set_show_text*(a: var TGtkProgress, `show_text`: guint) = + a.GtkProgressflag0 = a.GtkProgressflag0 or + (int16(`show_text` shl bp_TGtkProgress_show_text) and + bm_TGtkProgress_show_text) + +proc activity_mode*(a: var TGtkProgress): guint = + result = (a.GtkProgressflag0 and bm_TGtkProgress_activity_mode) shr + bp_TGtkProgress_activity_mode + +proc set_activity_mode*(a: var TGtkProgress, `activity_mode`: guint) = + a.GtkProgressflag0 = a.GtkProgressflag0 or + (int16(`activity_mode` shl bp_TGtkProgress_activity_mode) and + bm_TGtkProgress_activity_mode) + +proc use_text_format*(a: var TGtkProgress): guint = + result = (a.GtkProgressflag0 and bm_TGtkProgress_use_text_format) shr + bp_TGtkProgress_use_text_format + +proc set_use_text_format*(a: var TGtkProgress, `use_text_format`: guint) = + a.GtkProgressflag0 = a.GtkProgressflag0 or + (int16(`use_text_format` shl bp_TGtkProgress_use_text_format) and + bm_TGtkProgress_use_text_format) + +proc GTK_TYPE_PROGRESS_BAR*(): GType = + result = gtk_progress_bar_get_type() + +proc GTK_PROGRESS_BAR*(obj: pointer): PGtkProgressBar = + result = cast[PGtkProgressBar](GTK_CHECK_CAST(obj, GTK_TYPE_PROGRESS_BAR())) + +proc GTK_PROGRESS_BAR_CLASS*(klass: pointer): PGtkProgressBarClass = + result = cast[PGtkProgressBarClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_PROGRESS_BAR())) + +proc GTK_IS_PROGRESS_BAR*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_PROGRESS_BAR()) + +proc GTK_IS_PROGRESS_BAR_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_PROGRESS_BAR()) + +proc GTK_PROGRESS_BAR_GET_CLASS*(obj: pointer): PGtkProgressBarClass = + result = cast[PGtkProgressBarClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_PROGRESS_BAR())) + +proc activity_dir*(a: var TGtkProgressBar): guint = + result = (a.GtkProgressBarflag0 and bm_TGtkProgressBar_activity_dir) shr + bp_TGtkProgressBar_activity_dir + +proc set_activity_dir*(a: var TGtkProgressBar, `activity_dir`: guint) = + a.GtkProgressBarflag0 = a.GtkProgressBarflag0 or + (int16(`activity_dir` shl bp_TGtkProgressBar_activity_dir) and + bm_TGtkProgressBar_activity_dir) + +proc GTK_TYPE_RADIO_BUTTON*(): GType = + result = gtk_radio_button_get_type() + +proc GTK_RADIO_BUTTON*(obj: pointer): PGtkRadioButton = + result = cast[PGtkRadioButton](GTK_CHECK_CAST(obj, GTK_TYPE_RADIO_BUTTON())) + +proc GTK_RADIO_BUTTON_CLASS*(klass: pointer): PGtkRadioButtonClass = + result = cast[PGtkRadioButtonClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_RADIO_BUTTON())) + +proc GTK_IS_RADIO_BUTTON*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_RADIO_BUTTON()) + +proc GTK_IS_RADIO_BUTTON_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_RADIO_BUTTON()) + +proc GTK_RADIO_BUTTON_GET_CLASS*(obj: pointer): PGtkRadioButtonClass = + result = cast[PGtkRadioButtonClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_RADIO_BUTTON())) + +proc GTK_TYPE_RADIO_MENU_ITEM*(): GType = + result = gtk_radio_menu_item_get_type() + +proc GTK_RADIO_MENU_ITEM*(obj: pointer): PGtkRadioMenuItem = + result = cast[PGtkRadioMenuItem](GTK_CHECK_CAST(obj, GTK_TYPE_RADIO_MENU_ITEM())) + +proc GTK_RADIO_MENU_ITEM_CLASS*(klass: pointer): PGtkRadioMenuItemClass = + result = cast[PGtkRadioMenuItemClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_RADIO_MENU_ITEM())) + +proc GTK_IS_RADIO_MENU_ITEM*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_RADIO_MENU_ITEM()) + +proc GTK_IS_RADIO_MENU_ITEM_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_RADIO_MENU_ITEM()) + +proc GTK_RADIO_MENU_ITEM_GET_CLASS*(obj: pointer): PGtkRadioMenuItemClass = + result = cast[PGtkRadioMenuItemClass](GTK_CHECK_GET_CLASS(obj, + GTK_TYPE_RADIO_MENU_ITEM())) + +proc GTK_TYPE_SCROLLED_WINDOW*(): GType = + result = gtk_scrolled_window_get_type() + +proc GTK_SCROLLED_WINDOW*(obj: pointer): PGtkScrolledWindow = + result = cast[PGtkScrolledWindow](GTK_CHECK_CAST(obj, GTK_TYPE_SCROLLED_WINDOW())) + +proc GTK_SCROLLED_WINDOW_CLASS*(klass: pointer): PGtkScrolledWindowClass = + result = cast[PGtkScrolledWindowClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_SCROLLED_WINDOW())) + +proc GTK_IS_SCROLLED_WINDOW*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_SCROLLED_WINDOW()) + +proc GTK_IS_SCROLLED_WINDOW_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_SCROLLED_WINDOW()) + +proc GTK_SCROLLED_WINDOW_GET_CLASS*(obj: pointer): PGtkScrolledWindowClass = + result = cast[PGtkScrolledWindowClass](GTK_CHECK_GET_CLASS(obj, + GTK_TYPE_SCROLLED_WINDOW())) + +proc hscrollbar_policy*(a: var TGtkScrolledWindow): guint = + result = (a.GtkScrolledWindowflag0 and bm_TGtkScrolledWindow_hscrollbar_policy) shr + bp_TGtkScrolledWindow_hscrollbar_policy + +proc set_hscrollbar_policy*(a: var TGtkScrolledWindow, + `hscrollbar_policy`: guint) = + a.GtkScrolledWindowflag0 = a.GtkScrolledWindowflag0 or + (int16(`hscrollbar_policy` shl bp_TGtkScrolledWindow_hscrollbar_policy) and + bm_TGtkScrolledWindow_hscrollbar_policy) + +proc vscrollbar_policy*(a: var TGtkScrolledWindow): guint = + result = (a.GtkScrolledWindowflag0 and bm_TGtkScrolledWindow_vscrollbar_policy) shr + bp_TGtkScrolledWindow_vscrollbar_policy + +proc set_vscrollbar_policy*(a: var TGtkScrolledWindow, + `vscrollbar_policy`: guint) = + a.GtkScrolledWindowflag0 = a.GtkScrolledWindowflag0 or + (int16(`vscrollbar_policy` shl bp_TGtkScrolledWindow_vscrollbar_policy) and + bm_TGtkScrolledWindow_vscrollbar_policy) + +proc hscrollbar_visible*(a: var TGtkScrolledWindow): guint = + result = (a.GtkScrolledWindowflag0 and bm_TGtkScrolledWindow_hscrollbar_visible) shr + bp_TGtkScrolledWindow_hscrollbar_visible + +proc set_hscrollbar_visible*(a: var TGtkScrolledWindow, + `hscrollbar_visible`: guint) = + a.GtkScrolledWindowflag0 = a.GtkScrolledWindowflag0 or + (int16(`hscrollbar_visible` shl bp_TGtkScrolledWindow_hscrollbar_visible) and + bm_TGtkScrolledWindow_hscrollbar_visible) + +proc vscrollbar_visible*(a: var TGtkScrolledWindow): guint = + result = (a.GtkScrolledWindowflag0 and bm_TGtkScrolledWindow_vscrollbar_visible) shr + bp_TGtkScrolledWindow_vscrollbar_visible + +proc set_vscrollbar_visible*(a: var TGtkScrolledWindow, + `vscrollbar_visible`: guint) = + a.GtkScrolledWindowflag0 = a.GtkScrolledWindowflag0 or + int16((`vscrollbar_visible` shl bp_TGtkScrolledWindow_vscrollbar_visible) and + bm_TGtkScrolledWindow_vscrollbar_visible) + +proc window_placement*(a: var TGtkScrolledWindow): guint = + result = (a.GtkScrolledWindowflag0 and bm_TGtkScrolledWindow_window_placement) shr + bp_TGtkScrolledWindow_window_placement + +proc set_window_placement*(a: var TGtkScrolledWindow, `window_placement`: guint) = + a.GtkScrolledWindowflag0 = a.GtkScrolledWindowflag0 or + (int16(`window_placement` shl bp_TGtkScrolledWindow_window_placement) and + bm_TGtkScrolledWindow_window_placement) + +proc focus_out*(a: var TGtkScrolledWindow): guint = + result = (a.GtkScrolledWindowflag0 and bm_TGtkScrolledWindow_focus_out) shr + bp_TGtkScrolledWindow_focus_out + +proc set_focus_out*(a: var TGtkScrolledWindow, `focus_out`: guint) = + a.GtkScrolledWindowflag0 = a.GtkScrolledWindowflag0 or + (int16(`focus_out` shl bp_TGtkScrolledWindow_focus_out) and + bm_TGtkScrolledWindow_focus_out) + +proc GTK_TYPE_SELECTION_DATA*(): GType = + result = gtk_selection_data_get_type() + +proc GTK_TYPE_SEPARATOR_MENU_ITEM*(): GType = + result = gtk_separator_menu_item_get_type() + +proc GTK_SEPARATOR_MENU_ITEM*(obj: pointer): PGtkSeparatorMenuItem = + result = cast[PGtkSeparatorMenuItem](GTK_CHECK_CAST(obj, + GTK_TYPE_SEPARATOR_MENU_ITEM())) + +proc GTK_SEPARATOR_MENU_ITEM_CLASS*(klass: pointer): PGtkSeparatorMenuItemClass = + result = cast[PGtkSeparatorMenuItemClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_SEPARATOR_MENU_ITEM())) + +proc GTK_IS_SEPARATOR_MENU_ITEM*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_SEPARATOR_MENU_ITEM()) + +proc GTK_IS_SEPARATOR_MENU_ITEM_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_SEPARATOR_MENU_ITEM()) + +proc GTK_SEPARATOR_MENU_ITEM_GET_CLASS*(obj: pointer): PGtkSeparatorMenuItemClass = + result = cast[PGtkSeparatorMenuItemClass](GTK_CHECK_GET_CLASS(obj, + GTK_TYPE_SEPARATOR_MENU_ITEM())) + +proc gtk_signal_lookup*(name: cstring, object_type: GType): guint = + result = g_signal_lookup(name, object_type) + +proc gtk_signal_name*(signal_id: guint): cstring = + result = g_signal_name(signal_id) + +proc gtk_signal_emit_stop*(instance: gpointer, signal_id: guint, detail: TGQuark) = + if detail != 0'i32: g_signal_stop_emission(instance, signal_id, 0) + +proc gtk_signal_connect_full*(anObject: PGtkObject, name: cstring, + fun: TGtkSignalFunc, unknown1: pointer, + func_data: gpointer, unknown2: pointer, + unknown3, unknown4: int): gulong {. + importc, cdecl, dynlib: gtklib.} + +proc gtk_signal_compat_matched*(anObject: PGtkObject, fun: TGtkSignalFunc, + data: gpointer, m: TGSignalMatchType, + u: int) {.importc, cdecl, dynlib: gtklib.} + +proc gtk_signal_connect*(anObject: PGtkObject, name: cstring, + fun: TGtkSignalFunc, func_data: gpointer): gulong = + result = gtk_signal_connect_full(anObject, name, fun, nil, func_data, nil, + 0, 0) + +proc gtk_signal_connect_after*(anObject: PGtkObject, name: cstring, + fun: TGtkSignalFunc, func_data: gpointer): gulong = + result = gtk_signal_connect_full(anObject, name, fun, nil, func_data, nil, + 0, 1) + +proc gtk_signal_connect_object*(anObject: PGtkObject, name: cstring, + fun: TGtkSignalFunc, slot_object: gpointer): gulong = + result = gtk_signal_connect_full(anObject, name, fun, nil, slot_object, nil, + 1, 0) + +proc gtk_signal_connect_object_after*(anObject: PGtkObject, name: cstring, + fun: TGtkSignalFunc, + slot_object: gpointer): gulong = + result = gtk_signal_connect_full(anObject, name, fun, nil, slot_object, nil, + 1, 1) + +proc gtk_signal_disconnect*(anObject: gpointer, handler_id: gulong) = + g_signal_handler_disconnect(anObject, handler_id) + +proc gtk_signal_handler_block*(anObject: gpointer, handler_id: gulong) = + g_signal_handler_block(anObject, handler_id) + +proc gtk_signal_handler_unblock*(anObject: gpointer, handler_id: gulong) = + g_signal_handler_unblock(anObject, handler_id) + +proc gtk_signal_disconnect_by_data*(anObject: PGtkObject, data: gpointer) = + gtk_signal_compat_matched(anObject, nil, data, G_SIGNAL_MATCH_DATA, 0) + +proc gtk_signal_disconnect_by_func*(anObject: PGtkObject, fun: TGtkSignalFunc, + data: gpointer) = + gtk_signal_compat_matched(anObject, fun, data, cast[TGSignalMatchType]( + G_SIGNAL_MATCH_FUNC or G_SIGNAL_MATCH_DATA), 0) + +proc gtk_signal_handler_block_by_func*(anObject: PGtkObject, + fun: TGtkSignalFunc, data: gpointer) = + gtk_signal_compat_matched(anObject, fun, data, TGSignalMatchType( + G_SIGNAL_MATCH_FUNC or G_SIGNAL_MATCH_DATA), 0) + +proc gtk_signal_handler_block_by_data*(anObject: PGtkObject, data: gpointer) = + gtk_signal_compat_matched(anObject, nil, data, G_SIGNAL_MATCH_DATA, 1) + +proc gtk_signal_handler_unblock_by_func*(anObject: PGtkObject, + fun: TGtkSignalFunc, data: gpointer) = + gtk_signal_compat_matched(anObject, fun, data, cast[TGSignalMatchType]( + G_SIGNAL_MATCH_FUNC or G_SIGNAL_MATCH_DATA), 0) + +proc gtk_signal_handler_unblock_by_data*(anObject: PGtkObject, data: gpointer) = + gtk_signal_compat_matched(anObject, nil, data, G_SIGNAL_MATCH_DATA, 2) + +proc gtk_signal_handler_pending*(anObject: PGtkObject, signal_id: guint, + may_be_blocked: gboolean): gboolean = + Result = g_signal_has_handler_pending(anObject, signal_id, 0, may_be_blocked) + +proc gtk_signal_handler_pending_by_func*(anObject: PGtkObject, signal_id: guint, + may_be_blocked: gboolean, fun: TGtkSignalFunc, data: gpointer): gboolean = + var t: TGSignalMatchType + t = cast[TGSignalMatchType](G_SIGNAL_MATCH_ID or G_SIGNAL_MATCH_FUNC or + G_SIGNAL_MATCH_DATA) + if not may_be_blocked: + t = t or cast[TGSignalMatchType](G_SIGNAL_MATCH_UNBLOCKED) + Result = g_signal_handler_find(anObject, t, signal_id, 0, nil, fun, + data) != 0 + +proc GTK_TYPE_SIZE_GROUP*(): GType = + result = gtk_size_group_get_type() + +proc GTK_SIZE_GROUP*(obj: pointer): PGtkSizeGroup = + result = cast[PGtkSizeGroup](GTK_CHECK_CAST(obj, GTK_TYPE_SIZE_GROUP())) + +proc GTK_SIZE_GROUP_CLASS*(klass: pointer): PGtkSizeGroupClass = + result = cast[PGtkSizeGroupClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_SIZE_GROUP())) + +proc GTK_IS_SIZE_GROUP*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_SIZE_GROUP()) + +proc GTK_IS_SIZE_GROUP_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_SIZE_GROUP()) + +proc GTK_SIZE_GROUP_GET_CLASS*(obj: pointer): PGtkSizeGroupClass = + result = cast[PGtkSizeGroupClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_SIZE_GROUP())) + +proc have_width*(a: var TGtkSizeGroup): guint = + result = (a.GtkSizeGroupflag0 and bm_TGtkSizeGroup_have_width) shr + bp_TGtkSizeGroup_have_width + +proc set_have_width*(a: var TGtkSizeGroup, `have_width`: guint) = + a.GtkSizeGroupflag0 = a.GtkSizeGroupflag0 or + (int16(`have_width` shl bp_TGtkSizeGroup_have_width) and + bm_TGtkSizeGroup_have_width) + +proc have_height*(a: var TGtkSizeGroup): guint = + result = (a.GtkSizeGroupflag0 and bm_TGtkSizeGroup_have_height) shr + bp_TGtkSizeGroup_have_height + +proc set_have_height*(a: var TGtkSizeGroup, `have_height`: guint) = + a.GtkSizeGroupflag0 = a.GtkSizeGroupflag0 or + (int16(`have_height` shl bp_TGtkSizeGroup_have_height) and + bm_TGtkSizeGroup_have_height) + +proc GTK_TYPE_SOCKET*(): GType = + result = gtk_socket_get_type() + +proc GTK_SOCKET*(obj: pointer): PGtkSocket = + result = cast[PGtkSocket](GTK_CHECK_CAST(obj, GTK_TYPE_SOCKET())) + +proc GTK_SOCKET_CLASS*(klass: pointer): PGtkSocketClass = + result = cast[PGtkSocketClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_SOCKET())) + +proc GTK_IS_SOCKET*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_SOCKET()) + +proc GTK_IS_SOCKET_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_SOCKET()) + +proc GTK_SOCKET_GET_CLASS*(obj: pointer): PGtkSocketClass = + result = cast[PGtkSocketClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_SOCKET())) + +proc same_app*(a: var TGtkSocket): guint = + result = (a.GtkSocketflag0 and bm_TGtkSocket_same_app) shr bp_TGtkSocket_same_app + +proc set_same_app*(a: var TGtkSocket, `same_app`: guint) = + a.GtkSocketflag0 = a.GtkSocketflag0 or + (int16(`same_app` shl bp_TGtkSocket_same_app) and bm_TGtkSocket_same_app) + +proc focus_in*(a: var TGtkSocket): guint = + result = (a.GtkSocketflag0 and bm_TGtkSocket_focus_in) shr bp_TGtkSocket_focus_in + +proc set_focus_in*(a: var TGtkSocket, `focus_in`: guint) = + a.GtkSocketflag0 = a.GtkSocketflag0 or + (int16(`focus_in` shl bp_TGtkSocket_focus_in) and bm_TGtkSocket_focus_in) + +proc have_size*(a: var TGtkSocket): guint = + result = (a.GtkSocketflag0 and bm_TGtkSocket_have_size) shr bp_TGtkSocket_have_size + +proc set_have_size*(a: var TGtkSocket, `have_size`: guint) = + a.GtkSocketflag0 = a.GtkSocketflag0 or + (int16(`have_size` shl bp_TGtkSocket_have_size) and bm_TGtkSocket_have_size) + +proc need_map*(a: var TGtkSocket): guint = + result = (a.GtkSocketflag0 and bm_TGtkSocket_need_map) shr bp_TGtkSocket_need_map + +proc set_need_map*(a: var TGtkSocket, `need_map`: guint) = + a.GtkSocketflag0 = a.GtkSocketflag0 or + (int16(`need_map` shl bp_TGtkSocket_need_map) and bm_TGtkSocket_need_map) + +proc is_mapped*(a: var TGtkSocket): guint = + result = (a.GtkSocketflag0 and bm_TGtkSocket_is_mapped) shr bp_TGtkSocket_is_mapped + +proc set_is_mapped*(a: var TGtkSocket, `is_mapped`: guint) = + a.GtkSocketflag0 = a.GtkSocketflag0 or + (int16(`is_mapped` shl bp_TGtkSocket_is_mapped) and bm_TGtkSocket_is_mapped) + +proc GTK_TYPE_SPIN_BUTTON*(): GType = + result = gtk_spin_button_get_type() + +proc GTK_SPIN_BUTTON*(obj: pointer): PGtkSpinButton = + result = cast[PGtkSpinButton](GTK_CHECK_CAST(obj, GTK_TYPE_SPIN_BUTTON())) + +proc GTK_SPIN_BUTTON_CLASS*(klass: pointer): PGtkSpinButtonClass = + result = cast[PGtkSpinButtonClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_SPIN_BUTTON())) + +proc GTK_IS_SPIN_BUTTON*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_SPIN_BUTTON()) + +proc GTK_IS_SPIN_BUTTON_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_SPIN_BUTTON()) + +proc GTK_SPIN_BUTTON_GET_CLASS*(obj: pointer): PGtkSpinButtonClass = + result = cast[PGtkSpinButtonClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_SPIN_BUTTON())) + +proc in_child*(a: var TGtkSpinButton): guint = + result = (a.GtkSpinButtonflag0 and bm_TGtkSpinButton_in_child) shr + bp_TGtkSpinButton_in_child + +proc set_in_child*(a: var TGtkSpinButton, `in_child`: guint) = + a.GtkSpinButtonflag0 = a.GtkSpinButtonflag0 or + ((`in_child` shl bp_TGtkSpinButton_in_child) and + bm_TGtkSpinButton_in_child) + +proc click_child*(a: var TGtkSpinButton): guint = + result = (a.GtkSpinButtonflag0 and bm_TGtkSpinButton_click_child) shr + bp_TGtkSpinButton_click_child + +proc set_click_child*(a: var TGtkSpinButton, `click_child`: guint) = + a.GtkSpinButtonflag0 = a.GtkSpinButtonflag0 or + ((`click_child` shl bp_TGtkSpinButton_click_child) and + bm_TGtkSpinButton_click_child) + +proc button*(a: var TGtkSpinButton): guint = + result = (a.GtkSpinButtonflag0 and bm_TGtkSpinButton_button) shr + bp_TGtkSpinButton_button + +proc set_button*(a: var TGtkSpinButton, `button`: guint) = + a.GtkSpinButtonflag0 = a.GtkSpinButtonflag0 or + ((`button` shl bp_TGtkSpinButton_button) and bm_TGtkSpinButton_button) + +proc need_timer*(a: var TGtkSpinButton): guint = + result = (a.GtkSpinButtonflag0 and bm_TGtkSpinButton_need_timer) shr + bp_TGtkSpinButton_need_timer + +proc set_need_timer*(a: var TGtkSpinButton, `need_timer`: guint) = + a.GtkSpinButtonflag0 = a.GtkSpinButtonflag0 or + ((`need_timer` shl bp_TGtkSpinButton_need_timer) and + bm_TGtkSpinButton_need_timer) + +proc timer_calls*(a: var TGtkSpinButton): guint = + result = (a.GtkSpinButtonflag0 and bm_TGtkSpinButton_timer_calls) shr + bp_TGtkSpinButton_timer_calls + +proc set_timer_calls*(a: var TGtkSpinButton, `timer_calls`: guint) = + a.GtkSpinButtonflag0 = a.GtkSpinButtonflag0 or + ((`timer_calls` shl bp_TGtkSpinButton_timer_calls) and + bm_TGtkSpinButton_timer_calls) + +proc digits*(a: var TGtkSpinButton): guint = + result = (a.GtkSpinButtonflag0 and bm_TGtkSpinButton_digits) shr + bp_TGtkSpinButton_digits + +proc set_digits*(a: var TGtkSpinButton, `digits`: guint) = + a.GtkSpinButtonflag0 = a.GtkSpinButtonflag0 or + ((`digits` shl bp_TGtkSpinButton_digits) and bm_TGtkSpinButton_digits) + +proc numeric*(a: var TGtkSpinButton): guint = + result = (a.GtkSpinButtonflag0 and bm_TGtkSpinButton_numeric) shr + bp_TGtkSpinButton_numeric + +proc set_numeric*(a: var TGtkSpinButton, `numeric`: guint) = + a.GtkSpinButtonflag0 = a.GtkSpinButtonflag0 or + ((`numeric` shl bp_TGtkSpinButton_numeric) and + bm_TGtkSpinButton_numeric) + +proc wrap*(a: var TGtkSpinButton): guint = + result = (a.GtkSpinButtonflag0 and bm_TGtkSpinButton_wrap) shr bp_TGtkSpinButton_wrap + +proc set_wrap*(a: var TGtkSpinButton, `wrap`: guint) = + a.GtkSpinButtonflag0 = a.GtkSpinButtonflag0 or + ((`wrap` shl bp_TGtkSpinButton_wrap) and bm_TGtkSpinButton_wrap) + +proc snap_to_ticks*(a: var TGtkSpinButton): guint = + result = (a.GtkSpinButtonflag0 and bm_TGtkSpinButton_snap_to_ticks) shr + bp_TGtkSpinButton_snap_to_ticks + +proc set_snap_to_ticks*(a: var TGtkSpinButton, `snap_to_ticks`: guint) = + a.GtkSpinButtonflag0 = a.GtkSpinButtonflag0 or + ((`snap_to_ticks` shl bp_TGtkSpinButton_snap_to_ticks) and + bm_TGtkSpinButton_snap_to_ticks) + +proc GTK_TYPE_STATUSBAR*(): GType = + result = gtk_statusbar_get_type() + +proc GTK_STATUSBAR*(obj: pointer): PGtkStatusbar = + result = cast[PGtkStatusbar](GTK_CHECK_CAST(obj, GTK_TYPE_STATUSBAR())) + +proc GTK_STATUSBAR_CLASS*(klass: pointer): PGtkStatusbarClass = + result = cast[PGtkStatusbarClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_STATUSBAR())) + +proc GTK_IS_STATUSBAR*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_STATUSBAR()) + +proc GTK_IS_STATUSBAR_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_STATUSBAR()) + +proc GTK_STATUSBAR_GET_CLASS*(obj: pointer): PGtkStatusbarClass = + result = cast[PGtkStatusbarClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_STATUSBAR())) + +proc has_resize_grip*(a: var TGtkStatusbar): guint = + result = (a.GtkStatusbarflag0 and bm_TGtkStatusbar_has_resize_grip) shr + bp_TGtkStatusbar_has_resize_grip + +proc set_has_resize_grip*(a: var TGtkStatusbar, `has_resize_grip`: guint) = + a.GtkStatusbarflag0 = a.GtkStatusbarflag0 or + (int16(`has_resize_grip` shl bp_TGtkStatusbar_has_resize_grip) and + bm_TGtkStatusbar_has_resize_grip) + +proc GTK_TYPE_TABLE*(): GType = + result = gtk_table_get_type() + +proc GTK_TABLE*(obj: pointer): PGtkTable = + result = cast[PGtkTable](GTK_CHECK_CAST(obj, GTK_TYPE_TABLE())) + +proc GTK_TABLE_CLASS*(klass: pointer): PGtkTableClass = + result = cast[PGtkTableClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_TABLE())) + +proc GTK_IS_TABLE*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_TABLE()) + +proc GTK_IS_TABLE_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_TABLE()) + +proc GTK_TABLE_GET_CLASS*(obj: pointer): PGtkTableClass = + result = cast[PGtkTableClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_TABLE())) + +proc homogeneous*(a: var TGtkTable): guint = + result = (a.GtkTableflag0 and bm_TGtkTable_homogeneous) shr + bp_TGtkTable_homogeneous + +proc set_homogeneous*(a: var TGtkTable, `homogeneous`: guint) = + a.GtkTableflag0 = a.GtkTableflag0 or + (int16(`homogeneous` shl bp_TGtkTable_homogeneous) and + bm_TGtkTable_homogeneous) + +proc xexpand*(a: var TGtkTableChild): guint = + result = (a.GtkTableChildflag0 and bm_TGtkTableChild_xexpand) shr + bp_TGtkTableChild_xexpand + +proc set_xexpand*(a: var TGtkTableChild, `xexpand`: guint) = + a.GtkTableChildflag0 = a.GtkTableChildflag0 or + (int16(`xexpand` shl bp_TGtkTableChild_xexpand) and + bm_TGtkTableChild_xexpand) + +proc yexpand*(a: var TGtkTableChild): guint = + result = (a.GtkTableChildflag0 and bm_TGtkTableChild_yexpand) shr + bp_TGtkTableChild_yexpand + +proc set_yexpand*(a: var TGtkTableChild, `yexpand`: guint) = + a.GtkTableChildflag0 = a.GtkTableChildflag0 or + (int16(`yexpand` shl bp_TGtkTableChild_yexpand) and + bm_TGtkTableChild_yexpand) + +proc xshrink*(a: var TGtkTableChild): guint = + result = (a.GtkTableChildflag0 and bm_TGtkTableChild_xshrink) shr + bp_TGtkTableChild_xshrink + +proc set_xshrink*(a: var TGtkTableChild, `xshrink`: guint) = + a.GtkTableChildflag0 = a.GtkTableChildflag0 or + (int16(`xshrink` shl bp_TGtkTableChild_xshrink) and + bm_TGtkTableChild_xshrink) + +proc yshrink*(a: var TGtkTableChild): guint = + result = (a.GtkTableChildflag0 and bm_TGtkTableChild_yshrink) shr + bp_TGtkTableChild_yshrink + +proc set_yshrink*(a: var TGtkTableChild, `yshrink`: guint) = + a.GtkTableChildflag0 = a.GtkTableChildflag0 or + (int16(`yshrink` shl bp_TGtkTableChild_yshrink) and + bm_TGtkTableChild_yshrink) + +proc xfill*(a: var TGtkTableChild): guint = + result = (a.GtkTableChildflag0 and bm_TGtkTableChild_xfill) shr bp_TGtkTableChild_xfill + +proc set_xfill*(a: var TGtkTableChild, `xfill`: guint) = + a.GtkTableChildflag0 = a.GtkTableChildflag0 or + (int16(`xfill` shl bp_TGtkTableChild_xfill) and bm_TGtkTableChild_xfill) + +proc yfill*(a: var TGtkTableChild): guint = + result = (a.GtkTableChildflag0 and bm_TGtkTableChild_yfill) shr bp_TGtkTableChild_yfill + +proc set_yfill*(a: var TGtkTableChild, `yfill`: guint) = + a.GtkTableChildflag0 = a.GtkTableChildflag0 or + (int16(`yfill` shl bp_TGtkTableChild_yfill) and bm_TGtkTableChild_yfill) + +proc need_expand*(a: var TGtkTableRowCol): guint = + result = (a.flag0 and bm_TGtkTableRowCol_need_expand) shr + bp_TGtkTableRowCol_need_expand + +proc set_need_expand*(a: var TGtkTableRowCol, `need_expand`: guint) = + a.flag0 = a.flag0 or + (int16(`need_expand` shl bp_TGtkTableRowCol_need_expand) and + bm_TGtkTableRowCol_need_expand) + +proc need_shrink*(a: var TGtkTableRowCol): guint = + result = (a.flag0 and bm_TGtkTableRowCol_need_shrink) shr + bp_TGtkTableRowCol_need_shrink + +proc set_need_shrink*(a: var TGtkTableRowCol, `need_shrink`: guint) = + a.flag0 = a.flag0 or + (int16(`need_shrink` shl bp_TGtkTableRowCol_need_shrink) and + bm_TGtkTableRowCol_need_shrink) + +proc expand*(a: var TGtkTableRowCol): guint = + result = (a.flag0 and bm_TGtkTableRowCol_expand) shr + bp_TGtkTableRowCol_expand + +proc set_expand*(a: var TGtkTableRowCol, `expand`: guint) = + a.flag0 = a.flag0 or + (int16(`expand` shl bp_TGtkTableRowCol_expand) and bm_TGtkTableRowCol_expand) + +proc shrink*(a: var TGtkTableRowCol): guint = + result = (a.flag0 and bm_TGtkTableRowCol_shrink) shr + bp_TGtkTableRowCol_shrink + +proc set_shrink*(a: var TGtkTableRowCol, `shrink`: guint) = + a.flag0 = a.flag0 or + (int16(`shrink` shl bp_TGtkTableRowCol_shrink) and bm_TGtkTableRowCol_shrink) + +proc empty*(a: var TGtkTableRowCol): guint = + result = (a.flag0 and bm_TGtkTableRowCol_empty) shr + bp_TGtkTableRowCol_empty + +proc set_empty*(a: var TGtkTableRowCol, `empty`: guint) = + a.flag0 = a.flag0 or + (int16(`empty` shl bp_TGtkTableRowCol_empty) and bm_TGtkTableRowCol_empty) + +proc GTK_TYPE_TEAROFF_MENU_ITEM*(): GType = + result = gtk_tearoff_menu_item_get_type() + +proc GTK_TEAROFF_MENU_ITEM*(obj: pointer): PGtkTearoffMenuItem = + result = cast[PGtkTearoffMenuItem](GTK_CHECK_CAST(obj, GTK_TYPE_TEAROFF_MENU_ITEM())) + +proc GTK_TEAROFF_MENU_ITEM_CLASS*(klass: pointer): PGtkTearoffMenuItemClass = + result = cast[PGtkTearoffMenuItemClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_TEAROFF_MENU_ITEM())) + +proc GTK_IS_TEAROFF_MENU_ITEM*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_TEAROFF_MENU_ITEM()) + +proc GTK_IS_TEAROFF_MENU_ITEM_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_TEAROFF_MENU_ITEM()) + +proc GTK_TEAROFF_MENU_ITEM_GET_CLASS*(obj: pointer): PGtkTearoffMenuItemClass = + result = cast[PGtkTearoffMenuItemClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_TEAROFF_MENU_ITEM())) + +proc torn_off*(a: var TGtkTearoffMenuItem): guint = + result = (a.GtkTearoffMenuItemflag0 and bm_TGtkTearoffMenuItem_torn_off) shr + bp_TGtkTearoffMenuItem_torn_off + +proc set_torn_off*(a: var TGtkTearoffMenuItem, `torn_off`: guint) = + a.GtkTearoffMenuItemflag0 = a.GtkTearoffMenuItemflag0 or + (int16(`torn_off` shl bp_TGtkTearoffMenuItem_torn_off) and + bm_TGtkTearoffMenuItem_torn_off) + +proc GTK_TYPE_TEXT*(): GType = + result = gtk_text_get_type() + +proc GTK_TEXT*(obj: pointer): PGtkText = + result = cast[PGtkText](GTK_CHECK_CAST(obj, GTK_TYPE_TEXT())) + +proc GTK_TEXT_CLASS*(klass: pointer): PGtkTextClass = + result = cast[PGtkTextClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_TEXT())) + +proc GTK_IS_TEXT*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_TEXT()) + +proc GTK_IS_TEXT_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_TEXT()) + +proc GTK_TEXT_GET_CLASS*(obj: pointer): PGtkTextClass = + result = cast[PGtkTextClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_TEXT())) + +proc line_wrap*(a: PGtkText): guint = + result = (a.GtkTextflag0 and bm_TGtkText_line_wrap) shr bp_TGtkText_line_wrap + +proc set_line_wrap*(a: PGtkText, `line_wrap`: guint) = + a.GtkTextflag0 = a.GtkTextflag0 or + (int16(`line_wrap` shl bp_TGtkText_line_wrap) and bm_TGtkText_line_wrap) + +proc word_wrap*(a: PGtkText): guint = + result = (a . GtkTextflag0 and bm_TGtkText_word_wrap) shr bp_TGtkText_word_wrap + +proc set_word_wrap*(a: PGtkText, `word_wrap`: guint) = + a.GtkTextflag0 = a.GtkTextflag0 or + (int16(`word_wrap` shl bp_TGtkText_word_wrap) and bm_TGtkText_word_wrap) + +proc use_wchar*(a: PGtkText): gboolean = + result = ((a.GtkTextflag0 and bm_TGtkText_use_wchar) shr bp_TGtkText_use_wchar) > + 0'i16 + +proc set_use_wchar*(a: PGtkText, `use_wchar`: gboolean) = + if `use_wchar`: + a . GtkTextflag0 = a . GtkTextflag0 or bm_TGtkText_use_wchar + else: + a . GtkTextflag0 = a . GtkTextflag0 and not bm_TGtkText_use_wchar + +proc GTK_TEXT_INDEX_WCHAR*(t: PGtkText, index: guint): guint32 = + nil + +proc GTK_TEXT_INDEX_UCHAR*(t: PGtkText, index: guint): GUChar = + nil + +proc GTK_TYPE_TEXT_ITER*(): GType = + result = gtk_text_iter_get_type() + +proc GTK_TYPE_TEXT_TAG*(): GType = + result = gtk_text_tag_get_type() + +proc GTK_TEXT_TAG*(obj: pointer): PGtkTextTag = + result = cast[PGtkTextTag](G_TYPE_CHECK_INSTANCE_CAST(obj, GTK_TYPE_TEXT_TAG())) + +proc GTK_TEXT_TAG_CLASS*(klass: pointer): PGtkTextTagClass = + result = cast[PGtkTextTagClass](G_TYPE_CHECK_CLASS_CAST(klass, GTK_TYPE_TEXT_TAG())) + +proc GTK_IS_TEXT_TAG*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, GTK_TYPE_TEXT_TAG()) + +proc GTK_IS_TEXT_TAG_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GTK_TYPE_TEXT_TAG()) + +proc GTK_TEXT_TAG_GET_CLASS*(obj: pointer): PGtkTextTagClass = + result = cast[PGtkTextTagClass](G_TYPE_INSTANCE_GET_CLASS(obj, GTK_TYPE_TEXT_TAG())) + +proc GTK_TYPE_TEXT_ATTRIBUTES*(): GType = + result = gtk_text_attributes_get_type() + +proc bg_color_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_bg_color_set) shr + bp_TGtkTextTag_bg_color_set + +proc set_bg_color_set*(a: var TGtkTextTag, `bg_color_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`bg_color_set` shl bp_TGtkTextTag_bg_color_set) and + bm_TGtkTextTag_bg_color_set) + +proc bg_stipple_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_bg_stipple_set) shr + bp_TGtkTextTag_bg_stipple_set + +proc set_bg_stipple_set*(a: var TGtkTextTag, `bg_stipple_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`bg_stipple_set` shl bp_TGtkTextTag_bg_stipple_set) and + bm_TGtkTextTag_bg_stipple_set) + +proc fg_color_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_fg_color_set) shr + bp_TGtkTextTag_fg_color_set + +proc set_fg_color_set*(a: var TGtkTextTag, `fg_color_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`fg_color_set` shl bp_TGtkTextTag_fg_color_set) and + bm_TGtkTextTag_fg_color_set) + +proc scale_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_scale_set) shr + bp_TGtkTextTag_scale_set + +proc set_scale_set*(a: var TGtkTextTag, `scale_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`scale_set` shl bp_TGtkTextTag_scale_set) and + bm_TGtkTextTag_scale_set) + +proc fg_stipple_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_fg_stipple_set) shr + bp_TGtkTextTag_fg_stipple_set + +proc set_fg_stipple_set*(a: var TGtkTextTag, `fg_stipple_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`fg_stipple_set` shl bp_TGtkTextTag_fg_stipple_set) and + bm_TGtkTextTag_fg_stipple_set) + +proc justification_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_justification_set) shr + bp_TGtkTextTag_justification_set + +proc set_justification_set*(a: var TGtkTextTag, `justification_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`justification_set` shl bp_TGtkTextTag_justification_set) and + bm_TGtkTextTag_justification_set) + +proc left_margin_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_left_margin_set) shr + bp_TGtkTextTag_left_margin_set + +proc set_left_margin_set*(a: var TGtkTextTag, `left_margin_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`left_margin_set` shl bp_TGtkTextTag_left_margin_set) and + bm_TGtkTextTag_left_margin_set) + +proc indent_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_indent_set) shr + bp_TGtkTextTag_indent_set + +proc set_indent_set*(a: var TGtkTextTag, `indent_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`indent_set` shl bp_TGtkTextTag_indent_set) and + bm_TGtkTextTag_indent_set) + +proc rise_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_rise_set) shr bp_TGtkTextTag_rise_set + +proc set_rise_set*(a: var TGtkTextTag, `rise_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`rise_set` shl bp_TGtkTextTag_rise_set) and bm_TGtkTextTag_rise_set) + +proc strikethrough_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_strikethrough_set) shr + bp_TGtkTextTag_strikethrough_set + +proc set_strikethrough_set*(a: var TGtkTextTag, `strikethrough_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`strikethrough_set` shl bp_TGtkTextTag_strikethrough_set) and + bm_TGtkTextTag_strikethrough_set) + +proc right_margin_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_right_margin_set) shr + bp_TGtkTextTag_right_margin_set + +proc set_right_margin_set*(a: var TGtkTextTag, `right_margin_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`right_margin_set` shl bp_TGtkTextTag_right_margin_set) and + bm_TGtkTextTag_right_margin_set) + +proc pixels_above_lines_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_pixels_above_lines_set) shr + bp_TGtkTextTag_pixels_above_lines_set + +proc set_pixels_above_lines_set*(a: var TGtkTextTag, + `pixels_above_lines_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`pixels_above_lines_set` shl bp_TGtkTextTag_pixels_above_lines_set) and + bm_TGtkTextTag_pixels_above_lines_set) + +proc pixels_below_lines_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_pixels_below_lines_set) shr + bp_TGtkTextTag_pixels_below_lines_set + +proc set_pixels_below_lines_set*(a: var TGtkTextTag, + `pixels_below_lines_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`pixels_below_lines_set` shl bp_TGtkTextTag_pixels_below_lines_set) and + bm_TGtkTextTag_pixels_below_lines_set) + +proc pixels_inside_wrap_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_pixels_inside_wrap_set) shr + bp_TGtkTextTag_pixels_inside_wrap_set + +proc set_pixels_inside_wrap_set*(a: var TGtkTextTag, + `pixels_inside_wrap_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`pixels_inside_wrap_set` shl bp_TGtkTextTag_pixels_inside_wrap_set) and + bm_TGtkTextTag_pixels_inside_wrap_set) + +proc tabs_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_tabs_set) shr bp_TGtkTextTag_tabs_set + +proc set_tabs_set*(a: var TGtkTextTag, `tabs_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`tabs_set` shl bp_TGtkTextTag_tabs_set) and bm_TGtkTextTag_tabs_set) + +proc underline_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_underline_set) shr + bp_TGtkTextTag_underline_set + +proc set_underline_set*(a: var TGtkTextTag, `underline_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`underline_set` shl bp_TGtkTextTag_underline_set) and + bm_TGtkTextTag_underline_set) + +proc wrap_mode_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_wrap_mode_set) shr + bp_TGtkTextTag_wrap_mode_set + +proc set_wrap_mode_set*(a: var TGtkTextTag, `wrap_mode_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`wrap_mode_set` shl bp_TGtkTextTag_wrap_mode_set) and + bm_TGtkTextTag_wrap_mode_set) + +proc bg_full_height_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_bg_full_height_set) shr + bp_TGtkTextTag_bg_full_height_set + +proc set_bg_full_height_set*(a: var TGtkTextTag, `bg_full_height_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`bg_full_height_set` shl bp_TGtkTextTag_bg_full_height_set) and + bm_TGtkTextTag_bg_full_height_set) + +proc invisible_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_invisible_set) shr + bp_TGtkTextTag_invisible_set + +proc set_invisible_set*(a: var TGtkTextTag, `invisible_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`invisible_set` shl bp_TGtkTextTag_invisible_set) and + bm_TGtkTextTag_invisible_set) + +proc editable_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_editable_set) shr + bp_TGtkTextTag_editable_set + +proc set_editable_set*(a: var TGtkTextTag, `editable_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`editable_set` shl bp_TGtkTextTag_editable_set) and + bm_TGtkTextTag_editable_set) + +proc language_set*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_language_set) shr + bp_TGtkTextTag_language_set + +proc set_language_set*(a: var TGtkTextTag, `language_set`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`language_set` shl bp_TGtkTextTag_language_set) and + bm_TGtkTextTag_language_set) + +proc pad1*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_pad1) shr bp_TGtkTextTag_pad1 + +proc set_pad1*(a: var TGtkTextTag, `pad1`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`pad1` shl bp_TGtkTextTag_pad1) and bm_TGtkTextTag_pad1) + +proc pad2*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_pad2) shr bp_TGtkTextTag_pad2 + +proc set_pad2*(a: var TGtkTextTag, `pad2`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`pad2` shl bp_TGtkTextTag_pad2) and bm_TGtkTextTag_pad2) + +proc pad3*(a: var TGtkTextTag): guint = + result = (a.GtkTextTagflag0 and bm_TGtkTextTag_pad3) shr bp_TGtkTextTag_pad3 + +proc set_pad3*(a: var TGtkTextTag, `pad3`: guint) = + a.GtkTextTagflag0 = a.GtkTextTagflag0 or + ((`pad3` shl bp_TGtkTextTag_pad3) and bm_TGtkTextTag_pad3) + +proc underline*(a: var TGtkTextAppearance): guint = + result = (a.flag0 and bm_TGtkTextAppearance_underline) shr + bp_TGtkTextAppearance_underline + +proc set_underline*(a: var TGtkTextAppearance, `underline`: guint) = + a.flag0 = a.flag0 or + (int16(`underline` shl bp_TGtkTextAppearance_underline) and + bm_TGtkTextAppearance_underline) + +proc strikethrough*(a: var TGtkTextAppearance): guint = + result = (a.flag0 and bm_TGtkTextAppearance_strikethrough) shr + bp_TGtkTextAppearance_strikethrough + +proc set_strikethrough*(a: var TGtkTextAppearance, `strikethrough`: guint) = + a.flag0 = a.flag0 or + (int16(`strikethrough` shl bp_TGtkTextAppearance_strikethrough) and + bm_TGtkTextAppearance_strikethrough) + +proc draw_bg*(a: var TGtkTextAppearance): guint = + result = (a.flag0 and bm_TGtkTextAppearance_draw_bg) shr + bp_TGtkTextAppearance_draw_bg + +proc set_draw_bg*(a: var TGtkTextAppearance, `draw_bg`: guint) = + a.flag0 = a.flag0 or + (int16(`draw_bg` shl bp_TGtkTextAppearance_draw_bg) and + bm_TGtkTextAppearance_draw_bg) + +proc inside_selection*(a: var TGtkTextAppearance): guint = + result = (a.flag0 and bm_TGtkTextAppearance_inside_selection) shr + bp_TGtkTextAppearance_inside_selection + +proc set_inside_selection*(a: var TGtkTextAppearance, `inside_selection`: guint) = + a.flag0 = a.flag0 or + (int16(`inside_selection` shl bp_TGtkTextAppearance_inside_selection) and + bm_TGtkTextAppearance_inside_selection) + +proc is_text*(a: var TGtkTextAppearance): guint = + result = (a.flag0 and bm_TGtkTextAppearance_is_text) shr + bp_TGtkTextAppearance_is_text + +proc set_is_text*(a: var TGtkTextAppearance, `is_text`: guint) = + a.flag0 = a.flag0 or + (int16(`is_text` shl bp_TGtkTextAppearance_is_text) and + bm_TGtkTextAppearance_is_text) + +proc pad1*(a: var TGtkTextAppearance): guint = + result = (a.flag0 and bm_TGtkTextAppearance_pad1) shr + bp_TGtkTextAppearance_pad1 + +proc set_pad1*(a: var TGtkTextAppearance, `pad1`: guint) = + a.flag0 = a.flag0 or + (int16(`pad1` shl bp_TGtkTextAppearance_pad1) and bm_TGtkTextAppearance_pad1) + +proc pad2*(a: var TGtkTextAppearance): guint = + result = (a.flag0 and bm_TGtkTextAppearance_pad2) shr + bp_TGtkTextAppearance_pad2 + +proc set_pad2*(a: var TGtkTextAppearance, `pad2`: guint) = + a.flag0 = a.flag0 or + (int16(`pad2` shl bp_TGtkTextAppearance_pad2) and bm_TGtkTextAppearance_pad2) + +proc pad3*(a: var TGtkTextAppearance): guint = + result = (a.flag0 and bm_TGtkTextAppearance_pad3) shr + bp_TGtkTextAppearance_pad3 + +proc set_pad3*(a: var TGtkTextAppearance, `pad3`: guint) = + a.flag0 = a.flag0 or + (int16(`pad3` shl bp_TGtkTextAppearance_pad3) and bm_TGtkTextAppearance_pad3) + +proc pad4*(a: var TGtkTextAppearance): guint = + result = (a.flag0 and bm_TGtkTextAppearance_pad4) shr + bp_TGtkTextAppearance_pad4 + +proc set_pad4*(a: var TGtkTextAppearance, `pad4`: guint) = + a.flag0 = a.flag0 or + (int16(`pad4` shl bp_TGtkTextAppearance_pad4) and bm_TGtkTextAppearance_pad4) + +proc invisible*(a: var TGtkTextAttributes): guint = + result = (a.flag0 and bm_TGtkTextAttributes_invisible) shr + bp_TGtkTextAttributes_invisible + +proc set_invisible*(a: var TGtkTextAttributes, `invisible`: guint) = + a.flag0 = a.flag0 or + (int16(`invisible` shl bp_TGtkTextAttributes_invisible) and + bm_TGtkTextAttributes_invisible) + +proc bg_full_height*(a: var TGtkTextAttributes): guint = + result = (a.flag0 and bm_TGtkTextAttributes_bg_full_height) shr + bp_TGtkTextAttributes_bg_full_height + +proc set_bg_full_height*(a: var TGtkTextAttributes, `bg_full_height`: guint) = + a.flag0 = a.flag0 or + (int16(`bg_full_height` shl bp_TGtkTextAttributes_bg_full_height) and + bm_TGtkTextAttributes_bg_full_height) + +proc editable*(a: var TGtkTextAttributes): guint = + result = (a.flag0 and bm_TGtkTextAttributes_editable) shr + bp_TGtkTextAttributes_editable + +proc set_editable*(a: var TGtkTextAttributes, `editable`: guint) = + a.flag0 = a.flag0 or + (int16(`editable` shl bp_TGtkTextAttributes_editable) and + bm_TGtkTextAttributes_editable) + +proc realized*(a: var TGtkTextAttributes): guint = + result = (a.flag0 and bm_TGtkTextAttributes_realized) shr + bp_TGtkTextAttributes_realized + +proc set_realized*(a: var TGtkTextAttributes, `realized`: guint) = + a.flag0 = a.flag0 or + (int16(`realized` shl bp_TGtkTextAttributes_realized) and + bm_TGtkTextAttributes_realized) + +proc pad1*(a: var TGtkTextAttributes): guint = + result = (a.flag0 and bm_TGtkTextAttributes_pad1) shr + bp_TGtkTextAttributes_pad1 + +proc set_pad1*(a: var TGtkTextAttributes, `pad1`: guint) = + a.flag0 = a.flag0 or + (int16(`pad1` shl bp_TGtkTextAttributes_pad1) and bm_TGtkTextAttributes_pad1) + +proc pad2*(a: var TGtkTextAttributes): guint = + result = (a.flag0 and bm_TGtkTextAttributes_pad2) shr + bp_TGtkTextAttributes_pad2 + +proc set_pad2*(a: var TGtkTextAttributes, `pad2`: guint) = + a.flag0 = a.flag0 or + (int16(`pad2` shl bp_TGtkTextAttributes_pad2) and bm_TGtkTextAttributes_pad2) + +proc pad3*(a: var TGtkTextAttributes): guint = + result = (a.flag0 and bm_TGtkTextAttributes_pad3) shr + bp_TGtkTextAttributes_pad3 + +proc set_pad3*(a: var TGtkTextAttributes, `pad3`: guint) = + a.flag0 = a.flag0 or + (int16(`pad3` shl bp_TGtkTextAttributes_pad3) and bm_TGtkTextAttributes_pad3) + +proc pad4*(a: var TGtkTextAttributes): guint = + result = (a.flag0 and bm_TGtkTextAttributes_pad4) shr + bp_TGtkTextAttributes_pad4 + +proc set_pad4*(a: var TGtkTextAttributes, `pad4`: guint) = + a.flag0 = a.flag0 or + (int16(`pad4` shl bp_TGtkTextAttributes_pad4) and bm_TGtkTextAttributes_pad4) + +proc GTK_TYPE_TEXT_TAG_TABLE*(): GType = + result = gtk_text_tag_table_get_type() + +proc GTK_TEXT_TAG_TABLE*(obj: pointer): PGtkTextTagTable = + result = cast[PGtkTextTagTable](G_TYPE_CHECK_INSTANCE_CAST(obj, + GTK_TYPE_TEXT_TAG_TABLE())) + +proc GTK_TEXT_TAG_TABLE_CLASS*(klass: pointer): PGtkTextTagTableClass = + result = cast[PGtkTextTagTableClass](G_TYPE_CHECK_CLASS_CAST(klass, + GTK_TYPE_TEXT_TAG_TABLE())) + +proc GTK_IS_TEXT_TAG_TABLE*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, GTK_TYPE_TEXT_TAG_TABLE()) + +proc GTK_IS_TEXT_TAG_TABLE_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GTK_TYPE_TEXT_TAG_TABLE()) + +proc GTK_TEXT_TAG_TABLE_GET_CLASS*(obj: pointer): PGtkTextTagTableClass = + result = cast[PGtkTextTagTableClass](G_TYPE_INSTANCE_GET_CLASS(obj, GTK_TYPE_TEXT_TAG_TABLE())) + +proc GTK_TYPE_TEXT_MARK*(): GType = + result = gtk_text_mark_get_type() + +proc GTK_TEXT_MARK*(anObject: pointer): PGtkTextMark = + result = cast[PGtkTextMark](G_TYPE_CHECK_INSTANCE_CAST(anObject, GTK_TYPE_TEXT_MARK())) + +proc GTK_TEXT_MARK_CLASS*(klass: pointer): PGtkTextMarkClass = + result = cast[PGtkTextMarkClass](G_TYPE_CHECK_CLASS_CAST(klass, GTK_TYPE_TEXT_MARK())) + +proc GTK_IS_TEXT_MARK*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GTK_TYPE_TEXT_MARK()) + +proc GTK_IS_TEXT_MARK_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GTK_TYPE_TEXT_MARK()) + +proc GTK_TEXT_MARK_GET_CLASS*(obj: pointer): PGtkTextMarkClass = + result = cast[PGtkTextMarkClass](G_TYPE_INSTANCE_GET_CLASS(obj, GTK_TYPE_TEXT_MARK())) + +proc visible*(a: var TGtkTextMarkBody): guint = + result = (a.flag0 and bm_TGtkTextMarkBody_visible) shr + bp_TGtkTextMarkBody_visible + +proc set_visible*(a: var TGtkTextMarkBody, `visible`: guint) = + a.flag0 = a.flag0 or + (int16(`visible` shl bp_TGtkTextMarkBody_visible) and + bm_TGtkTextMarkBody_visible) + +proc not_deleteable*(a: var TGtkTextMarkBody): guint = + result = (a.flag0 and bm_TGtkTextMarkBody_not_deleteable) shr + bp_TGtkTextMarkBody_not_deleteable + +proc set_not_deleteable*(a: var TGtkTextMarkBody, `not_deleteable`: guint) = + a.flag0 = a.flag0 or + (int16(`not_deleteable` shl bp_TGtkTextMarkBody_not_deleteable) and + bm_TGtkTextMarkBody_not_deleteable) + +proc GTK_TYPE_TEXT_CHILD_ANCHOR*(): GType = + result = gtk_text_child_anchor_get_type() + +proc GTK_TEXT_CHILD_ANCHOR*(anObject: pointer): PGtkTextChildAnchor = + result = cast[PGtkTextChildAnchor](G_TYPE_CHECK_INSTANCE_CAST(anObject, + GTK_TYPE_TEXT_CHILD_ANCHOR())) + +proc GTK_TEXT_CHILD_ANCHOR_CLASS*(klass: pointer): PGtkTextChildAnchorClass = + result = cast[PGtkTextChildAnchorClass](G_TYPE_CHECK_CLASS_CAST(klass, GTK_TYPE_TEXT_CHILD_ANCHOR())) + +proc GTK_IS_TEXT_CHILD_ANCHOR*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, GTK_TYPE_TEXT_CHILD_ANCHOR()) + +proc GTK_IS_TEXT_CHILD_ANCHOR_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GTK_TYPE_TEXT_CHILD_ANCHOR()) + +proc GTK_TEXT_CHILD_ANCHOR_GET_CLASS*(obj: pointer): PGtkTextChildAnchorClass = + result = cast[PGtkTextChildAnchorClass](G_TYPE_INSTANCE_GET_CLASS(obj, + GTK_TYPE_TEXT_CHILD_ANCHOR())) + +proc width*(a: PGtkTextLineData): gint = + result = a . flag0 and bm_TGtkTextLineData_width + +proc set_width*(a: PGtkTextLineData, NewWidth: gint) = + a . flag0 = (bm_TGtkTextLineData_width and NewWidth) or a . flag0 + +proc valid*(a: PGtkTextLineData): gint = + result = (a . flag0 and bm_TGtkTextLineData_valid) shr + bp_TGtkTextLineData_valid + +proc set_valid*(a: PGtkTextLineData, `valid`: gint) = + a . flag0 = a . + flag0 or + ((`valid` shl bp_TGtkTextLineData_valid) and bm_TGtkTextLineData_valid) + +proc GTK_TYPE_TEXT_BUFFER*(): GType = + result = gtk_text_buffer_get_type() + +proc GTK_TEXT_BUFFER*(obj: pointer): PGtkTextBuffer = + result = cast[PGtkTextBuffer](G_TYPE_CHECK_INSTANCE_CAST(obj, GTK_TYPE_TEXT_BUFFER())) + +proc GTK_TEXT_BUFFER_CLASS*(klass: pointer): PGtkTextBufferClass = + result = cast[PGtkTextBufferClass](G_TYPE_CHECK_CLASS_CAST(klass, + GTK_TYPE_TEXT_BUFFER())) + +proc GTK_IS_TEXT_BUFFER*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, GTK_TYPE_TEXT_BUFFER()) + +proc GTK_IS_TEXT_BUFFER_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GTK_TYPE_TEXT_BUFFER()) + +proc GTK_TEXT_BUFFER_GET_CLASS*(obj: pointer): PGtkTextBufferClass = + result = cast[PGtkTextBufferClass](G_TYPE_INSTANCE_GET_CLASS(obj, + GTK_TYPE_TEXT_BUFFER())) + +proc modified*(a: var TGtkTextBuffer): guint = + result = (a.GtkTextBufferflag0 and bm_TGtkTextBuffer_modified) shr + bp_TGtkTextBuffer_modified + +proc set_modified*(a: var TGtkTextBuffer, `modified`: guint) = + a.GtkTextBufferflag0 = a.GtkTextBufferflag0 or + (int16(`modified` shl bp_TGtkTextBuffer_modified) and + bm_TGtkTextBuffer_modified) + +proc GTK_TYPE_TEXT_LAYOUT*(): GType = + result = gtk_text_layout_get_type() + +proc GTK_TEXT_LAYOUT*(obj: pointer): PGtkTextLayout = + result = cast[PGtkTextLayout](G_TYPE_CHECK_INSTANCE_CAST(obj, GTK_TYPE_TEXT_LAYOUT())) + +proc GTK_TEXT_LAYOUT_CLASS*(klass: pointer): PGtkTextLayoutClass = + result = cast[PGtkTextLayoutClass](G_TYPE_CHECK_CLASS_CAST(klass, + GTK_TYPE_TEXT_LAYOUT())) + +proc GTK_IS_TEXT_LAYOUT*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, GTK_TYPE_TEXT_LAYOUT()) + +proc GTK_IS_TEXT_LAYOUT_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GTK_TYPE_TEXT_LAYOUT()) + +proc GTK_TEXT_LAYOUT_GET_CLASS*(obj: pointer): PGtkTextLayoutClass = + result = cast[PGtkTextLayoutClass](G_TYPE_INSTANCE_GET_CLASS(obj, + GTK_TYPE_TEXT_LAYOUT())) + +proc cursor_visible*(a: var TGtkTextLayout): guint = + result = (a.GtkTextLayoutflag0 and bm_TGtkTextLayout_cursor_visible) shr + bp_TGtkTextLayout_cursor_visible + +proc set_cursor_visible*(a: var TGtkTextLayout, `cursor_visible`: guint) = + a.GtkTextLayoutflag0 = a.GtkTextLayoutflag0 or + (int16(`cursor_visible` shl bp_TGtkTextLayout_cursor_visible) and + bm_TGtkTextLayout_cursor_visible) + +proc cursor_direction*(a: var TGtkTextLayout): gint = + result = (a.GtkTextLayoutflag0 and bm_TGtkTextLayout_cursor_direction) shr + bp_TGtkTextLayout_cursor_direction + +proc set_cursor_direction*(a: var TGtkTextLayout, `cursor_direction`: gint) = + a.GtkTextLayoutflag0 = a.GtkTextLayoutflag0 or + (int16(`cursor_direction` shl bp_TGtkTextLayout_cursor_direction) and + bm_TGtkTextLayout_cursor_direction) + +proc is_strong*(a: var TGtkTextCursorDisplay): guint = + result = (a.flag0 and bm_TGtkTextCursorDisplay_is_strong) shr + bp_TGtkTextCursorDisplay_is_strong + +proc set_is_strong*(a: var TGtkTextCursorDisplay, `is_strong`: guint) = + a.flag0 = a.flag0 or + (int16(`is_strong` shl bp_TGtkTextCursorDisplay_is_strong) and + bm_TGtkTextCursorDisplay_is_strong) + +proc is_weak*(a: var TGtkTextCursorDisplay): guint = + result = (a.flag0 and bm_TGtkTextCursorDisplay_is_weak) shr + bp_TGtkTextCursorDisplay_is_weak + +proc set_is_weak*(a: var TGtkTextCursorDisplay, `is_weak`: guint) = + a.flag0 = a.flag0 or + (int16(`is_weak` shl bp_TGtkTextCursorDisplay_is_weak) and + bm_TGtkTextCursorDisplay_is_weak) + +proc GTK_TYPE_TEXT_VIEW*(): GType = + result = gtk_text_view_get_type() + +proc GTK_TEXT_VIEW*(obj: pointer): PGtkTextView = + result = cast[PGtkTextView](GTK_CHECK_CAST(obj, GTK_TYPE_TEXT_VIEW())) + +proc GTK_TEXT_VIEW_CLASS*(klass: pointer): PGtkTextViewClass = + result = cast[PGtkTextViewClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_TEXT_VIEW())) + +proc GTK_IS_TEXT_VIEW*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_TEXT_VIEW()) + +proc GTK_IS_TEXT_VIEW_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_TEXT_VIEW()) + +proc GTK_TEXT_VIEW_GET_CLASS*(obj: pointer): PGtkTextViewClass = + result = cast[PGtkTextViewClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_TEXT_VIEW())) + +proc editable*(a: var TGtkTextView): guint = + result = (a.GtkTextViewflag0 and bm_TGtkTextView_editable) shr + bp_TGtkTextView_editable + +proc set_editable*(a: var TGtkTextView, `editable`: guint) = + a.GtkTextViewflag0 = a.GtkTextViewflag0 or + (int16(`editable` shl bp_TGtkTextView_editable) and bm_TGtkTextView_editable) + +proc overwrite_mode*(a: var TGtkTextView): guint = + result = (a.GtkTextViewflag0 and bm_TGtkTextView_overwrite_mode) shr + bp_TGtkTextView_overwrite_mode + +proc set_overwrite_mode*(a: var TGtkTextView, `overwrite_mode`: guint) = + a.GtkTextViewflag0 = a.GtkTextViewflag0 or + (int16(`overwrite_mode` shl bp_TGtkTextView_overwrite_mode) and + bm_TGtkTextView_overwrite_mode) + +proc cursor_visible*(a: var TGtkTextView): guint = + result = (a.GtkTextViewflag0 and bm_TGtkTextView_cursor_visible) shr + bp_TGtkTextView_cursor_visible + +proc set_cursor_visible*(a: var TGtkTextView, `cursor_visible`: guint) = + a.GtkTextViewflag0 = a.GtkTextViewflag0 or + (int16(`cursor_visible` shl bp_TGtkTextView_cursor_visible) and + bm_TGtkTextView_cursor_visible) + +proc need_im_reset*(a: var TGtkTextView): guint = + result = (a.GtkTextViewflag0 and bm_TGtkTextView_need_im_reset) shr + bp_TGtkTextView_need_im_reset + +proc set_need_im_reset*(a: var TGtkTextView, `need_im_reset`: guint) = + a.GtkTextViewflag0 = a.GtkTextViewflag0 or + (int16(`need_im_reset` shl bp_TGtkTextView_need_im_reset) and + bm_TGtkTextView_need_im_reset) + +proc just_selected_element*(a: var TGtkTextView): guint = + result = (a.GtkTextViewflag0 and bm_TGtkTextView_just_selected_element) shr + bp_TGtkTextView_just_selected_element + +proc set_just_selected_element*(a: var TGtkTextView, + `just_selected_element`: guint) = + a.GtkTextViewflag0 = a.GtkTextViewflag0 or + (int16(`just_selected_element` shl bp_TGtkTextView_just_selected_element) and + bm_TGtkTextView_just_selected_element) + +proc disable_scroll_on_focus*(a: var TGtkTextView): guint = + result = (a.GtkTextViewflag0 and bm_TGtkTextView_disable_scroll_on_focus) shr + bp_TGtkTextView_disable_scroll_on_focus + +proc set_disable_scroll_on_focus*(a: var TGtkTextView, + `disable_scroll_on_focus`: guint) = + a.GtkTextViewflag0 = a.GtkTextViewflag0 or + (int16(`disable_scroll_on_focus` shl bp_TGtkTextView_disable_scroll_on_focus) and + bm_TGtkTextView_disable_scroll_on_focus) + +proc onscreen_validated*(a: var TGtkTextView): guint = + result = (a.GtkTextViewflag0 and bm_TGtkTextView_onscreen_validated) shr + bp_TGtkTextView_onscreen_validated + +proc set_onscreen_validated*(a: var TGtkTextView, `onscreen_validated`: guint) = + a.GtkTextViewflag0 = a.GtkTextViewflag0 or + (int16(`onscreen_validated` shl bp_TGtkTextView_onscreen_validated) and + bm_TGtkTextView_onscreen_validated) + +proc mouse_cursor_obscured*(a: var TGtkTextView): guint = + result = (a.GtkTextViewflag0 and bm_TGtkTextView_mouse_cursor_obscured) shr + bp_TGtkTextView_mouse_cursor_obscured + +proc set_mouse_cursor_obscured*(a: var TGtkTextView, + `mouse_cursor_obscured`: guint) = + a.GtkTextViewflag0 = a.GtkTextViewflag0 or + (int16(`mouse_cursor_obscured` shl bp_TGtkTextView_mouse_cursor_obscured) and + bm_TGtkTextView_mouse_cursor_obscured) + +proc GTK_TYPE_TIPS_QUERY*(): GType = + result = gtk_tips_query_get_type() + +proc GTK_TIPS_QUERY*(obj: pointer): PGtkTipsQuery = + result = cast[PGtkTipsQuery](GTK_CHECK_CAST(obj, GTK_TYPE_TIPS_QUERY())) + +proc GTK_TIPS_QUERY_CLASS*(klass: pointer): PGtkTipsQueryClass = + result = cast[PGtkTipsQueryClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_TIPS_QUERY())) + +proc GTK_IS_TIPS_QUERY*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_TIPS_QUERY()) + +proc GTK_IS_TIPS_QUERY_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_TIPS_QUERY()) + +proc GTK_TIPS_QUERY_GET_CLASS*(obj: pointer): PGtkTipsQueryClass = + result = cast[PGtkTipsQueryClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_TIPS_QUERY())) + +proc emit_always*(a: var TGtkTipsQuery): guint = + result = (a.GtkTipsQueryflag0 and bm_TGtkTipsQuery_emit_always) shr + bp_TGtkTipsQuery_emit_always + +proc set_emit_always*(a: var TGtkTipsQuery, `emit_always`: guint) = + a.GtkTipsQueryflag0 = a.GtkTipsQueryflag0 or + (int16(`emit_always` shl bp_TGtkTipsQuery_emit_always) and + bm_TGtkTipsQuery_emit_always) + +proc in_query*(a: var TGtkTipsQuery): guint = + result = (a.GtkTipsQueryflag0 and bm_TGtkTipsQuery_in_query) shr + bp_TGtkTipsQuery_in_query + +proc set_in_query*(a: var TGtkTipsQuery, `in_query`: guint) = + a.GtkTipsQueryflag0 = a.GtkTipsQueryflag0 or + (int16(`in_query` shl bp_TGtkTipsQuery_in_query) and + bm_TGtkTipsQuery_in_query) + +proc GTK_TYPE_TOOLTIPS*(): GType = + result = gtk_tooltips_get_type() + +proc GTK_TOOLTIPS*(obj: pointer): PGtkTooltips = + result = cast[PGtkTooltips](GTK_CHECK_CAST(obj, GTK_TYPE_TOOLTIPS())) + +proc GTK_TOOLTIPS_CLASS*(klass: pointer): PGtkTooltipsClass = + result = cast[PGtkTooltipsClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_TOOLTIPS())) + +proc GTK_IS_TOOLTIPS*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_TOOLTIPS()) + +proc GTK_IS_TOOLTIPS_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_TOOLTIPS()) + +proc GTK_TOOLTIPS_GET_CLASS*(obj: pointer): PGtkTooltipsClass = + result = cast[PGtkTooltipsClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_TOOLTIPS())) + +proc delay*(a: var TGtkTooltips): guint = + result = (a.GtkTooltipsflag0 and bm_TGtkTooltips_delay) shr bp_TGtkTooltips_delay + +proc set_delay*(a: var TGtkTooltips, `delay`: guint) = + a.GtkTooltipsflag0 = a.GtkTooltipsflag0 or + ((`delay` shl bp_TGtkTooltips_delay) and bm_TGtkTooltips_delay) + +proc enabled*(a: var TGtkTooltips): guint = + result = (a.GtkTooltipsflag0 and bm_TGtkTooltips_enabled) shr bp_TGtkTooltips_enabled + +proc set_enabled*(a: var TGtkTooltips, `enabled`: guint) = + a.GtkTooltipsflag0 = a.GtkTooltipsflag0 or + ((`enabled` shl bp_TGtkTooltips_enabled) and bm_TGtkTooltips_enabled) + +proc have_grab*(a: var TGtkTooltips): guint = + result = (a.GtkTooltipsflag0 and bm_TGtkTooltips_have_grab) shr + bp_TGtkTooltips_have_grab + +proc set_have_grab*(a: var TGtkTooltips, `have_grab`: guint) = + a.GtkTooltipsflag0 = a.GtkTooltipsflag0 or + ((`have_grab` shl bp_TGtkTooltips_have_grab) and + bm_TGtkTooltips_have_grab) + +proc use_sticky_delay*(a: var TGtkTooltips): guint = + result = (a.GtkTooltipsflag0 and bm_TGtkTooltips_use_sticky_delay) shr + bp_TGtkTooltips_use_sticky_delay + +proc set_use_sticky_delay*(a: var TGtkTooltips, `use_sticky_delay`: guint) = + a.GtkTooltipsflag0 = a.GtkTooltipsflag0 or + ((`use_sticky_delay` shl bp_TGtkTooltips_use_sticky_delay) and + bm_TGtkTooltips_use_sticky_delay) + +proc GTK_TYPE_TOOLBAR*(): GType = + result = gtk_toolbar_get_type() + +proc GTK_TOOLBAR*(obj: pointer): PGtkToolbar = + result = cast[PGtkToolbar](GTK_CHECK_CAST(obj, GTK_TYPE_TOOLBAR())) + +proc GTK_TOOLBAR_CLASS*(klass: pointer): PGtkToolbarClass = + result = cast[PGtkToolbarClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_TOOLBAR())) + +proc GTK_IS_TOOLBAR*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_TOOLBAR()) + +proc GTK_IS_TOOLBAR_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_TOOLBAR()) + +proc GTK_TOOLBAR_GET_CLASS*(obj: pointer): PGtkToolbarClass = + result = cast[PGtkToolbarClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_TOOLBAR())) + +proc style_set*(a: var TGtkToolbar): guint = + result = (a.GtkToolbarflag0 and bm_TGtkToolbar_style_set) shr + bp_TGtkToolbar_style_set + +proc set_style_set*(a: var TGtkToolbar, `style_set`: guint) = + a.GtkToolbarflag0 = a.GtkToolbarflag0 or + (int16(`style_set` shl bp_TGtkToolbar_style_set) and + bm_TGtkToolbar_style_set) + +proc icon_size_set*(a: var TGtkToolbar): guint = + result = (a.GtkToolbarflag0 and bm_TGtkToolbar_icon_size_set) shr + bp_TGtkToolbar_icon_size_set + +proc set_icon_size_set*(a: var TGtkToolbar, `icon_size_set`: guint) = + a.GtkToolbarflag0 = a.GtkToolbarflag0 or + (int16(`icon_size_set` shl bp_TGtkToolbar_icon_size_set) and + bm_TGtkToolbar_icon_size_set) + +proc GTK_TYPE_TREE*(): GType = + result = gtk_tree_get_type() + +proc GTK_TREE*(obj: pointer): PGtkTree = + result = cast[PGtkTree](GTK_CHECK_CAST(obj, GTK_TYPE_TREE())) + +proc GTK_TREE_CLASS*(klass: pointer): PGtkTreeClass = + result = cast[PGtkTreeClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_TREE())) + +proc GTK_IS_TREE*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_TREE()) + +proc GTK_IS_TREE_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_TREE()) + +proc GTK_TREE_GET_CLASS*(obj: pointer): PGtkTreeClass = + result = cast[PGtkTreeClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_TREE())) + +proc GTK_IS_ROOT_TREE*(obj: pointer): bool = + result = (cast[PGtkObject]((GTK_TREE(obj)) . root_tree)) == + (cast[PGtkObject](obj)) + +proc GTK_TREE_ROOT_TREE*(obj: pointer): PGtkTree = + result = GTK_TREE(obj).root_tree + +proc GTK_TREE_SELECTION_OLD*(obj: pointer): PGList = + result = (GTK_TREE_ROOT_TREE(obj)).selection + +proc selection_mode*(a: var TGtkTree): guint = + result = (a.GtkTreeflag0 and bm_TGtkTree_selection_mode) shr + bp_TGtkTree_selection_mode + +proc set_selection_mode*(a: var TGtkTree, `selection_mode`: guint) = + a.GtkTreeflag0 = a.GtkTreeflag0 or + (int16(`selection_mode` shl bp_TGtkTree_selection_mode) and + bm_TGtkTree_selection_mode) + +proc view_mode*(a: var TGtkTree): guint = + result = (a.GtkTreeflag0 and bm_TGtkTree_view_mode) shr bp_TGtkTree_view_mode + +proc set_view_mode*(a: var TGtkTree, `view_mode`: guint) = + a.GtkTreeflag0 = a.GtkTreeflag0 or + (int16(`view_mode` shl bp_TGtkTree_view_mode) and bm_TGtkTree_view_mode) + +proc view_line*(a: var TGtkTree): guint = + result = (a.GtkTreeflag0 and bm_TGtkTree_view_line) shr bp_TGtkTree_view_line + +proc set_view_line*(a: var TGtkTree, `view_line`: guint) = + a.GtkTreeflag0 = a.GtkTreeflag0 or + (int16(`view_line` shl bp_TGtkTree_view_line) and bm_TGtkTree_view_line) + +proc GTK_TYPE_TREE_DRAG_SOURCE*(): GType = + result = gtk_tree_drag_source_get_type() + +proc GTK_TREE_DRAG_SOURCE*(obj: pointer): PGtkTreeDragSource = + result = cast[PGtkTreeDragSource](G_TYPE_CHECK_INSTANCE_CAST(obj, + GTK_TYPE_TREE_DRAG_SOURCE())) + +proc GTK_IS_TREE_DRAG_SOURCE*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, GTK_TYPE_TREE_DRAG_SOURCE()) + +proc GTK_TREE_DRAG_SOURCE_GET_IFACE*(obj: pointer): PGtkTreeDragSourceIface = + result = cast[PGtkTreeDragSourceIface](G_TYPE_INSTANCE_GET_INTERFACE(obj, + GTK_TYPE_TREE_DRAG_SOURCE())) + +proc GTK_TYPE_TREE_DRAG_DEST*(): GType = + result = gtk_tree_drag_dest_get_type() + +proc GTK_TREE_DRAG_DEST*(obj: pointer): PGtkTreeDragDest = + result = cast[PGtkTreeDragDest](G_TYPE_CHECK_INSTANCE_CAST(obj, + GTK_TYPE_TREE_DRAG_DEST())) + +proc GTK_IS_TREE_DRAG_DEST*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, GTK_TYPE_TREE_DRAG_DEST()) + +proc GTK_TREE_DRAG_DEST_GET_IFACE*(obj: pointer): PGtkTreeDragDestIface = + result = cast[PGtkTreeDragDestIface](G_TYPE_INSTANCE_GET_INTERFACE(obj, + GTK_TYPE_TREE_DRAG_DEST())) + +proc GTK_TYPE_TREE_ITEM*(): GType = + result = gtk_tree_item_get_type() + +proc GTK_TREE_ITEM*(obj: pointer): PGtkTreeItem = + result = cast[PGtkTreeItem](GTK_CHECK_CAST(obj, GTK_TYPE_TREE_ITEM())) + +proc GTK_TREE_ITEM_CLASS*(klass: pointer): PGtkTreeItemClass = + result = cast[PGtkTreeItemClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_TREE_ITEM())) + +proc GTK_IS_TREE_ITEM*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_TREE_ITEM()) + +proc GTK_IS_TREE_ITEM_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_TREE_ITEM()) + +proc GTK_TREE_ITEM_GET_CLASS*(obj: pointer): PGtkTreeItemClass = + result = cast[PGtkTreeItemClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_TREE_ITEM())) + +proc GTK_TREE_ITEM_SUBTREE*(obj: pointer): PGtkWidget = + result = (GTK_TREE_ITEM(obj)).subtree + +proc expanded*(a: var TGtkTreeItem): guint = + result = (a.GtkTreeItemflag0 and bm_TGtkTreeItem_expanded) shr + bp_TGtkTreeItem_expanded + +proc set_expanded*(a: var TGtkTreeItem, `expanded`: guint) = + a.GtkTreeItemflag0 = a.GtkTreeItemflag0 or + (int16(`expanded` shl bp_TGtkTreeItem_expanded) and bm_TGtkTreeItem_expanded) + +proc GTK_TYPE_TREE_SELECTION*(): GType = + result = gtk_tree_selection_get_type() + +proc GTK_TREE_SELECTION*(obj: pointer): PGtkTreeSelection = + result = cast[PGtkTreeSelection](GTK_CHECK_CAST(obj, GTK_TYPE_TREE_SELECTION())) + +proc GTK_TREE_SELECTION_CLASS*(klass: pointer): PGtkTreeSelectionClass = + result = cast[PGtkTreeSelectionClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_TREE_SELECTION())) + +proc GTK_IS_TREE_SELECTION*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_TREE_SELECTION()) + +proc GTK_IS_TREE_SELECTION_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_TREE_SELECTION()) + +proc GTK_TREE_SELECTION_GET_CLASS*(obj: pointer): PGtkTreeSelectionClass = + result = cast[PGtkTreeSelectionClass](GTK_CHECK_GET_CLASS(obj, + GTK_TYPE_TREE_SELECTION())) + +proc GTK_TYPE_TREE_STORE*(): GType = + result = gtk_tree_store_get_type() + +proc GTK_TREE_STORE*(obj: pointer): PGtkTreeStore = + result = cast[PGtkTreeStore](GTK_CHECK_CAST(obj, GTK_TYPE_TREE_STORE())) + +proc GTK_TREE_STORE_CLASS*(klass: pointer): PGtkTreeStoreClass = + result = cast[PGtkTreeStoreClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_TREE_STORE())) + +proc GTK_IS_TREE_STORE*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_TREE_STORE()) + +proc GTK_IS_TREE_STORE_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_TREE_STORE()) + +proc GTK_TREE_STORE_GET_CLASS*(obj: pointer): PGtkTreeStoreClass = + result = cast[PGtkTreeStoreClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_TREE_STORE())) + +proc columns_dirty*(a: var TGtkTreeStore): guint = + result = (a.GtkTreeStoreflag0 and bm_TGtkTreeStore_columns_dirty) shr + bp_TGtkTreeStore_columns_dirty + +proc set_columns_dirty*(a: var TGtkTreeStore, `columns_dirty`: guint) = + a.GtkTreeStoreflag0 = a.GtkTreeStoreflag0 or + (int16(`columns_dirty` shl bp_TGtkTreeStore_columns_dirty) and + bm_TGtkTreeStore_columns_dirty) + +proc GTK_TYPE_TREE_VIEW_COLUMN*(): GType = + result = gtk_tree_view_column_get_type() + +proc GTK_TREE_VIEW_COLUMN*(obj: pointer): PGtkTreeViewColumn = + result = cast[PGtkTreeViewColumn](GTK_CHECK_CAST(obj, GTK_TYPE_TREE_VIEW_COLUMN())) + +proc GTK_TREE_VIEW_COLUMN_CLASS*(klass: pointer): PGtkTreeViewColumnClass = + result = cast[PGtkTreeViewColumnClass](GTK_CHECK_CLASS_CAST(klass, + GTK_TYPE_TREE_VIEW_COLUMN())) + +proc GTK_IS_TREE_VIEW_COLUMN*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_TREE_VIEW_COLUMN()) + +proc GTK_IS_TREE_VIEW_COLUMN_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_TREE_VIEW_COLUMN()) + +proc GTK_TREE_VIEW_COLUMN_GET_CLASS*(obj: pointer): PGtkTreeViewColumnClass = + result = cast[PGtkTreeViewColumnClass](GTK_CHECK_GET_CLASS(obj, + GTK_TYPE_TREE_VIEW_COLUMN())) + +proc visible*(a: var TGtkTreeViewColumn): guint = + result = (a.GtkTreeViewColumnflag0 and bm_TGtkTreeViewColumn_visible) shr + bp_TGtkTreeViewColumn_visible + +proc set_visible*(a: var TGtkTreeViewColumn, `visible`: guint) = + a.GtkTreeViewColumnflag0 = a.GtkTreeViewColumnflag0 or + (int16(`visible` shl bp_TGtkTreeViewColumn_visible) and + bm_TGtkTreeViewColumn_visible) + +proc resizable*(a: var TGtkTreeViewColumn): guint = + result = (a.GtkTreeViewColumnflag0 and bm_TGtkTreeViewColumn_resizable) shr + bp_TGtkTreeViewColumn_resizable + +proc set_resizable*(a: var TGtkTreeViewColumn, `resizable`: guint) = + a.GtkTreeViewColumnflag0 = a.GtkTreeViewColumnflag0 or + (int16(`resizable` shl bp_TGtkTreeViewColumn_resizable) and + bm_TGtkTreeViewColumn_resizable) + +proc clickable*(a: var TGtkTreeViewColumn): guint = + result = (a.GtkTreeViewColumnflag0 and bm_TGtkTreeViewColumn_clickable) shr + bp_TGtkTreeViewColumn_clickable + +proc set_clickable*(a: var TGtkTreeViewColumn, `clickable`: guint) = + a.GtkTreeViewColumnflag0 = a.GtkTreeViewColumnflag0 or + (int16(`clickable` shl bp_TGtkTreeViewColumn_clickable) and + bm_TGtkTreeViewColumn_clickable) + +proc dirty*(a: var TGtkTreeViewColumn): guint = + result = (a.GtkTreeViewColumnflag0 and bm_TGtkTreeViewColumn_dirty) shr + bp_TGtkTreeViewColumn_dirty + +proc set_dirty*(a: var TGtkTreeViewColumn, `dirty`: guint) = + a.GtkTreeViewColumnflag0 = a.GtkTreeViewColumnflag0 or + (int16(`dirty` shl bp_TGtkTreeViewColumn_dirty) and + bm_TGtkTreeViewColumn_dirty) + +proc show_sort_indicator*(a: var TGtkTreeViewColumn): guint = + result = (a.GtkTreeViewColumnflag0 and bm_TGtkTreeViewColumn_show_sort_indicator) shr + bp_TGtkTreeViewColumn_show_sort_indicator + +proc set_show_sort_indicator*(a: var TGtkTreeViewColumn, + `show_sort_indicator`: guint) = + a.GtkTreeViewColumnflag0 = a.GtkTreeViewColumnflag0 or + (int16(`show_sort_indicator` shl bp_TGtkTreeViewColumn_show_sort_indicator) and + bm_TGtkTreeViewColumn_show_sort_indicator) + +proc maybe_reordered*(a: var TGtkTreeViewColumn): guint = + result = (a.GtkTreeViewColumnflag0 and bm_TGtkTreeViewColumn_maybe_reordered) shr + bp_TGtkTreeViewColumn_maybe_reordered + +proc set_maybe_reordered*(a: var TGtkTreeViewColumn, `maybe_reordered`: guint) = + a.GtkTreeViewColumnflag0 = a.GtkTreeViewColumnflag0 or + (int16(`maybe_reordered` shl bp_TGtkTreeViewColumn_maybe_reordered) and + bm_TGtkTreeViewColumn_maybe_reordered) + +proc reorderable*(a: var TGtkTreeViewColumn): guint = + result = (a.GtkTreeViewColumnflag0 and bm_TGtkTreeViewColumn_reorderable) shr + bp_TGtkTreeViewColumn_reorderable + +proc set_reorderable*(a: var TGtkTreeViewColumn, `reorderable`: guint) = + a.GtkTreeViewColumnflag0 = a.GtkTreeViewColumnflag0 or + (int16(`reorderable` shl bp_TGtkTreeViewColumn_reorderable) and + bm_TGtkTreeViewColumn_reorderable) + +proc use_resized_width*(a: var TGtkTreeViewColumn): guint = + result = (a.GtkTreeViewColumnflag0 and bm_TGtkTreeViewColumn_use_resized_width) shr + bp_TGtkTreeViewColumn_use_resized_width + +proc set_use_resized_width*(a: var TGtkTreeViewColumn, + `use_resized_width`: guint) = + a.GtkTreeViewColumnflag0 = a.GtkTreeViewColumnflag0 or + (int16(`use_resized_width` shl bp_TGtkTreeViewColumn_use_resized_width) and + bm_TGtkTreeViewColumn_use_resized_width) + +proc flags*(a: PGtkRBNode): guint = + result = (a . flag0 and bm_TGtkRBNode_flags) shr bp_TGtkRBNode_flags + +proc set_flags*(a: PGtkRBNode, `flags`: guint) = + a . flag0 = a . + flag0 or (int16(`flags` shl bp_TGtkRBNode_flags) and bm_TGtkRBNode_flags) + +proc parity*(a: PGtkRBNode): guint = + result = (a . flag0 and bm_TGtkRBNode_parity) shr bp_TGtkRBNode_parity + +proc set_parity*(a: PGtkRBNode, `parity`: guint) = + a . flag0 = a . + flag0 or (int16(`parity` shl bp_TGtkRBNode_parity) and bm_TGtkRBNode_parity) + +proc GTK_RBNODE_GET_COLOR*(node: PGtkRBNode): guint = + if node == nil: + Result = GTK_RBNODE_BLACK + elif (int(flags(node)) and GTK_RBNODE_RED) == GTK_RBNODE_RED: + Result = GTK_RBNODE_RED + else: + Result = GTK_RBNODE_BLACK + +proc GTK_RBNODE_SET_COLOR*(node: PGtkRBNode, color: guint) = + if node == nil: + return + if ((flags(node) and (color)) != color): + set_flags(node, flags(node) xor cint(GTK_RBNODE_RED or GTK_RBNODE_BLACK)) + +proc GTK_RBNODE_GET_HEIGHT*(node: PGtkRBNode): gint = + var if_local1: gint + if node.children != nil: + if_local1 = node.children.root.offset + else: + if_local1 = 0 + result = node.offset - ((node.left.offset) + node.right.offset + if_local1) + +proc GTK_RBNODE_FLAG_SET*(node: PGtkRBNode, flag: guint): bool = + result = (node != nil) and ((flags(node) and (flag)) == flag) + +proc GTK_RBNODE_SET_FLAG*(node: PGtkRBNode, flag: guint16) = + set_flags(node, (flag) or flags(node)) + +proc GTK_RBNODE_UNSET_FLAG*(node: PGtkRBNode, flag: guint16) = + set_flags(node, (not (flag)) and flags(node)) + +proc GTK_TREE_VIEW_FLAG_SET*(tree_view: PGtkTreeView, flag: guint): bool = + result = ((tree_view.priv.flags) and (flag)) == flag + +proc TREE_VIEW_HEADER_HEIGHT*(tree_view: PGtkTreeView): int32 = + var if_local1: int32 + if GTK_TREE_VIEW_FLAG_SET(tree_view, GTK_TREE_VIEW_HEADERS_VISIBLE): + if_local1 = tree_view.priv.header_height + else: + if_local1 = 0 + result = if_local1 + +proc TREE_VIEW_COLUMN_REQUESTED_WIDTH*(column: PGtkTreeViewColumn): int32 = + var MinWidth, MaxWidth: int + if column.min_width != -1'i32: + MinWidth = column.min_width + else: + MinWidth = column.requested_width + if column.max_width != - 1'i32: + MaxWidth = column.max_width + else: + MaxWidth = column.requested_width + result = CLAMP(column.requested_width, MinWidth, MaxWidth) + +proc TREE_VIEW_DRAW_EXPANDERS*(tree_view: PGtkTreeView): bool = + result = (not (GTK_TREE_VIEW_FLAG_SET(tree_view, GTK_TREE_VIEW_IS_LIST))) and + (GTK_TREE_VIEW_FLAG_SET(tree_view, GTK_TREE_VIEW_SHOW_EXPANDERS)) + +proc TREE_VIEW_COLUMN_DRAG_DEAD_MULTIPLIER*(tree_view: PGtkTreeView): int32 = + result = 10'i32 * (TREE_VIEW_HEADER_HEIGHT(tree_view)) + +proc scroll_to_use_align*(a: var TGtkTreeViewPrivate): guint = + result = (a.flag0 and bm_TGtkTreeViewPrivate_scroll_to_use_align) shr + bp_TGtkTreeViewPrivate_scroll_to_use_align + +proc set_scroll_to_use_align*(a: var TGtkTreeViewPrivate, + `scroll_to_use_align`: guint) = + a.flag0 = a.flag0 or + (int16(`scroll_to_use_align` shl bp_TGtkTreeViewPrivate_scroll_to_use_align) and + bm_TGtkTreeViewPrivate_scroll_to_use_align) + +proc fixed_height_check*(a: var TGtkTreeViewPrivate): guint = + result = (a.flag0 and bm_TGtkTreeViewPrivate_fixed_height_check) shr + bp_TGtkTreeViewPrivate_fixed_height_check + +proc set_fixed_height_check*(a: var TGtkTreeViewPrivate, + `fixed_height_check`: guint) = + a.flag0 = a.flag0 or + (int16(`fixed_height_check` shl bp_TGtkTreeViewPrivate_fixed_height_check) and + bm_TGtkTreeViewPrivate_fixed_height_check) + +proc reorderable*(a: var TGtkTreeViewPrivate): guint = + result = (a.flag0 and bm_TGtkTreeViewPrivate_reorderable) shr + bp_TGtkTreeViewPrivate_reorderable + +proc set_reorderable*(a: var TGtkTreeViewPrivate, `reorderable`: guint) = + a.flag0 = a.flag0 or + (int16(`reorderable` shl bp_TGtkTreeViewPrivate_reorderable) and + bm_TGtkTreeViewPrivate_reorderable) + +proc header_has_focus*(a: var TGtkTreeViewPrivate): guint = + result = (a.flag0 and bm_TGtkTreeViewPrivate_header_has_focus) shr + bp_TGtkTreeViewPrivate_header_has_focus + +proc set_header_has_focus*(a: var TGtkTreeViewPrivate, `header_has_focus`: guint) = + a.flag0 = a.flag0 or + (int16(`header_has_focus` shl bp_TGtkTreeViewPrivate_header_has_focus) and + bm_TGtkTreeViewPrivate_header_has_focus) + +proc drag_column_window_state*(a: var TGtkTreeViewPrivate): guint = + result = (a.flag0 and bm_TGtkTreeViewPrivate_drag_column_window_state) shr + bp_TGtkTreeViewPrivate_drag_column_window_state + +proc set_drag_column_window_state*(a: var TGtkTreeViewPrivate, + `drag_column_window_state`: guint) = + a.flag0 = a.flag0 or + (int16(`drag_column_window_state` shl + bp_TGtkTreeViewPrivate_drag_column_window_state) and + bm_TGtkTreeViewPrivate_drag_column_window_state) + +proc has_rules*(a: var TGtkTreeViewPrivate): guint = + result = (a.flag0 and bm_TGtkTreeViewPrivate_has_rules) shr + bp_TGtkTreeViewPrivate_has_rules + +proc set_has_rules*(a: var TGtkTreeViewPrivate, `has_rules`: guint) = + a.flag0 = a.flag0 or + (int16(`has_rules` shl bp_TGtkTreeViewPrivate_has_rules) and + bm_TGtkTreeViewPrivate_has_rules) + +proc mark_rows_col_dirty*(a: var TGtkTreeViewPrivate): guint = + result = (a.flag0 and bm_TGtkTreeViewPrivate_mark_rows_col_dirty) shr + bp_TGtkTreeViewPrivate_mark_rows_col_dirty + +proc set_mark_rows_col_dirty*(a: var TGtkTreeViewPrivate, + `mark_rows_col_dirty`: guint) = + a.flag0 = a.flag0 or + (int16(`mark_rows_col_dirty` shl bp_TGtkTreeViewPrivate_mark_rows_col_dirty) and + bm_TGtkTreeViewPrivate_mark_rows_col_dirty) + +proc enable_search*(a: var TGtkTreeViewPrivate): guint = + result = (a.flag0 and bm_TGtkTreeViewPrivate_enable_search) shr + bp_TGtkTreeViewPrivate_enable_search + +proc set_enable_search*(a: var TGtkTreeViewPrivate, `enable_search`: guint) = + a.flag0 = a.flag0 or + (int16(`enable_search` shl bp_TGtkTreeViewPrivate_enable_search) and + bm_TGtkTreeViewPrivate_enable_search) + +proc disable_popdown*(a: var TGtkTreeViewPrivate): guint = + result = (a.flag0 and bm_TGtkTreeViewPrivate_disable_popdown) shr + bp_TGtkTreeViewPrivate_disable_popdown + +proc set_disable_popdown*(a: var TGtkTreeViewPrivate, `disable_popdown`: guint) = + a.flag0 = a.flag0 or + (int16(`disable_popdown` shl bp_TGtkTreeViewPrivate_disable_popdown) and + bm_TGtkTreeViewPrivate_disable_popdown) + +proc GTK_TREE_VIEW_SET_FLAG*(tree_view: PGtkTreeView, flag: guint) = + tree_view . priv . flags = tree_view . priv . flags or (flag) + +proc GTK_TREE_VIEW_UNSET_FLAG*(tree_view: PGtkTreeView, flag: guint) = + tree_view . priv . flags = tree_view . priv . flags and not (flag) + +proc GTK_TYPE_TREE_VIEW*(): GType = + result = gtk_tree_view_get_type() + +proc GTK_TREE_VIEW*(obj: pointer): PGtkTreeView = + result = cast[PGtkTreeView](GTK_CHECK_CAST(obj, GTK_TYPE_TREE_VIEW())) + +proc GTK_TREE_VIEW_CLASS*(klass: pointer): PGtkTreeViewClass = + result = cast[PGtkTreeViewClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_TREE_VIEW())) + +proc GTK_IS_TREE_VIEW*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_TREE_VIEW()) + +proc GTK_IS_TREE_VIEW_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_TREE_VIEW()) + +proc GTK_TREE_VIEW_GET_CLASS*(obj: pointer): PGtkTreeViewClass = + result = cast[PGtkTreeViewClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_TREE_VIEW())) + +proc GTK_TYPE_VBUTTON_BOX*(): GType = + result = gtk_vbutton_box_get_type() + +proc GTK_VBUTTON_BOX*(obj: pointer): PGtkVButtonBox = + result = cast[PGtkVButtonBox](GTK_CHECK_CAST(obj, GTK_TYPE_VBUTTON_BOX())) + +proc GTK_VBUTTON_BOX_CLASS*(klass: pointer): PGtkVButtonBoxClass = + result = cast[PGtkVButtonBoxClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_VBUTTON_BOX())) + +proc GTK_IS_VBUTTON_BOX*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_VBUTTON_BOX()) + +proc GTK_IS_VBUTTON_BOX_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_VBUTTON_BOX()) + +proc GTK_VBUTTON_BOX_GET_CLASS*(obj: pointer): PGtkVButtonBoxClass = + result = cast[PGtkVButtonBoxClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_VBUTTON_BOX())) + +proc GTK_TYPE_VIEWPORT*(): GType = + result = gtk_viewport_get_type() + +proc GTK_VIEWPORT*(obj: pointer): PGtkViewport = + result = cast[PGtkViewport](GTK_CHECK_CAST(obj, GTK_TYPE_VIEWPORT())) + +proc GTK_VIEWPORT_CLASS*(klass: pointer): PGtkViewportClass = + result = cast[PGtkViewportClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_VIEWPORT())) + +proc GTK_IS_VIEWPORT*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_VIEWPORT()) + +proc GTK_IS_VIEWPORT_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_VIEWPORT()) + +proc GTK_VIEWPORT_GET_CLASS*(obj: pointer): PGtkViewportClass = + result = cast[PGtkViewportClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_VIEWPORT())) + +proc GTK_TYPE_VPANED*(): GType = + result = gtk_vpaned_get_type() + +proc GTK_VPANED*(obj: pointer): PGtkVPaned = + result = cast[PGtkVPaned](GTK_CHECK_CAST(obj, GTK_TYPE_VPANED())) + +proc GTK_VPANED_CLASS*(klass: pointer): PGtkVPanedClass = + result = cast[PGtkVPanedClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_VPANED())) + +proc GTK_IS_VPANED*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_VPANED()) + +proc GTK_IS_VPANED_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_VPANED()) + +proc GTK_VPANED_GET_CLASS*(obj: pointer): PGtkVPanedClass = + result = cast[PGtkVPanedClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_VPANED())) + +proc GTK_TYPE_VRULER*(): GType = + result = gtk_vruler_get_type() + +proc GTK_VRULER*(obj: pointer): PGtkVRuler = + result = cast[PGtkVRuler](GTK_CHECK_CAST(obj, GTK_TYPE_VRULER())) + +proc GTK_VRULER_CLASS*(klass: pointer): PGtkVRulerClass = + result = cast[PGtkVRulerClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_VRULER())) + +proc GTK_IS_VRULER*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_VRULER()) + +proc GTK_IS_VRULER_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_VRULER()) + +proc GTK_VRULER_GET_CLASS*(obj: pointer): PGtkVRulerClass = + result = cast[PGtkVRulerClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_VRULER())) + +proc GTK_TYPE_VSCALE*(): GType = + result = gtk_vscale_get_type() + +proc GTK_VSCALE*(obj: pointer): PGtkVScale = + result = cast[PGtkVScale](GTK_CHECK_CAST(obj, GTK_TYPE_VSCALE())) + +proc GTK_VSCALE_CLASS*(klass: pointer): PGtkVScaleClass = + result = cast[PGtkVScaleClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_VSCALE())) + +proc GTK_IS_VSCALE*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_VSCALE()) + +proc GTK_IS_VSCALE_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_VSCALE()) + +proc GTK_VSCALE_GET_CLASS*(obj: pointer): PGtkVScaleClass = + result = cast[PGtkVScaleClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_VSCALE())) + +proc GTK_TYPE_VSCROLLBAR*(): GType = + result = gtk_vscrollbar_get_type() + +proc GTK_VSCROLLBAR*(obj: pointer): PGtkVScrollbar = + result = cast[PGtkVScrollbar](GTK_CHECK_CAST(obj, GTK_TYPE_VSCROLLBAR())) + +proc GTK_VSCROLLBAR_CLASS*(klass: pointer): PGtkVScrollbarClass = + result = cast[PGtkVScrollbarClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_VSCROLLBAR())) + +proc GTK_IS_VSCROLLBAR*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_VSCROLLBAR()) + +proc GTK_IS_VSCROLLBAR_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_VSCROLLBAR()) + +proc GTK_VSCROLLBAR_GET_CLASS*(obj: pointer): PGtkVScrollbarClass = + result = cast[PGtkVScrollbarClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_VSCROLLBAR())) + +proc GTK_TYPE_VSEPARATOR*(): GType = + result = gtk_vseparator_get_type() + +proc GTK_VSEPARATOR*(obj: pointer): PGtkVSeparator = + result = cast[PGtkVSeparator](GTK_CHECK_CAST(obj, GTK_TYPE_VSEPARATOR())) + +proc GTK_VSEPARATOR_CLASS*(klass: pointer): PGtkVSeparatorClass = + result = cast[PGtkVSeparatorClass](GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_VSEPARATOR())) + +proc GTK_IS_VSEPARATOR*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_TYPE_VSEPARATOR()) + +proc GTK_IS_VSEPARATOR_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_VSEPARATOR()) + +proc GTK_VSEPARATOR_GET_CLASS*(obj: pointer): PGtkVSeparatorClass = + result = cast[PGtkVSeparatorClass](GTK_CHECK_GET_CLASS(obj, GTK_TYPE_VSEPARATOR())) + + +# these were missing: +type + PGtkCellLayout* = pointer + PPGtkCellLayout* = ptr PGtkCellLayout + PGtkSignalRunType* = ptr TGtkSignalRunType + TGtkSignalRunType* = int32 + PGtkFileChooserAction* = ptr TGtkFileChooserAction + TGtkFileChooserAction* = enum + GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_FILE_CHOOSER_ACTION_SAVE, + GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, + GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER + PGtkFileChooserError* = ptr TGtkFileChooserError + TGtkFileChooserError* = enum + GTK_FILE_CHOOSER_ERROR_NONEXISTENT, + GTK_FILE_CHOOSER_ERROR_BAD_FILENAME + + +const + GTK_ARG_READWRITE* = GTK_ARG_READABLE or GTK_ARG_WRITABLE + +proc gtk_binding_entry_add_signal*(binding_set: PGtkBindingSet, keyval: guint, + modifiers: TGdkModifierType, + signal_name: cstring, n_args: guint){.varargs, + importc, cdecl, dynlib: gtklib.} +proc gtk_clist_new_with_titles*(columns: gint): PGtkCList{.varargs, cdecl, + importc, dynlib: gtklib.} +proc gtk_clist_prepend*(clist: PGtkCList): gint{.importc, varargs, cdecl, dynlib: gtklib.} +proc gtk_clist_append*(clist: PGtkCList): gint{.importc, varargs, cdecl, dynlib: gtklib.} +proc gtk_clist_insert*(clist: PGtkCList, row: gint): gint{.varargs, cdecl, + importc, dynlib: gtklib.} +proc gtk_cell_layout_set_attributes*(cell_layout: PGtkCellLayout, + cell: PGtkCellRenderer){.cdecl, varargs, + importc, dynlib: gtklib, importc: "gtk_cell_layout_set_attributes".} +proc gtk_container_add_with_properties*(container: PGtkContainer, + widget: PGtkWidget, + first_prop_name: cstring){.varargs, + importc, cdecl, dynlib: gtklib.} +proc gtk_container_child_set*(container: PGtkContainer, child: PGtkWidget, + first_prop_name: cstring){.varargs, cdecl, + importc, dynlib: gtklib.} +proc gtk_container_child_get*(container: PGtkContainer, child: PGtkWidget, + first_prop_name: cstring){.varargs, cdecl, + importc, dynlib: gtklib.} +proc gtk_container_child_set_valist*(container: PGtkContainer, + child: PGtkWidget, + first_property_name: cstring){.varargs, + importc, cdecl, dynlib: gtklib.} +proc gtk_container_child_get_valist*(container: PGtkContainer, + child: PGtkWidget, + first_property_name: cstring){.varargs, + importc, cdecl, dynlib: gtklib.} +proc gtk_ctree_new_with_titles*(columns: gint, tree_column: gint): PGtkCTree{. + importc, varargs, cdecl, dynlib: gtklib.} +proc gtk_curve_get_vector*(curve: PGtkCurve, veclen: int32){.varargs, cdecl, + importc, dynlib: gtklib.} +proc gtk_curve_set_vector*(curve: PGtkCurve, veclen: int32){.varargs, cdecl, + importc, dynlib: gtklib.} +proc gtk_dialog_add_buttons*(dialog: PGtkDialog, first_button_text: cstring){. + varargs, cdecl, importc, dynlib: gtklib.} +proc gtk_dialog_new_with_buttons*(title: cstring, parent: PGtkWindow, + flags: TGtkDialogFlags, + first_button_text: cstring): PGtkDialog{. + varargs, cdecl, importc, dynlib: gtklib.} +proc gtk_list_store_new*(n_columns: gint): PGtkListStore{.varargs, cdecl, + importc, dynlib: gtklib.} +proc gtk_list_store_set*(list_store: PGtkListStore, iter: PGtkTreeIter){. + varargs, cdecl, importc, dynlib: gtklib.} +proc gtk_list_store_set_valist*(list_store: PGtkListStore, iter: PGtkTreeIter){. + varargs, cdecl, importc, dynlib: gtklib.} +proc gtk_message_dialog_new*(parent: PGtkWindow, flags: TGtkDialogFlags, + thetype: TGtkMessageType, buttons: TGtkButtonsType, + message_format: cstring): PGtkMessageDialog{.varargs, + cdecl, importc, dynlib: gtklib.} +proc gtk_signal_new*(name: cstring, signal_flags: TGtkSignalRunType, + object_type: TGtkType, function_offset: guint, + marshaller: TGtkSignalMarshaller, return_val: TGtkType, + n_args: guint): guint{. + varargs, importc, cdecl, dynlib: gtklib.} +proc gtk_signal_emit*(anObject: PGtkObject, signal_id: guint){.varargs, cdecl, + importc, dynlib: gtklib.} +proc gtk_signal_emit_by_name*(anObject: PGtkObject, name: cstring){.varargs, + cdecl, importc, dynlib: gtklib.} +proc gtk_text_buffer_insert_with_tags*(buffer: PGtkTextBuffer, + iter: PGtkTextIter, text: cstring, + length: gint, first_tag: PGtkTextTag){. + varargs, importc, cdecl, dynlib: gtklib.} +proc gtk_text_buffer_insert_with_tags_by_name*(buffer: PGtkTextBuffer, + iter: PGtkTextIter, text: cstring, length: gint, first_tag_name: cstring){. + varargs, importc, cdecl, dynlib: gtklib.} +proc gtk_text_buffer_create_tag*(buffer: PGtkTextBuffer, tag_name: cstring, + first_property_name: cstring): PGtkTextTag{. + varargs, importc, cdecl, dynlib: gtklib.} +proc gtk_tree_model_get*(tree_model: PGtkTreeModel, iter: PGtkTreeIter){. + varargs, importc, cdecl, dynlib: gtklib.} +proc gtk_tree_model_get_valist*(tree_model: PGtkTreeModel, iter: PGtkTreeIter){. + varargs, importc, cdecl, dynlib: gtklib.} +proc gtk_tree_store_new*(n_columns: gint): PGtkTreeStore{.varargs, cdecl, + importc, dynlib: gtklib.} +proc gtk_tree_store_set*(tree_store: PGtkTreeStore, iter: PGtkTreeIter){. + varargs, cdecl, importc, dynlib: gtklib.} +proc gtk_tree_store_set_valist*(tree_store: PGtkTreeStore, iter: PGtkTreeIter){. + varargs, cdecl, importc, dynlib: gtklib.} +proc gtk_tree_store_iter_is_valid*(tree_store: PGtkTreeStore, iter: PGtkTreeIter): gboolean{. + cdecl, importc, dynlib: gtklib.} +proc gtk_tree_store_reorder*(tree_store: PGtkTreeStore, parent: PGtkTreeIter, + new_order: pgint){.cdecl, importc, dynlib: gtklib.} +proc gtk_tree_store_swap*(tree_store: PGtkTreeStore, a: PGtkTreeIter, + b: PGtkTreeIter){.cdecl, importc, dynlib: gtklib.} +proc gtk_tree_store_move_before*(tree_store: PGtkTreeStore, iter: PGtkTreeIter, + position: PGtkTreeIter){.cdecl,importc, dynlib: gtklib.} +proc gtk_tree_store_move_after*(tree_store: PGtkTreeStore, iter: PGtkTreeIter, + position: PGtkTreeIter){.cdecl,importc, dynlib: gtklib.} +proc gtk_tree_view_insert_column_with_attributes*(tree_view: PGtkTreeView, + position: gint, title: cstring, cell: PGtkCellRenderer): gint{.varargs, + importc, cdecl, dynlib: gtklib.} +proc gtk_tree_view_column_new_with_attributes*(title: cstring, + cell: PGtkCellRenderer): PGtkTreeViewColumn{.importc, varargs, cdecl, dynlib: gtklib.} +proc gtk_tree_view_column_set_attributes*(tree_column: PGtkTreeViewColumn, + cell_renderer: PGtkCellRenderer){.importc, varargs, cdecl, dynlib: gtklib.} +proc gtk_widget_new*(thetype: TGtkType, first_property_name: cstring): PGtkWidget{. + importc, varargs, cdecl, dynlib: gtklib.} +proc gtk_widget_set*(widget: PGtkWidget, first_property_name: cstring){.varargs, + importc, cdecl, dynlib: gtklib.} +proc gtk_widget_queue_clear*(widget: PGtkWidget){.importc, cdecl, dynlib: gtklib.} +proc gtk_widget_queue_clear_area*(widget: PGtkWidget, x: gint, y: gint, + width: gint, height: gint){.cdecl, + importc, dynlib: gtklib.} +proc gtk_widget_draw*(widget: PGtkWidget, area: PGdkRectangle){.cdecl, + importc, dynlib: gtklib.} +proc gtk_widget_style_get_valist*(widget: PGtkWidget, + first_property_name: cstring){.varargs, cdecl, + importc, dynlib: gtklib.} +proc gtk_widget_style_get*(widget: PGtkWidget, first_property_name: cstring){. + varargs, cdecl, importc, dynlib: gtklib.} +proc gtk_file_chooser_dialog_new*(title: cstring, parent: PGtkWindow, + action: TGtkFileChooserAction, + first_button_text: cstring): PGtkDialog {.cdecl, + varargs, dynlib: gtklib, importc: "gtk_file_chooser_dialog_new".} +proc gtk_file_chooser_dialog_new_with_backend*(title: cstring, + parent: PGtkWindow, action: TGtkFileChooserAction, backend: cstring, + first_button_text: cstring): PGtkDialog {.varargs, cdecl, dynlib: gtklib, + importc: "gtk_file_chooser_dialog_new_with_backend".} +proc gtk_object_ref*(anObject: PGtkObject): PGtkObject{.cdecl,importc, dynlib: gtklib.} +proc gtk_object_unref*(anObject: PGtkObject){.cdecl, importc, dynlib: gtklib.} +proc gtk_object_weakref*(anObject: PGtkObject, notify: TGtkDestroyNotify, + data: gpointer){.cdecl, importc, dynlib: gtklib.} +proc gtk_object_weakunref*(anObject: PGtkObject, notify: TGtkDestroyNotify, + data: gpointer){.cdecl, importc, dynlib: gtklib.} +proc gtk_object_set_data*(anObject: PGtkObject, key: cstring, data: gpointer){. + cdecl, importc, dynlib: gtklib.} +proc gtk_object_set_data_full*(anObject: PGtkObject, key: cstring, + data: gpointer, destroy: TGtkDestroyNotify){. + importc, cdecl, dynlib: gtklib.} +proc gtk_object_remove_data*(anObject: PGtkObject, key: cstring){.cdecl, + importc, dynlib: gtklib.} +proc gtk_object_get_data*(anObject: PGtkObject, key: cstring): gpointer{.cdecl, + importc, dynlib: gtklib.} +proc gtk_object_remove_no_notify*(anObject: PGtkObject, key: cstring){.cdecl, + importc, dynlib: gtklib.} +proc gtk_object_set_user_data*(anObject: PGtkObject, data: gpointer){.cdecl, + importc, dynlib: gtklib.} +proc gtk_object_get_user_data*(anObject: PGtkObject): gpointer{.cdecl, + importc, dynlib: gtklib.} +proc gtk_object_set_data_by_id*(anObject: PGtkObject, data_id: TGQuark, + data: gpointer){.cdecl, importc, dynlib: gtklib.} +proc gtk_object_set_data_by_id_full*(anObject: PGtkObject, data_id: TGQuark, + data: gpointer, destroy: TGtkDestroyNotify){. + cdecl, importc, dynlib: gtklib.} +proc gtk_object_get_data_by_id*(anObject: PGtkObject, data_id: TGQuark): gpointer{. + cdecl, importc, dynlib: gtklib.} +proc gtk_object_remove_data_by_id*(anObject: PGtkObject, data_id: TGQuark){. + cdecl, importc, dynlib: gtklib.} +proc gtk_object_remove_no_notify_by_id*(anObject: PGtkObject, key_id: TGQuark){. + cdecl, importc, dynlib: gtklib.} +proc gtk_object_data_try_key*(str: cstring): TGQuark{.cdecl, importc, dynlib: gtklib.} +proc gtk_object_data_force_id*(str: cstring): TGQuark{.cdecl, importc, dynlib: gtklib.} +proc gtk_object_get*(anObject: PGtkObject, first_property_name: cstring){.cdecl, + importc, varargs, dynlib: gtklib.} +proc gtk_object_set*(anObject: PGtkObject, first_property_name: cstring){.cdecl, + importc, varargs, dynlib: gtklib.} +proc gtk_object_add_arg_type*(arg_name: cstring, arg_type: TGtkType, + arg_flags: guint, arg_id: guint){.cdecl, + importc, dynlib: gtklib.} + + +type + PGtkFileChooser* = pointer + PPGtkFileChooser* = ptr PGtkFileChooser + +type + PGtkFileFilter* = pointer + PPGtkFileFilter* = ref PGtkFileFilter + PGtkFileFilterFlags* = ref TGtkFileFilterFlags + TGtkFileFilterFlags* = enum + GTK_FILE_FILTER_FILENAME = 1 shl 0, GTK_FILE_FILTER_URI = 1 shl 1, + GTK_FILE_FILTER_DISPLAY_NAME = 1 shl 2, GTK_FILE_FILTER_MIME_TYPE = 1 shl 3 + PGtkFileFilterInfo* = ref TGtkFileFilterInfo + TGtkFileFilterInfo* {.final, pure.} = object + contains*: TGtkFileFilterFlags + filename*: cstring + uri*: cstring + display_name*: cstring + mime_type*: cstring + + TGtkFileFilterFunc* = proc (filter_info: PGtkFileFilterInfo, data: gpointer): gboolean{. + cdecl.} + +proc GTK_TYPE_FILE_FILTER*(): GType +proc GTK_FILE_FILTER*(obj: pointer): PGtkFileFilter +proc GTK_IS_FILE_FILTER*(obj: pointer): gboolean +proc gtk_file_filter_get_type*(): GType{.cdecl, dynlib: gtklib, + importc: "gtk_file_filter_get_type".} +proc gtk_file_filter_new*(): PGtkFileFilter{.cdecl, dynlib: gtklib, + importc: "gtk_file_filter_new".} +proc gtk_file_filter_set_name*(filter: PGtkFileFilter, name: cstring){.cdecl, + dynlib: gtklib, importc: "gtk_file_filter_set_name".} +proc gtk_file_filter_get_name*(filter: PGtkFileFilter): cstring{.cdecl, + dynlib: gtklib, importc: "gtk_file_filter_get_name".} +proc gtk_file_filter_add_mime_type*(filter: PGtkFileFilter, mime_type: cstring){. + cdecl, dynlib: gtklib, importc: "gtk_file_filter_add_mime_type".} +proc gtk_file_filter_add_pattern*(filter: PGtkFileFilter, pattern: cstring){. + cdecl, dynlib: gtklib, importc: "gtk_file_filter_add_pattern".} +proc gtk_file_filter_add_custom*(filter: PGtkFileFilter, + needed: TGtkFileFilterFlags, + func: TGtkFileFilterFunc, data: gpointer, + notify: TGDestroyNotify){.cdecl, + dynlib: gtklib, importc: "gtk_file_filter_add_custom".} +proc gtk_file_filter_get_needed*(filter: PGtkFileFilter): TGtkFileFilterFlags{. + cdecl, dynlib: gtklib, importc: "gtk_file_filter_get_needed".} +proc gtk_file_filter_filter*(filter: PGtkFileFilter, + filter_info: PGtkFileFilterInfo): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_file_filter_filter".} + +proc GTK_TYPE_FILE_FILTER(): GType = + result = gtk_file_filter_get_type() + +proc GTK_FILE_FILTER(obj: pointer): PGtkFileFilter = + result = cast[PGtkFileFilter](G_TYPE_CHECK_INSTANCE_CAST(obj, + GTK_TYPE_FILE_FILTER())) + +proc GTK_IS_FILE_FILTER(obj: pointer): gboolean = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, GTK_TYPE_FILE_FILTER()) + + +proc gtk_file_chooser_get_type*():GType {. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_get_type".} + +proc gtk_file_chooser_error_quark*(): TGQuark {. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_error_quark".} + +proc GTK_TYPE_FILE_CHOOSER*(): GType = + result = gtk_file_chooser_get_type() + +proc GTK_FILE_CHOOSER*(obj: pointer): PGtkFileChooser = + result = cast[PGtkFileChooser](G_TYPE_CHECK_INSTANCE_CAST(obj, + GTK_TYPE_FILE_CHOOSER())) + +proc GTK_IS_FILE_CHOOSER*(obj: pointer): gboolean = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, GTK_TYPE_FILE_CHOOSER()) + +proc gtk_file_chooser_set_action*(chooser: PGtkFileChooser, + action: TGtkFileChooserAction){.cdecl, + dynlib: gtklib, importc: "gtk_file_chooser_set_action".} +proc gtk_file_chooser_get_action*(chooser: PGtkFileChooser): TGtkFileChooserAction{. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_get_action".} +proc gtk_file_chooser_set_local_only*(chooser: PGtkFileChooser, + local_only: gboolean){.cdecl, + dynlib: gtklib, importc: "gtk_file_chooser_set_local_only".} +proc gtk_file_chooser_get_local_only*(chooser: PGtkFileChooser): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_get_local_only".} +proc gtk_file_chooser_set_select_multiple*(chooser: PGtkFileChooser, + select_multiple: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_file_chooser_set_select_multiple".} +proc gtk_file_chooser_get_select_multiple*(chooser: PGtkFileChooser): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_get_select_multiple".} +proc gtk_file_chooser_set_current_name*(chooser: PGtkFileChooser, name: cstring){. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_set_current_name".} +proc gtk_file_chooser_get_filename*(chooser: PGtkFileChooser): cstring{.cdecl, + dynlib: gtklib, importc: "gtk_file_chooser_get_filename".} +proc gtk_file_chooser_set_filename*(chooser: PGtkFileChooser, filename: cstring): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_set_filename".} +proc gtk_file_chooser_select_filename*(chooser: PGtkFileChooser, + filename: cstring): gboolean{.cdecl, + dynlib: gtklib, importc: "gtk_file_chooser_select_filename".} +proc gtk_file_chooser_unselect_filename*(chooser: PGtkFileChooser, + filename: cstring){.cdecl, dynlib: gtklib, + importc: "gtk_file_chooser_unselect_filename".} +proc gtk_file_chooser_select_all*(chooser: PGtkFileChooser){.cdecl, + dynlib: gtklib, importc: "gtk_file_chooser_select_all".} +proc gtk_file_chooser_unselect_all*(chooser: PGtkFileChooser){.cdecl, + dynlib: gtklib, importc: "gtk_file_chooser_unselect_all".} +proc gtk_file_chooser_get_filenames*(chooser: PGtkFileChooser): PGSList{.cdecl, + dynlib: gtklib, importc: "gtk_file_chooser_get_filenames".} +proc gtk_file_chooser_set_current_folder*(chooser: PGtkFileChooser, + filename: cstring): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_file_chooser_set_current_folder".} +proc gtk_file_chooser_get_current_folder*(chooser: PGtkFileChooser): cstring{. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_get_current_folder".} +proc gtk_file_chooser_get_uri*(chooser: PGtkFileChooser): cstring{.cdecl, + dynlib: gtklib, importc: "gtk_file_chooser_get_uri".} +proc gtk_file_chooser_set_uri*(chooser: PGtkFileChooser, uri: cstring): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_set_uri".} +proc gtk_file_chooser_select_uri*(chooser: PGtkFileChooser, uri: cstring): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_select_uri".} +proc gtk_file_chooser_unselect_uri*(chooser: PGtkFileChooser, uri: cstring){. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_unselect_uri".} +proc gtk_file_chooser_get_uris*(chooser: PGtkFileChooser): PGSList{.cdecl, + dynlib: gtklib, importc: "gtk_file_chooser_get_uris".} +proc gtk_file_chooser_set_current_folder_uri*(chooser: PGtkFileChooser, + uri: cstring): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_file_chooser_set_current_folder_uri".} +proc gtk_file_chooser_get_current_folder_uri*(chooser: PGtkFileChooser): cstring{. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_get_current_folder_uri".} +proc gtk_file_chooser_set_preview_widget*(chooser: PGtkFileChooser, + preview_widget: PGtkWidget){.cdecl, dynlib: gtklib, + importc: "gtk_file_chooser_set_preview_widget".} +proc gtk_file_chooser_get_preview_widget*(chooser: PGtkFileChooser): PGtkWidget{. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_get_preview_widget".} +proc gtk_file_chooser_set_preview_widget_active*(chooser: PGtkFileChooser, + active: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_file_chooser_set_preview_widget_active".} +proc gtk_file_chooser_get_preview_widget_active*(chooser: PGtkFileChooser): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_get_preview_widget_active".} +proc gtk_file_chooser_set_use_preview_label*(chooser: PGtkFileChooser, + use_label: gboolean){.cdecl, dynlib: gtklib, + importc: "gtk_file_chooser_set_use_preview_label".} +proc gtk_file_chooser_get_use_preview_label*(chooser: PGtkFileChooser): gboolean{. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_get_use_preview_label".} +proc gtk_file_chooser_get_preview_filename*(chooser: PGtkFileChooser): cstring{. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_get_preview_filename".} +proc gtk_file_chooser_get_preview_uri*(chooser: PGtkFileChooser): cstring{. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_get_preview_uri".} +proc gtk_file_chooser_set_extra_widget*(chooser: PGtkFileChooser, + extra_widget: PGtkWidget){.cdecl, + dynlib: gtklib, importc: "gtk_file_chooser_set_extra_widget".} +proc gtk_file_chooser_get_extra_widget*(chooser: PGtkFileChooser): PGtkWidget{. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_get_extra_widget".} +proc gtk_file_chooser_add_filter*(chooser: PGtkFileChooser, + filter: PGtkFileFilter){.cdecl, + dynlib: gtklib, importc: "gtk_file_chooser_add_filter".} +proc gtk_file_chooser_remove_filter*(chooser: PGtkFileChooser, + filter: PGtkFileFilter){.cdecl, + dynlib: gtklib, importc: "gtk_file_chooser_remove_filter".} +proc gtk_file_chooser_list_filters*(chooser: PGtkFileChooser): PGSList{.cdecl, + dynlib: gtklib, importc: "gtk_file_chooser_list_filters".} +proc gtk_file_chooser_set_filter*(chooser: PGtkFileChooser, + filter: PGtkFileFilter){.cdecl, + dynlib: gtklib, importc: "gtk_file_chooser_set_filter".} +proc gtk_file_chooser_get_filter*(chooser: PGtkFileChooser): PGtkFileFilter{. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_get_filter".} +proc gtk_file_chooser_add_shortcut_folder*(chooser: PGtkFileChooser, + folder: cstring, error: pointer): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_file_chooser_add_shortcut_folder".} +proc gtk_file_chooser_remove_shortcut_folder*(chooser: PGtkFileChooser, + folder: cstring, error: pointer): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_file_chooser_remove_shortcut_folder".} +proc gtk_file_chooser_list_shortcut_folders*(chooser: PGtkFileChooser): PGSList{. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_list_shortcut_folders".} +proc gtk_file_chooser_add_shortcut_folder_uri*(chooser: PGtkFileChooser, + uri: cstring, error: pointer): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_file_chooser_add_shortcut_folder_uri".} +proc gtk_file_chooser_remove_shortcut_folder_uri*(chooser: PGtkFileChooser, + uri: cstring, error: pointer): gboolean{.cdecl, dynlib: gtklib, + importc: "gtk_file_chooser_remove_shortcut_folder_uri".} +proc gtk_file_chooser_list_shortcut_folder_uris*(chooser: PGtkFileChooser): PGSList{. + cdecl, dynlib: gtklib, importc: "gtk_file_chooser_list_shortcut_folder_uris".} + +proc gtk_file_chooser_set_do_overwrite_confirmation*(chooser: PGtkFileChooser, + do_overwrite_confirmation: gboolean) {.cdecl, dynlib: gtklib, + importc: "gtk_file_chooser_set_do_overwrite_confirmation".} + +proc gtk_nimrod_init*() = + var + cmdLine {.importc: "cmdLine".}: array [0..255, cstring] + cmdCount {.importc: "cmdCount".}: cint + gtk_init(addr(cmdLine), addr(cmdCount)) diff --git a/lib/oldwrappers/gtk/gtkglext.nim b/lib/oldwrappers/gtk/gtkglext.nim new file mode 100644 index 000000000..38da5d25e --- /dev/null +++ b/lib/oldwrappers/gtk/gtkglext.nim @@ -0,0 +1,50 @@ +{.deadCodeElim: on.} + +import + Glib2, Gdk2, Gtk2, GdkGLExt + +const + GtkGLExtLib* = if defined(WIN32): "libgtkglext-win32-1.0-0.dll" else: "libgtkglext-x11-1.0.so" + +const + HEADER_GTKGLEXT_MAJOR_VERSION* = 1 + HEADER_GTKGLEXT_MINOR_VERSION* = 0 + HEADER_GTKGLEXT_MICRO_VERSION* = 6 + HEADER_GTKGLEXT_INTERFACE_AGE* = 4 + HEADER_GTKGLEXT_BINARY_AGE* = 6 + +proc gtk_gl_parse_args*(argc: Plongint, argv: PPPChar): gboolean{.cdecl, + dynlib: GtkGLExtLib, importc: "gtk_gl_parse_args".} +proc gtk_gl_init_check*(argc: Plongint, argv: PPPChar): gboolean{.cdecl, + dynlib: GtkGLExtLib, importc: "gtk_gl_init_check".} +proc gtk_gl_init*(argc: Plongint, argv: PPPChar){.cdecl, dynlib: GtkGLExtLib, + importc: "gtk_gl_init".} +proc gtk_widget_set_gl_capability*(widget: PGtkWidget, glconfig: PGdkGLConfig, + share_list: PGdkGLContext, direct: gboolean, + render_type: int): gboolean{.cdecl, + dynlib: GtkGLExtLib, importc: "gtk_widget_set_gl_capability".} +proc gtk_widget_is_gl_capable*(widget: PGtkWidget): gboolean{.cdecl, + dynlib: GtkGLExtLib, importc: "gtk_widget_is_gl_capable".} +proc gtk_widget_get_gl_config*(widget: PGtkWidget): PGdkGLConfig{.cdecl, + dynlib: GtkGLExtLib, importc: "gtk_widget_get_gl_config".} +proc gtk_widget_create_gl_context*(widget: PGtkWidget, + share_list: PGdkGLContext, direct: gboolean, + render_type: int): PGdkGLContext{.cdecl, + dynlib: GtkGLExtLib, importc: "gtk_widget_create_gl_context".} +proc gtk_widget_get_gl_context*(widget: PGtkWidget): PGdkGLContext{.cdecl, + dynlib: GtkGLExtLib, importc: "gtk_widget_get_gl_context".} +proc gtk_widget_get_gl_window*(widget: PGtkWidget): PGdkGLWindow{.cdecl, + dynlib: GtkGLExtLib, importc: "gtk_widget_get_gl_window".} +proc gtk_widget_get_gl_drawable*(widget: PGtkWidget): PGdkGLDrawable = + nil + +proc HEADER_GTKGLEXT_CHECK_VERSION*(major, minor, micro: guint): bool = + result = (HEADER_GTKGLEXT_MAJOR_VERSION > major) or + ((HEADER_GTKGLEXT_MAJOR_VERSION == major) and + (HEADER_GTKGLEXT_MINOR_VERSION > minor)) or + ((HEADER_GTKGLEXT_MAJOR_VERSION == major) and + (HEADER_GTKGLEXT_MINOR_VERSION == minor) and + (HEADER_GTKGLEXT_MICRO_VERSION >= micro)) + +proc gtk_widget_get_gl_drawable*(widget: PGtkWidget): PGdkGLDrawable = + result = GDK_GL_DRAWABLE(gtk_widget_get_gl_window(widget)) diff --git a/lib/oldwrappers/gtk/gtkhtml.nim b/lib/oldwrappers/gtk/gtkhtml.nim new file mode 100644 index 000000000..c9ccc3595 --- /dev/null +++ b/lib/oldwrappers/gtk/gtkhtml.nim @@ -0,0 +1,499 @@ +{.deadCodeElim: on.} + +import + gtk2, glib2, atk, pango, gdk2pixbuf, gdk2 + +when defined(windows): + {.define: GTK_WINDOWING_WIN32.} + const + gtkhtmllib = "libgtkhtml-win32-2.0-0.dll" +else: + const + gtkhtmllib = "libgtkhtml-2.so" +const + DOM_UNSPECIFIED_EVENT_TYPE_ERR* = 0 + DOM_INDEX_SIZE_ERR* = 1 + DOM_DOMSTRING_SIZE_ERR* = 2 + DOM_HIERARCHY_REQUEST_ERR* = 3 + DOM_WRONG_DOCUMENT_ERR* = 4 + DOM_INVALID_CHARACTER_ERR* = 5 + DOM_NO_DATA_ALLOWED_ERR* = 6 + DOM_NO_MODIFICATION_ALLOWED_ERR* = 7 + DOM_NOT_FOUND_ERR* = 8 + DOM_NOT_SUPPORTED_ERR* = 9 + DOM_INUSE_ATTRIBUTE_ERR* = 10 + DOM_INVALID_STATE_ERR* = 11 + DOM_SYNTAX_ERR* = 12 + DOM_INVALID_MODIFICATION_ERR* = 13 + DOM_NAMESPACE_ERR* = 14 + DOM_INVALID_ACCESS_ERR* = 15 + DOM_NO_EXCEPTION* = 255 + DOM_ELEMENT_NODE* = 1 + DOM_ATTRIBUTE_NODE* = 2 + DOM_TEXT_NODE* = 3 + DOM_CDATA_SECTION_NODE* = 4 + DOM_ENTITY_REFERENCE_NODE* = 5 + DOM_ENTITY_NODE* = 6 + DOM_PROCESSING_INSTRUCTION_NODE* = 7 + DOM_COMMENT_NODE* = 8 + DOM_DOCUMENT_NODE* = 9 + DOM_DOCUMENT_TYPE_NODE* = 10 + DOM_DOCUMENT_FRAGMENT_NODE* = 11 + DOM_NOTATION_NODE* = 12 + bm_HtmlFontSpecification_weight = 0x0000000F + bp_HtmlFontSpecification_weight = 0 + bm_HtmlFontSpecification_style = 0x00000030 + bp_HtmlFontSpecification_style = 4 + bm_HtmlFontSpecification_variant = 0x000000C0 + bp_HtmlFontSpecification_variant = 6 + bm_HtmlFontSpecification_stretch = 0x00000F00 + bp_HtmlFontSpecification_stretch = 8 + bm_HtmlFontSpecification_decoration = 0x00007000 + bp_HtmlFontSpecification_decoration = 12 + +type + TDomString* = gchar + TDomBoolean* = gboolean + TDomException* = gushort + TDomTimeStamp* = guint64 + PDomNode* = ptr TDomNode + TDomNode* = object of TGObject + xmlnode*: pointer + style*: pointer + + PDomNodeClass* = ptr TDomNodeClass + TDomNodeClass* = object of TGObjectClass + `get_nodeName`*: proc (node: PDomNode): PDomString{.cdecl.} + `get_nodeValue`*: proc (node: PDomNode, exc: PDomException): PDomString {. + cdecl.} + `set_nodeValue`*: proc (node: PDomNode, value: PDomString, + exc: PDomException): PDomString{.cdecl.} + + PDomDocument* = ptr TDomDocument + TDomDocument* {.final, pure.} = object + parent*: PDomNode + iterators*: PGSList + + PDomDocumentClass* = ptr TDomDocumentClass + TDomDocumentClass* {.final, pure.} = object + parent_class*: PDomNodeClass + + PHtmlFocusIterator* = ptr THtmlFocusIterator + THtmlFocusIterator* = object of TGObject + document*: PDomDocument + current_node*: PDomNode + + PHtmlFocusIteratorClass* = ptr THtmlFocusIteratorClass + THtmlFocusIteratorClass* = object of TGObjectClass + + THtmlParserType* = enum + HTML_PARSER_TYPE_HTML, HTML_PARSER_TYPE_XML + PHtmlParser* = ptr THtmlParser + THtmlParser* = object of TGObject + parser_type*: THtmlParserType + document*: PHtmlDocument + stream*: PHtmlStream + xmlctxt*: xmlParserCtxtPtr + res*: int32 + chars*: array[0..9, char] + blocking*: gboolean + blocking_node*: PDomNode + + PHtmlParserClass* = ptr THtmlParserClass + THtmlParserClass* = object of TGtkObjectClass + done_parsing*: proc (parser: PHtmlParser){.cdecl.} + new_node*: proc (parser: PHtmlParser, node: PDomNode) + parsed_document_node*: proc (parser: PHtmlParser, document: PDomDocument) + + PHtmlStream* = ptr THtmlStream + THtmlStreamCloseFunc* = proc (stream: PHtmlStream, user_data: gpointer){.cdecl.} + THtmlStreamWriteFunc* = proc (stream: PHtmlStream, buffer: Pgchar, + size: guint, user_data: gpointer){.cdecl.} + THtmlStreamCancelFunc* = proc (stream: PHtmlStream, user_data: gpointer, + cancel_data: gpointer){.cdecl.} + THtmlStream* = object of TGObject + write_func*: THtmlStreamWriteFunc + close_func*: THtmlStreamCloseFunc + cancel_func*: THtmlStreamCancelFunc + user_data*: gpointer + cancel_data*: gpointer + written*: gint + mime_type*: cstring + + PHtmlStreamClass* = ptr THtmlStreamClass + THtmlStreamClass* = object of TGObjectClass + + THtmlStreamBufferCloseFunc* = proc (str: Pgchar, len: gint, + user_data: gpointer){.cdecl.} + PGtkHtmlContext* = ptr TGtkHtmlContext + TGtkHtmlContext* = object of TGObject + documents*: PGSList + standard_font*: PHtmlFontSpecification + fixed_font*: PHtmlFontSpecification + debug_painting*: gboolean + + PGtkHtmlContextClass* = ptr TGtkHtmlContextClass + TGtkHtmlContextClass* = object of TGObjectClass + + THtmlDocumentState* = enum + HTML_DOCUMENT_STATE_DONE, HTML_DOCUMENT_STATE_PARSING + PHtmlDocument* = ptr THtmlDocument + THtmlDocument* = object of TGObject + stylesheets*: PGSList + current_stream*: PHtmlStream + state*: THtmlDocumentState + + PHtmlDocumentClass* = ptr THtmlDocumentClass + THtmlDocumentClass* = object of TGObjectClass + request_url*: proc (document: PHtmlDocument, url: Pgchar, + stream: PHtmlStream){.cdecl.} + link_clicked*: proc (document: PHtmlDocument, url: Pgchar){.cdecl.} + set_base*: proc (document: PHtmlDocument, url: Pgchar){.cdecl.} + title_changed*: proc (document: PHtmlDocument, new_title: Pgchar){.cdecl.} + submit*: proc (document: PHtmlDocument, `method`: Pgchar, url: Pgchar, + encoding: Pgchar){.cdecl.} + + PHtmlView* = ptr THtmlView + THtmlView* = object of TGtkLayout + document*: PHtmlDocument + node_table*: PGHashTable + relayout_idle_id*: guint + relayout_timeout_id*: guint + mouse_down_x*: gint + mouse_down_y*: gint + mouse_detail*: gint + sel_start_ypos*: gint + sel_start_index*: gint + sel_end_ypos*: gint + sel_end_index*: gint + sel_flag*: gboolean + sel_backwards*: gboolean + sel_start_found*: gboolean + sel_list*: PGSList + jump_to_anchor*: pgchar + magnification*: gdouble + magnification_modified*: gboolean + on_url*: gboolean + + PHtmlViewClass* = ptr THtmlViewClass + THtmlViewClass* = object of TGtkLayoutClass + move_cursor*: proc (html_view: PHtmlView, step: TGtkMovementStep, + count: gint, extend_selection: gboolean){.cdecl.} + on_url*: proc (html_view: PHtmlView, url: Pgchar) + activate*: proc (html_view: PHtmlView) + move_focus_out*: proc (html_view: PHtmlView, direction: TGtkDirectionType) + + +proc DOM_TYPE_NODE*(): GType +proc DOM_NODE*(theobject: pointer): PDomNode +proc DOM_NODE_CLASS*(klass: pointer): PDomNodeClass +proc DOM_IS_NODE*(theobject: pointer): bool +proc DOM_IS_NODE_CLASS*(klass: pointer): bool +proc DOM_NODE_GET_CLASS*(obj: pointer): int32 +proc dom_node_get_type*(): GType{.cdecl, dynlib: gtkhtmllib, + importc: "dom_node_get_type".} +proc dom_Node_mkref*(node: pointer): PDomNode{.cdecl, dynlib: gtkhtmllib, + importc: "dom_Node_mkref".} +proc dom_Node_get_childNodes*(node: PDomNode): PDomNodeList{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node__get_childNodes".} +proc dom_Node_removeChild*(node: PDomNode, oldChild: PDomNode, + exc: PDomException): PDomNode{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node_removeChild".} +proc dom_Node_get_nodeValue*(node: PDomNode, exc: PDomException): PDomString{. + cdecl, dynlib: gtkhtmllib, importc: "dom_Node__get_nodeValue".} +proc dom_Node_get_firstChild*(node: PDomNode): PDomNode{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node__get_firstChild".} +proc dom_Node_get_nodeName*(node: PDomNode): PDomString{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node__get_nodeName".} +proc dom_Node_get_attributes*(node: PDomNode): PDomNamedNodeMap{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node__get_attributes".} +proc dom_Document_get_doctype*(doc: PDomDocument): PDomDocumentType{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Document__get_doctype".} +proc dom_Node_hasChildNodes*(node: PDomNode): DomBoolean{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node_hasChildNodes".} +proc dom_Node_get_parentNode*(node: PDomNode): PDomNode{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node__get_parentNode".} +proc dom_Node_get_nextSibling*(node: PDomNode): PDomNode{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node__get_nextSibling".} +proc dom_Node_get_nodeType*(node: PDomNode): gushort{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node__get_nodeType".} +proc dom_Node_hasAttributes*(node: PDomNode): DomBoolean{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node_hasAttributes".} +proc dom_Node_cloneNode*(node: PDomNode, deep: DomBoolean): PDomNode{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node_cloneNode".} +proc dom_Node_appendChild*(node: PDomNode, newChild: PDomNode, + exc: PDomException): PDomNode{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node_appendChild".} +proc dom_Node_get_localName*(node: PDomNode): PDomString{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node__get_localName".} +proc dom_Node_get_namespaceURI*(node: PDomNode): PDomString{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node__get_namespaceURI".} +proc dom_Node_get_previousSibling*(node: PDomNode): PDomNode{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node__get_previousSibling".} +proc dom_Node_get_lastChild*(node: PDomNode): PDomNode{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node__get_lastChild".} +proc dom_Node_set_nodeValue*(node: PDomNode, value: PDomString, + exc: PDomException){.cdecl, dynlib: gtkhtmllib, + importc: "dom_Node__set_nodeValue".} +proc dom_Node_get_ownerDocument*(node: PDomNode): PDomDocument{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node__get_ownerDocument".} +proc dom_Node_hasAttributes*(node: PDomNode): gboolean{.cdecl, + dynlib: gtkhtmllib, importc: "dom_Node_hasAttributes".} +proc DOM_TYPE_DOCUMENT*(): GType +proc DOM_DOCUMENT*(theobject: pointer): PDomDocument +proc DOM_DOCUMENT_CLASS*(klass: pointer): PDomDocumentClass +proc DOM_IS_DOCUMENT*(theobject: pointer): bool +proc DOM_IS_DOCUMENT_CLASS*(klass: pointer): bool +proc DOM_DOCUMENT_GET_CLASS*(obj: pointer): PDomDocumentClass +proc dom_document_get_type*(): GType +proc dom_Document_get_documentElement*(doc: PDomDocument): PDomElement +proc dom_Document_createElement*(doc: PDomDocument, tagName: PDomString): PDomElement +proc dom_Document_createTextNode*(doc: PDomDocument, data: PDomString): PDomText +proc dom_Document_createComment*(doc: PDomDocument, data: PDomString): PDomComment +proc dom_Document_importNode*(doc: PDomDocument, importedNode: PDomNode, + deep: DomBoolean, exc: PDomException): PDomNode +proc HTML_TYPE_FOCUS_ITERATOR*(): GType +proc HTML_FOCUS_ITERATOR*(theobject: pointer): PHtmlFocusIterator +proc HTML_FOCUS_ITERATOR_CLASS*(klass: pointer): PHtmlFocusIteratorClass +proc HTML_IS_FOCUS_ITERATOR*(theobject: pointer): bool +proc HTML_IS_FOCUS_ITERATOR_CLASS*(klass: pointer): bool +proc HTML_FOCUS_ITERATOR_GET_CLASS*(obj: pointer): PHtmlFocusIteratorClass +proc html_focus_iterator_next_element*(document: PDomDocument, + element: PDomElement): PDomElement{. + cdecl, dynlib: gtkhtmllib, importc: "html_focus_iterator_next_element".} +proc html_focus_iterator_prev_element*(document: PDomDocument, + element: PDomElement): PDomElement{. + cdecl, dynlib: gtkhtmllib, importc: "html_focus_iterator_prev_element".} +proc HTML_PARSER_TYPE*(): GType +proc HTML_PARSER*(obj: pointer): PHtmlParser +proc HTML_PARSER_CLASS*(klass: pointer): PHtmlParserClass +proc HTML_IS_PARSER*(obj: pointer): bool +proc html_parser_get_type*(): GType +proc html_parser_new*(document: PHtmlDocument, parser_type: THtmlParserType): PHtmlParser +proc HTML_TYPE_STREAM*(): GType +proc HTML_STREAM*(obj: pointer): PHtmlStream +proc HTML_STREAM_CLASS*(klass: pointer): PHtmlStreamClass +proc HTML_IS_STREAM*(obj: pointer): bool +proc HTML_IS_STREAM_CLASS*(klass: pointer): bool +proc HTML_STREAM_GET_CLASS*(obj: pointer): PHtmlStreamClass +proc html_stream_get_type*(): GType{.cdecl, dynlib: gtkhtmllib, + importc: "html_stream_get_type".} +proc html_stream_new*(write_func: THtmlStreamWriteFunc, + close_func: THtmlStreamCloseFunc, user_data: gpointer): PHtmlStream{. + cdecl, dynlib: gtkhtmllib, importc: "html_stream_new".} +proc html_stream_write*(stream: PHtmlStream, buffer: Pgchar, size: guint){. + cdecl, dynlib: gtkhtmllib, importc: "html_stream_write".} +proc html_stream_close*(stream: PHtmlStream){.cdecl, dynlib: gtkhtmllib, + importc: "html_stream_close".} +proc html_stream_destroy*(stream: PHtmlStream){.cdecl, dynlib: gtkhtmllib, + importc: "html_stream_destroy".} +proc html_stream_get_written*(stream: PHtmlStream): gint{.cdecl, + dynlib: gtkhtmllib, importc: "html_stream_get_written".} +proc html_stream_cancel*(stream: PHtmlStream){.cdecl, dynlib: gtkhtmllib, + importc: "html_stream_cancel".} +proc html_stream_set_cancel_func*(stream: PHtmlStream, + abort_func: THtmlStreamCancelFunc, + cancel_data: gpointer){.cdecl, + dynlib: gtkhtmllib, importc: "html_stream_set_cancel_func".} +proc html_stream_get_mime_type*(stream: PHtmlStream): cstring{.cdecl, + dynlib: gtkhtmllib, importc: "html_stream_get_mime_type".} +proc html_stream_set_mime_type*(stream: PHtmlStream, mime_type: cstring){.cdecl, + dynlib: gtkhtmllib, importc: "html_stream_set_mime_type".} +proc html_stream_buffer_new*(close_func: THtmlStreamBufferCloseFunc, + user_data: gpointer): PHtmlStream{.cdecl, + dynlib: gtkhtmllib, importc: "html_stream_buffer_new".} +proc html_event_mouse_move*(view: PHtmlView, event: PGdkEventMotion){.cdecl, + dynlib: gtkhtmllib, importc: "html_event_mouse_move".} +proc html_event_button_press*(view: PHtmlView, button: PGdkEventButton){.cdecl, + dynlib: gtkhtmllib, importc: "html_event_button_press".} +proc html_event_button_release*(view: PHtmlView, event: PGdkEventButton){.cdecl, + dynlib: gtkhtmllib, importc: "html_event_button_release".} +proc html_event_activate*(view: PHtmlView){.cdecl, dynlib: gtkhtmllib, + importc: "html_event_activate".} +proc html_event_key_press*(view: PHtmlView, event: PGdkEventKey): gboolean{. + cdecl, dynlib: gtkhtmllib, importc: "html_event_key_press".} +proc html_event_find_root_box*(self: PHtmlBox, x: gint, y: gint): PHtmlBox{. + cdecl, dynlib: gtkhtmllib, importc: "html_event_find_root_box".} +proc html_selection_start*(view: PHtmlView, event: PGdkEventButton){.cdecl, + dynlib: gtkhtmllib, importc: "html_selection_start".} +proc html_selection_end*(view: PHtmlView, event: PGdkEventButton){.cdecl, + dynlib: gtkhtmllib, importc: "html_selection_end".} +proc html_selection_update*(view: PHtmlView, event: PGdkEventMotion){.cdecl, + dynlib: gtkhtmllib, importc: "html_selection_update".} +proc html_selection_clear*(view: PHtmlView){.cdecl, dynlib: gtkhtmllib, + importc: "html_selection_clear".} +proc html_selection_set*(view: PHtmlView, start: PDomNode, offset: int32, + len: int32){.cdecl, dynlib: gtkhtmllib, + importc: "html_selection_set".} +proc GTK_HTML_CONTEXT_TYPE*(): GType +proc GTK_HTML_CONTEXT*(obj: pointer): PGtkHtmlContext +proc GTK_HTML_CONTEXT_CLASS*(klass: pointer): PGtkHtmlContextClass +proc GTK_HTML_IS_CONTEXT*(obj: pointer): bool +proc GTK_HTML_IS_CONTEXT_CLASS*(klass: pointer): bool +proc gtk_html_context_get_type*(): GType +proc gtk_html_context_get*(): PGtkHtmlContext +proc HTML_TYPE_DOCUMENT*(): GType +proc HTML_DOCUMENT*(obj: pointer): PHtmlDocument +proc HTML_DOCUMENT_CLASS*(klass: pointer): PHtmlDocumentClass +proc HTML_IS_DOCUMENT*(obj: pointer): bool +proc html_document_get_type*(): GType{.cdecl, dynlib: gtkhtmllib, + importc: "html_document_get_type".} +proc html_document_new*(): PHtmlDocument{.cdecl, dynlib: gtkhtmllib, + importc: "html_document_new".} +proc html_document_open_stream*(document: PHtmlDocument, mime_type: Pgchar): gboolean{. + cdecl, dynlib: gtkhtmllib, importc: "html_document_open_stream".} +proc html_document_write_stream*(document: PHtmlDocument, buffer: Pgchar, + len: gint){.cdecl, dynlib: gtkhtmllib, + importc: "html_document_write_stream".} +proc html_document_close_stream*(document: PHtmlDocument){.cdecl, + dynlib: gtkhtmllib, importc: "html_document_close_stream".} +proc html_document_clear*(document: PHtmlDocument){.cdecl, dynlib: gtkhtmllib, + importc: "html_document_clear".} +proc HTML_TYPE_VIEW*(): GType +proc HTML_VIEW*(obj: pointer): PHtmlView +proc HTML_VIEW_CLASS*(klass: pointer): PHtmlViewClass +proc HTML_IS_VIEW*(obj: pointer): bool +proc html_view_get_type*(): GType{.cdecl, dynlib: gtkhtmllib, + importc: "html_view_get_type".} +proc html_view_new*(): PGtkWidget{.cdecl, dynlib: gtkhtmllib, + importc: "html_view_new".} +proc html_view_set_document*(view: PHtmlView, document: PHtmlDocument){.cdecl, + dynlib: gtkhtmllib, importc: "html_view_set_document".} +proc html_view_jump_to_anchor*(view: PHtmlView, anchor: Pgchar){.cdecl, + dynlib: gtkhtmllib, importc: "html_view_jump_to_anchor".} +proc html_view_get_magnification*(view: PHtmlView): gdouble{.cdecl, + dynlib: gtkhtmllib, importc: "html_view_get_magnification".} +proc html_view_set_magnification*(view: PHtmlView, magnification: gdouble){. + cdecl, dynlib: gtkhtmllib, importc: "html_view_set_magnification".} +proc html_view_zoom_in*(view: PHtmlView){.cdecl, dynlib: gtkhtmllib, + importc: "html_view_zoom_in".} +proc html_view_zoom_out*(view: PHtmlView){.cdecl, dynlib: gtkhtmllib, + importc: "html_view_zoom_out".} +proc html_view_zoom_reset*(view: PHtmlView){.cdecl, dynlib: gtkhtmllib, + importc: "html_view_zoom_reset".} +proc DOM_TYPE_NODE*(): GType = + result = dom_node_get_type() + +proc DOM_NODE*(theobject: pointer): PDomNode = + result = G_TYPE_CHECK_INSTANCE_CAST(theobject, DOM_TYPE_NODE(), TDomNode) + +proc DOM_NODE_CLASS*(klass: pointer): PDomNodeClass = + result = G_TYPE_CHECK_CLASS_CAST(klass, DOM_TYPE_NODE(), TDomNodeClass) + +proc DOM_IS_NODE*(theobject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(theobject, DOM_TYPE_NODE()) + +proc DOM_IS_NODE_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, DOM_TYPE_NODE()) + +proc DOM_NODE_GET_CLASS*(obj: pointer): PDomNodeClass = + result = G_TYPE_INSTANCE_GET_CLASS(obj, DOM_TYPE_NODE(), TDomNodeClass) + +proc DOM_TYPE_DOCUMENT*(): GType = + result = dom_document_get_type() + +proc DOM_DOCUMENT*(theobject: pointer): PDomDocument = + result = G_TYPE_CHECK_INSTANCE_CAST(theobject, DOM_TYPE_DOCUMENT(), TDomDocument) + +proc DOM_DOCUMENT_CLASS*(klass: pointer): PDomDocumentClass = + result = G_TYPE_CHECK_CLASS_CAST(klass, DOM_TYPE_DOCUMENT(), TDomDocumentClass) + +proc DOM_IS_DOCUMENT*(theobject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(theobject, DOM_TYPE_DOCUMENT()) + +proc DOM_IS_DOCUMENT_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, DOM_TYPE_DOCUMENT()) + +proc DOM_DOCUMENT_GET_CLASS*(obj: pointer): PDomDocumentClass = + result = G_TYPE_INSTANCE_GET_CLASS(obj, DOM_TYPE_DOCUMENT(), TDomDocumentClass) + +proc HTML_TYPE_FOCUS_ITERATOR*(): GType = + result = html_focus_iterator_get_type() + +proc HTML_FOCUS_ITERATOR*(theobject: pointer): PHtmlFocusIterator = + result = G_TYPE_CHECK_INSTANCE_CAST(theobject, HTML_TYPE_FOCUS_ITERATOR(), + HtmlFocusIterator) + +proc HTML_FOCUS_ITERATOR_CLASS*(klass: pointer): PHtmlFocusIteratorClass = + result = G_TYPE_CHECK_CLASS_CAST(klass, HTML_TYPE_FOCUS_ITERATOR(), + HtmlFocusIteratorClass) + +proc HTML_IS_FOCUS_ITERATOR*(theobject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(theobject, HTML_TYPE_FOCUS_ITERATOR()) + +proc HTML_IS_FOCUS_ITERATOR_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, HTML_TYPE_FOCUS_ITERATOR()) + +proc HTML_FOCUS_ITERATOR_GET_CLASS*(obj: pointer): PHtmlFocusIteratorClass = + result = G_TYPE_INSTANCE_GET_CLASS(obj, HTML_TYPE_FOCUS_ITERATOR(), + HtmlFocusIteratorClass) + +proc HTML_PARSER_TYPE*(): GType = + result = html_parser_get_type() + +proc HTML_PARSER*(obj: pointer): PHtmlParser = + result = GTK_CHECK_CAST(obj, HTML_PARSER_TYPE(), THtmlParser) + +proc HTML_PARSER_CLASS*(klass: pointer): PHtmlParserClass = + result = GTK_CHECK_CLASS_CAST(klass, HTML_PARSER_TYPE(), THtmlParserClass) + +proc HTML_IS_PARSER*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, HTML_PARSER_TYPE()) + +proc HTML_TYPE_STREAM*(): GType = + result = html_stream_get_type() + +proc HTML_STREAM*(obj: pointer): PHtmlStream = + result = PHtmlStream(G_TYPE_CHECK_INSTANCE_CAST(obj, HTML_TYPE_STREAM())) + +proc HTML_STREAM_CLASS*(klass: pointer): PHtmlStreamClass = + result = G_TYPE_CHECK_CLASS_CAST(klass, HTML_TYPE_STREAM()) + +proc HTML_IS_STREAM*(obj: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, HTML_TYPE_STREAM()) + +proc HTML_IS_STREAM_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, HTML_TYPE_STREAM()) + +proc HTML_STREAM_GET_CLASS*(obj: pointer): PHtmlStreamClass = + result = PHtmlStreamClass(G_TYPE_INSTANCE_GET_CLASS(obj, HTML_TYPE_STREAM())) + +proc GTK_HTML_CONTEXT_TYPE*(): GType = + result = gtk_html_context_get_type() + +proc GTK_HTML_CONTEXT*(obj: pointer): PGtkHtmlContext = + result = GTK_CHECK_CAST(obj, GTK_HTML_CONTEXT_TYPE(), TGtkHtmlContext) + +proc GTK_HTML_CONTEXT_CLASS*(klass: pointer): PGtkHtmlContextClass = + result = GTK_CHECK_CLASS_CAST(klass, GTK_HTML_CONTEXT_TYPE(), + TGtkHtmlContextClass) + +proc GTK_HTML_IS_CONTEXT*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, GTK_HTML_CONTEXT_TYPE()) + +proc GTK_HTML_IS_CONTEXT_CLASS*(klass: pointer): bool = + result = GTK_CHECK_CLASS_TYPE(klass, GTK_HTML_CONTEXT_TYPE()) + +proc HTML_TYPE_DOCUMENT*(): GType = + result = html_document_get_type() + +proc HTML_DOCUMENT*(obj: pointer): PHtmlDocument = + result = PHtmlDocument(GTK_CHECK_CAST(obj, HTML_TYPE_DOCUMENT())) + +proc HTML_DOCUMENT_CLASS*(klass: pointer): PHtmlDocumentClass = + result = GTK_CHECK_CLASS_CAST(klass, HTML_TYPE_DOCUMENT()) + +proc HTML_IS_DOCUMENT*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, HTML_TYPE_DOCUMENT()) + +proc HTML_TYPE_VIEW*(): GType = + result = html_view_get_type() + +proc HTML_VIEW*(obj: pointer): PHtmlView = + result = PHtmlView(GTK_CHECK_CAST(obj, HTML_TYPE_VIEW())) + +proc HTML_VIEW_CLASS*(klass: pointer): PHtmlViewClass = + result = PHtmlViewClass(GTK_CHECK_CLASS_CAST(klass, HTML_TYPE_VIEW())) + +proc HTML_IS_VIEW*(obj: pointer): bool = + result = GTK_CHECK_TYPE(obj, HTML_TYPE_VIEW()) diff --git a/lib/oldwrappers/gtk/libglade2.nim b/lib/oldwrappers/gtk/libglade2.nim new file mode 100644 index 000000000..5e323680e --- /dev/null +++ b/lib/oldwrappers/gtk/libglade2.nim @@ -0,0 +1,118 @@ +{.deadCodeElim: on.} + +import + glib2, gtk2 + +when defined(win32): + const + LibGladeLib = "libglade-2.0-0.dll" +else: + const + LibGladeLib = "libglade-2.0.so" +type + PLongint* = ptr int32 + PSmallInt* = ptr int16 + PByte* = ptr int8 + PWord* = ptr int16 + PDWord* = ptr int32 + PDouble* = ptr float64 + +proc glade_init*(){.cdecl, dynlib: LibGladeLib, importc: "glade_init".} +proc glade_require*(TheLibrary: cstring){.cdecl, dynlib: LibGladeLib, + importc: "glade_require".} +proc glade_provide*(TheLibrary: cstring){.cdecl, dynlib: LibGladeLib, + importc: "glade_provide".} +type + PGladeXMLPrivate* = pointer + PGladeXML* = ptr TGladeXML + TGladeXML* = object of TGObject + filename*: cstring + priv*: PGladeXMLPrivate + + PGladeXMLClass* = ptr TGladeXMLClass + TGladeXMLClass* = object of TGObjectClass + + TGladeXMLConnectFunc* = proc (handler_name: cstring, anObject: PGObject, + signal_name: cstring, signal_data: cstring, + connect_object: PGObject, after: gboolean, + user_data: gpointer){.cdecl.} + +proc GLADE_TYPE_XML*(): GType +proc GLADE_XML*(obj: pointer): PGladeXML +proc GLADE_XML_CLASS*(klass: pointer): PGladeXMLClass +proc GLADE_IS_XML*(obj: pointer): gboolean +proc GLADE_IS_XML_CLASS*(klass: pointer): gboolean +proc GLADE_XML_GET_CLASS*(obj: pointer): PGladeXMLClass +proc glade_xml_get_type*(): GType{.cdecl, dynlib: LibGladeLib, + importc: "glade_xml_get_type".} +proc glade_xml_new*(fname: cstring, root: cstring, domain: cstring): PGladeXML{. + cdecl, dynlib: LibGladeLib, importc: "glade_xml_new".} +proc glade_xml_new_from_buffer*(buffer: cstring, size: int32, root: cstring, + domain: cstring): PGladeXML{.cdecl, + dynlib: LibGladeLib, importc: "glade_xml_new_from_buffer".} +proc glade_xml_construct*(self: PGladeXML, fname: cstring, root: cstring, + domain: cstring): gboolean{.cdecl, + dynlib: LibGladeLib, importc: "glade_xml_construct".} +proc glade_xml_signal_connect*(self: PGladeXML, handlername: cstring, + func: TGCallback){.cdecl, dynlib: LibGladeLib, + importc: "glade_xml_signal_connect".} +proc glade_xml_signal_connect_data*(self: PGladeXML, handlername: cstring, + func: TGCallback, user_data: gpointer){. + cdecl, dynlib: LibGladeLib, importc: "glade_xml_signal_connect_data".} +proc glade_xml_signal_autoconnect*(self: PGladeXML){.cdecl, dynlib: LibGladeLib, + importc: "glade_xml_signal_autoconnect".} +proc glade_xml_signal_connect_full*(self: PGladeXML, handler_name: cstring, + func: TGladeXMLConnectFunc, + user_data: gpointer){.cdecl, + dynlib: LibGladeLib, importc: "glade_xml_signal_connect_full".} +proc glade_xml_signal_autoconnect_full*(self: PGladeXML, + func: TGladeXMLConnectFunc, + user_data: gpointer){.cdecl, + dynlib: LibGladeLib, importc: "glade_xml_signal_autoconnect_full".} +proc glade_xml_get_widget*(self: PGladeXML, name: cstring): PGtkWidget{.cdecl, + dynlib: LibGladeLib, importc: "glade_xml_get_widget".} +proc glade_xml_get_widget_prefix*(self: PGladeXML, name: cstring): PGList{. + cdecl, dynlib: LibGladeLib, importc: "glade_xml_get_widget_prefix".} +proc glade_xml_relative_file*(self: PGladeXML, filename: cstring): cstring{.cdecl, + dynlib: LibGladeLib, importc: "glade_xml_relative_file".} +proc glade_get_widget_name*(widget: PGtkWidget): cstring{.cdecl, + dynlib: LibGladeLib, importc: "glade_get_widget_name".} +proc glade_get_widget_tree*(widget: PGtkWidget): PGladeXML{.cdecl, + dynlib: LibGladeLib, importc: "glade_get_widget_tree".} +type + PGladeXMLCustomWidgetHandler* = ptr TGladeXMLCustomWidgetHandler + TGladeXMLCustomWidgetHandler* = TGtkWidget + +proc glade_set_custom_handler*(handler: TGladeXMLCustomWidgetHandler, + user_data: gpointer){.cdecl, dynlib: LibGladeLib, + importc: "glade_set_custom_handler".} +proc glade_gnome_init*() = + glade_init() + +proc glade_bonobo_init*() = + glade_init() + +proc glade_xml_new_with_domain*(fname: cstring, root: cstring, domain: cstring): PGladeXML = + result = glade_xml_new(fname, root, domain) + +proc glade_xml_new_from_memory*(buffer: cstring, size: int32, root: cstring, + domain: cstring): PGladeXML = + result = glade_xml_new_from_buffer(buffer, size, root, domain) + +proc GLADE_TYPE_XML*(): GType = + result = glade_xml_get_type() + +proc GLADE_XML*(obj: pointer): PGladeXML = + result = cast[PGladeXML](G_TYPE_CHECK_INSTANCE_CAST(obj, GLADE_TYPE_XML())) + +proc GLADE_XML_CLASS*(klass: pointer): PGladeXMLClass = + result = cast[PGladeXMLClass](G_TYPE_CHECK_CLASS_CAST(klass, GLADE_TYPE_XML())) + +proc GLADE_IS_XML*(obj: pointer): gboolean = + result = G_TYPE_CHECK_INSTANCE_TYPE(obj, GLADE_TYPE_XML()) + +proc GLADE_IS_XML_CLASS*(klass: pointer): gboolean = + result = G_TYPE_CHECK_CLASS_TYPE(klass, GLADE_TYPE_XML()) + +proc GLADE_XML_GET_CLASS*(obj: pointer): PGladeXMLClass = + result = cast[PGladeXMLClass](G_TYPE_INSTANCE_GET_CLASS(obj, GLADE_TYPE_XML())) diff --git a/lib/oldwrappers/gtk/pango.nim b/lib/oldwrappers/gtk/pango.nim new file mode 100644 index 000000000..ade2da989 --- /dev/null +++ b/lib/oldwrappers/gtk/pango.nim @@ -0,0 +1,1208 @@ +{.deadCodeElim: on.} + +import + glib2 + +when defined(win32): + const + pangolib* = "libpango-1.0-0.dll" +else: + const + pangolib* = "libpango-1.0.so.0" +type + PPangoFont* = pointer + PPangoFontFamily* = pointer + PPangoFontset* = pointer + PPangoFontMetrics* = pointer + PPangoFontFace* = pointer + PPangoFontMap* = pointer + PPangoFontsetClass* = pointer + PPangoFontFamilyClass* = pointer + PPangoFontFaceClass* = pointer + PPangoFontClass* = pointer + PPangoFontMapClass* = pointer + PPangoFontDescription* = ptr TPangoFontDescription + TPangoFontDescription* = pointer + PPangoAttrList* = ptr TPangoAttrList + TPangoAttrList* = pointer + PPangoAttrIterator* = ptr TPangoAttrIterator + TPangoAttrIterator* = pointer + PPangoLayout* = ptr TPangoLayout + TPangoLayout* = pointer + PPangoLayoutClass* = ptr TPangoLayoutClass + TPangoLayoutClass* = pointer + PPangoLayoutIter* = ptr TPangoLayoutIter + TPangoLayoutIter* = pointer + PPangoContext* = ptr TPangoContext + TPangoContext* = pointer + PPangoContextClass* = ptr TPangoContextClass + TPangoContextClass* = pointer + PPangoFontsetSimple* = ptr TPangoFontsetSimple + TPangoFontsetSimple* = pointer + PPangoTabArray* = ptr TPangoTabArray + TPangoTabArray* = pointer + PPangoGlyphString* = ptr TPangoGlyphString + PPangoAnalysis* = ptr TPangoAnalysis + PPangoItem* = ptr TPangoItem + PPangoLanguage* = ptr TPangoLanguage + TPangoLanguage* = pointer + PPangoGlyph* = ptr TPangoGlyph + TPangoGlyph* = guint32 + PPangoRectangle* = ptr TPangoRectangle + TPangoRectangle* {.final, pure.} = object + x*: int32 + y*: int32 + width*: int32 + height*: int32 + + PPangoDirection* = ptr TPangoDirection + TPangoDirection* = enum + PANGO_DIRECTION_LTR, PANGO_DIRECTION_RTL, PANGO_DIRECTION_TTB_LTR, + PANGO_DIRECTION_TTB_RTL + PPangoColor* = ptr TPangoColor + TPangoColor* {.final, pure.} = object + red*: guint16 + green*: guint16 + blue*: guint16 + + PPangoAttrType* = ptr TPangoAttrType + TPangoAttrType* = int32 + PPangoUnderline* = ptr TPangoUnderline + TPangoUnderline* = int32 + PPangoAttribute* = ptr TPangoAttribute + PPangoAttrClass* = ptr TPangoAttrClass + TPangoAttribute* {.final, pure.} = object + klass*: PPangoAttrClass + start_index*: int + end_index*: int + + TPangoAttrClass* {.final, pure.} = object + `type`*: TPangoAttrType + copy*: proc (attr: PPangoAttribute): PPangoAttribute{.cdecl.} + destroy*: proc (attr: PPangoAttribute){.cdecl.} + equal*: proc (attr1: PPangoAttribute, attr2: PPangoAttribute): gboolean{. + cdecl.} + + PPangoAttrString* = ptr TPangoAttrString + TPangoAttrString* {.final, pure.} = object + attr*: TPangoAttribute + value*: cstring + + PPangoAttrLanguage* = ptr TPangoAttrLanguage + TPangoAttrLanguage* {.final, pure.} = object + attr*: TPangoAttribute + value*: PPangoLanguage + + PPangoAttrInt* = ptr TPangoAttrInt + TPangoAttrInt* {.final, pure.} = object + attr*: TPangoAttribute + value*: int32 + + PPangoAttrFloat* = ptr TPangoAttrFloat + TPangoAttrFloat* {.final, pure.} = object + attr*: TPangoAttribute + value*: gdouble + + PPangoAttrColor* = ptr TPangoAttrColor + TPangoAttrColor* {.final, pure.} = object + attr*: TPangoAttribute + color*: TPangoColor + + PPangoAttrShape* = ptr TPangoAttrShape + TPangoAttrShape* {.final, pure.} = object + attr*: TPangoAttribute + ink_rect*: TPangoRectangle + logical_rect*: TPangoRectangle + + PPangoAttrFontDesc* = ptr TPangoAttrFontDesc + TPangoAttrFontDesc* {.final, pure.} = object + attr*: TPangoAttribute + desc*: PPangoFontDescription + + PPangoLogAttr* = ptr TPangoLogAttr + TPangoLogAttr* {.final, pure.} = object + flag0*: guint16 + + PPangoCoverageLevel* = ptr TPangoCoverageLevel + TPangoCoverageLevel* = enum + PANGO_COVERAGE_NONE, PANGO_COVERAGE_FALLBACK, PANGO_COVERAGE_APPROXIMATE, + PANGO_COVERAGE_EXACT + PPangoBlockInfo* = ptr TPangoBlockInfo + TPangoBlockInfo* {.final, pure.} = object + data*: Pguchar + level*: TPangoCoverageLevel + + PPangoCoverage* = ptr TPangoCoverage + TPangoCoverage* {.final, pure.} = object + ref_count*: int + n_blocks*: int32 + data_size*: int32 + blocks*: PPangoBlockInfo + + PPangoEngineRange* = ptr TPangoEngineRange + TPangoEngineRange* {.final, pure.} = object + start*: int32 + theEnd*: int32 + langs*: cstring + + PPangoEngineInfo* = ptr TPangoEngineInfo + TPangoEngineInfo* {.final, pure.} = object + id*: cstring + engine_type*: cstring + render_type*: cstring + ranges*: PPangoEngineRange + n_ranges*: gint + + PPangoEngine* = ptr TPangoEngine + TPangoEngine* {.final, pure.} = object + id*: cstring + `type`*: cstring + length*: gint + + TPangoEngineLangScriptBreak* = proc (text: cstring, len: int32, + analysis: PPangoAnalysis, + attrs: PPangoLogAttr, attrs_len: int32){. + cdecl.} + PPangoEngineLang* = ptr TPangoEngineLang + TPangoEngineLang* {.final, pure.} = object + engine*: TPangoEngine + script_break*: TPangoEngineLangScriptBreak + + TPangoEngineShapeScript* = proc (font: PPangoFont, text: cstring, + length: int32, analysis: PPangoAnalysis, + glyphs: PPangoGlyphString){.cdecl.} + TPangoEngineShapeGetCoverage* = proc (font: PPangoFont, + language: PPangoLanguage): PPangoCoverage{. + cdecl.} + PPangoEngineShape* = ptr TPangoEngineShape + TPangoEngineShape* {.final, pure.} = object + engine*: TPangoEngine + script_shape*: TPangoEngineShapeScript + get_coverage*: TPangoEngineShapeGetCoverage + + PPangoStyle* = ptr TPangoStyle + TPangoStyle* = gint + PPangoVariant* = ptr TPangoVariant + TPangoVariant* = gint + PPangoWeight* = ptr TPangoWeight + TPangoWeight* = gint + PPangoStretch* = ptr TPangoStretch + TPangoStretch* = gint + PPangoFontMask* = ptr TPangoFontMask + TPangoFontMask* = int32 + PPangoGlyphUnit* = ptr TPangoGlyphUnit + TPangoGlyphUnit* = gint32 + PPangoGlyphGeometry* = ptr TPangoGlyphGeometry + TPangoGlyphGeometry* {.final, pure.} = object + width*: TPangoGlyphUnit + x_offset*: TPangoGlyphUnit + y_offset*: TPangoGlyphUnit + + PPangoGlyphVisAttr* = ptr TPangoGlyphVisAttr + TPangoGlyphVisAttr* {.final, pure.} = object + flag0*: int16 + + PPangoGlyphInfo* = ptr TPangoGlyphInfo + TPangoGlyphInfo* {.final, pure.} = object + glyph*: TPangoGlyph + geometry*: TPangoGlyphGeometry + attr*: TPangoGlyphVisAttr + + TPangoGlyphString* {.final, pure.} = object + num_glyphs*: gint + glyphs*: PPangoGlyphInfo + log_clusters*: Pgint + space*: gint + + TPangoAnalysis* {.final, pure.} = object + shape_engine*: PPangoEngineShape + lang_engine*: PPangoEngineLang + font*: PPangoFont + level*: guint8 + language*: PPangoLanguage + extra_attrs*: PGSList + + TPangoItem* {.final, pure.} = object + offset*: gint + length*: gint + num_chars*: gint + analysis*: TPangoAnalysis + + PPangoAlignment* = ptr TPangoAlignment + TPangoAlignment* = enum + PANGO_ALIGN_LEFT, PANGO_ALIGN_CENTER, PANGO_ALIGN_RIGHT + PPangoWrapMode* = ptr TPangoWrapMode + TPangoWrapMode* = enum + PANGO_WRAP_WORD, PANGO_WRAP_CHAR + PPangoLayoutLine* = ptr TPangoLayoutLine + TPangoLayoutLine* {.final, pure.} = object + layout*: PPangoLayout + start_index*: gint + length*: gint + runs*: PGSList + + PPangoLayoutRun* = ptr TPangoLayoutRun + TPangoLayoutRun* {.final, pure.} = object + item*: PPangoItem + glyphs*: PPangoGlyphString + + PPangoTabAlign* = ptr TPangoTabAlign + TPangoTabAlign* = enum + PANGO_TAB_LEFT + +const + PANGO_SCALE* = 1024 + +proc PANGO_PIXELS*(d: int): int +proc PANGO_ASCENT*(rect: TPangoRectangle): int32 +proc PANGO_DESCENT*(rect: TPangoRectangle): int32 +proc PANGO_LBEARING*(rect: TPangoRectangle): int32 +proc PANGO_RBEARING*(rect: TPangoRectangle): int32 +proc PANGO_TYPE_LANGUAGE*(): GType +proc pango_language_get_type*(): GType{.cdecl, dynlib: pangolib, + importc: "pango_language_get_type".} +proc pango_language_from_string*(language: cstring): PPangoLanguage{.cdecl, + dynlib: pangolib, importc: "pango_language_from_string".} +proc pango_language_to_string*(language: PPangoLanguage): cstring +proc pango_language_matches*(language: PPangoLanguage, range_list: cstring): gboolean{. + cdecl, dynlib: pangolib, importc: "pango_language_matches".} +const + PANGO_ATTR_INVALID* = 0 + PANGO_ATTR_LANGUAGE* = 1 + PANGO_ATTR_FAMILY* = 2 + PANGO_ATTR_STYLE* = 3 + PANGO_ATTR_WEIGHT* = 4 + PANGO_ATTR_VARIANT* = 5 + PANGO_ATTR_STRETCH* = 6 + PANGO_ATTR_SIZE* = 7 + PANGO_ATTR_FONT_DESC* = 8 + PANGO_ATTR_FOREGROUND* = 9 + PANGO_ATTR_BACKGROUND* = 10 + PANGO_ATTR_UNDERLINE* = 11 + PANGO_ATTR_STRIKETHROUGH* = 12 + PANGO_ATTR_RISE* = 13 + PANGO_ATTR_SHAPE* = 14 + PANGO_ATTR_SCALE* = 15 + PANGO_UNDERLINE_NONE* = 0 + PANGO_UNDERLINE_SINGLE* = 1 + PANGO_UNDERLINE_DOUBLE* = 2 + PANGO_UNDERLINE_LOW* = 3 + +proc PANGO_TYPE_COLOR*(): GType +proc pango_color_get_type*(): GType{.cdecl, dynlib: pangolib, + importc: "pango_color_get_type".} +proc pango_color_copy*(src: PPangoColor): PPangoColor{.cdecl, dynlib: pangolib, + importc: "pango_color_copy".} +proc pango_color_free*(color: PPangoColor){.cdecl, dynlib: pangolib, + importc: "pango_color_free".} +proc pango_color_parse*(color: PPangoColor, spec: cstring): gboolean{.cdecl, + dynlib: pangolib, importc: "pango_color_parse".} +proc PANGO_TYPE_ATTR_LIST*(): GType +proc pango_attr_type_register*(name: cstring): TPangoAttrType{.cdecl, + dynlib: pangolib, importc: "pango_attr_type_register".} +proc pango_attribute_copy*(attr: PPangoAttribute): PPangoAttribute{.cdecl, + dynlib: pangolib, importc: "pango_attribute_copy".} +proc pango_attribute_destroy*(attr: PPangoAttribute){.cdecl, dynlib: pangolib, + importc: "pango_attribute_destroy".} +proc pango_attribute_equal*(attr1: PPangoAttribute, attr2: PPangoAttribute): gboolean{. + cdecl, dynlib: pangolib, importc: "pango_attribute_equal".} +proc pango_attr_language_new*(language: PPangoLanguage): PPangoAttribute{.cdecl, + dynlib: pangolib, importc: "pango_attr_language_new".} +proc pango_attr_family_new*(family: cstring): PPangoAttribute{.cdecl, + dynlib: pangolib, importc: "pango_attr_family_new".} +proc pango_attr_foreground_new*(red: guint16, green: guint16, blue: guint16): PPangoAttribute{. + cdecl, dynlib: pangolib, importc: "pango_attr_foreground_new".} +proc pango_attr_background_new*(red: guint16, green: guint16, blue: guint16): PPangoAttribute{. + cdecl, dynlib: pangolib, importc: "pango_attr_background_new".} +proc pango_attr_size_new*(size: int32): PPangoAttribute{.cdecl, + dynlib: pangolib, importc: "pango_attr_size_new".} +proc pango_attr_style_new*(style: TPangoStyle): PPangoAttribute{.cdecl, + dynlib: pangolib, importc: "pango_attr_style_new".} +proc pango_attr_weight_new*(weight: TPangoWeight): PPangoAttribute{.cdecl, + dynlib: pangolib, importc: "pango_attr_weight_new".} +proc pango_attr_variant_new*(variant: TPangoVariant): PPangoAttribute{.cdecl, + dynlib: pangolib, importc: "pango_attr_variant_new".} +proc pango_attr_stretch_new*(stretch: TPangoStretch): PPangoAttribute{.cdecl, + dynlib: pangolib, importc: "pango_attr_stretch_new".} +proc pango_attr_font_desc_new*(desc: PPangoFontDescription): PPangoAttribute{. + cdecl, dynlib: pangolib, importc: "pango_attr_font_desc_new".} +proc pango_attr_underline_new*(underline: TPangoUnderline): PPangoAttribute{. + cdecl, dynlib: pangolib, importc: "pango_attr_underline_new".} +proc pango_attr_strikethrough_new*(strikethrough: gboolean): PPangoAttribute{. + cdecl, dynlib: pangolib, importc: "pango_attr_strikethrough_new".} +proc pango_attr_rise_new*(rise: int32): PPangoAttribute{.cdecl, + dynlib: pangolib, importc: "pango_attr_rise_new".} +proc pango_attr_shape_new*(ink_rect: PPangoRectangle, + logical_rect: PPangoRectangle): PPangoAttribute{. + cdecl, dynlib: pangolib, importc: "pango_attr_shape_new".} +proc pango_attr_scale_new*(scale_factor: gdouble): PPangoAttribute{.cdecl, + dynlib: pangolib, importc: "pango_attr_scale_new".} +proc pango_attr_list_get_type*(): GType{.cdecl, dynlib: pangolib, + importc: "pango_attr_list_get_type".} +proc pango_attr_list_new*(): PPangoAttrList{.cdecl, dynlib: pangolib, + importc: "pango_attr_list_new".} +proc pango_attr_list_ref*(list: PPangoAttrList){.cdecl, dynlib: pangolib, + importc: "pango_attr_list_ref".} +proc pango_attr_list_unref*(list: PPangoAttrList){.cdecl, dynlib: pangolib, + importc: "pango_attr_list_unref".} +proc pango_attr_list_copy*(list: PPangoAttrList): PPangoAttrList{.cdecl, + dynlib: pangolib, importc: "pango_attr_list_copy".} +proc pango_attr_list_insert*(list: PPangoAttrList, attr: PPangoAttribute){. + cdecl, dynlib: pangolib, importc: "pango_attr_list_insert".} +proc pango_attr_list_insert_before*(list: PPangoAttrList, attr: PPangoAttribute){. + cdecl, dynlib: pangolib, importc: "pango_attr_list_insert_before".} +proc pango_attr_list_change*(list: PPangoAttrList, attr: PPangoAttribute){. + cdecl, dynlib: pangolib, importc: "pango_attr_list_change".} +proc pango_attr_list_splice*(list: PPangoAttrList, other: PPangoAttrList, + pos: gint, len: gint){.cdecl, dynlib: pangolib, + importc: "pango_attr_list_splice".} +proc pango_attr_list_get_iterator*(list: PPangoAttrList): PPangoAttrIterator{. + cdecl, dynlib: pangolib, importc: "pango_attr_list_get_iterator".} +proc pango_attr_iterator_range*(`iterator`: PPangoAttrIterator, start: Pgint, + theEnd: Pgint){.cdecl, dynlib: pangolib, + importc: "pango_attr_iterator_range".} +proc pango_attr_iterator_next*(`iterator`: PPangoAttrIterator): gboolean{.cdecl, + dynlib: pangolib, importc: "pango_attr_iterator_next".} +proc pango_attr_iterator_copy*(`iterator`: PPangoAttrIterator): PPangoAttrIterator{. + cdecl, dynlib: pangolib, importc: "pango_attr_iterator_copy".} +proc pango_attr_iterator_destroy*(`iterator`: PPangoAttrIterator){.cdecl, + dynlib: pangolib, importc: "pango_attr_iterator_destroy".} +proc pango_attr_iterator_get*(`iterator`: PPangoAttrIterator, + `type`: TPangoAttrType): PPangoAttribute{.cdecl, + dynlib: pangolib, importc: "pango_attr_iterator_get".} +proc pango_attr_iterator_get_font*(`iterator`: PPangoAttrIterator, + desc: PPangoFontDescription, + language: var PPangoLanguage, + extra_attrs: PPGSList){.cdecl, + dynlib: pangolib, importc: "pango_attr_iterator_get_font".} +proc pango_parse_markup*(markup_text: cstring, length: int32, + accel_marker: gunichar, attr_list: var PPangoAttrList, + text: PPchar, accel_char: Pgunichar, error: pointer): gboolean{. + cdecl, dynlib: pangolib, importc: "pango_parse_markup".} +const + bm_TPangoLogAttr_is_line_break* = 0x00000001'i16 + bp_TPangoLogAttr_is_line_break* = 0'i16 + bm_TPangoLogAttr_is_mandatory_break* = 0x00000002'i16 + bp_TPangoLogAttr_is_mandatory_break* = 1'i16 + bm_TPangoLogAttr_is_char_break* = 0x00000004'i16 + bp_TPangoLogAttr_is_char_break* = 2'i16 + bm_TPangoLogAttr_is_white* = 0x00000008'i16 + bp_TPangoLogAttr_is_white* = 3'i16 + bm_TPangoLogAttr_is_cursor_position* = 0x00000010'i16 + bp_TPangoLogAttr_is_cursor_position* = 4'i16 + bm_TPangoLogAttr_is_word_start* = 0x00000020'i16 + bp_TPangoLogAttr_is_word_start* = 5'i16 + bm_TPangoLogAttr_is_word_end* = 0x00000040'i16 + bp_TPangoLogAttr_is_word_end* = 6'i16 + bm_TPangoLogAttr_is_sentence_boundary* = 0x00000080'i16 + bp_TPangoLogAttr_is_sentence_boundary* = 7'i16 + bm_TPangoLogAttr_is_sentence_start* = 0x00000100'i16 + bp_TPangoLogAttr_is_sentence_start* = 8'i16 + bm_TPangoLogAttr_is_sentence_end* = 0x00000200'i16 + bp_TPangoLogAttr_is_sentence_end* = 9'i16 + +proc is_line_break*(a: var TPangoLogAttr): guint +proc set_is_line_break*(a: var TPangoLogAttr, `is_line_break`: guint) +proc is_mandatory_break*(a: var TPangoLogAttr): guint +proc set_is_mandatory_break*(a: var TPangoLogAttr, `is_mandatory_break`: guint) +proc is_char_break*(a: var TPangoLogAttr): guint +proc set_is_char_break*(a: var TPangoLogAttr, `is_char_break`: guint) +proc is_white*(a: var TPangoLogAttr): guint +proc set_is_white*(a: var TPangoLogAttr, `is_white`: guint) +proc is_cursor_position*(a: var TPangoLogAttr): guint +proc set_is_cursor_position*(a: var TPangoLogAttr, `is_cursor_position`: guint) +proc is_word_start*(a: var TPangoLogAttr): guint +proc set_is_word_start*(a: var TPangoLogAttr, `is_word_start`: guint) +proc is_word_end*(a: var TPangoLogAttr): guint +proc set_is_word_end*(a: var TPangoLogAttr, `is_word_end`: guint) +proc is_sentence_boundary*(a: var TPangoLogAttr): guint +proc set_is_sentence_boundary*(a: var TPangoLogAttr, + `is_sentence_boundary`: guint) +proc is_sentence_start*(a: var TPangoLogAttr): guint +proc set_is_sentence_start*(a: var TPangoLogAttr, `is_sentence_start`: guint) +proc is_sentence_end*(a: var TPangoLogAttr): guint +proc set_is_sentence_end*(a: var TPangoLogAttr, `is_sentence_end`: guint) +proc pango_break*(text: cstring, length: int32, analysis: PPangoAnalysis, + attrs: PPangoLogAttr, attrs_len: int32){.cdecl, + dynlib: pangolib, importc: "pango_break".} +proc pango_find_paragraph_boundary*(text: cstring, length: gint, + paragraph_delimiter_index: Pgint, + next_paragraph_start: Pgint){.cdecl, + dynlib: pangolib, importc: "pango_find_paragraph_boundary".} +proc pango_get_log_attrs*(text: cstring, length: int32, level: int32, + language: PPangoLanguage, log_attrs: PPangoLogAttr, + attrs_len: int32){.cdecl, dynlib: pangolib, + importc: "pango_get_log_attrs".} +proc PANGO_TYPE_CONTEXT*(): GType +proc PANGO_CONTEXT*(anObject: pointer): PPangoContext +proc PANGO_CONTEXT_CLASS*(klass: pointer): PPangoContextClass +proc PANGO_IS_CONTEXT*(anObject: pointer): bool +proc PANGO_IS_CONTEXT_CLASS*(klass: pointer): bool +proc PANGO_CONTEXT_GET_CLASS*(obj: PPangoContext): PPangoContextClass +proc pango_context_get_type*(): GType{.cdecl, dynlib: pangolib, + importc: "pango_context_get_type".} +proc pango_context_list_families*(context: PPangoContext, + families: openarray[ptr PPangoFontFamily]){.cdecl, + dynlib: pangolib, importc: "pango_context_list_families".} +proc pango_context_load_font*(context: PPangoContext, + desc: PPangoFontDescription): PPangoFont{.cdecl, + dynlib: pangolib, importc: "pango_context_load_font".} +proc pango_context_load_fontset*(context: PPangoContext, + desc: PPangoFontDescription, + language: PPangoLanguage): PPangoFontset{. + cdecl, dynlib: pangolib, importc: "pango_context_load_fontset".} +proc pango_context_get_metrics*(context: PPangoContext, + desc: PPangoFontDescription, + language: PPangoLanguage): PPangoFontMetrics{. + cdecl, dynlib: pangolib, importc: "pango_context_get_metrics".} +proc pango_context_set_font_description*(context: PPangoContext, + desc: PPangoFontDescription){.cdecl, dynlib: pangolib, + importc: "pango_context_set_font_description".} +proc pango_context_get_font_description*(context: PPangoContext): PPangoFontDescription{. + cdecl, dynlib: pangolib, importc: "pango_context_get_font_description".} +proc pango_context_get_language*(context: PPangoContext): PPangoLanguage{.cdecl, + dynlib: pangolib, importc: "pango_context_get_language".} +proc pango_context_set_language*(context: PPangoContext, + language: PPangoLanguage){.cdecl, + dynlib: pangolib, importc: "pango_context_set_language".} +proc pango_context_set_base_dir*(context: PPangoContext, + direction: TPangoDirection){.cdecl, + dynlib: pangolib, importc: "pango_context_set_base_dir".} +proc pango_context_get_base_dir*(context: PPangoContext): TPangoDirection{. + cdecl, dynlib: pangolib, importc: "pango_context_get_base_dir".} +proc pango_itemize*(context: PPangoContext, text: cstring, start_index: int32, + length: int32, attrs: PPangoAttrList, + cached_iter: PPangoAttrIterator): PGList{.cdecl, + dynlib: pangolib, importc: "pango_itemize".} +proc pango_coverage_new*(): PPangoCoverage{.cdecl, dynlib: pangolib, + importc: "pango_coverage_new".} +proc pango_coverage_ref*(coverage: PPangoCoverage): PPangoCoverage{.cdecl, + dynlib: pangolib, importc: "pango_coverage_ref".} +proc pango_coverage_unref*(coverage: PPangoCoverage){.cdecl, dynlib: pangolib, + importc: "pango_coverage_unref".} +proc pango_coverage_copy*(coverage: PPangoCoverage): PPangoCoverage{.cdecl, + dynlib: pangolib, importc: "pango_coverage_copy".} +proc pango_coverage_get*(coverage: PPangoCoverage, index: int32): TPangoCoverageLevel{. + cdecl, dynlib: pangolib, importc: "pango_coverage_get".} +proc pango_coverage_set*(coverage: PPangoCoverage, index: int32, + level: TPangoCoverageLevel){.cdecl, dynlib: pangolib, + importc: "pango_coverage_set".} +proc pango_coverage_max*(coverage: PPangoCoverage, other: PPangoCoverage){. + cdecl, dynlib: pangolib, importc: "pango_coverage_max".} +proc pango_coverage_to_bytes*(coverage: PPangoCoverage, bytes: PPguchar, + n_bytes: var int32){.cdecl, dynlib: pangolib, + importc: "pango_coverage_to_bytes".} +proc pango_coverage_from_bytes*(bytes: Pguchar, n_bytes: int32): PPangoCoverage{. + cdecl, dynlib: pangolib, importc: "pango_coverage_from_bytes".} +proc PANGO_TYPE_FONTSET*(): GType +proc PANGO_FONTSET*(anObject: pointer): PPangoFontset +proc PANGO_IS_FONTSET*(anObject: pointer): bool +proc pango_fontset_get_type*(): GType{.cdecl, dynlib: pangolib, + importc: "pango_fontset_get_type".} +proc pango_fontset_get_font*(fontset: PPangoFontset, wc: guint): PPangoFont{. + cdecl, dynlib: pangolib, importc: "pango_fontset_get_font".} +proc pango_fontset_get_metrics*(fontset: PPangoFontset): PPangoFontMetrics{. + cdecl, dynlib: pangolib, importc: "pango_fontset_get_metrics".} +const + PANGO_STYLE_NORMAL* = 0 + PANGO_STYLE_OBLIQUE* = 1 + PANGO_STYLE_ITALIC* = 2 + PANGO_VARIANT_NORMAL* = 0 + PANGO_VARIANT_SMALL_CAPS* = 1 + PANGO_WEIGHT_ULTRALIGHT* = 200 + PANGO_WEIGHT_LIGHT* = 300 + PANGO_WEIGHT_NORMAL* = 400 + PANGO_WEIGHT_BOLD* = 700 + PANGO_WEIGHT_ULTRABOLD* = 800 + PANGO_WEIGHT_HEAVY* = 900 + PANGO_STRETCH_ULTRA_CONDENSED* = 0 + PANGO_STRETCH_EXTRA_CONDENSED* = 1 + PANGO_STRETCH_CONDENSED* = 2 + PANGO_STRETCH_SEMI_CONDENSED* = 3 + PANGO_STRETCH_NORMAL* = 4 + PANGO_STRETCH_SEMI_EXPANDED* = 5 + PANGO_STRETCH_EXPANDED* = 6 + PANGO_STRETCH_EXTRA_EXPANDED* = 7 + PANGO_STRETCH_ULTRA_EXPANDED* = 8 + PANGO_FONT_MASK_FAMILY* = 1 shl 0 + PANGO_FONT_MASK_STYLE* = 1 shl 1 + PANGO_FONT_MASK_VARIANT* = 1 shl 2 + PANGO_FONT_MASK_WEIGHT* = 1 shl 3 + PANGO_FONT_MASK_STRETCH* = 1 shl 4 + PANGO_FONT_MASK_SIZE* = 1 shl 5 + PANGO_SCALE_XX_SMALL* = 0.5787037037036999 + PANGO_SCALE_X_SMALL* = 0.6444444444443999 + PANGO_SCALE_SMALL* = 0.8333333333332999 + PANGO_SCALE_MEDIUM* = 1.0 + PANGO_SCALE_LARGE* = 1.2 + PANGO_SCALE_X_LARGE* = 1.4399999999999 + PANGO_SCALE_XX_LARGE* = 1.728 + +proc PANGO_TYPE_FONT_DESCRIPTION*(): GType +proc pango_font_description_get_type*(): GType{.cdecl, dynlib: pangolib, + importc: "pango_font_description_get_type".} +proc pango_font_description_new*(): PPangoFontDescription{.cdecl, + dynlib: pangolib, importc: "pango_font_description_new".} +proc pango_font_description_copy*(desc: PPangoFontDescription): PPangoFontDescription{. + cdecl, dynlib: pangolib, importc: "pango_font_description_copy".} +proc pango_font_description_copy_static*(desc: PPangoFontDescription): PPangoFontDescription{. + cdecl, dynlib: pangolib, importc: "pango_font_description_copy_static".} +proc pango_font_description_hash*(desc: PPangoFontDescription): guint{.cdecl, + dynlib: pangolib, importc: "pango_font_description_hash".} +proc pango_font_description_equal*(desc1: PPangoFontDescription, + desc2: PPangoFontDescription): gboolean{. + cdecl, dynlib: pangolib, importc: "pango_font_description_equal".} +proc pango_font_description_free*(desc: PPangoFontDescription){.cdecl, + dynlib: pangolib, importc: "pango_font_description_free".} +proc pango_font_descriptions_free*(descs: var PPangoFontDescription, + n_descs: int32){.cdecl, dynlib: pangolib, + importc: "pango_font_descriptions_free".} +proc pango_font_description_set_family*(desc: PPangoFontDescription, + family: cstring){.cdecl, + dynlib: pangolib, importc: "pango_font_description_set_family".} +proc pango_font_description_set_family_static*(desc: PPangoFontDescription, + family: cstring){.cdecl, dynlib: pangolib, + importc: "pango_font_description_set_family_static".} +proc pango_font_description_get_family*(desc: PPangoFontDescription): cstring{. + cdecl, dynlib: pangolib, importc: "pango_font_description_get_family".} +proc pango_font_description_set_style*(desc: PPangoFontDescription, + style: TPangoStyle){.cdecl, + dynlib: pangolib, importc: "pango_font_description_set_style".} +proc pango_font_description_get_style*(desc: PPangoFontDescription): TPangoStyle{. + cdecl, dynlib: pangolib, importc: "pango_font_description_get_style".} +proc pango_font_description_set_variant*(desc: PPangoFontDescription, + variant: TPangoVariant){.cdecl, dynlib: pangolib, + importc: "pango_font_description_set_variant".} +proc pango_font_description_get_variant*(desc: PPangoFontDescription): TPangoVariant{. + cdecl, dynlib: pangolib, importc: "pango_font_description_get_variant".} +proc pango_font_description_set_weight*(desc: PPangoFontDescription, + weight: TPangoWeight){.cdecl, + dynlib: pangolib, importc: "pango_font_description_set_weight".} +proc pango_font_description_get_weight*(desc: PPangoFontDescription): TPangoWeight{. + cdecl, dynlib: pangolib, importc: "pango_font_description_get_weight".} +proc pango_font_description_set_stretch*(desc: PPangoFontDescription, + stretch: TPangoStretch){.cdecl, dynlib: pangolib, + importc: "pango_font_description_set_stretch".} +proc pango_font_description_get_stretch*(desc: PPangoFontDescription): TPangoStretch{. + cdecl, dynlib: pangolib, importc: "pango_font_description_get_stretch".} +proc pango_font_description_set_size*(desc: PPangoFontDescription, size: gint){. + cdecl, dynlib: pangolib, importc: "pango_font_description_set_size".} +proc pango_font_description_get_size*(desc: PPangoFontDescription): gint{.cdecl, + dynlib: pangolib, importc: "pango_font_description_get_size".} +proc pango_font_description_set_absolute_size*(desc: PPangoFontDescription, + size: float64){.cdecl, dynlib: pangolib, + importc: "pango_font_description_set_absolute_size".} +proc pango_font_description_get_size_is_absolute*(desc: PPangoFontDescription, + size: float64): gboolean{.cdecl, dynlib: pangolib, importc: "pango_font_description_get_size_is_absolute".} +proc pango_font_description_get_set_fields*(desc: PPangoFontDescription): TPangoFontMask{. + cdecl, dynlib: pangolib, importc: "pango_font_description_get_set_fields".} +proc pango_font_description_unset_fields*(desc: PPangoFontDescription, + to_unset: TPangoFontMask){.cdecl, dynlib: pangolib, + importc: "pango_font_description_unset_fields".} +proc pango_font_description_merge*(desc: PPangoFontDescription, + desc_to_merge: PPangoFontDescription, + replace_existing: gboolean){.cdecl, + dynlib: pangolib, importc: "pango_font_description_merge".} +proc pango_font_description_merge_static*(desc: PPangoFontDescription, + desc_to_merge: PPangoFontDescription, replace_existing: gboolean){.cdecl, + dynlib: pangolib, importc: "pango_font_description_merge_static".} +proc pango_font_description_better_match*(desc: PPangoFontDescription, + old_match: PPangoFontDescription, new_match: PPangoFontDescription): gboolean{. + cdecl, dynlib: pangolib, importc: "pango_font_description_better_match".} +proc pango_font_description_from_string*(str: cstring): PPangoFontDescription{. + cdecl, dynlib: pangolib, importc: "pango_font_description_from_string".} +proc pango_font_description_to_string*(desc: PPangoFontDescription): cstring{. + cdecl, dynlib: pangolib, importc: "pango_font_description_to_string".} +proc pango_font_description_to_filename*(desc: PPangoFontDescription): cstring{. + cdecl, dynlib: pangolib, importc: "pango_font_description_to_filename".} +proc PANGO_TYPE_FONT_METRICS*(): GType +proc pango_font_metrics_get_type*(): GType{.cdecl, dynlib: pangolib, + importc: "pango_font_metrics_get_type".} +proc pango_font_metrics_ref*(metrics: PPangoFontMetrics): PPangoFontMetrics{. + cdecl, dynlib: pangolib, importc: "pango_font_metrics_ref".} +proc pango_font_metrics_unref*(metrics: PPangoFontMetrics){.cdecl, + dynlib: pangolib, importc: "pango_font_metrics_unref".} +proc pango_font_metrics_get_ascent*(metrics: PPangoFontMetrics): int32{.cdecl, + dynlib: pangolib, importc: "pango_font_metrics_get_ascent".} +proc pango_font_metrics_get_descent*(metrics: PPangoFontMetrics): int32{.cdecl, + dynlib: pangolib, importc: "pango_font_metrics_get_descent".} +proc pango_font_metrics_get_approximate_char_width*(metrics: PPangoFontMetrics): int32{. + cdecl, dynlib: pangolib, + importc: "pango_font_metrics_get_approximate_char_width".} +proc pango_font_metrics_get_approximate_digit_width*(metrics: PPangoFontMetrics): int32{. + cdecl, dynlib: pangolib, + importc: "pango_font_metrics_get_approximate_digit_width".} +proc PANGO_TYPE_FONT_FAMILY*(): GType +proc PANGO_FONT_FAMILY*(anObject: Pointer): PPangoFontFamily +proc PANGO_IS_FONT_FAMILY*(anObject: Pointer): bool +proc pango_font_family_get_type*(): GType{.cdecl, dynlib: pangolib, + importc: "pango_font_family_get_type".} +proc pango_font_family_list_faces*(family: PPangoFontFamily, + faces: var openarray[ptr PPangoFontFace]){. + cdecl, dynlib: pangolib, importc: "pango_font_family_list_faces".} +proc pango_font_family_get_name*(family: PPangoFontFamily): cstring{.cdecl, + dynlib: pangolib, importc: "pango_font_family_get_name".} +proc PANGO_TYPE_FONT_FACE*(): GType +proc PANGO_FONT_FACE*(anObject: pointer): PPangoFontFace +proc PANGO_IS_FONT_FACE*(anObject: pointer): bool +proc pango_font_face_get_type*(): GType{.cdecl, dynlib: pangolib, + importc: "pango_font_face_get_type".} +proc pango_font_face_describe*(face: PPangoFontFace): PPangoFontDescription{. + cdecl, dynlib: pangolib, importc: "pango_font_face_describe".} +proc pango_font_face_get_face_name*(face: PPangoFontFace): cstring{.cdecl, + dynlib: pangolib, importc: "pango_font_face_get_face_name".} +proc PANGO_TYPE_FONT*(): GType +proc PANGO_FONT*(anObject: pointer): PPangoFont +proc PANGO_IS_FONT*(anObject: pointer): bool +proc pango_font_get_type*(): GType{.cdecl, dynlib: pangolib, + importc: "pango_font_get_type".} +proc pango_font_describe*(font: PPangoFont): PPangoFontDescription{.cdecl, + dynlib: pangolib, importc: "pango_font_describe".} +proc pango_font_get_coverage*(font: PPangoFont, language: PPangoLanguage): PPangoCoverage{. + cdecl, dynlib: pangolib, importc: "pango_font_get_coverage".} +proc pango_font_find_shaper*(font: PPangoFont, language: PPangoLanguage, + ch: guint32): PPangoEngineShape{.cdecl, + dynlib: pangolib, importc: "pango_font_find_shaper".} +proc pango_font_get_metrics*(font: PPangoFont, language: PPangoLanguage): PPangoFontMetrics{. + cdecl, dynlib: pangolib, importc: "pango_font_get_metrics".} +proc pango_font_get_glyph_extents*(font: PPangoFont, glyph: TPangoGlyph, + ink_rect: PPangoRectangle, + logical_rect: PPangoRectangle){.cdecl, + dynlib: pangolib, importc: "pango_font_get_glyph_extents".} +proc PANGO_TYPE_FONT_MAP*(): GType +proc PANGO_FONT_MAP*(anObject: pointer): PPangoFontMap +proc PANGO_IS_FONT_MAP*(anObject: pointer): bool +proc pango_font_map_get_type*(): GType{.cdecl, dynlib: pangolib, + importc: "pango_font_map_get_type".} +proc pango_font_map_load_font*(fontmap: PPangoFontMap, context: PPangoContext, + desc: PPangoFontDescription): PPangoFont{.cdecl, + dynlib: pangolib, importc: "pango_font_map_load_font".} +proc pango_font_map_load_fontset*(fontmap: PPangoFontMap, + context: PPangoContext, + desc: PPangoFontDescription, + language: PPangoLanguage): PPangoFontset{. + cdecl, dynlib: pangolib, importc: "pango_font_map_load_fontset".} +proc pango_font_map_list_families*(fontmap: PPangoFontMap, + families: var openarray[ptr PPangoFontFamily]){.cdecl, + dynlib: pangolib, importc: "pango_font_map_list_families".} +const + bm_TPangoGlyphVisAttr_is_cluster_start* = 0x00000001'i16 + bp_TPangoGlyphVisAttr_is_cluster_start* = 0'i16 + +proc is_cluster_start*(a: var TPangoGlyphVisAttr): guint +proc set_is_cluster_start*(a: var TPangoGlyphVisAttr, `is_cluster_start`: guint) +proc PANGO_TYPE_GLYPH_STRING*(): GType +proc pango_glyph_string_new*(): PPangoGlyphString{.cdecl, dynlib: pangolib, + importc: "pango_glyph_string_new".} +proc pango_glyph_string_set_size*(`string`: PPangoGlyphString, new_len: gint){. + cdecl, dynlib: pangolib, importc: "pango_glyph_string_set_size".} +proc pango_glyph_string_get_type*(): GType{.cdecl, dynlib: pangolib, + importc: "pango_glyph_string_get_type".} +proc pango_glyph_string_copy*(`string`: PPangoGlyphString): PPangoGlyphString{. + cdecl, dynlib: pangolib, importc: "pango_glyph_string_copy".} +proc pango_glyph_string_free*(`string`: PPangoGlyphString){.cdecl, + dynlib: pangolib, importc: "pango_glyph_string_free".} +proc pango_glyph_string_extents*(glyphs: PPangoGlyphString, font: PPangoFont, + ink_rect: PPangoRectangle, + logical_rect: PPangoRectangle){.cdecl, + dynlib: pangolib, importc: "pango_glyph_string_extents".} +proc pango_glyph_string_extents_range*(glyphs: PPangoGlyphString, start: int32, + theEnd: int32, font: PPangoFont, + ink_rect: PPangoRectangle, + logical_rect: PPangoRectangle){.cdecl, + dynlib: pangolib, importc: "pango_glyph_string_extents_range".} +proc pango_glyph_string_get_logical_widths*(glyphs: PPangoGlyphString, + text: cstring, length: int32, embedding_level: int32, + logical_widths: var int32){.cdecl, dynlib: pangolib, + importc: "pango_glyph_string_get_logical_widths".} +proc pango_glyph_string_index_to_x*(glyphs: PPangoGlyphString, text: cstring, + length: int32, analysis: PPangoAnalysis, + index: int32, trailing: gboolean, + x_pos: var int32){.cdecl, dynlib: pangolib, + importc: "pango_glyph_string_index_to_x".} +proc pango_glyph_string_x_to_index*(glyphs: PPangoGlyphString, text: cstring, + length: int32, analysis: PPangoAnalysis, + x_pos: int32, index, + trailing: var int32){.cdecl, + dynlib: pangolib, importc: "pango_glyph_string_x_to_index".} +proc pango_shape*(text: cstring, length: gint, analysis: PPangoAnalysis, + glyphs: PPangoGlyphString){.cdecl, dynlib: pangolib, + importc: "pango_shape".} +proc pango_reorder_items*(logical_items: PGList): PGList{.cdecl, + dynlib: pangolib, importc: "pango_reorder_items".} +proc pango_item_new*(): PPangoItem{.cdecl, dynlib: pangolib, + importc: "pango_item_new".} +proc pango_item_copy*(item: PPangoItem): PPangoItem{.cdecl, dynlib: pangolib, + importc: "pango_item_copy".} +proc pango_item_free*(item: PPangoItem){.cdecl, dynlib: pangolib, + importc: "pango_item_free".} +proc pango_item_split*(orig: PPangoItem, split_index: int32, split_offset: int32): PPangoItem{. + cdecl, dynlib: pangolib, importc: "pango_item_split".} +proc PANGO_TYPE_LAYOUT*(): GType +proc PANGO_LAYOUT*(anObject: pointer): PPangoLayout +proc PANGO_LAYOUT_CLASS*(klass: pointer): PPangoLayoutClass +proc PANGO_IS_LAYOUT*(anObject: pointer): bool +proc PANGO_IS_LAYOUT_CLASS*(klass: pointer): bool +proc PANGO_LAYOUT_GET_CLASS*(obj: PPangoLayout): PPangoLayoutClass +proc pango_layout_get_type*(): GType{.cdecl, dynlib: pangolib, + importc: "pango_layout_get_type".} +proc pango_layout_new*(context: PPangoContext): PPangoLayout{.cdecl, + dynlib: pangolib, importc: "pango_layout_new".} +proc pango_layout_copy*(src: PPangoLayout): PPangoLayout{.cdecl, + dynlib: pangolib, importc: "pango_layout_copy".} +proc pango_layout_get_context*(layout: PPangoLayout): PPangoContext{.cdecl, + dynlib: pangolib, importc: "pango_layout_get_context".} +proc pango_layout_set_attributes*(layout: PPangoLayout, attrs: PPangoAttrList){. + cdecl, dynlib: pangolib, importc: "pango_layout_set_attributes".} +proc pango_layout_get_attributes*(layout: PPangoLayout): PPangoAttrList{.cdecl, + dynlib: pangolib, importc: "pango_layout_get_attributes".} +proc pango_layout_set_text*(layout: PPangoLayout, text: cstring, length: int32){. + cdecl, dynlib: pangolib, importc: "pango_layout_set_text".} +proc pango_layout_get_text*(layout: PPangoLayout): cstring{.cdecl, + dynlib: pangolib, importc: "pango_layout_get_text".} +proc pango_layout_set_markup*(layout: PPangoLayout, markup: cstring, + length: int32){.cdecl, dynlib: pangolib, + importc: "pango_layout_set_markup".} +proc pango_layout_set_markup_with_accel*(layout: PPangoLayout, markup: cstring, + length: int32, accel_marker: gunichar, accel_char: Pgunichar){.cdecl, + dynlib: pangolib, importc: "pango_layout_set_markup_with_accel".} +proc pango_layout_set_font_description*(layout: PPangoLayout, + desc: PPangoFontDescription){.cdecl, + dynlib: pangolib, importc: "pango_layout_set_font_description".} +proc pango_layout_set_width*(layout: PPangoLayout, width: int32){.cdecl, + dynlib: pangolib, importc: "pango_layout_set_width".} +proc pango_layout_get_width*(layout: PPangoLayout): int32{.cdecl, + dynlib: pangolib, importc: "pango_layout_get_width".} +proc pango_layout_set_wrap*(layout: PPangoLayout, wrap: TPangoWrapMode){.cdecl, + dynlib: pangolib, importc: "pango_layout_set_wrap".} +proc pango_layout_get_wrap*(layout: PPangoLayout): TPangoWrapMode{.cdecl, + dynlib: pangolib, importc: "pango_layout_get_wrap".} +proc pango_layout_set_indent*(layout: PPangoLayout, indent: int32){.cdecl, + dynlib: pangolib, importc: "pango_layout_set_indent".} +proc pango_layout_get_indent*(layout: PPangoLayout): int32{.cdecl, + dynlib: pangolib, importc: "pango_layout_get_indent".} +proc pango_layout_set_spacing*(layout: PPangoLayout, spacing: int32){.cdecl, + dynlib: pangolib, importc: "pango_layout_set_spacing".} +proc pango_layout_get_spacing*(layout: PPangoLayout): int32{.cdecl, + dynlib: pangolib, importc: "pango_layout_get_spacing".} +proc pango_layout_set_justify*(layout: PPangoLayout, justify: gboolean){.cdecl, + dynlib: pangolib, importc: "pango_layout_set_justify".} +proc pango_layout_get_justify*(layout: PPangoLayout): gboolean{.cdecl, + dynlib: pangolib, importc: "pango_layout_get_justify".} +proc pango_layout_set_alignment*(layout: PPangoLayout, + alignment: TPangoAlignment){.cdecl, + dynlib: pangolib, importc: "pango_layout_set_alignment".} +proc pango_layout_get_alignment*(layout: PPangoLayout): TPangoAlignment{.cdecl, + dynlib: pangolib, importc: "pango_layout_get_alignment".} +proc pango_layout_set_tabs*(layout: PPangoLayout, tabs: PPangoTabArray){.cdecl, + dynlib: pangolib, importc: "pango_layout_set_tabs".} +proc pango_layout_get_tabs*(layout: PPangoLayout): PPangoTabArray{.cdecl, + dynlib: pangolib, importc: "pango_layout_get_tabs".} +proc pango_layout_set_single_paragraph_mode*(layout: PPangoLayout, + setting: gboolean){.cdecl, dynlib: pangolib, + importc: "pango_layout_set_single_paragraph_mode".} +proc pango_layout_get_single_paragraph_mode*(layout: PPangoLayout): gboolean{. + cdecl, dynlib: pangolib, importc: "pango_layout_get_single_paragraph_mode".} +proc pango_layout_context_changed*(layout: PPangoLayout){.cdecl, + dynlib: pangolib, importc: "pango_layout_context_changed".} +proc pango_layout_get_log_attrs*(layout: PPangoLayout, attrs: var PPangoLogAttr, + n_attrs: Pgint){.cdecl, dynlib: pangolib, + importc: "pango_layout_get_log_attrs".} +proc pango_layout_index_to_pos*(layout: PPangoLayout, index: int32, + pos: PPangoRectangle){.cdecl, dynlib: pangolib, + importc: "pango_layout_index_to_pos".} +proc pango_layout_get_cursor_pos*(layout: PPangoLayout, index: int32, + strong_pos: PPangoRectangle, + weak_pos: PPangoRectangle){.cdecl, + dynlib: pangolib, importc: "pango_layout_get_cursor_pos".} +proc pango_layout_move_cursor_visually*(layout: PPangoLayout, strong: gboolean, + old_index: int32, old_trailing: int32, + direction: int32, new_index, + new_trailing: var int32){.cdecl, + dynlib: pangolib, importc: "pango_layout_move_cursor_visually".} +proc pango_layout_xy_to_index*(layout: PPangoLayout, x: int32, y: int32, + index, trailing: var int32): gboolean{. + cdecl, dynlib: pangolib, importc: "pango_layout_xy_to_index".} +proc pango_layout_get_extents*(layout: PPangoLayout, ink_rect: PPangoRectangle, + logical_rect: PPangoRectangle){.cdecl, + dynlib: pangolib, importc: "pango_layout_get_extents".} +proc pango_layout_get_pixel_extents*(layout: PPangoLayout, + ink_rect: PPangoRectangle, + logical_rect: PPangoRectangle){.cdecl, + dynlib: pangolib, importc: "pango_layout_get_pixel_extents".} +proc pango_layout_get_size*(layout: PPangoLayout, width: var int32, + height: var int32){.cdecl, dynlib: pangolib, + importc: "pango_layout_get_size".} +proc pango_layout_get_pixel_size*(layout: PPangoLayout, width: var int32, + height: var int32){.cdecl, dynlib: pangolib, + importc: "pango_layout_get_pixel_size".} +proc pango_layout_get_line_count*(layout: PPangoLayout): int32{.cdecl, + dynlib: pangolib, importc: "pango_layout_get_line_count".} +proc pango_layout_get_line*(layout: PPangoLayout, line: int32): PPangoLayoutLine{. + cdecl, dynlib: pangolib, importc: "pango_layout_get_line".} +proc pango_layout_get_lines*(layout: PPangoLayout): PGSList{.cdecl, + dynlib: pangolib, importc: "pango_layout_get_lines".} +proc pango_layout_line_ref*(line: PPangoLayoutLine){.cdecl, dynlib: pangolib, + importc: "pango_layout_line_ref".} +proc pango_layout_line_unref*(line: PPangoLayoutLine){.cdecl, dynlib: pangolib, + importc: "pango_layout_line_unref".} +proc pango_layout_line_x_to_index*(line: PPangoLayoutLine, x_pos: int32, + index: var int32, trailing: var int32): gboolean{. + cdecl, dynlib: pangolib, importc: "pango_layout_line_x_to_index".} +proc pango_layout_line_index_to_x*(line: PPangoLayoutLine, index: int32, + trailing: gboolean, x_pos: var int32){.cdecl, + dynlib: pangolib, importc: "pango_layout_line_index_to_x".} +proc pango_layout_line_get_extents*(line: PPangoLayoutLine, + ink_rect: PPangoRectangle, + logical_rect: PPangoRectangle){.cdecl, + dynlib: pangolib, importc: "pango_layout_line_get_extents".} +proc pango_layout_line_get_pixel_extents*(layout_line: PPangoLayoutLine, + ink_rect: PPangoRectangle, logical_rect: PPangoRectangle){.cdecl, + dynlib: pangolib, importc: "pango_layout_line_get_pixel_extents".} +proc pango_layout_get_iter*(layout: PPangoLayout): PPangoLayoutIter{.cdecl, + dynlib: pangolib, importc: "pango_layout_get_iter".} +proc pango_layout_iter_free*(iter: PPangoLayoutIter){.cdecl, dynlib: pangolib, + importc: "pango_layout_iter_free".} +proc pango_layout_iter_get_index*(iter: PPangoLayoutIter): int32{.cdecl, + dynlib: pangolib, importc: "pango_layout_iter_get_index".} +proc pango_layout_iter_get_run*(iter: PPangoLayoutIter): PPangoLayoutRun{.cdecl, + dynlib: pangolib, importc: "pango_layout_iter_get_run".} +proc pango_layout_iter_get_line*(iter: PPangoLayoutIter): PPangoLayoutLine{. + cdecl, dynlib: pangolib, importc: "pango_layout_iter_get_line".} +proc pango_layout_iter_at_last_line*(iter: PPangoLayoutIter): gboolean{.cdecl, + dynlib: pangolib, importc: "pango_layout_iter_at_last_line".} +proc pango_layout_iter_next_char*(iter: PPangoLayoutIter): gboolean{.cdecl, + dynlib: pangolib, importc: "pango_layout_iter_next_char".} +proc pango_layout_iter_next_cluster*(iter: PPangoLayoutIter): gboolean{.cdecl, + dynlib: pangolib, importc: "pango_layout_iter_next_cluster".} +proc pango_layout_iter_next_run*(iter: PPangoLayoutIter): gboolean{.cdecl, + dynlib: pangolib, importc: "pango_layout_iter_next_run".} +proc pango_layout_iter_next_line*(iter: PPangoLayoutIter): gboolean{.cdecl, + dynlib: pangolib, importc: "pango_layout_iter_next_line".} +proc pango_layout_iter_get_char_extents*(iter: PPangoLayoutIter, + logical_rect: PPangoRectangle){.cdecl, dynlib: pangolib, importc: "pango_layout_iter_get_char_extents".} +proc pango_layout_iter_get_cluster_extents*(iter: PPangoLayoutIter, + ink_rect: PPangoRectangle, logical_rect: PPangoRectangle){.cdecl, + dynlib: pangolib, importc: "pango_layout_iter_get_cluster_extents".} +proc pango_layout_iter_get_run_extents*(iter: PPangoLayoutIter, + ink_rect: PPangoRectangle, + logical_rect: PPangoRectangle){.cdecl, + dynlib: pangolib, importc: "pango_layout_iter_get_run_extents".} +proc pango_layout_iter_get_line_extents*(iter: PPangoLayoutIter, + ink_rect: PPangoRectangle, logical_rect: PPangoRectangle){.cdecl, + dynlib: pangolib, importc: "pango_layout_iter_get_line_extents".} +proc pango_layout_iter_get_line_yrange*(iter: PPangoLayoutIter, y0: var int32, + y1: var int32){.cdecl, dynlib: pangolib, + importc: "pango_layout_iter_get_line_yrange".} +proc pango_layout_iter_get_layout_extents*(iter: PPangoLayoutIter, + ink_rect: PPangoRectangle, logical_rect: PPangoRectangle){.cdecl, + dynlib: pangolib, importc: "pango_layout_iter_get_layout_extents".} +proc pango_layout_iter_get_baseline*(iter: PPangoLayoutIter): int32{.cdecl, + dynlib: pangolib, importc: "pango_layout_iter_get_baseline".} +proc PANGO_TYPE_TAB_ARRAY*(): GType +proc pango_tab_array_new*(initial_size: gint, positions_in_pixels: gboolean): PPangoTabArray{. + cdecl, dynlib: pangolib, importc: "pango_tab_array_new".} +proc pango_tab_array_get_type*(): GType{.cdecl, dynlib: pangolib, + importc: "pango_tab_array_get_type".} +proc pango_tab_array_copy*(src: PPangoTabArray): PPangoTabArray{.cdecl, + dynlib: pangolib, importc: "pango_tab_array_copy".} +proc pango_tab_array_free*(tab_array: PPangoTabArray){.cdecl, dynlib: pangolib, + importc: "pango_tab_array_free".} +proc pango_tab_array_get_size*(tab_array: PPangoTabArray): gint{.cdecl, + dynlib: pangolib, importc: "pango_tab_array_get_size".} +proc pango_tab_array_resize*(tab_array: PPangoTabArray, new_size: gint){.cdecl, + dynlib: pangolib, importc: "pango_tab_array_resize".} +proc pango_tab_array_set_tab*(tab_array: PPangoTabArray, tab_index: gint, + alignment: TPangoTabAlign, location: gint){.cdecl, + dynlib: pangolib, importc: "pango_tab_array_set_tab".} +proc pango_tab_array_get_tab*(tab_array: PPangoTabArray, tab_index: gint, + alignment: PPangoTabAlign, location: Pgint){. + cdecl, dynlib: pangolib, importc: "pango_tab_array_get_tab".} +proc pango_tab_array_get_positions_in_pixels*(tab_array: PPangoTabArray): gboolean{. + cdecl, dynlib: pangolib, importc: "pango_tab_array_get_positions_in_pixels".} +proc PANGO_ASCENT*(rect: TPangoRectangle): int32 = + result = - int(rect.y) + +proc PANGO_DESCENT*(rect: TPangoRectangle): int32 = + result = int(rect.y) + int(rect.height) + +proc PANGO_LBEARING*(rect: TPangoRectangle): int32 = + result = rect.x + +proc PANGO_RBEARING*(rect: TPangoRectangle): int32 = + result = (rect.x) + (rect.width) + +proc PANGO_TYPE_LANGUAGE*(): GType = + result = pango_language_get_type() + +proc pango_language_to_string*(language: PPangoLanguage): cstring = + result = cast[cstring](language) + +proc PANGO_PIXELS*(d: int): int = + if d >= 0: + result = (d + (PANGO_SCALE div 2)) div PANGO_SCALE + else: + result = (d - (PANGO_SCALE div 2)) div PANGO_SCALE + +proc PANGO_TYPE_COLOR*(): GType = + result = pango_color_get_type() + +proc PANGO_TYPE_ATTR_LIST*(): GType = + result = pango_attr_list_get_type() + +proc is_line_break*(a: var TPangoLogAttr): guint = + result = (a.flag0 and bm_TPangoLogAttr_is_line_break) shr + bp_TPangoLogAttr_is_line_break + +proc set_is_line_break*(a: var TPangoLogAttr, `is_line_break`: guint) = + a.flag0 = a.flag0 or + (int16(`is_line_break` shl bp_TPangoLogAttr_is_line_break) and + bm_TPangoLogAttr_is_line_break) + +proc is_mandatory_break*(a: var TPangoLogAttr): guint = + result = (a.flag0 and bm_TPangoLogAttr_is_mandatory_break) shr + bp_TPangoLogAttr_is_mandatory_break + +proc set_is_mandatory_break*(a: var TPangoLogAttr, `is_mandatory_break`: guint) = + a.flag0 = a.flag0 or + (int16(`is_mandatory_break` shl bp_TPangoLogAttr_is_mandatory_break) and + bm_TPangoLogAttr_is_mandatory_break) + +proc is_char_break*(a: var TPangoLogAttr): guint = + result = (a.flag0 and bm_TPangoLogAttr_is_char_break) shr + bp_TPangoLogAttr_is_char_break + +proc set_is_char_break*(a: var TPangoLogAttr, `is_char_break`: guint) = + a.flag0 = a.flag0 or + (int16(`is_char_break` shl bp_TPangoLogAttr_is_char_break) and + bm_TPangoLogAttr_is_char_break) + +proc is_white*(a: var TPangoLogAttr): guint = + result = (a.flag0 and bm_TPangoLogAttr_is_white) shr + bp_TPangoLogAttr_is_white + +proc set_is_white*(a: var TPangoLogAttr, `is_white`: guint) = + a.flag0 = a.flag0 or + (int16(`is_white` shl bp_TPangoLogAttr_is_white) and + bm_TPangoLogAttr_is_white) + +proc is_cursor_position*(a: var TPangoLogAttr): guint = + result = (a.flag0 and bm_TPangoLogAttr_is_cursor_position) shr + bp_TPangoLogAttr_is_cursor_position + +proc set_is_cursor_position*(a: var TPangoLogAttr, `is_cursor_position`: guint) = + a.flag0 = a.flag0 or + (int16(`is_cursor_position` shl bp_TPangoLogAttr_is_cursor_position) and + bm_TPangoLogAttr_is_cursor_position) + +proc is_word_start*(a: var TPangoLogAttr): guint = + result = (a.flag0 and bm_TPangoLogAttr_is_word_start) shr + bp_TPangoLogAttr_is_word_start + +proc set_is_word_start*(a: var TPangoLogAttr, `is_word_start`: guint) = + a.flag0 = a.flag0 or + (int16(`is_word_start` shl bp_TPangoLogAttr_is_word_start) and + bm_TPangoLogAttr_is_word_start) + +proc is_word_end*(a: var TPangoLogAttr): guint = + result = (a.flag0 and bm_TPangoLogAttr_is_word_end) shr + bp_TPangoLogAttr_is_word_end + +proc set_is_word_end*(a: var TPangoLogAttr, `is_word_end`: guint) = + a.flag0 = a.flag0 or + (int16(`is_word_end` shl bp_TPangoLogAttr_is_word_end) and + bm_TPangoLogAttr_is_word_end) + +proc is_sentence_boundary*(a: var TPangoLogAttr): guint = + result = (a.flag0 and bm_TPangoLogAttr_is_sentence_boundary) shr + bp_TPangoLogAttr_is_sentence_boundary + +proc set_is_sentence_boundary*(a: var TPangoLogAttr, + `is_sentence_boundary`: guint) = + a.flag0 = a.flag0 or + (int16(`is_sentence_boundary` shl bp_TPangoLogAttr_is_sentence_boundary) and + bm_TPangoLogAttr_is_sentence_boundary) + +proc is_sentence_start*(a: var TPangoLogAttr): guint = + result = (a.flag0 and bm_TPangoLogAttr_is_sentence_start) shr + bp_TPangoLogAttr_is_sentence_start + +proc set_is_sentence_start*(a: var TPangoLogAttr, `is_sentence_start`: guint) = + a.flag0 = a.flag0 or + (int16(`is_sentence_start` shl bp_TPangoLogAttr_is_sentence_start) and + bm_TPangoLogAttr_is_sentence_start) + +proc is_sentence_end*(a: var TPangoLogAttr): guint = + result = (a.flag0 and bm_TPangoLogAttr_is_sentence_end) shr + bp_TPangoLogAttr_is_sentence_end + +proc set_is_sentence_end*(a: var TPangoLogAttr, `is_sentence_end`: guint) = + a.flag0 = a.flag0 or + (int16(`is_sentence_end` shl bp_TPangoLogAttr_is_sentence_end) and + bm_TPangoLogAttr_is_sentence_end) + +proc PANGO_TYPE_CONTEXT*(): GType = + result = pango_context_get_type() + +proc PANGO_CONTEXT*(anObject: pointer): PPangoContext = + result = cast[PPangoContext](G_TYPE_CHECK_INSTANCE_CAST(anObject, PANGO_TYPE_CONTEXT())) + +proc PANGO_CONTEXT_CLASS*(klass: pointer): PPangoContextClass = + result = cast[PPangoContextClass](G_TYPE_CHECK_CLASS_CAST(klass, PANGO_TYPE_CONTEXT())) + +proc PANGO_IS_CONTEXT*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, PANGO_TYPE_CONTEXT()) + +proc PANGO_IS_CONTEXT_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, PANGO_TYPE_CONTEXT()) + +proc PANGO_CONTEXT_GET_CLASS*(obj: PPangoContext): PPangoContextClass = + result = cast[PPangoContextClass](G_TYPE_INSTANCE_GET_CLASS(obj, PANGO_TYPE_CONTEXT())) + +proc PANGO_TYPE_FONTSET*(): GType = + result = pango_fontset_get_type() + +proc PANGO_FONTSET*(anObject: pointer): PPangoFontset = + result = cast[PPangoFontset](G_TYPE_CHECK_INSTANCE_CAST(anObject, PANGO_TYPE_FONTSET())) + +proc PANGO_IS_FONTSET*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, PANGO_TYPE_FONTSET()) + +proc PANGO_FONTSET_CLASS*(klass: pointer): PPangoFontsetClass = + result = cast[PPangoFontsetClass](G_TYPE_CHECK_CLASS_CAST(klass, PANGO_TYPE_FONTSET())) + +proc PANGO_IS_FONTSET_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, PANGO_TYPE_FONTSET()) + +proc PANGO_FONTSET_GET_CLASS*(obj: PPangoFontset): PPangoFontsetClass = + result = cast[PPangoFontsetClass](G_TYPE_INSTANCE_GET_CLASS(obj, PANGO_TYPE_FONTSET())) + +proc pango_fontset_simple_get_type(): GType {.importc, cdecl, dynlib: pangolib.} + +proc PANGO_TYPE_FONTSET_SIMPLE*(): GType = + result = pango_fontset_simple_get_type() + +proc PANGO_FONTSET_SIMPLE*(anObject: pointer): PPangoFontsetSimple = + result = cast[PPangoFontsetSimple](G_TYPE_CHECK_INSTANCE_CAST(anObject, + PANGO_TYPE_FONTSET_SIMPLE())) + +proc PANGO_IS_FONTSET_SIMPLE*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, PANGO_TYPE_FONTSET_SIMPLE()) + +proc PANGO_TYPE_FONT_DESCRIPTION*(): GType = + result = pango_font_description_get_type() + +proc PANGO_TYPE_FONT_METRICS*(): GType = + result = pango_font_metrics_get_type() + +proc PANGO_TYPE_FONT_FAMILY*(): GType = + result = pango_font_family_get_type() + +proc PANGO_FONT_FAMILY*(anObject: pointer): PPangoFontFamily = + result = cast[PPangoFontFamily](G_TYPE_CHECK_INSTANCE_CAST(anObject, + PANGO_TYPE_FONT_FAMILY())) + +proc PANGO_IS_FONT_FAMILY*(anObject: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, PANGO_TYPE_FONT_FAMILY()) + +proc PANGO_FONT_FAMILY_CLASS*(klass: Pointer): PPangoFontFamilyClass = + result = cast[PPangoFontFamilyClass](G_TYPE_CHECK_CLASS_CAST(klass, + PANGO_TYPE_FONT_FAMILY())) + +proc PANGO_IS_FONT_FAMILY_CLASS*(klass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, PANGO_TYPE_FONT_FAMILY()) + +proc PANGO_FONT_FAMILY_GET_CLASS*(obj: PPangoFontFamily): PPangoFontFamilyClass = + result = cast[PPangoFontFamilyClass](G_TYPE_INSTANCE_GET_CLASS(obj, + PANGO_TYPE_FONT_FAMILY())) + +proc PANGO_TYPE_FONT_FACE*(): GType = + result = pango_font_face_get_type() + +proc PANGO_FONT_FACE*(anObject: Pointer): PPangoFontFace = + result = cast[PPangoFontFace](G_TYPE_CHECK_INSTANCE_CAST(anObject, + PANGO_TYPE_FONT_FACE())) + +proc PANGO_IS_FONT_FACE*(anObject: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, PANGO_TYPE_FONT_FACE()) + +proc PANGO_FONT_FACE_CLASS*(klass: Pointer): PPangoFontFaceClass = + result = cast[PPangoFontFaceClass](G_TYPE_CHECK_CLASS_CAST(klass, + PANGO_TYPE_FONT_FACE())) + +proc PANGO_IS_FONT_FACE_CLASS*(klass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, PANGO_TYPE_FONT_FACE()) + +proc PANGO_FONT_FACE_GET_CLASS*(obj: Pointer): PPangoFontFaceClass = + result = cast[PPangoFontFaceClass](G_TYPE_INSTANCE_GET_CLASS(obj, + PANGO_TYPE_FONT_FACE())) + +proc PANGO_TYPE_FONT*(): GType = + result = pango_font_get_type() + +proc PANGO_FONT*(anObject: Pointer): PPangoFont = + result = cast[PPangoFont](G_TYPE_CHECK_INSTANCE_CAST(anObject, PANGO_TYPE_FONT())) + +proc PANGO_IS_FONT*(anObject: Pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, PANGO_TYPE_FONT()) + +proc PANGO_FONT_CLASS*(klass: Pointer): PPangoFontClass = + result = cast[PPangoFontClass](G_TYPE_CHECK_CLASS_CAST(klass, PANGO_TYPE_FONT())) + +proc PANGO_IS_FONT_CLASS*(klass: Pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, PANGO_TYPE_FONT()) + +proc PANGO_FONT_GET_CLASS*(obj: PPangoFont): PPangoFontClass = + result = cast[PPangoFontClass](G_TYPE_INSTANCE_GET_CLASS(obj, PANGO_TYPE_FONT())) + +proc PANGO_TYPE_FONT_MAP*(): GType = + result = pango_font_map_get_type() + +proc PANGO_FONT_MAP*(anObject: pointer): PPangoFontmap = + result = cast[PPangoFontmap](G_TYPE_CHECK_INSTANCE_CAST(anObject, + PANGO_TYPE_FONT_MAP())) + +proc PANGO_IS_FONT_MAP*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, PANGO_TYPE_FONT_MAP()) + +proc PANGO_FONT_MAP_CLASS*(klass: pointer): PPangoFontMapClass = + result = cast[PPangoFontMapClass](G_TYPE_CHECK_CLASS_CAST(klass, PANGO_TYPE_FONT_MAP())) + +proc PANGO_IS_FONT_MAP_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, PANGO_TYPE_FONT_MAP()) + +proc PANGO_FONT_MAP_GET_CLASS*(obj: PPangoFontMap): PPangoFontMapClass = + result = cast[PPangoFontMapClass](G_TYPE_INSTANCE_GET_CLASS(obj, PANGO_TYPE_FONT_MAP())) + +proc is_cluster_start*(a: var TPangoGlyphVisAttr): guint = + result = (a.flag0 and bm_TPangoGlyphVisAttr_is_cluster_start) shr + bp_TPangoGlyphVisAttr_is_cluster_start + +proc set_is_cluster_start*(a: var TPangoGlyphVisAttr, `is_cluster_start`: guint) = + a.flag0 = a.flag0 or + (int16(`is_cluster_start` shl bp_TPangoGlyphVisAttr_is_cluster_start) and + bm_TPangoGlyphVisAttr_is_cluster_start) + +proc PANGO_TYPE_GLYPH_STRING*(): GType = + result = pango_glyph_string_get_type() + +proc PANGO_TYPE_LAYOUT*(): GType = + result = pango_layout_get_type() + +proc PANGO_LAYOUT*(anObject: pointer): PPangoLayout = + result = cast[PPangoLayout](G_TYPE_CHECK_INSTANCE_CAST(anObject, PANGO_TYPE_LAYOUT())) + +proc PANGO_LAYOUT_CLASS*(klass: pointer): PPangoLayoutClass = + result = cast[PPangoLayoutClass](G_TYPE_CHECK_CLASS_CAST(klass, PANGO_TYPE_LAYOUT())) + +proc PANGO_IS_LAYOUT*(anObject: pointer): bool = + result = G_TYPE_CHECK_INSTANCE_TYPE(anObject, PANGO_TYPE_LAYOUT()) + +proc PANGO_IS_LAYOUT_CLASS*(klass: pointer): bool = + result = G_TYPE_CHECK_CLASS_TYPE(klass, PANGO_TYPE_LAYOUT()) + +proc PANGO_LAYOUT_GET_CLASS*(obj: PPangoLayout): PPangoLayoutClass = + result = cast[PPangoLayoutClass](G_TYPE_INSTANCE_GET_CLASS(obj, PANGO_TYPE_LAYOUT())) + +proc PANGO_TYPE_TAB_ARRAY*(): GType = + result = pango_tab_array_get_type() diff --git a/lib/oldwrappers/gtk/pangoutils.nim b/lib/oldwrappers/gtk/pangoutils.nim new file mode 100644 index 000000000..e6f3ab94c --- /dev/null +++ b/lib/oldwrappers/gtk/pangoutils.nim @@ -0,0 +1,46 @@ +{.deadCodeElim: on.} + +import + glib2, pango + +type + pint32* = ptr int32 + +proc pango_split_file_list*(str: cstring): PPchar{.cdecl, dynlib: pangolib, + importc: "pango_split_file_list".} +proc pango_trim_string*(str: cstring): cstring{.cdecl, dynlib: pangolib, + importc: "pango_trim_string".} +proc pango_read_line*(stream: TFile, str: PGString): gint{.cdecl, + dynlib: pangolib, importc: "pango_read_line".} +proc pango_skip_space*(pos: PPchar): gboolean{.cdecl, dynlib: pangolib, + importc: "pango_skip_space".} +proc pango_scan_word*(pos: PPchar, OutStr: PGString): gboolean{.cdecl, + dynlib: pangolib, importc: "pango_scan_word".} +proc pango_scan_string*(pos: PPchar, OutStr: PGString): gboolean{.cdecl, + dynlib: pangolib, importc: "pango_scan_string".} +proc pango_scan_int*(pos: PPchar, OutInt: pint32): gboolean{.cdecl, + dynlib: pangolib, importc: "pango_scan_int".} +proc pango_config_key_get(key: cstring): cstring{.cdecl, dynlib: pangolib, + importc: "pango_config_key_get".} +proc pango_lookup_aliases(fontname: cstring, families: PPPchar, + n_families: pint32){.cdecl, dynlib: pangolib, + importc: "pango_lookup_aliases".} +proc pango_parse_style*(str: cstring, style: PPangoStyle, warn: gboolean): gboolean{. + cdecl, dynlib: pangolib, importc: "pango_parse_style".} +proc pango_parse_variant*(str: cstring, variant: PPangoVariant, warn: gboolean): gboolean{. + cdecl, dynlib: pangolib, importc: "pango_parse_variant".} +proc pango_parse_weight*(str: cstring, weight: PPangoWeight, warn: gboolean): gboolean{. + cdecl, dynlib: pangolib, importc: "pango_parse_weight".} +proc pango_parse_stretch*(str: cstring, stretch: PPangoStretch, warn: gboolean): gboolean{. + cdecl, dynlib: pangolib, importc: "pango_parse_stretch".} +proc pango_get_sysconf_subdirectory(): cstring{.cdecl, dynlib: pangolib, + importc: "pango_get_sysconf_subdirectory".} +proc pango_get_lib_subdirectory(): cstring{.cdecl, dynlib: pangolib, + importc: "pango_get_lib_subdirectory".} +proc pango_log2vis_get_embedding_levels*(str: Pgunichar, len: int32, + pbase_dir: PPangoDirection, embedding_level_list: Pguint8): gboolean{.cdecl, + dynlib: pangolib, importc: "pango_log2vis_get_embedding_levels".} +proc pango_get_mirror_char*(ch: gunichar, mirrored_ch: Pgunichar): gboolean{. + cdecl, dynlib: pangolib, importc: "pango_get_mirror_char".} +proc pango_language_get_sample_string*(language: PPangoLanguage): cstring{. + cdecl, dynlib: pangolib, importc: "pango_language_get_sample_string".} diff --git a/lib/oldwrappers/iup.nim b/lib/oldwrappers/iup.nim new file mode 100644 index 000000000..c37d31047 --- /dev/null +++ b/lib/oldwrappers/iup.nim @@ -0,0 +1,945 @@ +# +# Binding for the IUP GUI toolkit +# (c) 2010 Andreas Rumpf +# C header files translated by hand +# Licence of IUP follows: + + +# **************************************************************************** +# Copyright (C) 1994-2009 Tecgraf, PUC-Rio. +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# **************************************************************************** + +{.deadCodeElim: on.} + +when defined(windows): + const dllname = "iup(30|27|26|25|24).dll" +elif defined(macosx): + const dllname = "libiup(3.0|2.7|2.6|2.5|2.4).dylib" +else: + const dllname = "libiup(3.0|2.7|2.6|2.5|2.4).so.1" + +const + IUP_NAME* = "IUP - Portable User Interface" + IUP_COPYRIGHT* = "Copyright (C) 1994-2009 Tecgraf, PUC-Rio." + IUP_DESCRIPTION* = "Portable toolkit for building graphical user interfaces." + constIUP_VERSION* = "3.0" + constIUP_VERSION_NUMBER* = 300000 + constIUP_VERSION_DATE* = "2009/07/18" + +type + Ihandle {.pure.} = object + PIhandle* = ptr Ihandle + + Icallback* = proc (arg: PIhandle): cint {.cdecl.} + +# pre-definided dialogs +proc FileDlg*: PIhandle {.importc: "IupFileDlg", dynlib: dllname, cdecl.} +proc MessageDlg*: PIhandle {.importc: "IupMessageDlg", dynlib: dllname, cdecl.} +proc ColorDlg*: PIhandle {.importc: "IupColorDlg", dynlib: dllname, cdecl.} +proc FontDlg*: PIhandle {.importc: "IupFontDlg", dynlib: dllname, cdecl.} + +proc GetFile*(arq: cstring): cint {. + importc: "IupGetFile", dynlib: dllname, cdecl.} +proc Message*(title, msg: cstring) {. + importc: "IupMessage", dynlib: dllname, cdecl.} +proc Messagef*(title, format: cstring) {. + importc: "IupMessagef", dynlib: dllname, cdecl, varargs.} +proc Alarm*(title, msg, b1, b2, b3: cstring): cint {. + importc: "IupAlarm", dynlib: dllname, cdecl.} +proc Scanf*(format: cstring): cint {. + importc: "IupScanf", dynlib: dllname, cdecl, varargs.} +proc ListDialog*(theType: cint, title: cstring, size: cint, + list: cstringArray, op, max_col, max_lin: cint, + marks: ptr cint): cint {. + importc: "IupListDialog", dynlib: dllname, cdecl.} +proc GetText*(title, text: cstring): cint {. + importc: "IupGetText", dynlib: dllname, cdecl.} +proc GetColor*(x, y: cint, r, g, b: var byte): cint {. + importc: "IupGetColor", dynlib: dllname, cdecl.} + +type + Iparamcb* = proc (dialog: PIhandle, param_index: cint, + user_data: pointer): cint {.cdecl.} + +proc GetParam*(title: cstring, action: Iparamcb, user_data: pointer, + format: cstring): cint {. + importc: "IupGetParam", cdecl, varargs, dynlib: dllname.} +proc GetParamv*(title: cstring, action: Iparamcb, user_data: pointer, + format: cstring, param_count, param_extra: cint, + param_data: pointer): cint {. + importc: "IupGetParamv", cdecl, dynlib: dllname.} + + +# Functions + +proc Open*(argc: ptr cint, argv: ptr cstringArray): cint {. + importc: "IupOpen", cdecl, dynlib: dllname.} +proc Close*() {.importc: "IupClose", cdecl, dynlib: dllname.} +proc ImageLibOpen*() {.importc: "IupImageLibOpen", cdecl, dynlib: dllname.} + +proc MainLoop*(): cint {.importc: "IupMainLoop", cdecl, dynlib: dllname.} +proc LoopStep*(): cint {.importc: "IupLoopStep", cdecl, dynlib: dllname.} +proc MainLoopLevel*(): cint {.importc: "IupMainLoopLevel", cdecl, dynlib: dllname.} +proc Flush*() {.importc: "IupFlush", cdecl, dynlib: dllname.} +proc ExitLoop*() {.importc: "IupExitLoop", cdecl, dynlib: dllname.} + +proc Update*(ih: PIhandle) {.importc: "IupUpdate", cdecl, dynlib: dllname.} +proc UpdateChildren*(ih: PIhandle) {.importc: "IupUpdateChildren", cdecl, dynlib: dllname.} +proc Redraw*(ih: PIhandle, children: cint) {.importc: "IupRedraw", cdecl, dynlib: dllname.} +proc Refresh*(ih: PIhandle) {.importc: "IupRefresh", cdecl, dynlib: dllname.} + +proc MapFont*(iupfont: cstring): cstring {.importc: "IupMapFont", cdecl, dynlib: dllname.} +proc UnMapFont*(driverfont: cstring): cstring {.importc: "IupUnMapFont", cdecl, dynlib: dllname.} +proc Help*(url: cstring): cint {.importc: "IupHelp", cdecl, dynlib: dllname.} +proc Load*(filename: cstring): cstring {.importc: "IupLoad", cdecl, dynlib: dllname.} + +proc IupVersion*(): cstring {.importc: "IupVersion", cdecl, dynlib: dllname.} +proc IupVersionDate*(): cstring {.importc: "IupVersionDate", cdecl, dynlib: dllname.} +proc IupVersionNumber*(): cint {.importc: "IupVersionNumber", cdecl, dynlib: dllname.} +proc SetLanguage*(lng: cstring) {.importc: "IupSetLanguage", cdecl, dynlib: dllname.} +proc GetLanguage*(): cstring {.importc: "IupGetLanguage", cdecl, dynlib: dllname.} + +proc Destroy*(ih: PIhandle) {.importc: "IupDestroy", cdecl, dynlib: dllname.} +proc Detach*(child: PIhandle) {.importc: "IupDetach", cdecl, dynlib: dllname.} +proc Append*(ih, child: PIhandle): PIhandle {. + importc: "IupAppend", cdecl, dynlib: dllname.} +proc Insert*(ih, ref_child, child: PIhandle): PIhandle {. + importc: "IupInsert", cdecl, dynlib: dllname.} +proc GetChild*(ih: PIhandle, pos: cint): PIhandle {. + importc: "IupGetChild", cdecl, dynlib: dllname.} +proc GetChildPos*(ih, child: PIhandle): cint {. + importc: "IupGetChildPos", cdecl, dynlib: dllname.} +proc GetChildCount*(ih: PIhandle): cint {. + importc: "IupGetChildCount", cdecl, dynlib: dllname.} +proc GetNextChild*(ih, child: PIhandle): PIhandle {. + importc: "IupGetNextChild", cdecl, dynlib: dllname.} +proc GetBrother*(ih: PIhandle): PIhandle {. + importc: "IupGetBrother", cdecl, dynlib: dllname.} +proc GetParent*(ih: PIhandle): PIhandle {. + importc: "IupGetParent", cdecl, dynlib: dllname.} +proc GetDialog*(ih: PIhandle): PIhandle {. + importc: "IupGetDialog", cdecl, dynlib: dllname.} +proc GetDialogChild*(ih: PIhandle, name: cstring): PIhandle {. + importc: "IupGetDialogChild", cdecl, dynlib: dllname.} +proc Reparent*(ih, new_parent: PIhandle): cint {. + importc: "IupReparent", cdecl, dynlib: dllname.} + +proc Popup*(ih: PIhandle, x, y: cint): cint {. + importc: "IupPopup", cdecl, dynlib: dllname.} +proc Show*(ih: PIhandle): cint {. + importc: "IupShow", cdecl, dynlib: dllname.} +proc ShowXY*(ih: PIhandle, x, y: cint): cint {. + importc: "IupShowXY", cdecl, dynlib: dllname.} +proc Hide*(ih: PIhandle): cint {. + importc: "IupHide", cdecl, dynlib: dllname.} +proc Map*(ih: PIhandle): cint {. + importc: "IupMap", cdecl, dynlib: dllname.} +proc Unmap*(ih: PIhandle) {. + importc: "IupUnmap", cdecl, dynlib: dllname.} + +proc SetAttribute*(ih: PIhandle, name, value: cstring) {. + importc: "IupSetAttribute", cdecl, dynlib: dllname.} +proc StoreAttribute*(ih: PIhandle, name, value: cstring) {. + importc: "IupStoreAttribute", cdecl, dynlib: dllname.} +proc SetAttributes*(ih: PIhandle, str: cstring): PIhandle {. + importc: "IupSetAttributes", cdecl, dynlib: dllname.} +proc GetAttribute*(ih: PIhandle, name: cstring): cstring {. + importc: "IupGetAttribute", cdecl, dynlib: dllname.} +proc GetAttributes*(ih: PIhandle): cstring {. + importc: "IupGetAttributes", cdecl, dynlib: dllname.} +proc GetInt*(ih: PIhandle, name: cstring): cint {. + importc: "IupGetInt", cdecl, dynlib: dllname.} +proc GetInt2*(ih: PIhandle, name: cstring): cint {. + importc: "IupGetInt2", cdecl, dynlib: dllname.} +proc GetIntInt*(ih: PIhandle, name: cstring, i1, i2: var cint): cint {. + importc: "IupGetIntInt", cdecl, dynlib: dllname.} +proc GetFloat*(ih: PIhandle, name: cstring): cfloat {. + importc: "IupGetFloat", cdecl, dynlib: dllname.} +proc SetfAttribute*(ih: PIhandle, name, format: cstring) {. + importc: "IupSetfAttribute", cdecl, dynlib: dllname, varargs.} +proc GetAllAttributes*(ih: PIhandle, names: cstringArray, n: cint): cint {. + importc: "IupGetAllAttributes", cdecl, dynlib: dllname.} +proc SetAtt*(handle_name: cstring, ih: PIhandle, name: cstring): PIhandle {. + importc: "IupSetAtt", cdecl, dynlib: dllname, varargs.} + +proc SetGlobal*(name, value: cstring) {. + importc: "IupSetGlobal", cdecl, dynlib: dllname.} +proc StoreGlobal*(name, value: cstring) {. + importc: "IupStoreGlobal", cdecl, dynlib: dllname.} +proc GetGlobal*(name: cstring): cstring {. + importc: "IupGetGlobal", cdecl, dynlib: dllname.} + +proc SetFocus*(ih: PIhandle): PIhandle {. + importc: "IupSetFocus", cdecl, dynlib: dllname.} +proc GetFocus*(): PIhandle {. + importc: "IupGetFocus", cdecl, dynlib: dllname.} +proc PreviousField*(ih: PIhandle): PIhandle {. + importc: "IupPreviousField", cdecl, dynlib: dllname.} +proc NextField*(ih: PIhandle): PIhandle {. + importc: "IupNextField", cdecl, dynlib: dllname.} + +proc GetCallback*(ih: PIhandle, name: cstring): Icallback {. + importc: "IupGetCallback", cdecl, dynlib: dllname.} +proc SetCallback*(ih: PIhandle, name: cstring, func: Icallback): Icallback {. + importc: "IupSetCallback", cdecl, dynlib: dllname.} +proc SetCallbacks*(ih: PIhandle, name: cstring, func: Icallback): PIhandle {. + importc: "IupSetCallbacks", cdecl, dynlib: dllname, varargs.} + +proc GetFunction*(name: cstring): Icallback {. + importc: "IupGetFunction", cdecl, dynlib: dllname.} +proc SetFunction*(name: cstring, func: Icallback): Icallback {. + importc: "IupSetFunction", cdecl, dynlib: dllname.} +proc GetActionName*(): cstring {. + importc: "IupGetActionName", cdecl, dynlib: dllname.} + +proc GetHandle*(name: cstring): PIhandle {. + importc: "IupGetHandle", cdecl, dynlib: dllname.} +proc SetHandle*(name: cstring, ih: PIhandle): PIhandle {. + importc: "IupSetHandle", cdecl, dynlib: dllname.} +proc GetAllNames*(names: cstringArray, n: cint): cint {. + importc: "IupGetAllNames", cdecl, dynlib: dllname.} +proc GetAllDialogs*(names: cstringArray, n: cint): cint {. + importc: "IupGetAllDialogs", cdecl, dynlib: dllname.} +proc GetName*(ih: PIhandle): cstring {. + importc: "IupGetName", cdecl, dynlib: dllname.} + +proc SetAttributeHandle*(ih: PIhandle, name: cstring, ih_named: PIhandle) {. + importc: "IupSetAttributeHandle", cdecl, dynlib: dllname.} +proc GetAttributeHandle*(ih: PIhandle, name: cstring): PIhandle {. + importc: "IupGetAttributeHandle", cdecl, dynlib: dllname.} + +proc GetClassName*(ih: PIhandle): cstring {. + importc: "IupGetClassName", cdecl, dynlib: dllname.} +proc GetClassType*(ih: PIhandle): cstring {. + importc: "IupGetClassType", cdecl, dynlib: dllname.} +proc GetClassAttributes*(classname: cstring, names: cstringArray, + n: cint): cint {. + importc: "IupGetClassAttributes", cdecl, dynlib: dllname.} +proc SaveClassAttributes*(ih: PIhandle) {. + importc: "IupSaveClassAttributes", cdecl, dynlib: dllname.} +proc SetClassDefaultAttribute*(classname, name, value: cstring) {. + importc: "IupSetClassDefaultAttribute", cdecl, dynlib: dllname.} + +proc Create*(classname: cstring): PIhandle {. + importc: "IupCreate", cdecl, dynlib: dllname.} +proc Createv*(classname: cstring, params: pointer): PIhandle {. + importc: "IupCreatev", cdecl, dynlib: dllname.} +proc Createp*(classname: cstring, first: pointer): PIhandle {. + importc: "IupCreatep", cdecl, dynlib: dllname, varargs.} + +proc Fill*(): PIhandle {.importc: "IupFill", cdecl, dynlib: dllname.} +proc Radio*(child: PIhandle): PIhandle {. + importc: "IupRadio", cdecl, dynlib: dllname.} +proc Vbox*(child: PIhandle): PIhandle {. + importc: "IupVbox", cdecl, dynlib: dllname, varargs.} +proc Vboxv*(children: ptr PIhandle): PIhandle {. + importc: "IupVboxv", cdecl, dynlib: dllname.} +proc Zbox*(child: PIhandle): PIhandle {. + importc: "IupZbox", cdecl, dynlib: dllname, varargs.} +proc Zboxv*(children: ptr PIhandle): PIhandle {. + importc: "IupZboxv", cdecl, dynlib: dllname.} +proc Hbox*(child: PIhandle): PIhandle {. + importc: "IupHbox", cdecl, dynlib: dllname, varargs.} +proc Hboxv*(children: ptr PIhandle): PIhandle {. + importc: "IupHboxv", cdecl, dynlib: dllname.} + +proc Normalizer*(ih_first: PIhandle): PIhandle {. + importc: "IupNormalizer", cdecl, dynlib: dllname, varargs.} +proc Normalizerv*(ih_list: ptr PIhandle): PIhandle {. + importc: "IupNormalizerv", cdecl, dynlib: dllname.} + +proc Cbox*(child: PIhandle): PIhandle {. + importc: "IupCbox", cdecl, dynlib: dllname, varargs.} +proc Cboxv*(children: ptr PIhandle): PIhandle {. + importc: "IupCboxv", cdecl, dynlib: dllname.} +proc Sbox*(child: PIhandle): PIhandle {. + importc: "IupSbox", cdecl, dynlib: dllname.} + +proc Frame*(child: PIhandle): PIhandle {. + importc: "IupFrame", cdecl, dynlib: dllname.} + +proc Image*(width, height: cint, pixmap: pointer): PIhandle {. + importc: "IupImage", cdecl, dynlib: dllname.} +proc ImageRGB*(width, height: cint, pixmap: pointer): PIhandle {. + importc: "IupImageRGB", cdecl, dynlib: dllname.} +proc ImageRGBA*(width, height: cint, pixmap: pointer): PIhandle {. + importc: "IupImageRGBA", cdecl, dynlib: dllname.} + +proc Item*(title, action: cstring): PIhandle {. + importc: "IupItem", cdecl, dynlib: dllname.} +proc Submenu*(title: cstring, child: PIhandle): PIhandle {. + importc: "IupSubmenu", cdecl, dynlib: dllname.} +proc Separator*(): PIhandle {. + importc: "IupSeparator", cdecl, dynlib: dllname.} +proc Menu*(child: PIhandle): PIhandle {. + importc: "IupMenu", cdecl, dynlib: dllname, varargs.} +proc Menuv*(children: ptr PIhandle): PIhandle {. + importc: "IupMenuv", cdecl, dynlib: dllname.} + +proc Button*(title, action: cstring): PIhandle {. + importc: "IupButton", cdecl, dynlib: dllname.} +proc Canvas*(action: cstring): PIhandle {. + importc: "IupCanvas", cdecl, dynlib: dllname.} +proc Dialog*(child: PIhandle): PIhandle {. + importc: "IupDialog", cdecl, dynlib: dllname.} +proc User*(): PIhandle {. + importc: "IupUser", cdecl, dynlib: dllname.} +proc Label*(title: cstring): PIhandle {. + importc: "IupLabel", cdecl, dynlib: dllname.} +proc List*(action: cstring): PIhandle {. + importc: "IupList", cdecl, dynlib: dllname.} +proc Text*(action: cstring): PIhandle {. + importc: "IupText", cdecl, dynlib: dllname.} +proc MultiLine*(action: cstring): PIhandle {. + importc: "IupMultiLine", cdecl, dynlib: dllname.} +proc Toggle*(title, action: cstring): PIhandle {. + importc: "IupToggle", cdecl, dynlib: dllname.} +proc Timer*(): PIhandle {. + importc: "IupTimer", cdecl, dynlib: dllname.} +proc ProgressBar*(): PIhandle {. + importc: "IupProgressBar", cdecl, dynlib: dllname.} +proc Val*(theType: cstring): PIhandle {. + importc: "IupVal", cdecl, dynlib: dllname.} +proc Tabs*(child: PIhandle): PIhandle {. + importc: "IupTabs", cdecl, dynlib: dllname, varargs.} +proc Tabsv*(children: ptr PIhandle): PIhandle {. + importc: "IupTabsv", cdecl, dynlib: dllname.} +proc Tree*(): PIhandle {.importc: "IupTree", cdecl, dynlib: dllname.} + +proc Spin*(): PIhandle {.importc: "IupSpin", cdecl, dynlib: dllname.} +proc Spinbox*(child: PIhandle): PIhandle {. + importc: "IupSpinbox", cdecl, dynlib: dllname.} + +# IupText utilities +proc TextConvertLinColToPos*(ih: PIhandle, lin, col: cint, pos: var cint) {. + importc: "IupTextConvertLinColToPos", cdecl, dynlib: dllname.} +proc TextConvertPosToLinCol*(ih: PIhandle, pos: cint, lin, col: var cint) {. + importc: "IupTextConvertPosToLinCol", cdecl, dynlib: dllname.} + +proc ConvertXYToPos*(ih: PIhandle, x, y: cint): cint {. + importc: "IupConvertXYToPos", cdecl, dynlib: dllname.} + +# IupTree utilities +proc TreeSetUserId*(ih: PIhandle, id: cint, userid: pointer): cint {. + importc: "IupTreeSetUserId", cdecl, dynlib: dllname.} +proc TreeGetUserId*(ih: PIhandle, id: cint): pointer {. + importc: "IupTreeGetUserId", cdecl, dynlib: dllname.} +proc TreeGetId*(ih: PIhandle, userid: pointer): cint {. + importc: "IupTreeGetId", cdecl, dynlib: dllname.} + +proc TreeSetAttribute*(ih: PIhandle, name: cstring, id: cint, value: cstring) {. + importc: "IupTreeSetAttribute", cdecl, dynlib: dllname.} +proc TreeStoreAttribute*(ih: PIhandle, name: cstring, id: cint, value: cstring) {. + importc: "IupTreeStoreAttribute", cdecl, dynlib: dllname.} +proc TreeGetAttribute*(ih: PIhandle, name: cstring, id: cint): cstring {. + importc: "IupTreeGetAttribute", cdecl, dynlib: dllname.} +proc TreeGetInt*(ih: PIhandle, name: cstring, id: cint): cint {. + importc: "IupTreeGetInt", cdecl, dynlib: dllname.} +proc TreeGetFloat*(ih: PIhandle, name: cstring, id: cint): cfloat {. + importc: "IupTreeGetFloat", cdecl, dynlib: dllname.} +proc TreeSetfAttribute*(ih: PIhandle, name: cstring, id: cint, format: cstring) {. + importc: "IupTreeSetfAttribute", cdecl, dynlib: dllname, varargs.} + + +# Common Return Values +const + IUP_ERROR* = cint(1) + IUP_NOERROR* = cint(0) + IUP_OPENED* = cint(-1) + IUP_INVALID* = cint(-1) + + # Callback Return Values + IUP_IGNORE* = cint(-1) + IUP_DEFAULT* = cint(-2) + IUP_CLOSE* = cint(-3) + IUP_CONTINUE* = cint(-4) + + # IupPopup and IupShowXY Parameter Values + IUP_CENTER* = cint(0xFFFF) + IUP_LEFT* = cint(0xFFFE) + IUP_RIGHT* = cint(0xFFFD) + IUP_MOUSEPOS* = cint(0xFFFC) + IUP_CURRENT* = cint(0xFFFB) + IUP_CENTERPARENT* = cint(0xFFFA) + IUP_TOP* = IUP_LEFT + IUP_BOTTOM* = IUP_RIGHT + + # SHOW_CB Callback Values + IUP_SHOW* = cint(0) + IUP_RESTORE* = cint(1) + IUP_MINIMIZE* = cint(2) + IUP_MAXIMIZE* = cint(3) + IUP_HIDE* = cint(4) + + # SCROLL_CB Callback Values + IUP_SBUP* = cint(0) + IUP_SBDN* = cint(1) + IUP_SBPGUP* = cint(2) + IUP_SBPGDN* = cint(3) + IUP_SBPOSV* = cint(4) + IUP_SBDRAGV* = cint(5) + IUP_SBLEFT* = cint(6) + IUP_SBRIGHT* = cint(7) + IUP_SBPGLEFT* = cint(8) + IUP_SBPGRIGHT* = cint(9) + IUP_SBPOSH* = cint(10) + IUP_SBDRAGH* = cint(11) + + # Mouse Button Values and Macros + IUP_BUTTON1* = cint(ord('1')) + IUP_BUTTON2* = cint(ord('2')) + IUP_BUTTON3* = cint(ord('3')) + IUP_BUTTON4* = cint(ord('4')) + IUP_BUTTON5* = cint(ord('5')) + +proc isShift*(s: cstring): bool = return s[0] == 'S' +proc isControl*(s: cstring): bool = return s[1] == 'C' +proc isButton1*(s: cstring): bool = return s[2] == '1' +proc isButton2*(s: cstring): bool = return s[3] == '2' +proc isbutton3*(s: cstring): bool = return s[4] == '3' +proc isDouble*(s: cstring): bool = return s[5] == 'D' +proc isAlt*(s: cstring): bool = return s[6] == 'A' +proc isSys*(s: cstring): bool = return s[7] == 'Y' +proc isButton4*(s: cstring): bool = return s[8] == '4' +proc isButton5*(s: cstring): bool = return s[9] == '5' + +# Pre-Defined Masks +const + IUP_MASK_FLOAT* = "[+/-]?(/d+/.?/d*|/./d+)" + IUP_MASK_UFLOAT* = "(/d+/.?/d*|/./d+)" + IUP_MASK_EFLOAT* = "[+/-]?(/d+/.?/d*|/./d+)([eE][+/-]?/d+)?" + IUP_MASK_INT* = "[+/-]?/d+" + IUP_MASK_UINT* = "/d+" + +# from 32 to 126, all character sets are equal, +# the key code i the same as the character code. +const + K_SP* = cint(ord(' ')) + K_exclam* = cint(ord('!')) + K_quotedbl* = cint(ord('\"')) + K_numbersign* = cint(ord('#')) + K_dollar* = cint(ord('$')) + K_percent* = cint(ord('%')) + K_ampersand* = cint(ord('&')) + K_apostrophe* = cint(ord('\'')) + K_parentleft* = cint(ord('(')) + K_parentright* = cint(ord(')')) + K_asterisk* = cint(ord('*')) + K_plus* = cint(ord('+')) + K_comma* = cint(ord(',')) + K_minus* = cint(ord('-')) + K_period* = cint(ord('.')) + K_slash* = cint(ord('/')) + K_0* = cint(ord('0')) + K_1* = cint(ord('1')) + K_2* = cint(ord('2')) + K_3* = cint(ord('3')) + K_4* = cint(ord('4')) + K_5* = cint(ord('5')) + K_6* = cint(ord('6')) + K_7* = cint(ord('7')) + K_8* = cint(ord('8')) + K_9* = cint(ord('9')) + K_colon* = cint(ord(':')) + K_semicolon* = cint(ord(';')) + K_less* = cint(ord('<')) + K_equal* = cint(ord('=')) + K_greater* = cint(ord('>')) + K_question* = cint(ord('?')) + K_at* = cint(ord('@')) + K_upperA* = cint(ord('A')) + K_upperB* = cint(ord('B')) + K_upperC* = cint(ord('C')) + K_upperD* = cint(ord('D')) + K_upperE* = cint(ord('E')) + K_upperF* = cint(ord('F')) + K_upperG* = cint(ord('G')) + K_upperH* = cint(ord('H')) + K_upperI* = cint(ord('I')) + K_upperJ* = cint(ord('J')) + K_upperK* = cint(ord('K')) + K_upperL* = cint(ord('L')) + K_upperM* = cint(ord('M')) + K_upperN* = cint(ord('N')) + K_upperO* = cint(ord('O')) + K_upperP* = cint(ord('P')) + K_upperQ* = cint(ord('Q')) + K_upperR* = cint(ord('R')) + K_upperS* = cint(ord('S')) + K_upperT* = cint(ord('T')) + K_upperU* = cint(ord('U')) + K_upperV* = cint(ord('V')) + K_upperW* = cint(ord('W')) + K_upperX* = cint(ord('X')) + K_upperY* = cint(ord('Y')) + K_upperZ* = cint(ord('Z')) + K_bracketleft* = cint(ord('[')) + K_backslash* = cint(ord('\\')) + K_bracketright* = cint(ord(']')) + K_circum* = cint(ord('^')) + K_underscore* = cint(ord('_')) + K_grave* = cint(ord('`')) + K_lowera* = cint(ord('a')) + K_lowerb* = cint(ord('b')) + K_lowerc* = cint(ord('c')) + K_lowerd* = cint(ord('d')) + K_lowere* = cint(ord('e')) + K_lowerf* = cint(ord('f')) + K_lowerg* = cint(ord('g')) + K_lowerh* = cint(ord('h')) + K_loweri* = cint(ord('i')) + K_lowerj* = cint(ord('j')) + K_lowerk* = cint(ord('k')) + K_lowerl* = cint(ord('l')) + K_lowerm* = cint(ord('m')) + K_lowern* = cint(ord('n')) + K_lowero* = cint(ord('o')) + K_lowerp* = cint(ord('p')) + K_lowerq* = cint(ord('q')) + K_lowerr* = cint(ord('r')) + K_lowers* = cint(ord('s')) + K_lowert* = cint(ord('t')) + K_loweru* = cint(ord('u')) + K_lowerv* = cint(ord('v')) + K_lowerw* = cint(ord('w')) + K_lowerx* = cint(ord('x')) + K_lowery* = cint(ord('y')) + K_lowerz* = cint(ord('z')) + K_braceleft* = cint(ord('{')) + K_bar* = cint(ord('|')) + K_braceright* = cint(ord('}')) + K_tilde* = cint(ord('~')) + +proc isPrint*(c: cint): bool = return c > 31 and c < 127 + +# also define the escape sequences that have keys associated +const + K_BS* = cint(ord('\b')) + K_TAB* = cint(ord('\t')) + K_LF* = cint(10) + K_CR* = cint(13) + +# IUP Extended Key Codes, range start at 128 +# Modifiers use 256 interval +# These key code definitions are specific to IUP + +proc isXkey*(c: cint): bool = return c > 128 +proc isShiftXkey*(c: cint): bool = return c > 256 and c < 512 +proc isCtrlXkey*(c: cint): bool = return c > 512 and c < 768 +proc isAltXkey*(c: cint): bool = return c > 768 and c < 1024 +proc isSysXkey*(c: cint): bool = return c > 1024 and c < 1280 + +proc IUPxCODE*(c: cint): cint = return c + cint(128) # Normal (must be above 128) +proc IUPsxCODE*(c: cint): cint = + return c + cint(256) + # Shift (must have range to include the standard keys and the normal + # extended keys, so must be above 256 + +proc IUPcxCODE*(c: cint): cint = return c + cint(512) # Ctrl +proc IUPmxCODE*(c: cint): cint = return c + cint(768) # Alt +proc IUPyxCODE*(c: cint): cint = return c + cint(1024) # Sys (Win or Apple) + +const + IUP_NUMMAXCODES* = 1280 ## 5*256=1280 Normal+Shift+Ctrl+Alt+Sys + + K_HOME* = IUPxCODE(1) + K_UP* = IUPxCODE(2) + K_PGUP* = IUPxCODE(3) + K_LEFT* = IUPxCODE(4) + K_MIDDLE* = IUPxCODE(5) + K_RIGHT* = IUPxCODE(6) + K_END* = IUPxCODE(7) + K_DOWN* = IUPxCODE(8) + K_PGDN* = IUPxCODE(9) + K_INS* = IUPxCODE(10) + K_DEL* = IUPxCODE(11) + K_PAUSE* = IUPxCODE(12) + K_ESC* = IUPxCODE(13) + K_ccedilla* = IUPxCODE(14) + K_F1* = IUPxCODE(15) + K_F2* = IUPxCODE(16) + K_F3* = IUPxCODE(17) + K_F4* = IUPxCODE(18) + K_F5* = IUPxCODE(19) + K_F6* = IUPxCODE(20) + K_F7* = IUPxCODE(21) + K_F8* = IUPxCODE(22) + K_F9* = IUPxCODE(23) + K_F10* = IUPxCODE(24) + K_F11* = IUPxCODE(25) + K_F12* = IUPxCODE(26) + K_Print* = IUPxCODE(27) + K_Menu* = IUPxCODE(28) + + K_acute* = IUPxCODE(29) # no Shift/Ctrl/Alt + + K_sHOME* = IUPsxCODE(K_HOME) + K_sUP* = IUPsxCODE(K_UP) + K_sPGUP* = IUPsxCODE(K_PGUP) + K_sLEFT* = IUPsxCODE(K_LEFT) + K_sMIDDLE* = IUPsxCODE(K_MIDDLE) + K_sRIGHT* = IUPsxCODE(K_RIGHT) + K_sEND* = IUPsxCODE(K_END) + K_sDOWN* = IUPsxCODE(K_DOWN) + K_sPGDN* = IUPsxCODE(K_PGDN) + K_sINS* = IUPsxCODE(K_INS) + K_sDEL* = IUPsxCODE(K_DEL) + K_sSP* = IUPsxCODE(K_SP) + K_sTAB* = IUPsxCODE(K_TAB) + K_sCR* = IUPsxCODE(K_CR) + K_sBS* = IUPsxCODE(K_BS) + K_sPAUSE* = IUPsxCODE(K_PAUSE) + K_sESC* = IUPsxCODE(K_ESC) + K_sCcedilla* = IUPsxCODE(K_ccedilla) + K_sF1* = IUPsxCODE(K_F1) + K_sF2* = IUPsxCODE(K_F2) + K_sF3* = IUPsxCODE(K_F3) + K_sF4* = IUPsxCODE(K_F4) + K_sF5* = IUPsxCODE(K_F5) + K_sF6* = IUPsxCODE(K_F6) + K_sF7* = IUPsxCODE(K_F7) + K_sF8* = IUPsxCODE(K_F8) + K_sF9* = IUPsxCODE(K_F9) + K_sF10* = IUPsxCODE(K_F10) + K_sF11* = IUPsxCODE(K_F11) + K_sF12* = IUPsxCODE(K_F12) + K_sPrint* = IUPsxCODE(K_Print) + K_sMenu* = IUPsxCODE(K_Menu) + + K_cHOME* = IUPcxCODE(K_HOME) + K_cUP* = IUPcxCODE(K_UP) + K_cPGUP* = IUPcxCODE(K_PGUP) + K_cLEFT* = IUPcxCODE(K_LEFT) + K_cMIDDLE* = IUPcxCODE(K_MIDDLE) + K_cRIGHT* = IUPcxCODE(K_RIGHT) + K_cEND* = IUPcxCODE(K_END) + K_cDOWN* = IUPcxCODE(K_DOWN) + K_cPGDN* = IUPcxCODE(K_PGDN) + K_cINS* = IUPcxCODE(K_INS) + K_cDEL* = IUPcxCODE(K_DEL) + K_cSP* = IUPcxCODE(K_SP) + K_cTAB* = IUPcxCODE(K_TAB) + K_cCR* = IUPcxCODE(K_CR) + K_cBS* = IUPcxCODE(K_BS) + K_cPAUSE* = IUPcxCODE(K_PAUSE) + K_cESC* = IUPcxCODE(K_ESC) + K_cCcedilla* = IUPcxCODE(K_ccedilla) + K_cF1* = IUPcxCODE(K_F1) + K_cF2* = IUPcxCODE(K_F2) + K_cF3* = IUPcxCODE(K_F3) + K_cF4* = IUPcxCODE(K_F4) + K_cF5* = IUPcxCODE(K_F5) + K_cF6* = IUPcxCODE(K_F6) + K_cF7* = IUPcxCODE(K_F7) + K_cF8* = IUPcxCODE(K_F8) + K_cF9* = IUPcxCODE(K_F9) + K_cF10* = IUPcxCODE(K_F10) + K_cF11* = IUPcxCODE(K_F11) + K_cF12* = IUPcxCODE(K_F12) + K_cPrint* = IUPcxCODE(K_Print) + K_cMenu* = IUPcxCODE(K_Menu) + + K_mHOME* = IUPmxCODE(K_HOME) + K_mUP* = IUPmxCODE(K_UP) + K_mPGUP* = IUPmxCODE(K_PGUP) + K_mLEFT* = IUPmxCODE(K_LEFT) + K_mMIDDLE* = IUPmxCODE(K_MIDDLE) + K_mRIGHT* = IUPmxCODE(K_RIGHT) + K_mEND* = IUPmxCODE(K_END) + K_mDOWN* = IUPmxCODE(K_DOWN) + K_mPGDN* = IUPmxCODE(K_PGDN) + K_mINS* = IUPmxCODE(K_INS) + K_mDEL* = IUPmxCODE(K_DEL) + K_mSP* = IUPmxCODE(K_SP) + K_mTAB* = IUPmxCODE(K_TAB) + K_mCR* = IUPmxCODE(K_CR) + K_mBS* = IUPmxCODE(K_BS) + K_mPAUSE* = IUPmxCODE(K_PAUSE) + K_mESC* = IUPmxCODE(K_ESC) + K_mCcedilla* = IUPmxCODE(K_ccedilla) + K_mF1* = IUPmxCODE(K_F1) + K_mF2* = IUPmxCODE(K_F2) + K_mF3* = IUPmxCODE(K_F3) + K_mF4* = IUPmxCODE(K_F4) + K_mF5* = IUPmxCODE(K_F5) + K_mF6* = IUPmxCODE(K_F6) + K_mF7* = IUPmxCODE(K_F7) + K_mF8* = IUPmxCODE(K_F8) + K_mF9* = IUPmxCODE(K_F9) + K_mF10* = IUPmxCODE(K_F10) + K_mF11* = IUPmxCODE(K_F11) + K_mF12* = IUPmxCODE(K_F12) + K_mPrint* = IUPmxCODE(K_Print) + K_mMenu* = IUPmxCODE(K_Menu) + + K_yHOME* = IUPyxCODE(K_HOME) + K_yUP* = IUPyxCODE(K_UP) + K_yPGUP* = IUPyxCODE(K_PGUP) + K_yLEFT* = IUPyxCODE(K_LEFT) + K_yMIDDLE* = IUPyxCODE(K_MIDDLE) + K_yRIGHT* = IUPyxCODE(K_RIGHT) + K_yEND* = IUPyxCODE(K_END) + K_yDOWN* = IUPyxCODE(K_DOWN) + K_yPGDN* = IUPyxCODE(K_PGDN) + K_yINS* = IUPyxCODE(K_INS) + K_yDEL* = IUPyxCODE(K_DEL) + K_ySP* = IUPyxCODE(K_SP) + K_yTAB* = IUPyxCODE(K_TAB) + K_yCR* = IUPyxCODE(K_CR) + K_yBS* = IUPyxCODE(K_BS) + K_yPAUSE* = IUPyxCODE(K_PAUSE) + K_yESC* = IUPyxCODE(K_ESC) + K_yCcedilla* = IUPyxCODE(K_ccedilla) + K_yF1* = IUPyxCODE(K_F1) + K_yF2* = IUPyxCODE(K_F2) + K_yF3* = IUPyxCODE(K_F3) + K_yF4* = IUPyxCODE(K_F4) + K_yF5* = IUPyxCODE(K_F5) + K_yF6* = IUPyxCODE(K_F6) + K_yF7* = IUPyxCODE(K_F7) + K_yF8* = IUPyxCODE(K_F8) + K_yF9* = IUPyxCODE(K_F9) + K_yF10* = IUPyxCODE(K_F10) + K_yF11* = IUPyxCODE(K_F11) + K_yF12* = IUPyxCODE(K_F12) + K_yPrint* = IUPyxCODE(K_Print) + K_yMenu* = IUPyxCODE(K_Menu) + + K_sPlus* = IUPsxCODE(K_plus) + K_sComma* = IUPsxCODE(K_comma) + K_sMinus* = IUPsxCODE(K_minus) + K_sPeriod* = IUPsxCODE(K_period) + K_sSlash* = IUPsxCODE(K_slash) + K_sAsterisk* = IUPsxCODE(K_asterisk) + + K_cupperA* = IUPcxCODE(K_upperA) + K_cupperB* = IUPcxCODE(K_upperB) + K_cupperC* = IUPcxCODE(K_upperC) + K_cupperD* = IUPcxCODE(K_upperD) + K_cupperE* = IUPcxCODE(K_upperE) + K_cupperF* = IUPcxCODE(K_upperF) + K_cupperG* = IUPcxCODE(K_upperG) + K_cupperH* = IUPcxCODE(K_upperH) + K_cupperI* = IUPcxCODE(K_upperI) + K_cupperJ* = IUPcxCODE(K_upperJ) + K_cupperK* = IUPcxCODE(K_upperK) + K_cupperL* = IUPcxCODE(K_upperL) + K_cupperM* = IUPcxCODE(K_upperM) + K_cupperN* = IUPcxCODE(K_upperN) + K_cupperO* = IUPcxCODE(K_upperO) + K_cupperP* = IUPcxCODE(K_upperP) + K_cupperQ* = IUPcxCODE(K_upperQ) + K_cupperR* = IUPcxCODE(K_upperR) + K_cupperS* = IUPcxCODE(K_upperS) + K_cupperT* = IUPcxCODE(K_upperT) + K_cupperU* = IUPcxCODE(K_upperU) + K_cupperV* = IUPcxCODE(K_upperV) + K_cupperW* = IUPcxCODE(K_upperW) + K_cupperX* = IUPcxCODE(K_upperX) + K_cupperY* = IUPcxCODE(K_upperY) + K_cupperZ* = IUPcxCODE(K_upperZ) + K_c1* = IUPcxCODE(K_1) + K_c2* = IUPcxCODE(K_2) + K_c3* = IUPcxCODE(K_3) + K_c4* = IUPcxCODE(K_4) + K_c5* = IUPcxCODE(K_5) + K_c6* = IUPcxCODE(K_6) + K_c7* = IUPcxCODE(K_7) + K_c8* = IUPcxCODE(K_8) + K_c9* = IUPcxCODE(K_9) + K_c0* = IUPcxCODE(K_0) + K_cPlus* = IUPcxCODE(K_plus) + K_cComma* = IUPcxCODE(K_comma) + K_cMinus* = IUPcxCODE(K_minus) + K_cPeriod* = IUPcxCODE(K_period) + K_cSlash* = IUPcxCODE(K_slash) + K_cSemicolon* = IUPcxCODE(K_semicolon) + K_cEqual* = IUPcxCODE(K_equal) + K_cBracketleft* = IUPcxCODE(K_bracketleft) + K_cBracketright* = IUPcxCODE(K_bracketright) + K_cBackslash* = IUPcxCODE(K_backslash) + K_cAsterisk* = IUPcxCODE(K_asterisk) + + K_mupperA* = IUPmxCODE(K_upperA) + K_mupperB* = IUPmxCODE(K_upperB) + K_mupperC* = IUPmxCODE(K_upperC) + K_mupperD* = IUPmxCODE(K_upperD) + K_mupperE* = IUPmxCODE(K_upperE) + K_mupperF* = IUPmxCODE(K_upperF) + K_mupperG* = IUPmxCODE(K_upperG) + K_mupperH* = IUPmxCODE(K_upperH) + K_mupperI* = IUPmxCODE(K_upperI) + K_mupperJ* = IUPmxCODE(K_upperJ) + K_mupperK* = IUPmxCODE(K_upperK) + K_mupperL* = IUPmxCODE(K_upperL) + K_mupperM* = IUPmxCODE(K_upperM) + K_mupperN* = IUPmxCODE(K_upperN) + K_mupperO* = IUPmxCODE(K_upperO) + K_mupperP* = IUPmxCODE(K_upperP) + K_mupperQ* = IUPmxCODE(K_upperQ) + K_mupperR* = IUPmxCODE(K_upperR) + K_mupperS* = IUPmxCODE(K_upperS) + K_mupperT* = IUPmxCODE(K_upperT) + K_mupperU* = IUPmxCODE(K_upperU) + K_mupperV* = IUPmxCODE(K_upperV) + K_mupperW* = IUPmxCODE(K_upperW) + K_mupperX* = IUPmxCODE(K_upperX) + K_mupperY* = IUPmxCODE(K_upperY) + K_mupperZ* = IUPmxCODE(K_upperZ) + K_m1* = IUPmxCODE(K_1) + K_m2* = IUPmxCODE(K_2) + K_m3* = IUPmxCODE(K_3) + K_m4* = IUPmxCODE(K_4) + K_m5* = IUPmxCODE(K_5) + K_m6* = IUPmxCODE(K_6) + K_m7* = IUPmxCODE(K_7) + K_m8* = IUPmxCODE(K_8) + K_m9* = IUPmxCODE(K_9) + K_m0* = IUPmxCODE(K_0) + K_mPlus* = IUPmxCODE(K_plus) + K_mComma* = IUPmxCODE(K_comma) + K_mMinus* = IUPmxCODE(K_minus) + K_mPeriod* = IUPmxCODE(K_period) + K_mSlash* = IUPmxCODE(K_slash) + K_mSemicolon* = IUPmxCODE(K_semicolon) + K_mEqual* = IUPmxCODE(K_equal) + K_mBracketleft* = IUPmxCODE(K_bracketleft) + K_mBracketright* = IUPmxCODE(K_bracketright) + K_mBackslash* = IUPmxCODE(K_backslash) + K_mAsterisk* = IUPmxCODE(K_asterisk) + + K_yA* = IUPyxCODE(K_upperA) + K_yB* = IUPyxCODE(K_upperB) + K_yC* = IUPyxCODE(K_upperC) + K_yD* = IUPyxCODE(K_upperD) + K_yE* = IUPyxCODE(K_upperE) + K_yF* = IUPyxCODE(K_upperF) + K_yG* = IUPyxCODE(K_upperG) + K_yH* = IUPyxCODE(K_upperH) + K_yI* = IUPyxCODE(K_upperI) + K_yJ* = IUPyxCODE(K_upperJ) + K_yK* = IUPyxCODE(K_upperK) + K_yL* = IUPyxCODE(K_upperL) + K_yM* = IUPyxCODE(K_upperM) + K_yN* = IUPyxCODE(K_upperN) + K_yO* = IUPyxCODE(K_upperO) + K_yP* = IUPyxCODE(K_upperP) + K_yQ* = IUPyxCODE(K_upperQ) + K_yR* = IUPyxCODE(K_upperR) + K_yS* = IUPyxCODE(K_upperS) + K_yT* = IUPyxCODE(K_upperT) + K_yU* = IUPyxCODE(K_upperU) + K_yV* = IUPyxCODE(K_upperV) + K_yW* = IUPyxCODE(K_upperW) + K_yX* = IUPyxCODE(K_upperX) + K_yY* = IUPyxCODE(K_upperY) + K_yZ* = IUPyxCODE(K_upperZ) + K_y1* = IUPyxCODE(K_1) + K_y2* = IUPyxCODE(K_2) + K_y3* = IUPyxCODE(K_3) + K_y4* = IUPyxCODE(K_4) + K_y5* = IUPyxCODE(K_5) + K_y6* = IUPyxCODE(K_6) + K_y7* = IUPyxCODE(K_7) + K_y8* = IUPyxCODE(K_8) + K_y9* = IUPyxCODE(K_9) + K_y0* = IUPyxCODE(K_0) + K_yPlus* = IUPyxCODE(K_plus) + K_yComma* = IUPyxCODE(K_comma) + K_yMinus* = IUPyxCODE(K_minus) + K_yPeriod* = IUPyxCODE(K_period) + K_ySlash* = IUPyxCODE(K_slash) + K_ySemicolon* = IUPyxCODE(K_semicolon) + K_yEqual* = IUPyxCODE(K_equal) + K_yBracketleft* = IUPyxCODE(K_bracketleft) + K_yBracketright* = IUPyxCODE(K_bracketright) + K_yBackslash* = IUPyxCODE(K_backslash) + K_yAsterisk* = IUPyxCODE(K_asterisk) + +proc ControlsOpen*(): cint {.cdecl, importc: "IupControlsOpen", dynlib: dllname.} +proc ControlsClose*() {.cdecl, importc: "IupControlsClose", dynlib: dllname.} + +proc OldValOpen*() {.cdecl, importc: "IupOldValOpen", dynlib: dllname.} +proc OldTabsOpen*() {.cdecl, importc: "IupOldTabsOpen", dynlib: dllname.} + +proc Colorbar*(): PIhandle {.cdecl, importc: "IupColorbar", dynlib: dllname.} +proc Cells*(): PIhandle {.cdecl, importc: "IupCells", dynlib: dllname.} +proc ColorBrowser*(): PIhandle {.cdecl, importc: "IupColorBrowser", dynlib: dllname.} +proc Gauge*(): PIhandle {.cdecl, importc: "IupGauge", dynlib: dllname.} +proc Dial*(theType: cstring): PIhandle {.cdecl, importc: "IupDial", dynlib: dllname.} +proc Matrix*(action: cstring): PIhandle {.cdecl, importc: "IupMatrix", dynlib: dllname.} + +# IupMatrix utilities +proc MatSetAttribute*(ih: PIhandle, name: cstring, lin, col: cint, + value: cstring) {. + cdecl, importc: "IupMatSetAttribute", dynlib: dllname.} +proc MatStoreAttribute*(ih: PIhandle, name: cstring, lin, col: cint, + value: cstring) {.cdecl, + importc: "IupMatStoreAttribute", dynlib: dllname.} +proc MatGetAttribute*(ih: PIhandle, name: cstring, lin, col: cint): cstring {. + cdecl, importc: "IupMatGetAttribute", dynlib: dllname.} +proc MatGetInt*(ih: PIhandle, name: cstring, lin, col: cint): cint {. + cdecl, importc: "IupMatGetInt", dynlib: dllname.} +proc MatGetFloat*(ih: PIhandle, name: cstring, lin, col: cint): cfloat {. + cdecl, importc: "IupMatGetFloat", dynlib: dllname.} +proc MatSetfAttribute*(ih: PIhandle, name: cstring, lin, col: cint, + format: cstring) {.cdecl, + importc: "IupMatSetfAttribute", + dynlib: dllname, varargs.} + +# Used by IupColorbar +const + IUP_PRIMARY* = -1 + IUP_SECONDARY* = -2 + +# Initialize PPlot widget class +proc PPlotOpen*() {.cdecl, importc: "IupPPlotOpen", dynlib: dllname.} + +# Create an PPlot widget instance +proc PPlot*: PIhandle {.cdecl, importc: "IupPPlot", dynlib: dllname.} + +# Add dataset to plot +proc PPlotBegin*(ih: PIhandle, strXdata: cint) {. + cdecl, importc: "IupPPlotBegin", dynlib: dllname.} +proc PPlotAdd*(ih: PIhandle, x, y: cfloat) {. + cdecl, importc: "IupPPlotAdd", dynlib: dllname.} +proc PPlotAddStr*(ih: PIhandle, x: cstring, y: cfloat) {. + cdecl, importc: "IupPPlotAddStr", dynlib: dllname.} +proc PPlotEnd*(ih: PIhandle): cint {. + cdecl, importc: "IupPPlotEnd", dynlib: dllname.} + +proc PPlotInsertStr*(ih: PIhandle, index, sample_index: cint, x: cstring, + y: cfloat) {.cdecl, importc: "IupPPlotInsertStr", + dynlib: dllname.} +proc PPlotInsert*(ih: PIhandle, index, sample_index: cint, + x, y: cfloat) {. + cdecl, importc: "IupPPlotInsert", dynlib: dllname.} + +# convert from plot coordinates to pixels +proc PPlotTransform*(ih: PIhandle, x, y: cfloat, ix, iy: var cint) {. + cdecl, importc: "IupPPlotTransform", dynlib: dllname.} + +# Plot on the given device. Uses a "cdCanvas*". +proc PPlotPaintTo*(ih: PIhandle, cnv: pointer) {. + cdecl, importc: "IupPPlotPaintTo", dynlib: dllname.} + + diff --git a/lib/oldwrappers/libcurl.nim b/lib/oldwrappers/libcurl.nim new file mode 100644 index 000000000..9cb352fb7 --- /dev/null +++ b/lib/oldwrappers/libcurl.nim @@ -0,0 +1,644 @@ +# +# $Id: header,v 1.1 2000/07/13 06:33:45 michael Exp $ +# This file is part of the Free Pascal packages +# Copyright (c) 1999-2000 by the Free Pascal development team +# +# See the file COPYING.FPC, included in this distribution, +# for details about the copyright. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# ********************************************************************** +# +# the curl library is governed by its own copyright, see the curl +# website for this. +# + +{.deadCodeElim: on.} + +import times + +when defined(windows): + const libname = "libcurl.dll" +elif defined(macosx): + const libname = "libcurl-7.19.3.dylib" +elif defined(unix): + const libname = "libcurl.so.4" + +type + Pcurl_calloc_callback* = ptr Tcurl_calloc_callback + Pcurl_closepolicy* = ptr Tcurl_closepolicy + Pcurl_forms* = ptr Tcurl_forms + Pcurl_ftpauth* = ptr Tcurl_ftpauth + Pcurl_ftpmethod* = ptr Tcurl_ftpmethod + Pcurl_ftpssl* = ptr Tcurl_ftpssl + PCURL_HTTP_VERSION* = ptr TCURL_HTTP_VERSION + Pcurl_httppost* = ptr Tcurl_httppost + PPcurl_httppost* = ptr Pcurl_httppost + Pcurl_infotype* = ptr Tcurl_infotype + Pcurl_lock_access* = ptr Tcurl_lock_access + Pcurl_lock_data* = ptr Tcurl_lock_data + Pcurl_malloc_callback* = ptr tcurl_malloc_callback + PCURL_NETRC_OPTION* = ptr TCURL_NETRC_OPTION + Pcurl_proxytype* = ptr Tcurl_proxytype + Pcurl_realloc_callback* = ptr tcurl_realloc_callback + Pcurl_slist* = ptr Tcurl_slist + Pcurl_socket* = ptr Tcurl_socket + PCURL_SSL_VERSION* = ptr TCURL_SSL_VERSION + Pcurl_strdup_callback* = ptr Tcurl_strdup_callback + PCURL_TIMECOND* = ptr TCURL_TIMECOND + Pcurl_version_info_data* = ptr Tcurl_version_info_data + PCURLcode* = ptr TCURLcode + PCURLFORMcode* = ptr TCURLFORMcode + PCURLformoption* = ptr TCURLformoption + PCURLINFO* = ptr TCURLINFO + Pcurliocmd* = ptr Tcurliocmd + Pcurlioerr* = ptr Tcurlioerr + PCURLM* = ptr TCURLM + PCURLMcode* = ptr TCURLMcode + PCURLMoption* = ptr TCURLMoption + PCURLMSG* = ptr TCURLMSG + PCURLoption* = ptr TCURLoption + PCURLSH* = ptr TCURLSH + PCURLSHcode* = ptr TCURLSHcode + PCURLSHoption* = ptr TCURLSHoption + PCURLversion* = ptr TCURLversion + Pfd_set* = pointer + PCURL* = ptr TCurl + TCurl* = pointer + Tcurl_httppost* {.final, pure.} = object + next*: Pcurl_httppost + name*: cstring + namelength*: int32 + contents*: cstring + contentslength*: int32 + buffer*: cstring + bufferlength*: int32 + contenttype*: cstring + contentheader*: Pcurl_slist + more*: Pcurl_httppost + flags*: int32 + showfilename*: cstring + + Tcurl_progress_callback* = proc (clientp: pointer, dltotal: float64, + dlnow: float64, ultotal: float64, + ulnow: float64): int32{.cdecl.} + Tcurl_write_callback* = proc (buffer: cstring, size: int, nitems: int, + outstream: pointer): int{.cdecl.} + Tcurl_read_callback* = proc (buffer: cstring, size: int, nitems: int, + instream: pointer): int{.cdecl.} + Tcurl_passwd_callback* = proc (clientp: pointer, prompt: cstring, + buffer: cstring, buflen: int32): int32{.cdecl.} + Tcurlioerr* = enum + CURLIOE_OK, CURLIOE_UNKNOWNCMD, CURLIOE_FAILRESTART, CURLIOE_LAST + Tcurliocmd* = enum + CURLIOCMD_NOP, CURLIOCMD_RESTARTREAD, CURLIOCMD_LAST + Tcurl_ioctl_callback* = proc (handle: PCURL, cmd: int32, + clientp: pointer): Tcurlioerr {.cdecl.} + Tcurl_malloc_callback* = proc (size: int): pointer {.cdecl.} + Tcurl_free_callback* = proc (p: pointer) {.cdecl.} + Tcurl_realloc_callback* = proc (p: pointer, size: int): pointer {.cdecl.} + Tcurl_strdup_callback* = proc (str: cstring): cstring {.cdecl.} + Tcurl_calloc_callback* = proc (nmemb: int, size: int): pointer + Tcurl_infotype* = enum + CURLINFO_TEXT = 0, CURLINFO_HEADER_IN, CURLINFO_HEADER_OUT, + CURLINFO_DATA_IN, CURLINFO_DATA_OUT, CURLINFO_SSL_DATA_IN, + CURLINFO_SSL_DATA_OUT, CURLINFO_END + Tcurl_debug_callback* = proc (handle: PCURL, theType: Tcurl_infotype, + data: cstring, size: int, + userptr: pointer): int32 {.cdecl.} + TCURLcode* = enum + CURLE_OK = 0, CURLE_UNSUPPORTED_PROTOCOL, CURLE_FAILED_INIT, + CURLE_URL_MALFORMAT, CURLE_URL_MALFORMAT_USER, CURLE_COULDNT_RESOLVE_PROXY, + CURLE_COULDNT_RESOLVE_HOST, CURLE_COULDNT_CONNECT, + CURLE_FTP_WEIRD_SERVER_REPLY, CURLE_FTP_ACCESS_DENIED, + CURLE_FTP_USER_PASSWORD_INCORRECT, CURLE_FTP_WEIRD_PASS_REPLY, + CURLE_FTP_WEIRD_USER_REPLY, CURLE_FTP_WEIRD_PASV_REPLY, + CURLE_FTP_WEIRD_227_FORMAT, CURLE_FTP_CANT_GET_HOST, + CURLE_FTP_CANT_RECONNECT, CURLE_FTP_COULDNT_SET_BINARY, CURLE_PARTIAL_FILE, + CURLE_FTP_COULDNT_RETR_FILE, CURLE_FTP_WRITE_ERROR, CURLE_FTP_QUOTE_ERROR, + CURLE_HTTP_RETURNED_ERROR, CURLE_WRITE_ERROR, CURLE_MALFORMAT_USER, + CURLE_FTP_COULDNT_STOR_FILE, CURLE_READ_ERROR, CURLE_OUT_OF_MEMORY, + CURLE_OPERATION_TIMEOUTED, CURLE_FTP_COULDNT_SET_ASCII, + CURLE_FTP_PORT_FAILED, CURLE_FTP_COULDNT_USE_REST, + CURLE_FTP_COULDNT_GET_SIZE, CURLE_HTTP_RANGE_ERROR, CURLE_HTTP_POST_ERROR, + CURLE_SSL_CONNECT_ERROR, CURLE_BAD_DOWNLOAD_RESUME, + CURLE_FILE_COULDNT_READ_FILE, CURLE_LDAP_CANNOT_BIND, + CURLE_LDAP_SEARCH_FAILED, CURLE_LIBRARY_NOT_FOUND, CURLE_FUNCTION_NOT_FOUND, + CURLE_ABORTED_BY_CALLBACK, CURLE_BAD_FUNCTION_ARGUMENT, + CURLE_BAD_CALLING_ORDER, CURLE_INTERFACE_FAILED, CURLE_BAD_PASSWORD_ENTERED, + CURLE_TOO_MANY_REDIRECTS, CURLE_UNKNOWN_TELNET_OPTION, + CURLE_TELNET_OPTION_SYNTAX, CURLE_OBSOLETE, CURLE_SSL_PEER_CERTIFICATE, + CURLE_GOT_NOTHING, CURLE_SSL_ENGINE_NOTFOUND, CURLE_SSL_ENGINE_SETFAILED, + CURLE_SEND_ERROR, CURLE_RECV_ERROR, CURLE_SHARE_IN_USE, + CURLE_SSL_CERTPROBLEM, CURLE_SSL_CIPHER, CURLE_SSL_CACERT, + CURLE_BAD_CONTENT_ENCODING, CURLE_LDAP_INVALID_URL, CURLE_FILESIZE_EXCEEDED, + CURLE_FTP_SSL_FAILED, CURLE_SEND_FAIL_REWIND, CURLE_SSL_ENGINE_INITFAILED, + CURLE_LOGIN_DENIED, CURLE_TFTP_NOTFOUND, CURLE_TFTP_PERM, + CURLE_TFTP_DISKFULL, CURLE_TFTP_ILLEGAL, CURLE_TFTP_UNKNOWNID, + CURLE_TFTP_EXISTS, CURLE_TFTP_NOSUCHUSER, CURLE_CONV_FAILED, + CURLE_CONV_REQD, CURL_LAST + Tcurl_conv_callback* = proc (buffer: cstring, len: int): TCURLcode {.cdecl.} + Tcurl_ssl_ctx_callback* = proc (curl: PCURL, + ssl_ctx, userptr: pointer): TCURLcode {.cdecl.} + Tcurl_proxytype* = enum + CURLPROXY_HTTP = 0, CURLPROXY_SOCKS4 = 4, CURLPROXY_SOCKS5 = 5 + Tcurl_ftpssl* = enum + CURLFTPSSL_NONE, CURLFTPSSL_TRY, CURLFTPSSL_CONTROL, CURLFTPSSL_ALL, + CURLFTPSSL_LAST + Tcurl_ftpauth* = enum + CURLFTPAUTH_DEFAULT, CURLFTPAUTH_SSL, CURLFTPAUTH_TLS, CURLFTPAUTH_LAST + Tcurl_ftpmethod* = enum + CURLFTPMETHOD_DEFAULT, CURLFTPMETHOD_MULTICWD, CURLFTPMETHOD_NOCWD, + CURLFTPMETHOD_SINGLECWD, CURLFTPMETHOD_LAST + TCURLoption* = enum + CURLOPT_PORT = 0 + 3, + CURLOPT_TIMEOUT = 0 + 13, + CURLOPT_INFILESIZE = 0 + 14, + CURLOPT_LOW_SPEED_LIMIT = 0 + 19, + CURLOPT_LOW_SPEED_TIME = 0 + 20, + CURLOPT_RESUME_FROM = 0 + 21, + CURLOPT_CRLF = 0 + 27, + CURLOPT_SSLVERSION = 0 + 32, + CURLOPT_TIMECONDITION = 0 + 33, + CURLOPT_TIMEVALUE = 0 + 34, + CURLOPT_VERBOSE = 0 + 41, + CURLOPT_HEADER = 0 + 42, + CURLOPT_NOPROGRESS = 0 + 43, + CURLOPT_NOBODY = 0 + 44, + CURLOPT_FAILONERROR = 0 + 45, + CURLOPT_UPLOAD = 0 + 46, + CURLOPT_POST = 0 + 47, + CURLOPT_FTPLISTONLY = 0 + 48, + CURLOPT_FTPAPPEND = 0 + 50, + CURLOPT_NETRC = 0 + 51, + CURLOPT_FOLLOWLOCATION = 0 + 52, + CURLOPT_TRANSFERTEXT = 0 + 53, + CURLOPT_PUT = 0 + 54, + CURLOPT_AUTOREFERER = 0 + 58, + CURLOPT_PROXYPORT = 0 + 59, + CURLOPT_POSTFIELDSIZE = 0 + 60, + CURLOPT_HTTPPROXYTUNNEL = 0 + 61, + CURLOPT_SSL_VERIFYPEER = 0 + 64, + CURLOPT_MAXREDIRS = 0 + 68, + CURLOPT_FILETIME = 0 + 69, + CURLOPT_MAXCONNECTS = 0 + 71, + CURLOPT_CLOSEPOLICY = 0 + 72, + CURLOPT_FRESH_CONNECT = 0 + 74, + CURLOPT_FORBID_REUSE = 0 + 75, + CURLOPT_CONNECTTIMEOUT = 0 + 78, + CURLOPT_HTTPGET = 0 + 80, + CURLOPT_SSL_VERIFYHOST = 0 + 81, + CURLOPT_HTTP_VERSION = 0 + 84, + CURLOPT_FTP_USE_EPSV = 0 + 85, + CURLOPT_SSLENGINE_DEFAULT = 0 + 90, + CURLOPT_DNS_USE_GLOBAL_CACHE = 0 + 91, + CURLOPT_DNS_CACHE_TIMEOUT = 0 + 92, + CURLOPT_COOKIESESSION = 0 + 96, + CURLOPT_BUFFERSIZE = 0 + 98, + CURLOPT_NOSIGNAL = 0 + 99, + CURLOPT_PROXYTYPE = 0 + 101, + CURLOPT_UNRESTRICTED_AUTH = 0 + 105, + CURLOPT_FTP_USE_EPRT = 0 + 106, + CURLOPT_HTTPAUTH = 0 + 107, + CURLOPT_FTP_CREATE_MISSING_DIRS = 0 + 110, + CURLOPT_PROXYAUTH = 0 + 111, + CURLOPT_FTP_RESPONSE_TIMEOUT = 0 + 112, + CURLOPT_IPRESOLVE = 0 + 113, + CURLOPT_MAXFILESIZE = 0 + 114, + CURLOPT_FTP_SSL = 0 + 119, + CURLOPT_TCP_NODELAY = 0 + 121, + CURLOPT_FTPSSLAUTH = 0 + 129, + CURLOPT_IGNORE_CONTENT_LENGTH = 0 + 136, + CURLOPT_FTP_SKIP_PASV_IP = 0 + 137, + CURLOPT_FTP_FILEMETHOD = 0 + 138, + CURLOPT_LOCALPORT = 0 + 139, + CURLOPT_LOCALPORTRANGE = 0 + 140, + CURLOPT_CONNECT_ONLY = 0 + 141, + + CURLOPT_FILE = 10000 + 1, + CURLOPT_URL = 10000 + 2, + CURLOPT_PROXY = 10000 + 4, + CURLOPT_USERPWD = 10000 + 5, + CURLOPT_PROXYUSERPWD = 10000 + 6, + CURLOPT_RANGE = 10000 + 7, + CURLOPT_INFILE = 10000 + 9, + CURLOPT_ERRORBUFFER = 10000 + 10, + CURLOPT_POSTFIELDS = 10000 + 15, + CURLOPT_REFERER = 10000 + 16, + CURLOPT_FTPPORT = 10000 + 17, + CURLOPT_USERAGENT = 10000 + 18, + CURLOPT_COOKIE = 10000 + 22, + CURLOPT_HTTPHEADER = 10000 + 23, + CURLOPT_HTTPPOST = 10000 + 24, + CURLOPT_SSLCERT = 10000 + 25, + CURLOPT_SSLCERTPASSWD = 10000 + 26, + CURLOPT_QUOTE = 10000 + 28, + CURLOPT_WRITEHEADER = 10000 + 29, + CURLOPT_COOKIEFILE = 10000 + 31, + CURLOPT_CUSTOMREQUEST = 10000 + 36, + CURLOPT_STDERR = 10000 + 37, + CURLOPT_POSTQUOTE = 10000 + 39, + CURLOPT_WRITEINFO = 10000 + 40, + CURLOPT_PROGRESSDATA = 10000 + 57, + CURLOPT_INTERFACE = 10000 + 62, + CURLOPT_KRB4LEVEL = 10000 + 63, + CURLOPT_CAINFO = 10000 + 65, + CURLOPT_TELNETOPTIONS = 10000 + 70, + CURLOPT_RANDOM_FILE = 10000 + 76, + CURLOPT_EGDSOCKET = 10000 + 77, + CURLOPT_COOKIEJAR = 10000 + 82, + CURLOPT_SSL_CIPHER_LIST = 10000 + 83, + CURLOPT_SSLCERTTYPE = 10000 + 86, + CURLOPT_SSLKEY = 10000 + 87, + CURLOPT_SSLKEYTYPE = 10000 + 88, + CURLOPT_SSLENGINE = 10000 + 89, + CURLOPT_PREQUOTE = 10000 + 93, + CURLOPT_DEBUGDATA = 10000 + 95, + CURLOPT_CAPATH = 10000 + 97, + CURLOPT_SHARE = 10000 + 100, + CURLOPT_ENCODING = 10000 + 102, + CURLOPT_PRIVATE = 10000 + 103, + CURLOPT_HTTP200ALIASES = 10000 + 104, + CURLOPT_SSL_CTX_DATA = 10000 + 109, + CURLOPT_NETRC_FILE = 10000 + 118, + CURLOPT_SOURCE_USERPWD = 10000 + 123, + CURLOPT_SOURCE_PREQUOTE = 10000 + 127, + CURLOPT_SOURCE_POSTQUOTE = 10000 + 128, + CURLOPT_IOCTLDATA = 10000 + 131, + CURLOPT_SOURCE_URL = 10000 + 132, + CURLOPT_SOURCE_QUOTE = 10000 + 133, + CURLOPT_FTP_ACCOUNT = 10000 + 134, + CURLOPT_COOKIELIST = 10000 + 135, + CURLOPT_FTP_ALTERNATIVE_TO_USER = 10000 + 147, + CURLOPT_LASTENTRY = 10000 + 148, + + CURLOPT_WRITEFUNCTION = 20000 + 11, + CURLOPT_READFUNCTION = 20000 + 12, + CURLOPT_PROGRESSFUNCTION = 20000 + 56, + CURLOPT_HEADERFUNCTION = 20000 + 79, + CURLOPT_DEBUGFUNCTION = 20000 + 94, + CURLOPT_SSL_CTX_FUNCTION = 20000 + 108, + CURLOPT_IOCTLFUNCTION = 20000 + 130, + CURLOPT_CONV_FROM_NETWORK_FUNCTION = 20000 + 142, + CURLOPT_CONV_TO_NETWORK_FUNCTION = 20000 + 143, + CURLOPT_CONV_FROM_UTF8_FUNCTION = 20000 + 144, + + CURLOPT_INFILESIZE_LARGE = 30000 + 115, + CURLOPT_RESUME_FROM_LARGE = 30000 + 116, + CURLOPT_MAXFILESIZE_LARGE = 30000 + 117, + CURLOPT_POSTFIELDSIZE_LARGE = 30000 + 120, + CURLOPT_MAX_SEND_SPEED_LARGE = 30000 + 145, + CURLOPT_MAX_RECV_SPEED_LARGE = 30000 + 146 + + + TCURL_HTTP_VERSION* = enum + CURL_HTTP_VERSION_NONE, CURL_HTTP_VERSION_1_0, CURL_HTTP_VERSION_1_1, + CURL_HTTP_VERSION_LAST + + TCURL_NETRC_OPTION* = enum + CURL_NETRC_IGNORED, CURL_NETRC_OPTIONAL, CURL_NETRC_REQUIRED, + CURL_NETRC_LAST + + TCURL_SSL_VERSION* = enum + CURL_SSLVERSION_DEFAULT, CURL_SSLVERSION_TLSv1, CURL_SSLVERSION_SSLv2, + CURL_SSLVERSION_SSLv3, CURL_SSLVERSION_LAST + + TCURL_TIMECOND* = enum + CURL_TIMECOND_NONE, CURL_TIMECOND_IFMODSINCE, CURL_TIMECOND_IFUNMODSINCE, + CURL_TIMECOND_LASTMOD, CURL_TIMECOND_LAST + + TCURLformoption* = enum + CURLFORM_NOTHING, CURLFORM_COPYNAME, CURLFORM_PTRNAME, CURLFORM_NAMELENGTH, + CURLFORM_COPYCONTENTS, CURLFORM_PTRCONTENTS, CURLFORM_CONTENTSLENGTH, + CURLFORM_FILECONTENT, CURLFORM_ARRAY, CURLFORM_OBSOLETE, CURLFORM_FILE, + CURLFORM_BUFFER, CURLFORM_BUFFERPTR, CURLFORM_BUFFERLENGTH, + CURLFORM_CONTENTTYPE, CURLFORM_CONTENTHEADER, CURLFORM_FILENAME, + CURLFORM_END, CURLFORM_OBSOLETE2, CURLFORM_LASTENTRY + + Tcurl_forms* {.pure, final.} = object + option*: TCURLformoption + value*: cstring + + TCURLFORMcode* = enum + CURL_FORMADD_OK, CURL_FORMADD_MEMORY, CURL_FORMADD_OPTION_TWICE, + CURL_FORMADD_NULL, CURL_FORMADD_UNKNOWN_OPTION, CURL_FORMADD_INCOMPLETE, + CURL_FORMADD_ILLEGAL_ARRAY, CURL_FORMADD_DISABLED, CURL_FORMADD_LAST + + Tcurl_formget_callback* = proc (arg: pointer, buf: cstring, + length: int): int {.cdecl.} + Tcurl_slist* {.pure, final.} = object + data*: cstring + next*: Pcurl_slist + + TCURLINFO* = enum + CURLINFO_NONE = 0, + CURLINFO_LASTONE = 30, + CURLINFO_EFFECTIVE_URL = 0x00100000 + 1, + CURLINFO_CONTENT_TYPE = 0x00100000 + 18, + CURLINFO_PRIVATE = 0x00100000 + 21, + CURLINFO_FTP_ENTRY_PATH = 0x00100000 + 30, + + CURLINFO_RESPONSE_CODE = 0x00200000 + 2, + CURLINFO_HEADER_SIZE = 0x00200000 + 11, + CURLINFO_REQUEST_SIZE = 0x00200000 + 12, + CURLINFO_SSL_VERIFYRESULT = 0x00200000 + 13, + CURLINFO_FILETIME = 0x00200000 + 14, + CURLINFO_REDIRECT_COUNT = 0x00200000 + 20, + CURLINFO_HTTP_CONNECTCODE = 0x00200000 + 22, + CURLINFO_HTTPAUTH_AVAIL = 0x00200000 + 23, + CURLINFO_PROXYAUTH_AVAIL = 0x00200000 + 24, + CURLINFO_OS_ERRNO = 0x00200000 + 25, + CURLINFO_NUM_CONNECTS = 0x00200000 + 26, + CURLINFO_LASTSOCKET = 0x00200000 + 29, + + CURLINFO_TOTAL_TIME = 0x00300000 + 3, + CURLINFO_NAMELOOKUP_TIME = 0x00300000 + 4, + CURLINFO_CONNECT_TIME = 0x00300000 + 5, + CURLINFO_PRETRANSFER_TIME = 0x00300000 + 6, + CURLINFO_SIZE_UPLOAD = 0x00300000 + 7, + CURLINFO_SIZE_DOWNLOAD = 0x00300000 + 8, + CURLINFO_SPEED_DOWNLOAD = 0x00300000 + 9, + CURLINFO_SPEED_UPLOAD = 0x00300000 + 10, + CURLINFO_CONTENT_LENGTH_DOWNLOAD = 0x00300000 + 15, + CURLINFO_CONTENT_LENGTH_UPLOAD = 0x00300000 + 16, + CURLINFO_STARTTRANSFER_TIME = 0x00300000 + 17, + CURLINFO_REDIRECT_TIME = 0x00300000 + 19, + + CURLINFO_SSL_ENGINES = 0x00400000 + 27, + CURLINFO_COOKIELIST = 0x00400000 + 28 + + Tcurl_closepolicy* = enum + CURLCLOSEPOLICY_NONE, CURLCLOSEPOLICY_OLDEST, + CURLCLOSEPOLICY_LEAST_RECENTLY_USED, CURLCLOSEPOLICY_LEAST_TRAFFIC, + CURLCLOSEPOLICY_SLOWEST, CURLCLOSEPOLICY_CALLBACK, CURLCLOSEPOLICY_LAST + Tcurl_lock_data* = enum + CURL_LOCK_DATA_NONE = 0, CURL_LOCK_DATA_SHARE, CURL_LOCK_DATA_COOKIE, + CURL_LOCK_DATA_DNS, CURL_LOCK_DATA_SSL_SESSION, CURL_LOCK_DATA_CONNECT, + CURL_LOCK_DATA_LAST + Tcurl_lock_access* = enum + CURL_LOCK_ACCESS_NONE = 0, CURL_LOCK_ACCESS_SHARED = 1, + CURL_LOCK_ACCESS_SINGLE = 2, CURL_LOCK_ACCESS_LAST + + Tcurl_lock_function* = proc (handle: PCURL, data: Tcurl_lock_data, + locktype: Tcurl_lock_access, + userptr: pointer) {.cdecl.} + Tcurl_unlock_function* = proc (handle: PCURL, data: Tcurl_lock_data, + userptr: pointer) {.cdecl.} + TCURLSH* = pointer + TCURLSHcode* = enum + CURLSHE_OK, CURLSHE_BAD_OPTION, CURLSHE_IN_USE, CURLSHE_INVALID, + CURLSHE_NOMEM, CURLSHE_LAST + + TCURLSHoption* = enum + CURLSHOPT_NONE, CURLSHOPT_SHARE, CURLSHOPT_UNSHARE, CURLSHOPT_LOCKFUNC, + CURLSHOPT_UNLOCKFUNC, CURLSHOPT_USERDATA, CURLSHOPT_LAST + + TCURLversion* = enum + CURLVERSION_FIRST, CURLVERSION_SECOND, CURLVERSION_THIRD, CURLVERSION_LAST + + Tcurl_version_info_data* {.pure, final.} = object + age*: TCURLversion + version*: cstring + version_num*: int32 + host*: cstring + features*: int32 + ssl_version*: cstring + ssl_version_num*: int32 + libz_version*: cstring + protocols*: cstringArray + ares*: cstring + ares_num*: int32 + libidn*: cstring + iconv_ver_num*: int32 + + TCURLM* = pointer + Tcurl_socket* = int32 + TCURLMcode* = enum + CURLM_CALL_MULTI_PERFORM = -1, + CURLM_OK = 0, + CURLM_BAD_HANDLE, + CURLM_BAD_EASY_HANDLE, + CURLM_OUT_OF_MEMORY, + CURLM_INTERNAL_ERROR, + CURLM_BAD_SOCKET, + CURLM_UNKNOWN_OPTION, + CURLM_LAST + + TCURLMSGEnum* = enum + CURLMSG_NONE, CURLMSG_DONE, CURLMSG_LAST + TCURLMsg* {.pure, final.} = object + msg*: TCURLMSGEnum + easy_handle*: PCURL + whatever*: Pointer #data : record + # case longint of + # 0 : ( whatever : pointer ); + # 1 : ( result : CURLcode ); + # end; + + Tcurl_socket_callback* = proc (easy: PCURL, s: Tcurl_socket, what: int32, + userp, socketp: pointer): int32 {.cdecl.} + TCURLMoption* = enum + CURLMOPT_SOCKETDATA = 10000 + 2, + CURLMOPT_LASTENTRY = 10000 + 3, + CURLMOPT_SOCKETFUNCTION = 20000 + 1 + +const + CURLOPT_SSLKEYPASSWD* = CURLOPT_SSLCERTPASSWD + + CURLAUTH_ANY* = not (0) + CURLAUTH_BASIC* = 1 shl 0 + CURLAUTH_ANYSAFE* = not (CURLAUTH_BASIC) + CURLAUTH_DIGEST* = 1 shl 1 + CURLAUTH_GSSNEGOTIATE* = 1 shl 2 + CURLAUTH_NONE* = 0 + CURLAUTH_NTLM* = 1 shl 3 + CURLE_ALREADY_COMPLETE* = 99999 + CURLE_FTP_BAD_DOWNLOAD_RESUME* = CURLE_BAD_DOWNLOAD_RESUME + CURLE_FTP_PARTIAL_FILE* = CURLE_PARTIAL_FILE + CURLE_HTTP_NOT_FOUND* = CURLE_HTTP_RETURNED_ERROR + CURLE_HTTP_PORT_FAILED* = CURLE_INTERFACE_FAILED + CURLE_OPERATION_TIMEDOUT* = CURLE_OPERATION_TIMEOUTED + CURL_ERROR_SIZE* = 256 + CURL_FORMAT_OFF_T* = "%ld" + CURL_GLOBAL_NOTHING* = 0 + CURL_GLOBAL_SSL* = 1 shl 0 + CURL_GLOBAL_WIN32* = 1 shl 1 + CURL_GLOBAL_ALL* = CURL_GLOBAL_SSL or CURL_GLOBAL_WIN32 + CURL_GLOBAL_DEFAULT* = CURL_GLOBAL_ALL + CURLINFO_DOUBLE* = 0x00300000 + CURLINFO_HTTP_CODE* = CURLINFO_RESPONSE_CODE + CURLINFO_LONG* = 0x00200000 + CURLINFO_MASK* = 0x000FFFFF + CURLINFO_SLIST* = 0x00400000 + CURLINFO_STRING* = 0x00100000 + CURLINFO_TYPEMASK* = 0x00F00000 + CURL_IPRESOLVE_V4* = 1 + CURL_IPRESOLVE_V6* = 2 + CURL_IPRESOLVE_WHATEVER* = 0 + CURL_MAX_WRITE_SIZE* = 16384 + CURLM_CALL_MULTI_SOCKET* = CURLM_CALL_MULTI_PERFORM + CURLOPT_CLOSEFUNCTION* = - (5) + CURLOPT_FTPASCII* = CURLOPT_TRANSFERTEXT + CURLOPT_HEADERDATA* = CURLOPT_WRITEHEADER + CURLOPT_HTTPREQUEST* = - (1) + CURLOPT_MUTE* = - (2) + CURLOPT_PASSWDDATA* = - (4) + CURLOPT_PASSWDFUNCTION* = - (3) + CURLOPT_PASV_HOST* = - (9) + CURLOPT_READDATA* = CURLOPT_INFILE + CURLOPT_SOURCE_HOST* = - (6) + CURLOPT_SOURCE_PATH* = - (7) + CURLOPT_SOURCE_PORT* = - (8) + CURLOPTTYPE_FUNCTIONPOINT* = 20000 + CURLOPTTYPE_LONG* = 0 + CURLOPTTYPE_OBJECTPOINT* = 10000 + CURLOPTTYPE_OFF_T* = 30000 + CURLOPT_WRITEDATA* = CURLOPT_FILE + CURL_POLL_IN* = 1 + CURL_POLL_INOUT* = 3 + CURL_POLL_NONE* = 0 + CURL_POLL_OUT* = 2 + CURL_POLL_REMOVE* = 4 + CURL_READFUNC_ABORT* = 0x10000000 + CURL_SOCKET_BAD* = - (1) + CURL_SOCKET_TIMEOUT* = CURL_SOCKET_BAD + CURL_VERSION_ASYNCHDNS* = 1 shl 7 + CURL_VERSION_CONV* = 1 shl 12 + CURL_VERSION_DEBUG* = 1 shl 6 + CURL_VERSION_GSSNEGOTIATE* = 1 shl 5 + CURL_VERSION_IDN* = 1 shl 10 + CURL_VERSION_IPV6* = 1 shl 0 + CURL_VERSION_KERBEROS4* = 1 shl 1 + CURL_VERSION_LARGEFILE* = 1 shl 9 + CURL_VERSION_LIBZ* = 1 shl 3 + CURLVERSION_NOW* = CURLVERSION_THIRD + CURL_VERSION_NTLM* = 1 shl 4 + CURL_VERSION_SPNEGO* = 1 shl 8 + CURL_VERSION_SSL* = 1 shl 2 + CURL_VERSION_SSPI* = 1 shl 11 + FILE_OFFSET_BITS* = 0 + FILESIZEBITS* = 0 + FUNCTIONPOINT* = CURLOPTTYPE_FUNCTIONPOINT + HTTPPOST_BUFFER* = 1 shl 4 + HTTPPOST_FILENAME* = 1 shl 0 + HTTPPOST_PTRBUFFER* = 1 shl 5 + HTTPPOST_PTRCONTENTS* = 1 shl 3 + HTTPPOST_PTRNAME* = 1 shl 2 + HTTPPOST_READFILE* = 1 shl 1 + LIBCURL_VERSION* = "7.15.5" + LIBCURL_VERSION_MAJOR* = 7 + LIBCURL_VERSION_MINOR* = 15 + LIBCURL_VERSION_NUM* = 0x00070F05 + LIBCURL_VERSION_PATCH* = 5 + +proc curl_strequal*(s1, s2: cstring): int32{.cdecl, + dynlib: libname, importc: "curl_strequal".} +proc curl_strnequal*(s1, s2: cstring, n: int): int32 {.cdecl, + dynlib: libname, importc: "curl_strnequal".} +proc curl_formadd*(httppost, last_post: PPcurl_httppost): TCURLFORMcode {. + cdecl, varargs, dynlib: libname, importc: "curl_formadd".} + +proc curl_formget*(form: Pcurl_httppost, arg: pointer, + append: Tcurl_formget_callback): int32 {.cdecl, + dynlib: libname, importc: "curl_formget".} +proc curl_formfree*(form: Pcurl_httppost){.cdecl, dynlib: libname, + importc: "curl_formfree".} +proc curl_getenv*(variable: cstring): cstring{.cdecl, dynlib: libname, + importc: "curl_getenv".} +proc curl_version*(): cstring{.cdecl, dynlib: libname, importc: "curl_version".} +proc curl_easy_escape*(handle: PCURL, str: cstring, len: int32): cstring{.cdecl, + dynlib: libname, importc: "curl_easy_escape".} +proc curl_escape*(str: cstring, len: int32): cstring{.cdecl, + dynlib: libname, importc: "curl_escape".} +proc curl_easy_unescape*(handle: PCURL, str: cstring, len: int32, + outlength: var int32): cstring{.cdecl, + dynlib: libname, importc: "curl_easy_unescape".} +proc curl_unescape*(str: cstring, len: int32): cstring{.cdecl, + dynlib: libname, importc: "curl_unescape".} +proc curl_free*(p: pointer){.cdecl, dynlib: libname, + importc: "curl_free".} +proc curl_global_init*(flags: int32): TCURLcode {.cdecl, dynlib: libname, + importc: "curl_global_init".} +proc curl_global_init_mem*(flags: int32, m: Tcurl_malloc_callback, + f: Tcurl_free_callback, r: Tcurl_realloc_callback, + s: Tcurl_strdup_callback, + c: Tcurl_calloc_callback): TCURLcode {. + cdecl, dynlib: libname, importc: "curl_global_init_mem".} +proc curl_global_cleanup*() {.cdecl, dynlib: libname, + importc: "curl_global_cleanup".} +proc curl_slist_append*(curl_slist: Pcurl_slist, P: cstring): Pcurl_slist {. + cdecl, dynlib: libname, importc: "curl_slist_append".} +proc curl_slist_free_all*(para1: Pcurl_slist) {.cdecl, dynlib: libname, + importc: "curl_slist_free_all".} +proc curl_getdate*(p: cstring, unused: ptr TTime): TTime {.cdecl, + dynlib: libname, importc: "curl_getdate".} +proc curl_share_init*(): PCURLSH{.cdecl, dynlib: libname, + importc: "curl_share_init".} +proc curl_share_setopt*(para1: PCURLSH, option: TCURLSHoption): TCURLSHcode {. + cdecl, varargs, dynlib: libname, importc: "curl_share_setopt".} + +proc curl_share_cleanup*(para1: PCURLSH): TCURLSHcode {.cdecl, + dynlib: libname, importc: "curl_share_cleanup".} +proc curl_version_info*(para1: TCURLversion): Pcurl_version_info_data{.cdecl, + dynlib: libname, importc: "curl_version_info".} +proc curl_easy_strerror*(para1: TCURLcode): cstring {.cdecl, + dynlib: libname, importc: "curl_easy_strerror".} +proc curl_share_strerror*(para1: TCURLSHcode): cstring {.cdecl, + dynlib: libname, importc: "curl_share_strerror".} +proc curl_easy_init*(): PCURL {.cdecl, dynlib: libname, + importc: "curl_easy_init".} +proc curl_easy_setopt*(curl: PCURL, option: TCURLoption): TCURLcode {.cdecl, + varargs, dynlib: libname, importc: "curl_easy_setopt".} + +proc curl_easy_perform*(curl: PCURL): TCURLcode {.cdecl, dynlib: libname, + importc: "curl_easy_perform".} +proc curl_easy_cleanup*(curl: PCURL) {.cdecl, dynlib: libname, + importc: "curl_easy_cleanup".} +proc curl_easy_getinfo*(curl: PCURL, info: TCURLINFO): TCURLcode {. + cdecl, varargs, dynlib: libname, importc: "curl_easy_getinfo".} + +proc curl_easy_duphandle*(curl: PCURL): PCURL {.cdecl, dynlib: libname, + importc: "curl_easy_duphandle".} +proc curl_easy_reset*(curl: PCURL) {.cdecl, dynlib: libname, + importc: "curl_easy_reset".} +proc curl_multi_init*(): PCURLM {.cdecl, dynlib: libname, + importc: "curl_multi_init".} +proc curl_multi_add_handle*(multi_handle: PCURLM, + curl_handle: PCURL): TCURLMcode {. + cdecl, dynlib: libname, importc: "curl_multi_add_handle".} +proc curl_multi_remove_handle*(multi_handle: PCURLM, + curl_handle: PCURL): TCURLMcode {. + cdecl, dynlib: libname, importc: "curl_multi_remove_handle".} +proc curl_multi_fdset*(multi_handle: PCURLM, read_fd_set: Pfd_set, + write_fd_set: Pfd_set, exc_fd_set: Pfd_set, + max_fd: var int32): TCURLMcode {.cdecl, + dynlib: libname, importc: "curl_multi_fdset".} +proc curl_multi_perform*(multi_handle: PCURLM, + running_handles: var int32): TCURLMcode {. + cdecl, dynlib: libname, importc: "curl_multi_perform".} +proc curl_multi_cleanup*(multi_handle: PCURLM): TCURLMcode {.cdecl, + dynlib: libname, importc: "curl_multi_cleanup".} +proc curl_multi_info_read*(multi_handle: PCURLM, + msgs_in_queue: var int32): PCURLMsg {. + cdecl, dynlib: libname, importc: "curl_multi_info_read".} +proc curl_multi_strerror*(para1: TCURLMcode): cstring {.cdecl, + dynlib: libname, importc: "curl_multi_strerror".} +proc curl_multi_socket*(multi_handle: PCURLM, s: Tcurl_socket, + running_handles: var int32): TCURLMcode {.cdecl, + dynlib: libname, importc: "curl_multi_socket".} +proc curl_multi_socket_all*(multi_handle: PCURLM, + running_handles: var int32): TCURLMcode {. + cdecl, dynlib: libname, importc: "curl_multi_socket_all".} +proc curl_multi_timeout*(multi_handle: PCURLM, milliseconds: var int32): TCURLMcode{. + cdecl, dynlib: libname, importc: "curl_multi_timeout".} +proc curl_multi_setopt*(multi_handle: PCURLM, option: TCURLMoption): TCURLMcode{. + cdecl, varargs, dynlib: libname, importc: "curl_multi_setopt".} + +proc curl_multi_assign*(multi_handle: PCURLM, sockfd: Tcurl_socket, + sockp: pointer): TCURLMcode {.cdecl, + dynlib: libname, importc: "curl_multi_assign".} + + diff --git a/lib/oldwrappers/lua/lauxlib.nim b/lib/oldwrappers/lua/lauxlib.nim new file mode 100644 index 000000000..477dd5874 --- /dev/null +++ b/lib/oldwrappers/lua/lauxlib.nim @@ -0,0 +1,224 @@ +#***************************************************************************** +# * * +# * File: lauxlib.pas * +# * Authors: TeCGraf (C headers + actual Lua libraries) * +# * Lavergne Thomas (original translation to Pascal) * +# * Bram Kuijvenhoven (update to Lua 5.1.1 for FreePascal) * +# * Description: Lua auxiliary library * +# * * +# ***************************************************************************** +# +#** $Id: lauxlib.h,v 1.59 2003/03/18 12:25:32 roberto Exp $ +#** Auxiliary functions for building Lua libraries +#** See Copyright Notice in lua.h +# +# +#** Translated to pascal by Lavergne Thomas +#** Notes : +#** - Pointers type was prefixed with 'P' +#** Bug reports : +#** - thomas.lavergne@laposte.net +#** In french or in english +# + +import lua + +proc lua_pushstring*(L: Plua_State, s: string) + # compatibilty macros +proc luaL_getn*(L: Plua_State, n: int): int + # calls lua_objlen +proc luaL_setn*(L: Plua_State, t, n: int) + # does nothing! +type + TLuaL_reg*{.final.} = object + name*: cstring + func*: lua_CFunction + + PluaL_reg* = ptr TLuaL_reg + +proc luaL_openlib*(L: Plua_State, libname: cstring, lr: PluaL_reg, nup: int){. + cdecl, dynlib: LUA_LIB_NAME, importc.} +proc luaL_register*(L: Plua_State, libname: cstring, lr: PluaL_reg){.cdecl, + dynlib: LUA_LIB_NAME, importc.} +proc luaL_getmetafield*(L: Plua_State, obj: int, e: cstring): int{.cdecl, + dynlib: LUA_LIB_NAME, importc.} +proc luaL_callmeta*(L: Plua_State, obj: int, e: cstring): int{.cdecl, + dynlib: LUA_LIB_NAME, importc.} +proc luaL_typerror*(L: Plua_State, narg: int, tname: cstring): int{.cdecl, + dynlib: LUA_LIB_NAME, importc.} +proc luaL_argerror*(L: Plua_State, numarg: int, extramsg: cstring): int{.cdecl, + dynlib: LUA_LIB_NAME, importc.} +proc luaL_checklstring*(L: Plua_State, numArg: int, len: Psize_t): cstring{. + cdecl, dynlib: LUA_LIB_NAME, importc.} +proc luaL_optlstring*(L: Plua_State, numArg: int, def: cstring, len: Psize_t): cstring{. + cdecl, dynlib: LUA_LIB_NAME, importc.} +proc luaL_checknumber*(L: Plua_State, numArg: int): lua_Number{.cdecl, + dynlib: LUA_LIB_NAME, importc.} +proc luaL_optnumber*(L: Plua_State, nArg: int, def: lua_Number): lua_Number{. + cdecl, dynlib: LUA_LIB_NAME, importc.} +proc luaL_checkinteger*(L: Plua_State, numArg: int): lua_Integer{.cdecl, + dynlib: LUA_LIB_NAME, importc.} +proc luaL_optinteger*(L: Plua_State, nArg: int, def: lua_Integer): lua_Integer{. + cdecl, dynlib: LUA_LIB_NAME, importc.} +proc luaL_checkstack*(L: Plua_State, sz: int, msg: cstring){.cdecl, + dynlib: LUA_LIB_NAME, importc.} +proc luaL_checktype*(L: Plua_State, narg, t: int){.cdecl, dynlib: LUA_LIB_NAME, + importc.} +proc luaL_checkany*(L: Plua_State, narg: int){.cdecl, dynlib: LUA_LIB_NAME, + importc.} +proc luaL_newmetatable*(L: Plua_State, tname: cstring): int{.cdecl, + dynlib: LUA_LIB_NAME, importc.} +proc luaL_checkudata*(L: Plua_State, ud: int, tname: cstring): Pointer{.cdecl, + dynlib: LUA_LIB_NAME, importc.} +proc luaL_where*(L: Plua_State, lvl: int){.cdecl, dynlib: LUA_LIB_NAME, importc.} +proc luaL_error*(L: Plua_State, fmt: cstring): int{.cdecl, varargs, + dynlib: LUA_LIB_NAME, importc.} +proc luaL_checkoption*(L: Plua_State, narg: int, def: cstring, lst: cstringArray): int{. + cdecl, dynlib: LUA_LIB_NAME, importc.} +proc luaL_ref*(L: Plua_State, t: int): int{.cdecl, dynlib: LUA_LIB_NAME, importc.} +proc luaL_unref*(L: Plua_State, t, theref: int){.cdecl, dynlib: LUA_LIB_NAME, + importc.} +proc luaL_loadfile*(L: Plua_State, filename: cstring): int{.cdecl, + dynlib: LUA_LIB_NAME, importc.} +proc luaL_loadbuffer*(L: Plua_State, buff: cstring, size: size_t, name: cstring): int{. + cdecl, dynlib: LUA_LIB_NAME, importc.} +proc luaL_loadstring*(L: Plua_State, s: cstring): int{.cdecl, + dynlib: LUA_LIB_NAME, importc.} +proc luaL_newstate*(): Plua_State{.cdecl, dynlib: LUA_LIB_NAME, importc.} +proc lua_open*(): Plua_State + # compatibility; moved from unit lua to lauxlib because it needs luaL_newstate + # + #** =============================================================== + #** some useful macros + #** =============================================================== + # +proc luaL_argcheck*(L: Plua_State, cond: bool, numarg: int, extramsg: cstring) +proc luaL_checkstring*(L: Plua_State, n: int): cstring +proc luaL_optstring*(L: Plua_State, n: int, d: cstring): cstring +proc luaL_checkint*(L: Plua_State, n: int): int +proc luaL_checklong*(L: Plua_State, n: int): int32 +proc luaL_optint*(L: Plua_State, n: int, d: float64): int +proc luaL_optlong*(L: Plua_State, n: int, d: float64): int32 +proc luaL_typename*(L: Plua_State, i: int): cstring +proc lua_dofile*(L: Plua_State, filename: cstring): int +proc lua_dostring*(L: Plua_State, str: cstring): int +proc lua_Lgetmetatable*(L: Plua_State, tname: cstring) + # not translated: + # #define luaL_opt(L,f,n,d) (lua_isnoneornil(L,(n)) ? (d) : f(L,(n))) + # + #** ======================================================= + #** Generic Buffer manipulation + #** ======================================================= + # +const # note: this is just arbitrary, as it related to the BUFSIZ defined in stdio.h ... + LUAL_BUFFERSIZE* = 4096 + +type + luaL_Buffer*{.final.} = object + p*: cstring # current position in buffer + lvl*: int # number of strings in the stack (level) + L*: Plua_State + buffer*: array[0..LUAL_BUFFERSIZE - 1, Char] # warning: see note above about LUAL_BUFFERSIZE + + PluaL_Buffer* = ptr luaL_Buffer + +proc luaL_addchar*(B: PluaL_Buffer, c: Char) + # warning: see note above about LUAL_BUFFERSIZE + # compatibility only (alias for luaL_addchar) +proc luaL_putchar*(B: PluaL_Buffer, c: Char) + # warning: see note above about LUAL_BUFFERSIZE +proc luaL_addsize*(B: PluaL_Buffer, n: int) +proc luaL_buffinit*(L: Plua_State, B: PluaL_Buffer){.cdecl, + dynlib: LUA_LIB_NAME, importc.} +proc luaL_prepbuffer*(B: PluaL_Buffer): cstring{.cdecl, dynlib: LUA_LIB_NAME, + importc.} +proc luaL_addlstring*(B: PluaL_Buffer, s: cstring, L: size_t){.cdecl, + dynlib: LUA_LIB_NAME, importc.} +proc luaL_addstring*(B: PluaL_Buffer, s: cstring){.cdecl, dynlib: LUA_LIB_NAME, + importc.} +proc luaL_addvalue*(B: PluaL_Buffer){.cdecl, dynlib: LUA_LIB_NAME, importc.} +proc luaL_pushresult*(B: PluaL_Buffer){.cdecl, dynlib: LUA_LIB_NAME, importc.} +proc luaL_gsub*(L: Plua_State, s, p, r: cstring): cstring{.cdecl, + dynlib: LUA_LIB_NAME, importc.} +proc luaL_findtable*(L: Plua_State, idx: int, fname: cstring, szhint: int): cstring{. + cdecl, dynlib: LUA_LIB_NAME, importc.} + # compatibility with ref system + # pre-defined references +const + LUA_NOREF* = - 2 + LUA_REFNIL* = - 1 + +proc lua_unref*(L: Plua_State, theref: int) +proc lua_getref*(L: Plua_State, theref: int) + # + #** Compatibility macros and functions + # + +# implementation + +proc lua_pushstring(L: Plua_State, s: string) = + lua_pushlstring(L, cstring(s), len(s)) + +proc luaL_getn(L: Plua_State, n: int): int = + Result = lua_objlen(L, n) + +proc luaL_setn(L: Plua_State, t, n: int) = + # does nothing as this operation is deprecated + nil + +proc lua_open(): Plua_State = + Result = luaL_newstate() + +proc luaL_typename(L: Plua_State, i: int): cstring = + Result = lua_typename(L, lua_type(L, i)) + +proc lua_dofile(L: Plua_State, filename: cstring): int = + Result = luaL_loadfile(L, filename) + if Result == 0: Result = lua_pcall(L, 0, LUA_MULTRET, 0) + +proc lua_dostring(L: Plua_State, str: cstring): int = + Result = luaL_loadstring(L, str) + if Result == 0: Result = lua_pcall(L, 0, LUA_MULTRET, 0) + +proc lua_Lgetmetatable(L: Plua_State, tname: cstring) = + lua_getfield(L, LUA_REGISTRYINDEX, tname) + +proc luaL_argcheck(L: Plua_State, cond: bool, numarg: int, extramsg: cstring) = + if not cond: + discard luaL_argerror(L, numarg, extramsg) + +proc luaL_checkstring(L: Plua_State, n: int): cstring = + Result = luaL_checklstring(L, n, nil) + +proc luaL_optstring(L: Plua_State, n: int, d: cstring): cstring = + Result = luaL_optlstring(L, n, d, nil) + +proc luaL_checkint(L: Plua_State, n: int): int = + Result = toInt(luaL_checknumber(L, n)) + +proc luaL_checklong(L: Plua_State, n: int): int32 = + Result = int32(ToInt(luaL_checknumber(L, n))) + +proc luaL_optint(L: Plua_State, n: int, d: float64): int = + Result = int(ToInt(luaL_optnumber(L, n, d))) + +proc luaL_optlong(L: Plua_State, n: int, d: float64): int32 = + Result = int32(ToInt(luaL_optnumber(L, n, d))) + +proc luaL_addchar(B: PluaL_Buffer, c: Char) = + if cast[int](addr((B.p))) < (cast[int](addr((B.buffer[0]))) + LUAL_BUFFERSIZE): + discard luaL_prepbuffer(B) + B.p[1] = c + B.p = cast[cstring](cast[int](B.p) + 1) + +proc luaL_putchar(B: PluaL_Buffer, c: Char) = + luaL_addchar(B, c) + +proc luaL_addsize(B: PluaL_Buffer, n: int) = + B.p = cast[cstring](cast[int](B.p) + n) + +proc lua_unref(L: Plua_State, theref: int) = + luaL_unref(L, LUA_REGISTRYINDEX, theref) + +proc lua_getref(L: Plua_State, theref: int) = + lua_rawgeti(L, LUA_REGISTRYINDEX, theref) diff --git a/lib/oldwrappers/lua/lua.nim b/lib/oldwrappers/lua/lua.nim new file mode 100644 index 000000000..54f8d46bb --- /dev/null +++ b/lib/oldwrappers/lua/lua.nim @@ -0,0 +1,391 @@ +#***************************************************************************** +# * * +# * File: lua.pas * +# * Authors: TeCGraf (C headers + actual Lua libraries) * +# * Lavergne Thomas (original translation to Pascal) * +# * Bram Kuijvenhoven (update to Lua 5.1.1 for FreePascal) * +# * Description: Basic Lua library * +# * * +# ***************************************************************************** +# +#** $Id: lua.h,v 1.175 2003/03/18 12:31:39 roberto Exp $ +#** Lua - An Extensible Extension Language +#** TeCGraf: Computer Graphics Technology Group, PUC-Rio, Brazil +#** http://www.lua.org mailto:info@lua.org +#** See Copyright Notice at the end of this file +# +# +#** Updated to Lua 5.1.1 by Bram Kuijvenhoven (bram at kuijvenhoven dot net), +#** Hexis BV (http://www.hexis.nl), the Netherlands +#** Notes: +#** - Only tested with FPC (FreePascal Compiler) +#** - Using LuaBinaries styled DLL/SO names, which include version names +#** - LUA_YIELD was suffixed by '_' for avoiding name collision +# +# +#** Translated to pascal by Lavergne Thomas +#** Notes : +#** - Pointers type was prefixed with 'P' +#** - lua_upvalueindex constant was transformed to function +#** - Some compatibility function was isolated because with it you must have +#** lualib. +#** - LUA_VERSION was suffixed by '_' for avoiding name collision. +#** Bug reports : +#** - thomas.lavergne@laposte.net +#** In french or in english +# + +when defined(MACOSX): + const + LUA_NAME* = "liblua(|5.2|5.1|5.0).dylib" + LUA_LIB_NAME* = "liblua(|5.2|5.1|5.0).dylib" +elif defined(UNIX): + const + LUA_NAME* = "liblua(|5.2|5.1|5.0).so(|.0)" + LUA_LIB_NAME* = "liblua(|5.2|5.1|5.0).so(|.0)" +else: + const + LUA_NAME* = "lua(|5.2|5.1|5.0).dll" + LUA_LIB_NAME* = "lua(|5.2|5.1|5.0).dll" +type + size_t* = int + Psize_t* = ptr size_t + +const + LUA_VERSION* = "Lua 5.1" + LUA_RELEASE* = "Lua 5.1.1" + LUA_VERSION_NUM* = 501 + LUA_COPYRIGHT* = "Copyright (C) 1994-2006 Lua.org, PUC-Rio" + LUA_AUTHORS* = "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" + # option for multiple returns in `lua_pcall' and `lua_call' + LUA_MULTRET* = - 1 # + #** pseudo-indices + # + LUA_REGISTRYINDEX* = - 10000 + LUA_ENVIRONINDEX* = - 10001 + LUA_GLOBALSINDEX* = - 10002 + +proc lua_upvalueindex*(I: int): int +const # thread status; 0 is OK + constLUA_YIELD* = 1 + LUA_ERRRUN* = 2 + LUA_ERRSYNTAX* = 3 + LUA_ERRMEM* = 4 + LUA_ERRERR* = 5 + +type + Plua_State* = Pointer + lua_CFunction* = proc (L: Plua_State): int{.cdecl.} + +# +#** functions that read/write blocks when loading/dumping Lua chunks +# +type + lua_Reader* = proc (L: Plua_State, ud: Pointer, sz: Psize_t): cstring{.cdecl.} + lua_Writer* = proc (L: Plua_State, p: Pointer, sz: size_t, ud: Pointer): int{. + cdecl.} + lua_Alloc* = proc (ud, theptr: Pointer, osize, nsize: size_t){.cdecl.} + +const + LUA_TNONE* = - 1 + LUA_TNIL* = 0 + LUA_TBOOLEAN* = 1 + LUA_TLIGHTUSERDATA* = 2 + LUA_TNUMBER* = 3 + LUA_TSTRING* = 4 + LUA_TTABLE* = 5 + LUA_TFUNCTION* = 6 + LUA_TUSERDATA* = 7 + LUA_TTHREAD* = 8 # minimum Lua stack available to a C function + LUA_MINSTACK* = 20 + +type # Type of Numbers in Lua + lua_Number* = float + lua_Integer* = int + +proc lua_newstate*(f: lua_Alloc, ud: Pointer): Plua_State{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_close*(L: Plua_State){.cdecl, dynlib: LUA_NAME, importc.} +proc lua_newthread*(L: Plua_State): Plua_State{.cdecl, dynlib: LUA_NAME, importc.} +proc lua_atpanic*(L: Plua_State, panicf: lua_CFunction): lua_CFunction{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_gettop*(L: Plua_State): int{.cdecl, dynlib: LUA_NAME, importc.} +proc lua_settop*(L: Plua_State, idx: int){.cdecl, dynlib: LUA_NAME, importc.} +proc lua_pushvalue*(L: Plua_State, Idx: int){.cdecl, dynlib: LUA_NAME, importc.} +proc lua_remove*(L: Plua_State, idx: int){.cdecl, dynlib: LUA_NAME, importc.} +proc lua_insert*(L: Plua_State, idx: int){.cdecl, dynlib: LUA_NAME, importc.} +proc lua_replace*(L: Plua_State, idx: int){.cdecl, dynlib: LUA_NAME, importc.} +proc lua_checkstack*(L: Plua_State, sz: int): cint{.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_xmove*(`from`, `to`: Plua_State, n: int){.cdecl, dynlib: LUA_NAME, importc.} +proc lua_isnumber*(L: Plua_State, idx: int): cint{.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_isstring*(L: Plua_State, idx: int): cint{.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_iscfunction*(L: Plua_State, idx: int): cint{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_isuserdata*(L: Plua_State, idx: int): cint{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_type*(L: Plua_State, idx: int): int{.cdecl, dynlib: LUA_NAME, importc.} +proc lua_typename*(L: Plua_State, tp: int): cstring{.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_equal*(L: Plua_State, idx1, idx2: int): cint{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_rawequal*(L: Plua_State, idx1, idx2: int): cint{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_lessthan*(L: Plua_State, idx1, idx2: int): cint{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_tonumber*(L: Plua_State, idx: int): lua_Number{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_tointeger*(L: Plua_State, idx: int): lua_Integer{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_toboolean*(L: Plua_State, idx: int): cint{.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_tolstring*(L: Plua_State, idx: int, length: Psize_t): cstring{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_objlen*(L: Plua_State, idx: int): size_t{.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_tocfunction*(L: Plua_State, idx: int): lua_CFunction{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_touserdata*(L: Plua_State, idx: int): Pointer{.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_tothread*(L: Plua_State, idx: int): Plua_State{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_topointer*(L: Plua_State, idx: int): Pointer{.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_pushnil*(L: Plua_State){.cdecl, dynlib: LUA_NAME, importc.} +proc lua_pushnumber*(L: Plua_State, n: lua_Number){.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_pushinteger*(L: Plua_State, n: lua_Integer){.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_pushlstring*(L: Plua_State, s: cstring, len: size_t){.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_pushstring*(L: Plua_State, s: cstring){.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_pushvfstring*(L: Plua_State, fmt: cstring, argp: Pointer): cstring{. + cdecl, dynlib: LUA_NAME, importc.} +proc lua_pushfstring*(L: Plua_State, fmt: cstring): cstring{.cdecl, varargs, + dynlib: LUA_NAME, importc.} +proc lua_pushcclosure*(L: Plua_State, fn: lua_CFunction, n: int){.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_pushboolean*(L: Plua_State, b: cint){.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_pushlightuserdata*(L: Plua_State, p: Pointer){.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_pushthread*(L: Plua_State){.cdecl, dynlib: LUA_NAME, importc.} +proc lua_gettable*(L: Plua_State, idx: int){.cdecl, dynlib: LUA_NAME, importc.} +proc lua_getfield*(L: Plua_state, idx: int, k: cstring){.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_rawget*(L: Plua_State, idx: int){.cdecl, dynlib: LUA_NAME, importc.} +proc lua_rawgeti*(L: Plua_State, idx, n: int){.cdecl, dynlib: LUA_NAME, importc.} +proc lua_createtable*(L: Plua_State, narr, nrec: int){.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_newuserdata*(L: Plua_State, sz: size_t): Pointer{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_getmetatable*(L: Plua_State, objindex: int): int{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_getfenv*(L: Plua_State, idx: int){.cdecl, dynlib: LUA_NAME, importc.} +proc lua_settable*(L: Plua_State, idx: int){.cdecl, dynlib: LUA_NAME, importc.} +proc lua_setfield*(L: Plua_State, idx: int, k: cstring){.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_rawset*(L: Plua_State, idx: int){.cdecl, dynlib: LUA_NAME, importc.} +proc lua_rawseti*(L: Plua_State, idx, n: int){.cdecl, dynlib: LUA_NAME, importc.} +proc lua_setmetatable*(L: Plua_State, objindex: int): int{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_setfenv*(L: Plua_State, idx: int): int{.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_call*(L: Plua_State, nargs, nresults: int){.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_pcall*(L: Plua_State, nargs, nresults, errf: int): int{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_cpcall*(L: Plua_State, func: lua_CFunction, ud: Pointer): int{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_load*(L: Plua_State, reader: lua_Reader, dt: Pointer, + chunkname: cstring): int{.cdecl, dynlib: LUA_NAME, importc.} +proc lua_dump*(L: Plua_State, writer: lua_Writer, data: Pointer): int{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_yield*(L: Plua_State, nresults: int): int{.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_resume*(L: Plua_State, narg: int): int{.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_status*(L: Plua_State): int{.cdecl, dynlib: LUA_NAME, importc.} +proc lua_gc*(L: Plua_State, what, data: int): int{.cdecl, dynlib: LUA_NAME, + importc.} +proc lua_error*(L: Plua_State): int{.cdecl, dynlib: LUA_NAME, importc.} +proc lua_next*(L: Plua_State, idx: int): int{.cdecl, dynlib: LUA_NAME, importc.} +proc lua_concat*(L: Plua_State, n: int){.cdecl, dynlib: LUA_NAME, importc.} +proc lua_getallocf*(L: Plua_State, ud: ptr Pointer): lua_Alloc{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_setallocf*(L: Plua_State, f: lua_Alloc, ud: Pointer){.cdecl, + dynlib: LUA_NAME, importc.} + +# +#** Garbage-collection functions and options +# +const + LUA_GCSTOP* = 0 + LUA_GCRESTART* = 1 + LUA_GCCOLLECT* = 2 + LUA_GCCOUNT* = 3 + LUA_GCCOUNTB* = 4 + LUA_GCSTEP* = 5 + LUA_GCSETPAUSE* = 6 + LUA_GCSETSTEPMUL* = 7 + +# +#** =============================================================== +#** some useful macros +#** =============================================================== +# + +proc lua_pop*(L: Plua_State, n: int) +proc lua_newtable*(L: Plua_state) +proc lua_register*(L: Plua_State, n: cstring, f: lua_CFunction) +proc lua_pushcfunction*(L: Plua_State, f: lua_CFunction) +proc lua_strlen*(L: Plua_state, i: int): size_t +proc lua_isfunction*(L: Plua_State, n: int): bool +proc lua_istable*(L: Plua_State, n: int): bool +proc lua_islightuserdata*(L: Plua_State, n: int): bool +proc lua_isnil*(L: Plua_State, n: int): bool +proc lua_isboolean*(L: Plua_State, n: int): bool +proc lua_isthread*(L: Plua_State, n: int): bool +proc lua_isnone*(L: Plua_State, n: int): bool +proc lua_isnoneornil*(L: Plua_State, n: int): bool +proc lua_pushliteral*(L: Plua_State, s: cstring) +proc lua_setglobal*(L: Plua_State, s: cstring) +proc lua_getglobal*(L: Plua_State, s: cstring) +proc lua_tostring*(L: Plua_State, i: int): cstring +# +#** compatibility macros and functions +# +proc lua_getregistry*(L: Plua_State) +proc lua_getgccount*(L: Plua_State): int +type + lua_Chunkreader* = lua_Reader + lua_Chunkwriter* = lua_Writer + +# +#** ====================================================================== +#** Debug API +#** ====================================================================== +# + +const + LUA_HOOKCALL* = 0 + LUA_HOOKRET* = 1 + LUA_HOOKLINE* = 2 + LUA_HOOKCOUNT* = 3 + LUA_HOOKTAILRET* = 4 + +const + LUA_MASKCALL* = 1 shl Ord(LUA_HOOKCALL) + LUA_MASKRET* = 1 shl Ord(LUA_HOOKRET) + LUA_MASKLINE* = 1 shl Ord(LUA_HOOKLINE) + LUA_MASKCOUNT* = 1 shl Ord(LUA_HOOKCOUNT) + +const + LUA_IDSIZE* = 60 + +type + lua_Debug*{.final.} = object # activation record + event*: int + name*: cstring # (n) + namewhat*: cstring # (n) `global', `local', `field', `method' + what*: cstring # (S) `Lua', `C', `main', `tail' + source*: cstring # (S) + currentline*: int # (l) + nups*: int # (u) number of upvalues + linedefined*: int # (S) + lastlinedefined*: int # (S) + short_src*: array[0..LUA_IDSIZE - 1, Char] # (S) + # private part + i_ci*: int # active function + + Plua_Debug* = ptr lua_Debug + lua_Hook* = proc (L: Plua_State, ar: Plua_Debug){.cdecl.} + +# +#** ====================================================================== +#** Debug API +#** ====================================================================== +# + +proc lua_getstack*(L: Plua_State, level: int, ar: Plua_Debug): int{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_getinfo*(L: Plua_State, what: cstring, ar: Plua_Debug): int{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_getlocal*(L: Plua_State, ar: Plua_Debug, n: int): cstring{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_setlocal*(L: Plua_State, ar: Plua_Debug, n: int): cstring{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_getupvalue*(L: Plua_State, funcindex: int, n: int): cstring{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_setupvalue*(L: Plua_State, funcindex: int, n: int): cstring{.cdecl, + dynlib: LUA_NAME, importc.} +proc lua_sethook*(L: Plua_State, func: lua_Hook, mask: int, count: int): int{. + cdecl, dynlib: LUA_NAME, importc.} +proc lua_gethook*(L: Plua_State): lua_Hook{.cdecl, dynlib: LUA_NAME, importc.} +proc lua_gethookmask*(L: Plua_State): int{.cdecl, dynlib: LUA_NAME, importc.} +proc lua_gethookcount*(L: Plua_State): int{.cdecl, dynlib: LUA_NAME, importc.} +# implementation + +proc lua_upvalueindex(I: int): int = + Result = LUA_GLOBALSINDEX - i + +proc lua_pop(L: Plua_State, n: int) = + lua_settop(L, - n - 1) + +proc lua_newtable(L: Plua_State) = + lua_createtable(L, 0, 0) + +proc lua_register(L: Plua_State, n: cstring, f: lua_CFunction) = + lua_pushcfunction(L, f) + lua_setglobal(L, n) + +proc lua_pushcfunction(L: Plua_State, f: lua_CFunction) = + lua_pushcclosure(L, f, 0) + +proc lua_strlen(L: Plua_State, i: int): size_t = + Result = lua_objlen(L, i) + +proc lua_isfunction(L: Plua_State, n: int): bool = + Result = lua_type(L, n) == LUA_TFUNCTION + +proc lua_istable(L: Plua_State, n: int): bool = + Result = lua_type(L, n) == LUA_TTABLE + +proc lua_islightuserdata(L: Plua_State, n: int): bool = + Result = lua_type(L, n) == LUA_TLIGHTUSERDATA + +proc lua_isnil(L: Plua_State, n: int): bool = + Result = lua_type(L, n) == LUA_TNIL + +proc lua_isboolean(L: Plua_State, n: int): bool = + Result = lua_type(L, n) == LUA_TBOOLEAN + +proc lua_isthread(L: Plua_State, n: int): bool = + Result = lua_type(L, n) == LUA_TTHREAD + +proc lua_isnone(L: Plua_State, n: int): bool = + Result = lua_type(L, n) == LUA_TNONE + +proc lua_isnoneornil(L: Plua_State, n: int): bool = + Result = lua_type(L, n) <= 0 + +proc lua_pushliteral(L: Plua_State, s: cstring) = + lua_pushlstring(L, s, len(s)) + +proc lua_setglobal(L: Plua_State, s: cstring) = + lua_setfield(L, LUA_GLOBALSINDEX, s) + +proc lua_getglobal(L: Plua_State, s: cstring) = + lua_getfield(L, LUA_GLOBALSINDEX, s) + +proc lua_tostring(L: Plua_State, i: int): cstring = + Result = lua_tolstring(L, i, nil) + +proc lua_getregistry(L: Plua_State) = + lua_pushvalue(L, LUA_REGISTRYINDEX) + +proc lua_getgccount(L: Plua_State): int = + Result = lua_gc(L, LUA_GCCOUNT, 0) diff --git a/lib/oldwrappers/lua/lualib.nim b/lib/oldwrappers/lua/lualib.nim new file mode 100644 index 000000000..df5d53101 --- /dev/null +++ b/lib/oldwrappers/lua/lualib.nim @@ -0,0 +1,73 @@ +#***************************************************************************** +# * * +# * File: lualib.pas * +# * Authors: TeCGraf (C headers + actual Lua libraries) * +# * Lavergne Thomas (original translation to Pascal) * +# * Bram Kuijvenhoven (update to Lua 5.1.1 for FreePascal) * +# * Description: Standard Lua libraries * +# * * +# ***************************************************************************** +# +#** $Id: lualib.h,v 1.28 2003/03/18 12:24:26 roberto Exp $ +#** Lua standard libraries +#** See Copyright Notice in lua.h +# +# +#** Translated to pascal by Lavergne Thomas +#** Bug reports : +#** - thomas.lavergne@laposte.net +#** In french or in english +# + +import lua + +const + LUA_COLIBNAME* = "coroutine" + LUA_TABLIBNAME* = "table" + LUA_IOLIBNAME* = "io" + LUA_OSLIBNAME* = "os" + LUA_STRLINAME* = "string" + LUA_MATHLIBNAME* = "math" + LUA_DBLIBNAME* = "debug" + LUA_LOADLIBNAME* = "package" + +proc luaopen_base*(L: Plua_State): cint{.cdecl, dynlib: LUA_LIB_NAME, + importc.} +proc luaopen_table*(L: Plua_State): cint{.cdecl, dynlib: LUA_LIB_NAME, + importc.} +proc luaopen_io*(L: Plua_State): cint{.cdecl, dynlib: LUA_LIB_NAME, importc.} +proc luaopen_string*(L: Plua_State): cint{.cdecl, dynlib: LUA_LIB_NAME, + importc.} +proc luaopen_math*(L: Plua_State): cint{.cdecl, dynlib: LUA_LIB_NAME, + importc.} +proc luaopen_debug*(L: Plua_State): cint{.cdecl, dynlib: LUA_LIB_NAME, + importc.} +proc luaopen_package*(L: Plua_State): cint{.cdecl, dynlib: LUA_LIB_NAME, + importc.} +proc luaL_openlibs*(L: Plua_State){.cdecl, dynlib: LUA_LIB_NAME, importc.} + # compatibility code +proc lua_baselibopen*(L: Plua_State): Bool +proc lua_tablibopen*(L: Plua_State): Bool +proc lua_iolibopen*(L: Plua_State): Bool +proc lua_strlibopen*(L: Plua_State): Bool +proc lua_mathlibopen*(L: Plua_State): Bool +proc lua_dblibopen*(L: Plua_State): Bool +# implementation + +proc lua_baselibopen(L: Plua_State): Bool = + Result = luaopen_base(L) != 0'i32 + +proc lua_tablibopen(L: Plua_State): Bool = + Result = luaopen_table(L) != 0'i32 + +proc lua_iolibopen(L: Plua_State): Bool = + Result = luaopen_io(L) != 0'i32 + +proc lua_strlibopen(L: Plua_State): Bool = + Result = luaopen_string(L) != 0'i32 + +proc lua_mathlibopen(L: Plua_State): Bool = + Result = luaopen_math(L) != 0'i32 + +proc lua_dblibopen(L: Plua_State): Bool = + Result = luaopen_debug(L) != 0'i32 diff --git a/lib/oldwrappers/mysql.nim b/lib/oldwrappers/mysql.nim new file mode 100644 index 000000000..e94afb1a2 --- /dev/null +++ b/lib/oldwrappers/mysql.nim @@ -0,0 +1,1154 @@ +# +# +# Nimrod's Runtime Library +# (c) Copyright 2009 Andreas Rumpf +# +# See the file "copying.txt", included in this +# distribution, for details about the copyright. +# + +{.deadCodeElim: on.} + +when defined(Unix): + const + mysqllib = "libmysqlclient.so.15" + +# mysqllib = "libmysqlclient.so.15" +when defined(Windows): + const + mysqllib = "libmysql.dll" + +# Copyright (C) 2000-2003 MySQL AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +type + my_bool* = bool + Pmy_bool* = ptr my_bool + PVIO* = Pointer + Pgptr* = ptr gptr + gptr* = cstring + Pmy_socket* = ptr my_socket + my_socket* = cint + PPByte* = pointer + cuint* = cint + +# ------------ Start of declaration in "mysql_com.h" --------------------- +# +# ** Common definition between mysql server & client +# +# Field/table name length + +const + NAME_LEN* = 64 + HOSTNAME_LENGTH* = 60 + USERNAME_LENGTH* = 16 + SERVER_VERSION_LENGTH* = 60 + SQLSTATE_LENGTH* = 5 + LOCAL_HOST* = "localhost" + LOCAL_HOST_NAMEDPIPE* = '.' + +const + MYSQL_NAMEDPIPE* = "MySQL" + MYSQL_SERVICENAME* = "MySQL" + +type + enum_server_command* = enum + COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST, COM_CREATE_DB, + COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS, COM_PROCESS_INFO, + COM_CONNECT, COM_PROCESS_KILL, COM_DEBUG, COM_PING, COM_TIME, + COM_DELAYED_INSERT, COM_CHANGE_USER, COM_BINLOG_DUMP, COM_TABLE_DUMP, + COM_CONNECT_OUT, COM_REGISTER_SLAVE, COM_STMT_PREPARE, COM_STMT_EXECUTE, + COM_STMT_SEND_LONG_DATA, COM_STMT_CLOSE, COM_STMT_RESET, COM_SET_OPTION, + COM_STMT_FETCH, COM_END + +const + SCRAMBLE_LENGTH* = 20 # Length of random string sent by server on handshake; + # this is also length of obfuscated password, + # recieved from client + SCRAMBLE_LENGTH_323* = 8 # length of password stored in the db: + # new passwords are preceeded with '*' + SCRAMBLED_PASSWORD_CHAR_LENGTH* = SCRAMBLE_LENGTH * 2 + 1 + SCRAMBLED_PASSWORD_CHAR_LENGTH_323* = SCRAMBLE_LENGTH_323 * 2 + NOT_NULL_FLAG* = 1 # Field can't be NULL + PRI_KEY_FLAG* = 2 # Field is part of a primary key + UNIQUE_KEY_FLAG* = 4 # Field is part of a unique key + MULTIPLE_KEY_FLAG* = 8 # Field is part of a key + BLOB_FLAG* = 16 # Field is a blob + UNSIGNED_FLAG* = 32 # Field is unsigned + ZEROFILL_FLAG* = 64 # Field is zerofill + BINARY_FLAG* = 128 # Field is binary + # The following are only sent to new clients + ENUM_FLAG* = 256 # field is an enum + AUTO_INCREMENT_FLAG* = 512 # field is a autoincrement field + TIMESTAMP_FLAG* = 1024 # Field is a timestamp + SET_FLAG* = 2048 # field is a set + NO_DEFAULT_VALUE_FLAG* = 4096 # Field doesn't have default value + NUM_FLAG* = 32768 # Field is num (for clients) + PART_KEY_FLAG* = 16384 # Intern; Part of some key + GROUP_FLAG* = 32768 # Intern: Group field + UNIQUE_FLAG* = 65536 # Intern: Used by sql_yacc + BINCMP_FLAG* = 131072 # Intern: Used by sql_yacc + REFRESH_GRANT* = 1 # Refresh grant tables + REFRESH_LOG* = 2 # Start on new log file + REFRESH_TABLES* = 4 # close all tables + REFRESH_HOSTS* = 8 # Flush host cache + REFRESH_STATUS* = 16 # Flush status variables + REFRESH_THREADS* = 32 # Flush thread cache + REFRESH_SLAVE* = 64 # Reset master info and restart slave thread + REFRESH_MASTER* = 128 # Remove all bin logs in the index and truncate the index + # The following can't be set with mysql_refresh() + REFRESH_READ_LOCK* = 16384 # Lock tables for read + REFRESH_FAST* = 32768 # Intern flag + REFRESH_QUERY_CACHE* = 65536 # RESET (remove all queries) from query cache + REFRESH_QUERY_CACHE_FREE* = 0x00020000 # pack query cache + REFRESH_DES_KEY_FILE* = 0x00040000 + REFRESH_USER_RESOURCES* = 0x00080000 + CLIENT_LONG_PASSWORD* = 1 # new more secure passwords + CLIENT_FOUND_ROWS* = 2 # Found instead of affected rows + CLIENT_LONG_FLAG* = 4 # Get all column flags + CLIENT_CONNECT_WITH_DB* = 8 # One can specify db on connect + CLIENT_NO_SCHEMA* = 16 # Don't allow database.table.column + CLIENT_COMPRESS* = 32 # Can use compression protocol + CLIENT_ODBC* = 64 # Odbc client + CLIENT_LOCAL_FILES* = 128 # Can use LOAD DATA LOCAL + CLIENT_IGNORE_SPACE* = 256 # Ignore spaces before '(' + CLIENT_PROTOCOL_41* = 512 # New 4.1 protocol + CLIENT_INTERACTIVE* = 1024 # This is an interactive client + CLIENT_SSL* = 2048 # Switch to SSL after handshake + CLIENT_IGNORE_SIGPIPE* = 4096 # IGNORE sigpipes + CLIENT_TRANSACTIONS* = 8192 # Client knows about transactions + CLIENT_RESERVED* = 16384 # Old flag for 4.1 protocol + CLIENT_SECURE_CONNECTION* = 32768 # New 4.1 authentication + CLIENT_MULTI_STATEMENTS* = 65536 # Enable/disable multi-stmt support + CLIENT_MULTI_RESULTS* = 131072 # Enable/disable multi-results + CLIENT_REMEMBER_OPTIONS*: int = 1 shl 31 + SERVER_STATUS_IN_TRANS* = 1 # Transaction has started + SERVER_STATUS_AUTOCOMMIT* = 2 # Server in auto_commit mode + SERVER_STATUS_MORE_RESULTS* = 4 # More results on server + SERVER_MORE_RESULTS_EXISTS* = 8 # Multi query - next query exists + SERVER_QUERY_NO_GOOD_INDEX_USED* = 16 + SERVER_QUERY_NO_INDEX_USED* = 32 # The server was able to fulfill the clients request and opened a + # read-only non-scrollable cursor for a query. This flag comes + # in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands. + SERVER_STATUS_CURSOR_EXISTS* = 64 # This flag is sent when a read-only cursor is exhausted, in reply to + # COM_STMT_FETCH command. + SERVER_STATUS_LAST_ROW_SENT* = 128 + SERVER_STATUS_DB_DROPPED* = 256 # A database was dropped + SERVER_STATUS_NO_BACKSLASH_ESCAPES* = 512 + MYSQL_ERRMSG_SIZE* = 200 + NET_READ_TIMEOUT* = 30 # Timeout on read + NET_WRITE_TIMEOUT* = 60 # Timeout on write + NET_WAIT_TIMEOUT* = 8 * 60 * 60 # Wait for new query + ONLY_KILL_QUERY* = 1 + +const + MAX_TINYINT_WIDTH* = 3 # Max width for a TINY w.o. sign + MAX_SMALLINT_WIDTH* = 5 # Max width for a SHORT w.o. sign + MAX_MEDIUMINT_WIDTH* = 8 # Max width for a INT24 w.o. sign + MAX_INT_WIDTH* = 10 # Max width for a LONG w.o. sign + MAX_BIGINT_WIDTH* = 20 # Max width for a LONGLONG + MAX_CHAR_WIDTH* = 255 # Max length for a CHAR colum + MAX_BLOB_WIDTH* = 8192 # Default width for blob + +type + Pst_net* = ptr st_net + st_net*{.final.} = object + vio*: PVio + buff*: cstring + buff_end*: cstring + write_pos*: cstring + read_pos*: cstring + fd*: my_socket # For Perl DBI/dbd + max_packet*: int + max_packet_size*: int + pkt_nr*: cuint + compress_pkt_nr*: cuint + write_timeout*: cuint + read_timeout*: cuint + retry_count*: cuint + fcntl*: cint + compress*: my_bool # The following variable is set if we are doing several queries in one + # command ( as in LOAD TABLE ... FROM MASTER ), + # and do not want to confuse the client with OK at the wrong time + remain_in_buf*: int + len*: int + buf_length*: int + where_b*: int + return_status*: ptr cint + reading_or_writing*: char + save_char*: cchar + no_send_ok*: my_bool # For SPs and other things that do multiple stmts + no_send_eof*: my_bool # For SPs' first version read-only cursors + no_send_error*: my_bool # Set if OK packet is already sent, and + # we do not need to send error messages + # Pointer to query object in query cache, do not equal NULL (0) for + # queries in cache that have not stored its results yet + # $endif + last_error*: array[0..(MYSQL_ERRMSG_SIZE) - 1, char] + sqlstate*: array[0..(SQLSTATE_LENGTH + 1) - 1, char] + last_errno*: cuint + error*: char + query_cache_query*: gptr + report_error*: my_bool # We should report error (we have unreported error) + return_errno*: my_bool + + NET* = st_net + PNET* = ptr NET + +const + packet_error* = -1 + +type + enum_field_types* = enum # For backward compatibility + MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY, MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG, + MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE, MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP, + MYSQL_TYPE_LONGLONG, MYSQL_TYPE_INT24, MYSQL_TYPE_DATE, MYSQL_TYPE_TIME, + MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR, MYSQL_TYPE_NEWDATE, + MYSQL_TYPE_VARCHAR, MYSQL_TYPE_BIT, MYSQL_TYPE_NEWDECIMAL = 246, + MYSQL_TYPE_ENUM = 247, MYSQL_TYPE_SET = 248, MYSQL_TYPE_TINY_BLOB = 249, + MYSQL_TYPE_MEDIUM_BLOB = 250, MYSQL_TYPE_LONG_BLOB = 251, + MYSQL_TYPE_BLOB = 252, MYSQL_TYPE_VAR_STRING = 253, MYSQL_TYPE_STRING = 254, + MYSQL_TYPE_GEOMETRY = 255 + +const + CLIENT_MULTI_QUERIES* = CLIENT_MULTI_STATEMENTS + FIELD_TYPE_DECIMAL* = MYSQL_TYPE_DECIMAL + FIELD_TYPE_NEWDECIMAL* = MYSQL_TYPE_NEWDECIMAL + FIELD_TYPE_TINY* = MYSQL_TYPE_TINY + FIELD_TYPE_SHORT* = MYSQL_TYPE_SHORT + FIELD_TYPE_LONG* = MYSQL_TYPE_LONG + FIELD_TYPE_FLOAT* = MYSQL_TYPE_FLOAT + FIELD_TYPE_DOUBLE* = MYSQL_TYPE_DOUBLE + FIELD_TYPE_NULL* = MYSQL_TYPE_NULL + FIELD_TYPE_TIMESTAMP* = MYSQL_TYPE_TIMESTAMP + FIELD_TYPE_LONGLONG* = MYSQL_TYPE_LONGLONG + FIELD_TYPE_INT24* = MYSQL_TYPE_INT24 + FIELD_TYPE_DATE* = MYSQL_TYPE_DATE + FIELD_TYPE_TIME* = MYSQL_TYPE_TIME + FIELD_TYPE_DATETIME* = MYSQL_TYPE_DATETIME + FIELD_TYPE_YEAR* = MYSQL_TYPE_YEAR + FIELD_TYPE_NEWDATE* = MYSQL_TYPE_NEWDATE + FIELD_TYPE_ENUM* = MYSQL_TYPE_ENUM + FIELD_TYPE_SET* = MYSQL_TYPE_SET + FIELD_TYPE_TINY_BLOB* = MYSQL_TYPE_TINY_BLOB + FIELD_TYPE_MEDIUM_BLOB* = MYSQL_TYPE_MEDIUM_BLOB + FIELD_TYPE_LONG_BLOB* = MYSQL_TYPE_LONG_BLOB + FIELD_TYPE_BLOB* = MYSQL_TYPE_BLOB + FIELD_TYPE_VAR_STRING* = MYSQL_TYPE_VAR_STRING + FIELD_TYPE_STRING* = MYSQL_TYPE_STRING + FIELD_TYPE_CHAR* = MYSQL_TYPE_TINY + FIELD_TYPE_INTERVAL* = MYSQL_TYPE_ENUM + FIELD_TYPE_GEOMETRY* = MYSQL_TYPE_GEOMETRY + FIELD_TYPE_BIT* = MYSQL_TYPE_BIT # Shutdown/kill enums and constants + # Bits for THD::killable. + MYSQL_SHUTDOWN_KILLABLE_CONNECT* = chr(1 shl 0) + MYSQL_SHUTDOWN_KILLABLE_TRANS* = chr(1 shl 1) + MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE* = chr(1 shl 2) + MYSQL_SHUTDOWN_KILLABLE_UPDATE* = chr(1 shl 3) + +type + mysql_enum_shutdown_level* = enum + SHUTDOWN_DEFAULT = 0, SHUTDOWN_WAIT_CONNECTIONS = 1, + SHUTDOWN_WAIT_TRANSACTIONS = 2, + SHUTDOWN_WAIT_UPDATES = 8, + SHUTDOWN_WAIT_ALL_BUFFERS = 16, + SHUTDOWN_WAIT_CRITICAL_BUFFERS = 17, + KILL_QUERY = 254, + KILL_CONNECTION = 255 + enum_cursor_type* = enum # options for mysql_set_option + CURSOR_TYPE_NO_CURSOR = 0, CURSOR_TYPE_READ_ONLY = 1, + CURSOR_TYPE_FOR_UPDATE = 2, CURSOR_TYPE_SCROLLABLE = 4 + enum_mysql_set_option* = enum + MYSQL_OPTION_MULTI_STATEMENTS_ON, MYSQL_OPTION_MULTI_STATEMENTS_OFF + +proc net_new_transaction*(net: st_net): st_net +proc my_net_init*(net: PNET, vio: PVio): my_bool{.cdecl, dynlib: mysqllib, + importc: "my_net_init".} +proc my_net_local_init*(net: PNET){.cdecl, dynlib: mysqllib, + importc: "my_net_local_init".} +proc net_end*(net: PNET){.cdecl, dynlib: mysqllib, importc: "net_end".} +proc net_clear*(net: PNET){.cdecl, dynlib: mysqllib, importc: "net_clear".} +proc net_realloc*(net: PNET, len: int): my_bool{.cdecl, dynlib: mysqllib, + importc: "net_realloc".} +proc net_flush*(net: PNET): my_bool{.cdecl, dynlib: mysqllib, + importc: "net_flush".} +proc my_net_write*(net: PNET, packet: cstring, length: int): my_bool{.cdecl, + dynlib: mysqllib, importc: "my_net_write".} +proc net_write_command*(net: PNET, command: char, header: cstring, + head_len: int, packet: cstring, length: int): my_bool{. + cdecl, dynlib: mysqllib, importc: "net_write_command".} +proc net_real_write*(net: PNET, packet: cstring, length: int): cint{.cdecl, + dynlib: mysqllib, importc: "net_real_write".} +proc my_net_read*(net: PNET): int{.cdecl, dynlib: mysqllib, + importc: "my_net_read".} + # The following function is not meant for normal usage + # Currently it's used internally by manager.c +type + Psockaddr* = ptr sockaddr + sockaddr*{.final.} = object # undefined structure + +proc my_connect*(s: my_socket, name: Psockaddr, namelen: cuint, timeout: cuint): cint{. + cdecl, dynlib: mysqllib, importc: "my_connect".} +type + Prand_struct* = ptr rand_struct + rand_struct*{.final.} = object # The following is for user defined functions + seed1*: int + seed2*: int + max_value*: int + max_value_dbl*: cdouble + + Item_result* = enum + STRING_RESULT, REAL_RESULT, INT_RESULT, ROW_RESULT, DECIMAL_RESULT + PItem_result* = ptr Item_result + Pst_udf_args* = ptr st_udf_args + st_udf_args*{.final.} = object + arg_count*: cuint # Number of arguments + arg_type*: PItem_result # Pointer to item_results + args*: cstringArray # Pointer to item_results + lengths*: ptr int # Length of string arguments + maybe_null*: cstring # Length of string arguments + attributes*: cstringArray # Pointer to attribute name + attribute_lengths*: ptr int # Length of attribute arguments + + UDF_ARGS* = st_udf_args + PUDF_ARGS* = ptr UDF_ARGS # This holds information about the result + Pst_udf_init* = ptr st_udf_init + st_udf_init*{.final.} = object + maybe_null*: my_bool # 1 if function can return NULL + decimals*: cuint # for real functions + max_length*: int # For string functions + theptr*: cstring # free pointer for function data + const_item*: my_bool # free pointer for function data + + UDF_INIT* = st_udf_init + PUDF_INIT* = ptr UDF_INIT # Constants when using compression + +const + NET_HEADER_SIZE* = 4 # standard header size + COMP_HEADER_SIZE* = 3 # compression header extra size + # Prototypes to password functions + # These functions are used for authentication by client and server and + # implemented in sql/password.c + +proc randominit*(para1: Prand_struct, seed1: int, seed2: int){.cdecl, + dynlib: mysqllib, importc: "randominit".} +proc my_rnd*(para1: Prand_struct): cdouble{.cdecl, dynlib: mysqllib, + importc: "my_rnd".} +proc create_random_string*(fto: cstring, len: cuint, rand_st: Prand_struct){. + cdecl, dynlib: mysqllib, importc: "create_random_string".} +proc hash_password*(fto: int, password: cstring, password_len: cuint){.cdecl, + dynlib: mysqllib, importc: "hash_password".} +proc make_scrambled_password_323*(fto: cstring, password: cstring){.cdecl, + dynlib: mysqllib, importc: "make_scrambled_password_323".} +proc scramble_323*(fto: cstring, message: cstring, password: cstring){.cdecl, + dynlib: mysqllib, importc: "scramble_323".} +proc check_scramble_323*(para1: cstring, message: cstring, salt: int): my_bool{. + cdecl, dynlib: mysqllib, importc: "check_scramble_323".} +proc get_salt_from_password_323*(res: ptr int, password: cstring){.cdecl, + dynlib: mysqllib, importc: "get_salt_from_password_323".} +proc make_password_from_salt_323*(fto: cstring, salt: ptr int){.cdecl, + dynlib: mysqllib, importc: "make_password_from_salt_323".} +proc octet2hex*(fto: cstring, str: cstring, length: cuint): cstring{.cdecl, + dynlib: mysqllib, importc: "octet2hex".} +proc make_scrambled_password*(fto: cstring, password: cstring){.cdecl, + dynlib: mysqllib, importc: "make_scrambled_password".} +proc scramble*(fto: cstring, message: cstring, password: cstring){.cdecl, + dynlib: mysqllib, importc: "scramble".} +proc check_scramble*(reply: cstring, message: cstring, hash_stage2: pointer): my_bool{. + cdecl, dynlib: mysqllib, importc: "check_scramble".} +proc get_salt_from_password*(res: pointer, password: cstring){.cdecl, + dynlib: mysqllib, importc: "get_salt_from_password".} +proc make_password_from_salt*(fto: cstring, hash_stage2: pointer){.cdecl, + dynlib: mysqllib, importc: "make_password_from_salt".} + # end of password.c +proc get_tty_password*(opt_message: cstring): cstring{.cdecl, dynlib: mysqllib, + importc: "get_tty_password".} +proc mysql_errno_to_sqlstate*(mysql_errno: cuint): cstring{.cdecl, + dynlib: mysqllib, importc: "mysql_errno_to_sqlstate".} + # Some other useful functions +proc modify_defaults_file*(file_location: cstring, option: cstring, + option_value: cstring, section_name: cstring, + remove_option: cint): cint{.cdecl, dynlib: mysqllib, + importc: "load_defaults".} +proc load_defaults*(conf_file: cstring, groups: cstringArray, argc: ptr cint, + argv: ptr cstringArray): cint{.cdecl, dynlib: mysqllib, + importc: "load_defaults".} +proc my_init*(): my_bool{.cdecl, dynlib: mysqllib, importc: "my_init".} +proc my_thread_init*(): my_bool{.cdecl, dynlib: mysqllib, + importc: "my_thread_init".} +proc my_thread_end*(){.cdecl, dynlib: mysqllib, importc: "my_thread_end".} +const + NULL_LENGTH*: int = int(not (0)) # For net_store_length + +const + MYSQL_STMT_HEADER* = 4 + MYSQL_LONG_DATA_HEADER* = 6 # ------------ Stop of declaration in "mysql_com.h" ----------------------- + # $include "mysql_time.h" + # $include "mysql_version.h" + # $include "typelib.h" + # $include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */ + # var + # mysql_port : cuint;cvar;external; + # mysql_unix_port : Pchar;cvar;external; + +const + CLIENT_NET_READ_TIMEOUT* = 365 * 24 * 3600 # Timeout on read + CLIENT_NET_WRITE_TIMEOUT* = 365 * 24 * 3600 # Timeout on write + +type + Pst_mysql_field* = ptr st_mysql_field + st_mysql_field*{.final.} = object + name*: cstring # Name of column + org_name*: cstring # Original column name, if an alias + table*: cstring # Table of column if column was a field + org_table*: cstring # Org table name, if table was an alias + db*: cstring # Database for table + catalog*: cstring # Catalog for table + def*: cstring # Default value (set by mysql_list_fields) + len*: int # Width of column (create length) + max_length*: int # Max width for selected set + name_length*: cuint + org_name_length*: cuint + table_length*: cuint + org_table_length*: cuint + db_length*: cuint + catalog_length*: cuint + def_length*: cuint + flags*: cuint # Div flags + decimals*: cuint # Number of decimals in field + charsetnr*: cuint # Character set + ftype*: enum_field_types # Type of field. See mysql_com.h for types + + MYSQL_FIELD* = st_mysql_field + PMYSQL_FIELD* = ptr MYSQL_FIELD + PMYSQL_ROW* = ptr MYSQL_ROW # return data as array of strings + MYSQL_ROW* = cstringArray + PMYSQL_FIELD_OFFSET* = ptr MYSQL_FIELD_OFFSET # offset to current field + MYSQL_FIELD_OFFSET* = cuint + +proc IS_PRI_KEY*(n: int32): bool +proc IS_NOT_NULL*(n: int32): bool +proc IS_BLOB*(n: int32): bool +proc IS_NUM*(t: enum_field_types): bool +proc INTERNAL_NUM_FIELD*(f: Pst_mysql_field): bool +proc IS_NUM_FIELD*(f: Pst_mysql_field): bool + +type + my_ulonglong* = int64 + Pmy_ulonglong* = ptr my_ulonglong + +const + MYSQL_COUNT_ERROR* = not (my_ulonglong(0)) + +type + Pst_mysql_rows* = ptr st_mysql_rows + st_mysql_rows*{.final.} = object + next*: Pst_mysql_rows # list of rows + data*: MYSQL_ROW + len*: int + + MYSQL_ROWS* = st_mysql_rows + PMYSQL_ROWS* = ptr MYSQL_ROWS + PMYSQL_ROW_OFFSET* = ptr MYSQL_ROW_OFFSET # offset to current row + MYSQL_ROW_OFFSET* = MYSQL_ROWS # ------------ Start of declaration in "my_alloc.h" -------------------- + # $include "my_alloc.h" + +const + ALLOC_MAX_BLOCK_TO_DROP* = 4096 + ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP* = 10 # struct for once_alloc (block) + +type + Pst_used_mem* = ptr st_used_mem + st_used_mem*{.final.} = object + next*: Pst_used_mem # Next block in use + left*: cuint # memory left in block + size*: cuint # size of block + + USED_MEM* = st_used_mem + PUSED_MEM* = ptr USED_MEM + Pst_mem_root* = ptr st_mem_root + st_mem_root*{.final.} = object + free*: PUSED_MEM # blocks with free memory in it + used*: PUSED_MEM # blocks almost without free memory + pre_alloc*: PUSED_MEM # preallocated block + min_malloc*: cuint # if block have less memory it will be put in 'used' list + block_size*: cuint # initial block size + block_num*: cuint # allocated blocks counter + # first free block in queue test counter (if it exceed + # MAX_BLOCK_USAGE_BEFORE_DROP block will be dropped in 'used' list) + first_block_usage*: cuint + error_handler*: proc (){.cdecl.} + + MEM_ROOT* = st_mem_root + PMEM_ROOT* = ptr MEM_ROOT # ------------ Stop of declaration in "my_alloc.h" ---------------------- + +type + Pst_mysql_data* = ptr st_mysql_data + st_mysql_data*{.final.} = object + rows*: my_ulonglong + fields*: cuint + data*: PMYSQL_ROWS + alloc*: MEM_ROOT + prev_ptr*: ptr PMYSQL_ROWS + + MYSQL_DATA* = st_mysql_data + PMYSQL_DATA* = ptr MYSQL_DATA + mysql_option* = enum + MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE, + MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP, + MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE, + MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT, + MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT, + MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION, + MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH, + MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT + +const + MAX_MYSQL_MANAGER_ERR* = 256 + MAX_MYSQL_MANAGER_MSG* = 256 + MANAGER_OK* = 200 + MANAGER_INFO* = 250 + MANAGER_ACCESS* = 401 + MANAGER_CLIENT_ERR* = 450 + MANAGER_INTERNAL_ERR* = 500 + +type + st_dynamic_array*{.final.} = object + buffer*: cstring + elements*: cuint + max_element*: cuint + alloc_increment*: cuint + size_of_element*: cuint + + DYNAMIC_ARRAY* = st_dynamic_array + Pst_dynamic_array* = ptr st_dynamic_array + Pst_mysql_options* = ptr st_mysql_options + st_mysql_options*{.final.} = object + connect_timeout*: cuint + read_timeout*: cuint + write_timeout*: cuint + port*: cuint + protocol*: cuint + client_flag*: int + host*: cstring + user*: cstring + password*: cstring + unix_socket*: cstring + db*: cstring + init_commands*: Pst_dynamic_array + my_cnf_file*: cstring + my_cnf_group*: cstring + charset_dir*: cstring + charset_name*: cstring + ssl_key*: cstring # PEM key file + ssl_cert*: cstring # PEM cert file + ssl_ca*: cstring # PEM CA file + ssl_capath*: cstring # PEM directory of CA-s? + ssl_cipher*: cstring # cipher to use + shared_memory_base_name*: cstring + max_allowed_packet*: int + use_ssl*: my_bool # if to use SSL or not + compress*: my_bool + named_pipe*: my_bool # On connect, find out the replication role of the server, and + # establish connections to all the peers + rpl_probe*: my_bool # Each call to mysql_real_query() will parse it to tell if it is a read + # or a write, and direct it to the slave or the master + rpl_parse*: my_bool # If set, never read from a master, only from slave, when doing + # a read that is replication-aware + no_master_reads*: my_bool + separate_thread*: my_bool + methods_to_use*: mysql_option + client_ip*: cstring + secure_auth*: my_bool # Refuse client connecting to server if it uses old (pre-4.1.1) protocol + report_data_truncation*: my_bool # 0 - never report, 1 - always report (default) + # function pointers for local infile support + local_infile_init*: proc (para1: var pointer, para2: cstring, para3: pointer): cint{. + cdecl.} + local_infile_read*: proc (para1: pointer, para2: cstring, para3: cuint): cint + local_infile_end*: proc (para1: pointer) + local_infile_error*: proc (para1: pointer, para2: cstring, para3: cuint): cint + local_infile_userdata*: pointer + + mysql_status* = enum + MYSQL_STATUS_READY, MYSQL_STATUS_GET_RESULT, MYSQL_STATUS_USE_RESULT + mysql_protocol_type* = enum # There are three types of queries - the ones that have to go to + # the master, the ones that go to a slave, and the adminstrative + # type which must happen on the pivot connectioin + MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET, + MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY + mysql_rpl_type* = enum + MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN + charset_info_st*{.final.} = object + number*: cuint + primary_number*: cuint + binary_number*: cuint + state*: cuint + csname*: cstring + name*: cstring + comment*: cstring + tailoring*: cstring + ftype*: cstring + to_lower*: cstring + to_upper*: cstring + sort_order*: cstring + contractions*: ptr int16 + sort_order_big*: ptr ptr int16 + tab_to_uni*: ptr int16 + tab_from_uni*: pointer # was ^MY_UNI_IDX + state_map*: cstring + ident_map*: cstring + strxfrm_multiply*: cuint + mbminlen*: cuint + mbmaxlen*: cuint + min_sort_char*: int16 + max_sort_char*: int16 + escape_with_backslash_is_dangerous*: my_bool + cset*: pointer # was ^MY_CHARSET_HANDLER + coll*: pointer # was ^MY_COLLATION_HANDLER; + + CHARSET_INFO* = charset_info_st + Pcharset_info_st* = ptr charset_info_st + Pcharacter_set* = ptr character_set + character_set*{.final.} = object + number*: cuint + state*: cuint + csname*: cstring + name*: cstring + comment*: cstring + dir*: cstring + mbminlen*: cuint + mbmaxlen*: cuint + + MY_CHARSET_INFO* = character_set + PMY_CHARSET_INFO* = ptr MY_CHARSET_INFO + Pst_mysql_methods* = ptr st_mysql_methods + Pst_mysql* = ptr st_mysql + st_mysql*{.final.} = object + net*: NET # Communication parameters + connector_fd*: gptr # ConnectorFd for SSL + host*: cstring + user*: cstring + passwd*: cstring + unix_socket*: cstring + server_version*: cstring + host_info*: cstring + info*: cstring + db*: cstring + charset*: Pcharset_info_st + fields*: PMYSQL_FIELD + field_alloc*: MEM_ROOT + affected_rows*: my_ulonglong + insert_id*: my_ulonglong # id if insert on table with NEXTNR + extra_info*: my_ulonglong # Used by mysqlshow, not used by mysql 5.0 and up + thread_id*: int # Id for connection in server + packet_length*: int + port*: cuint + client_flag*: int + server_capabilities*: int + protocol_version*: cuint + field_count*: cuint + server_status*: cuint + server_language*: cuint + warning_count*: cuint + options*: st_mysql_options + status*: mysql_status + free_me*: my_bool # If free in mysql_close + reconnect*: my_bool # set to 1 if automatic reconnect + scramble*: array[0..(SCRAMBLE_LENGTH + 1) - 1, char] # session-wide random string + # Set if this is the original connection, not a master or a slave we have + # added though mysql_rpl_probe() or mysql_set_master()/ mysql_add_slave() + rpl_pivot*: my_bool # Pointers to the master, and the next slave connections, points to + # itself if lone connection. + master*: Pst_mysql + next_slave*: Pst_mysql + last_used_slave*: Pst_mysql # needed for round-robin slave pick + last_used_con*: Pst_mysql # needed for send/read/store/use result to work correctly with replication + stmts*: Pointer # was PList, list of all statements + methods*: Pst_mysql_methods + thd*: pointer # Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag + # from mysql_stmt_close if close had to cancel result set of this object. + unbuffered_fetch_owner*: Pmy_bool + + MYSQL* = st_mysql + PMYSQL* = ptr MYSQL + Pst_mysql_res* = ptr st_mysql_res + st_mysql_res*{.final.} = object + row_count*: my_ulonglong + fields*: PMYSQL_FIELD + data*: PMYSQL_DATA + data_cursor*: PMYSQL_ROWS + lengths*: ptr int # column lengths of current row + handle*: PMYSQL # for unbuffered reads + field_alloc*: MEM_ROOT + field_count*: cuint + current_field*: cuint + row*: MYSQL_ROW # If unbuffered read + current_row*: MYSQL_ROW # buffer to current row + eof*: my_bool # Used by mysql_fetch_row + unbuffered_fetch_cancelled*: my_bool # mysql_stmt_close() had to cancel this result + methods*: Pst_mysql_methods + + MYSQL_RES* = st_mysql_res + PMYSQL_RES* = ptr MYSQL_RES + Pst_mysql_stmt* = ptr st_mysql_stmt + PMYSQL_STMT* = ptr MYSQL_STMT + st_mysql_methods*{.final.} = object + read_query_result*: proc (mysql: PMYSQL): my_bool{.cdecl.} + advanced_command*: proc (mysql: PMYSQL, command: enum_server_command, + header: cstring, header_length: int, + arg: cstring, arg_length: int, + skip_check: my_bool): my_bool + read_rows*: proc (mysql: PMYSQL, mysql_fields: PMYSQL_FIELD, fields: cuint): PMYSQL_DATA + use_result*: proc (mysql: PMYSQL): PMYSQL_RES + fetch_lengths*: proc (fto: ptr int, column: MYSQL_ROW, field_count: cuint) + flush_use_result*: proc (mysql: PMYSQL) + list_fields*: proc (mysql: PMYSQL): PMYSQL_FIELD + read_prepare_result*: proc (mysql: PMYSQL, stmt: PMYSQL_STMT): my_bool + stmt_execute*: proc (stmt: PMYSQL_STMT): cint + read_binary_rows*: proc (stmt: PMYSQL_STMT): cint + unbuffered_fetch*: proc (mysql: PMYSQL, row: cstringArray): cint + free_embedded_thd*: proc (mysql: PMYSQL) + read_statistics*: proc (mysql: PMYSQL): cstring + next_result*: proc (mysql: PMYSQL): my_bool + read_change_user_result*: proc (mysql: PMYSQL, buff: cstring, + passwd: cstring): cint + read_rowsfrom_cursor*: proc (stmt: PMYSQL_STMT): cint + + MYSQL_METHODS* = st_mysql_methods + PMYSQL_METHODS* = ptr MYSQL_METHODS + Pst_mysql_manager* = ptr st_mysql_manager + st_mysql_manager*{.final.} = object + net*: NET + host*: cstring + user*: cstring + passwd*: cstring + port*: cuint + free_me*: my_bool + eof*: my_bool + cmd_status*: cint + last_errno*: cint + net_buf*: cstring + net_buf_pos*: cstring + net_data_end*: cstring + net_buf_size*: cint + last_error*: array[0..(MAX_MYSQL_MANAGER_ERR) - 1, char] + + MYSQL_MANAGER* = st_mysql_manager + PMYSQL_MANAGER* = ptr MYSQL_MANAGER + Pst_mysql_parameters* = ptr st_mysql_parameters + st_mysql_parameters*{.final.} = object + p_max_allowed_packet*: ptr int + p_net_buffer_length*: ptr int + + MYSQL_PARAMETERS* = st_mysql_parameters + PMYSQL_PARAMETERS* = ptr MYSQL_PARAMETERS + enum_mysql_stmt_state* = enum + MYSQL_STMT_INIT_DONE = 1, MYSQL_STMT_PREPARE_DONE, MYSQL_STMT_EXECUTE_DONE, + MYSQL_STMT_FETCH_DONE + Pst_mysql_bind* = ptr st_mysql_bind + st_mysql_bind*{.final.} = object + len*: int # output length pointer + is_null*: Pmy_bool # Pointer to null indicator + buffer*: pointer # buffer to get/put data + error*: pmy_bool # set this if you want to track data truncations happened during fetch + buffer_type*: enum_field_types # buffer type + buffer_length*: int # buffer length, must be set for str/binary + # Following are for internal use. Set by mysql_stmt_bind_param + row_ptr*: ptr byte # for the current data position + offset*: int # offset position for char/binary fetch + length_value*: int # Used if length is 0 + param_number*: cuint # For null count and error messages + pack_length*: cuint # Internal length for packed data + error_value*: my_bool # used if error is 0 + is_unsigned*: my_bool # set if integer type is unsigned + long_data_used*: my_bool # If used with mysql_send_long_data + is_null_value*: my_bool # Used if is_null is 0 + store_param_func*: proc (net: PNET, param: Pst_mysql_bind){.cdecl.} + fetch_result*: proc (para1: Pst_mysql_bind, para2: PMYSQL_FIELD, row: PPbyte) + skip_result*: proc (para1: Pst_mysql_bind, para2: PMYSQL_FIELD, row: PPbyte) + + MYSQL_BIND* = st_mysql_bind + PMYSQL_BIND* = ptr MYSQL_BIND # statement handler + st_mysql_stmt*{.final.} = object + mem_root*: MEM_ROOT # root allocations + mysql*: PMYSQL # connection handle + params*: PMYSQL_BIND # input parameters + `bind`*: PMYSQL_BIND # input parameters + fields*: PMYSQL_FIELD # result set metadata + result*: MYSQL_DATA # cached result set + data_cursor*: PMYSQL_ROWS # current row in cached result + affected_rows*: my_ulonglong # copy of mysql->affected_rows after statement execution + insert_id*: my_ulonglong + read_row_func*: proc (stmt: Pst_mysql_stmt, row: PPbyte): cint{.cdecl.} + stmt_id*: int # Id for prepared statement + flags*: int # i.e. type of cursor to open + prefetch_rows*: int # number of rows per one COM_FETCH + server_status*: cuint # Copied from mysql->server_status after execute/fetch to know + # server-side cursor status for this statement. + last_errno*: cuint # error code + param_count*: cuint # input parameter count + field_count*: cuint # number of columns in result set + state*: enum_mysql_stmt_state # statement state + last_error*: array[0..(MYSQL_ERRMSG_SIZE) - 1, char] # error message + sqlstate*: array[0..(SQLSTATE_LENGTH + 1) - 1, char] + send_types_to_server*: my_bool # Types of input parameters should be sent to server + bind_param_done*: my_bool # input buffers were supplied + bind_result_done*: char # output buffers were supplied + unbuffered_fetch_cancelled*: my_bool + update_max_length*: my_bool + + MYSQL_STMT* = st_mysql_stmt # When doing mysql_stmt_store_result calculate max_length attribute + # of statement metadata. This is to be consistent with the old API, + # where this was done automatically. + # In the new API we do that only by request because it slows down + # mysql_stmt_store_result sufficiently. + enum_stmt_attr_type* = enum + STMT_ATTR_UPDATE_MAX_LENGTH, STMT_ATTR_CURSOR_TYPE, + STMT_ATTR_PREFETCH_ROWS + +proc mysql_server_init*(argc: cint, argv: cstringArray, groups: cstringArray): cint{.cdecl, + dynlib: mysqllib, importc: "mysql_server_init".} +proc mysql_server_end*(){.cdecl, dynlib: mysqllib, importc: "mysql_server_end".} + # mysql_server_init/end need to be called when using libmysqld or + # libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so + # you don't need to call it explicitely; but you need to call + # mysql_server_end() to free memory). The names are a bit misleading + # (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general + # names which suit well whether you're using libmysqld or libmysqlclient. We + # intend to promote these aliases over the mysql_server* ones. +proc mysql_library_init*(argc: cint, argv: cstringArray, groups: cstringArray): cint{.cdecl, + dynlib: mysqllib, importc: "mysql_server_init".} +proc mysql_library_end*(){.cdecl, dynlib: mysqllib, importc: "mysql_server_end".} +proc mysql_get_parameters*(): PMYSQL_PARAMETERS{.stdcall, dynlib: mysqllib, + importc: "mysql_get_parameters".} + # Set up and bring down a thread; these function should be called + # for each thread in an application which opens at least one MySQL + # connection. All uses of the connection(s) should be between these + # function calls. +proc mysql_thread_init*(): my_bool{.stdcall, dynlib: mysqllib, + importc: "mysql_thread_init".} +proc mysql_thread_end*(){.stdcall, dynlib: mysqllib, importc: "mysql_thread_end".} + # Functions to get information from the MYSQL and MYSQL_RES structures + # Should definitely be used if one uses shared libraries. +proc mysql_num_rows*(res: PMYSQL_RES): my_ulonglong{.stdcall, dynlib: mysqllib, + importc: "mysql_num_rows".} +proc mysql_num_fields*(res: PMYSQL_RES): cuint{.stdcall, dynlib: mysqllib, + importc: "mysql_num_fields".} +proc mysql_eof*(res: PMYSQL_RES): my_bool{.stdcall, dynlib: mysqllib, + importc: "mysql_eof".} +proc mysql_fetch_field_direct*(res: PMYSQL_RES, fieldnr: cuint): PMYSQL_FIELD{. + stdcall, dynlib: mysqllib, importc: "mysql_fetch_field_direct".} +proc mysql_fetch_fields*(res: PMYSQL_RES): PMYSQL_FIELD{.stdcall, + dynlib: mysqllib, importc: "mysql_fetch_fields".} +proc mysql_row_tell*(res: PMYSQL_RES): MYSQL_ROW_OFFSET{.stdcall, + dynlib: mysqllib, importc: "mysql_row_tell".} +proc mysql_field_tell*(res: PMYSQL_RES): MYSQL_FIELD_OFFSET{.stdcall, + dynlib: mysqllib, importc: "mysql_field_tell".} +proc mysql_field_count*(mysql: PMYSQL): cuint{.stdcall, dynlib: mysqllib, + importc: "mysql_field_count".} +proc mysql_affected_rows*(mysql: PMYSQL): my_ulonglong{.stdcall, + dynlib: mysqllib, importc: "mysql_affected_rows".} +proc mysql_insert_id*(mysql: PMYSQL): my_ulonglong{.stdcall, dynlib: mysqllib, + importc: "mysql_insert_id".} +proc mysql_errno*(mysql: PMYSQL): cuint{.stdcall, dynlib: mysqllib, + importc: "mysql_errno".} +proc mysql_error*(mysql: PMYSQL): cstring{.stdcall, dynlib: mysqllib, + importc: "mysql_error".} +proc mysql_sqlstate*(mysql: PMYSQL): cstring{.stdcall, dynlib: mysqllib, + importc: "mysql_sqlstate".} +proc mysql_warning_count*(mysql: PMYSQL): cuint{.stdcall, dynlib: mysqllib, + importc: "mysql_warning_count".} +proc mysql_info*(mysql: PMYSQL): cstring{.stdcall, dynlib: mysqllib, + importc: "mysql_info".} +proc mysql_thread_id*(mysql: PMYSQL): int{.stdcall, dynlib: mysqllib, + importc: "mysql_thread_id".} +proc mysql_character_set_name*(mysql: PMYSQL): cstring{.stdcall, + dynlib: mysqllib, importc: "mysql_character_set_name".} +proc mysql_set_character_set*(mysql: PMYSQL, csname: cstring): int32{.stdcall, + dynlib: mysqllib, importc: "mysql_set_character_set".} +proc mysql_init*(mysql: PMYSQL): PMYSQL{.stdcall, dynlib: mysqllib, + importc: "mysql_init".} +proc mysql_ssl_set*(mysql: PMYSQL, key: cstring, cert: cstring, ca: cstring, + capath: cstring, cipher: cstring): my_bool{.stdcall, + dynlib: mysqllib, importc: "mysql_ssl_set".} +proc mysql_change_user*(mysql: PMYSQL, user: cstring, passwd: cstring, + db: cstring): my_bool{.stdcall, dynlib: mysqllib, + importc: "mysql_change_user".} +proc mysql_real_connect*(mysql: PMYSQL, host: cstring, user: cstring, + passwd: cstring, db: cstring, port: cuint, + unix_socket: cstring, clientflag: int): PMYSQL{. + stdcall, dynlib: mysqllib, importc: "mysql_real_connect".} +proc mysql_select_db*(mysql: PMYSQL, db: cstring): cint{.stdcall, + dynlib: mysqllib, importc: "mysql_select_db".} +proc mysql_query*(mysql: PMYSQL, q: cstring): cint{.stdcall, dynlib: mysqllib, + importc: "mysql_query".} +proc mysql_send_query*(mysql: PMYSQL, q: cstring, len: int): cint{.stdcall, + dynlib: mysqllib, importc: "mysql_send_query".} +proc mysql_real_query*(mysql: PMYSQL, q: cstring, len: int): cint{.stdcall, + dynlib: mysqllib, importc: "mysql_real_query".} +proc mysql_store_result*(mysql: PMYSQL): PMYSQL_RES{.stdcall, dynlib: mysqllib, + importc: "mysql_store_result".} +proc mysql_use_result*(mysql: PMYSQL): PMYSQL_RES{.stdcall, dynlib: mysqllib, + importc: "mysql_use_result".} + # perform query on master +proc mysql_master_query*(mysql: PMYSQL, q: cstring, len: int): my_bool{. + stdcall, dynlib: mysqllib, importc: "mysql_master_query".} +proc mysql_master_send_query*(mysql: PMYSQL, q: cstring, len: int): my_bool{. + stdcall, dynlib: mysqllib, importc: "mysql_master_send_query".} + # perform query on slave +proc mysql_slave_query*(mysql: PMYSQL, q: cstring, len: int): my_bool{. + stdcall, dynlib: mysqllib, importc: "mysql_slave_query".} +proc mysql_slave_send_query*(mysql: PMYSQL, q: cstring, len: int): my_bool{. + stdcall, dynlib: mysqllib, importc: "mysql_slave_send_query".} +proc mysql_get_character_set_info*(mysql: PMYSQL, charset: PMY_CHARSET_INFO){. + stdcall, dynlib: mysqllib, importc: "mysql_get_character_set_info".} + # local infile support +const + LOCAL_INFILE_ERROR_LEN* = 512 + +# procedure mysql_set_local_infile_handler(mysql:PMYSQL; local_infile_init:function (para1:Ppointer; para2:Pchar; para3:pointer):longint; local_infile_read:function (para1:pointer; para2:Pchar; para3:dword):longint; local_infile_end:procedure (_pa +# para6:pointer);cdecl;external mysqllib name 'mysql_set_local_infile_handler'; + +proc mysql_set_local_infile_default*(mysql: PMYSQL){.cdecl, dynlib: mysqllib, + importc: "mysql_set_local_infile_default".} + # enable/disable parsing of all queries to decide if they go on master or + # slave +proc mysql_enable_rpl_parse*(mysql: PMYSQL){.stdcall, dynlib: mysqllib, + importc: "mysql_enable_rpl_parse".} +proc mysql_disable_rpl_parse*(mysql: PMYSQL){.stdcall, dynlib: mysqllib, + importc: "mysql_disable_rpl_parse".} + # get the value of the parse flag +proc mysql_rpl_parse_enabled*(mysql: PMYSQL): cint{.stdcall, dynlib: mysqllib, + importc: "mysql_rpl_parse_enabled".} + # enable/disable reads from master +proc mysql_enable_reads_from_master*(mysql: PMYSQL){.stdcall, dynlib: mysqllib, + importc: "mysql_enable_reads_from_master".} +proc mysql_disable_reads_from_master*(mysql: PMYSQL){.stdcall, dynlib: mysqllib, + importc: "mysql_disable_reads_from_master".} + # get the value of the master read flag +proc mysql_reads_from_master_enabled*(mysql: PMYSQL): my_bool{.stdcall, + dynlib: mysqllib, importc: "mysql_reads_from_master_enabled".} +proc mysql_rpl_query_type*(q: cstring, length: cint): mysql_rpl_type{.stdcall, + dynlib: mysqllib, importc: "mysql_rpl_query_type".} + # discover the master and its slaves +proc mysql_rpl_probe*(mysql: PMYSQL): my_bool{.stdcall, dynlib: mysqllib, + importc: "mysql_rpl_probe".} + # set the master, close/free the old one, if it is not a pivot +proc mysql_set_master*(mysql: PMYSQL, host: cstring, port: cuint, user: cstring, + passwd: cstring): cint{.stdcall, dynlib: mysqllib, + importc: "mysql_set_master".} +proc mysql_add_slave*(mysql: PMYSQL, host: cstring, port: cuint, user: cstring, + passwd: cstring): cint{.stdcall, dynlib: mysqllib, + importc: "mysql_add_slave".} +proc mysql_shutdown*(mysql: PMYSQL, shutdown_level: mysql_enum_shutdown_level): cint{. + stdcall, dynlib: mysqllib, importc: "mysql_shutdown".} +proc mysql_dump_debug_info*(mysql: PMYSQL): cint{.stdcall, dynlib: mysqllib, + importc: "mysql_dump_debug_info".} +proc mysql_refresh*(mysql: PMYSQL, refresh_options: cuint): cint{.stdcall, + dynlib: mysqllib, importc: "mysql_refresh".} +proc mysql_kill*(mysql: PMYSQL, pid: int): cint{.stdcall, dynlib: mysqllib, + importc: "mysql_kill".} +proc mysql_set_server_option*(mysql: PMYSQL, option: enum_mysql_set_option): cint{. + stdcall, dynlib: mysqllib, importc: "mysql_set_server_option".} +proc mysql_ping*(mysql: PMYSQL): cint{.stdcall, dynlib: mysqllib, + importc: "mysql_ping".} +proc mysql_stat*(mysql: PMYSQL): cstring{.stdcall, dynlib: mysqllib, + importc: "mysql_stat".} +proc mysql_get_server_info*(mysql: PMYSQL): cstring{.stdcall, dynlib: mysqllib, + importc: "mysql_get_server_info".} +proc mysql_get_client_info*(): cstring{.stdcall, dynlib: mysqllib, + importc: "mysql_get_client_info".} +proc mysql_get_client_version*(): int{.stdcall, dynlib: mysqllib, + importc: "mysql_get_client_version".} +proc mysql_get_host_info*(mysql: PMYSQL): cstring{.stdcall, dynlib: mysqllib, + importc: "mysql_get_host_info".} +proc mysql_get_server_version*(mysql: PMYSQL): int{.stdcall, + dynlib: mysqllib, importc: "mysql_get_server_version".} +proc mysql_get_proto_info*(mysql: PMYSQL): cuint{.stdcall, dynlib: mysqllib, + importc: "mysql_get_proto_info".} +proc mysql_list_dbs*(mysql: PMYSQL, wild: cstring): PMYSQL_RES{.stdcall, + dynlib: mysqllib, importc: "mysql_list_dbs".} +proc mysql_list_tables*(mysql: PMYSQL, wild: cstring): PMYSQL_RES{.stdcall, + dynlib: mysqllib, importc: "mysql_list_tables".} +proc mysql_list_processes*(mysql: PMYSQL): PMYSQL_RES{.stdcall, + dynlib: mysqllib, importc: "mysql_list_processes".} +proc mysql_options*(mysql: PMYSQL, option: mysql_option, arg: cstring): cint{. + stdcall, dynlib: mysqllib, importc: "mysql_options".} +proc mysql_free_result*(result: PMYSQL_RES){.stdcall, dynlib: mysqllib, + importc: "mysql_free_result".} +proc mysql_data_seek*(result: PMYSQL_RES, offset: my_ulonglong){.stdcall, + dynlib: mysqllib, importc: "mysql_data_seek".} +proc mysql_row_seek*(result: PMYSQL_RES, offset: MYSQL_ROW_OFFSET): MYSQL_ROW_OFFSET{. + stdcall, dynlib: mysqllib, importc: "mysql_row_seek".} +proc mysql_field_seek*(result: PMYSQL_RES, offset: MYSQL_FIELD_OFFSET): MYSQL_FIELD_OFFSET{. + stdcall, dynlib: mysqllib, importc: "mysql_field_seek".} +proc mysql_fetch_row*(result: PMYSQL_RES): MYSQL_ROW{.stdcall, dynlib: mysqllib, + importc: "mysql_fetch_row".} +proc mysql_fetch_lengths*(result: PMYSQL_RES): ptr int{.stdcall, + dynlib: mysqllib, importc: "mysql_fetch_lengths".} +proc mysql_fetch_field*(result: PMYSQL_RES): PMYSQL_FIELD{.stdcall, + dynlib: mysqllib, importc: "mysql_fetch_field".} +proc mysql_list_fields*(mysql: PMYSQL, table: cstring, wild: cstring): PMYSQL_RES{. + stdcall, dynlib: mysqllib, importc: "mysql_list_fields".} +proc mysql_escape_string*(fto: cstring, `from`: cstring, from_length: int): int{. + stdcall, dynlib: mysqllib, importc: "mysql_escape_string".} +proc mysql_hex_string*(fto: cstring, `from`: cstring, from_length: int): int{. + stdcall, dynlib: mysqllib, importc: "mysql_hex_string".} +proc mysql_real_escape_string*(mysql: PMYSQL, fto: cstring, `from`: cstring, + len: int): int{.stdcall, dynlib: mysqllib, + importc: "mysql_real_escape_string".} +proc mysql_debug*(debug: cstring){.stdcall, dynlib: mysqllib, + importc: "mysql_debug".} + # function mysql_odbc_escape_string(mysql:PMYSQL; fto:Pchar; to_length:dword; from:Pchar; from_length:dword; + # param:pointer; extend_buffer:function (para1:pointer; to:Pchar; length:Pdword):Pchar):Pchar;stdcall;external mysqllib name 'mysql_odbc_escape_string'; +proc myodbc_remove_escape*(mysql: PMYSQL, name: cstring){.stdcall, + dynlib: mysqllib, importc: "myodbc_remove_escape".} +proc mysql_thread_safe*(): cuint{.stdcall, dynlib: mysqllib, + importc: "mysql_thread_safe".} +proc mysql_embedded*(): my_bool{.stdcall, dynlib: mysqllib, + importc: "mysql_embedded".} +proc mysql_manager_init*(con: PMYSQL_MANAGER): PMYSQL_MANAGER{.stdcall, + dynlib: mysqllib, importc: "mysql_manager_init".} +proc mysql_manager_connect*(con: PMYSQL_MANAGER, host: cstring, user: cstring, + passwd: cstring, port: cuint): PMYSQL_MANAGER{. + stdcall, dynlib: mysqllib, importc: "mysql_manager_connect".} +proc mysql_manager_close*(con: PMYSQL_MANAGER){.stdcall, dynlib: mysqllib, + importc: "mysql_manager_close".} +proc mysql_manager_command*(con: PMYSQL_MANAGER, cmd: cstring, cmd_len: cint): cint{. + stdcall, dynlib: mysqllib, importc: "mysql_manager_command".} +proc mysql_manager_fetch_line*(con: PMYSQL_MANAGER, res_buf: cstring, + res_buf_size: cint): cint{.stdcall, + dynlib: mysqllib, importc: "mysql_manager_fetch_line".} +proc mysql_read_query_result*(mysql: PMYSQL): my_bool{.stdcall, + dynlib: mysqllib, importc: "mysql_read_query_result".} +proc mysql_stmt_init*(mysql: PMYSQL): PMYSQL_STMT{.stdcall, dynlib: mysqllib, + importc: "mysql_stmt_init".} +proc mysql_stmt_prepare*(stmt: PMYSQL_STMT, query: cstring, len: int): cint{. + stdcall, dynlib: mysqllib, importc: "mysql_stmt_prepare".} +proc mysql_stmt_execute*(stmt: PMYSQL_STMT): cint{.stdcall, dynlib: mysqllib, + importc: "mysql_stmt_execute".} +proc mysql_stmt_fetch*(stmt: PMYSQL_STMT): cint{.stdcall, dynlib: mysqllib, + importc: "mysql_stmt_fetch".} +proc mysql_stmt_fetch_column*(stmt: PMYSQL_STMT, `bind`: PMYSQL_BIND, + column: cuint, offset: int): cint{.stdcall, + dynlib: mysqllib, importc: "mysql_stmt_fetch_column".} +proc mysql_stmt_store_result*(stmt: PMYSQL_STMT): cint{.stdcall, + dynlib: mysqllib, importc: "mysql_stmt_store_result".} +proc mysql_stmt_param_count*(stmt: PMYSQL_STMT): int{.stdcall, + dynlib: mysqllib, importc: "mysql_stmt_param_count".} +proc mysql_stmt_attr_set*(stmt: PMYSQL_STMT, attr_type: enum_stmt_attr_type, + attr: pointer): my_bool{.stdcall, dynlib: mysqllib, + importc: "mysql_stmt_attr_set".} +proc mysql_stmt_attr_get*(stmt: PMYSQL_STMT, attr_type: enum_stmt_attr_type, + attr: pointer): my_bool{.stdcall, dynlib: mysqllib, + importc: "mysql_stmt_attr_get".} +proc mysql_stmt_bind_param*(stmt: PMYSQL_STMT, bnd: PMYSQL_BIND): my_bool{. + stdcall, dynlib: mysqllib, importc: "mysql_stmt_bind_param".} +proc mysql_stmt_bind_result*(stmt: PMYSQL_STMT, bnd: PMYSQL_BIND): my_bool{. + stdcall, dynlib: mysqllib, importc: "mysql_stmt_bind_result".} +proc mysql_stmt_close*(stmt: PMYSQL_STMT): my_bool{.stdcall, dynlib: mysqllib, + importc: "mysql_stmt_close".} +proc mysql_stmt_reset*(stmt: PMYSQL_STMT): my_bool{.stdcall, dynlib: mysqllib, + importc: "mysql_stmt_reset".} +proc mysql_stmt_free_result*(stmt: PMYSQL_STMT): my_bool{.stdcall, + dynlib: mysqllib, importc: "mysql_stmt_free_result".} +proc mysql_stmt_send_long_data*(stmt: PMYSQL_STMT, param_number: cuint, + data: cstring, len: int): my_bool{.stdcall, + dynlib: mysqllib, importc: "mysql_stmt_send_long_data".} +proc mysql_stmt_result_metadata*(stmt: PMYSQL_STMT): PMYSQL_RES{.stdcall, + dynlib: mysqllib, importc: "mysql_stmt_result_metadata".} +proc mysql_stmt_param_metadata*(stmt: PMYSQL_STMT): PMYSQL_RES{.stdcall, + dynlib: mysqllib, importc: "mysql_stmt_param_metadata".} +proc mysql_stmt_errno*(stmt: PMYSQL_STMT): cuint{.stdcall, dynlib: mysqllib, + importc: "mysql_stmt_errno".} +proc mysql_stmt_error*(stmt: PMYSQL_STMT): cstring{.stdcall, dynlib: mysqllib, + importc: "mysql_stmt_error".} +proc mysql_stmt_sqlstate*(stmt: PMYSQL_STMT): cstring{.stdcall, + dynlib: mysqllib, importc: "mysql_stmt_sqlstate".} +proc mysql_stmt_row_seek*(stmt: PMYSQL_STMT, offset: MYSQL_ROW_OFFSET): MYSQL_ROW_OFFSET{. + stdcall, dynlib: mysqllib, importc: "mysql_stmt_row_seek".} +proc mysql_stmt_row_tell*(stmt: PMYSQL_STMT): MYSQL_ROW_OFFSET{.stdcall, + dynlib: mysqllib, importc: "mysql_stmt_row_tell".} +proc mysql_stmt_data_seek*(stmt: PMYSQL_STMT, offset: my_ulonglong){.stdcall, + dynlib: mysqllib, importc: "mysql_stmt_data_seek".} +proc mysql_stmt_num_rows*(stmt: PMYSQL_STMT): my_ulonglong{.stdcall, + dynlib: mysqllib, importc: "mysql_stmt_num_rows".} +proc mysql_stmt_affected_rows*(stmt: PMYSQL_STMT): my_ulonglong{.stdcall, + dynlib: mysqllib, importc: "mysql_stmt_affected_rows".} +proc mysql_stmt_insert_id*(stmt: PMYSQL_STMT): my_ulonglong{.stdcall, + dynlib: mysqllib, importc: "mysql_stmt_insert_id".} +proc mysql_stmt_field_count*(stmt: PMYSQL_STMT): cuint{.stdcall, + dynlib: mysqllib, importc: "mysql_stmt_field_count".} +proc mysql_commit*(mysql: PMYSQL): my_bool{.stdcall, dynlib: mysqllib, + importc: "mysql_commit".} +proc mysql_rollback*(mysql: PMYSQL): my_bool{.stdcall, dynlib: mysqllib, + importc: "mysql_rollback".} +proc mysql_autocommit*(mysql: PMYSQL, auto_mode: my_bool): my_bool{.stdcall, + dynlib: mysqllib, importc: "mysql_autocommit".} +proc mysql_more_results*(mysql: PMYSQL): my_bool{.stdcall, dynlib: mysqllib, + importc: "mysql_more_results".} +proc mysql_next_result*(mysql: PMYSQL): cint{.stdcall, dynlib: mysqllib, + importc: "mysql_next_result".} +proc mysql_close*(sock: PMYSQL){.stdcall, dynlib: mysqllib, + importc: "mysql_close".} + # status return codes +const + MYSQL_NO_DATA* = 100 + MYSQL_DATA_TRUNCATED* = 101 + +proc mysql_reload*(mysql: PMySQL): cint + +when defined(USE_OLD_FUNCTIONS): + proc mysql_connect*(mysql: PMYSQL, host: cstring, user: cstring, + passwd: cstring): PMYSQL{.stdcall, + dynlib: External_library, importc: "mysql_connect".} + proc mysql_create_db*(mysql: PMYSQL, DB: cstring): cint{.stdcall, + dynlib: External_library, importc: "mysql_create_db".} + proc mysql_drop_db*(mysql: PMYSQL, DB: cstring): cint{.stdcall, + dynlib: External_library, importc: "mysql_drop_db".} + +proc net_safe_read*(mysql: PMYSQL): cuint{.cdecl, dynlib: mysqllib, + importc: "net_safe_read".} + +proc net_new_transaction(net: st_net): st_net = + assert false + #net.pkt_nr = 0 + result = net + +proc IS_PRI_KEY(n: int32): bool = + result = (n and PRI_KEY_FLAG) != 0 + +proc IS_NOT_NULL(n: int32): bool = + result = (n and NOT_NULL_FLAG) != 0 + +proc IS_BLOB(n: int32): bool = + result = (n and BLOB_FLAG) != 0 + +proc IS_NUM_FIELD(f: pst_mysql_field): bool = + result = (f.flags and NUM_FLAG) != 0 + +proc IS_NUM(t: enum_field_types): bool = + result = (t <= FIELD_TYPE_INT24) or (t == FIELD_TYPE_YEAR) or + (t == FIELD_TYPE_NEWDECIMAL) + +proc INTERNAL_NUM_FIELD(f: Pst_mysql_field): bool = + result = (f.ftype <= FIELD_TYPE_INT24) and + ((f.ftype != FIELD_TYPE_TIMESTAMP) or (f.len == 14) or (f.len == 8)) or + (f.ftype == FIELD_TYPE_YEAR) + +proc mysql_reload(mysql: PMySQL): cint = + result = mysql_refresh(mysql, REFRESH_GRANT) + diff --git a/lib/oldwrappers/odbcsql.nim b/lib/oldwrappers/odbcsql.nim new file mode 100644 index 000000000..77719e85f --- /dev/null +++ b/lib/oldwrappers/odbcsql.nim @@ -0,0 +1,788 @@ + +{.deadCodeElim: on.} + +when not defined(ODBCVER): + const + ODBCVER = 0x0351 ## define ODBC version 3.51 by default + +when defined(windows): + {.push callconv: stdcall.} + const odbclib = "odbc32.dll" +else: + {.push callconv: cdecl.} + const odbclib = "libodbc.so" + +# DATA TYPES CORRESPONDENCE +# BDE fields ODBC types +# ---------- ------------------ +# ftBlob SQL_BINARY +# ftBoolean SQL_BIT +# ftDate SQL_TYPE_DATE +# ftTime SQL_TYPE_TIME +# ftDateTime SQL_TYPE_TIMESTAMP +# ftInteger SQL_INTEGER +# ftSmallint SQL_SMALLINT +# ftFloat SQL_DOUBLE +# ftString SQL_CHAR +# ftMemo SQL_BINARY // SQL_VARCHAR +# + +type + TSqlChar* = char + TSqlSmallInt* = int16 + TSqlUSmallInt* = int16 + TSqlHandle* = pointer + TSqlHEnv* = TSqlHandle + TSqlHDBC* = TSqlHandle + TSqlHStmt* = TSqlHandle + TSqlHDesc* = TSqlHandle + TSqlInteger* = int + TSqlUInteger* = int + TSqlPointer* = pointer + TSqlReal* = cfloat + TSqlDouble* = cdouble + TSqlFloat* = cdouble + TSqlHWND* = pointer + PSQLCHAR* = cstring + PSQLINTEGER* = ptr TSqlInteger + PSQLUINTEGER* = ptr TSqlUInteger + PSQLSMALLINT* = ptr TSqlSmallInt + PSQLUSMALLINT* = ptr TSqlUSmallInt + PSQLREAL* = ptr TSqlReal + PSQLDOUBLE* = ptr TSqlDouble + PSQLFLOAT* = ptr TSqlFloat + PSQLHANDLE* = ptr TSqlHandle + +const # SQL data type codes + SQL_UNKNOWN_TYPE* = 0 + SQL_LONGVARCHAR* = (- 1) + SQL_BINARY* = (- 2) + SQL_VARBINARY* = (- 3) + SQL_LONGVARBINARY* = (- 4) + SQL_BIGINT* = (- 5) + SQL_TINYINT* = (- 6) + SQL_BIT* = (- 7) + SQL_WCHAR* = (- 8) + SQL_WVARCHAR* = (- 9) + SQL_WLONGVARCHAR* = (- 10) + SQL_CHAR* = 1 + SQL_NUMERIC* = 2 + SQL_DECIMAL* = 3 + SQL_INTEGER* = 4 + SQL_SMALLINT* = 5 + SQL_FLOAT* = 6 + SQL_REAL* = 7 + SQL_DOUBLE* = 8 + SQL_DATETIME* = 9 + SQL_VARCHAR* = 12 + SQL_TYPE_DATE* = 91 + SQL_TYPE_TIME* = 92 + SQL_TYPE_TIMESTAMP* = 93 + SQL_DATE* = 9 + SQL_TIME* = 10 + SQL_TIMESTAMP* = 11 + SQL_INTERVAL* = 10 + SQL_GUID* = - 11 # interval codes + +when ODBCVER >= 0x0300: + const + SQL_CODE_YEAR* = 1 + SQL_CODE_MONTH* = 2 + SQL_CODE_DAY* = 3 + SQL_CODE_HOUR* = 4 + SQL_CODE_MINUTE* = 5 + SQL_CODE_SECOND* = 6 + SQL_CODE_YEAR_TO_MONTH* = 7 + SQL_CODE_DAY_TO_HOUR* = 8 + SQL_CODE_DAY_TO_MINUTE* = 9 + SQL_CODE_DAY_TO_SECOND* = 10 + SQL_CODE_HOUR_TO_MINUTE* = 11 + SQL_CODE_HOUR_TO_SECOND* = 12 + SQL_CODE_MINUTE_TO_SECOND* = 13 + SQL_INTERVAL_YEAR* = 100 + SQL_CODE_YEAR + SQL_INTERVAL_MONTH* = 100 + SQL_CODE_MONTH + SQL_INTERVAL_DAY* = 100 + SQL_CODE_DAY + SQL_INTERVAL_HOUR* = 100 + SQL_CODE_HOUR + SQL_INTERVAL_MINUTE* = 100 + SQL_CODE_MINUTE + SQL_INTERVAL_SECOND* = 100 + SQL_CODE_SECOND + SQL_INTERVAL_YEAR_TO_MONTH* = 100 + SQL_CODE_YEAR_TO_MONTH + SQL_INTERVAL_DAY_TO_HOUR* = 100 + SQL_CODE_DAY_TO_HOUR + SQL_INTERVAL_DAY_TO_MINUTE* = 100 + SQL_CODE_DAY_TO_MINUTE + SQL_INTERVAL_DAY_TO_SECOND* = 100 + SQL_CODE_DAY_TO_SECOND + SQL_INTERVAL_HOUR_TO_MINUTE* = 100 + SQL_CODE_HOUR_TO_MINUTE + SQL_INTERVAL_HOUR_TO_SECOND* = 100 + SQL_CODE_HOUR_TO_SECOND + SQL_INTERVAL_MINUTE_TO_SECOND* = 100 + SQL_CODE_MINUTE_TO_SECOND +else: + const + SQL_INTERVAL_YEAR* = - 80 + SQL_INTERVAL_MONTH* = - 81 + SQL_INTERVAL_YEAR_TO_MONTH* = - 82 + SQL_INTERVAL_DAY* = - 83 + SQL_INTERVAL_HOUR* = - 84 + SQL_INTERVAL_MINUTE* = - 85 + SQL_INTERVAL_SECOND* = - 86 + SQL_INTERVAL_DAY_TO_HOUR* = - 87 + SQL_INTERVAL_DAY_TO_MINUTE* = - 88 + SQL_INTERVAL_DAY_TO_SECOND* = - 89 + SQL_INTERVAL_HOUR_TO_MINUTE* = - 90 + SQL_INTERVAL_HOUR_TO_SECOND* = - 91 + SQL_INTERVAL_MINUTE_TO_SECOND* = - 92 + + +when ODBCVER < 0x0300: + const + SQL_UNICODE* = - 95 + SQL_UNICODE_VARCHAR* = - 96 + SQL_UNICODE_LONGVARCHAR* = - 97 + SQL_UNICODE_CHAR* = SQL_UNICODE +else: + # The previous definitions for SQL_UNICODE_ are historical and obsolete + const + SQL_UNICODE* = SQL_WCHAR + SQL_UNICODE_VARCHAR* = SQL_WVARCHAR + SQL_UNICODE_LONGVARCHAR* = SQL_WLONGVARCHAR + SQL_UNICODE_CHAR* = SQL_WCHAR +const # C datatype to SQL datatype mapping + SQL_C_CHAR* = SQL_CHAR + SQL_C_LONG* = SQL_INTEGER + SQL_C_SHORT* = SQL_SMALLINT + SQL_C_FLOAT* = SQL_REAL + SQL_C_DOUBLE* = SQL_DOUBLE + SQL_C_NUMERIC* = SQL_NUMERIC + SQL_C_DEFAULT* = 99 + SQL_SIGNED_OFFSET* = - 20 + SQL_UNSIGNED_OFFSET* = - 22 + SQL_C_DATE* = SQL_DATE + SQL_C_TIME* = SQL_TIME + SQL_C_TIMESTAMP* = SQL_TIMESTAMP + SQL_C_TYPE_DATE* = SQL_TYPE_DATE + SQL_C_TYPE_TIME* = SQL_TYPE_TIME + SQL_C_TYPE_TIMESTAMP* = SQL_TYPE_TIMESTAMP + SQL_C_INTERVAL_YEAR* = SQL_INTERVAL_YEAR + SQL_C_INTERVAL_MONTH* = SQL_INTERVAL_MONTH + SQL_C_INTERVAL_DAY* = SQL_INTERVAL_DAY + SQL_C_INTERVAL_HOUR* = SQL_INTERVAL_HOUR + SQL_C_INTERVAL_MINUTE* = SQL_INTERVAL_MINUTE + SQL_C_INTERVAL_SECOND* = SQL_INTERVAL_SECOND + SQL_C_INTERVAL_YEAR_TO_MONTH* = SQL_INTERVAL_YEAR_TO_MONTH + SQL_C_INTERVAL_DAY_TO_HOUR* = SQL_INTERVAL_DAY_TO_HOUR + SQL_C_INTERVAL_DAY_TO_MINUTE* = SQL_INTERVAL_DAY_TO_MINUTE + SQL_C_INTERVAL_DAY_TO_SECOND* = SQL_INTERVAL_DAY_TO_SECOND + SQL_C_INTERVAL_HOUR_TO_MINUTE* = SQL_INTERVAL_HOUR_TO_MINUTE + SQL_C_INTERVAL_HOUR_TO_SECOND* = SQL_INTERVAL_HOUR_TO_SECOND + SQL_C_INTERVAL_MINUTE_TO_SECOND* = SQL_INTERVAL_MINUTE_TO_SECOND + SQL_C_BINARY* = SQL_BINARY + SQL_C_BIT* = SQL_BIT + SQL_C_SBIGINT* = SQL_BIGINT + SQL_SIGNED_OFFSET # SIGNED BIGINT + SQL_C_UBIGINT* = SQL_BIGINT + SQL_UNSIGNED_OFFSET # UNSIGNED BIGINT + SQL_C_TINYINT* = SQL_TINYINT + SQL_C_SLONG* = SQL_C_LONG + SQL_SIGNED_OFFSET # SIGNED INTEGER + SQL_C_SSHORT* = SQL_C_SHORT + SQL_SIGNED_OFFSET # SIGNED SMALLINT + SQL_C_STINYINT* = SQL_TINYINT + SQL_SIGNED_OFFSET # SIGNED TINYINT + SQL_C_ULONG* = SQL_C_LONG + SQL_UNSIGNED_OFFSET # UNSIGNED INTEGER + SQL_C_USHORT* = SQL_C_SHORT + SQL_UNSIGNED_OFFSET # UNSIGNED SMALLINT + SQL_C_UTINYINT* = SQL_TINYINT + SQL_UNSIGNED_OFFSET # UNSIGNED TINYINT + SQL_C_BOOKMARK* = SQL_C_ULONG # BOOKMARK + SQL_C_GUID* = SQL_GUID + SQL_TYPE_NULL* = 0 + +when ODBCVER < 0x0300: + const + SQL_TYPE_MIN* = SQL_BIT + SQL_TYPE_MAX* = SQL_VARCHAR + +const + SQL_C_VARBOOKMARK* = SQL_C_BINARY + SQL_API_SQLDESCRIBEPARAM* = 58 + SQL_NO_TOTAL* = - 4 + +type + SQL_DATE_STRUCT* {.final, pure.} = object + Year*: TSqlSmallInt + Month*: TSqlUSmallInt + Day*: TSqlUSmallInt + + PSQL_DATE_STRUCT* = ptr SQL_DATE_STRUCT + SQL_TIME_STRUCT* {.final, pure.} = object + Hour*: TSqlUSmallInt + Minute*: TSqlUSmallInt + Second*: TSqlUSmallInt + + PSQL_TIME_STRUCT* = ptr SQL_TIME_STRUCT + SQL_TIMESTAMP_STRUCT* {.final, pure.} = object + Year*: TSqlUSmallInt + Month*: TSqlUSmallInt + Day*: TSqlUSmallInt + Hour*: TSqlUSmallInt + Minute*: TSqlUSmallInt + Second*: TSqlUSmallInt + Fraction*: TSqlUInteger + + PSQL_TIMESTAMP_STRUCT* = ptr SQL_TIMESTAMP_STRUCT + +const + SQL_NAME_LEN* = 128 + SQL_OV_ODBC3* = 3 + SQL_OV_ODBC2* = 2 + SQL_ATTR_ODBC_VERSION* = 200 # Options for SQLDriverConnect + SQL_DRIVER_NOPROMPT* = 0 + SQL_DRIVER_COMPLETE* = 1 + SQL_DRIVER_PROMPT* = 2 + SQL_DRIVER_COMPLETE_REQUIRED* = 3 + SQL_IS_POINTER* = (- 4) # whether an attribute is a pointer or not + SQL_IS_UINTEGER* = (- 5) + SQL_IS_INTEGER* = (- 6) + SQL_IS_USMALLINT* = (- 7) + SQL_IS_SMALLINT* = (- 8) # SQLExtendedFetch "fFetchType" values + SQL_FETCH_BOOKMARK* = 8 + SQL_SCROLL_OPTIONS* = 44 # SQL_USE_BOOKMARKS options + SQL_UB_OFF* = 0 + SQL_UB_ON* = 1 + SQL_UB_DEFAULT* = SQL_UB_OFF + SQL_UB_FIXED* = SQL_UB_ON + SQL_UB_VARIABLE* = 2 # SQL_SCROLL_OPTIONS masks + SQL_SO_FORWARD_ONLY* = 0x00000001 + SQL_SO_KEYSET_DRIVEN* = 0x00000002 + SQL_SO_DYNAMIC* = 0x00000004 + SQL_SO_MIXED* = 0x00000008 + SQL_SO_STATIC* = 0x00000010 + SQL_BOOKMARK_PERSISTENCE* = 82 + SQL_STATIC_SENSITIVITY* = 83 # SQL_BOOKMARK_PERSISTENCE values + SQL_BP_CLOSE* = 0x00000001 + SQL_BP_DELETE* = 0x00000002 + SQL_BP_DROP* = 0x00000004 + SQL_BP_TRANSACTION* = 0x00000008 + SQL_BP_UPDATE* = 0x00000010 + SQL_BP_OTHER_HSTMT* = 0x00000020 + SQL_BP_SCROLL* = 0x00000040 + SQL_DYNAMIC_CURSOR_ATTRIBUTES1* = 144 + SQL_DYNAMIC_CURSOR_ATTRIBUTES2* = 145 + SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1* = 146 + SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2* = 147 + SQL_INDEX_KEYWORDS* = 148 + SQL_INFO_SCHEMA_VIEWS* = 149 + SQL_KEYSET_CURSOR_ATTRIBUTES1* = 150 + SQL_KEYSET_CURSOR_ATTRIBUTES2* = 151 + SQL_STATIC_CURSOR_ATTRIBUTES1* = 167 + SQL_STATIC_CURSOR_ATTRIBUTES2* = 168 # supported SQLFetchScroll FetchOrientation's + SQL_CA1_NEXT* = 1 + SQL_CA1_ABSOLUTE* = 2 + SQL_CA1_RELATIVE* = 4 + SQL_CA1_BOOKMARK* = 8 # supported SQLSetPos LockType's + SQL_CA1_LOCK_NO_CHANGE* = 0x00000040 + SQL_CA1_LOCK_EXCLUSIVE* = 0x00000080 + SQL_CA1_LOCK_UNLOCK* = 0x00000100 # supported SQLSetPos Operations + SQL_CA1_POS_POSITION* = 0x00000200 + SQL_CA1_POS_UPDATE* = 0x00000400 + SQL_CA1_POS_DELETE* = 0x00000800 + SQL_CA1_POS_REFRESH* = 0x00001000 # positioned updates and deletes + SQL_CA1_POSITIONED_UPDATE* = 0x00002000 + SQL_CA1_POSITIONED_DELETE* = 0x00004000 + SQL_CA1_SELECT_FOR_UPDATE* = 0x00008000 # supported SQLBulkOperations operations + SQL_CA1_BULK_ADD* = 0x00010000 + SQL_CA1_BULK_UPDATE_BY_BOOKMARK* = 0x00020000 + SQL_CA1_BULK_DELETE_BY_BOOKMARK* = 0x00040000 + SQL_CA1_BULK_FETCH_BY_BOOKMARK* = 0x00080000 # supported values for SQL_ATTR_SCROLL_CONCURRENCY + SQL_CA2_READ_ONLY_CONCURRENCY* = 1 + SQL_CA2_LOCK_CONCURRENCY* = 2 + SQL_CA2_OPT_ROWVER_CONCURRENCY* = 4 + SQL_CA2_OPT_VALUES_CONCURRENCY* = 8 # sensitivity of the cursor to its own inserts, deletes, and updates + SQL_CA2_SENSITIVITY_ADDITIONS* = 0x00000010 + SQL_CA2_SENSITIVITY_DELETIONS* = 0x00000020 + SQL_CA2_SENSITIVITY_UPDATES* = 0x00000040 # semantics of SQL_ATTR_MAX_ROWS + SQL_CA2_MAX_ROWS_SELECT* = 0x00000080 + SQL_CA2_MAX_ROWS_INSERT* = 0x00000100 + SQL_CA2_MAX_ROWS_DELETE* = 0x00000200 + SQL_CA2_MAX_ROWS_UPDATE* = 0x00000400 + SQL_CA2_MAX_ROWS_CATALOG* = 0x00000800 + SQL_CA2_MAX_ROWS_AFFECTS_ALL* = (SQL_CA2_MAX_ROWS_SELECT or + SQL_CA2_MAX_ROWS_INSERT or SQL_CA2_MAX_ROWS_DELETE or + SQL_CA2_MAX_ROWS_UPDATE or SQL_CA2_MAX_ROWS_CATALOG) # semantics of + # SQL_DIAG_CURSOR_ROW_COUNT + SQL_CA2_CRC_EXACT* = 0x00001000 + SQL_CA2_CRC_APPROXIMATE* = 0x00002000 # the kinds of positioned statements that can be simulated + SQL_CA2_SIMULATE_NON_UNIQUE* = 0x00004000 + SQL_CA2_SIMULATE_TRY_UNIQUE* = 0x00008000 + SQL_CA2_SIMULATE_UNIQUE* = 0x00010000 # Operations in SQLBulkOperations + SQL_ADD* = 4 + SQL_SETPOS_MAX_OPTION_VALUE* = SQL_ADD + SQL_UPDATE_BY_BOOKMARK* = 5 + SQL_DELETE_BY_BOOKMARK* = 6 + SQL_FETCH_BY_BOOKMARK* = 7 # Operations in SQLSetPos + SQL_POSITION* = 0 + SQL_REFRESH* = 1 + SQL_UPDATE* = 2 + SQL_DELETE* = 3 # Lock options in SQLSetPos + SQL_LOCK_NO_CHANGE* = 0 + SQL_LOCK_EXCLUSIVE* = 1 + SQL_LOCK_UNLOCK* = 2 # SQLExtendedFetch "rgfRowStatus" element values + SQL_ROW_SUCCESS* = 0 + SQL_ROW_DELETED* = 1 + SQL_ROW_UPDATED* = 2 + SQL_ROW_NOROW* = 3 + SQL_ROW_ADDED* = 4 + SQL_ROW_ERROR* = 5 + SQL_ROW_SUCCESS_WITH_INFO* = 6 + SQL_ROW_PROCEED* = 0 + SQL_ROW_IGNORE* = 1 + SQL_MAX_DSN_LENGTH* = 32 # maximum data source name size + SQL_MAX_OPTION_STRING_LENGTH* = 256 + SQL_ODBC_CURSORS* = 110 + SQL_ATTR_ODBC_CURSORS* = SQL_ODBC_CURSORS # SQL_ODBC_CURSORS options + SQL_CUR_USE_IF_NEEDED* = 0 + SQL_CUR_USE_ODBC* = 1 + SQL_CUR_USE_DRIVER* = 2 + SQL_CUR_DEFAULT* = SQL_CUR_USE_DRIVER + SQL_PARAM_TYPE_UNKNOWN* = 0 + SQL_PARAM_INPUT* = 1 + SQL_PARAM_INPUT_OUTPUT* = 2 + SQL_RESULT_COL* = 3 + SQL_PARAM_OUTPUT* = 4 + SQL_RETURN_VALUE* = 5 # special length/indicator values + SQL_NULL_DATA* = (- 1) + SQL_DATA_AT_EXEC* = (- 2) + SQL_SUCCESS* = 0 + SQL_SUCCESS_WITH_INFO* = 1 + SQL_NO_DATA* = 100 + SQL_ERROR* = (- 1) + SQL_INVALID_HANDLE* = (- 2) + SQL_STILL_EXECUTING* = 2 + SQL_NEED_DATA* = 99 # flags for null-terminated string + SQL_NTS* = (- 3) # maximum message length + SQL_MAX_MESSAGE_LENGTH* = 512 # date/time length constants + SQL_DATE_LEN* = 10 + SQL_TIME_LEN* = 8 # add P+1 if precision is nonzero + SQL_TIMESTAMP_LEN* = 19 # add P+1 if precision is nonzero + # handle type identifiers + SQL_HANDLE_ENV* = 1 + SQL_HANDLE_DBC* = 2 + SQL_HANDLE_STMT* = 3 + SQL_HANDLE_DESC* = 4 # environment attribute + SQL_ATTR_OUTPUT_NTS* = 10001 # connection attributes + SQL_ATTR_AUTO_IPD* = 10001 + SQL_ATTR_METADATA_ID* = 10014 # statement attributes + SQL_ATTR_APP_ROW_DESC* = 10010 + SQL_ATTR_APP_PARAM_DESC* = 10011 + SQL_ATTR_IMP_ROW_DESC* = 10012 + SQL_ATTR_IMP_PARAM_DESC* = 10013 + SQL_ATTR_CURSOR_SCROLLABLE* = (- 1) + SQL_ATTR_CURSOR_SENSITIVITY* = (- 2) + SQL_QUERY_TIMEOUT* = 0 + SQL_MAX_ROWS* = 1 + SQL_NOSCAN* = 2 + SQL_MAX_LENGTH* = 3 + SQL_ASYNC_ENABLE* = 4 # same as SQL_ATTR_ASYNC_ENABLE */ + SQL_BIND_TYPE* = 5 + SQL_CURSOR_TYPE* = 6 + SQL_CONCURRENCY* = 7 + SQL_KEYSET_SIZE* = 8 + SQL_ROWSET_SIZE* = 9 + SQL_SIMULATE_CURSOR* = 10 + SQL_RETRIEVE_DATA* = 11 + SQL_USE_BOOKMARKS* = 12 + SQL_GET_BOOKMARK* = 13 # GetStmtOption Only */ + SQL_ROW_NUMBER* = 14 # GetStmtOption Only */ + SQL_ATTR_CURSOR_TYPE* = SQL_CURSOR_TYPE + SQL_ATTR_CONCURRENCY* = SQL_CONCURRENCY + SQL_ATTR_FETCH_BOOKMARK_PTR* = 16 + SQL_ATTR_ROW_STATUS_PTR* = 25 + SQL_ATTR_ROWS_FETCHED_PTR* = 26 + SQL_AUTOCOMMIT* = 102 + SQL_ATTR_AUTOCOMMIT* = SQL_AUTOCOMMIT + SQL_ATTR_ROW_NUMBER* = SQL_ROW_NUMBER + SQL_TXN_ISOLATION* = 108 + SQL_ATTR_TXN_ISOLATION* = SQL_TXN_ISOLATION + SQL_ATTR_MAX_ROWS* = SQL_MAX_ROWS + SQL_ATTR_USE_BOOKMARKS* = SQL_USE_BOOKMARKS #* connection attributes */ + SQL_ACCESS_MODE* = 101 # SQL_AUTOCOMMIT =102; + SQL_LOGIN_TIMEOUT* = 103 + SQL_OPT_TRACE* = 104 + SQL_OPT_TRACEFILE* = 105 + SQL_TRANSLATE_DLL* = 106 + SQL_TRANSLATE_OPTION* = 107 # SQL_TXN_ISOLATION =108; + SQL_CURRENT_QUALIFIER* = 109 # SQL_ODBC_CURSORS =110; + SQL_QUIET_MODE* = 111 + SQL_PACKET_SIZE* = 112 #* connection attributes with new names */ + SQL_ATTR_ACCESS_MODE* = SQL_ACCESS_MODE # SQL_ATTR_AUTOCOMMIT =SQL_AUTOCOMMIT; + SQL_ATTR_CONNECTION_DEAD* = 1209 #* GetConnectAttr only */ + SQL_ATTR_CONNECTION_TIMEOUT* = 113 + SQL_ATTR_CURRENT_CATALOG* = SQL_CURRENT_QUALIFIER + SQL_ATTR_DISCONNECT_BEHAVIOR* = 114 + SQL_ATTR_ENLIST_IN_DTC* = 1207 + SQL_ATTR_ENLIST_IN_XA* = 1208 + SQL_ATTR_LOGIN_TIMEOUT* = SQL_LOGIN_TIMEOUT # SQL_ATTR_ODBC_CURSORS =SQL_ODBC_CURSORS; + SQL_ATTR_PACKET_SIZE* = SQL_PACKET_SIZE + SQL_ATTR_QUIET_MODE* = SQL_QUIET_MODE + SQL_ATTR_TRACE* = SQL_OPT_TRACE + SQL_ATTR_TRACEFILE* = SQL_OPT_TRACEFILE + SQL_ATTR_TRANSLATE_LIB* = SQL_TRANSLATE_DLL + SQL_ATTR_TRANSLATE_OPTION* = SQL_TRANSLATE_OPTION # SQL_ATTR_TXN_ISOLATION =SQL_TXN_ISOLATION; + #* SQL_ACCESS_MODE options */ + SQL_MODE_READ_WRITE* = 0 + SQL_MODE_READ_ONLY* = 1 + SQL_MODE_DEFAULT* = SQL_MODE_READ_WRITE #* SQL_AUTOCOMMIT options */ + SQL_AUTOCOMMIT_OFF* = 0 + SQL_AUTOCOMMIT_ON* = 1 + SQL_AUTOCOMMIT_DEFAULT* = SQL_AUTOCOMMIT_ON # SQL_ATTR_CURSOR_SCROLLABLE values + SQL_NONSCROLLABLE* = 0 + SQL_SCROLLABLE* = 1 # SQL_CURSOR_TYPE options + SQL_CURSOR_FORWARD_ONLY* = 0 + SQL_CURSOR_KEYSET_DRIVEN* = 1 + SQL_CURSOR_DYNAMIC* = 2 + SQL_CURSOR_STATIC* = 3 + SQL_CURSOR_TYPE_DEFAULT* = SQL_CURSOR_FORWARD_ONLY # Default value + # SQL_CONCURRENCY options + SQL_CONCUR_READ_ONLY* = 1 + SQL_CONCUR_LOCK* = 2 + SQL_CONCUR_ROWVER* = 3 + SQL_CONCUR_VALUES* = 4 + SQL_CONCUR_DEFAULT* = SQL_CONCUR_READ_ONLY # Default value + # identifiers of fields in the SQL descriptor + SQL_DESC_COUNT* = 1001 + SQL_DESC_TYPE* = 1002 + SQL_DESC_LENGTH* = 1003 + SQL_DESC_OCTET_LENGTH_PTR* = 1004 + SQL_DESC_PRECISION* = 1005 + SQL_DESC_SCALE* = 1006 + SQL_DESC_DATETIME_INTERVAL_CODE* = 1007 + SQL_DESC_NULLABLE* = 1008 + SQL_DESC_INDICATOR_PTR* = 1009 + SQL_DESC_DATA_PTR* = 1010 + SQL_DESC_NAME* = 1011 + SQL_DESC_UNNAMED* = 1012 + SQL_DESC_OCTET_LENGTH* = 1013 + SQL_DESC_ALLOC_TYPE* = 1099 # identifiers of fields in the diagnostics area + SQL_DIAG_RETURNCODE* = 1 + SQL_DIAG_NUMBER* = 2 + SQL_DIAG_ROW_COUNT* = 3 + SQL_DIAG_SQLSTATE* = 4 + SQL_DIAG_NATIVE* = 5 + SQL_DIAG_MESSAGE_TEXT* = 6 + SQL_DIAG_DYNAMIC_FUNCTION* = 7 + SQL_DIAG_CLASS_ORIGIN* = 8 + SQL_DIAG_SUBCLASS_ORIGIN* = 9 + SQL_DIAG_CONNECTION_NAME* = 10 + SQL_DIAG_SERVER_NAME* = 11 + SQL_DIAG_DYNAMIC_FUNCTION_CODE* = 12 # dynamic function codes + SQL_DIAG_ALTER_TABLE* = 4 + SQL_DIAG_CREATE_INDEX* = (- 1) + SQL_DIAG_CREATE_TABLE* = 77 + SQL_DIAG_CREATE_VIEW* = 84 + SQL_DIAG_DELETE_WHERE* = 19 + SQL_DIAG_DROP_INDEX* = (- 2) + SQL_DIAG_DROP_TABLE* = 32 + SQL_DIAG_DROP_VIEW* = 36 + SQL_DIAG_DYNAMIC_DELETE_CURSOR* = 38 + SQL_DIAG_DYNAMIC_UPDATE_CURSOR* = 81 + SQL_DIAG_GRANT* = 48 + SQL_DIAG_INSERT* = 50 + SQL_DIAG_REVOKE* = 59 + SQL_DIAG_SELECT_CURSOR* = 85 + SQL_DIAG_UNKNOWN_STATEMENT* = 0 + SQL_DIAG_UPDATE_WHERE* = 82 # Statement attribute values for cursor sensitivity + SQL_UNSPECIFIED* = 0 + SQL_INSENSITIVE* = 1 + SQL_SENSITIVE* = 2 # GetTypeInfo() request for all data types + SQL_ALL_TYPES* = 0 # Default conversion code for SQLBindCol(), SQLBindParam() and SQLGetData() + SQL_DEFAULT* = 99 # SQLGetData() code indicating that the application row descriptor + # specifies the data type + SQL_ARD_TYPE* = (- 99) # SQL date/time type subcodes + SQL_CODE_DATE* = 1 + SQL_CODE_TIME* = 2 + SQL_CODE_TIMESTAMP* = 3 # CLI option values + SQL_FALSE* = 0 + SQL_TRUE* = 1 # values of NULLABLE field in descriptor + SQL_NO_NULLS* = 0 + SQL_NULLABLE* = 1 # Value returned by SQLGetTypeInfo() to denote that it is + # not known whether or not a data type supports null values. + SQL_NULLABLE_UNKNOWN* = 2 + SQL_CLOSE* = 0 + SQL_DROP* = 1 + SQL_UNBIND* = 2 + SQL_RESET_PARAMS* = 3 # Codes used for FetchOrientation in SQLFetchScroll(), + # and in SQLDataSources() + SQL_FETCH_NEXT* = 1 + SQL_FETCH_FIRST* = 2 + SQL_FETCH_FIRST_USER* = 31 + SQL_FETCH_FIRST_SYSTEM* = 32 # Other codes used for FetchOrientation in SQLFetchScroll() + SQL_FETCH_LAST* = 3 + SQL_FETCH_PRIOR* = 4 + SQL_FETCH_ABSOLUTE* = 5 + SQL_FETCH_RELATIVE* = 6 + SQL_NULL_HENV* = TSqlHEnv(nil) + SQL_NULL_HDBC* = TSqlHDBC(nil) + SQL_NULL_HSTMT* = TSqlHStmt(nil) + SQL_NULL_HDESC* = TSqlHDesc(nil) #* null handle used in place of parent handle when allocating HENV */ + SQL_NULL_HANDLE* = TSqlHandle(nil) #* Values that may appear in the result set of SQLSpecialColumns() */ + SQL_SCOPE_CURROW* = 0 + SQL_SCOPE_TRANSACTION* = 1 + SQL_SCOPE_SESSION* = 2 #* Column types and scopes in SQLSpecialColumns. */ + SQL_BEST_ROWID* = 1 + SQL_ROWVER* = 2 + SQL_ROW_IDENTIFIER* = 1 #* Reserved values for UNIQUE argument of SQLStatistics() */ + SQL_INDEX_UNIQUE* = 0 + SQL_INDEX_ALL* = 1 #* Reserved values for RESERVED argument of SQLStatistics() */ + SQL_QUICK* = 0 + SQL_ENSURE* = 1 #* Values that may appear in the result set of SQLStatistics() */ + SQL_TABLE_STAT* = 0 + SQL_INDEX_CLUSTERED* = 1 + SQL_INDEX_HASHED* = 2 + SQL_INDEX_OTHER* = 3 + SQL_SCROLL_CONCURRENCY* = 43 + SQL_TXN_CAPABLE* = 46 + SQL_TRANSACTION_CAPABLE* = SQL_TXN_CAPABLE + SQL_USER_NAME* = 47 + SQL_TXN_ISOLATION_OPTION* = 72 + SQL_TRANSACTION_ISOLATION_OPTION* = SQL_TXN_ISOLATION_OPTION + SQL_OJ_CAPABILITIES* = 115 + SQL_OUTER_JOIN_CAPABILITIES* = SQL_OJ_CAPABILITIES + SQL_XOPEN_CLI_YEAR* = 10000 + SQL_CURSOR_SENSITIVITY* = 10001 + SQL_DESCRIBE_PARAMETER* = 10002 + SQL_CATALOG_NAME* = 10003 + SQL_COLLATION_SEQ* = 10004 + SQL_MAX_IDENTIFIER_LEN* = 10005 + SQL_MAXIMUM_IDENTIFIER_LENGTH* = SQL_MAX_IDENTIFIER_LEN + SQL_SCCO_READ_ONLY* = 1 + SQL_SCCO_LOCK* = 2 + SQL_SCCO_OPT_ROWVER* = 4 + SQL_SCCO_OPT_VALUES* = 8 #* SQL_TXN_CAPABLE values */ + SQL_TC_NONE* = 0 + SQL_TC_DML* = 1 + SQL_TC_ALL* = 2 + SQL_TC_DDL_COMMIT* = 3 + SQL_TC_DDL_IGNORE* = 4 #* SQL_TXN_ISOLATION_OPTION bitmasks */ + SQL_TXN_READ_UNCOMMITTED* = 1 + SQL_TRANSACTION_READ_UNCOMMITTED* = SQL_TXN_READ_UNCOMMITTED + SQL_TXN_READ_COMMITTED* = 2 + SQL_TRANSACTION_READ_COMMITTED* = SQL_TXN_READ_COMMITTED + SQL_TXN_REPEATABLE_READ* = 4 + SQL_TRANSACTION_REPEATABLE_READ* = SQL_TXN_REPEATABLE_READ + SQL_TXN_SERIALIZABLE* = 8 + SQL_TRANSACTION_SERIALIZABLE* = SQL_TXN_SERIALIZABLE + SQL_SS_ADDITIONS* = 1 + SQL_SS_DELETIONS* = 2 + SQL_SS_UPDATES* = 4 # SQLColAttributes defines + SQL_COLUMN_COUNT* = 0 + SQL_COLUMN_NAME* = 1 + SQL_COLUMN_TYPE* = 2 + SQL_COLUMN_LENGTH* = 3 + SQL_COLUMN_PRECISION* = 4 + SQL_COLUMN_SCALE* = 5 + SQL_COLUMN_DISPLAY_SIZE* = 6 + SQL_COLUMN_NULLABLE* = 7 + SQL_COLUMN_UNSIGNED* = 8 + SQL_COLUMN_MONEY* = 9 + SQL_COLUMN_UPDATABLE* = 10 + SQL_COLUMN_AUTO_INCREMENT* = 11 + SQL_COLUMN_CASE_SENSITIVE* = 12 + SQL_COLUMN_SEARCHABLE* = 13 + SQL_COLUMN_TYPE_NAME* = 14 + SQL_COLUMN_TABLE_NAME* = 15 + SQL_COLUMN_OWNER_NAME* = 16 + SQL_COLUMN_QUALIFIER_NAME* = 17 + SQL_COLUMN_LABEL* = 18 + SQL_COLATT_OPT_MAX* = SQL_COLUMN_LABEL + SQL_COLUMN_DRIVER_START* = 1000 + SQL_DESC_ARRAY_SIZE* = 20 + SQL_DESC_ARRAY_STATUS_PTR* = 21 + SQL_DESC_AUTO_UNIQUE_VALUE* = SQL_COLUMN_AUTO_INCREMENT + SQL_DESC_BASE_COLUMN_NAME* = 22 + SQL_DESC_BASE_TABLE_NAME* = 23 + SQL_DESC_BIND_OFFSET_PTR* = 24 + SQL_DESC_BIND_TYPE* = 25 + SQL_DESC_CASE_SENSITIVE* = SQL_COLUMN_CASE_SENSITIVE + SQL_DESC_CATALOG_NAME* = SQL_COLUMN_QUALIFIER_NAME + SQL_DESC_CONCISE_TYPE* = SQL_COLUMN_TYPE + SQL_DESC_DATETIME_INTERVAL_PRECISION* = 26 + SQL_DESC_DISPLAY_SIZE* = SQL_COLUMN_DISPLAY_SIZE + SQL_DESC_FIXED_PREC_SCALE* = SQL_COLUMN_MONEY + SQL_DESC_LABEL* = SQL_COLUMN_LABEL + SQL_DESC_LITERAL_PREFIX* = 27 + SQL_DESC_LITERAL_SUFFIX* = 28 + SQL_DESC_LOCAL_TYPE_NAME* = 29 + SQL_DESC_MAXIMUM_SCALE* = 30 + SQL_DESC_MINIMUM_SCALE* = 31 + SQL_DESC_NUM_PREC_RADIX* = 32 + SQL_DESC_PARAMETER_TYPE* = 33 + SQL_DESC_ROWS_PROCESSED_PTR* = 34 + SQL_DESC_SCHEMA_NAME* = SQL_COLUMN_OWNER_NAME + SQL_DESC_SEARCHABLE* = SQL_COLUMN_SEARCHABLE + SQL_DESC_TYPE_NAME* = SQL_COLUMN_TYPE_NAME + SQL_DESC_TABLE_NAME* = SQL_COLUMN_TABLE_NAME + SQL_DESC_UNSIGNED* = SQL_COLUMN_UNSIGNED + SQL_DESC_UPDATABLE* = SQL_COLUMN_UPDATABLE #* SQLEndTran() options */ + SQL_COMMIT* = 0 + SQL_ROLLBACK* = 1 + SQL_ATTR_ROW_ARRAY_SIZE* = 27 #* SQLConfigDataSource() options */ + ODBC_ADD_DSN* = 1 + ODBC_CONFIG_DSN* = 2 + ODBC_REMOVE_DSN* = 3 + ODBC_ADD_SYS_DSN* = 4 + ODBC_CONFIG_SYS_DSN* = 5 + ODBC_REMOVE_SYS_DSN* = 6 + +proc SQLAllocHandle*(HandleType: TSqlSmallInt, InputHandle: TSqlHandle, + OutputHandlePtr: var TSqlHandle): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLSetEnvAttr*(EnvironmentHandle: TSqlHEnv, Attribute: TSqlInteger, + Value: TSqlPointer, StringLength: TSqlInteger): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLGetEnvAttr*(EnvironmentHandle: TSqlHEnv, Attribute: TSqlInteger, + Value: TSqlPointer, BufferLength: TSqlInteger, + StringLength: PSQLINTEGER): TSqlSmallInt{.dynlib: odbclib, + importc.} +proc SQLFreeHandle*(HandleType: TSqlSmallInt, Handle: TSqlHandle): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLGetDiagRec*(HandleType: TSqlSmallInt, Handle: TSqlHandle, + RecNumber: TSqlSmallInt, Sqlstate: PSQLCHAR, + NativeError: var TSqlInteger, MessageText: PSQLCHAR, + BufferLength: TSqlSmallInt, TextLength: var TSqlSmallInt): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLGetDiagField*(HandleType: TSqlSmallInt, Handle: TSqlHandle, + RecNumber: TSqlSmallInt, DiagIdentifier: TSqlSmallInt, + DiagInfoPtr: TSqlPointer, BufferLength: TSqlSmallInt, + StringLengthPtr: var TSqlSmallInt): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLConnect*(ConnectionHandle: TSqlHDBC, ServerName: PSQLCHAR, + NameLength1: TSqlSmallInt, UserName: PSQLCHAR, + NameLength2: TSqlSmallInt, Authentication: PSQLCHAR, + NameLength3: TSqlSmallInt): TSqlSmallInt{.dynlib: odbclib, importc.} +proc SQLDisconnect*(ConnectionHandle: TSqlHDBC): TSqlSmallInt{.dynlib: odbclib, + importc.} +proc SQLDriverConnect*(hdbc: TSqlHDBC, hwnd: TSqlHWND, szCsin: cstring, + szCLen: TSqlSmallInt, szCsout: cstring, + cbCSMax: TSqlSmallInt, cbCsOut: var TSqlSmallInt, + f: TSqlUSmallInt): TSqlSmallInt{.dynlib: odbclib, importc.} +proc SQLBrowseConnect*(hdbc: TSqlHDBC, szConnStrIn: PSQLCHAR, + cbConnStrIn: TSqlSmallInt, szConnStrOut: PSQLCHAR, + cbConnStrOutMax: TSqlSmallInt, + cbConnStrOut: var TSqlSmallInt): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLExecDirect*(StatementHandle: TSqlHStmt, StatementText: PSQLCHAR, + TextLength: TSqlInteger): TSqlSmallInt{.dynlib: odbclib, importc.} +proc SQLPrepare*(StatementHandle: TSqlHStmt, StatementText: PSQLCHAR, + TextLength: TSqlInteger): TSqlSmallInt{.dynlib: odbclib, importc.} +proc SQLCloseCursor*(StatementHandle: TSqlHStmt): TSqlSmallInt{.dynlib: odbclib, + importc.} +proc SQLExecute*(StatementHandle: TSqlHStmt): TSqlSmallInt{.dynlib: odbclib, importc.} +proc SQLFetch*(StatementHandle: TSqlHStmt): TSqlSmallInt{.dynlib: odbclib, importc.} +proc SQLNumResultCols*(StatementHandle: TSqlHStmt, ColumnCount: var TSqlSmallInt): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLDescribeCol*(StatementHandle: TSqlHStmt, ColumnNumber: TSqlUSmallInt, + ColumnName: PSQLCHAR, BufferLength: TSqlSmallInt, + NameLength: var TSqlSmallInt, DataType: var TSqlSmallInt, + ColumnSize: var TSqlUInteger, + DecimalDigits: var TSqlSmallInt, Nullable: var TSqlSmallInt): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLFetchScroll*(StatementHandle: TSqlHStmt, FetchOrientation: TSqlSmallInt, + FetchOffset: TSqlInteger): TSqlSmallInt{.dynlib: odbclib, + importc.} +proc SQLExtendedFetch*(hstmt: TSqlHStmt, fFetchType: TSqlUSmallInt, + irow: TSqlInteger, pcrow: PSQLUINTEGER, + rgfRowStatus: PSQLUSMALLINT): TSqlSmallInt{.dynlib: odbclib, + importc.} +proc SQLGetData*(StatementHandle: TSqlHStmt, ColumnNumber: TSqlUSmallInt, + TargetType: TSqlSmallInt, TargetValue: TSqlPointer, + BufferLength: TSqlInteger, StrLen_or_Ind: PSQLINTEGER): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLSetStmtAttr*(StatementHandle: TSqlHStmt, Attribute: TSqlInteger, + Value: TSqlPointer, StringLength: TSqlInteger): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLGetStmtAttr*(StatementHandle: TSqlHStmt, Attribute: TSqlInteger, + Value: TSqlPointer, BufferLength: TSqlInteger, + StringLength: PSQLINTEGER): TSqlSmallInt{.dynlib: odbclib, + importc.} +proc SQLGetInfo*(ConnectionHandle: TSqlHDBC, InfoType: TSqlUSmallInt, + InfoValue: TSqlPointer, BufferLength: TSqlSmallInt, + StringLength: PSQLSMALLINT): TSqlSmallInt{.dynlib: odbclib, + importc.} +proc SQLBulkOperations*(StatementHandle: TSqlHStmt, Operation: TSqlSmallInt): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLPutData*(StatementHandle: TSqlHStmt, Data: TSqlPointer, + StrLen_or_Ind: TSqlInteger): TSqlSmallInt{.dynlib: odbclib, importc.} +proc SQLBindCol*(StatementHandle: TSqlHStmt, ColumnNumber: TSqlUSmallInt, + TargetType: TSqlSmallInt, TargetValue: TSqlPointer, + BufferLength: TSqlInteger, StrLen_or_Ind: PSQLINTEGER): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLSetPos*(hstmt: TSqlHStmt, irow: TSqlUSmallInt, fOption: TSqlUSmallInt, + fLock: TSqlUSmallInt): TSqlSmallInt{.dynlib: odbclib, importc.} +proc SQLDataSources*(EnvironmentHandle: TSqlHEnv, Direction: TSqlUSmallInt, + ServerName: PSQLCHAR, BufferLength1: TSqlSmallInt, + NameLength1: PSQLSMALLINT, Description: PSQLCHAR, + BufferLength2: TSqlSmallInt, NameLength2: PSQLSMALLINT): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLDrivers*(EnvironmentHandle: TSqlHEnv, Direction: TSqlUSmallInt, + DriverDescription: PSQLCHAR, BufferLength1: TSqlSmallInt, + DescriptionLength1: PSQLSMALLINT, DriverAttributes: PSQLCHAR, + BufferLength2: TSqlSmallInt, AttributesLength2: PSQLSMALLINT): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLSetConnectAttr*(ConnectionHandle: TSqlHDBC, Attribute: TSqlInteger, + Value: TSqlPointer, StringLength: TSqlInteger): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLGetCursorName*(StatementHandle: TSqlHStmt, CursorName: PSQLCHAR, + BufferLength: TSqlSmallInt, NameLength: PSQLSMALLINT): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLSetCursorName*(StatementHandle: TSqlHStmt, CursorName: PSQLCHAR, + NameLength: TSqlSmallInt): TSqlSmallInt{.dynlib: odbclib, + importc.} +proc SQLRowCount*(StatementHandle: TSqlHStmt, RowCount: var TSqlInteger): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLBindParameter*(hstmt: TSqlHStmt, ipar: TSqlUSmallInt, + fParamType: TSqlSmallInt, fCType: TSqlSmallInt, + fSqlType: TSqlSmallInt, cbColDef: TSqlUInteger, + ibScale: TSqlSmallInt, rgbValue: TSqlPointer, + cbValueMax: TSqlInteger, pcbValue: PSQLINTEGER): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLFreeStmt*(StatementHandle: TSqlHStmt, Option: TSqlUSmallInt): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLColAttribute*(StatementHandle: TSqlHStmt, ColumnNumber: TSqlUSmallInt, + FieldIdentifier: TSqlUSmallInt, + CharacterAttribute: PSQLCHAR, BufferLength: TSqlSmallInt, + StringLength: PSQLSMALLINT, + NumericAttribute: TSqlPointer): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLEndTran*(HandleType: TSqlSmallInt, Handle: TSqlHandle, + CompletionType: TSqlSmallInt): TSqlSmallInt{.dynlib: odbclib, + importc.} +proc SQLTables*(hstmt: TSqlHStmt, szTableQualifier: PSQLCHAR, + cbTableQualifier: TSqlSmallInt, szTableOwner: PSQLCHAR, + cbTableOwner: TSqlSmallInt, szTableName: PSQLCHAR, + cbTableName: TSqlSmallInt, szTableType: PSQLCHAR, + cbTableType: TSqlSmallInt): TSqlSmallInt{.dynlib: odbclib, importc.} +proc SQLColumns*(hstmt: TSqlHStmt, szTableQualifier: PSQLCHAR, + cbTableQualifier: TSqlSmallInt, szTableOwner: PSQLCHAR, + cbTableOwner: TSqlSmallInt, szTableName: PSQLCHAR, + cbTableName: TSqlSmallInt, szColumnName: PSQLCHAR, + cbColumnName: TSqlSmallInt): TSqlSmallInt{.dynlib: odbclib, importc.} +proc SQLSpecialColumns*(StatementHandle: TSqlHStmt, IdentifierType: TSqlUSmallInt, + CatalogName: PSQLCHAR, NameLength1: TSqlSmallInt, + SchemaName: PSQLCHAR, NameLength2: TSqlSmallInt, + TableName: PSQLCHAR, NameLength3: TSqlSmallInt, + Scope: TSqlUSmallInt, + Nullable: TSqlUSmallInt): TSqlSmallInt{. + dynlib: odbclib, importc.} +proc SQLProcedures*(hstmt: TSqlHStmt, szTableQualifier: PSQLCHAR, + cbTableQualifier: TSqlSmallInt, szTableOwner: PSQLCHAR, + cbTableOwner: TSqlSmallInt, szTableName: PSQLCHAR, + cbTableName: TSqlSmallInt): TSqlSmallInt{.dynlib: odbclib, + importc.} +proc SQLPrimaryKeys*(hstmt: TSqlHStmt, CatalogName: PSQLCHAR, + NameLength1: TSqlSmallInt, SchemaName: PSQLCHAR, + NameLength2: TSqlSmallInt, TableName: PSQLCHAR, + NameLength3: TSqlSmallInt): TSqlSmallInt{.dynlib: odbclib, + importc.} +proc SQLProcedureColumns*(hstmt: TSqlHStmt, CatalogName: PSQLCHAR, + NameLength1: TSqlSmallInt, SchemaName: PSQLCHAR, + NameLength2: TSqlSmallInt, ProcName: PSQLCHAR, + NameLength3: TSqlSmallInt, ColumnName: PSQLCHAR, + NameLength4: TSqlSmallInt): TSqlSmallInt{.dynlib: odbclib, + importc.} +proc SQLStatistics*(hstmt: TSqlHStmt, CatalogName: PSQLCHAR, + NameLength1: TSqlSmallInt, SchemaName: PSQLCHAR, + NameLength2: TSqlSmallInt, TableName: PSQLCHAR, + NameLength3: TSqlSmallInt, Unique: TSqlUSmallInt, + Reserved: TSqlUSmallInt): TSqlSmallInt {. + dynlib: odbclib, importc.} + +{.pop.} diff --git a/lib/oldwrappers/opengl/gl.nim b/lib/oldwrappers/opengl/gl.nim new file mode 100644 index 000000000..79f09b544 --- /dev/null +++ b/lib/oldwrappers/opengl/gl.nim @@ -0,0 +1,1432 @@ +# +# +# Adaption of the delphi3d.net OpenGL units to FreePascal +# Sebastian Guenther (sg@freepascal.org) in 2002 +# These units are free to use +# +#****************************************************************************** +# Converted to Delphi by Tom Nuydens (tom@delphi3d.net) +# For the latest updates, visit Delphi3D: http://www.delphi3d.net +#****************************************************************************** + +when defined(windows): + {.push callconv: stdcall.} +else: + {.push callconv: cdecl.} + +when defined(windows): + const dllname* = "opengl32.dll" +elif defined(macosx): + const dllname* = "/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib" +else: + const dllname* = "libGL.so.1" + +type + PGLenum* = ptr TGLenum + PGLboolean* = ptr TGLboolean + PGLbitfield* = ptr TGLbitfield + TGLbyte* = int8 + PGLbyte* = ptr TGlbyte + PGLshort* = ptr TGLshort + PGLint* = ptr TGLint + PGLsizei* = ptr TGLsizei + PGLubyte* = ptr TGLubyte + PGLushort* = ptr TGLushort + PGLuint* = ptr TGLuint + PGLfloat* = ptr TGLfloat + PGLclampf* = ptr TGLclampf + PGLdouble* = ptr TGLdouble + PGLclampd* = ptr TGLclampd + PGLvoid* = Pointer + PPGLvoid* = ptr PGLvoid + TGLenum* = cint + TGLboolean* = bool + TGLbitfield* = cint + TGLshort* = int16 + TGLint* = cint + TGLsizei* = int + TGLubyte* = int8 + TGLushort* = int16 + TGLuint* = cint + TGLfloat* = float32 + TGLclampf* = float32 + TGLdouble* = float + TGLclampd* = float + +const # Version + GL_VERSION_1_1* = 1 # AccumOp + constGL_ACCUM* = 0x00000100 + GL_LOAD* = 0x00000101 + GL_RETURN* = 0x00000102 + GL_MULT* = 0x00000103 + GL_ADD* = 0x00000104 # AlphaFunction + GL_NEVER* = 0x00000200 + GL_LESS* = 0x00000201 + GL_EQUAL* = 0x00000202 + GL_LEQUAL* = 0x00000203 + GL_GREATER* = 0x00000204 + GL_NOTEQUAL* = 0x00000205 + GL_GEQUAL* = 0x00000206 + GL_ALWAYS* = 0x00000207 # AttribMask + GL_CURRENT_BIT* = 0x00000001 + GL_POINT_BIT* = 0x00000002 + GL_LINE_BIT* = 0x00000004 + GL_POLYGON_BIT* = 0x00000008 + GL_POLYGON_STIPPLE_BIT* = 0x00000010 + GL_PIXEL_MODE_BIT* = 0x00000020 + GL_LIGHTING_BIT* = 0x00000040 + GL_FOG_BIT* = 0x00000080 + GL_DEPTH_BUFFER_BIT* = 0x00000100 + GL_ACCUM_BUFFER_BIT* = 0x00000200 + GL_STENCIL_BUFFER_BIT* = 0x00000400 + GL_VIEWPORT_BIT* = 0x00000800 + GL_TRANSFORM_BIT* = 0x00001000 + GL_ENABLE_BIT* = 0x00002000 + GL_COLOR_BUFFER_BIT* = 0x00004000 + GL_HINT_BIT* = 0x00008000 + GL_EVAL_BIT* = 0x00010000 + GL_LIST_BIT* = 0x00020000 + GL_TEXTURE_BIT* = 0x00040000 + GL_SCISSOR_BIT* = 0x00080000 + GL_ALL_ATTRIB_BITS* = 0x000FFFFF # BeginMode + GL_POINTS* = 0x00000000 + GL_LINES* = 0x00000001 + GL_LINE_LOOP* = 0x00000002 + GL_LINE_STRIP* = 0x00000003 + GL_TRIANGLES* = 0x00000004 + GL_TRIANGLE_STRIP* = 0x00000005 + GL_TRIANGLE_FAN* = 0x00000006 + GL_QUADS* = 0x00000007 + GL_QUAD_STRIP* = 0x00000008 + GL_POLYGON* = 0x00000009 # BlendingFactorDest + GL_ZERO* = 0 + GL_ONE* = 1 + GL_SRC_COLOR* = 0x00000300 + GL_ONE_MINUS_SRC_COLOR* = 0x00000301 + GL_SRC_ALPHA* = 0x00000302 + GL_ONE_MINUS_SRC_ALPHA* = 0x00000303 + GL_DST_ALPHA* = 0x00000304 + GL_ONE_MINUS_DST_ALPHA* = 0x00000305 # BlendingFactorSrc + # GL_ZERO + # GL_ONE + GL_DST_COLOR* = 0x00000306 + GL_ONE_MINUS_DST_COLOR* = 0x00000307 + GL_SRC_ALPHA_SATURATE* = 0x00000308 # GL_SRC_ALPHA + # GL_ONE_MINUS_SRC_ALPHA + # GL_DST_ALPHA + # GL_ONE_MINUS_DST_ALPHA + # Boolean + GL_TRUE* = 1 + GL_FALSE* = 0 # ClearBufferMask + # GL_COLOR_BUFFER_BIT + # GL_ACCUM_BUFFER_BIT + # GL_STENCIL_BUFFER_BIT + # GL_DEPTH_BUFFER_BIT + # ClientArrayType + # GL_VERTEX_ARRAY + # GL_NORMAL_ARRAY + # GL_COLOR_ARRAY + # GL_INDEX_ARRAY + # GL_TEXTURE_COORD_ARRAY + # GL_EDGE_FLAG_ARRAY + # ClipPlaneName + GL_CLIP_PLANE0* = 0x00003000 + GL_CLIP_PLANE1* = 0x00003001 + GL_CLIP_PLANE2* = 0x00003002 + GL_CLIP_PLANE3* = 0x00003003 + GL_CLIP_PLANE4* = 0x00003004 + GL_CLIP_PLANE5* = 0x00003005 # ColorMaterialFace + # GL_FRONT + # GL_BACK + # GL_FRONT_AND_BACK + # ColorMaterialParameter + # GL_AMBIENT + # GL_DIFFUSE + # GL_SPECULAR + # GL_EMISSION + # GL_AMBIENT_AND_DIFFUSE + # ColorPointerType + # GL_BYTE + # GL_UNSIGNED_BYTE + # GL_SHORT + # GL_UNSIGNED_SHORT + # GL_INT + # GL_UNSIGNED_INT + # GL_FLOAT + # GL_DOUBLE + # CullFaceMode + # GL_FRONT + # GL_BACK + # GL_FRONT_AND_BACK + # DataType + GL_BYTE* = 0x00001400 + GL_UNSIGNED_BYTE* = 0x00001401 + GL_SHORT* = 0x00001402 + GL_UNSIGNED_SHORT* = 0x00001403 + GL_INT* = 0x00001404 + GL_UNSIGNED_INT* = 0x00001405 + GL_FLOAT* = 0x00001406 + GL_2_BYTES* = 0x00001407 + GL_3_BYTES* = 0x00001408 + GL_4_BYTES* = 0x00001409 + GL_DOUBLE* = 0x0000140A # DepthFunction + # GL_NEVER + # GL_LESS + # GL_EQUAL + # GL_LEQUAL + # GL_GREATER + # GL_NOTEQUAL + # GL_GEQUAL + # GL_ALWAYS + # DrawBufferMode + GL_NONE* = 0 + GL_FRONT_LEFT* = 0x00000400 + GL_FRONT_RIGHT* = 0x00000401 + GL_BACK_LEFT* = 0x00000402 + GL_BACK_RIGHT* = 0x00000403 + GL_FRONT* = 0x00000404 + GL_BACK* = 0x00000405 + GL_LEFT* = 0x00000406 + GL_RIGHT* = 0x00000407 + GL_FRONT_AND_BACK* = 0x00000408 + GL_AUX0* = 0x00000409 + GL_AUX1* = 0x0000040A + GL_AUX2* = 0x0000040B + GL_AUX3* = 0x0000040C # Enable + # GL_FOG + # GL_LIGHTING + # GL_TEXTURE_1D + # GL_TEXTURE_2D + # GL_LINE_STIPPLE + # GL_POLYGON_STIPPLE + # GL_CULL_FACE + # GL_ALPHA_TEST + # GL_BLEND + # GL_INDEX_LOGIC_OP + # GL_COLOR_LOGIC_OP + # GL_DITHER + # GL_STENCIL_TEST + # GL_DEPTH_TEST + # GL_CLIP_PLANE0 + # GL_CLIP_PLANE1 + # GL_CLIP_PLANE2 + # GL_CLIP_PLANE3 + # GL_CLIP_PLANE4 + # GL_CLIP_PLANE5 + # GL_LIGHT0 + # GL_LIGHT1 + # GL_LIGHT2 + # GL_LIGHT3 + # GL_LIGHT4 + # GL_LIGHT5 + # GL_LIGHT6 + # GL_LIGHT7 + # GL_TEXTURE_GEN_S + # GL_TEXTURE_GEN_T + # GL_TEXTURE_GEN_R + # GL_TEXTURE_GEN_Q + # GL_MAP1_VERTEX_3 + # GL_MAP1_VERTEX_4 + # GL_MAP1_COLOR_4 + # GL_MAP1_INDEX + # GL_MAP1_NORMAL + # GL_MAP1_TEXTURE_COORD_1 + # GL_MAP1_TEXTURE_COORD_2 + # GL_MAP1_TEXTURE_COORD_3 + # GL_MAP1_TEXTURE_COORD_4 + # GL_MAP2_VERTEX_3 + # GL_MAP2_VERTEX_4 + # GL_MAP2_COLOR_4 + # GL_MAP2_INDEX + # GL_MAP2_NORMAL + # GL_MAP2_TEXTURE_COORD_1 + # GL_MAP2_TEXTURE_COORD_2 + # GL_MAP2_TEXTURE_COORD_3 + # GL_MAP2_TEXTURE_COORD_4 + # GL_POINT_SMOOTH + # GL_LINE_SMOOTH + # GL_POLYGON_SMOOTH + # GL_SCISSOR_TEST + # GL_COLOR_MATERIAL + # GL_NORMALIZE + # GL_AUTO_NORMAL + # GL_VERTEX_ARRAY + # GL_NORMAL_ARRAY + # GL_COLOR_ARRAY + # GL_INDEX_ARRAY + # GL_TEXTURE_COORD_ARRAY + # GL_EDGE_FLAG_ARRAY + # GL_POLYGON_OFFSET_POINT + # GL_POLYGON_OFFSET_LINE + # GL_POLYGON_OFFSET_FILL + # ErrorCode + GL_NO_ERROR* = 0 + GL_INVALID_ENUM* = 0x00000500 + GL_INVALID_VALUE* = 0x00000501 + GL_INVALID_OPERATION* = 0x00000502 + GL_STACK_OVERFLOW* = 0x00000503 + GL_STACK_UNDERFLOW* = 0x00000504 + GL_OUT_OF_MEMORY* = 0x00000505 # FeedBackMode + GL_2D* = 0x00000600 + GL_3D* = 0x00000601 + GL_3D_COLOR* = 0x00000602 + GL_3D_COLOR_TEXTURE* = 0x00000603 + GL_4D_COLOR_TEXTURE* = 0x00000604 # FeedBackToken + GL_PASS_THROUGH_TOKEN* = 0x00000700 + GL_POINT_TOKEN* = 0x00000701 + GL_LINE_TOKEN* = 0x00000702 + GL_POLYGON_TOKEN* = 0x00000703 + GL_BITMAP_TOKEN* = 0x00000704 + GL_DRAW_PIXEL_TOKEN* = 0x00000705 + GL_COPY_PIXEL_TOKEN* = 0x00000706 + GL_LINE_RESET_TOKEN* = 0x00000707 # FogMode + # GL_LINEAR + GL_EXP* = 0x00000800 + GL_EXP2* = 0x00000801 # FogParameter + # GL_FOG_COLOR + # GL_FOG_DENSITY + # GL_FOG_END + # GL_FOG_INDEX + # GL_FOG_MODE + # GL_FOG_START + # FrontFaceDirection + GL_CW* = 0x00000900 + GL_CCW* = 0x00000901 # GetMapTarget + GL_COEFF* = 0x00000A00 + GL_ORDER* = 0x00000A01 + GL_DOMAIN* = 0x00000A02 # GetPixelMap + # GL_PIXEL_MAP_I_TO_I + # GL_PIXEL_MAP_S_TO_S + # GL_PIXEL_MAP_I_TO_R + # GL_PIXEL_MAP_I_TO_G + # GL_PIXEL_MAP_I_TO_B + # GL_PIXEL_MAP_I_TO_A + # GL_PIXEL_MAP_R_TO_R + # GL_PIXEL_MAP_G_TO_G + # GL_PIXEL_MAP_B_TO_B + # GL_PIXEL_MAP_A_TO_A + # GetPointerTarget + # GL_VERTEX_ARRAY_POINTER + # GL_NORMAL_ARRAY_POINTER + # GL_COLOR_ARRAY_POINTER + # GL_INDEX_ARRAY_POINTER + # GL_TEXTURE_COORD_ARRAY_POINTER + # GL_EDGE_FLAG_ARRAY_POINTER + # GetTarget + GL_CURRENT_COLOR* = 0x00000B00 + GL_CURRENT_INDEX* = 0x00000B01 + GL_CURRENT_NORMAL* = 0x00000B02 + GL_CURRENT_TEXTURE_COORDS* = 0x00000B03 + GL_CURRENT_RASTER_COLOR* = 0x00000B04 + GL_CURRENT_RASTER_INDEX* = 0x00000B05 + GL_CURRENT_RASTER_TEXTURE_COORDS* = 0x00000B06 + GL_CURRENT_RASTER_POSITION* = 0x00000B07 + GL_CURRENT_RASTER_POSITION_VALID* = 0x00000B08 + GL_CURRENT_RASTER_DISTANCE* = 0x00000B09 + GL_POINT_SMOOTH* = 0x00000B10 + constGL_POINT_SIZE* = 0x00000B11 + GL_POINT_SIZE_RANGE* = 0x00000B12 + GL_POINT_SIZE_GRANULARITY* = 0x00000B13 + GL_LINE_SMOOTH* = 0x00000B20 + constGL_LINE_WIDTH* = 0x00000B21 + GL_LINE_WIDTH_RANGE* = 0x00000B22 + GL_LINE_WIDTH_GRANULARITY* = 0x00000B23 + constGL_LINE_STIPPLE* = 0x00000B24 + GL_LINE_STIPPLE_PATTERN* = 0x00000B25 + GL_LINE_STIPPLE_REPEAT* = 0x00000B26 + GL_LIST_MODE* = 0x00000B30 + GL_MAX_LIST_NESTING* = 0x00000B31 + constGL_LIST_BASE* = 0x00000B32 + GL_LIST_INDEX* = 0x00000B33 + constGL_POLYGON_MODE* = 0x00000B40 + GL_POLYGON_SMOOTH* = 0x00000B41 + constGL_POLYGON_STIPPLE* = 0x00000B42 + constGL_EDGE_FLAG* = 0x00000B43 + constGL_CULL_FACE* = 0x00000B44 + GL_CULL_FACE_MODE* = 0x00000B45 + constGL_FRONT_FACE* = 0x00000B46 + GL_LIGHTING* = 0x00000B50 + GL_LIGHT_MODEL_LOCAL_VIEWER* = 0x00000B51 + GL_LIGHT_MODEL_TWO_SIDE* = 0x00000B52 + GL_LIGHT_MODEL_AMBIENT* = 0x00000B53 + constGL_SHADE_MODEL* = 0x00000B54 + GL_COLOR_MATERIAL_FACE* = 0x00000B55 + GL_COLOR_MATERIAL_PARAMETER* = 0x00000B56 + constGL_COLOR_MATERIAL* = 0x00000B57 + GL_FOG* = 0x00000B60 + GL_FOG_INDEX* = 0x00000B61 + GL_FOG_DENSITY* = 0x00000B62 + GL_FOG_START* = 0x00000B63 + GL_FOG_END* = 0x00000B64 + GL_FOG_MODE* = 0x00000B65 + GL_FOG_COLOR* = 0x00000B66 + constGL_DEPTH_RANGE* = 0x00000B70 + GL_DEPTH_TEST* = 0x00000B71 + GL_DEPTH_WRITEMASK* = 0x00000B72 + GL_DEPTH_CLEAR_VALUE* = 0x00000B73 + constGL_DEPTH_FUNC* = 0x00000B74 + GL_ACCUM_CLEAR_VALUE* = 0x00000B80 + GL_STENCIL_TEST* = 0x00000B90 + GL_STENCIL_CLEAR_VALUE* = 0x00000B91 + constGL_STENCIL_FUNC* = 0x00000B92 + GL_STENCIL_VALUE_MASK* = 0x00000B93 + GL_STENCIL_FAIL* = 0x00000B94 + GL_STENCIL_PASS_DEPTH_FAIL* = 0x00000B95 + GL_STENCIL_PASS_DEPTH_PASS* = 0x00000B96 + GL_STENCIL_REF* = 0x00000B97 + GL_STENCIL_WRITEMASK* = 0x00000B98 + constGL_MATRIX_MODE* = 0x00000BA0 + GL_NORMALIZE* = 0x00000BA1 + constGL_VIEWPORT* = 0x00000BA2 + GL_MODELVIEW_STACK_DEPTH* = 0x00000BA3 + GL_PROJECTION_STACK_DEPTH* = 0x00000BA4 + GL_TEXTURE_STACK_DEPTH* = 0x00000BA5 + GL_MODELVIEW_MATRIX* = 0x00000BA6 + GL_PROJECTION_MATRIX* = 0x00000BA7 + GL_TEXTURE_MATRIX* = 0x00000BA8 + GL_ATTRIB_STACK_DEPTH* = 0x00000BB0 + GL_CLIENT_ATTRIB_STACK_DEPTH* = 0x00000BB1 + GL_ALPHA_TEST* = 0x00000BC0 + GL_ALPHA_TEST_FUNC* = 0x00000BC1 + GL_ALPHA_TEST_REF* = 0x00000BC2 + GL_DITHER* = 0x00000BD0 + GL_BLEND_DST* = 0x00000BE0 + GL_BLEND_SRC* = 0x00000BE1 + GL_BLEND* = 0x00000BE2 + GL_LOGIC_OP_MODE* = 0x00000BF0 + GL_INDEX_LOGIC_OP* = 0x00000BF1 + GL_COLOR_LOGIC_OP* = 0x00000BF2 + GL_AUX_BUFFERS* = 0x00000C00 + constGL_DRAW_BUFFER* = 0x00000C01 + constGL_READ_BUFFER* = 0x00000C02 + GL_SCISSOR_BOX* = 0x00000C10 + GL_SCISSOR_TEST* = 0x00000C11 + GL_INDEX_CLEAR_VALUE* = 0x00000C20 + GL_INDEX_WRITEMASK* = 0x00000C21 + GL_COLOR_CLEAR_VALUE* = 0x00000C22 + GL_COLOR_WRITEMASK* = 0x00000C23 + GL_INDEX_MODE* = 0x00000C30 + GL_RGBA_MODE* = 0x00000C31 + GL_DOUBLEBUFFER* = 0x00000C32 + GL_STEREO* = 0x00000C33 + constGL_RENDER_MODE* = 0x00000C40 + GL_PERSPECTIVE_CORRECTION_HINT* = 0x00000C50 + GL_POINT_SMOOTH_HINT* = 0x00000C51 + GL_LINE_SMOOTH_HINT* = 0x00000C52 + GL_POLYGON_SMOOTH_HINT* = 0x00000C53 + GL_FOG_HINT* = 0x00000C54 + GL_TEXTURE_GEN_S* = 0x00000C60 + GL_TEXTURE_GEN_T* = 0x00000C61 + GL_TEXTURE_GEN_R* = 0x00000C62 + GL_TEXTURE_GEN_Q* = 0x00000C63 + GL_PIXEL_MAP_I_TO_I* = 0x00000C70 + GL_PIXEL_MAP_S_TO_S* = 0x00000C71 + GL_PIXEL_MAP_I_TO_R* = 0x00000C72 + GL_PIXEL_MAP_I_TO_G* = 0x00000C73 + GL_PIXEL_MAP_I_TO_B* = 0x00000C74 + GL_PIXEL_MAP_I_TO_A* = 0x00000C75 + GL_PIXEL_MAP_R_TO_R* = 0x00000C76 + GL_PIXEL_MAP_G_TO_G* = 0x00000C77 + GL_PIXEL_MAP_B_TO_B* = 0x00000C78 + GL_PIXEL_MAP_A_TO_A* = 0x00000C79 + GL_PIXEL_MAP_I_TO_I_SIZE* = 0x00000CB0 + GL_PIXEL_MAP_S_TO_S_SIZE* = 0x00000CB1 + GL_PIXEL_MAP_I_TO_R_SIZE* = 0x00000CB2 + GL_PIXEL_MAP_I_TO_G_SIZE* = 0x00000CB3 + GL_PIXEL_MAP_I_TO_B_SIZE* = 0x00000CB4 + GL_PIXEL_MAP_I_TO_A_SIZE* = 0x00000CB5 + GL_PIXEL_MAP_R_TO_R_SIZE* = 0x00000CB6 + GL_PIXEL_MAP_G_TO_G_SIZE* = 0x00000CB7 + GL_PIXEL_MAP_B_TO_B_SIZE* = 0x00000CB8 + GL_PIXEL_MAP_A_TO_A_SIZE* = 0x00000CB9 + GL_UNPACK_SWAP_BYTES* = 0x00000CF0 + GL_UNPACK_LSB_FIRST* = 0x00000CF1 + GL_UNPACK_ROW_LENGTH* = 0x00000CF2 + GL_UNPACK_SKIP_ROWS* = 0x00000CF3 + GL_UNPACK_SKIP_PIXELS* = 0x00000CF4 + GL_UNPACK_ALIGNMENT* = 0x00000CF5 + GL_PACK_SWAP_BYTES* = 0x00000D00 + GL_PACK_LSB_FIRST* = 0x00000D01 + GL_PACK_ROW_LENGTH* = 0x00000D02 + GL_PACK_SKIP_ROWS* = 0x00000D03 + GL_PACK_SKIP_PIXELS* = 0x00000D04 + GL_PACK_ALIGNMENT* = 0x00000D05 + GL_MAP_COLOR* = 0x00000D10 + GL_MAP_STENCIL* = 0x00000D11 + GL_INDEX_SHIFT* = 0x00000D12 + GL_INDEX_OFFSET* = 0x00000D13 + GL_RED_SCALE* = 0x00000D14 + GL_RED_BIAS* = 0x00000D15 + GL_ZOOM_X* = 0x00000D16 + GL_ZOOM_Y* = 0x00000D17 + GL_GREEN_SCALE* = 0x00000D18 + GL_GREEN_BIAS* = 0x00000D19 + GL_BLUE_SCALE* = 0x00000D1A + GL_BLUE_BIAS* = 0x00000D1B + GL_ALPHA_SCALE* = 0x00000D1C + GL_ALPHA_BIAS* = 0x00000D1D + GL_DEPTH_SCALE* = 0x00000D1E + GL_DEPTH_BIAS* = 0x00000D1F + GL_MAX_EVAL_ORDER* = 0x00000D30 + GL_MAX_LIGHTS* = 0x00000D31 + GL_MAX_CLIP_PLANES* = 0x00000D32 + GL_MAX_TEXTURE_SIZE* = 0x00000D33 + GL_MAX_PIXEL_MAP_TABLE* = 0x00000D34 + GL_MAX_ATTRIB_STACK_DEPTH* = 0x00000D35 + GL_MAX_MODELVIEW_STACK_DEPTH* = 0x00000D36 + GL_MAX_NAME_STACK_DEPTH* = 0x00000D37 + GL_MAX_PROJECTION_STACK_DEPTH* = 0x00000D38 + GL_MAX_TEXTURE_STACK_DEPTH* = 0x00000D39 + GL_MAX_VIEWPORT_DIMS* = 0x00000D3A + GL_MAX_CLIENT_ATTRIB_STACK_DEPTH* = 0x00000D3B + GL_SUBPIXEL_BITS* = 0x00000D50 + GL_INDEX_BITS* = 0x00000D51 + GL_RED_BITS* = 0x00000D52 + GL_GREEN_BITS* = 0x00000D53 + GL_BLUE_BITS* = 0x00000D54 + GL_ALPHA_BITS* = 0x00000D55 + GL_DEPTH_BITS* = 0x00000D56 + GL_STENCIL_BITS* = 0x00000D57 + GL_ACCUM_RED_BITS* = 0x00000D58 + GL_ACCUM_GREEN_BITS* = 0x00000D59 + GL_ACCUM_BLUE_BITS* = 0x00000D5A + GL_ACCUM_ALPHA_BITS* = 0x00000D5B + GL_NAME_STACK_DEPTH* = 0x00000D70 + GL_AUTO_NORMAL* = 0x00000D80 + GL_MAP1_COLOR_4* = 0x00000D90 + GL_MAP1_INDEX* = 0x00000D91 + GL_MAP1_NORMAL* = 0x00000D92 + GL_MAP1_TEXTURE_COORD_1* = 0x00000D93 + GL_MAP1_TEXTURE_COORD_2* = 0x00000D94 + GL_MAP1_TEXTURE_COORD_3* = 0x00000D95 + GL_MAP1_TEXTURE_COORD_4* = 0x00000D96 + GL_MAP1_VERTEX_3* = 0x00000D97 + GL_MAP1_VERTEX_4* = 0x00000D98 + GL_MAP2_COLOR_4* = 0x00000DB0 + GL_MAP2_INDEX* = 0x00000DB1 + GL_MAP2_NORMAL* = 0x00000DB2 + GL_MAP2_TEXTURE_COORD_1* = 0x00000DB3 + GL_MAP2_TEXTURE_COORD_2* = 0x00000DB4 + GL_MAP2_TEXTURE_COORD_3* = 0x00000DB5 + GL_MAP2_TEXTURE_COORD_4* = 0x00000DB6 + GL_MAP2_VERTEX_3* = 0x00000DB7 + GL_MAP2_VERTEX_4* = 0x00000DB8 + GL_MAP1_GRID_DOMAIN* = 0x00000DD0 + GL_MAP1_GRID_SEGMENTS* = 0x00000DD1 + GL_MAP2_GRID_DOMAIN* = 0x00000DD2 + GL_MAP2_GRID_SEGMENTS* = 0x00000DD3 + GL_TEXTURE_1D* = 0x00000DE0 + GL_TEXTURE_2D* = 0x00000DE1 + GL_FEEDBACK_BUFFER_POINTER* = 0x00000DF0 + GL_FEEDBACK_BUFFER_SIZE* = 0x00000DF1 + GL_FEEDBACK_BUFFER_TYPE* = 0x00000DF2 + GL_SELECTION_BUFFER_POINTER* = 0x00000DF3 + GL_SELECTION_BUFFER_SIZE* = 0x00000DF4 # GL_TEXTURE_BINDING_1D + # GL_TEXTURE_BINDING_2D + # GL_VERTEX_ARRAY + # GL_NORMAL_ARRAY + # GL_COLOR_ARRAY + # GL_INDEX_ARRAY + # GL_TEXTURE_COORD_ARRAY + # GL_EDGE_FLAG_ARRAY + # GL_VERTEX_ARRAY_SIZE + # GL_VERTEX_ARRAY_TYPE + # GL_VERTEX_ARRAY_STRIDE + # GL_NORMAL_ARRAY_TYPE + # GL_NORMAL_ARRAY_STRIDE + # GL_COLOR_ARRAY_SIZE + # GL_COLOR_ARRAY_TYPE + # GL_COLOR_ARRAY_STRIDE + # GL_INDEX_ARRAY_TYPE + # GL_INDEX_ARRAY_STRIDE + # GL_TEXTURE_COORD_ARRAY_SIZE + # GL_TEXTURE_COORD_ARRAY_TYPE + # GL_TEXTURE_COORD_ARRAY_STRIDE + # GL_EDGE_FLAG_ARRAY_STRIDE + # GL_POLYGON_OFFSET_FACTOR + # GL_POLYGON_OFFSET_UNITS + # GetTextureParameter + # GL_TEXTURE_MAG_FILTER + # GL_TEXTURE_MIN_FILTER + # GL_TEXTURE_WRAP_S + # GL_TEXTURE_WRAP_T + GL_TEXTURE_WIDTH* = 0x00001000 + GL_TEXTURE_HEIGHT* = 0x00001001 + GL_TEXTURE_INTERNAL_FORMAT* = 0x00001003 + GL_TEXTURE_BORDER_COLOR* = 0x00001004 + GL_TEXTURE_BORDER* = 0x00001005 # GL_TEXTURE_RED_SIZE + # GL_TEXTURE_GREEN_SIZE + # GL_TEXTURE_BLUE_SIZE + # GL_TEXTURE_ALPHA_SIZE + # GL_TEXTURE_LUMINANCE_SIZE + # GL_TEXTURE_INTENSITY_SIZE + # GL_TEXTURE_PRIORITY + # GL_TEXTURE_RESIDENT + # HintMode + GL_DONT_CARE* = 0x00001100 + GL_FASTEST* = 0x00001101 + GL_NICEST* = 0x00001102 # HintTarget + # GL_PERSPECTIVE_CORRECTION_HINT + # GL_POINT_SMOOTH_HINT + # GL_LINE_SMOOTH_HINT + # GL_POLYGON_SMOOTH_HINT + # GL_FOG_HINT + # IndexPointerType + # GL_SHORT + # GL_INT + # GL_FLOAT + # GL_DOUBLE + # LightModelParameter + # GL_LIGHT_MODEL_AMBIENT + # GL_LIGHT_MODEL_LOCAL_VIEWER + # GL_LIGHT_MODEL_TWO_SIDE + # LightName + GL_LIGHT0* = 0x00004000 + GL_LIGHT1* = 0x00004001 + GL_LIGHT2* = 0x00004002 + GL_LIGHT3* = 0x00004003 + GL_LIGHT4* = 0x00004004 + GL_LIGHT5* = 0x00004005 + GL_LIGHT6* = 0x00004006 + GL_LIGHT7* = 0x00004007 # LightParameter + GL_AMBIENT* = 0x00001200 + GL_DIFFUSE* = 0x00001201 + GL_SPECULAR* = 0x00001202 + GL_POSITION* = 0x00001203 + GL_SPOT_DIRECTION* = 0x00001204 + GL_SPOT_EXPONENT* = 0x00001205 + GL_SPOT_CUTOFF* = 0x00001206 + GL_CONSTANT_ATTENUATION* = 0x00001207 + GL_LINEAR_ATTENUATION* = 0x00001208 + GL_QUADRATIC_ATTENUATION* = 0x00001209 # InterleavedArrays + # GL_V2F + # GL_V3F + # GL_C4UB_V2F + # GL_C4UB_V3F + # GL_C3F_V3F + # GL_N3F_V3F + # GL_C4F_N3F_V3F + # GL_T2F_V3F + # GL_T4F_V4F + # GL_T2F_C4UB_V3F + # GL_T2F_C3F_V3F + # GL_T2F_N3F_V3F + # GL_T2F_C4F_N3F_V3F + # GL_T4F_C4F_N3F_V4F + # ListMode + GL_COMPILE* = 0x00001300 + GL_COMPILE_AND_EXECUTE* = 0x00001301 # ListNameType + # GL_BYTE + # GL_UNSIGNED_BYTE + # GL_SHORT + # GL_UNSIGNED_SHORT + # GL_INT + # GL_UNSIGNED_INT + # GL_FLOAT + # GL_2_BYTES + # GL_3_BYTES + # GL_4_BYTES + # LogicOp + constGL_CLEAR* = 0x00001500 + GL_AND* = 0x00001501 + GL_AND_REVERSE* = 0x00001502 + GL_COPY* = 0x00001503 + GL_AND_INVERTED* = 0x00001504 + GL_NOOP* = 0x00001505 + GL_XOR* = 0x00001506 + GL_OR* = 0x00001507 + GL_NOR* = 0x00001508 + GL_EQUIV* = 0x00001509 + GL_INVERT* = 0x0000150A + GL_OR_REVERSE* = 0x0000150B + GL_COPY_INVERTED* = 0x0000150C + GL_OR_INVERTED* = 0x0000150D + GL_NAND* = 0x0000150E + GL_SET* = 0x0000150F # MapTarget + # GL_MAP1_COLOR_4 + # GL_MAP1_INDEX + # GL_MAP1_NORMAL + # GL_MAP1_TEXTURE_COORD_1 + # GL_MAP1_TEXTURE_COORD_2 + # GL_MAP1_TEXTURE_COORD_3 + # GL_MAP1_TEXTURE_COORD_4 + # GL_MAP1_VERTEX_3 + # GL_MAP1_VERTEX_4 + # GL_MAP2_COLOR_4 + # GL_MAP2_INDEX + # GL_MAP2_NORMAL + # GL_MAP2_TEXTURE_COORD_1 + # GL_MAP2_TEXTURE_COORD_2 + # GL_MAP2_TEXTURE_COORD_3 + # GL_MAP2_TEXTURE_COORD_4 + # GL_MAP2_VERTEX_3 + # GL_MAP2_VERTEX_4 + # MaterialFace + # GL_FRONT + # GL_BACK + # GL_FRONT_AND_BACK + # MaterialParameter + GL_EMISSION* = 0x00001600 + GL_SHININESS* = 0x00001601 + GL_AMBIENT_AND_DIFFUSE* = 0x00001602 + GL_COLOR_INDEXES* = 0x00001603 # GL_AMBIENT + # GL_DIFFUSE + # GL_SPECULAR + # MatrixMode + GL_MODELVIEW* = 0x00001700 + GL_PROJECTION* = 0x00001701 + GL_TEXTURE* = 0x00001702 # MeshMode1 + # GL_POINT + # GL_LINE + # MeshMode2 + # GL_POINT + # GL_LINE + # GL_FILL + # NormalPointerType + # GL_BYTE + # GL_SHORT + # GL_INT + # GL_FLOAT + # GL_DOUBLE + # PixelCopyType + GL_COLOR* = 0x00001800 + GL_DEPTH* = 0x00001801 + GL_STENCIL* = 0x00001802 # PixelFormat + GL_COLOR_INDEX* = 0x00001900 + GL_STENCIL_INDEX* = 0x00001901 + GL_DEPTH_COMPONENT* = 0x00001902 + GL_RED* = 0x00001903 + GL_GREEN* = 0x00001904 + GL_BLUE* = 0x00001905 + GL_ALPHA* = 0x00001906 + GL_RGB* = 0x00001907 + GL_RGBA* = 0x00001908 + GL_LUMINANCE* = 0x00001909 + GL_LUMINANCE_ALPHA* = 0x0000190A # PixelMap + # GL_PIXEL_MAP_I_TO_I + # GL_PIXEL_MAP_S_TO_S + # GL_PIXEL_MAP_I_TO_R + # GL_PIXEL_MAP_I_TO_G + # GL_PIXEL_MAP_I_TO_B + # GL_PIXEL_MAP_I_TO_A + # GL_PIXEL_MAP_R_TO_R + # GL_PIXEL_MAP_G_TO_G + # GL_PIXEL_MAP_B_TO_B + # GL_PIXEL_MAP_A_TO_A + # PixelStore + # GL_UNPACK_SWAP_BYTES + # GL_UNPACK_LSB_FIRST + # GL_UNPACK_ROW_LENGTH + # GL_UNPACK_SKIP_ROWS + # GL_UNPACK_SKIP_PIXELS + # GL_UNPACK_ALIGNMENT + # GL_PACK_SWAP_BYTES + # GL_PACK_LSB_FIRST + # GL_PACK_ROW_LENGTH + # GL_PACK_SKIP_ROWS + # GL_PACK_SKIP_PIXELS + # GL_PACK_ALIGNMENT + # PixelTransfer + # GL_MAP_COLOR + # GL_MAP_STENCIL + # GL_INDEX_SHIFT + # GL_INDEX_OFFSET + # GL_RED_SCALE + # GL_RED_BIAS + # GL_GREEN_SCALE + # GL_GREEN_BIAS + # GL_BLUE_SCALE + # GL_BLUE_BIAS + # GL_ALPHA_SCALE + # GL_ALPHA_BIAS + # GL_DEPTH_SCALE + # GL_DEPTH_BIAS + # PixelType + constGL_BITMAP* = 0x00001A00 + GL_POINT* = 0x00001B00 + GL_LINE* = 0x00001B01 + GL_FILL* = 0x00001B02 # ReadBufferMode + # GL_FRONT_LEFT + # GL_FRONT_RIGHT + # GL_BACK_LEFT + # GL_BACK_RIGHT + # GL_FRONT + # GL_BACK + # GL_LEFT + # GL_RIGHT + # GL_AUX0 + # GL_AUX1 + # GL_AUX2 + # GL_AUX3 + # RenderingMode + GL_RENDER* = 0x00001C00 + GL_FEEDBACK* = 0x00001C01 + GL_SELECT* = 0x00001C02 # ShadingModel + GL_FLAT* = 0x00001D00 + GL_SMOOTH* = 0x00001D01 # StencilFunction + # GL_NEVER + # GL_LESS + # GL_EQUAL + # GL_LEQUAL + # GL_GREATER + # GL_NOTEQUAL + # GL_GEQUAL + # GL_ALWAYS + # StencilOp + # GL_ZERO + GL_KEEP* = 0x00001E00 + GL_REPLACE* = 0x00001E01 + GL_INCR* = 0x00001E02 + GL_DECR* = 0x00001E03 # GL_INVERT + # StringName + GL_VENDOR* = 0x00001F00 + GL_RENDERER* = 0x00001F01 + GL_VERSION* = 0x00001F02 + GL_EXTENSIONS* = 0x00001F03 # TextureCoordName + GL_S* = 0x00002000 + GL_T* = 0x00002001 + GL_R* = 0x00002002 + GL_Q* = 0x00002003 # TexCoordPointerType + # GL_SHORT + # GL_INT + # GL_FLOAT + # GL_DOUBLE + # TextureEnvMode + GL_MODULATE* = 0x00002100 + GL_DECAL* = 0x00002101 # GL_BLEND + # GL_REPLACE + # TextureEnvParameter + GL_TEXTURE_ENV_MODE* = 0x00002200 + GL_TEXTURE_ENV_COLOR* = 0x00002201 # TextureEnvTarget + GL_TEXTURE_ENV* = 0x00002300 # TextureGenMode + GL_EYE_LINEAR* = 0x00002400 + GL_OBJECT_LINEAR* = 0x00002401 + GL_SPHERE_MAP* = 0x00002402 # TextureGenParameter + GL_TEXTURE_GEN_MODE* = 0x00002500 + GL_OBJECT_PLANE* = 0x00002501 + GL_EYE_PLANE* = 0x00002502 # TextureMagFilter + GL_NEAREST* = 0x00002600 + GL_LINEAR* = 0x00002601 # TextureMinFilter + # GL_NEAREST + # GL_LINEAR + GL_NEAREST_MIPMAP_NEAREST* = 0x00002700 + GL_LINEAR_MIPMAP_NEAREST* = 0x00002701 + GL_NEAREST_MIPMAP_LINEAR* = 0x00002702 + GL_LINEAR_MIPMAP_LINEAR* = 0x00002703 # TextureParameterName + GL_TEXTURE_MAG_FILTER* = 0x00002800 + GL_TEXTURE_MIN_FILTER* = 0x00002801 + GL_TEXTURE_WRAP_S* = 0x00002802 + GL_TEXTURE_WRAP_T* = 0x00002803 # GL_TEXTURE_BORDER_COLOR + # GL_TEXTURE_PRIORITY + # TextureTarget + # GL_TEXTURE_1D + # GL_TEXTURE_2D + # GL_PROXY_TEXTURE_1D + # GL_PROXY_TEXTURE_2D + # TextureWrapMode + GL_CLAMP* = 0x00002900 + GL_REPEAT* = 0x00002901 # VertexPointerType + # GL_SHORT + # GL_INT + # GL_FLOAT + # GL_DOUBLE + # ClientAttribMask + GL_CLIENT_PIXEL_STORE_BIT* = 0x00000001 + GL_CLIENT_VERTEX_ARRAY_BIT* = 0x00000002 + GL_CLIENT_ALL_ATTRIB_BITS* = 0xFFFFFFFF # polygon_offset + GL_POLYGON_OFFSET_FACTOR* = 0x00008038 + GL_POLYGON_OFFSET_UNITS* = 0x00002A00 + GL_POLYGON_OFFSET_POINT* = 0x00002A01 + GL_POLYGON_OFFSET_LINE* = 0x00002A02 + GL_POLYGON_OFFSET_FILL* = 0x00008037 # texture + GL_ALPHA4* = 0x0000803B + GL_ALPHA8* = 0x0000803C + GL_ALPHA12* = 0x0000803D + GL_ALPHA16* = 0x0000803E + GL_LUMINANCE4* = 0x0000803F + GL_LUMINANCE8* = 0x00008040 + GL_LUMINANCE12* = 0x00008041 + GL_LUMINANCE16* = 0x00008042 + GL_LUMINANCE4_ALPHA4* = 0x00008043 + GL_LUMINANCE6_ALPHA2* = 0x00008044 + GL_LUMINANCE8_ALPHA8* = 0x00008045 + GL_LUMINANCE12_ALPHA4* = 0x00008046 + GL_LUMINANCE12_ALPHA12* = 0x00008047 + GL_LUMINANCE16_ALPHA16* = 0x00008048 + GL_INTENSITY* = 0x00008049 + GL_INTENSITY4* = 0x0000804A + GL_INTENSITY8* = 0x0000804B + GL_INTENSITY12* = 0x0000804C + GL_INTENSITY16* = 0x0000804D + GL_R3_G3_B2* = 0x00002A10 + GL_RGB4* = 0x0000804F + GL_RGB5* = 0x00008050 + GL_RGB8* = 0x00008051 + GL_RGB10* = 0x00008052 + GL_RGB12* = 0x00008053 + GL_RGB16* = 0x00008054 + GL_RGBA2* = 0x00008055 + GL_RGBA4* = 0x00008056 + GL_RGB5_A1* = 0x00008057 + GL_RGBA8* = 0x00008058 + GL_RGB10_A2* = 0x00008059 + GL_RGBA12* = 0x0000805A + GL_RGBA16* = 0x0000805B + GL_TEXTURE_RED_SIZE* = 0x0000805C + GL_TEXTURE_GREEN_SIZE* = 0x0000805D + GL_TEXTURE_BLUE_SIZE* = 0x0000805E + GL_TEXTURE_ALPHA_SIZE* = 0x0000805F + GL_TEXTURE_LUMINANCE_SIZE* = 0x00008060 + GL_TEXTURE_INTENSITY_SIZE* = 0x00008061 + GL_PROXY_TEXTURE_1D* = 0x00008063 + GL_PROXY_TEXTURE_2D* = 0x00008064 # texture_object + GL_TEXTURE_PRIORITY* = 0x00008066 + GL_TEXTURE_RESIDENT* = 0x00008067 + GL_TEXTURE_BINDING_1D* = 0x00008068 + GL_TEXTURE_BINDING_2D* = 0x00008069 # vertex_array + GL_VERTEX_ARRAY* = 0x00008074 + GL_NORMAL_ARRAY* = 0x00008075 + GL_COLOR_ARRAY* = 0x00008076 + GL_INDEX_ARRAY* = 0x00008077 + GL_TEXTURE_COORD_ARRAY* = 0x00008078 + GL_EDGE_FLAG_ARRAY* = 0x00008079 + GL_VERTEX_ARRAY_SIZE* = 0x0000807A + GL_VERTEX_ARRAY_TYPE* = 0x0000807B + GL_VERTEX_ARRAY_STRIDE* = 0x0000807C + GL_NORMAL_ARRAY_TYPE* = 0x0000807E + GL_NORMAL_ARRAY_STRIDE* = 0x0000807F + GL_COLOR_ARRAY_SIZE* = 0x00008081 + GL_COLOR_ARRAY_TYPE* = 0x00008082 + GL_COLOR_ARRAY_STRIDE* = 0x00008083 + GL_INDEX_ARRAY_TYPE* = 0x00008085 + GL_INDEX_ARRAY_STRIDE* = 0x00008086 + GL_TEXTURE_COORD_ARRAY_SIZE* = 0x00008088 + GL_TEXTURE_COORD_ARRAY_TYPE* = 0x00008089 + GL_TEXTURE_COORD_ARRAY_STRIDE* = 0x0000808A + GL_EDGE_FLAG_ARRAY_STRIDE* = 0x0000808C + GL_VERTEX_ARRAY_POINTER* = 0x0000808E + GL_NORMAL_ARRAY_POINTER* = 0x0000808F + GL_COLOR_ARRAY_POINTER* = 0x00008090 + GL_INDEX_ARRAY_POINTER* = 0x00008091 + GL_TEXTURE_COORD_ARRAY_POINTER* = 0x00008092 + GL_EDGE_FLAG_ARRAY_POINTER* = 0x00008093 + GL_V2F* = 0x00002A20 + GL_V3F* = 0x00002A21 + GL_C4UB_V2F* = 0x00002A22 + GL_C4UB_V3F* = 0x00002A23 + GL_C3F_V3F* = 0x00002A24 + GL_N3F_V3F* = 0x00002A25 + GL_C4F_N3F_V3F* = 0x00002A26 + GL_T2F_V3F* = 0x00002A27 + GL_T4F_V4F* = 0x00002A28 + GL_T2F_C4UB_V3F* = 0x00002A29 + GL_T2F_C3F_V3F* = 0x00002A2A + GL_T2F_N3F_V3F* = 0x00002A2B + GL_T2F_C4F_N3F_V3F* = 0x00002A2C + GL_T4F_C4F_N3F_V4F* = 0x00002A2D # Extensions + GL_EXT_vertex_array* = 1 + GL_WIN_swap_hint* = 1 + GL_EXT_bgra* = 1 + GL_EXT_paletted_texture* = 1 # EXT_vertex_array + GL_VERTEX_ARRAY_EXT* = 0x00008074 + GL_NORMAL_ARRAY_EXT* = 0x00008075 + GL_COLOR_ARRAY_EXT* = 0x00008076 + GL_INDEX_ARRAY_EXT* = 0x00008077 + GL_TEXTURE_COORD_ARRAY_EXT* = 0x00008078 + GL_EDGE_FLAG_ARRAY_EXT* = 0x00008079 + GL_VERTEX_ARRAY_SIZE_EXT* = 0x0000807A + GL_VERTEX_ARRAY_TYPE_EXT* = 0x0000807B + GL_VERTEX_ARRAY_STRIDE_EXT* = 0x0000807C + GL_VERTEX_ARRAY_COUNT_EXT* = 0x0000807D + GL_NORMAL_ARRAY_TYPE_EXT* = 0x0000807E + GL_NORMAL_ARRAY_STRIDE_EXT* = 0x0000807F + GL_NORMAL_ARRAY_COUNT_EXT* = 0x00008080 + GL_COLOR_ARRAY_SIZE_EXT* = 0x00008081 + GL_COLOR_ARRAY_TYPE_EXT* = 0x00008082 + GL_COLOR_ARRAY_STRIDE_EXT* = 0x00008083 + GL_COLOR_ARRAY_COUNT_EXT* = 0x00008084 + GL_INDEX_ARRAY_TYPE_EXT* = 0x00008085 + GL_INDEX_ARRAY_STRIDE_EXT* = 0x00008086 + GL_INDEX_ARRAY_COUNT_EXT* = 0x00008087 + GL_TEXTURE_COORD_ARRAY_SIZE_EXT* = 0x00008088 + GL_TEXTURE_COORD_ARRAY_TYPE_EXT* = 0x00008089 + GL_TEXTURE_COORD_ARRAY_STRIDE_EXT* = 0x0000808A + GL_TEXTURE_COORD_ARRAY_COUNT_EXT* = 0x0000808B + GL_EDGE_FLAG_ARRAY_STRIDE_EXT* = 0x0000808C + GL_EDGE_FLAG_ARRAY_COUNT_EXT* = 0x0000808D + GL_VERTEX_ARRAY_POINTER_EXT* = 0x0000808E + GL_NORMAL_ARRAY_POINTER_EXT* = 0x0000808F + GL_COLOR_ARRAY_POINTER_EXT* = 0x00008090 + GL_INDEX_ARRAY_POINTER_EXT* = 0x00008091 + GL_TEXTURE_COORD_ARRAY_POINTER_EXT* = 0x00008092 + GL_EDGE_FLAG_ARRAY_POINTER_EXT* = 0x00008093 + GL_DOUBLE_EXT* = GL_DOUBLE # EXT_bgra + GL_BGR_EXT* = 0x000080E0 + GL_BGRA_EXT* = 0x000080E1 # EXT_paletted_texture + # These must match the GL_COLOR_TABLE_*_SGI enumerants + GL_COLOR_TABLE_FORMAT_EXT* = 0x000080D8 + GL_COLOR_TABLE_WIDTH_EXT* = 0x000080D9 + GL_COLOR_TABLE_RED_SIZE_EXT* = 0x000080DA + GL_COLOR_TABLE_GREEN_SIZE_EXT* = 0x000080DB + GL_COLOR_TABLE_BLUE_SIZE_EXT* = 0x000080DC + GL_COLOR_TABLE_ALPHA_SIZE_EXT* = 0x000080DD + GL_COLOR_TABLE_LUMINANCE_SIZE_EXT* = 0x000080DE + GL_COLOR_TABLE_INTENSITY_SIZE_EXT* = 0x000080DF + GL_COLOR_INDEX1_EXT* = 0x000080E2 + GL_COLOR_INDEX2_EXT* = 0x000080E3 + GL_COLOR_INDEX4_EXT* = 0x000080E4 + GL_COLOR_INDEX8_EXT* = 0x000080E5 + GL_COLOR_INDEX12_EXT* = 0x000080E6 + GL_COLOR_INDEX16_EXT* = 0x000080E7 # For compatibility with OpenGL v1.0 + constGL_LOGIC_OP* = GL_INDEX_LOGIC_OP + GL_TEXTURE_COMPONENTS* = GL_TEXTURE_INTERNAL_FORMAT + +proc glAccum*(op: TGLenum, value: TGLfloat){.dynlib: dllname, importc.} +proc glAlphaFunc*(func: TGLenum, theref: TGLclampf){.dynlib: dllname, importc.} +proc glAreTexturesResident*(n: TGLsizei, textures: PGLuint, + residences: PGLboolean): TGLboolean{.dynlib: dllname, + importc.} +proc glArrayElement*(i: TGLint){.dynlib: dllname, importc.} +proc glBegin*(mode: TGLenum){.dynlib: dllname, importc.} +proc glBindTexture*(target: TGLenum, texture: TGLuint){.dynlib: dllname, importc.} +proc glBitmap*(width, height: TGLsizei, xorig, yorig: TGLfloat, + xmove, ymove: TGLfloat, bitmap: PGLubyte){.dynlib: dllname, + importc.} +proc glBlendFunc*(sfactor, dfactor: TGLenum){.dynlib: dllname, importc.} +proc glCallList*(list: TGLuint){.dynlib: dllname, importc.} +proc glCallLists*(n: TGLsizei, atype: TGLenum, lists: Pointer){.dynlib: dllname, + importc.} +proc glClear*(mask: TGLbitfield){.dynlib: dllname, importc.} +proc glClearAccum*(red, green, blue, alpha: TGLfloat){.dynlib: dllname, importc.} +proc glClearColor*(red, green, blue, alpha: TGLclampf){.dynlib: dllname, importc.} +proc glClearDepth*(depth: TGLclampd){.dynlib: dllname, importc.} +proc glClearIndex*(c: TGLfloat){.dynlib: dllname, importc.} +proc glClearStencil*(s: TGLint){.dynlib: dllname, importc.} +proc glClipPlane*(plane: TGLenum, equation: PGLdouble){.dynlib: dllname, importc.} +proc glColor3b*(red, green, blue: TGlbyte){.dynlib: dllname, importc.} +proc glColor3bv*(v: PGLbyte){.dynlib: dllname, importc.} +proc glColor3d*(red, green, blue: TGLdouble){.dynlib: dllname, importc.} +proc glColor3dv*(v: PGLdouble){.dynlib: dllname, importc.} +proc glColor3f*(red, green, blue: TGLfloat){.dynlib: dllname, importc.} +proc glColor3fv*(v: PGLfloat){.dynlib: dllname, importc.} +proc glColor3i*(red, green, blue: TGLint){.dynlib: dllname, importc.} +proc glColor3iv*(v: PGLint){.dynlib: dllname, importc.} +proc glColor3s*(red, green, blue: TGLshort){.dynlib: dllname, importc.} +proc glColor3sv*(v: PGLshort){.dynlib: dllname, importc.} +proc glColor3ub*(red, green, blue: TGLubyte){.dynlib: dllname, importc.} +proc glColor3ubv*(v: PGLubyte){.dynlib: dllname, importc.} +proc glColor3ui*(red, green, blue: TGLuint){.dynlib: dllname, importc.} +proc glColor3uiv*(v: PGLuint){.dynlib: dllname, importc.} +proc glColor3us*(red, green, blue: TGLushort){.dynlib: dllname, importc.} +proc glColor3usv*(v: PGLushort){.dynlib: dllname, importc.} +proc glColor4b*(red, green, blue, alpha: TGlbyte){.dynlib: dllname, importc.} +proc glColor4bv*(v: PGLbyte){.dynlib: dllname, importc.} +proc glColor4d*(red, green, blue, alpha: TGLdouble){.dynlib: dllname, importc.} +proc glColor4dv*(v: PGLdouble){.dynlib: dllname, importc.} +proc glColor4f*(red, green, blue, alpha: TGLfloat){.dynlib: dllname, importc.} +proc glColor4fv*(v: PGLfloat){.dynlib: dllname, importc.} +proc glColor4i*(red, green, blue, alpha: TGLint){.dynlib: dllname, importc.} +proc glColor4iv*(v: PGLint){.dynlib: dllname, importc.} +proc glColor4s*(red, green, blue, alpha: TGLshort){.dynlib: dllname, importc.} +proc glColor4sv*(v: PGLshort){.dynlib: dllname, importc.} +proc glColor4ub*(red, green, blue, alpha: TGLubyte){.dynlib: dllname, importc.} +proc glColor4ubv*(v: PGLubyte){.dynlib: dllname, importc.} +proc glColor4ui*(red, green, blue, alpha: TGLuint){.dynlib: dllname, importc.} +proc glColor4uiv*(v: PGLuint){.dynlib: dllname, importc.} +proc glColor4us*(red, green, blue, alpha: TGLushort){.dynlib: dllname, importc.} +proc glColor4usv*(v: PGLushort){.dynlib: dllname, importc.} +proc glColorMask*(red, green, blue, alpha: TGLboolean){.dynlib: dllname, importc.} +proc glColorMaterial*(face, mode: TGLenum){.dynlib: dllname, importc.} +proc glColorPointer*(size: TGLint, atype: TGLenum, stride: TGLsizei, + pointer: Pointer){.dynlib: dllname, importc.} +proc glCopyPixels*(x, y: TGLint, width, height: TGLsizei, atype: TGLenum){. + dynlib: dllname, importc.} +proc glCopyTexImage1D*(target: TGLenum, level: TGLint, internalFormat: TGLenum, + x, y: TGLint, width: TGLsizei, border: TGLint){. + dynlib: dllname, importc.} +proc glCopyTexImage2D*(target: TGLenum, level: TGLint, internalFormat: TGLenum, + x, y: TGLint, width, height: TGLsizei, border: TGLint){. + dynlib: dllname, importc.} +proc glCopyTexSubImage1D*(target: TGLenum, level, xoffset, x, y: TGLint, + width: TGLsizei){.dynlib: dllname, importc.} +proc glCopyTexSubImage2D*(target: TGLenum, level, xoffset, yoffset, x, y: TGLint, + width, height: TGLsizei){.dynlib: dllname, importc.} +proc glCullFace*(mode: TGLenum){.dynlib: dllname, importc.} +proc glDeleteLists*(list: TGLuint, range: TGLsizei){.dynlib: dllname, importc.} +proc glDeleteTextures*(n: TGLsizei, textures: PGLuint){.dynlib: dllname, importc.} +proc glDepthFunc*(func: TGLenum){.dynlib: dllname, importc.} +proc glDepthMask*(flag: TGLboolean){.dynlib: dllname, importc.} +proc glDepthRange*(zNear, zFar: TGLclampd){.dynlib: dllname, importc.} +proc glDisable*(cap: TGLenum){.dynlib: dllname, importc.} +proc glDisableClientState*(aarray: TGLenum){.dynlib: dllname, importc.} +proc glDrawArrays*(mode: TGLenum, first: TGLint, count: TGLsizei){.dynlib: dllname, + importc.} +proc glDrawBuffer*(mode: TGLenum){.dynlib: dllname, importc.} +proc glDrawElements*(mode: TGLenum, count: TGLsizei, atype: TGLenum, + indices: Pointer){.dynlib: dllname, importc.} +proc glDrawPixels*(width, height: TGLsizei, format, atype: TGLenum, + pixels: Pointer){.dynlib: dllname, importc.} +proc glEdgeFlag*(flag: TGLboolean){.dynlib: dllname, importc.} +proc glEdgeFlagPointer*(stride: TGLsizei, pointer: Pointer){.dynlib: dllname, + importc.} +proc glEdgeFlagv*(flag: PGLboolean){.dynlib: dllname, importc.} +proc glEnable*(cap: TGLenum){.dynlib: dllname, importc.} +proc glEnableClientState*(aarray: TGLenum){.dynlib: dllname, importc.} +proc glEnd*(){.dynlib: dllname, importc.} +proc glEndList*(){.dynlib: dllname, importc.} +proc glEvalCoord1d*(u: TGLdouble){.dynlib: dllname, importc.} +proc glEvalCoord1dv*(u: PGLdouble){.dynlib: dllname, importc.} +proc glEvalCoord1f*(u: TGLfloat){.dynlib: dllname, importc.} +proc glEvalCoord1fv*(u: PGLfloat){.dynlib: dllname, importc.} +proc glEvalCoord2d*(u, v: TGLdouble){.dynlib: dllname, importc.} +proc glEvalCoord2dv*(u: PGLdouble){.dynlib: dllname, importc.} +proc glEvalCoord2f*(u, v: TGLfloat){.dynlib: dllname, importc.} +proc glEvalCoord2fv*(u: PGLfloat){.dynlib: dllname, importc.} +proc glEvalMesh1*(mode: TGLenum, i1, i2: TGLint){.dynlib: dllname, importc.} +proc glEvalMesh2*(mode: TGLenum, i1, i2, j1, j2: TGLint){.dynlib: dllname, importc.} +proc glEvalPoint1*(i: TGLint){.dynlib: dllname, importc.} +proc glEvalPoint2*(i, j: TGLint){.dynlib: dllname, importc.} +proc glFeedbackBuffer*(size: TGLsizei, atype: TGLenum, buffer: PGLfloat){. + dynlib: dllname, importc.} +proc glFinish*(){.dynlib: dllname, importc.} +proc glFlush*(){.dynlib: dllname, importc.} +proc glFogf*(pname: TGLenum, param: TGLfloat){.dynlib: dllname, importc.} +proc glFogfv*(pname: TGLenum, params: PGLfloat){.dynlib: dllname, importc.} +proc glFogi*(pname: TGLenum, param: TGLint){.dynlib: dllname, importc.} +proc glFogiv*(pname: TGLenum, params: PGLint){.dynlib: dllname, importc.} +proc glFrontFace*(mode: TGLenum){.dynlib: dllname, importc.} +proc glFrustum*(left, right, bottom, top, zNear, zFar: TGLdouble){. + dynlib: dllname, importc.} +proc glGenLists*(range: TGLsizei): TGLuint{.dynlib: dllname, importc.} +proc glGenTextures*(n: TGLsizei, textures: PGLuint){.dynlib: dllname, importc.} +proc glGetBooleanv*(pname: TGLenum, params: PGLboolean){.dynlib: dllname, importc.} +proc glGetClipPlane*(plane: TGLenum, equation: PGLdouble){.dynlib: dllname, + importc.} +proc glGetDoublev*(pname: TGLenum, params: PGLdouble){.dynlib: dllname, importc.} +proc glGetError*(): TGLenum{.dynlib: dllname, importc.} +proc glGetFloatv*(pname: TGLenum, params: PGLfloat){.dynlib: dllname, importc.} +proc glGetIntegerv*(pname: TGLenum, params: PGLint){.dynlib: dllname, importc.} +proc glGetLightfv*(light, pname: TGLenum, params: PGLfloat){.dynlib: dllname, + importc.} +proc glGetLightiv*(light, pname: TGLenum, params: PGLint){.dynlib: dllname, + importc.} +proc glGetMapdv*(target, query: TGLenum, v: PGLdouble){.dynlib: dllname, importc.} +proc glGetMapfv*(target, query: TGLenum, v: PGLfloat){.dynlib: dllname, importc.} +proc glGetMapiv*(target, query: TGLenum, v: PGLint){.dynlib: dllname, importc.} +proc glGetMaterialfv*(face, pname: TGLenum, params: PGLfloat){.dynlib: dllname, + importc.} +proc glGetMaterialiv*(face, pname: TGLenum, params: PGLint){.dynlib: dllname, + importc.} +proc glGetPixelMapfv*(map: TGLenum, values: PGLfloat){.dynlib: dllname, importc.} +proc glGetPixelMapuiv*(map: TGLenum, values: PGLuint){.dynlib: dllname, importc.} +proc glGetPixelMapusv*(map: TGLenum, values: PGLushort){.dynlib: dllname, importc.} +proc glGetPointerv*(pname: TGLenum, params: Pointer){.dynlib: dllname, importc.} +proc glGetPolygonStipple*(mask: PGLubyte){.dynlib: dllname, importc.} +proc glGetString*(name: TGLenum): cstring{.dynlib: dllname, importc.} +proc glGetTexEnvfv*(target, pname: TGLenum, params: PGLfloat){.dynlib: dllname, + importc.} +proc glGetTexEnviv*(target, pname: TGLenum, params: PGLint){.dynlib: dllname, + importc.} +proc glGetTexGendv*(coord, pname: TGLenum, params: PGLdouble){.dynlib: dllname, + importc.} +proc glGetTexGenfv*(coord, pname: TGLenum, params: PGLfloat){.dynlib: dllname, + importc.} +proc glGetTexGeniv*(coord, pname: TGLenum, params: PGLint){.dynlib: dllname, + importc.} +proc glGetTexImage*(target: TGLenum, level: TGLint, format: TGLenum, atype: TGLenum, + pixels: Pointer){.dynlib: dllname, importc.} +proc glGetTexLevelParameterfv*(target: TGLenum, level: TGLint, pname: TGLenum, + params: Pointer){.dynlib: dllname, importc.} +proc glGetTexLevelParameteriv*(target: TGLenum, level: TGLint, pname: TGLenum, + params: PGLint){.dynlib: dllname, importc.} +proc glGetTexParameterfv*(target, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glGetTexParameteriv*(target, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glHint*(target, mode: TGLenum){.dynlib: dllname, importc.} +proc glIndexMask*(mask: TGLuint){.dynlib: dllname, importc.} +proc glIndexPointer*(atype: TGLenum, stride: TGLsizei, pointer: Pointer){. + dynlib: dllname, importc.} +proc glIndexd*(c: TGLdouble){.dynlib: dllname, importc.} +proc glIndexdv*(c: PGLdouble){.dynlib: dllname, importc.} +proc glIndexf*(c: TGLfloat){.dynlib: dllname, importc.} +proc glIndexfv*(c: PGLfloat){.dynlib: dllname, importc.} +proc glIndexi*(c: TGLint){.dynlib: dllname, importc.} +proc glIndexiv*(c: PGLint){.dynlib: dllname, importc.} +proc glIndexs*(c: TGLshort){.dynlib: dllname, importc.} +proc glIndexsv*(c: PGLshort){.dynlib: dllname, importc.} +proc glIndexub*(c: TGLubyte){.dynlib: dllname, importc.} +proc glIndexubv*(c: PGLubyte){.dynlib: dllname, importc.} +proc glInitNames*(){.dynlib: dllname, importc.} +proc glInterleavedArrays*(format: TGLenum, stride: TGLsizei, pointer: Pointer){. + dynlib: dllname, importc.} +proc glIsEnabled*(cap: TGLenum): TGLboolean{.dynlib: dllname, importc.} +proc glIsList*(list: TGLuint): TGLboolean{.dynlib: dllname, importc.} +proc glIsTexture*(texture: TGLuint): TGLboolean{.dynlib: dllname, importc.} +proc glLightModelf*(pname: TGLenum, param: TGLfloat){.dynlib: dllname, importc.} +proc glLightModelfv*(pname: TGLenum, params: PGLfloat){.dynlib: dllname, importc.} +proc glLightModeli*(pname: TGLenum, param: TGLint){.dynlib: dllname, importc.} +proc glLightModeliv*(pname: TGLenum, params: PGLint){.dynlib: dllname, importc.} +proc glLightf*(light, pname: TGLenum, param: TGLfloat){.dynlib: dllname, importc.} +proc glLightfv*(light, pname: TGLenum, params: PGLfloat){.dynlib: dllname, + importc.} +proc glLighti*(light, pname: TGLenum, param: TGLint){.dynlib: dllname, importc.} +proc glLightiv*(light, pname: TGLenum, params: PGLint){.dynlib: dllname, importc.} +proc glLineStipple*(factor: TGLint, pattern: TGLushort){.dynlib: dllname, importc.} +proc glLineWidth*(width: TGLfloat){.dynlib: dllname, importc.} +proc glListBase*(base: TGLuint){.dynlib: dllname, importc.} +proc glLoadIdentity*(){.dynlib: dllname, importc.} +proc glLoadMatrixd*(m: PGLdouble){.dynlib: dllname, importc.} +proc glLoadMatrixf*(m: PGLfloat){.dynlib: dllname, importc.} +proc glLoadName*(name: TGLuint){.dynlib: dllname, importc.} +proc glLogicOp*(opcode: TGLenum){.dynlib: dllname, importc.} +proc glMap1d*(target: TGLenum, u1, u2: TGLdouble, stride, order: TGLint, + points: PGLdouble){.dynlib: dllname, importc.} +proc glMap1f*(target: TGLenum, u1, u2: TGLfloat, stride, order: TGLint, + points: PGLfloat){.dynlib: dllname, importc.} +proc glMap2d*(target: TGLenum, u1, u2: TGLdouble, ustride, uorder: TGLint, + v1, v2: TGLdouble, vstride, vorder: TGLint, points: PGLdouble){. + dynlib: dllname, importc.} +proc glMap2f*(target: TGLenum, u1, u2: TGLfloat, ustride, uorder: TGLint, + v1, v2: TGLfloat, vstride, vorder: TGLint, points: PGLfloat){. + dynlib: dllname, importc.} +proc glMapGrid1d*(un: TGLint, u1, u2: TGLdouble){.dynlib: dllname, importc.} +proc glMapGrid1f*(un: TGLint, u1, u2: TGLfloat){.dynlib: dllname, importc.} +proc glMapGrid2d*(un: TGLint, u1, u2: TGLdouble, vn: TGLint, v1, v2: TGLdouble){. + dynlib: dllname, importc.} +proc glMapGrid2f*(un: TGLint, u1, u2: TGLfloat, vn: TGLint, v1, v2: TGLfloat){. + dynlib: dllname, importc.} +proc glMaterialf*(face, pname: TGLenum, param: TGLfloat){.dynlib: dllname, importc.} +proc glMaterialfv*(face, pname: TGLenum, params: PGLfloat){.dynlib: dllname, + importc.} +proc glMateriali*(face, pname: TGLenum, param: TGLint){.dynlib: dllname, importc.} +proc glMaterialiv*(face, pname: TGLenum, params: PGLint){.dynlib: dllname, + importc.} +proc glMatrixMode*(mode: TGLenum){.dynlib: dllname, importc.} +proc glMultMatrixd*(m: PGLdouble){.dynlib: dllname, importc.} +proc glMultMatrixf*(m: PGLfloat){.dynlib: dllname, importc.} +proc glNewList*(list: TGLuint, mode: TGLenum){.dynlib: dllname, importc.} +proc glNormal3b*(nx, ny, nz: TGlbyte){.dynlib: dllname, importc.} +proc glNormal3bv*(v: PGLbyte){.dynlib: dllname, importc.} +proc glNormal3d*(nx, ny, nz: TGLdouble){.dynlib: dllname, importc.} +proc glNormal3dv*(v: PGLdouble){.dynlib: dllname, importc.} +proc glNormal3f*(nx, ny, nz: TGLfloat){.dynlib: dllname, importc.} +proc glNormal3fv*(v: PGLfloat){.dynlib: dllname, importc.} +proc glNormal3i*(nx, ny, nz: TGLint){.dynlib: dllname, importc.} +proc glNormal3iv*(v: PGLint){.dynlib: dllname, importc.} +proc glNormal3s*(nx, ny, nz: TGLshort){.dynlib: dllname, importc.} +proc glNormal3sv*(v: PGLshort){.dynlib: dllname, importc.} +proc glNormalPointer*(atype: TGLenum, stride: TGLsizei, pointer: Pointer){. + dynlib: dllname, importc.} +proc glOrtho*(left, right, bottom, top, zNear, zFar: TGLdouble){.dynlib: dllname, + importc.} +proc glPassThrough*(token: TGLfloat){.dynlib: dllname, importc.} +proc glPixelMapfv*(map: TGLenum, mapsize: TGLsizei, values: PGLfloat){. + dynlib: dllname, importc.} +proc glPixelMapuiv*(map: TGLenum, mapsize: TGLsizei, values: PGLuint){. + dynlib: dllname, importc.} +proc glPixelMapusv*(map: TGLenum, mapsize: TGLsizei, values: PGLushort){. + dynlib: dllname, importc.} +proc glPixelStoref*(pname: TGLenum, param: TGLfloat){.dynlib: dllname, importc.} +proc glPixelStorei*(pname: TGLenum, param: TGLint){.dynlib: dllname, importc.} +proc glPixelTransferf*(pname: TGLenum, param: TGLfloat){.dynlib: dllname, importc.} +proc glPixelTransferi*(pname: TGLenum, param: TGLint){.dynlib: dllname, importc.} +proc glPixelZoom*(xfactor, yfactor: TGLfloat){.dynlib: dllname, importc.} +proc glPointSize*(size: TGLfloat){.dynlib: dllname, importc.} +proc glPolygonMode*(face, mode: TGLenum){.dynlib: dllname, importc.} +proc glPolygonOffset*(factor, units: TGLfloat){.dynlib: dllname, importc.} +proc glPolygonStipple*(mask: PGLubyte){.dynlib: dllname, importc.} +proc glPopAttrib*(){.dynlib: dllname, importc.} +proc glPopClientAttrib*(){.dynlib: dllname, importc.} +proc glPopMatrix*(){.dynlib: dllname, importc.} +proc glPopName*(){.dynlib: dllname, importc.} +proc glPrioritizeTextures*(n: TGLsizei, textures: PGLuint, priorities: PGLclampf){. + dynlib: dllname, importc.} +proc glPushAttrib*(mask: TGLbitfield){.dynlib: dllname, importc.} +proc glPushClientAttrib*(mask: TGLbitfield){.dynlib: dllname, importc.} +proc glPushMatrix*(){.dynlib: dllname, importc.} +proc glPushName*(name: TGLuint){.dynlib: dllname, importc.} +proc glRasterPos2d*(x, y: TGLdouble){.dynlib: dllname, importc.} +proc glRasterPos2dv*(v: PGLdouble){.dynlib: dllname, importc.} +proc glRasterPos2f*(x, y: TGLfloat){.dynlib: dllname, importc.} +proc glRasterPos2fv*(v: PGLfloat){.dynlib: dllname, importc.} +proc glRasterPos2i*(x, y: TGLint){.dynlib: dllname, importc.} +proc glRasterPos2iv*(v: PGLint){.dynlib: dllname, importc.} +proc glRasterPos2s*(x, y: TGLshort){.dynlib: dllname, importc.} +proc glRasterPos2sv*(v: PGLshort){.dynlib: dllname, importc.} +proc glRasterPos3d*(x, y, z: TGLdouble){.dynlib: dllname, importc.} +proc glRasterPos3dv*(v: PGLdouble){.dynlib: dllname, importc.} +proc glRasterPos3f*(x, y, z: TGLfloat){.dynlib: dllname, importc.} +proc glRasterPos3fv*(v: PGLfloat){.dynlib: dllname, importc.} +proc glRasterPos3i*(x, y, z: TGLint){.dynlib: dllname, importc.} +proc glRasterPos3iv*(v: PGLint){.dynlib: dllname, importc.} +proc glRasterPos3s*(x, y, z: TGLshort){.dynlib: dllname, importc.} +proc glRasterPos3sv*(v: PGLshort){.dynlib: dllname, importc.} +proc glRasterPos4d*(x, y, z, w: TGLdouble){.dynlib: dllname, importc.} +proc glRasterPos4dv*(v: PGLdouble){.dynlib: dllname, importc.} +proc glRasterPos4f*(x, y, z, w: TGLfloat){.dynlib: dllname, importc.} +proc glRasterPos4fv*(v: PGLfloat){.dynlib: dllname, importc.} +proc glRasterPos4i*(x, y, z, w: TGLint){.dynlib: dllname, importc.} +proc glRasterPos4iv*(v: PGLint){.dynlib: dllname, importc.} +proc glRasterPos4s*(x, y, z, w: TGLshort){.dynlib: dllname, importc.} +proc glRasterPos4sv*(v: PGLshort){.dynlib: dllname, importc.} +proc glReadBuffer*(mode: TGLenum){.dynlib: dllname, importc.} +proc glReadPixels*(x, y: TGLint, width, height: TGLsizei, format, atype: TGLenum, + pixels: Pointer){.dynlib: dllname, importc.} +proc glRectd*(x1, y1, x2, y2: TGLdouble){.dynlib: dllname, importc.} +proc glRectdv*(v1: PGLdouble, v2: PGLdouble){.dynlib: dllname, importc.} +proc glRectf*(x1, y1, x2, y2: TGLfloat){.dynlib: dllname, importc.} +proc glRectfv*(v1: PGLfloat, v2: PGLfloat){.dynlib: dllname, importc.} +proc glRecti*(x1, y1, x2, y2: TGLint){.dynlib: dllname, importc.} +proc glRectiv*(v1: PGLint, v2: PGLint){.dynlib: dllname, importc.} +proc glRects*(x1, y1, x2, y2: TGLshort){.dynlib: dllname, importc.} +proc glRectsv*(v1: PGLshort, v2: PGLshort){.dynlib: dllname, importc.} +proc glRenderMode*(mode: TGLint): TGLint{.dynlib: dllname, importc.} +proc glRotated*(angle, x, y, z: TGLdouble){.dynlib: dllname, importc.} +proc glRotatef*(angle, x, y, z: TGLfloat){.dynlib: dllname, importc.} +proc glScaled*(x, y, z: TGLdouble){.dynlib: dllname, importc.} +proc glScalef*(x, y, z: TGLfloat){.dynlib: dllname, importc.} +proc glScissor*(x, y: TGLint, width, height: TGLsizei){.dynlib: dllname, importc.} +proc glSelectBuffer*(size: TGLsizei, buffer: PGLuint){.dynlib: dllname, importc.} +proc glShadeModel*(mode: TGLenum){.dynlib: dllname, importc.} +proc glStencilFunc*(func: TGLenum, theref: TGLint, mask: TGLuint){.dynlib: dllname, + importc.} +proc glStencilMask*(mask: TGLuint){.dynlib: dllname, importc.} +proc glStencilOp*(fail, zfail, zpass: TGLenum){.dynlib: dllname, importc.} +proc glTexCoord1d*(s: TGLdouble){.dynlib: dllname, importc.} +proc glTexCoord1dv*(v: PGLdouble){.dynlib: dllname, importc.} +proc glTexCoord1f*(s: TGLfloat){.dynlib: dllname, importc.} +proc glTexCoord1fv*(v: PGLfloat){.dynlib: dllname, importc.} +proc glTexCoord1i*(s: TGLint){.dynlib: dllname, importc.} +proc glTexCoord1iv*(v: PGLint){.dynlib: dllname, importc.} +proc glTexCoord1s*(s: TGLshort){.dynlib: dllname, importc.} +proc glTexCoord1sv*(v: PGLshort){.dynlib: dllname, importc.} +proc glTexCoord2d*(s, t: TGLdouble){.dynlib: dllname, importc.} +proc glTexCoord2dv*(v: PGLdouble){.dynlib: dllname, importc.} +proc glTexCoord2f*(s, t: TGLfloat){.dynlib: dllname, importc.} +proc glTexCoord2fv*(v: PGLfloat){.dynlib: dllname, importc.} +proc glTexCoord2i*(s, t: TGLint){.dynlib: dllname, importc.} +proc glTexCoord2iv*(v: PGLint){.dynlib: dllname, importc.} +proc glTexCoord2s*(s, t: TGLshort){.dynlib: dllname, importc.} +proc glTexCoord2sv*(v: PGLshort){.dynlib: dllname, importc.} +proc glTexCoord3d*(s, t, r: TGLdouble){.dynlib: dllname, importc.} +proc glTexCoord3dv*(v: PGLdouble){.dynlib: dllname, importc.} +proc glTexCoord3f*(s, t, r: TGLfloat){.dynlib: dllname, importc.} +proc glTexCoord3fv*(v: PGLfloat){.dynlib: dllname, importc.} +proc glTexCoord3i*(s, t, r: TGLint){.dynlib: dllname, importc.} +proc glTexCoord3iv*(v: PGLint){.dynlib: dllname, importc.} +proc glTexCoord3s*(s, t, r: TGLshort){.dynlib: dllname, importc.} +proc glTexCoord3sv*(v: PGLshort){.dynlib: dllname, importc.} +proc glTexCoord4d*(s, t, r, q: TGLdouble){.dynlib: dllname, importc.} +proc glTexCoord4dv*(v: PGLdouble){.dynlib: dllname, importc.} +proc glTexCoord4f*(s, t, r, q: TGLfloat){.dynlib: dllname, importc.} +proc glTexCoord4fv*(v: PGLfloat){.dynlib: dllname, importc.} +proc glTexCoord4i*(s, t, r, q: TGLint){.dynlib: dllname, importc.} +proc glTexCoord4iv*(v: PGLint){.dynlib: dllname, importc.} +proc glTexCoord4s*(s, t, r, q: TGLshort){.dynlib: dllname, importc.} +proc glTexCoord4sv*(v: PGLshort){.dynlib: dllname, importc.} +proc glTexCoordPointer*(size: TGLint, atype: TGLenum, stride: TGLsizei, + pointer: Pointer){.dynlib: dllname, importc.} +proc glTexEnvf*(target: TGLenum, pname: TGLenum, param: TGLfloat){.dynlib: dllname, + importc.} +proc glTexEnvfv*(target: TGLenum, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glTexEnvi*(target: TGLenum, pname: TGLenum, param: TGLint){.dynlib: dllname, + importc.} +proc glTexEnviv*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glTexGend*(coord: TGLenum, pname: TGLenum, param: TGLdouble){.dynlib: dllname, + importc.} +proc glTexGendv*(coord: TGLenum, pname: TGLenum, params: PGLdouble){. + dynlib: dllname, importc.} +proc glTexGenf*(coord: TGLenum, pname: TGLenum, param: TGLfloat){.dynlib: dllname, + importc.} +proc glTexGenfv*(coord: TGLenum, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glTexGeni*(coord: TGLenum, pname: TGLenum, param: TGLint){.dynlib: dllname, + importc.} +proc glTexGeniv*(coord: TGLenum, pname: TGLenum, params: PGLint){.dynlib: dllname, + importc.} +proc glTexImage1D*(target: TGLenum, level, internalformat: TGLint, width: TGLsizei, + border: TGLint, format, atype: TGLenum, pixels: Pointer){. + dynlib: dllname, importc.} +proc glTexImage2D*(target: TGLenum, level, internalformat: TGLint, + width, height: TGLsizei, border: TGLint, format, atype: TGLenum, + pixels: Pointer){.dynlib: dllname, importc.} +proc glTexParameterf*(target: TGLenum, pname: TGLenum, param: TGLfloat){. + dynlib: dllname, importc.} +proc glTexParameterfv*(target: TGLenum, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glTexParameteri*(target: TGLenum, pname: TGLenum, param: TGLint){. + dynlib: dllname, importc.} +proc glTexParameteriv*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glTexSubImage1D*(target: TGLenum, level, xoffset: TGLint, width: TGLsizei, + format, atype: TGLenum, pixels: Pointer){.dynlib: dllname, + importc.} +proc glTexSubImage2D*(target: TGLenum, level, xoffset, yoffset: TGLint, + width, height: TGLsizei, format, atype: TGLenum, + pixels: Pointer){.dynlib: dllname, importc.} +proc glTranslated*(x, y, z: TGLdouble){.dynlib: dllname, importc.} +proc glTranslatef*(x, y, z: TGLfloat){.dynlib: dllname, importc.} +proc glVertex2d*(x, y: TGLdouble){.dynlib: dllname, importc.} +proc glVertex2dv*(v: PGLdouble){.dynlib: dllname, importc.} +proc glVertex2f*(x, y: TGLfloat){.dynlib: dllname, importc.} +proc glVertex2fv*(v: PGLfloat){.dynlib: dllname, importc.} +proc glVertex2i*(x, y: TGLint){.dynlib: dllname, importc.} +proc glVertex2iv*(v: PGLint){.dynlib: dllname, importc.} +proc glVertex2s*(x, y: TGLshort){.dynlib: dllname, importc.} +proc glVertex2sv*(v: PGLshort){.dynlib: dllname, importc.} +proc glVertex3d*(x, y, z: TGLdouble){.dynlib: dllname, importc.} +proc glVertex3dv*(v: PGLdouble){.dynlib: dllname, importc.} +proc glVertex3f*(x, y, z: TGLfloat){.dynlib: dllname, importc.} +proc glVertex3fv*(v: PGLfloat){.dynlib: dllname, importc.} +proc glVertex3i*(x, y, z: TGLint){.dynlib: dllname, importc.} +proc glVertex3iv*(v: PGLint){.dynlib: dllname, importc.} +proc glVertex3s*(x, y, z: TGLshort){.dynlib: dllname, importc.} +proc glVertex3sv*(v: PGLshort){.dynlib: dllname, importc.} +proc glVertex4d*(x, y, z, w: TGLdouble){.dynlib: dllname, importc.} +proc glVertex4dv*(v: PGLdouble){.dynlib: dllname, importc.} +proc glVertex4f*(x, y, z, w: TGLfloat){.dynlib: dllname, importc.} +proc glVertex4fv*(v: PGLfloat){.dynlib: dllname, importc.} +proc glVertex4i*(x, y, z, w: TGLint){.dynlib: dllname, importc.} +proc glVertex4iv*(v: PGLint){.dynlib: dllname, importc.} +proc glVertex4s*(x, y, z, w: TGLshort){.dynlib: dllname, importc.} +proc glVertex4sv*(v: PGLshort){.dynlib: dllname, importc.} +proc glVertexPointer*(size: TGLint, atype: TGLenum, stride: TGLsizei, + pointer: Pointer){.dynlib: dllname, importc.} +proc glViewport*(x, y: TGLint, width, height: TGLsizei){.dynlib: dllname, importc.} +type + PFN_GLARRAY_ELEMENT_EXTPROC* = proc (i: TGLint) + PFN_GLDRAW_ARRAYS_EXTPROC* = proc (mode: TGLenum, first: TGLint, count: TGLsizei) + PFN_GLVERTEX_POINTER_EXTPROC* = proc (size: TGLint, atype: TGLenum, + stride, count: TGLsizei, pointer: Pointer) + PFN_GLNORMAL_POINTER_EXTPROC* = proc (atype: TGLenum, stride, count: TGLsizei, + pointer: Pointer) + PFN_GLCOLOR_POINTER_EXTPROC* = proc (size: TGLint, atype: TGLenum, + stride, count: TGLsizei, pointer: Pointer) + PFN_GLINDEX_POINTER_EXTPROC* = proc (atype: TGLenum, stride, count: TGLsizei, + pointer: Pointer) + PFN_GLTEXCOORD_POINTER_EXTPROC* = proc (size: TGLint, atype: TGLenum, + stride, count: TGLsizei, pointer: Pointer) + PFN_GLEDGEFLAG_POINTER_EXTPROC* = proc (stride, count: TGLsizei, + pointer: PGLboolean) + PFN_GLGET_POINTER_VEXT_PROC* = proc (pname: TGLenum, params: Pointer) + PFN_GLARRAY_ELEMENT_ARRAY_EXTPROC* = proc (mode: TGLenum, count: TGLsizei, + pi: Pointer) # WIN_swap_hint + PFN_GLADDSWAPHINT_RECT_WINPROC* = proc (x, y: TGLint, width, height: TGLsizei) + PFN_GLCOLOR_TABLE_EXTPROC* = proc (target, internalFormat: TGLenum, + width: TGLsizei, format, atype: TGLenum, + data: Pointer) + PFN_GLCOLOR_SUBTABLE_EXTPROC* = proc (target: TGLenum, start, count: TGLsizei, + format, atype: TGLenum, data: Pointer) + PFN_GLGETCOLOR_TABLE_EXTPROC* = proc (target, format, atype: TGLenum, + data: Pointer) + PFN_GLGETCOLOR_TABLE_PARAMETER_IVEXTPROC* = proc (target, pname: TGLenum, + params: PGLint) + PFN_GLGETCOLOR_TABLE_PARAMETER_FVEXTPROC* = proc (target, pname: TGLenum, + params: PGLfloat) + +{.pop.} + +# implementation diff --git a/lib/oldwrappers/opengl/glext.nim b/lib/oldwrappers/opengl/glext.nim new file mode 100644 index 000000000..0a2138584 --- /dev/null +++ b/lib/oldwrappers/opengl/glext.nim @@ -0,0 +1,4175 @@ +# +# +# Adaption of the delphi3d.net OpenGL units to FreePascal +# Sebastian Guenther (sg@freepascal.org) in 2002 +# These units are free to use +# +# + +#************************************************* +# * OpenGL extension loading library * +# * Generated by MetaGLext, written by Tom Nuydens * +# * (tom@delphi3d.net -- http://www.delphi3d.net * +# ************************************************* +#*** Generated on 10/11/2002 + +when defined(windows): + {.push callconv: stdcall.} +else: + {.push callconv: cdecl.} + +import + gl + +type + GLcharARB* = Char + TGLcharARB* = GLcharARB + PGLcharARB* = ptr GLcharARB + GLhandleARB* = int + TGLhandleARB* = GLhandleARB + PGLhandleARB* = ptr GLhandleARB + GLintptr* = int + TGLintptr* = GLintptr + PGLintptr* = ptr GLintptr + GLsizeiptr* = int + TGLsizeiptr* = GLsizeiptr + PGLsizeiptr* = ptr GLsizeiptr + GLchar* = Char + TGLchar* = GLchar + PGLchar* = cstring #***** GL_version_1_2 *****// + +const + GL_UNSIGNED_BYTE_3_3_2* = 0x00008032 + GL_UNSIGNED_SHORT_4_4_4_4* = 0x00008033 + GL_UNSIGNED_SHORT_5_5_5_1* = 0x00008034 + GL_UNSIGNED_INT_8_8_8_8* = 0x00008035 + GL_UNSIGNED_INT_10_10_10_2* = 0x00008036 + GL_RESCALE_NORMAL* = 0x0000803A + GL_UNSIGNED_BYTE_2_3_3_REV* = 0x00008362 + GL_UNSIGNED_SHORT_5_6_5* = 0x00008363 + GL_UNSIGNED_SHORT_5_6_5_REV* = 0x00008364 + GL_UNSIGNED_SHORT_4_4_4_4_REV* = 0x00008365 + GL_UNSIGNED_SHORT_1_5_5_5_REV* = 0x00008366 + GL_UNSIGNED_INT_8_8_8_8_REV* = 0x00008367 + GL_UNSIGNED_INT_2_10_10_10_REV* = 0x00008368 + GL_BGR* = 0x000080E0 + GL_BGRA* = 0x000080E1 + GL_MAX_ELEMENTS_VERTICES* = 0x000080E8 + GL_MAX_ELEMENTS_INDICES* = 0x000080E9 + GL_CLAMP_TO_EDGE* = 0x0000812F + GL_TEXTURE_MIN_LOD* = 0x0000813A + GL_TEXTURE_MAX_LOD* = 0x0000813B + GL_TEXTURE_BASE_LEVEL* = 0x0000813C + GL_TEXTURE_MAX_LEVEL* = 0x0000813D + GL_LIGHT_MODEL_COLOR_CONTROL* = 0x000081F8 + GL_SINGLE_COLOR* = 0x000081F9 + GL_SEPARATE_SPECULAR_COLOR* = 0x000081FA + GL_SMOOTH_POINT_SIZE_RANGE* = 0x00000B12 + GL_SMOOTH_POINT_SIZE_GRANULARITY* = 0x00000B13 + GL_SMOOTH_LINE_WIDTH_RANGE* = 0x00000B22 + GL_SMOOTH_LINE_WIDTH_GRANULARITY* = 0x00000B23 + GL_ALIASED_POINT_SIZE_RANGE* = 0x0000846D + GL_ALIASED_LINE_WIDTH_RANGE* = 0x0000846E + GL_PACK_SKIP_IMAGES* = 0x0000806B + GL_PACK_IMAGE_HEIGHT* = 0x0000806C + GL_UNPACK_SKIP_IMAGES* = 0x0000806D + GL_UNPACK_IMAGE_HEIGHT* = 0x0000806E + GL_TEXTURE_3D* = 0x0000806F + GL_PROXY_TEXTURE_3D* = 0x00008070 + GL_TEXTURE_DEPTH* = 0x00008071 + GL_TEXTURE_WRAP_R* = 0x00008072 + GL_MAX_3D_TEXTURE_SIZE* = 0x00008073 + +proc glBlendColor*(red: TGLclampf, green: TGLclampf, blue: TGLclampf, + alpha: TGLclampf){.dynlib: dllname, importc.} +proc glBlendEquation*(mode: TGLenum){.dynlib: dllname, importc.} +proc glDrawRangeElements*(mode: TGLenum, start: TGLuint, theend: TGLuint, + count: TGLsizei, thetype: TGLenum, indices: PGLvoid){. + dynlib: dllname, importc.} +proc glColorTable*(target: TGLenum, internalformat: TGLenum, width: TGLsizei, + format: TGLenum, thetype: TGLenum, table: PGLvoid){. + dynlib: dllname, importc.} +proc glColorTableParameterfv*(target: TGLenum, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glColorTableParameteriv*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glCopyColorTable*(target: TGLenum, internalformat: TGLenum, x: TGLint, + y: TGLint, width: TGLsizei){.dynlib: dllname, importc.} +proc glGetColorTable*(target: TGLenum, format: TGLenum, thetype: TGLenum, + table: PGLvoid){.dynlib: dllname, importc.} +proc glGetColorTableParameterfv*(target: TGLenum, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glGetColorTableParameteriv*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glColorSubTable*(target: TGLenum, start: TGLsizei, count: TGLsizei, + format: TGLenum, thetype: TGLenum, data: PGLvoid){. + dynlib: dllname, importc.} +proc glCopyColorSubTable*(target: TGLenum, start: TGLsizei, x: TGLint, y: TGLint, + width: TGLsizei){.dynlib: dllname, importc.} +proc glConvolutionFilter1D*(target: TGLenum, internalformat: TGLenum, + width: TGLsizei, format: TGLenum, thetype: TGLenum, + image: PGLvoid){.dynlib: dllname, importc.} +proc glConvolutionFilter2D*(target: TGLenum, internalformat: TGLenum, + width: TGLsizei, height: TGLsizei, format: TGLenum, + thetype: TGLenum, image: PGLvoid){.dynlib: dllname, + importc.} +proc glConvolutionParameterf*(target: TGLenum, pname: TGLenum, params: TGLfloat){. + dynlib: dllname, importc.} +proc glConvolutionParameterfv*(target: TGLenum, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glConvolutionParameteri*(target: TGLenum, pname: TGLenum, params: TGLint){. + dynlib: dllname, importc.} +proc glConvolutionParameteriv*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glCopyConvolutionFilter1D*(target: TGLenum, internalformat: TGLenum, + x: TGLint, y: TGLint, width: TGLsizei){. + dynlib: dllname, importc.} +proc glCopyConvolutionFilter2D*(target: TGLenum, internalformat: TGLenum, + x: TGLint, y: TGLint, width: TGLsizei, + height: TGLsizei){.dynlib: dllname, importc.} +proc glGetConvolutionFilter*(target: TGLenum, format: TGLenum, thetype: TGLenum, + image: PGLvoid){.dynlib: dllname, importc.} +proc glGetConvolutionParameterfv*(target: TGLenum, pname: TGLenum, + params: PGLfloat){.dynlib: dllname, importc.} +proc glGetConvolutionParameteriv*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetSeparableFilter*(target: TGLenum, format: TGLenum, thetype: TGLenum, + row: PGLvoid, column: PGLvoid, span: PGLvoid){. + dynlib: dllname, importc.} +proc glSeparableFilter2D*(target: TGLenum, internalformat: TGLenum, + width: TGLsizei, height: TGLsizei, format: TGLenum, + thetype: TGLenum, row: PGLvoid, column: PGLvoid){. + dynlib: dllname, importc.} +proc glGetHistogram*(target: TGLenum, reset: TGLboolean, format: TGLenum, + thetype: TGLenum, values: PGLvoid){.dynlib: dllname, importc.} +proc glGetHistogramParameterfv*(target: TGLenum, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glGetHistogramParameteriv*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetMinmax*(target: TGLenum, reset: TGLboolean, format: TGLenum, + thetype: TGLenum, values: PGLvoid){.dynlib: dllname, importc.} +proc glGetMinmaxParameterfv*(target: TGLenum, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glGetMinmaxParameteriv*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glHistogram*(target: TGLenum, width: TGLsizei, internalformat: TGLenum, + sink: TGLboolean){.dynlib: dllname, importc.} +proc glMinmax*(target: TGLenum, internalformat: TGLenum, sink: TGLboolean){. + dynlib: dllname, importc.} +proc glResetHistogram*(target: TGLenum){.dynlib: dllname, importc.} +proc glResetMinmax*(target: TGLenum){.dynlib: dllname, importc.} +proc glTexImage3D*(target: TGLenum, level: TGLint, internalformat: TGLint, + width: TGLsizei, height: TGLsizei, depth: TGLsizei, + border: TGLint, format: TGLenum, thetype: TGLenum, + pixels: PGLvoid){.dynlib: dllname, importc.} +proc glTexSubImage3D*(target: TGLenum, level: TGLint, xoffset: TGLint, + yoffset: TGLint, zoffset: TGLint, width: TGLsizei, + height: TGLsizei, depth: TGLsizei, format: TGLenum, + thetype: TGLenum, pixels: PGLvoid){.dynlib: dllname, + importc.} +proc glCopyTexSubImage3D*(target: TGLenum, level: TGLint, xoffset: TGLint, + yoffset: TGLint, zoffset: TGLint, x: TGLint, y: TGLint, + width: TGLsizei, height: TGLsizei){.dynlib: dllname, + importc.} + + +proc glActiveTextureARB*(texture: TGLenum){.dynlib: dllname, importc.} +proc glClientActiveTextureARB*(texture: TGLenum){.dynlib: dllname, importc.} +proc glMultiTexCoord1dARB*(target: TGLenum, s: TGLdouble){.dynlib: dllname, + importc.} +proc glMultiTexCoord1dvARB*(target: TGLenum, v: PGLdouble){.dynlib: dllname, + importc.} +proc glMultiTexCoord1fARB*(target: TGLenum, s: TGLfloat){.dynlib: dllname, importc.} +proc glMultiTexCoord1fvARB*(target: TGLenum, v: PGLfloat){.dynlib: dllname, + importc.} +proc glMultiTexCoord1iARB*(target: TGLenum, s: TGLint){.dynlib: dllname, importc.} +proc glMultiTexCoord1ivARB*(target: TGLenum, v: PGLint){.dynlib: dllname, importc.} +proc glMultiTexCoord1sARB*(target: TGLenum, s: TGLshort){.dynlib: dllname, importc.} +proc glMultiTexCoord1svARB*(target: TGLenum, v: PGLshort){.dynlib: dllname, + importc.} +proc glMultiTexCoord2dARB*(target: TGLenum, s: TGLdouble, t: TGLdouble){. + dynlib: dllname, importc.} +proc glMultiTexCoord2dvARB*(target: TGLenum, v: PGLdouble){.dynlib: dllname, + importc.} +proc glMultiTexCoord2fARB*(target: TGLenum, s: TGLfloat, t: TGLfloat){. + dynlib: dllname, importc.} +proc glMultiTexCoord2fvARB*(target: TGLenum, v: PGLfloat){.dynlib: dllname, + importc.} +proc glMultiTexCoord2iARB*(target: TGLenum, s: TGLint, t: TGLint){.dynlib: dllname, + importc.} +proc glMultiTexCoord2ivARB*(target: TGLenum, v: PGLint){.dynlib: dllname, importc.} +proc glMultiTexCoord2sARB*(target: TGLenum, s: TGLshort, t: TGLshort){. + dynlib: dllname, importc.} +proc glMultiTexCoord2svARB*(target: TGLenum, v: PGLshort){.dynlib: dllname, + importc.} +proc glMultiTexCoord3dARB*(target: TGLenum, s: TGLdouble, t: TGLdouble, r: TGLdouble){. + dynlib: dllname, importc.} +proc glMultiTexCoord3dvARB*(target: TGLenum, v: PGLdouble){.dynlib: dllname, + importc.} +proc glMultiTexCoord3fARB*(target: TGLenum, s: TGLfloat, t: TGLfloat, r: TGLfloat){. + dynlib: dllname, importc.} +proc glMultiTexCoord3fvARB*(target: TGLenum, v: PGLfloat){.dynlib: dllname, + importc.} +proc glMultiTexCoord3iARB*(target: TGLenum, s: TGLint, t: TGLint, r: TGLint){. + dynlib: dllname, importc.} +proc glMultiTexCoord3ivARB*(target: TGLenum, v: PGLint){.dynlib: dllname, importc.} +proc glMultiTexCoord3sARB*(target: TGLenum, s: TGLshort, t: TGLshort, r: TGLshort){. + dynlib: dllname, importc.} +proc glMultiTexCoord3svARB*(target: TGLenum, v: PGLshort){.dynlib: dllname, + importc.} +proc glMultiTexCoord4dARB*(target: TGLenum, s: TGLdouble, t: TGLdouble, + r: TGLdouble, q: TGLdouble){.dynlib: dllname, importc.} +proc glMultiTexCoord4dvARB*(target: TGLenum, v: PGLdouble){.dynlib: dllname, + importc.} +proc glMultiTexCoord4fARB*(target: TGLenum, s: TGLfloat, t: TGLfloat, r: TGLfloat, + q: TGLfloat){.dynlib: dllname, importc.} +proc glMultiTexCoord4fvARB*(target: TGLenum, v: PGLfloat){.dynlib: dllname, + importc.} +proc glMultiTexCoord4iARB*(target: TGLenum, s: TGLint, t: TGLint, r: TGLint, + q: TGLint){.dynlib: dllname, importc.} +proc glMultiTexCoord4ivARB*(target: TGLenum, v: PGLint){.dynlib: dllname, importc.} +proc glMultiTexCoord4sARB*(target: TGLenum, s: TGLshort, t: TGLshort, r: TGLshort, + q: TGLshort){.dynlib: dllname, importc.} +proc glMultiTexCoord4svARB*(target: TGLenum, v: PGLshort){.dynlib: dllname, + importc.} + +proc glSampleCoverageARB*(value: TGLclampf, invert: TGLboolean){.dynlib: dllname, + importc.} + #***** GL_ARB_texture_env_add *****// + + +proc glWeightbvARB*(size: TGLint, weights: PGLbyte){.dynlib: dllname, importc.} +proc glWeightsvARB*(size: TGLint, weights: PGLshort){.dynlib: dllname, importc.} +proc glWeightivARB*(size: TGLint, weights: PGLint){.dynlib: dllname, importc.} +proc glWeightfvARB*(size: TGLint, weights: PGLfloat){.dynlib: dllname, importc.} +proc glWeightdvARB*(size: TGLint, weights: PGLdouble){.dynlib: dllname, importc.} +proc glWeightvARB*(size: TGLint, weights: PGLdouble){.dynlib: dllname, importc.} +proc glWeightubvARB*(size: TGLint, weights: PGLubyte){.dynlib: dllname, importc.} +proc glWeightusvARB*(size: TGLint, weights: PGLushort){.dynlib: dllname, importc.} +proc glWeightuivARB*(size: TGLint, weights: PGLuint){.dynlib: dllname, importc.} +proc glWeightPointerARB*(size: TGLint, thetype: TGLenum, stride: TGLsizei, + pointer: PGLvoid){.dynlib: dllname, importc.} +proc glVertexBlendARB*(count: TGLint){.dynlib: dllname, importc.} + + + +proc glVertexAttrib1sARB*(index: TGLuint, x: TGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib1fARB*(index: TGLuint, x: TGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib1dARB*(index: TGLuint, x: TGLdouble){.dynlib: dllname, importc.} +proc glVertexAttrib2sARB*(index: TGLuint, x: TGLshort, y: TGLshort){. + dynlib: dllname, importc.} +proc glVertexAttrib2fARB*(index: TGLuint, x: TGLfloat, y: TGLfloat){. + dynlib: dllname, importc.} +proc glVertexAttrib2dARB*(index: TGLuint, x: TGLdouble, y: TGLdouble){. + dynlib: dllname, importc.} +proc glVertexAttrib3sARB*(index: TGLuint, x: TGLshort, y: TGLshort, z: TGLshort){. + dynlib: dllname, importc.} +proc glVertexAttrib3fARB*(index: TGLuint, x: TGLfloat, y: TGLfloat, z: TGLfloat){. + dynlib: dllname, importc.} +proc glVertexAttrib3dARB*(index: TGLuint, x: TGLdouble, y: TGLdouble, z: TGLdouble){. + dynlib: dllname, importc.} +proc glVertexAttrib4sARB*(index: TGLuint, x: TGLshort, y: TGLshort, z: TGLshort, + w: TGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib4fARB*(index: TGLuint, x: TGLfloat, y: TGLfloat, z: TGLfloat, + w: TGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib4dARB*(index: TGLuint, x: TGLdouble, y: TGLdouble, z: TGLdouble, + w: TGLdouble){.dynlib: dllname, importc.} +proc glVertexAttrib4NubARB*(index: TGLuint, x: TGLubyte, y: TGLubyte, z: TGLubyte, + w: TGLubyte){.dynlib: dllname, importc.} +proc glVertexAttrib1svARB*(index: TGLuint, v: PGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib1fvARB*(index: TGLuint, v: PGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib1dvARB*(index: TGLuint, v: PGLdouble){.dynlib: dllname, + importc.} +proc glVertexAttrib2svARB*(index: TGLuint, v: PGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib2fvARB*(index: TGLuint, v: PGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib2dvARB*(index: TGLuint, v: PGLdouble){.dynlib: dllname, + importc.} +proc glVertexAttrib3svARB*(index: TGLuint, v: PGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib3fvARB*(index: TGLuint, v: PGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib3dvARB*(index: TGLuint, v: PGLdouble){.dynlib: dllname, + importc.} +proc glVertexAttrib4bvARB*(index: TGLuint, v: PGLbyte){.dynlib: dllname, importc.} +proc glVertexAttrib4svARB*(index: TGLuint, v: PGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib4ivARB*(index: TGLuint, v: PGLint){.dynlib: dllname, importc.} +proc glVertexAttrib4ubvARB*(index: TGLuint, v: PGLubyte){.dynlib: dllname, + importc.} +proc glVertexAttrib4usvARB*(index: TGLuint, v: PGLushort){.dynlib: dllname, + importc.} +proc glVertexAttrib4uivARB*(index: TGLuint, v: PGLuint){.dynlib: dllname, importc.} +proc glVertexAttrib4fvARB*(index: TGLuint, v: PGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib4dvARB*(index: TGLuint, v: PGLdouble){.dynlib: dllname, + importc.} +proc glVertexAttrib4NbvARB*(index: TGLuint, v: PGLbyte){.dynlib: dllname, importc.} +proc glVertexAttrib4NsvARB*(index: TGLuint, v: PGLshort){.dynlib: dllname, + importc.} +proc glVertexAttrib4NivARB*(index: TGLuint, v: PGLint){.dynlib: dllname, importc.} +proc glVertexAttrib4NubvARB*(index: TGLuint, v: PGLubyte){.dynlib: dllname, + importc.} +proc glVertexAttrib4NusvARB*(index: TGLuint, v: PGLushort){.dynlib: dllname, + importc.} +proc glVertexAttrib4NuivARB*(index: TGLuint, v: PGLuint){.dynlib: dllname, + importc.} +proc glVertexAttribPointerARB*(index: TGLuint, size: TGLint, thetype: TGLenum, + normalized: TGLboolean, stride: TGLsizei, + pointer: PGLvoid){.dynlib: dllname, importc.} +proc glEnableVertexAttribArrayARB*(index: TGLuint){.dynlib: dllname, importc.} +proc glDisableVertexAttribArrayARB*(index: TGLuint){.dynlib: dllname, importc.} +proc glProgramStringARB*(target: TGLenum, format: TGLenum, length: TGLsizei, + str: PGLvoid){.dynlib: dllname, importc.} +proc glBindProgramARB*(target: TGLenum, theProgram: TGLuint){.dynlib: dllname, + importc.} +proc glDeleteProgramsARB*(n: TGLsizei, programs: PGLuint){.dynlib: dllname, + importc.} +proc glGenProgramsARB*(n: TGLsizei, programs: PGLuint){.dynlib: dllname, importc.} +proc glProgramEnvParameter4dARB*(target: TGLenum, index: TGLuint, x: TGLdouble, + y: TGLdouble, z: TGLdouble, w: TGLdouble){. + dynlib: dllname, importc.} +proc glProgramEnvParameter4dvARB*(target: TGLenum, index: TGLuint, + params: PGLdouble){.dynlib: dllname, importc.} +proc glProgramEnvParameter4fARB*(target: TGLenum, index: TGLuint, x: TGLfloat, + y: TGLfloat, z: TGLfloat, w: TGLfloat){. + dynlib: dllname, importc.} +proc glProgramEnvParameter4fvARB*(target: TGLenum, index: TGLuint, + params: PGLfloat){.dynlib: dllname, importc.} +proc glProgramLocalParameter4dARB*(target: TGLenum, index: TGLuint, x: TGLdouble, + y: TGLdouble, z: TGLdouble, w: TGLdouble){. + dynlib: dllname, importc.} +proc glProgramLocalParameter4dvARB*(target: TGLenum, index: TGLuint, + params: PGLdouble){.dynlib: dllname, importc.} +proc glProgramLocalParameter4fARB*(target: TGLenum, index: TGLuint, x: TGLfloat, + y: TGLfloat, z: TGLfloat, w: TGLfloat){. + dynlib: dllname, importc.} +proc glProgramLocalParameter4fvARB*(target: TGLenum, index: TGLuint, + params: PGLfloat){.dynlib: dllname, importc.} +proc glGetProgramEnvParameterdvARB*(target: TGLenum, index: TGLuint, + params: PGLdouble){.dynlib: dllname, importc.} +proc glGetProgramEnvParameterfvARB*(target: TGLenum, index: TGLuint, + params: PGLfloat){.dynlib: dllname, importc.} +proc glGetProgramLocalParameterdvARB*(target: TGLenum, index: TGLuint, + params: PGLdouble){.dynlib: dllname, + importc.} +proc glGetProgramLocalParameterfvARB*(target: TGLenum, index: TGLuint, + params: PGLfloat){.dynlib: dllname, + importc.} +proc glGetProgramivARB*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetProgramStringARB*(target: TGLenum, pname: TGLenum, str: PGLvoid){. + dynlib: dllname, importc.} +proc glGetVertexAttribdvARB*(index: TGLuint, pname: TGLenum, params: PGLdouble){. + dynlib: dllname, importc.} +proc glGetVertexAttribfvARB*(index: TGLuint, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glGetVertexAttribivARB*(index: TGLuint, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetVertexAttribPointervARB*(index: TGLuint, pname: TGLenum, + pointer: PGLvoid){.dynlib: dllname, importc.} +proc glIsProgramARB*(theProgram: TGLuint): TGLboolean{.dynlib: dllname, importc.} + #***** GL_ARB_window_pos *****// +proc glWindowPos2dARB*(x: TGLdouble, y: TGLdouble){.dynlib: dllname, importc.} +proc glWindowPos2fARB*(x: TGLfloat, y: TGLfloat){.dynlib: dllname, importc.} +proc glWindowPos2iARB*(x: TGLint, y: TGLint){.dynlib: dllname, importc.} +proc glWindowPos2sARB*(x: TGLshort, y: TGLshort){.dynlib: dllname, importc.} +proc glWindowPos2dvARB*(p: PGLdouble){.dynlib: dllname, importc.} +proc glWindowPos2fvARB*(p: PGLfloat){.dynlib: dllname, importc.} +proc glWindowPos2ivARB*(p: PGLint){.dynlib: dllname, importc.} +proc glWindowPos2svARB*(p: PGLshort){.dynlib: dllname, importc.} +proc glWindowPos3dARB*(x: TGLdouble, y: TGLdouble, z: TGLdouble){.dynlib: dllname, + importc.} +proc glWindowPos3fARB*(x: TGLfloat, y: TGLfloat, z: TGLfloat){.dynlib: dllname, + importc.} +proc glWindowPos3iARB*(x: TGLint, y: TGLint, z: TGLint){.dynlib: dllname, importc.} +proc glWindowPos3sARB*(x: TGLshort, y: TGLshort, z: TGLshort){.dynlib: dllname, + importc.} +proc glWindowPos3dvARB*(p: PGLdouble){.dynlib: dllname, importc.} +proc glWindowPos3fvARB*(p: PGLfloat){.dynlib: dllname, importc.} +proc glWindowPos3ivARB*(p: PGLint){.dynlib: dllname, importc.} +proc glWindowPos3svARB*(p: PGLshort){.dynlib: dllname, importc.} + + + +proc glBlendEquationSeparate*(modeRGB: TGLenum, modeAlpha: TGLenum){. + dynlib: dllname, importc.} +proc glDrawBuffers*(n: TGLsizei, bufs: PGLenum){.dynlib: dllname, importc.} +proc glStencilOpSeparate*(face: TGLenum, sfail: TGLenum, dpfail: TGLenum, + dppass: TGLenum){.dynlib: dllname, importc.} +proc glStencilFuncSeparate*(frontfunc: TGLenum, backfunc: TGLenum, theRef: TGLint, + mask: TGLuint){.dynlib: dllname, importc.} +proc glStencilMaskSeparate*(face: TGLenum, mask: TGLuint){.dynlib: dllname, + importc.} +proc glAttachShader*(theProgram: TGLuint, shader: TGLuint){.dynlib: dllname, + importc.} +proc glBindAttribLocation*(theProgram: TGLuint, index: TGLuint, name: PGLchar){. + dynlib: dllname, importc.} +proc glCompileShader*(shader: TGLuint){.dynlib: dllname, importc.} +proc glCreateProgram*(): TGLuint{.dynlib: dllname, importc.} +proc glCreateShader*(thetype: TGLenum): TGLuint{.dynlib: dllname, importc.} +proc glDeleteProgram*(theProgram: TGLuint){.dynlib: dllname, importc.} +proc glDeleteShader*(shader: TGLuint){.dynlib: dllname, importc.} +proc glDetachShader*(theProgram: TGLuint, shader: TGLuint){.dynlib: dllname, + importc.} +proc glDisableVertexAttribArray*(index: TGLuint){.dynlib: dllname, importc.} +proc glEnableVertexAttribArray*(index: TGLuint){.dynlib: dllname, importc.} +proc glGetActiveAttrib*(theProgram: TGLuint, index: TGLuint, bufSize: TGLsizei, + len: PGLsizei, size: PGLint, thetype: PGLenum, + name: PGLchar){.dynlib: dllname, importc.} +proc glGetActiveUniform*(theProgram: TGLuint, index: TGLuint, bufSize: TGLsizei, + len: PGLsizei, size: PGLint, thetype: PGLenum, + name: PGLchar){.dynlib: dllname, importc.} +proc glGetAttachedShaders*(theProgram: TGLuint, maxCount: TGLsizei, + count: PGLsizei, obj: PGLuint){.dynlib: dllname, + importc.} +proc glGetAttribLocation*(theProgram: TGLuint, name: PGLchar): TGLint{. + dynlib: dllname, importc.} +proc glGetProgramiv*(theProgram: TGLuint, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetProgramInfoLog*(theProgram: TGLuint, bufSize: TGLsizei, len: PGLsizei, + infoLog: PGLchar){.dynlib: dllname, importc.} +proc glGetShaderiv*(shader: TGLuint, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetShaderInfoLog*(shader: TGLuint, bufSize: TGLsizei, len: PGLsizei, + infoLog: PGLchar){.dynlib: dllname, importc.} +proc glGetShaderSource*(shader: TGLuint, bufSize: TGLsizei, len: PGLsizei, + source: PGLchar){.dynlib: dllname, importc.} +proc glGetUniformLocation*(theProgram: TGLuint, name: PGLchar): TGLint{. + dynlib: dllname, importc.} +proc glGetUniformfv*(theProgram: TGLuint, location: TGLint, params: PGLfloat){. + dynlib: dllname, importc.} +proc glGetUniformiv*(theProgram: TGLuint, location: TGLint, params: PGLint){. + dynlib: dllname, importc.} +proc glGetVertexAttribdv*(index: TGLuint, pname: TGLenum, params: PGLdouble){. + dynlib: dllname, importc.} +proc glGetVertexAttribfv*(index: TGLuint, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glGetVertexAttribiv*(index: TGLuint, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetVertexAttribPointerv*(index: TGLuint, pname: TGLenum, pointer: PGLvoid){. + dynlib: dllname, importc.} +proc glIsProgram*(theProgram: TGLuint): TGLboolean{.dynlib: dllname, importc.} +proc glIsShader*(shader: TGLuint): TGLboolean{.dynlib: dllname, importc.} +proc glLinkProgram*(theProgram: TGLuint){.dynlib: dllname, importc.} +proc glShaderSource*(shader: TGLuint, count: TGLsizei, str: PGLchar, len: PGLint){. + dynlib: dllname, importc.} +proc glUseProgram*(theProgram: TGLuint){.dynlib: dllname, importc.} +proc glUniform1f*(location: TGLint, v0: TGLfloat){.dynlib: dllname, importc.} +proc glUniform2f*(location: TGLint, v0: TGLfloat, v1: TGLfloat){.dynlib: dllname, + importc.} +proc glUniform3f*(location: TGLint, v0: TGLfloat, v1: TGLfloat, v2: TGLfloat){. + dynlib: dllname, importc.} +proc glUniform4f*(location: TGLint, v0: TGLfloat, v1: TGLfloat, v2: TGLfloat, + v3: TGLfloat){.dynlib: dllname, importc.} +proc glUniform1i*(location: TGLint, v0: TGLint){.dynlib: dllname, importc.} +proc glUniform2i*(location: TGLint, v0: TGLint, v1: TGLint){.dynlib: dllname, + importc.} +proc glUniform3i*(location: TGLint, v0: TGLint, v1: TGLint, v2: TGLint){. + dynlib: dllname, importc.} +proc glUniform4i*(location: TGLint, v0: TGLint, v1: TGLint, v2: TGLint, v3: TGLint){. + dynlib: dllname, importc.} +proc glUniform1fv*(location: TGLint, count: TGLsizei, value: PGLfloat){. + dynlib: dllname, importc.} +proc glUniform2fv*(location: TGLint, count: TGLsizei, value: PGLfloat){. + dynlib: dllname, importc.} +proc glUniform3fv*(location: TGLint, count: TGLsizei, value: PGLfloat){. + dynlib: dllname, importc.} +proc glUniform4fv*(location: TGLint, count: TGLsizei, value: PGLfloat){. + dynlib: dllname, importc.} +proc glUniform1iv*(location: TGLint, count: TGLsizei, value: PGLint){. + dynlib: dllname, importc.} +proc glUniform2iv*(location: TGLint, count: TGLsizei, value: PGLint){. + dynlib: dllname, importc.} +proc glUniform3iv*(location: TGLint, count: TGLsizei, value: PGLint){. + dynlib: dllname, importc.} +proc glUniform4iv*(location: TGLint, count: TGLsizei, value: PGLint){. + dynlib: dllname, importc.} +proc glUniformMatrix2fv*(location: TGLint, count: TGLsizei, transpose: TGLboolean, + value: PGLfloat){.dynlib: dllname, importc.} +proc glUniformMatrix3fv*(location: TGLint, count: TGLsizei, transpose: TGLboolean, + value: PGLfloat){.dynlib: dllname, importc.} +proc glUniformMatrix4fv*(location: TGLint, count: TGLsizei, transpose: TGLboolean, + value: PGLfloat){.dynlib: dllname, importc.} +proc glValidateProgram*(theProgram: TGLuint){.dynlib: dllname, importc.} +proc glVertexAttrib1d*(index: TGLuint, x: TGLdouble){.dynlib: dllname, importc.} +proc glVertexAttrib1dv*(index: TGLuint, v: PGLdouble){.dynlib: dllname, importc.} +proc glVertexAttrib1f*(index: TGLuint, x: TGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib1fv*(index: TGLuint, v: PGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib1s*(index: TGLuint, x: TGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib1sv*(index: TGLuint, v: PGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib2d*(index: TGLuint, x: TGLdouble, y: TGLdouble){. + dynlib: dllname, importc.} +proc glVertexAttrib2dv*(index: TGLuint, v: PGLdouble){.dynlib: dllname, importc.} +proc glVertexAttrib2f*(index: TGLuint, x: TGLfloat, y: TGLfloat){.dynlib: dllname, + importc.} +proc glVertexAttrib2fv*(index: TGLuint, v: PGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib2s*(index: TGLuint, x: TGLshort, y: TGLshort){.dynlib: dllname, + importc.} +proc glVertexAttrib2sv*(index: TGLuint, v: PGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib3d*(index: TGLuint, x: TGLdouble, y: TGLdouble, z: TGLdouble){. + dynlib: dllname, importc.} +proc glVertexAttrib3dv*(index: TGLuint, v: PGLdouble){.dynlib: dllname, importc.} +proc glVertexAttrib3f*(index: TGLuint, x: TGLfloat, y: TGLfloat, z: TGLfloat){. + dynlib: dllname, importc.} +proc glVertexAttrib3fv*(index: TGLuint, v: PGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib3s*(index: TGLuint, x: TGLshort, y: TGLshort, z: TGLshort){. + dynlib: dllname, importc.} +proc glVertexAttrib3sv*(index: TGLuint, v: PGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib4Nbv*(index: TGLuint, v: PGLbyte){.dynlib: dllname, importc.} +proc glVertexAttrib4Niv*(index: TGLuint, v: PGLint){.dynlib: dllname, importc.} +proc glVertexAttrib4Nsv*(index: TGLuint, v: PGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib4Nub*(index: TGLuint, x: TGLubyte, y: TGLubyte, z: TGLubyte, + w: TGLubyte){.dynlib: dllname, importc.} +proc glVertexAttrib4Nubv*(index: TGLuint, v: PGLubyte){.dynlib: dllname, importc.} +proc glVertexAttrib4Nuiv*(index: TGLuint, v: PGLuint){.dynlib: dllname, importc.} +proc glVertexAttrib4Nusv*(index: TGLuint, v: PGLushort){.dynlib: dllname, importc.} +proc glVertexAttrib4bv*(index: TGLuint, v: PGLbyte){.dynlib: dllname, importc.} +proc glVertexAttrib4d*(index: TGLuint, x: TGLdouble, y: TGLdouble, z: TGLdouble, + w: TGLdouble){.dynlib: dllname, importc.} +proc glVertexAttrib4dv*(index: TGLuint, v: PGLdouble){.dynlib: dllname, importc.} +proc glVertexAttrib4f*(index: TGLuint, x: TGLfloat, y: TGLfloat, z: TGLfloat, + w: TGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib4fv*(index: TGLuint, v: PGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib4iv*(index: TGLuint, v: PGLint){.dynlib: dllname, importc.} +proc glVertexAttrib4s*(index: TGLuint, x: TGLshort, y: TGLshort, z: TGLshort, + w: TGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib4sv*(index: TGLuint, v: PGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib4ubv*(index: TGLuint, v: PGLubyte){.dynlib: dllname, importc.} +proc glVertexAttrib4uiv*(index: TGLuint, v: PGLuint){.dynlib: dllname, importc.} +proc glVertexAttrib4usv*(index: TGLuint, v: PGLushort){.dynlib: dllname, importc.} +proc glVertexAttribPointer*(index: TGLuint, size: TGLint, thetype: TGLenum, + normalized: TGLboolean, stride: TGLsizei, + pointer: PGLvoid){.dynlib: dllname, importc.} + +const + GL_CONSTANT_COLOR* = 0x00008001 + GL_ONE_MINUS_CONSTANT_COLOR* = 0x00008002 + GL_CONSTANT_ALPHA* = 0x00008003 + GL_ONE_MINUS_CONSTANT_ALPHA* = 0x00008004 + constGL_BLEND_COLOR* = 0x00008005 + GL_FUNC_ADD* = 0x00008006 + GL_MIN* = 0x00008007 + GL_MAX* = 0x00008008 + constGL_BLEND_EQUATION* = 0x00008009 + GL_FUNC_SUBTRACT* = 0x0000800A + GL_FUNC_REVERSE_SUBTRACT* = 0x0000800B + GL_CONVOLUTION_1D* = 0x00008010 + GL_CONVOLUTION_2D* = 0x00008011 + GL_SEPARABLE_2D* = 0x00008012 + GL_CONVOLUTION_BORDER_MODE* = 0x00008013 + GL_CONVOLUTION_FILTER_SCALE* = 0x00008014 + GL_CONVOLUTION_FILTER_BIAS* = 0x00008015 + GL_REDUCE* = 0x00008016 + GL_CONVOLUTION_FORMAT* = 0x00008017 + GL_CONVOLUTION_WIDTH* = 0x00008018 + GL_CONVOLUTION_HEIGHT* = 0x00008019 + GL_MAX_CONVOLUTION_WIDTH* = 0x0000801A + GL_MAX_CONVOLUTION_HEIGHT* = 0x0000801B + GL_POST_CONVOLUTION_RED_SCALE* = 0x0000801C + GL_POST_CONVOLUTION_GREEN_SCALE* = 0x0000801D + GL_POST_CONVOLUTION_BLUE_SCALE* = 0x0000801E + GL_POST_CONVOLUTION_ALPHA_SCALE* = 0x0000801F + GL_POST_CONVOLUTION_RED_BIAS* = 0x00008020 + GL_POST_CONVOLUTION_GREEN_BIAS* = 0x00008021 + GL_POST_CONVOLUTION_BLUE_BIAS* = 0x00008022 + GL_POST_CONVOLUTION_ALPHA_BIAS* = 0x00008023 + constGL_HISTOGRAM* = 0x00008024 + GL_PROXY_HISTOGRAM* = 0x00008025 + GL_HISTOGRAM_WIDTH* = 0x00008026 + GL_HISTOGRAM_FORMAT* = 0x00008027 + GL_HISTOGRAM_RED_SIZE* = 0x00008028 + GL_HISTOGRAM_GREEN_SIZE* = 0x00008029 + GL_HISTOGRAM_BLUE_SIZE* = 0x0000802A + GL_HISTOGRAM_ALPHA_SIZE* = 0x0000802B + GL_HISTOGRAM_LUMINANCE_SIZE* = 0x0000802C + GL_HISTOGRAM_SINK* = 0x0000802D + constGL_MINMAX* = 0x0000802E + GL_MINMAX_FORMAT* = 0x0000802F + GL_MINMAX_SINK* = 0x00008030 + GL_TABLE_TOO_LARGE* = 0x00008031 + GL_COLOR_MATRIX* = 0x000080B1 + GL_COLOR_MATRIX_STACK_DEPTH* = 0x000080B2 + GL_MAX_COLOR_MATRIX_STACK_DEPTH* = 0x000080B3 + GL_POST_COLOR_MATRIX_RED_SCALE* = 0x000080B4 + GL_POST_COLOR_MATRIX_GREEN_SCALE* = 0x000080B5 + GL_POST_COLOR_MATRIX_BLUE_SCALE* = 0x000080B6 + GL_POST_COLOR_MATRIX_ALPHA_SCALE* = 0x000080B7 + GL_POST_COLOR_MATRIX_RED_BIAS* = 0x000080B8 + GL_POST_COLOR_MATRIX_GREEN_BIAS* = 0x000080B9 + GL_POST_COLOR_MATRIX_BLUE_BIAS* = 0x000080BA + GL_POST_COLOR_MATIX_ALPHA_BIAS* = 0x000080BB + constGL_COLOR_TABLE* = 0x000080D0 + GL_POST_CONVOLUTION_COLOR_TABLE* = 0x000080D1 + GL_POST_COLOR_MATRIX_COLOR_TABLE* = 0x000080D2 + GL_PROXY_COLOR_TABLE* = 0x000080D3 + GL_PROXY_POST_CONVOLUTION_COLOR_TABLE* = 0x000080D4 + GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE* = 0x000080D5 + GL_COLOR_TABLE_SCALE* = 0x000080D6 + GL_COLOR_TABLE_BIAS* = 0x000080D7 + GL_COLOR_TABLE_FORMAT* = 0x000080D8 + GL_COLOR_TABLE_WIDTH* = 0x000080D9 + GL_COLOR_TABLE_RED_SIZE* = 0x000080DA + GL_COLOR_TABLE_GREEN_SIZE* = 0x000080DB + GL_COLOR_TABLE_BLUE_SIZE* = 0x000080DC + GL_COLOR_TABLE_ALPHA_SIZE* = 0x000080DD + GL_COLOR_TABLE_LUMINANCE_SIZE* = 0x000080DE + GL_COLOR_TABLE_INTENSITY_SIZE* = 0x000080DF + GL_IGNORE_BORDER* = 0x00008150 + GL_CONSTANT_BORDER* = 0x00008151 + GL_WRAP_BORDER* = 0x00008152 + GL_REPLICATE_BORDER* = 0x00008153 + GL_CONVOLUTION_BORDER_COLOR* = 0x00008154 + +proc glActiveTexture*(texture: TGLenum){.dynlib: dllname, importc.} +proc glClientActiveTexture*(texture: TGLenum){.dynlib: dllname, importc.} +proc glMultiTexCoord1d*(target: TGLenum, s: TGLdouble){.dynlib: dllname, importc.} +proc glMultiTexCoord1dv*(target: TGLenum, v: PGLdouble){.dynlib: dllname, importc.} +proc glMultiTexCoord1f*(target: TGLenum, s: TGLfloat){.dynlib: dllname, importc.} +proc glMultiTexCoord1fv*(target: TGLenum, v: PGLfloat){.dynlib: dllname, importc.} +proc glMultiTexCoord1i*(target: TGLenum, s: TGLint){.dynlib: dllname, importc.} +proc glMultiTexCoord1iv*(target: TGLenum, v: PGLint){.dynlib: dllname, importc.} +proc glMultiTexCoord1s*(target: TGLenum, s: TGLshort){.dynlib: dllname, importc.} +proc glMultiTexCoord1sv*(target: TGLenum, v: PGLshort){.dynlib: dllname, importc.} +proc glMultiTexCoord2d*(target: TGLenum, s: TGLdouble, t: TGLdouble){. + dynlib: dllname, importc.} +proc glMultiTexCoord2dv*(target: TGLenum, v: PGLdouble){.dynlib: dllname, importc.} +proc glMultiTexCoord2f*(target: TGLenum, s: TGLfloat, t: TGLfloat){. + dynlib: dllname, importc.} +proc glMultiTexCoord2fv*(target: TGLenum, v: PGLfloat){.dynlib: dllname, importc.} +proc glMultiTexCoord2i*(target: TGLenum, s: TGLint, t: TGLint){.dynlib: dllname, + importc.} +proc glMultiTexCoord2iv*(target: TGLenum, v: PGLint){.dynlib: dllname, importc.} +proc glMultiTexCoord2s*(target: TGLenum, s: TGLshort, t: TGLshort){. + dynlib: dllname, importc.} +proc glMultiTexCoord2sv*(target: TGLenum, v: PGLshort){.dynlib: dllname, importc.} +proc glMultiTexCoord3d*(target: TGLenum, s: TGLdouble, t: TGLdouble, r: TGLdouble){. + dynlib: dllname, importc.} +proc glMultiTexCoord3dv*(target: TGLenum, v: PGLdouble){.dynlib: dllname, importc.} +proc glMultiTexCoord3f*(target: TGLenum, s: TGLfloat, t: TGLfloat, r: TGLfloat){. + dynlib: dllname, importc.} +proc glMultiTexCoord3fv*(target: TGLenum, v: PGLfloat){.dynlib: dllname, importc.} +proc glMultiTexCoord3i*(target: TGLenum, s: TGLint, t: TGLint, r: TGLint){. + dynlib: dllname, importc.} +proc glMultiTexCoord3iv*(target: TGLenum, v: PGLint){.dynlib: dllname, importc.} +proc glMultiTexCoord3s*(target: TGLenum, s: TGLshort, t: TGLshort, r: TGLshort){. + dynlib: dllname, importc.} +proc glMultiTexCoord3sv*(target: TGLenum, v: PGLshort){.dynlib: dllname, importc.} +proc glMultiTexCoord4d*(target: TGLenum, s: TGLdouble, t: TGLdouble, r: TGLdouble, + q: TGLdouble){.dynlib: dllname, importc.} +proc glMultiTexCoord4dv*(target: TGLenum, v: PGLdouble){.dynlib: dllname, importc.} +proc glMultiTexCoord4f*(target: TGLenum, s: TGLfloat, t: TGLfloat, r: TGLfloat, + q: TGLfloat){.dynlib: dllname, importc.} +proc glMultiTexCoord4fv*(target: TGLenum, v: PGLfloat){.dynlib: dllname, importc.} +proc glMultiTexCoord4i*(target: TGLenum, s: TGLint, t: TGLint, r: TGLint, q: TGLint){. + dynlib: dllname, importc.} +proc glMultiTexCoord4iv*(target: TGLenum, v: PGLint){.dynlib: dllname, importc.} +proc glMultiTexCoord4s*(target: TGLenum, s: TGLshort, t: TGLshort, r: TGLshort, + q: TGLshort){.dynlib: dllname, importc.} +proc glMultiTexCoord4sv*(target: TGLenum, v: PGLshort){.dynlib: dllname, importc.} +proc glLoadTransposeMatrixf*(m: PGLfloat){.dynlib: dllname, importc.} +proc glLoadTransposeMatrixd*(m: PGLdouble){.dynlib: dllname, importc.} +proc glMultTransposeMatrixf*(m: PGLfloat){.dynlib: dllname, importc.} +proc glMultTransposeMatrixd*(m: PGLdouble){.dynlib: dllname, importc.} +proc glSampleCoverage*(value: TGLclampf, invert: TGLboolean){.dynlib: dllname, + importc.} +proc glCompressedTexImage3D*(target: TGLenum, level: TGLint, + internalformat: TGLenum, width: TGLsizei, + height: TGLsizei, depth: TGLsizei, border: TGLint, + imageSize: TGLsizei, data: PGLvoid){. + dynlib: dllname, importc.} +proc glCompressedTexImage2D*(target: TGLenum, level: TGLint, + internalformat: TGLenum, width: TGLsizei, + height: TGLsizei, border: TGLint, imageSize: TGLsizei, + data: PGLvoid){.dynlib: dllname, importc.} +proc glCompressedTexImage1D*(target: TGLenum, level: TGLint, + internalformat: TGLenum, width: TGLsizei, + border: TGLint, imageSize: TGLsizei, data: PGLvoid){. + dynlib: dllname, importc.} +proc glCompressedTexSubImage3D*(target: TGLenum, level: TGLint, xoffset: TGLint, + yoffset: TGLint, zoffset: TGLint, width: TGLsizei, + height: TGLsizei, depth: TGLsizei, format: TGLenum, + imageSize: TGLsizei, data: PGLvoid){. + dynlib: dllname, importc.} +proc glCompressedTexSubImage2D*(target: TGLenum, level: TGLint, xoffset: TGLint, + yoffset: TGLint, width: TGLsizei, height: TGLsizei, + format: TGLenum, imageSize: TGLsizei, + data: PGLvoid){.dynlib: dllname, importc.} +proc glCompressedTexSubImage1D*(target: TGLenum, level: TGLint, xoffset: TGLint, + width: TGLsizei, format: TGLenum, + imageSize: TGLsizei, data: PGLvoid){. + dynlib: dllname, importc.} +proc glGetCompressedTexImage*(target: TGLenum, level: TGLint, img: PGLvoid){. + dynlib: dllname, importc.} + + #***** GL_version_1_3 *****// +const + GL_TEXTURE0* = 0x000084C0 + GL_TEXTURE1* = 0x000084C1 + GL_TEXTURE2* = 0x000084C2 + GL_TEXTURE3* = 0x000084C3 + GL_TEXTURE4* = 0x000084C4 + GL_TEXTURE5* = 0x000084C5 + GL_TEXTURE6* = 0x000084C6 + GL_TEXTURE7* = 0x000084C7 + GL_TEXTURE8* = 0x000084C8 + GL_TEXTURE9* = 0x000084C9 + GL_TEXTURE10* = 0x000084CA + GL_TEXTURE11* = 0x000084CB + GL_TEXTURE12* = 0x000084CC + GL_TEXTURE13* = 0x000084CD + GL_TEXTURE14* = 0x000084CE + GL_TEXTURE15* = 0x000084CF + GL_TEXTURE16* = 0x000084D0 + GL_TEXTURE17* = 0x000084D1 + GL_TEXTURE18* = 0x000084D2 + GL_TEXTURE19* = 0x000084D3 + GL_TEXTURE20* = 0x000084D4 + GL_TEXTURE21* = 0x000084D5 + GL_TEXTURE22* = 0x000084D6 + GL_TEXTURE23* = 0x000084D7 + GL_TEXTURE24* = 0x000084D8 + GL_TEXTURE25* = 0x000084D9 + GL_TEXTURE26* = 0x000084DA + GL_TEXTURE27* = 0x000084DB + GL_TEXTURE28* = 0x000084DC + GL_TEXTURE29* = 0x000084DD + GL_TEXTURE30* = 0x000084DE + GL_TEXTURE31* = 0x000084DF + constGL_ACTIVE_TEXTURE* = 0x000084E0 + constGL_CLIENT_ACTIVE_TEXTURE* = 0x000084E1 + GL_MAX_TEXTURE_UNITS* = 0x000084E2 + GL_TRANSPOSE_MODELVIEW_MATRIX* = 0x000084E3 + GL_TRANSPOSE_PROJECTION_MATRIX* = 0x000084E4 + GL_TRANSPOSE_TEXTURE_MATRIX* = 0x000084E5 + GL_TRANSPOSE_COLOR_MATRIX* = 0x000084E6 + GL_MULTISAMPLE* = 0x0000809D + GL_SAMPLE_ALPHA_TO_COVERAGE* = 0x0000809E + GL_SAMPLE_ALPHA_TO_ONE* = 0x0000809F + constGL_SAMPLE_COVERAGE* = 0x000080A0 + GL_SAMPLE_BUFFERS* = 0x000080A8 + GL_SAMPLES* = 0x000080A9 + GL_SAMPLE_COVERAGE_VALUE* = 0x000080AA + GL_SAMPLE_COVERAGE_INVERT* = 0x000080AB + GL_MULTISAMPLE_BIT* = 0x20000000 + GL_NORMAL_MAP* = 0x00008511 + GL_REFLECTION_MAP* = 0x00008512 + GL_TEXTURE_CUBE_MAP* = 0x00008513 + GL_TEXTURE_BINDING_CUBE_MAP* = 0x00008514 + GL_TEXTURE_CUBE_MAP_POSITIVE_X* = 0x00008515 + GL_TEXTURE_CUBE_MAP_NEGATIVE_X* = 0x00008516 + GL_TEXTURE_CUBE_MAP_POSITIVE_Y* = 0x00008517 + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y* = 0x00008518 + GL_TEXTURE_CUBE_MAP_POSITIVE_Z* = 0x00008519 + GL_TEXTURE_CUBE_MAP_NEGATIVE_Z* = 0x0000851A + GL_PROXY_TEXTURE_CUBE_MAP* = 0x0000851B + GL_MAX_CUBE_MAP_TEXTURE_SIZE* = 0x0000851C + GL_COMPRESSED_ALPHA* = 0x000084E9 + GL_COMPRESSED_LUMINANCE* = 0x000084EA + GL_COMPRESSED_LUMINANCE_ALPHA* = 0x000084EB + GL_COMPRESSED_INTENSITY* = 0x000084EC + GL_COMPRESSED_RGB* = 0x000084ED + GL_COMPRESSED_RGBA* = 0x000084EE + GL_TEXTURE_COMPRESSION_HINT* = 0x000084EF + GL_TEXTURE_COMPRESSED_IMAGE_SIZE* = 0x000086A0 + GL_TEXTURE_COMPRESSED* = 0x000086A1 + GL_NUM_COMPRESSED_TEXTURE_FORMATS* = 0x000086A2 + GL_COMPRESSED_TEXTURE_FORMATS* = 0x000086A3 + GL_CLAMP_TO_BORDER* = 0x0000812D + GL_CLAMP_TO_BORDER_SGIS* = 0x0000812D + GL_COMBINE* = 0x00008570 + GL_COMBINE_RGB* = 0x00008571 + GL_COMBINE_ALPHA* = 0x00008572 + GL_SOURCE0_RGB* = 0x00008580 + GL_SOURCE1_RGB* = 0x00008581 + GL_SOURCE2_RGB* = 0x00008582 + GL_SOURCE0_ALPHA* = 0x00008588 + GL_SOURCE1_ALPHA* = 0x00008589 + GL_SOURCE2_ALPHA* = 0x0000858A + GL_OPERAND0_RGB* = 0x00008590 + GL_OPERAND1_RGB* = 0x00008591 + GL_OPERAND2_RGB* = 0x00008592 + GL_OPERAND0_ALPHA* = 0x00008598 + GL_OPERAND1_ALPHA* = 0x00008599 + GL_OPERAND2_ALPHA* = 0x0000859A + GL_RGB_SCALE* = 0x00008573 + GL_ADD_SIGNED* = 0x00008574 + GL_INTERPOLATE* = 0x00008575 + GL_SUBTRACT* = 0x000084E7 + GL_CONSTANT* = 0x00008576 + GL_PRIMARY_COLOR* = 0x00008577 + GL_PREVIOUS* = 0x00008578 + GL_DOT3_RGB* = 0x000086AE + GL_DOT3_RGBA* = 0x000086AF + +const + GL_TEXTURE0_ARB* = 0x000084C0 + GL_TEXTURE1_ARB* = 0x000084C1 + GL_TEXTURE2_ARB* = 0x000084C2 + GL_TEXTURE3_ARB* = 0x000084C3 + GL_TEXTURE4_ARB* = 0x000084C4 + GL_TEXTURE5_ARB* = 0x000084C5 + GL_TEXTURE6_ARB* = 0x000084C6 + GL_TEXTURE7_ARB* = 0x000084C7 + GL_TEXTURE8_ARB* = 0x000084C8 + GL_TEXTURE9_ARB* = 0x000084C9 + GL_TEXTURE10_ARB* = 0x000084CA + GL_TEXTURE11_ARB* = 0x000084CB + GL_TEXTURE12_ARB* = 0x000084CC + GL_TEXTURE13_ARB* = 0x000084CD + GL_TEXTURE14_ARB* = 0x000084CE + GL_TEXTURE15_ARB* = 0x000084CF + GL_TEXTURE16_ARB* = 0x000084D0 + GL_TEXTURE17_ARB* = 0x000084D1 + GL_TEXTURE18_ARB* = 0x000084D2 + GL_TEXTURE19_ARB* = 0x000084D3 + GL_TEXTURE20_ARB* = 0x000084D4 + GL_TEXTURE21_ARB* = 0x000084D5 + GL_TEXTURE22_ARB* = 0x000084D6 + GL_TEXTURE23_ARB* = 0x000084D7 + GL_TEXTURE24_ARB* = 0x000084D8 + GL_TEXTURE25_ARB* = 0x000084D9 + GL_TEXTURE26_ARB* = 0x000084DA + GL_TEXTURE27_ARB* = 0x000084DB + GL_TEXTURE28_ARB* = 0x000084DC + GL_TEXTURE29_ARB* = 0x000084DD + GL_TEXTURE30_ARB* = 0x000084DE + GL_TEXTURE31_ARB* = 0x000084DF + constGL_ACTIVE_TEXTURE_ARB* = 0x000084E0 + constGL_CLIENT_ACTIVE_TEXTURE_ARB* = 0x000084E1 + GL_MAX_TEXTURE_UNITS_ARB* = 0x000084E2 + + #***** GL_ARB_transpose_matrix *****// +const + GL_TRANSPOSE_MODELVIEW_MATRIX_ARB* = 0x000084E3 + GL_TRANSPOSE_PROJECTION_MATRIX_ARB* = 0x000084E4 + GL_TRANSPOSE_TEXTURE_MATRIX_ARB* = 0x000084E5 + GL_TRANSPOSE_COLOR_MATRIX_ARB* = 0x000084E6 + +proc glLoadTransposeMatrixfARB*(m: PGLfloat){.dynlib: dllname, importc.} +proc glLoadTransposeMatrixdARB*(m: PGLdouble){.dynlib: dllname, importc.} +proc glMultTransposeMatrixfARB*(m: PGLfloat){.dynlib: dllname, importc.} +proc glMultTransposeMatrixdARB*(m: PGLdouble){.dynlib: dllname, importc.} + +const + WGL_SAMPLE_BUFFERS_ARB* = 0x00002041 + WGL_SAMPLES_ARB* = 0x00002042 + GL_MULTISAMPLE_ARB* = 0x0000809D + GL_SAMPLE_ALPHA_TO_COVERAGE_ARB* = 0x0000809E + GL_SAMPLE_ALPHA_TO_ONE_ARB* = 0x0000809F + constGL_SAMPLE_COVERAGE_ARB* = 0x000080A0 + GL_MULTISAMPLE_BIT_ARB* = 0x20000000 + GL_SAMPLE_BUFFERS_ARB* = 0x000080A8 + GL_SAMPLES_ARB* = 0x000080A9 + GL_SAMPLE_COVERAGE_VALUE_ARB* = 0x000080AA + GL_SAMPLE_COVERAGE_INVERT_ARB* = 0x000080AB + +const + GL_NORMAL_MAP_ARB* = 0x00008511 + GL_REFLECTION_MAP_ARB* = 0x00008512 + GL_TEXTURE_CUBE_MAP_ARB* = 0x00008513 + GL_TEXTURE_BINDING_CUBE_MAP_ARB* = 0x00008514 + GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB* = 0x00008515 + GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB* = 0x00008516 + GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB* = 0x00008517 + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB* = 0x00008518 + GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB* = 0x00008519 + GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB* = 0x0000851A + GL_PROXY_TEXTURE_CUBE_MAP_ARB* = 0x0000851B + GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB* = 0x0000851C + +const + GL_DEPTH_COMPONENT16_ARB* = 0x000081A5 + GL_DEPTH_COMPONENT24_ARB* = 0x000081A6 + GL_DEPTH_COMPONENT32_ARB* = 0x000081A7 + GL_TEXTURE_DEPTH_SIZE_ARB* = 0x0000884A + GL_DEPTH_TEXTURE_MODE_ARB* = 0x0000884B + + #***** GL_ARB_point_parameters *****// +const + GL_POINT_SIZE_MIN_ARB* = 0x00008126 + GL_POINT_SIZE_MAX_ARB* = 0x00008127 + GL_POINT_FADE_THRESHOLD_SIZE_ARB* = 0x00008128 + GL_POINT_DISTANCE_ATTENUATION_ARB* = 0x00008129 + +proc glPointParameterfARB*(pname: TGLenum, param: TGLfloat){.dynlib: dllname, + importc.} +proc glPointParameterfvARB*(pname: TGLenum, params: PGLfloat){.dynlib: dllname, + importc.} +const + GL_TEXTURE_COMPARE_MODE_ARB* = 0x0000884C + GL_TEXTURE_COMPARE_FUNC_ARB* = 0x0000884D + GL_COMPARE_R_TO_TEXTURE_ARB* = 0x0000884E + +const + GL_TEXTURE_COMPARE_FAIL_VALUE_ARB* = 0x000080BF + GL_CLAMP_TO_BORDER_ARB* = 0x0000812D + +const + GL_COMPRESSED_ALPHA_ARB* = 0x000084E9 + GL_COMPRESSED_LUMINANCE_ARB* = 0x000084EA + GL_COMPRESSED_LUMINANCE_ALPHA_ARB* = 0x000084EB + GL_COMPRESSED_INTENSITY_ARB* = 0x000084EC + GL_COMPRESSED_RGB_ARB* = 0x000084ED + GL_COMPRESSED_RGBA_ARB* = 0x000084EE + GL_TEXTURE_COMPRESSION_HINT_ARB* = 0x000084EF + GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB* = 0x000086A0 + GL_TEXTURE_COMPRESSED_ARB* = 0x000086A1 + GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB* = 0x000086A2 + GL_COMPRESSED_TEXTURE_FORMATS_ARB* = 0x000086A3 + +proc glCompressedTexImage3DARB*(target: TGLenum, level: TGLint, + internalformat: TGLenum, width: TGLsizei, + height: TGLsizei, depth: TGLsizei, border: TGLint, + imageSize: TGLsizei, data: PGLvoid){. + dynlib: dllname, importc.} +proc glCompressedTexImage2DARB*(target: TGLenum, level: TGLint, + internalformat: TGLenum, width: TGLsizei, + height: TGLsizei, border: TGLint, + imageSize: TGLsizei, data: PGLvoid){. + dynlib: dllname, importc.} +proc glCompressedTexImage1DARB*(target: TGLenum, level: TGLint, + internalformat: TGLenum, width: TGLsizei, + border: TGLint, imageSize: TGLsizei, data: PGLvoid){. + dynlib: dllname, importc.} +proc glCompressedTexSubImage3DARB*(target: TGLenum, level: TGLint, xoffset: TGLint, + yoffset: TGLint, zoffset: TGLint, + width: TGLsizei, height: TGLsizei, + depth: TGLsizei, format: TGLenum, + imageSize: TGLsizei, data: PGLvoid){. + dynlib: dllname, importc.} +proc glCompressedTexSubImage2DARB*(target: TGLenum, level: TGLint, xoffset: TGLint, + yoffset: TGLint, width: TGLsizei, + height: TGLsizei, format: TGLenum, + imageSize: TGLsizei, data: PGLvoid){. + dynlib: dllname, importc.} +proc glCompressedTexSubImage1DARB*(target: TGLenum, level: TGLint, xoffset: TGLint, + width: TGLsizei, format: TGLenum, + imageSize: TGLsizei, data: PGLvoid){. + dynlib: dllname, importc.} +proc glGetCompressedTexImageARB*(target: TGLenum, lod: TGLint, img: PGLvoid){. + dynlib: dllname, importc.} + #***** GL_ARB_texture_env_combine *****// +const + GL_COMBINE_ARB* = 0x00008570 + GL_COMBINE_RGB_ARB* = 0x00008571 + GL_COMBINE_ALPHA_ARB* = 0x00008572 + GL_SOURCE0_RGB_ARB* = 0x00008580 + GL_SOURCE1_RGB_ARB* = 0x00008581 + GL_SOURCE2_RGB_ARB* = 0x00008582 + GL_SOURCE0_ALPHA_ARB* = 0x00008588 + GL_SOURCE1_ALPHA_ARB* = 0x00008589 + GL_SOURCE2_ALPHA_ARB* = 0x0000858A + GL_OPERAND0_RGB_ARB* = 0x00008590 + GL_OPERAND1_RGB_ARB* = 0x00008591 + GL_OPERAND2_RGB_ARB* = 0x00008592 + GL_OPERAND0_ALPHA_ARB* = 0x00008598 + GL_OPERAND1_ALPHA_ARB* = 0x00008599 + GL_OPERAND2_ALPHA_ARB* = 0x0000859A + GL_RGB_SCALE_ARB* = 0x00008573 + GL_ADD_SIGNED_ARB* = 0x00008574 + GL_INTERPOLATE_ARB* = 0x00008575 + GL_SUBTRACT_ARB* = 0x000084E7 + GL_CONSTANT_ARB* = 0x00008576 + GL_PRIMARY_COLOR_ARB* = 0x00008577 + GL_PREVIOUS_ARB* = 0x00008578 + + #***** GL_ARB_texture_env_crossbar *****// + #***** GL_ARB_texture_env_dot3 *****// +const + GL_DOT3_RGB_ARB* = 0x000086AE + GL_DOT3_RGBA_ARB* = 0x000086AF + + #***** GL_ARB_texture_mirrored_repeat *****// +const + GL_MIRRORED_REPEAT_ARB* = 0x00008370 + + #***** GL_ARB_vertex_blend *****// +const + GL_MAX_VERTEX_UNITS_ARB* = 0x000086A4 + GL_ACTIVE_VERTEX_UNITS_ARB* = 0x000086A5 + GL_WEIGHT_SUM_UNITY_ARB* = 0x000086A6 + constGL_VERTEX_BLEND_ARB* = 0x000086A7 + GL_MODELVIEW0_ARB* = 0x00001700 + GL_MODELVIEW1_ARB* = 0x0000850A + GL_MODELVIEW2_ARB* = 0x00008722 + GL_MODELVIEW3_ARB* = 0x00008723 + GL_MODELVIEW4_ARB* = 0x00008724 + GL_MODELVIEW5_ARB* = 0x00008725 + GL_MODELVIEW6_ARB* = 0x00008726 + GL_MODELVIEW7_ARB* = 0x00008727 + GL_MODELVIEW8_ARB* = 0x00008728 + GL_MODELVIEW9_ARB* = 0x00008729 + GL_MODELVIEW10_ARB* = 0x0000872A + GL_MODELVIEW11_ARB* = 0x0000872B + GL_MODELVIEW12_ARB* = 0x0000872C + GL_MODELVIEW13_ARB* = 0x0000872D + GL_MODELVIEW14_ARB* = 0x0000872E + GL_MODELVIEW15_ARB* = 0x0000872F + GL_MODELVIEW16_ARB* = 0x00008730 + GL_MODELVIEW17_ARB* = 0x00008731 + GL_MODELVIEW18_ARB* = 0x00008732 + GL_MODELVIEW19_ARB* = 0x00008733 + GL_MODELVIEW20_ARB* = 0x00008734 + GL_MODELVIEW21_ARB* = 0x00008735 + GL_MODELVIEW22_ARB* = 0x00008736 + GL_MODELVIEW23_ARB* = 0x00008737 + GL_MODELVIEW24_ARB* = 0x00008738 + GL_MODELVIEW25_ARB* = 0x00008739 + GL_MODELVIEW26_ARB* = 0x0000873A + GL_MODELVIEW27_ARB* = 0x0000873B + GL_MODELVIEW28_ARB* = 0x0000873C + GL_MODELVIEW29_ARB* = 0x0000873D + GL_MODELVIEW30_ARB* = 0x0000873E + GL_MODELVIEW31_ARB* = 0x0000873F + GL_CURRENT_WEIGHT_ARB* = 0x000086A8 + GL_WEIGHT_ARRAY_TYPE_ARB* = 0x000086A9 + GL_WEIGHT_ARRAY_STRIDE_ARB* = 0x000086AA + GL_WEIGHT_ARRAY_SIZE_ARB* = 0x000086AB + GL_WEIGHT_ARRAY_POINTER_ARB* = 0x000086AC + GL_WEIGHT_ARRAY_ARB* = 0x000086AD + +const + GL_VERTEX_PROGRAM_ARB* = 0x00008620 + GL_VERTEX_PROGRAM_POINT_SIZE_ARB* = 0x00008642 + GL_VERTEX_PROGRAM_TWO_SIDE_ARB* = 0x00008643 + GL_COLOR_SUM_ARB* = 0x00008458 + GL_PROGRAM_FORMAT_ASCII_ARB* = 0x00008875 + GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB* = 0x00008622 + GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB* = 0x00008623 + GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB* = 0x00008624 + GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB* = 0x00008625 + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB* = 0x0000886A + GL_CURRENT_VERTEX_ATTRIB_ARB* = 0x00008626 + GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB* = 0x00008645 + GL_PROGRAM_LENGTH_ARB* = 0x00008627 + GL_PROGRAM_FORMAT_ARB* = 0x00008876 + GL_PROGRAM_BINDING_ARB* = 0x00008677 + GL_PROGRAM_INSTRUCTIONS_ARB* = 0x000088A0 + GL_MAX_PROGRAM_INSTRUCTIONS_ARB* = 0x000088A1 + GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB* = 0x000088A2 + GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB* = 0x000088A3 + GL_PROGRAM_TEMPORARIES_ARB* = 0x000088A4 + GL_MAX_PROGRAM_TEMPORARIES_ARB* = 0x000088A5 + GL_PROGRAM_NATIVE_TEMPORARIES_ARB* = 0x000088A6 + GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB* = 0x000088A7 + GL_PROGRAM_PARAMETERS_ARB* = 0x000088A8 + GL_MAX_PROGRAM_PARAMETERS_ARB* = 0x000088A9 + GL_PROGRAM_NATIVE_PARAMETERS_ARB* = 0x000088AA + GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB* = 0x000088AB + GL_PROGRAM_ATTRIBS_ARB* = 0x000088AC + GL_MAX_PROGRAM_ATTRIBS_ARB* = 0x000088AD + GL_PROGRAM_NATIVE_ATTRIBS_ARB* = 0x000088AE + GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB* = 0x000088AF + GL_PROGRAM_ADDRESS_REGISTERS_ARB* = 0x000088B0 + GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB* = 0x000088B1 + GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB* = 0x000088B2 + GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB* = 0x000088B3 + GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB* = 0x000088B4 + GL_MAX_PROGRAM_ENV_PARAMETERS_ARB* = 0x000088B5 + GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB* = 0x000088B6 + constGL_PROGRAM_STRING_ARB* = 0x00008628 + GL_PROGRAM_ERROR_POSITION_ARB* = 0x0000864B + GL_CURRENT_MATRIX_ARB* = 0x00008641 + GL_TRANSPOSE_CURRENT_MATRIX_ARB* = 0x000088B7 + GL_CURRENT_MATRIX_STACK_DEPTH_ARB* = 0x00008640 + GL_MAX_VERTEX_ATTRIBS_ARB* = 0x00008869 + GL_MAX_PROGRAM_MATRICES_ARB* = 0x0000862F + GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB* = 0x0000862E + GL_PROGRAM_ERROR_STRING_ARB* = 0x00008874 + GL_MATRIX0_ARB* = 0x000088C0 + GL_MATRIX1_ARB* = 0x000088C1 + GL_MATRIX2_ARB* = 0x000088C2 + GL_MATRIX3_ARB* = 0x000088C3 + GL_MATRIX4_ARB* = 0x000088C4 + GL_MATRIX5_ARB* = 0x000088C5 + GL_MATRIX6_ARB* = 0x000088C6 + GL_MATRIX7_ARB* = 0x000088C7 + GL_MATRIX8_ARB* = 0x000088C8 + GL_MATRIX9_ARB* = 0x000088C9 + GL_MATRIX10_ARB* = 0x000088CA + GL_MATRIX11_ARB* = 0x000088CB + GL_MATRIX12_ARB* = 0x000088CC + GL_MATRIX13_ARB* = 0x000088CD + GL_MATRIX14_ARB* = 0x000088CE + GL_MATRIX15_ARB* = 0x000088CF + GL_MATRIX16_ARB* = 0x000088D0 + GL_MATRIX17_ARB* = 0x000088D1 + GL_MATRIX18_ARB* = 0x000088D2 + GL_MATRIX19_ARB* = 0x000088D3 + GL_MATRIX20_ARB* = 0x000088D4 + GL_MATRIX21_ARB* = 0x000088D5 + GL_MATRIX22_ARB* = 0x000088D6 + GL_MATRIX23_ARB* = 0x000088D7 + GL_MATRIX24_ARB* = 0x000088D8 + GL_MATRIX25_ARB* = 0x000088D9 + GL_MATRIX26_ARB* = 0x000088DA + GL_MATRIX27_ARB* = 0x000088DB + GL_MATRIX28_ARB* = 0x000088DC + GL_MATRIX29_ARB* = 0x000088DD + GL_MATRIX30_ARB* = 0x000088DE + GL_MATRIX31_ARB* = 0x000088DF + +const + GL_422_EXT* = 0x000080CC + GL_422_REV_EXT* = 0x000080CD + GL_422_AVERAGE_EXT* = 0x000080CE + GL_422_REV_AVERAGE_EXT* = 0x000080CF + + #***** GL_EXT_abgr *****// +const + GL_ABGR_EXT* = 0x00008000 + + #***** GL_EXT_bgra *****// +const + GL_BGR_EXT* = 0x000080E0 + GL_BGRA_EXT* = 0x000080E1 + + #***** GL_EXT_blend_color *****// +const + GL_CONSTANT_COLOR_EXT* = 0x00008001 + GL_ONE_MINUS_CONSTANT_COLOR_EXT* = 0x00008002 + GL_CONSTANT_ALPHA_EXT* = 0x00008003 + GL_ONE_MINUS_CONSTANT_ALPHA_EXT* = 0x00008004 + constGL_BLEND_COLOR_EXT* = 0x00008005 + +proc glBlendColorEXT*(red: TGLclampf, green: TGLclampf, blue: TGLclampf, + alpha: TGLclampf){.dynlib: dllname, importc.} + #***** GL_EXT_blend_func_separate *****// +const + GL_BLEND_DST_RGB_EXT* = 0x000080C8 + GL_BLEND_SRC_RGB_EXT* = 0x000080C9 + GL_BLEND_DST_ALPHA_EXT* = 0x000080CA + GL_BLEND_SRC_ALPHA_EXT* = 0x000080CB + +proc glBlendFuncSeparateEXT*(sfactorRGB: TGLenum, dfactorRGB: TGLenum, + sfactorAlpha: TGLenum, dfactorAlpha: TGLenum){. + dynlib: dllname, importc.} + #***** GL_EXT_blend_logic_op *****// + #***** GL_EXT_blend_minmax *****// +const + GL_FUNC_ADD_EXT* = 0x00008006 + GL_MIN_EXT* = 0x00008007 + GL_MAX_EXT* = 0x00008008 + constGL_BLEND_EQUATION_EXT* = 0x00008009 + +proc glBlendEquationEXT*(mode: TGLenum){.dynlib: dllname, importc.} + #***** GL_EXT_blend_subtract *****// +const + GL_FUNC_SUBTRACT_EXT* = 0x0000800A + GL_FUNC_REVERSE_SUBTRACT_EXT* = 0x0000800B + + #***** GL_EXT_clip_volume_hint *****// +const + GL_CLIP_VOLUME_CLIPPING_HINT_EXT* = 0x000080F0 + + #***** GL_EXT_color_subtable *****// +proc glColorSubTableEXT*(target: TGLenum, start: TGLsizei, count: TGLsizei, + format: TGLenum, thetype: TGLenum, data: PGLvoid){. + dynlib: dllname, importc.} +proc glCopyColorSubTableEXT*(target: TGLenum, start: TGLsizei, x: TGLint, y: TGLint, + width: TGLsizei){.dynlib: dllname, importc.} + #***** GL_EXT_compiled_vertex_array *****// +const + GL_ARRAY_ELEMENT_LOCK_FIRST_EXT* = 0x000081A8 + GL_ARRAY_ELEMENT_LOCK_COUNT_EXT* = 0x000081A9 + +proc glLockArraysEXT*(first: TGLint, count: TGLsizei){.dynlib: dllname, importc.} +proc glUnlockArraysEXT*(){.dynlib: dllname, importc.} + #***** GL_EXT_convolution *****// +const + GL_CONVOLUTION_1D_EXT* = 0x00008010 + GL_CONVOLUTION_2D_EXT* = 0x00008011 + GL_SEPARABLE_2D_EXT* = 0x00008012 + GL_CONVOLUTION_BORDER_MODE_EXT* = 0x00008013 + GL_CONVOLUTION_FILTER_SCALE_EXT* = 0x00008014 + GL_CONVOLUTION_FILTER_BIAS_EXT* = 0x00008015 + GL_REDUCE_EXT* = 0x00008016 + GL_CONVOLUTION_FORMAT_EXT* = 0x00008017 + GL_CONVOLUTION_WIDTH_EXT* = 0x00008018 + GL_CONVOLUTION_HEIGHT_EXT* = 0x00008019 + GL_MAX_CONVOLUTION_WIDTH_EXT* = 0x0000801A + GL_MAX_CONVOLUTION_HEIGHT_EXT* = 0x0000801B + GL_POST_CONVOLUTION_RED_SCALE_EXT* = 0x0000801C + GL_POST_CONVOLUTION_GREEN_SCALE_EXT* = 0x0000801D + GL_POST_CONVOLUTION_BLUE_SCALE_EXT* = 0x0000801E + GL_POST_CONVOLUTION_ALPHA_SCALE_EXT* = 0x0000801F + GL_POST_CONVOLUTION_RED_BIAS_EXT* = 0x00008020 + GL_POST_CONVOLUTION_GREEN_BIAS_EXT* = 0x00008021 + GL_POST_CONVOLUTION_BLUE_BIAS_EXT* = 0x00008022 + GL_POST_CONVOLUTION_ALPHA_BIAS_EXT* = 0x00008023 + +proc glConvolutionFilter1DEXT*(target: TGLenum, internalformat: TGLenum, + width: TGLsizei, format: TGLenum, thetype: TGLenum, + image: PGLvoid){.dynlib: dllname, importc.} +proc glConvolutionFilter2DEXT*(target: TGLenum, internalformat: TGLenum, + width: TGLsizei, height: TGLsizei, format: TGLenum, + thetype: TGLenum, image: PGLvoid){. + dynlib: dllname, importc.} +proc glCopyConvolutionFilter1DEXT*(target: TGLenum, internalformat: TGLenum, + x: TGLint, y: TGLint, width: TGLsizei){. + dynlib: dllname, importc.} +proc glCopyConvolutionFilter2DEXT*(target: TGLenum, internalformat: TGLenum, + x: TGLint, y: TGLint, width: TGLsizei, + height: TGLsizei){.dynlib: dllname, importc.} +proc glGetConvolutionFilterEXT*(target: TGLenum, format: TGLenum, thetype: TGLenum, + image: PGLvoid){.dynlib: dllname, importc.} +proc glSeparableFilter2DEXT*(target: TGLenum, internalformat: TGLenum, + width: TGLsizei, height: TGLsizei, format: TGLenum, + thetype: TGLenum, row: PGLvoid, column: PGLvoid){. + dynlib: dllname, importc.} +proc glGetSeparableFilterEXT*(target: TGLenum, format: TGLenum, thetype: TGLenum, + row: PGLvoid, column: PGLvoid, span: PGLvoid){. + dynlib: dllname, importc.} +proc glConvolutionParameteriEXT*(target: TGLenum, pname: TGLenum, param: TGLint){. + dynlib: dllname, importc.} +proc glConvolutionParameterivEXT*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glConvolutionParameterfEXT*(target: TGLenum, pname: TGLenum, param: TGLfloat){. + dynlib: dllname, importc.} +proc glConvolutionParameterfvEXT*(target: TGLenum, pname: TGLenum, + params: PGLfloat){.dynlib: dllname, importc.} +proc glGetConvolutionParameterivEXT*(target: TGLenum, pname: TGLenum, + params: PGLint){.dynlib: dllname, importc.} +proc glGetConvolutionParameterfvEXT*(target: TGLenum, pname: TGLenum, + params: PGLfloat){.dynlib: dllname, importc.} + #***** GL_EXT_fog_coord *****// +const + GL_FOG_COORDINATE_SOURCE_EXT* = 0x00008450 + GL_FOG_COORDINATE_EXT* = 0x00008451 + GL_FRAGMENT_DEPTH_EXT* = 0x00008452 + GL_CURRENT_FOG_COORDINATE_EXT* = 0x00008453 + GL_FOG_COORDINATE_ARRAY_TYPE_EXT* = 0x00008454 + GL_FOG_COORDINATE_ARRAY_STRIDE_EXT* = 0x00008455 + GL_FOG_COORDINATE_ARRAY_POINTER_EXT* = 0x00008456 + GL_FOG_COORDINATE_ARRAY_EXT* = 0x00008457 + +proc glFogCoordfEXfloat*(coord: TGLfloat){.dynlib: dllname, importc.} +proc glFogCoorddEXdouble*(coord: TGLdouble){.dynlib: dllname, importc.} +proc glFogCoordfvEXfloat*(coord: TGLfloat){.dynlib: dllname, importc.} +proc glFogCoorddvEXdouble*(coord: TGLdouble){.dynlib: dllname, importc.} +proc glFogCoordPointerEXT*(thetype: TGLenum, stride: TGLsizei, pointer: PGLvoid){. + dynlib: dllname, importc.} + #***** GL_EXT_histogram *****// +const + constGL_HISTOGRAM_EXT* = 0x00008024 + GL_PROXY_HISTOGRAM_EXT* = 0x00008025 + GL_HISTOGRAM_WIDTH_EXT* = 0x00008026 + GL_HISTOGRAM_FORMAT_EXT* = 0x00008027 + GL_HISTOGRAM_RED_SIZE_EXT* = 0x00008028 + GL_HISTOGRAM_GREEN_SIZE_EXT* = 0x00008029 + GL_HISTOGRAM_BLUE_SIZE_EXT* = 0x0000802A + GL_HISTOGRAM_ALPHA_SIZE_EXT* = 0x0000802B + GL_HISTOGRAM_LUMINANCE_SIZE_EXT* = 0x0000802C + GL_HISTOGRAM_SINK_EXT* = 0x0000802D + constGL_MINMAX_EXT* = 0x0000802E + GL_MINMAX_FORMAT_EXT* = 0x0000802F + GL_MINMAX_SINK_EXT* = 0x00008030 + +proc glHistogramEXT*(target: TGLenum, width: TGLsizei, internalformat: TGLenum, + sink: TGLboolean){.dynlib: dllname, importc.} +proc glResetHistogramEXT*(target: TGLenum){.dynlib: dllname, importc.} +proc glGetHistogramEXT*(target: TGLenum, reset: TGLboolean, format: TGLenum, + thetype: TGLenum, values: PGLvoid){.dynlib: dllname, + importc.} +proc glGetHistogramParameterivEXT*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetHistogramParameterfvEXT*(target: TGLenum, pname: TGLenum, + params: PGLfloat){.dynlib: dllname, importc.} +proc glMinmaxEXT*(target: TGLenum, internalformat: TGLenum, sink: TGLboolean){. + dynlib: dllname, importc.} +proc glResetMinmaxEXT*(target: TGLenum){.dynlib: dllname, importc.} +proc glGetMinmaxEXT*(target: TGLenum, reset: TGLboolean, format: TGLenum, + thetype: TGLenum, values: PGLvoid){.dynlib: dllname, importc.} +proc glGetMinmaxParameterivEXT*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetMinmaxParameterfvEXT*(target: TGLenum, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} + #***** GL_EXT_multi_draw_arrays *****// +proc glMultiDrawArraysEXT*(mode: TGLenum, first: PGLint, count: PGLsizei, + primcount: TGLsizei){.dynlib: dllname, importc.} +proc glMultiDrawElementsEXT*(mode: TGLenum, count: PGLsizei, thetype: TGLenum, + indices: PGLvoid, primcount: TGLsizei){. + dynlib: dllname, importc.} + #***** GL_EXT_packed_pixels *****// +const + GL_UNSIGNED_BYTE_3_3_2_EXT* = 0x00008032 + GL_UNSIGNED_SHORT_4_4_4_4_EXT* = 0x00008033 + GL_UNSIGNED_SHORT_5_5_5_1_EXT* = 0x00008034 + GL_UNSIGNED_INT_8_8_8_8_EXT* = 0x00008035 + GL_UNSIGNED_INT_10_10_10_2_EXT* = 0x00008036 + + #***** GL_EXT_paletted_texture *****// +const + GL_COLOR_INDEX1_EXT* = 0x000080E2 + GL_COLOR_INDEX2_EXT* = 0x000080E3 + GL_COLOR_INDEX4_EXT* = 0x000080E4 + GL_COLOR_INDEX8_EXT* = 0x000080E5 + GL_COLOR_INDEX12_EXT* = 0x000080E6 + GL_COLOR_INDEX16_EXT* = 0x000080E7 + GL_COLOR_TABLE_FORMAT_EXT* = 0x000080D8 + GL_COLOR_TABLE_WIDTH_EXT* = 0x000080D9 + GL_COLOR_TABLE_RED_SIZE_EXT* = 0x000080DA + GL_COLOR_TABLE_GREEN_SIZE_EXT* = 0x000080DB + GL_COLOR_TABLE_BLUE_SIZE_EXT* = 0x000080DC + GL_COLOR_TABLE_ALPHA_SIZE_EXT* = 0x000080DD + GL_COLOR_TABLE_LUMINANCE_SIZE_EXT* = 0x000080DE + GL_COLOR_TABLE_INTENSITY_SIZE_EXT* = 0x000080DF + GL_TEXTURE_INDEX_SIZE_EXT* = 0x000080ED + GL_TEXTURE_1D* = 0x00000DE0 + GL_TEXTURE_2D* = 0x00000DE1 + GL_TEXTURE_3D_EXT* = 0x0000806F # GL_TEXTURE_CUBE_MAP_ARB { already defined } + GL_PROXY_TEXTURE_1D* = 0x00008063 + GL_PROXY_TEXTURE_2D* = 0x00008064 + GL_PROXY_TEXTURE_3D_EXT* = 0x00008070 # GL_PROXY_TEXTURE_CUBE_MAP_ARB { already defined } + # GL_TEXTURE_1D { already defined } + # GL_TEXTURE_2D { already defined } + # GL_TEXTURE_3D_EXT { already defined } + # GL_TEXTURE_CUBE_MAP_ARB { already defined } + +proc glColorTableEXT*(target: TGLenum, internalFormat: TGLenum, width: TGLsizei, + format: TGLenum, thetype: TGLenum, data: PGLvoid){. + dynlib: dllname, importc.} + # glColorSubTableEXT { already defined } +proc glGetColorTableEXT*(target: TGLenum, format: TGLenum, thetype: TGLenum, + data: PGLvoid){.dynlib: dllname, importc.} +proc glGetColorTableParameterivEXT*(target: TGLenum, pname: TGLenum, + params: PGLint){.dynlib: dllname, importc.} +proc glGetColorTableParameterfvEXT*(target: TGLenum, pname: TGLenum, + params: PGLfloat){.dynlib: dllname, importc.} + #***** GL_EXT_point_parameters *****// +const + GL_POINT_SIZE_MIN_EXT* = 0x00008126 + GL_POINT_SIZE_MAX_EXT* = 0x00008127 + GL_POINT_FADE_THRESHOLD_SIZE_EXT* = 0x00008128 + GL_DISTANCE_ATTENUATION_EXT* = 0x00008129 + +proc glPointParameterfEXT*(pname: TGLenum, param: TGLfloat){.dynlib: dllname, + importc.} +proc glPointParameterfvEXT*(pname: TGLenum, params: PGLfloat){.dynlib: dllname, + importc.} + #***** GL_EXT_polygon_offset *****// +const + constGL_POLYGON_OFFSET_EXT* = 0x00008037 + GL_POLYGON_OFFSET_FACTOR_EXT* = 0x00008038 + GL_POLYGON_OFFSET_BIAS_EXT* = 0x00008039 + +proc glPolygonOffsetEXT*(factor: TGLfloat, bias: TGLfloat){.dynlib: dllname, + importc.} + #***** GL_EXT_secondary_color *****// +const + GL_COLOR_SUM_EXT* = 0x00008458 + GL_CURRENT_SECONDARY_COLOR_EXT* = 0x00008459 + GL_SECONDARY_COLOR_ARRAY_SIZE_EXT* = 0x0000845A + GL_SECONDARY_COLOR_ARRAY_TYPE_EXT* = 0x0000845B + GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT* = 0x0000845C + GL_SECONDARY_COLOR_ARRAY_POINTER_EXT* = 0x0000845D + GL_SECONDARY_COLOR_ARRAY_EXT* = 0x0000845E + +proc glSecondaryColor3bEXT*(components: TGLbyte){.dynlib: dllname, importc.} +proc glSecondaryColor3sEXT*(components: TGLshort){.dynlib: dllname, importc.} +proc glSecondaryColor3iEXT*(components: TGLint){.dynlib: dllname, importc.} +proc glSecondaryColor3fEXT*(components: TGLfloat){.dynlib: dllname, importc.} +proc glSecondaryColor3dEXT*(components: TGLdouble){.dynlib: dllname, importc.} +proc glSecondaryColor3ubEXT*(components: TGLubyte){.dynlib: dllname, importc.} +proc glSecondaryColor3usEXT*(components: TGLushort){.dynlib: dllname, importc.} +proc glSecondaryColor3uiEXT*(components: TGLuint){.dynlib: dllname, importc.} +proc glSecondaryColor3bvEXT*(components: TGLbyte){.dynlib: dllname, importc.} +proc glSecondaryColor3svEXT*(components: TGLshort){.dynlib: dllname, importc.} +proc glSecondaryColor3ivEXT*(components: TGLint){.dynlib: dllname, importc.} +proc glSecondaryColor3fvEXT*(components: TGLfloat){.dynlib: dllname, importc.} +proc glSecondaryColor3dvEXT*(components: TGLdouble){.dynlib: dllname, importc.} +proc glSecondaryColor3ubvEXT*(components: TGLubyte){.dynlib: dllname, importc.} +proc glSecondaryColor3usvEXT*(components: TGLushort){.dynlib: dllname, importc.} +proc glSecondaryColor3uivEXT*(components: TGLuint){.dynlib: dllname, importc.} +proc glSecondaryColorPointerEXT*(size: TGLint, thetype: TGLenum, stride: TGLsizei, + pointer: PGLvoid){.dynlib: dllname, importc.} + #***** GL_EXT_separate_specular_color *****// +const + GL_LIGHT_MODEL_COLOR_CONTROL_EXT* = 0x000081F8 + GL_SINGLE_COLOR_EXT* = 0x000081F9 + GL_SEPARATE_SPECULAR_COLOR_EXT* = 0x000081FA + + #***** GL_EXT_shadow_funcs *****// + #***** GL_EXT_shared_texture_palette *****// +const + GL_SHARED_TEXTURE_PALETTE_EXT* = 0x000081FB + + #***** GL_EXT_stencil_two_side *****// +const + GL_STENCIL_TEST_TWO_SIDE_EXT* = 0x00008910 + constGL_ACTIVE_STENCIL_FACE_EXT* = 0x00008911 + +proc glActiveStencilFaceEXT*(face: TGLenum){.dynlib: dllname, importc.} + #***** GL_EXT_stencil_wrap *****// +const + GL_INCR_WRAP_EXT* = 0x00008507 + GL_DECR_WRAP_EXT* = 0x00008508 + + #***** GL_EXT_subtexture *****// +proc glTexSubImage1DEXT*(target: TGLenum, level: TGLint, xoffset: TGLint, + width: TGLsizei, format: TGLenum, thetype: TGLenum, + pixels: PGLvoid){.dynlib: dllname, importc.} +proc glTexSubImage2DEXT*(target: TGLenum, level: TGLint, xoffset: TGLint, + yoffset: TGLint, width: TGLsizei, height: TGLsizei, + format: TGLenum, thetype: TGLenum, pixels: PGLvoid){. + dynlib: dllname, importc.} +proc glTexSubImage3DEXT*(target: TGLenum, level: TGLint, xoffset: TGLint, + yoffset: TGLint, zoffset: TGLint, width: TGLsizei, + height: TGLsizei, depth: TGLsizei, format: TGLenum, + thetype: TGLenum, pixels: PGLvoid){.dynlib: dllname, + importc.} + #***** GL_EXT_texture3D *****// +const + GL_PACK_SKIP_IMAGES_EXT* = 0x0000806B + GL_PACK_IMAGE_HEIGHT_EXT* = 0x0000806C + GL_UNPACK_SKIP_IMAGES_EXT* = 0x0000806D + GL_UNPACK_IMAGE_HEIGHT_EXT* = 0x0000806E # GL_TEXTURE_3D_EXT { already defined } + # GL_PROXY_TEXTURE_3D_EXT { already defined } + GL_TEXTURE_DEPTH_EXT* = 0x00008071 + GL_TEXTURE_WRAP_R_EXT* = 0x00008072 + GL_MAX_3D_TEXTURE_SIZE_EXT* = 0x00008073 + +proc glTexImage3DEXT*(target: TGLenum, level: TGLint, internalformat: TGLenum, + width: TGLsizei, height: TGLsizei, depth: TGLsizei, + border: TGLint, format: TGLenum, thetype: TGLenum, + pixels: PGLvoid){.dynlib: dllname, importc.} + #***** GL_EXT_texture_compression_s3tc *****// +const + GL_COMPRESSED_RGB_S3TC_DXT1_EXT* = 0x000083F0 + GL_COMPRESSED_RGBA_S3TC_DXT1_EXT* = 0x000083F1 + GL_COMPRESSED_RGBA_S3TC_DXT3_EXT* = 0x000083F2 + GL_COMPRESSED_RGBA_S3TC_DXT5_EXT* = 0x000083F3 + + #***** GL_EXT_texture_env_add *****// + #***** GL_EXT_texture_env_combine *****// +const + GL_COMBINE_EXT* = 0x00008570 + GL_COMBINE_RGB_EXT* = 0x00008571 + GL_COMBINE_ALPHA_EXT* = 0x00008572 + GL_SOURCE0_RGB_EXT* = 0x00008580 + GL_SOURCE1_RGB_EXT* = 0x00008581 + GL_SOURCE2_RGB_EXT* = 0x00008582 + GL_SOURCE0_ALPHA_EXT* = 0x00008588 + GL_SOURCE1_ALPHA_EXT* = 0x00008589 + GL_SOURCE2_ALPHA_EXT* = 0x0000858A + GL_OPERAND0_RGB_EXT* = 0x00008590 + GL_OPERAND1_RGB_EXT* = 0x00008591 + GL_OPERAND2_RGB_EXT* = 0x00008592 + GL_OPERAND0_ALPHA_EXT* = 0x00008598 + GL_OPERAND1_ALPHA_EXT* = 0x00008599 + GL_OPERAND2_ALPHA_EXT* = 0x0000859A + GL_RGB_SCALE_EXT* = 0x00008573 + GL_ADD_SIGNED_EXT* = 0x00008574 + GL_INTERPOLATE_EXT* = 0x00008575 + GL_CONSTANT_EXT* = 0x00008576 + GL_PRIMARY_COLOR_EXT* = 0x00008577 + GL_PREVIOUS_EXT* = 0x00008578 + + #***** GL_EXT_texture_env_dot3 *****// +const + GL_DOT3_RGB_EXT* = 0x00008740 + GL_DOT3_RGBA_EXT* = 0x00008741 + + #***** GL_EXT_texture_filter_anisotropic *****// +const + GL_TEXTURE_MAX_ANISOTROPY_EXT* = 0x000084FE + GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT* = 0x000084FF + + #***** GL_EXT_texture_lod_bias *****// +const + GL_TEXTURE_FILTER_CONTROL_EXT* = 0x00008500 + GL_TEXTURE_LOD_BIAS_EXT* = 0x00008501 + GL_MAX_TEXTURE_LOD_BIAS_EXT* = 0x000084FD + + #***** GL_EXT_texture_object *****// +const + GL_TEXTURE_PRIORITY_EXT* = 0x00008066 + GL_TEXTURE_RESIDENT_EXT* = 0x00008067 + GL_TEXTURE_1D_BINDING_EXT* = 0x00008068 + GL_TEXTURE_2D_BINDING_EXT* = 0x00008069 + GL_TEXTURE_3D_BINDING_EXT* = 0x0000806A + +proc glGenTexturesEXT*(n: TGLsizei, textures: PGLuint){.dynlib: dllname, importc.} +proc glDeleteTexturesEXT*(n: TGLsizei, textures: PGLuint){.dynlib: dllname, + importc.} +proc glBindTextureEXT*(target: TGLenum, texture: TGLuint){.dynlib: dllname, + importc.} +proc glPrioritizeTexturesEXT*(n: TGLsizei, textures: PGLuint, + priorities: PGLclampf){.dynlib: dllname, importc.} +proc glAreTexturesResidentEXT*(n: TGLsizei, textures: PGLuint, + residences: PGLboolean): TGLboolean{. + dynlib: dllname, importc.} +proc glIsTextureEXT*(texture: TGLuint): TGLboolean{.dynlib: dllname, importc.} + #***** GL_EXT_vertex_array *****// +const + GL_VERTEX_ARRAY_EXT* = 0x00008074 + GL_NORMAL_ARRAY_EXT* = 0x00008075 + GL_COLOR_ARRAY_EXT* = 0x00008076 + GL_INDEX_ARRAY_EXT* = 0x00008077 + GL_TEXTURE_COORD_ARRAY_EXT* = 0x00008078 + GL_EDGE_FLAG_ARRAY_EXT* = 0x00008079 + GL_DOUBLE_EXT* = 0x0000140A + GL_VERTEX_ARRAY_SIZE_EXT* = 0x0000807A + GL_VERTEX_ARRAY_TYPE_EXT* = 0x0000807B + GL_VERTEX_ARRAY_STRIDE_EXT* = 0x0000807C + GL_VERTEX_ARRAY_COUNT_EXT* = 0x0000807D + GL_NORMAL_ARRAY_TYPE_EXT* = 0x0000807E + GL_NORMAL_ARRAY_STRIDE_EXT* = 0x0000807F + GL_NORMAL_ARRAY_COUNT_EXT* = 0x00008080 + GL_COLOR_ARRAY_SIZE_EXT* = 0x00008081 + GL_COLOR_ARRAY_TYPE_EXT* = 0x00008082 + GL_COLOR_ARRAY_STRIDE_EXT* = 0x00008083 + GL_COLOR_ARRAY_COUNT_EXT* = 0x00008084 + GL_INDEX_ARRAY_TYPE_EXT* = 0x00008085 + GL_INDEX_ARRAY_STRIDE_EXT* = 0x00008086 + GL_INDEX_ARRAY_COUNT_EXT* = 0x00008087 + GL_TEXTURE_COORD_ARRAY_SIZE_EXT* = 0x00008088 + GL_TEXTURE_COORD_ARRAY_TYPE_EXT* = 0x00008089 + GL_TEXTURE_COORD_ARRAY_STRIDE_EXT* = 0x0000808A + GL_TEXTURE_COORD_ARRAY_COUNT_EXT* = 0x0000808B + GL_EDGE_FLAG_ARRAY_STRIDE_EXT* = 0x0000808C + GL_EDGE_FLAG_ARRAY_COUNT_EXT* = 0x0000808D + GL_VERTEX_ARRAY_POINTER_EXT* = 0x0000808E + GL_NORMAL_ARRAY_POINTER_EXT* = 0x0000808F + GL_COLOR_ARRAY_POINTER_EXT* = 0x00008090 + GL_INDEX_ARRAY_POINTER_EXT* = 0x00008091 + GL_TEXTURE_COORD_ARRAY_POINTER_EXT* = 0x00008092 + GL_EDGE_FLAG_ARRAY_POINTER_EXT* = 0x00008093 + +proc glArrayElementEXT*(i: TGLint){.dynlib: dllname, importc.} +proc glDrawArraysEXT*(mode: TGLenum, first: TGLint, count: TGLsizei){. + dynlib: dllname, importc.} +proc glVertexPointerEXT*(size: TGLint, thetype: TGLenum, stride: TGLsizei, + count: TGLsizei, pointer: PGLvoid){.dynlib: dllname, + importc.} +proc glNormalPointerEXT*(thetype: TGLenum, stride: TGLsizei, count: TGLsizei, + pointer: PGLvoid){.dynlib: dllname, importc.} +proc glColorPointerEXT*(size: TGLint, thetype: TGLenum, stride: TGLsizei, + count: TGLsizei, pointer: PGLvoid){.dynlib: dllname, + importc.} +proc glIndexPointerEXT*(thetype: TGLenum, stride: TGLsizei, count: TGLsizei, + pointer: PGLvoid){.dynlib: dllname, importc.} +proc glTexCoordPointerEXT*(size: TGLint, thetype: TGLenum, stride: TGLsizei, + count: TGLsizei, pointer: PGLvoid){.dynlib: dllname, + importc.} +proc glEdgeFlagPointerEXT*(stride: TGLsizei, count: TGLsizei, pointer: PGLboolean){. + dynlib: dllname, importc.} +proc glGetPointervEXT*(pname: TGLenum, params: PGLvoid){.dynlib: dllname, importc.} + #***** GL_EXT_vertex_shader *****// +const + GL_VERTEX_SHADER_EXT* = 0x00008780 + GL_VARIANT_VALUE_EXT* = 0x000087E4 + GL_VARIANT_DATATYPE_EXT* = 0x000087E5 + GL_VARIANT_ARRAY_STRIDE_EXT* = 0x000087E6 + GL_VARIANT_ARRAY_TYPE_EXT* = 0x000087E7 + GL_VARIANT_ARRAY_EXT* = 0x000087E8 + GL_VARIANT_ARRAY_POINTER_EXT* = 0x000087E9 + GL_INVARIANT_VALUE_EXT* = 0x000087EA + GL_INVARIANT_DATATYPE_EXT* = 0x000087EB + GL_LOCAL_CONSTANT_VALUE_EXT* = 0x000087EC + GL_LOCAL_CONSTANT_DATATYPE_EXT* = 0x000087ED + GL_OP_INDEX_EXT* = 0x00008782 + GL_OP_NEGATE_EXT* = 0x00008783 + GL_OP_DOT3_EXT* = 0x00008784 + GL_OP_DOT4_EXT* = 0x00008785 + GL_OP_MUL_EXT* = 0x00008786 + GL_OP_ADD_EXT* = 0x00008787 + GL_OP_MADD_EXT* = 0x00008788 + GL_OP_FRAC_EXT* = 0x00008789 + GL_OP_MAX_EXT* = 0x0000878A + GL_OP_MIN_EXT* = 0x0000878B + GL_OP_SET_GE_EXT* = 0x0000878C + GL_OP_SET_LT_EXT* = 0x0000878D + GL_OP_CLAMP_EXT* = 0x0000878E + GL_OP_FLOOR_EXT* = 0x0000878F + GL_OP_ROUND_EXT* = 0x00008790 + GL_OP_EXP_BASE_2_EXT* = 0x00008791 + GL_OP_LOG_BASE_2_EXT* = 0x00008792 + GL_OP_POWER_EXT* = 0x00008793 + GL_OP_RECIP_EXT* = 0x00008794 + GL_OP_RECIP_SQRT_EXT* = 0x00008795 + GL_OP_SUB_EXT* = 0x00008796 + GL_OP_CROSS_PRODUCT_EXT* = 0x00008797 + GL_OP_MULTIPLY_MATRIX_EXT* = 0x00008798 + GL_OP_MOV_EXT* = 0x00008799 + GL_OUTPUT_VERTEX_EXT* = 0x0000879A + GL_OUTPUT_COLOR0_EXT* = 0x0000879B + GL_OUTPUT_COLOR1_EXT* = 0x0000879C + GL_OUTPUT_TEXTURE_COORD0_EXT* = 0x0000879D + GL_OUTPUT_TEXTURE_COORD1_EXT* = 0x0000879E + GL_OUTPUT_TEXTURE_COORD2_EXT* = 0x0000879F + GL_OUTPUT_TEXTURE_COORD3_EXT* = 0x000087A0 + GL_OUTPUT_TEXTURE_COORD4_EXT* = 0x000087A1 + GL_OUTPUT_TEXTURE_COORD5_EXT* = 0x000087A2 + GL_OUTPUT_TEXTURE_COORD6_EXT* = 0x000087A3 + GL_OUTPUT_TEXTURE_COORD7_EXT* = 0x000087A4 + GL_OUTPUT_TEXTURE_COORD8_EXT* = 0x000087A5 + GL_OUTPUT_TEXTURE_COORD9_EXT* = 0x000087A6 + GL_OUTPUT_TEXTURE_COORD10_EXT* = 0x000087A7 + GL_OUTPUT_TEXTURE_COORD11_EXT* = 0x000087A8 + GL_OUTPUT_TEXTURE_COORD12_EXT* = 0x000087A9 + GL_OUTPUT_TEXTURE_COORD13_EXT* = 0x000087AA + GL_OUTPUT_TEXTURE_COORD14_EXT* = 0x000087AB + GL_OUTPUT_TEXTURE_COORD15_EXT* = 0x000087AC + GL_OUTPUT_TEXTURE_COORD16_EXT* = 0x000087AD + GL_OUTPUT_TEXTURE_COORD17_EXT* = 0x000087AE + GL_OUTPUT_TEXTURE_COORD18_EXT* = 0x000087AF + GL_OUTPUT_TEXTURE_COORD19_EXT* = 0x000087B0 + GL_OUTPUT_TEXTURE_COORD20_EXT* = 0x000087B1 + GL_OUTPUT_TEXTURE_COORD21_EXT* = 0x000087B2 + GL_OUTPUT_TEXTURE_COORD22_EXT* = 0x000087B3 + GL_OUTPUT_TEXTURE_COORD23_EXT* = 0x000087B4 + GL_OUTPUT_TEXTURE_COORD24_EXT* = 0x000087B5 + GL_OUTPUT_TEXTURE_COORD25_EXT* = 0x000087B6 + GL_OUTPUT_TEXTURE_COORD26_EXT* = 0x000087B7 + GL_OUTPUT_TEXTURE_COORD27_EXT* = 0x000087B8 + GL_OUTPUT_TEXTURE_COORD28_EXT* = 0x000087B9 + GL_OUTPUT_TEXTURE_COORD29_EXT* = 0x000087BA + GL_OUTPUT_TEXTURE_COORD30_EXT* = 0x000087BB + GL_OUTPUT_TEXTURE_COORD31_EXT* = 0x000087BC + GL_OUTPUT_FOG_EXT* = 0x000087BD + GL_SCALAR_EXT* = 0x000087BE + GL_VECTOR_EXT* = 0x000087BF + GL_MATRIX_EXT* = 0x000087C0 + GL_VARIANT_EXT* = 0x000087C1 + GL_INVARIANT_EXT* = 0x000087C2 + GL_LOCAL_CONSTANT_EXT* = 0x000087C3 + GL_LOCAL_EXT* = 0x000087C4 + GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT* = 0x000087C5 + GL_MAX_VERTEX_SHADER_VARIANTS_EXT* = 0x000087C6 + GL_MAX_VERTEX_SHADER_INVARIANTS_EXT* = 0x000087C7 + GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT* = 0x000087C8 + GL_MAX_VERTEX_SHADER_LOCALS_EXT* = 0x000087C9 + GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT* = 0x000087CA + GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT* = 0x000087CB + GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT* = 0x000087CC + GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT* = 0x000087CD + GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT* = 0x000087CE + GL_VERTEX_SHADER_INSTRUCTIONS_EXT* = 0x000087CF + GL_VERTEX_SHADER_VARIANTS_EXT* = 0x000087D0 + GL_VERTEX_SHADER_INVARIANTS_EXT* = 0x000087D1 + GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT* = 0x000087D2 + GL_VERTEX_SHADER_LOCALS_EXT* = 0x000087D3 + GL_VERTEX_SHADER_BINDING_EXT* = 0x00008781 + GL_VERTEX_SHADER_OPTIMIZED_EXT* = 0x000087D4 + GL_X_EXT* = 0x000087D5 + GL_Y_EXT* = 0x000087D6 + GL_Z_EXT* = 0x000087D7 + GL_W_EXT* = 0x000087D8 + GL_NEGATIVE_X_EXT* = 0x000087D9 + GL_NEGATIVE_Y_EXT* = 0x000087DA + GL_NEGATIVE_Z_EXT* = 0x000087DB + GL_NEGATIVE_W_EXT* = 0x000087DC + GL_ZERO_EXT* = 0x000087DD + GL_ONE_EXT* = 0x000087DE + GL_NEGATIVE_ONE_EXT* = 0x000087DF + GL_NORMALIZED_RANGE_EXT* = 0x000087E0 + GL_FULL_RANGE_EXT* = 0x000087E1 + GL_CURRENT_VERTEX_EXT* = 0x000087E2 + GL_MVP_MATRIX_EXT* = 0x000087E3 + +proc glBeginVertexShaderEXT*(){.dynlib: dllname, importc.} +proc glEndVertexShaderEXT*(){.dynlib: dllname, importc.} +proc glBindVertexShaderEXT*(id: TGLuint){.dynlib: dllname, importc.} +proc glGenVertexShadersEXT*(range: TGLuint): TGLuint{.dynlib: dllname, importc.} +proc glDeleteVertexShaderEXT*(id: TGLuint){.dynlib: dllname, importc.} +proc glShaderOp1EXT*(op: TGLenum, res: TGLuint, arg1: TGLuint){.dynlib: dllname, + importc.} +proc glShaderOp2EXT*(op: TGLenum, res: TGLuint, arg1: TGLuint, arg2: TGLuint){. + dynlib: dllname, importc.} +proc glShaderOp3EXT*(op: TGLenum, res: TGLuint, arg1: TGLuint, arg2: TGLuint, + arg3: TGLuint){.dynlib: dllname, importc.} +proc glSwizzleEXT*(res: TGLuint, theIn: TGLuint, outX: TGLenum, outY: TGLenum, + outZ: TGLenum, outW: TGLenum){.dynlib: dllname, importc.} +proc glWriteMaskEXT*(res: TGLuint, theIn: TGLuint, outX: TGLenum, outY: TGLenum, + outZ: TGLenum, outW: TGLenum){.dynlib: dllname, importc.} +proc glInsertComponentEXT*(res: TGLuint, src: TGLuint, num: TGLuint){. + dynlib: dllname, importc.} +proc glExtractComponentEXT*(res: TGLuint, src: TGLuint, num: TGLuint){. + dynlib: dllname, importc.} +proc glGenSymbolsEXT*(datatype: TGLenum, storagetype: TGLenum, range: TGLenum, + components: TGLuint): TGLuint{.dynlib: dllname, importc.} +proc glSetInvariantEXT*(id: TGLuint, thetype: TGLenum, address: PGLvoid){. + dynlib: dllname, importc.} +proc glSetLocalConstantEXT*(id: TGLuint, thetype: TGLenum, address: PGLvoid){. + dynlib: dllname, importc.} +proc glVariantbvEXT*(id: TGLuint, address: PGLbyte){.dynlib: dllname, importc.} +proc glVariantsvEXT*(id: TGLuint, address: PGLshort){.dynlib: dllname, importc.} +proc glVariantivEXT*(id: TGLuint, address: PGLint){.dynlib: dllname, importc.} +proc glVariantfvEXT*(id: TGLuint, address: PGLfloat){.dynlib: dllname, importc.} +proc glVariantdvEXT*(id: TGLuint, address: PGLdouble){.dynlib: dllname, importc.} +proc glVariantubvEXT*(id: TGLuint, address: PGLubyte){.dynlib: dllname, importc.} +proc glVariantusvEXT*(id: TGLuint, address: PGLushort){.dynlib: dllname, importc.} +proc glVariantuivEXT*(id: TGLuint, address: PGLuint){.dynlib: dllname, importc.} +proc glVariantPointerEXT*(id: TGLuint, thetype: TGLenum, stride: TGLuint, + address: PGLvoid){.dynlib: dllname, importc.} +proc glEnableVariantClientStateEXT*(id: TGLuint){.dynlib: dllname, importc.} +proc glDisableVariantClientStateEXT*(id: TGLuint){.dynlib: dllname, importc.} +proc glBindLightParameterEXT*(light: TGLenum, value: TGLenum): TGLuint{. + dynlib: dllname, importc.} +proc glBindMaterialParameterEXT*(face: TGLenum, value: TGLenum): TGLuint{. + dynlib: dllname, importc.} +proc glBindTexGenParameterEXT*(theunit: TGLenum, coord: TGLenum, value: TGLenum): TGLuint{. + dynlib: dllname, importc.} +proc glBindTextureUnitParameterEXT*(theunit: TGLenum, value: TGLenum): TGLuint{. + dynlib: dllname, importc.} +proc glBindParameterEXT*(value: TGLenum): TGLuint{.dynlib: dllname, importc.} +proc glIsVariantEnabledEXT*(id: TGLuint, cap: TGLenum): TGLboolean{. + dynlib: dllname, importc.} +proc glGetVariantBooleanvEXT*(id: TGLuint, value: TGLenum, data: PGLboolean){. + dynlib: dllname, importc.} +proc glGetVariantIntegervEXT*(id: TGLuint, value: TGLenum, data: PGLint){. + dynlib: dllname, importc.} +proc glGetVariantFloatvEXT*(id: TGLuint, value: TGLenum, data: PGLfloat){. + dynlib: dllname, importc.} +proc glGetVariantPointervEXT*(id: TGLuint, value: TGLenum, data: PGLvoid){. + dynlib: dllname, importc.} +proc glGetInvariantBooleanvEXT*(id: TGLuint, value: TGLenum, data: PGLboolean){. + dynlib: dllname, importc.} +proc glGetInvariantIntegervEXT*(id: TGLuint, value: TGLenum, data: PGLint){. + dynlib: dllname, importc.} +proc glGetInvariantFloatvEXT*(id: TGLuint, value: TGLenum, data: PGLfloat){. + dynlib: dllname, importc.} +proc glGetLocalConstantBooleanvEXT*(id: TGLuint, value: TGLenum, data: PGLboolean){. + dynlib: dllname, importc.} +proc glGetLocalConstantIntegervEXT*(id: TGLuint, value: TGLenum, data: PGLint){. + dynlib: dllname, importc.} +proc glGetLocalConstantFloatvEXT*(id: TGLuint, value: TGLenum, data: PGLfloat){. + dynlib: dllname, importc.} + #***** GL_EXT_vertex_weighting *****// +const + GL_VERTEX_WEIGHTING_EXT* = 0x00008509 + GL_MODELVIEW0_EXT* = 0x00001700 + GL_MODELVIEW1_EXT* = 0x0000850A + GL_MODELVIEW0_MATRIX_EXT* = 0x00000BA6 + GL_MODELVIEW1_MATRIX_EXT* = 0x00008506 + GL_CURRENT_VERTEX_WEIGHT_EXT* = 0x0000850B + GL_VERTEX_WEIGHT_ARRAY_EXT* = 0x0000850C + GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT* = 0x0000850D + GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT* = 0x0000850E + GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT* = 0x0000850F + GL_MODELVIEW0_STACK_DEPTH_EXT* = 0x00000BA3 + GL_MODELVIEW1_STACK_DEPTH_EXT* = 0x00008502 + GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT* = 0x00008510 + +proc glVertexWeightfEXT*(weight: TGLfloat){.dynlib: dllname, importc.} +proc glVertexWeightfvEXT*(weight: PGLfloat){.dynlib: dllname, importc.} +proc glVertexWeightPointerEXT*(size: TGLint, thetype: TGLenum, stride: TGLsizei, + pointer: PGLvoid){.dynlib: dllname, importc.} + #***** GL_HP_occlusion_test *****// +const + GL_OCCLUSION_TEST_HP* = 0x00008165 + GL_OCCLUSION_TEST_RESULT_HP* = 0x00008166 + + #***** GL_NV_blend_square *****// + #***** GL_NV_copy_depth_to_color *****// +const + GL_DEPTH_STENCIL_TO_RGBA_NV* = 0x0000886E + GL_DEPTH_STENCIL_TO_BGRA_NV* = 0x0000886F + + #***** GL_NV_depth_clamp *****// +const + GL_DEPTH_CLAMP_NV* = 0x0000864F + + #***** GL_NV_evaluators *****// +const + GL_EVAL_2D_NV* = 0x000086C0 + GL_EVAL_TRIANGULAR_2D_NV* = 0x000086C1 + GL_MAP_TESSELLATION_NV* = 0x000086C2 + GL_MAP_ATTRIB_U_ORDER_NV* = 0x000086C3 + GL_MAP_ATTRIB_V_ORDER_NV* = 0x000086C4 + GL_EVAL_FRACTIONAL_TESSELLATION_NV* = 0x000086C5 + GL_EVAL_VERTEX_ATTRIB0_NV* = 0x000086C6 + GL_EVAL_VERTEX_ATTRIB1_NV* = 0x000086C7 + GL_EVAL_VERTEX_ATTRIB2_NV* = 0x000086C8 + GL_EVAL_VERTEX_ATTRIB3_NV* = 0x000086C9 + GL_EVAL_VERTEX_ATTRIB4_NV* = 0x000086CA + GL_EVAL_VERTEX_ATTRIB5_NV* = 0x000086CB + GL_EVAL_VERTEX_ATTRIB6_NV* = 0x000086CC + GL_EVAL_VERTEX_ATTRIB7_NV* = 0x000086CD + GL_EVAL_VERTEX_ATTRIB8_NV* = 0x000086CE + GL_EVAL_VERTEX_ATTRIB9_NV* = 0x000086CF + GL_EVAL_VERTEX_ATTRIB10_NV* = 0x000086D0 + GL_EVAL_VERTEX_ATTRIB11_NV* = 0x000086D1 + GL_EVAL_VERTEX_ATTRIB12_NV* = 0x000086D2 + GL_EVAL_VERTEX_ATTRIB13_NV* = 0x000086D3 + GL_EVAL_VERTEX_ATTRIB14_NV* = 0x000086D4 + GL_EVAL_VERTEX_ATTRIB15_NV* = 0x000086D5 + GL_MAX_MAP_TESSELLATION_NV* = 0x000086D6 + GL_MAX_RATIONAL_EVAL_ORDER_NV* = 0x000086D7 + +proc glMapControlPointsNV*(target: TGLenum, index: TGLuint, thetype: TGLenum, + ustride: TGLsizei, vstride: TGLsizei, uorder: TGLint, + vorder: TGLint, thepacked: TGLboolean, points: PGLvoid){. + dynlib: dllname, importc.} +proc glMapParameterivNV*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glMapParameterfvNV*(target: TGLenum, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glGetMapControlPointsNV*(target: TGLenum, index: TGLuint, thetype: TGLenum, + ustride: TGLsizei, vstride: TGLsizei, + thepacked: TGLboolean, points: PGLvoid){. + dynlib: dllname, importc.} +proc glGetMapParameterivNV*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetMapParameterfvNV*(target: TGLenum, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glGetMapAttribParameterivNV*(target: TGLenum, index: TGLuint, pname: TGLenum, + params: PGLint){.dynlib: dllname, importc.} +proc glGetMapAttribParameterfvNV*(target: TGLenum, index: TGLuint, pname: TGLenum, + params: PGLfloat){.dynlib: dllname, importc.} +proc glEvalMapsNV*(target: TGLenum, mode: TGLenum){.dynlib: dllname, importc.} + #***** GL_NV_fence *****// +const + GL_ALL_COMPLETED_NV* = 0x000084F2 + GL_FENCE_STATUS_NV* = 0x000084F3 + GL_FENCE_CONDITION_NV* = 0x000084F4 + +proc glGenFencesNV*(n: TGLsizei, fences: PGLuint){.dynlib: dllname, importc.} +proc glDeleteFencesNV*(n: TGLsizei, fences: PGLuint){.dynlib: dllname, importc.} +proc glSetFenceNV*(fence: TGLuint, condition: TGLenum){.dynlib: dllname, importc.} +proc glTestFenceNV*(fence: TGLuint): TGLboolean{.dynlib: dllname, importc.} +proc glFinishFenceNV*(fence: TGLuint){.dynlib: dllname, importc.} +proc glIsFenceNV*(fence: TGLuint): TGLboolean{.dynlib: dllname, importc.} +proc glGetFenceivNV*(fence: TGLuint, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} + #***** GL_NV_fog_distance *****// +const + GL_FOG_DISTANCE_MODE_NV* = 0x0000855A + GL_EYE_RADIAL_NV* = 0x0000855B + GL_EYE_PLANE_ABSOLUTE_NV* = 0x0000855C + + #***** GL_NV_light_max_exponent *****// +const + GL_MAX_SHININESS_NV* = 0x00008504 + GL_MAX_SPOT_EXPONENT_NV* = 0x00008505 + + #***** GL_NV_multisample_filter_hint *****// +const + GL_MULTISAMPLE_FILTER_HINT_NV* = 0x00008534 + + #***** GL_NV_occlusion_query *****// + # GL_OCCLUSION_TEST_HP { already defined } + # GL_OCCLUSION_TEST_RESULT_HP { already defined } +const + GL_PIXEL_COUNTER_BITS_NV* = 0x00008864 + GL_CURRENT_OCCLUSION_QUERY_ID_NV* = 0x00008865 + GL_PIXEL_COUNT_NV* = 0x00008866 + GL_PIXEL_COUNT_AVAILABLE_NV* = 0x00008867 + +proc glGenOcclusionQueriesNV*(n: TGLsizei, ids: PGLuint){.dynlib: dllname, + importc.} +proc glDeleteOcclusionQueriesNV*(n: TGLsizei, ids: PGLuint){.dynlib: dllname, + importc.} +proc glIsOcclusionQueryNV*(id: TGLuint): TGLboolean{.dynlib: dllname, importc.} +proc glBeginOcclusionQueryNV*(id: TGLuint){.dynlib: dllname, importc.} +proc glEndOcclusionQueryNV*(){.dynlib: dllname, importc.} +proc glGetOcclusionQueryivNV*(id: TGLuint, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetOcclusionQueryuivNV*(id: TGLuint, pname: TGLenum, params: PGLuint){. + dynlib: dllname, importc.} + #***** GL_NV_packed_depth_stencil *****// +const + GL_DEPTH_STENCIL_NV* = 0x000084F9 + GL_UNSIGNED_INT_24_8_NV* = 0x000084FA + + #***** GL_NV_point_sprite *****// +const + GL_POINT_SPRITE_NV* = 0x00008861 + GL_COORD_REPLACE_NV* = 0x00008862 + GL_POINT_SPRITE_R_MODE_NV* = 0x00008863 + +proc glPointParameteriNV*(pname: TGLenum, param: TGLint){.dynlib: dllname, importc.} +proc glPointParameterivNV*(pname: TGLenum, params: PGLint){.dynlib: dllname, + importc.} + #***** GL_NV_register_combiners *****// +const + GL_REGISTER_COMBINERS_NV* = 0x00008522 + GL_COMBINER0_NV* = 0x00008550 + GL_COMBINER1_NV* = 0x00008551 + GL_COMBINER2_NV* = 0x00008552 + GL_COMBINER3_NV* = 0x00008553 + GL_COMBINER4_NV* = 0x00008554 + GL_COMBINER5_NV* = 0x00008555 + GL_COMBINER6_NV* = 0x00008556 + GL_COMBINER7_NV* = 0x00008557 + GL_VARIABLE_A_NV* = 0x00008523 + GL_VARIABLE_B_NV* = 0x00008524 + GL_VARIABLE_C_NV* = 0x00008525 + GL_VARIABLE_D_NV* = 0x00008526 + GL_VARIABLE_E_NV* = 0x00008527 + GL_VARIABLE_F_NV* = 0x00008528 + GL_VARIABLE_G_NV* = 0x00008529 + GL_CONSTANT_COLOR0_NV* = 0x0000852A + GL_CONSTANT_COLOR1_NV* = 0x0000852B + GL_PRIMARY_COLOR_NV* = 0x0000852C + GL_SECONDARY_COLOR_NV* = 0x0000852D + GL_SPARE0_NV* = 0x0000852E + GL_SPARE1_NV* = 0x0000852F + GL_UNSIGNED_IDENTITY_NV* = 0x00008536 + GL_UNSIGNED_INVERT_NV* = 0x00008537 + GL_EXPAND_NORMAL_NV* = 0x00008538 + GL_EXPAND_NEGATE_NV* = 0x00008539 + GL_HALF_BIAS_NORMAL_NV* = 0x0000853A + GL_HALF_BIAS_NEGATE_NV* = 0x0000853B + GL_SIGNED_IDENTITY_NV* = 0x0000853C + GL_SIGNED_NEGATE_NV* = 0x0000853D + GL_E_TIMES_F_NV* = 0x00008531 + GL_SPARE0_PLUS_SECONDARY_COLOR_NV* = 0x00008532 + GL_SCALE_BY_TWO_NV* = 0x0000853E + GL_SCALE_BY_FOUR_NV* = 0x0000853F + GL_SCALE_BY_ONE_HALF_NV* = 0x00008540 + GL_BIAS_BY_NEGATIVE_ONE_HALF_NV* = 0x00008541 + GL_DISCARD_NV* = 0x00008530 + constGL_COMBINER_INPUT_NV* = 0x00008542 + GL_COMBINER_MAPPING_NV* = 0x00008543 + GL_COMBINER_COMPONENT_USAGE_NV* = 0x00008544 + GL_COMBINER_AB_DOT_PRODUCT_NV* = 0x00008545 + GL_COMBINER_CD_DOT_PRODUCT_NV* = 0x00008546 + GL_COMBINER_MUX_SUM_NV* = 0x00008547 + GL_COMBINER_SCALE_NV* = 0x00008548 + GL_COMBINER_BIAS_NV* = 0x00008549 + GL_COMBINER_AB_OUTPUT_NV* = 0x0000854A + GL_COMBINER_CD_OUTPUT_NV* = 0x0000854B + GL_COMBINER_SUM_OUTPUT_NV* = 0x0000854C + GL_NUM_GENERAL_COMBINERS_NV* = 0x0000854E + GL_COLOR_SUM_CLAMP_NV* = 0x0000854F + GL_MAX_GENERAL_COMBINERS_NV* = 0x0000854D + +proc glCombinerParameterfvNV*(pname: TGLenum, params: PGLfloat){.dynlib: dllname, + importc.} +proc glCombinerParameterivNV*(pname: TGLenum, params: PGLint){.dynlib: dllname, + importc.} +proc glCombinerParameterfNV*(pname: TGLenum, param: TGLfloat){.dynlib: dllname, + importc.} +proc glCombinerParameteriNV*(pname: TGLenum, param: TGLint){.dynlib: dllname, + importc.} +proc glCombinerInputNV*(stage: TGLenum, portion: TGLenum, variable: TGLenum, + input: TGLenum, mapping: TGLenum, componentUsage: TGLenum){. + dynlib: dllname, importc.} +proc glCombinerOutputNV*(stage: TGLenum, portion: TGLenum, abOutput: TGLenum, + cdOutput: TGLenum, sumOutput: TGLenum, scale: TGLenum, + bias: TGLenum, abDotProduct: TGLboolean, + cdDotProduct: TGLboolean, muxSum: TGLboolean){. + dynlib: dllname, importc.} +proc glFinalCombinerInputNV*(variable: TGLenum, input: TGLenum, mapping: TGLenum, + componentUsage: TGLenum){.dynlib: dllname, importc.} +proc glGetCombinerInputParameterfvNV*(stage: TGLenum, portion: TGLenum, + variable: TGLenum, pname: TGLenum, + params: PGLfloat){.dynlib: dllname, + importc.} +proc glGetCombinerInputParameterivNV*(stage: TGLenum, portion: TGLenum, + variable: TGLenum, pname: TGLenum, + params: PGLint){.dynlib: dllname, importc.} +proc glGetCombinerOutputParameterfvNV*(stage: TGLenum, portion: TGLenum, + pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glGetCombinerOutputParameterivNV*(stage: TGLenum, portion: TGLenum, + pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetFinalCombinerInputParameterfvNV*(variable: TGLenum, pname: TGLenum, + params: PGLfloat){.dynlib: dllname, importc.} +proc glGetFinalCombinerInputParameterivNV*(variable: TGLenum, pname: TGLenum, + params: PGLint){.dynlib: dllname, importc.} + #***** GL_NV_register_combiners2 *****// +const + GL_PER_STAGE_CONSTANTS_NV* = 0x00008535 + +proc glCombinerStageParameterfvNV*(stage: TGLenum, pname: TGLenum, + params: PGLfloat){.dynlib: dllname, importc.} +proc glGetCombinerStageParameterfvNV*(stage: TGLenum, pname: TGLenum, + params: PGLfloat){.dynlib: dllname, + importc.} + #***** GL_NV_texgen_emboss *****// +const + GL_EMBOSS_MAP_NV* = 0x0000855F + GL_EMBOSS_LIGHT_NV* = 0x0000855D + GL_EMBOSS_CONSTANT_NV* = 0x0000855E + + #***** GL_NV_texgen_reflection *****// +const + GL_NORMAL_MAP_NV* = 0x00008511 + GL_REFLECTION_MAP_NV* = 0x00008512 + + #***** GL_NV_texture_compression_vtc *****// + # GL_COMPRESSED_RGB_S3TC_DXT1_EXT { already defined } + # GL_COMPRESSED_RGBA_S3TC_DXT1_EXT { already defined } + # GL_COMPRESSED_RGBA_S3TC_DXT3_EXT { already defined } + # GL_COMPRESSED_RGBA_S3TC_DXT5_EXT { already defined } + #***** GL_NV_texture_env_combine4 *****// +const + GL_COMBINE4_NV* = 0x00008503 + GL_SOURCE3_RGB_NV* = 0x00008583 + GL_SOURCE3_ALPHA_NV* = 0x0000858B + GL_OPERAND3_RGB_NV* = 0x00008593 + GL_OPERAND3_ALPHA_NV* = 0x0000859B + + #***** GL_NV_texture_rectangle *****// +const + GL_TEXTURE_RECTANGLE_NV* = 0x000084F5 + GL_TEXTURE_BINDING_RECTANGLE_NV* = 0x000084F6 + GL_PROXY_TEXTURE_RECTANGLE_NV* = 0x000084F7 + GL_MAX_RECTANGLE_TEXTURE_SIZE_NV* = 0x000084F8 + + #***** GL_NV_texture_shader *****// +const + GL_TEXTURE_SHADER_NV* = 0x000086DE + GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV* = 0x000086D9 + GL_SHADER_OPERATION_NV* = 0x000086DF + GL_CULL_MODES_NV* = 0x000086E0 + GL_OFFSET_TEXTURE_MATRIX_NV* = 0x000086E1 + GL_OFFSET_TEXTURE_SCALE_NV* = 0x000086E2 + GL_OFFSET_TEXTURE_BIAS_NV* = 0x000086E3 + GL_PREVIOUS_TEXTURE_INPUT_NV* = 0x000086E4 + GL_CONST_EYE_NV* = 0x000086E5 + GL_SHADER_CONSISTENT_NV* = 0x000086DD + GL_PASS_THROUGH_NV* = 0x000086E6 + GL_CULL_FRAGMENT_NV* = 0x000086E7 + GL_OFFSET_TEXTURE_2D_NV* = 0x000086E8 + GL_OFFSET_TEXTURE_RECTANGLE_NV* = 0x0000864C + GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV* = 0x0000864D + GL_DEPENDENT_AR_TEXTURE_2D_NV* = 0x000086E9 + GL_DEPENDENT_GB_TEXTURE_2D_NV* = 0x000086EA + GL_DOT_PRODUCT_NV* = 0x000086EC + GL_DOT_PRODUCT_DEPTH_REPLACE_NV* = 0x000086ED + GL_DOT_PRODUCT_TEXTURE_2D_NV* = 0x000086EE + GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV* = 0x0000864E + GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV* = 0x000086F0 + GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV* = 0x000086F1 + GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV* = 0x000086F2 + GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV* = 0x000086F3 + GL_HILO_NV* = 0x000086F4 + GL_DSDT_NV* = 0x000086F5 + GL_DSDT_MAG_NV* = 0x000086F6 + GL_DSDT_MAG_VIB_NV* = 0x000086F7 + GL_UNSIGNED_INT_S8_S8_8_8_NV* = 0x000086DA + GL_UNSIGNED_INT_8_8_S8_S8_REV_NV* = 0x000086DB + GL_SIGNED_RGBA_NV* = 0x000086FB + GL_SIGNED_RGBA8_NV* = 0x000086FC + GL_SIGNED_RGB_NV* = 0x000086FE + GL_SIGNED_RGB8_NV* = 0x000086FF + GL_SIGNED_LUMINANCE_NV* = 0x00008701 + GL_SIGNED_LUMINANCE8_NV* = 0x00008702 + GL_SIGNED_LUMINANCE_ALPHA_NV* = 0x00008703 + GL_SIGNED_LUMINANCE8_ALPHA8_NV* = 0x00008704 + GL_SIGNED_ALPHA_NV* = 0x00008705 + GL_SIGNED_ALPHA8_NV* = 0x00008706 + GL_SIGNED_INTENSITY_NV* = 0x00008707 + GL_SIGNED_INTENSITY8_NV* = 0x00008708 + GL_SIGNED_RGB_UNSIGNED_ALPHA_NV* = 0x0000870C + GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV* = 0x0000870D + GL_HILO16_NV* = 0x000086F8 + GL_SIGNED_HILO_NV* = 0x000086F9 + GL_SIGNED_HILO16_NV* = 0x000086FA + GL_DSDT8_NV* = 0x00008709 + GL_DSDT8_MAG8_NV* = 0x0000870A + GL_DSDT_MAG_INTENSITY_NV* = 0x000086DC + GL_DSDT8_MAG8_INTENSITY8_NV* = 0x0000870B + GL_HI_SCALE_NV* = 0x0000870E + GL_LO_SCALE_NV* = 0x0000870F + GL_DS_SCALE_NV* = 0x00008710 + GL_DT_SCALE_NV* = 0x00008711 + GL_MAGNITUDE_SCALE_NV* = 0x00008712 + GL_VIBRANCE_SCALE_NV* = 0x00008713 + GL_HI_BIAS_NV* = 0x00008714 + GL_LO_BIAS_NV* = 0x00008715 + GL_DS_BIAS_NV* = 0x00008716 + GL_DT_BIAS_NV* = 0x00008717 + GL_MAGNITUDE_BIAS_NV* = 0x00008718 + GL_VIBRANCE_BIAS_NV* = 0x00008719 + GL_TEXTURE_BORDER_VALUES_NV* = 0x0000871A + GL_TEXTURE_HI_SIZE_NV* = 0x0000871B + GL_TEXTURE_LO_SIZE_NV* = 0x0000871C + GL_TEXTURE_DS_SIZE_NV* = 0x0000871D + GL_TEXTURE_DT_SIZE_NV* = 0x0000871E + GL_TEXTURE_MAG_SIZE_NV* = 0x0000871F + + #***** GL_NV_texture_shader2 *****// +const + GL_DOT_PRODUCT_TEXTURE_3D_NV* = 0x000086EF # GL_HILO_NV { already defined } + # GL_DSDT_NV { already defined } + # GL_DSDT_MAG_NV { already defined } + # GL_DSDT_MAG_VIB_NV { already defined } + # GL_UNSIGNED_INT_S8_S8_8_8_NV { already defined } + # GL_UNSIGNED_INT_8_8_S8_S8_REV_NV { already defined } + # GL_SIGNED_RGBA_NV { already defined } + # GL_SIGNED_RGBA8_NV { already defined } + # GL_SIGNED_RGB_NV { already defined } + # GL_SIGNED_RGB8_NV { already defined } + # GL_SIGNED_LUMINANCE_NV { already defined } + # GL_SIGNED_LUMINANCE8_NV { already defined } + # GL_SIGNED_LUMINANCE_ALPHA_NV { already defined } + # GL_SIGNED_LUMINANCE8_ALPHA8_NV { already defined } + # GL_SIGNED_ALPHA_NV { already defined } + # GL_SIGNED_ALPHA8_NV { already defined } + # GL_SIGNED_INTENSITY_NV { already defined } + # GL_SIGNED_INTENSITY8_NV { already defined } + # GL_SIGNED_RGB_UNSIGNED_ALPHA_NV { already defined } + # GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV { already defined } + # GL_HILO16_NV { already defined } + # GL_SIGNED_HILO_NV { already defined } + # GL_SIGNED_HILO16_NV { already defined } + # GL_DSDT8_NV { already defined } + # GL_DSDT8_MAG8_NV { already defined } + # GL_DSDT_MAG_INTENSITY_NV { already defined } + # GL_DSDT8_MAG8_INTENSITY8_NV { already defined } + + #***** GL_NV_texture_shader3 *****// +const + GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV* = 0x00008850 + GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV* = 0x00008851 + GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV* = 0x00008852 + GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV* = 0x00008853 + GL_OFFSET_HILO_TEXTURE_2D_NV* = 0x00008854 + GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV* = 0x00008855 + GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV* = 0x00008856 + GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV* = 0x00008857 + GL_DEPENDENT_HILO_TEXTURE_2D_NV* = 0x00008858 + GL_DEPENDENT_RGB_TEXTURE_3D_NV* = 0x00008859 + GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV* = 0x0000885A + GL_DOT_PRODUCT_PASS_THROUGH_NV* = 0x0000885B + GL_DOT_PRODUCT_TEXTURE_1D_NV* = 0x0000885C + GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV* = 0x0000885D + GL_HILO8_NV* = 0x0000885E + GL_SIGNED_HILO8_NV* = 0x0000885F + GL_FORCE_BLUE_TO_ONE_NV* = 0x00008860 + + #***** GL_NV_vertex_array_range *****// +const + constGL_VERTEX_ARRAY_RANGE_NV* = 0x0000851D + GL_VERTEX_ARRAY_RANGE_LENGTH_NV* = 0x0000851E + GL_VERTEX_ARRAY_RANGE_VALID_NV* = 0x0000851F + GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV* = 0x00008520 + GL_VERTEX_ARRAY_RANGE_POINTER_NV* = 0x00008521 + +proc glVertexArrayRangeNV*(len: TGLsizei, pointer: PGLvoid){.dynlib: dllname, + importc.} +proc glFlushVertexArrayRangeNV*(){.dynlib: dllname, importc.} + #***** GL_NV_vertex_array_range2 *****// +const + GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV* = 0x00008533 + + #***** GL_NV_vertex_program *****// +const + GL_VERTEX_PROGRAM_NV* = 0x00008620 + GL_VERTEX_PROGRAM_POINT_SIZE_NV* = 0x00008642 + GL_VERTEX_PROGRAM_TWO_SIDE_NV* = 0x00008643 + GL_VERTEX_STATE_PROGRAM_NV* = 0x00008621 + GL_ATTRIB_ARRAY_SIZE_NV* = 0x00008623 + GL_ATTRIB_ARRAY_STRIDE_NV* = 0x00008624 + GL_ATTRIB_ARRAY_TYPE_NV* = 0x00008625 + GL_CURRENT_ATTRIB_NV* = 0x00008626 + GL_PROGRAM_PARAMETER_NV* = 0x00008644 + GL_ATTRIB_ARRAY_POINTER_NV* = 0x00008645 + GL_PROGRAM_TARGET_NV* = 0x00008646 + GL_PROGRAM_LENGTH_NV* = 0x00008627 + GL_PROGRAM_RESIDENT_NV* = 0x00008647 + GL_PROGRAM_STRING_NV* = 0x00008628 + constGL_TRACK_MATRIX_NV* = 0x00008648 + GL_TRACK_MATRIX_TRANSFORM_NV* = 0x00008649 + GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV* = 0x0000862E + GL_MAX_TRACK_MATRICES_NV* = 0x0000862F + GL_CURRENT_MATRIX_STACK_DEPTH_NV* = 0x00008640 + GL_CURRENT_MATRIX_NV* = 0x00008641 + GL_VERTEX_PROGRAM_BINDING_NV* = 0x0000864A + GL_PROGRAM_ERROR_POSITION_NV* = 0x0000864B + GL_MODELVIEW_PROJECTION_NV* = 0x00008629 + GL_MATRIX0_NV* = 0x00008630 + GL_MATRIX1_NV* = 0x00008631 + GL_MATRIX2_NV* = 0x00008632 + GL_MATRIX3_NV* = 0x00008633 + GL_MATRIX4_NV* = 0x00008634 + GL_MATRIX5_NV* = 0x00008635 + GL_MATRIX6_NV* = 0x00008636 + GL_MATRIX7_NV* = 0x00008637 + GL_IDENTITY_NV* = 0x0000862A + GL_INVERSE_NV* = 0x0000862B + GL_TRANSPOSE_NV* = 0x0000862C + GL_INVERSE_TRANSPOSE_NV* = 0x0000862D + GL_VERTEX_ATTRIB_ARRAY0_NV* = 0x00008650 + GL_VERTEX_ATTRIB_ARRAY1_NV* = 0x00008651 + GL_VERTEX_ATTRIB_ARRAY2_NV* = 0x00008652 + GL_VERTEX_ATTRIB_ARRAY3_NV* = 0x00008653 + GL_VERTEX_ATTRIB_ARRAY4_NV* = 0x00008654 + GL_VERTEX_ATTRIB_ARRAY5_NV* = 0x00008655 + GL_VERTEX_ATTRIB_ARRAY6_NV* = 0x00008656 + GL_VERTEX_ATTRIB_ARRAY7_NV* = 0x00008657 + GL_VERTEX_ATTRIB_ARRAY8_NV* = 0x00008658 + GL_VERTEX_ATTRIB_ARRAY9_NV* = 0x00008659 + GL_VERTEX_ATTRIB_ARRAY10_NV* = 0x0000865A + GL_VERTEX_ATTRIB_ARRAY11_NV* = 0x0000865B + GL_VERTEX_ATTRIB_ARRAY12_NV* = 0x0000865C + GL_VERTEX_ATTRIB_ARRAY13_NV* = 0x0000865D + GL_VERTEX_ATTRIB_ARRAY14_NV* = 0x0000865E + GL_VERTEX_ATTRIB_ARRAY15_NV* = 0x0000865F + GL_MAP1_VERTEX_ATTRIB0_4_NV* = 0x00008660 + GL_MAP1_VERTEX_ATTRIB1_4_NV* = 0x00008661 + GL_MAP1_VERTEX_ATTRIB2_4_NV* = 0x00008662 + GL_MAP1_VERTEX_ATTRIB3_4_NV* = 0x00008663 + GL_MAP1_VERTEX_ATTRIB4_4_NV* = 0x00008664 + GL_MAP1_VERTEX_ATTRIB5_4_NV* = 0x00008665 + GL_MAP1_VERTEX_ATTRIB6_4_NV* = 0x00008666 + GL_MAP1_VERTEX_ATTRIB7_4_NV* = 0x00008667 + GL_MAP1_VERTEX_ATTRIB8_4_NV* = 0x00008668 + GL_MAP1_VERTEX_ATTRIB9_4_NV* = 0x00008669 + GL_MAP1_VERTEX_ATTRIB10_4_NV* = 0x0000866A + GL_MAP1_VERTEX_ATTRIB11_4_NV* = 0x0000866B + GL_MAP1_VERTEX_ATTRIB12_4_NV* = 0x0000866C + GL_MAP1_VERTEX_ATTRIB13_4_NV* = 0x0000866D + GL_MAP1_VERTEX_ATTRIB14_4_NV* = 0x0000866E + GL_MAP1_VERTEX_ATTRIB15_4_NV* = 0x0000866F + GL_MAP2_VERTEX_ATTRIB0_4_NV* = 0x00008670 + GL_MAP2_VERTEX_ATTRIB1_4_NV* = 0x00008671 + GL_MAP2_VERTEX_ATTRIB2_4_NV* = 0x00008672 + GL_MAP2_VERTEX_ATTRIB3_4_NV* = 0x00008673 + GL_MAP2_VERTEX_ATTRIB4_4_NV* = 0x00008674 + GL_MAP2_VERTEX_ATTRIB5_4_NV* = 0x00008675 + GL_MAP2_VERTEX_ATTRIB6_4_NV* = 0x00008676 + GL_MAP2_VERTEX_ATTRIB7_4_NV* = 0x00008677 + GL_MAP2_VERTEX_ATTRIB8_4_NV* = 0x00008678 + GL_MAP2_VERTEX_ATTRIB9_4_NV* = 0x00008679 + GL_MAP2_VERTEX_ATTRIB10_4_NV* = 0x0000867A + GL_MAP2_VERTEX_ATTRIB11_4_NV* = 0x0000867B + GL_MAP2_VERTEX_ATTRIB12_4_NV* = 0x0000867C + GL_MAP2_VERTEX_ATTRIB13_4_NV* = 0x0000867D + GL_MAP2_VERTEX_ATTRIB14_4_NV* = 0x0000867E + GL_MAP2_VERTEX_ATTRIB15_4_NV* = 0x0000867F + +proc glBindProgramNV*(target: TGLenum, id: TGLuint){.dynlib: dllname, importc.} +proc glDeleteProgramsNV*(n: TGLsizei, ids: PGLuint){.dynlib: dllname, importc.} +proc glExecuteProgramNV*(target: TGLenum, id: TGLuint, params: PGLfloat){. + dynlib: dllname, importc.} +proc glGenProgramsNV*(n: TGLsizei, ids: PGLuint){.dynlib: dllname, importc.} +proc glAreProgramsResidentNV*(n: TGLsizei, ids: PGLuint, residences: PGLboolean): TGLboolean{. + dynlib: dllname, importc.} +proc glRequestResidentProgramsNV*(n: TGLsizei, ids: PGLuint){.dynlib: dllname, + importc.} +proc glGetProgramParameterfvNV*(target: TGLenum, index: TGLuint, pname: TGLenum, + params: PGLfloat){.dynlib: dllname, importc.} +proc glGetProgramParameterdvNV*(target: TGLenum, index: TGLuint, pname: TGLenum, + params: PGLdouble){.dynlib: dllname, importc.} +proc glGetProgramivNV*(id: TGLuint, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetProgramStringNV*(id: TGLuint, pname: TGLenum, theProgram: PGLubyte){. + dynlib: dllname, importc.} +proc glGetTrackMatrixivNV*(target: TGLenum, address: TGLuint, pname: TGLenum, + params: PGLint){.dynlib: dllname, importc.} +proc glGetVertexAttribdvNV*(index: TGLuint, pname: TGLenum, params: PGLdouble){. + dynlib: dllname, importc.} +proc glGetVertexAttribfvNV*(index: TGLuint, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glGetVertexAttribivNV*(index: TGLuint, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetVertexAttribPointervNV*(index: TGLuint, pname: TGLenum, pointer: PGLvoid){. + dynlib: dllname, importc.} +proc glIsProgramNV*(id: TGLuint): TGLboolean{.dynlib: dllname, importc.} +proc glLoadProgramNV*(target: TGLenum, id: TGLuint, length: TGLsizei, + theProgram: PGLubyte){.dynlib: dllname, importc.} +proc glProgramParameter4fNV*(target: TGLenum, index: TGLuint, x: TGLfloat, + y: TGLfloat, z: TGLfloat, w: TGLfloat){. + dynlib: dllname, importc.} +proc glProgramParameter4fvNV*(target: TGLenum, index: TGLuint, params: PGLfloat){. + dynlib: dllname, importc.} +proc glProgramParameters4dvNV*(target: TGLenum, index: TGLuint, num: TGLuint, + params: PGLdouble){.dynlib: dllname, importc.} +proc glProgramParameters4fvNV*(target: TGLenum, index: TGLuint, num: TGLuint, + params: PGLfloat){.dynlib: dllname, importc.} +proc glTrackMatrixNV*(target: TGLenum, address: TGLuint, matrix: TGLenum, + transform: TGLenum){.dynlib: dllname, importc.} +proc glVertexAttribPointerNV*(index: TGLuint, size: TGLint, thetype: TGLenum, + stride: TGLsizei, pointer: PGLvoid){. + dynlib: dllname, importc.} +proc glVertexAttrib1sNV*(index: TGLuint, x: TGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib1fNV*(index: TGLuint, x: TGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib1dNV*(index: TGLuint, x: TGLdouble){.dynlib: dllname, importc.} +proc glVertexAttrib2sNV*(index: TGLuint, x: TGLshort, y: TGLshort){. + dynlib: dllname, importc.} +proc glVertexAttrib2fNV*(index: TGLuint, x: TGLfloat, y: TGLfloat){. + dynlib: dllname, importc.} +proc glVertexAttrib2dNV*(index: TGLuint, x: TGLdouble, y: TGLdouble){. + dynlib: dllname, importc.} +proc glVertexAttrib3sNV*(index: TGLuint, x: TGLshort, y: TGLshort, z: TGLshort){. + dynlib: dllname, importc.} +proc glVertexAttrib3fNV*(index: TGLuint, x: TGLfloat, y: TGLfloat, z: TGLfloat){. + dynlib: dllname, importc.} +proc glVertexAttrib3dNV*(index: TGLuint, x: TGLdouble, y: TGLdouble, z: TGLdouble){. + dynlib: dllname, importc.} +proc glVertexAttrib4sNV*(index: TGLuint, x: TGLshort, y: TGLshort, z: TGLshort, + w: TGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib4fNV*(index: TGLuint, x: TGLfloat, y: TGLfloat, z: TGLfloat, + w: TGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib4dNV*(index: TGLuint, x: TGLdouble, y: TGLdouble, z: TGLdouble, + w: TGLdouble){.dynlib: dllname, importc.} +proc glVertexAttrib4ubNV*(index: TGLuint, x: TGLubyte, y: TGLubyte, z: TGLubyte, + w: TGLubyte){.dynlib: dllname, importc.} +proc glVertexAttrib1svNV*(index: TGLuint, v: PGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib1fvNV*(index: TGLuint, v: PGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib1dvNV*(index: TGLuint, v: PGLdouble){.dynlib: dllname, importc.} +proc glVertexAttrib2svNV*(index: TGLuint, v: PGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib2fvNV*(index: TGLuint, v: PGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib2dvNV*(index: TGLuint, v: PGLdouble){.dynlib: dllname, importc.} +proc glVertexAttrib3svNV*(index: TGLuint, v: PGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib3fvNV*(index: TGLuint, v: PGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib3dvNV*(index: TGLuint, v: PGLdouble){.dynlib: dllname, importc.} +proc glVertexAttrib4svNV*(index: TGLuint, v: PGLshort){.dynlib: dllname, importc.} +proc glVertexAttrib4fvNV*(index: TGLuint, v: PGLfloat){.dynlib: dllname, importc.} +proc glVertexAttrib4dvNV*(index: TGLuint, v: PGLdouble){.dynlib: dllname, importc.} +proc glVertexAttrib4ubvNV*(index: TGLuint, v: PGLubyte){.dynlib: dllname, importc.} +proc glVertexAttribs1svNV*(index: TGLuint, n: TGLsizei, v: PGLshort){. + dynlib: dllname, importc.} +proc glVertexAttribs1fvNV*(index: TGLuint, n: TGLsizei, v: PGLfloat){. + dynlib: dllname, importc.} +proc glVertexAttribs1dvNV*(index: TGLuint, n: TGLsizei, v: PGLdouble){. + dynlib: dllname, importc.} +proc glVertexAttribs2svNV*(index: TGLuint, n: TGLsizei, v: PGLshort){. + dynlib: dllname, importc.} +proc glVertexAttribs2fvNV*(index: TGLuint, n: TGLsizei, v: PGLfloat){. + dynlib: dllname, importc.} +proc glVertexAttribs2dvNV*(index: TGLuint, n: TGLsizei, v: PGLdouble){. + dynlib: dllname, importc.} +proc glVertexAttribs3svNV*(index: TGLuint, n: TGLsizei, v: PGLshort){. + dynlib: dllname, importc.} +proc glVertexAttribs3fvNV*(index: TGLuint, n: TGLsizei, v: PGLfloat){. + dynlib: dllname, importc.} +proc glVertexAttribs3dvNV*(index: TGLuint, n: TGLsizei, v: PGLdouble){. + dynlib: dllname, importc.} +proc glVertexAttribs4svNV*(index: TGLuint, n: TGLsizei, v: PGLshort){. + dynlib: dllname, importc.} +proc glVertexAttribs4fvNV*(index: TGLuint, n: TGLsizei, v: PGLfloat){. + dynlib: dllname, importc.} +proc glVertexAttribs4dvNV*(index: TGLuint, n: TGLsizei, v: PGLdouble){. + dynlib: dllname, importc.} +proc glVertexAttribs4ubvNV*(index: TGLuint, n: TGLsizei, v: PGLubyte){. + dynlib: dllname, importc.} + #***** GL_NV_vertex_program1_1 *****// + #***** GL_ATI_element_array *****// +const + GL_ELEMENT_ARRAY_ATI* = 0x00008768 + GL_ELEMENT_ARRAY_TYPE_ATI* = 0x00008769 + GL_ELEMENT_ARRAY_POINTER_ATI* = 0x0000876A + +proc glElementPointerATI*(thetype: TGLenum, pointer: PGLvoid){.dynlib: dllname, + importc.} +proc glDrawElementArrayATI*(mode: TGLenum, count: TGLsizei){.dynlib: dllname, + importc.} +proc glDrawRangeElementArrayATI*(mode: TGLenum, start: TGLuint, theend: TGLuint, + count: TGLsizei){.dynlib: dllname, importc.} + #***** GL_ATI_envmap_bumpmap *****// +const + GL_BUMP_ROT_MATRIX_ATI* = 0x00008775 + GL_BUMP_ROT_MATRIX_SIZE_ATI* = 0x00008776 + GL_BUMP_NUM_TEX_UNITS_ATI* = 0x00008777 + GL_BUMP_TEX_UNITS_ATI* = 0x00008778 + GL_DUDV_ATI* = 0x00008779 + GL_DU8DV8_ATI* = 0x0000877A + GL_BUMP_ENVMAP_ATI* = 0x0000877B + GL_BUMP_TARGET_ATI* = 0x0000877C + +proc glTexBumpParameterivATI*(pname: TGLenum, param: PGLint){.dynlib: dllname, + importc.} +proc glTexBumpParameterfvATI*(pname: TGLenum, param: PGLfloat){.dynlib: dllname, + importc.} +proc glGetTexBumpParameterivATI*(pname: TGLenum, param: PGLint){.dynlib: dllname, + importc.} +proc glGetTexBumpParameterfvATI*(pname: TGLenum, param: PGLfloat){. + dynlib: dllname, importc.} + #***** GL_ATI_fragment_shader *****// +const + GL_FRAGMENT_SHADER_ATI* = 0x00008920 + GL_REG_0_ATI* = 0x00008921 + GL_REG_1_ATI* = 0x00008922 + GL_REG_2_ATI* = 0x00008923 + GL_REG_3_ATI* = 0x00008924 + GL_REG_4_ATI* = 0x00008925 + GL_REG_5_ATI* = 0x00008926 + GL_CON_0_ATI* = 0x00008941 + GL_CON_1_ATI* = 0x00008942 + GL_CON_2_ATI* = 0x00008943 + GL_CON_3_ATI* = 0x00008944 + GL_CON_4_ATI* = 0x00008945 + GL_CON_5_ATI* = 0x00008946 + GL_CON_6_ATI* = 0x00008947 + GL_CON_7_ATI* = 0x00008948 + GL_MOV_ATI* = 0x00008961 + GL_ADD_ATI* = 0x00008963 + GL_MUL_ATI* = 0x00008964 + GL_SUB_ATI* = 0x00008965 + GL_DOT3_ATI* = 0x00008966 + GL_DOT4_ATI* = 0x00008967 + GL_MAD_ATI* = 0x00008968 + GL_LERP_ATI* = 0x00008969 + GL_CND_ATI* = 0x0000896A + GL_CND0_ATI* = 0x0000896B + GL_DOT2_ADD_ATI* = 0x0000896C + GL_SECONDARY_INTERPOLATOR_ATI* = 0x0000896D + GL_SWIZZLE_STR_ATI* = 0x00008976 + GL_SWIZZLE_STQ_ATI* = 0x00008977 + GL_SWIZZLE_STR_DR_ATI* = 0x00008978 + GL_SWIZZLE_STQ_DQ_ATI* = 0x00008979 + GL_RED_BIT_ATI* = 0x00000001 + GL_GREEN_BIT_ATI* = 0x00000002 + GL_BLUE_BIT_ATI* = 0x00000004 + GL_2X_BIT_ATI* = 0x00000001 + GL_4X_BIT_ATI* = 0x00000002 + GL_8X_BIT_ATI* = 0x00000004 + GL_HALF_BIT_ATI* = 0x00000008 + GL_QUARTER_BIT_ATI* = 0x00000010 + GL_EIGHTH_BIT_ATI* = 0x00000020 + GL_SATURATE_BIT_ATI* = 0x00000040 # GL_2X_BIT_ATI { already defined } + GL_COMP_BIT_ATI* = 0x00000002 + GL_NEGATE_BIT_ATI* = 0x00000004 + GL_BIAS_BIT_ATI* = 0x00000008 + +proc glGenFragmentShadersATI*(range: TGLuint): TGLuint{.dynlib: dllname, importc.} +proc glBindFragmentShaderATI*(id: TGLuint){.dynlib: dllname, importc.} +proc glDeleteFragmentShaderATI*(id: TGLuint){.dynlib: dllname, importc.} +proc glBeginFragmentShaderATI*(){.dynlib: dllname, importc.} +proc glEndFragmentShaderATI*(){.dynlib: dllname, importc.} +proc glPassTexCoordATI*(dst: TGLuint, coord: TGLuint, swizzle: TGLenum){. + dynlib: dllname, importc.} +proc glSampleMapATI*(dst: TGLuint, interp: TGLuint, swizzle: TGLenum){. + dynlib: dllname, importc.} +proc glColorFragmentOp1ATI*(op: TGLenum, dst: TGLuint, dstMask: TGLuint, + dstMod: TGLuint, arg1: TGLuint, arg1Rep: TGLuint, + arg1Mod: TGLuint){.dynlib: dllname, importc.} +proc glColorFragmentOp2ATI*(op: TGLenum, dst: TGLuint, dstMask: TGLuint, + dstMod: TGLuint, arg1: TGLuint, arg1Rep: TGLuint, + arg1Mod: TGLuint, arg2: TGLuint, arg2Rep: TGLuint, + arg2Mod: TGLuint){.dynlib: dllname, importc.} +proc glColorFragmentOp3ATI*(op: TGLenum, dst: TGLuint, dstMask: TGLuint, + dstMod: TGLuint, arg1: TGLuint, arg1Rep: TGLuint, + arg1Mod: TGLuint, arg2: TGLuint, arg2Rep: TGLuint, + arg2Mod: TGLuint, arg3: TGLuint, arg3Rep: TGLuint, + arg3Mod: TGLuint){.dynlib: dllname, importc.} +proc glAlphaFragmentOp1ATI*(op: TGLenum, dst: TGLuint, dstMod: TGLuint, + arg1: TGLuint, arg1Rep: TGLuint, arg1Mod: TGLuint){. + dynlib: dllname, importc.} +proc glAlphaFragmentOp2ATI*(op: TGLenum, dst: TGLuint, dstMod: TGLuint, + arg1: TGLuint, arg1Rep: TGLuint, arg1Mod: TGLuint, + arg2: TGLuint, arg2Rep: TGLuint, arg2Mod: TGLuint){. + dynlib: dllname, importc.} +proc glAlphaFragmentOp3ATI*(op: TGLenum, dst: TGLuint, dstMod: TGLuint, + arg1: TGLuint, arg1Rep: TGLuint, arg1Mod: TGLuint, + arg2: TGLuint, arg2Rep: TGLuint, arg2Mod: TGLuint, + arg3: TGLuint, arg3Rep: TGLuint, arg3Mod: TGLuint){. + dynlib: dllname, importc.} +proc glSetFragmentShaderConstantATI*(dst: TGLuint, value: PGLfloat){. + dynlib: dllname, importc.} + #***** GL_ATI_pn_triangles *****// +const + GL_PN_TRIANGLES_ATI* = 0x000087F0 + GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI* = 0x000087F1 + GL_PN_TRIANGLES_POINT_MODE_ATI* = 0x000087F2 + GL_PN_TRIANGLES_NORMAL_MODE_ATI* = 0x000087F3 + GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI* = 0x000087F4 + GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI* = 0x000087F5 + GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI* = 0x000087F6 + GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI* = 0x000087F7 + GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI* = 0x000087F8 + +proc glPNTrianglesiATI*(pname: TGLenum, param: TGLint){.dynlib: dllname, importc.} +proc glPNTrianglesfATI*(pname: TGLenum, param: TGLfloat){.dynlib: dllname, importc.} + #***** GL_ATI_texture_mirror_once *****// +const + GL_MIRROR_CLAMP_ATI* = 0x00008742 + GL_MIRROR_CLAMP_TO_EDGE_ATI* = 0x00008743 + + #***** GL_ATI_vertex_array_object *****// +const + GL_STATIC_ATI* = 0x00008760 + GL_DYNAMIC_ATI* = 0x00008761 + GL_PRESERVE_ATI* = 0x00008762 + GL_DISCARD_ATI* = 0x00008763 + GL_OBJECT_BUFFER_SIZE_ATI* = 0x00008764 + GL_OBJECT_BUFFER_USAGE_ATI* = 0x00008765 + GL_ARRAY_OBJECT_BUFFER_ATI* = 0x00008766 + GL_ARRAY_OBJECT_OFFSET_ATI* = 0x00008767 + +proc glNewObjectBufferATI*(size: TGLsizei, pointer: PGLvoid, usage: TGLenum): TGLuint{. + dynlib: dllname, importc.} +proc glIsObjectBufferATI*(buffer: TGLuint): TGLboolean{.dynlib: dllname, importc.} +proc glUpdateObjectBufferATI*(buffer: TGLuint, offset: TGLuint, size: TGLsizei, + pointer: PGLvoid, preserve: TGLenum){. + dynlib: dllname, importc.} +proc glGetObjectBufferfvATI*(buffer: TGLuint, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glGetObjectBufferivATI*(buffer: TGLuint, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glDeleteObjectBufferATI*(buffer: TGLuint){.dynlib: dllname, importc.} +proc glArrayObjectATI*(thearray: TGLenum, size: TGLint, thetype: TGLenum, + stride: TGLsizei, buffer: TGLuint, offset: TGLuint){. + dynlib: dllname, importc.} +proc glGetArrayObjectfvATI*(thearray: TGLenum, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glGetArrayObjectivATI*(thearray: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glVariantArrayObjectATI*(id: TGLuint, thetype: TGLenum, stride: TGLsizei, + buffer: TGLuint, offset: TGLuint){.dynlib: dllname, + importc.} +proc glGetVariantArrayObjectfvATI*(id: TGLuint, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glGetVariantArrayObjectivATI*(id: TGLuint, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} + #***** GL_ATI_vertex_streams *****// +const + GL_MAX_VERTEX_STREAMS_ATI* = 0x0000876B + GL_VERTEX_STREAM0_ATI* = 0x0000876C + GL_VERTEX_STREAM1_ATI* = 0x0000876D + GL_VERTEX_STREAM2_ATI* = 0x0000876E + GL_VERTEX_STREAM3_ATI* = 0x0000876F + GL_VERTEX_STREAM4_ATI* = 0x00008770 + GL_VERTEX_STREAM5_ATI* = 0x00008771 + GL_VERTEX_STREAM6_ATI* = 0x00008772 + GL_VERTEX_STREAM7_ATI* = 0x00008773 + GL_VERTEX_SOURCE_ATI* = 0x00008774 + +proc glVertexStream1s*(stream: TGLenum, coords: TGLshort){.dynlib: dllname, + importc.} +proc glVertexStream1i*(stream: TGLenum, coords: TGLint){.dynlib: dllname, importc.} +proc glVertexStream1f*(stream: TGLenum, coords: TGLfloat){.dynlib: dllname, + importc.} +proc glVertexStream1d*(stream: TGLenum, coords: TGLdouble){.dynlib: dllname, + importc.} +proc glVertexStream1sv*(stream: TGLenum, coords: TGLshort){.dynlib: dllname, + importc.} +proc glVertexStream1iv*(stream: TGLenum, coords: TGLint){.dynlib: dllname, importc.} +proc glVertexStream1fv*(stream: TGLenum, coords: TGLfloat){.dynlib: dllname, + importc.} +proc glVertexStream1dv*(stream: TGLenum, coords: TGLdouble){.dynlib: dllname, + importc.} +proc glVertexStream2s*(stream: TGLenum, coords: TGLshort){.dynlib: dllname, + importc.} +proc glVertexStream2i*(stream: TGLenum, coords: TGLint){.dynlib: dllname, importc.} +proc glVertexStream2f*(stream: TGLenum, coords: TGLfloat){.dynlib: dllname, + importc.} +proc glVertexStream2d*(stream: TGLenum, coords: TGLdouble){.dynlib: dllname, + importc.} +proc glVertexStream2sv*(stream: TGLenum, coords: TGLshort){.dynlib: dllname, + importc.} +proc glVertexStream2iv*(stream: TGLenum, coords: TGLint){.dynlib: dllname, importc.} +proc glVertexStream2fv*(stream: TGLenum, coords: TGLfloat){.dynlib: dllname, + importc.} +proc glVertexStream2dv*(stream: TGLenum, coords: TGLdouble){.dynlib: dllname, + importc.} +proc glVertexStream3s*(stream: TGLenum, coords: TGLshort){.dynlib: dllname, + importc.} +proc glVertexStream3i*(stream: TGLenum, coords: TGLint){.dynlib: dllname, importc.} +proc glVertexStream3f*(stream: TGLenum, coords: TGLfloat){.dynlib: dllname, + importc.} +proc glVertexStream3d*(stream: TGLenum, coords: TGLdouble){.dynlib: dllname, + importc.} +proc glVertexStream3sv*(stream: TGLenum, coords: TGLshort){.dynlib: dllname, + importc.} +proc glVertexStream3iv*(stream: TGLenum, coords: TGLint){.dynlib: dllname, importc.} +proc glVertexStream3fv*(stream: TGLenum, coords: TGLfloat){.dynlib: dllname, + importc.} +proc glVertexStream3dv*(stream: TGLenum, coords: TGLdouble){.dynlib: dllname, + importc.} +proc glVertexStream4s*(stream: TGLenum, coords: TGLshort){.dynlib: dllname, + importc.} +proc glVertexStream4i*(stream: TGLenum, coords: TGLint){.dynlib: dllname, importc.} +proc glVertexStream4f*(stream: TGLenum, coords: TGLfloat){.dynlib: dllname, + importc.} +proc glVertexStream4d*(stream: TGLenum, coords: TGLdouble){.dynlib: dllname, + importc.} +proc glVertexStream4sv*(stream: TGLenum, coords: TGLshort){.dynlib: dllname, + importc.} +proc glVertexStream4iv*(stream: TGLenum, coords: TGLint){.dynlib: dllname, importc.} +proc glVertexStream4fv*(stream: TGLenum, coords: TGLfloat){.dynlib: dllname, + importc.} +proc glVertexStream4dv*(stream: TGLenum, coords: TGLdouble){.dynlib: dllname, + importc.} +proc glNormalStream3b*(stream: TGLenum, coords: TGLByte){.dynlib: dllname, importc.} +proc glNormalStream3s*(stream: TGLenum, coords: TGLshort){.dynlib: dllname, + importc.} +proc glNormalStream3i*(stream: TGLenum, coords: TGLint){.dynlib: dllname, importc.} +proc glNormalStream3f*(stream: TGLenum, coords: TGLfloat){.dynlib: dllname, + importc.} +proc glNormalStream3d*(stream: TGLenum, coords: TGLdouble){.dynlib: dllname, + importc.} +proc glNormalStream3bv*(stream: TGLenum, coords: TGLByte){.dynlib: dllname, + importc.} +proc glNormalStream3sv*(stream: TGLenum, coords: TGLshort){.dynlib: dllname, + importc.} +proc glNormalStream3iv*(stream: TGLenum, coords: TGLint){.dynlib: dllname, importc.} +proc glNormalStream3fv*(stream: TGLenum, coords: TGLfloat){.dynlib: dllname, + importc.} +proc glNormalStream3dv*(stream: TGLenum, coords: TGLdouble){.dynlib: dllname, + importc.} +proc glClientActiveVertexStream*(stream: TGLenum){.dynlib: dllname, importc.} +proc glVertexBlendEnvi*(pname: TGLenum, param: TGLint){.dynlib: dllname, importc.} +proc glVertexBlendEnvf*(pname: TGLenum, param: TGLfloat){.dynlib: dllname, importc.} + #***** GL_3DFX_texture_compression_FXT1 *****// +const + GL_COMPRESSED_RGB_FXT1_3DFX* = 0x000086B0 + GL_COMPRESSED_RGBA_FXT1_3DFX* = 0x000086B1 + + #***** GL_IBM_cull_vertex *****// +const + GL_CULL_VERTEX_IBM* = 0x0001928A + + #***** GL_IBM_multimode_draw_arrays *****// +proc glMultiModeDrawArraysIBM*(mode: PGLenum, first: PGLint, count: PGLsizei, + primcount: TGLsizei, modestride: TGLint){. + dynlib: dllname, importc.} +proc glMultiModeDrawElementsIBM*(mode: PGLenum, count: PGLsizei, + thetype: TGLenum, indices: PGLvoid, + primcount: TGLsizei, modestride: TGLint){. + dynlib: dllname, importc.} + #***** GL_IBM_raster_pos_clip *****// +const + GL_RASTER_POSITION_UNCLIPPED_IBM* = 0x00019262 + + #***** GL_IBM_texture_mirrored_repeat *****// +const + GL_MIRRORED_REPEAT_IBM* = 0x00008370 + + #***** GL_IBM_vertex_array_lists *****// +const + GL_VERTEX_ARRAY_LIST_IBM* = 0x0001929E + GL_NORMAL_ARRAY_LIST_IBM* = 0x0001929F + GL_COLOR_ARRAY_LIST_IBM* = 0x000192A0 + GL_INDEX_ARRAY_LIST_IBM* = 0x000192A1 + GL_TEXTURE_COORD_ARRAY_LIST_IBM* = 0x000192A2 + GL_EDGE_FLAG_ARRAY_LIST_IBM* = 0x000192A3 + GL_FOG_COORDINATE_ARRAY_LIST_IBM* = 0x000192A4 + GL_SECONDARY_COLOR_ARRAY_LIST_IBM* = 0x000192A5 + GL_VERTEX_ARRAY_LIST_STRIDE_IBM* = 0x000192A8 + GL_NORMAL_ARRAY_LIST_STRIDE_IBM* = 0x000192A9 + GL_COLOR_ARRAY_LIST_STRIDE_IBM* = 0x000192AA + GL_INDEX_ARRAY_LIST_STRIDE_IBM* = 0x000192AB + GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM* = 0x000192AC + GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM* = 0x000192AD + GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM* = 0x000192AE + GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM* = 0x000192AF + +proc glColorPointerListIBM*(size: TGLint, thetype: TGLenum, stride: TGLint, + pointer: PGLvoid, ptrstride: TGLint){. + dynlib: dllname, importc.} +proc glSecondaryColorPointerListIBM*(size: TGLint, thetype: TGLenum, + stride: TGLint, pointer: PGLvoid, + ptrstride: TGLint){.dynlib: dllname, importc.} +proc glEdgeFlagPointerListIBM*(stride: TGLint, pointer: PGLboolean, + ptrstride: TGLint){.dynlib: dllname, importc.} +proc glFogCoordPointerListIBM*(thetype: TGLenum, stride: TGLint, pointer: PGLvoid, + ptrstride: TGLint){.dynlib: dllname, importc.} +proc glNormalPointerListIBM*(thetype: TGLenum, stride: TGLint, pointer: PGLvoid, + ptrstride: TGLint){.dynlib: dllname, importc.} +proc glTexCoordPointerListIBM*(size: TGLint, thetype: TGLenum, stride: TGLint, + pointer: PGLvoid, ptrstride: TGLint){. + dynlib: dllname, importc.} +proc glVertexPointerListIBM*(size: TGLint, thetype: TGLenum, stride: TGLint, + pointer: PGLvoid, ptrstride: TGLint){. + dynlib: dllname, importc.} + #***** GL_MESA_resize_buffers *****// +proc glResizeBuffersMESA*(){.dynlib: dllname, importc.} + #***** GL_MESA_window_pos *****// +proc glWindowPos2dMESA*(x: TGLdouble, y: TGLdouble){.dynlib: dllname, importc.} +proc glWindowPos2fMESA*(x: TGLfloat, y: TGLfloat){.dynlib: dllname, importc.} +proc glWindowPos2iMESA*(x: TGLint, y: TGLint){.dynlib: dllname, importc.} +proc glWindowPos2sMESA*(x: TGLshort, y: TGLshort){.dynlib: dllname, importc.} +proc glWindowPos2ivMESA*(p: PGLint){.dynlib: dllname, importc.} +proc glWindowPos2svMESA*(p: PGLshort){.dynlib: dllname, importc.} +proc glWindowPos2fvMESA*(p: PGLfloat){.dynlib: dllname, importc.} +proc glWindowPos2dvMESA*(p: PGLdouble){.dynlib: dllname, importc.} +proc glWindowPos3iMESA*(x: TGLint, y: TGLint, z: TGLint){.dynlib: dllname, importc.} +proc glWindowPos3sMESA*(x: TGLshort, y: TGLshort, z: TGLshort){.dynlib: dllname, + importc.} +proc glWindowPos3fMESA*(x: TGLfloat, y: TGLfloat, z: TGLfloat){.dynlib: dllname, + importc.} +proc glWindowPos3dMESA*(x: TGLdouble, y: TGLdouble, z: TGLdouble){.dynlib: dllname, + importc.} +proc glWindowPos3ivMESA*(p: PGLint){.dynlib: dllname, importc.} +proc glWindowPos3svMESA*(p: PGLshort){.dynlib: dllname, importc.} +proc glWindowPos3fvMESA*(p: PGLfloat){.dynlib: dllname, importc.} +proc glWindowPos3dvMESA*(p: PGLdouble){.dynlib: dllname, importc.} +proc glWindowPos4iMESA*(x: TGLint, y: TGLint, z: TGLint, w: TGLint){. + dynlib: dllname, importc.} +proc glWindowPos4sMESA*(x: TGLshort, y: TGLshort, z: TGLshort, w: TGLshort){. + dynlib: dllname, importc.} +proc glWindowPos4fMESA*(x: TGLfloat, y: TGLfloat, z: TGLfloat, w: TGLfloat){. + dynlib: dllname, importc.} +proc glWindowPos4dMESA*(x: TGLdouble, y: TGLdouble, z: TGLdouble, w: TGLdouble){. + dynlib: dllname, importc.} +proc glWindowPos4ivMESA*(p: PGLint){.dynlib: dllname, importc.} +proc glWindowPos4svMESA*(p: PGLshort){.dynlib: dllname, importc.} +proc glWindowPos4fvMESA*(p: PGLfloat){.dynlib: dllname, importc.} +proc glWindowPos4dvMESA*(p: PGLdouble){.dynlib: dllname, importc.} + #***** GL_OML_interlace *****// +const + GL_INTERLACE_OML* = 0x00008980 + GL_INTERLACE_READ_OML* = 0x00008981 + + #***** GL_OML_resample *****// +const + GL_PACK_RESAMPLE_OML* = 0x00008984 + GL_UNPACK_RESAMPLE_OML* = 0x00008985 + GL_RESAMPLE_REPLICATE_OML* = 0x00008986 + GL_RESAMPLE_ZERO_FILL_OML* = 0x00008987 + GL_RESAMPLE_AVERAGE_OML* = 0x00008988 + GL_RESAMPLE_DECIMATE_OML* = 0x00008989 # GL_RESAMPLE_AVERAGE_OML { already defined } + + #***** GL_OML_subsample *****// +const + GL_FORMAT_SUBSAMPLE_24_24_OML* = 0x00008982 + GL_FORMAT_SUBSAMPLE_244_244_OML* = 0x00008983 + + #***** GL_SGIS_generate_mipmap *****// +const + GL_GENERATE_MIPMAP_SGIS* = 0x00008191 + GL_GENERATE_MIPMAP_HINT_SGIS* = 0x00008192 + + #***** GL_SGIS_multisample *****// +const + GLX_SAMPLE_BUFFERS_SGIS* = 0x000186A0 + GLX_SAMPLES_SGIS* = 0x000186A1 + GL_MULTISAMPLE_SGIS* = 0x0000809D + GL_SAMPLE_ALPHA_TO_MASK_SGIS* = 0x0000809E + GL_SAMPLE_ALPHA_TO_ONE_SGIS* = 0x0000809F + constGL_SAMPLE_MASK_SGIS* = 0x000080A0 + GL_MULTISAMPLE_BIT_EXT* = 0x20000000 + GL_1PASS_SGIS* = 0x000080A1 + GL_2PASS_0_SGIS* = 0x000080A2 + GL_2PASS_1_SGIS* = 0x000080A3 + GL_4PASS_0_SGIS* = 0x000080A4 + GL_4PASS_1_SGIS* = 0x000080A5 + GL_4PASS_2_SGIS* = 0x000080A6 + GL_4PASS_3_SGIS* = 0x000080A7 + GL_SAMPLE_BUFFERS_SGIS* = 0x000080A8 + GL_SAMPLES_SGIS* = 0x000080A9 + GL_SAMPLE_MASK_VALUE_SGIS* = 0x000080AA + GL_SAMPLE_MASK_INVERT_SGIS* = 0x000080AB + constGL_SAMPLE_PATTERN_SGIS* = 0x000080AC + +proc glSampleMaskSGIS*(value: TGLclampf, invert: TGLboolean){.dynlib: dllname, + importc.} +proc glSamplePatternSGIS*(pattern: TGLenum){.dynlib: dllname, importc.} + #***** GL_SGIS_pixel_texture *****// +const + GL_PIXEL_TEXTURE_SGIS* = 0x00008353 + GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS* = 0x00008354 + GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS* = 0x00008355 + GL_PIXEL_GROUP_COLOR_SGIS* = 0x00008356 + +proc glPixelTexGenParameteriSGIS*(pname: TGLenum, param: TGLint){.dynlib: dllname, + importc.} +proc glPixelTexGenParameterfSGIS*(pname: TGLenum, param: TGLfloat){. + dynlib: dllname, importc.} +proc glGetPixelTexGenParameterivSGIS*(pname: TGLenum, params: TGLint){. + dynlib: dllname, importc.} +proc glGetPixelTexGenParameterfvSGIS*(pname: TGLenum, params: TGLfloat){. + dynlib: dllname, importc.} + #***** GL_SGIS_texture_border_clamp *****// + # GL_CLAMP_TO_BORDER_SGIS { already defined } + #***** GL_SGIS_texture_color_mask *****// +const + GL_TEXTURE_COLOR_WRITEMASK_SGIS* = 0x000081EF + +proc glTextureColorMaskSGIS*(r: TGLboolean, g: TGLboolean, b: TGLboolean, + a: TGLboolean){.dynlib: dllname, importc.} + #***** GL_SGIS_texture_edge_clamp *****// +const + GL_CLAMP_TO_EDGE_SGIS* = 0x0000812F + + #***** GL_SGIS_texture_lod *****// +const + GL_TEXTURE_MIN_LOD_SGIS* = 0x0000813A + GL_TEXTURE_MAX_LOD_SGIS* = 0x0000813B + GL_TEXTURE_BASE_LEVEL_SGIS* = 0x0000813C + GL_TEXTURE_MAX_LEVEL_SGIS* = 0x0000813D + + #***** GL_SGIS_depth_texture *****// +const + GL_DEPTH_COMPONENT16_SGIX* = 0x000081A5 + GL_DEPTH_COMPONENT24_SGIX* = 0x000081A6 + GL_DEPTH_COMPONENT32_SGIX* = 0x000081A7 + + #***** GL_SGIX_fog_offset *****// +const + GL_FOG_OFFSET_SGIX* = 0x00008198 + GL_FOG_OFFSET_VALUE_SGIX* = 0x00008199 + + #***** GL_SGIX_interlace *****// +const + GL_INTERLACE_SGIX* = 0x00008094 + + #***** GL_SGIX_shadow_ambient *****// +const + GL_SHADOW_AMBIENT_SGIX* = 0x000080BF + + #***** GL_SGI_color_matrix *****// +const + GL_COLOR_MATRIX_SGI* = 0x000080B1 + GL_COLOR_MATRIX_STACK_DEPTH_SGI* = 0x000080B2 + GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI* = 0x000080B3 + GL_POST_COLOR_MATRIX_RED_SCALE_SGI* = 0x000080B4 + GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI* = 0x000080B5 + GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI* = 0x000080B6 + GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI* = 0x000080B7 + GL_POST_COLOR_MATRIX_RED_BIAS_SGI* = 0x000080B8 + GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI* = 0x000080B9 + GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI* = 0x000080BA + GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI* = 0x000080BB + + #***** GL_SGI_color_table *****// +const + constGL_COLOR_TABLE_SGI* = 0x000080D0 + GL_POST_CONVOLUTION_COLOR_TABLE_SGI* = 0x000080D1 + GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI* = 0x000080D2 + GL_PROXY_COLOR_TABLE_SGI* = 0x000080D3 + GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI* = 0x000080D4 + GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI* = 0x000080D5 + GL_COLOR_TABLE_SCALE_SGI* = 0x000080D6 + GL_COLOR_TABLE_BIAS_SGI* = 0x000080D7 + GL_COLOR_TABLE_FORMAT_SGI* = 0x000080D8 + GL_COLOR_TABLE_WIDTH_SGI* = 0x000080D9 + GL_COLOR_TABLE_RED_SIZE_SGI* = 0x000080DA + GL_COLOR_TABLE_GREEN_SIZE_SGI* = 0x000080DB + GL_COLOR_TABLE_BLUE_SIZE_SGI* = 0x000080DC + GL_COLOR_TABLE_ALPHA_SIZE_SGI* = 0x000080DD + GL_COLOR_TABLE_LUMINANCE_SIZE_SGI* = 0x000080DE + GL_COLOR_TABLE_INTENSITY_SIZE_SGI* = 0x000080DF + +proc glColorTableSGI*(target: TGLenum, internalformat: TGLenum, width: TGLsizei, + format: TGLenum, thetype: TGLenum, table: PGLvoid){. + dynlib: dllname, importc.} +proc glCopyColorTableSGI*(target: TGLenum, internalformat: TGLenum, x: TGLint, + y: TGLint, width: TGLsizei){.dynlib: dllname, importc.} +proc glColorTableParameterivSGI*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glColorTableParameterfvSGI*(target: TGLenum, pname: TGLenum, params: PGLfloat){. + dynlib: dllname, importc.} +proc glGetColorTableSGI*(target: TGLenum, format: TGLenum, thetype: TGLenum, + table: PGLvoid){.dynlib: dllname, importc.} +proc glGetColorTableParameterivSGI*(target: TGLenum, pname: TGLenum, + params: PGLint){.dynlib: dllname, importc.} +proc glGetColorTableParameterfvSGI*(target: TGLenum, pname: TGLenum, + params: PGLfloat){.dynlib: dllname, importc.} + #***** GL_SGI_texture_color_table *****// +const + GL_TEXTURE_COLOR_TABLE_SGI* = 0x000080BC + GL_PROXY_TEXTURE_COLOR_TABLE_SGI* = 0x000080BD + + #***** GL_SUN_vertex *****// +proc glColor4ubVertex2fSUN*(r: TGLubyte, g: TGLubyte, b: TGLubyte, a: TGLubyte, + x: TGLfloat, y: TGLfloat){.dynlib: dllname, importc.} +proc glColor4ubVertex2fvSUN*(c: PGLubyte, v: PGLfloat){.dynlib: dllname, importc.} +proc glColor4ubVertex3fSUN*(r: TGLubyte, g: TGLubyte, b: TGLubyte, a: TGLubyte, + x: TGLfloat, y: TGLfloat, z: TGLfloat){. + dynlib: dllname, importc.} +proc glColor4ubVertex3fvSUN*(c: PGLubyte, v: PGLfloat){.dynlib: dllname, importc.} +proc glColor3fVertex3fSUN*(r: TGLfloat, g: TGLfloat, b: TGLfloat, x: TGLfloat, + y: TGLfloat, z: TGLfloat){.dynlib: dllname, importc.} +proc glColor3fVertex3fvSUN*(c: PGLfloat, v: PGLfloat){.dynlib: dllname, importc.} +proc glNormal3fVertex3fSUN*(nx: TGLfloat, ny: TGLfloat, nz: TGLfloat, x: TGLfloat, + y: TGLfloat, z: TGLfloat){.dynlib: dllname, importc.} +proc glNormal3fVertex3fvSUN*(n: PGLfloat, v: PGLfloat){.dynlib: dllname, importc.} +proc glColor4fNormal3fVertex3fSUN*(r: TGLfloat, g: TGLfloat, b: TGLfloat, + a: TGLfloat, nx: TGLfloat, ny: TGLfloat, + nz: TGLfloat, x: TGLfloat, y: TGLfloat, + z: TGLfloat){.dynlib: dllname, importc.} +proc glColor4fNormal3fVertex3fvSUN*(c: PGLfloat, n: PGLfloat, v: PGLfloat){. + dynlib: dllname, importc.} +proc glTexCoord2fVertex3fSUN*(s: TGLfloat, t: TGLfloat, x: TGLfloat, y: TGLfloat, + z: TGLfloat){.dynlib: dllname, importc.} +proc glTexCoord2fVertex3fvSUN*(tc: PGLfloat, v: PGLfloat){.dynlib: dllname, + importc.} +proc glTexCoord4fVertex4fSUN*(s: TGLfloat, t: TGLfloat, p: TGLfloat, q: TGLfloat, + x: TGLfloat, y: TGLfloat, z: TGLfloat, w: TGLfloat){. + dynlib: dllname, importc.} +proc glTexCoord4fVertex4fvSUN*(tc: PGLfloat, v: PGLfloat){.dynlib: dllname, + importc.} +proc glTexCoord2fColor4ubVertex3fSUN*(s: TGLfloat, t: TGLfloat, r: TGLubyte, + g: TGLubyte, b: TGLubyte, a: TGLubyte, + x: TGLfloat, y: TGLfloat, z: TGLfloat){. + dynlib: dllname, importc.} +proc glTexCoord2fColor4ubVertex3fvSUN*(tc: PGLfloat, c: PGLubyte, v: PGLfloat){. + dynlib: dllname, importc.} +proc glTexCoord2fColor3fVertex3fSUN*(s: TGLfloat, t: TGLfloat, r: TGLfloat, + g: TGLfloat, b: TGLfloat, x: TGLfloat, + y: TGLfloat, z: TGLfloat){.dynlib: dllname, + importc.} +proc glTexCoord2fColor3fVertex3fvSUN*(tc: PGLfloat, c: PGLfloat, v: PGLfloat){. + dynlib: dllname, importc.} +proc glTexCoord2fNormal3fVertex3fSUN*(s: TGLfloat, t: TGLfloat, nx: TGLfloat, + ny: TGLfloat, nz: TGLfloat, x: TGLfloat, + y: TGLfloat, z: TGLfloat){.dynlib: dllname, + importc.} +proc glTexCoord2fNormal3fVertex3fvSUN*(tc: PGLfloat, n: PGLfloat, v: PGLfloat){. + dynlib: dllname, importc.} +proc glTexCoord2fColor4fNormal3fVertex3fSUN*(s: TGLfloat, t: TGLfloat, r: TGLfloat, + g: TGLfloat, b: TGLfloat, a: TGLfloat, nx: TGLfloat, ny: TGLfloat, nz: TGLfloat, + x: TGLfloat, y: TGLfloat, z: TGLfloat){.dynlib: dllname, importc.} +proc glTexCoord2fColor4fNormal3fVertex3fvSUN*(tc: PGLfloat, c: PGLfloat, + n: PGLfloat, v: PGLfloat){.dynlib: dllname, importc.} +proc glTexCoord4fColor4fNormal3fVertex4fSUN*(s: TGLfloat, t: TGLfloat, p: TGLfloat, + q: TGLfloat, r: TGLfloat, g: TGLfloat, b: TGLfloat, a: TGLfloat, nx: TGLfloat, + ny: TGLfloat, nz: TGLfloat, x: TGLfloat, y: TGLfloat, z: TGLfloat, w: TGLfloat){. + dynlib: dllname, importc.} +proc glTexCoord4fColor4fNormal3fVertex4fvSUN*(tc: PGLfloat, c: PGLfloat, + n: PGLfloat, v: PGLfloat){.dynlib: dllname, importc.} +proc glReplacementCodeuiVertex3fSUN*(rc: TGLuint, x: TGLfloat, y: TGLfloat, + z: TGLfloat){.dynlib: dllname, importc.} +proc glReplacementCodeuiVertex3fvSUN*(rc: PGLuint, v: PGLfloat){. + dynlib: dllname, importc.} +proc glReplacementCodeuiColor4ubVertex3fSUN*(rc: TGLuint, r: TGLubyte, g: TGLubyte, + b: TGLubyte, a: TGLubyte, x: TGLfloat, y: TGLfloat, z: TGLfloat){. + dynlib: dllname, importc.} +proc glReplacementCodeuiColor4ubVertex3fvSUN*(rc: PGLuint, c: PGLubyte, + v: PGLfloat){.dynlib: dllname, importc.} +proc glReplacementCodeuiColor3fVertex3fSUN*(rc: TGLuint, r: TGLfloat, g: TGLfloat, + b: TGLfloat, x: TGLfloat, y: TGLfloat, z: TGLfloat){.dynlib: dllname, importc.} +proc glReplacementCodeuiColor3fVertex3fvSUN*(rc: PGLuint, c: PGLfloat, + v: PGLfloat){.dynlib: dllname, importc.} +proc glReplacementCodeuiNormal3fVertex3fSUN*(rc: TGLuint, nx: TGLfloat, + ny: TGLfloat, nz: TGLfloat, x: TGLfloat, y: TGLfloat, z: TGLfloat){. + dynlib: dllname, importc.} +proc glReplacementCodeuiNormal3fVertex3fvSUN*(rc: PGLuint, n: PGLfloat, + v: PGLfloat){.dynlib: dllname, importc.} +proc glReplacementCodeuiColor4fNormal3fVertex3fSUN*(rc: TGLuint, r: TGLfloat, + g: TGLfloat, b: TGLfloat, a: TGLfloat, nx: TGLfloat, ny: TGLfloat, nz: TGLfloat, + x: TGLfloat, y: TGLfloat, z: TGLfloat){.dynlib: dllname, importc.} +proc glReplacementCodeuiColor4fNormal3fVertex3fvSUN*(rc: PGLuint, c: PGLfloat, + n: PGLfloat, v: PGLfloat){.dynlib: dllname, importc.} +proc glReplacementCodeuiTexCoord2fVertex3fSUN*(rc: TGLuint, s: TGLfloat, + t: TGLfloat, x: TGLfloat, y: TGLfloat, z: TGLfloat){.dynlib: dllname, importc.} +proc glReplacementCodeuiTexCoord2fVertex3fvSUN*(rc: PGLuint, tc: PGLfloat, + v: PGLfloat){.dynlib: dllname, importc.} +proc glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN*(rc: TGLuint, s: TGLfloat, + t: TGLfloat, nx: TGLfloat, ny: TGLfloat, nz: TGLfloat, x: TGLfloat, y: TGLfloat, + z: TGLfloat){.dynlib: dllname, importc.} +proc glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN*(rc: PGLuint, + tc: PGLfloat, n: PGLfloat, v: PGLfloat){.dynlib: dllname, importc.} +proc glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN*(rc: TGLuint, + s: TGLfloat, t: TGLfloat, r: TGLfloat, g: TGLfloat, b: TGLfloat, a: TGLfloat, + nx: TGLfloat, ny: TGLfloat, nz: TGLfloat, x: TGLfloat, y: TGLfloat, z: TGLfloat){. + dynlib: dllname, importc.} +proc glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN*(rc: PGLuint, + tc: PGLfloat, c: PGLfloat, n: PGLfloat, v: PGLfloat){.dynlib: dllname, + importc.} + #***** GL_ARB_fragment_program *****// +const + GL_FRAGMENT_PROGRAM_ARB* = 0x00008804 # GL_PROGRAM_FORMAT_ASCII_ARB { already defined } + # GL_PROGRAM_LENGTH_ARB { already defined } + # GL_PROGRAM_FORMAT_ARB { already defined } + # GL_PROGRAM_BINDING_ARB { already defined } + # GL_PROGRAM_INSTRUCTIONS_ARB { already defined } + # GL_MAX_PROGRAM_INSTRUCTIONS_ARB { already defined } + # GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB { already defined } + # GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB { already defined } + # GL_PROGRAM_TEMPORARIES_ARB { already defined } + # GL_MAX_PROGRAM_TEMPORARIES_ARB { already defined } + # GL_PROGRAM_NATIVE_TEMPORARIES_ARB { already defined } + # GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB { already defined } + # GL_PROGRAM_PARAMETERS_ARB { already defined } + # GL_MAX_PROGRAM_PARAMETERS_ARB { already defined } + # GL_PROGRAM_NATIVE_PARAMETERS_ARB { already defined } + # GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB { already defined } + # GL_PROGRAM_ATTRIBS_ARB { already defined } + # GL_MAX_PROGRAM_ATTRIBS_ARB { already defined } + # GL_PROGRAM_NATIVE_ATTRIBS_ARB { already defined } + # GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB { already defined } + # GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB { already defined } + # GL_MAX_PROGRAM_ENV_PARAMETERS_ARB { already defined } + # GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB { already defined } + GL_PROGRAM_ALU_INSTRUCTIONS_ARB* = 0x00008805 + GL_PROGRAM_TEX_INSTRUCTIONS_ARB* = 0x00008806 + GL_PROGRAM_TEX_INDIRECTIONS_ARB* = 0x00008807 + GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB* = 0x00008808 + GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB* = 0x00008809 + GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB* = 0x0000880A + GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB* = 0x0000880B + GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB* = 0x0000880C + GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB* = 0x0000880D + GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB* = 0x0000880E + GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB* = 0x0000880F + GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB* = 0x00008810 # GL_PROGRAM_STRING_ARB { already defined } + # + # GL_PROGRAM_ERROR_POSITION_ARB { already defined } + # GL_CURRENT_MATRIX_ARB { already defined } + # + # GL_TRANSPOSE_CURRENT_MATRIX_ARB { already defined } + # + # GL_CURRENT_MATRIX_STACK_DEPTH_ARB { already defined } + # + # GL_MAX_PROGRAM_MATRICES_ARB { already defined } + # + # GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB { already defined } + GL_MAX_TEXTURE_COORDS_ARB* = 0x00008871 + GL_MAX_TEXTURE_IMAGE_UNITS_ARB* = 0x00008872 # GL_PROGRAM_ERROR_STRING_ARB { already defined } + # GL_MATRIX0_ARB { already defined } + # GL_MATRIX1_ARB { already defined } + # GL_MATRIX2_ARB { already defined } + # GL_MATRIX3_ARB { already defined } + # GL_MATRIX4_ARB { already defined } + # GL_MATRIX5_ARB { already defined } + # GL_MATRIX6_ARB { already defined } + # GL_MATRIX7_ARB { already defined } + # GL_MATRIX8_ARB { already defined } + # GL_MATRIX9_ARB { already defined } + # GL_MATRIX10_ARB { already defined } + # GL_MATRIX11_ARB { already defined } + # GL_MATRIX12_ARB { already defined } + # GL_MATRIX13_ARB { already defined } + # GL_MATRIX14_ARB { already defined } + # GL_MATRIX15_ARB { already defined } + # GL_MATRIX16_ARB { already defined } + # GL_MATRIX17_ARB { already defined } + # GL_MATRIX18_ARB { already defined } + # GL_MATRIX19_ARB { already defined } + # GL_MATRIX20_ARB { already defined } + # GL_MATRIX21_ARB { already defined } + # GL_MATRIX22_ARB { already defined } + # GL_MATRIX23_ARB { already defined } + # GL_MATRIX24_ARB { already defined } + # GL_MATRIX25_ARB { already defined } + # GL_MATRIX26_ARB { already defined } + # GL_MATRIX27_ARB { already defined } + # GL_MATRIX28_ARB { already defined } + # GL_MATRIX29_ARB { already defined } + # GL_MATRIX30_ARB { already defined } + # GL_MATRIX31_ARB { already defined } + # glProgramStringARB { already defined } + # glBindProgramARB { already defined } + # glDeleteProgramsARB { already defined } + # glGenProgramsARB { already defined } + # glProgramEnvParameter4dARB { already defined } + # glProgramEnvParameter4dvARB { already defined } + # glProgramEnvParameter4fARB { already defined } + # glProgramEnvParameter4fvARB { already defined } + # glProgramLocalParameter4dARB { already defined } + # glProgramLocalParameter4dvARB { already defined } + # glProgramLocalParameter4fARB { already defined } + # glProgramLocalParameter4fvARB { already defined } + # glGetProgramEnvParameterdvARB { already defined } + # glGetProgramEnvParameterfvARB { already defined } + # glGetProgramLocalParameterdvARB { already defined } + # glGetProgramLocalParameterfvARB { already defined } + # glGetProgramivARB { already defined } + # glGetProgramStringARB { already defined } + # glIsProgramARB { already defined } + + #***** GL_ATI_text_fragment_shader ***** +const + GL_TEXT_FRAGMENT_SHADER_ATI* = 0x00008200 #***** GL_ARB_vertex_buffer_object ***** + +const + GL_BUFFER_SIZE_ARB* = 0x00008764 + GL_BUFFER_USAGE_ARB* = 0x00008765 + GL_ARRAY_BUFFER_ARB* = 0x00008892 + GL_ELEMENT_ARRAY_BUFFER_ARB* = 0x00008893 + GL_ARRAY_BUFFER_BINDING_ARB* = 0x00008894 + GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB* = 0x00008895 + GL_VERTEX_ARRAY_BUFFER_BINDING_ARB* = 0x00008896 + GL_NORMAL_ARRAY_BUFFER_BINDING_ARB* = 0x00008897 + GL_COLOR_ARRAY_BUFFER_BINDING_ARB* = 0x00008898 + GL_INDEX_ARRAY_BUFFER_BINDING_ARB* = 0x00008899 + GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB* = 0x0000889A + GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB* = 0x0000889B + GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB* = 0x0000889C + GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB* = 0x0000889D + GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB* = 0x0000889E + GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB* = 0x0000889F + GL_READ_ONLY_ARB* = 0x000088B8 + GL_WRITE_ONLY_ARB* = 0x000088B9 + GL_READ_WRITE_ARB* = 0x000088BA + GL_BUFFER_ACCESS_ARB* = 0x000088BB + GL_BUFFER_MAPPED_ARB* = 0x000088BC + GL_BUFFER_MAP_POINTER_ARB* = 0x000088BD + GL_STREAM_DRAW_ARB* = 0x000088E0 + GL_STREAM_READ_ARB* = 0x000088E1 + GL_STREAM_COPY_ARB* = 0x000088E2 + GL_STATIC_DRAW_ARB* = 0x000088E4 + GL_STATIC_READ_ARB* = 0x000088E5 + GL_STATIC_COPY_ARB* = 0x000088E6 + GL_DYNAMIC_DRAW_ARB* = 0x000088E8 + GL_DYNAMIC_READ_ARB* = 0x000088E9 + GL_DYNAMIC_COPY_ARB* = 0x000088EA + +proc glBindBufferARB*(target: TGLenum, buffer: TGLuint){.dynlib: dllname, importc.} +proc glDeleteBuffersARB*(n: TGLsizei, buffers: PGLuint){.dynlib: dllname, importc.} +proc glGenBuffersARB*(n: TGLsizei, buffers: PGLuint){.dynlib: dllname, importc.} +proc glIsBufferARB*(buffer: TGLuint): TGLboolean{.dynlib: dllname, importc.} +proc glBufferDataARB*(target: TGLenum, size: TGLsizei, data: PGLvoid, + usage: TGLenum){.dynlib: dllname, importc.} +proc glBufferSubDataARB*(target: TGLenum, offset: TGLint, size: TGLsizei, + data: PGLvoid){.dynlib: dllname, importc.} +proc glGetBufferSubDataARB*(target: TGLenum, offset: TGLint, size: TGLsizei, + data: PGLvoid){.dynlib: dllname, importc.} +proc glMapBufferARB*(target: TGLenum, access: TGLenum): PGLvoid{.dynlib: dllname, + importc.} +proc glUnmapBufferARB*(target: TGLenum): TGLboolean{.dynlib: dllname, importc.} +proc glGetBufferParameterivARB*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetBufferPointervARB*(target: TGLenum, pname: TGLenum, params: PPGLvoid){. + dynlib: dllname, importc.} + #***** GL_APPLE_client_storage *****// +const + GL_UNPACK_CLIENT_STORAGE_APPLE* = 0x000085B2 + + #***** GL_APPLE_element_array *****// +const + GL_ELEMENT_ARRAY_APPLE* = 0x00008768 + GL_ELEMENT_ARRAY_TYPE_APPLE* = 0x00008769 + GL_ELEMENT_ARRAY_POINTER_APPLE* = 0x0000876A + +proc glElementPointerAPPLE*(thetype: TGLenum, pointer: PGLvoid){.dynlib: dllname, + importc.} +proc glDrawElementArrayAPPLE*(mode: TGLenum, first: TGLint, count: TGLsizei){. + dynlib: dllname, importc.} +proc glDrawRangeElementArrayAPPLE*(mode: TGLenum, start: TGLuint, theend: TGLuint, + first: TGLint, count: TGLsizei){. + dynlib: dllname, importc.} +proc glMultiDrawElementArrayAPPLE*(mode: TGLenum, first: PGLint, count: PGLsizei, + primcount: TGLsizei){.dynlib: dllname, importc.} +proc glMultiDrawRangeElementArrayAPPLE*(mode: TGLenum, start: TGLuint, + theend: TGLuint, first: PGLint, + count: PGLsizei, primcount: TGLsizei){. + dynlib: dllname, importc.} + #***** GL_APPLE_fence *****// +const + GL_DRAW_PIXELS_APPLE* = 0x00008A0A + GL_FENCE_APPLE* = 0x00008A0B + +proc glGenFencesAPPLE*(n: TGLsizei, fences: PGLuint){.dynlib: dllname, importc.} +proc glDeleteFencesAPPLE*(n: TGLsizei, fences: PGLuint){.dynlib: dllname, importc.} +proc glSetFenceAPPLE*(fence: TGLuint){.dynlib: dllname, importc.} +proc glIsFenceAPPLE*(fence: TGLuint): TGLboolean{.dynlib: dllname, importc.} +proc glTestFenceAPPLE*(fence: TGLuint): TGLboolean{.dynlib: dllname, importc.} +proc glFinishFenceAPPLE*(fence: TGLuint){.dynlib: dllname, importc.} +proc glTestObjectAPPLE*(theobject: TGLenum, name: TGLuint): TGLboolean{. + dynlib: dllname, importc.} +proc glFinishObjectAPPLE*(theobject: TGLenum, name: TGLint){.dynlib: dllname, + importc.} + #***** GL_APPLE_vertex_array_object *****// +const + GL_VERTEX_ARRAY_BINDING_APPLE* = 0x000085B5 + +proc glBindVertexArrayAPPLE*(thearray: TGLuint){.dynlib: dllname, importc.} +proc glDeleteVertexArraysAPPLE*(n: TGLsizei, arrays: PGLuint){.dynlib: dllname, + importc.} +proc glGenVertexArraysAPPLE*(n: TGLsizei, arrays: PGLuint){.dynlib: dllname, + importc.} +proc glIsVertexArrayAPPLE*(thearray: TGLuint): TGLboolean{.dynlib: dllname, + importc.} + #***** GL_APPLE_vertex_array_range *****// +const + constGL_VERTEX_ARRAY_RANGE_APPLE* = 0x0000851D + GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE* = 0x0000851E + GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_APPLE* = 0x00008520 + GL_VERTEX_ARRAY_RANGE_POINTER_APPLE* = 0x00008521 + GL_VERTEX_ARRAY_STORAGE_HINT_APPLE* = 0x0000851F + GL_STORAGE_CACHED_APPLE* = 0x000085BE + GL_STORAGE_SHARED_APPLE* = 0x000085BF + +proc glVertexArrayRangeAPPLE*(len: TGLsizei, pointer: PGLvoid){.dynlib: dllname, + importc.} +proc glFlushVertexArrayRangeAPPLE*(len: TGLsizei, pointer: PGLvoid){. + dynlib: dllname, importc.} +proc glVertexArrayParameteriAPPLE*(pname: TGLenum, param: TGLint){. + dynlib: dllname, importc.} + #***** GL_ARB_matrix_palette *****// +const + GL_MATRIX_PALETTE_ARB* = 0x00008840 + GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB* = 0x00008841 + GL_MAX_PALETTE_MATRICES_ARB* = 0x00008842 + constGL_CURRENT_PALETTE_MATRIX_ARB* = 0x00008843 + GL_MATRIX_INDEX_ARRAY_ARB* = 0x00008844 + GL_CURRENT_MATRIX_INDEX_ARB* = 0x00008845 + GL_MATRIX_INDEX_ARRAY_SIZE_ARB* = 0x00008846 + GL_MATRIX_INDEX_ARRAY_TYPE_ARB* = 0x00008847 + GL_MATRIX_INDEX_ARRAY_STRIDE_ARB* = 0x00008848 + GL_MATRIX_INDEX_ARRAY_POINTER_ARB* = 0x00008849 + +proc glCurrentPaletteMatrixARB*(index: TGLint){.dynlib: dllname, importc.} +proc glMatrixIndexubvARB*(size: TGLint, indices: PGLubyte){.dynlib: dllname, + importc.} +proc glMatrixIndexusvARB*(size: TGLint, indices: PGLushort){.dynlib: dllname, + importc.} +proc glMatrixIndexuivARB*(size: TGLint, indices: PGLuint){.dynlib: dllname, + importc.} +proc glMatrixIndexPointerARB*(size: TGLint, thetype: TGLenum, stride: TGLsizei, + pointer: PGLvoid){.dynlib: dllname, importc.} + #***** GL_NV_element_array *****// +const + GL_ELEMENT_ARRAY_TYPE_NV* = 0x00008769 + GL_ELEMENT_ARRAY_POINTER_NV* = 0x0000876A + +proc glElementPointerNV*(thetype: TGLenum, pointer: PGLvoid){.dynlib: dllname, + importc.} +proc glDrawElementArrayNV*(mode: TGLenum, first: TGLint, count: TGLsizei){. + dynlib: dllname, importc.} +proc glDrawRangeElementArrayNV*(mode: TGLenum, start: TGLuint, theend: TGLuint, + first: TGLint, count: TGLsizei){.dynlib: dllname, + importc.} +proc glMultiDrawElementArrayNV*(mode: TGLenum, first: PGLint, count: PGLsizei, + primcount: TGLsizei){.dynlib: dllname, importc.} +proc glMultiDrawRangeElementArrayNV*(mode: TGLenum, start: TGLuint, + theend: TGLuint, first: PGLint, + count: PGLsizei, primcount: TGLsizei){. + dynlib: dllname, importc.} + #***** GL_NV_float_buffer *****// +const + GL_FLOAT_R_NV* = 0x00008880 + GL_FLOAT_RG_NV* = 0x00008881 + GL_FLOAT_RGB_NV* = 0x00008882 + GL_FLOAT_RGBA_NV* = 0x00008883 + GL_FLOAT_R16_NV* = 0x00008884 + GL_FLOAT_R32_NV* = 0x00008885 + GL_FLOAT_RG16_NV* = 0x00008886 + GL_FLOAT_RG32_NV* = 0x00008887 + GL_FLOAT_RGB16_NV* = 0x00008888 + GL_FLOAT_RGB32_NV* = 0x00008889 + GL_FLOAT_RGBA16_NV* = 0x0000888A + GL_FLOAT_RGBA32_NV* = 0x0000888B + GL_TEXTURE_FLOAT_COMPONENTS_NV* = 0x0000888C + GL_FLOAT_CLEAR_COLOR_VALUE_NV* = 0x0000888D + GL_FLOAT_RGBA_MODE_NV* = 0x0000888E + + #***** GL_NV_fragment_program *****// +const + GL_FRAGMENT_PROGRAM_NV* = 0x00008870 + GL_MAX_TEXTURE_COORDS_NV* = 0x00008871 + GL_MAX_TEXTURE_IMAGE_UNITS_NV* = 0x00008872 + GL_FRAGMENT_PROGRAM_BINDING_NV* = 0x00008873 + GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV* = 0x00008868 + GL_PROGRAM_ERROR_STRING_NV* = 0x00008874 + +proc glProgramNamedParameter4fNV*(id: TGLuint, length: TGLsizei, name: PGLubyte, + x: TGLfloat, y: TGLfloat, z: TGLfloat, w: TGLfloat){. + dynlib: dllname, importc.} +proc glProgramNamedParameter4dNV*(id: TGLuint, length: TGLsizei, name: PGLubyte, + x: TGLdouble, y: TGLdouble, z: TGLdouble, + w: TGLdouble){.dynlib: dllname, importc.} +proc glGetProgramNamedParameterfvNV*(id: TGLuint, length: TGLsizei, + name: PGLubyte, params: PGLfloat){. + dynlib: dllname, importc.} +proc glGetProgramNamedParameterdvNV*(id: TGLuint, length: TGLsizei, + name: PGLubyte, params: PGLdouble){. + dynlib: dllname, importc.} + # glProgramLocalParameter4dARB { already defined } + # glProgramLocalParameter4dvARB { already defined } + # glProgramLocalParameter4fARB { already defined } + # glProgramLocalParameter4fvARB { already defined } + # glGetProgramLocalParameterdvARB { already defined } + # glGetProgramLocalParameterfvARB { already defined } + #***** GL_NV_primitive_restart *****// +const + constGL_PRIMITIVE_RESTART_NV* = 0x00008558 + constGL_PRIMITIVE_RESTART_INDEX_NV* = 0x00008559 + +proc glPrimitiveRestartNV*(){.dynlib: dllname, importc.} +proc glPrimitiveRestartIndexNV*(index: TGLuint){.dynlib: dllname, importc.} + #***** GL_NV_vertex_program2 *****// + #***** GL_NV_pixel_data_range *****// +const + GL_WRITE_PIXEL_DATA_RANGE_NV* = 0x00008878 + GL_READ_PIXEL_DATA_RANGE_NV* = 0x00008879 + GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV* = 0x0000887A + GL_READ_PIXEL_DATA_RANGE_LENGTH_NV* = 0x0000887B + GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV* = 0x0000887C + GL_READ_PIXEL_DATA_RANGE_POINTER_NV* = 0x0000887D + +proc glPixelDataRangeNV*(target: TGLenum, len: TGLsizei, pointer: PGLvoid){. + dynlib: dllname, importc.} +proc glFlushPixelDataRangeNV*(target: TGLenum){.dynlib: dllname, importc.} + # wglAllocateMemoryNV { already defined } + # wglFreeMemoryNV { already defined } + #***** GL_EXT_texture_rectangle *****// +const + GL_TEXTURE_RECTANGLE_EXT* = 0x000084F5 + GL_TEXTURE_BINDING_RECTANGLE_EXT* = 0x000084F6 + GL_PROXY_TEXTURE_RECTANGLE_EXT* = 0x000084F7 + GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT* = 0x000084F8 + + #***** GL_S3_s3tc *****// +const + GL_RGB_S3TC* = 0x000083A0 + GL_RGB4_S3TC* = 0x000083A1 + GL_RGBA_S3TC* = 0x000083A2 + GL_RGBA4_S3TC* = 0x000083A3 + + #***** GL_ATI_draw_buffers *****// +const + GL_MAX_DRAW_BUFFERS_ATI* = 0x00008824 + GL_DRAW_BUFFER0_ATI* = 0x00008825 + GL_DRAW_BUFFER1_ATI* = 0x00008826 + GL_DRAW_BUFFER2_ATI* = 0x00008827 + GL_DRAW_BUFFER3_ATI* = 0x00008828 + GL_DRAW_BUFFER4_ATI* = 0x00008829 + GL_DRAW_BUFFER5_ATI* = 0x0000882A + GL_DRAW_BUFFER6_ATI* = 0x0000882B + GL_DRAW_BUFFER7_ATI* = 0x0000882C + GL_DRAW_BUFFER8_ATI* = 0x0000882D + GL_DRAW_BUFFER9_ATI* = 0x0000882E + GL_DRAW_BUFFER10_ATI* = 0x0000882F + GL_DRAW_BUFFER11_ATI* = 0x00008830 + GL_DRAW_BUFFER12_ATI* = 0x00008831 + GL_DRAW_BUFFER13_ATI* = 0x00008832 + GL_DRAW_BUFFER14_ATI* = 0x00008833 + GL_DRAW_BUFFER15_ATI* = 0x00008834 + +proc glDrawBuffersATI*(n: TGLsizei, bufs: PGLenum){.dynlib: dllname, importc.} + #***** GL_ATI_texture_env_combine3 *****// +const + GL_MODULATE_ADD_ATI* = 0x00008744 + GL_MODULATE_SIGNED_ADD_ATI* = 0x00008745 + GL_MODULATE_SUBTRACT_ATI* = 0x00008746 + + #***** GL_ATI_texture_float *****// +const + GL_RGBA_FLOAT32_ATI* = 0x00008814 + GL_RGB_FLOAT32_ATI* = 0x00008815 + GL_ALPHA_FLOAT32_ATI* = 0x00008816 + GL_INTENSITY_FLOAT32_ATI* = 0x00008817 + GL_LUMINANCE_FLOAT32_ATI* = 0x00008818 + GL_LUMINANCE_ALPHA_FLOAT32_ATI* = 0x00008819 + GL_RGBA_FLOAT16_ATI* = 0x0000881A + GL_RGB_FLOAT16_ATI* = 0x0000881B + GL_ALPHA_FLOAT16_ATI* = 0x0000881C + GL_INTENSITY_FLOAT16_ATI* = 0x0000881D + GL_LUMINANCE_FLOAT16_ATI* = 0x0000881E + GL_LUMINANCE_ALPHA_FLOAT16_ATI* = 0x0000881F + + #***** GL_NV_texture_expand_normal *****// +const + GL_TEXTURE_UNSIGNED_REMAP_MODE_NV* = 0x0000888F + + #***** GL_NV_half_float *****// +const + GL_HALF_FLOAT_NV* = 0x0000140B + +proc glVertex2hNV*(x: TGLushort, y: TGLushort){.dynlib: dllname, importc.} +proc glVertex2hvNV*(v: PGLushort){.dynlib: dllname, importc.} +proc glVertex3hNV*(x: TGLushort, y: TGLushort, z: TGLushort){.dynlib: dllname, + importc.} +proc glVertex3hvNV*(v: PGLushort){.dynlib: dllname, importc.} +proc glVertex4hNV*(x: TGLushort, y: TGLushort, z: TGLushort, w: TGLushort){. + dynlib: dllname, importc.} +proc glVertex4hvNV*(v: PGLushort){.dynlib: dllname, importc.} +proc glNormal3hNV*(nx: TGLushort, ny: TGLushort, nz: TGLushort){.dynlib: dllname, + importc.} +proc glNormal3hvNV*(v: PGLushort){.dynlib: dllname, importc.} +proc glColor3hNV*(red: TGLushort, green: TGLushort, blue: TGLushort){. + dynlib: dllname, importc.} +proc glColor3hvNV*(v: PGLushort){.dynlib: dllname, importc.} +proc glColor4hNV*(red: TGLushort, green: TGLushort, blue: TGLushort, + alpha: TGLushort){.dynlib: dllname, importc.} +proc glColor4hvNV*(v: PGLushort){.dynlib: dllname, importc.} +proc glTexCoord1hNV*(s: TGLushort){.dynlib: dllname, importc.} +proc glTexCoord1hvNV*(v: PGLushort){.dynlib: dllname, importc.} +proc glTexCoord2hNV*(s: TGLushort, t: TGLushort){.dynlib: dllname, importc.} +proc glTexCoord2hvNV*(v: PGLushort){.dynlib: dllname, importc.} +proc glTexCoord3hNV*(s: TGLushort, t: TGLushort, r: TGLushort){.dynlib: dllname, + importc.} +proc glTexCoord3hvNV*(v: PGLushort){.dynlib: dllname, importc.} +proc glTexCoord4hNV*(s: TGLushort, t: TGLushort, r: TGLushort, q: TGLushort){. + dynlib: dllname, importc.} +proc glTexCoord4hvNV*(v: PGLushort){.dynlib: dllname, importc.} +proc glMultiTexCoord1hNV*(target: TGLenum, s: TGLushort){.dynlib: dllname, importc.} +proc glMultiTexCoord1hvNV*(target: TGLenum, v: PGLushort){.dynlib: dllname, + importc.} +proc glMultiTexCoord2hNV*(target: TGLenum, s: TGLushort, t: TGLushort){. + dynlib: dllname, importc.} +proc glMultiTexCoord2hvNV*(target: TGLenum, v: PGLushort){.dynlib: dllname, + importc.} +proc glMultiTexCoord3hNV*(target: TGLenum, s: TGLushort, t: TGLushort, r: TGLushort){. + dynlib: dllname, importc.} +proc glMultiTexCoord3hvNV*(target: TGLenum, v: PGLushort){.dynlib: dllname, + importc.} +proc glMultiTexCoord4hNV*(target: TGLenum, s: TGLushort, t: TGLushort, r: TGLushort, + q: TGLushort){.dynlib: dllname, importc.} +proc glMultiTexCoord4hvNV*(target: TGLenum, v: PGLushort){.dynlib: dllname, + importc.} +proc glFogCoordhNV*(fog: TGLushort){.dynlib: dllname, importc.} +proc glFogCoordhvNV*(fog: PGLushort){.dynlib: dllname, importc.} +proc glSecondaryColor3hNV*(red: TGLushort, green: TGLushort, blue: TGLushort){. + dynlib: dllname, importc.} +proc glSecondaryColor3hvNV*(v: PGLushort){.dynlib: dllname, importc.} +proc glVertexWeighthNV*(weight: TGLushort){.dynlib: dllname, importc.} +proc glVertexWeighthvNV*(weight: PGLushort){.dynlib: dllname, importc.} +proc glVertexAttrib1hNV*(index: TGLuint, x: TGLushort){.dynlib: dllname, importc.} +proc glVertexAttrib1hvNV*(index: TGLuint, v: PGLushort){.dynlib: dllname, importc.} +proc glVertexAttrib2hNV*(index: TGLuint, x: TGLushort, y: TGLushort){. + dynlib: dllname, importc.} +proc glVertexAttrib2hvNV*(index: TGLuint, v: PGLushort){.dynlib: dllname, importc.} +proc glVertexAttrib3hNV*(index: TGLuint, x: TGLushort, y: TGLushort, z: TGLushort){. + dynlib: dllname, importc.} +proc glVertexAttrib3hvNV*(index: TGLuint, v: PGLushort){.dynlib: dllname, importc.} +proc glVertexAttrib4hNV*(index: TGLuint, x: TGLushort, y: TGLushort, z: TGLushort, + w: TGLushort){.dynlib: dllname, importc.} +proc glVertexAttrib4hvNV*(index: TGLuint, v: PGLushort){.dynlib: dllname, importc.} +proc glVertexAttribs1hvNV*(index: TGLuint, n: TGLsizei, v: PGLushort){. + dynlib: dllname, importc.} +proc glVertexAttribs2hvNV*(index: TGLuint, n: TGLsizei, v: PGLushort){. + dynlib: dllname, importc.} +proc glVertexAttribs3hvNV*(index: TGLuint, n: TGLsizei, v: PGLushort){. + dynlib: dllname, importc.} +proc glVertexAttribs4hvNV*(index: TGLuint, n: TGLsizei, v: PGLushort){. + dynlib: dllname, importc.} + #***** GL_ATI_map_object_buffer *****// +proc glMapObjectBufferATI*(buffer: TGLuint): PGLvoid{.dynlib: dllname, importc.} +proc glUnmapObjectBufferATI*(buffer: TGLuint){.dynlib: dllname, importc.} + #***** GL_ATI_separate_stencil *****// +const + GL_KEEP* = 0x00001E00 + GL_ZERO* = 0x00000000 + GL_REPLACE* = 0x00001E01 + GL_INCR* = 0x00001E02 + GL_DECR* = 0x00001E03 + GL_INVERT* = 0x0000150A + GL_NEVER* = 0x00000200 + GL_LESS* = 0x00000201 + GL_LEQUAL* = 0x00000203 + GL_GREATER* = 0x00000204 + GL_GEQUAL* = 0x00000206 + GL_EQUAL* = 0x00000202 + GL_NOTEQUAL* = 0x00000205 + GL_ALWAYS* = 0x00000207 + GL_FRONT* = 0x00000404 + GL_BACK* = 0x00000405 + GL_FRONT_AND_BACK* = 0x00000408 + GL_STENCIL_BACK_FUNC_ATI* = 0x00008800 + GL_STENCIL_BACK_FAIL_ATI* = 0x00008801 + GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI* = 0x00008802 + GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI* = 0x00008803 + +proc glStencilOpSeparateATI*(face: TGLenum, sfail: TGLenum, dpfail: TGLenum, + dppass: TGLenum){.dynlib: dllname, importc.} +proc glStencilFuncSeparateATI*(frontfunc: TGLenum, backfunc: TGLenum, theRef: TGLint, + mask: TGLuint){.dynlib: dllname, importc.} + #***** GL_ATI_vertex_attrib_array_object *****// +proc glVertexAttribArrayObjectATI*(index: TGLuint, size: TGLint, thetype: TGLenum, + normalized: TGLboolean, stride: TGLsizei, + buffer: TGLuint, offset: TGLuint){. + dynlib: dllname, importc.} +proc glGetVertexAttribArrayObjectfvATI*(index: TGLuint, pname: TGLenum, + params: PGLfloat){.dynlib: dllname, + importc.} +proc glGetVertexAttribArrayObjectivATI*(index: TGLuint, pname: TGLenum, + params: PGLint){.dynlib: dllname, + importc.} + #***** GL_ARB_occlusion_query *****// +const + GL_SAMPLES_PASSED_ARB* = 0x00008914 + GL_QUERY_COUNTER_BITS_ARB* = 0x00008864 + GL_CURRENT_QUERY_ARB* = 0x00008865 + GL_QUERY_RESULT_ARB* = 0x00008866 + GL_QUERY_RESULT_AVAILABLE_ARB* = 0x00008867 + +proc glGenQueriesARB*(n: TGLsizei, ids: PGLuint){.dynlib: dllname, importc.} +proc glDeleteQueriesARB*(n: TGLsizei, ids: PGLuint){.dynlib: dllname, importc.} +proc glIsQueryARB*(id: TGLuint): TGLboolean{.dynlib: dllname, importc.} +proc glBeginQueryARB*(target: TGLenum, id: TGLuint){.dynlib: dllname, importc.} +proc glEndQueryARB*(target: TGLenum){.dynlib: dllname, importc.} +proc glGetQueryivARB*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetQueryObjectivARB*(id: TGLuint, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetQueryObjectuivARB*(id: TGLuint, pname: TGLenum, params: PGLuint){. + dynlib: dllname, importc.} + #***** GL_ARB_shader_objects *****// +const + GL_PROGRAM_OBJECT_ARB* = 0x00008B40 + GL_OBJECT_TYPE_ARB* = 0x00008B4E + GL_OBJECT_SUBTYPE_ARB* = 0x00008B4F + GL_OBJECT_DELETE_STATUS_ARB* = 0x00008B80 + GL_OBJECT_COMPILE_STATUS_ARB* = 0x00008B81 + GL_OBJECT_LINK_STATUS_ARB* = 0x00008B82 + GL_OBJECT_VALIDATE_STATUS_ARB* = 0x00008B83 + GL_OBJECT_INFO_LOG_LENGTH_ARB* = 0x00008B84 + GL_OBJECT_ATTACHED_OBJECTS_ARB* = 0x00008B85 + GL_OBJECT_ACTIVE_UNIFORMS_ARB* = 0x00008B86 + GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB* = 0x00008B87 + GL_OBJECT_SHADER_SOURCE_LENGTH_ARB* = 0x00008B88 + GL_SHADER_OBJECT_ARB* = 0x00008B48 + GL_FLOAT* = 0x00001406 + GL_FLOAT_VEC2_ARB* = 0x00008B50 + GL_FLOAT_VEC3_ARB* = 0x00008B51 + GL_FLOAT_VEC4_ARB* = 0x00008B52 + GL_INT* = 0x00001404 + GL_INT_VEC2_ARB* = 0x00008B53 + GL_INT_VEC3_ARB* = 0x00008B54 + GL_INT_VEC4_ARB* = 0x00008B55 + GL_BOOL_ARB* = 0x00008B56 + GL_BOOL_VEC2_ARB* = 0x00008B57 + GL_BOOL_VEC3_ARB* = 0x00008B58 + GL_BOOL_VEC4_ARB* = 0x00008B59 + GL_FLOAT_MAT2_ARB* = 0x00008B5A + GL_FLOAT_MAT3_ARB* = 0x00008B5B + GL_FLOAT_MAT4_ARB* = 0x00008B5C + +proc glDeleteObjectARB*(obj: GLhandleARB){.dynlib: dllname, importc.} +proc glGetHandleARB*(pname: TGLenum): GLhandleARB{.dynlib: dllname, importc.} +proc glDetachObjectARB*(containerObj: GLhandleARB, attachedObj: GLhandleARB){. + dynlib: dllname, importc.} +proc glCreateShaderObjectARB*(shaderType: TGLenum): GLhandleARB{.dynlib: dllname, + importc.} +proc glShaderSourceARB*(shaderObj: GLhandleARB, count: TGLsizei, str: PGLvoid, + len: PGLint){.dynlib: dllname, importc.} +proc glCompileShaderARB*(shaderObj: GLhandleARB){.dynlib: dllname, importc.} +proc glCreateProgramObjectARB*(): GLhandleARB{.dynlib: dllname, importc.} +proc glAttachObjectARB*(containerObj: GLhandleARB, obj: GLhandleARB){. + dynlib: dllname, importc.} +proc glLinkProgramARB*(programObj: GLhandleARB){.dynlib: dllname, importc.} +proc glUseProgramObjectARB*(programObj: GLhandleARB){.dynlib: dllname, importc.} +proc glValidateProgramARB*(programObj: GLhandleARB){.dynlib: dllname, importc.} +proc glUniform1fARB*(location: TGLint, v0: TGLfloat){.dynlib: dllname, importc.} +proc glUniform2fARB*(location: TGLint, v0: TGLfloat, v1: TGLfloat){. + dynlib: dllname, importc.} +proc glUniform3fARB*(location: TGLint, v0: TGLfloat, v1: TGLfloat, v2: TGLfloat){. + dynlib: dllname, importc.} +proc glUniform4fARB*(location: TGLint, v0: TGLfloat, v1: TGLfloat, v2: TGLfloat, + v3: TGLfloat){.dynlib: dllname, importc.} +proc glUniform1iARB*(location: TGLint, v0: TGLint){.dynlib: dllname, importc.} +proc glUniform2iARB*(location: TGLint, v0: TGLint, v1: TGLint){.dynlib: dllname, + importc.} +proc glUniform3iARB*(location: TGLint, v0: TGLint, v1: TGLint, v2: TGLint){. + dynlib: dllname, importc.} +proc glUniform4iARB*(location: TGLint, v0: TGLint, v1: TGLint, v2: TGLint, v3: TGLint){. + dynlib: dllname, importc.} +proc glUniform1fvARB*(location: TGLint, count: TGLsizei, value: PGLfloat){. + dynlib: dllname, importc.} +proc glUniform2fvARB*(location: TGLint, count: TGLsizei, value: PGLfloat){. + dynlib: dllname, importc.} +proc glUniform3fvARB*(location: TGLint, count: TGLsizei, value: PGLfloat){. + dynlib: dllname, importc.} +proc glUniform4fvARB*(location: TGLint, count: TGLsizei, value: PGLfloat){. + dynlib: dllname, importc.} +proc glUniform1ivARB*(location: TGLint, count: TGLsizei, value: PGLint){. + dynlib: dllname, importc.} +proc glUniform2ivARB*(location: TGLint, count: TGLsizei, value: PGLint){. + dynlib: dllname, importc.} +proc glUniform3ivARB*(location: TGLint, count: TGLsizei, value: PGLint){. + dynlib: dllname, importc.} +proc glUniform4ivARB*(location: TGLint, count: TGLsizei, value: PGLint){. + dynlib: dllname, importc.} +proc glUniformMatrix2fvARB*(location: TGLint, count: TGLsizei, + transpose: TGLboolean, value: PGLfloat){. + dynlib: dllname, importc.} +proc glUniformMatrix3fvARB*(location: TGLint, count: TGLsizei, + transpose: TGLboolean, value: PGLfloat){. + dynlib: dllname, importc.} +proc glUniformMatrix4fvARB*(location: TGLint, count: TGLsizei, + transpose: TGLboolean, value: PGLfloat){. + dynlib: dllname, importc.} +proc glGetObjectParameterfvARB*(obj: GLhandleARB, pname: TGLenum, + params: PGLfloat){.dynlib: dllname, importc.} +proc glGetObjectParameterivARB*(obj: GLhandleARB, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetInfoLogARB*(obj: GLhandleARB, maxLength: TGLsizei, len: PGLsizei, + infoLog: PGLcharARB){.dynlib: dllname, importc.} +proc glGetAttachedObjectsARB*(containerObj: GLhandleARB, maxCount: TGLsizei, + count: PGLsizei, obj: PGLhandleARB){. + dynlib: dllname, importc.} +proc glGetUniformLocationARB*(programObj: GLhandleARB, name: PGLcharARB): TGLint{. + dynlib: dllname, importc.} +proc glGetActiveUniformARB*(programObj: GLhandleARB, index: TGLuint, + maxLength: TGLsizei, len: PGLsizei, size: PGLint, + thetype: PGLenum, name: PGLcharARB){. + dynlib: dllname, importc.} +proc glGetUniformfvARB*(programObj: GLhandleARB, location: TGLint, + params: PGLfloat){.dynlib: dllname, importc.} +proc glGetUniformivARB*(programObj: GLhandleARB, location: TGLint, params: PGLint){. + dynlib: dllname, importc.} +proc glGetShaderSourceARB*(obj: GLhandleARB, maxLength: TGLsizei, len: PGLsizei, + source: PGLcharARB){.dynlib: dllname, importc.} + +const + GL_VERTEX_SHADER_ARB* = 0x00008B31 + GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB* = 0x00008B4A + GL_MAX_VARYING_FLOATS_ARB* = 0x00008B4B # GL_MAX_VERTEX_ATTRIBS_ARB { already defined } + # GL_MAX_TEXTURE_IMAGE_UNITS_ARB { already defined } + GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB* = 0x00008B4C + GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB* = 0x00008B4D # + # GL_MAX_TEXTURE_COORDS_ARB { already defined } + # + # GL_VERTEX_PROGRAM_POINT_SIZE_ARB { already defined } + # + # GL_VERTEX_PROGRAM_TWO_SIDE_ARB { already defined } + # GL_OBJECT_TYPE_ARB { already defined } + # GL_OBJECT_SUBTYPE_ARB { already defined } + GL_OBJECT_ACTIVE_ATTRIBUTES_ARB* = 0x00008B89 + GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB* = 0x00008B8A # GL_SHADER_OBJECT_ARB { already defined } + # + # GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB { already defined } + # + # GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB { already defined } + # + # GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB { already defined } + # + # GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB { already defined } + # + # GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB { already defined } + # + # GL_CURRENT_VERTEX_ATTRIB_ARB { already defined } + # + # GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB { already defined } + # GL_FLOAT { already defined } + # GL_FLOAT_VEC2_ARB { already defined } + # GL_FLOAT_VEC3_ARB { already defined } + # GL_FLOAT_VEC4_ARB { already defined } + # GL_FLOAT_MAT2_ARB { already defined } + # GL_FLOAT_MAT3_ARB { already defined } + # GL_FLOAT_MAT4_ARB { already defined } + # glVertexAttrib1fARB { already defined } + # glVertexAttrib1sARB { already defined } + # glVertexAttrib1dARB { already defined } + # glVertexAttrib2fARB { already defined } + # glVertexAttrib2sARB { already defined } + # glVertexAttrib2dARB { already defined } + # glVertexAttrib3fARB { already defined } + # glVertexAttrib3sARB { already defined } + # glVertexAttrib3dARB { already defined } + # glVertexAttrib4fARB { already defined } + # glVertexAttrib4sARB { already defined } + # glVertexAttrib4dARB { already defined } + # glVertexAttrib4NubARB { already defined } + # glVertexAttrib1fvARB { already defined } + # glVertexAttrib1svARB { already defined } + # glVertexAttrib1dvARB { already defined } + # glVertexAttrib2fvARB { already defined } + # glVertexAttrib2svARB { already defined } + # glVertexAttrib2dvARB { already defined } + # glVertexAttrib3fvARB { already defined } + # glVertexAttrib3svARB { already defined } + # glVertexAttrib3dvARB { already defined } + # glVertexAttrib4fvARB { already defined } + # glVertexAttrib4svARB { already defined } + # glVertexAttrib4dvARB { already defined } + # glVertexAttrib4ivARB { already defined } + # glVertexAttrib4bvARB { already defined } + # glVertexAttrib4ubvARB { already defined } + # glVertexAttrib4usvARB { already defined } + # glVertexAttrib4uivARB { already defined } + # glVertexAttrib4NbvARB { already defined } + # glVertexAttrib4NsvARB { already defined } + # glVertexAttrib4NivARB { already defined } + # glVertexAttrib4NubvARB { already defined } + # glVertexAttrib4NusvARB { already defined } + # glVertexAttrib4NuivARB { already defined } + # + # glVertexAttribPointerARB { already defined } + # + # glEnableVertexAttribArrayARB { already defined } + # + # glDisableVertexAttribArrayARB { already defined } + +proc glBindAttribLocationARB*(programObj: GLhandleARB, index: TGLuint, + name: PGLcharARB){.dynlib: dllname, importc.} +proc glGetActiveAttribARB*(programObj: GLhandleARB, index: TGLuint, + maxLength: TGLsizei, len: PGLsizei, size: PGLint, + thetype: PGLenum, name: PGLcharARB){.dynlib: dllname, + importc.} +proc glGetAttribLocationARB*(programObj: GLhandleARB, name: PGLcharARB): TGLint{. + dynlib: dllname, importc.} + # glGetVertexAttribdvARB { already defined } + # glGetVertexAttribfvARB { already defined } + # glGetVertexAttribivARB { already defined } + # glGetVertexAttribPointervARB { already defined } + #***** GL_ARB_fragment_shader *****// +const + GL_FRAGMENT_SHADER_ARB* = 0x00008B30 + GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB* = 0x00008B49 # GL_MAX_TEXTURE_COORDS_ARB { already defined } + # + # GL_MAX_TEXTURE_IMAGE_UNITS_ARB { already defined } + # GL_OBJECT_TYPE_ARB { already defined } + # GL_OBJECT_SUBTYPE_ARB { already defined } + # GL_SHADER_OBJECT_ARB { already defined } + + #***** GL_ARB_shading_language_100 *****// + #***** GL_ARB_texture_non_power_of_two *****// + #***** GL_ARB_point_sprite *****// +const + GL_POINT_SPRITE_ARB* = 0x00008861 + GL_COORD_REPLACE_ARB* = 0x00008862 + + #***** GL_EXT_depth_bounds_test *****// +const + constGL_DEPTH_BOUNDS_TEST_EXT* = 0x00008890 + constGL_DEPTH_BOUNDS_EXT* = 0x00008891 + +proc glDepthBoundsEXT*(zmin: TGLclampd, zmax: TGLclampd){.dynlib: dllname, importc.} + #***** GL_EXT_texture_mirror_clamp *****// +const + GL_MIRROR_CLAMP_EXT* = 0x00008742 + GL_MIRROR_CLAMP_TO_EDGE_EXT* = 0x00008743 + GL_MIRROR_CLAMP_TO_BORDER_EXT* = 0x00008912 + + #***** GL_EXT_blend_equation_separate *****// +const + GL_BLEND_EQUATION_RGB_EXT* = 0x00008009 + GL_BLEND_EQUATION_ALPHA_EXT* = 0x0000883D + +proc glBlendEquationSeparateEXT*(modeRGB: TGLenum, modeAlpha: TGLenum){. + dynlib: dllname, importc.} + #***** GL_MESA_pack_invert *****// +const + GL_PACK_INVERT_MESA* = 0x00008758 + + #***** GL_MESA_ycbcr_texture *****// +const + GL_YCBCR_MESA* = 0x00008757 + GL_UNSIGNED_SHORT_8_8_MESA* = 0x000085BA + GL_UNSIGNED_SHORT_8_8_REV_MESA* = 0x000085BB + + #***** GL_ARB_fragment_program_shadow *****// + #***** GL_NV_fragment_program_option *****// + #***** GL_EXT_pixel_buffer_object *****// +const + GL_PIXEL_PACK_BUFFER_EXT* = 0x000088EB + GL_PIXEL_UNPACK_BUFFER_EXT* = 0x000088EC + GL_PIXEL_PACK_BUFFER_BINDING_EXT* = 0x000088ED + GL_PIXEL_UNPACK_BUFFER_BINDING_EXT* = 0x000088EF + + #***** GL_NV_fragment_program2 *****// +const + GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV* = 0x000088F4 + GL_MAX_PROGRAM_CALL_DEPTH_NV* = 0x000088F5 + GL_MAX_PROGRAM_IF_DEPTH_NV* = 0x000088F6 + GL_MAX_PROGRAM_LOOP_DEPTH_NV* = 0x000088F7 + GL_MAX_PROGRAM_LOOP_COUNT_NV* = 0x000088F8 + + #***** GL_NV_vertex_program2_option *****// + # GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV { already defined } + # GL_MAX_PROGRAM_CALL_DEPTH_NV { already defined } + #***** GL_NV_vertex_program3 *****// + # GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB { already defined } + #***** GL_ARB_draw_buffers *****// +const + GL_MAX_DRAW_BUFFERS_ARB* = 0x00008824 + GL_DRAW_BUFFER0_ARB* = 0x00008825 + GL_DRAW_BUFFER1_ARB* = 0x00008826 + GL_DRAW_BUFFER2_ARB* = 0x00008827 + GL_DRAW_BUFFER3_ARB* = 0x00008828 + GL_DRAW_BUFFER4_ARB* = 0x00008829 + GL_DRAW_BUFFER5_ARB* = 0x0000882A + GL_DRAW_BUFFER6_ARB* = 0x0000882B + GL_DRAW_BUFFER7_ARB* = 0x0000882C + GL_DRAW_BUFFER8_ARB* = 0x0000882D + GL_DRAW_BUFFER9_ARB* = 0x0000882E + GL_DRAW_BUFFER10_ARB* = 0x0000882F + GL_DRAW_BUFFER11_ARB* = 0x00008830 + GL_DRAW_BUFFER12_ARB* = 0x00008831 + GL_DRAW_BUFFER13_ARB* = 0x00008832 + GL_DRAW_BUFFER14_ARB* = 0x00008833 + GL_DRAW_BUFFER15_ARB* = 0x00008834 + +proc glDrawBuffersARB*(n: TGLsizei, bufs: PGLenum){.dynlib: dllname, importc.} + #***** GL_ARB_texture_rectangle *****// +const + GL_TEXTURE_RECTANGLE_ARB* = 0x000084F5 + GL_TEXTURE_BINDING_RECTANGLE_ARB* = 0x000084F6 + GL_PROXY_TEXTURE_RECTANGLE_ARB* = 0x000084F7 + GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB* = 0x000084F8 + + #***** GL_ARB_color_buffer_float *****// +const + GL_RGBA_FLOAT_MODE_ARB* = 0x00008820 + GL_CLAMP_VERTEX_COLOR_ARB* = 0x0000891A + GL_CLAMP_FRAGMENT_COLOR_ARB* = 0x0000891B + GL_CLAMP_READ_COLOR_ARB* = 0x0000891C + GL_FIXED_ONLY_ARB* = 0x0000891D + WGL_TYPE_RGBA_FLOAT_ARB* = 0x000021A0 + +proc glClampColorARB*(target: TGLenum, clamp: TGLenum){.dynlib: dllname, importc.} + #***** GL_ARB_half_float_pixel *****// +const + GL_HALF_FLOAT_ARB* = 0x0000140B + + #***** GL_ARB_texture_float *****// +const + GL_TEXTURE_RED_TYPE_ARB* = 0x00008C10 + GL_TEXTURE_GREEN_TYPE_ARB* = 0x00008C11 + GL_TEXTURE_BLUE_TYPE_ARB* = 0x00008C12 + GL_TEXTURE_ALPHA_TYPE_ARB* = 0x00008C13 + GL_TEXTURE_LUMINANCE_TYPE_ARB* = 0x00008C14 + GL_TEXTURE_INTENSITY_TYPE_ARB* = 0x00008C15 + GL_TEXTURE_DEPTH_TYPE_ARB* = 0x00008C16 + GL_UNSIGNED_NORMALIZED_ARB* = 0x00008C17 + GL_RGBA32F_ARB* = 0x00008814 + GL_RGB32F_ARB* = 0x00008815 + GL_ALPHA32F_ARB* = 0x00008816 + GL_INTENSITY32F_ARB* = 0x00008817 + GL_LUMINANCE32F_ARB* = 0x00008818 + GL_LUMINANCE_ALPHA32F_ARB* = 0x00008819 + GL_RGBA16F_ARB* = 0x0000881A + GL_RGB16F_ARB* = 0x0000881B + GL_ALPHA16F_ARB* = 0x0000881C + GL_INTENSITY16F_ARB* = 0x0000881D + GL_LUMINANCE16F_ARB* = 0x0000881E + GL_LUMINANCE_ALPHA16F_ARB* = 0x0000881F + + #***** GL_EXT_texture_compression_dxt1 *****// + # GL_COMPRESSED_RGB_S3TC_DXT1_EXT { already defined } + # GL_COMPRESSED_RGBA_S3TC_DXT1_EXT { already defined } + #***** GL_ARB_pixel_buffer_object *****// +const + GL_PIXEL_PACK_BUFFER_ARB* = 0x000088EB + GL_PIXEL_UNPACK_BUFFER_ARB* = 0x000088EC + GL_PIXEL_PACK_BUFFER_BINDING_ARB* = 0x000088ED + GL_PIXEL_UNPACK_BUFFER_BINDING_ARB* = 0x000088EF + + #***** GL_EXT_framebuffer_object *****// +const + GL_FRAMEBUFFER_EXT* = 0x00008D40 + GL_RENDERBUFFER_EXT* = 0x00008D41 + GL_STENCIL_INDEX_EXT* = 0x00008D45 + GL_STENCIL_INDEX1_EXT* = 0x00008D46 + GL_STENCIL_INDEX4_EXT* = 0x00008D47 + GL_STENCIL_INDEX8_EXT* = 0x00008D48 + GL_STENCIL_INDEX16_EXT* = 0x00008D49 + GL_RENDERBUFFER_WIDTH_EXT* = 0x00008D42 + GL_RENDERBUFFER_HEIGHT_EXT* = 0x00008D43 + GL_RENDERBUFFER_INTERNAL_FORMAT_EXT* = 0x00008D44 + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT* = 0x00008CD0 + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT* = 0x00008CD1 + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT* = 0x00008CD2 + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT* = 0x00008CD3 + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT* = 0x00008CD4 + GL_COLOR_ATTACHMENT0_EXT* = 0x00008CE0 + GL_COLOR_ATTACHMENT1_EXT* = 0x00008CE1 + GL_COLOR_ATTACHMENT2_EXT* = 0x00008CE2 + GL_COLOR_ATTACHMENT3_EXT* = 0x00008CE3 + GL_COLOR_ATTACHMENT4_EXT* = 0x00008CE4 + GL_COLOR_ATTACHMENT5_EXT* = 0x00008CE5 + GL_COLOR_ATTACHMENT6_EXT* = 0x00008CE6 + GL_COLOR_ATTACHMENT7_EXT* = 0x00008CE7 + GL_COLOR_ATTACHMENT8_EXT* = 0x00008CE8 + GL_COLOR_ATTACHMENT9_EXT* = 0x00008CE9 + GL_COLOR_ATTACHMENT10_EXT* = 0x00008CEA + GL_COLOR_ATTACHMENT11_EXT* = 0x00008CEB + GL_COLOR_ATTACHMENT12_EXT* = 0x00008CEC + GL_COLOR_ATTACHMENT13_EXT* = 0x00008CED + GL_COLOR_ATTACHMENT14_EXT* = 0x00008CEE + GL_COLOR_ATTACHMENT15_EXT* = 0x00008CEF + GL_DEPTH_ATTACHMENT_EXT* = 0x00008D00 + GL_STENCIL_ATTACHMENT_EXT* = 0x00008D20 + GL_FRAMEBUFFER_COMPLETE_EXT* = 0x00008CD5 + GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT* = 0x00008CD6 + GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT* = 0x00008CD7 + GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT* = 0x00008CD8 + GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT* = 0x00008CD9 + GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT* = 0x00008CDA + GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT* = 0x00008CDB + GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT* = 0x00008CDC + GL_FRAMEBUFFER_UNSUPPORTED_EXT* = 0x00008CDD + GL_FRAMEBUFFER_STATUS_ERROR_EXT* = 0x00008CDE + GL_FRAMEBUFFER_BINDING_EXT* = 0x00008CA6 + GL_RENDERBUFFER_BINDING_EXT* = 0x00008CA7 + GL_MAX_COLOR_ATTACHMENTS_EXT* = 0x00008CDF + GL_MAX_RENDERBUFFER_SIZE_EXT* = 0x000084E8 + GL_INVALID_FRAMEBUFFER_OPERATION_EXT* = 0x00000506 + +proc glIsRenderbufferEXT*(renderbuffer: TGLuint): TGLboolean{.dynlib: dllname, + importc.} +proc glBindRenderbufferEXT*(target: TGLenum, renderbuffer: TGLuint){. + dynlib: dllname, importc.} +proc glDeleteRenderbuffersEXT*(n: TGLsizei, renderbuffers: PGLuint){. + dynlib: dllname, importc.} +proc glGenRenderbuffersEXT*(n: TGLsizei, renderbuffers: PGLuint){. + dynlib: dllname, importc.} +proc glRenderbufferStorageEXT*(target: TGLenum, internalformat: TGLenum, + width: TGLsizei, height: TGLsizei){. + dynlib: dllname, importc.} +proc glGetRenderbufferParameterivEXT*(target: TGLenum, pname: TGLenum, + params: PGLint){.dynlib: dllname, importc.} +proc glIsFramebufferEXT*(framebuffer: TGLuint): TGLboolean{.dynlib: dllname, + importc.} +proc glBindFramebufferEXT*(target: TGLenum, framebuffer: TGLuint){. + dynlib: dllname, importc.} +proc glDeleteFramebuffersEXT*(n: TGLsizei, framebuffers: PGLuint){. + dynlib: dllname, importc.} +proc glGenFramebuffersEXT*(n: TGLsizei, framebuffers: PGLuint){.dynlib: dllname, + importc.} +proc glCheckFramebufferStatusEXT*(target: TGLenum): TGLenum{.dynlib: dllname, + importc.} +proc glFramebufferTexture1DEXT*(target: TGLenum, attachment: TGLenum, + textarget: TGLenum, texture: TGLuint, level: TGLint){. + dynlib: dllname, importc.} +proc glFramebufferTexture2DEXT*(target: TGLenum, attachment: TGLenum, + textarget: TGLenum, texture: TGLuint, level: TGLint){. + dynlib: dllname, importc.} +proc glFramebufferTexture3DEXT*(target: TGLenum, attachment: TGLenum, + textarget: TGLenum, texture: TGLuint, + level: TGLint, zoffset: TGLint){.dynlib: dllname, + importc.} +proc glFramebufferRenderbufferEXT*(target: TGLenum, attachment: TGLenum, + renderbuffertarget: TGLenum, + renderbuffer: TGLuint){.dynlib: dllname, + importc.} +proc glGetFramebufferAttachmentParameterivEXT*(target: TGLenum, + attachment: TGLenum, pname: TGLenum, params: PGLint){.dynlib: dllname, importc.} +proc glGenerateMipmapEXT*(target: TGLenum){.dynlib: dllname, importc.} + #***** GL_version_1_4 *****// +const + GL_BLEND_DST_RGB* = 0x000080C8 + GL_BLEND_SRC_RGB* = 0x000080C9 + GL_BLEND_DST_ALPHA* = 0x000080CA + GL_BLEND_SRC_ALPHA* = 0x000080CB + GL_POINT_SIZE_MIN* = 0x00008126 + GL_POINT_SIZE_MAX* = 0x00008127 + GL_POINT_FADE_THRESHOLD_SIZE* = 0x00008128 + GL_POINT_DISTANCE_ATTENUATION* = 0x00008129 + GL_GENERATE_MIPMAP* = 0x00008191 + GL_GENERATE_MIPMAP_HINT* = 0x00008192 + GL_DEPTH_COMPONENT16* = 0x000081A5 + GL_DEPTH_COMPONENT24* = 0x000081A6 + GL_DEPTH_COMPONENT32* = 0x000081A7 + GL_MIRRORED_REPEAT* = 0x00008370 + GL_FOG_COORDINATE_SOURCE* = 0x00008450 + GL_FOG_COORDINATE* = 0x00008451 + GL_FRAGMENT_DEPTH* = 0x00008452 + GL_CURRENT_FOG_COORDINATE* = 0x00008453 + GL_FOG_COORDINATE_ARRAY_TYPE* = 0x00008454 + GL_FOG_COORDINATE_ARRAY_STRIDE* = 0x00008455 + GL_FOG_COORDINATE_ARRAY_POINTER* = 0x00008456 + GL_FOG_COORDINATE_ARRAY* = 0x00008457 + GL_COLOR_SUM* = 0x00008458 + GL_CURRENT_SECONDARY_COLOR* = 0x00008459 + GL_SECONDARY_COLOR_ARRAY_SIZE* = 0x0000845A + GL_SECONDARY_COLOR_ARRAY_TYPE* = 0x0000845B + GL_SECONDARY_COLOR_ARRAY_STRIDE* = 0x0000845C + GL_SECONDARY_COLOR_ARRAY_POINTER* = 0x0000845D + GL_SECONDARY_COLOR_ARRAY* = 0x0000845E + GL_MAX_TEXTURE_LOD_BIAS* = 0x000084FD + GL_TEXTURE_FILTER_CONTROL* = 0x00008500 + GL_TEXTURE_LOD_BIAS* = 0x00008501 + GL_INCR_WRAP* = 0x00008507 + GL_DECR_WRAP* = 0x00008508 + GL_TEXTURE_DEPTH_SIZE* = 0x0000884A + GL_DEPTH_TEXTURE_MODE* = 0x0000884B + GL_TEXTURE_COMPARE_MODE* = 0x0000884C + GL_TEXTURE_COMPARE_FUNC* = 0x0000884D + GL_COMPARE_R_TO_TEXTURE* = 0x0000884E + +proc glBlendFuncSeparate*(sfactorRGB: TGLenum, dfactorRGB: TGLenum, + sfactorAlpha: TGLenum, dfactorAlpha: TGLenum){. + dynlib: dllname, importc.} +proc glFogCoordf*(coord: TGLfloat){.dynlib: dllname, importc.} +proc glFogCoordfv*(coord: PGLfloat){.dynlib: dllname, importc.} +proc glFogCoordd*(coord: TGLdouble){.dynlib: dllname, importc.} +proc glFogCoorddv*(coord: PGLdouble){.dynlib: dllname, importc.} +proc glFogCoordPointer*(thetype: TGLenum, stride: TGLsizei, pointer: PGLvoid){. + dynlib: dllname, importc.} +proc glMultiDrawArrays*(mode: TGLenum, first: PGLint, count: PGLsizei, + primcount: TGLsizei){.dynlib: dllname, importc.} +proc glMultiDrawElements*(mode: TGLenum, count: PGLsizei, thetype: TGLenum, + indices: PGLvoid, primcount: TGLsizei){. + dynlib: dllname, importc.} +proc glPointParameterf*(pname: TGLenum, param: TGLfloat){.dynlib: dllname, importc.} +proc glPointParameterfv*(pname: TGLenum, params: PGLfloat){.dynlib: dllname, + importc.} +proc glPointParameteri*(pname: TGLenum, param: TGLint){.dynlib: dllname, importc.} +proc glPointParameteriv*(pname: TGLenum, params: PGLint){.dynlib: dllname, + importc.} +proc glSecondaryColor3b*(red: TGLByte, green: TGLByte, blue: TGLByte){. + dynlib: dllname, importc.} +proc glSecondaryColor3bv*(v: PGLbyte){.dynlib: dllname, importc.} +proc glSecondaryColor3d*(red: TGLdouble, green: TGLdouble, blue: TGLdouble){. + dynlib: dllname, importc.} +proc glSecondaryColor3dv*(v: PGLdouble){.dynlib: dllname, importc.} +proc glSecondaryColor3f*(red: TGLfloat, green: TGLfloat, blue: TGLfloat){. + dynlib: dllname, importc.} +proc glSecondaryColor3fv*(v: PGLfloat){.dynlib: dllname, importc.} +proc glSecondaryColor3i*(red: TGLint, green: TGLint, blue: TGLint){. + dynlib: dllname, importc.} +proc glSecondaryColor3iv*(v: PGLint){.dynlib: dllname, importc.} +proc glSecondaryColor3s*(red: TGLshort, green: TGLshort, blue: TGLshort){. + dynlib: dllname, importc.} +proc glSecondaryColor3sv*(v: PGLshort){.dynlib: dllname, importc.} +proc glSecondaryColor3ub*(red: TGLubyte, green: TGLubyte, blue: TGLubyte){. + dynlib: dllname, importc.} +proc glSecondaryColor3ubv*(v: PGLubyte){.dynlib: dllname, importc.} +proc glSecondaryColor3ui*(red: TGLuint, green: TGLuint, blue: TGLuint){. + dynlib: dllname, importc.} +proc glSecondaryColor3uiv*(v: PGLuint){.dynlib: dllname, importc.} +proc glSecondaryColor3us*(red: TGLushort, green: TGLushort, blue: TGLushort){. + dynlib: dllname, importc.} +proc glSecondaryColor3usv*(v: PGLushort){.dynlib: dllname, importc.} +proc glSecondaryColorPointer*(size: TGLint, thetype: TGLenum, stride: TGLsizei, + pointer: PGLvoid){.dynlib: dllname, importc.} +proc glWindowPos2d*(x: TGLdouble, y: TGLdouble){.dynlib: dllname, importc.} +proc glWindowPos2dv*(v: PGLdouble){.dynlib: dllname, importc.} +proc glWindowPos2f*(x: TGLfloat, y: TGLfloat){.dynlib: dllname, importc.} +proc glWindowPos2fv*(v: PGLfloat){.dynlib: dllname, importc.} +proc glWindowPos2i*(x: TGLint, y: TGLint){.dynlib: dllname, importc.} +proc glWindowPos2iv*(v: PGLint){.dynlib: dllname, importc.} +proc glWindowPos2s*(x: TGLshort, y: TGLshort){.dynlib: dllname, importc.} +proc glWindowPos2sv*(v: PGLshort){.dynlib: dllname, importc.} +proc glWindowPos3d*(x: TGLdouble, y: TGLdouble, z: TGLdouble){.dynlib: dllname, + importc.} +proc glWindowPos3dv*(v: PGLdouble){.dynlib: dllname, importc.} +proc glWindowPos3f*(x: TGLfloat, y: TGLfloat, z: TGLfloat){.dynlib: dllname, + importc.} +proc glWindowPos3fv*(v: PGLfloat){.dynlib: dllname, importc.} +proc glWindowPos3i*(x: TGLint, y: TGLint, z: TGLint){.dynlib: dllname, importc.} +proc glWindowPos3iv*(v: PGLint){.dynlib: dllname, importc.} +proc glWindowPos3s*(x: TGLshort, y: TGLshort, z: TGLshort){.dynlib: dllname, + importc.} +proc glWindowPos3sv*(v: PGLshort){.dynlib: dllname, importc.} + #***** GL_version_1_5 *****// +const + GL_BUFFER_SIZE* = 0x00008764 + GL_BUFFER_USAGE* = 0x00008765 + GL_QUERY_COUNTER_BITS* = 0x00008864 + GL_CURRENT_QUERY* = 0x00008865 + GL_QUERY_RESULT* = 0x00008866 + GL_QUERY_RESULT_AVAILABLE* = 0x00008867 + GL_ARRAY_BUFFER* = 0x00008892 + GL_ELEMENT_ARRAY_BUFFER* = 0x00008893 + GL_ARRAY_BUFFER_BINDING* = 0x00008894 + GL_ELEMENT_ARRAY_BUFFER_BINDING* = 0x00008895 + GL_VERTEX_ARRAY_BUFFER_BINDING* = 0x00008896 + GL_NORMAL_ARRAY_BUFFER_BINDING* = 0x00008897 + GL_COLOR_ARRAY_BUFFER_BINDING* = 0x00008898 + GL_INDEX_ARRAY_BUFFER_BINDING* = 0x00008899 + GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING* = 0x0000889A + GL_EDGE_FLAG_ARRAY_BUFFER_BINDING* = 0x0000889B + GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING* = 0x0000889C + GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING* = 0x0000889D + GL_WEIGHT_ARRAY_BUFFER_BINDING* = 0x0000889E + GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING* = 0x0000889F + GL_READ_ONLY* = 0x000088B8 + GL_WRITE_ONLY* = 0x000088B9 + GL_READ_WRITE* = 0x000088BA + GL_BUFFER_ACCESS* = 0x000088BB + GL_BUFFER_MAPPED* = 0x000088BC + GL_BUFFER_MAP_POINTER* = 0x000088BD + GL_STREAM_DRAW* = 0x000088E0 + GL_STREAM_READ* = 0x000088E1 + GL_STREAM_COPY* = 0x000088E2 + GL_STATIC_DRAW* = 0x000088E4 + GL_STATIC_READ* = 0x000088E5 + GL_STATIC_COPY* = 0x000088E6 + GL_DYNAMIC_DRAW* = 0x000088E8 + GL_DYNAMIC_READ* = 0x000088E9 + GL_DYNAMIC_COPY* = 0x000088EA + GL_SAMPLES_PASSED* = 0x00008914 + GL_FOG_COORD_SRC* = 0x00008450 + GL_FOG_COORD* = 0x00008451 + GL_CURRENT_FOG_COORD* = 0x00008453 + GL_FOG_COORD_ARRAY_TYPE* = 0x00008454 + GL_FOG_COORD_ARRAY_STRIDE* = 0x00008455 + GL_FOG_COORD_ARRAY_POINTER* = 0x00008456 + GL_FOG_COORD_ARRAY* = 0x00008457 + GL_FOG_COORD_ARRAY_BUFFER_BINDING* = 0x0000889D + GL_SRC0_RGB* = 0x00008580 + GL_SRC1_RGB* = 0x00008581 + GL_SRC2_RGB* = 0x00008582 + GL_SRC0_ALPHA* = 0x00008588 + GL_SRC1_ALPHA* = 0x00008589 + GL_SRC2_ALPHA* = 0x0000858A + +proc glGenQueries*(n: TGLsizei, ids: PGLuint){.dynlib: dllname, importc.} +proc glDeleteQueries*(n: TGLsizei, ids: PGLuint){.dynlib: dllname, importc.} +proc glIsQuery*(id: TGLuint): TGLboolean{.dynlib: dllname, importc.} +proc glBeginQuery*(target: TGLenum, id: TGLuint){.dynlib: dllname, importc.} +proc glEndQuery*(target: TGLenum){.dynlib: dllname, importc.} +proc glGetQueryiv*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetQueryObjectiv*(id: TGLuint, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetQueryObjectuiv*(id: TGLuint, pname: TGLenum, params: PGLuint){. + dynlib: dllname, importc.} +proc glBindBuffer*(target: TGLenum, buffer: TGLuint){.dynlib: dllname, importc.} +proc glDeleteBuffers*(n: TGLsizei, buffers: PGLuint){.dynlib: dllname, importc.} +proc glGenBuffers*(n: TGLsizei, buffers: PGLuint){.dynlib: dllname, importc.} +proc glIsBuffer*(buffer: TGLuint): TGLboolean{.dynlib: dllname, importc.} +proc glBufferData*(target: TGLenum, size: GLsizeiptr, data: PGLvoid, + usage: TGLenum){.dynlib: dllname, importc.} +proc glBufferSubData*(target: TGLenum, offset: GLintptr, size: GLsizeiptr, + data: PGLvoid){.dynlib: dllname, importc.} +proc glGetBufferSubData*(target: TGLenum, offset: GLintptr, size: GLsizeiptr, + data: PGLvoid){.dynlib: dllname, importc.} +proc glMapBuffer*(target: TGLenum, access: TGLenum): PGLvoid{.dynlib: dllname, + importc.} +proc glUnmapBuffer*(target: TGLenum): TGLboolean{.dynlib: dllname, importc.} +proc glGetBufferParameteriv*(target: TGLenum, pname: TGLenum, params: PGLint){. + dynlib: dllname, importc.} +proc glGetBufferPointerv*(target: TGLenum, pname: TGLenum, params: PGLvoid){. + dynlib: dllname, importc.} + #***** GL_version_2_0 *****// +const + GL_BLEND_EQUATION_RGB* = 0x00008009 + GL_VERTEX_ATTRIB_ARRAY_ENABLED* = 0x00008622 + GL_VERTEX_ATTRIB_ARRAY_SIZE* = 0x00008623 + GL_VERTEX_ATTRIB_ARRAY_STRIDE* = 0x00008624 + GL_VERTEX_ATTRIB_ARRAY_TYPE* = 0x00008625 + GL_CURRENT_VERTEX_ATTRIB* = 0x00008626 + GL_VERTEX_PROGRAM_POINT_SIZE* = 0x00008642 + GL_VERTEX_PROGRAM_TWO_SIDE* = 0x00008643 + GL_VERTEX_ATTRIB_ARRAY_POINTER* = 0x00008645 + GL_STENCIL_BACK_FUNC* = 0x00008800 + GL_STENCIL_BACK_FAIL* = 0x00008801 + GL_STENCIL_BACK_PASS_DEPTH_FAIL* = 0x00008802 + GL_STENCIL_BACK_PASS_DEPTH_PASS* = 0x00008803 + GL_MAX_DRAW_BUFFERS* = 0x00008824 + GL_DRAW_BUFFER0* = 0x00008825 + GL_DRAW_BUFFER1* = 0x00008826 + GL_DRAW_BUFFER2* = 0x00008827 + GL_DRAW_BUFFER3* = 0x00008828 + GL_DRAW_BUFFER4* = 0x00008829 + GL_DRAW_BUFFER5* = 0x0000882A + GL_DRAW_BUFFER6* = 0x0000882B + GL_DRAW_BUFFER7* = 0x0000882C + GL_DRAW_BUFFER8* = 0x0000882D + GL_DRAW_BUFFER9* = 0x0000882E + GL_DRAW_BUFFER10* = 0x0000882F + GL_DRAW_BUFFER11* = 0x00008830 + GL_DRAW_BUFFER12* = 0x00008831 + GL_DRAW_BUFFER13* = 0x00008832 + GL_DRAW_BUFFER14* = 0x00008833 + GL_DRAW_BUFFER15* = 0x00008834 + GL_BLEND_EQUATION_ALPHA* = 0x0000883D + GL_POINT_SPRITE* = 0x00008861 + GL_COORD_REPLACE* = 0x00008862 + GL_MAX_VERTEX_ATTRIBS* = 0x00008869 + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED* = 0x0000886A + GL_MAX_TEXTURE_COORDS* = 0x00008871 + GL_MAX_TEXTURE_IMAGE_UNITS* = 0x00008872 + GL_FRAGMENT_SHADER* = 0x00008B30 + GL_VERTEX_SHADER* = 0x00008B31 + GL_MAX_FRAGMENT_UNIFORM_COMPONENTS* = 0x00008B49 + GL_MAX_VERTEX_UNIFORM_COMPONENTS* = 0x00008B4A + GL_MAX_VARYING_FLOATS* = 0x00008B4B + GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS* = 0x00008B4C + GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS* = 0x00008B4D + GL_SHADER_TYPE* = 0x00008B4F + GL_FLOAT_VEC2* = 0x00008B50 + GL_FLOAT_VEC3* = 0x00008B51 + GL_FLOAT_VEC4* = 0x00008B52 + GL_INT_VEC2* = 0x00008B53 + GL_INT_VEC3* = 0x00008B54 + GL_INT_VEC4* = 0x00008B55 + GL_BOOL* = 0x00008B56 + GL_BOOL_VEC2* = 0x00008B57 + GL_BOOL_VEC3* = 0x00008B58 + GL_BOOL_VEC4* = 0x00008B59 + GL_FLOAT_MAT2* = 0x00008B5A + GL_FLOAT_MAT3* = 0x00008B5B + GL_FLOAT_MAT4* = 0x00008B5C + GL_SAMPLER_1D* = 0x00008B5D + GL_SAMPLER_2D* = 0x00008B5E + GL_SAMPLER_3D* = 0x00008B5F + GL_SAMPLER_CUBE* = 0x00008B60 + GL_SAMPLER_1D_SHADOW* = 0x00008B61 + GL_SAMPLER_2D_SHADOW* = 0x00008B62 + GL_DELETE_STATUS* = 0x00008B80 + GL_COMPILE_STATUS* = 0x00008B81 + GL_LINK_STATUS* = 0x00008B82 + GL_VALIDATE_STATUS* = 0x00008B83 + GL_INFO_LOG_LENGTH* = 0x00008B84 + GL_ATTACHED_SHADERS* = 0x00008B85 + GL_ACTIVE_UNIFORMS* = 0x00008B86 + GL_ACTIVE_UNIFORM_MAX_LENGTH* = 0x00008B87 + GL_SHADER_SOURCE_LENGTH* = 0x00008B88 + GL_ACTIVE_ATTRIBUTES* = 0x00008B89 + GL_ACTIVE_ATTRIBUTE_MAX_LENGTH* = 0x00008B8A + GL_FRAGMENT_SHADER_DERIVATIVE_HINT* = 0x00008B8B + GL_SHADING_LANGUAGE_VERSION* = 0x00008B8C + GL_CURRENT_PROGRAM* = 0x00008B8D + GL_POINT_SPRITE_COORD_ORIGIN* = 0x00008CA0 + GL_LOWER_LEFT* = 0x00008CA1 + GL_UPPER_LEFT* = 0x00008CA2 + GL_STENCIL_BACK_REF* = 0x00008CA3 + GL_STENCIL_BACK_VALUE_MASK* = 0x00008CA4 + GL_STENCIL_BACK_WRITEMASK* = 0x00008CA5 + +{.pop.} diff --git a/lib/oldwrappers/opengl/glu.nim b/lib/oldwrappers/opengl/glu.nim new file mode 100644 index 000000000..297f4d354 --- /dev/null +++ b/lib/oldwrappers/opengl/glu.nim @@ -0,0 +1,311 @@ +# +# +# Adaption of the delphi3d.net OpenGL units to FreePascal +# Sebastian Guenther (sg@freepascal.org) in 2002 +# These units are free to use +#****************************************************************************** +# Converted to Delphi by Tom Nuydens (tom@delphi3d.net) +# For the latest updates, visit Delphi3D: http://www.delphi3d.net +#****************************************************************************** + +import + GL + +when defined(windows): + const dllname = "glu32.dll" +elif defined(macosx): + const dllname = "/System/Library/Frameworks/OpenGL.framework/Libraries/libGLU.dylib" +else: + const dllname = "libGLU.so.1" + +type + TViewPortArray* = array[0..3, TGLint] + T16dArray* = array[0..15, TGLdouble] + TCallBack* = proc () + T3dArray* = array[0..2, TGLdouble] + T4pArray* = array[0..3, Pointer] + T4fArray* = array[0..3, TGLfloat] + PPointer* = ptr Pointer + +type + GLUnurbs*{.final.} = object + PGLUnurbs* = ptr GLUnurbs + GLUquadric*{.final.} = object + PGLUquadric* = ptr GLUquadric + GLUtesselator*{.final.} = object + PGLUtesselator* = ptr GLUtesselator # backwards compatibility: + GLUnurbsObj* = GLUnurbs + PGLUnurbsObj* = PGLUnurbs + GLUquadricObj* = GLUquadric + PGLUquadricObj* = PGLUquadric + GLUtesselatorObj* = GLUtesselator + PGLUtesselatorObj* = PGLUtesselator + GLUtriangulatorObj* = GLUtesselator + PGLUtriangulatorObj* = PGLUtesselator + TGLUnurbs* = GLUnurbs + TGLUquadric* = GLUquadric + TGLUtesselator* = GLUtesselator + TGLUnurbsObj* = GLUnurbsObj + TGLUquadricObj* = GLUquadricObj + TGLUtesselatorObj* = GLUtesselatorObj + TGLUtriangulatorObj* = GLUtriangulatorObj + +proc gluErrorString*(errCode: TGLenum): cstring{.dynlib: dllname, importc.} +proc gluErrorUnicodeStringEXT*(errCode: TGLenum): ptr int16{.dynlib: dllname, + importc.} +proc gluGetString*(name: TGLenum): cstring{.dynlib: dllname, importc.} +proc gluOrtho2D*(left, right, bottom, top: TGLdouble){.dynlib: dllname, importc.} +proc gluPerspective*(fovy, aspect, zNear, zFar: TGLdouble){.dynlib: dllname, + importc.} +proc gluPickMatrix*(x, y, width, height: TGLdouble, viewport: var TViewPortArray){. + dynlib: dllname, importc.} +proc gluLookAt*(eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz: TGLdouble){. + dynlib: dllname, importc.} +proc gluProject*(objx, objy, objz: TGLdouble, + modelMatrix, projMatrix: var T16dArray, + viewport: var TViewPortArray, winx, winy, winz: PGLdouble): int{. + dynlib: dllname, importc.} +proc gluUnProject*(winx, winy, winz: TGLdouble, + modelMatrix, projMatrix: var T16dArray, + viewport: var TViewPortArray, objx, objy, objz: PGLdouble): int{. + dynlib: dllname, importc.} +proc gluScaleImage*(format: TGLenum, widthin, heightin: TGLint, typein: TGLenum, + datain: Pointer, widthout, heightout: TGLint, + typeout: TGLenum, dataout: Pointer): int{.dynlib: dllname, + importc.} +proc gluBuild1DMipmaps*(target: TGLenum, components, width: TGLint, + format, atype: TGLenum, data: Pointer): int{. + dynlib: dllname, importc.} +proc gluBuild2DMipmaps*(target: TGLenum, components, width, height: TGLint, + format, atype: TGLenum, data: Pointer): int{. + dynlib: dllname, importc.} +proc gluNewQuadric*(): PGLUquadric{.dynlib: dllname, importc.} +proc gluDeleteQuadric*(state: PGLUquadric){.dynlib: dllname, importc.} +proc gluQuadricNormals*(quadObject: PGLUquadric, normals: TGLenum){. + dynlib: dllname, importc.} +proc gluQuadricTexture*(quadObject: PGLUquadric, textureCoords: TGLboolean){. + dynlib: dllname, importc.} +proc gluQuadricOrientation*(quadObject: PGLUquadric, orientation: TGLenum){. + dynlib: dllname, importc.} +proc gluQuadricDrawStyle*(quadObject: PGLUquadric, drawStyle: TGLenum){. + dynlib: dllname, importc.} +proc gluCylinder*(qobj: PGLUquadric, baseRadius, topRadius, height: TGLdouble, + slices, stacks: TGLint){.dynlib: dllname, importc.} +proc gluDisk*(qobj: PGLUquadric, innerRadius, outerRadius: TGLdouble, + slices, loops: TGLint){.dynlib: dllname, importc.} +proc gluPartialDisk*(qobj: PGLUquadric, innerRadius, outerRadius: TGLdouble, + slices, loops: TGLint, startAngle, sweepAngle: TGLdouble){. + dynlib: dllname, importc.} +proc gluSphere*(qobj: PGLuquadric, radius: TGLdouble, slices, stacks: TGLint){. + dynlib: dllname, importc.} +proc gluQuadricCallback*(qobj: PGLUquadric, which: TGLenum, fn: TCallBack){. + dynlib: dllname, importc.} +proc gluNewTess*(): PGLUtesselator{.dynlib: dllname, importc.} +proc gluDeleteTess*(tess: PGLUtesselator){.dynlib: dllname, importc.} +proc gluTessBeginPolygon*(tess: PGLUtesselator, polygon_data: Pointer){. + dynlib: dllname, importc.} +proc gluTessBeginContour*(tess: PGLUtesselator){.dynlib: dllname, importc.} +proc gluTessVertex*(tess: PGLUtesselator, coords: var T3dArray, data: Pointer){. + dynlib: dllname, importc.} +proc gluTessEndContour*(tess: PGLUtesselator){.dynlib: dllname, importc.} +proc gluTessEndPolygon*(tess: PGLUtesselator){.dynlib: dllname, importc.} +proc gluTessProperty*(tess: PGLUtesselator, which: TGLenum, value: TGLdouble){. + dynlib: dllname, importc.} +proc gluTessNormal*(tess: PGLUtesselator, x, y, z: TGLdouble){.dynlib: dllname, + importc.} +proc gluTessCallback*(tess: PGLUtesselator, which: TGLenum, fn: TCallBack){. + dynlib: dllname, importc.} +proc gluGetTessProperty*(tess: PGLUtesselator, which: TGLenum, value: PGLdouble){. + dynlib: dllname, importc.} +proc gluNewNurbsRenderer*(): PGLUnurbs{.dynlib: dllname, importc.} +proc gluDeleteNurbsRenderer*(nobj: PGLUnurbs){.dynlib: dllname, importc.} +proc gluBeginSurface*(nobj: PGLUnurbs){.dynlib: dllname, importc.} +proc gluBeginCurve*(nobj: PGLUnurbs){.dynlib: dllname, importc.} +proc gluEndCurve*(nobj: PGLUnurbs){.dynlib: dllname, importc.} +proc gluEndSurface*(nobj: PGLUnurbs){.dynlib: dllname, importc.} +proc gluBeginTrim*(nobj: PGLUnurbs){.dynlib: dllname, importc.} +proc gluEndTrim*(nobj: PGLUnurbs){.dynlib: dllname, importc.} +proc gluPwlCurve*(nobj: PGLUnurbs, count: TGLint, aarray: PGLfloat, + stride: TGLint, atype: TGLenum){.dynlib: dllname, importc.} +proc gluNurbsCurve*(nobj: PGLUnurbs, nknots: TGLint, knot: PGLfloat, + stride: TGLint, ctlarray: PGLfloat, order: TGLint, + atype: TGLenum){.dynlib: dllname, importc.} +proc gluNurbsSurface*(nobj: PGLUnurbs, sknot_count: TGLint, sknot: PGLfloat, + tknot_count: TGLint, tknot: PGLfloat, + s_stride, t_stride: TGLint, ctlarray: PGLfloat, + sorder, torder: TGLint, atype: TGLenum){.dynlib: dllname, + importc.} +proc gluLoadSamplingMatrices*(nobj: PGLUnurbs, + modelMatrix, projMatrix: var T16dArray, + viewport: var TViewPortArray){.dynlib: dllname, + importc.} +proc gluNurbsProperty*(nobj: PGLUnurbs, aproperty: TGLenum, value: TGLfloat){. + dynlib: dllname, importc.} +proc gluGetNurbsProperty*(nobj: PGLUnurbs, aproperty: TGLenum, value: PGLfloat){. + dynlib: dllname, importc.} +proc gluNurbsCallback*(nobj: PGLUnurbs, which: TGLenum, fn: TCallBack){. + dynlib: dllname, importc.} + #*** Callback function prototypes *** +type # gluQuadricCallback + GLUquadricErrorProc* = proc (p: TGLenum) # gluTessCallback + GLUtessBeginProc* = proc (p: TGLenum) + GLUtessEdgeFlagProc* = proc (p: TGLboolean) + GLUtessVertexProc* = proc (p: Pointer) + GLUtessEndProc* = proc () + GLUtessErrorProc* = proc (p: TGLenum) + GLUtessCombineProc* = proc (p1: var T3dArray, p2: T4pArray, p3: T4fArray, + p4: PPointer) + GLUtessBeginDataProc* = proc (p1: TGLenum, p2: Pointer) + GLUtessEdgeFlagDataProc* = proc (p1: TGLboolean, p2: Pointer) + GLUtessVertexDataProc* = proc (p1, p2: Pointer) + GLUtessEndDataProc* = proc (p: Pointer) + GLUtessErrorDataProc* = proc (p1: TGLenum, p2: Pointer) + GLUtessCombineDataProc* = proc (p1: var T3dArray, p2: var T4pArray, + p3: var T4fArray, p4: PPointer, p5: Pointer) # + # gluNurbsCallback + GLUnurbsErrorProc* = proc (p: TGLenum) #*** Generic constants ****/ + +const # Version + GLU_VERSION_1_1* = 1 + GLU_VERSION_1_2* = 1 # Errors: (return value 0 = no error) + GLU_INVALID_ENUM* = 100900 + GLU_INVALID_VALUE* = 100901 + GLU_OUT_OF_MEMORY* = 100902 + GLU_INCOMPATIBLE_GL_VERSION* = 100903 # StringName + GLU_VERSION* = 100800 + GLU_EXTENSIONS* = 100801 # Boolean + GLU_TRUE* = GL_TRUE + GLU_FALSE* = GL_FALSE #*** Quadric constants ****/ + # QuadricNormal + GLU_SMOOTH* = 100000 + GLU_FLAT* = 100001 + GLU_NONE* = 100002 # QuadricDrawStyle + GLU_POINT* = 100010 + GLU_LINE* = 100011 + GLU_FILL* = 100012 + GLU_SILHOUETTE* = 100013 # QuadricOrientation + GLU_OUTSIDE* = 100020 + GLU_INSIDE* = 100021 # Callback types: + # GLU_ERROR = 100103; + #*** Tesselation constants ****/ + GLU_TESS_MAX_COORD* = 1.00000e+150 # TessProperty + GLU_TESS_WINDING_RULE* = 100140 + GLU_TESS_BOUNDARY_ONLY* = 100141 + GLU_TESS_TOLERANCE* = 100142 # TessWinding + GLU_TESS_WINDING_ODD* = 100130 + GLU_TESS_WINDING_NONZERO* = 100131 + GLU_TESS_WINDING_POSITIVE* = 100132 + GLU_TESS_WINDING_NEGATIVE* = 100133 + GLU_TESS_WINDING_ABS_GEQ_TWO* = 100134 # TessCallback + GLU_TESS_BEGIN* = 100100 # void (CALLBACK*)(TGLenum type) + constGLU_TESS_VERTEX* = 100101 # void (CALLBACK*)(void *data) + GLU_TESS_END* = 100102 # void (CALLBACK*)(void) + GLU_TESS_ERROR* = 100103 # void (CALLBACK*)(TGLenum errno) + GLU_TESS_EDGE_FLAG* = 100104 # void (CALLBACK*)(TGLboolean boundaryEdge) + GLU_TESS_COMBINE* = 100105 # void (CALLBACK*)(TGLdouble coords[3], + # void *data[4], + # TGLfloat weight[4], + # void **dataOut) + GLU_TESS_BEGIN_DATA* = 100106 # void (CALLBACK*)(TGLenum type, + # void *polygon_data) + GLU_TESS_VERTEX_DATA* = 100107 # void (CALLBACK*)(void *data, + # void *polygon_data) + GLU_TESS_END_DATA* = 100108 # void (CALLBACK*)(void *polygon_data) + GLU_TESS_ERROR_DATA* = 100109 # void (CALLBACK*)(TGLenum errno, + # void *polygon_data) + GLU_TESS_EDGE_FLAG_DATA* = 100110 # void (CALLBACK*)(TGLboolean boundaryEdge, + # void *polygon_data) + GLU_TESS_COMBINE_DATA* = 100111 # void (CALLBACK*)(TGLdouble coords[3], + # void *data[4], + # TGLfloat weight[4], + # void **dataOut, + # void *polygon_data) + # TessError + GLU_TESS_ERROR1* = 100151 + GLU_TESS_ERROR2* = 100152 + GLU_TESS_ERROR3* = 100153 + GLU_TESS_ERROR4* = 100154 + GLU_TESS_ERROR5* = 100155 + GLU_TESS_ERROR6* = 100156 + GLU_TESS_ERROR7* = 100157 + GLU_TESS_ERROR8* = 100158 + GLU_TESS_MISSING_BEGIN_POLYGON* = GLU_TESS_ERROR1 + GLU_TESS_MISSING_BEGIN_CONTOUR* = GLU_TESS_ERROR2 + GLU_TESS_MISSING_END_POLYGON* = GLU_TESS_ERROR3 + GLU_TESS_MISSING_END_CONTOUR* = GLU_TESS_ERROR4 + GLU_TESS_COORD_TOO_LARGE* = GLU_TESS_ERROR5 + GLU_TESS_NEED_COMBINE_CALLBACK* = GLU_TESS_ERROR6 #*** NURBS constants ****/ + # NurbsProperty + GLU_AUTO_LOAD_MATRIX* = 100200 + GLU_CULLING* = 100201 + GLU_SAMPLING_TOLERANCE* = 100203 + GLU_DISPLAY_MODE* = 100204 + GLU_PARAMETRIC_TOLERANCE* = 100202 + GLU_SAMPLING_METHOD* = 100205 + GLU_U_STEP* = 100206 + GLU_V_STEP* = 100207 # NurbsSampling + GLU_PATH_LENGTH* = 100215 + GLU_PARAMETRIC_ERROR* = 100216 + GLU_DOMAIN_DISTANCE* = 100217 # NurbsTrim + GLU_MAP1_TRIM_2* = 100210 + GLU_MAP1_TRIM_3* = 100211 # NurbsDisplay + # GLU_FILL = 100012; + GLU_OUTLINE_POLYGON* = 100240 + GLU_OUTLINE_PATCH* = 100241 # NurbsCallback + # GLU_ERROR = 100103; + # NurbsErrors + GLU_NURBS_ERROR1* = 100251 + GLU_NURBS_ERROR2* = 100252 + GLU_NURBS_ERROR3* = 100253 + GLU_NURBS_ERROR4* = 100254 + GLU_NURBS_ERROR5* = 100255 + GLU_NURBS_ERROR6* = 100256 + GLU_NURBS_ERROR7* = 100257 + GLU_NURBS_ERROR8* = 100258 + GLU_NURBS_ERROR9* = 100259 + GLU_NURBS_ERROR10* = 100260 + GLU_NURBS_ERROR11* = 100261 + GLU_NURBS_ERROR12* = 100262 + GLU_NURBS_ERROR13* = 100263 + GLU_NURBS_ERROR14* = 100264 + GLU_NURBS_ERROR15* = 100265 + GLU_NURBS_ERROR16* = 100266 + GLU_NURBS_ERROR17* = 100267 + GLU_NURBS_ERROR18* = 100268 + GLU_NURBS_ERROR19* = 100269 + GLU_NURBS_ERROR20* = 100270 + GLU_NURBS_ERROR21* = 100271 + GLU_NURBS_ERROR22* = 100272 + GLU_NURBS_ERROR23* = 100273 + GLU_NURBS_ERROR24* = 100274 + GLU_NURBS_ERROR25* = 100275 + GLU_NURBS_ERROR26* = 100276 + GLU_NURBS_ERROR27* = 100277 + GLU_NURBS_ERROR28* = 100278 + GLU_NURBS_ERROR29* = 100279 + GLU_NURBS_ERROR30* = 100280 + GLU_NURBS_ERROR31* = 100281 + GLU_NURBS_ERROR32* = 100282 + GLU_NURBS_ERROR33* = 100283 + GLU_NURBS_ERROR34* = 100284 + GLU_NURBS_ERROR35* = 100285 + GLU_NURBS_ERROR36* = 100286 + GLU_NURBS_ERROR37* = 100287 #*** Backwards compatibility for old tesselator ****/ + +proc gluBeginPolygon*(tess: PGLUtesselator){.dynlib: dllname, importc.} +proc gluNextContour*(tess: PGLUtesselator, atype: TGLenum){.dynlib: dllname, + importc.} +proc gluEndPolygon*(tess: PGLUtesselator){.dynlib: dllname, importc.} +const # Contours types -- obsolete! + GLU_CW* = 100120 + GLU_CCW* = 100121 + GLU_INTERIOR* = 100122 + GLU_EXTERIOR* = 100123 + GLU_UNKNOWN* = 100124 # Names without "TESS_" prefix + GLU_BEGIN* = GLU_TESS_BEGIN + GLU_VERTEX* = constGLU_TESS_VERTEX + GLU_END* = GLU_TESS_END + GLU_ERROR* = GLU_TESS_ERROR + GLU_EDGE_FLAG* = GLU_TESS_EDGE_FLAG + +# implementation diff --git a/lib/oldwrappers/opengl/glut.nim b/lib/oldwrappers/opengl/glut.nim new file mode 100644 index 000000000..55ee18bda --- /dev/null +++ b/lib/oldwrappers/opengl/glut.nim @@ -0,0 +1,378 @@ +# +# +# Adaption of the delphi3d.net OpenGL units to FreePascal +# Sebastian Guenther (sg@freepascal.org) in 2002 +# These units are free to use +# + +# Copyright (c) Mark J. Kilgard, 1994, 1995, 1996. +# This program is freely distributable without licensing fees and is +# provided without guarantee or warrantee expressed or implied. This +# program is -not- in the public domain. +#****************************************************************************** +# Converted to Delphi by Tom Nuydens (tom@delphi3d.net) +# Contributions by Igor Karpov (glygrik@hotbox.ru) +# For the latest updates, visit Delphi3D: http://www.delphi3d.net +#****************************************************************************** + +import + GL + +when defined(windows): + const dllname = "glut32.dll" +elif defined(macosx): + const dllname = "/System/Library/Frameworks/GLUT.framework/GLUT" +else: + const dllname = "libglut.so.3" + +type + PInteger* = ptr int + PPChar* = ptr cstring + TGlutVoidCallback* = proc (){.cdecl.} + TGlut1IntCallback* = proc (value: cint){.cdecl.} + TGlut2IntCallback* = proc (v1, v2: cint){.cdecl.} + TGlut3IntCallback* = proc (v1, v2, v3: cint){.cdecl.} + TGlut4IntCallback* = proc (v1, v2, v3, v4: cint){.cdecl.} + TGlut1Char2IntCallback* = proc (c: int8, v1, v2: cint){.cdecl.} + TGlut1UInt3IntCallback* = proc (u, v1, v2, v3: cint){.cdecl.} + +const + GLUT_API_VERSION* = 3 + GLUT_XLIB_IMPLEMENTATION* = 12 # Display mode bit masks. + GLUT_RGB* = 0 + GLUT_RGBA* = GLUT_RGB + GLUT_INDEX* = 1 + GLUT_SINGLE* = 0 + GLUT_DOUBLE* = 2 + GLUT_ACCUM* = 4 + GLUT_ALPHA* = 8 + GLUT_DEPTH* = 16 + GLUT_STENCIL* = 32 + GLUT_MULTISAMPLE* = 128 + GLUT_STEREO* = 256 + GLUT_LUMINANCE* = 512 # Mouse buttons. + GLUT_LEFT_BUTTON* = 0 + GLUT_MIDDLE_BUTTON* = 1 + GLUT_RIGHT_BUTTON* = 2 # Mouse button state. + GLUT_DOWN* = 0 + GLUT_UP* = 1 # function keys + GLUT_KEY_F1* = 1 + GLUT_KEY_F2* = 2 + GLUT_KEY_F3* = 3 + GLUT_KEY_F4* = 4 + GLUT_KEY_F5* = 5 + GLUT_KEY_F6* = 6 + GLUT_KEY_F7* = 7 + GLUT_KEY_F8* = 8 + GLUT_KEY_F9* = 9 + GLUT_KEY_F10* = 10 + GLUT_KEY_F11* = 11 + GLUT_KEY_F12* = 12 # directional keys + GLUT_KEY_LEFT* = 100 + GLUT_KEY_UP* = 101 + GLUT_KEY_RIGHT* = 102 + GLUT_KEY_DOWN* = 103 + GLUT_KEY_PAGE_UP* = 104 + GLUT_KEY_PAGE_DOWN* = 105 + GLUT_KEY_HOME* = 106 + GLUT_KEY_END* = 107 + GLUT_KEY_INSERT* = 108 # Entry/exit state. + GLUT_LEFT* = 0 + GLUT_ENTERED* = 1 # Menu usage state. + GLUT_MENU_NOT_IN_USE* = 0 + GLUT_MENU_IN_USE* = 1 # Visibility state. + GLUT_NOT_VISIBLE* = 0 + GLUT_VISIBLE* = 1 # Window status state. + GLUT_HIDDEN* = 0 + GLUT_FULLY_RETAINED* = 1 + GLUT_PARTIALLY_RETAINED* = 2 + GLUT_FULLY_COVERED* = 3 # Color index component selection values. + GLUT_RED* = 0 + GLUT_GREEN* = 1 + GLUT_BLUE* = 2 # Layers for use. + GLUT_NORMAL* = 0 + GLUT_OVERLAY* = 1 + +when defined(Windows): + const # Stroke font constants (use these in GLUT program). + GLUT_STROKE_ROMAN* = cast[Pointer](0) + GLUT_STROKE_MONO_ROMAN* = cast[Pointer](1) # Bitmap font constants (use these in GLUT program). + GLUT_BITMAP_9_BY_15* = cast[Pointer](2) + GLUT_BITMAP_8_BY_13* = cast[Pointer](3) + GLUT_BITMAP_TIMES_ROMAN_10* = cast[Pointer](4) + GLUT_BITMAP_TIMES_ROMAN_24* = cast[Pointer](5) + GLUT_BITMAP_HELVETICA_10* = cast[Pointer](6) + GLUT_BITMAP_HELVETICA_12* = cast[Pointer](7) + GLUT_BITMAP_HELVETICA_18* = cast[Pointer](8) +else: + var # Stroke font constants (use these in GLUT program). + GLUT_STROKE_ROMAN*: Pointer + GLUT_STROKE_MONO_ROMAN*: Pointer # Bitmap font constants (use these in GLUT program). + GLUT_BITMAP_9_BY_15*: Pointer + GLUT_BITMAP_8_BY_13*: Pointer + GLUT_BITMAP_TIMES_ROMAN_10*: Pointer + GLUT_BITMAP_TIMES_ROMAN_24*: Pointer + GLUT_BITMAP_HELVETICA_10*: Pointer + GLUT_BITMAP_HELVETICA_12*: Pointer + GLUT_BITMAP_HELVETICA_18*: Pointer +const # glutGet parameters. + GLUT_WINDOW_X* = 100 + GLUT_WINDOW_Y* = 101 + GLUT_WINDOW_WIDTH* = 102 + GLUT_WINDOW_HEIGHT* = 103 + GLUT_WINDOW_BUFFER_SIZE* = 104 + GLUT_WINDOW_STENCIL_SIZE* = 105 + GLUT_WINDOW_DEPTH_SIZE* = 106 + GLUT_WINDOW_RED_SIZE* = 107 + GLUT_WINDOW_GREEN_SIZE* = 108 + GLUT_WINDOW_BLUE_SIZE* = 109 + GLUT_WINDOW_ALPHA_SIZE* = 110 + GLUT_WINDOW_ACCUM_RED_SIZE* = 111 + GLUT_WINDOW_ACCUM_GREEN_SIZE* = 112 + GLUT_WINDOW_ACCUM_BLUE_SIZE* = 113 + GLUT_WINDOW_ACCUM_ALPHA_SIZE* = 114 + GLUT_WINDOW_DOUBLEBUFFER* = 115 + GLUT_WINDOW_RGBA* = 116 + GLUT_WINDOW_PARENT* = 117 + GLUT_WINDOW_NUM_CHILDREN* = 118 + GLUT_WINDOW_COLORMAP_SIZE* = 119 + GLUT_WINDOW_NUM_SAMPLES* = 120 + GLUT_WINDOW_STEREO* = 121 + GLUT_WINDOW_CURSOR* = 122 + GLUT_SCREEN_WIDTH* = 200 + GLUT_SCREEN_HEIGHT* = 201 + GLUT_SCREEN_WIDTH_MM* = 202 + GLUT_SCREEN_HEIGHT_MM* = 203 + GLUT_MENU_NUM_ITEMS* = 300 + GLUT_DISPLAY_MODE_POSSIBLE* = 400 + GLUT_INIT_WINDOW_X* = 500 + GLUT_INIT_WINDOW_Y* = 501 + GLUT_INIT_WINDOW_WIDTH* = 502 + GLUT_INIT_WINDOW_HEIGHT* = 503 + constGLUT_INIT_DISPLAY_MODE* = 504 + GLUT_ELAPSED_TIME* = 700 + GLUT_WINDOW_FORMAT_ID* = 123 # glutDeviceGet parameters. + GLUT_HAS_KEYBOARD* = 600 + GLUT_HAS_MOUSE* = 601 + GLUT_HAS_SPACEBALL* = 602 + GLUT_HAS_DIAL_AND_BUTTON_BOX* = 603 + GLUT_HAS_TABLET* = 604 + GLUT_NUM_MOUSE_BUTTONS* = 605 + GLUT_NUM_SPACEBALL_BUTTONS* = 606 + GLUT_NUM_BUTTON_BOX_BUTTONS* = 607 + GLUT_NUM_DIALS* = 608 + GLUT_NUM_TABLET_BUTTONS* = 609 + GLUT_DEVICE_IGNORE_KEY_REPEAT* = 610 + GLUT_DEVICE_KEY_REPEAT* = 611 + GLUT_HAS_JOYSTICK* = 612 + GLUT_OWNS_JOYSTICK* = 613 + GLUT_JOYSTICK_BUTTONS* = 614 + GLUT_JOYSTICK_AXES* = 615 + GLUT_JOYSTICK_POLL_RATE* = 616 # glutLayerGet parameters. + GLUT_OVERLAY_POSSIBLE* = 800 + GLUT_LAYER_IN_USE* = 801 + GLUT_HAS_OVERLAY* = 802 + GLUT_TRANSPARENT_INDEX* = 803 + GLUT_NORMAL_DAMAGED* = 804 + GLUT_OVERLAY_DAMAGED* = 805 # glutVideoResizeGet parameters. + GLUT_VIDEO_RESIZE_POSSIBLE* = 900 + GLUT_VIDEO_RESIZE_IN_USE* = 901 + GLUT_VIDEO_RESIZE_X_DELTA* = 902 + GLUT_VIDEO_RESIZE_Y_DELTA* = 903 + GLUT_VIDEO_RESIZE_WIDTH_DELTA* = 904 + GLUT_VIDEO_RESIZE_HEIGHT_DELTA* = 905 + GLUT_VIDEO_RESIZE_X* = 906 + GLUT_VIDEO_RESIZE_Y* = 907 + GLUT_VIDEO_RESIZE_WIDTH* = 908 + GLUT_VIDEO_RESIZE_HEIGHT* = 909 # glutGetModifiers return mask. + GLUT_ACTIVE_SHIFT* = 1 + GLUT_ACTIVE_CTRL* = 2 + GLUT_ACTIVE_ALT* = 4 # glutSetCursor parameters. + # Basic arrows. + GLUT_CURSOR_RIGHT_ARROW* = 0 + GLUT_CURSOR_LEFT_ARROW* = 1 # Symbolic cursor shapes. + GLUT_CURSOR_INFO* = 2 + GLUT_CURSOR_DESTROY* = 3 + GLUT_CURSOR_HELP* = 4 + GLUT_CURSOR_CYCLE* = 5 + GLUT_CURSOR_SPRAY* = 6 + GLUT_CURSOR_WAIT* = 7 + GLUT_CURSOR_TEXT* = 8 + GLUT_CURSOR_CROSSHAIR* = 9 # Directional cursors. + GLUT_CURSOR_UP_DOWN* = 10 + GLUT_CURSOR_LEFT_RIGHT* = 11 # Sizing cursors. + GLUT_CURSOR_TOP_SIDE* = 12 + GLUT_CURSOR_BOTTOM_SIDE* = 13 + GLUT_CURSOR_LEFT_SIDE* = 14 + GLUT_CURSOR_RIGHT_SIDE* = 15 + GLUT_CURSOR_TOP_LEFT_CORNER* = 16 + GLUT_CURSOR_TOP_RIGHT_CORNER* = 17 + GLUT_CURSOR_BOTTOM_RIGHT_CORNER* = 18 + GLUT_CURSOR_BOTTOM_LEFT_CORNER* = 19 # Inherit from parent window. + GLUT_CURSOR_INHERIT* = 100 # Blank cursor. + GLUT_CURSOR_NONE* = 101 # Fullscreen crosshair (if available). + GLUT_CURSOR_FULL_CROSSHAIR* = 102 # GLUT device control sub-API. + # glutSetKeyRepeat modes. + GLUT_KEY_REPEAT_OFF* = 0 + GLUT_KEY_REPEAT_ON* = 1 + GLUT_KEY_REPEAT_DEFAULT* = 2 # Joystick button masks. + GLUT_JOYSTICK_BUTTON_A* = 1 + GLUT_JOYSTICK_BUTTON_B* = 2 + GLUT_JOYSTICK_BUTTON_C* = 4 + GLUT_JOYSTICK_BUTTON_D* = 8 # GLUT game mode sub-API. + # glutGameModeGet. + GLUT_GAME_MODE_ACTIVE* = 0 + GLUT_GAME_MODE_POSSIBLE* = 1 + GLUT_GAME_MODE_WIDTH* = 2 + GLUT_GAME_MODE_HEIGHT* = 3 + GLUT_GAME_MODE_PIXEL_DEPTH* = 4 + GLUT_GAME_MODE_REFRESH_RATE* = 5 + GLUT_GAME_MODE_DISPLAY_CHANGED* = 6 # GLUT initialization sub-API. + +proc glutInit*(argcp: PInteger, argv: PPChar){.dynlib: dllname, importc.} +proc glutInitDisplayMode*(mode: int16){.dynlib: dllname, importc.} +proc glutInitDisplayString*(str: cstring){.dynlib: dllname, importc.} +proc glutInitWindowPosition*(x, y: int){.dynlib: dllname, importc.} +proc glutInitWindowSize*(width, height: int){.dynlib: dllname, importc.} +proc glutMainLoop*(){.dynlib: dllname, importc.} + # GLUT window sub-API. +proc glutCreateWindow*(title: cstring): int{.dynlib: dllname, importc.} +proc glutCreateSubWindow*(win, x, y, width, height: int): int{.dynlib: dllname, + importc.} +proc glutDestroyWindow*(win: int){.dynlib: dllname, importc.} +proc glutPostRedisplay*(){.dynlib: dllname, importc.} +proc glutPostWindowRedisplay*(win: int){.dynlib: dllname, importc.} +proc glutSwapBuffers*(){.dynlib: dllname, importc.} +proc glutGetWindow*(): int{.dynlib: dllname, importc.} +proc glutSetWindow*(win: int){.dynlib: dllname, importc.} +proc glutSetWindowTitle*(title: cstring){.dynlib: dllname, importc.} +proc glutSetIconTitle*(title: cstring){.dynlib: dllname, importc.} +proc glutPositionWindow*(x, y: int){.dynlib: dllname, importc.} +proc glutReshapeWindow*(width, height: int){.dynlib: dllname, importc.} +proc glutPopWindow*(){.dynlib: dllname, importc.} +proc glutPushWindow*(){.dynlib: dllname, importc.} +proc glutIconifyWindow*(){.dynlib: dllname, importc.} +proc glutShowWindow*(){.dynlib: dllname, importc.} +proc glutHideWindow*(){.dynlib: dllname, importc.} +proc glutFullScreen*(){.dynlib: dllname, importc.} +proc glutSetCursor*(cursor: int){.dynlib: dllname, importc.} +proc glutWarpPointer*(x, y: int){.dynlib: dllname, importc.} + # GLUT overlay sub-API. +proc glutEstablishOverlay*(){.dynlib: dllname, importc.} +proc glutRemoveOverlay*(){.dynlib: dllname, importc.} +proc glutUseLayer*(layer: TGLenum){.dynlib: dllname, importc.} +proc glutPostOverlayRedisplay*(){.dynlib: dllname, importc.} +proc glutPostWindowOverlayRedisplay*(win: int){.dynlib: dllname, importc.} +proc glutShowOverlay*(){.dynlib: dllname, importc.} +proc glutHideOverlay*(){.dynlib: dllname, importc.} + # GLUT menu sub-API. +proc glutCreateMenu*(callback: TGlut1IntCallback): int{.dynlib: dllname, importc.} +proc glutDestroyMenu*(menu: int){.dynlib: dllname, importc.} +proc glutGetMenu*(): int{.dynlib: dllname, importc.} +proc glutSetMenu*(menu: int){.dynlib: dllname, importc.} +proc glutAddMenuEntry*(caption: cstring, value: int){.dynlib: dllname, importc.} +proc glutAddSubMenu*(caption: cstring, submenu: int){.dynlib: dllname, importc.} +proc glutChangeToMenuEntry*(item: int, caption: cstring, value: int){. + dynlib: dllname, importc.} +proc glutChangeToSubMenu*(item: int, caption: cstring, submenu: int){. + dynlib: dllname, importc.} +proc glutRemoveMenuItem*(item: int){.dynlib: dllname, importc.} +proc glutAttachMenu*(button: int){.dynlib: dllname, importc.} +proc glutDetachMenu*(button: int){.dynlib: dllname, importc.} + # GLUT window callback sub-API. +proc glutDisplayFunc*(f: TGlutVoidCallback){.dynlib: dllname, importc.} +proc glutReshapeFunc*(f: TGlut2IntCallback){.dynlib: dllname, importc.} +proc glutKeyboardFunc*(f: TGlut1Char2IntCallback){.dynlib: dllname, importc.} +proc glutMouseFunc*(f: TGlut4IntCallback){.dynlib: dllname, importc.} +proc glutMotionFunc*(f: TGlut2IntCallback){.dynlib: dllname, importc.} +proc glutPassiveMotionFunc*(f: TGlut2IntCallback){.dynlib: dllname, importc.} +proc glutEntryFunc*(f: TGlut1IntCallback){.dynlib: dllname, importc.} +proc glutVisibilityFunc*(f: TGlut1IntCallback){.dynlib: dllname, importc.} +proc glutIdleFunc*(f: TGlutVoidCallback){.dynlib: dllname, importc.} +proc glutTimerFunc*(millis: int16, f: TGlut1IntCallback, value: int){. + dynlib: dllname, importc.} +proc glutMenuStateFunc*(f: TGlut1IntCallback){.dynlib: dllname, importc.} +proc glutSpecialFunc*(f: TGlut3IntCallback){.dynlib: dllname, importc.} +proc glutSpaceballMotionFunc*(f: TGlut3IntCallback){.dynlib: dllname, importc.} +proc glutSpaceballRotateFunc*(f: TGlut3IntCallback){.dynlib: dllname, importc.} +proc glutSpaceballButtonFunc*(f: TGlut2IntCallback){.dynlib: dllname, importc.} +proc glutButtonBoxFunc*(f: TGlut2IntCallback){.dynlib: dllname, importc.} +proc glutDialsFunc*(f: TGlut2IntCallback){.dynlib: dllname, importc.} +proc glutTabletMotionFunc*(f: TGlut2IntCallback){.dynlib: dllname, importc.} +proc glutTabletButtonFunc*(f: TGlut4IntCallback){.dynlib: dllname, importc.} +proc glutMenuStatusFunc*(f: TGlut3IntCallback){.dynlib: dllname, importc.} +proc glutOverlayDisplayFunc*(f: TGlutVoidCallback){.dynlib: dllname, importc.} +proc glutWindowStatusFunc*(f: TGlut1IntCallback){.dynlib: dllname, importc.} +proc glutKeyboardUpFunc*(f: TGlut1Char2IntCallback){.dynlib: dllname, importc.} +proc glutSpecialUpFunc*(f: TGlut3IntCallback){.dynlib: dllname, importc.} +proc glutJoystickFunc*(f: TGlut1UInt3IntCallback, pollInterval: int){. + dynlib: dllname, importc.} + # GLUT color index sub-API. +proc glutSetColor*(cell: int, red, green, blue: TGLfloat){.dynlib: dllname, + importc.} +proc glutGetColor*(ndx, component: int): TGLfloat{.dynlib: dllname, importc.} +proc glutCopyColormap*(win: int){.dynlib: dllname, importc.} + # GLUT state retrieval sub-API. +proc glutGet*(t: TGLenum): int{.dynlib: dllname, importc.} +proc glutDeviceGet*(t: TGLenum): int{.dynlib: dllname, importc.} + # GLUT extension support sub-API +proc glutExtensionSupported*(name: cstring): int{.dynlib: dllname, importc.} +proc glutGetModifiers*(): int{.dynlib: dllname, importc.} +proc glutLayerGet*(t: TGLenum): int{.dynlib: dllname, importc.} + # GLUT font sub-API +proc glutBitmapCharacter*(font: pointer, character: int){.dynlib: dllname, + importc.} +proc glutBitmapWidth*(font: pointer, character: int): int{.dynlib: dllname, + importc.} +proc glutStrokeCharacter*(font: pointer, character: int){.dynlib: dllname, + importc.} +proc glutStrokeWidth*(font: pointer, character: int): int{.dynlib: dllname, + importc.} +proc glutBitmapLength*(font: pointer, str: cstring): int{.dynlib: dllname, + importc.} +proc glutStrokeLength*(font: pointer, str: cstring): int{.dynlib: dllname, + importc.} + # GLUT pre-built models sub-API +proc glutWireSphere*(radius: TGLdouble, slices, stacks: TGLint){.dynlib: dllname, + importc.} +proc glutSolidSphere*(radius: TGLdouble, slices, stacks: TGLint){.dynlib: dllname, + importc.} +proc glutWireCone*(base, height: TGLdouble, slices, stacks: TGLint){. + dynlib: dllname, importc.} +proc glutSolidCone*(base, height: TGLdouble, slices, stacks: TGLint){. + dynlib: dllname, importc.} +proc glutWireCube*(size: TGLdouble){.dynlib: dllname, importc.} +proc glutSolidCube*(size: TGLdouble){.dynlib: dllname, importc.} +proc glutWireTorus*(innerRadius, outerRadius: TGLdouble, sides, rings: TGLint){. + dynlib: dllname, importc.} +proc glutSolidTorus*(innerRadius, outerRadius: TGLdouble, sides, rings: TGLint){. + dynlib: dllname, importc.} +proc glutWireDodecahedron*(){.dynlib: dllname, importc.} +proc glutSolidDodecahedron*(){.dynlib: dllname, importc.} +proc glutWireTeapot*(size: TGLdouble){.dynlib: dllname, importc.} +proc glutSolidTeapot*(size: TGLdouble){.dynlib: dllname, importc.} +proc glutWireOctahedron*(){.dynlib: dllname, importc.} +proc glutSolidOctahedron*(){.dynlib: dllname, importc.} +proc glutWireTetrahedron*(){.dynlib: dllname, importc.} +proc glutSolidTetrahedron*(){.dynlib: dllname, importc.} +proc glutWireIcosahedron*(){.dynlib: dllname, importc.} +proc glutSolidIcosahedron*(){.dynlib: dllname, importc.} + # GLUT video resize sub-API. +proc glutVideoResizeGet*(param: TGLenum): int{.dynlib: dllname, importc.} +proc glutSetupVideoResizing*(){.dynlib: dllname, importc.} +proc glutStopVideoResizing*(){.dynlib: dllname, importc.} +proc glutVideoResize*(x, y, width, height: int){.dynlib: dllname, importc.} +proc glutVideoPan*(x, y, width, height: int){.dynlib: dllname, importc.} + # GLUT debugging sub-API. +proc glutReportErrors*(){.dynlib: dllname, importc.} + # GLUT device control sub-API. +proc glutIgnoreKeyRepeat*(ignore: int){.dynlib: dllname, importc.} +proc glutSetKeyRepeat*(repeatMode: int){.dynlib: dllname, importc.} +proc glutForceJoystickFunc*(){.dynlib: dllname, importc.} + # GLUT game mode sub-API. + #example glutGameModeString('1280x1024:32@75'); +proc glutGameModeString*(AString: cstring){.dynlib: dllname, importc.} +proc glutEnterGameMode*(): int{.dynlib: dllname, importc.} +proc glutLeaveGameMode*(){.dynlib: dllname, importc.} +proc glutGameModeGet*(mode: TGLenum): int{.dynlib: dllname, importc.} +# implementation diff --git a/lib/oldwrappers/opengl/glx.nim b/lib/oldwrappers/opengl/glx.nim new file mode 100644 index 000000000..a967acfc6 --- /dev/null +++ b/lib/oldwrappers/opengl/glx.nim @@ -0,0 +1,148 @@ +# +# +# Translation of the Mesa GLX headers for FreePascal +# Copyright (C) 1999 Sebastian Guenther +# +# +# Mesa 3-D graphics library +# Version: 3.0 +# Copyright (C) 1995-1998 Brian Paul +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free +# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# + +import + X, XLib, XUtil, gl + +when defined(windows): + const dllname = "GL.dll" +elif defined(macosx): + const dllname = "/usr/X11R6/lib/libGL.dylib" +else: + const dllname = "libGL.so" + +const + GLX_USE_GL* = 1 + GLX_BUFFER_SIZE* = 2 + GLX_LEVEL* = 3 + GLX_RGBA* = 4 + GLX_DOUBLEBUFFER* = 5 + GLX_STEREO* = 6 + GLX_AUX_BUFFERS* = 7 + GLX_RED_SIZE* = 8 + GLX_GREEN_SIZE* = 9 + GLX_BLUE_SIZE* = 10 + GLX_ALPHA_SIZE* = 11 + GLX_DEPTH_SIZE* = 12 + GLX_STENCIL_SIZE* = 13 + GLX_ACCUM_RED_SIZE* = 14 + GLX_ACCUM_GREEN_SIZE* = 15 + GLX_ACCUM_BLUE_SIZE* = 16 + GLX_ACCUM_ALPHA_SIZE* = 17 # GLX_EXT_visual_info extension + GLX_X_VISUAL_TYPE_EXT* = 0x00000022 + GLX_TRANSPARENT_TYPE_EXT* = 0x00000023 + GLX_TRANSPARENT_INDEX_VALUE_EXT* = 0x00000024 + GLX_TRANSPARENT_RED_VALUE_EXT* = 0x00000025 + GLX_TRANSPARENT_GREEN_VALUE_EXT* = 0x00000026 + GLX_TRANSPARENT_BLUE_VALUE_EXT* = 0x00000027 + GLX_TRANSPARENT_ALPHA_VALUE_EXT* = 0x00000028 # Error codes returned by glXGetConfig: + GLX_BAD_SCREEN* = 1 + GLX_BAD_ATTRIBUTE* = 2 + GLX_NO_EXTENSION* = 3 + GLX_BAD_VISUAL* = 4 + GLX_BAD_CONTEXT* = 5 + GLX_BAD_VALUE* = 6 + GLX_BAD_ENUM* = 7 # GLX 1.1 and later: + GLX_VENDOR* = 1 + GLX_VERSION* = 2 + GLX_EXTENSIONS* = 3 # GLX_visual_info extension + GLX_TRUE_COLOR_EXT* = 0x00008002 + GLX_DIRECT_COLOR_EXT* = 0x00008003 + GLX_PSEUDO_COLOR_EXT* = 0x00008004 + GLX_STATIC_COLOR_EXT* = 0x00008005 + GLX_GRAY_SCALE_EXT* = 0x00008006 + GLX_STATIC_GRAY_EXT* = 0x00008007 + GLX_NONE_EXT* = 0x00008000 + GLX_TRANSPARENT_RGB_EXT* = 0x00008008 + GLX_TRANSPARENT_INDEX_EXT* = 0x00008009 + +type # From XLib: + XPixmap* = TXID + XFont* = TXID + XColormap* = TXID + GLXContext* = Pointer + GLXPixmap* = TXID + GLXDrawable* = TXID + GLXContextID* = TXID + TXPixmap* = XPixmap + TXFont* = XFont + TXColormap* = XColormap + TGLXContext* = GLXContext + TGLXPixmap* = GLXPixmap + TGLXDrawable* = GLXDrawable + TGLXContextID* = GLXContextID + +proc glXChooseVisual*(dpy: PDisplay, screen: int, attribList: ptr int32): PXVisualInfo{. + cdecl, dynlib: dllname, importc.} +proc glXCreateContext*(dpy: PDisplay, vis: PXVisualInfo, shareList: GLXContext, + direct: bool): GLXContext{.cdecl, dynlib: dllname, + importc.} +proc glXDestroyContext*(dpy: PDisplay, ctx: GLXContext){.cdecl, dynlib: dllname, + importc.} +proc glXMakeCurrent*(dpy: PDisplay, drawable: GLXDrawable, ctx: GLXContext): bool{. + cdecl, dynlib: dllname, importc.} +proc glXCopyContext*(dpy: PDisplay, src, dst: GLXContext, mask: int32){.cdecl, + dynlib: dllname, importc.} +proc glXSwapBuffers*(dpy: PDisplay, drawable: GLXDrawable){.cdecl, + dynlib: dllname, importc.} +proc glXCreateGLXPixmap*(dpy: PDisplay, visual: PXVisualInfo, pixmap: XPixmap): GLXPixmap{. + cdecl, dynlib: dllname, importc.} +proc glXDestroyGLXPixmap*(dpy: PDisplay, pixmap: GLXPixmap){.cdecl, + dynlib: dllname, importc.} +proc glXQueryExtension*(dpy: PDisplay, errorb, event: var int): bool{.cdecl, + dynlib: dllname, importc.} +proc glXQueryVersion*(dpy: PDisplay, maj, min: var int): bool{.cdecl, + dynlib: dllname, importc.} +proc glXIsDirect*(dpy: PDisplay, ctx: GLXContext): bool{.cdecl, dynlib: dllname, + importc.} +proc glXGetConfig*(dpy: PDisplay, visual: PXVisualInfo, attrib: int, + value: var int): int{.cdecl, dynlib: dllname, importc.} +proc glXGetCurrentContext*(): GLXContext{.cdecl, dynlib: dllname, importc.} +proc glXGetCurrentDrawable*(): GLXDrawable{.cdecl, dynlib: dllname, importc.} +proc glXWaitGL*(){.cdecl, dynlib: dllname, importc.} +proc glXWaitX*(){.cdecl, dynlib: dllname, importc.} +proc glXUseXFont*(font: XFont, first, count, list: int){.cdecl, dynlib: dllname, + importc.} + # GLX 1.1 and later +proc glXQueryExtensionsString*(dpy: PDisplay, screen: int): cstring{.cdecl, + dynlib: dllname, importc.} +proc glXQueryServerString*(dpy: PDisplay, screen, name: int): cstring{.cdecl, + dynlib: dllname, importc.} +proc glXGetClientString*(dpy: PDisplay, name: int): cstring{.cdecl, + dynlib: dllname, importc.} + # Mesa GLX Extensions +proc glXCreateGLXPixmapMESA*(dpy: PDisplay, visual: PXVisualInfo, + pixmap: XPixmap, cmap: XColormap): GLXPixmap{. + cdecl, dynlib: dllname, importc.} +proc glXReleaseBufferMESA*(dpy: PDisplay, d: GLXDrawable): bool{.cdecl, + dynlib: dllname, importc.} +proc glXCopySubBufferMESA*(dpy: PDisplay, drawbale: GLXDrawable, + x, y, width, height: int){.cdecl, dynlib: dllname, + importc.} +proc glXGetVideoSyncSGI*(counter: var int32): int{.cdecl, dynlib: dllname, + importc.} +proc glXWaitVideoSyncSGI*(divisor, remainder: int, count: var int32): int{. + cdecl, dynlib: dllname, importc.} +# implementation diff --git a/lib/oldwrappers/opengl/wingl.nim b/lib/oldwrappers/opengl/wingl.nim new file mode 100644 index 000000000..2cebf8622 --- /dev/null +++ b/lib/oldwrappers/opengl/wingl.nim @@ -0,0 +1,348 @@ + +import + gl, windows + +proc wglGetExtensionsStringARB*(hdc: HDC): cstring{.dynlib: dllname, importc.} + +const + WGL_FRONT_COLOR_BUFFER_BIT_ARB* = 0x00000001 + WGL_BACK_COLOR_BUFFER_BIT_ARB* = 0x00000002 + WGL_DEPTH_BUFFER_BIT_ARB* = 0x00000004 + WGL_STENCIL_BUFFER_BIT_ARB* = 0x00000008 + +proc WinChoosePixelFormat*(DC: HDC, p2: PPixelFormatDescriptor): int{. + dynlib: "gdi32", importc: "ChoosePixelFormat".} +proc wglCreateBufferRegionARB*(hDC: HDC, iLayerPlane: TGLint, uType: TGLuint): THandle{. + dynlib: dllname, importc.} +proc wglDeleteBufferRegionARB*(hRegion: THandle){.dynlib: dllname, importc.} +proc wglSaveBufferRegionARB*(hRegion: THandle, x: TGLint, y: TGLint, + width: TGLint, height: TGLint): BOOL{. + dynlib: dllname, importc.} +proc wglRestoreBufferRegionARB*(hRegion: THandle, x: TGLint, y: TGLint, + width: TGLint, height: TGLint, xSrc: TGLint, + ySrc: TGLint): BOOL{.dynlib: dllname, importc.} +proc wglAllocateMemoryNV*(size: TGLsizei, readFrequency: TGLfloat, + writeFrequency: TGLfloat, priority: TGLfloat): PGLvoid{. + dynlib: dllname, importc.} +proc wglFreeMemoryNV*(pointer: PGLvoid){.dynlib: dllname, importc.} +const + WGL_IMAGE_BUFFER_MIN_ACCESS_I3D* = 0x00000001 + WGL_IMAGE_BUFFER_LOCK_I3D* = 0x00000002 + +proc wglCreateImageBufferI3D*(hDC: HDC, dwSize: DWORD, uFlags: UINT): PGLvoid{. + dynlib: dllname, importc.} +proc wglDestroyImageBufferI3D*(hDC: HDC, pAddress: PGLvoid): BOOL{. + dynlib: dllname, importc.} +proc wglAssociateImageBufferEventsI3D*(hdc: HDC, pEvent: PHandle, + pAddress: PGLvoid, pSize: PDWORD, + count: UINT): BOOL{.dynlib: dllname, + importc.} +proc wglReleaseImageBufferEventsI3D*(hdc: HDC, pAddress: PGLvoid, count: UINT): BOOL{. + dynlib: dllname, importc.} +proc wglEnableFrameLockI3D*(): BOOL{.dynlib: dllname, importc.} +proc wglDisableFrameLockI3D*(): BOOL{.dynlib: dllname, importc.} +proc wglIsEnabledFrameLockI3D*(pFlag: PBOOL): BOOL{.dynlib: dllname, importc.} +proc wglQueryFrameLockMasterI3D*(pFlag: PBOOL): BOOL{.dynlib: dllname, importc.} +proc wglGetFrameUsageI3D*(pUsage: PGLfloat): BOOL{.dynlib: dllname, importc.} +proc wglBeginFrameTrackingI3D*(): BOOL{.dynlib: dllname, importc.} +proc wglEndFrameTrackingI3D*(): BOOL{.dynlib: dllname, importc.} +proc wglQueryFrameTrackingI3D*(pFrameCount: PDWORD, pMissedFrames: PDWORD, + pLastMissedUsage: PGLfloat): BOOL{. + dynlib: dllname, importc.} +const + WGL_NUMBER_PIXEL_FORMATS_ARB* = 0x00002000 + WGL_DRAW_TO_WINDOW_ARB* = 0x00002001 + WGL_DRAW_TO_BITMAP_ARB* = 0x00002002 + WGL_ACCELERATION_ARB* = 0x00002003 + WGL_NEED_PALETTE_ARB* = 0x00002004 + WGL_NEED_SYSTEM_PALETTE_ARB* = 0x00002005 + WGL_SWAP_LAYER_BUFFERS_ARB* = 0x00002006 + WGL_SWAP_METHOD_ARB* = 0x00002007 + WGL_NUMBER_OVERLAYS_ARB* = 0x00002008 + WGL_NUMBER_UNDERLAYS_ARB* = 0x00002009 + WGL_TRANSPARENT_ARB* = 0x0000200A + WGL_TRANSPARENT_RED_VALUE_ARB* = 0x00002037 + WGL_TRANSPARENT_GREEN_VALUE_ARB* = 0x00002038 + WGL_TRANSPARENT_BLUE_VALUE_ARB* = 0x00002039 + WGL_TRANSPARENT_ALPHA_VALUE_ARB* = 0x0000203A + WGL_TRANSPARENT_INDEX_VALUE_ARB* = 0x0000203B + WGL_SHARE_DEPTH_ARB* = 0x0000200C + WGL_SHARE_STENCIL_ARB* = 0x0000200D + WGL_SHARE_ACCUM_ARB* = 0x0000200E + WGL_SUPPORT_GDI_ARB* = 0x0000200F + WGL_SUPPORT_OPENGL_ARB* = 0x00002010 + WGL_DOUBLE_BUFFER_ARB* = 0x00002011 + WGL_STEREO_ARB* = 0x00002012 + WGL_PIXEL_TYPE_ARB* = 0x00002013 + WGL_COLOR_BITS_ARB* = 0x00002014 + WGL_RED_BITS_ARB* = 0x00002015 + WGL_RED_SHIFT_ARB* = 0x00002016 + WGL_GREEN_BITS_ARB* = 0x00002017 + WGL_GREEN_SHIFT_ARB* = 0x00002018 + WGL_BLUE_BITS_ARB* = 0x00002019 + WGL_BLUE_SHIFT_ARB* = 0x0000201A + WGL_ALPHA_BITS_ARB* = 0x0000201B + WGL_ALPHA_SHIFT_ARB* = 0x0000201C + WGL_ACCUM_BITS_ARB* = 0x0000201D + WGL_ACCUM_RED_BITS_ARB* = 0x0000201E + WGL_ACCUM_GREEN_BITS_ARB* = 0x0000201F + WGL_ACCUM_BLUE_BITS_ARB* = 0x00002020 + WGL_ACCUM_ALPHA_BITS_ARB* = 0x00002021 + WGL_DEPTH_BITS_ARB* = 0x00002022 + WGL_STENCIL_BITS_ARB* = 0x00002023 + WGL_AUX_BUFFERS_ARB* = 0x00002024 + WGL_NO_ACCELERATION_ARB* = 0x00002025 + WGL_GENERIC_ACCELERATION_ARB* = 0x00002026 + WGL_FULL_ACCELERATION_ARB* = 0x00002027 + WGL_SWAP_EXCHANGE_ARB* = 0x00002028 + WGL_SWAP_COPY_ARB* = 0x00002029 + WGL_SWAP_UNDEFINED_ARB* = 0x0000202A + WGL_TYPE_RGBA_ARB* = 0x0000202B + WGL_TYPE_COLORINDEX_ARB* = 0x0000202C + +proc wglGetPixelFormatAttribivARB*(hdc: HDC, iPixelFormat: TGLint, + iLayerPlane: TGLint, nAttributes: TGLuint, + piAttributes: PGLint, piValues: PGLint): BOOL{. + dynlib: dllname, importc.} +proc wglGetPixelFormatAttribfvARB*(hdc: HDC, iPixelFormat: TGLint, + iLayerPlane: TGLint, nAttributes: TGLuint, + piAttributes: PGLint, pfValues: PGLfloat): BOOL{. + dynlib: dllname, importc.} +proc wglChoosePixelFormatARB*(hdc: HDC, piAttribIList: PGLint, + pfAttribFList: PGLfloat, nMaxFormats: TGLuint, + piFormats: PGLint, nNumFormats: PGLuint): BOOL{. + dynlib: dllname, importc.} +const + WGL_ERROR_INVALID_PIXEL_TYPE_ARB* = 0x00002043 + WGL_ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB* = 0x00002054 + +proc wglMakeContextCurrentARB*(hDrawDC: HDC, hReadDC: HDC, hglrc: HGLRC): BOOL{. + dynlib: dllname, importc.} +proc wglGetCurrentReadDCARB*(): HDC{.dynlib: dllname, importc.} +const + WGL_DRAW_TO_PBUFFER_ARB* = 0x0000202D # WGL_DRAW_TO_PBUFFER_ARB { already defined } + WGL_MAX_PBUFFER_PIXELS_ARB* = 0x0000202E + WGL_MAX_PBUFFER_WIDTH_ARB* = 0x0000202F + WGL_MAX_PBUFFER_HEIGHT_ARB* = 0x00002030 + WGL_PBUFFER_LARGEST_ARB* = 0x00002033 + WGL_PBUFFER_WIDTH_ARB* = 0x00002034 + WGL_PBUFFER_HEIGHT_ARB* = 0x00002035 + WGL_PBUFFER_LOST_ARB* = 0x00002036 + +proc wglCreatePbufferARB*(hDC: HDC, iPixelFormat: TGLint, iWidth: TGLint, + iHeight: TGLint, piAttribList: PGLint): THandle{. + dynlib: dllname, importc.} +proc wglGetPbufferDCARB*(hPbuffer: THandle): HDC{.dynlib: dllname, importc.} +proc wglReleasePbufferDCARB*(hPbuffer: THandle, hDC: HDC): TGLint{. + dynlib: dllname, importc.} +proc wglDestroyPbufferARB*(hPbuffer: THandle): BOOL{.dynlib: dllname, importc.} +proc wglQueryPbufferARB*(hPbuffer: THandle, iAttribute: TGLint, piValue: PGLint): BOOL{. + dynlib: dllname, importc.} +proc wglSwapIntervalEXT*(interval: TGLint): BOOL{.dynlib: dllname, importc.} +proc wglGetSwapIntervalEXT*(): TGLint{.dynlib: dllname, importc.} +const + WGL_BIND_TO_TEXTURE_RGB_ARB* = 0x00002070 + WGL_BIND_TO_TEXTURE_RGBA_ARB* = 0x00002071 + WGL_TEXTURE_FORMAT_ARB* = 0x00002072 + WGL_TEXTURE_TARGET_ARB* = 0x00002073 + WGL_MIPMAP_TEXTURE_ARB* = 0x00002074 + WGL_TEXTURE_RGB_ARB* = 0x00002075 + WGL_TEXTURE_RGBA_ARB* = 0x00002076 + WGL_NO_TEXTURE_ARB* = 0x00002077 + WGL_TEXTURE_CUBE_MAP_ARB* = 0x00002078 + WGL_TEXTURE_1D_ARB* = 0x00002079 + WGL_TEXTURE_2D_ARB* = 0x0000207A # WGL_NO_TEXTURE_ARB { already defined } + WGL_MIPMAP_LEVEL_ARB* = 0x0000207B + WGL_CUBE_MAP_FACE_ARB* = 0x0000207C + WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB* = 0x0000207D + WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB* = 0x0000207E + WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB* = 0x0000207F + WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB* = 0x00002080 + WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB* = 0x00002081 + WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB* = 0x00002082 + WGL_FRONT_LEFT_ARB* = 0x00002083 + WGL_FRONT_RIGHT_ARB* = 0x00002084 + WGL_BACK_LEFT_ARB* = 0x00002085 + WGL_BACK_RIGHT_ARB* = 0x00002086 + WGL_AUX0_ARB* = 0x00002087 + WGL_AUX1_ARB* = 0x00002088 + WGL_AUX2_ARB* = 0x00002089 + WGL_AUX3_ARB* = 0x0000208A + WGL_AUX4_ARB* = 0x0000208B + WGL_AUX5_ARB* = 0x0000208C + WGL_AUX6_ARB* = 0x0000208D + WGL_AUX7_ARB* = 0x0000208E + WGL_AUX8_ARB* = 0x0000208F + WGL_AUX9_ARB* = 0x00002090 + +proc wglBindTexImageARB*(hPbuffer: THandle, iBuffer: TGLint): BOOL{. + dynlib: dllname, importc.} +proc wglReleaseTexImageARB*(hPbuffer: THandle, iBuffer: TGLint): BOOL{. + dynlib: dllname, importc.} +proc wglSetPbufferAttribARB*(hPbuffer: THandle, piAttribList: PGLint): BOOL{. + dynlib: dllname, importc.} +proc wglGetExtensionsStringEXT*(): cstring{.dynlib: dllname, importc.} +proc wglMakeContextCurrentEXT*(hDrawDC: HDC, hReadDC: HDC, hglrc: HGLRC): BOOL{. + dynlib: dllname, importc.} +proc wglGetCurrentReadDCEXT*(): HDC{.dynlib: dllname, importc.} +const + WGL_DRAW_TO_PBUFFER_EXT* = 0x0000202D + WGL_MAX_PBUFFER_PIXELS_EXT* = 0x0000202E + WGL_MAX_PBUFFER_WIDTH_EXT* = 0x0000202F + WGL_MAX_PBUFFER_HEIGHT_EXT* = 0x00002030 + WGL_OPTIMAL_PBUFFER_WIDTH_EXT* = 0x00002031 + WGL_OPTIMAL_PBUFFER_HEIGHT_EXT* = 0x00002032 + WGL_PBUFFER_LARGEST_EXT* = 0x00002033 + WGL_PBUFFER_WIDTH_EXT* = 0x00002034 + WGL_PBUFFER_HEIGHT_EXT* = 0x00002035 + +proc wglCreatePbufferEXT*(hDC: HDC, iPixelFormat: TGLint, iWidth: TGLint, + iHeight: TGLint, piAttribList: PGLint): THandle{. + dynlib: dllname, importc.} +proc wglGetPbufferDCEXT*(hPbuffer: THandle): HDC{.dynlib: dllname, importc.} +proc wglReleasePbufferDCEXT*(hPbuffer: THandle, hDC: HDC): TGLint{. + dynlib: dllname, importc.} +proc wglDestroyPbufferEXT*(hPbuffer: THandle): BOOL{.dynlib: dllname, importc.} +proc wglQueryPbufferEXT*(hPbuffer: THandle, iAttribute: TGLint, piValue: PGLint): BOOL{. + dynlib: dllname, importc.} +const + WGL_NUMBER_PIXEL_FORMATS_EXT* = 0x00002000 + WGL_DRAW_TO_WINDOW_EXT* = 0x00002001 + WGL_DRAW_TO_BITMAP_EXT* = 0x00002002 + WGL_ACCELERATION_EXT* = 0x00002003 + WGL_NEED_PALETTE_EXT* = 0x00002004 + WGL_NEED_SYSTEM_PALETTE_EXT* = 0x00002005 + WGL_SWAP_LAYER_BUFFERS_EXT* = 0x00002006 + WGL_SWAP_METHOD_EXT* = 0x00002007 + WGL_NUMBER_OVERLAYS_EXT* = 0x00002008 + WGL_NUMBER_UNDERLAYS_EXT* = 0x00002009 + WGL_TRANSPARENT_EXT* = 0x0000200A + WGL_TRANSPARENT_VALUE_EXT* = 0x0000200B + WGL_SHARE_DEPTH_EXT* = 0x0000200C + WGL_SHARE_STENCIL_EXT* = 0x0000200D + WGL_SHARE_ACCUM_EXT* = 0x0000200E + WGL_SUPPORT_GDI_EXT* = 0x0000200F + WGL_SUPPORT_OPENGL_EXT* = 0x00002010 + WGL_DOUBLE_BUFFER_EXT* = 0x00002011 + WGL_STEREO_EXT* = 0x00002012 + WGL_PIXEL_TYPE_EXT* = 0x00002013 + WGL_COLOR_BITS_EXT* = 0x00002014 + WGL_RED_BITS_EXT* = 0x00002015 + WGL_RED_SHIFT_EXT* = 0x00002016 + WGL_GREEN_BITS_EXT* = 0x00002017 + WGL_GREEN_SHIFT_EXT* = 0x00002018 + WGL_BLUE_BITS_EXT* = 0x00002019 + WGL_BLUE_SHIFT_EXT* = 0x0000201A + WGL_ALPHA_BITS_EXT* = 0x0000201B + WGL_ALPHA_SHIFT_EXT* = 0x0000201C + WGL_ACCUM_BITS_EXT* = 0x0000201D + WGL_ACCUM_RED_BITS_EXT* = 0x0000201E + WGL_ACCUM_GREEN_BITS_EXT* = 0x0000201F + WGL_ACCUM_BLUE_BITS_EXT* = 0x00002020 + WGL_ACCUM_ALPHA_BITS_EXT* = 0x00002021 + WGL_DEPTH_BITS_EXT* = 0x00002022 + WGL_STENCIL_BITS_EXT* = 0x00002023 + WGL_AUX_BUFFERS_EXT* = 0x00002024 + WGL_NO_ACCELERATION_EXT* = 0x00002025 + WGL_GENERIC_ACCELERATION_EXT* = 0x00002026 + WGL_FULL_ACCELERATION_EXT* = 0x00002027 + WGL_SWAP_EXCHANGE_EXT* = 0x00002028 + WGL_SWAP_COPY_EXT* = 0x00002029 + WGL_SWAP_UNDEFINED_EXT* = 0x0000202A + WGL_TYPE_RGBA_EXT* = 0x0000202B + WGL_TYPE_COLORINDEX_EXT* = 0x0000202C + +proc wglGetPixelFormatAttribivEXT*(hdc: HDC, iPixelFormat: TGLint, + iLayerPlane: TGLint, nAttributes: TGLuint, + piAttributes: PGLint, piValues: PGLint): BOOL{. + dynlib: dllname, importc.} +proc wglGetPixelFormatAttribfvEXT*(hdc: HDC, iPixelFormat: TGLint, + iLayerPlane: TGLint, nAttributes: TGLuint, + piAttributes: PGLint, pfValues: PGLfloat): BOOL{. + dynlib: dllname, importc.} +proc wglChoosePixelFormatEXT*(hdc: HDC, piAttribIList: PGLint, + pfAttribFList: PGLfloat, nMaxFormats: TGLuint, + piFormats: PGLint, nNumFormats: PGLuint): BOOL{. + dynlib: dllname, importc.} +const + WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D* = 0x00002050 + WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D* = 0x00002051 + WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D* = 0x00002052 + WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D* = 0x00002053 + +proc wglGetDigitalVideoParametersI3D*(hDC: HDC, iAttribute: TGLint, + piValue: PGLint): BOOL{.dynlib: dllname, + importc.} +proc wglSetDigitalVideoParametersI3D*(hDC: HDC, iAttribute: TGLint, + piValue: PGLint): BOOL{.dynlib: dllname, + importc.} +const + WGL_GAMMA_TABLE_SIZE_I3D* = 0x0000204E + WGL_GAMMA_EXCLUDE_DESKTOP_I3D* = 0x0000204F + +proc wglGetGammaTableParametersI3D*(hDC: HDC, iAttribute: TGLint, + piValue: PGLint): BOOL{.dynlib: dllname, + importc.} +proc wglSetGammaTableParametersI3D*(hDC: HDC, iAttribute: TGLint, + piValue: PGLint): BOOL{.dynlib: dllname, + importc.} +proc wglGetGammaTableI3D*(hDC: HDC, iEntries: TGLint, puRed: PGLUSHORT, + puGreen: PGLUSHORT, puBlue: PGLUSHORT): BOOL{. + dynlib: dllname, importc.} +proc wglSetGammaTableI3D*(hDC: HDC, iEntries: TGLint, puRed: PGLUSHORT, + puGreen: PGLUSHORT, puBlue: PGLUSHORT): BOOL{. + dynlib: dllname, importc.} +const + WGL_GENLOCK_SOURCE_MULTIVIEW_I3D* = 0x00002044 + WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D* = 0x00002045 + WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D* = 0x00002046 + WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D* = 0x00002047 + WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D* = 0x00002048 + WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D* = 0x00002049 + WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D* = 0x0000204A + WGL_GENLOCK_SOURCE_EDGE_RISING_I3D* = 0x0000204B + WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D* = 0x0000204C + WGL_FLOAT_COMPONENTS_NV* = 0x000020B0 + WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV* = 0x000020B1 + WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV* = 0x000020B2 + WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV* = 0x000020B3 + WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV* = 0x000020B4 + WGL_TEXTURE_FLOAT_R_NV* = 0x000020B5 + WGL_TEXTURE_FLOAT_RG_NV* = 0x000020B6 + WGL_TEXTURE_FLOAT_RGB_NV* = 0x000020B7 + WGL_TEXTURE_FLOAT_RGBA_NV* = 0x000020B8 + +proc wglEnableGenlockI3D*(hDC: HDC): BOOL{.dynlib: dllname, importc.} +proc wglDisableGenlockI3D*(hDC: HDC): BOOL{.dynlib: dllname, importc.} +proc wglIsEnabledGenlockI3D*(hDC: HDC, pFlag: PBOOL): BOOL{.dynlib: dllname, + importc.} +proc wglGenlockSourceI3D*(hDC: HDC, uSource: TGLuint): BOOL{.dynlib: dllname, + importc.} +proc wglGetGenlockSourceI3D*(hDC: HDC, uSource: PGLUINT): BOOL{.dynlib: dllname, + importc.} +proc wglGenlockSourceEdgeI3D*(hDC: HDC, uEdge: TGLuint): BOOL{.dynlib: dllname, + importc.} +proc wglGetGenlockSourceEdgeI3D*(hDC: HDC, uEdge: PGLUINT): BOOL{. + dynlib: dllname, importc.} +proc wglGenlockSampleRateI3D*(hDC: HDC, uRate: TGLuint): BOOL{.dynlib: dllname, + importc.} +proc wglGetGenlockSampleRateI3D*(hDC: HDC, uRate: PGLUINT): BOOL{. + dynlib: dllname, importc.} +proc wglGenlockSourceDelayI3D*(hDC: HDC, uDelay: TGLuint): BOOL{. + dynlib: dllname, importc.} +proc wglGetGenlockSourceDelayI3D*(hDC: HDC, uDelay: PGLUINT): BOOL{. + dynlib: dllname, importc.} +proc wglQueryGenlockMaxSourceDelayI3D*(hDC: HDC, uMaxLineDelay: PGLUINT, + uMaxPixelDelay: PGLUINT): BOOL{. + dynlib: dllname, importc.} +const + WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV* = 0x000020A0 + WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV* = 0x000020A1 + WGL_TEXTURE_RECTANGLE_NV* = 0x000020A2 + +const + WGL_RGBA_FLOAT_MODE_ATI* = 0x00008820 + WGL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI* = 0x00008835 + WGL_TYPE_RGBA_FLOAT_ATI* = 0x000021A0 + +# implementation diff --git a/lib/oldwrappers/pcre/pcre.nim b/lib/oldwrappers/pcre/pcre.nim new file mode 100644 index 000000000..05f937579 --- /dev/null +++ b/lib/oldwrappers/pcre/pcre.nim @@ -0,0 +1,279 @@ +# +# +# Nimrod's Runtime Library +# (c) Copyright 2009 Andreas Rumpf +# +# See the file "copying.txt", included in this +# distribution, for details about the copyright. +# + +{.compile: "pcre_all.c" .} + +type + Pbyte = ptr byte + PPchar = ptr cstring + Pint = ptr cint + Ppcre* = ptr TPcre + Ppcre_callout_block* = ptr tpcre_callout_block + Ppcre_extra* = ptr Tpcre_extra + TPcre {.final, pure.} = object + + # The structure for passing additional data to pcre_exec(). This is defined + # in such as way as to be extensible. + # Bits for which fields are set + # Opaque data from pcre_study() + # Maximum number of calls to match() + # Data passed back in callouts + # Const before type ignored + # Pointer to character tables + Tpcre_extra* {.final, pure.} = object + flags: cint + study_data: pointer + match_limit: cint + callout_data: pointer + tables: ptr byte + + # The structure for passing out data via the pcre_callout_function. We use a + # structure so that new fields can be added on the end in future versions, + # without changing the API of the function, thereby allowing old clients to + # work without modification. + # Identifies version of block + # ------------------------ Version 0 ------------------------------- + # Number compiled into pattern + # The offset vector + # Const before type ignored + # The subject being matched + # The length of the subject + # Offset to start of this match attempt + # Where we currently are in the subject + # Max current capture + # Most recently closed capture + # Data passed in with the call + # ------------------- Added for Version 1 -------------------------- + # Offset to next item in the pattern + # Length of next item in the pattern + # ------------------------------------------------------------------ + TPcre_callout_block* {.final, pure.} = object + version: cint + callout_number: cint + offset_vector: ptr cint + subject: ptr char + subject_length: cint + start_match: cint + current_position: cint + capture_top: cint + capture_last: cint + callout_data: pointer + pattern_position: cint + next_item_length: cint + + +#************************************************ +#* Perl-Compatible Regular Expressions * +#************************************************ +# +# Modified by Andreas Rumpf for h2pas. + +# In its original form, this is the .in file that is transformed by +# "configure" into pcre.h. +# +# Copyright (c) 1997-2005 University of Cambridge +# +# ----------------------------------------------------------------------------- +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of the University of Cambridge nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# ----------------------------------------------------------------------------- + +# The file pcre.h is build by "configure". Do not edit it; instead +# make changes to pcre.in. + +const + PCRE_MAJOR* = 6 + PCRE_MINOR* = 3 + PCRE_DATE* = "2005/11/29" + # Options + PCRE_CASELESS* = 0x00000001 + PCRE_MULTILINE* = 0x00000002 + PCRE_DOTALL* = 0x00000004 + PCRE_EXTENDED* = 0x00000008 + PCRE_ANCHORED* = 0x00000010 + PCRE_DOLLAR_ENDONLY* = 0x00000020 + PCRE_EXTRA* = 0x00000040 + PCRE_NOTBOL* = 0x00000080 + PCRE_NOTEOL* = 0x00000100 + PCRE_UNGREEDY* = 0x00000200 + PCRE_NOTEMPTY* = 0x00000400 + PCRE_UTF8* = 0x00000800 + PCRE_NO_AUTO_CAPTURE* = 0x00001000 + PCRE_NO_UTF8_CHECK* = 0x00002000 + PCRE_AUTO_CALLOUT* = 0x00004000 + PCRE_PARTIAL* = 0x00008000 + PCRE_DFA_SHORTEST* = 0x00010000 + PCRE_DFA_RESTART* = 0x00020000 + PCRE_FIRSTLINE* = 0x00040000 + # Exec-time and get/set-time error codes + PCRE_ERROR_NOMATCH* = -(1) + PCRE_ERROR_NULL* = -(2) + PCRE_ERROR_BADOPTION* = -(3) + PCRE_ERROR_BADMAGIC* = -(4) + PCRE_ERROR_UNKNOWN_NODE* = -(5) + PCRE_ERROR_NOMEMORY* = -(6) + PCRE_ERROR_NOSUBSTRING* = -(7) + PCRE_ERROR_MATCHLIMIT* = -(8) + # Never used by PCRE itself + PCRE_ERROR_CALLOUT* = -(9) + PCRE_ERROR_BADUTF8* = -(10) + PCRE_ERROR_BADUTF8_OFFSET* = -(11) + PCRE_ERROR_PARTIAL* = -(12) + PCRE_ERROR_BADPARTIAL* = -(13) + PCRE_ERROR_INTERNAL* = -(14) + PCRE_ERROR_BADCOUNT* = -(15) + PCRE_ERROR_DFA_UITEM* = -(16) + PCRE_ERROR_DFA_UCOND* = -(17) + PCRE_ERROR_DFA_UMLIMIT* = -(18) + PCRE_ERROR_DFA_WSSIZE* = -(19) + PCRE_ERROR_DFA_RECURSE* = -(20) + # Request types for pcre_fullinfo() + PCRE_INFO_OPTIONS* = 0 + PCRE_INFO_SIZE* = 1 + PCRE_INFO_CAPTURECOUNT* = 2 + PCRE_INFO_BACKREFMAX* = 3 + PCRE_INFO_FIRSTBYTE* = 4 + # For backwards compatibility + PCRE_INFO_FIRSTCHAR* = 4 + PCRE_INFO_FIRSTTABLE* = 5 + PCRE_INFO_LASTLITERAL* = 6 + PCRE_INFO_NAMEENTRYSIZE* = 7 + PCRE_INFO_NAMECOUNT* = 8 + PCRE_INFO_NAMETABLE* = 9 + PCRE_INFO_STUDYSIZE* = 10 + PCRE_INFO_DEFAULT_TABLES* = 11 + # Request types for pcre_config() + PCRE_CONFIG_UTF8* = 0 + PCRE_CONFIG_NEWLINE* = 1 + PCRE_CONFIG_LINK_SIZE* = 2 + PCRE_CONFIG_POSIX_MALLOC_THRESHOLD* = 3 + PCRE_CONFIG_MATCH_LIMIT* = 4 + PCRE_CONFIG_STACKRECURSE* = 5 + PCRE_CONFIG_UNICODE_PROPERTIES* = 6 + # Bit flags for the pcre_extra structure + PCRE_EXTRA_STUDY_DATA* = 0x0001 + PCRE_EXTRA_MATCH_LIMIT* = 0x0002 + PCRE_EXTRA_CALLOUT_DATA* = 0x0004 + PCRE_EXTRA_TABLES* = 0x0008 + +# Exported PCRE functions + +proc pcre_compile*(para1: cstring, para2: cint, para3: ptr cstring, + para4: ptr int, para5: Pbyte): Ppcre {. + importc: "pcre_compile", noconv.} + +proc pcre_compile2*(para1: cstring, para2: cint, para3: Pint, para4: PPchar, + para5: ptr int, para6: Pbyte): Ppcre {. + importc: "pcre_compile2", noconv.} + +proc pcre_config*(para1: cint, para2: pointer): cint {. + importc: "pcre_config", noconv.} + +proc pcre_copy_named_substring*(para1: Ppcre, para2: cstring, para3: Pint, + para4: cint, para5: cstring, para6: cstring, + para7: cint): cint {. + importc: "pcre_copy_named_substring", noconv.} + +proc pcre_copy_substring*(para1: cstring, para2: Pint, para3: cint, para4: cint, + para5: cstring, para6: cint): cint {. + importc: "pcre_copy_substring", noconv.} + +proc pcre_dfa_exec*(para1: Ppcre, para2: Ppcre_extra, para3: cstring, + para4: cint, para5: cint, para6: cint, para7: Pint, + para8: cint, para9: Pint, para10: cint): cint {. + importc: "pcre_dfa_exec", noconv.} + +proc pcre_exec*(para1: Ppcre, para2: Ppcre_extra, para3: cstring, + para4: cint, para5: cint, para6: cint, para7: Pint, + para8: cint): cint {.importc: "pcre_exec", noconv.} + +proc pcre_free_substring*(para1: cstring) {. + importc: "pcre_free_substring", noconv.} + +proc pcre_free_substring_list*(para1: PPchar) {. + importc: "pcre_free_substring_list", noconv.} + +proc pcre_fullinfo*(para1: Ppcre, para2: Ppcre_extra, para3: cint, + para4: pointer): cint {.importc: "pcre_fullinfo", noconv.} + +proc pcre_get_named_substring*(para1: Ppcre, para2: cstring, para3: Pint, + para4: cint, para5: cstring, para6: PPchar): cint {. + importc: "pcre_get_named_substring", noconv.} + +proc pcre_get_stringnumber*(para1: Ppcre, para2: cstring): cint {. + importc: "pcre_get_stringnumber", noconv.} + +proc pcre_get_substring*(para1: cstring, para2: Pint, para3: cint, + para4: cint, para5: PPchar): cint {. + importc: "pcre_get_substring", noconv.} + +proc pcre_get_substring_list*(para1: cstring, para2: Pint, para3: cint, + para4: ptr PPchar): cint {. + importc: "pcre_get_substring_list", noconv.} + +proc pcre_info*(para1: Ppcre, para2: Pint, para3: Pint): cint {. + importc: "pcre_info", noconv.} + +proc pcre_maketables*: ptr byte {. + importc: "pcre_maketables", noconv.} + +proc pcre_refcount*(para1: Ppcre, para2: cint): cint {. + importc: "pcre_refcount", noconv.} + +proc pcre_study*(para1: Ppcre, para2: cint, + para3: ptr CString): Ppcre_extra {.importc, noconv.} + +proc pcre_version*: CString {.importc: "pcre_version", noconv.} + +# Indirection for store get and free functions. These can be set to +# alternative malloc/free functions if required. Special ones are used in the +# non-recursive case for "frames". There is also an optional callout function +# that is triggered by the (?) regex item. +# + +# we use Nimrod's memory manager (but not GC!) for these functions: +type + TMalloc = proc (para1: int): pointer {.noconv.} + TFree = proc (para1: pointer) {.noconv.} +var + pcre_malloc {.importc: "pcre_malloc".}: TMalloc + pcre_free {.importc: "pcre_free".}: TFree + pcre_stack_malloc {.importc: "pcre_stack_malloc".}: TMalloc + pcre_stack_free {.importc: "pcre_stack_free".}: TFree + pcre_callout {.importc: "pcre_callout".}: + proc (para1: Ppcre_callout_block): cint {.noconv.} + +pcre_malloc = cast[TMalloc](system.alloc) +pcre_free = cast[TFree](system.dealloc) +pcre_stack_malloc = cast[TMalloc](system.alloc) +pcre_stack_free = cast[TFree](system.dealloc) +pcre_callout = nil diff --git a/lib/oldwrappers/pcre/pcre_all.c b/lib/oldwrappers/pcre/pcre_all.c new file mode 100644 index 000000000..bcda06e50 --- /dev/null +++ b/lib/oldwrappers/pcre/pcre_all.c @@ -0,0 +1,30072 @@ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* This file is automatically written by the dftables auxiliary +program. If you edit it by hand, you might like to edit the Makefile to +prevent its ever being regenerated. + +This file contains the default tables for characters with codes less than +128 (ASCII characters). These tables are used when no external tables are +passed to PCRE. */ + +const unsigned char _pcre_default_tables[] = { + +/* This table is a lower casing table. */ + + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, + 64, 97, 98, 99,100,101,102,103, + 104,105,106,107,108,109,110,111, + 112,113,114,115,116,117,118,119, + 120,121,122, 91, 92, 93, 94, 95, + 96, 97, 98, 99,100,101,102,103, + 104,105,106,107,108,109,110,111, + 112,113,114,115,116,117,118,119, + 120,121,122,123,124,125,126,127, + 128,129,130,131,132,133,134,135, + 136,137,138,139,140,141,142,143, + 144,145,146,147,148,149,150,151, + 152,153,154,155,156,157,158,159, + 160,161,162,163,164,165,166,167, + 168,169,170,171,172,173,174,175, + 176,177,178,179,180,181,182,183, + 184,185,186,187,188,189,190,191, + 192,193,194,195,196,197,198,199, + 200,201,202,203,204,205,206,207, + 208,209,210,211,212,213,214,215, + 216,217,218,219,220,221,222,223, + 224,225,226,227,228,229,230,231, + 232,233,234,235,236,237,238,239, + 240,241,242,243,244,245,246,247, + 248,249,250,251,252,253,254,255, + +/* This table is a case flipping table. */ + + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, + 64, 97, 98, 99,100,101,102,103, + 104,105,106,107,108,109,110,111, + 112,113,114,115,116,117,118,119, + 120,121,122, 91, 92, 93, 94, 95, + 96, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90,123,124,125,126,127, + 128,129,130,131,132,133,134,135, + 136,137,138,139,140,141,142,143, + 144,145,146,147,148,149,150,151, + 152,153,154,155,156,157,158,159, + 160,161,162,163,164,165,166,167, + 168,169,170,171,172,173,174,175, + 176,177,178,179,180,181,182,183, + 184,185,186,187,188,189,190,191, + 192,193,194,195,196,197,198,199, + 200,201,202,203,204,205,206,207, + 208,209,210,211,212,213,214,215, + 216,217,218,219,220,221,222,223, + 224,225,226,227,228,229,230,231, + 232,233,234,235,236,237,238,239, + 240,241,242,243,244,245,246,247, + 248,249,250,251,252,253,254,255, + +/* This table contains bit maps for various character classes. +Each map is 32 bytes long and the bits run from the least +significant end of each byte. The classes that have their own +maps are: space, xdigit, digit, upper, lower, word, graph +print, punct, and cntrl. Other classes are built from combinations. */ + + 0x00,0x3e,0x00,0x00,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + + 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03, + 0x7e,0x00,0x00,0x00,0x7e,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + + 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xfe,0xff,0xff,0x07,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x07, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + + 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03, + 0xfe,0xff,0xff,0x87,0xfe,0xff,0xff,0x07, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + + 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + + 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + + 0x00,0x00,0x00,0x00,0xfe,0xff,0x00,0xfc, + 0x01,0x00,0x00,0xf8,0x01,0x00,0x00,0x78, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + +/* This table identifies various classes of character by individual bits: + 0x01 white space character + 0x02 letter + 0x04 decimal digit + 0x08 hexadecimal digit + 0x10 alphanumeric or '_' + 0x80 regular expression metacharacter or binary zero +*/ + + 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 */ + 0x00,0x01,0x01,0x00,0x01,0x01,0x00,0x00, /* 8- 15 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 16- 23 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 24- 31 */ + 0x01,0x00,0x00,0x00,0x80,0x00,0x00,0x00, /* - ' */ + 0x80,0x80,0x80,0x80,0x00,0x00,0x80,0x00, /* ( - / */ + 0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c, /* 0 - 7 */ + 0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,0x80, /* 8 - ? */ + 0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* @ - G */ + 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* H - O */ + 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* P - W */ + 0x12,0x12,0x12,0x80,0x00,0x00,0x80,0x10, /* X - _ */ + 0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* ` - g */ + 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* h - o */ + 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* p - w */ + 0x12,0x12,0x12,0x80,0x80,0x00,0x00,0x00, /* x -127 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 128-135 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 136-143 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 144-151 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 152-159 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 160-167 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 168-175 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 176-183 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 184-191 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 192-199 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 200-207 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 208-215 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 216-223 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 224-231 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 232-239 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 240-247 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/* 248-255 */ + +/* End of chartables.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains the external function pcre_compile(), along with +supporting internal functions that are not used by other modules. */ + + +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + +/* This header contains definitions that are shared between the different +modules, but which are not relevant to the exported API. This includes some +functions whose names all begin with "_pcre_". */ + + +/* Define DEBUG to get debugging output on stdout. */ + +/**** +#define DEBUG +****/ + +/* Use a macro for debugging printing, 'cause that eliminates the use of #ifdef +inline, and there are *still* stupid compilers about that don't like indented +pre-processor statements, or at least there were when I first wrote this. After +all, it had only been about 10 years then... */ + +#ifdef DEBUG +#define DPRINTF(p) printf p +#else +#define DPRINTF(p) /*nothing*/ +#endif + + +/* Get the definitions provided by running "configure" */ + + +/* On Unix systems config.in is converted by configure into config.h. PCRE is +written in Standard C, but there are a few non-standard things it can cope +with, allowing it to run on SunOS4 and other "close to standard" systems. + +On a non-Unix system you should just copy this file into config.h, and set up +the macros the way you need them. You should normally change the definitions of +HAVE_STRERROR and HAVE_MEMMOVE to 1. Unfortunately, because of the way autoconf +works, these cannot be made the defaults. If your system has bcopy() and not +memmove(), change the definition of HAVE_BCOPY instead of HAVE_MEMMOVE. If your +system has neither bcopy() nor memmove(), leave them both as 0; an emulation +function will be used. */ + +/* If you are compiling for a system that uses EBCDIC instead of ASCII +character codes, define this macro as 1. On systems that can use "configure", +this can be done via --enable-ebcdic. */ + +#ifndef EBCDIC +#define EBCDIC 0 +#endif + +/* If you are compiling for a system that needs some magic to be inserted +before the definition of an exported function, define this macro to contain the +relevant magic. It apears at the start of every exported function. */ + +#define EXPORT + +/* Define to empty if the "const" keyword does not work. */ + +#undef const + +/* Define to "unsigned" if <stddef.h> doesn't define size_t. */ + +#undef size_t + +/* The following two definitions are mainly for the benefit of SunOS4, which +doesn't have the strerror() or memmove() functions that should be present in +all Standard C libraries. The macros HAVE_STRERROR and HAVE_MEMMOVE should +normally be defined with the value 1 for other systems, but unfortunately we +can't make this the default because "configure" files generated by autoconf +will only change 0 to 1; they won't change 1 to 0 if the functions are not +found. */ + +#define HAVE_STRERROR 1 +#define HAVE_MEMMOVE 1 + +/* There are some non-Unix systems that don't even have bcopy(). If this macro +is false, an emulation is used. If HAVE_MEMMOVE is set to 1, the value of +HAVE_BCOPY is not relevant. */ + +#define HAVE_BCOPY 0 + +/* The value of NEWLINE determines the newline character. The default is to +leave it up to the compiler, but some sites want to force a particular value. +On Unix systems, "configure" can be used to override this default. */ + +#ifndef NEWLINE +#define NEWLINE '\n' +#endif + +/* The value of LINK_SIZE determines the number of bytes used to store +links as offsets within the compiled regex. The default is 2, which allows for +compiled patterns up to 64K long. This covers the vast majority of cases. +However, PCRE can also be compiled to use 3 or 4 bytes instead. This allows for +longer patterns in extreme cases. On Unix systems, "configure" can be used to +override this default. */ + +#ifndef LINK_SIZE +#define LINK_SIZE 2 +#endif + +/* The value of MATCH_LIMIT determines the default number of times the match() +function can be called during a single execution of pcre_exec(). (There is a +runtime method of setting a different limit.) The limit exists in order to +catch runaway regular expressions that take for ever to determine that they do +not match. The default is set very large so that it does not accidentally catch +legitimate cases. On Unix systems, "configure" can be used to override this +default default. */ + +#ifndef MATCH_LIMIT +#define MATCH_LIMIT 10000000 +#endif + +/* When calling PCRE via the POSIX interface, additional working storage is +required for holding the pointers to capturing substrings because PCRE requires +three integers per substring, whereas the POSIX interface provides only two. If +the number of expected substrings is small, the wrapper function uses space on +the stack, because this is faster than using malloc() for each call. The +threshold above which the stack is no longer use is defined by POSIX_MALLOC_ +THRESHOLD. On Unix systems, "configure" can be used to override this default. +*/ + +#ifndef POSIX_MALLOC_THRESHOLD +#define POSIX_MALLOC_THRESHOLD 10 +#endif + +/* PCRE uses recursive function calls to handle backtracking while matching. +This can sometimes be a problem on systems that have stacks of limited size. +Define NO_RECURSE to get a version that doesn't use recursion in the match() +function; instead it creates its own stack by steam using pcre_recurse_malloc +to get memory. For more detail, see comments and other stuff just above the +match() function. On Unix systems, "configure" can be used to set this in the +Makefile (use --disable-stack-for-recursion). */ + +/* #define NO_RECURSE */ + +/* End */ + +/* Standard C headers plus the external interface definition. The only time +setjmp and stdarg are used is when NO_RECURSE is set. */ + +#include <ctype.h> +#include <limits.h> +#include <setjmp.h> +#include <stdarg.h> +#include <stddef.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#ifndef PCRE_SPY +#define PCRE_DEFINITION /* Win32 __declspec(export) trigger for .dll */ +#endif + +/* We need to have types that specify unsigned 16-bit and 32-bit integers. We +cannot determine these outside the compilation (e.g. by running a program as +part of "configure") because PCRE is often cross-compiled for use on other +systems. Instead we make use of the maximum sizes that are available at +preprocessor time in standard C environments. */ + +#if USHRT_MAX == 65535 + typedef unsigned short pcre_uint16; +#elif UINT_MAX == 65535 + typedef unsigned int pcre_uint16; +#else + #error Cannot determine a type for 16-bit unsigned integers +#endif + +#if UINT_MAX == 4294967295 + typedef unsigned int pcre_uint32; +#elif ULONG_MAX == 4294967295 + typedef unsigned long int pcre_uint32; +#else + #error Cannot determine a type for 32-bit unsigned integers +#endif + +/* All character handling must be done as unsigned characters. Otherwise there +are problems with top-bit-set characters and functions such as isspace(). +However, we leave the interface to the outside world as char *, because that +should make things easier for callers. We define a short type for unsigned char +to save lots of typing. I tried "uchar", but it causes problems on Digital +Unix, where it is defined in sys/types, so use "uschar" instead. */ + +typedef unsigned char uschar; + +/* Include the public PCRE header */ + +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* In its original form, this is the .in file that is transformed by +"configure" into pcre.h. + + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + +#ifndef _PCRE_H +#define _PCRE_H + +/* The file pcre.h is build by "configure". Do not edit it; instead +make changes to pcre.in. */ + +#define PCRE_MAJOR 6 +#define PCRE_MINOR 3 +#define PCRE_DATE "2005/11/29" + +/* For other operating systems, we use the standard "extern". */ + +#ifndef PCRE_DATA_SCOPE +# ifdef __cplusplus +# define PCRE_DATA_SCOPE extern "C" +# else +# define PCRE_DATA_SCOPE extern +# endif +#endif + +/* Have to include stdlib.h in order to ensure that size_t is defined; +it is needed here for malloc. */ + +#include <stdlib.h> + +/* Allow for C++ users */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Options */ + +#define PCRE_CASELESS 0x00000001 +#define PCRE_MULTILINE 0x00000002 +#define PCRE_DOTALL 0x00000004 +#define PCRE_EXTENDED 0x00000008 +#define PCRE_ANCHORED 0x00000010 +#define PCRE_DOLLAR_ENDONLY 0x00000020 +#define PCRE_EXTRA 0x00000040 +#define PCRE_NOTBOL 0x00000080 +#define PCRE_NOTEOL 0x00000100 +#define PCRE_UNGREEDY 0x00000200 +#define PCRE_NOTEMPTY 0x00000400 +#define PCRE_UTF8 0x00000800 +#define PCRE_NO_AUTO_CAPTURE 0x00001000 +#define PCRE_NO_UTF8_CHECK 0x00002000 +#define PCRE_AUTO_CALLOUT 0x00004000 +#define PCRE_PARTIAL 0x00008000 +#define PCRE_DFA_SHORTEST 0x00010000 +#define PCRE_DFA_RESTART 0x00020000 +#define PCRE_FIRSTLINE 0x00040000 + +/* Exec-time and get/set-time error codes */ + +#define PCRE_ERROR_NOMATCH (-1) +#define PCRE_ERROR_NULL (-2) +#define PCRE_ERROR_BADOPTION (-3) +#define PCRE_ERROR_BADMAGIC (-4) +#define PCRE_ERROR_UNKNOWN_NODE (-5) +#define PCRE_ERROR_NOMEMORY (-6) +#define PCRE_ERROR_NOSUBSTRING (-7) +#define PCRE_ERROR_MATCHLIMIT (-8) +#define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */ +#define PCRE_ERROR_BADUTF8 (-10) +#define PCRE_ERROR_BADUTF8_OFFSET (-11) +#define PCRE_ERROR_PARTIAL (-12) +#define PCRE_ERROR_BADPARTIAL (-13) +#define PCRE_ERROR_INTERNAL (-14) +#define PCRE_ERROR_BADCOUNT (-15) +#define PCRE_ERROR_DFA_UITEM (-16) +#define PCRE_ERROR_DFA_UCOND (-17) +#define PCRE_ERROR_DFA_UMLIMIT (-18) +#define PCRE_ERROR_DFA_WSSIZE (-19) +#define PCRE_ERROR_DFA_RECURSE (-20) + +/* Request types for pcre_fullinfo() */ + +#define PCRE_INFO_OPTIONS 0 +#define PCRE_INFO_SIZE 1 +#define PCRE_INFO_CAPTURECOUNT 2 +#define PCRE_INFO_BACKREFMAX 3 +#define PCRE_INFO_FIRSTBYTE 4 +#define PCRE_INFO_FIRSTCHAR 4 /* For backwards compatibility */ +#define PCRE_INFO_FIRSTTABLE 5 +#define PCRE_INFO_LASTLITERAL 6 +#define PCRE_INFO_NAMEENTRYSIZE 7 +#define PCRE_INFO_NAMECOUNT 8 +#define PCRE_INFO_NAMETABLE 9 +#define PCRE_INFO_STUDYSIZE 10 +#define PCRE_INFO_DEFAULT_TABLES 11 + +/* Request types for pcre_config() */ + +#define PCRE_CONFIG_UTF8 0 +#define PCRE_CONFIG_NEWLINE 1 +#define PCRE_CONFIG_LINK_SIZE 2 +#define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD 3 +#define PCRE_CONFIG_MATCH_LIMIT 4 +#define PCRE_CONFIG_STACKRECURSE 5 +#define PCRE_CONFIG_UNICODE_PROPERTIES 6 + +/* Bit flags for the pcre_extra structure */ + +#define PCRE_EXTRA_STUDY_DATA 0x0001 +#define PCRE_EXTRA_MATCH_LIMIT 0x0002 +#define PCRE_EXTRA_CALLOUT_DATA 0x0004 +#define PCRE_EXTRA_TABLES 0x0008 + +/* Types */ + +struct real_pcre; /* declaration; the definition is private */ +typedef struct real_pcre pcre; + +/* The structure for passing additional data to pcre_exec(). This is defined in +such as way as to be extensible. Always add new fields at the end, in order to +remain compatible. */ + +typedef struct pcre_extra { + unsigned long int flags; /* Bits for which fields are set */ + void *study_data; /* Opaque data from pcre_study() */ + unsigned long int match_limit; /* Maximum number of calls to match() */ + void *callout_data; /* Data passed back in callouts */ + const unsigned char *tables; /* Pointer to character tables */ +} pcre_extra; + +/* The structure for passing out data via the pcre_callout_function. We use a +structure so that new fields can be added on the end in future versions, +without changing the API of the function, thereby allowing old clients to work +without modification. */ + +typedef struct pcre_callout_block { + int version; /* Identifies version of block */ + /* ------------------------ Version 0 ------------------------------- */ + int callout_number; /* Number compiled into pattern */ + int *offset_vector; /* The offset vector */ + const char *subject; /* The subject being matched */ + int subject_length; /* The length of the subject */ + int start_match; /* Offset to start of this match attempt */ + int current_position; /* Where we currently are in the subject */ + int capture_top; /* Max current capture */ + int capture_last; /* Most recently closed capture */ + void *callout_data; /* Data passed in with the call */ + /* ------------------- Added for Version 1 -------------------------- */ + int pattern_position; /* Offset to next item in the pattern */ + int next_item_length; /* Length of next item in the pattern */ + /* ------------------------------------------------------------------ */ +} pcre_callout_block; + +/* Indirection for store get and free functions. These can be set to +alternative malloc/free functions if required. Special ones are used in the +non-recursive case for "frames". There is also an optional callout function +that is triggered by the (?) regex item. For Virtual Pascal, these definitions +have to take another form. */ + +#ifndef VPCOMPAT +PCRE_DATA_SCOPE void *(*pcre_malloc)(size_t); +PCRE_DATA_SCOPE void (*pcre_free)(void *); +PCRE_DATA_SCOPE void *(*pcre_stack_malloc)(size_t); +PCRE_DATA_SCOPE void (*pcre_stack_free)(void *); +PCRE_DATA_SCOPE int (*pcre_callout)(pcre_callout_block *); +#else /* VPCOMPAT */ +PCRE_DATA_SCOPE void *pcre_malloc(size_t); +PCRE_DATA_SCOPE void pcre_free(void *); +PCRE_DATA_SCOPE void *pcre_stack_malloc(size_t); +PCRE_DATA_SCOPE void pcre_stack_free(void *); +PCRE_DATA_SCOPE int pcre_callout(pcre_callout_block *); +#endif /* VPCOMPAT */ + +/* Exported PCRE functions */ + +PCRE_DATA_SCOPE pcre *pcre_compile(const char *, int, const char **, int *, + const unsigned char *); +PCRE_DATA_SCOPE pcre *pcre_compile2(const char *, int, int *, const char **, + int *, const unsigned char *); +PCRE_DATA_SCOPE int pcre_config(int, void *); +PCRE_DATA_SCOPE int pcre_copy_named_substring(const pcre *, const char *, + int *, int, const char *, char *, int); +PCRE_DATA_SCOPE int pcre_copy_substring(const char *, int *, int, int, char *, + int); +PCRE_DATA_SCOPE int pcre_dfa_exec(const pcre *, const pcre_extra *, + const char *, int, int, int, int *, int , int *, int); +PCRE_DATA_SCOPE int pcre_exec(const pcre *, const pcre_extra *, const char *, + int, int, int, int *, int); +PCRE_DATA_SCOPE void pcre_free_substring(const char *); +PCRE_DATA_SCOPE void pcre_free_substring_list(const char **); +PCRE_DATA_SCOPE int pcre_fullinfo(const pcre *, const pcre_extra *, int, + void *); +PCRE_DATA_SCOPE int pcre_get_named_substring(const pcre *, const char *, + int *, int, const char *, const char **); +PCRE_DATA_SCOPE int pcre_get_stringnumber(const pcre *, const char *); +PCRE_DATA_SCOPE int pcre_get_substring(const char *, int *, int, int, + const char **); +PCRE_DATA_SCOPE int pcre_get_substring_list(const char *, int *, int, + const char ***); +PCRE_DATA_SCOPE int pcre_info(const pcre *, int *, int *); +PCRE_DATA_SCOPE const unsigned char *pcre_maketables(void); +PCRE_DATA_SCOPE int pcre_refcount(pcre *, int); +PCRE_DATA_SCOPE pcre_extra *pcre_study(const pcre *, int, const char **); +PCRE_DATA_SCOPE const char *pcre_version(void); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* End of pcre.h */ + +/* Include the (copy of) the public ucp header, changing the external name into +a private one. This does no harm, even if we aren't compiling UCP support. */ + +#define ucp_findchar _pcre_ucp_findchar +/************************************************* +* libucp - Unicode Property Table handler * +*************************************************/ + + +#ifndef _UCP_H +#define _UCP_H + +/* These are the character categories that are returned by ucp_findchar */ + +enum { + ucp_C, /* Other */ + ucp_L, /* Letter */ + ucp_M, /* Mark */ + ucp_N, /* Number */ + ucp_P, /* Punctuation */ + ucp_S, /* Symbol */ + ucp_Z /* Separator */ +}; + +/* These are the detailed character types that are returned by ucp_findchar */ + +enum { + ucp_Cc, /* Control */ + ucp_Cf, /* Format */ + ucp_Cn, /* Unassigned */ + ucp_Co, /* Private use */ + ucp_Cs, /* Surrogate */ + ucp_Ll, /* Lower case letter */ + ucp_Lm, /* Modifier letter */ + ucp_Lo, /* Other letter */ + ucp_Lt, /* Title case letter */ + ucp_Lu, /* Upper case letter */ + ucp_Mc, /* Spacing mark */ + ucp_Me, /* Enclosing mark */ + ucp_Mn, /* Non-spacing mark */ + ucp_Nd, /* Decimal number */ + ucp_Nl, /* Letter number */ + ucp_No, /* Other number */ + ucp_Pc, /* Connector punctuation */ + ucp_Pd, /* Dash punctuation */ + ucp_Pe, /* Close punctuation */ + ucp_Pf, /* Final punctuation */ + ucp_Pi, /* Initial punctuation */ + ucp_Po, /* Other punctuation */ + ucp_Ps, /* Open punctuation */ + ucp_Sc, /* Currency symbol */ + ucp_Sk, /* Modifier symbol */ + ucp_Sm, /* Mathematical symbol */ + ucp_So, /* Other symbol */ + ucp_Zl, /* Line separator */ + ucp_Zp, /* Paragraph separator */ + ucp_Zs /* Space separator */ +}; + +extern int ucp_findchar(const int, int *, int *); + +#endif + +/* End of ucp.h */ + +/* When compiling for use with the Virtual Pascal compiler, these functions +need to have their names changed. PCRE must be compiled with the -DVPCOMPAT +option on the command line. */ + +#ifdef VPCOMPAT +#define strncmp(s1,s2,m) _strncmp(s1,s2,m) +#define memcpy(d,s,n) _memcpy(d,s,n) +#define memmove(d,s,n) _memmove(d,s,n) +#define memset(s,c,n) _memset(s,c,n) +#else /* VPCOMPAT */ + +/* To cope with SunOS4 and other systems that lack memmove() but have bcopy(), +define a macro for memmove() if HAVE_MEMMOVE is false, provided that HAVE_BCOPY +is set. Otherwise, include an emulating function for those systems that have +neither (there some non-Unix environments where this is the case). This assumes +that all calls to memmove are moving strings upwards in store, which is the +case in PCRE. */ + +#if ! HAVE_MEMMOVE +#undef memmove /* some systems may have a macro */ +#if HAVE_BCOPY +#define memmove(a, b, c) bcopy(b, a, c) +#else /* HAVE_BCOPY */ +void * +pcre_memmove(unsigned char *dest, const unsigned char *src, size_t n) +{ +int i; +dest += n; +src += n; +for (i = 0; i < n; ++i) *(--dest) = *(--src); +} +#define memmove(a, b, c) pcre_memmove(a, b, c) +#endif /* not HAVE_BCOPY */ +#endif /* not HAVE_MEMMOVE */ +#endif /* not VPCOMPAT */ + + +/* PCRE keeps offsets in its compiled code as 2-byte quantities (always stored +in big-endian order) by default. These are used, for example, to link from the +start of a subpattern to its alternatives and its end. The use of 2 bytes per +offset limits the size of the compiled regex to around 64K, which is big enough +for almost everybody. However, I received a request for an even bigger limit. +For this reason, and also to make the code easier to maintain, the storing and +loading of offsets from the byte string is now handled by the macros that are +defined here. + +The macros are controlled by the value of LINK_SIZE. This defaults to 2 in +the config.h file, but can be overridden by using -D on the command line. This +is automated on Unix systems via the "configure" command. */ + +#if LINK_SIZE == 2 + +#define PUT(a,n,d) \ + (a[n] = (d) >> 8), \ + (a[(n)+1] = (d) & 255) + +#define GET(a,n) \ + (((a)[n] << 8) | (a)[(n)+1]) + +#define MAX_PATTERN_SIZE (1 << 16) + + +#elif LINK_SIZE == 3 + +#define PUT(a,n,d) \ + (a[n] = (d) >> 16), \ + (a[(n)+1] = (d) >> 8), \ + (a[(n)+2] = (d) & 255) + +#define GET(a,n) \ + (((a)[n] << 16) | ((a)[(n)+1] << 8) | (a)[(n)+2]) + +#define MAX_PATTERN_SIZE (1 << 24) + + +#elif LINK_SIZE == 4 + +#define PUT(a,n,d) \ + (a[n] = (d) >> 24), \ + (a[(n)+1] = (d) >> 16), \ + (a[(n)+2] = (d) >> 8), \ + (a[(n)+3] = (d) & 255) + +#define GET(a,n) \ + (((a)[n] << 24) | ((a)[(n)+1] << 16) | ((a)[(n)+2] << 8) | (a)[(n)+3]) + +#define MAX_PATTERN_SIZE (1 << 30) /* Keep it positive */ + + +#else +#error LINK_SIZE must be either 2, 3, or 4 +#endif + + +/* Convenience macro defined in terms of the others */ + +#define PUTINC(a,n,d) PUT(a,n,d), a += LINK_SIZE + + +/* PCRE uses some other 2-byte quantities that do not change when the size of +offsets changes. There are used for repeat counts and for other things such as +capturing parenthesis numbers in back references. */ + +#define PUT2(a,n,d) \ + a[n] = (d) >> 8; \ + a[(n)+1] = (d) & 255 + +#define GET2(a,n) \ + (((a)[n] << 8) | (a)[(n)+1]) + +#define PUT2INC(a,n,d) PUT2(a,n,d), a += 2 + + +/* When UTF-8 encoding is being used, a character is no longer just a single +byte. The macros for character handling generate simple sequences when used in +byte-mode, and more complicated ones for UTF-8 characters. */ + +#ifndef SUPPORT_UTF8 +#define GETCHAR(c, eptr) c = *eptr; +#define GETCHARTEST(c, eptr) c = *eptr; +#define GETCHARINC(c, eptr) c = *eptr++; +#define GETCHARINCTEST(c, eptr) c = *eptr++; +#define GETCHARLEN(c, eptr, len) c = *eptr; +#define BACKCHAR(eptr) + +#else /* SUPPORT_UTF8 */ + +/* Get the next UTF-8 character, not advancing the pointer. This is called when +we know we are in UTF-8 mode. */ + +#define GETCHAR(c, eptr) \ + c = *eptr; \ + if ((c & 0xc0) == 0xc0) \ + { \ + int gcii; \ + int gcaa = _pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ + int gcss = 6*gcaa; \ + c = (c & _pcre_utf8_table3[gcaa]) << gcss; \ + for (gcii = 1; gcii <= gcaa; gcii++) \ + { \ + gcss -= 6; \ + c |= (eptr[gcii] & 0x3f) << gcss; \ + } \ + } + +/* Get the next UTF-8 character, testing for UTF-8 mode, and not advancing the +pointer. */ + +#define GETCHARTEST(c, eptr) \ + c = *eptr; \ + if (utf8 && (c & 0xc0) == 0xc0) \ + { \ + int gcii; \ + int gcaa = _pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ + int gcss = 6*gcaa; \ + c = (c & _pcre_utf8_table3[gcaa]) << gcss; \ + for (gcii = 1; gcii <= gcaa; gcii++) \ + { \ + gcss -= 6; \ + c |= (eptr[gcii] & 0x3f) << gcss; \ + } \ + } + +/* Get the next UTF-8 character, advancing the pointer. This is called when we +know we are in UTF-8 mode. */ + +#define GETCHARINC(c, eptr) \ + c = *eptr++; \ + if ((c & 0xc0) == 0xc0) \ + { \ + int gcaa = _pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ + int gcss = 6*gcaa; \ + c = (c & _pcre_utf8_table3[gcaa]) << gcss; \ + while (gcaa-- > 0) \ + { \ + gcss -= 6; \ + c |= (*eptr++ & 0x3f) << gcss; \ + } \ + } + +/* Get the next character, testing for UTF-8 mode, and advancing the pointer */ + +#define GETCHARINCTEST(c, eptr) \ + c = *eptr++; \ + if (utf8 && (c & 0xc0) == 0xc0) \ + { \ + int gcaa = _pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ + int gcss = 6*gcaa; \ + c = (c & _pcre_utf8_table3[gcaa]) << gcss; \ + while (gcaa-- > 0) \ + { \ + gcss -= 6; \ + c |= (*eptr++ & 0x3f) << gcss; \ + } \ + } + +/* Get the next UTF-8 character, not advancing the pointer, incrementing length +if there are extra bytes. This is called when we know we are in UTF-8 mode. */ + +#define GETCHARLEN(c, eptr, len) \ + c = *eptr; \ + if ((c & 0xc0) == 0xc0) \ + { \ + int gcii; \ + int gcaa = _pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ + int gcss = 6*gcaa; \ + c = (c & _pcre_utf8_table3[gcaa]) << gcss; \ + for (gcii = 1; gcii <= gcaa; gcii++) \ + { \ + gcss -= 6; \ + c |= (eptr[gcii] & 0x3f) << gcss; \ + } \ + len += gcaa; \ + } + +/* If the pointer is not at the start of a character, move it back until +it is. Called only in UTF-8 mode. */ + +#define BACKCHAR(eptr) while((*eptr & 0xc0) == 0x80) eptr--; + +#endif + + +/* In case there is no definition of offsetof() provided - though any proper +Standard C system should have one. */ + +#ifndef offsetof +#define offsetof(p_type,field) ((size_t)&(((p_type *)0)->field)) +#endif + + +/* These are the public options that can change during matching. */ + +#define PCRE_IMS (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL) + +/* Private options flags start at the most significant end of the four bytes, +but skip the top bit so we can use ints for convenience without getting tangled +with negative values. The public options defined in pcre.h start at the least +significant end. Make sure they don't overlap! */ + +#define PCRE_FIRSTSET 0x40000000 /* first_byte is set */ +#define PCRE_REQCHSET 0x20000000 /* req_byte is set */ +#define PCRE_STARTLINE 0x10000000 /* start after \n for multiline */ +#define PCRE_ICHANGED 0x08000000 /* i option changes within regex */ +#define PCRE_NOPARTIAL 0x04000000 /* can't use partial with this regex */ + +/* Options for the "extra" block produced by pcre_study(). */ + +#define PCRE_STUDY_MAPPED 0x01 /* a map of starting chars exists */ + +/* Masks for identifying the public options that are permitted at compile +time, run time, or study time, respectively. */ + +#define PUBLIC_OPTIONS \ + (PCRE_CASELESS|PCRE_EXTENDED|PCRE_ANCHORED|PCRE_MULTILINE| \ + PCRE_DOTALL|PCRE_DOLLAR_ENDONLY|PCRE_EXTRA|PCRE_UNGREEDY|PCRE_UTF8| \ + PCRE_NO_AUTO_CAPTURE|PCRE_NO_UTF8_CHECK|PCRE_AUTO_CALLOUT|PCRE_FIRSTLINE) + +#define PUBLIC_EXEC_OPTIONS \ + (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NO_UTF8_CHECK| \ + PCRE_PARTIAL) + +#define PUBLIC_DFA_EXEC_OPTIONS \ + (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NO_UTF8_CHECK| \ + PCRE_PARTIAL|PCRE_DFA_SHORTEST|PCRE_DFA_RESTART) + +#define PUBLIC_STUDY_OPTIONS 0 /* None defined */ + +/* Magic number to provide a small check against being handed junk. Also used +to detect whether a pattern was compiled on a host of different endianness. */ + +#define MAGIC_NUMBER 0x50435245UL /* 'PCRE' */ + +/* Negative values for the firstchar and reqchar variables */ + +#define REQ_UNSET (-2) +#define REQ_NONE (-1) + +/* The maximum remaining length of subject we are prepared to search for a +req_byte match. */ + +#define REQ_BYTE_MAX 1000 + +/* Flags added to firstbyte or reqbyte; a "non-literal" item is either a +variable-length repeat, or a anything other than literal characters. */ + +#define REQ_CASELESS 0x0100 /* indicates caselessness */ +#define REQ_VARY 0x0200 /* reqbyte followed non-literal item */ + +/* Miscellaneous definitions */ + +typedef int BOOL; + +#define FALSE 0 +#define TRUE 1 + +/* Escape items that are just an encoding of a particular data value. Note that +ESC_n is defined as yet another macro, which is set in config.h to either \n +(the default) or \r (which some people want). */ + +#ifndef ESC_e +#define ESC_e 27 +#endif + +#ifndef ESC_f +#define ESC_f '\f' +#endif + +#ifndef ESC_n +#define ESC_n NEWLINE +#endif + +#ifndef ESC_r +#define ESC_r '\r' +#endif + +/* We can't officially use ESC_t because it is a POSIX reserved identifier +(presumably because of all the others like size_t). */ + +#ifndef ESC_tee +#define ESC_tee '\t' +#endif + +/* These are escaped items that aren't just an encoding of a particular data +value such as \n. They must have non-zero values, as check_escape() returns +their negation. Also, they must appear in the same order as in the opcode +definitions below, up to ESC_z. There's a dummy for OP_ANY because it +corresponds to "." rather than an escape sequence. The final one must be +ESC_REF as subsequent values are used for \1, \2, \3, etc. There is are two +tests in the code for an escape greater than ESC_b and less than ESC_Z to +detect the types that may be repeated. These are the types that consume +characters. If any new escapes are put in between that don't consume a +character, that code will have to change. */ + +enum { ESC_A = 1, ESC_G, ESC_B, ESC_b, ESC_D, ESC_d, ESC_S, ESC_s, ESC_W, + ESC_w, ESC_dum1, ESC_C, ESC_P, ESC_p, ESC_X, ESC_Z, ESC_z, ESC_E, + ESC_Q, ESC_REF }; + +/* Flag bits and data types for the extended class (OP_XCLASS) for classes that +contain UTF-8 characters with values greater than 255. */ + +#define XCL_NOT 0x01 /* Flag: this is a negative class */ +#define XCL_MAP 0x02 /* Flag: a 32-byte map is present */ + +#define XCL_END 0 /* Marks end of individual items */ +#define XCL_SINGLE 1 /* Single item (one multibyte char) follows */ +#define XCL_RANGE 2 /* A range (two multibyte chars) follows */ +#define XCL_PROP 3 /* Unicode property (one property code) follows */ +#define XCL_NOTPROP 4 /* Unicode inverted property (ditto) */ + + +/* Opcode table: OP_BRA must be last, as all values >= it are used for brackets +that extract substrings. Starting from 1 (i.e. after OP_END), the values up to +OP_EOD must correspond in order to the list of escapes immediately above. +Note that whenever this list is updated, the two macro definitions that follow +must also be updated to match. */ + +enum { + OP_END, /* 0 End of pattern */ + + /* Values corresponding to backslashed metacharacters */ + + OP_SOD, /* 1 Start of data: \A */ + OP_SOM, /* 2 Start of match (subject + offset): \G */ + OP_NOT_WORD_BOUNDARY, /* 3 \B */ + OP_WORD_BOUNDARY, /* 4 \b */ + OP_NOT_DIGIT, /* 5 \D */ + OP_DIGIT, /* 6 \d */ + OP_NOT_WHITESPACE, /* 7 \S */ + OP_WHITESPACE, /* 8 \s */ + OP_NOT_WORDCHAR, /* 9 \W */ + OP_WORDCHAR, /* 10 \w */ + OP_ANY, /* 11 Match any character */ + OP_ANYBYTE, /* 12 Match any byte (\C); different to OP_ANY for UTF-8 */ + OP_NOTPROP, /* 13 \P (not Unicode property) */ + OP_PROP, /* 14 \p (Unicode property) */ + OP_EXTUNI, /* 15 \X (extended Unicode sequence */ + OP_EODN, /* 16 End of data or \n at end of data: \Z. */ + OP_EOD, /* 17 End of data: \z */ + + OP_OPT, /* 18 Set runtime options */ + OP_CIRC, /* 19 Start of line - varies with multiline switch */ + OP_DOLL, /* 20 End of line - varies with multiline switch */ + OP_CHAR, /* 21 Match one character, casefully */ + OP_CHARNC, /* 22 Match one character, caselessly */ + OP_NOT, /* 23 Match anything but the following char */ + + OP_STAR, /* 24 The maximizing and minimizing versions of */ + OP_MINSTAR, /* 25 all these opcodes must come in pairs, with */ + OP_PLUS, /* 26 the minimizing one second. */ + OP_MINPLUS, /* 27 This first set applies to single characters */ + OP_QUERY, /* 28 */ + OP_MINQUERY, /* 29 */ + OP_UPTO, /* 30 From 0 to n matches */ + OP_MINUPTO, /* 31 */ + OP_EXACT, /* 32 Exactly n matches */ + + OP_NOTSTAR, /* 33 The maximizing and minimizing versions of */ + OP_NOTMINSTAR, /* 34 all these opcodes must come in pairs, with */ + OP_NOTPLUS, /* 35 the minimizing one second. */ + OP_NOTMINPLUS, /* 36 This set applies to "not" single characters */ + OP_NOTQUERY, /* 37 */ + OP_NOTMINQUERY, /* 38 */ + OP_NOTUPTO, /* 39 From 0 to n matches */ + OP_NOTMINUPTO, /* 40 */ + OP_NOTEXACT, /* 41 Exactly n matches */ + + OP_TYPESTAR, /* 42 The maximizing and minimizing versions of */ + OP_TYPEMINSTAR, /* 43 all these opcodes must come in pairs, with */ + OP_TYPEPLUS, /* 44 the minimizing one second. These codes must */ + OP_TYPEMINPLUS, /* 45 be in exactly the same order as those above. */ + OP_TYPEQUERY, /* 46 This set applies to character types such as \d */ + OP_TYPEMINQUERY, /* 47 */ + OP_TYPEUPTO, /* 48 From 0 to n matches */ + OP_TYPEMINUPTO, /* 49 */ + OP_TYPEEXACT, /* 50 Exactly n matches */ + + OP_CRSTAR, /* 51 The maximizing and minimizing versions of */ + OP_CRMINSTAR, /* 52 all these opcodes must come in pairs, with */ + OP_CRPLUS, /* 53 the minimizing one second. These codes must */ + OP_CRMINPLUS, /* 54 be in exactly the same order as those above. */ + OP_CRQUERY, /* 55 These are for character classes and back refs */ + OP_CRMINQUERY, /* 56 */ + OP_CRRANGE, /* 57 These are different to the three sets above. */ + OP_CRMINRANGE, /* 58 */ + + OP_CLASS, /* 59 Match a character class, chars < 256 only */ + OP_NCLASS, /* 60 Same, but the bitmap was created from a negative + class - the difference is relevant only when a UTF-8 + character > 255 is encountered. */ + + OP_XCLASS, /* 61 Extended class for handling UTF-8 chars within the + class. This does both positive and negative. */ + + OP_REF, /* 62 Match a back reference */ + OP_RECURSE, /* 63 Match a numbered subpattern (possibly recursive) */ + OP_CALLOUT, /* 64 Call out to external function if provided */ + + OP_ALT, /* 65 Start of alternation */ + OP_KET, /* 66 End of group that doesn't have an unbounded repeat */ + OP_KETRMAX, /* 67 These two must remain together and in this */ + OP_KETRMIN, /* 68 order. They are for groups the repeat for ever. */ + + /* The assertions must come before ONCE and COND */ + + OP_ASSERT, /* 69 Positive lookahead */ + OP_ASSERT_NOT, /* 70 Negative lookahead */ + OP_ASSERTBACK, /* 71 Positive lookbehind */ + OP_ASSERTBACK_NOT, /* 72 Negative lookbehind */ + OP_REVERSE, /* 73 Move pointer back - used in lookbehind assertions */ + + /* ONCE and COND must come after the assertions, with ONCE first, as there's + a test for >= ONCE for a subpattern that isn't an assertion. */ + + OP_ONCE, /* 74 Once matched, don't back up into the subpattern */ + OP_COND, /* 75 Conditional group */ + OP_CREF, /* 76 Used to hold an extraction string number (cond ref) */ + + OP_BRAZERO, /* 77 These two must remain together and in this */ + OP_BRAMINZERO, /* 78 order. */ + + OP_BRANUMBER, /* 79 Used for extracting brackets whose number is greater + than can fit into an opcode. */ + + OP_BRA /* 80 This and greater values are used for brackets that + extract substrings up to EXTRACT_BASIC_MAX. After + that, use is made of OP_BRANUMBER. */ +}; + +/* WARNING WARNING WARNING: There is an implicit assumption in pcre.c and +study.c that all opcodes are less than 128 in value. This makes handling UTF-8 +character sequences easier. */ + +/* The highest extraction number before we have to start using additional +bytes. (Originally PCRE didn't have support for extraction counts highter than +this number.) The value is limited by the number of opcodes left after OP_BRA, +i.e. 255 - OP_BRA. We actually set it a bit lower to leave room for additional +opcodes. */ + +#define EXTRACT_BASIC_MAX 100 + + +/* This macro defines textual names for all the opcodes. These are used only +for debugging. The macro is referenced only in pcre_printint.c. */ + +#define OP_NAME_LIST \ + "End", "\\A", "\\G", "\\B", "\\b", "\\D", "\\d", \ + "\\S", "\\s", "\\W", "\\w", "Any", "Anybyte", \ + "notprop", "prop", "extuni", \ + "\\Z", "\\z", \ + "Opt", "^", "$", "char", "charnc", "not", \ + "*", "*?", "+", "+?", "?", "??", "{", "{", "{", \ + "*", "*?", "+", "+?", "?", "??", "{", "{", "{", \ + "*", "*?", "+", "+?", "?", "??", "{", "{", "{", \ + "*", "*?", "+", "+?", "?", "??", "{", "{", \ + "class", "nclass", "xclass", "Ref", "Recurse", "Callout", \ + "Alt", "Ket", "KetRmax", "KetRmin", "Assert", "Assert not", \ + "AssertB", "AssertB not", "Reverse", "Once", "Cond", "Cond ref",\ + "Brazero", "Braminzero", "Branumber", "Bra" + + +/* This macro defines the length of fixed length operations in the compiled +regex. The lengths are used when searching for specific things, and also in the +debugging printing of a compiled regex. We use a macro so that it can be +defined close to the definitions of the opcodes themselves. + +As things have been extended, some of these are no longer fixed lenths, but are +minima instead. For example, the length of a single-character repeat may vary +in UTF-8 mode. The code that uses this table must know about such things. */ + +#define OP_LENGTHS \ + 1, /* End */ \ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* \A, \G, \B, \B, \D, \d, \S, \s, \W, \w */ \ + 1, 1, /* Any, Anybyte */ \ + 2, 2, 1, /* NOTPROP, PROP, EXTUNI */ \ + 1, 1, 2, 1, 1, /* \Z, \z, Opt, ^, $ */ \ + 2, /* Char - the minimum length */ \ + 2, /* Charnc - the minimum length */ \ + 2, /* not */ \ + /* Positive single-char repeats ** These are */ \ + 2, 2, 2, 2, 2, 2, /* *, *?, +, +?, ?, ?? ** minima in */ \ + 4, 4, 4, /* upto, minupto, exact ** UTF-8 mode */ \ + /* Negative single-char repeats - only for chars < 256 */ \ + 2, 2, 2, 2, 2, 2, /* NOT *, *?, +, +?, ?, ?? */ \ + 4, 4, 4, /* NOT upto, minupto, exact */ \ + /* Positive type repeats */ \ + 2, 2, 2, 2, 2, 2, /* Type *, *?, +, +?, ?, ?? */ \ + 4, 4, 4, /* Type upto, minupto, exact */ \ + /* Character class & ref repeats */ \ + 1, 1, 1, 1, 1, 1, /* *, *?, +, +?, ?, ?? */ \ + 5, 5, /* CRRANGE, CRMINRANGE */ \ + 33, /* CLASS */ \ + 33, /* NCLASS */ \ + 0, /* XCLASS - variable length */ \ + 3, /* REF */ \ + 1+LINK_SIZE, /* RECURSE */ \ + 2+2*LINK_SIZE, /* CALLOUT */ \ + 1+LINK_SIZE, /* Alt */ \ + 1+LINK_SIZE, /* Ket */ \ + 1+LINK_SIZE, /* KetRmax */ \ + 1+LINK_SIZE, /* KetRmin */ \ + 1+LINK_SIZE, /* Assert */ \ + 1+LINK_SIZE, /* Assert not */ \ + 1+LINK_SIZE, /* Assert behind */ \ + 1+LINK_SIZE, /* Assert behind not */ \ + 1+LINK_SIZE, /* Reverse */ \ + 1+LINK_SIZE, /* Once */ \ + 1+LINK_SIZE, /* COND */ \ + 3, /* CREF */ \ + 1, 1, /* BRAZERO, BRAMINZERO */ \ + 3, /* BRANUMBER */ \ + 1+LINK_SIZE /* BRA */ \ + + +/* A magic value for OP_CREF to indicate the "in recursion" condition. */ + +#define CREF_RECURSE 0xffff + +/* Error code numbers. They are given names so that they can more easily be +tracked. */ + +enum { ERR0, ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9, + ERR10, ERR11, ERR12, ERR13, ERR14, ERR15, ERR16, ERR17, ERR18, ERR19, + ERR20, ERR21, ERR22, ERR23, ERR24, ERR25, ERR26, ERR27, ERR28, ERR29, + ERR30, ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39, + ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47 }; + +/* The real format of the start of the pcre block; the index of names and the +code vector run on as long as necessary after the end. We store an explicit +offset to the name table so that if a regex is compiled on one host, saved, and +then run on another where the size of pointers is different, all might still +be well. For the case of compiled-on-4 and run-on-8, we include an extra +pointer that is always NULL. For future-proofing, a few dummy fields were +originally included - even though you can never get this planning right - but +there is only one left now. + +NOTE NOTE NOTE: +Because people can now save and re-use compiled patterns, any additions to this +structure should be made at the end, and something earlier (e.g. a new +flag in the options or one of the dummy fields) should indicate that the new +fields are present. Currently PCRE always sets the dummy fields to zero. +NOTE NOTE NOTE: +*/ + +typedef struct real_pcre { + pcre_uint32 magic_number; + pcre_uint32 size; /* Total that was malloced */ + pcre_uint32 options; + pcre_uint32 dummy1; /* For future use, maybe */ + + pcre_uint16 top_bracket; + pcre_uint16 top_backref; + pcre_uint16 first_byte; + pcre_uint16 req_byte; + pcre_uint16 name_table_offset; /* Offset to name table that follows */ + pcre_uint16 name_entry_size; /* Size of any name items */ + pcre_uint16 name_count; /* Number of name items */ + pcre_uint16 ref_count; /* Reference count */ + + const unsigned char *tables; /* Pointer to tables or NULL for std */ + const unsigned char *nullpad; /* NULL padding */ +} real_pcre; + +/* The format of the block used to store data from pcre_study(). The same +remark (see NOTE above) about extending this structure applies. */ + +typedef struct pcre_study_data { + pcre_uint32 size; /* Total that was malloced */ + pcre_uint32 options; + uschar start_bits[32]; +} pcre_study_data; + +/* Structure for passing "static" information around between the functions +doing the compiling, so that they are thread-safe. */ + +typedef struct compile_data { + const uschar *lcc; /* Points to lower casing table */ + const uschar *fcc; /* Points to case-flipping table */ + const uschar *cbits; /* Points to character type table */ + const uschar *ctypes; /* Points to table of type maps */ + const uschar *start_code; /* The start of the compiled code */ + const uschar *start_pattern; /* The start of the pattern */ + uschar *name_table; /* The name/number table */ + int names_found; /* Number of entries so far */ + int name_entry_size; /* Size of each entry */ + int top_backref; /* Maximum back reference */ + unsigned int backref_map; /* Bitmap of low back refs */ + int req_varyopt; /* "After variable item" flag for reqbyte */ + BOOL nopartial; /* Set TRUE if partial won't work */ +} compile_data; + +/* Structure for maintaining a chain of pointers to the currently incomplete +branches, for testing for left recursion. */ + +typedef struct branch_chain { + struct branch_chain *outer; + uschar *current; +} branch_chain; + +/* Structure for items in a linked list that represents an explicit recursive +call within the pattern. */ + +typedef struct recursion_info { + struct recursion_info *prevrec; /* Previous recursion record (or NULL) */ + int group_num; /* Number of group that was called */ + const uschar *after_call; /* "Return value": points after the call in the expr */ + const uschar *save_start; /* Old value of md->start_match */ + int *offset_save; /* Pointer to start of saved offsets */ + int saved_max; /* Number of saved offsets */ +} recursion_info; + +/* When compiling in a mode that doesn't use recursive calls to match(), +a structure is used to remember local variables on the heap. It is defined in +pcre.c, close to the match() function, so that it is easy to keep it in step +with any changes of local variable. However, the pointer to the current frame +must be saved in some "static" place over a longjmp(). We declare the +structure here so that we can put a pointer in the match_data structure. +NOTE: This isn't used for a "normal" compilation of pcre. */ + +struct heapframe; + +/* Structure for passing "static" information around between the functions +doing traditional NFA matching, so that they are thread-safe. */ + +typedef struct match_data { + unsigned long int match_call_count; /* As it says */ + unsigned long int match_limit;/* As it says */ + int *offset_vector; /* Offset vector */ + int offset_end; /* One past the end */ + int offset_max; /* The maximum usable for return data */ + const uschar *lcc; /* Points to lower casing table */ + const uschar *ctypes; /* Points to table of type maps */ + BOOL offset_overflow; /* Set if too many extractions */ + BOOL notbol; /* NOTBOL flag */ + BOOL noteol; /* NOTEOL flag */ + BOOL utf8; /* UTF8 flag */ + BOOL endonly; /* Dollar not before final \n */ + BOOL notempty; /* Empty string match not wanted */ + BOOL partial; /* PARTIAL flag */ + BOOL hitend; /* Hit the end of the subject at some point */ + const uschar *start_code; /* For use when recursing */ + const uschar *start_subject; /* Start of the subject string */ + const uschar *end_subject; /* End of the subject string */ + const uschar *start_match; /* Start of this match attempt */ + const uschar *end_match_ptr; /* Subject position at end match */ + int end_offset_top; /* Highwater mark at end of match */ + int capture_last; /* Most recent capture number */ + int start_offset; /* The start offset value */ + recursion_info *recursive; /* Linked list of recursion data */ + void *callout_data; /* To pass back to callouts */ + struct heapframe *thisframe; /* Used only when compiling for no recursion */ +} match_data; + +/* A similar structure is used for the same purpose by the DFA matching +functions. */ + +typedef struct dfa_match_data { + const uschar *start_code; /* Start of the compiled pattern */ + const uschar *start_subject; /* Start of the subject string */ + const uschar *end_subject; /* End of subject string */ + const uschar *tables; /* Character tables */ + int moptions; /* Match options */ + int poptions; /* Pattern options */ + void *callout_data; /* To pass back to callouts */ +} dfa_match_data; + +/* Bit definitions for entries in the pcre_ctypes table. */ + +#define ctype_space 0x01 +#define ctype_letter 0x02 +#define ctype_digit 0x04 +#define ctype_xdigit 0x08 +#define ctype_word 0x10 /* alphameric or '_' */ +#define ctype_meta 0x80 /* regexp meta char or zero (end pattern) */ + +/* Offsets for the bitmap tables in pcre_cbits. Each table contains a set +of bits for a class map. Some classes are built by combining these tables. */ + +#define cbit_space 0 /* [:space:] or \s */ +#define cbit_xdigit 32 /* [:xdigit:] */ +#define cbit_digit 64 /* [:digit:] or \d */ +#define cbit_upper 96 /* [:upper:] */ +#define cbit_lower 128 /* [:lower:] */ +#define cbit_word 160 /* [:word:] or \w */ +#define cbit_graph 192 /* [:graph:] */ +#define cbit_print 224 /* [:print:] */ +#define cbit_punct 256 /* [:punct:] */ +#define cbit_cntrl 288 /* [:cntrl:] */ +#define cbit_length 320 /* Length of the cbits table */ + +/* Offsets of the various tables from the base tables pointer, and +total length. */ + +#define lcc_offset 0 +#define fcc_offset 256 +#define cbits_offset 512 +#define ctypes_offset (cbits_offset + cbit_length) +#define tables_length (ctypes_offset + 256) + +/* Layout of the UCP type table that translates property names into codes for +ucp_findchar(). */ + +typedef struct { + const char *name; + int value; +} ucp_type_table; + + +/* Internal shared data tables. These are tables that are used by more than one +of the exported public functions. They have to be "external" in the C sense, +but are not part of the PCRE public API. The data for these tables is in the +pcre_tables.c module. */ + +extern const int _pcre_utf8_table1[]; +extern const int _pcre_utf8_table2[]; +extern const int _pcre_utf8_table3[]; +extern const uschar _pcre_utf8_table4[]; + +extern const int _pcre_utf8_table1_size; + +extern const ucp_type_table _pcre_utt[]; +extern const int _pcre_utt_size; + +extern const uschar _pcre_default_tables[]; + +extern const uschar _pcre_OP_lengths[]; + + +/* Internal shared functions. These are functions that are used by more than +one of the exported public functions. They have to be "external" in the C +sense, but are not part of the PCRE public API. */ + +extern int _pcre_ord2utf8(int, uschar *); +extern void _pcre_printint(pcre *, FILE *); +extern real_pcre * _pcre_try_flipped(const real_pcre *, real_pcre *, + const pcre_study_data *, pcre_study_data *); +extern int _pcre_ucp_findchar(const int, int *, int *); +extern int _pcre_valid_utf8(const uschar *, int); +extern BOOL _pcre_xclass(int, const uschar *); + +/* End of pcre_internal.h */ + + +/************************************************* +* Code parameters and static tables * +*************************************************/ + +/* Maximum number of items on the nested bracket stacks at compile time. This +applies to the nesting of all kinds of parentheses. It does not limit +un-nested, non-capturing parentheses. This number can be made bigger if +necessary - it is used to dimension one int and one unsigned char vector at +compile time. */ + +#define BRASTACK_SIZE 200 + + +/* Table for handling escaped characters in the range '0'-'z'. Positive returns +are simple data values; negative values are for special things like \d and so +on. Zero means further processing is needed (for things like \x), or the escape +is invalid. */ + +#if !EBCDIC /* This is the "normal" table for ASCII systems */ +static const short int escapes[] = { + 0, 0, 0, 0, 0, 0, 0, 0, /* 0 - 7 */ + 0, 0, ':', ';', '<', '=', '>', '?', /* 8 - ? */ + '@', -ESC_A, -ESC_B, -ESC_C, -ESC_D, -ESC_E, 0, -ESC_G, /* @ - G */ + 0, 0, 0, 0, 0, 0, 0, 0, /* H - O */ +-ESC_P, -ESC_Q, 0, -ESC_S, 0, 0, 0, -ESC_W, /* P - W */ +-ESC_X, 0, -ESC_Z, '[', '\\', ']', '^', '_', /* X - _ */ + '`', 7, -ESC_b, 0, -ESC_d, ESC_e, ESC_f, 0, /* ` - g */ + 0, 0, 0, 0, 0, 0, ESC_n, 0, /* h - o */ +-ESC_p, 0, ESC_r, -ESC_s, ESC_tee, 0, 0, -ESC_w, /* p - w */ + 0, 0, -ESC_z /* x - z */ +}; + +#else /* This is the "abnormal" table for EBCDIC systems */ +static const short int escapes[] = { +/* 48 */ 0, 0, 0, '.', '<', '(', '+', '|', +/* 50 */ '&', 0, 0, 0, 0, 0, 0, 0, +/* 58 */ 0, 0, '!', '$', '*', ')', ';', '~', +/* 60 */ '-', '/', 0, 0, 0, 0, 0, 0, +/* 68 */ 0, 0, '|', ',', '%', '_', '>', '?', +/* 70 */ 0, 0, 0, 0, 0, 0, 0, 0, +/* 78 */ 0, '`', ':', '#', '@', '\'', '=', '"', +/* 80 */ 0, 7, -ESC_b, 0, -ESC_d, ESC_e, ESC_f, 0, +/* 88 */ 0, 0, 0, '{', 0, 0, 0, 0, +/* 90 */ 0, 0, 0, 'l', 0, ESC_n, 0, -ESC_p, +/* 98 */ 0, ESC_r, 0, '}', 0, 0, 0, 0, +/* A0 */ 0, '~', -ESC_s, ESC_tee, 0, 0, -ESC_w, 0, +/* A8 */ 0,-ESC_z, 0, 0, 0, '[', 0, 0, +/* B0 */ 0, 0, 0, 0, 0, 0, 0, 0, +/* B8 */ 0, 0, 0, 0, 0, ']', '=', '-', +/* C0 */ '{',-ESC_A, -ESC_B, -ESC_C, -ESC_D,-ESC_E, 0, -ESC_G, +/* C8 */ 0, 0, 0, 0, 0, 0, 0, 0, +/* D0 */ '}', 0, 0, 0, 0, 0, 0, -ESC_P, +/* D8 */-ESC_Q, 0, 0, 0, 0, 0, 0, 0, +/* E0 */ '\\', 0, -ESC_S, 0, 0, 0, -ESC_W, -ESC_X, +/* E8 */ 0,-ESC_Z, 0, 0, 0, 0, 0, 0, +/* F0 */ 0, 0, 0, 0, 0, 0, 0, 0, +/* F8 */ 0, 0, 0, 0, 0, 0, 0, 0 +}; +#endif + + +/* Tables of names of POSIX character classes and their lengths. The list is +terminated by a zero length entry. The first three must be alpha, upper, lower, +as this is assumed for handling case independence. */ + +static const char *const posix_names[] = { + "alpha", "lower", "upper", + "alnum", "ascii", "blank", "cntrl", "digit", "graph", + "print", "punct", "space", "word", "xdigit" }; + +static const uschar posix_name_lengths[] = { + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 6, 0 }; + +/* Table of class bit maps for each POSIX class; up to three may be combined +to form the class. The table for [:blank:] is dynamically modified to remove +the vertical space characters. */ + +static const int posix_class_maps[] = { + cbit_lower, cbit_upper, -1, /* alpha */ + cbit_lower, -1, -1, /* lower */ + cbit_upper, -1, -1, /* upper */ + cbit_digit, cbit_lower, cbit_upper, /* alnum */ + cbit_print, cbit_cntrl, -1, /* ascii */ + cbit_space, -1, -1, /* blank - a GNU extension */ + cbit_cntrl, -1, -1, /* cntrl */ + cbit_digit, -1, -1, /* digit */ + cbit_graph, -1, -1, /* graph */ + cbit_print, -1, -1, /* print */ + cbit_punct, -1, -1, /* punct */ + cbit_space, -1, -1, /* space */ + cbit_word, -1, -1, /* word - a Perl extension */ + cbit_xdigit,-1, -1 /* xdigit */ +}; + + +/* The texts of compile-time error messages. These are "char *" because they +are passed to the outside world. */ + +static const char *error_texts[] = { + "no error", + "\\ at end of pattern", + "\\c at end of pattern", + "unrecognized character follows \\", + "numbers out of order in {} quantifier", + /* 5 */ + "number too big in {} quantifier", + "missing terminating ] for character class", + "invalid escape sequence in character class", + "range out of order in character class", + "nothing to repeat", + /* 10 */ + "operand of unlimited repeat could match the empty string", + "internal error: unexpected repeat", + "unrecognized character after (?", + "POSIX named classes are supported only within a class", + "missing )", + /* 15 */ + "reference to non-existent subpattern", + "erroffset passed as NULL", + "unknown option bit(s) set", + "missing ) after comment", + "parentheses nested too deeply", + /* 20 */ + "regular expression too large", + "failed to get memory", + "unmatched parentheses", + "internal error: code overflow", + "unrecognized character after (?<", + /* 25 */ + "lookbehind assertion is not fixed length", + "malformed number after (?(", + "conditional group contains more than two branches", + "assertion expected after (?(", + "(?R or (?digits must be followed by )", + /* 30 */ + "unknown POSIX class name", + "POSIX collating elements are not supported", + "this version of PCRE is not compiled with PCRE_UTF8 support", + "spare error", + "character value in \\x{...} sequence is too large", + /* 35 */ + "invalid condition (?(0)", + "\\C not allowed in lookbehind assertion", + "PCRE does not support \\L, \\l, \\N, \\U, or \\u", + "number after (?C is > 255", + "closing ) for (?C expected", + /* 40 */ + "recursive call could loop indefinitely", + "unrecognized character after (?P", + "syntax error after (?P", + "two named groups have the same name", + "invalid UTF-8 string", + /* 45 */ + "support for \\P, \\p, and \\X has not been compiled", + "malformed \\P or \\p sequence", + "unknown property name after \\P or \\p" +}; + + +/* Table to identify digits and hex digits. This is used when compiling +patterns. Note that the tables in chartables are dependent on the locale, and +may mark arbitrary characters as digits - but the PCRE compiling code expects +to handle only 0-9, a-z, and A-Z as digits when compiling. That is why we have +a private table here. It costs 256 bytes, but it is a lot faster than doing +character value tests (at least in some simple cases I timed), and in some +applications one wants PCRE to compile efficiently as well as match +efficiently. + +For convenience, we use the same bit definitions as in chartables: + + 0x04 decimal digit + 0x08 hexadecimal digit + +Then we can use ctype_digit and ctype_xdigit in the code. */ + +#if !EBCDIC /* This is the "normal" case, for ASCII systems */ +static const unsigned char digitab[] = + { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 8- 15 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 16- 23 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 24- 31 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* - ' */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* ( - / */ + 0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c, /* 0 - 7 */ + 0x0c,0x0c,0x00,0x00,0x00,0x00,0x00,0x00, /* 8 - ? */ + 0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00, /* @ - G */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* H - O */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* P - W */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* X - _ */ + 0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00, /* ` - g */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* h - o */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* p - w */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* x -127 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 128-135 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 136-143 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 144-151 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 152-159 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 160-167 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 168-175 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 176-183 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 184-191 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 192-199 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 200-207 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 208-215 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 216-223 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 224-231 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 232-239 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 240-247 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/* 248-255 */ + +#else /* This is the "abnormal" case, for EBCDIC systems */ +static const unsigned char digitab[] = + { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 0 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 8- 15 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 16- 23 10 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 24- 31 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 32- 39 20 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 40- 47 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 48- 55 30 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 56- 63 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* - 71 40 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 72- | */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* & - 87 50 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 88- ¬ */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* - -103 60 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 104- ? */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 112-119 70 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 120- " */ + 0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00, /* 128- g 80 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* h -143 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 144- p 90 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* q -159 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 160- x A0 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* y -175 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* ^ -183 B0 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 184-191 */ + 0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00, /* { - G C0 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* H -207 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* } - P D0 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* Q -223 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* \ - X E0 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* Y -239 */ + 0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c, /* 0 - 7 F0 */ + 0x0c,0x0c,0x00,0x00,0x00,0x00,0x00,0x00};/* 8 -255 */ + +static const unsigned char ebcdic_chartab[] = { /* chartable partial dup */ + 0x80,0x00,0x00,0x00,0x00,0x01,0x00,0x00, /* 0- 7 */ + 0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00, /* 8- 15 */ + 0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00, /* 16- 23 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 24- 31 */ + 0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00, /* 32- 39 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 40- 47 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 48- 55 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 56- 63 */ + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* - 71 */ + 0x00,0x00,0x00,0x80,0x00,0x80,0x80,0x80, /* 72- | */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* & - 87 */ + 0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00, /* 88- ¬ */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* - -103 */ + 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x80, /* 104- ? */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 112-119 */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 120- " */ + 0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* 128- g */ + 0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /* h -143 */ + 0x00,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* 144- p */ + 0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /* q -159 */ + 0x00,0x00,0x12,0x12,0x12,0x12,0x12,0x12, /* 160- x */ + 0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /* y -175 */ + 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* ^ -183 */ + 0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00, /* 184-191 */ + 0x80,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* { - G */ + 0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /* H -207 */ + 0x00,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* } - P */ + 0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /* Q -223 */ + 0x00,0x00,0x12,0x12,0x12,0x12,0x12,0x12, /* \ - X */ + 0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /* Y -239 */ + 0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c, /* 0 - 7 */ + 0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,0x00};/* 8 -255 */ +#endif + + +/* Definition to allow mutual recursion */ + +static BOOL + compile_regex(int, int, int *, uschar **, const uschar **, int *, BOOL, int, + int *, int *, branch_chain *, compile_data *); + + + +/************************************************* +* Handle escapes * +*************************************************/ + +/* This function is called when a \ has been encountered. It either returns a +positive value for a simple escape such as \n, or a negative value which +encodes one of the more complicated things such as \d. When UTF-8 is enabled, +a positive value greater than 255 may be returned. On entry, ptr is pointing at +the \. On exit, it is on the final character of the escape sequence. + +Arguments: + ptrptr points to the pattern position pointer + errorcodeptr points to the errorcode variable + bracount number of previous extracting brackets + options the options bits + isclass TRUE if inside a character class + +Returns: zero or positive => a data character + negative => a special escape sequence + on error, errorptr is set +*/ + +static int +check_escape(const uschar **ptrptr, int *errorcodeptr, int bracount, + int options, BOOL isclass) +{ +const uschar *ptr = *ptrptr; +int c, i; + +/* If backslash is at the end of the pattern, it's an error. */ + +c = *(++ptr); +if (c == 0) *errorcodeptr = ERR1; + +/* Non-alphamerics are literals. For digits or letters, do an initial lookup in +a table. A non-zero result is something that can be returned immediately. +Otherwise further processing may be required. */ + +#if !EBCDIC /* ASCII coding */ +else if (c < '0' || c > 'z') {} /* Not alphameric */ +else if ((i = escapes[c - '0']) != 0) c = i; + +#else /* EBCDIC coding */ +else if (c < 'a' || (ebcdic_chartab[c] & 0x0E) == 0) {} /* Not alphameric */ +else if ((i = escapes[c - 0x48]) != 0) c = i; +#endif + +/* Escapes that need further processing, or are illegal. */ + +else + { + const uschar *oldptr; + switch (c) + { + /* A number of Perl escapes are not handled by PCRE. We give an explicit + error. */ + + case 'l': + case 'L': + case 'N': + case 'u': + case 'U': + *errorcodeptr = ERR37; + break; + + /* The handling of escape sequences consisting of a string of digits + starting with one that is not zero is not straightforward. By experiment, + the way Perl works seems to be as follows: + + Outside a character class, the digits are read as a decimal number. If the + number is less than 10, or if there are that many previous extracting + left brackets, then it is a back reference. Otherwise, up to three octal + digits are read to form an escaped byte. Thus \123 is likely to be octal + 123 (cf \0123, which is octal 012 followed by the literal 3). If the octal + value is greater than 377, the least significant 8 bits are taken. Inside a + character class, \ followed by a digit is always an octal number. */ + + case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + + if (!isclass) + { + oldptr = ptr; + c -= '0'; + while ((digitab[ptr[1]] & ctype_digit) != 0) + c = c * 10 + *(++ptr) - '0'; + if (c < 10 || c <= bracount) + { + c = -(ESC_REF + c); + break; + } + ptr = oldptr; /* Put the pointer back and fall through */ + } + + /* Handle an octal number following \. If the first digit is 8 or 9, Perl + generates a binary zero byte and treats the digit as a following literal. + Thus we have to pull back the pointer by one. */ + + if ((c = *ptr) >= '8') + { + ptr--; + c = 0; + break; + } + + /* \0 always starts an octal number, but we may drop through to here with a + larger first octal digit. */ + + case '0': + c -= '0'; + while(i++ < 2 && ptr[1] >= '0' && ptr[1] <= '7') + c = c * 8 + *(++ptr) - '0'; + c &= 255; /* Take least significant 8 bits */ + break; + + /* \x is complicated when UTF-8 is enabled. \x{ddd} is a character number + which can be greater than 0xff, but only if the ddd are hex digits. */ + + case 'x': +#ifdef SUPPORT_UTF8 + if (ptr[1] == '{' && (options & PCRE_UTF8) != 0) + { + const uschar *pt = ptr + 2; + register int count = 0; + c = 0; + while ((digitab[*pt] & ctype_xdigit) != 0) + { + int cc = *pt++; + count++; +#if !EBCDIC /* ASCII coding */ + if (cc >= 'a') cc -= 32; /* Convert to upper case */ + c = c * 16 + cc - ((cc < 'A')? '0' : ('A' - 10)); +#else /* EBCDIC coding */ + if (cc >= 'a' && cc <= 'z') cc += 64; /* Convert to upper case */ + c = c * 16 + cc - ((cc >= '0')? '0' : ('A' - 10)); +#endif + } + if (*pt == '}') + { + if (c < 0 || count > 8) *errorcodeptr = ERR34; + ptr = pt; + break; + } + /* If the sequence of hex digits does not end with '}', then we don't + recognize this construct; fall through to the normal \x handling. */ + } +#endif + + /* Read just a single hex char */ + + c = 0; + while (i++ < 2 && (digitab[ptr[1]] & ctype_xdigit) != 0) + { + int cc; /* Some compilers don't like ++ */ + cc = *(++ptr); /* in initializers */ +#if !EBCDIC /* ASCII coding */ + if (cc >= 'a') cc -= 32; /* Convert to upper case */ + c = c * 16 + cc - ((cc < 'A')? '0' : ('A' - 10)); +#else /* EBCDIC coding */ + if (cc <= 'z') cc += 64; /* Convert to upper case */ + c = c * 16 + cc - ((cc >= '0')? '0' : ('A' - 10)); +#endif + } + break; + + /* Other special escapes not starting with a digit are straightforward */ + + case 'c': + c = *(++ptr); + if (c == 0) + { + *errorcodeptr = ERR2; + return 0; + } + + /* A letter is upper-cased; then the 0x40 bit is flipped. This coding + is ASCII-specific, but then the whole concept of \cx is ASCII-specific. + (However, an EBCDIC equivalent has now been added.) */ + +#if !EBCDIC /* ASCII coding */ + if (c >= 'a' && c <= 'z') c -= 32; + c ^= 0x40; +#else /* EBCDIC coding */ + if (c >= 'a' && c <= 'z') c += 64; + c ^= 0xC0; +#endif + break; + + /* PCRE_EXTRA enables extensions to Perl in the matter of escapes. Any + other alphameric following \ is an error if PCRE_EXTRA was set; otherwise, + for Perl compatibility, it is a literal. This code looks a bit odd, but + there used to be some cases other than the default, and there may be again + in future, so I haven't "optimized" it. */ + + default: + if ((options & PCRE_EXTRA) != 0) switch(c) + { + default: + *errorcodeptr = ERR3; + break; + } + break; + } + } + +*ptrptr = ptr; +return c; +} + + + +#ifdef SUPPORT_UCP +/************************************************* +* Handle \P and \p * +*************************************************/ + +/* This function is called after \P or \p has been encountered, provided that +PCRE is compiled with support for Unicode properties. On entry, ptrptr is +pointing at the P or p. On exit, it is pointing at the final character of the +escape sequence. + +Argument: + ptrptr points to the pattern position pointer + negptr points to a boolean that is set TRUE for negation else FALSE + errorcodeptr points to the error code variable + +Returns: value from ucp_type_table, or -1 for an invalid type +*/ + +static int +get_ucp(const uschar **ptrptr, BOOL *negptr, int *errorcodeptr) +{ +int c, i, bot, top; +const uschar *ptr = *ptrptr; +char name[4]; + +c = *(++ptr); +if (c == 0) goto ERROR_RETURN; + +*negptr = FALSE; + +/* \P or \p can be followed by a one- or two-character name in {}, optionally +preceded by ^ for negation. */ + +if (c == '{') + { + if (ptr[1] == '^') + { + *negptr = TRUE; + ptr++; + } + for (i = 0; i <= 2; i++) + { + c = *(++ptr); + if (c == 0) goto ERROR_RETURN; + if (c == '}') break; + name[i] = c; + } + if (c !='}') /* Try to distinguish error cases */ + { + while (*(++ptr) != 0 && *ptr != '}'); + if (*ptr == '}') goto UNKNOWN_RETURN; else goto ERROR_RETURN; + } + name[i] = 0; + } + +/* Otherwise there is just one following character */ + +else + { + name[0] = c; + name[1] = 0; + } + +*ptrptr = ptr; + +/* Search for a recognized property name using binary chop */ + +bot = 0; +top = _pcre_utt_size; + +while (bot < top) + { + i = (bot + top)/2; + c = strcmp(name, _pcre_utt[i].name); + if (c == 0) return _pcre_utt[i].value; + if (c > 0) bot = i + 1; else top = i; + } + +UNKNOWN_RETURN: +*errorcodeptr = ERR47; +*ptrptr = ptr; +return -1; + +ERROR_RETURN: +*errorcodeptr = ERR46; +*ptrptr = ptr; +return -1; +} +#endif + + + + +/************************************************* +* Check for counted repeat * +*************************************************/ + +/* This function is called when a '{' is encountered in a place where it might +start a quantifier. It looks ahead to see if it really is a quantifier or not. +It is only a quantifier if it is one of the forms {ddd} {ddd,} or {ddd,ddd} +where the ddds are digits. + +Arguments: + p pointer to the first char after '{' + +Returns: TRUE or FALSE +*/ + +static BOOL +is_counted_repeat(const uschar *p) +{ +if ((digitab[*p++] & ctype_digit) == 0) return FALSE; +while ((digitab[*p] & ctype_digit) != 0) p++; +if (*p == '}') return TRUE; + +if (*p++ != ',') return FALSE; +if (*p == '}') return TRUE; + +if ((digitab[*p++] & ctype_digit) == 0) return FALSE; +while ((digitab[*p] & ctype_digit) != 0) p++; + +return (*p == '}'); +} + + + +/************************************************* +* Read repeat counts * +*************************************************/ + +/* Read an item of the form {n,m} and return the values. This is called only +after is_counted_repeat() has confirmed that a repeat-count quantifier exists, +so the syntax is guaranteed to be correct, but we need to check the values. + +Arguments: + p pointer to first char after '{' + minp pointer to int for min + maxp pointer to int for max + returned as -1 if no max + errorcodeptr points to error code variable + +Returns: pointer to '}' on success; + current ptr on error, with errorcodeptr set non-zero +*/ + +static const uschar * +read_repeat_counts(const uschar *p, int *minp, int *maxp, int *errorcodeptr) +{ +int min = 0; +int max = -1; + +/* Read the minimum value and do a paranoid check: a negative value indicates +an integer overflow. */ + +while ((digitab[*p] & ctype_digit) != 0) min = min * 10 + *p++ - '0'; +if (min < 0 || min > 65535) + { + *errorcodeptr = ERR5; + return p; + } + +/* Read the maximum value if there is one, and again do a paranoid on its size. +Also, max must not be less than min. */ + +if (*p == '}') max = min; else + { + if (*(++p) != '}') + { + max = 0; + while((digitab[*p] & ctype_digit) != 0) max = max * 10 + *p++ - '0'; + if (max < 0 || max > 65535) + { + *errorcodeptr = ERR5; + return p; + } + if (max < min) + { + *errorcodeptr = ERR4; + return p; + } + } + } + +/* Fill in the required variables, and pass back the pointer to the terminating +'}'. */ + +*minp = min; +*maxp = max; +return p; +} + + + +/************************************************* +* Find first significant op code * +*************************************************/ + +/* This is called by several functions that scan a compiled expression looking +for a fixed first character, or an anchoring op code etc. It skips over things +that do not influence this. For some calls, a change of option is important. +For some calls, it makes sense to skip negative forward and all backward +assertions, and also the \b assertion; for others it does not. + +Arguments: + code pointer to the start of the group + options pointer to external options + optbit the option bit whose changing is significant, or + zero if none are + skipassert TRUE if certain assertions are to be skipped + +Returns: pointer to the first significant opcode +*/ + +static const uschar* +first_significant_code(const uschar *code, int *options, int optbit, + BOOL skipassert) +{ +for (;;) + { + switch ((int)*code) + { + case OP_OPT: + if (optbit > 0 && ((int)code[1] & optbit) != (*options & optbit)) + *options = (int)code[1]; + code += 2; + break; + + case OP_ASSERT_NOT: + case OP_ASSERTBACK: + case OP_ASSERTBACK_NOT: + if (!skipassert) return code; + do code += GET(code, 1); while (*code == OP_ALT); + code += _pcre_OP_lengths[*code]; + break; + + case OP_WORD_BOUNDARY: + case OP_NOT_WORD_BOUNDARY: + if (!skipassert) return code; + /* Fall through */ + + case OP_CALLOUT: + case OP_CREF: + case OP_BRANUMBER: + code += _pcre_OP_lengths[*code]; + break; + + default: + return code; + } + } +/* Control never reaches here */ +} + + + + +/************************************************* +* Find the fixed length of a pattern * +*************************************************/ + +/* Scan a pattern and compute the fixed length of subject that will match it, +if the length is fixed. This is needed for dealing with backward assertions. +In UTF8 mode, the result is in characters rather than bytes. + +Arguments: + code points to the start of the pattern (the bracket) + options the compiling options + +Returns: the fixed length, or -1 if there is no fixed length, + or -2 if \C was encountered +*/ + +static int +find_fixedlength(uschar *code, int options) +{ +int length = -1; + +register int branchlength = 0; +register uschar *cc = code + 1 + LINK_SIZE; + +/* Scan along the opcodes for this branch. If we get to the end of the +branch, check the length against that of the other branches. */ + +for (;;) + { + int d; + register int op = *cc; + if (op >= OP_BRA) op = OP_BRA; + + switch (op) + { + case OP_BRA: + case OP_ONCE: + case OP_COND: + d = find_fixedlength(cc, options); + if (d < 0) return d; + branchlength += d; + do cc += GET(cc, 1); while (*cc == OP_ALT); + cc += 1 + LINK_SIZE; + break; + + /* Reached end of a branch; if it's a ket it is the end of a nested + call. If it's ALT it is an alternation in a nested call. If it is + END it's the end of the outer call. All can be handled by the same code. */ + + case OP_ALT: + case OP_KET: + case OP_KETRMAX: + case OP_KETRMIN: + case OP_END: + if (length < 0) length = branchlength; + else if (length != branchlength) return -1; + if (*cc != OP_ALT) return length; + cc += 1 + LINK_SIZE; + branchlength = 0; + break; + + /* Skip over assertive subpatterns */ + + case OP_ASSERT: + case OP_ASSERT_NOT: + case OP_ASSERTBACK: + case OP_ASSERTBACK_NOT: + do cc += GET(cc, 1); while (*cc == OP_ALT); + /* Fall through */ + + /* Skip over things that don't match chars */ + + case OP_REVERSE: + case OP_BRANUMBER: + case OP_CREF: + case OP_OPT: + case OP_CALLOUT: + case OP_SOD: + case OP_SOM: + case OP_EOD: + case OP_EODN: + case OP_CIRC: + case OP_DOLL: + case OP_NOT_WORD_BOUNDARY: + case OP_WORD_BOUNDARY: + cc += _pcre_OP_lengths[*cc]; + break; + + /* Handle literal characters */ + + case OP_CHAR: + case OP_CHARNC: + branchlength++; + cc += 2; +#ifdef SUPPORT_UTF8 + if ((options & PCRE_UTF8) != 0) + { + while ((*cc & 0xc0) == 0x80) cc++; + } +#endif + break; + + /* Handle exact repetitions. The count is already in characters, but we + need to skip over a multibyte character in UTF8 mode. */ + + case OP_EXACT: + branchlength += GET2(cc,1); + cc += 4; +#ifdef SUPPORT_UTF8 + if ((options & PCRE_UTF8) != 0) + { + while((*cc & 0x80) == 0x80) cc++; + } +#endif + break; + + case OP_TYPEEXACT: + branchlength += GET2(cc,1); + cc += 4; + break; + + /* Handle single-char matchers */ + + case OP_PROP: + case OP_NOTPROP: + cc++; + /* Fall through */ + + case OP_NOT_DIGIT: + case OP_DIGIT: + case OP_NOT_WHITESPACE: + case OP_WHITESPACE: + case OP_NOT_WORDCHAR: + case OP_WORDCHAR: + case OP_ANY: + branchlength++; + cc++; + break; + + /* The single-byte matcher isn't allowed */ + + case OP_ANYBYTE: + return -2; + + /* Check a class for variable quantification */ + +#ifdef SUPPORT_UTF8 + case OP_XCLASS: + cc += GET(cc, 1) - 33; + /* Fall through */ +#endif + + case OP_CLASS: + case OP_NCLASS: + cc += 33; + + switch (*cc) + { + case OP_CRSTAR: + case OP_CRMINSTAR: + case OP_CRQUERY: + case OP_CRMINQUERY: + return -1; + + case OP_CRRANGE: + case OP_CRMINRANGE: + if (GET2(cc,1) != GET2(cc,3)) return -1; + branchlength += GET2(cc,1); + cc += 5; + break; + + default: + branchlength++; + } + break; + + /* Anything else is variable length */ + + default: + return -1; + } + } +/* Control never gets here */ +} + + + + +/************************************************* +* Scan compiled regex for numbered bracket * +*************************************************/ + +/* This little function scans through a compiled pattern until it finds a +capturing bracket with the given number. + +Arguments: + code points to start of expression + utf8 TRUE in UTF-8 mode + number the required bracket number + +Returns: pointer to the opcode for the bracket, or NULL if not found +*/ + +static const uschar * +find_bracket(const uschar *code, BOOL utf8, int number) +{ +#ifndef SUPPORT_UTF8 +utf8 = utf8; /* Stop pedantic compilers complaining */ +#endif + +for (;;) + { + register int c = *code; + if (c == OP_END) return NULL; + else if (c > OP_BRA) + { + int n = c - OP_BRA; + if (n > EXTRACT_BASIC_MAX) n = GET2(code, 2+LINK_SIZE); + if (n == number) return (uschar *)code; + code += _pcre_OP_lengths[OP_BRA]; + } + else + { + code += _pcre_OP_lengths[c]; + +#ifdef SUPPORT_UTF8 + + /* In UTF-8 mode, opcodes that are followed by a character may be followed + by a multi-byte character. The length in the table is a minimum, so we have + to scan along to skip the extra bytes. All opcodes are less than 128, so we + can use relatively efficient code. */ + + if (utf8) switch(c) + { + case OP_CHAR: + case OP_CHARNC: + case OP_EXACT: + case OP_UPTO: + case OP_MINUPTO: + case OP_STAR: + case OP_MINSTAR: + case OP_PLUS: + case OP_MINPLUS: + case OP_QUERY: + case OP_MINQUERY: + while ((*code & 0xc0) == 0x80) code++; + break; + + /* XCLASS is used for classes that cannot be represented just by a bit + map. This includes negated single high-valued characters. The length in + the table is zero; the actual length is stored in the compiled code. */ + + case OP_XCLASS: + code += GET(code, 1) + 1; + break; + } +#endif + } + } +} + + + +/************************************************* +* Scan compiled regex for recursion reference * +*************************************************/ + +/* This little function scans through a compiled pattern until it finds an +instance of OP_RECURSE. + +Arguments: + code points to start of expression + utf8 TRUE in UTF-8 mode + +Returns: pointer to the opcode for OP_RECURSE, or NULL if not found +*/ + +static const uschar * +find_recurse(const uschar *code, BOOL utf8) +{ +#ifndef SUPPORT_UTF8 +utf8 = utf8; /* Stop pedantic compilers complaining */ +#endif + +for (;;) + { + register int c = *code; + if (c == OP_END) return NULL; + else if (c == OP_RECURSE) return code; + else if (c > OP_BRA) + { + code += _pcre_OP_lengths[OP_BRA]; + } + else + { + code += _pcre_OP_lengths[c]; + +#ifdef SUPPORT_UTF8 + + /* In UTF-8 mode, opcodes that are followed by a character may be followed + by a multi-byte character. The length in the table is a minimum, so we have + to scan along to skip the extra bytes. All opcodes are less than 128, so we + can use relatively efficient code. */ + + if (utf8) switch(c) + { + case OP_CHAR: + case OP_CHARNC: + case OP_EXACT: + case OP_UPTO: + case OP_MINUPTO: + case OP_STAR: + case OP_MINSTAR: + case OP_PLUS: + case OP_MINPLUS: + case OP_QUERY: + case OP_MINQUERY: + while ((*code & 0xc0) == 0x80) code++; + break; + + /* XCLASS is used for classes that cannot be represented just by a bit + map. This includes negated single high-valued characters. The length in + the table is zero; the actual length is stored in the compiled code. */ + + case OP_XCLASS: + code += GET(code, 1) + 1; + break; + } +#endif + } + } +} + + + +/************************************************* +* Scan compiled branch for non-emptiness * +*************************************************/ + +/* This function scans through a branch of a compiled pattern to see whether it +can match the empty string or not. It is called only from could_be_empty() +below. Note that first_significant_code() skips over assertions. If we hit an +unclosed bracket, we return "empty" - this means we've struck an inner bracket +whose current branch will already have been scanned. + +Arguments: + code points to start of search + endcode points to where to stop + utf8 TRUE if in UTF8 mode + +Returns: TRUE if what is matched could be empty +*/ + +static BOOL +could_be_empty_branch(const uschar *code, const uschar *endcode, BOOL utf8) +{ +register int c; +for (code = first_significant_code(code + 1 + LINK_SIZE, NULL, 0, TRUE); + code < endcode; + code = first_significant_code(code + _pcre_OP_lengths[c], NULL, 0, TRUE)) + { + const uschar *ccode; + + c = *code; + + if (c >= OP_BRA) + { + BOOL empty_branch; + if (GET(code, 1) == 0) return TRUE; /* Hit unclosed bracket */ + + /* Scan a closed bracket */ + + empty_branch = FALSE; + do + { + if (!empty_branch && could_be_empty_branch(code, endcode, utf8)) + empty_branch = TRUE; + code += GET(code, 1); + } + while (*code == OP_ALT); + if (!empty_branch) return FALSE; /* All branches are non-empty */ + code += 1 + LINK_SIZE; + c = *code; + } + + else switch (c) + { + /* Check for quantifiers after a class */ + +#ifdef SUPPORT_UTF8 + case OP_XCLASS: + ccode = code + GET(code, 1); + goto CHECK_CLASS_REPEAT; +#endif + + case OP_CLASS: + case OP_NCLASS: + ccode = code + 33; + +#ifdef SUPPORT_UTF8 + CHECK_CLASS_REPEAT: +#endif + + switch (*ccode) + { + case OP_CRSTAR: /* These could be empty; continue */ + case OP_CRMINSTAR: + case OP_CRQUERY: + case OP_CRMINQUERY: + break; + + default: /* Non-repeat => class must match */ + case OP_CRPLUS: /* These repeats aren't empty */ + case OP_CRMINPLUS: + return FALSE; + + case OP_CRRANGE: + case OP_CRMINRANGE: + if (GET2(ccode, 1) > 0) return FALSE; /* Minimum > 0 */ + break; + } + break; + + /* Opcodes that must match a character */ + + case OP_PROP: + case OP_NOTPROP: + case OP_EXTUNI: + case OP_NOT_DIGIT: + case OP_DIGIT: + case OP_NOT_WHITESPACE: + case OP_WHITESPACE: + case OP_NOT_WORDCHAR: + case OP_WORDCHAR: + case OP_ANY: + case OP_ANYBYTE: + case OP_CHAR: + case OP_CHARNC: + case OP_NOT: + case OP_PLUS: + case OP_MINPLUS: + case OP_EXACT: + case OP_NOTPLUS: + case OP_NOTMINPLUS: + case OP_NOTEXACT: + case OP_TYPEPLUS: + case OP_TYPEMINPLUS: + case OP_TYPEEXACT: + return FALSE; + + /* End of branch */ + + case OP_KET: + case OP_KETRMAX: + case OP_KETRMIN: + case OP_ALT: + return TRUE; + + /* In UTF-8 mode, STAR, MINSTAR, QUERY, MINQUERY, UPTO, and MINUPTO may be + followed by a multibyte character */ + +#ifdef SUPPORT_UTF8 + case OP_STAR: + case OP_MINSTAR: + case OP_QUERY: + case OP_MINQUERY: + case OP_UPTO: + case OP_MINUPTO: + if (utf8) while ((code[2] & 0xc0) == 0x80) code++; + break; +#endif + } + } + +return TRUE; +} + + + +/************************************************* +* Scan compiled regex for non-emptiness * +*************************************************/ + +/* This function is called to check for left recursive calls. We want to check +the current branch of the current pattern to see if it could match the empty +string. If it could, we must look outwards for branches at other levels, +stopping when we pass beyond the bracket which is the subject of the recursion. + +Arguments: + code points to start of the recursion + endcode points to where to stop (current RECURSE item) + bcptr points to the chain of current (unclosed) branch starts + utf8 TRUE if in UTF-8 mode + +Returns: TRUE if what is matched could be empty +*/ + +static BOOL +could_be_empty(const uschar *code, const uschar *endcode, branch_chain *bcptr, + BOOL utf8) +{ +while (bcptr != NULL && bcptr->current >= code) + { + if (!could_be_empty_branch(bcptr->current, endcode, utf8)) return FALSE; + bcptr = bcptr->outer; + } +return TRUE; +} + + + +/************************************************* +* Check for POSIX class syntax * +*************************************************/ + +/* This function is called when the sequence "[:" or "[." or "[=" is +encountered in a character class. It checks whether this is followed by an +optional ^ and then a sequence of letters, terminated by a matching ":]" or +".]" or "=]". + +Argument: + ptr pointer to the initial [ + endptr where to return the end pointer + cd pointer to compile data + +Returns: TRUE or FALSE +*/ + +static BOOL +check_posix_syntax(const uschar *ptr, const uschar **endptr, compile_data *cd) +{ +int terminator; /* Don't combine these lines; the Solaris cc */ +terminator = *(++ptr); /* compiler warns about "non-constant" initializer. */ +if (*(++ptr) == '^') ptr++; +while ((cd->ctypes[*ptr] & ctype_letter) != 0) ptr++; +if (*ptr == terminator && ptr[1] == ']') + { + *endptr = ptr; + return TRUE; + } +return FALSE; +} + + + + +/************************************************* +* Check POSIX class name * +*************************************************/ + +/* This function is called to check the name given in a POSIX-style class entry +such as [:alnum:]. + +Arguments: + ptr points to the first letter + len the length of the name + +Returns: a value representing the name, or -1 if unknown +*/ + +static int +check_posix_name(const uschar *ptr, int len) +{ +register int yield = 0; +while (posix_name_lengths[yield] != 0) + { + if (len == posix_name_lengths[yield] && + strncmp((const char *)ptr, posix_names[yield], len) == 0) return yield; + yield++; + } +return -1; +} + + +/************************************************* +* Adjust OP_RECURSE items in repeated group * +*************************************************/ + +/* OP_RECURSE items contain an offset from the start of the regex to the group +that is referenced. This means that groups can be replicated for fixed +repetition simply by copying (because the recursion is allowed to refer to +earlier groups that are outside the current group). However, when a group is +optional (i.e. the minimum quantifier is zero), OP_BRAZERO is inserted before +it, after it has been compiled. This means that any OP_RECURSE items within it +that refer to the group itself or any contained groups have to have their +offsets adjusted. That is the job of this function. Before it is called, the +partially compiled regex must be temporarily terminated with OP_END. + +Arguments: + group points to the start of the group + adjust the amount by which the group is to be moved + utf8 TRUE in UTF-8 mode + cd contains pointers to tables etc. + +Returns: nothing +*/ + +static void +adjust_recurse(uschar *group, int adjust, BOOL utf8, compile_data *cd) +{ +uschar *ptr = group; +while ((ptr = (uschar *)find_recurse(ptr, utf8)) != NULL) + { + int offset = GET(ptr, 1); + if (cd->start_code + offset >= group) PUT(ptr, 1, offset + adjust); + ptr += 1 + LINK_SIZE; + } +} + + + +/************************************************* +* Insert an automatic callout point * +*************************************************/ + +/* This function is called when the PCRE_AUTO_CALLOUT option is set, to insert +callout points before each pattern item. + +Arguments: + code current code pointer + ptr current pattern pointer + cd pointers to tables etc + +Returns: new code pointer +*/ + +static uschar * +auto_callout(uschar *code, const uschar *ptr, compile_data *cd) +{ +*code++ = OP_CALLOUT; +*code++ = 255; +PUT(code, 0, ptr - cd->start_pattern); /* Pattern offset */ +PUT(code, LINK_SIZE, 0); /* Default length */ +return code + 2*LINK_SIZE; +} + + + +/************************************************* +* Complete a callout item * +*************************************************/ + +/* A callout item contains the length of the next item in the pattern, which +we can't fill in till after we have reached the relevant point. This is used +for both automatic and manual callouts. + +Arguments: + previous_callout points to previous callout item + ptr current pattern pointer + cd pointers to tables etc + +Returns: nothing +*/ + +static void +complete_callout(uschar *previous_callout, const uschar *ptr, compile_data *cd) +{ +int length = ptr - cd->start_pattern - GET(previous_callout, 2); +PUT(previous_callout, 2 + LINK_SIZE, length); +} + + + +#ifdef SUPPORT_UCP +/************************************************* +* Get othercase range * +*************************************************/ + +/* This function is passed the start and end of a class range, in UTF-8 mode +with UCP support. It searches up the characters, looking for internal ranges of +characters in the "other" case. Each call returns the next one, updating the +start address. + +Arguments: + cptr points to starting character value; updated + d end value + ocptr where to put start of othercase range + odptr where to put end of othercase range + +Yield: TRUE when range returned; FALSE when no more +*/ + +static BOOL +get_othercase_range(int *cptr, int d, int *ocptr, int *odptr) +{ +int c, chartype, othercase, next; + +for (c = *cptr; c <= d; c++) + { + if (_pcre_ucp_findchar(c, &chartype, &othercase) == ucp_L && othercase != 0) + break; + } + +if (c > d) return FALSE; + +*ocptr = othercase; +next = othercase + 1; + +for (++c; c <= d; c++) + { + if (_pcre_ucp_findchar(c, &chartype, &othercase) != ucp_L || + othercase != next) + break; + next++; + } + +*odptr = next - 1; +*cptr = c; + +return TRUE; +} +#endif /* SUPPORT_UCP */ + + +/************************************************* +* Compile one branch * +*************************************************/ + +/* Scan the pattern, compiling it into the code vector. If the options are +changed during the branch, the pointer is used to change the external options +bits. + +Arguments: + optionsptr pointer to the option bits + brackets points to number of extracting brackets used + codeptr points to the pointer to the current code point + ptrptr points to the current pattern pointer + errorcodeptr points to error code variable + firstbyteptr set to initial literal character, or < 0 (REQ_UNSET, REQ_NONE) + reqbyteptr set to the last literal character required, else < 0 + bcptr points to current branch chain + cd contains pointers to tables etc. + +Returns: TRUE on success + FALSE, with *errorcodeptr set non-zero on error +*/ + +static BOOL +compile_branch(int *optionsptr, int *brackets, uschar **codeptr, + const uschar **ptrptr, int *errorcodeptr, int *firstbyteptr, + int *reqbyteptr, branch_chain *bcptr, compile_data *cd) +{ +int repeat_type, op_type; +int repeat_min = 0, repeat_max = 0; /* To please picky compilers */ +int bravalue = 0; +int greedy_default, greedy_non_default; +int firstbyte, reqbyte; +int zeroreqbyte, zerofirstbyte; +int req_caseopt, reqvary, tempreqvary; +int condcount = 0; +int options = *optionsptr; +int after_manual_callout = 0; +register int c; +register uschar *code = *codeptr; +uschar *tempcode; +BOOL inescq = FALSE; +BOOL groupsetfirstbyte = FALSE; +const uschar *ptr = *ptrptr; +const uschar *tempptr; +uschar *previous = NULL; +uschar *previous_callout = NULL; +uschar classbits[32]; + +#ifdef SUPPORT_UTF8 +BOOL class_utf8; +BOOL utf8 = (options & PCRE_UTF8) != 0; +uschar *class_utf8data; +uschar utf8_char[6]; +#else +BOOL utf8 = FALSE; +#endif + +/* Set up the default and non-default settings for greediness */ + +greedy_default = ((options & PCRE_UNGREEDY) != 0); +greedy_non_default = greedy_default ^ 1; + +/* Initialize no first byte, no required byte. REQ_UNSET means "no char +matching encountered yet". It gets changed to REQ_NONE if we hit something that +matches a non-fixed char first char; reqbyte just remains unset if we never +find one. + +When we hit a repeat whose minimum is zero, we may have to adjust these values +to take the zero repeat into account. This is implemented by setting them to +zerofirstbyte and zeroreqbyte when such a repeat is encountered. The individual +item types that can be repeated set these backoff variables appropriately. */ + +firstbyte = reqbyte = zerofirstbyte = zeroreqbyte = REQ_UNSET; + +/* The variable req_caseopt contains either the REQ_CASELESS value or zero, +according to the current setting of the caseless flag. REQ_CASELESS is a bit +value > 255. It is added into the firstbyte or reqbyte variables to record the +case status of the value. This is used only for ASCII characters. */ + +req_caseopt = ((options & PCRE_CASELESS) != 0)? REQ_CASELESS : 0; + +/* Switch on next character until the end of the branch */ + +for (;; ptr++) + { + BOOL negate_class; + BOOL possessive_quantifier; + BOOL is_quantifier; + int class_charcount; + int class_lastchar; + int newoptions; + int recno; + int skipbytes; + int subreqbyte; + int subfirstbyte; + int mclength; + uschar mcbuffer[8]; + + /* Next byte in the pattern */ + + c = *ptr; + + /* If in \Q...\E, check for the end; if not, we have a literal */ + + if (inescq && c != 0) + { + if (c == '\\' && ptr[1] == 'E') + { + inescq = FALSE; + ptr++; + continue; + } + else + { + if (previous_callout != NULL) + { + complete_callout(previous_callout, ptr, cd); + previous_callout = NULL; + } + if ((options & PCRE_AUTO_CALLOUT) != 0) + { + previous_callout = code; + code = auto_callout(code, ptr, cd); + } + goto NORMAL_CHAR; + } + } + + /* Fill in length of a previous callout, except when the next thing is + a quantifier. */ + + is_quantifier = c == '*' || c == '+' || c == '?' || + (c == '{' && is_counted_repeat(ptr+1)); + + if (!is_quantifier && previous_callout != NULL && + after_manual_callout-- <= 0) + { + complete_callout(previous_callout, ptr, cd); + previous_callout = NULL; + } + + /* In extended mode, skip white space and comments */ + + if ((options & PCRE_EXTENDED) != 0) + { + if ((cd->ctypes[c] & ctype_space) != 0) continue; + if (c == '#') + { + /* The space before the ; is to avoid a warning on a silly compiler + on the Macintosh. */ + while ((c = *(++ptr)) != 0 && c != NEWLINE) ; + if (c != 0) continue; /* Else fall through to handle end of string */ + } + } + + /* No auto callout for quantifiers. */ + + if ((options & PCRE_AUTO_CALLOUT) != 0 && !is_quantifier) + { + previous_callout = code; + code = auto_callout(code, ptr, cd); + } + + switch(c) + { + /* The branch terminates at end of string, |, or ). */ + + case 0: + case '|': + case ')': + *firstbyteptr = firstbyte; + *reqbyteptr = reqbyte; + *codeptr = code; + *ptrptr = ptr; + return TRUE; + + /* Handle single-character metacharacters. In multiline mode, ^ disables + the setting of any following char as a first character. */ + + case '^': + if ((options & PCRE_MULTILINE) != 0) + { + if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE; + } + previous = NULL; + *code++ = OP_CIRC; + break; + + case '$': + previous = NULL; + *code++ = OP_DOLL; + break; + + /* There can never be a first char if '.' is first, whatever happens about + repeats. The value of reqbyte doesn't change either. */ + + case '.': + if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE; + zerofirstbyte = firstbyte; + zeroreqbyte = reqbyte; + previous = code; + *code++ = OP_ANY; + break; + + /* Character classes. If the included characters are all < 255 in value, we + build a 32-byte bitmap of the permitted characters, except in the special + case where there is only one such character. For negated classes, we build + the map as usual, then invert it at the end. However, we use a different + opcode so that data characters > 255 can be handled correctly. + + If the class contains characters outside the 0-255 range, a different + opcode is compiled. It may optionally have a bit map for characters < 256, + but those above are are explicitly listed afterwards. A flag byte tells + whether the bitmap is present, and whether this is a negated class or not. + */ + + case '[': + previous = code; + + /* PCRE supports POSIX class stuff inside a class. Perl gives an error if + they are encountered at the top level, so we'll do that too. */ + + if ((ptr[1] == ':' || ptr[1] == '.' || ptr[1] == '=') && + check_posix_syntax(ptr, &tempptr, cd)) + { + *errorcodeptr = (ptr[1] == ':')? ERR13 : ERR31; + goto FAILED; + } + + /* If the first character is '^', set the negation flag and skip it. */ + + if ((c = *(++ptr)) == '^') + { + negate_class = TRUE; + c = *(++ptr); + } + else + { + negate_class = FALSE; + } + + /* Keep a count of chars with values < 256 so that we can optimize the case + of just a single character (as long as it's < 256). For higher valued UTF-8 + characters, we don't yet do any optimization. */ + + class_charcount = 0; + class_lastchar = -1; + +#ifdef SUPPORT_UTF8 + class_utf8 = FALSE; /* No chars >= 256 */ + class_utf8data = code + LINK_SIZE + 34; /* For UTF-8 items */ +#endif + + /* Initialize the 32-char bit map to all zeros. We have to build the + map in a temporary bit of store, in case the class contains only 1 + character (< 256), because in that case the compiled code doesn't use the + bit map. */ + + memset(classbits, 0, 32 * sizeof(uschar)); + + /* Process characters until ] is reached. By writing this as a "do" it + means that an initial ] is taken as a data character. The first pass + through the regex checked the overall syntax, so we don't need to be very + strict here. At the start of the loop, c contains the first byte of the + character. */ + + do + { +#ifdef SUPPORT_UTF8 + if (utf8 && c > 127) + { /* Braces are required because the */ + GETCHARLEN(c, ptr, ptr); /* macro generates multiple statements */ + } +#endif + + /* Inside \Q...\E everything is literal except \E */ + + if (inescq) + { + if (c == '\\' && ptr[1] == 'E') + { + inescq = FALSE; + ptr++; + continue; + } + else goto LONE_SINGLE_CHARACTER; + } + + /* Handle POSIX class names. Perl allows a negation extension of the + form [:^name:]. A square bracket that doesn't match the syntax is + treated as a literal. We also recognize the POSIX constructions + [.ch.] and [=ch=] ("collating elements") and fault them, as Perl + 5.6 and 5.8 do. */ + + if (c == '[' && + (ptr[1] == ':' || ptr[1] == '.' || ptr[1] == '=') && + check_posix_syntax(ptr, &tempptr, cd)) + { + BOOL local_negate = FALSE; + int posix_class, i; + register const uschar *cbits = cd->cbits; + + if (ptr[1] != ':') + { + *errorcodeptr = ERR31; + goto FAILED; + } + + ptr += 2; + if (*ptr == '^') + { + local_negate = TRUE; + ptr++; + } + + posix_class = check_posix_name(ptr, tempptr - ptr); + if (posix_class < 0) + { + *errorcodeptr = ERR30; + goto FAILED; + } + + /* If matching is caseless, upper and lower are converted to + alpha. This relies on the fact that the class table starts with + alpha, lower, upper as the first 3 entries. */ + + if ((options & PCRE_CASELESS) != 0 && posix_class <= 2) + posix_class = 0; + + /* Or into the map we are building up to 3 of the static class + tables, or their negations. The [:blank:] class sets up the same + chars as the [:space:] class (all white space). We remove the vertical + white space chars afterwards. */ + + posix_class *= 3; + for (i = 0; i < 3; i++) + { + BOOL blankclass = strncmp((char *)ptr, "blank", 5) == 0; + int taboffset = posix_class_maps[posix_class + i]; + if (taboffset < 0) break; + if (local_negate) + { + if (i == 0) + for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+taboffset]; + else + for (c = 0; c < 32; c++) classbits[c] &= ~cbits[c+taboffset]; + if (blankclass) classbits[1] |= 0x3c; + } + else + { + for (c = 0; c < 32; c++) classbits[c] |= cbits[c+taboffset]; + if (blankclass) classbits[1] &= ~0x3c; + } + } + + ptr = tempptr + 1; + class_charcount = 10; /* Set > 1; assumes more than 1 per class */ + continue; /* End of POSIX syntax handling */ + } + + /* Backslash may introduce a single character, or it may introduce one + of the specials, which just set a flag. Escaped items are checked for + validity in the pre-compiling pass. The sequence \b is a special case. + Inside a class (and only there) it is treated as backspace. Elsewhere + it marks a word boundary. Other escapes have preset maps ready to + or into the one we are building. We assume they have more than one + character in them, so set class_charcount bigger than one. */ + + if (c == '\\') + { + c = check_escape(&ptr, errorcodeptr, *brackets, options, TRUE); + + if (-c == ESC_b) c = '\b'; /* \b is backslash in a class */ + else if (-c == ESC_X) c = 'X'; /* \X is literal X in a class */ + else if (-c == ESC_Q) /* Handle start of quoted string */ + { + if (ptr[1] == '\\' && ptr[2] == 'E') + { + ptr += 2; /* avoid empty string */ + } + else inescq = TRUE; + continue; + } + + if (c < 0) + { + register const uschar *cbits = cd->cbits; + class_charcount += 2; /* Greater than 1 is what matters */ + switch (-c) + { + case ESC_d: + for (c = 0; c < 32; c++) classbits[c] |= cbits[c+cbit_digit]; + continue; + + case ESC_D: + for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+cbit_digit]; + continue; + + case ESC_w: + for (c = 0; c < 32; c++) classbits[c] |= cbits[c+cbit_word]; + continue; + + case ESC_W: + for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+cbit_word]; + continue; + + case ESC_s: + for (c = 0; c < 32; c++) classbits[c] |= cbits[c+cbit_space]; + classbits[1] &= ~0x08; /* Perl 5.004 onwards omits VT from \s */ + continue; + + case ESC_S: + for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+cbit_space]; + classbits[1] |= 0x08; /* Perl 5.004 onwards omits VT from \s */ + continue; + +#ifdef SUPPORT_UCP + case ESC_p: + case ESC_P: + { + BOOL negated; + int property = get_ucp(&ptr, &negated, errorcodeptr); + if (property < 0) goto FAILED; + class_utf8 = TRUE; + *class_utf8data++ = ((-c == ESC_p) != negated)? + XCL_PROP : XCL_NOTPROP; + *class_utf8data++ = property; + class_charcount -= 2; /* Not a < 256 character */ + } + continue; +#endif + + /* Unrecognized escapes are faulted if PCRE is running in its + strict mode. By default, for compatibility with Perl, they are + treated as literals. */ + + default: + if ((options & PCRE_EXTRA) != 0) + { + *errorcodeptr = ERR7; + goto FAILED; + } + c = *ptr; /* The final character */ + class_charcount -= 2; /* Undo the default count from above */ + } + } + + /* Fall through if we have a single character (c >= 0). This may be + > 256 in UTF-8 mode. */ + + } /* End of backslash handling */ + + /* A single character may be followed by '-' to form a range. However, + Perl does not permit ']' to be the end of the range. A '-' character + here is treated as a literal. */ + + if (ptr[1] == '-' && ptr[2] != ']') + { + int d; + ptr += 2; + +#ifdef SUPPORT_UTF8 + if (utf8) + { /* Braces are required because the */ + GETCHARLEN(d, ptr, ptr); /* macro generates multiple statements */ + } + else +#endif + d = *ptr; /* Not UTF-8 mode */ + + /* The second part of a range can be a single-character escape, but + not any of the other escapes. Perl 5.6 treats a hyphen as a literal + in such circumstances. */ + + if (d == '\\') + { + const uschar *oldptr = ptr; + d = check_escape(&ptr, errorcodeptr, *brackets, options, TRUE); + + /* \b is backslash; \X is literal X; any other special means the '-' + was literal */ + + if (d < 0) + { + if (d == -ESC_b) d = '\b'; + else if (d == -ESC_X) d = 'X'; else + { + ptr = oldptr - 2; + goto LONE_SINGLE_CHARACTER; /* A few lines below */ + } + } + } + + /* The check that the two values are in the correct order happens in + the pre-pass. Optimize one-character ranges */ + + if (d == c) goto LONE_SINGLE_CHARACTER; /* A few lines below */ + + /* In UTF-8 mode, if the upper limit is > 255, or > 127 for caseless + matching, we have to use an XCLASS with extra data items. Caseless + matching for characters > 127 is available only if UCP support is + available. */ + +#ifdef SUPPORT_UTF8 + if (utf8 && (d > 255 || ((options & PCRE_CASELESS) != 0 && d > 127))) + { + class_utf8 = TRUE; + + /* With UCP support, we can find the other case equivalents of + the relevant characters. There may be several ranges. Optimize how + they fit with the basic range. */ + +#ifdef SUPPORT_UCP + if ((options & PCRE_CASELESS) != 0) + { + int occ, ocd; + int cc = c; + int origd = d; + while (get_othercase_range(&cc, origd, &occ, &ocd)) + { + if (occ >= c && ocd <= d) continue; /* Skip embedded ranges */ + + if (occ < c && ocd >= c - 1) /* Extend the basic range */ + { /* if there is overlap, */ + c = occ; /* noting that if occ < c */ + continue; /* we can't have ocd > d */ + } /* because a subrange is */ + if (ocd > d && occ <= d + 1) /* always shorter than */ + { /* the basic range. */ + d = ocd; + continue; + } + + if (occ == ocd) + { + *class_utf8data++ = XCL_SINGLE; + } + else + { + *class_utf8data++ = XCL_RANGE; + class_utf8data += _pcre_ord2utf8(occ, class_utf8data); + } + class_utf8data += _pcre_ord2utf8(ocd, class_utf8data); + } + } +#endif /* SUPPORT_UCP */ + + /* Now record the original range, possibly modified for UCP caseless + overlapping ranges. */ + + *class_utf8data++ = XCL_RANGE; + class_utf8data += _pcre_ord2utf8(c, class_utf8data); + class_utf8data += _pcre_ord2utf8(d, class_utf8data); + + /* With UCP support, we are done. Without UCP support, there is no + caseless matching for UTF-8 characters > 127; we can use the bit map + for the smaller ones. */ + +#ifdef SUPPORT_UCP + continue; /* With next character in the class */ +#else + if ((options & PCRE_CASELESS) == 0 || c > 127) continue; + + /* Adjust upper limit and fall through to set up the map */ + + d = 127; + +#endif /* SUPPORT_UCP */ + } +#endif /* SUPPORT_UTF8 */ + + /* We use the bit map for all cases when not in UTF-8 mode; else + ranges that lie entirely within 0-127 when there is UCP support; else + for partial ranges without UCP support. */ + + for (; c <= d; c++) + { + classbits[c/8] |= (1 << (c&7)); + if ((options & PCRE_CASELESS) != 0) + { + int uc = cd->fcc[c]; /* flip case */ + classbits[uc/8] |= (1 << (uc&7)); + } + class_charcount++; /* in case a one-char range */ + class_lastchar = c; + } + + continue; /* Go get the next char in the class */ + } + + /* Handle a lone single character - we can get here for a normal + non-escape char, or after \ that introduces a single character or for an + apparent range that isn't. */ + + LONE_SINGLE_CHARACTER: + + /* Handle a character that cannot go in the bit map */ + +#ifdef SUPPORT_UTF8 + if (utf8 && (c > 255 || ((options & PCRE_CASELESS) != 0 && c > 127))) + { + class_utf8 = TRUE; + *class_utf8data++ = XCL_SINGLE; + class_utf8data += _pcre_ord2utf8(c, class_utf8data); + +#ifdef SUPPORT_UCP + if ((options & PCRE_CASELESS) != 0) + { + int chartype; + int othercase; + if (_pcre_ucp_findchar(c, &chartype, &othercase) >= 0 && + othercase > 0) + { + *class_utf8data++ = XCL_SINGLE; + class_utf8data += _pcre_ord2utf8(othercase, class_utf8data); + } + } +#endif /* SUPPORT_UCP */ + + } + else +#endif /* SUPPORT_UTF8 */ + + /* Handle a single-byte character */ + { + classbits[c/8] |= (1 << (c&7)); + if ((options & PCRE_CASELESS) != 0) + { + c = cd->fcc[c]; /* flip case */ + classbits[c/8] |= (1 << (c&7)); + } + class_charcount++; + class_lastchar = c; + } + } + + /* Loop until ']' reached; the check for end of string happens inside the + loop. This "while" is the end of the "do" above. */ + + while ((c = *(++ptr)) != ']' || inescq); + + /* If class_charcount is 1, we saw precisely one character whose value is + less than 256. In non-UTF-8 mode we can always optimize. In UTF-8 mode, we + can optimize the negative case only if there were no characters >= 128 + because OP_NOT and the related opcodes like OP_NOTSTAR operate on + single-bytes only. This is an historical hangover. Maybe one day we can + tidy these opcodes to handle multi-byte characters. + + The optimization throws away the bit map. We turn the item into a + 1-character OP_CHAR[NC] if it's positive, or OP_NOT if it's negative. Note + that OP_NOT does not support multibyte characters. In the positive case, it + can cause firstbyte to be set. Otherwise, there can be no first char if + this item is first, whatever repeat count may follow. In the case of + reqbyte, save the previous value for reinstating. */ + +#ifdef SUPPORT_UTF8 + if (class_charcount == 1 && + (!utf8 || + (!class_utf8 && (!negate_class || class_lastchar < 128)))) + +#else + if (class_charcount == 1) +#endif + { + zeroreqbyte = reqbyte; + + /* The OP_NOT opcode works on one-byte characters only. */ + + if (negate_class) + { + if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE; + zerofirstbyte = firstbyte; + *code++ = OP_NOT; + *code++ = class_lastchar; + break; + } + + /* For a single, positive character, get the value into mcbuffer, and + then we can handle this with the normal one-character code. */ + +#ifdef SUPPORT_UTF8 + if (utf8 && class_lastchar > 127) + mclength = _pcre_ord2utf8(class_lastchar, mcbuffer); + else +#endif + { + mcbuffer[0] = class_lastchar; + mclength = 1; + } + goto ONE_CHAR; + } /* End of 1-char optimization */ + + /* The general case - not the one-char optimization. If this is the first + thing in the branch, there can be no first char setting, whatever the + repeat count. Any reqbyte setting must remain unchanged after any kind of + repeat. */ + + if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE; + zerofirstbyte = firstbyte; + zeroreqbyte = reqbyte; + + /* If there are characters with values > 255, we have to compile an + extended class, with its own opcode. If there are no characters < 256, + we can omit the bitmap. */ + +#ifdef SUPPORT_UTF8 + if (class_utf8) + { + *class_utf8data++ = XCL_END; /* Marks the end of extra data */ + *code++ = OP_XCLASS; + code += LINK_SIZE; + *code = negate_class? XCL_NOT : 0; + + /* If the map is required, install it, and move on to the end of + the extra data */ + + if (class_charcount > 0) + { + *code++ |= XCL_MAP; + memcpy(code, classbits, 32); + code = class_utf8data; + } + + /* If the map is not required, slide down the extra data. */ + + else + { + int len = class_utf8data - (code + 33); + memmove(code + 1, code + 33, len); + code += len + 1; + } + + /* Now fill in the complete length of the item */ + + PUT(previous, 1, code - previous); + break; /* End of class handling */ + } +#endif + + /* If there are no characters > 255, negate the 32-byte map if necessary, + and copy it into the code vector. If this is the first thing in the branch, + there can be no first char setting, whatever the repeat count. Any reqbyte + setting must remain unchanged after any kind of repeat. */ + + if (negate_class) + { + *code++ = OP_NCLASS; + for (c = 0; c < 32; c++) code[c] = ~classbits[c]; + } + else + { + *code++ = OP_CLASS; + memcpy(code, classbits, 32); + } + code += 32; + break; + + /* Various kinds of repeat; '{' is not necessarily a quantifier, but this + has been tested above. */ + + case '{': + if (!is_quantifier) goto NORMAL_CHAR; + ptr = read_repeat_counts(ptr+1, &repeat_min, &repeat_max, errorcodeptr); + if (*errorcodeptr != 0) goto FAILED; + goto REPEAT; + + case '*': + repeat_min = 0; + repeat_max = -1; + goto REPEAT; + + case '+': + repeat_min = 1; + repeat_max = -1; + goto REPEAT; + + case '?': + repeat_min = 0; + repeat_max = 1; + + REPEAT: + if (previous == NULL) + { + *errorcodeptr = ERR9; + goto FAILED; + } + + if (repeat_min == 0) + { + firstbyte = zerofirstbyte; /* Adjust for zero repeat */ + reqbyte = zeroreqbyte; /* Ditto */ + } + + /* Remember whether this is a variable length repeat */ + + reqvary = (repeat_min == repeat_max)? 0 : REQ_VARY; + + op_type = 0; /* Default single-char op codes */ + possessive_quantifier = FALSE; /* Default not possessive quantifier */ + + /* Save start of previous item, in case we have to move it up to make space + for an inserted OP_ONCE for the additional '+' extension. */ + + tempcode = previous; + + /* If the next character is '+', we have a possessive quantifier. This + implies greediness, whatever the setting of the PCRE_UNGREEDY option. + If the next character is '?' this is a minimizing repeat, by default, + but if PCRE_UNGREEDY is set, it works the other way round. We change the + repeat type to the non-default. */ + + if (ptr[1] == '+') + { + repeat_type = 0; /* Force greedy */ + possessive_quantifier = TRUE; + ptr++; + } + else if (ptr[1] == '?') + { + repeat_type = greedy_non_default; + ptr++; + } + else repeat_type = greedy_default; + + /* If previous was a recursion, we need to wrap it inside brackets so that + it can be replicated if necessary. */ + + if (*previous == OP_RECURSE) + { + memmove(previous + 1 + LINK_SIZE, previous, 1 + LINK_SIZE); + code += 1 + LINK_SIZE; + *previous = OP_BRA; + PUT(previous, 1, code - previous); + *code = OP_KET; + PUT(code, 1, code - previous); + code += 1 + LINK_SIZE; + } + + /* If previous was a character match, abolish the item and generate a + repeat item instead. If a char item has a minumum of more than one, ensure + that it is set in reqbyte - it might not be if a sequence such as x{3} is + the first thing in a branch because the x will have gone into firstbyte + instead. */ + + if (*previous == OP_CHAR || *previous == OP_CHARNC) + { + /* Deal with UTF-8 characters that take up more than one byte. It's + easier to write this out separately than try to macrify it. Use c to + hold the length of the character in bytes, plus 0x80 to flag that it's a + length rather than a small character. */ + +#ifdef SUPPORT_UTF8 + if (utf8 && (code[-1] & 0x80) != 0) + { + uschar *lastchar = code - 1; + while((*lastchar & 0xc0) == 0x80) lastchar--; + c = code - lastchar; /* Length of UTF-8 character */ + memcpy(utf8_char, lastchar, c); /* Save the char */ + c |= 0x80; /* Flag c as a length */ + } + else +#endif + + /* Handle the case of a single byte - either with no UTF8 support, or + with UTF-8 disabled, or for a UTF-8 character < 128. */ + + { + c = code[-1]; + if (repeat_min > 1) reqbyte = c | req_caseopt | cd->req_varyopt; + } + + goto OUTPUT_SINGLE_REPEAT; /* Code shared with single character types */ + } + + /* If previous was a single negated character ([^a] or similar), we use + one of the special opcodes, replacing it. The code is shared with single- + character repeats by setting opt_type to add a suitable offset into + repeat_type. OP_NOT is currently used only for single-byte chars. */ + + else if (*previous == OP_NOT) + { + op_type = OP_NOTSTAR - OP_STAR; /* Use "not" opcodes */ + c = previous[1]; + goto OUTPUT_SINGLE_REPEAT; + } + + /* If previous was a character type match (\d or similar), abolish it and + create a suitable repeat item. The code is shared with single-character + repeats by setting op_type to add a suitable offset into repeat_type. Note + the the Unicode property types will be present only when SUPPORT_UCP is + defined, but we don't wrap the little bits of code here because it just + makes it horribly messy. */ + + else if (*previous < OP_EODN) + { + uschar *oldcode; + int prop_type; + op_type = OP_TYPESTAR - OP_STAR; /* Use type opcodes */ + c = *previous; + + OUTPUT_SINGLE_REPEAT: + prop_type = (*previous == OP_PROP || *previous == OP_NOTPROP)? + previous[1] : -1; + + oldcode = code; + code = previous; /* Usually overwrite previous item */ + + /* If the maximum is zero then the minimum must also be zero; Perl allows + this case, so we do too - by simply omitting the item altogether. */ + + if (repeat_max == 0) goto END_REPEAT; + + /* All real repeats make it impossible to handle partial matching (maybe + one day we will be able to remove this restriction). */ + + if (repeat_max != 1) cd->nopartial = TRUE; + + /* Combine the op_type with the repeat_type */ + + repeat_type += op_type; + + /* A minimum of zero is handled either as the special case * or ?, or as + an UPTO, with the maximum given. */ + + if (repeat_min == 0) + { + if (repeat_max == -1) *code++ = OP_STAR + repeat_type; + else if (repeat_max == 1) *code++ = OP_QUERY + repeat_type; + else + { + *code++ = OP_UPTO + repeat_type; + PUT2INC(code, 0, repeat_max); + } + } + + /* A repeat minimum of 1 is optimized into some special cases. If the + maximum is unlimited, we use OP_PLUS. Otherwise, the original item it + left in place and, if the maximum is greater than 1, we use OP_UPTO with + one less than the maximum. */ + + else if (repeat_min == 1) + { + if (repeat_max == -1) + *code++ = OP_PLUS + repeat_type; + else + { + code = oldcode; /* leave previous item in place */ + if (repeat_max == 1) goto END_REPEAT; + *code++ = OP_UPTO + repeat_type; + PUT2INC(code, 0, repeat_max - 1); + } + } + + /* The case {n,n} is just an EXACT, while the general case {n,m} is + handled as an EXACT followed by an UPTO. */ + + else + { + *code++ = OP_EXACT + op_type; /* NB EXACT doesn't have repeat_type */ + PUT2INC(code, 0, repeat_min); + + /* If the maximum is unlimited, insert an OP_STAR. Before doing so, + we have to insert the character for the previous code. For a repeated + Unicode property match, there is an extra byte that defines the + required property. In UTF-8 mode, long characters have their length in + c, with the 0x80 bit as a flag. */ + + if (repeat_max < 0) + { +#ifdef SUPPORT_UTF8 + if (utf8 && c >= 128) + { + memcpy(code, utf8_char, c & 7); + code += c & 7; + } + else +#endif + { + *code++ = c; + if (prop_type >= 0) *code++ = prop_type; + } + *code++ = OP_STAR + repeat_type; + } + + /* Else insert an UPTO if the max is greater than the min, again + preceded by the character, for the previously inserted code. */ + + else if (repeat_max != repeat_min) + { +#ifdef SUPPORT_UTF8 + if (utf8 && c >= 128) + { + memcpy(code, utf8_char, c & 7); + code += c & 7; + } + else +#endif + *code++ = c; + if (prop_type >= 0) *code++ = prop_type; + repeat_max -= repeat_min; + *code++ = OP_UPTO + repeat_type; + PUT2INC(code, 0, repeat_max); + } + } + + /* The character or character type itself comes last in all cases. */ + +#ifdef SUPPORT_UTF8 + if (utf8 && c >= 128) + { + memcpy(code, utf8_char, c & 7); + code += c & 7; + } + else +#endif + *code++ = c; + + /* For a repeated Unicode property match, there is an extra byte that + defines the required property. */ + +#ifdef SUPPORT_UCP + if (prop_type >= 0) *code++ = prop_type; +#endif + } + + /* If previous was a character class or a back reference, we put the repeat + stuff after it, but just skip the item if the repeat was {0,0}. */ + + else if (*previous == OP_CLASS || + *previous == OP_NCLASS || +#ifdef SUPPORT_UTF8 + *previous == OP_XCLASS || +#endif + *previous == OP_REF) + { + if (repeat_max == 0) + { + code = previous; + goto END_REPEAT; + } + + /* All real repeats make it impossible to handle partial matching (maybe + one day we will be able to remove this restriction). */ + + if (repeat_max != 1) cd->nopartial = TRUE; + + if (repeat_min == 0 && repeat_max == -1) + *code++ = OP_CRSTAR + repeat_type; + else if (repeat_min == 1 && repeat_max == -1) + *code++ = OP_CRPLUS + repeat_type; + else if (repeat_min == 0 && repeat_max == 1) + *code++ = OP_CRQUERY + repeat_type; + else + { + *code++ = OP_CRRANGE + repeat_type; + PUT2INC(code, 0, repeat_min); + if (repeat_max == -1) repeat_max = 0; /* 2-byte encoding for max */ + PUT2INC(code, 0, repeat_max); + } + } + + /* If previous was a bracket group, we may have to replicate it in certain + cases. */ + + else if (*previous >= OP_BRA || *previous == OP_ONCE || + *previous == OP_COND) + { + register int i; + int ketoffset = 0; + int len = code - previous; + uschar *bralink = NULL; + + /* If the maximum repeat count is unlimited, find the end of the bracket + by scanning through from the start, and compute the offset back to it + from the current code pointer. There may be an OP_OPT setting following + the final KET, so we can't find the end just by going back from the code + pointer. */ + + if (repeat_max == -1) + { + register uschar *ket = previous; + do ket += GET(ket, 1); while (*ket != OP_KET); + ketoffset = code - ket; + } + + /* The case of a zero minimum is special because of the need to stick + OP_BRAZERO in front of it, and because the group appears once in the + data, whereas in other cases it appears the minimum number of times. For + this reason, it is simplest to treat this case separately, as otherwise + the code gets far too messy. There are several special subcases when the + minimum is zero. */ + + if (repeat_min == 0) + { + /* If the maximum is also zero, we just omit the group from the output + altogether. */ + + if (repeat_max == 0) + { + code = previous; + goto END_REPEAT; + } + + /* If the maximum is 1 or unlimited, we just have to stick in the + BRAZERO and do no more at this point. However, we do need to adjust + any OP_RECURSE calls inside the group that refer to the group itself or + any internal group, because the offset is from the start of the whole + regex. Temporarily terminate the pattern while doing this. */ + + if (repeat_max <= 1) + { + *code = OP_END; + adjust_recurse(previous, 1, utf8, cd); + memmove(previous+1, previous, len); + code++; + *previous++ = OP_BRAZERO + repeat_type; + } + + /* If the maximum is greater than 1 and limited, we have to replicate + in a nested fashion, sticking OP_BRAZERO before each set of brackets. + The first one has to be handled carefully because it's the original + copy, which has to be moved up. The remainder can be handled by code + that is common with the non-zero minimum case below. We have to + adjust the value or repeat_max, since one less copy is required. Once + again, we may have to adjust any OP_RECURSE calls inside the group. */ + + else + { + int offset; + *code = OP_END; + adjust_recurse(previous, 2 + LINK_SIZE, utf8, cd); + memmove(previous + 2 + LINK_SIZE, previous, len); + code += 2 + LINK_SIZE; + *previous++ = OP_BRAZERO + repeat_type; + *previous++ = OP_BRA; + + /* We chain together the bracket offset fields that have to be + filled in later when the ends of the brackets are reached. */ + + offset = (bralink == NULL)? 0 : previous - bralink; + bralink = previous; + PUTINC(previous, 0, offset); + } + + repeat_max--; + } + + /* If the minimum is greater than zero, replicate the group as many + times as necessary, and adjust the maximum to the number of subsequent + copies that we need. If we set a first char from the group, and didn't + set a required char, copy the latter from the former. */ + + else + { + if (repeat_min > 1) + { + if (groupsetfirstbyte && reqbyte < 0) reqbyte = firstbyte; + for (i = 1; i < repeat_min; i++) + { + memcpy(code, previous, len); + code += len; + } + } + if (repeat_max > 0) repeat_max -= repeat_min; + } + + /* This code is common to both the zero and non-zero minimum cases. If + the maximum is limited, it replicates the group in a nested fashion, + remembering the bracket starts on a stack. In the case of a zero minimum, + the first one was set up above. In all cases the repeat_max now specifies + the number of additional copies needed. */ + + if (repeat_max >= 0) + { + for (i = repeat_max - 1; i >= 0; i--) + { + *code++ = OP_BRAZERO + repeat_type; + + /* All but the final copy start a new nesting, maintaining the + chain of brackets outstanding. */ + + if (i != 0) + { + int offset; + *code++ = OP_BRA; + offset = (bralink == NULL)? 0 : code - bralink; + bralink = code; + PUTINC(code, 0, offset); + } + + memcpy(code, previous, len); + code += len; + } + + /* Now chain through the pending brackets, and fill in their length + fields (which are holding the chain links pro tem). */ + + while (bralink != NULL) + { + int oldlinkoffset; + int offset = code - bralink + 1; + uschar *bra = code - offset; + oldlinkoffset = GET(bra, 1); + bralink = (oldlinkoffset == 0)? NULL : bralink - oldlinkoffset; + *code++ = OP_KET; + PUTINC(code, 0, offset); + PUT(bra, 1, offset); + } + } + + /* If the maximum is unlimited, set a repeater in the final copy. We + can't just offset backwards from the current code point, because we + don't know if there's been an options resetting after the ket. The + correct offset was computed above. */ + + else code[-ketoffset] = OP_KETRMAX + repeat_type; + } + + /* Else there's some kind of shambles */ + + else + { + *errorcodeptr = ERR11; + goto FAILED; + } + + /* If the character following a repeat is '+', we wrap the entire repeated + item inside OP_ONCE brackets. This is just syntactic sugar, taken from + Sun's Java package. The repeated item starts at tempcode, not at previous, + which might be the first part of a string whose (former) last char we + repeated. However, we don't support '+' after a greediness '?'. */ + + if (possessive_quantifier) + { + int len = code - tempcode; + memmove(tempcode + 1+LINK_SIZE, tempcode, len); + code += 1 + LINK_SIZE; + len += 1 + LINK_SIZE; + tempcode[0] = OP_ONCE; + *code++ = OP_KET; + PUTINC(code, 0, len); + PUT(tempcode, 1, len); + } + + /* In all case we no longer have a previous item. We also set the + "follows varying string" flag for subsequently encountered reqbytes if + it isn't already set and we have just passed a varying length item. */ + + END_REPEAT: + previous = NULL; + cd->req_varyopt |= reqvary; + break; + + + /* Start of nested bracket sub-expression, or comment or lookahead or + lookbehind or option setting or condition. First deal with special things + that can come after a bracket; all are introduced by ?, and the appearance + of any of them means that this is not a referencing group. They were + checked for validity in the first pass over the string, so we don't have to + check for syntax errors here. */ + + case '(': + newoptions = options; + skipbytes = 0; + + if (*(++ptr) == '?') + { + int set, unset; + int *optset; + + switch (*(++ptr)) + { + case '#': /* Comment; skip to ket */ + ptr++; + while (*ptr != ')') ptr++; + continue; + + case ':': /* Non-extracting bracket */ + bravalue = OP_BRA; + ptr++; + break; + + case '(': + bravalue = OP_COND; /* Conditional group */ + + /* Condition to test for recursion */ + + if (ptr[1] == 'R') + { + code[1+LINK_SIZE] = OP_CREF; + PUT2(code, 2+LINK_SIZE, CREF_RECURSE); + skipbytes = 3; + ptr += 3; + } + + /* Condition to test for a numbered subpattern match. We know that + if a digit follows ( then there will just be digits until ) because + the syntax was checked in the first pass. */ + + else if ((digitab[ptr[1]] && ctype_digit) != 0) + { + int condref; /* Don't amalgamate; some compilers */ + condref = *(++ptr) - '0'; /* grumble at autoincrement in declaration */ + while (*(++ptr) != ')') condref = condref*10 + *ptr - '0'; + if (condref == 0) + { + *errorcodeptr = ERR35; + goto FAILED; + } + ptr++; + code[1+LINK_SIZE] = OP_CREF; + PUT2(code, 2+LINK_SIZE, condref); + skipbytes = 3; + } + /* For conditions that are assertions, we just fall through, having + set bravalue above. */ + break; + + case '=': /* Positive lookahead */ + bravalue = OP_ASSERT; + ptr++; + break; + + case '!': /* Negative lookahead */ + bravalue = OP_ASSERT_NOT; + ptr++; + break; + + case '<': /* Lookbehinds */ + switch (*(++ptr)) + { + case '=': /* Positive lookbehind */ + bravalue = OP_ASSERTBACK; + ptr++; + break; + + case '!': /* Negative lookbehind */ + bravalue = OP_ASSERTBACK_NOT; + ptr++; + break; + } + break; + + case '>': /* One-time brackets */ + bravalue = OP_ONCE; + ptr++; + break; + + case 'C': /* Callout - may be followed by digits; */ + previous_callout = code; /* Save for later completion */ + after_manual_callout = 1; /* Skip one item before completing */ + *code++ = OP_CALLOUT; /* Already checked that the terminating */ + { /* closing parenthesis is present. */ + int n = 0; + while ((digitab[*(++ptr)] & ctype_digit) != 0) + n = n * 10 + *ptr - '0'; + if (n > 255) + { + *errorcodeptr = ERR38; + goto FAILED; + } + *code++ = n; + PUT(code, 0, ptr - cd->start_pattern + 1); /* Pattern offset */ + PUT(code, LINK_SIZE, 0); /* Default length */ + code += 2 * LINK_SIZE; + } + previous = NULL; + continue; + + case 'P': /* Named subpattern handling */ + if (*(++ptr) == '<') /* Definition */ + { + int i, namelen; + uschar *slot = cd->name_table; + const uschar *name; /* Don't amalgamate; some compilers */ + name = ++ptr; /* grumble at autoincrement in declaration */ + + while (*ptr++ != '>'); + namelen = ptr - name - 1; + + for (i = 0; i < cd->names_found; i++) + { + int crc = memcmp(name, slot+2, namelen); + if (crc == 0) + { + if (slot[2+namelen] == 0) + { + *errorcodeptr = ERR43; + goto FAILED; + } + crc = -1; /* Current name is substring */ + } + if (crc < 0) + { + memmove(slot + cd->name_entry_size, slot, + (cd->names_found - i) * cd->name_entry_size); + break; + } + slot += cd->name_entry_size; + } + + PUT2(slot, 0, *brackets + 1); + memcpy(slot + 2, name, namelen); + slot[2+namelen] = 0; + cd->names_found++; + goto NUMBERED_GROUP; + } + + if (*ptr == '=' || *ptr == '>') /* Reference or recursion */ + { + int i, namelen; + int type = *ptr++; + const uschar *name = ptr; + uschar *slot = cd->name_table; + + while (*ptr != ')') ptr++; + namelen = ptr - name; + + for (i = 0; i < cd->names_found; i++) + { + if (strncmp((char *)name, (char *)slot+2, namelen) == 0) break; + slot += cd->name_entry_size; + } + if (i >= cd->names_found) + { + *errorcodeptr = ERR15; + goto FAILED; + } + + recno = GET2(slot, 0); + + if (type == '>') goto HANDLE_RECURSION; /* A few lines below */ + + /* Back reference */ + + previous = code; + *code++ = OP_REF; + PUT2INC(code, 0, recno); + cd->backref_map |= (recno < 32)? (1 << recno) : 1; + if (recno > cd->top_backref) cd->top_backref = recno; + continue; + } + + /* Should never happen */ + break; + + case 'R': /* Pattern recursion */ + ptr++; /* Same as (?0) */ + /* Fall through */ + + /* Recursion or "subroutine" call */ + + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + { + const uschar *called; + recno = 0; + while((digitab[*ptr] & ctype_digit) != 0) + recno = recno * 10 + *ptr++ - '0'; + + /* Come here from code above that handles a named recursion */ + + HANDLE_RECURSION: + + previous = code; + + /* Find the bracket that is being referenced. Temporarily end the + regex in case it doesn't exist. */ + + *code = OP_END; + called = (recno == 0)? + cd->start_code : find_bracket(cd->start_code, utf8, recno); + + if (called == NULL) + { + *errorcodeptr = ERR15; + goto FAILED; + } + + /* If the subpattern is still open, this is a recursive call. We + check to see if this is a left recursion that could loop for ever, + and diagnose that case. */ + + if (GET(called, 1) == 0 && could_be_empty(called, code, bcptr, utf8)) + { + *errorcodeptr = ERR40; + goto FAILED; + } + + /* Insert the recursion/subroutine item */ + + *code = OP_RECURSE; + PUT(code, 1, called - cd->start_code); + code += 1 + LINK_SIZE; + } + continue; + + /* Character after (? not specially recognized */ + + default: /* Option setting */ + set = unset = 0; + optset = &set; + + while (*ptr != ')' && *ptr != ':') + { + switch (*ptr++) + { + case '-': optset = &unset; break; + + case 'i': *optset |= PCRE_CASELESS; break; + case 'm': *optset |= PCRE_MULTILINE; break; + case 's': *optset |= PCRE_DOTALL; break; + case 'x': *optset |= PCRE_EXTENDED; break; + case 'U': *optset |= PCRE_UNGREEDY; break; + case 'X': *optset |= PCRE_EXTRA; break; + } + } + + /* Set up the changed option bits, but don't change anything yet. */ + + newoptions = (options | set) & (~unset); + + /* If the options ended with ')' this is not the start of a nested + group with option changes, so the options change at this level. Compile + code to change the ims options if this setting actually changes any of + them. We also pass the new setting back so that it can be put at the + start of any following branches, and when this group ends (if we are in + a group), a resetting item can be compiled. + + Note that if this item is right at the start of the pattern, the + options will have been abstracted and made global, so there will be no + change to compile. */ + + if (*ptr == ')') + { + if ((options & PCRE_IMS) != (newoptions & PCRE_IMS)) + { + *code++ = OP_OPT; + *code++ = newoptions & PCRE_IMS; + } + + /* Change options at this level, and pass them back for use + in subsequent branches. Reset the greedy defaults and the case + value for firstbyte and reqbyte. */ + + *optionsptr = options = newoptions; + greedy_default = ((newoptions & PCRE_UNGREEDY) != 0); + greedy_non_default = greedy_default ^ 1; + req_caseopt = ((options & PCRE_CASELESS) != 0)? REQ_CASELESS : 0; + + previous = NULL; /* This item can't be repeated */ + continue; /* It is complete */ + } + + /* If the options ended with ':' we are heading into a nested group + with possible change of options. Such groups are non-capturing and are + not assertions of any kind. All we need to do is skip over the ':'; + the newoptions value is handled below. */ + + bravalue = OP_BRA; + ptr++; + } + } + + /* If PCRE_NO_AUTO_CAPTURE is set, all unadorned brackets become + non-capturing and behave like (?:...) brackets */ + + else if ((options & PCRE_NO_AUTO_CAPTURE) != 0) + { + bravalue = OP_BRA; + } + + /* Else we have a referencing group; adjust the opcode. If the bracket + number is greater than EXTRACT_BASIC_MAX, we set the opcode one higher, and + arrange for the true number to follow later, in an OP_BRANUMBER item. */ + + else + { + NUMBERED_GROUP: + if (++(*brackets) > EXTRACT_BASIC_MAX) + { + bravalue = OP_BRA + EXTRACT_BASIC_MAX + 1; + code[1+LINK_SIZE] = OP_BRANUMBER; + PUT2(code, 2+LINK_SIZE, *brackets); + skipbytes = 3; + } + else bravalue = OP_BRA + *brackets; + } + + /* Process nested bracketed re. Assertions may not be repeated, but other + kinds can be. We copy code into a non-register variable in order to be able + to pass its address because some compilers complain otherwise. Pass in a + new setting for the ims options if they have changed. */ + + previous = (bravalue >= OP_ONCE)? code : NULL; + *code = bravalue; + tempcode = code; + tempreqvary = cd->req_varyopt; /* Save value before bracket */ + + if (!compile_regex( + newoptions, /* The complete new option state */ + options & PCRE_IMS, /* The previous ims option state */ + brackets, /* Extracting bracket count */ + &tempcode, /* Where to put code (updated) */ + &ptr, /* Input pointer (updated) */ + errorcodeptr, /* Where to put an error message */ + (bravalue == OP_ASSERTBACK || + bravalue == OP_ASSERTBACK_NOT), /* TRUE if back assert */ + skipbytes, /* Skip over OP_COND/OP_BRANUMBER */ + &subfirstbyte, /* For possible first char */ + &subreqbyte, /* For possible last char */ + bcptr, /* Current branch chain */ + cd)) /* Tables block */ + goto FAILED; + + /* At the end of compiling, code is still pointing to the start of the + group, while tempcode has been updated to point past the end of the group + and any option resetting that may follow it. The pattern pointer (ptr) + is on the bracket. */ + + /* If this is a conditional bracket, check that there are no more than + two branches in the group. */ + + else if (bravalue == OP_COND) + { + uschar *tc = code; + condcount = 0; + + do { + condcount++; + tc += GET(tc,1); + } + while (*tc != OP_KET); + + if (condcount > 2) + { + *errorcodeptr = ERR27; + goto FAILED; + } + + /* If there is just one branch, we must not make use of its firstbyte or + reqbyte, because this is equivalent to an empty second branch. */ + + if (condcount == 1) subfirstbyte = subreqbyte = REQ_NONE; + } + + /* Handle updating of the required and first characters. Update for normal + brackets of all kinds, and conditions with two branches (see code above). + If the bracket is followed by a quantifier with zero repeat, we have to + back off. Hence the definition of zeroreqbyte and zerofirstbyte outside the + main loop so that they can be accessed for the back off. */ + + zeroreqbyte = reqbyte; + zerofirstbyte = firstbyte; + groupsetfirstbyte = FALSE; + + if (bravalue >= OP_BRA || bravalue == OP_ONCE || bravalue == OP_COND) + { + /* If we have not yet set a firstbyte in this branch, take it from the + subpattern, remembering that it was set here so that a repeat of more + than one can replicate it as reqbyte if necessary. If the subpattern has + no firstbyte, set "none" for the whole branch. In both cases, a zero + repeat forces firstbyte to "none". */ + + if (firstbyte == REQ_UNSET) + { + if (subfirstbyte >= 0) + { + firstbyte = subfirstbyte; + groupsetfirstbyte = TRUE; + } + else firstbyte = REQ_NONE; + zerofirstbyte = REQ_NONE; + } + + /* If firstbyte was previously set, convert the subpattern's firstbyte + into reqbyte if there wasn't one, using the vary flag that was in + existence beforehand. */ + + else if (subfirstbyte >= 0 && subreqbyte < 0) + subreqbyte = subfirstbyte | tempreqvary; + + /* If the subpattern set a required byte (or set a first byte that isn't + really the first byte - see above), set it. */ + + if (subreqbyte >= 0) reqbyte = subreqbyte; + } + + /* For a forward assertion, we take the reqbyte, if set. This can be + helpful if the pattern that follows the assertion doesn't set a different + char. For example, it's useful for /(?=abcde).+/. We can't set firstbyte + for an assertion, however because it leads to incorrect effect for patterns + such as /(?=a)a.+/ when the "real" "a" would then become a reqbyte instead + of a firstbyte. This is overcome by a scan at the end if there's no + firstbyte, looking for an asserted first char. */ + + else if (bravalue == OP_ASSERT && subreqbyte >= 0) reqbyte = subreqbyte; + + /* Now update the main code pointer to the end of the group. */ + + code = tempcode; + + /* Error if hit end of pattern */ + + if (*ptr != ')') + { + *errorcodeptr = ERR14; + goto FAILED; + } + break; + + /* Check \ for being a real metacharacter; if not, fall through and handle + it as a data character at the start of a string. Escape items are checked + for validity in the pre-compiling pass. */ + + case '\\': + tempptr = ptr; + c = check_escape(&ptr, errorcodeptr, *brackets, options, FALSE); + + /* Handle metacharacters introduced by \. For ones like \d, the ESC_ values + are arranged to be the negation of the corresponding OP_values. For the + back references, the values are ESC_REF plus the reference number. Only + back references and those types that consume a character may be repeated. + We can test for values between ESC_b and ESC_Z for the latter; this may + have to change if any new ones are ever created. */ + + if (c < 0) + { + if (-c == ESC_Q) /* Handle start of quoted string */ + { + if (ptr[1] == '\\' && ptr[2] == 'E') ptr += 2; /* avoid empty string */ + else inescq = TRUE; + continue; + } + + /* For metasequences that actually match a character, we disable the + setting of a first character if it hasn't already been set. */ + + if (firstbyte == REQ_UNSET && -c > ESC_b && -c < ESC_Z) + firstbyte = REQ_NONE; + + /* Set values to reset to if this is followed by a zero repeat. */ + + zerofirstbyte = firstbyte; + zeroreqbyte = reqbyte; + + /* Back references are handled specially */ + + if (-c >= ESC_REF) + { + int number = -c - ESC_REF; + previous = code; + *code++ = OP_REF; + PUT2INC(code, 0, number); + } + + /* So are Unicode property matches, if supported. We know that get_ucp + won't fail because it was tested in the pre-pass. */ + +#ifdef SUPPORT_UCP + else if (-c == ESC_P || -c == ESC_p) + { + BOOL negated; + int value = get_ucp(&ptr, &negated, errorcodeptr); + previous = code; + *code++ = ((-c == ESC_p) != negated)? OP_PROP : OP_NOTPROP; + *code++ = value; + } +#endif + + /* For the rest, we can obtain the OP value by negating the escape + value */ + + else + { + previous = (-c > ESC_b && -c < ESC_Z)? code : NULL; + *code++ = -c; + } + continue; + } + + /* We have a data character whose value is in c. In UTF-8 mode it may have + a value > 127. We set its representation in the length/buffer, and then + handle it as a data character. */ + +#ifdef SUPPORT_UTF8 + if (utf8 && c > 127) + mclength = _pcre_ord2utf8(c, mcbuffer); + else +#endif + + { + mcbuffer[0] = c; + mclength = 1; + } + + goto ONE_CHAR; + + /* Handle a literal character. It is guaranteed not to be whitespace or # + when the extended flag is set. If we are in UTF-8 mode, it may be a + multi-byte literal character. */ + + default: + NORMAL_CHAR: + mclength = 1; + mcbuffer[0] = c; + +#ifdef SUPPORT_UTF8 + if (utf8 && (c & 0xc0) == 0xc0) + { + while ((ptr[1] & 0xc0) == 0x80) + mcbuffer[mclength++] = *(++ptr); + } +#endif + + /* At this point we have the character's bytes in mcbuffer, and the length + in mclength. When not in UTF-8 mode, the length is always 1. */ + + ONE_CHAR: + previous = code; + *code++ = ((options & PCRE_CASELESS) != 0)? OP_CHARNC : OP_CHAR; + for (c = 0; c < mclength; c++) *code++ = mcbuffer[c]; + + /* Set the first and required bytes appropriately. If no previous first + byte, set it from this character, but revert to none on a zero repeat. + Otherwise, leave the firstbyte value alone, and don't change it on a zero + repeat. */ + + if (firstbyte == REQ_UNSET) + { + zerofirstbyte = REQ_NONE; + zeroreqbyte = reqbyte; + + /* If the character is more than one byte long, we can set firstbyte + only if it is not to be matched caselessly. */ + + if (mclength == 1 || req_caseopt == 0) + { + firstbyte = mcbuffer[0] | req_caseopt; + if (mclength != 1) reqbyte = code[-1] | cd->req_varyopt; + } + else firstbyte = reqbyte = REQ_NONE; + } + + /* firstbyte was previously set; we can set reqbyte only the length is + 1 or the matching is caseful. */ + + else + { + zerofirstbyte = firstbyte; + zeroreqbyte = reqbyte; + if (mclength == 1 || req_caseopt == 0) + reqbyte = code[-1] | req_caseopt | cd->req_varyopt; + } + + break; /* End of literal character handling */ + } + } /* end of big loop */ + +/* Control never reaches here by falling through, only by a goto for all the +error states. Pass back the position in the pattern so that it can be displayed +to the user for diagnosing the error. */ + +FAILED: +*ptrptr = ptr; +return FALSE; +} + + + + +/************************************************* +* Compile sequence of alternatives * +*************************************************/ + +/* On entry, ptr is pointing past the bracket character, but on return +it points to the closing bracket, or vertical bar, or end of string. +The code variable is pointing at the byte into which the BRA operator has been +stored. If the ims options are changed at the start (for a (?ims: group) or +during any branch, we need to insert an OP_OPT item at the start of every +following branch to ensure they get set correctly at run time, and also pass +the new options into every subsequent branch compile. + +Argument: + options option bits, including any changes for this subpattern + oldims previous settings of ims option bits + brackets -> int containing the number of extracting brackets used + codeptr -> the address of the current code pointer + ptrptr -> the address of the current pattern pointer + errorcodeptr -> pointer to error code variable + lookbehind TRUE if this is a lookbehind assertion + skipbytes skip this many bytes at start (for OP_COND, OP_BRANUMBER) + firstbyteptr place to put the first required character, or a negative number + reqbyteptr place to put the last required character, or a negative number + bcptr pointer to the chain of currently open branches + cd points to the data block with tables pointers etc. + +Returns: TRUE on success +*/ + +static BOOL +compile_regex(int options, int oldims, int *brackets, uschar **codeptr, + const uschar **ptrptr, int *errorcodeptr, BOOL lookbehind, int skipbytes, + int *firstbyteptr, int *reqbyteptr, branch_chain *bcptr, compile_data *cd) +{ +const uschar *ptr = *ptrptr; +uschar *code = *codeptr; +uschar *last_branch = code; +uschar *start_bracket = code; +uschar *reverse_count = NULL; +int firstbyte, reqbyte; +int branchfirstbyte, branchreqbyte; +branch_chain bc; + +bc.outer = bcptr; +bc.current = code; + +firstbyte = reqbyte = REQ_UNSET; + +/* Offset is set zero to mark that this bracket is still open */ + +PUT(code, 1, 0); +code += 1 + LINK_SIZE + skipbytes; + +/* Loop for each alternative branch */ + +for (;;) + { + /* Handle a change of ims options at the start of the branch */ + + if ((options & PCRE_IMS) != oldims) + { + *code++ = OP_OPT; + *code++ = options & PCRE_IMS; + } + + /* Set up dummy OP_REVERSE if lookbehind assertion */ + + if (lookbehind) + { + *code++ = OP_REVERSE; + reverse_count = code; + PUTINC(code, 0, 0); + } + + /* Now compile the branch */ + + if (!compile_branch(&options, brackets, &code, &ptr, errorcodeptr, + &branchfirstbyte, &branchreqbyte, &bc, cd)) + { + *ptrptr = ptr; + return FALSE; + } + + /* If this is the first branch, the firstbyte and reqbyte values for the + branch become the values for the regex. */ + + if (*last_branch != OP_ALT) + { + firstbyte = branchfirstbyte; + reqbyte = branchreqbyte; + } + + /* If this is not the first branch, the first char and reqbyte have to + match the values from all the previous branches, except that if the previous + value for reqbyte didn't have REQ_VARY set, it can still match, and we set + REQ_VARY for the regex. */ + + else + { + /* If we previously had a firstbyte, but it doesn't match the new branch, + we have to abandon the firstbyte for the regex, but if there was previously + no reqbyte, it takes on the value of the old firstbyte. */ + + if (firstbyte >= 0 && firstbyte != branchfirstbyte) + { + if (reqbyte < 0) reqbyte = firstbyte; + firstbyte = REQ_NONE; + } + + /* If we (now or from before) have no firstbyte, a firstbyte from the + branch becomes a reqbyte if there isn't a branch reqbyte. */ + + if (firstbyte < 0 && branchfirstbyte >= 0 && branchreqbyte < 0) + branchreqbyte = branchfirstbyte; + + /* Now ensure that the reqbytes match */ + + if ((reqbyte & ~REQ_VARY) != (branchreqbyte & ~REQ_VARY)) + reqbyte = REQ_NONE; + else reqbyte |= branchreqbyte; /* To "or" REQ_VARY */ + } + + /* If lookbehind, check that this branch matches a fixed-length string, + and put the length into the OP_REVERSE item. Temporarily mark the end of + the branch with OP_END. */ + + if (lookbehind) + { + int length; + *code = OP_END; + length = find_fixedlength(last_branch, options); + DPRINTF(("fixed length = %d\n", length)); + if (length < 0) + { + *errorcodeptr = (length == -2)? ERR36 : ERR25; + *ptrptr = ptr; + return FALSE; + } + PUT(reverse_count, 0, length); + } + + /* Reached end of expression, either ')' or end of pattern. Go back through + the alternative branches and reverse the chain of offsets, with the field in + the BRA item now becoming an offset to the first alternative. If there are + no alternatives, it points to the end of the group. The length in the + terminating ket is always the length of the whole bracketed item. If any of + the ims options were changed inside the group, compile a resetting op-code + following, except at the very end of the pattern. Return leaving the pointer + at the terminating char. */ + + if (*ptr != '|') + { + int length = code - last_branch; + do + { + int prev_length = GET(last_branch, 1); + PUT(last_branch, 1, length); + length = prev_length; + last_branch -= length; + } + while (length > 0); + + /* Fill in the ket */ + + *code = OP_KET; + PUT(code, 1, code - start_bracket); + code += 1 + LINK_SIZE; + + /* Resetting option if needed */ + + if ((options & PCRE_IMS) != oldims && *ptr == ')') + { + *code++ = OP_OPT; + *code++ = oldims; + } + + /* Set values to pass back */ + + *codeptr = code; + *ptrptr = ptr; + *firstbyteptr = firstbyte; + *reqbyteptr = reqbyte; + return TRUE; + } + + /* Another branch follows; insert an "or" node. Its length field points back + to the previous branch while the bracket remains open. At the end the chain + is reversed. It's done like this so that the start of the bracket has a + zero offset until it is closed, making it possible to detect recursion. */ + + *code = OP_ALT; + PUT(code, 1, code - last_branch); + bc.current = last_branch = code; + code += 1 + LINK_SIZE; + ptr++; + } +/* Control never reaches here */ +} + + + + +/************************************************* +* Check for anchored expression * +*************************************************/ + +/* Try to find out if this is an anchored regular expression. Consider each +alternative branch. If they all start with OP_SOD or OP_CIRC, or with a bracket +all of whose alternatives start with OP_SOD or OP_CIRC (recurse ad lib), then +it's anchored. However, if this is a multiline pattern, then only OP_SOD +counts, since OP_CIRC can match in the middle. + +We can also consider a regex to be anchored if OP_SOM starts all its branches. +This is the code for \G, which means "match at start of match position, taking +into account the match offset". + +A branch is also implicitly anchored if it starts with .* and DOTALL is set, +because that will try the rest of the pattern at all possible matching points, +so there is no point trying again.... er .... + +.... except when the .* appears inside capturing parentheses, and there is a +subsequent back reference to those parentheses. We haven't enough information +to catch that case precisely. + +At first, the best we could do was to detect when .* was in capturing brackets +and the highest back reference was greater than or equal to that level. +However, by keeping a bitmap of the first 31 back references, we can catch some +of the more common cases more precisely. + +Arguments: + code points to start of expression (the bracket) + options points to the options setting + bracket_map a bitmap of which brackets we are inside while testing; this + handles up to substring 31; after that we just have to take + the less precise approach + backref_map the back reference bitmap + +Returns: TRUE or FALSE +*/ + +static BOOL +is_anchored(register const uschar *code, int *options, unsigned int bracket_map, + unsigned int backref_map) +{ +do { + const uschar *scode = + first_significant_code(code + 1+LINK_SIZE, options, PCRE_MULTILINE, FALSE); + register int op = *scode; + + /* Capturing brackets */ + + if (op > OP_BRA) + { + int new_map; + op -= OP_BRA; + if (op > EXTRACT_BASIC_MAX) op = GET2(scode, 2+LINK_SIZE); + new_map = bracket_map | ((op < 32)? (1 << op) : 1); + if (!is_anchored(scode, options, new_map, backref_map)) return FALSE; + } + + /* Other brackets */ + + else if (op == OP_BRA || op == OP_ASSERT || op == OP_ONCE || op == OP_COND) + { + if (!is_anchored(scode, options, bracket_map, backref_map)) return FALSE; + } + + /* .* is not anchored unless DOTALL is set and it isn't in brackets that + are or may be referenced. */ + + else if ((op == OP_TYPESTAR || op == OP_TYPEMINSTAR) && + (*options & PCRE_DOTALL) != 0) + { + if (scode[1] != OP_ANY || (bracket_map & backref_map) != 0) return FALSE; + } + + /* Check for explicit anchoring */ + + else if (op != OP_SOD && op != OP_SOM && + ((*options & PCRE_MULTILINE) != 0 || op != OP_CIRC)) + return FALSE; + code += GET(code, 1); + } +while (*code == OP_ALT); /* Loop for each alternative */ +return TRUE; +} + + + +/************************************************* +* Check for starting with ^ or .* * +*************************************************/ + +/* This is called to find out if every branch starts with ^ or .* so that +"first char" processing can be done to speed things up in multiline +matching and for non-DOTALL patterns that start with .* (which must start at +the beginning or after \n). As in the case of is_anchored() (see above), we +have to take account of back references to capturing brackets that contain .* +because in that case we can't make the assumption. + +Arguments: + code points to start of expression (the bracket) + bracket_map a bitmap of which brackets we are inside while testing; this + handles up to substring 31; after that we just have to take + the less precise approach + backref_map the back reference bitmap + +Returns: TRUE or FALSE +*/ + +static BOOL +is_startline(const uschar *code, unsigned int bracket_map, + unsigned int backref_map) +{ +do { + const uschar *scode = first_significant_code(code + 1+LINK_SIZE, NULL, 0, + FALSE); + register int op = *scode; + + /* Capturing brackets */ + + if (op > OP_BRA) + { + int new_map; + op -= OP_BRA; + if (op > EXTRACT_BASIC_MAX) op = GET2(scode, 2+LINK_SIZE); + new_map = bracket_map | ((op < 32)? (1 << op) : 1); + if (!is_startline(scode, new_map, backref_map)) return FALSE; + } + + /* Other brackets */ + + else if (op == OP_BRA || op == OP_ASSERT || op == OP_ONCE || op == OP_COND) + { if (!is_startline(scode, bracket_map, backref_map)) return FALSE; } + + /* .* means "start at start or after \n" if it isn't in brackets that + may be referenced. */ + + else if (op == OP_TYPESTAR || op == OP_TYPEMINSTAR) + { + if (scode[1] != OP_ANY || (bracket_map & backref_map) != 0) return FALSE; + } + + /* Check for explicit circumflex */ + + else if (op != OP_CIRC) return FALSE; + + /* Move on to the next alternative */ + + code += GET(code, 1); + } +while (*code == OP_ALT); /* Loop for each alternative */ +return TRUE; +} + + + +/************************************************* +* Check for asserted fixed first char * +*************************************************/ + +/* During compilation, the "first char" settings from forward assertions are +discarded, because they can cause conflicts with actual literals that follow. +However, if we end up without a first char setting for an unanchored pattern, +it is worth scanning the regex to see if there is an initial asserted first +char. If all branches start with the same asserted char, or with a bracket all +of whose alternatives start with the same asserted char (recurse ad lib), then +we return that char, otherwise -1. + +Arguments: + code points to start of expression (the bracket) + options pointer to the options (used to check casing changes) + inassert TRUE if in an assertion + +Returns: -1 or the fixed first char +*/ + +static int +find_firstassertedchar(const uschar *code, int *options, BOOL inassert) +{ +register int c = -1; +do { + int d; + const uschar *scode = + first_significant_code(code + 1+LINK_SIZE, options, PCRE_CASELESS, TRUE); + register int op = *scode; + + if (op >= OP_BRA) op = OP_BRA; + + switch(op) + { + default: + return -1; + + case OP_BRA: + case OP_ASSERT: + case OP_ONCE: + case OP_COND: + if ((d = find_firstassertedchar(scode, options, op == OP_ASSERT)) < 0) + return -1; + if (c < 0) c = d; else if (c != d) return -1; + break; + + case OP_EXACT: /* Fall through */ + scode += 2; + + case OP_CHAR: + case OP_CHARNC: + case OP_PLUS: + case OP_MINPLUS: + if (!inassert) return -1; + if (c < 0) + { + c = scode[1]; + if ((*options & PCRE_CASELESS) != 0) c |= REQ_CASELESS; + } + else if (c != scode[1]) return -1; + break; + } + + code += GET(code, 1); + } +while (*code == OP_ALT); +return c; +} + + + +/************************************************* +* Compile a Regular Expression * +*************************************************/ + +/* This function takes a string and returns a pointer to a block of store +holding a compiled version of the expression. The original API for this +function had no error code return variable; it is retained for backwards +compatibility. The new function is given a new name. + +Arguments: + pattern the regular expression + options various option bits + errorcodeptr pointer to error code variable (pcre_compile2() only) + can be NULL if you don't want a code value + errorptr pointer to pointer to error text + erroroffset ptr offset in pattern where error was detected + tables pointer to character tables or NULL + +Returns: pointer to compiled data block, or NULL on error, + with errorptr and erroroffset set +*/ + +EXPORT pcre * +pcre_compile(const char *pattern, int options, const char **errorptr, + int *erroroffset, const unsigned char *tables) +{ +return pcre_compile2(pattern, options, NULL, errorptr, erroroffset, tables); +} + + +EXPORT pcre * +pcre_compile2(const char *pattern, int options, int *errorcodeptr, + const char **errorptr, int *erroroffset, const unsigned char *tables) +{ +real_pcre *re; +int length = 1 + LINK_SIZE; /* For initial BRA plus length */ +int c, firstbyte, reqbyte; +int bracount = 0; +int branch_extra = 0; +int branch_newextra; +int item_count = -1; +int name_count = 0; +int max_name_size = 0; +int lastitemlength = 0; +int errorcode = 0; +#ifdef SUPPORT_UTF8 +BOOL utf8; +BOOL class_utf8; +#endif +BOOL inescq = FALSE; +BOOL capturing; +unsigned int brastackptr = 0; +size_t size; +uschar *code; +const uschar *codestart; +const uschar *ptr; +compile_data compile_block; +int brastack[BRASTACK_SIZE]; +uschar bralenstack[BRASTACK_SIZE]; + +/* We can't pass back an error message if errorptr is NULL; I guess the best we +can do is just return NULL, but we can set a code value if there is a code +pointer. */ + +if (errorptr == NULL) + { + if (errorcodeptr != NULL) *errorcodeptr = 99; + return NULL; + } + +*errorptr = NULL; +if (errorcodeptr != NULL) *errorcodeptr = ERR0; + +/* However, we can give a message for this error */ + +if (erroroffset == NULL) + { + errorcode = ERR16; + goto PCRE_EARLY_ERROR_RETURN; + } + +*erroroffset = 0; + +/* Can't support UTF8 unless PCRE has been compiled to include the code. */ + +#ifdef SUPPORT_UTF8 +utf8 = (options & PCRE_UTF8) != 0; +if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0 && + (*erroroffset = _pcre_valid_utf8((uschar *)pattern, -1)) >= 0) + { + errorcode = ERR44; + goto PCRE_EARLY_ERROR_RETURN; + } +#else +if ((options & PCRE_UTF8) != 0) + { + errorcode = ERR32; + goto PCRE_EARLY_ERROR_RETURN; + } +#endif + +if ((options & ~PUBLIC_OPTIONS) != 0) + { + errorcode = ERR17; + goto PCRE_EARLY_ERROR_RETURN; + } + +/* Set up pointers to the individual character tables */ + +if (tables == NULL) tables = _pcre_default_tables; +compile_block.lcc = tables + lcc_offset; +compile_block.fcc = tables + fcc_offset; +compile_block.cbits = tables + cbits_offset; +compile_block.ctypes = tables + ctypes_offset; + +/* Maximum back reference and backref bitmap. This is updated for numeric +references during the first pass, but for named references during the actual +compile pass. The bitmap records up to 31 back references to help in deciding +whether (.*) can be treated as anchored or not. */ + +compile_block.top_backref = 0; +compile_block.backref_map = 0; + +/* Reflect pattern for debugging output */ + +DPRINTF(("------------------------------------------------------------------\n")); +DPRINTF(("%s\n", pattern)); + +/* The first thing to do is to make a pass over the pattern to compute the +amount of store required to hold the compiled code. This does not have to be +perfect as long as errors are overestimates. At the same time we can detect any +flag settings right at the start, and extract them. Make an attempt to correct +for any counted white space if an "extended" flag setting appears late in the +pattern. We can't be so clever for #-comments. */ + +ptr = (const uschar *)(pattern - 1); +while ((c = *(++ptr)) != 0) + { + int min, max; + int class_optcount; + int bracket_length; + int duplength; + + /* If we are inside a \Q...\E sequence, all chars are literal */ + + if (inescq) + { + if ((options & PCRE_AUTO_CALLOUT) != 0) length += 2 + 2*LINK_SIZE; + goto NORMAL_CHAR; + } + + /* Otherwise, first check for ignored whitespace and comments */ + + if ((options & PCRE_EXTENDED) != 0) + { + if ((compile_block.ctypes[c] & ctype_space) != 0) continue; + if (c == '#') + { + /* The space before the ; is to avoid a warning on a silly compiler + on the Macintosh. */ + while ((c = *(++ptr)) != 0 && c != NEWLINE) ; + if (c == 0) break; + continue; + } + } + + item_count++; /* Is zero for the first non-comment item */ + + /* Allow space for auto callout before every item except quantifiers. */ + + if ((options & PCRE_AUTO_CALLOUT) != 0 && + c != '*' && c != '+' && c != '?' && + (c != '{' || !is_counted_repeat(ptr + 1))) + length += 2 + 2*LINK_SIZE; + + switch(c) + { + /* A backslashed item may be an escaped data character or it may be a + character type. */ + + case '\\': + c = check_escape(&ptr, &errorcode, bracount, options, FALSE); + if (errorcode != 0) goto PCRE_ERROR_RETURN; + + lastitemlength = 1; /* Default length of last item for repeats */ + + if (c >= 0) /* Data character */ + { + length += 2; /* For a one-byte character */ + +#ifdef SUPPORT_UTF8 + if (utf8 && c > 127) + { + int i; + for (i = 0; i < _pcre_utf8_table1_size; i++) + if (c <= _pcre_utf8_table1[i]) break; + length += i; + lastitemlength += i; + } +#endif + + continue; + } + + /* If \Q, enter "literal" mode */ + + if (-c == ESC_Q) + { + inescq = TRUE; + continue; + } + + /* \X is supported only if Unicode property support is compiled */ + +#ifndef SUPPORT_UCP + if (-c == ESC_X) + { + errorcode = ERR45; + goto PCRE_ERROR_RETURN; + } +#endif + + /* \P and \p are for Unicode properties, but only when the support has + been compiled. Each item needs 2 bytes. */ + + else if (-c == ESC_P || -c == ESC_p) + { +#ifdef SUPPORT_UCP + BOOL negated; + length += 2; + lastitemlength = 2; + if (get_ucp(&ptr, &negated, &errorcode) < 0) goto PCRE_ERROR_RETURN; + continue; +#else + errorcode = ERR45; + goto PCRE_ERROR_RETURN; +#endif + } + + /* Other escapes need one byte */ + + length++; + + /* A back reference needs an additional 2 bytes, plus either one or 5 + bytes for a repeat. We also need to keep the value of the highest + back reference. */ + + if (c <= -ESC_REF) + { + int refnum = -c - ESC_REF; + compile_block.backref_map |= (refnum < 32)? (1 << refnum) : 1; + if (refnum > compile_block.top_backref) + compile_block.top_backref = refnum; + length += 2; /* For single back reference */ + if (ptr[1] == '{' && is_counted_repeat(ptr+2)) + { + ptr = read_repeat_counts(ptr+2, &min, &max, &errorcode); + if (errorcode != 0) goto PCRE_ERROR_RETURN; + if ((min == 0 && (max == 1 || max == -1)) || + (min == 1 && max == -1)) + length++; + else length += 5; + if (ptr[1] == '?') ptr++; + } + } + continue; + + case '^': /* Single-byte metacharacters */ + case '.': + case '$': + length++; + lastitemlength = 1; + continue; + + case '*': /* These repeats won't be after brackets; */ + case '+': /* those are handled separately */ + case '?': + length++; + goto POSESSIVE; /* A few lines below */ + + /* This covers the cases of braced repeats after a single char, metachar, + class, or back reference. */ + + case '{': + if (!is_counted_repeat(ptr+1)) goto NORMAL_CHAR; + ptr = read_repeat_counts(ptr+1, &min, &max, &errorcode); + if (errorcode != 0) goto PCRE_ERROR_RETURN; + + /* These special cases just insert one extra opcode */ + + if ((min == 0 && (max == 1 || max == -1)) || + (min == 1 && max == -1)) + length++; + + /* These cases might insert additional copies of a preceding character. */ + + else + { + if (min != 1) + { + length -= lastitemlength; /* Uncount the original char or metachar */ + if (min > 0) length += 3 + lastitemlength; + } + length += lastitemlength + ((max > 0)? 3 : 1); + } + + if (ptr[1] == '?') ptr++; /* Needs no extra length */ + + POSESSIVE: /* Test for possessive quantifier */ + if (ptr[1] == '+') + { + ptr++; + length += 2 + 2*LINK_SIZE; /* Allow for atomic brackets */ + } + continue; + + /* An alternation contains an offset to the next branch or ket. If any ims + options changed in the previous branch(es), and/or if we are in a + lookbehind assertion, extra space will be needed at the start of the + branch. This is handled by branch_extra. */ + + case '|': + length += 1 + LINK_SIZE + branch_extra; + continue; + + /* A character class uses 33 characters provided that all the character + values are less than 256. Otherwise, it uses a bit map for low valued + characters, and individual items for others. Don't worry about character + types that aren't allowed in classes - they'll get picked up during the + compile. A character class that contains only one single-byte character + uses 2 or 3 bytes, depending on whether it is negated or not. Notice this + where we can. (In UTF-8 mode we can do this only for chars < 128.) */ + + case '[': + if (*(++ptr) == '^') + { + class_optcount = 10; /* Greater than one */ + ptr++; + } + else class_optcount = 0; + +#ifdef SUPPORT_UTF8 + class_utf8 = FALSE; +#endif + + /* Written as a "do" so that an initial ']' is taken as data */ + + if (*ptr != 0) do + { + /* Inside \Q...\E everything is literal except \E */ + + if (inescq) + { + if (*ptr != '\\' || ptr[1] != 'E') goto GET_ONE_CHARACTER; + inescq = FALSE; + ptr += 1; + continue; + } + + /* Outside \Q...\E, check for escapes */ + + if (*ptr == '\\') + { + c = check_escape(&ptr, &errorcode, bracount, options, TRUE); + if (errorcode != 0) goto PCRE_ERROR_RETURN; + + /* \b is backspace inside a class; \X is literal */ + + if (-c == ESC_b) c = '\b'; + else if (-c == ESC_X) c = 'X'; + + /* \Q enters quoting mode */ + + else if (-c == ESC_Q) + { + inescq = TRUE; + continue; + } + + /* Handle escapes that turn into characters */ + + if (c >= 0) goto NON_SPECIAL_CHARACTER; + + /* Escapes that are meta-things. The normal ones just affect the + bit map, but Unicode properties require an XCLASS extended item. */ + + else + { + class_optcount = 10; /* \d, \s etc; make sure > 1 */ +#ifdef SUPPORT_UTF8 + if (-c == ESC_p || -c == ESC_P) + { + if (!class_utf8) + { + class_utf8 = TRUE; + length += LINK_SIZE + 2; + } + length += 2; + } +#endif + } + } + + /* Check the syntax for POSIX stuff. The bits we actually handle are + checked during the real compile phase. */ + + else if (*ptr == '[' && check_posix_syntax(ptr, &ptr, &compile_block)) + { + ptr++; + class_optcount = 10; /* Make sure > 1 */ + } + + /* Anything else increments the possible optimization count. We have to + detect ranges here so that we can compute the number of extra ranges for + caseless wide characters when UCP support is available. If there are wide + characters, we are going to have to use an XCLASS, even for single + characters. */ + + else + { + int d; + + GET_ONE_CHARACTER: + +#ifdef SUPPORT_UTF8 + if (utf8) + { + int extra = 0; + GETCHARLEN(c, ptr, extra); + ptr += extra; + } + else c = *ptr; +#else + c = *ptr; +#endif + + /* Come here from handling \ above when it escapes to a char value */ + + NON_SPECIAL_CHARACTER: + class_optcount++; + + d = -1; + if (ptr[1] == '-') + { + uschar const *hyptr = ptr++; + if (ptr[1] == '\\') + { + ptr++; + d = check_escape(&ptr, &errorcode, bracount, options, TRUE); + if (errorcode != 0) goto PCRE_ERROR_RETURN; + if (-d == ESC_b) d = '\b'; /* backspace */ + else if (-d == ESC_X) d = 'X'; /* literal X in a class */ + } + else if (ptr[1] != 0 && ptr[1] != ']') + { + ptr++; +#ifdef SUPPORT_UTF8 + if (utf8) + { + int extra = 0; + GETCHARLEN(d, ptr, extra); + ptr += extra; + } + else +#endif + d = *ptr; + } + if (d < 0) ptr = hyptr; /* go back to hyphen as data */ + } + + /* If d >= 0 we have a range. In UTF-8 mode, if the end is > 255, or > + 127 for caseless matching, we will need to use an XCLASS. */ + + if (d >= 0) + { + class_optcount = 10; /* Ensure > 1 */ + if (d < c) + { + errorcode = ERR8; + goto PCRE_ERROR_RETURN; + } + +#ifdef SUPPORT_UTF8 + if (utf8 && (d > 255 || ((options & PCRE_CASELESS) != 0 && d > 127))) + { + uschar buffer[6]; + if (!class_utf8) /* Allow for XCLASS overhead */ + { + class_utf8 = TRUE; + length += LINK_SIZE + 2; + } + +#ifdef SUPPORT_UCP + /* If we have UCP support, find out how many extra ranges are + needed to map the other case of characters within this range. We + have to mimic the range optimization here, because extending the + range upwards might push d over a boundary that makes is use + another byte in the UTF-8 representation. */ + + if ((options & PCRE_CASELESS) != 0) + { + int occ, ocd; + int cc = c; + int origd = d; + while (get_othercase_range(&cc, origd, &occ, &ocd)) + { + if (occ >= c && ocd <= d) continue; /* Skip embedded */ + + if (occ < c && ocd >= c - 1) /* Extend the basic range */ + { /* if there is overlap, */ + c = occ; /* noting that if occ < c */ + continue; /* we can't have ocd > d */ + } /* because a subrange is */ + if (ocd > d && occ <= d + 1) /* always shorter than */ + { /* the basic range. */ + d = ocd; + continue; + } + + /* An extra item is needed */ + + length += 1 + _pcre_ord2utf8(occ, buffer) + + ((occ == ocd)? 0 : _pcre_ord2utf8(ocd, buffer)); + } + } +#endif /* SUPPORT_UCP */ + + /* The length of the (possibly extended) range */ + + length += 1 + _pcre_ord2utf8(c, buffer) + _pcre_ord2utf8(d, buffer); + } +#endif /* SUPPORT_UTF8 */ + + } + + /* We have a single character. There is nothing to be done unless we + are in UTF-8 mode. If the char is > 255, or 127 when caseless, we must + allow for an XCL_SINGLE item, doubled for caselessness if there is UCP + support. */ + + else + { +#ifdef SUPPORT_UTF8 + if (utf8 && (c > 255 || ((options & PCRE_CASELESS) != 0 && c > 127))) + { + uschar buffer[6]; + class_optcount = 10; /* Ensure > 1 */ + if (!class_utf8) /* Allow for XCLASS overhead */ + { + class_utf8 = TRUE; + length += LINK_SIZE + 2; + } +#ifdef SUPPORT_UCP + length += (((options & PCRE_CASELESS) != 0)? 2 : 1) * + (1 + _pcre_ord2utf8(c, buffer)); +#else /* SUPPORT_UCP */ + length += 1 + _pcre_ord2utf8(c, buffer); +#endif /* SUPPORT_UCP */ + } +#endif /* SUPPORT_UTF8 */ + } + } + } + while (*(++ptr) != 0 && (inescq || *ptr != ']')); /* Concludes "do" above */ + + if (*ptr == 0) /* Missing terminating ']' */ + { + errorcode = ERR6; + goto PCRE_ERROR_RETURN; + } + + /* We can optimize when there was only one optimizable character. Repeats + for positive and negated single one-byte chars are handled by the general + code. Here, we handle repeats for the class opcodes. */ + + if (class_optcount == 1) length += 3; else + { + length += 33; + + /* A repeat needs either 1 or 5 bytes. If it is a possessive quantifier, + we also need extra for wrapping the whole thing in a sub-pattern. */ + + if (*ptr != 0 && ptr[1] == '{' && is_counted_repeat(ptr+2)) + { + ptr = read_repeat_counts(ptr+2, &min, &max, &errorcode); + if (errorcode != 0) goto PCRE_ERROR_RETURN; + if ((min == 0 && (max == 1 || max == -1)) || + (min == 1 && max == -1)) + length++; + else length += 5; + if (ptr[1] == '+') + { + ptr++; + length += 2 + 2*LINK_SIZE; + } + else if (ptr[1] == '?') ptr++; + } + } + continue; + + /* Brackets may be genuine groups or special things */ + + case '(': + branch_newextra = 0; + bracket_length = 1 + LINK_SIZE; + capturing = FALSE; + + /* Handle special forms of bracket, which all start (? */ + + if (ptr[1] == '?') + { + int set, unset; + int *optset; + + switch (c = ptr[2]) + { + /* Skip over comments entirely */ + case '#': + ptr += 3; + while (*ptr != 0 && *ptr != ')') ptr++; + if (*ptr == 0) + { + errorcode = ERR18; + goto PCRE_ERROR_RETURN; + } + continue; + + /* Non-referencing groups and lookaheads just move the pointer on, and + then behave like a non-special bracket, except that they don't increment + the count of extracting brackets. Ditto for the "once only" bracket, + which is in Perl from version 5.005. */ + + case ':': + case '=': + case '!': + case '>': + ptr += 2; + break; + + /* (?R) specifies a recursive call to the regex, which is an extension + to provide the facility which can be obtained by (?p{perl-code}) in + Perl 5.6. In Perl 5.8 this has become (??{perl-code}). + + From PCRE 4.00, items such as (?3) specify subroutine-like "calls" to + the appropriate numbered brackets. This includes both recursive and + non-recursive calls. (?R) is now synonymous with (?0). */ + + case 'R': + ptr++; + + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + ptr += 2; + if (c != 'R') + while ((digitab[*(++ptr)] & ctype_digit) != 0); + if (*ptr != ')') + { + errorcode = ERR29; + goto PCRE_ERROR_RETURN; + } + length += 1 + LINK_SIZE; + + /* If this item is quantified, it will get wrapped inside brackets so + as to use the code for quantified brackets. We jump down and use the + code that handles this for real brackets. */ + + if (ptr[1] == '+' || ptr[1] == '*' || ptr[1] == '?' || ptr[1] == '{') + { + length += 2 + 2 * LINK_SIZE; /* to make bracketed */ + duplength = 5 + 3 * LINK_SIZE; + goto HANDLE_QUANTIFIED_BRACKETS; + } + continue; + + /* (?C) is an extension which provides "callout" - to provide a bit of + the functionality of the Perl (?{...}) feature. An optional number may + follow (default is zero). */ + + case 'C': + ptr += 2; + while ((digitab[*(++ptr)] & ctype_digit) != 0); + if (*ptr != ')') + { + errorcode = ERR39; + goto PCRE_ERROR_RETURN; + } + length += 2 + 2*LINK_SIZE; + continue; + + /* Named subpatterns are an extension copied from Python */ + + case 'P': + ptr += 3; + + /* Handle the definition of a named subpattern */ + + if (*ptr == '<') + { + const uschar *p; /* Don't amalgamate; some compilers */ + p = ++ptr; /* grumble at autoincrement in declaration */ + while ((compile_block.ctypes[*ptr] & ctype_word) != 0) ptr++; + if (*ptr != '>') + { + errorcode = ERR42; + goto PCRE_ERROR_RETURN; + } + name_count++; + if (ptr - p > max_name_size) max_name_size = (ptr - p); + capturing = TRUE; /* Named parentheses are always capturing */ + break; + } + + /* Handle back references and recursive calls to named subpatterns */ + + if (*ptr == '=' || *ptr == '>') + { + while ((compile_block.ctypes[*(++ptr)] & ctype_word) != 0); + if (*ptr != ')') + { + errorcode = ERR42; + goto PCRE_ERROR_RETURN; + } + break; + } + + /* Unknown character after (?P */ + + errorcode = ERR41; + goto PCRE_ERROR_RETURN; + + /* Lookbehinds are in Perl from version 5.005 */ + + case '<': + ptr += 3; + if (*ptr == '=' || *ptr == '!') + { + branch_newextra = 1 + LINK_SIZE; + length += 1 + LINK_SIZE; /* For the first branch */ + break; + } + errorcode = ERR24; + goto PCRE_ERROR_RETURN; + + /* Conditionals are in Perl from version 5.005. The bracket must either + be followed by a number (for bracket reference) or by an assertion + group, or (a PCRE extension) by 'R' for a recursion test. */ + + case '(': + if (ptr[3] == 'R' && ptr[4] == ')') + { + ptr += 4; + length += 3; + } + else if ((digitab[ptr[3]] & ctype_digit) != 0) + { + ptr += 4; + length += 3; + while ((digitab[*ptr] & ctype_digit) != 0) ptr++; + if (*ptr != ')') + { + errorcode = ERR26; + goto PCRE_ERROR_RETURN; + } + } + else /* An assertion must follow */ + { + ptr++; /* Can treat like ':' as far as spacing is concerned */ + if (ptr[2] != '?' || + (ptr[3] != '=' && ptr[3] != '!' && ptr[3] != '<') ) + { + ptr += 2; /* To get right offset in message */ + errorcode = ERR28; + goto PCRE_ERROR_RETURN; + } + } + break; + + /* Else loop checking valid options until ) is met. Anything else is an + error. If we are without any brackets, i.e. at top level, the settings + act as if specified in the options, so massage the options immediately. + This is for backward compatibility with Perl 5.004. */ + + default: + set = unset = 0; + optset = &set; + ptr += 2; + + for (;; ptr++) + { + c = *ptr; + switch (c) + { + case 'i': + *optset |= PCRE_CASELESS; + continue; + + case 'm': + *optset |= PCRE_MULTILINE; + continue; + + case 's': + *optset |= PCRE_DOTALL; + continue; + + case 'x': + *optset |= PCRE_EXTENDED; + continue; + + case 'X': + *optset |= PCRE_EXTRA; + continue; + + case 'U': + *optset |= PCRE_UNGREEDY; + continue; + + case '-': + optset = &unset; + continue; + + /* A termination by ')' indicates an options-setting-only item; if + this is at the very start of the pattern (indicated by item_count + being zero), we use it to set the global options. This is helpful + when analyzing the pattern for first characters, etc. Otherwise + nothing is done here and it is handled during the compiling + process. + + We allow for more than one options setting at the start. If such + settings do not change the existing options, nothing is compiled. + However, we must leave space just in case something is compiled. + This can happen for pathological sequences such as (?i)(?-i) + because the global options will end up with -i set. The space is + small and not significant. (Before I did this there was a reported + bug with (?i)(?-i) in a machine-generated pattern.) + + [Historical note: Up to Perl 5.8, options settings at top level + were always global settings, wherever they appeared in the pattern. + That is, they were equivalent to an external setting. From 5.8 + onwards, they apply only to what follows (which is what you might + expect).] */ + + case ')': + if (item_count == 0) + { + options = (options | set) & (~unset); + set = unset = 0; /* To save length */ + item_count--; /* To allow for several */ + length += 2; + } + + /* Fall through */ + + /* A termination by ':' indicates the start of a nested group with + the given options set. This is again handled at compile time, but + we must allow for compiled space if any of the ims options are + set. We also have to allow for resetting space at the end of + the group, which is why 4 is added to the length and not just 2. + If there are several changes of options within the same group, this + will lead to an over-estimate on the length, but this shouldn't + matter very much. We also have to allow for resetting options at + the start of any alternations, which we do by setting + branch_newextra to 2. Finally, we record whether the case-dependent + flag ever changes within the regex. This is used by the "required + character" code. */ + + case ':': + if (((set|unset) & PCRE_IMS) != 0) + { + length += 4; + branch_newextra = 2; + if (((set|unset) & PCRE_CASELESS) != 0) options |= PCRE_ICHANGED; + } + goto END_OPTIONS; + + /* Unrecognized option character */ + + default: + errorcode = ERR12; + goto PCRE_ERROR_RETURN; + } + } + + /* If we hit a closing bracket, that's it - this is a freestanding + option-setting. We need to ensure that branch_extra is updated if + necessary. The only values branch_newextra can have here are 0 or 2. + If the value is 2, then branch_extra must either be 2 or 5, depending + on whether this is a lookbehind group or not. */ + + END_OPTIONS: + if (c == ')') + { + if (branch_newextra == 2 && + (branch_extra == 0 || branch_extra == 1+LINK_SIZE)) + branch_extra += branch_newextra; + continue; + } + + /* If options were terminated by ':' control comes here. This is a + non-capturing group with an options change. There is nothing more that + needs to be done because "capturing" is already set FALSE by default; + we can just fall through. */ + + } + } + + /* Ordinary parentheses, not followed by '?', are capturing unless + PCRE_NO_AUTO_CAPTURE is set. */ + + else capturing = (options & PCRE_NO_AUTO_CAPTURE) == 0; + + /* Capturing brackets must be counted so we can process escapes in a + Perlish way. If the number exceeds EXTRACT_BASIC_MAX we are going to need + an additional 3 bytes of memory per capturing bracket. */ + + if (capturing) + { + bracount++; + if (bracount > EXTRACT_BASIC_MAX) bracket_length += 3; + } + + /* Save length for computing whole length at end if there's a repeat that + requires duplication of the group. Also save the current value of + branch_extra, and start the new group with the new value. If non-zero, this + will either be 2 for a (?imsx: group, or 3 for a lookbehind assertion. */ + + if (brastackptr >= sizeof(brastack)/sizeof(int)) + { + errorcode = ERR19; + goto PCRE_ERROR_RETURN; + } + + bralenstack[brastackptr] = branch_extra; + branch_extra = branch_newextra; + + brastack[brastackptr++] = length; + length += bracket_length; + continue; + + /* Handle ket. Look for subsequent max/min; for certain sets of values we + have to replicate this bracket up to that many times. If brastackptr is + 0 this is an unmatched bracket which will generate an error, but take care + not to try to access brastack[-1] when computing the length and restoring + the branch_extra value. */ + + case ')': + length += 1 + LINK_SIZE; + if (brastackptr > 0) + { + duplength = length - brastack[--brastackptr]; + branch_extra = bralenstack[brastackptr]; + } + else duplength = 0; + + /* The following code is also used when a recursion such as (?3) is + followed by a quantifier, because in that case, it has to be wrapped inside + brackets so that the quantifier works. The value of duplength must be + set before arrival. */ + + HANDLE_QUANTIFIED_BRACKETS: + + /* Leave ptr at the final char; for read_repeat_counts this happens + automatically; for the others we need an increment. */ + + if ((c = ptr[1]) == '{' && is_counted_repeat(ptr+2)) + { + ptr = read_repeat_counts(ptr+2, &min, &max, &errorcode); + if (errorcode != 0) goto PCRE_ERROR_RETURN; + } + else if (c == '*') { min = 0; max = -1; ptr++; } + else if (c == '+') { min = 1; max = -1; ptr++; } + else if (c == '?') { min = 0; max = 1; ptr++; } + else { min = 1; max = 1; } + + /* If the minimum is zero, we have to allow for an OP_BRAZERO before the + group, and if the maximum is greater than zero, we have to replicate + maxval-1 times; each replication acquires an OP_BRAZERO plus a nesting + bracket set. */ + + if (min == 0) + { + length++; + if (max > 0) length += (max - 1) * (duplength + 3 + 2*LINK_SIZE); + } + + /* When the minimum is greater than zero, we have to replicate up to + minval-1 times, with no additions required in the copies. Then, if there + is a limited maximum we have to replicate up to maxval-1 times allowing + for a BRAZERO item before each optional copy and nesting brackets for all + but one of the optional copies. */ + + else + { + length += (min - 1) * duplength; + if (max > min) /* Need this test as max=-1 means no limit */ + length += (max - min) * (duplength + 3 + 2*LINK_SIZE) + - (2 + 2*LINK_SIZE); + } + + /* Allow space for once brackets for "possessive quantifier" */ + + if (ptr[1] == '+') + { + ptr++; + length += 2 + 2*LINK_SIZE; + } + continue; + + /* Non-special character. It won't be space or # in extended mode, so it is + always a genuine character. If we are in a \Q...\E sequence, check for the + end; if not, we have a literal. */ + + default: + NORMAL_CHAR: + + if (inescq && c == '\\' && ptr[1] == 'E') + { + inescq = FALSE; + ptr++; + continue; + } + + length += 2; /* For a one-byte character */ + lastitemlength = 1; /* Default length of last item for repeats */ + + /* In UTF-8 mode, check for additional bytes. */ + +#ifdef SUPPORT_UTF8 + if (utf8 && (c & 0xc0) == 0xc0) + { + while ((ptr[1] & 0xc0) == 0x80) /* Can't flow over the end */ + { /* because the end is marked */ + lastitemlength++; /* by a zero byte. */ + length++; + ptr++; + } + } +#endif + + continue; + } + } + +length += 2 + LINK_SIZE; /* For final KET and END */ + +if ((options & PCRE_AUTO_CALLOUT) != 0) + length += 2 + 2*LINK_SIZE; /* For final callout */ + +if (length > MAX_PATTERN_SIZE) + { + errorcode = ERR20; + goto PCRE_EARLY_ERROR_RETURN; + } + +/* Compute the size of data block needed and get it, either from malloc or +externally provided function. */ + +size = length + sizeof(real_pcre) + name_count * (max_name_size + 3); +re = (real_pcre *)(pcre_malloc)(size); + +if (re == NULL) + { + errorcode = ERR21; + goto PCRE_EARLY_ERROR_RETURN; + } + +/* Put in the magic number, and save the sizes, options, and character table +pointer. NULL is used for the default character tables. The nullpad field is at +the end; it's there to help in the case when a regex compiled on a system with +4-byte pointers is run on another with 8-byte pointers. */ + +re->magic_number = MAGIC_NUMBER; +re->size = size; +re->options = options; +re->dummy1 = 0; +re->name_table_offset = sizeof(real_pcre); +re->name_entry_size = max_name_size + 3; +re->name_count = name_count; +re->ref_count = 0; +re->tables = (tables == _pcre_default_tables)? NULL : tables; +re->nullpad = NULL; + +/* The starting points of the name/number translation table and of the code are +passed around in the compile data block. */ + +compile_block.names_found = 0; +compile_block.name_entry_size = max_name_size + 3; +compile_block.name_table = (uschar *)re + re->name_table_offset; +codestart = compile_block.name_table + re->name_entry_size * re->name_count; +compile_block.start_code = codestart; +compile_block.start_pattern = (const uschar *)pattern; +compile_block.req_varyopt = 0; +compile_block.nopartial = FALSE; + +/* Set up a starting, non-extracting bracket, then compile the expression. On +error, errorcode will be set non-zero, so we don't need to look at the result +of the function here. */ + +ptr = (const uschar *)pattern; +code = (uschar *)codestart; +*code = OP_BRA; +bracount = 0; +(void)compile_regex(options, options & PCRE_IMS, &bracount, &code, &ptr, + &errorcode, FALSE, 0, &firstbyte, &reqbyte, NULL, &compile_block); +re->top_bracket = bracount; +re->top_backref = compile_block.top_backref; + +if (compile_block.nopartial) re->options |= PCRE_NOPARTIAL; + +/* If not reached end of pattern on success, there's an excess bracket. */ + +if (errorcode == 0 && *ptr != 0) errorcode = ERR22; + +/* Fill in the terminating state and check for disastrous overflow, but +if debugging, leave the test till after things are printed out. */ + +*code++ = OP_END; + +#ifndef DEBUG +if (code - codestart > length) errorcode = ERR23; +#endif + +/* Give an error if there's back reference to a non-existent capturing +subpattern. */ + +if (re->top_backref > re->top_bracket) errorcode = ERR15; + +/* Failed to compile, or error while post-processing */ + +if (errorcode != 0) + { + (pcre_free)(re); + PCRE_ERROR_RETURN: + *erroroffset = ptr - (const uschar *)pattern; + PCRE_EARLY_ERROR_RETURN: + *errorptr = error_texts[errorcode]; + if (errorcodeptr != NULL) *errorcodeptr = errorcode; + return NULL; + } + +/* If the anchored option was not passed, set the flag if we can determine that +the pattern is anchored by virtue of ^ characters or \A or anything else (such +as starting with .* when DOTALL is set). + +Otherwise, if we know what the first character has to be, save it, because that +speeds up unanchored matches no end. If not, see if we can set the +PCRE_STARTLINE flag. This is helpful for multiline matches when all branches +start with ^. and also when all branches start with .* for non-DOTALL matches. +*/ + +if ((options & PCRE_ANCHORED) == 0) + { + int temp_options = options; + if (is_anchored(codestart, &temp_options, 0, compile_block.backref_map)) + re->options |= PCRE_ANCHORED; + else + { + if (firstbyte < 0) + firstbyte = find_firstassertedchar(codestart, &temp_options, FALSE); + if (firstbyte >= 0) /* Remove caseless flag for non-caseable chars */ + { + int ch = firstbyte & 255; + re->first_byte = ((firstbyte & REQ_CASELESS) != 0 && + compile_block.fcc[ch] == ch)? ch : firstbyte; + re->options |= PCRE_FIRSTSET; + } + else if (is_startline(codestart, 0, compile_block.backref_map)) + re->options |= PCRE_STARTLINE; + } + } + +/* For an anchored pattern, we use the "required byte" only if it follows a +variable length item in the regex. Remove the caseless flag for non-caseable +bytes. */ + +if (reqbyte >= 0 && + ((re->options & PCRE_ANCHORED) == 0 || (reqbyte & REQ_VARY) != 0)) + { + int ch = reqbyte & 255; + re->req_byte = ((reqbyte & REQ_CASELESS) != 0 && + compile_block.fcc[ch] == ch)? (reqbyte & ~REQ_CASELESS) : reqbyte; + re->options |= PCRE_REQCHSET; + } + +/* Print out the compiled data for debugging */ + +#ifdef DEBUG + +printf("Length = %d top_bracket = %d top_backref = %d\n", + length, re->top_bracket, re->top_backref); + +if (re->options != 0) + { + printf("%s%s%s%s%s%s%s%s%s%s\n", + ((re->options & PCRE_NOPARTIAL) != 0)? "nopartial " : "", + ((re->options & PCRE_ANCHORED) != 0)? "anchored " : "", + ((re->options & PCRE_CASELESS) != 0)? "caseless " : "", + ((re->options & PCRE_ICHANGED) != 0)? "case state changed " : "", + ((re->options & PCRE_EXTENDED) != 0)? "extended " : "", + ((re->options & PCRE_MULTILINE) != 0)? "multiline " : "", + ((re->options & PCRE_DOTALL) != 0)? "dotall " : "", + ((re->options & PCRE_DOLLAR_ENDONLY) != 0)? "endonly " : "", + ((re->options & PCRE_EXTRA) != 0)? "extra " : "", + ((re->options & PCRE_UNGREEDY) != 0)? "ungreedy " : ""); + } + +if ((re->options & PCRE_FIRSTSET) != 0) + { + int ch = re->first_byte & 255; + const char *caseless = ((re->first_byte & REQ_CASELESS) == 0)? "" : " (caseless)"; + if (isprint(ch)) printf("First char = %c%s\n", ch, caseless); + else printf("First char = \\x%02x%s\n", ch, caseless); + } + +if ((re->options & PCRE_REQCHSET) != 0) + { + int ch = re->req_byte & 255; + const char *caseless = ((re->req_byte & REQ_CASELESS) == 0)? "" : " (caseless)"; + if (isprint(ch)) printf("Req char = %c%s\n", ch, caseless); + else printf("Req char = \\x%02x%s\n", ch, caseless); + } + +_pcre_printint(re, stdout); + +/* This check is done here in the debugging case so that the code that +was compiled can be seen. */ + +if (code - codestart > length) + { + (pcre_free)(re); + *errorptr = error_texts[ERR23]; + *erroroffset = ptr - (uschar *)pattern; + if (errorcodeptr != NULL) *errorcodeptr = ERR23; + return NULL; + } +#endif + +return (pcre *)re; +} + +/* End of pcre_compile.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains the external function pcre_config(). */ + + + + +/************************************************* +* Return info about what features are configured * +*************************************************/ + +/* This function has an extensible interface so that additional items can be +added compatibly. + +Arguments: + what what information is required + where where to put the information + +Returns: 0 if data returned, negative on error +*/ + +EXPORT int +pcre_config(int what, void *where) +{ +switch (what) + { + case PCRE_CONFIG_UTF8: +#ifdef SUPPORT_UTF8 + *((int *)where) = 1; +#else + *((int *)where) = 0; +#endif + break; + + case PCRE_CONFIG_UNICODE_PROPERTIES: +#ifdef SUPPORT_UCP + *((int *)where) = 1; +#else + *((int *)where) = 0; +#endif + break; + + case PCRE_CONFIG_NEWLINE: + *((int *)where) = NEWLINE; + break; + + case PCRE_CONFIG_LINK_SIZE: + *((int *)where) = LINK_SIZE; + break; + + case PCRE_CONFIG_POSIX_MALLOC_THRESHOLD: + *((int *)where) = POSIX_MALLOC_THRESHOLD; + break; + + case PCRE_CONFIG_MATCH_LIMIT: + *((unsigned int *)where) = MATCH_LIMIT; + break; + + case PCRE_CONFIG_STACKRECURSE: +#ifdef NO_RECURSE + *((int *)where) = 0; +#else + *((int *)where) = 1; +#endif + break; + + default: return PCRE_ERROR_BADOPTION; + } + +return 0; +} + +/* End of pcre_config.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains the external function pcre_dfa_exec(), which is an +alternative matching function that uses a DFA algorithm. This is NOT Perl- +compatible, but it has advantages in certain applications. */ + + + + +/* For use to indent debugging output */ + +#define SP " " + + + +/************************************************* +* Code parameters and static tables * +*************************************************/ + +/* These are offsets that are used to turn the OP_TYPESTAR and friends opcodes +into others, under special conditions. A gap of 10 between the blocks should be +enough. */ + +#define OP_PROP_EXTRA (EXTRACT_BASIC_MAX+1) +#define OP_EXTUNI_EXTRA (EXTRACT_BASIC_MAX+11) + + +/* This table identifies those opcodes that are followed immediately by a +character that is to be tested in some way. This makes is possible to +centralize the loading of these characters. In the case of Type * etc, the +"character" is the opcode for \D, \d, \S, \s, \W, or \w, which will always be a +small value. */ + +static uschar coptable[] = { + 0, /* End */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* \A, \G, \B, \b, \D, \d, \S, \s, \W, \w */ + 0, 0, /* Any, Anybyte */ + 0, 0, 0, /* NOTPROP, PROP, EXTUNI */ + 0, 0, 0, 0, 0, /* \Z, \z, Opt, ^, $ */ + 1, /* Char */ + 1, /* Charnc */ + 1, /* not */ + /* Positive single-char repeats */ + 1, 1, 1, 1, 1, 1, /* *, *?, +, +?, ?, ?? */ + 3, 3, 3, /* upto, minupto, exact */ + /* Negative single-char repeats - only for chars < 256 */ + 1, 1, 1, 1, 1, 1, /* NOT *, *?, +, +?, ?, ?? */ + 3, 3, 3, /* NOT upto, minupto, exact */ + /* Positive type repeats */ + 1, 1, 1, 1, 1, 1, /* Type *, *?, +, +?, ?, ?? */ + 3, 3, 3, /* Type upto, minupto, exact */ + /* Character class & ref repeats */ + 0, 0, 0, 0, 0, 0, /* *, *?, +, +?, ?, ?? */ + 0, 0, /* CRRANGE, CRMINRANGE */ + 0, /* CLASS */ + 0, /* NCLASS */ + 0, /* XCLASS - variable length */ + 0, /* REF */ + 0, /* RECURSE */ + 0, /* CALLOUT */ + 0, /* Alt */ + 0, /* Ket */ + 0, /* KetRmax */ + 0, /* KetRmin */ + 0, /* Assert */ + 0, /* Assert not */ + 0, /* Assert behind */ + 0, /* Assert behind not */ + 0, /* Reverse */ + 0, /* Once */ + 0, /* COND */ + 0, /* CREF */ + 0, 0, /* BRAZERO, BRAMINZERO */ + 0, /* BRANUMBER */ + 0 /* BRA */ +}; + +/* These 2 tables allow for compact code for testing for \D, \d, \S, \s, \W, +and \w */ + +static uschar toptable1[] = { + 0, 0, 0, 0, 0, + ctype_digit, ctype_digit, + ctype_space, ctype_space, + ctype_word, ctype_word, + 0 /* OP_ANY */ +}; + +static uschar toptable2[] = { + 0, 0, 0, 0, 0, + ctype_digit, 0, + ctype_space, 0, + ctype_word, 0, + 1 /* OP_ANY */ +}; + + +/* Structure for holding data about a particular state, which is in effect the +current data for an active path through the match tree. It must consist +entirely of ints because the working vector we are passed, and which we put +these structures in, is a vector of ints. */ + +typedef struct stateblock { + int offset; /* Offset to opcode */ + int count; /* Count for repeats */ + int ims; /* ims flag bits */ + int data; /* Some use extra data */ +} stateblock; + +#define INTS_PER_STATEBLOCK (sizeof(stateblock)/sizeof(int)) + + +#ifdef DEBUG +/************************************************* +* Print character string * +*************************************************/ + +/* Character string printing function for debugging. + +Arguments: + p points to string + length number of bytes + f where to print + +Returns: nothing +*/ + +static void +pchars(unsigned char *p, int length, FILE *f) +{ +int c; +while (length-- > 0) + { + if (isprint(c = *(p++))) + fprintf(f, "%c", c); + else + fprintf(f, "\\x%02x", c); + } +} +#endif + + + +/************************************************* +* Execute a Regular Expression - DFA engine * +*************************************************/ + +/* This internal function applies a compiled pattern to a subject string, +starting at a given point, using a DFA engine. This function is called from the +external one, possibly multiple times if the pattern is not anchored. The +function calls itself recursively for some kinds of subpattern. + +Arguments: + md the match_data block with fixed information + this_start_code the opening bracket of this subexpression's code + current_subject where we currently are in the subject string + start_offset start offset in the subject string + offsets vector to contain the matching string offsets + offsetcount size of same + workspace vector of workspace + wscount size of same + ims the current ims flags + rlevel function call recursion level + recursing regex recursive call level + +Returns: > 0 => + = 0 => + -1 => failed to match + < -1 => some kind of unexpected problem + +The following macros are used for adding states to the two state vectors (one +for the current character, one for the following character). */ + +#define ADD_ACTIVE(x,y) \ + if (active_count++ < wscount) \ + { \ + next_active_state->offset = (x); \ + next_active_state->count = (y); \ + next_active_state->ims = ims; \ + next_active_state++; \ + DPRINTF(("%.*sADD_ACTIVE(%d,%d)\n", rlevel*2-2, SP, (x), (y))); \ + } \ + else return PCRE_ERROR_DFA_WSSIZE + +#define ADD_ACTIVE_DATA(x,y,z) \ + if (active_count++ < wscount) \ + { \ + next_active_state->offset = (x); \ + next_active_state->count = (y); \ + next_active_state->ims = ims; \ + next_active_state->data = (z); \ + next_active_state++; \ + DPRINTF(("%.*sADD_ACTIVE_DATA(%d,%d,%d)\n", rlevel*2-2, SP, (x), (y), (z))); \ + } \ + else return PCRE_ERROR_DFA_WSSIZE + +#define ADD_NEW(x,y) \ + if (new_count++ < wscount) \ + { \ + next_new_state->offset = (x); \ + next_new_state->count = (y); \ + next_new_state->ims = ims; \ + next_new_state++; \ + DPRINTF(("%.*sADD_NEW(%d,%d)\n", rlevel*2-2, SP, (x), (y))); \ + } \ + else return PCRE_ERROR_DFA_WSSIZE + +#define ADD_NEW_DATA(x,y,z) \ + if (new_count++ < wscount) \ + { \ + next_new_state->offset = (x); \ + next_new_state->count = (y); \ + next_new_state->ims = ims; \ + next_new_state->data = (z); \ + next_new_state++; \ + DPRINTF(("%.*sADD_NEW_DATA(%d,%d,%d)\n", rlevel*2-2, SP, (x), (y), (z))); \ + } \ + else return PCRE_ERROR_DFA_WSSIZE + +/* And now, here is the code */ + +static int +internal_dfa_exec( + dfa_match_data *md, + const uschar *this_start_code, + const uschar *current_subject, + int start_offset, + int *offsets, + int offsetcount, + int *workspace, + int wscount, + int ims, + int rlevel, + int recursing) +{ +stateblock *active_states, *new_states, *temp_states; +stateblock *next_active_state, *next_new_state; + +const uschar *ctypes, *lcc, *fcc; +const uschar *ptr; +const uschar *end_code; + +int active_count, new_count, match_count; + +/* Some fields in the md block are frequently referenced, so we load them into +independent variables in the hope that this will perform better. */ + +const uschar *start_subject = md->start_subject; +const uschar *end_subject = md->end_subject; +const uschar *start_code = md->start_code; + +BOOL utf8 = (md->poptions & PCRE_UTF8) != 0; + +rlevel++; +offsetcount &= (-2); + +wscount -= 2; +wscount = (wscount - (wscount % (INTS_PER_STATEBLOCK * 2))) / + (2 * INTS_PER_STATEBLOCK); + +DPRINTF(("\n%.*s---------------------\n" + "%.*sCall to internal_dfa_exec f=%d r=%d\n", + rlevel*2-2, SP, rlevel*2-2, SP, rlevel, recursing)); + +ctypes = md->tables + ctypes_offset; +lcc = md->tables + lcc_offset; +fcc = md->tables + fcc_offset; + +match_count = PCRE_ERROR_NOMATCH; /* A negative number */ + +active_states = (stateblock *)(workspace + 2); +next_new_state = new_states = active_states + wscount; +new_count = 0; + +/* The first thing in any (sub) pattern is a bracket of some sort. Push all +the alternative states onto the list, and find out where the end is. This +makes is possible to use this function recursively, when we want to stop at a +matching internal ket rather than at the end. + +If the first opcode in the first alternative is OP_REVERSE, we are dealing with +a backward assertion. In that case, we have to find out the maximum amount to +move back, and set up each alternative appropriately. */ + +if (this_start_code[1+LINK_SIZE] == OP_REVERSE) + { + int max_back = 0; + int gone_back; + + end_code = this_start_code; + do + { + int back = GET(end_code, 2+LINK_SIZE); + if (back > max_back) max_back = back; + end_code += GET(end_code, 1); + } + while (*end_code == OP_ALT); + + /* If we can't go back the amount required for the longest lookbehind + pattern, go back as far as we can; some alternatives may still be viable. */ + +#ifdef SUPPORT_UTF8 + /* In character mode we have to step back character by character */ + + if (utf8) + { + for (gone_back = 0; gone_back < max_back; gone_back++) + { + if (current_subject <= start_subject) break; + current_subject--; + while (current_subject > start_subject && + (*current_subject & 0xc0) == 0x80) + current_subject--; + } + } + else +#endif + + /* In byte-mode we can do this quickly. */ + + { + gone_back = (current_subject - max_back < start_subject)? + current_subject - start_subject : max_back; + current_subject -= gone_back; + } + + /* Now we can process the individual branches. */ + + end_code = this_start_code; + do + { + int back = GET(end_code, 2+LINK_SIZE); + if (back <= gone_back) + { + int bstate = end_code - start_code + 2 + 2*LINK_SIZE; + ADD_NEW_DATA(-bstate, 0, gone_back - back); + } + end_code += GET(end_code, 1); + } + while (*end_code == OP_ALT); + } + +/* This is the code for a "normal" subpattern (not a backward assertion). The +start of a whole pattern is always one of these. If we are at the top level, +we may be asked to restart matching from the same point that we reached for a +previous partial match. We still have to scan through the top-level branches to +find the end state. */ + +else + { + end_code = this_start_code; + + /* Restarting */ + + if (rlevel == 1 && (md->moptions & PCRE_DFA_RESTART) != 0) + { + do { end_code += GET(end_code, 1); } while (*end_code == OP_ALT); + new_count = workspace[1]; + if (!workspace[0]) + memcpy(new_states, active_states, new_count * sizeof(stateblock)); + } + + /* Not restarting */ + + else + { + do + { + ADD_NEW(end_code - start_code + 1 + LINK_SIZE, 0); + end_code += GET(end_code, 1); + } + while (*end_code == OP_ALT); + } + } + +workspace[0] = 0; /* Bit indicating which vector is current */ + +DPRINTF(("%.*sEnd state = %d\n", rlevel*2-2, SP, end_code - start_code)); + +/* Loop for scanning the subject */ + +ptr = current_subject; +for (;;) + { + int i, j; + int c, d, clen, dlen; + + /* Make the new state list into the active state list and empty the + new state list. */ + + temp_states = active_states; + active_states = new_states; + new_states = temp_states; + active_count = new_count; + new_count = 0; + + workspace[0] ^= 1; /* Remember for the restarting feature */ + workspace[1] = active_count; + +#ifdef DEBUG + printf("%.*sNext character: rest of subject = \"", rlevel*2-2, SP); + pchars((uschar *)ptr, strlen((char *)ptr), stdout); + printf("\"\n"); + + printf("%.*sActive states: ", rlevel*2-2, SP); + for (i = 0; i < active_count; i++) + printf("%d/%d ", active_states[i].offset, active_states[i].count); + printf("\n"); +#endif + + /* Set the pointers for adding new states */ + + next_active_state = active_states + active_count; + next_new_state = new_states; + + /* Load the current character from the subject outside the loop, as many + different states may want to look at it, and we assume that at least one + will. */ + + if (ptr < end_subject) + { + clen = 1; +#ifdef SUPPORT_UTF8 + if (utf8) { GETCHARLEN(c, ptr, clen); } else +#endif /* SUPPORT_UTF8 */ + c = *ptr; + } + else + { + clen = 0; /* At end subject */ + c = -1; + } + + /* Scan up the active states and act on each one. The result of an action + may be to add more states to the currently active list (e.g. on hitting a + parenthesis) or it may be to put states on the new list, for considering + when we move the character pointer on. */ + + for (i = 0; i < active_count; i++) + { + stateblock *current_state = active_states + i; + const uschar *code; + int state_offset = current_state->offset; + int count, codevalue; + int chartype, othercase; + +#ifdef DEBUG + printf ("%.*sProcessing state %d c=", rlevel*2-2, SP, state_offset); + if (c < 0) printf("-1\n"); + else if (c > 32 && c < 127) printf("'%c'\n", c); + else printf("0x%02x\n", c); +#endif + + /* This variable is referred to implicity in the ADD_xxx macros. */ + + ims = current_state->ims; + + /* A negative offset is a special case meaning "hold off going to this + (negated) state until the number of characters in the data field have + been skipped". */ + + if (state_offset < 0) + { + if (current_state->data > 0) + { + DPRINTF(("%.*sSkipping this character\n", rlevel*2-2, SP)); + ADD_NEW_DATA(state_offset, current_state->count, + current_state->data - 1); + continue; + } + else + { + current_state->offset = state_offset = -state_offset; + } + } + + /* Check for a duplicate state with the same count, and skip if found. */ + + for (j = 0; j < i; j++) + { + if (active_states[j].offset == state_offset && + active_states[j].count == current_state->count) + { + DPRINTF(("%.*sDuplicate state: skipped\n", rlevel*2-2, SP)); + goto NEXT_ACTIVE_STATE; + } + } + + /* The state offset is the offset to the opcode */ + + code = start_code + state_offset; + codevalue = *code; + if (codevalue >= OP_BRA) codevalue = OP_BRA; /* All brackets are equal */ + + /* If this opcode is followed by an inline character, load it. It is + tempting to test for the presence of a subject character here, but that + is wrong, because sometimes zero repetitions of the subject are + permitted. + + We also use this mechanism for opcodes such as OP_TYPEPLUS that take an + argument that is not a data character - but is always one byte long. + Unfortunately, we have to take special action to deal with \P, \p, and + \X in this case. To keep the other cases fast, convert these ones to new + opcodes. */ + + if (coptable[codevalue] > 0) + { + dlen = 1; +#ifdef SUPPORT_UTF8 + if (utf8) { GETCHARLEN(d, (code + coptable[codevalue]), dlen); } else +#endif /* SUPPORT_UTF8 */ + d = code[coptable[codevalue]]; + if (codevalue >= OP_TYPESTAR) + { + if (d == OP_ANYBYTE) return PCRE_ERROR_DFA_UITEM; + if (d >= OP_NOTPROP) + codevalue += (d == OP_EXTUNI)? OP_EXTUNI_EXTRA : OP_PROP_EXTRA; + } + } + else + { + dlen = 0; /* Not strictly necessary, but compilers moan */ + d = -1; /* if these variables are not set. */ + } + + + /* Now process the individual opcodes */ + + switch (codevalue) + { + +/* ========================================================================== */ + /* Reached a closing bracket. If not at the end of the pattern, carry + on with the next opcode. Otherwise, unless we have an empty string and + PCRE_NOTEMPTY is set, save the match data, shifting up all previous + matches so we always have the longest first. */ + + case OP_KET: + case OP_KETRMIN: + case OP_KETRMAX: + if (code != end_code) + { + ADD_ACTIVE(state_offset + 1 + LINK_SIZE, 0); + if (codevalue != OP_KET) + { + ADD_ACTIVE(state_offset - GET(code, 1), 0); + } + } + else if (ptr > current_subject || (md->moptions & PCRE_NOTEMPTY) == 0) + { + if (match_count < 0) match_count = (offsetcount >= 2)? 1 : 0; + else if (match_count > 0 && ++match_count * 2 >= offsetcount) + match_count = 0; + count = ((match_count == 0)? offsetcount : match_count * 2) - 2; + if (count > 0) memmove(offsets + 2, offsets, count * sizeof(int)); + if (offsetcount >= 2) + { + offsets[0] = current_subject - start_subject; + offsets[1] = ptr - start_subject; + DPRINTF(("%.*sSet matched string = \"%.*s\"\n", rlevel*2-2, SP, + offsets[1] - offsets[0], current_subject)); + } + if ((md->moptions & PCRE_DFA_SHORTEST) != 0) + { + DPRINTF(("%.*sEnd of internal_dfa_exec %d: returning %d\n" + "%.*s---------------------\n\n", rlevel*2-2, SP, rlevel, + match_count, rlevel*2-2, SP)); + return match_count; + } + } + break; + +/* ========================================================================== */ + /* These opcodes add to the current list of states without looking + at the current character. */ + + /*-----------------------------------------------------------------*/ + case OP_ALT: + do { code += GET(code, 1); } while (*code == OP_ALT); + ADD_ACTIVE(code - start_code, 0); + break; + + /*-----------------------------------------------------------------*/ + case OP_BRA: + do + { + ADD_ACTIVE(code - start_code + 1 + LINK_SIZE, 0); + code += GET(code, 1); + } + while (*code == OP_ALT); + break; + + /*-----------------------------------------------------------------*/ + case OP_BRAZERO: + case OP_BRAMINZERO: + ADD_ACTIVE(state_offset + 1, 0); + code += 1 + GET(code, 2); + while (*code == OP_ALT) code += GET(code, 1); + ADD_ACTIVE(code - start_code + 1 + LINK_SIZE, 0); + break; + + /*-----------------------------------------------------------------*/ + case OP_BRANUMBER: + ADD_ACTIVE(state_offset + 1 + LINK_SIZE, 0); + break; + + /*-----------------------------------------------------------------*/ + case OP_CIRC: + if ((ptr == start_subject && (md->moptions & PCRE_NOTBOL) == 0) || + ((ims & PCRE_MULTILINE) != 0 && ptr[-1] == NEWLINE)) + { ADD_ACTIVE(state_offset + 1, 0); } + break; + + /*-----------------------------------------------------------------*/ + case OP_EOD: + if (ptr >= end_subject) { ADD_ACTIVE(state_offset + 1, 0); } + break; + + /*-----------------------------------------------------------------*/ + case OP_OPT: + ims = code[1]; + ADD_ACTIVE(state_offset + 2, 0); + break; + + /*-----------------------------------------------------------------*/ + case OP_SOD: + if (ptr == start_subject) { ADD_ACTIVE(state_offset + 1, 0); } + break; + + /*-----------------------------------------------------------------*/ + case OP_SOM: + if (ptr == start_subject + start_offset) { ADD_ACTIVE(state_offset + 1, 0); } + break; + + +/* ========================================================================== */ + /* These opcodes inspect the next subject character, and sometimes + the previous one as well, but do not have an argument. The variable + clen contains the length of the current character and is zero if we are + at the end of the subject. */ + + /*-----------------------------------------------------------------*/ + case OP_ANY: + if (clen > 0 && (c != NEWLINE || (ims & PCRE_DOTALL) != 0)) + { ADD_NEW(state_offset + 1, 0); } + break; + + /*-----------------------------------------------------------------*/ + case OP_EODN: + if (clen == 0 || (c == NEWLINE && ptr + 1 == end_subject)) + { ADD_ACTIVE(state_offset + 1, 0); } + break; + + /*-----------------------------------------------------------------*/ + case OP_DOLL: + if ((md->moptions & PCRE_NOTEOL) == 0) + { + if (clen == 0 || (c == NEWLINE && (ptr + 1 == end_subject || + (ims & PCRE_MULTILINE) != 0))) + { ADD_ACTIVE(state_offset + 1, 0); } + } + else if (c == NEWLINE && (ims & PCRE_MULTILINE) != 0) + { ADD_ACTIVE(state_offset + 1, 0); } + break; + + /*-----------------------------------------------------------------*/ + + case OP_DIGIT: + case OP_WHITESPACE: + case OP_WORDCHAR: + if (clen > 0 && c < 256 && + ((ctypes[c] & toptable1[codevalue]) ^ toptable2[codevalue]) != 0) + { ADD_NEW(state_offset + 1, 0); } + break; + + /*-----------------------------------------------------------------*/ + case OP_NOT_DIGIT: + case OP_NOT_WHITESPACE: + case OP_NOT_WORDCHAR: + if (clen > 0 && (c >= 256 || + ((ctypes[c] & toptable1[codevalue]) ^ toptable2[codevalue]) != 0)) + { ADD_NEW(state_offset + 1, 0); } + break; + + /*-----------------------------------------------------------------*/ + case OP_WORD_BOUNDARY: + case OP_NOT_WORD_BOUNDARY: + { + int left_word, right_word; + + if (ptr > start_subject) + { + const uschar *temp = ptr - 1; +#ifdef SUPPORT_UTF8 + if (utf8) BACKCHAR(temp); +#endif + GETCHARTEST(d, temp); + left_word = d < 256 && (ctypes[d] & ctype_word) != 0; + } + else left_word = 0; + + if (clen > 0) right_word = c < 256 && (ctypes[c] & ctype_word) != 0; + else right_word = 0; + + if ((left_word == right_word) == (codevalue == OP_NOT_WORD_BOUNDARY)) + { ADD_ACTIVE(state_offset + 1, 0); } + } + break; + + +#ifdef SUPPORT_UCP + + /*-----------------------------------------------------------------*/ + /* Check the next character by Unicode property. We will get here only + if the support is in the binary; otherwise a compile-time error occurs. + */ + + case OP_PROP: + case OP_NOTPROP: + if (clen > 0) + { + int rqdtype, category; + category = ucp_findchar(c, &chartype, &othercase); + rqdtype = code[1]; + if (rqdtype >= 128) + { + if ((rqdtype - 128 == category) == (codevalue == OP_PROP)) + { ADD_NEW(state_offset + 2, 0); } + } + else + { + if ((rqdtype == chartype) == (codevalue == OP_PROP)) + { ADD_NEW(state_offset + 2, 0); } + } + } + break; +#endif + + + +/* ========================================================================== */ + /* These opcodes likewise inspect the subject character, but have an + argument that is not a data character. It is one of these opcodes: + OP_ANY, OP_DIGIT, OP_NOT_DIGIT, OP_WHITESPACE, OP_NOT_SPACE, OP_WORDCHAR, + OP_NOT_WORDCHAR. The value is loaded into d. */ + + case OP_TYPEPLUS: + case OP_TYPEMINPLUS: + count = current_state->count; /* Already matched */ + if (count > 0) { ADD_ACTIVE(state_offset + 2, 0); } + if (clen > 0) + { + if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || + (c < 256 && + (d != OP_ANY || c != '\n' || (ims & PCRE_DOTALL) != 0) && + ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) + { + count++; + ADD_NEW(state_offset, count); + } + } + break; + + /*-----------------------------------------------------------------*/ + case OP_TYPEQUERY: + case OP_TYPEMINQUERY: + ADD_ACTIVE(state_offset + 2, 0); + if (clen > 0) + { + if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || + (c < 256 && + (d != OP_ANY || c != '\n' || (ims & PCRE_DOTALL) != 0) && + ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) + { + ADD_NEW(state_offset + 2, 0); + } + } + break; + + /*-----------------------------------------------------------------*/ + case OP_TYPESTAR: + case OP_TYPEMINSTAR: + ADD_ACTIVE(state_offset + 2, 0); + if (clen > 0) + { + if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || + (c < 256 && + (d != OP_ANY || c != '\n' || (ims & PCRE_DOTALL) != 0) && + ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) + { + ADD_NEW(state_offset, 0); + } + } + break; + + /*-----------------------------------------------------------------*/ + case OP_TYPEEXACT: + case OP_TYPEUPTO: + case OP_TYPEMINUPTO: + if (codevalue != OP_TYPEEXACT) + { ADD_ACTIVE(state_offset + 4, 0); } + count = current_state->count; /* Number already matched */ + if (clen > 0) + { + if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || + (c < 256 && + (d != OP_ANY || c != '\n' || (ims & PCRE_DOTALL) != 0) && + ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) + { + if (++count >= GET2(code, 1)) + { ADD_NEW(state_offset + 4, 0); } + else + { ADD_NEW(state_offset, count); } + } + } + break; + +/* ========================================================================== */ + /* These are virtual opcodes that are used when something like + OP_TYPEPLUS has OP_PROP, OP_NOTPROP, or OP_EXTUNI as its argument. It + keeps the code above fast for the other cases. The argument is in the + d variable. */ + + case OP_PROP_EXTRA + OP_TYPEPLUS: + case OP_PROP_EXTRA + OP_TYPEMINPLUS: + count = current_state->count; /* Already matched */ + if (count > 0) { ADD_ACTIVE(state_offset + 3, 0); } + if (clen > 0) + { + int category = ucp_findchar(c, &chartype, &othercase); + int rqdtype = code[2]; + if ((d == OP_PROP) == + (rqdtype == ((rqdtype >= 128)? (category + 128) : chartype))) + { count++; ADD_NEW(state_offset, count); } + } + break; + + /*-----------------------------------------------------------------*/ + case OP_EXTUNI_EXTRA + OP_TYPEPLUS: + case OP_EXTUNI_EXTRA + OP_TYPEMINPLUS: + count = current_state->count; /* Already matched */ + if (count > 0) { ADD_ACTIVE(state_offset + 2, 0); } + if (clen > 0 && ucp_findchar(c, &chartype, &othercase) != ucp_M) + { + const uschar *nptr = ptr + clen; + int ncount = 0; + while (nptr < end_subject) + { + int nd; + int ndlen = 1; + GETCHARLEN(nd, nptr, ndlen); + if (ucp_findchar(nd, &chartype, &othercase) != ucp_M) break; + ncount++; + nptr += ndlen; + } + count++; + ADD_NEW_DATA(-state_offset, count, ncount); + } + break; + + /*-----------------------------------------------------------------*/ + case OP_PROP_EXTRA + OP_TYPEQUERY: + case OP_PROP_EXTRA + OP_TYPEMINQUERY: + count = 3; + goto QS1; + + case OP_PROP_EXTRA + OP_TYPESTAR: + case OP_PROP_EXTRA + OP_TYPEMINSTAR: + count = 0; + + QS1: + + ADD_ACTIVE(state_offset + 3, 0); + if (clen > 0) + { + int category = ucp_findchar(c, &chartype, &othercase); + int rqdtype = code[2]; + if ((d == OP_PROP) == + (rqdtype == ((rqdtype >= 128)? (category + 128) : chartype))) + { ADD_NEW(state_offset + count, 0); } + } + break; + + /*-----------------------------------------------------------------*/ + case OP_EXTUNI_EXTRA + OP_TYPEQUERY: + case OP_EXTUNI_EXTRA + OP_TYPEMINQUERY: + count = 2; + goto QS2; + + case OP_EXTUNI_EXTRA + OP_TYPESTAR: + case OP_EXTUNI_EXTRA + OP_TYPEMINSTAR: + count = 0; + + QS2: + + ADD_ACTIVE(state_offset + 2, 0); + if (clen > 0 && ucp_findchar(c, &chartype, &othercase) != ucp_M) + { + const uschar *nptr = ptr + clen; + int ncount = 0; + while (nptr < end_subject) + { + int nd; + int ndlen = 1; + GETCHARLEN(nd, nptr, ndlen); + if (ucp_findchar(nd, &chartype, &othercase) != ucp_M) break; + ncount++; + nptr += ndlen; + } + ADD_NEW_DATA(-(state_offset + count), 0, ncount); + } + break; + + /*-----------------------------------------------------------------*/ + case OP_PROP_EXTRA + OP_TYPEEXACT: + case OP_PROP_EXTRA + OP_TYPEUPTO: + case OP_PROP_EXTRA + OP_TYPEMINUPTO: + if (codevalue != OP_PROP_EXTRA + OP_TYPEEXACT) + { ADD_ACTIVE(state_offset + 5, 0); } + count = current_state->count; /* Number already matched */ + if (clen > 0) + { + int category = ucp_findchar(c, &chartype, &othercase); + int rqdtype = code[4]; + if ((d == OP_PROP) == + (rqdtype == ((rqdtype >= 128)? (category + 128) : chartype))) + { + if (++count >= GET2(code, 1)) + { ADD_NEW(state_offset + 5, 0); } + else + { ADD_NEW(state_offset, count); } + } + } + break; + + /*-----------------------------------------------------------------*/ + case OP_EXTUNI_EXTRA + OP_TYPEEXACT: + case OP_EXTUNI_EXTRA + OP_TYPEUPTO: + case OP_EXTUNI_EXTRA + OP_TYPEMINUPTO: + if (codevalue != OP_EXTUNI_EXTRA + OP_TYPEEXACT) + { ADD_ACTIVE(state_offset + 4, 0); } + count = current_state->count; /* Number already matched */ + if (clen > 0 && ucp_findchar(c, &chartype, &othercase) != ucp_M) + { + const uschar *nptr = ptr + clen; + int ncount = 0; + while (nptr < end_subject) + { + int nd; + int ndlen = 1; + GETCHARLEN(nd, nptr, ndlen); + if (ucp_findchar(nd, &chartype, &othercase) != ucp_M) break; + ncount++; + nptr += ndlen; + } + if (++count >= GET2(code, 1)) + { ADD_NEW_DATA(-(state_offset + 4), 0, ncount); } + else + { ADD_NEW_DATA(-state_offset, count, ncount); } + } + break; + +/* ========================================================================== */ + /* These opcodes are followed by a character that is usually compared + to the current subject character; it is loaded into d. We still get + here even if there is no subject character, because in some cases zero + repetitions are permitted. */ + + /*-----------------------------------------------------------------*/ + case OP_CHAR: + if (clen > 0 && c == d) { ADD_NEW(state_offset + dlen + 1, 0); } + break; + + /*-----------------------------------------------------------------*/ + case OP_CHARNC: + if (clen == 0) break; + +#ifdef SUPPORT_UTF8 + if (utf8) + { + if (c == d) { ADD_NEW(state_offset + dlen + 1, 0); } else + { + if (c < 128) othercase = fcc[c]; else + + /* If we have Unicode property support, we can use it to test the + other case of the character, if there is one. The result of + ucp_findchar() is < 0 if the char isn't found, and othercase is + returned as zero if there isn't another case. */ + +#ifdef SUPPORT_UCP + if (ucp_findchar(c, &chartype, &othercase) < 0) +#endif + othercase = -1; + + if (d == othercase) { ADD_NEW(state_offset + dlen + 1, 0); } + } + } + else +#endif /* SUPPORT_UTF8 */ + + /* Non-UTF-8 mode */ + { + if (lcc[c] == lcc[d]) { ADD_NEW(state_offset + 2, 0); } + } + break; + + +#ifdef SUPPORT_UCP + /*-----------------------------------------------------------------*/ + /* This is a tricky one because it can match more than one character. + Find out how many characters to skip, and then set up a negative state + to wait for them to pass before continuing. */ + + case OP_EXTUNI: + if (clen > 0 && ucp_findchar(c, &chartype, &othercase) != ucp_M) + { + const uschar *nptr = ptr + clen; + int ncount = 0; + while (nptr < end_subject) + { + int nclen = 1; + GETCHARLEN(c, nptr, nclen); + if (ucp_findchar(c, &chartype, &othercase) != ucp_M) break; + ncount++; + nptr += nclen; + } + ADD_NEW_DATA(-(state_offset + 1), 0, ncount); + } + break; +#endif + + /*-----------------------------------------------------------------*/ + /* Match a negated single character. This is only used for one-byte + characters, that is, we know that d < 256. The character we are + checking (c) can be multibyte. */ + + case OP_NOT: + if (clen > 0) + { + int otherd = ((ims & PCRE_CASELESS) != 0)? fcc[d] : d; + if (c != d && c != otherd) { ADD_NEW(state_offset + dlen + 1, 0); } + } + break; + + /*-----------------------------------------------------------------*/ + case OP_PLUS: + case OP_MINPLUS: + case OP_NOTPLUS: + case OP_NOTMINPLUS: + count = current_state->count; /* Already matched */ + if (count > 0) { ADD_ACTIVE(state_offset + dlen + 1, 0); } + if (clen > 0) + { + int otherd = -1; + if ((ims & PCRE_CASELESS) != 0) + { +#ifdef SUPPORT_UTF8 + if (utf8 && c >= 128) + { +#ifdef SUPPORT_UCP + if (ucp_findchar(d, &chartype, &otherd) < 0) otherd = -1; +#endif /* SUPPORT_UCP */ + } + else +#endif /* SUPPORT_UTF8 */ + otherd = fcc[d]; + } + if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR)) + { count++; ADD_NEW(state_offset, count); } + } + break; + + /*-----------------------------------------------------------------*/ + case OP_QUERY: + case OP_MINQUERY: + case OP_NOTQUERY: + case OP_NOTMINQUERY: + ADD_ACTIVE(state_offset + dlen + 1, 0); + if (clen > 0) + { + int otherd = -1; + if ((ims && PCRE_CASELESS) != 0) + { +#ifdef SUPPORT_UTF8 + if (utf8 && c >= 128) + { +#ifdef SUPPORT_UCP + if (ucp_findchar(c, &chartype, &otherd) < 0) otherd = -1; +#endif /* SUPPORT_UCP */ + } + else +#endif /* SUPPORT_UTF8 */ + otherd = fcc[d]; + } + if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR)) + { ADD_NEW(state_offset + dlen + 1, 0); } + } + break; + + /*-----------------------------------------------------------------*/ + case OP_STAR: + case OP_MINSTAR: + case OP_NOTSTAR: + case OP_NOTMINSTAR: + ADD_ACTIVE(state_offset + dlen + 1, 0); + if (clen > 0) + { + int otherd = -1; + if ((ims && PCRE_CASELESS) != 0) + { +#ifdef SUPPORT_UTF8 + if (utf8 && c >= 128) + { +#ifdef SUPPORT_UCP + if (ucp_findchar(c, &chartype, &otherd) < 0) otherd = -1; +#endif /* SUPPORT_UCP */ + } + else +#endif /* SUPPORT_UTF8 */ + otherd = fcc[d]; + } + if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR)) + { ADD_NEW(state_offset, 0); } + } + break; + + /*-----------------------------------------------------------------*/ + case OP_EXACT: + case OP_UPTO: + case OP_MINUPTO: + case OP_NOTEXACT: + case OP_NOTUPTO: + case OP_NOTMINUPTO: + if (codevalue != OP_EXACT && codevalue != OP_NOTEXACT) + { ADD_ACTIVE(state_offset + dlen + 3, 0); } + count = current_state->count; /* Number already matched */ + if (clen > 0) + { + int otherd = -1; + if ((ims & PCRE_CASELESS) != 0) + { +#ifdef SUPPORT_UTF8 + if (utf8 && c >= 128) + { +#ifdef SUPPORT_UCP + if (ucp_findchar(d, &chartype, &otherd) < 0) otherd = -1; +#endif /* SUPPORT_UCP */ + } + else +#endif /* SUPPORT_UTF8 */ + otherd = fcc[d]; + } + if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR)) + { + if (++count >= GET2(code, 1)) + { ADD_NEW(state_offset + dlen + 3, 0); } + else + { ADD_NEW(state_offset, count); } + } + } + break; + + +/* ========================================================================== */ + /* These are the class-handling opcodes */ + + case OP_CLASS: + case OP_NCLASS: + case OP_XCLASS: + { + BOOL isinclass = FALSE; + int next_state_offset; + const uschar *ecode; + + /* For a simple class, there is always just a 32-byte table, and we + can set isinclass from it. */ + + if (codevalue != OP_XCLASS) + { + ecode = code + 33; + if (clen > 0) + { + isinclass = (c > 255)? (codevalue == OP_NCLASS) : + ((code[1 + c/8] & (1 << (c&7))) != 0); + } + } + + /* An extended class may have a table or a list of single characters, + ranges, or both, and it may be positive or negative. There's a + function that sorts all this out. */ + + else + { + ecode = code + GET(code, 1); + if (clen > 0) isinclass = _pcre_xclass(c, code + 1 + LINK_SIZE); + } + + /* At this point, isinclass is set for all kinds of class, and ecode + points to the byte after the end of the class. If there is a + quantifier, this is where it will be. */ + + next_state_offset = ecode - start_code; + + switch (*ecode) + { + case OP_CRSTAR: + case OP_CRMINSTAR: + ADD_ACTIVE(next_state_offset + 1, 0); + if (isinclass) { ADD_NEW(state_offset, 0); } + break; + + case OP_CRPLUS: + case OP_CRMINPLUS: + count = current_state->count; /* Already matched */ + if (count > 0) { ADD_ACTIVE(next_state_offset + 1, 0); } + if (isinclass) { count++; ADD_NEW(state_offset, count); } + break; + + case OP_CRQUERY: + case OP_CRMINQUERY: + ADD_ACTIVE(next_state_offset + 1, 0); + if (isinclass) { ADD_NEW(next_state_offset + 1, 0); } + break; + + case OP_CRRANGE: + case OP_CRMINRANGE: + count = current_state->count; /* Already matched */ + if (count >= GET2(ecode, 1)) + { ADD_ACTIVE(next_state_offset + 5, 0); } + if (isinclass) + { + if (++count >= GET2(ecode, 3)) + { ADD_NEW(next_state_offset + 5, 0); } + else + { ADD_NEW(state_offset, count); } + } + break; + + default: + if (isinclass) { ADD_NEW(next_state_offset, 0); } + break; + } + } + break; + +/* ========================================================================== */ + /* These are the opcodes for fancy brackets of various kinds. We have + to use recursion in order to handle them. */ + + case OP_ASSERT: + case OP_ASSERT_NOT: + case OP_ASSERTBACK: + case OP_ASSERTBACK_NOT: + { + int rc; + int local_offsets[2]; + int local_workspace[1000]; + const uschar *endasscode = code + GET(code, 1); + + while (*endasscode == OP_ALT) endasscode += GET(endasscode, 1); + + rc = internal_dfa_exec( + md, /* static match data */ + code, /* this subexpression's code */ + ptr, /* where we currently are */ + ptr - start_subject, /* start offset */ + local_offsets, /* offset vector */ + sizeof(local_offsets)/sizeof(int), /* size of same */ + local_workspace, /* workspace vector */ + sizeof(local_workspace)/sizeof(int), /* size of same */ + ims, /* the current ims flags */ + rlevel, /* function recursion level */ + recursing); /* pass on regex recursion */ + + if ((rc >= 0) == (codevalue == OP_ASSERT || codevalue == OP_ASSERTBACK)) + { ADD_ACTIVE(endasscode + LINK_SIZE + 1 - start_code, 0); } + } + break; + + /*-----------------------------------------------------------------*/ + case OP_COND: + { + int local_offsets[1000]; + int local_workspace[1000]; + int condcode = code[LINK_SIZE+1]; + + /* The only supported version of OP_CREF is for the value 0xffff, which + means "test if in a recursion". */ + + if (condcode == OP_CREF) + { + int value = GET2(code, LINK_SIZE+2); + if (value != 0xffff) return PCRE_ERROR_DFA_UCOND; + if (recursing > 0) { ADD_ACTIVE(state_offset + LINK_SIZE + 4, 0); } + else { ADD_ACTIVE(state_offset + GET(code, 1) + LINK_SIZE + 1, 0); } + } + + /* Otherwise, the condition is an assertion */ + + else + { + int rc; + const uschar *asscode = code + LINK_SIZE + 1; + const uschar *endasscode = asscode + GET(asscode, 1); + + while (*endasscode == OP_ALT) endasscode += GET(endasscode, 1); + + rc = internal_dfa_exec( + md, /* fixed match data */ + asscode, /* this subexpression's code */ + ptr, /* where we currently are */ + ptr - start_subject, /* start offset */ + local_offsets, /* offset vector */ + sizeof(local_offsets)/sizeof(int), /* size of same */ + local_workspace, /* workspace vector */ + sizeof(local_workspace)/sizeof(int), /* size of same */ + ims, /* the current ims flags */ + rlevel, /* function recursion level */ + recursing); /* pass on regex recursion */ + + if ((rc >= 0) == + (condcode == OP_ASSERT || condcode == OP_ASSERTBACK)) + { ADD_ACTIVE(endasscode + LINK_SIZE + 1 - start_code, 0); } + else + { ADD_ACTIVE(state_offset + GET(code, 1) + LINK_SIZE + 1, 0); } + } + } + break; + + /*-----------------------------------------------------------------*/ + case OP_RECURSE: + { + int local_offsets[1000]; + int local_workspace[1000]; + int rc; + + DPRINTF(("%.*sStarting regex recursion %d\n", rlevel*2-2, SP, + recursing + 1)); + + rc = internal_dfa_exec( + md, /* fixed match data */ + start_code + GET(code, 1), /* this subexpression's code */ + ptr, /* where we currently are */ + ptr - start_subject, /* start offset */ + local_offsets, /* offset vector */ + sizeof(local_offsets)/sizeof(int), /* size of same */ + local_workspace, /* workspace vector */ + sizeof(local_workspace)/sizeof(int), /* size of same */ + ims, /* the current ims flags */ + rlevel, /* function recursion level */ + recursing + 1); /* regex recurse level */ + + DPRINTF(("%.*sReturn from regex recursion %d: rc=%d\n", rlevel*2-2, SP, + recursing + 1, rc)); + + /* Ran out of internal offsets */ + + if (rc == 0) return PCRE_ERROR_DFA_RECURSE; + + /* For each successful matched substring, set up the next state with a + count of characters to skip before trying it. Note that the count is in + characters, not bytes. */ + + if (rc > 0) + { + for (rc = rc*2 - 2; rc >= 0; rc -= 2) + { + const uschar *p = start_subject + local_offsets[rc]; + const uschar *pp = start_subject + local_offsets[rc+1]; + int charcount = local_offsets[rc+1] - local_offsets[rc]; + while (p < pp) if ((*p++ & 0xc0) == 0x80) charcount--; + if (charcount > 0) + { + ADD_NEW_DATA(-(state_offset + LINK_SIZE + 1), 0, (charcount - 1)); + } + else + { + ADD_ACTIVE(state_offset + LINK_SIZE + 1, 0); + } + } + } + else if (rc != PCRE_ERROR_NOMATCH) return rc; + } + break; + + /*-----------------------------------------------------------------*/ + case OP_ONCE: + { + const uschar *endcode; + int local_offsets[2]; + int local_workspace[1000]; + + int rc = internal_dfa_exec( + md, /* fixed match data */ + code, /* this subexpression's code */ + ptr, /* where we currently are */ + ptr - start_subject, /* start offset */ + local_offsets, /* offset vector */ + sizeof(local_offsets)/sizeof(int), /* size of same */ + local_workspace, /* workspace vector */ + sizeof(local_workspace)/sizeof(int), /* size of same */ + ims, /* the current ims flags */ + rlevel, /* function recursion level */ + recursing); /* pass on regex recursion */ + + if (rc >= 0) + { + const uschar *end_subpattern = code; + int charcount = local_offsets[1] - local_offsets[0]; + int next_state_offset, repeat_state_offset; + BOOL is_repeated; + + do { end_subpattern += GET(end_subpattern, 1); } + while (*end_subpattern == OP_ALT); + next_state_offset = end_subpattern - start_code + LINK_SIZE + 1; + + /* If the end of this subpattern is KETRMAX or KETRMIN, we must + arrange for the repeat state also to be added to the relevant list. + Calculate the offset, or set -1 for no repeat. */ + + repeat_state_offset = (*end_subpattern == OP_KETRMAX || + *end_subpattern == OP_KETRMIN)? + end_subpattern - start_code - GET(end_subpattern, 1) : -1; + + /* If we have matched an empty string, add the next state at the + current character pointer. This is important so that the duplicate + checking kicks in, which is what breaks infinite loops that match an + empty string. */ + + if (charcount == 0) + { + ADD_ACTIVE(next_state_offset, 0); + } + + /* Optimization: if there are no more active states, and there + are no new states yet set up, then skip over the subject string + right here, to save looping. Otherwise, set up the new state to swing + into action when the end of the substring is reached. */ + + else if (i + 1 >= active_count && new_count == 0) + { + ptr += charcount; + clen = 0; + ADD_NEW(next_state_offset, 0); + + /* If we are adding a repeat state at the new character position, + we must fudge things so that it is the only current state. + Otherwise, it might be a duplicate of one we processed before, and + that would cause it to be skipped. */ + + if (repeat_state_offset >= 0) + { + next_active_state = active_states; + active_count = 0; + i = -1; + ADD_ACTIVE(repeat_state_offset, 0); + } + } + else + { + const uschar *p = start_subject + local_offsets[0]; + const uschar *pp = start_subject + local_offsets[1]; + while (p < pp) if ((*p++ & 0xc0) == 0x80) charcount--; + ADD_NEW_DATA(-next_state_offset, 0, (charcount - 1)); + if (repeat_state_offset >= 0) + { ADD_NEW_DATA(-repeat_state_offset, 0, (charcount - 1)); } + } + + } + else if (rc != PCRE_ERROR_NOMATCH) return rc; + } + break; + + +/* ========================================================================== */ + /* Handle callouts */ + + case OP_CALLOUT: + if (pcre_callout != NULL) + { + int rrc; + pcre_callout_block cb; + cb.version = 1; /* Version 1 of the callout block */ + cb.callout_number = code[1]; + cb.offset_vector = offsets; + cb.subject = (char *)start_subject; + cb.subject_length = end_subject - start_subject; + cb.start_match = current_subject - start_subject; + cb.current_position = ptr - start_subject; + cb.pattern_position = GET(code, 2); + cb.next_item_length = GET(code, 2 + LINK_SIZE); + cb.capture_top = 1; + cb.capture_last = -1; + cb.callout_data = md->callout_data; + if ((rrc = (*pcre_callout)(&cb)) < 0) return rrc; /* Abandon */ + if (rrc == 0) { ADD_ACTIVE(state_offset + 2 + 2*LINK_SIZE, 0); } + } + break; + + +/* ========================================================================== */ + default: /* Unsupported opcode */ + return PCRE_ERROR_DFA_UITEM; + } + + NEXT_ACTIVE_STATE: continue; + + } /* End of loop scanning active states */ + + /* We have finished the processing at the current subject character. If no + new states have been set for the next character, we have found all the + matches that we are going to find. If we are at the top level and partial + matching has been requested, check for appropriate conditions. */ + + if (new_count <= 0) + { + if (match_count < 0 && /* No matches found */ + rlevel == 1 && /* Top level match function */ + (md->moptions & PCRE_PARTIAL) != 0 && /* Want partial matching */ + ptr >= end_subject && /* Reached end of subject */ + ptr > current_subject) /* Matched non-empty string */ + { + if (offsetcount >= 2) + { + offsets[0] = current_subject - start_subject; + offsets[1] = end_subject - start_subject; + } + match_count = PCRE_ERROR_PARTIAL; + } + + DPRINTF(("%.*sEnd of internal_dfa_exec %d: returning %d\n" + "%.*s---------------------\n\n", rlevel*2-2, SP, rlevel, match_count, + rlevel*2-2, SP)); + return match_count; + } + + /* One or more states are active for the next character. */ + + ptr += clen; /* Advance to next subject character */ + } /* Loop to move along the subject string */ + +/* Control never gets here, but we must keep the compiler happy. */ + +DPRINTF(("%.*s+++ Unexpected end of internal_dfa_exec %d +++\n" + "%.*s---------------------\n\n", rlevel*2-2, SP, rlevel, rlevel*2-2, SP)); +return PCRE_ERROR_NOMATCH; +} + + + + +/************************************************* +* Execute a Regular Expression - DFA engine * +*************************************************/ + +/* This external function applies a compiled re to a subject string using a DFA +engine. This function calls the internal function multiple times if the pattern +is not anchored. + +Arguments: + argument_re points to the compiled expression + extra_data points to extra data or is NULL (not currently used) + subject points to the subject string + length length of subject string (may contain binary zeros) + start_offset where to start in the subject string + options option bits + offsets vector of match offsets + offsetcount size of same + workspace workspace vector + wscount size of same + +Returns: > 0 => number of match offset pairs placed in offsets + = 0 => offsets overflowed; longest matches are present + -1 => failed to match + < -1 => some kind of unexpected problem +*/ + +EXPORT int +pcre_dfa_exec(const pcre *argument_re, const pcre_extra *extra_data, + const char *subject, int length, int start_offset, int options, int *offsets, + int offsetcount, int *workspace, int wscount) +{ +real_pcre *re = (real_pcre *)argument_re; +dfa_match_data match_block; +BOOL utf8, anchored, startline, firstline; +const uschar *current_subject, *end_subject, *lcc; + +pcre_study_data internal_study; +const pcre_study_data *study = NULL; +real_pcre internal_re; + +const uschar *req_byte_ptr; +const uschar *start_bits = NULL; +BOOL first_byte_caseless = FALSE; +BOOL req_byte_caseless = FALSE; +int first_byte = -1; +int req_byte = -1; +int req_byte2 = -1; + +/* Plausibility checks */ + +if ((options & ~PUBLIC_DFA_EXEC_OPTIONS) != 0) return PCRE_ERROR_BADOPTION; +if (re == NULL || subject == NULL || workspace == NULL || + (offsets == NULL && offsetcount > 0)) return PCRE_ERROR_NULL; +if (offsetcount < 0) return PCRE_ERROR_BADCOUNT; +if (wscount < 20) return PCRE_ERROR_DFA_WSSIZE; + +/* We need to find the pointer to any study data before we test for byte +flipping, so we scan the extra_data block first. This may set two fields in the +match block, so we must initialize them beforehand. However, the other fields +in the match block must not be set until after the byte flipping. */ + +match_block.tables = re->tables; +match_block.callout_data = NULL; + +if (extra_data != NULL) + { + unsigned int flags = extra_data->flags; + if ((flags & PCRE_EXTRA_STUDY_DATA) != 0) + study = (const pcre_study_data *)extra_data->study_data; + if ((flags & PCRE_EXTRA_MATCH_LIMIT) != 0) return PCRE_ERROR_DFA_UMLIMIT; + if ((flags & PCRE_EXTRA_CALLOUT_DATA) != 0) + match_block.callout_data = extra_data->callout_data; + if ((flags & PCRE_EXTRA_TABLES) != 0) + match_block.tables = extra_data->tables; + } + +/* Check that the first field in the block is the magic number. If it is not, +test for a regex that was compiled on a host of opposite endianness. If this is +the case, flipped values are put in internal_re and internal_study if there was +study data too. */ + +if (re->magic_number != MAGIC_NUMBER) + { + re = _pcre_try_flipped(re, &internal_re, study, &internal_study); + if (re == NULL) return PCRE_ERROR_BADMAGIC; + if (study != NULL) study = &internal_study; + } + +/* Set some local values */ + +current_subject = (const unsigned char *)subject + start_offset; +end_subject = (const unsigned char *)subject + length; +req_byte_ptr = current_subject - 1; + +utf8 = (re->options & PCRE_UTF8) != 0; +anchored = (options & PCRE_ANCHORED) != 0 || (re->options & PCRE_ANCHORED) != 0; + +/* The remaining fixed data for passing around. */ + +match_block.start_code = (const uschar *)argument_re + + re->name_table_offset + re->name_count * re->name_entry_size; +match_block.start_subject = (const unsigned char *)subject; +match_block.end_subject = end_subject; +match_block.moptions = options; +match_block.poptions = re->options; + +/* Check a UTF-8 string if required. Unfortunately there's no way of passing +back the character offset. */ + +#ifdef SUPPORT_UTF8 +if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0) + { + if (_pcre_valid_utf8((uschar *)subject, length) >= 0) + return PCRE_ERROR_BADUTF8; + if (start_offset > 0 && start_offset < length) + { + int tb = ((uschar *)subject)[start_offset]; + if (tb > 127) + { + tb &= 0xc0; + if (tb != 0 && tb != 0xc0) return PCRE_ERROR_BADUTF8_OFFSET; + } + } + } +#endif + +/* If the exec call supplied NULL for tables, use the inbuilt ones. This +is a feature that makes it possible to save compiled regex and re-use them +in other programs later. */ + +if (match_block.tables == NULL) match_block.tables = _pcre_default_tables; + +/* The lower casing table and the "must be at the start of a line" flag are +used in a loop when finding where to start. */ + +lcc = match_block.tables + lcc_offset; +startline = (re->options & PCRE_STARTLINE) != 0; +firstline = (re->options & PCRE_FIRSTLINE) != 0; + +/* Set up the first character to match, if available. The first_byte value is +never set for an anchored regular expression, but the anchoring may be forced +at run time, so we have to test for anchoring. The first char may be unset for +an unanchored pattern, of course. If there's no first char and the pattern was +studied, there may be a bitmap of possible first characters. */ + +if (!anchored) + { + if ((re->options & PCRE_FIRSTSET) != 0) + { + first_byte = re->first_byte & 255; + if ((first_byte_caseless = ((re->first_byte & REQ_CASELESS) != 0)) == TRUE) + first_byte = lcc[first_byte]; + } + else + { + if (startline && study != NULL && + (study->options & PCRE_STUDY_MAPPED) != 0) + start_bits = study->start_bits; + } + } + +/* For anchored or unanchored matches, there may be a "last known required +character" set. */ + +if ((re->options & PCRE_REQCHSET) != 0) + { + req_byte = re->req_byte & 255; + req_byte_caseless = (re->req_byte & REQ_CASELESS) != 0; + req_byte2 = (match_block.tables + fcc_offset)[req_byte]; /* case flipped */ + } + +/* Call the main matching function, looping for a non-anchored regex after a +failed match. Unless restarting, optimize by moving to the first match +character if possible, when not anchored. Then unless wanting a partial match, +check for a required later character. */ + +for (;;) + { + int rc; + + if ((options & PCRE_DFA_RESTART) == 0) + { + const uschar *save_end_subject = end_subject; + + /* Advance to a unique first char if possible. If firstline is TRUE, the + start of the match is constrained to the first line of a multiline string. + Implement this by temporarily adjusting end_subject so that we stop scanning + at a newline. If the match fails at the newline, later code breaks this loop. + */ + + if (firstline) + { + const uschar *t = current_subject; + while (t < save_end_subject && *t != '\n') t++; + end_subject = t; + } + + if (first_byte >= 0) + { + if (first_byte_caseless) + while (current_subject < end_subject && + lcc[*current_subject] != first_byte) + current_subject++; + else + while (current_subject < end_subject && *current_subject != first_byte) + current_subject++; + } + + /* Or to just after \n for a multiline match if possible */ + + else if (startline) + { + if (current_subject > match_block.start_subject + start_offset) + { + while (current_subject < end_subject && current_subject[-1] != NEWLINE) + current_subject++; + } + } + + /* Or to a non-unique first char after study */ + + else if (start_bits != NULL) + { + while (current_subject < end_subject) + { + register unsigned int c = *current_subject; + if ((start_bits[c/8] & (1 << (c&7))) == 0) current_subject++; + else break; + } + } + + /* Restore fudged end_subject */ + + end_subject = save_end_subject; + } + + /* If req_byte is set, we know that that character must appear in the subject + for the match to succeed. If the first character is set, req_byte must be + later in the subject; otherwise the test starts at the match point. This + optimization can save a huge amount of work in patterns with nested unlimited + repeats that aren't going to match. Writing separate code for cased/caseless + versions makes it go faster, as does using an autoincrement and backing off + on a match. + + HOWEVER: when the subject string is very, very long, searching to its end can + take a long time, and give bad performance on quite ordinary patterns. This + showed up when somebody was matching /^C/ on a 32-megabyte string... so we + don't do this when the string is sufficiently long. + + ALSO: this processing is disabled when partial matching is requested. + */ + + if (req_byte >= 0 && + end_subject - current_subject < REQ_BYTE_MAX && + (options & PCRE_PARTIAL) == 0) + { + register const uschar *p = current_subject + ((first_byte >= 0)? 1 : 0); + + /* We don't need to repeat the search if we haven't yet reached the + place we found it at last time. */ + + if (p > req_byte_ptr) + { + if (req_byte_caseless) + { + while (p < end_subject) + { + register int pp = *p++; + if (pp == req_byte || pp == req_byte2) { p--; break; } + } + } + else + { + while (p < end_subject) + { + if (*p++ == req_byte) { p--; break; } + } + } + + /* If we can't find the required character, break the matching loop, + which will cause a return or PCRE_ERROR_NOMATCH. */ + + if (p >= end_subject) break; + + /* If we have found the required character, save the point where we + found it, so that we don't search again next time round the loop if + the start hasn't passed this character yet. */ + + req_byte_ptr = p; + } + } + + /* OK, now we can do the business */ + + rc = internal_dfa_exec( + &match_block, /* fixed match data */ + match_block.start_code, /* this subexpression's code */ + current_subject, /* where we currently are */ + start_offset, /* start offset in subject */ + offsets, /* offset vector */ + offsetcount, /* size of same */ + workspace, /* workspace vector */ + wscount, /* size of same */ + re->options & (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL), /* ims flags */ + 0, /* function recurse level */ + 0); /* regex recurse level */ + + /* Anything other than "no match" means we are done, always; otherwise, carry + on only if not anchored. */ + + if (rc != PCRE_ERROR_NOMATCH || anchored) return rc; + + /* Advance to the next subject character unless we are at the end of a line + and firstline is set. */ + + if (firstline && *current_subject == NEWLINE) break; + current_subject++; + +#ifdef SUPPORT_UTF8 + if (utf8) + { + while (current_subject < end_subject && (*current_subject & 0xc0) == 0x80) + current_subject++; + } +#endif + + if (current_subject > end_subject) break; + } + +return PCRE_ERROR_NOMATCH; +} + +/* End of pcre_dfa_exec.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains pcre_exec(), the externally visible function that does +pattern matching using an NFA algorithm, trying to mimic Perl as closely as +possible. There are also some static supporting functions. */ + + + + +/* Structure for building a chain of data that actually lives on the +stack, for holding the values of the subject pointer at the start of each +subpattern, so as to detect when an empty string has been matched by a +subpattern - to break infinite loops. When NO_RECURSE is set, these blocks +are on the heap, not on the stack. */ + +typedef struct eptrblock { + struct eptrblock *epb_prev; + const uschar *epb_saved_eptr; +} eptrblock; + +/* Flag bits for the match() function */ + +#define match_condassert 0x01 /* Called to check a condition assertion */ +#define match_isgroup 0x02 /* Set if start of bracketed group */ + +/* Non-error returns from the match() function. Error returns are externally +defined PCRE_ERROR_xxx codes, which are all negative. */ + +#define MATCH_MATCH 1 +#define MATCH_NOMATCH 0 + +/* Maximum number of ints of offset to save on the stack for recursive calls. +If the offset vector is bigger, malloc is used. This should be a multiple of 3, +because the offset vector is always a multiple of 3 long. */ + +#define REC_STACK_SAVE_MAX 30 + +/* Min and max values for the common repeats; for the maxima, 0 => infinity */ + +static const char rep_min[] = { 0, 0, 1, 1, 0, 0 }; +static const char rep_max[] = { 0, 0, 0, 0, 1, 1 }; + + + +#ifdef DEBUG +/************************************************* +* Debugging function to print chars * +*************************************************/ + +/* Print a sequence of chars in printable format, stopping at the end of the +subject if the requested. + +Arguments: + p points to characters + length number to print + is_subject TRUE if printing from within md->start_subject + md pointer to matching data block, if is_subject is TRUE + +Returns: nothing +*/ + +static void +pchars(const uschar *p, int length, BOOL is_subject, match_data *md) +{ +int c; +if (is_subject && length > md->end_subject - p) length = md->end_subject - p; +while (length-- > 0) + if (isprint(c = *(p++))) printf("%c", c); else printf("\\x%02x", c); +} +#endif + + + +/************************************************* +* Match a back-reference * +*************************************************/ + +/* If a back reference hasn't been set, the length that is passed is greater +than the number of characters left in the string, so the match fails. + +Arguments: + offset index into the offset vector + eptr points into the subject + length length to be matched + md points to match data block + ims the ims flags + +Returns: TRUE if matched +*/ + +static BOOL +match_ref(int offset, register const uschar *eptr, int length, match_data *md, + unsigned long int ims) +{ +const uschar *p = md->start_subject + md->offset_vector[offset]; + +#ifdef DEBUG +if (eptr >= md->end_subject) + printf("matching subject <null>"); +else + { + printf("matching subject "); + pchars(eptr, length, TRUE, md); + } +printf(" against backref "); +pchars(p, length, FALSE, md); +printf("\n"); +#endif + +/* Always fail if not enough characters left */ + +if (length > md->end_subject - eptr) return FALSE; + +/* Separate the caselesss case for speed */ + +if ((ims & PCRE_CASELESS) != 0) + { + while (length-- > 0) + if (md->lcc[*p++] != md->lcc[*eptr++]) return FALSE; + } +else + { while (length-- > 0) if (*p++ != *eptr++) return FALSE; } + +return TRUE; +} + + + +/*************************************************************************** +**************************************************************************** + RECURSION IN THE match() FUNCTION + +The match() function is highly recursive. Some regular expressions can cause +it to recurse thousands of times. I was writing for Unix, so I just let it +call itself recursively. This uses the stack for saving everything that has +to be saved for a recursive call. On Unix, the stack can be large, and this +works fine. + +It turns out that on non-Unix systems there are problems with programs that +use a lot of stack. (This despite the fact that every last chip has oodles +of memory these days, and techniques for extending the stack have been known +for decades.) So.... + +There is a fudge, triggered by defining NO_RECURSE, which avoids recursive +calls by keeping local variables that need to be preserved in blocks of memory +obtained from malloc instead instead of on the stack. Macros are used to +achieve this so that the actual code doesn't look very different to what it +always used to. +**************************************************************************** +***************************************************************************/ + + +/* These versions of the macros use the stack, as normal */ + +#ifndef NO_RECURSE +#define REGISTER register +#define RMATCH(rx,ra,rb,rc,rd,re,rf,rg) rx = match(ra,rb,rc,rd,re,rf,rg) +#define RRETURN(ra) return ra +#else + + +/* These versions of the macros manage a private stack on the heap. Note +that the rd argument of RMATCH isn't actually used. It's the md argument of +match(), which never changes. */ + +#define REGISTER + +#define RMATCH(rx,ra,rb,rc,rd,re,rf,rg)\ + {\ + heapframe *newframe = (pcre_stack_malloc)(sizeof(heapframe));\ + if (setjmp(frame->Xwhere) == 0)\ + {\ + newframe->Xeptr = ra;\ + newframe->Xecode = rb;\ + newframe->Xoffset_top = rc;\ + newframe->Xims = re;\ + newframe->Xeptrb = rf;\ + newframe->Xflags = rg;\ + newframe->Xprevframe = frame;\ + frame = newframe;\ + DPRINTF(("restarting from line %d\n", __LINE__));\ + goto HEAP_RECURSE;\ + }\ + else\ + {\ + DPRINTF(("longjumped back to line %d\n", __LINE__));\ + frame = md->thisframe;\ + rx = frame->Xresult;\ + }\ + } + +#define RRETURN(ra)\ + {\ + heapframe *newframe = frame;\ + frame = newframe->Xprevframe;\ + (pcre_stack_free)(newframe);\ + if (frame != NULL)\ + {\ + frame->Xresult = ra;\ + md->thisframe = frame;\ + longjmp(frame->Xwhere, 1);\ + }\ + return ra;\ + } + + +/* Structure for remembering the local variables in a private frame */ + +typedef struct heapframe { + struct heapframe *Xprevframe; + + /* Function arguments that may change */ + + const uschar *Xeptr; + const uschar *Xecode; + int Xoffset_top; + long int Xims; + eptrblock *Xeptrb; + int Xflags; + + /* Function local variables */ + + const uschar *Xcallpat; + const uschar *Xcharptr; + const uschar *Xdata; + const uschar *Xnext; + const uschar *Xpp; + const uschar *Xprev; + const uschar *Xsaved_eptr; + + recursion_info Xnew_recursive; + + BOOL Xcur_is_word; + BOOL Xcondition; + BOOL Xminimize; + BOOL Xprev_is_word; + + unsigned long int Xoriginal_ims; + +#ifdef SUPPORT_UCP + int Xprop_type; + int Xprop_fail_result; + int Xprop_category; + int Xprop_chartype; + int Xprop_othercase; + int Xprop_test_against; + int *Xprop_test_variable; +#endif + + int Xctype; + int Xfc; + int Xfi; + int Xlength; + int Xmax; + int Xmin; + int Xnumber; + int Xoffset; + int Xop; + int Xsave_capture_last; + int Xsave_offset1, Xsave_offset2, Xsave_offset3; + int Xstacksave[REC_STACK_SAVE_MAX]; + + eptrblock Xnewptrb; + + /* Place to pass back result, and where to jump back to */ + + int Xresult; + jmp_buf Xwhere; + +} heapframe; + +#endif + + +/*************************************************************************** +***************************************************************************/ + + + +/************************************************* +* Match from current position * +*************************************************/ + +/* On entry ecode points to the first opcode, and eptr to the first character +in the subject string, while eptrb holds the value of eptr at the start of the +last bracketed group - used for breaking infinite loops matching zero-length +strings. This function is called recursively in many circumstances. Whenever it +returns a negative (error) response, the outer incarnation must also return the +same response. + +Performance note: It might be tempting to extract commonly used fields from the +md structure (e.g. utf8, end_subject) into individual variables to improve +performance. Tests using gcc on a SPARC disproved this; in the first case, it +made performance worse. + +Arguments: + eptr pointer in subject + ecode position in code + offset_top current top pointer + md pointer to "static" info for the match + ims current /i, /m, and /s options + eptrb pointer to chain of blocks containing eptr at start of + brackets - for testing for empty matches + flags can contain + match_condassert - this is an assertion condition + match_isgroup - this is the start of a bracketed group + +Returns: MATCH_MATCH if matched ) these values are >= 0 + MATCH_NOMATCH if failed to match ) + a negative PCRE_ERROR_xxx value if aborted by an error condition + (e.g. stopped by recursion limit) +*/ + +static int +match(REGISTER const uschar *eptr, REGISTER const uschar *ecode, + int offset_top, match_data *md, unsigned long int ims, eptrblock *eptrb, + int flags) +{ +/* These variables do not need to be preserved over recursion in this function, +so they can be ordinary variables in all cases. Mark them with "register" +because they are used a lot in loops. */ + +register int rrc; /* Returns from recursive calls */ +register int i; /* Used for loops not involving calls to RMATCH() */ +register int c; /* Character values not kept over RMATCH() calls */ +register BOOL utf8; /* Local copy of UTF-8 flag for speed */ + +/* When recursion is not being used, all "local" variables that have to be +preserved over calls to RMATCH() are part of a "frame" which is obtained from +heap storage. Set up the top-level frame here; others are obtained from the +heap whenever RMATCH() does a "recursion". See the macro definitions above. */ + +#ifdef NO_RECURSE +heapframe *frame = (pcre_stack_malloc)(sizeof(heapframe)); +frame->Xprevframe = NULL; /* Marks the top level */ + +/* Copy in the original argument variables */ + +frame->Xeptr = eptr; +frame->Xecode = ecode; +frame->Xoffset_top = offset_top; +frame->Xims = ims; +frame->Xeptrb = eptrb; +frame->Xflags = flags; + +/* This is where control jumps back to to effect "recursion" */ + +HEAP_RECURSE: + +/* Macros make the argument variables come from the current frame */ + +#define eptr frame->Xeptr +#define ecode frame->Xecode +#define offset_top frame->Xoffset_top +#define ims frame->Xims +#define eptrb frame->Xeptrb +#define flags frame->Xflags + +/* Ditto for the local variables */ + +#ifdef SUPPORT_UTF8 +#define charptr frame->Xcharptr +#endif +#define callpat frame->Xcallpat +#define data frame->Xdata +#define next frame->Xnext +#define pp frame->Xpp +#define prev frame->Xprev +#define saved_eptr frame->Xsaved_eptr + +#define new_recursive frame->Xnew_recursive + +#define cur_is_word frame->Xcur_is_word +#define condition frame->Xcondition +#define minimize frame->Xminimize +#define prev_is_word frame->Xprev_is_word + +#define original_ims frame->Xoriginal_ims + +#ifdef SUPPORT_UCP +#define prop_type frame->Xprop_type +#define prop_fail_result frame->Xprop_fail_result +#define prop_category frame->Xprop_category +#define prop_chartype frame->Xprop_chartype +#define prop_othercase frame->Xprop_othercase +#define prop_test_against frame->Xprop_test_against +#define prop_test_variable frame->Xprop_test_variable +#endif + +#define ctype frame->Xctype +#define fc frame->Xfc +#define fi frame->Xfi +#define length frame->Xlength +#define max frame->Xmax +#define min frame->Xmin +#define number frame->Xnumber +#define offset frame->Xoffset +#define op frame->Xop +#define save_capture_last frame->Xsave_capture_last +#define save_offset1 frame->Xsave_offset1 +#define save_offset2 frame->Xsave_offset2 +#define save_offset3 frame->Xsave_offset3 +#define stacksave frame->Xstacksave + +#define newptrb frame->Xnewptrb + +/* When recursion is being used, local variables are allocated on the stack and +get preserved during recursion in the normal way. In this environment, fi and +i, and fc and c, can be the same variables. */ + +#else +#define fi i +#define fc c + + +#ifdef SUPPORT_UTF8 /* Many of these variables are used ony */ +const uschar *charptr; /* small blocks of the code. My normal */ +#endif /* style of coding would have declared */ +const uschar *callpat; /* them within each of those blocks. */ +const uschar *data; /* However, in order to accommodate the */ +const uschar *next; /* version of this code that uses an */ +const uschar *pp; /* external "stack" implemented on the */ +const uschar *prev; /* heap, it is easier to declare them */ +const uschar *saved_eptr; /* all here, so the declarations can */ + /* be cut out in a block. The only */ +recursion_info new_recursive; /* declarations within blocks below are */ + /* for variables that do not have to */ +BOOL cur_is_word; /* be preserved over a recursive call */ +BOOL condition; /* to RMATCH(). */ +BOOL minimize; +BOOL prev_is_word; + +unsigned long int original_ims; + +#ifdef SUPPORT_UCP +int prop_type; +int prop_fail_result; +int prop_category; +int prop_chartype; +int prop_othercase; +int prop_test_against; +int *prop_test_variable; +#endif + +int ctype; +int length; +int max; +int min; +int number; +int offset; +int op; +int save_capture_last; +int save_offset1, save_offset2, save_offset3; +int stacksave[REC_STACK_SAVE_MAX]; + +eptrblock newptrb; +#endif + +/* These statements are here to stop the compiler complaining about unitialized +variables. */ + +#ifdef SUPPORT_UCP +prop_fail_result = 0; +prop_test_against = 0; +prop_test_variable = NULL; +#endif + +/* OK, now we can get on with the real code of the function. Recursion is +specified by the macros RMATCH and RRETURN. When NO_RECURSE is *not* defined, +these just turn into a recursive call to match() and a "return", respectively. +However, RMATCH isn't like a function call because it's quite a complicated +macro. It has to be used in one particular way. This shouldn't, however, impact +performance when true recursion is being used. */ + +if (md->match_call_count++ >= md->match_limit) RRETURN(PCRE_ERROR_MATCHLIMIT); + +original_ims = ims; /* Save for resetting on ')' */ +utf8 = md->utf8; /* Local copy of the flag */ + +/* At the start of a bracketed group, add the current subject pointer to the +stack of such pointers, to be re-instated at the end of the group when we hit +the closing ket. When match() is called in other circumstances, we don't add to +this stack. */ + +if ((flags & match_isgroup) != 0) + { + newptrb.epb_prev = eptrb; + newptrb.epb_saved_eptr = eptr; + eptrb = &newptrb; + } + +/* Now start processing the operations. */ + +for (;;) + { + op = *ecode; + minimize = FALSE; + + /* For partial matching, remember if we ever hit the end of the subject after + matching at least one subject character. */ + + if (md->partial && + eptr >= md->end_subject && + eptr > md->start_match) + md->hitend = TRUE; + + /* Opening capturing bracket. If there is space in the offset vector, save + the current subject position in the working slot at the top of the vector. We + mustn't change the current values of the data slot, because they may be set + from a previous iteration of this group, and be referred to by a reference + inside the group. + + If the bracket fails to match, we need to restore this value and also the + values of the final offsets, in case they were set by a previous iteration of + the same bracket. + + If there isn't enough space in the offset vector, treat this as if it were a + non-capturing bracket. Don't worry about setting the flag for the error case + here; that is handled in the code for KET. */ + + if (op > OP_BRA) + { + number = op - OP_BRA; + + /* For extended extraction brackets (large number), we have to fish out the + number from a dummy opcode at the start. */ + + if (number > EXTRACT_BASIC_MAX) + number = GET2(ecode, 2+LINK_SIZE); + offset = number << 1; + +#ifdef DEBUG + printf("start bracket %d subject=", number); + pchars(eptr, 16, TRUE, md); + printf("\n"); +#endif + + if (offset < md->offset_max) + { + save_offset1 = md->offset_vector[offset]; + save_offset2 = md->offset_vector[offset+1]; + save_offset3 = md->offset_vector[md->offset_end - number]; + save_capture_last = md->capture_last; + + DPRINTF(("saving %d %d %d\n", save_offset1, save_offset2, save_offset3)); + md->offset_vector[md->offset_end - number] = eptr - md->start_subject; + + do + { + RMATCH(rrc, eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb, + match_isgroup); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + md->capture_last = save_capture_last; + ecode += GET(ecode, 1); + } + while (*ecode == OP_ALT); + + DPRINTF(("bracket %d failed\n", number)); + + md->offset_vector[offset] = save_offset1; + md->offset_vector[offset+1] = save_offset2; + md->offset_vector[md->offset_end - number] = save_offset3; + + RRETURN(MATCH_NOMATCH); + } + + /* Insufficient room for saving captured contents */ + + else op = OP_BRA; + } + + /* Other types of node can be handled by a switch */ + + switch(op) + { + case OP_BRA: /* Non-capturing bracket: optimized */ + DPRINTF(("start bracket 0\n")); + do + { + RMATCH(rrc, eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb, + match_isgroup); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + ecode += GET(ecode, 1); + } + while (*ecode == OP_ALT); + DPRINTF(("bracket 0 failed\n")); + RRETURN(MATCH_NOMATCH); + + /* Conditional group: compilation checked that there are no more than + two branches. If the condition is false, skipping the first branch takes us + past the end if there is only one branch, but that's OK because that is + exactly what going to the ket would do. */ + + case OP_COND: + if (ecode[LINK_SIZE+1] == OP_CREF) /* Condition extract or recurse test */ + { + offset = GET2(ecode, LINK_SIZE+2) << 1; /* Doubled ref number */ + condition = (offset == CREF_RECURSE * 2)? + (md->recursive != NULL) : + (offset < offset_top && md->offset_vector[offset] >= 0); + RMATCH(rrc, eptr, ecode + (condition? + (LINK_SIZE + 4) : (LINK_SIZE + 1 + GET(ecode, 1))), + offset_top, md, ims, eptrb, match_isgroup); + RRETURN(rrc); + } + + /* The condition is an assertion. Call match() to evaluate it - setting + the final argument TRUE causes it to stop at the end of an assertion. */ + + else + { + RMATCH(rrc, eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL, + match_condassert | match_isgroup); + if (rrc == MATCH_MATCH) + { + ecode += 1 + LINK_SIZE + GET(ecode, LINK_SIZE+2); + while (*ecode == OP_ALT) ecode += GET(ecode, 1); + } + else if (rrc != MATCH_NOMATCH) + { + RRETURN(rrc); /* Need braces because of following else */ + } + else ecode += GET(ecode, 1); + RMATCH(rrc, eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb, + match_isgroup); + RRETURN(rrc); + } + /* Control never reaches here */ + + /* Skip over conditional reference or large extraction number data if + encountered. */ + + case OP_CREF: + case OP_BRANUMBER: + ecode += 3; + break; + + /* End of the pattern. If we are in a recursion, we should restore the + offsets appropriately and continue from after the call. */ + + case OP_END: + if (md->recursive != NULL && md->recursive->group_num == 0) + { + recursion_info *rec = md->recursive; + DPRINTF(("Hit the end in a (?0) recursion\n")); + md->recursive = rec->prevrec; + memmove(md->offset_vector, rec->offset_save, + rec->saved_max * sizeof(int)); + md->start_match = rec->save_start; + ims = original_ims; + ecode = rec->after_call; + break; + } + + /* Otherwise, if PCRE_NOTEMPTY is set, fail if we have matched an empty + string - backtracking will then try other alternatives, if any. */ + + if (md->notempty && eptr == md->start_match) RRETURN(MATCH_NOMATCH); + md->end_match_ptr = eptr; /* Record where we ended */ + md->end_offset_top = offset_top; /* and how many extracts were taken */ + RRETURN(MATCH_MATCH); + + /* Change option settings */ + + case OP_OPT: + ims = ecode[1]; + ecode += 2; + DPRINTF(("ims set to %02lx\n", ims)); + break; + + /* Assertion brackets. Check the alternative branches in turn - the + matching won't pass the KET for an assertion. If any one branch matches, + the assertion is true. Lookbehind assertions have an OP_REVERSE item at the + start of each branch to move the current point backwards, so the code at + this level is identical to the lookahead case. */ + + case OP_ASSERT: + case OP_ASSERTBACK: + do + { + RMATCH(rrc, eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL, + match_isgroup); + if (rrc == MATCH_MATCH) break; + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + ecode += GET(ecode, 1); + } + while (*ecode == OP_ALT); + if (*ecode == OP_KET) RRETURN(MATCH_NOMATCH); + + /* If checking an assertion for a condition, return MATCH_MATCH. */ + + if ((flags & match_condassert) != 0) RRETURN(MATCH_MATCH); + + /* Continue from after the assertion, updating the offsets high water + mark, since extracts may have been taken during the assertion. */ + + do ecode += GET(ecode,1); while (*ecode == OP_ALT); + ecode += 1 + LINK_SIZE; + offset_top = md->end_offset_top; + continue; + + /* Negative assertion: all branches must fail to match */ + + case OP_ASSERT_NOT: + case OP_ASSERTBACK_NOT: + do + { + RMATCH(rrc, eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL, + match_isgroup); + if (rrc == MATCH_MATCH) RRETURN(MATCH_NOMATCH); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + ecode += GET(ecode,1); + } + while (*ecode == OP_ALT); + + if ((flags & match_condassert) != 0) RRETURN(MATCH_MATCH); + + ecode += 1 + LINK_SIZE; + continue; + + /* Move the subject pointer back. This occurs only at the start of + each branch of a lookbehind assertion. If we are too close to the start to + move back, this match function fails. When working with UTF-8 we move + back a number of characters, not bytes. */ + + case OP_REVERSE: +#ifdef SUPPORT_UTF8 + if (utf8) + { + c = GET(ecode,1); + for (i = 0; i < c; i++) + { + eptr--; + if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH); + BACKCHAR(eptr) + } + } + else +#endif + + /* No UTF-8 support, or not in UTF-8 mode: count is byte count */ + + { + eptr -= GET(ecode,1); + if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH); + } + + /* Skip to next op code */ + + ecode += 1 + LINK_SIZE; + break; + + /* The callout item calls an external function, if one is provided, passing + details of the match so far. This is mainly for debugging, though the + function is able to force a failure. */ + + case OP_CALLOUT: + if (pcre_callout != NULL) + { + pcre_callout_block cb; + cb.version = 1; /* Version 1 of the callout block */ + cb.callout_number = ecode[1]; + cb.offset_vector = md->offset_vector; + cb.subject = (const char *)md->start_subject; + cb.subject_length = md->end_subject - md->start_subject; + cb.start_match = md->start_match - md->start_subject; + cb.current_position = eptr - md->start_subject; + cb.pattern_position = GET(ecode, 2); + cb.next_item_length = GET(ecode, 2 + LINK_SIZE); + cb.capture_top = offset_top/2; + cb.capture_last = md->capture_last; + cb.callout_data = md->callout_data; + if ((rrc = (*pcre_callout)(&cb)) > 0) RRETURN(MATCH_NOMATCH); + if (rrc < 0) RRETURN(rrc); + } + ecode += 2 + 2*LINK_SIZE; + break; + + /* Recursion either matches the current regex, or some subexpression. The + offset data is the offset to the starting bracket from the start of the + whole pattern. (This is so that it works from duplicated subpatterns.) + + If there are any capturing brackets started but not finished, we have to + save their starting points and reinstate them after the recursion. However, + we don't know how many such there are (offset_top records the completed + total) so we just have to save all the potential data. There may be up to + 65535 such values, which is too large to put on the stack, but using malloc + for small numbers seems expensive. As a compromise, the stack is used when + there are no more than REC_STACK_SAVE_MAX values to store; otherwise malloc + is used. A problem is what to do if the malloc fails ... there is no way of + returning to the top level with an error. Save the top REC_STACK_SAVE_MAX + values on the stack, and accept that the rest may be wrong. + + There are also other values that have to be saved. We use a chained + sequence of blocks that actually live on the stack. Thanks to Robin Houston + for the original version of this logic. */ + + case OP_RECURSE: + { + callpat = md->start_code + GET(ecode, 1); + new_recursive.group_num = *callpat - OP_BRA; + + /* For extended extraction brackets (large number), we have to fish out + the number from a dummy opcode at the start. */ + + if (new_recursive.group_num > EXTRACT_BASIC_MAX) + new_recursive.group_num = GET2(callpat, 2+LINK_SIZE); + + /* Add to "recursing stack" */ + + new_recursive.prevrec = md->recursive; + md->recursive = &new_recursive; + + /* Find where to continue from afterwards */ + + ecode += 1 + LINK_SIZE; + new_recursive.after_call = ecode; + + /* Now save the offset data. */ + + new_recursive.saved_max = md->offset_end; + if (new_recursive.saved_max <= REC_STACK_SAVE_MAX) + new_recursive.offset_save = stacksave; + else + { + new_recursive.offset_save = + (int *)(pcre_malloc)(new_recursive.saved_max * sizeof(int)); + if (new_recursive.offset_save == NULL) RRETURN(PCRE_ERROR_NOMEMORY); + } + + memcpy(new_recursive.offset_save, md->offset_vector, + new_recursive.saved_max * sizeof(int)); + new_recursive.save_start = md->start_match; + md->start_match = eptr; + + /* OK, now we can do the recursion. For each top-level alternative we + restore the offset and recursion data. */ + + DPRINTF(("Recursing into group %d\n", new_recursive.group_num)); + do + { + RMATCH(rrc, eptr, callpat + 1 + LINK_SIZE, offset_top, md, ims, + eptrb, match_isgroup); + if (rrc == MATCH_MATCH) + { + md->recursive = new_recursive.prevrec; + if (new_recursive.offset_save != stacksave) + (pcre_free)(new_recursive.offset_save); + RRETURN(MATCH_MATCH); + } + else if (rrc != MATCH_NOMATCH) RRETURN(rrc); + + md->recursive = &new_recursive; + memcpy(md->offset_vector, new_recursive.offset_save, + new_recursive.saved_max * sizeof(int)); + callpat += GET(callpat, 1); + } + while (*callpat == OP_ALT); + + DPRINTF(("Recursion didn't match\n")); + md->recursive = new_recursive.prevrec; + if (new_recursive.offset_save != stacksave) + (pcre_free)(new_recursive.offset_save); + RRETURN(MATCH_NOMATCH); + } + /* Control never reaches here */ + + /* "Once" brackets are like assertion brackets except that after a match, + the point in the subject string is not moved back. Thus there can never be + a move back into the brackets. Friedl calls these "atomic" subpatterns. + Check the alternative branches in turn - the matching won't pass the KET + for this kind of subpattern. If any one branch matches, we carry on as at + the end of a normal bracket, leaving the subject pointer. */ + + case OP_ONCE: + { + prev = ecode; + saved_eptr = eptr; + + do + { + RMATCH(rrc, eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, + eptrb, match_isgroup); + if (rrc == MATCH_MATCH) break; + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + ecode += GET(ecode,1); + } + while (*ecode == OP_ALT); + + /* If hit the end of the group (which could be repeated), fail */ + + if (*ecode != OP_ONCE && *ecode != OP_ALT) RRETURN(MATCH_NOMATCH); + + /* Continue as from after the assertion, updating the offsets high water + mark, since extracts may have been taken. */ + + do ecode += GET(ecode,1); while (*ecode == OP_ALT); + + offset_top = md->end_offset_top; + eptr = md->end_match_ptr; + + /* For a non-repeating ket, just continue at this level. This also + happens for a repeating ket if no characters were matched in the group. + This is the forcible breaking of infinite loops as implemented in Perl + 5.005. If there is an options reset, it will get obeyed in the normal + course of events. */ + + if (*ecode == OP_KET || eptr == saved_eptr) + { + ecode += 1+LINK_SIZE; + break; + } + + /* The repeating kets try the rest of the pattern or restart from the + preceding bracket, in the appropriate order. We need to reset any options + that changed within the bracket before re-running it, so check the next + opcode. */ + + if (ecode[1+LINK_SIZE] == OP_OPT) + { + ims = (ims & ~PCRE_IMS) | ecode[4]; + DPRINTF(("ims set to %02lx at group repeat\n", ims)); + } + + if (*ecode == OP_KETRMIN) + { + RMATCH(rrc, eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + RMATCH(rrc, eptr, prev, offset_top, md, ims, eptrb, match_isgroup); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + } + else /* OP_KETRMAX */ + { + RMATCH(rrc, eptr, prev, offset_top, md, ims, eptrb, match_isgroup); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + RMATCH(rrc, eptr, ecode + 1+LINK_SIZE, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + } + } + RRETURN(MATCH_NOMATCH); + + /* An alternation is the end of a branch; scan along to find the end of the + bracketed group and go to there. */ + + case OP_ALT: + do ecode += GET(ecode,1); while (*ecode == OP_ALT); + break; + + /* BRAZERO and BRAMINZERO occur just before a bracket group, indicating + that it may occur zero times. It may repeat infinitely, or not at all - + i.e. it could be ()* or ()? in the pattern. Brackets with fixed upper + repeat limits are compiled as a number of copies, with the optional ones + preceded by BRAZERO or BRAMINZERO. */ + + case OP_BRAZERO: + { + next = ecode+1; + RMATCH(rrc, eptr, next, offset_top, md, ims, eptrb, match_isgroup); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + do next += GET(next,1); while (*next == OP_ALT); + ecode = next + 1+LINK_SIZE; + } + break; + + case OP_BRAMINZERO: + { + next = ecode+1; + do next += GET(next,1); while (*next == OP_ALT); + RMATCH(rrc, eptr, next + 1+LINK_SIZE, offset_top, md, ims, eptrb, + match_isgroup); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + ecode++; + } + break; + + /* End of a group, repeated or non-repeating. If we are at the end of + an assertion "group", stop matching and return MATCH_MATCH, but record the + current high water mark for use by positive assertions. Do this also + for the "once" (not-backup up) groups. */ + + case OP_KET: + case OP_KETRMIN: + case OP_KETRMAX: + { + prev = ecode - GET(ecode, 1); + saved_eptr = eptrb->epb_saved_eptr; + + /* Back up the stack of bracket start pointers. */ + + eptrb = eptrb->epb_prev; + + if (*prev == OP_ASSERT || *prev == OP_ASSERT_NOT || + *prev == OP_ASSERTBACK || *prev == OP_ASSERTBACK_NOT || + *prev == OP_ONCE) + { + md->end_match_ptr = eptr; /* For ONCE */ + md->end_offset_top = offset_top; + RRETURN(MATCH_MATCH); + } + + /* In all other cases except a conditional group we have to check the + group number back at the start and if necessary complete handling an + extraction by setting the offsets and bumping the high water mark. */ + + if (*prev != OP_COND) + { + number = *prev - OP_BRA; + + /* For extended extraction brackets (large number), we have to fish out + the number from a dummy opcode at the start. */ + + if (number > EXTRACT_BASIC_MAX) number = GET2(prev, 2+LINK_SIZE); + offset = number << 1; + +#ifdef DEBUG + printf("end bracket %d", number); + printf("\n"); +#endif + + /* Test for a numbered group. This includes groups called as a result + of recursion. Note that whole-pattern recursion is coded as a recurse + into group 0, so it won't be picked up here. Instead, we catch it when + the OP_END is reached. */ + + if (number > 0) + { + md->capture_last = number; + if (offset >= md->offset_max) md->offset_overflow = TRUE; else + { + md->offset_vector[offset] = + md->offset_vector[md->offset_end - number]; + md->offset_vector[offset+1] = eptr - md->start_subject; + if (offset_top <= offset) offset_top = offset + 2; + } + + /* Handle a recursively called group. Restore the offsets + appropriately and continue from after the call. */ + + if (md->recursive != NULL && md->recursive->group_num == number) + { + recursion_info *rec = md->recursive; + DPRINTF(("Recursion (%d) succeeded - continuing\n", number)); + md->recursive = rec->prevrec; + md->start_match = rec->save_start; + memcpy(md->offset_vector, rec->offset_save, + rec->saved_max * sizeof(int)); + ecode = rec->after_call; + ims = original_ims; + break; + } + } + } + + /* Reset the value of the ims flags, in case they got changed during + the group. */ + + ims = original_ims; + DPRINTF(("ims reset to %02lx\n", ims)); + + /* For a non-repeating ket, just continue at this level. This also + happens for a repeating ket if no characters were matched in the group. + This is the forcible breaking of infinite loops as implemented in Perl + 5.005. If there is an options reset, it will get obeyed in the normal + course of events. */ + + if (*ecode == OP_KET || eptr == saved_eptr) + { + ecode += 1 + LINK_SIZE; + break; + } + + /* The repeating kets try the rest of the pattern or restart from the + preceding bracket, in the appropriate order. */ + + if (*ecode == OP_KETRMIN) + { + RMATCH(rrc, eptr, ecode + 1+LINK_SIZE, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + RMATCH(rrc, eptr, prev, offset_top, md, ims, eptrb, match_isgroup); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + } + else /* OP_KETRMAX */ + { + RMATCH(rrc, eptr, prev, offset_top, md, ims, eptrb, match_isgroup); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + RMATCH(rrc, eptr, ecode + 1+LINK_SIZE, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + } + } + + RRETURN(MATCH_NOMATCH); + + /* Start of subject unless notbol, or after internal newline if multiline */ + + case OP_CIRC: + if (md->notbol && eptr == md->start_subject) RRETURN(MATCH_NOMATCH); + if ((ims & PCRE_MULTILINE) != 0) + { + if (eptr != md->start_subject && eptr[-1] != NEWLINE) + RRETURN(MATCH_NOMATCH); + ecode++; + break; + } + /* ... else fall through */ + + /* Start of subject assertion */ + + case OP_SOD: + if (eptr != md->start_subject) RRETURN(MATCH_NOMATCH); + ecode++; + break; + + /* Start of match assertion */ + + case OP_SOM: + if (eptr != md->start_subject + md->start_offset) RRETURN(MATCH_NOMATCH); + ecode++; + break; + + /* Assert before internal newline if multiline, or before a terminating + newline unless endonly is set, else end of subject unless noteol is set. */ + + case OP_DOLL: + if ((ims & PCRE_MULTILINE) != 0) + { + if (eptr < md->end_subject) + { if (*eptr != NEWLINE) RRETURN(MATCH_NOMATCH); } + else + { if (md->noteol) RRETURN(MATCH_NOMATCH); } + ecode++; + break; + } + else + { + if (md->noteol) RRETURN(MATCH_NOMATCH); + if (!md->endonly) + { + if (eptr < md->end_subject - 1 || + (eptr == md->end_subject - 1 && *eptr != NEWLINE)) + RRETURN(MATCH_NOMATCH); + ecode++; + break; + } + } + /* ... else fall through */ + + /* End of subject assertion (\z) */ + + case OP_EOD: + if (eptr < md->end_subject) RRETURN(MATCH_NOMATCH); + ecode++; + break; + + /* End of subject or ending \n assertion (\Z) */ + + case OP_EODN: + if (eptr < md->end_subject - 1 || + (eptr == md->end_subject - 1 && *eptr != NEWLINE)) RRETURN(MATCH_NOMATCH); + ecode++; + break; + + /* Word boundary assertions */ + + case OP_NOT_WORD_BOUNDARY: + case OP_WORD_BOUNDARY: + { + + /* Find out if the previous and current characters are "word" characters. + It takes a bit more work in UTF-8 mode. Characters > 255 are assumed to + be "non-word" characters. */ + +#ifdef SUPPORT_UTF8 + if (utf8) + { + if (eptr == md->start_subject) prev_is_word = FALSE; else + { + const uschar *lastptr = eptr - 1; + while((*lastptr & 0xc0) == 0x80) lastptr--; + GETCHAR(c, lastptr); + prev_is_word = c < 256 && (md->ctypes[c] & ctype_word) != 0; + } + if (eptr >= md->end_subject) cur_is_word = FALSE; else + { + GETCHAR(c, eptr); + cur_is_word = c < 256 && (md->ctypes[c] & ctype_word) != 0; + } + } + else +#endif + + /* More streamlined when not in UTF-8 mode */ + + { + prev_is_word = (eptr != md->start_subject) && + ((md->ctypes[eptr[-1]] & ctype_word) != 0); + cur_is_word = (eptr < md->end_subject) && + ((md->ctypes[*eptr] & ctype_word) != 0); + } + + /* Now see if the situation is what we want */ + + if ((*ecode++ == OP_WORD_BOUNDARY)? + cur_is_word == prev_is_word : cur_is_word != prev_is_word) + RRETURN(MATCH_NOMATCH); + } + break; + + /* Match a single character type; inline for speed */ + + case OP_ANY: + if ((ims & PCRE_DOTALL) == 0 && eptr < md->end_subject && *eptr == NEWLINE) + RRETURN(MATCH_NOMATCH); + if (eptr++ >= md->end_subject) RRETURN(MATCH_NOMATCH); +#ifdef SUPPORT_UTF8 + if (utf8) + while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; +#endif + ecode++; + break; + + /* Match a single byte, even in UTF-8 mode. This opcode really does match + any byte, even newline, independent of the setting of PCRE_DOTALL. */ + + case OP_ANYBYTE: + if (eptr++ >= md->end_subject) RRETURN(MATCH_NOMATCH); + ecode++; + break; + + case OP_NOT_DIGIT: + if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + GETCHARINCTEST(c, eptr); + if ( +#ifdef SUPPORT_UTF8 + c < 256 && +#endif + (md->ctypes[c] & ctype_digit) != 0 + ) + RRETURN(MATCH_NOMATCH); + ecode++; + break; + + case OP_DIGIT: + if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + GETCHARINCTEST(c, eptr); + if ( +#ifdef SUPPORT_UTF8 + c >= 256 || +#endif + (md->ctypes[c] & ctype_digit) == 0 + ) + RRETURN(MATCH_NOMATCH); + ecode++; + break; + + case OP_NOT_WHITESPACE: + if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + GETCHARINCTEST(c, eptr); + if ( +#ifdef SUPPORT_UTF8 + c < 256 && +#endif + (md->ctypes[c] & ctype_space) != 0 + ) + RRETURN(MATCH_NOMATCH); + ecode++; + break; + + case OP_WHITESPACE: + if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + GETCHARINCTEST(c, eptr); + if ( +#ifdef SUPPORT_UTF8 + c >= 256 || +#endif + (md->ctypes[c] & ctype_space) == 0 + ) + RRETURN(MATCH_NOMATCH); + ecode++; + break; + + case OP_NOT_WORDCHAR: + if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + GETCHARINCTEST(c, eptr); + if ( +#ifdef SUPPORT_UTF8 + c < 256 && +#endif + (md->ctypes[c] & ctype_word) != 0 + ) + RRETURN(MATCH_NOMATCH); + ecode++; + break; + + case OP_WORDCHAR: + if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + GETCHARINCTEST(c, eptr); + if ( +#ifdef SUPPORT_UTF8 + c >= 256 || +#endif + (md->ctypes[c] & ctype_word) == 0 + ) + RRETURN(MATCH_NOMATCH); + ecode++; + break; + +#ifdef SUPPORT_UCP + /* Check the next character by Unicode property. We will get here only + if the support is in the binary; otherwise a compile-time error occurs. */ + + case OP_PROP: + case OP_NOTPROP: + if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + GETCHARINCTEST(c, eptr); + { + int chartype, rqdtype; + int othercase; + int category = ucp_findchar(c, &chartype, &othercase); + + rqdtype = *(++ecode); + ecode++; + + if (rqdtype >= 128) + { + if ((rqdtype - 128 != category) == (op == OP_PROP)) + RRETURN(MATCH_NOMATCH); + } + else + { + if ((rqdtype != chartype) == (op == OP_PROP)) + RRETURN(MATCH_NOMATCH); + } + } + break; + + /* Match an extended Unicode sequence. We will get here only if the support + is in the binary; otherwise a compile-time error occurs. */ + + case OP_EXTUNI: + if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + GETCHARINCTEST(c, eptr); + { + int chartype; + int othercase; + int category = ucp_findchar(c, &chartype, &othercase); + if (category == ucp_M) RRETURN(MATCH_NOMATCH); + while (eptr < md->end_subject) + { + int len = 1; + if (!utf8) c = *eptr; else + { + GETCHARLEN(c, eptr, len); + } + category = ucp_findchar(c, &chartype, &othercase); + if (category != ucp_M) break; + eptr += len; + } + } + ecode++; + break; +#endif + + + /* Match a back reference, possibly repeatedly. Look past the end of the + item to see if there is repeat information following. The code is similar + to that for character classes, but repeated for efficiency. Then obey + similar code to character type repeats - written out again for speed. + However, if the referenced string is the empty string, always treat + it as matched, any number of times (otherwise there could be infinite + loops). */ + + case OP_REF: + { + offset = GET2(ecode, 1) << 1; /* Doubled ref number */ + ecode += 3; /* Advance past item */ + + /* If the reference is unset, set the length to be longer than the amount + of subject left; this ensures that every attempt at a match fails. We + can't just fail here, because of the possibility of quantifiers with zero + minima. */ + + length = (offset >= offset_top || md->offset_vector[offset] < 0)? + md->end_subject - eptr + 1 : + md->offset_vector[offset+1] - md->offset_vector[offset]; + + /* Set up for repetition, or handle the non-repeated case */ + + switch (*ecode) + { + case OP_CRSTAR: + case OP_CRMINSTAR: + case OP_CRPLUS: + case OP_CRMINPLUS: + case OP_CRQUERY: + case OP_CRMINQUERY: + c = *ecode++ - OP_CRSTAR; + minimize = (c & 1) != 0; + min = rep_min[c]; /* Pick up values from tables; */ + max = rep_max[c]; /* zero for max => infinity */ + if (max == 0) max = INT_MAX; + break; + + case OP_CRRANGE: + case OP_CRMINRANGE: + minimize = (*ecode == OP_CRMINRANGE); + min = GET2(ecode, 1); + max = GET2(ecode, 3); + if (max == 0) max = INT_MAX; + ecode += 5; + break; + + default: /* No repeat follows */ + if (!match_ref(offset, eptr, length, md, ims)) RRETURN(MATCH_NOMATCH); + eptr += length; + continue; /* With the main loop */ + } + + /* If the length of the reference is zero, just continue with the + main loop. */ + + if (length == 0) continue; + + /* First, ensure the minimum number of matches are present. We get back + the length of the reference string explicitly rather than passing the + address of eptr, so that eptr can be a register variable. */ + + for (i = 1; i <= min; i++) + { + if (!match_ref(offset, eptr, length, md, ims)) RRETURN(MATCH_NOMATCH); + eptr += length; + } + + /* If min = max, continue at the same level without recursion. + They are not both allowed to be zero. */ + + if (min == max) continue; + + /* If minimizing, keep trying and advancing the pointer */ + + if (minimize) + { + for (fi = min;; fi++) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max || !match_ref(offset, eptr, length, md, ims)) + RRETURN(MATCH_NOMATCH); + eptr += length; + } + /* Control never gets here */ + } + + /* If maximizing, find the longest string and work backwards */ + + else + { + pp = eptr; + for (i = min; i < max; i++) + { + if (!match_ref(offset, eptr, length, md, ims)) break; + eptr += length; + } + while (eptr >= pp) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + eptr -= length; + } + RRETURN(MATCH_NOMATCH); + } + } + /* Control never gets here */ + + + + /* Match a bit-mapped character class, possibly repeatedly. This op code is + used when all the characters in the class have values in the range 0-255, + and either the matching is caseful, or the characters are in the range + 0-127 when UTF-8 processing is enabled. The only difference between + OP_CLASS and OP_NCLASS occurs when a data character outside the range is + encountered. + + First, look past the end of the item to see if there is repeat information + following. Then obey similar code to character type repeats - written out + again for speed. */ + + case OP_NCLASS: + case OP_CLASS: + { + data = ecode + 1; /* Save for matching */ + ecode += 33; /* Advance past the item */ + + switch (*ecode) + { + case OP_CRSTAR: + case OP_CRMINSTAR: + case OP_CRPLUS: + case OP_CRMINPLUS: + case OP_CRQUERY: + case OP_CRMINQUERY: + c = *ecode++ - OP_CRSTAR; + minimize = (c & 1) != 0; + min = rep_min[c]; /* Pick up values from tables; */ + max = rep_max[c]; /* zero for max => infinity */ + if (max == 0) max = INT_MAX; + break; + + case OP_CRRANGE: + case OP_CRMINRANGE: + minimize = (*ecode == OP_CRMINRANGE); + min = GET2(ecode, 1); + max = GET2(ecode, 3); + if (max == 0) max = INT_MAX; + ecode += 5; + break; + + default: /* No repeat follows */ + min = max = 1; + break; + } + + /* First, ensure the minimum number of matches are present. */ + +#ifdef SUPPORT_UTF8 + /* UTF-8 mode */ + if (utf8) + { + for (i = 1; i <= min; i++) + { + if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + GETCHARINC(c, eptr); + if (c > 255) + { + if (op == OP_CLASS) RRETURN(MATCH_NOMATCH); + } + else + { + if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH); + } + } + } + else +#endif + /* Not UTF-8 mode */ + { + for (i = 1; i <= min; i++) + { + if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + c = *eptr++; + if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH); + } + } + + /* If max == min we can continue with the main loop without the + need to recurse. */ + + if (min == max) continue; + + /* If minimizing, keep testing the rest of the expression and advancing + the pointer while it matches the class. */ + + if (minimize) + { +#ifdef SUPPORT_UTF8 + /* UTF-8 mode */ + if (utf8) + { + for (fi = min;; fi++) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + GETCHARINC(c, eptr); + if (c > 255) + { + if (op == OP_CLASS) RRETURN(MATCH_NOMATCH); + } + else + { + if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH); + } + } + } + else +#endif + /* Not UTF-8 mode */ + { + for (fi = min;; fi++) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + c = *eptr++; + if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH); + } + } + /* Control never gets here */ + } + + /* If maximizing, find the longest possible run, then work backwards. */ + + else + { + pp = eptr; + +#ifdef SUPPORT_UTF8 + /* UTF-8 mode */ + if (utf8) + { + for (i = min; i < max; i++) + { + int len = 1; + if (eptr >= md->end_subject) break; + GETCHARLEN(c, eptr, len); + if (c > 255) + { + if (op == OP_CLASS) break; + } + else + { + if ((data[c/8] & (1 << (c&7))) == 0) break; + } + eptr += len; + } + for (;;) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (eptr-- == pp) break; /* Stop if tried at original pos */ + BACKCHAR(eptr); + } + } + else +#endif + /* Not UTF-8 mode */ + { + for (i = min; i < max; i++) + { + if (eptr >= md->end_subject) break; + c = *eptr; + if ((data[c/8] & (1 << (c&7))) == 0) break; + eptr++; + } + while (eptr >= pp) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + eptr--; + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + } + } + + RRETURN(MATCH_NOMATCH); + } + } + /* Control never gets here */ + + + /* Match an extended character class. This opcode is encountered only + in UTF-8 mode, because that's the only time it is compiled. */ + +#ifdef SUPPORT_UTF8 + case OP_XCLASS: + { + data = ecode + 1 + LINK_SIZE; /* Save for matching */ + ecode += GET(ecode, 1); /* Advance past the item */ + + switch (*ecode) + { + case OP_CRSTAR: + case OP_CRMINSTAR: + case OP_CRPLUS: + case OP_CRMINPLUS: + case OP_CRQUERY: + case OP_CRMINQUERY: + c = *ecode++ - OP_CRSTAR; + minimize = (c & 1) != 0; + min = rep_min[c]; /* Pick up values from tables; */ + max = rep_max[c]; /* zero for max => infinity */ + if (max == 0) max = INT_MAX; + break; + + case OP_CRRANGE: + case OP_CRMINRANGE: + minimize = (*ecode == OP_CRMINRANGE); + min = GET2(ecode, 1); + max = GET2(ecode, 3); + if (max == 0) max = INT_MAX; + ecode += 5; + break; + + default: /* No repeat follows */ + min = max = 1; + break; + } + + /* First, ensure the minimum number of matches are present. */ + + for (i = 1; i <= min; i++) + { + if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + GETCHARINC(c, eptr); + if (!_pcre_xclass(c, data)) RRETURN(MATCH_NOMATCH); + } + + /* If max == min we can continue with the main loop without the + need to recurse. */ + + if (min == max) continue; + + /* If minimizing, keep testing the rest of the expression and advancing + the pointer while it matches the class. */ + + if (minimize) + { + for (fi = min;; fi++) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + GETCHARINC(c, eptr); + if (!_pcre_xclass(c, data)) RRETURN(MATCH_NOMATCH); + } + /* Control never gets here */ + } + + /* If maximizing, find the longest possible run, then work backwards. */ + + else + { + pp = eptr; + for (i = min; i < max; i++) + { + int len = 1; + if (eptr >= md->end_subject) break; + GETCHARLEN(c, eptr, len); + if (!_pcre_xclass(c, data)) break; + eptr += len; + } + for(;;) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (eptr-- == pp) break; /* Stop if tried at original pos */ + BACKCHAR(eptr) + } + RRETURN(MATCH_NOMATCH); + } + + /* Control never gets here */ + } +#endif /* End of XCLASS */ + + /* Match a single character, casefully */ + + case OP_CHAR: +#ifdef SUPPORT_UTF8 + if (utf8) + { + length = 1; + ecode++; + GETCHARLEN(fc, ecode, length); + if (length > md->end_subject - eptr) RRETURN(MATCH_NOMATCH); + while (length-- > 0) if (*ecode++ != *eptr++) RRETURN(MATCH_NOMATCH); + } + else +#endif + + /* Non-UTF-8 mode */ + { + if (md->end_subject - eptr < 1) RRETURN(MATCH_NOMATCH); + if (ecode[1] != *eptr++) RRETURN(MATCH_NOMATCH); + ecode += 2; + } + break; + + /* Match a single character, caselessly */ + + case OP_CHARNC: +#ifdef SUPPORT_UTF8 + if (utf8) + { + length = 1; + ecode++; + GETCHARLEN(fc, ecode, length); + + if (length > md->end_subject - eptr) RRETURN(MATCH_NOMATCH); + + /* If the pattern character's value is < 128, we have only one byte, and + can use the fast lookup table. */ + + if (fc < 128) + { + if (md->lcc[*ecode++] != md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH); + } + + /* Otherwise we must pick up the subject character */ + + else + { + int dc; + GETCHARINC(dc, eptr); + ecode += length; + + /* If we have Unicode property support, we can use it to test the other + case of the character, if there is one. The result of ucp_findchar() is + < 0 if the char isn't found, and othercase is returned as zero if there + isn't one. */ + + if (fc != dc) + { +#ifdef SUPPORT_UCP + int chartype; + int othercase; + if (ucp_findchar(fc, &chartype, &othercase) < 0 || dc != othercase) +#endif + RRETURN(MATCH_NOMATCH); + } + } + } + else +#endif /* SUPPORT_UTF8 */ + + /* Non-UTF-8 mode */ + { + if (md->end_subject - eptr < 1) RRETURN(MATCH_NOMATCH); + if (md->lcc[ecode[1]] != md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH); + ecode += 2; + } + break; + + /* Match a single character repeatedly; different opcodes share code. */ + + case OP_EXACT: + min = max = GET2(ecode, 1); + ecode += 3; + goto REPEATCHAR; + + case OP_UPTO: + case OP_MINUPTO: + min = 0; + max = GET2(ecode, 1); + minimize = *ecode == OP_MINUPTO; + ecode += 3; + goto REPEATCHAR; + + case OP_STAR: + case OP_MINSTAR: + case OP_PLUS: + case OP_MINPLUS: + case OP_QUERY: + case OP_MINQUERY: + c = *ecode++ - OP_STAR; + minimize = (c & 1) != 0; + min = rep_min[c]; /* Pick up values from tables; */ + max = rep_max[c]; /* zero for max => infinity */ + if (max == 0) max = INT_MAX; + + /* Common code for all repeated single-character matches. We can give + up quickly if there are fewer than the minimum number of characters left in + the subject. */ + + REPEATCHAR: +#ifdef SUPPORT_UTF8 + if (utf8) + { + length = 1; + charptr = ecode; + GETCHARLEN(fc, ecode, length); + if (min * length > md->end_subject - eptr) RRETURN(MATCH_NOMATCH); + ecode += length; + + /* Handle multibyte character matching specially here. There is + support for caseless matching if UCP support is present. */ + + if (length > 1) + { + int oclength = 0; + uschar occhars[8]; + +#ifdef SUPPORT_UCP + int othercase; + int chartype; + if ((ims & PCRE_CASELESS) != 0 && + ucp_findchar(fc, &chartype, &othercase) >= 0 && + othercase > 0) + oclength = _pcre_ord2utf8(othercase, occhars); +#endif /* SUPPORT_UCP */ + + for (i = 1; i <= min; i++) + { + if (memcmp(eptr, charptr, length) == 0) eptr += length; + /* Need braces because of following else */ + else if (oclength == 0) { RRETURN(MATCH_NOMATCH); } + else + { + if (memcmp(eptr, occhars, oclength) != 0) RRETURN(MATCH_NOMATCH); + eptr += oclength; + } + } + + if (min == max) continue; + + if (minimize) + { + for (fi = min;; fi++) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + if (memcmp(eptr, charptr, length) == 0) eptr += length; + /* Need braces because of following else */ + else if (oclength == 0) { RRETURN(MATCH_NOMATCH); } + else + { + if (memcmp(eptr, occhars, oclength) != 0) RRETURN(MATCH_NOMATCH); + eptr += oclength; + } + } + /* Control never gets here */ + } + else + { + pp = eptr; + for (i = min; i < max; i++) + { + if (eptr > md->end_subject - length) break; + if (memcmp(eptr, charptr, length) == 0) eptr += length; + else if (oclength == 0) break; + else + { + if (memcmp(eptr, occhars, oclength) != 0) break; + eptr += oclength; + } + } + while (eptr >= pp) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + eptr -= length; + } + RRETURN(MATCH_NOMATCH); + } + /* Control never gets here */ + } + + /* If the length of a UTF-8 character is 1, we fall through here, and + obey the code as for non-UTF-8 characters below, though in this case the + value of fc will always be < 128. */ + } + else +#endif /* SUPPORT_UTF8 */ + + /* When not in UTF-8 mode, load a single-byte character. */ + { + if (min > md->end_subject - eptr) RRETURN(MATCH_NOMATCH); + fc = *ecode++; + } + + /* The value of fc at this point is always less than 256, though we may or + may not be in UTF-8 mode. The code is duplicated for the caseless and + caseful cases, for speed, since matching characters is likely to be quite + common. First, ensure the minimum number of matches are present. If min = + max, continue at the same level without recursing. Otherwise, if + minimizing, keep trying the rest of the expression and advancing one + matching character if failing, up to the maximum. Alternatively, if + maximizing, find the maximum number of characters and work backwards. */ + + DPRINTF(("matching %c{%d,%d} against subject %.*s\n", fc, min, max, + max, eptr)); + + if ((ims & PCRE_CASELESS) != 0) + { + fc = md->lcc[fc]; + for (i = 1; i <= min; i++) + if (fc != md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH); + if (min == max) continue; + if (minimize) + { + for (fi = min;; fi++) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max || eptr >= md->end_subject || + fc != md->lcc[*eptr++]) + RRETURN(MATCH_NOMATCH); + } + /* Control never gets here */ + } + else + { + pp = eptr; + for (i = min; i < max; i++) + { + if (eptr >= md->end_subject || fc != md->lcc[*eptr]) break; + eptr++; + } + while (eptr >= pp) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + eptr--; + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + } + RRETURN(MATCH_NOMATCH); + } + /* Control never gets here */ + } + + /* Caseful comparisons (includes all multi-byte characters) */ + + else + { + for (i = 1; i <= min; i++) if (fc != *eptr++) RRETURN(MATCH_NOMATCH); + if (min == max) continue; + if (minimize) + { + for (fi = min;; fi++) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max || eptr >= md->end_subject || fc != *eptr++) + RRETURN(MATCH_NOMATCH); + } + /* Control never gets here */ + } + else + { + pp = eptr; + for (i = min; i < max; i++) + { + if (eptr >= md->end_subject || fc != *eptr) break; + eptr++; + } + while (eptr >= pp) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + eptr--; + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + } + RRETURN(MATCH_NOMATCH); + } + } + /* Control never gets here */ + + /* Match a negated single one-byte character. The character we are + checking can be multibyte. */ + + case OP_NOT: + if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + ecode++; + GETCHARINCTEST(c, eptr); + if ((ims & PCRE_CASELESS) != 0) + { +#ifdef SUPPORT_UTF8 + if (c < 256) +#endif + c = md->lcc[c]; + if (md->lcc[*ecode++] == c) RRETURN(MATCH_NOMATCH); + } + else + { + if (*ecode++ == c) RRETURN(MATCH_NOMATCH); + } + break; + + /* Match a negated single one-byte character repeatedly. This is almost a + repeat of the code for a repeated single character, but I haven't found a + nice way of commoning these up that doesn't require a test of the + positive/negative option for each character match. Maybe that wouldn't add + very much to the time taken, but character matching *is* what this is all + about... */ + + case OP_NOTEXACT: + min = max = GET2(ecode, 1); + ecode += 3; + goto REPEATNOTCHAR; + + case OP_NOTUPTO: + case OP_NOTMINUPTO: + min = 0; + max = GET2(ecode, 1); + minimize = *ecode == OP_NOTMINUPTO; + ecode += 3; + goto REPEATNOTCHAR; + + case OP_NOTSTAR: + case OP_NOTMINSTAR: + case OP_NOTPLUS: + case OP_NOTMINPLUS: + case OP_NOTQUERY: + case OP_NOTMINQUERY: + c = *ecode++ - OP_NOTSTAR; + minimize = (c & 1) != 0; + min = rep_min[c]; /* Pick up values from tables; */ + max = rep_max[c]; /* zero for max => infinity */ + if (max == 0) max = INT_MAX; + + /* Common code for all repeated single-byte matches. We can give up quickly + if there are fewer than the minimum number of bytes left in the + subject. */ + + REPEATNOTCHAR: + if (min > md->end_subject - eptr) RRETURN(MATCH_NOMATCH); + fc = *ecode++; + + /* The code is duplicated for the caseless and caseful cases, for speed, + since matching characters is likely to be quite common. First, ensure the + minimum number of matches are present. If min = max, continue at the same + level without recursing. Otherwise, if minimizing, keep trying the rest of + the expression and advancing one matching character if failing, up to the + maximum. Alternatively, if maximizing, find the maximum number of + characters and work backwards. */ + + DPRINTF(("negative matching %c{%d,%d} against subject %.*s\n", fc, min, max, + max, eptr)); + + if ((ims & PCRE_CASELESS) != 0) + { + fc = md->lcc[fc]; + +#ifdef SUPPORT_UTF8 + /* UTF-8 mode */ + if (utf8) + { + register int d; + for (i = 1; i <= min; i++) + { + GETCHARINC(d, eptr); + if (d < 256) d = md->lcc[d]; + if (fc == d) RRETURN(MATCH_NOMATCH); + } + } + else +#endif + + /* Not UTF-8 mode */ + { + for (i = 1; i <= min; i++) + if (fc == md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH); + } + + if (min == max) continue; + + if (minimize) + { +#ifdef SUPPORT_UTF8 + /* UTF-8 mode */ + if (utf8) + { + register int d; + for (fi = min;; fi++) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + GETCHARINC(d, eptr); + if (d < 256) d = md->lcc[d]; + if (fi >= max || eptr >= md->end_subject || fc == d) + RRETURN(MATCH_NOMATCH); + } + } + else +#endif + /* Not UTF-8 mode */ + { + for (fi = min;; fi++) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max || eptr >= md->end_subject || fc == md->lcc[*eptr++]) + RRETURN(MATCH_NOMATCH); + } + } + /* Control never gets here */ + } + + /* Maximize case */ + + else + { + pp = eptr; + +#ifdef SUPPORT_UTF8 + /* UTF-8 mode */ + if (utf8) + { + register int d; + for (i = min; i < max; i++) + { + int len = 1; + if (eptr >= md->end_subject) break; + GETCHARLEN(d, eptr, len); + if (d < 256) d = md->lcc[d]; + if (fc == d) break; + eptr += len; + } + for(;;) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (eptr-- == pp) break; /* Stop if tried at original pos */ + BACKCHAR(eptr); + } + } + else +#endif + /* Not UTF-8 mode */ + { + for (i = min; i < max; i++) + { + if (eptr >= md->end_subject || fc == md->lcc[*eptr]) break; + eptr++; + } + while (eptr >= pp) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + eptr--; + } + } + + RRETURN(MATCH_NOMATCH); + } + /* Control never gets here */ + } + + /* Caseful comparisons */ + + else + { +#ifdef SUPPORT_UTF8 + /* UTF-8 mode */ + if (utf8) + { + register int d; + for (i = 1; i <= min; i++) + { + GETCHARINC(d, eptr); + if (fc == d) RRETURN(MATCH_NOMATCH); + } + } + else +#endif + /* Not UTF-8 mode */ + { + for (i = 1; i <= min; i++) + if (fc == *eptr++) RRETURN(MATCH_NOMATCH); + } + + if (min == max) continue; + + if (minimize) + { +#ifdef SUPPORT_UTF8 + /* UTF-8 mode */ + if (utf8) + { + register int d; + for (fi = min;; fi++) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + GETCHARINC(d, eptr); + if (fi >= max || eptr >= md->end_subject || fc == d) + RRETURN(MATCH_NOMATCH); + } + } + else +#endif + /* Not UTF-8 mode */ + { + for (fi = min;; fi++) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max || eptr >= md->end_subject || fc == *eptr++) + RRETURN(MATCH_NOMATCH); + } + } + /* Control never gets here */ + } + + /* Maximize case */ + + else + { + pp = eptr; + +#ifdef SUPPORT_UTF8 + /* UTF-8 mode */ + if (utf8) + { + register int d; + for (i = min; i < max; i++) + { + int len = 1; + if (eptr >= md->end_subject) break; + GETCHARLEN(d, eptr, len); + if (fc == d) break; + eptr += len; + } + for(;;) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (eptr-- == pp) break; /* Stop if tried at original pos */ + BACKCHAR(eptr); + } + } + else +#endif + /* Not UTF-8 mode */ + { + for (i = min; i < max; i++) + { + if (eptr >= md->end_subject || fc == *eptr) break; + eptr++; + } + while (eptr >= pp) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + eptr--; + } + } + + RRETURN(MATCH_NOMATCH); + } + } + /* Control never gets here */ + + /* Match a single character type repeatedly; several different opcodes + share code. This is very similar to the code for single characters, but we + repeat it in the interests of efficiency. */ + + case OP_TYPEEXACT: + min = max = GET2(ecode, 1); + minimize = TRUE; + ecode += 3; + goto REPEATTYPE; + + case OP_TYPEUPTO: + case OP_TYPEMINUPTO: + min = 0; + max = GET2(ecode, 1); + minimize = *ecode == OP_TYPEMINUPTO; + ecode += 3; + goto REPEATTYPE; + + case OP_TYPESTAR: + case OP_TYPEMINSTAR: + case OP_TYPEPLUS: + case OP_TYPEMINPLUS: + case OP_TYPEQUERY: + case OP_TYPEMINQUERY: + c = *ecode++ - OP_TYPESTAR; + minimize = (c & 1) != 0; + min = rep_min[c]; /* Pick up values from tables; */ + max = rep_max[c]; /* zero for max => infinity */ + if (max == 0) max = INT_MAX; + + /* Common code for all repeated single character type matches. Note that + in UTF-8 mode, '.' matches a character of any length, but for the other + character types, the valid characters are all one-byte long. */ + + REPEATTYPE: + ctype = *ecode++; /* Code for the character type */ + +#ifdef SUPPORT_UCP + if (ctype == OP_PROP || ctype == OP_NOTPROP) + { + prop_fail_result = ctype == OP_NOTPROP; + prop_type = *ecode++; + if (prop_type >= 128) + { + prop_test_against = prop_type - 128; + prop_test_variable = &prop_category; + } + else + { + prop_test_against = prop_type; + prop_test_variable = &prop_chartype; + } + } + else prop_type = -1; +#endif + + /* First, ensure the minimum number of matches are present. Use inline + code for maximizing the speed, and do the type test once at the start + (i.e. keep it out of the loop). Also we can test that there are at least + the minimum number of bytes before we start. This isn't as effective in + UTF-8 mode, but it does no harm. Separate the UTF-8 code completely as that + is tidier. Also separate the UCP code, which can be the same for both UTF-8 + and single-bytes. */ + + if (min > md->end_subject - eptr) RRETURN(MATCH_NOMATCH); + if (min > 0) + { +#ifdef SUPPORT_UCP + if (prop_type > 0) + { + for (i = 1; i <= min; i++) + { + GETCHARINC(c, eptr); + prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase); + if ((*prop_test_variable == prop_test_against) == prop_fail_result) + RRETURN(MATCH_NOMATCH); + } + } + + /* Match extended Unicode sequences. We will get here only if the + support is in the binary; otherwise a compile-time error occurs. */ + + else if (ctype == OP_EXTUNI) + { + for (i = 1; i <= min; i++) + { + GETCHARINCTEST(c, eptr); + prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase); + if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH); + while (eptr < md->end_subject) + { + int len = 1; + if (!utf8) c = *eptr; else + { + GETCHARLEN(c, eptr, len); + } + prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase); + if (prop_category != ucp_M) break; + eptr += len; + } + } + } + + else +#endif /* SUPPORT_UCP */ + +/* Handle all other cases when the coding is UTF-8 */ + +#ifdef SUPPORT_UTF8 + if (utf8) switch(ctype) + { + case OP_ANY: + for (i = 1; i <= min; i++) + { + if (eptr >= md->end_subject || + (*eptr++ == NEWLINE && (ims & PCRE_DOTALL) == 0)) + RRETURN(MATCH_NOMATCH); + while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; + } + break; + + case OP_ANYBYTE: + eptr += min; + break; + + case OP_NOT_DIGIT: + for (i = 1; i <= min; i++) + { + if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + GETCHARINC(c, eptr); + if (c < 128 && (md->ctypes[c] & ctype_digit) != 0) + RRETURN(MATCH_NOMATCH); + } + break; + + case OP_DIGIT: + for (i = 1; i <= min; i++) + { + if (eptr >= md->end_subject || + *eptr >= 128 || (md->ctypes[*eptr++] & ctype_digit) == 0) + RRETURN(MATCH_NOMATCH); + /* No need to skip more bytes - we know it's a 1-byte character */ + } + break; + + case OP_NOT_WHITESPACE: + for (i = 1; i <= min; i++) + { + if (eptr >= md->end_subject || + (*eptr < 128 && (md->ctypes[*eptr++] & ctype_space) != 0)) + RRETURN(MATCH_NOMATCH); + while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; + } + break; + + case OP_WHITESPACE: + for (i = 1; i <= min; i++) + { + if (eptr >= md->end_subject || + *eptr >= 128 || (md->ctypes[*eptr++] & ctype_space) == 0) + RRETURN(MATCH_NOMATCH); + /* No need to skip more bytes - we know it's a 1-byte character */ + } + break; + + case OP_NOT_WORDCHAR: + for (i = 1; i <= min; i++) + { + if (eptr >= md->end_subject || + (*eptr < 128 && (md->ctypes[*eptr++] & ctype_word) != 0)) + RRETURN(MATCH_NOMATCH); + while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; + } + break; + + case OP_WORDCHAR: + for (i = 1; i <= min; i++) + { + if (eptr >= md->end_subject || + *eptr >= 128 || (md->ctypes[*eptr++] & ctype_word) == 0) + RRETURN(MATCH_NOMATCH); + /* No need to skip more bytes - we know it's a 1-byte character */ + } + break; + + default: + RRETURN(PCRE_ERROR_INTERNAL); + } /* End switch(ctype) */ + + else +#endif /* SUPPORT_UTF8 */ + + /* Code for the non-UTF-8 case for minimum matching of operators other + than OP_PROP and OP_NOTPROP. */ + + switch(ctype) + { + case OP_ANY: + if ((ims & PCRE_DOTALL) == 0) + { + for (i = 1; i <= min; i++) + if (*eptr++ == NEWLINE) RRETURN(MATCH_NOMATCH); + } + else eptr += min; + break; + + case OP_ANYBYTE: + eptr += min; + break; + + case OP_NOT_DIGIT: + for (i = 1; i <= min; i++) + if ((md->ctypes[*eptr++] & ctype_digit) != 0) RRETURN(MATCH_NOMATCH); + break; + + case OP_DIGIT: + for (i = 1; i <= min; i++) + if ((md->ctypes[*eptr++] & ctype_digit) == 0) RRETURN(MATCH_NOMATCH); + break; + + case OP_NOT_WHITESPACE: + for (i = 1; i <= min; i++) + if ((md->ctypes[*eptr++] & ctype_space) != 0) RRETURN(MATCH_NOMATCH); + break; + + case OP_WHITESPACE: + for (i = 1; i <= min; i++) + if ((md->ctypes[*eptr++] & ctype_space) == 0) RRETURN(MATCH_NOMATCH); + break; + + case OP_NOT_WORDCHAR: + for (i = 1; i <= min; i++) + if ((md->ctypes[*eptr++] & ctype_word) != 0) + RRETURN(MATCH_NOMATCH); + break; + + case OP_WORDCHAR: + for (i = 1; i <= min; i++) + if ((md->ctypes[*eptr++] & ctype_word) == 0) + RRETURN(MATCH_NOMATCH); + break; + + default: + RRETURN(PCRE_ERROR_INTERNAL); + } + } + + /* If min = max, continue at the same level without recursing */ + + if (min == max) continue; + + /* If minimizing, we have to test the rest of the pattern before each + subsequent match. Again, separate the UTF-8 case for speed, and also + separate the UCP cases. */ + + if (minimize) + { +#ifdef SUPPORT_UCP + if (prop_type > 0) + { + for (fi = min;; fi++) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + GETCHARINC(c, eptr); + prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase); + if ((*prop_test_variable == prop_test_against) == prop_fail_result) + RRETURN(MATCH_NOMATCH); + } + } + + /* Match extended Unicode sequences. We will get here only if the + support is in the binary; otherwise a compile-time error occurs. */ + + else if (ctype == OP_EXTUNI) + { + for (fi = min;; fi++) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + GETCHARINCTEST(c, eptr); + prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase); + if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH); + while (eptr < md->end_subject) + { + int len = 1; + if (!utf8) c = *eptr; else + { + GETCHARLEN(c, eptr, len); + } + prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase); + if (prop_category != ucp_M) break; + eptr += len; + } + } + } + + else +#endif /* SUPPORT_UCP */ + +#ifdef SUPPORT_UTF8 + /* UTF-8 mode */ + if (utf8) + { + for (fi = min;; fi++) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + + GETCHARINC(c, eptr); + switch(ctype) + { + case OP_ANY: + if ((ims & PCRE_DOTALL) == 0 && c == NEWLINE) RRETURN(MATCH_NOMATCH); + break; + + case OP_ANYBYTE: + break; + + case OP_NOT_DIGIT: + if (c < 256 && (md->ctypes[c] & ctype_digit) != 0) + RRETURN(MATCH_NOMATCH); + break; + + case OP_DIGIT: + if (c >= 256 || (md->ctypes[c] & ctype_digit) == 0) + RRETURN(MATCH_NOMATCH); + break; + + case OP_NOT_WHITESPACE: + if (c < 256 && (md->ctypes[c] & ctype_space) != 0) + RRETURN(MATCH_NOMATCH); + break; + + case OP_WHITESPACE: + if (c >= 256 || (md->ctypes[c] & ctype_space) == 0) + RRETURN(MATCH_NOMATCH); + break; + + case OP_NOT_WORDCHAR: + if (c < 256 && (md->ctypes[c] & ctype_word) != 0) + RRETURN(MATCH_NOMATCH); + break; + + case OP_WORDCHAR: + if (c >= 256 || (md->ctypes[c] & ctype_word) == 0) + RRETURN(MATCH_NOMATCH); + break; + + default: + RRETURN(PCRE_ERROR_INTERNAL); + } + } + } + else +#endif + /* Not UTF-8 mode */ + { + for (fi = min;; fi++) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + c = *eptr++; + switch(ctype) + { + case OP_ANY: + if ((ims & PCRE_DOTALL) == 0 && c == NEWLINE) RRETURN(MATCH_NOMATCH); + break; + + case OP_ANYBYTE: + break; + + case OP_NOT_DIGIT: + if ((md->ctypes[c] & ctype_digit) != 0) RRETURN(MATCH_NOMATCH); + break; + + case OP_DIGIT: + if ((md->ctypes[c] & ctype_digit) == 0) RRETURN(MATCH_NOMATCH); + break; + + case OP_NOT_WHITESPACE: + if ((md->ctypes[c] & ctype_space) != 0) RRETURN(MATCH_NOMATCH); + break; + + case OP_WHITESPACE: + if ((md->ctypes[c] & ctype_space) == 0) RRETURN(MATCH_NOMATCH); + break; + + case OP_NOT_WORDCHAR: + if ((md->ctypes[c] & ctype_word) != 0) RRETURN(MATCH_NOMATCH); + break; + + case OP_WORDCHAR: + if ((md->ctypes[c] & ctype_word) == 0) RRETURN(MATCH_NOMATCH); + break; + + default: + RRETURN(PCRE_ERROR_INTERNAL); + } + } + } + /* Control never gets here */ + } + + /* If maximizing it is worth using inline code for speed, doing the type + test once at the start (i.e. keep it out of the loop). Again, keep the + UTF-8 and UCP stuff separate. */ + + else + { + pp = eptr; /* Remember where we started */ + +#ifdef SUPPORT_UCP + if (prop_type > 0) + { + for (i = min; i < max; i++) + { + int len = 1; + if (eptr >= md->end_subject) break; + GETCHARLEN(c, eptr, len); + prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase); + if ((*prop_test_variable == prop_test_against) == prop_fail_result) + break; + eptr+= len; + } + + /* eptr is now past the end of the maximum run */ + + for(;;) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (eptr-- == pp) break; /* Stop if tried at original pos */ + BACKCHAR(eptr); + } + } + + /* Match extended Unicode sequences. We will get here only if the + support is in the binary; otherwise a compile-time error occurs. */ + + else if (ctype == OP_EXTUNI) + { + for (i = min; i < max; i++) + { + if (eptr >= md->end_subject) break; + GETCHARINCTEST(c, eptr); + prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase); + if (prop_category == ucp_M) break; + while (eptr < md->end_subject) + { + int len = 1; + if (!utf8) c = *eptr; else + { + GETCHARLEN(c, eptr, len); + } + prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase); + if (prop_category != ucp_M) break; + eptr += len; + } + } + + /* eptr is now past the end of the maximum run */ + + for(;;) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (eptr-- == pp) break; /* Stop if tried at original pos */ + for (;;) /* Move back over one extended */ + { + int len = 1; + BACKCHAR(eptr); + if (!utf8) c = *eptr; else + { + GETCHARLEN(c, eptr, len); + } + prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase); + if (prop_category != ucp_M) break; + eptr--; + } + } + } + + else +#endif /* SUPPORT_UCP */ + +#ifdef SUPPORT_UTF8 + /* UTF-8 mode */ + + if (utf8) + { + switch(ctype) + { + case OP_ANY: + + /* Special code is required for UTF8, but when the maximum is unlimited + we don't need it, so we repeat the non-UTF8 code. This is probably + worth it, because .* is quite a common idiom. */ + + if (max < INT_MAX) + { + if ((ims & PCRE_DOTALL) == 0) + { + for (i = min; i < max; i++) + { + if (eptr >= md->end_subject || *eptr == NEWLINE) break; + eptr++; + while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; + } + } + else + { + for (i = min; i < max; i++) + { + eptr++; + while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; + } + } + } + + /* Handle unlimited UTF-8 repeat */ + + else + { + if ((ims & PCRE_DOTALL) == 0) + { + for (i = min; i < max; i++) + { + if (eptr >= md->end_subject || *eptr == NEWLINE) break; + eptr++; + } + break; + } + else + { + c = max - min; + if (c > md->end_subject - eptr) c = md->end_subject - eptr; + eptr += c; + } + } + break; + + /* The byte case is the same as non-UTF8 */ + + case OP_ANYBYTE: + c = max - min; + if (c > md->end_subject - eptr) c = md->end_subject - eptr; + eptr += c; + break; + + case OP_NOT_DIGIT: + for (i = min; i < max; i++) + { + int len = 1; + if (eptr >= md->end_subject) break; + GETCHARLEN(c, eptr, len); + if (c < 256 && (md->ctypes[c] & ctype_digit) != 0) break; + eptr+= len; + } + break; + + case OP_DIGIT: + for (i = min; i < max; i++) + { + int len = 1; + if (eptr >= md->end_subject) break; + GETCHARLEN(c, eptr, len); + if (c >= 256 ||(md->ctypes[c] & ctype_digit) == 0) break; + eptr+= len; + } + break; + + case OP_NOT_WHITESPACE: + for (i = min; i < max; i++) + { + int len = 1; + if (eptr >= md->end_subject) break; + GETCHARLEN(c, eptr, len); + if (c < 256 && (md->ctypes[c] & ctype_space) != 0) break; + eptr+= len; + } + break; + + case OP_WHITESPACE: + for (i = min; i < max; i++) + { + int len = 1; + if (eptr >= md->end_subject) break; + GETCHARLEN(c, eptr, len); + if (c >= 256 ||(md->ctypes[c] & ctype_space) == 0) break; + eptr+= len; + } + break; + + case OP_NOT_WORDCHAR: + for (i = min; i < max; i++) + { + int len = 1; + if (eptr >= md->end_subject) break; + GETCHARLEN(c, eptr, len); + if (c < 256 && (md->ctypes[c] & ctype_word) != 0) break; + eptr+= len; + } + break; + + case OP_WORDCHAR: + for (i = min; i < max; i++) + { + int len = 1; + if (eptr >= md->end_subject) break; + GETCHARLEN(c, eptr, len); + if (c >= 256 || (md->ctypes[c] & ctype_word) == 0) break; + eptr+= len; + } + break; + + default: + RRETURN(PCRE_ERROR_INTERNAL); + } + + /* eptr is now past the end of the maximum run */ + + for(;;) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (eptr-- == pp) break; /* Stop if tried at original pos */ + BACKCHAR(eptr); + } + } + else +#endif + + /* Not UTF-8 mode */ + { + switch(ctype) + { + case OP_ANY: + if ((ims & PCRE_DOTALL) == 0) + { + for (i = min; i < max; i++) + { + if (eptr >= md->end_subject || *eptr == NEWLINE) break; + eptr++; + } + break; + } + /* For DOTALL case, fall through and treat as \C */ + + case OP_ANYBYTE: + c = max - min; + if (c > md->end_subject - eptr) c = md->end_subject - eptr; + eptr += c; + break; + + case OP_NOT_DIGIT: + for (i = min; i < max; i++) + { + if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_digit) != 0) + break; + eptr++; + } + break; + + case OP_DIGIT: + for (i = min; i < max; i++) + { + if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_digit) == 0) + break; + eptr++; + } + break; + + case OP_NOT_WHITESPACE: + for (i = min; i < max; i++) + { + if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_space) != 0) + break; + eptr++; + } + break; + + case OP_WHITESPACE: + for (i = min; i < max; i++) + { + if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_space) == 0) + break; + eptr++; + } + break; + + case OP_NOT_WORDCHAR: + for (i = min; i < max; i++) + { + if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_word) != 0) + break; + eptr++; + } + break; + + case OP_WORDCHAR: + for (i = min; i < max; i++) + { + if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_word) == 0) + break; + eptr++; + } + break; + + default: + RRETURN(PCRE_ERROR_INTERNAL); + } + + /* eptr is now past the end of the maximum run */ + + while (eptr >= pp) + { + RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0); + eptr--; + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + } + } + + /* Get here if we can't make it match with any permitted repetitions */ + + RRETURN(MATCH_NOMATCH); + } + /* Control never gets here */ + + /* There's been some horrible disaster. Since all codes > OP_BRA are + for capturing brackets, and there shouldn't be any gaps between 0 and + OP_BRA, arrival here can only mean there is something seriously wrong + in the code above or the OP_xxx definitions. */ + + default: + DPRINTF(("Unknown opcode %d\n", *ecode)); + RRETURN(PCRE_ERROR_UNKNOWN_NODE); + } + + /* Do not stick any code in here without much thought; it is assumed + that "continue" in the code above comes out to here to repeat the main + loop. */ + + } /* End of main loop */ +/* Control never reaches here */ +} + + +/*************************************************************************** +**************************************************************************** + RECURSION IN THE match() FUNCTION + +Undefine all the macros that were defined above to handle this. */ + +#ifdef NO_RECURSE +#undef eptr +#undef ecode +#undef offset_top +#undef ims +#undef eptrb +#undef flags + +#undef callpat +#undef charptr +#undef data +#undef next +#undef pp +#undef prev +#undef saved_eptr + +#undef new_recursive + +#undef cur_is_word +#undef condition +#undef minimize +#undef prev_is_word + +#undef original_ims + +#undef ctype +#undef length +#undef max +#undef min +#undef number +#undef offset +#undef op +#undef save_capture_last +#undef save_offset1 +#undef save_offset2 +#undef save_offset3 +#undef stacksave + +#undef newptrb + +#endif + +/* These two are defined as macros in both cases */ + +#undef fc +#undef fi + +/*************************************************************************** +***************************************************************************/ + + + +/************************************************* +* Execute a Regular Expression * +*************************************************/ + +/* This function applies a compiled re to a subject string and picks out +portions of the string if it matches. Two elements in the vector are set for +each substring: the offsets to the start and end of the substring. + +Arguments: + argument_re points to the compiled expression + extra_data points to extra data or is NULL + subject points to the subject string + length length of subject string (may contain binary zeros) + start_offset where to start in the subject string + options option bits + offsets points to a vector of ints to be filled in with offsets + offsetcount the number of elements in the vector + +Returns: > 0 => success; value is the number of elements filled in + = 0 => success, but offsets is not big enough + -1 => failed to match + < -1 => some kind of unexpected problem +*/ + +EXPORT int +pcre_exec(const pcre *argument_re, const pcre_extra *extra_data, + const char *subject, int length, int start_offset, int options, int *offsets, + int offsetcount) +{ +int rc, resetcount, ocount; +int first_byte = -1; +int req_byte = -1; +int req_byte2 = -1; +unsigned long int ims = 0; +BOOL using_temporary_offsets = FALSE; +BOOL anchored; +BOOL startline; +BOOL firstline; +BOOL first_byte_caseless = FALSE; +BOOL req_byte_caseless = FALSE; +match_data match_block; +const uschar *tables; +const uschar *start_bits = NULL; +const uschar *start_match = (const uschar *)subject + start_offset; +const uschar *end_subject; +const uschar *req_byte_ptr = start_match - 1; + +pcre_study_data internal_study; +const pcre_study_data *study; + +real_pcre internal_re; +const real_pcre *external_re = (const real_pcre *)argument_re; +const real_pcre *re = external_re; + +/* Plausibility checks */ + +if ((options & ~PUBLIC_EXEC_OPTIONS) != 0) return PCRE_ERROR_BADOPTION; +if (re == NULL || subject == NULL || + (offsets == NULL && offsetcount > 0)) return PCRE_ERROR_NULL; +if (offsetcount < 0) return PCRE_ERROR_BADCOUNT; + +/* Fish out the optional data from the extra_data structure, first setting +the default values. */ + +study = NULL; +match_block.match_limit = MATCH_LIMIT; +match_block.callout_data = NULL; + +/* The table pointer is always in native byte order. */ + +tables = external_re->tables; + +if (extra_data != NULL) + { + register unsigned int flags = extra_data->flags; + if ((flags & PCRE_EXTRA_STUDY_DATA) != 0) + study = (const pcre_study_data *)extra_data->study_data; + if ((flags & PCRE_EXTRA_MATCH_LIMIT) != 0) + match_block.match_limit = extra_data->match_limit; + if ((flags & PCRE_EXTRA_CALLOUT_DATA) != 0) + match_block.callout_data = extra_data->callout_data; + if ((flags & PCRE_EXTRA_TABLES) != 0) tables = extra_data->tables; + } + +/* If the exec call supplied NULL for tables, use the inbuilt ones. This +is a feature that makes it possible to save compiled regex and re-use them +in other programs later. */ + +if (tables == NULL) tables = _pcre_default_tables; + +/* Check that the first field in the block is the magic number. If it is not, +test for a regex that was compiled on a host of opposite endianness. If this is +the case, flipped values are put in internal_re and internal_study if there was +study data too. */ + +if (re->magic_number != MAGIC_NUMBER) + { + re = _pcre_try_flipped(re, &internal_re, study, &internal_study); + if (re == NULL) return PCRE_ERROR_BADMAGIC; + if (study != NULL) study = &internal_study; + } + +/* Set up other data */ + +anchored = ((re->options | options) & PCRE_ANCHORED) != 0; +startline = (re->options & PCRE_STARTLINE) != 0; +firstline = (re->options & PCRE_FIRSTLINE) != 0; + +/* The code starts after the real_pcre block and the capture name table. */ + +match_block.start_code = (const uschar *)external_re + re->name_table_offset + + re->name_count * re->name_entry_size; + +match_block.start_subject = (const uschar *)subject; +match_block.start_offset = start_offset; +match_block.end_subject = match_block.start_subject + length; +end_subject = match_block.end_subject; + +match_block.endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0; +match_block.utf8 = (re->options & PCRE_UTF8) != 0; + +match_block.notbol = (options & PCRE_NOTBOL) != 0; +match_block.noteol = (options & PCRE_NOTEOL) != 0; +match_block.notempty = (options & PCRE_NOTEMPTY) != 0; +match_block.partial = (options & PCRE_PARTIAL) != 0; +match_block.hitend = FALSE; + +match_block.recursive = NULL; /* No recursion at top level */ + +match_block.lcc = tables + lcc_offset; +match_block.ctypes = tables + ctypes_offset; + +/* Partial matching is supported only for a restricted set of regexes at the +moment. */ + +if (match_block.partial && (re->options & PCRE_NOPARTIAL) != 0) + return PCRE_ERROR_BADPARTIAL; + +/* Check a UTF-8 string if required. Unfortunately there's no way of passing +back the character offset. */ + +#ifdef SUPPORT_UTF8 +if (match_block.utf8 && (options & PCRE_NO_UTF8_CHECK) == 0) + { + if (_pcre_valid_utf8((uschar *)subject, length) >= 0) + return PCRE_ERROR_BADUTF8; + if (start_offset > 0 && start_offset < length) + { + int tb = ((uschar *)subject)[start_offset]; + if (tb > 127) + { + tb &= 0xc0; + if (tb != 0 && tb != 0xc0) return PCRE_ERROR_BADUTF8_OFFSET; + } + } + } +#endif + +/* The ims options can vary during the matching as a result of the presence +of (?ims) items in the pattern. They are kept in a local variable so that +restoring at the exit of a group is easy. */ + +ims = re->options & (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL); + +/* If the expression has got more back references than the offsets supplied can +hold, we get a temporary chunk of working store to use during the matching. +Otherwise, we can use the vector supplied, rounding down its size to a multiple +of 3. */ + +ocount = offsetcount - (offsetcount % 3); + +if (re->top_backref > 0 && re->top_backref >= ocount/3) + { + ocount = re->top_backref * 3 + 3; + match_block.offset_vector = (int *)(pcre_malloc)(ocount * sizeof(int)); + if (match_block.offset_vector == NULL) return PCRE_ERROR_NOMEMORY; + using_temporary_offsets = TRUE; + DPRINTF(("Got memory to hold back references\n")); + } +else match_block.offset_vector = offsets; + +match_block.offset_end = ocount; +match_block.offset_max = (2*ocount)/3; +match_block.offset_overflow = FALSE; +match_block.capture_last = -1; + +/* Compute the minimum number of offsets that we need to reset each time. Doing +this makes a huge difference to execution time when there aren't many brackets +in the pattern. */ + +resetcount = 2 + re->top_bracket * 2; +if (resetcount > offsetcount) resetcount = ocount; + +/* Reset the working variable associated with each extraction. These should +never be used unless previously set, but they get saved and restored, and so we +initialize them to avoid reading uninitialized locations. */ + +if (match_block.offset_vector != NULL) + { + register int *iptr = match_block.offset_vector + ocount; + register int *iend = iptr - resetcount/2 + 1; + while (--iptr >= iend) *iptr = -1; + } + +/* Set up the first character to match, if available. The first_byte value is +never set for an anchored regular expression, but the anchoring may be forced +at run time, so we have to test for anchoring. The first char may be unset for +an unanchored pattern, of course. If there's no first char and the pattern was +studied, there may be a bitmap of possible first characters. */ + +if (!anchored) + { + if ((re->options & PCRE_FIRSTSET) != 0) + { + first_byte = re->first_byte & 255; + if ((first_byte_caseless = ((re->first_byte & REQ_CASELESS) != 0)) == TRUE) + first_byte = match_block.lcc[first_byte]; + } + else + if (!startline && study != NULL && + (study->options & PCRE_STUDY_MAPPED) != 0) + start_bits = study->start_bits; + } + +/* For anchored or unanchored matches, there may be a "last known required +character" set. */ + +if ((re->options & PCRE_REQCHSET) != 0) + { + req_byte = re->req_byte & 255; + req_byte_caseless = (re->req_byte & REQ_CASELESS) != 0; + req_byte2 = (tables + fcc_offset)[req_byte]; /* case flipped */ + } + +/* Loop for handling unanchored repeated matching attempts; for anchored regexs +the loop runs just once. */ + +do + { + const uschar *save_end_subject = end_subject; + + /* Reset the maximum number of extractions we might see. */ + + if (match_block.offset_vector != NULL) + { + register int *iptr = match_block.offset_vector; + register int *iend = iptr + resetcount; + while (iptr < iend) *iptr++ = -1; + } + + /* Advance to a unique first char if possible. If firstline is TRUE, the + start of the match is constrained to the first line of a multiline string. + Implement this by temporarily adjusting end_subject so that we stop scanning + at a newline. If the match fails at the newline, later code breaks this loop. + */ + + if (firstline) + { + const uschar *t = start_match; + while (t < save_end_subject && *t != '\n') t++; + end_subject = t; + } + + /* Now test for a unique first byte */ + + if (first_byte >= 0) + { + if (first_byte_caseless) + while (start_match < end_subject && + match_block.lcc[*start_match] != first_byte) + start_match++; + else + while (start_match < end_subject && *start_match != first_byte) + start_match++; + } + + /* Or to just after \n for a multiline match if possible */ + + else if (startline) + { + if (start_match > match_block.start_subject + start_offset) + { + while (start_match < end_subject && start_match[-1] != NEWLINE) + start_match++; + } + } + + /* Or to a non-unique first char after study */ + + else if (start_bits != NULL) + { + while (start_match < end_subject) + { + register unsigned int c = *start_match; + if ((start_bits[c/8] & (1 << (c&7))) == 0) start_match++; else break; + } + } + + /* Restore fudged end_subject */ + + end_subject = save_end_subject; + +#ifdef DEBUG /* Sigh. Some compilers never learn. */ + printf(">>>> Match against: "); + pchars(start_match, end_subject - start_match, TRUE, &match_block); + printf("\n"); +#endif + + /* If req_byte is set, we know that that character must appear in the subject + for the match to succeed. If the first character is set, req_byte must be + later in the subject; otherwise the test starts at the match point. This + optimization can save a huge amount of backtracking in patterns with nested + unlimited repeats that aren't going to match. Writing separate code for + cased/caseless versions makes it go faster, as does using an autoincrement + and backing off on a match. + + HOWEVER: when the subject string is very, very long, searching to its end can + take a long time, and give bad performance on quite ordinary patterns. This + showed up when somebody was matching /^C/ on a 32-megabyte string... so we + don't do this when the string is sufficiently long. + + ALSO: this processing is disabled when partial matching is requested. + */ + + if (req_byte >= 0 && + end_subject - start_match < REQ_BYTE_MAX && + !match_block.partial) + { + register const uschar *p = start_match + ((first_byte >= 0)? 1 : 0); + + /* We don't need to repeat the search if we haven't yet reached the + place we found it at last time. */ + + if (p > req_byte_ptr) + { + if (req_byte_caseless) + { + while (p < end_subject) + { + register int pp = *p++; + if (pp == req_byte || pp == req_byte2) { p--; break; } + } + } + else + { + while (p < end_subject) + { + if (*p++ == req_byte) { p--; break; } + } + } + + /* If we can't find the required character, break the matching loop */ + + if (p >= end_subject) break; + + /* If we have found the required character, save the point where we + found it, so that we don't search again next time round the loop if + the start hasn't passed this character yet. */ + + req_byte_ptr = p; + } + } + + /* When a match occurs, substrings will be set for all internal extractions; + we just need to set up the whole thing as substring 0 before returning. If + there were too many extractions, set the return code to zero. In the case + where we had to get some local store to hold offsets for backreferences, copy + those back references that we can. In this case there need not be overflow + if certain parts of the pattern were not used. */ + + match_block.start_match = start_match; + match_block.match_call_count = 0; + + rc = match(start_match, match_block.start_code, 2, &match_block, ims, NULL, + match_isgroup); + + /* When the result is no match, if the subject's first character was a + newline and the PCRE_FIRSTLINE option is set, break (which will return + PCRE_ERROR_NOMATCH). The option requests that a match occur before the first + newline in the subject. Otherwise, advance the pointer to the next character + and continue - but the continuation will actually happen only when the + pattern is not anchored. */ + + if (rc == MATCH_NOMATCH) + { + if (firstline && *start_match == NEWLINE) break; + start_match++; +#ifdef SUPPORT_UTF8 + if (match_block.utf8) + while(start_match < end_subject && (*start_match & 0xc0) == 0x80) + start_match++; +#endif + continue; + } + + if (rc != MATCH_MATCH) + { + DPRINTF((">>>> error: returning %d\n", rc)); + return rc; + } + + /* We have a match! Copy the offset information from temporary store if + necessary */ + + if (using_temporary_offsets) + { + if (offsetcount >= 4) + { + memcpy(offsets + 2, match_block.offset_vector + 2, + (offsetcount - 2) * sizeof(int)); + DPRINTF(("Copied offsets from temporary memory\n")); + } + if (match_block.end_offset_top > offsetcount) + match_block.offset_overflow = TRUE; + + DPRINTF(("Freeing temporary memory\n")); + (pcre_free)(match_block.offset_vector); + } + + rc = match_block.offset_overflow? 0 : match_block.end_offset_top/2; + + if (offsetcount < 2) rc = 0; else + { + offsets[0] = start_match - match_block.start_subject; + offsets[1] = match_block.end_match_ptr - match_block.start_subject; + } + + DPRINTF((">>>> returning %d\n", rc)); + return rc; + } + +/* This "while" is the end of the "do" above */ + +while (!anchored && start_match <= end_subject); + +if (using_temporary_offsets) + { + DPRINTF(("Freeing temporary memory\n")); + (pcre_free)(match_block.offset_vector); + } + +if (match_block.partial && match_block.hitend) + { + DPRINTF((">>>> returning PCRE_ERROR_PARTIAL\n")); + return PCRE_ERROR_PARTIAL; + } +else + { + DPRINTF((">>>> returning PCRE_ERROR_NOMATCH\n")); + return PCRE_ERROR_NOMATCH; + } +} + +/* End of pcre_exec.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/*PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains the external function pcre_fullinfo(), which returns +information about a compiled pattern. */ + + + + +/************************************************* +* Return info about compiled pattern * +*************************************************/ + +/* This is a newer "info" function which has an extensible interface so +that additional items can be added compatibly. + +Arguments: + argument_re points to compiled code + extra_data points extra data, or NULL + what what information is required + where where to put the information + +Returns: 0 if data returned, negative on error +*/ + +EXPORT int +pcre_fullinfo(const pcre *argument_re, const pcre_extra *extra_data, int what, + void *where) +{ +real_pcre internal_re; +pcre_study_data internal_study; +const real_pcre *re = (const real_pcre *)argument_re; +const pcre_study_data *study = NULL; + +if (re == NULL || where == NULL) return PCRE_ERROR_NULL; + +if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_STUDY_DATA) != 0) + study = (const pcre_study_data *)extra_data->study_data; + +if (re->magic_number != MAGIC_NUMBER) + { + re = _pcre_try_flipped(re, &internal_re, study, &internal_study); + if (re == NULL) return PCRE_ERROR_BADMAGIC; + if (study != NULL) study = &internal_study; + } + +switch (what) + { + case PCRE_INFO_OPTIONS: + *((unsigned long int *)where) = re->options & PUBLIC_OPTIONS; + break; + + case PCRE_INFO_SIZE: + *((size_t *)where) = re->size; + break; + + case PCRE_INFO_STUDYSIZE: + *((size_t *)where) = (study == NULL)? 0 : study->size; + break; + + case PCRE_INFO_CAPTURECOUNT: + *((int *)where) = re->top_bracket; + break; + + case PCRE_INFO_BACKREFMAX: + *((int *)where) = re->top_backref; + break; + + case PCRE_INFO_FIRSTBYTE: + *((int *)where) = + ((re->options & PCRE_FIRSTSET) != 0)? re->first_byte : + ((re->options & PCRE_STARTLINE) != 0)? -1 : -2; + break; + + /* Make sure we pass back the pointer to the bit vector in the external + block, not the internal copy (with flipped integer fields). */ + + case PCRE_INFO_FIRSTTABLE: + *((const uschar **)where) = + (study != NULL && (study->options & PCRE_STUDY_MAPPED) != 0)? + ((const pcre_study_data *)extra_data->study_data)->start_bits : NULL; + break; + + case PCRE_INFO_LASTLITERAL: + *((int *)where) = + ((re->options & PCRE_REQCHSET) != 0)? re->req_byte : -1; + break; + + case PCRE_INFO_NAMEENTRYSIZE: + *((int *)where) = re->name_entry_size; + break; + + case PCRE_INFO_NAMECOUNT: + *((int *)where) = re->name_count; + break; + + case PCRE_INFO_NAMETABLE: + *((const uschar **)where) = (const uschar *)re + re->name_table_offset; + break; + + case PCRE_INFO_DEFAULT_TABLES: + *((const uschar **)where) = (const uschar *)(_pcre_default_tables); + break; + + default: return PCRE_ERROR_BADOPTION; + } + +return 0; +} + +/* End of pcre_fullinfo.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains some convenience functions for extracting substrings +from the subject string after a regex match has succeeded. The original idea +for these functions came from Scott Wimer. */ + + + + +/************************************************* +* Find number for named string * +*************************************************/ + +/* This function is used by the two extraction functions below, as well +as being generally available. + +Arguments: + code the compiled regex + stringname the name whose number is required + +Returns: the number of the named parentheses, or a negative number + (PCRE_ERROR_NOSUBSTRING) if not found +*/ + +int +pcre_get_stringnumber(const pcre *code, const char *stringname) +{ +int rc; +int entrysize; +int top, bot; +uschar *nametable; + +if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0) + return rc; +if (top <= 0) return PCRE_ERROR_NOSUBSTRING; + +if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0) + return rc; +if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0) + return rc; + +bot = 0; +while (top > bot) + { + int mid = (top + bot) / 2; + uschar *entry = nametable + entrysize*mid; + int c = strcmp(stringname, (char *)(entry + 2)); + if (c == 0) return (entry[0] << 8) + entry[1]; + if (c > 0) bot = mid + 1; else top = mid; + } + +return PCRE_ERROR_NOSUBSTRING; +} + + + +/************************************************* +* Copy captured string to given buffer * +*************************************************/ + +/* This function copies a single captured substring into a given buffer. +Note that we use memcpy() rather than strncpy() in case there are binary zeros +in the string. + +Arguments: + subject the subject string that was matched + ovector pointer to the offsets table + stringcount the number of substrings that were captured + (i.e. the yield of the pcre_exec call, unless + that was zero, in which case it should be 1/3 + of the offset table size) + stringnumber the number of the required substring + buffer where to put the substring + size the size of the buffer + +Returns: if successful: + the length of the copied string, not including the zero + that is put on the end; can be zero + if not successful: + PCRE_ERROR_NOMEMORY (-6) buffer too small + PCRE_ERROR_NOSUBSTRING (-7) no such captured substring +*/ + +int +pcre_copy_substring(const char *subject, int *ovector, int stringcount, + int stringnumber, char *buffer, int size) +{ +int yield; +if (stringnumber < 0 || stringnumber >= stringcount) + return PCRE_ERROR_NOSUBSTRING; +stringnumber *= 2; +yield = ovector[stringnumber+1] - ovector[stringnumber]; +if (size < yield + 1) return PCRE_ERROR_NOMEMORY; +memcpy(buffer, subject + ovector[stringnumber], yield); +buffer[yield] = 0; +return yield; +} + + + +/************************************************* +* Copy named captured string to given buffer * +*************************************************/ + +/* This function copies a single captured substring into a given buffer, +identifying it by name. + +Arguments: + code the compiled regex + subject the subject string that was matched + ovector pointer to the offsets table + stringcount the number of substrings that were captured + (i.e. the yield of the pcre_exec call, unless + that was zero, in which case it should be 1/3 + of the offset table size) + stringname the name of the required substring + buffer where to put the substring + size the size of the buffer + +Returns: if successful: + the length of the copied string, not including the zero + that is put on the end; can be zero + if not successful: + PCRE_ERROR_NOMEMORY (-6) buffer too small + PCRE_ERROR_NOSUBSTRING (-7) no such captured substring +*/ + +int +pcre_copy_named_substring(const pcre *code, const char *subject, int *ovector, + int stringcount, const char *stringname, char *buffer, int size) +{ +int n = pcre_get_stringnumber(code, stringname); +if (n <= 0) return n; +return pcre_copy_substring(subject, ovector, stringcount, n, buffer, size); +} + + + +/************************************************* +* Copy all captured strings to new store * +*************************************************/ + +/* This function gets one chunk of store and builds a list of pointers and all +of the captured substrings in it. A NULL pointer is put on the end of the list. + +Arguments: + subject the subject string that was matched + ovector pointer to the offsets table + stringcount the number of substrings that were captured + (i.e. the yield of the pcre_exec call, unless + that was zero, in which case it should be 1/3 + of the offset table size) + listptr set to point to the list of pointers + +Returns: if successful: 0 + if not successful: + PCRE_ERROR_NOMEMORY (-6) failed to get store +*/ + +int +pcre_get_substring_list(const char *subject, int *ovector, int stringcount, + const char ***listptr) +{ +int i; +int size = sizeof(char *); +int double_count = stringcount * 2; +char **stringlist; +char *p; + +for (i = 0; i < double_count; i += 2) + size += sizeof(char *) + ovector[i+1] - ovector[i] + 1; + +stringlist = (char **)(pcre_malloc)(size); +if (stringlist == NULL) return PCRE_ERROR_NOMEMORY; + +*listptr = (const char **)stringlist; +p = (char *)(stringlist + stringcount + 1); + +for (i = 0; i < double_count; i += 2) + { + int len = ovector[i+1] - ovector[i]; + memcpy(p, subject + ovector[i], len); + *stringlist++ = p; + p += len; + *p++ = 0; + } + +*stringlist = NULL; +return 0; +} + + + +/************************************************* +* Free store obtained by get_substring_list * +*************************************************/ + +/* This function exists for the benefit of people calling PCRE from non-C +programs that can call its functions, but not free() or (pcre_free)() directly. + +Argument: the result of a previous pcre_get_substring_list() +Returns: nothing +*/ + +void +pcre_free_substring_list(const char **pointer) +{ +(pcre_free)((void *)pointer); +} + + + +/************************************************* +* Copy captured string to new store * +*************************************************/ + +/* This function copies a single captured substring into a piece of new +store + +Arguments: + subject the subject string that was matched + ovector pointer to the offsets table + stringcount the number of substrings that were captured + (i.e. the yield of the pcre_exec call, unless + that was zero, in which case it should be 1/3 + of the offset table size) + stringnumber the number of the required substring + stringptr where to put a pointer to the substring + +Returns: if successful: + the length of the string, not including the zero that + is put on the end; can be zero + if not successful: + PCRE_ERROR_NOMEMORY (-6) failed to get store + PCRE_ERROR_NOSUBSTRING (-7) substring not present +*/ + +int +pcre_get_substring(const char *subject, int *ovector, int stringcount, + int stringnumber, const char **stringptr) +{ +int yield; +char *substring; +if (stringnumber < 0 || stringnumber >= stringcount) + return PCRE_ERROR_NOSUBSTRING; +stringnumber *= 2; +yield = ovector[stringnumber+1] - ovector[stringnumber]; +substring = (char *)(pcre_malloc)(yield + 1); +if (substring == NULL) return PCRE_ERROR_NOMEMORY; +memcpy(substring, subject + ovector[stringnumber], yield); +substring[yield] = 0; +*stringptr = substring; +return yield; +} + + + +/************************************************* +* Copy named captured string to new store * +*************************************************/ + +/* This function copies a single captured substring, identified by name, into +new store. + +Arguments: + code the compiled regex + subject the subject string that was matched + ovector pointer to the offsets table + stringcount the number of substrings that were captured + (i.e. the yield of the pcre_exec call, unless + that was zero, in which case it should be 1/3 + of the offset table size) + stringname the name of the required substring + stringptr where to put the pointer + +Returns: if successful: + the length of the copied string, not including the zero + that is put on the end; can be zero + if not successful: + PCRE_ERROR_NOMEMORY (-6) couldn't get memory + PCRE_ERROR_NOSUBSTRING (-7) no such captured substring +*/ + +int +pcre_get_named_substring(const pcre *code, const char *subject, int *ovector, + int stringcount, const char *stringname, const char **stringptr) +{ +int n = pcre_get_stringnumber(code, stringname); +if (n <= 0) return n; +return pcre_get_substring(subject, ovector, stringcount, n, stringptr); +} + + + + +/************************************************* +* Free store obtained by get_substring * +*************************************************/ + +/* This function exists for the benefit of people calling PCRE from non-C +programs that can call its functions, but not free() or (pcre_free)() directly. + +Argument: the result of a previous pcre_get_substring() +Returns: nothing +*/ + +void +pcre_free_substring(const char *pointer) +{ +(pcre_free)((void *)pointer); +} + +/* End of pcre_get.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains global variables that are exported by the PCRE library. +PCRE is thread-clean and doesn't use any global variables in the normal sense. +However, it calls memory allocation and freeing functions via the four +indirections below, and it can optionally do callouts, using the fifth +indirection. These values can be changed by the caller, but are shared between +all threads. However, when compiling for Virtual Pascal, things are done +differently, and global variables are not used (see pcre.in). */ + + + + +#ifndef VPCOMPAT +#ifdef __cplusplus +extern "C" void *(*pcre_malloc)(size_t) = malloc; +extern "C" void (*pcre_free)(void *) = free; +extern "C" void *(*pcre_stack_malloc)(size_t) = malloc; +extern "C" void (*pcre_stack_free)(void *) = free; +extern "C" int (*pcre_callout)(pcre_callout_block *) = NULL; +#else +void *(*pcre_malloc)(size_t) = malloc; +void (*pcre_free)(void *) = free; +void *(*pcre_stack_malloc)(size_t) = malloc; +void (*pcre_stack_free)(void *) = free; +int (*pcre_callout)(pcre_callout_block *) = NULL; +#endif +#endif + +/* End of pcre_globals.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains the external function pcre_info(), which gives some +information about a compiled pattern. However, use of this function is now +deprecated, as it has been superseded by pcre_fullinfo(). */ + + + + +/************************************************* +* (Obsolete) Return info about compiled pattern * +*************************************************/ + +/* This is the original "info" function. It picks potentially useful data out +of the private structure, but its interface was too rigid. It remains for +backwards compatibility. The public options are passed back in an int - though +the re->options field has been expanded to a long int, all the public options +at the low end of it, and so even on 16-bit systems this will still be OK. +Therefore, I haven't changed the API for pcre_info(). + +Arguments: + argument_re points to compiled code + optptr where to pass back the options + first_byte where to pass back the first character, + or -1 if multiline and all branches start ^, + or -2 otherwise + +Returns: number of capturing subpatterns + or negative values on error +*/ + +EXPORT int +pcre_info(const pcre *argument_re, int *optptr, int *first_byte) +{ +real_pcre internal_re; +const real_pcre *re = (const real_pcre *)argument_re; +if (re == NULL) return PCRE_ERROR_NULL; +if (re->magic_number != MAGIC_NUMBER) + { + re = _pcre_try_flipped(re, &internal_re, NULL, NULL); + if (re == NULL) return PCRE_ERROR_BADMAGIC; + } +if (optptr != NULL) *optptr = (int)(re->options & PUBLIC_OPTIONS); +if (first_byte != NULL) + *first_byte = ((re->options & PCRE_FIRSTSET) != 0)? re->first_byte : + ((re->options & PCRE_STARTLINE) != 0)? -1 : -2; +return re->top_bracket; +} + +/* End of pcre_info.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains the external function pcre_maketables(), which builds +character tables for PCRE in the current locale. The file is compiled on its +own as part of the PCRE library. However, it is also included in the +compilation of dftables.c, in which case the macro DFTABLES is defined. */ + + +#ifndef DFTABLES +#endif + + +/************************************************* +* Create PCRE character tables * +*************************************************/ + +/* This function builds a set of character tables for use by PCRE and returns +a pointer to them. They are build using the ctype functions, and consequently +their contents will depend upon the current locale setting. When compiled as +part of the library, the store is obtained via pcre_malloc(), but when compiled +inside dftables, use malloc(). + +Arguments: none +Returns: pointer to the contiguous block of data +*/ + +const unsigned char * +pcre_maketables(void) +{ +unsigned char *yield, *p; +int i; + +#ifndef DFTABLES +yield = (unsigned char*)(pcre_malloc)(tables_length); +#else +yield = (unsigned char*)malloc(tables_length); +#endif + +if (yield == NULL) return NULL; +p = yield; + +/* First comes the lower casing table */ + +for (i = 0; i < 256; i++) *p++ = tolower(i); + +/* Next the case-flipping table */ + +for (i = 0; i < 256; i++) *p++ = islower(i)? toupper(i) : tolower(i); + +/* Then the character class tables. Don't try to be clever and save effort +on exclusive ones - in some locales things may be different. Note that the +table for "space" includes everything "isspace" gives, including VT in the +default locale. This makes it work for the POSIX class [:space:]. */ + +memset(p, 0, cbit_length); +for (i = 0; i < 256; i++) + { + if (isdigit(i)) + { + p[cbit_digit + i/8] |= 1 << (i&7); + p[cbit_word + i/8] |= 1 << (i&7); + } + if (isupper(i)) + { + p[cbit_upper + i/8] |= 1 << (i&7); + p[cbit_word + i/8] |= 1 << (i&7); + } + if (islower(i)) + { + p[cbit_lower + i/8] |= 1 << (i&7); + p[cbit_word + i/8] |= 1 << (i&7); + } + if (i == '_') p[cbit_word + i/8] |= 1 << (i&7); + if (isspace(i)) p[cbit_space + i/8] |= 1 << (i&7); + if (isxdigit(i))p[cbit_xdigit + i/8] |= 1 << (i&7); + if (isgraph(i)) p[cbit_graph + i/8] |= 1 << (i&7); + if (isprint(i)) p[cbit_print + i/8] |= 1 << (i&7); + if (ispunct(i)) p[cbit_punct + i/8] |= 1 << (i&7); + if (iscntrl(i)) p[cbit_cntrl + i/8] |= 1 << (i&7); + } +p += cbit_length; + +/* Finally, the character type table. In this, we exclude VT from the white +space chars, because Perl doesn't recognize it as such for \s and for comments +within regexes. */ + +for (i = 0; i < 256; i++) + { + int x = 0; + if (i != 0x0b && isspace(i)) x += ctype_space; + if (isalpha(i)) x += ctype_letter; + if (isdigit(i)) x += ctype_digit; + if (isxdigit(i)) x += ctype_xdigit; + if (isalnum(i) || i == '_') x += ctype_word; + + /* Note: strchr includes the terminating zero in the characters it considers. + In this instance, that is ok because we want binary zero to be flagged as a + meta-character, which in this sense is any character that terminates a run + of data characters. */ + + if (strchr("*+?{^.$|()[", i) != 0) x += ctype_meta; *p++ = x; } + +return yield; +} + +/* End of pcre_maketables.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This file contains a private PCRE function that converts an ordinal +character value into a UTF8 string. */ + + + + +/************************************************* +* Convert character value to UTF-8 * +*************************************************/ + +/* This function takes an integer value in the range 0 - 0x7fffffff +and encodes it as a UTF-8 character in 0 to 6 bytes. + +Arguments: + cvalue the character value + buffer pointer to buffer for result - at least 6 bytes long + +Returns: number of characters placed in the buffer +*/ + +EXPORT int +_pcre_ord2utf8(int cvalue, uschar *buffer) +{ +register int i, j; +for (i = 0; i < _pcre_utf8_table1_size; i++) + if (cvalue <= _pcre_utf8_table1[i]) break; +buffer += i; +for (j = i; j > 0; j--) + { + *buffer-- = 0x80 | (cvalue & 0x3f); + cvalue >>= 6; + } +*buffer = _pcre_utf8_table2[i] | cvalue; +return i + 1; +} + +/* End of pcre_ord2utf8.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains an PCRE private debugging function for printing out the +internal form of a compiled regular expression, along with some supporting +local functions. */ + + + + +static const char *OP_names[] = { OP_NAME_LIST }; + + +/************************************************* +* Print single- or multi-byte character * +*************************************************/ + +static int +print_char(FILE *f, uschar *ptr, BOOL utf8) +{ +int c = *ptr; + +if (!utf8 || (c & 0xc0) != 0xc0) + { + if (isprint(c)) fprintf(f, "%c", c); else fprintf(f, "\\x%02x", c); + return 0; + } +else + { + int i; + int a = _pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ + int s = 6*a; + c = (c & _pcre_utf8_table3[a]) << s; + for (i = 1; i <= a; i++) + { + /* This is a check for malformed UTF-8; it should only occur if the sanity + check has been turned off. Rather than swallow random bytes, just stop if + we hit a bad one. Print it with \X instead of \x as an indication. */ + + if ((ptr[i] & 0xc0) != 0x80) + { + fprintf(f, "\\X{%x}", c); + return i - 1; + } + + /* The byte is OK */ + + s -= 6; + c |= (ptr[i] & 0x3f) << s; + } + if (c < 128) fprintf(f, "\\x%02x", c); else fprintf(f, "\\x{%x}", c); + return a; + } +} + + + +/************************************************* +* Find Unicode property name * +*************************************************/ + +static const char * +get_ucpname(int property) +{ +#ifdef SUPPORT_UCP +int i; +for (i = _pcre_utt_size; i >= 0; i--) + { + if (property == _pcre_utt[i].value) break; + } +return (i >= 0)? _pcre_utt[i].name : "??"; +#else +return "??"; +#endif +} + + + +/************************************************* +* Print compiled regex * +*************************************************/ + +/* Make this function work for a regex with integers either byte order. +However, we assume that what we are passed is a compiled regex. */ + +EXPORT void +_pcre_printint(pcre *external_re, FILE *f) +{ +real_pcre *re = (real_pcre *)external_re; +uschar *codestart, *code; +BOOL utf8; + +unsigned int options = re->options; +int offset = re->name_table_offset; +int count = re->name_count; +int size = re->name_entry_size; + +if (re->magic_number != MAGIC_NUMBER) + { + offset = ((offset << 8) & 0xff00) | ((offset >> 8) & 0xff); + count = ((count << 8) & 0xff00) | ((count >> 8) & 0xff); + size = ((size << 8) & 0xff00) | ((size >> 8) & 0xff); + options = ((options << 24) & 0xff000000) | + ((options << 8) & 0x00ff0000) | + ((options >> 8) & 0x0000ff00) | + ((options >> 24) & 0x000000ff); + } + +code = codestart = (uschar *)re + offset + count * size; +utf8 = (options & PCRE_UTF8) != 0; + +for(;;) + { + uschar *ccode; + int c; + int extra = 0; + + fprintf(f, "%3d ", (int)(code - codestart)); + + if (*code >= OP_BRA) + { + if (*code - OP_BRA > EXTRACT_BASIC_MAX) + fprintf(f, "%3d Bra extra\n", GET(code, 1)); + else + fprintf(f, "%3d Bra %d\n", GET(code, 1), *code - OP_BRA); + code += _pcre_OP_lengths[OP_BRA]; + continue; + } + + switch(*code) + { + case OP_END: + fprintf(f, " %s\n", OP_names[*code]); + fprintf(f, "------------------------------------------------------------------\n"); + return; + + case OP_OPT: + fprintf(f, " %.2x %s", code[1], OP_names[*code]); + break; + + case OP_CHAR: + { + fprintf(f, " "); + do + { + code++; + code += 1 + print_char(f, code, utf8); + } + while (*code == OP_CHAR); + fprintf(f, "\n"); + continue; + } + break; + + case OP_CHARNC: + { + fprintf(f, " NC "); + do + { + code++; + code += 1 + print_char(f, code, utf8); + } + while (*code == OP_CHARNC); + fprintf(f, "\n"); + continue; + } + break; + + case OP_KETRMAX: + case OP_KETRMIN: + case OP_ALT: + case OP_KET: + case OP_ASSERT: + case OP_ASSERT_NOT: + case OP_ASSERTBACK: + case OP_ASSERTBACK_NOT: + case OP_ONCE: + case OP_COND: + case OP_REVERSE: + fprintf(f, "%3d %s", GET(code, 1), OP_names[*code]); + break; + + case OP_BRANUMBER: + printf("%3d %s", GET2(code, 1), OP_names[*code]); + break; + + case OP_CREF: + if (GET2(code, 1) == CREF_RECURSE) + fprintf(f, " Cond recurse"); + else + fprintf(f, "%3d %s", GET2(code,1), OP_names[*code]); + break; + + case OP_STAR: + case OP_MINSTAR: + case OP_PLUS: + case OP_MINPLUS: + case OP_QUERY: + case OP_MINQUERY: + case OP_TYPESTAR: + case OP_TYPEMINSTAR: + case OP_TYPEPLUS: + case OP_TYPEMINPLUS: + case OP_TYPEQUERY: + case OP_TYPEMINQUERY: + fprintf(f, " "); + if (*code >= OP_TYPESTAR) + { + fprintf(f, "%s", OP_names[code[1]]); + if (code[1] == OP_PROP || code[1] == OP_NOTPROP) + { + fprintf(f, " %s ", get_ucpname(code[2])); + extra = 1; + } + } + else extra = print_char(f, code+1, utf8); + fprintf(f, "%s", OP_names[*code]); + break; + + case OP_EXACT: + case OP_UPTO: + case OP_MINUPTO: + fprintf(f, " "); + extra = print_char(f, code+3, utf8); + fprintf(f, "{"); + if (*code != OP_EXACT) fprintf(f, ","); + fprintf(f, "%d}", GET2(code,1)); + if (*code == OP_MINUPTO) fprintf(f, "?"); + break; + + case OP_TYPEEXACT: + case OP_TYPEUPTO: + case OP_TYPEMINUPTO: + fprintf(f, " %s", OP_names[code[3]]); + if (code[3] == OP_PROP || code[3] == OP_NOTPROP) + { + fprintf(f, " %s ", get_ucpname(code[4])); + extra = 1; + } + fprintf(f, "{"); + if (*code != OP_TYPEEXACT) fprintf(f, "0,"); + fprintf(f, "%d}", GET2(code,1)); + if (*code == OP_TYPEMINUPTO) fprintf(f, "?"); + break; + + case OP_NOT: + if (isprint(c = code[1])) fprintf(f, " [^%c]", c); + else fprintf(f, " [^\\x%02x]", c); + break; + + case OP_NOTSTAR: + case OP_NOTMINSTAR: + case OP_NOTPLUS: + case OP_NOTMINPLUS: + case OP_NOTQUERY: + case OP_NOTMINQUERY: + if (isprint(c = code[1])) fprintf(f, " [^%c]", c); + else fprintf(f, " [^\\x%02x]", c); + fprintf(f, "%s", OP_names[*code]); + break; + + case OP_NOTEXACT: + case OP_NOTUPTO: + case OP_NOTMINUPTO: + if (isprint(c = code[3])) fprintf(f, " [^%c]{", c); + else fprintf(f, " [^\\x%02x]{", c); + if (*code != OP_NOTEXACT) fprintf(f, "0,"); + fprintf(f, "%d}", GET2(code,1)); + if (*code == OP_NOTMINUPTO) fprintf(f, "?"); + break; + + case OP_RECURSE: + fprintf(f, "%3d %s", GET(code, 1), OP_names[*code]); + break; + + case OP_REF: + fprintf(f, " \\%d", GET2(code,1)); + ccode = code + _pcre_OP_lengths[*code]; + goto CLASS_REF_REPEAT; + + case OP_CALLOUT: + fprintf(f, " %s %d %d %d", OP_names[*code], code[1], GET(code,2), + GET(code, 2 + LINK_SIZE)); + break; + + case OP_PROP: + case OP_NOTPROP: + fprintf(f, " %s %s", OP_names[*code], get_ucpname(code[1])); + break; + + /* OP_XCLASS can only occur in UTF-8 mode. However, there's no harm in + having this code always here, and it makes it less messy without all those + #ifdefs. */ + + case OP_CLASS: + case OP_NCLASS: + case OP_XCLASS: + { + int i, min, max; + BOOL printmap; + + fprintf(f, " ["); + + if (*code == OP_XCLASS) + { + extra = GET(code, 1); + ccode = code + LINK_SIZE + 1; + printmap = (*ccode & XCL_MAP) != 0; + if ((*ccode++ & XCL_NOT) != 0) fprintf(f, "^"); + } + else + { + printmap = TRUE; + ccode = code + 1; + } + + /* Print a bit map */ + + if (printmap) + { + for (i = 0; i < 256; i++) + { + if ((ccode[i/8] & (1 << (i&7))) != 0) + { + int j; + for (j = i+1; j < 256; j++) + if ((ccode[j/8] & (1 << (j&7))) == 0) break; + if (i == '-' || i == ']') fprintf(f, "\\"); + if (isprint(i)) fprintf(f, "%c", i); else fprintf(f, "\\x%02x", i); + if (--j > i) + { + if (j != i + 1) fprintf(f, "-"); + if (j == '-' || j == ']') fprintf(f, "\\"); + if (isprint(j)) fprintf(f, "%c", j); else fprintf(f, "\\x%02x", j); + } + i = j; + } + } + ccode += 32; + } + + /* For an XCLASS there is always some additional data */ + + if (*code == OP_XCLASS) + { + int ch; + while ((ch = *ccode++) != XCL_END) + { + if (ch == XCL_PROP) + { + fprintf(f, "\\p{%s}", get_ucpname(*ccode++)); + } + else if (ch == XCL_NOTPROP) + { + fprintf(f, "\\P{%s}", get_ucpname(*ccode++)); + } + else + { + ccode += 1 + print_char(f, ccode, TRUE); + if (ch == XCL_RANGE) + { + fprintf(f, "-"); + ccode += 1 + print_char(f, ccode, TRUE); + } + } + } + } + + /* Indicate a non-UTF8 class which was created by negation */ + + fprintf(f, "]%s", (*code == OP_NCLASS)? " (neg)" : ""); + + /* Handle repeats after a class or a back reference */ + + CLASS_REF_REPEAT: + switch(*ccode) + { + case OP_CRSTAR: + case OP_CRMINSTAR: + case OP_CRPLUS: + case OP_CRMINPLUS: + case OP_CRQUERY: + case OP_CRMINQUERY: + fprintf(f, "%s", OP_names[*ccode]); + extra += _pcre_OP_lengths[*ccode]; + break; + + case OP_CRRANGE: + case OP_CRMINRANGE: + min = GET2(ccode,1); + max = GET2(ccode,3); + if (max == 0) fprintf(f, "{%d,}", min); + else fprintf(f, "{%d,%d}", min, max); + if (*ccode == OP_CRMINRANGE) fprintf(f, "?"); + extra += _pcre_OP_lengths[*ccode]; + break; + } + } + break; + + /* Anything else is just an item with no data*/ + + default: + fprintf(f, " %s", OP_names[*code]); + break; + } + + code += _pcre_OP_lengths[*code] + extra; + fprintf(f, "\n"); + } +} + +/* End of pcre_printint.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains the external function pcre_refcount(), which is an +auxiliary function that can be used to maintain a reference count in a compiled +pattern data block. This might be helpful in applications where the block is +shared by different users. */ + + + +/************************************************* +* Maintain reference count * +*************************************************/ + +/* The reference count is a 16-bit field, initialized to zero. It is not +possible to transfer a non-zero count from one host to a different host that +has a different byte order - though I can't see why anyone in their right mind +would ever want to do that! + +Arguments: + argument_re points to compiled code + adjust value to add to the count + +Returns: the (possibly updated) count value (a non-negative number), or + a negative error number +*/ + +EXPORT int +pcre_refcount(pcre *argument_re, int adjust) +{ +real_pcre *re = (real_pcre *)argument_re; +if (re == NULL) return PCRE_ERROR_NULL; +re->ref_count = (-adjust > re->ref_count)? 0 : + (adjust + re->ref_count > 65535)? 65535 : + re->ref_count + adjust; +return re->ref_count; +} + +/* End of pcre_refcount.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains the external function pcre_study(), along with local +supporting functions. */ + + + + +/************************************************* +* Set a bit and maybe its alternate case * +*************************************************/ + +/* Given a character, set its bit in the table, and also the bit for the other +version of a letter if we are caseless. + +Arguments: + start_bits points to the bit map + c is the character + caseless the caseless flag + cd the block with char table pointers + +Returns: nothing +*/ + +static void +set_bit(uschar *start_bits, unsigned int c, BOOL caseless, compile_data *cd) +{ +start_bits[c/8] |= (1 << (c&7)); +if (caseless && (cd->ctypes[c] & ctype_letter) != 0) + start_bits[cd->fcc[c]/8] |= (1 << (cd->fcc[c]&7)); +} + + + +/************************************************* +* Create bitmap of starting chars * +*************************************************/ + +/* This function scans a compiled unanchored expression and attempts to build a +bitmap of the set of initial characters. If it can't, it returns FALSE. As time +goes by, we may be able to get more clever at doing this. + +Arguments: + code points to an expression + start_bits points to a 32-byte table, initialized to 0 + caseless the current state of the caseless flag + utf8 TRUE if in UTF-8 mode + cd the block with char table pointers + +Returns: TRUE if table built, FALSE otherwise +*/ + +static BOOL +set_start_bits(const uschar *code, uschar *start_bits, BOOL caseless, + BOOL utf8, compile_data *cd) +{ +register int c; + +/* This next statement and the later reference to dummy are here in order to +trick the optimizer of the IBM C compiler for OS/2 into generating correct +code. Apparently IBM isn't going to fix the problem, and we would rather not +disable optimization (in this module it actually makes a big difference, and +the pcre module can use all the optimization it can get). */ + +volatile int dummy; + +do + { + const uschar *tcode = code + 1 + LINK_SIZE; + BOOL try_next = TRUE; + + while (try_next) + { + /* If a branch starts with a bracket or a positive lookahead assertion, + recurse to set bits from within them. That's all for this branch. */ + + if ((int)*tcode >= OP_BRA || *tcode == OP_ASSERT) + { + if (!set_start_bits(tcode, start_bits, caseless, utf8, cd)) + return FALSE; + try_next = FALSE; + } + + else switch(*tcode) + { + default: + return FALSE; + + /* Skip over callout */ + + case OP_CALLOUT: + tcode += 2 + 2*LINK_SIZE; + break; + + /* Skip over extended extraction bracket number */ + + case OP_BRANUMBER: + tcode += 3; + break; + + /* Skip over lookbehind and negative lookahead assertions */ + + case OP_ASSERT_NOT: + case OP_ASSERTBACK: + case OP_ASSERTBACK_NOT: + do tcode += GET(tcode, 1); while (*tcode == OP_ALT); + tcode += 1+LINK_SIZE; + break; + + /* Skip over an option setting, changing the caseless flag */ + + case OP_OPT: + caseless = (tcode[1] & PCRE_CASELESS) != 0; + tcode += 2; + break; + + /* BRAZERO does the bracket, but carries on. */ + + case OP_BRAZERO: + case OP_BRAMINZERO: + if (!set_start_bits(++tcode, start_bits, caseless, utf8, cd)) + return FALSE; + dummy = 1; + do tcode += GET(tcode,1); while (*tcode == OP_ALT); + tcode += 1+LINK_SIZE; + break; + + /* Single-char * or ? sets the bit and tries the next item */ + + case OP_STAR: + case OP_MINSTAR: + case OP_QUERY: + case OP_MINQUERY: + set_bit(start_bits, tcode[1], caseless, cd); + tcode += 2; +#ifdef SUPPORT_UTF8 + if (utf8) while ((*tcode & 0xc0) == 0x80) tcode++; +#endif + break; + + /* Single-char upto sets the bit and tries the next */ + + case OP_UPTO: + case OP_MINUPTO: + set_bit(start_bits, tcode[3], caseless, cd); + tcode += 4; +#ifdef SUPPORT_UTF8 + if (utf8) while ((*tcode & 0xc0) == 0x80) tcode++; +#endif + break; + + /* At least one single char sets the bit and stops */ + + case OP_EXACT: /* Fall through */ + tcode += 2; + + case OP_CHAR: + case OP_CHARNC: + case OP_PLUS: + case OP_MINPLUS: + set_bit(start_bits, tcode[1], caseless, cd); + try_next = FALSE; + break; + + /* Single character type sets the bits and stops */ + + case OP_NOT_DIGIT: + for (c = 0; c < 32; c++) + start_bits[c] |= ~cd->cbits[c+cbit_digit]; + try_next = FALSE; + break; + + case OP_DIGIT: + for (c = 0; c < 32; c++) + start_bits[c] |= cd->cbits[c+cbit_digit]; + try_next = FALSE; + break; + + case OP_NOT_WHITESPACE: + for (c = 0; c < 32; c++) + start_bits[c] |= ~cd->cbits[c+cbit_space]; + try_next = FALSE; + break; + + case OP_WHITESPACE: + for (c = 0; c < 32; c++) + start_bits[c] |= cd->cbits[c+cbit_space]; + try_next = FALSE; + break; + + case OP_NOT_WORDCHAR: + for (c = 0; c < 32; c++) + start_bits[c] |= ~cd->cbits[c+cbit_word]; + try_next = FALSE; + break; + + case OP_WORDCHAR: + for (c = 0; c < 32; c++) + start_bits[c] |= cd->cbits[c+cbit_word]; + try_next = FALSE; + break; + + /* One or more character type fudges the pointer and restarts, knowing + it will hit a single character type and stop there. */ + + case OP_TYPEPLUS: + case OP_TYPEMINPLUS: + tcode++; + break; + + case OP_TYPEEXACT: + tcode += 3; + break; + + /* Zero or more repeats of character types set the bits and then + try again. */ + + case OP_TYPEUPTO: + case OP_TYPEMINUPTO: + tcode += 2; /* Fall through */ + + case OP_TYPESTAR: + case OP_TYPEMINSTAR: + case OP_TYPEQUERY: + case OP_TYPEMINQUERY: + switch(tcode[1]) + { + case OP_ANY: + return FALSE; + + case OP_NOT_DIGIT: + for (c = 0; c < 32; c++) + start_bits[c] |= ~cd->cbits[c+cbit_digit]; + break; + + case OP_DIGIT: + for (c = 0; c < 32; c++) + start_bits[c] |= cd->cbits[c+cbit_digit]; + break; + + case OP_NOT_WHITESPACE: + for (c = 0; c < 32; c++) + start_bits[c] |= ~cd->cbits[c+cbit_space]; + break; + + case OP_WHITESPACE: + for (c = 0; c < 32; c++) + start_bits[c] |= cd->cbits[c+cbit_space]; + break; + + case OP_NOT_WORDCHAR: + for (c = 0; c < 32; c++) + start_bits[c] |= ~cd->cbits[c+cbit_word]; + break; + + case OP_WORDCHAR: + for (c = 0; c < 32; c++) + start_bits[c] |= cd->cbits[c+cbit_word]; + break; + } + + tcode += 2; + break; + + /* Character class where all the information is in a bit map: set the + bits and either carry on or not, according to the repeat count. If it was + a negative class, and we are operating with UTF-8 characters, any byte + with a value >= 0xc4 is a potentially valid starter because it starts a + character with a value > 255. */ + + case OP_NCLASS: + if (utf8) + { + start_bits[24] |= 0xf0; /* Bits for 0xc4 - 0xc8 */ + memset(start_bits+25, 0xff, 7); /* Bits for 0xc9 - 0xff */ + } + /* Fall through */ + + case OP_CLASS: + { + tcode++; + + /* In UTF-8 mode, the bits in a bit map correspond to character + values, not to byte values. However, the bit map we are constructing is + for byte values. So we have to do a conversion for characters whose + value is > 127. In fact, there are only two possible starting bytes for + characters in the range 128 - 255. */ + + if (utf8) + { + for (c = 0; c < 16; c++) start_bits[c] |= tcode[c]; + for (c = 128; c < 256; c++) + { + if ((tcode[c/8] && (1 << (c&7))) != 0) + { + int d = (c >> 6) | 0xc0; /* Set bit for this starter */ + start_bits[d/8] |= (1 << (d&7)); /* and then skip on to the */ + c = (c & 0xc0) + 0x40 - 1; /* next relevant character. */ + } + } + } + + /* In non-UTF-8 mode, the two bit maps are completely compatible. */ + + else + { + for (c = 0; c < 32; c++) start_bits[c] |= tcode[c]; + } + + /* Advance past the bit map, and act on what follows */ + + tcode += 32; + switch (*tcode) + { + case OP_CRSTAR: + case OP_CRMINSTAR: + case OP_CRQUERY: + case OP_CRMINQUERY: + tcode++; + break; + + case OP_CRRANGE: + case OP_CRMINRANGE: + if (((tcode[1] << 8) + tcode[2]) == 0) tcode += 5; + else try_next = FALSE; + break; + + default: + try_next = FALSE; + break; + } + } + break; /* End of bitmap class handling */ + + } /* End of switch */ + } /* End of try_next loop */ + + code += GET(code, 1); /* Advance to next branch */ + } +while (*code == OP_ALT); +return TRUE; +} + + + +/************************************************* +* Study a compiled expression * +*************************************************/ + +/* This function is handed a compiled expression that it must study to produce +information that will speed up the matching. It returns a pcre_extra block +which then gets handed back to pcre_exec(). + +Arguments: + re points to the compiled expression + options contains option bits + errorptr points to where to place error messages; + set NULL unless error + +Returns: pointer to a pcre_extra block, with study_data filled in and the + appropriate flag set; + NULL on error or if no optimization possible +*/ + +EXPORT pcre_extra * +pcre_study(const pcre *external_re, int options, const char **errorptr) +{ +uschar start_bits[32]; +pcre_extra *extra; +pcre_study_data *study; +const uschar *tables; +const real_pcre *re = (const real_pcre *)external_re; +uschar *code = (uschar *)re + re->name_table_offset + + (re->name_count * re->name_entry_size); +compile_data compile_block; + +*errorptr = NULL; + +if (re == NULL || re->magic_number != MAGIC_NUMBER) + { + *errorptr = "argument is not a compiled regular expression"; + return NULL; + } + +if ((options & ~PUBLIC_STUDY_OPTIONS) != 0) + { + *errorptr = "unknown or incorrect option bit(s) set"; + return NULL; + } + +/* For an anchored pattern, or an unanchored pattern that has a first char, or +a multiline pattern that matches only at "line starts", no further processing +at present. */ + +if ((re->options & (PCRE_ANCHORED|PCRE_FIRSTSET|PCRE_STARTLINE)) != 0) + return NULL; + +/* Set the character tables in the block that is passed around */ + +tables = re->tables; +if (tables == NULL) + (void)pcre_fullinfo(external_re, NULL, PCRE_INFO_DEFAULT_TABLES, + (void *)(&tables)); + +compile_block.lcc = tables + lcc_offset; +compile_block.fcc = tables + fcc_offset; +compile_block.cbits = tables + cbits_offset; +compile_block.ctypes = tables + ctypes_offset; + +/* See if we can find a fixed set of initial characters for the pattern. */ + +memset(start_bits, 0, 32 * sizeof(uschar)); +if (!set_start_bits(code, start_bits, (re->options & PCRE_CASELESS) != 0, + (re->options & PCRE_UTF8) != 0, &compile_block)) return NULL; + +/* Get a pcre_extra block and a pcre_study_data block. The study data is put in +the latter, which is pointed to by the former, which may also get additional +data set later by the calling program. At the moment, the size of +pcre_study_data is fixed. We nevertheless save it in a field for returning via +the pcre_fullinfo() function so that if it becomes variable in the future, we +don't have to change that code. */ + +extra = (pcre_extra *)(pcre_malloc) + (sizeof(pcre_extra) + sizeof(pcre_study_data)); + +if (extra == NULL) + { + *errorptr = "failed to get memory"; + return NULL; + } + +study = (pcre_study_data *)((char *)extra + sizeof(pcre_extra)); +extra->flags = PCRE_EXTRA_STUDY_DATA; +extra->study_data = study; + +study->size = sizeof(pcre_study_data); +study->options = PCRE_STUDY_MAPPED; +memcpy(study->start_bits, start_bits, sizeof(start_bits)); + +return extra; +} + +/* End of pcre_study.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains some fixed tables that are used by more than one of the +PCRE code modules. */ + + + + +/* Table of sizes for the fixed-length opcodes. It's defined in a macro so that +the definition is next to the definition of the opcodes in internal.h. */ + +const uschar _pcre_OP_lengths[] = { OP_LENGTHS }; + + + +/************************************************* +* Tables for UTF-8 support * +*************************************************/ + +/* These are the breakpoints for different numbers of bytes in a UTF-8 +character. */ + +const int _pcre_utf8_table1[] = + { 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff}; + +const int _pcre_utf8_table1_size = sizeof(_pcre_utf8_table1)/sizeof(int); + +/* These are the indicator bits and the mask for the data bits to set in the +first byte of a character, indexed by the number of additional bytes. */ + +const int _pcre_utf8_table2[] = { 0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc}; +const int _pcre_utf8_table3[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01}; + +/* Table of the number of extra characters, indexed by the first character +masked with 0x3f. The highest number for a valid UTF-8 character is in fact +0x3d. */ + +const uschar _pcre_utf8_table4[] = { + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 }; + +/* This table translates Unicode property names into code values for the +ucp_findchar() function. It is used by pcretest as well as by the library +functions. */ + +const ucp_type_table _pcre_utt[] = { + { "C", 128 + ucp_C }, + { "Cc", ucp_Cc }, + { "Cf", ucp_Cf }, + { "Cn", ucp_Cn }, + { "Co", ucp_Co }, + { "Cs", ucp_Cs }, + { "L", 128 + ucp_L }, + { "Ll", ucp_Ll }, + { "Lm", ucp_Lm }, + { "Lo", ucp_Lo }, + { "Lt", ucp_Lt }, + { "Lu", ucp_Lu }, + { "M", 128 + ucp_M }, + { "Mc", ucp_Mc }, + { "Me", ucp_Me }, + { "Mn", ucp_Mn }, + { "N", 128 + ucp_N }, + { "Nd", ucp_Nd }, + { "Nl", ucp_Nl }, + { "No", ucp_No }, + { "P", 128 + ucp_P }, + { "Pc", ucp_Pc }, + { "Pd", ucp_Pd }, + { "Pe", ucp_Pe }, + { "Pf", ucp_Pf }, + { "Pi", ucp_Pi }, + { "Po", ucp_Po }, + { "Ps", ucp_Ps }, + { "S", 128 + ucp_S }, + { "Sc", ucp_Sc }, + { "Sk", ucp_Sk }, + { "Sm", ucp_Sm }, + { "So", ucp_So }, + { "Z", 128 + ucp_Z }, + { "Zl", ucp_Zl }, + { "Zp", ucp_Zp }, + { "Zs", ucp_Zs } +}; + +const int _pcre_utt_size = sizeof(_pcre_utt)/sizeof(ucp_type_table); + +/* End of pcre_tables.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains an internal function that tests a compiled pattern to +see if it was compiled with the opposite endianness. If so, it uses an +auxiliary local function to flip the appropriate bytes. */ + + + + +/************************************************* +* Flip bytes in an integer * +*************************************************/ + +/* This function is called when the magic number in a regex doesn't match, in +order to flip its bytes to see if we are dealing with a pattern that was +compiled on a host of different endianness. If so, this function is used to +flip other byte values. + +Arguments: + value the number to flip + n the number of bytes to flip (assumed to be 2 or 4) + +Returns: the flipped value +*/ + +static long int +byteflip(long int value, int n) +{ +if (n == 2) return ((value & 0x00ff) << 8) | ((value & 0xff00) >> 8); +return ((value & 0x000000ff) << 24) | + ((value & 0x0000ff00) << 8) | + ((value & 0x00ff0000) >> 8) | + ((value & 0xff000000) >> 24); +} + + + +/************************************************* +* Test for a byte-flipped compiled regex * +*************************************************/ + +/* This function is called from pcre_exec(), pcre_dfa_exec(), and also from +pcre_fullinfo(). Its job is to test whether the regex is byte-flipped - that +is, it was compiled on a system of opposite endianness. The function is called +only when the native MAGIC_NUMBER test fails. If the regex is indeed flipped, +we flip all the relevant values into a different data block, and return it. + +Arguments: + re points to the regex + study points to study data, or NULL + internal_re points to a new regex block + internal_study points to a new study block + +Returns: the new block if is is indeed a byte-flipped regex + NULL if it is not +*/ + +EXPORT real_pcre * +_pcre_try_flipped(const real_pcre *re, real_pcre *internal_re, + const pcre_study_data *study, pcre_study_data *internal_study) +{ +if (byteflip(re->magic_number, sizeof(re->magic_number)) != MAGIC_NUMBER) + return NULL; + +*internal_re = *re; /* To copy other fields */ +internal_re->size = byteflip(re->size, sizeof(re->size)); +internal_re->options = byteflip(re->options, sizeof(re->options)); +internal_re->top_bracket = + (pcre_uint16)byteflip(re->top_bracket, sizeof(re->top_bracket)); +internal_re->top_backref = + (pcre_uint16)byteflip(re->top_backref, sizeof(re->top_backref)); +internal_re->first_byte = + (pcre_uint16)byteflip(re->first_byte, sizeof(re->first_byte)); +internal_re->req_byte = + (pcre_uint16)byteflip(re->req_byte, sizeof(re->req_byte)); +internal_re->name_table_offset = + (pcre_uint16)byteflip(re->name_table_offset, sizeof(re->name_table_offset)); +internal_re->name_entry_size = + (pcre_uint16)byteflip(re->name_entry_size, sizeof(re->name_entry_size)); +internal_re->name_count = + (pcre_uint16)byteflip(re->name_count, sizeof(re->name_count)); + +if (study != NULL) + { + *internal_study = *study; /* To copy other fields */ + internal_study->size = byteflip(study->size, sizeof(study->size)); + internal_study->options = byteflip(study->options, sizeof(study->options)); + } + +return internal_re; +} + +/* End of pcre_tryflipped.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module compiles code for supporting the use of Unicode character +properties. We use the (embryonic at the time of writing) UCP library, by +including some of its files, copies of which have been put in the PCRE +distribution. There is a macro in pcre_internal.h that changes the name +ucp_findchar into _pcre_ucp_findchar. */ + + + +/************************************************* +* libucp - Unicode Property Table handler * +*************************************************/ + +/* Copyright (c) University of Cambridge 2004 */ + +/* This little library provides a fast way of obtaining the basic Unicode +properties of a character, using a compact binary tree that occupies less than +100K bytes. + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/************************************************* +* libucp - Unicode Property Table handler * +*************************************************/ + +/* Internal header file defining the layout of compact nodes in the tree. */ + +typedef struct cnode { + unsigned short int f0; + unsigned short int f1; + unsigned short int f2; +} cnode; + +/* Things for the f0 field */ + +#define f0_leftexists 0x8000 /* Left child exists */ +#define f0_typemask 0x3f00 /* Type bits */ +#define f0_typeshift 8 /* Type shift */ +#define f0_chhmask 0x00ff /* Character high bits */ + +/* Things for the f2 field */ + +#define f2_rightmask 0xf000 /* Mask for right offset bits */ +#define f2_rightshift 12 /* Shift for right offset */ +#define f2_casemask 0x0fff /* Mask for case offset */ + +/* The tree consists of a vector of structures of type cnode, with the root +node as the first element. The three short ints (16-bits) are used as follows: + +(f0) (1) The 0x8000 bit of f0 is set if a left child exists. The child's node + is the next node in the vector. + (2) The 0x4000 bits of f0 is spare. + (3) The 0x3f00 bits of f0 contain the character type; this is a number + defined by the enumeration in ucp.h (e.g. ucp_Lu). + (4) The bottom 8 bits of f0 contain the most significant byte of the + character's 24-bit codepoint. + +(f1) (1) The f1 field contains the two least significant bytes of the + codepoint. + +(f2) (1) The 0xf000 bits of f2 contain zero if there is no right child of this + node. Otherwise, they contain one plus the exponent of the power of + two of the offset to the right node (e.g. a value of 3 means 8). The + units of the offset are node items. + + (2) The 0x0fff bits of f2 contain the signed offset from this character to + its alternate cased value. They are zero if there is no such + character. + + +----------------------------------------------------------------------------- +||.|.| type (6) | ms char (8) || ls char (16) ||....| case offset (12) || +----------------------------------------------------------------------------- + | | | + | |-> spare | + | exponent of right + |-> left child exists child offset + + +The upper/lower casing information is set only for characters that come in +pairs. There are (at present) four non-one-to-one mappings in the Unicode data. +These are ignored. They are: + + 1FBE Greek Prosgegrammeni (lower, with upper -> capital iota) + 2126 Ohm + 212A Kelvin + 212B Angstrom + +Certainly for the last three, having an alternate case would seem to be a +mistake. I don't know any Greek, so cannot comment on the first one. + + +When searching the tree, proceed as follows: + +(1) Start at the first node. + +(2) Extract the character value from f1 and the bottom 8 bits of f0; + +(3) Compare with the character being sought. If equal, we are done. + +(4) If the test character is smaller, inspect the f0_leftexists flag. If it is + not set, the character is not in the tree. If it is set, move to the next + node, and go to (2). + +(5) If the test character is bigger, extract the f2_rightmask bits from f2, and + shift them right by f2_rightshift. If the result is zero, the character is + not in the tree. Otherwise, calculate the number of nodes to skip by + shifting the value 1 left by this number minus one. Go to (2). +*/ + + +/* End of internal.h */ +/* This source module is automatically generated from the Unicode +property table. See internal.h for a description of the layout. */ + +static cnode ucp_table[] = { + { 0x9a00, 0x2f1f, 0xe000 }, + { 0x8700, 0x1558, 0xd000 }, + { 0x8700, 0x0a99, 0xc000 }, + { 0x8500, 0x0435, 0xbfe0 }, + { 0x8500, 0x01ff, 0xafff }, + { 0x8500, 0x00ff, 0x9079 }, + { 0x8000, 0x007f, 0x8000 }, + { 0x9500, 0x003f, 0x7000 }, + { 0x8000, 0x001f, 0x6000 }, + { 0x8000, 0x000f, 0x5000 }, + { 0x8000, 0x0007, 0x4000 }, + { 0x8000, 0x0003, 0x3000 }, + { 0x8000, 0x0001, 0x2000 }, + { 0x0000, 0x0000, 0x0000 }, + { 0x0000, 0x0002, 0x0000 }, + { 0x8000, 0x0005, 0x2000 }, + { 0x0000, 0x0004, 0x0000 }, + { 0x0000, 0x0006, 0x0000 }, + { 0x8000, 0x000b, 0x3000 }, + { 0x8000, 0x0009, 0x2000 }, + { 0x0000, 0x0008, 0x0000 }, + { 0x0000, 0x000a, 0x0000 }, + { 0x8000, 0x000d, 0x2000 }, + { 0x0000, 0x000c, 0x0000 }, + { 0x0000, 0x000e, 0x0000 }, + { 0x8000, 0x0017, 0x4000 }, + { 0x8000, 0x0013, 0x3000 }, + { 0x8000, 0x0011, 0x2000 }, + { 0x0000, 0x0010, 0x0000 }, + { 0x0000, 0x0012, 0x0000 }, + { 0x8000, 0x0015, 0x2000 }, + { 0x0000, 0x0014, 0x0000 }, + { 0x0000, 0x0016, 0x0000 }, + { 0x8000, 0x001b, 0x3000 }, + { 0x8000, 0x0019, 0x2000 }, + { 0x0000, 0x0018, 0x0000 }, + { 0x0000, 0x001a, 0x0000 }, + { 0x8000, 0x001d, 0x2000 }, + { 0x0000, 0x001c, 0x0000 }, + { 0x0000, 0x001e, 0x0000 }, + { 0x9500, 0x002f, 0x5000 }, + { 0x9500, 0x0027, 0x4000 }, + { 0x9500, 0x0023, 0x3000 }, + { 0x9500, 0x0021, 0x2000 }, + { 0x1d00, 0x0020, 0x0000 }, + { 0x1500, 0x0022, 0x0000 }, + { 0x9500, 0x0025, 0x2000 }, + { 0x1700, 0x0024, 0x0000 }, + { 0x1500, 0x0026, 0x0000 }, + { 0x9900, 0x002b, 0x3000 }, + { 0x9200, 0x0029, 0x2000 }, + { 0x1600, 0x0028, 0x0000 }, + { 0x1500, 0x002a, 0x0000 }, + { 0x9100, 0x002d, 0x2000 }, + { 0x1500, 0x002c, 0x0000 }, + { 0x1500, 0x002e, 0x0000 }, + { 0x8d00, 0x0037, 0x4000 }, + { 0x8d00, 0x0033, 0x3000 }, + { 0x8d00, 0x0031, 0x2000 }, + { 0x0d00, 0x0030, 0x0000 }, + { 0x0d00, 0x0032, 0x0000 }, + { 0x8d00, 0x0035, 0x2000 }, + { 0x0d00, 0x0034, 0x0000 }, + { 0x0d00, 0x0036, 0x0000 }, + { 0x9500, 0x003b, 0x3000 }, + { 0x8d00, 0x0039, 0x2000 }, + { 0x0d00, 0x0038, 0x0000 }, + { 0x1500, 0x003a, 0x0000 }, + { 0x9900, 0x003d, 0x2000 }, + { 0x1900, 0x003c, 0x0000 }, + { 0x1900, 0x003e, 0x0000 }, + { 0x9000, 0x005f, 0x6000 }, + { 0x8900, 0x004f, 0x5020 }, + { 0x8900, 0x0047, 0x4020 }, + { 0x8900, 0x0043, 0x3020 }, + { 0x8900, 0x0041, 0x2020 }, + { 0x1500, 0x0040, 0x0000 }, + { 0x0900, 0x0042, 0x0020 }, + { 0x8900, 0x0045, 0x2020 }, + { 0x0900, 0x0044, 0x0020 }, + { 0x0900, 0x0046, 0x0020 }, + { 0x8900, 0x004b, 0x3020 }, + { 0x8900, 0x0049, 0x2020 }, + { 0x0900, 0x0048, 0x0020 }, + { 0x0900, 0x004a, 0x0020 }, + { 0x8900, 0x004d, 0x2020 }, + { 0x0900, 0x004c, 0x0020 }, + { 0x0900, 0x004e, 0x0020 }, + { 0x8900, 0x0057, 0x4020 }, + { 0x8900, 0x0053, 0x3020 }, + { 0x8900, 0x0051, 0x2020 }, + { 0x0900, 0x0050, 0x0020 }, + { 0x0900, 0x0052, 0x0020 }, + { 0x8900, 0x0055, 0x2020 }, + { 0x0900, 0x0054, 0x0020 }, + { 0x0900, 0x0056, 0x0020 }, + { 0x9600, 0x005b, 0x3000 }, + { 0x8900, 0x0059, 0x2020 }, + { 0x0900, 0x0058, 0x0020 }, + { 0x0900, 0x005a, 0x0020 }, + { 0x9200, 0x005d, 0x2000 }, + { 0x1500, 0x005c, 0x0000 }, + { 0x1800, 0x005e, 0x0000 }, + { 0x8500, 0x006f, 0x5fe0 }, + { 0x8500, 0x0067, 0x4fe0 }, + { 0x8500, 0x0063, 0x3fe0 }, + { 0x8500, 0x0061, 0x2fe0 }, + { 0x1800, 0x0060, 0x0000 }, + { 0x0500, 0x0062, 0x0fe0 }, + { 0x8500, 0x0065, 0x2fe0 }, + { 0x0500, 0x0064, 0x0fe0 }, + { 0x0500, 0x0066, 0x0fe0 }, + { 0x8500, 0x006b, 0x3fe0 }, + { 0x8500, 0x0069, 0x2fe0 }, + { 0x0500, 0x0068, 0x0fe0 }, + { 0x0500, 0x006a, 0x0fe0 }, + { 0x8500, 0x006d, 0x2fe0 }, + { 0x0500, 0x006c, 0x0fe0 }, + { 0x0500, 0x006e, 0x0fe0 }, + { 0x8500, 0x0077, 0x4fe0 }, + { 0x8500, 0x0073, 0x3fe0 }, + { 0x8500, 0x0071, 0x2fe0 }, + { 0x0500, 0x0070, 0x0fe0 }, + { 0x0500, 0x0072, 0x0fe0 }, + { 0x8500, 0x0075, 0x2fe0 }, + { 0x0500, 0x0074, 0x0fe0 }, + { 0x0500, 0x0076, 0x0fe0 }, + { 0x9600, 0x007b, 0x3000 }, + { 0x8500, 0x0079, 0x2fe0 }, + { 0x0500, 0x0078, 0x0fe0 }, + { 0x0500, 0x007a, 0x0fe0 }, + { 0x9200, 0x007d, 0x2000 }, + { 0x1900, 0x007c, 0x0000 }, + { 0x1900, 0x007e, 0x0000 }, + { 0x9500, 0x00bf, 0x7000 }, + { 0x8000, 0x009f, 0x6000 }, + { 0x8000, 0x008f, 0x5000 }, + { 0x8000, 0x0087, 0x4000 }, + { 0x8000, 0x0083, 0x3000 }, + { 0x8000, 0x0081, 0x2000 }, + { 0x0000, 0x0080, 0x0000 }, + { 0x0000, 0x0082, 0x0000 }, + { 0x8000, 0x0085, 0x2000 }, + { 0x0000, 0x0084, 0x0000 }, + { 0x0000, 0x0086, 0x0000 }, + { 0x8000, 0x008b, 0x3000 }, + { 0x8000, 0x0089, 0x2000 }, + { 0x0000, 0x0088, 0x0000 }, + { 0x0000, 0x008a, 0x0000 }, + { 0x8000, 0x008d, 0x2000 }, + { 0x0000, 0x008c, 0x0000 }, + { 0x0000, 0x008e, 0x0000 }, + { 0x8000, 0x0097, 0x4000 }, + { 0x8000, 0x0093, 0x3000 }, + { 0x8000, 0x0091, 0x2000 }, + { 0x0000, 0x0090, 0x0000 }, + { 0x0000, 0x0092, 0x0000 }, + { 0x8000, 0x0095, 0x2000 }, + { 0x0000, 0x0094, 0x0000 }, + { 0x0000, 0x0096, 0x0000 }, + { 0x8000, 0x009b, 0x3000 }, + { 0x8000, 0x0099, 0x2000 }, + { 0x0000, 0x0098, 0x0000 }, + { 0x0000, 0x009a, 0x0000 }, + { 0x8000, 0x009d, 0x2000 }, + { 0x0000, 0x009c, 0x0000 }, + { 0x0000, 0x009e, 0x0000 }, + { 0x9800, 0x00af, 0x5000 }, + { 0x9a00, 0x00a7, 0x4000 }, + { 0x9700, 0x00a3, 0x3000 }, + { 0x9500, 0x00a1, 0x2000 }, + { 0x1d00, 0x00a0, 0x0000 }, + { 0x1700, 0x00a2, 0x0000 }, + { 0x9700, 0x00a5, 0x2000 }, + { 0x1700, 0x00a4, 0x0000 }, + { 0x1a00, 0x00a6, 0x0000 }, + { 0x9400, 0x00ab, 0x3000 }, + { 0x9a00, 0x00a9, 0x2000 }, + { 0x1800, 0x00a8, 0x0000 }, + { 0x0500, 0x00aa, 0x0000 }, + { 0x8100, 0x00ad, 0x2000 }, + { 0x1900, 0x00ac, 0x0000 }, + { 0x1a00, 0x00ae, 0x0000 }, + { 0x9500, 0x00b7, 0x4000 }, + { 0x8f00, 0x00b3, 0x3000 }, + { 0x9900, 0x00b1, 0x2000 }, + { 0x1a00, 0x00b0, 0x0000 }, + { 0x0f00, 0x00b2, 0x0000 }, + { 0x8500, 0x00b5, 0x22e7 }, + { 0x1800, 0x00b4, 0x0000 }, + { 0x1a00, 0x00b6, 0x0000 }, + { 0x9300, 0x00bb, 0x3000 }, + { 0x8f00, 0x00b9, 0x2000 }, + { 0x1800, 0x00b8, 0x0000 }, + { 0x0500, 0x00ba, 0x0000 }, + { 0x8f00, 0x00bd, 0x2000 }, + { 0x0f00, 0x00bc, 0x0000 }, + { 0x0f00, 0x00be, 0x0000 }, + { 0x8500, 0x00df, 0x6000 }, + { 0x8900, 0x00cf, 0x5020 }, + { 0x8900, 0x00c7, 0x4020 }, + { 0x8900, 0x00c3, 0x3020 }, + { 0x8900, 0x00c1, 0x2020 }, + { 0x0900, 0x00c0, 0x0020 }, + { 0x0900, 0x00c2, 0x0020 }, + { 0x8900, 0x00c5, 0x2020 }, + { 0x0900, 0x00c4, 0x0020 }, + { 0x0900, 0x00c6, 0x0020 }, + { 0x8900, 0x00cb, 0x3020 }, + { 0x8900, 0x00c9, 0x2020 }, + { 0x0900, 0x00c8, 0x0020 }, + { 0x0900, 0x00ca, 0x0020 }, + { 0x8900, 0x00cd, 0x2020 }, + { 0x0900, 0x00cc, 0x0020 }, + { 0x0900, 0x00ce, 0x0020 }, + { 0x9900, 0x00d7, 0x4000 }, + { 0x8900, 0x00d3, 0x3020 }, + { 0x8900, 0x00d1, 0x2020 }, + { 0x0900, 0x00d0, 0x0020 }, + { 0x0900, 0x00d2, 0x0020 }, + { 0x8900, 0x00d5, 0x2020 }, + { 0x0900, 0x00d4, 0x0020 }, + { 0x0900, 0x00d6, 0x0020 }, + { 0x8900, 0x00db, 0x3020 }, + { 0x8900, 0x00d9, 0x2020 }, + { 0x0900, 0x00d8, 0x0020 }, + { 0x0900, 0x00da, 0x0020 }, + { 0x8900, 0x00dd, 0x2020 }, + { 0x0900, 0x00dc, 0x0020 }, + { 0x0900, 0x00de, 0x0020 }, + { 0x8500, 0x00ef, 0x5fe0 }, + { 0x8500, 0x00e7, 0x4fe0 }, + { 0x8500, 0x00e3, 0x3fe0 }, + { 0x8500, 0x00e1, 0x2fe0 }, + { 0x0500, 0x00e0, 0x0fe0 }, + { 0x0500, 0x00e2, 0x0fe0 }, + { 0x8500, 0x00e5, 0x2fe0 }, + { 0x0500, 0x00e4, 0x0fe0 }, + { 0x0500, 0x00e6, 0x0fe0 }, + { 0x8500, 0x00eb, 0x3fe0 }, + { 0x8500, 0x00e9, 0x2fe0 }, + { 0x0500, 0x00e8, 0x0fe0 }, + { 0x0500, 0x00ea, 0x0fe0 }, + { 0x8500, 0x00ed, 0x2fe0 }, + { 0x0500, 0x00ec, 0x0fe0 }, + { 0x0500, 0x00ee, 0x0fe0 }, + { 0x9900, 0x00f7, 0x4000 }, + { 0x8500, 0x00f3, 0x3fe0 }, + { 0x8500, 0x00f1, 0x2fe0 }, + { 0x0500, 0x00f0, 0x0fe0 }, + { 0x0500, 0x00f2, 0x0fe0 }, + { 0x8500, 0x00f5, 0x2fe0 }, + { 0x0500, 0x00f4, 0x0fe0 }, + { 0x0500, 0x00f6, 0x0fe0 }, + { 0x8500, 0x00fb, 0x3fe0 }, + { 0x8500, 0x00f9, 0x2fe0 }, + { 0x0500, 0x00f8, 0x0fe0 }, + { 0x0500, 0x00fa, 0x0fe0 }, + { 0x8500, 0x00fd, 0x2fe0 }, + { 0x0500, 0x00fc, 0x0fe0 }, + { 0x0500, 0x00fe, 0x0fe0 }, + { 0x8500, 0x017f, 0x8ed4 }, + { 0x8900, 0x013f, 0x7001 }, + { 0x8500, 0x011f, 0x6fff }, + { 0x8500, 0x010f, 0x5fff }, + { 0x8500, 0x0107, 0x4fff }, + { 0x8500, 0x0103, 0x3fff }, + { 0x8500, 0x0101, 0x2fff }, + { 0x0900, 0x0100, 0x0001 }, + { 0x0900, 0x0102, 0x0001 }, + { 0x8500, 0x0105, 0x2fff }, + { 0x0900, 0x0104, 0x0001 }, + { 0x0900, 0x0106, 0x0001 }, + { 0x8500, 0x010b, 0x3fff }, + { 0x8500, 0x0109, 0x2fff }, + { 0x0900, 0x0108, 0x0001 }, + { 0x0900, 0x010a, 0x0001 }, + { 0x8500, 0x010d, 0x2fff }, + { 0x0900, 0x010c, 0x0001 }, + { 0x0900, 0x010e, 0x0001 }, + { 0x8500, 0x0117, 0x4fff }, + { 0x8500, 0x0113, 0x3fff }, + { 0x8500, 0x0111, 0x2fff }, + { 0x0900, 0x0110, 0x0001 }, + { 0x0900, 0x0112, 0x0001 }, + { 0x8500, 0x0115, 0x2fff }, + { 0x0900, 0x0114, 0x0001 }, + { 0x0900, 0x0116, 0x0001 }, + { 0x8500, 0x011b, 0x3fff }, + { 0x8500, 0x0119, 0x2fff }, + { 0x0900, 0x0118, 0x0001 }, + { 0x0900, 0x011a, 0x0001 }, + { 0x8500, 0x011d, 0x2fff }, + { 0x0900, 0x011c, 0x0001 }, + { 0x0900, 0x011e, 0x0001 }, + { 0x8500, 0x012f, 0x5fff }, + { 0x8500, 0x0127, 0x4fff }, + { 0x8500, 0x0123, 0x3fff }, + { 0x8500, 0x0121, 0x2fff }, + { 0x0900, 0x0120, 0x0001 }, + { 0x0900, 0x0122, 0x0001 }, + { 0x8500, 0x0125, 0x2fff }, + { 0x0900, 0x0124, 0x0001 }, + { 0x0900, 0x0126, 0x0001 }, + { 0x8500, 0x012b, 0x3fff }, + { 0x8500, 0x0129, 0x2fff }, + { 0x0900, 0x0128, 0x0001 }, + { 0x0900, 0x012a, 0x0001 }, + { 0x8500, 0x012d, 0x2fff }, + { 0x0900, 0x012c, 0x0001 }, + { 0x0900, 0x012e, 0x0001 }, + { 0x8500, 0x0137, 0x4fff }, + { 0x8500, 0x0133, 0x3fff }, + { 0x8500, 0x0131, 0x2f18 }, + { 0x0900, 0x0130, 0x0f39 }, + { 0x0900, 0x0132, 0x0001 }, + { 0x8500, 0x0135, 0x2fff }, + { 0x0900, 0x0134, 0x0001 }, + { 0x0900, 0x0136, 0x0001 }, + { 0x8900, 0x013b, 0x3001 }, + { 0x8900, 0x0139, 0x2001 }, + { 0x0500, 0x0138, 0x0000 }, + { 0x0500, 0x013a, 0x0fff }, + { 0x8900, 0x013d, 0x2001 }, + { 0x0500, 0x013c, 0x0fff }, + { 0x0500, 0x013e, 0x0fff }, + { 0x8500, 0x015f, 0x6fff }, + { 0x8500, 0x014f, 0x5fff }, + { 0x8900, 0x0147, 0x4001 }, + { 0x8900, 0x0143, 0x3001 }, + { 0x8900, 0x0141, 0x2001 }, + { 0x0500, 0x0140, 0x0fff }, + { 0x0500, 0x0142, 0x0fff }, + { 0x8900, 0x0145, 0x2001 }, + { 0x0500, 0x0144, 0x0fff }, + { 0x0500, 0x0146, 0x0fff }, + { 0x8500, 0x014b, 0x3fff }, + { 0x8500, 0x0149, 0x2000 }, + { 0x0500, 0x0148, 0x0fff }, + { 0x0900, 0x014a, 0x0001 }, + { 0x8500, 0x014d, 0x2fff }, + { 0x0900, 0x014c, 0x0001 }, + { 0x0900, 0x014e, 0x0001 }, + { 0x8500, 0x0157, 0x4fff }, + { 0x8500, 0x0153, 0x3fff }, + { 0x8500, 0x0151, 0x2fff }, + { 0x0900, 0x0150, 0x0001 }, + { 0x0900, 0x0152, 0x0001 }, + { 0x8500, 0x0155, 0x2fff }, + { 0x0900, 0x0154, 0x0001 }, + { 0x0900, 0x0156, 0x0001 }, + { 0x8500, 0x015b, 0x3fff }, + { 0x8500, 0x0159, 0x2fff }, + { 0x0900, 0x0158, 0x0001 }, + { 0x0900, 0x015a, 0x0001 }, + { 0x8500, 0x015d, 0x2fff }, + { 0x0900, 0x015c, 0x0001 }, + { 0x0900, 0x015e, 0x0001 }, + { 0x8500, 0x016f, 0x5fff }, + { 0x8500, 0x0167, 0x4fff }, + { 0x8500, 0x0163, 0x3fff }, + { 0x8500, 0x0161, 0x2fff }, + { 0x0900, 0x0160, 0x0001 }, + { 0x0900, 0x0162, 0x0001 }, + { 0x8500, 0x0165, 0x2fff }, + { 0x0900, 0x0164, 0x0001 }, + { 0x0900, 0x0166, 0x0001 }, + { 0x8500, 0x016b, 0x3fff }, + { 0x8500, 0x0169, 0x2fff }, + { 0x0900, 0x0168, 0x0001 }, + { 0x0900, 0x016a, 0x0001 }, + { 0x8500, 0x016d, 0x2fff }, + { 0x0900, 0x016c, 0x0001 }, + { 0x0900, 0x016e, 0x0001 }, + { 0x8500, 0x0177, 0x4fff }, + { 0x8500, 0x0173, 0x3fff }, + { 0x8500, 0x0171, 0x2fff }, + { 0x0900, 0x0170, 0x0001 }, + { 0x0900, 0x0172, 0x0001 }, + { 0x8500, 0x0175, 0x2fff }, + { 0x0900, 0x0174, 0x0001 }, + { 0x0900, 0x0176, 0x0001 }, + { 0x8900, 0x017b, 0x3001 }, + { 0x8900, 0x0179, 0x2001 }, + { 0x0900, 0x0178, 0x0f87 }, + { 0x0500, 0x017a, 0x0fff }, + { 0x8900, 0x017d, 0x2001 }, + { 0x0500, 0x017c, 0x0fff }, + { 0x0500, 0x017e, 0x0fff }, + { 0x8500, 0x01bf, 0x7038 }, + { 0x8900, 0x019f, 0x60d6 }, + { 0x8900, 0x018f, 0x50ca }, + { 0x8900, 0x0187, 0x4001 }, + { 0x8500, 0x0183, 0x3fff }, + { 0x8900, 0x0181, 0x20d2 }, + { 0x0500, 0x0180, 0x0000 }, + { 0x0900, 0x0182, 0x0001 }, + { 0x8500, 0x0185, 0x2fff }, + { 0x0900, 0x0184, 0x0001 }, + { 0x0900, 0x0186, 0x00ce }, + { 0x8900, 0x018b, 0x3001 }, + { 0x8900, 0x0189, 0x20cd }, + { 0x0500, 0x0188, 0x0fff }, + { 0x0900, 0x018a, 0x00cd }, + { 0x8500, 0x018d, 0x2000 }, + { 0x0500, 0x018c, 0x0fff }, + { 0x0900, 0x018e, 0x004f }, + { 0x8900, 0x0197, 0x40d1 }, + { 0x8900, 0x0193, 0x30cd }, + { 0x8900, 0x0191, 0x2001 }, + { 0x0900, 0x0190, 0x00cb }, + { 0x0500, 0x0192, 0x0fff }, + { 0x8500, 0x0195, 0x2061 }, + { 0x0900, 0x0194, 0x00cf }, + { 0x0900, 0x0196, 0x00d3 }, + { 0x8500, 0x019b, 0x3000 }, + { 0x8500, 0x0199, 0x2fff }, + { 0x0900, 0x0198, 0x0001 }, + { 0x0500, 0x019a, 0x0000 }, + { 0x8900, 0x019d, 0x20d5 }, + { 0x0900, 0x019c, 0x00d3 }, + { 0x0500, 0x019e, 0x0082 }, + { 0x8900, 0x01af, 0x5001 }, + { 0x8900, 0x01a7, 0x4001 }, + { 0x8500, 0x01a3, 0x3fff }, + { 0x8500, 0x01a1, 0x2fff }, + { 0x0900, 0x01a0, 0x0001 }, + { 0x0900, 0x01a2, 0x0001 }, + { 0x8500, 0x01a5, 0x2fff }, + { 0x0900, 0x01a4, 0x0001 }, + { 0x0900, 0x01a6, 0x00da }, + { 0x8500, 0x01ab, 0x3000 }, + { 0x8900, 0x01a9, 0x20da }, + { 0x0500, 0x01a8, 0x0fff }, + { 0x0500, 0x01aa, 0x0000 }, + { 0x8500, 0x01ad, 0x2fff }, + { 0x0900, 0x01ac, 0x0001 }, + { 0x0900, 0x01ae, 0x00da }, + { 0x8900, 0x01b7, 0x40db }, + { 0x8900, 0x01b3, 0x3001 }, + { 0x8900, 0x01b1, 0x20d9 }, + { 0x0500, 0x01b0, 0x0fff }, + { 0x0900, 0x01b2, 0x00d9 }, + { 0x8900, 0x01b5, 0x2001 }, + { 0x0500, 0x01b4, 0x0fff }, + { 0x0500, 0x01b6, 0x0fff }, + { 0x8700, 0x01bb, 0x3000 }, + { 0x8500, 0x01b9, 0x2fff }, + { 0x0900, 0x01b8, 0x0001 }, + { 0x0500, 0x01ba, 0x0000 }, + { 0x8500, 0x01bd, 0x2fff }, + { 0x0900, 0x01bc, 0x0001 }, + { 0x0500, 0x01be, 0x0000 }, + { 0x8500, 0x01df, 0x6fff }, + { 0x8900, 0x01cf, 0x5001 }, + { 0x8900, 0x01c7, 0x4002 }, + { 0x8700, 0x01c3, 0x3000 }, + { 0x8700, 0x01c1, 0x2000 }, + { 0x0700, 0x01c0, 0x0000 }, + { 0x0700, 0x01c2, 0x0000 }, + { 0x8800, 0x01c5, 0x2000 }, + { 0x0900, 0x01c4, 0x0002 }, + { 0x0500, 0x01c6, 0x0ffe }, + { 0x8800, 0x01cb, 0x3000 }, + { 0x8500, 0x01c9, 0x2ffe }, + { 0x0800, 0x01c8, 0x0000 }, + { 0x0900, 0x01ca, 0x0002 }, + { 0x8900, 0x01cd, 0x2001 }, + { 0x0500, 0x01cc, 0x0ffe }, + { 0x0500, 0x01ce, 0x0fff }, + { 0x8900, 0x01d7, 0x4001 }, + { 0x8900, 0x01d3, 0x3001 }, + { 0x8900, 0x01d1, 0x2001 }, + { 0x0500, 0x01d0, 0x0fff }, + { 0x0500, 0x01d2, 0x0fff }, + { 0x8900, 0x01d5, 0x2001 }, + { 0x0500, 0x01d4, 0x0fff }, + { 0x0500, 0x01d6, 0x0fff }, + { 0x8900, 0x01db, 0x3001 }, + { 0x8900, 0x01d9, 0x2001 }, + { 0x0500, 0x01d8, 0x0fff }, + { 0x0500, 0x01da, 0x0fff }, + { 0x8500, 0x01dd, 0x2fb1 }, + { 0x0500, 0x01dc, 0x0fff }, + { 0x0900, 0x01de, 0x0001 }, + { 0x8500, 0x01ef, 0x5fff }, + { 0x8500, 0x01e7, 0x4fff }, + { 0x8500, 0x01e3, 0x3fff }, + { 0x8500, 0x01e1, 0x2fff }, + { 0x0900, 0x01e0, 0x0001 }, + { 0x0900, 0x01e2, 0x0001 }, + { 0x8500, 0x01e5, 0x2fff }, + { 0x0900, 0x01e4, 0x0001 }, + { 0x0900, 0x01e6, 0x0001 }, + { 0x8500, 0x01eb, 0x3fff }, + { 0x8500, 0x01e9, 0x2fff }, + { 0x0900, 0x01e8, 0x0001 }, + { 0x0900, 0x01ea, 0x0001 }, + { 0x8500, 0x01ed, 0x2fff }, + { 0x0900, 0x01ec, 0x0001 }, + { 0x0900, 0x01ee, 0x0001 }, + { 0x8900, 0x01f7, 0x4fc8 }, + { 0x8500, 0x01f3, 0x3ffe }, + { 0x8900, 0x01f1, 0x2002 }, + { 0x0500, 0x01f0, 0x0000 }, + { 0x0800, 0x01f2, 0x0000 }, + { 0x8500, 0x01f5, 0x2fff }, + { 0x0900, 0x01f4, 0x0001 }, + { 0x0900, 0x01f6, 0x0f9f }, + { 0x8500, 0x01fb, 0x3fff }, + { 0x8500, 0x01f9, 0x2fff }, + { 0x0900, 0x01f8, 0x0001 }, + { 0x0900, 0x01fa, 0x0001 }, + { 0x8500, 0x01fd, 0x2fff }, + { 0x0900, 0x01fc, 0x0001 }, + { 0x0900, 0x01fe, 0x0001 }, + { 0x8c00, 0x0318, 0x9000 }, + { 0x8500, 0x0298, 0x8000 }, + { 0x8500, 0x0258, 0x7000 }, + { 0x8500, 0x021f, 0x6fff }, + { 0x8500, 0x020f, 0x5fff }, + { 0x8500, 0x0207, 0x4fff }, + { 0x8500, 0x0203, 0x3fff }, + { 0x8500, 0x0201, 0x2fff }, + { 0x0900, 0x0200, 0x0001 }, + { 0x0900, 0x0202, 0x0001 }, + { 0x8500, 0x0205, 0x2fff }, + { 0x0900, 0x0204, 0x0001 }, + { 0x0900, 0x0206, 0x0001 }, + { 0x8500, 0x020b, 0x3fff }, + { 0x8500, 0x0209, 0x2fff }, + { 0x0900, 0x0208, 0x0001 }, + { 0x0900, 0x020a, 0x0001 }, + { 0x8500, 0x020d, 0x2fff }, + { 0x0900, 0x020c, 0x0001 }, + { 0x0900, 0x020e, 0x0001 }, + { 0x8500, 0x0217, 0x4fff }, + { 0x8500, 0x0213, 0x3fff }, + { 0x8500, 0x0211, 0x2fff }, + { 0x0900, 0x0210, 0x0001 }, + { 0x0900, 0x0212, 0x0001 }, + { 0x8500, 0x0215, 0x2fff }, + { 0x0900, 0x0214, 0x0001 }, + { 0x0900, 0x0216, 0x0001 }, + { 0x8500, 0x021b, 0x3fff }, + { 0x8500, 0x0219, 0x2fff }, + { 0x0900, 0x0218, 0x0001 }, + { 0x0900, 0x021a, 0x0001 }, + { 0x8500, 0x021d, 0x2fff }, + { 0x0900, 0x021c, 0x0001 }, + { 0x0900, 0x021e, 0x0001 }, + { 0x8500, 0x022f, 0x5fff }, + { 0x8500, 0x0227, 0x4fff }, + { 0x8500, 0x0223, 0x3fff }, + { 0x8500, 0x0221, 0x2000 }, + { 0x0900, 0x0220, 0x0f7e }, + { 0x0900, 0x0222, 0x0001 }, + { 0x8500, 0x0225, 0x2fff }, + { 0x0900, 0x0224, 0x0001 }, + { 0x0900, 0x0226, 0x0001 }, + { 0x8500, 0x022b, 0x3fff }, + { 0x8500, 0x0229, 0x2fff }, + { 0x0900, 0x0228, 0x0001 }, + { 0x0900, 0x022a, 0x0001 }, + { 0x8500, 0x022d, 0x2fff }, + { 0x0900, 0x022c, 0x0001 }, + { 0x0900, 0x022e, 0x0001 }, + { 0x8500, 0x0250, 0x4000 }, + { 0x8500, 0x0233, 0x3fff }, + { 0x8500, 0x0231, 0x2fff }, + { 0x0900, 0x0230, 0x0001 }, + { 0x0900, 0x0232, 0x0001 }, + { 0x8500, 0x0235, 0x2000 }, + { 0x0500, 0x0234, 0x0000 }, + { 0x0500, 0x0236, 0x0000 }, + { 0x8500, 0x0254, 0x3f32 }, + { 0x8500, 0x0252, 0x2000 }, + { 0x0500, 0x0251, 0x0000 }, + { 0x0500, 0x0253, 0x0f2e }, + { 0x8500, 0x0256, 0x2f33 }, + { 0x0500, 0x0255, 0x0000 }, + { 0x0500, 0x0257, 0x0f33 }, + { 0x8500, 0x0278, 0x6000 }, + { 0x8500, 0x0268, 0x5f2f }, + { 0x8500, 0x0260, 0x4f33 }, + { 0x8500, 0x025c, 0x3000 }, + { 0x8500, 0x025a, 0x2000 }, + { 0x0500, 0x0259, 0x0f36 }, + { 0x0500, 0x025b, 0x0f35 }, + { 0x8500, 0x025e, 0x2000 }, + { 0x0500, 0x025d, 0x0000 }, + { 0x0500, 0x025f, 0x0000 }, + { 0x8500, 0x0264, 0x3000 }, + { 0x8500, 0x0262, 0x2000 }, + { 0x0500, 0x0261, 0x0000 }, + { 0x0500, 0x0263, 0x0f31 }, + { 0x8500, 0x0266, 0x2000 }, + { 0x0500, 0x0265, 0x0000 }, + { 0x0500, 0x0267, 0x0000 }, + { 0x8500, 0x0270, 0x4000 }, + { 0x8500, 0x026c, 0x3000 }, + { 0x8500, 0x026a, 0x2000 }, + { 0x0500, 0x0269, 0x0f2d }, + { 0x0500, 0x026b, 0x0000 }, + { 0x8500, 0x026e, 0x2000 }, + { 0x0500, 0x026d, 0x0000 }, + { 0x0500, 0x026f, 0x0f2d }, + { 0x8500, 0x0274, 0x3000 }, + { 0x8500, 0x0272, 0x2f2b }, + { 0x0500, 0x0271, 0x0000 }, + { 0x0500, 0x0273, 0x0000 }, + { 0x8500, 0x0276, 0x2000 }, + { 0x0500, 0x0275, 0x0f2a }, + { 0x0500, 0x0277, 0x0000 }, + { 0x8500, 0x0288, 0x5f26 }, + { 0x8500, 0x0280, 0x4f26 }, + { 0x8500, 0x027c, 0x3000 }, + { 0x8500, 0x027a, 0x2000 }, + { 0x0500, 0x0279, 0x0000 }, + { 0x0500, 0x027b, 0x0000 }, + { 0x8500, 0x027e, 0x2000 }, + { 0x0500, 0x027d, 0x0000 }, + { 0x0500, 0x027f, 0x0000 }, + { 0x8500, 0x0284, 0x3000 }, + { 0x8500, 0x0282, 0x2000 }, + { 0x0500, 0x0281, 0x0000 }, + { 0x0500, 0x0283, 0x0f26 }, + { 0x8500, 0x0286, 0x2000 }, + { 0x0500, 0x0285, 0x0000 }, + { 0x0500, 0x0287, 0x0000 }, + { 0x8500, 0x0290, 0x4000 }, + { 0x8500, 0x028c, 0x3000 }, + { 0x8500, 0x028a, 0x2f27 }, + { 0x0500, 0x0289, 0x0000 }, + { 0x0500, 0x028b, 0x0f27 }, + { 0x8500, 0x028e, 0x2000 }, + { 0x0500, 0x028d, 0x0000 }, + { 0x0500, 0x028f, 0x0000 }, + { 0x8500, 0x0294, 0x3000 }, + { 0x8500, 0x0292, 0x2f25 }, + { 0x0500, 0x0291, 0x0000 }, + { 0x0500, 0x0293, 0x0000 }, + { 0x8500, 0x0296, 0x2000 }, + { 0x0500, 0x0295, 0x0000 }, + { 0x0500, 0x0297, 0x0000 }, + { 0x9800, 0x02d8, 0x7000 }, + { 0x8600, 0x02b8, 0x6000 }, + { 0x8500, 0x02a8, 0x5000 }, + { 0x8500, 0x02a0, 0x4000 }, + { 0x8500, 0x029c, 0x3000 }, + { 0x8500, 0x029a, 0x2000 }, + { 0x0500, 0x0299, 0x0000 }, + { 0x0500, 0x029b, 0x0000 }, + { 0x8500, 0x029e, 0x2000 }, + { 0x0500, 0x029d, 0x0000 }, + { 0x0500, 0x029f, 0x0000 }, + { 0x8500, 0x02a4, 0x3000 }, + { 0x8500, 0x02a2, 0x2000 }, + { 0x0500, 0x02a1, 0x0000 }, + { 0x0500, 0x02a3, 0x0000 }, + { 0x8500, 0x02a6, 0x2000 }, + { 0x0500, 0x02a5, 0x0000 }, + { 0x0500, 0x02a7, 0x0000 }, + { 0x8600, 0x02b0, 0x4000 }, + { 0x8500, 0x02ac, 0x3000 }, + { 0x8500, 0x02aa, 0x2000 }, + { 0x0500, 0x02a9, 0x0000 }, + { 0x0500, 0x02ab, 0x0000 }, + { 0x8500, 0x02ae, 0x2000 }, + { 0x0500, 0x02ad, 0x0000 }, + { 0x0500, 0x02af, 0x0000 }, + { 0x8600, 0x02b4, 0x3000 }, + { 0x8600, 0x02b2, 0x2000 }, + { 0x0600, 0x02b1, 0x0000 }, + { 0x0600, 0x02b3, 0x0000 }, + { 0x8600, 0x02b6, 0x2000 }, + { 0x0600, 0x02b5, 0x0000 }, + { 0x0600, 0x02b7, 0x0000 }, + { 0x8600, 0x02c8, 0x5000 }, + { 0x8600, 0x02c0, 0x4000 }, + { 0x8600, 0x02bc, 0x3000 }, + { 0x8600, 0x02ba, 0x2000 }, + { 0x0600, 0x02b9, 0x0000 }, + { 0x0600, 0x02bb, 0x0000 }, + { 0x8600, 0x02be, 0x2000 }, + { 0x0600, 0x02bd, 0x0000 }, + { 0x0600, 0x02bf, 0x0000 }, + { 0x9800, 0x02c4, 0x3000 }, + { 0x9800, 0x02c2, 0x2000 }, + { 0x0600, 0x02c1, 0x0000 }, + { 0x1800, 0x02c3, 0x0000 }, + { 0x8600, 0x02c6, 0x2000 }, + { 0x1800, 0x02c5, 0x0000 }, + { 0x0600, 0x02c7, 0x0000 }, + { 0x8600, 0x02d0, 0x4000 }, + { 0x8600, 0x02cc, 0x3000 }, + { 0x8600, 0x02ca, 0x2000 }, + { 0x0600, 0x02c9, 0x0000 }, + { 0x0600, 0x02cb, 0x0000 }, + { 0x8600, 0x02ce, 0x2000 }, + { 0x0600, 0x02cd, 0x0000 }, + { 0x0600, 0x02cf, 0x0000 }, + { 0x9800, 0x02d4, 0x3000 }, + { 0x9800, 0x02d2, 0x2000 }, + { 0x0600, 0x02d1, 0x0000 }, + { 0x1800, 0x02d3, 0x0000 }, + { 0x9800, 0x02d6, 0x2000 }, + { 0x1800, 0x02d5, 0x0000 }, + { 0x1800, 0x02d7, 0x0000 }, + { 0x9800, 0x02f8, 0x6000 }, + { 0x9800, 0x02e8, 0x5000 }, + { 0x8600, 0x02e0, 0x4000 }, + { 0x9800, 0x02dc, 0x3000 }, + { 0x9800, 0x02da, 0x2000 }, + { 0x1800, 0x02d9, 0x0000 }, + { 0x1800, 0x02db, 0x0000 }, + { 0x9800, 0x02de, 0x2000 }, + { 0x1800, 0x02dd, 0x0000 }, + { 0x1800, 0x02df, 0x0000 }, + { 0x8600, 0x02e4, 0x3000 }, + { 0x8600, 0x02e2, 0x2000 }, + { 0x0600, 0x02e1, 0x0000 }, + { 0x0600, 0x02e3, 0x0000 }, + { 0x9800, 0x02e6, 0x2000 }, + { 0x1800, 0x02e5, 0x0000 }, + { 0x1800, 0x02e7, 0x0000 }, + { 0x9800, 0x02f0, 0x4000 }, + { 0x9800, 0x02ec, 0x3000 }, + { 0x9800, 0x02ea, 0x2000 }, + { 0x1800, 0x02e9, 0x0000 }, + { 0x1800, 0x02eb, 0x0000 }, + { 0x8600, 0x02ee, 0x2000 }, + { 0x1800, 0x02ed, 0x0000 }, + { 0x1800, 0x02ef, 0x0000 }, + { 0x9800, 0x02f4, 0x3000 }, + { 0x9800, 0x02f2, 0x2000 }, + { 0x1800, 0x02f1, 0x0000 }, + { 0x1800, 0x02f3, 0x0000 }, + { 0x9800, 0x02f6, 0x2000 }, + { 0x1800, 0x02f5, 0x0000 }, + { 0x1800, 0x02f7, 0x0000 }, + { 0x8c00, 0x0308, 0x5000 }, + { 0x8c00, 0x0300, 0x4000 }, + { 0x9800, 0x02fc, 0x3000 }, + { 0x9800, 0x02fa, 0x2000 }, + { 0x1800, 0x02f9, 0x0000 }, + { 0x1800, 0x02fb, 0x0000 }, + { 0x9800, 0x02fe, 0x2000 }, + { 0x1800, 0x02fd, 0x0000 }, + { 0x1800, 0x02ff, 0x0000 }, + { 0x8c00, 0x0304, 0x3000 }, + { 0x8c00, 0x0302, 0x2000 }, + { 0x0c00, 0x0301, 0x0000 }, + { 0x0c00, 0x0303, 0x0000 }, + { 0x8c00, 0x0306, 0x2000 }, + { 0x0c00, 0x0305, 0x0000 }, + { 0x0c00, 0x0307, 0x0000 }, + { 0x8c00, 0x0310, 0x4000 }, + { 0x8c00, 0x030c, 0x3000 }, + { 0x8c00, 0x030a, 0x2000 }, + { 0x0c00, 0x0309, 0x0000 }, + { 0x0c00, 0x030b, 0x0000 }, + { 0x8c00, 0x030e, 0x2000 }, + { 0x0c00, 0x030d, 0x0000 }, + { 0x0c00, 0x030f, 0x0000 }, + { 0x8c00, 0x0314, 0x3000 }, + { 0x8c00, 0x0312, 0x2000 }, + { 0x0c00, 0x0311, 0x0000 }, + { 0x0c00, 0x0313, 0x0000 }, + { 0x8c00, 0x0316, 0x2000 }, + { 0x0c00, 0x0315, 0x0000 }, + { 0x0c00, 0x0317, 0x0000 }, + { 0x8500, 0x03b0, 0x8000 }, + { 0x8c00, 0x035d, 0x7000 }, + { 0x8c00, 0x0338, 0x6000 }, + { 0x8c00, 0x0328, 0x5000 }, + { 0x8c00, 0x0320, 0x4000 }, + { 0x8c00, 0x031c, 0x3000 }, + { 0x8c00, 0x031a, 0x2000 }, + { 0x0c00, 0x0319, 0x0000 }, + { 0x0c00, 0x031b, 0x0000 }, + { 0x8c00, 0x031e, 0x2000 }, + { 0x0c00, 0x031d, 0x0000 }, + { 0x0c00, 0x031f, 0x0000 }, + { 0x8c00, 0x0324, 0x3000 }, + { 0x8c00, 0x0322, 0x2000 }, + { 0x0c00, 0x0321, 0x0000 }, + { 0x0c00, 0x0323, 0x0000 }, + { 0x8c00, 0x0326, 0x2000 }, + { 0x0c00, 0x0325, 0x0000 }, + { 0x0c00, 0x0327, 0x0000 }, + { 0x8c00, 0x0330, 0x4000 }, + { 0x8c00, 0x032c, 0x3000 }, + { 0x8c00, 0x032a, 0x2000 }, + { 0x0c00, 0x0329, 0x0000 }, + { 0x0c00, 0x032b, 0x0000 }, + { 0x8c00, 0x032e, 0x2000 }, + { 0x0c00, 0x032d, 0x0000 }, + { 0x0c00, 0x032f, 0x0000 }, + { 0x8c00, 0x0334, 0x3000 }, + { 0x8c00, 0x0332, 0x2000 }, + { 0x0c00, 0x0331, 0x0000 }, + { 0x0c00, 0x0333, 0x0000 }, + { 0x8c00, 0x0336, 0x2000 }, + { 0x0c00, 0x0335, 0x0000 }, + { 0x0c00, 0x0337, 0x0000 }, + { 0x8c00, 0x0348, 0x5000 }, + { 0x8c00, 0x0340, 0x4000 }, + { 0x8c00, 0x033c, 0x3000 }, + { 0x8c00, 0x033a, 0x2000 }, + { 0x0c00, 0x0339, 0x0000 }, + { 0x0c00, 0x033b, 0x0000 }, + { 0x8c00, 0x033e, 0x2000 }, + { 0x0c00, 0x033d, 0x0000 }, + { 0x0c00, 0x033f, 0x0000 }, + { 0x8c00, 0x0344, 0x3000 }, + { 0x8c00, 0x0342, 0x2000 }, + { 0x0c00, 0x0341, 0x0000 }, + { 0x0c00, 0x0343, 0x0000 }, + { 0x8c00, 0x0346, 0x2000 }, + { 0x0c00, 0x0345, 0x0000 }, + { 0x0c00, 0x0347, 0x0000 }, + { 0x8c00, 0x0350, 0x4000 }, + { 0x8c00, 0x034c, 0x3000 }, + { 0x8c00, 0x034a, 0x2000 }, + { 0x0c00, 0x0349, 0x0000 }, + { 0x0c00, 0x034b, 0x0000 }, + { 0x8c00, 0x034e, 0x2000 }, + { 0x0c00, 0x034d, 0x0000 }, + { 0x0c00, 0x034f, 0x0000 }, + { 0x8c00, 0x0354, 0x3000 }, + { 0x8c00, 0x0352, 0x2000 }, + { 0x0c00, 0x0351, 0x0000 }, + { 0x0c00, 0x0353, 0x0000 }, + { 0x8c00, 0x0356, 0x2000 }, + { 0x0c00, 0x0355, 0x0000 }, + { 0x0c00, 0x0357, 0x0000 }, + { 0x8900, 0x038f, 0x603f }, + { 0x8c00, 0x036d, 0x5000 }, + { 0x8c00, 0x0365, 0x4000 }, + { 0x8c00, 0x0361, 0x3000 }, + { 0x8c00, 0x035f, 0x2000 }, + { 0x0c00, 0x035e, 0x0000 }, + { 0x0c00, 0x0360, 0x0000 }, + { 0x8c00, 0x0363, 0x2000 }, + { 0x0c00, 0x0362, 0x0000 }, + { 0x0c00, 0x0364, 0x0000 }, + { 0x8c00, 0x0369, 0x3000 }, + { 0x8c00, 0x0367, 0x2000 }, + { 0x0c00, 0x0366, 0x0000 }, + { 0x0c00, 0x0368, 0x0000 }, + { 0x8c00, 0x036b, 0x2000 }, + { 0x0c00, 0x036a, 0x0000 }, + { 0x0c00, 0x036c, 0x0000 }, + { 0x9800, 0x0385, 0x4000 }, + { 0x9800, 0x0375, 0x3000 }, + { 0x8c00, 0x036f, 0x2000 }, + { 0x0c00, 0x036e, 0x0000 }, + { 0x1800, 0x0374, 0x0000 }, + { 0x9500, 0x037e, 0x2000 }, + { 0x0600, 0x037a, 0x0000 }, + { 0x1800, 0x0384, 0x0000 }, + { 0x8900, 0x0389, 0x3025 }, + { 0x9500, 0x0387, 0x2000 }, + { 0x0900, 0x0386, 0x0026 }, + { 0x0900, 0x0388, 0x0025 }, + { 0x8900, 0x038c, 0x2040 }, + { 0x0900, 0x038a, 0x0025 }, + { 0x0900, 0x038e, 0x003f }, + { 0x8900, 0x039f, 0x5020 }, + { 0x8900, 0x0397, 0x4020 }, + { 0x8900, 0x0393, 0x3020 }, + { 0x8900, 0x0391, 0x2020 }, + { 0x0500, 0x0390, 0x0000 }, + { 0x0900, 0x0392, 0x0020 }, + { 0x8900, 0x0395, 0x2020 }, + { 0x0900, 0x0394, 0x0020 }, + { 0x0900, 0x0396, 0x0020 }, + { 0x8900, 0x039b, 0x3020 }, + { 0x8900, 0x0399, 0x2020 }, + { 0x0900, 0x0398, 0x0020 }, + { 0x0900, 0x039a, 0x0020 }, + { 0x8900, 0x039d, 0x2020 }, + { 0x0900, 0x039c, 0x0020 }, + { 0x0900, 0x039e, 0x0020 }, + { 0x8900, 0x03a8, 0x4020 }, + { 0x8900, 0x03a4, 0x3020 }, + { 0x8900, 0x03a1, 0x2020 }, + { 0x0900, 0x03a0, 0x0020 }, + { 0x0900, 0x03a3, 0x0020 }, + { 0x8900, 0x03a6, 0x2020 }, + { 0x0900, 0x03a5, 0x0020 }, + { 0x0900, 0x03a7, 0x0020 }, + { 0x8500, 0x03ac, 0x3fda }, + { 0x8900, 0x03aa, 0x2020 }, + { 0x0900, 0x03a9, 0x0020 }, + { 0x0900, 0x03ab, 0x0020 }, + { 0x8500, 0x03ae, 0x2fdb }, + { 0x0500, 0x03ad, 0x0fdb }, + { 0x0500, 0x03af, 0x0fdb }, + { 0x8500, 0x03f1, 0x7fb0 }, + { 0x8500, 0x03d1, 0x6fc7 }, + { 0x8500, 0x03c0, 0x5fe0 }, + { 0x8500, 0x03b8, 0x4fe0 }, + { 0x8500, 0x03b4, 0x3fe0 }, + { 0x8500, 0x03b2, 0x2fe0 }, + { 0x0500, 0x03b1, 0x0fe0 }, + { 0x0500, 0x03b3, 0x0fe0 }, + { 0x8500, 0x03b6, 0x2fe0 }, + { 0x0500, 0x03b5, 0x0fe0 }, + { 0x0500, 0x03b7, 0x0fe0 }, + { 0x8500, 0x03bc, 0x3fe0 }, + { 0x8500, 0x03ba, 0x2fe0 }, + { 0x0500, 0x03b9, 0x0fe0 }, + { 0x0500, 0x03bb, 0x0fe0 }, + { 0x8500, 0x03be, 0x2fe0 }, + { 0x0500, 0x03bd, 0x0fe0 }, + { 0x0500, 0x03bf, 0x0fe0 }, + { 0x8500, 0x03c8, 0x4fe0 }, + { 0x8500, 0x03c4, 0x3fe0 }, + { 0x8500, 0x03c2, 0x2fe1 }, + { 0x0500, 0x03c1, 0x0fe0 }, + { 0x0500, 0x03c3, 0x0fe0 }, + { 0x8500, 0x03c6, 0x2fe0 }, + { 0x0500, 0x03c5, 0x0fe0 }, + { 0x0500, 0x03c7, 0x0fe0 }, + { 0x8500, 0x03cc, 0x3fc0 }, + { 0x8500, 0x03ca, 0x2fe0 }, + { 0x0500, 0x03c9, 0x0fe0 }, + { 0x0500, 0x03cb, 0x0fe0 }, + { 0x8500, 0x03ce, 0x2fc1 }, + { 0x0500, 0x03cd, 0x0fc1 }, + { 0x0500, 0x03d0, 0x0fc2 }, + { 0x8500, 0x03e1, 0x5fff }, + { 0x8500, 0x03d9, 0x4fff }, + { 0x8500, 0x03d5, 0x3fd1 }, + { 0x8900, 0x03d3, 0x2000 }, + { 0x0900, 0x03d2, 0x0000 }, + { 0x0900, 0x03d4, 0x0000 }, + { 0x8500, 0x03d7, 0x2000 }, + { 0x0500, 0x03d6, 0x0fca }, + { 0x0900, 0x03d8, 0x0001 }, + { 0x8500, 0x03dd, 0x3fff }, + { 0x8500, 0x03db, 0x2fff }, + { 0x0900, 0x03da, 0x0001 }, + { 0x0900, 0x03dc, 0x0001 }, + { 0x8500, 0x03df, 0x2fff }, + { 0x0900, 0x03de, 0x0001 }, + { 0x0900, 0x03e0, 0x0001 }, + { 0x8500, 0x03e9, 0x4fff }, + { 0x8500, 0x03e5, 0x3fff }, + { 0x8500, 0x03e3, 0x2fff }, + { 0x0900, 0x03e2, 0x0001 }, + { 0x0900, 0x03e4, 0x0001 }, + { 0x8500, 0x03e7, 0x2fff }, + { 0x0900, 0x03e6, 0x0001 }, + { 0x0900, 0x03e8, 0x0001 }, + { 0x8500, 0x03ed, 0x3fff }, + { 0x8500, 0x03eb, 0x2fff }, + { 0x0900, 0x03ea, 0x0001 }, + { 0x0900, 0x03ec, 0x0001 }, + { 0x8500, 0x03ef, 0x2fff }, + { 0x0900, 0x03ee, 0x0001 }, + { 0x0500, 0x03f0, 0x0faa }, + { 0x8900, 0x0415, 0x6020 }, + { 0x8900, 0x0405, 0x5050 }, + { 0x8900, 0x03f9, 0x4ff9 }, + { 0x8500, 0x03f5, 0x3fa0 }, + { 0x8500, 0x03f3, 0x2000 }, + { 0x0500, 0x03f2, 0x0007 }, + { 0x0900, 0x03f4, 0x0fc4 }, + { 0x8900, 0x03f7, 0x2001 }, + { 0x1900, 0x03f6, 0x0000 }, + { 0x0500, 0x03f8, 0x0fff }, + { 0x8900, 0x0401, 0x3050 }, + { 0x8500, 0x03fb, 0x2fff }, + { 0x0900, 0x03fa, 0x0001 }, + { 0x0900, 0x0400, 0x0050 }, + { 0x8900, 0x0403, 0x2050 }, + { 0x0900, 0x0402, 0x0050 }, + { 0x0900, 0x0404, 0x0050 }, + { 0x8900, 0x040d, 0x4050 }, + { 0x8900, 0x0409, 0x3050 }, + { 0x8900, 0x0407, 0x2050 }, + { 0x0900, 0x0406, 0x0050 }, + { 0x0900, 0x0408, 0x0050 }, + { 0x8900, 0x040b, 0x2050 }, + { 0x0900, 0x040a, 0x0050 }, + { 0x0900, 0x040c, 0x0050 }, + { 0x8900, 0x0411, 0x3020 }, + { 0x8900, 0x040f, 0x2050 }, + { 0x0900, 0x040e, 0x0050 }, + { 0x0900, 0x0410, 0x0020 }, + { 0x8900, 0x0413, 0x2020 }, + { 0x0900, 0x0412, 0x0020 }, + { 0x0900, 0x0414, 0x0020 }, + { 0x8900, 0x0425, 0x5020 }, + { 0x8900, 0x041d, 0x4020 }, + { 0x8900, 0x0419, 0x3020 }, + { 0x8900, 0x0417, 0x2020 }, + { 0x0900, 0x0416, 0x0020 }, + { 0x0900, 0x0418, 0x0020 }, + { 0x8900, 0x041b, 0x2020 }, + { 0x0900, 0x041a, 0x0020 }, + { 0x0900, 0x041c, 0x0020 }, + { 0x8900, 0x0421, 0x3020 }, + { 0x8900, 0x041f, 0x2020 }, + { 0x0900, 0x041e, 0x0020 }, + { 0x0900, 0x0420, 0x0020 }, + { 0x8900, 0x0423, 0x2020 }, + { 0x0900, 0x0422, 0x0020 }, + { 0x0900, 0x0424, 0x0020 }, + { 0x8900, 0x042d, 0x4020 }, + { 0x8900, 0x0429, 0x3020 }, + { 0x8900, 0x0427, 0x2020 }, + { 0x0900, 0x0426, 0x0020 }, + { 0x0900, 0x0428, 0x0020 }, + { 0x8900, 0x042b, 0x2020 }, + { 0x0900, 0x042a, 0x0020 }, + { 0x0900, 0x042c, 0x0020 }, + { 0x8500, 0x0431, 0x3fe0 }, + { 0x8900, 0x042f, 0x2020 }, + { 0x0900, 0x042e, 0x0020 }, + { 0x0500, 0x0430, 0x0fe0 }, + { 0x8500, 0x0433, 0x2fe0 }, + { 0x0500, 0x0432, 0x0fe0 }, + { 0x0500, 0x0434, 0x0fe0 }, + { 0x8700, 0x06a4, 0xa000 }, + { 0x8500, 0x0563, 0x9fd0 }, + { 0x8900, 0x04b6, 0x8001 }, + { 0x8500, 0x0475, 0x7fff }, + { 0x8500, 0x0455, 0x6fb0 }, + { 0x8500, 0x0445, 0x5fe0 }, + { 0x8500, 0x043d, 0x4fe0 }, + { 0x8500, 0x0439, 0x3fe0 }, + { 0x8500, 0x0437, 0x2fe0 }, + { 0x0500, 0x0436, 0x0fe0 }, + { 0x0500, 0x0438, 0x0fe0 }, + { 0x8500, 0x043b, 0x2fe0 }, + { 0x0500, 0x043a, 0x0fe0 }, + { 0x0500, 0x043c, 0x0fe0 }, + { 0x8500, 0x0441, 0x3fe0 }, + { 0x8500, 0x043f, 0x2fe0 }, + { 0x0500, 0x043e, 0x0fe0 }, + { 0x0500, 0x0440, 0x0fe0 }, + { 0x8500, 0x0443, 0x2fe0 }, + { 0x0500, 0x0442, 0x0fe0 }, + { 0x0500, 0x0444, 0x0fe0 }, + { 0x8500, 0x044d, 0x4fe0 }, + { 0x8500, 0x0449, 0x3fe0 }, + { 0x8500, 0x0447, 0x2fe0 }, + { 0x0500, 0x0446, 0x0fe0 }, + { 0x0500, 0x0448, 0x0fe0 }, + { 0x8500, 0x044b, 0x2fe0 }, + { 0x0500, 0x044a, 0x0fe0 }, + { 0x0500, 0x044c, 0x0fe0 }, + { 0x8500, 0x0451, 0x3fb0 }, + { 0x8500, 0x044f, 0x2fe0 }, + { 0x0500, 0x044e, 0x0fe0 }, + { 0x0500, 0x0450, 0x0fb0 }, + { 0x8500, 0x0453, 0x2fb0 }, + { 0x0500, 0x0452, 0x0fb0 }, + { 0x0500, 0x0454, 0x0fb0 }, + { 0x8500, 0x0465, 0x5fff }, + { 0x8500, 0x045d, 0x4fb0 }, + { 0x8500, 0x0459, 0x3fb0 }, + { 0x8500, 0x0457, 0x2fb0 }, + { 0x0500, 0x0456, 0x0fb0 }, + { 0x0500, 0x0458, 0x0fb0 }, + { 0x8500, 0x045b, 0x2fb0 }, + { 0x0500, 0x045a, 0x0fb0 }, + { 0x0500, 0x045c, 0x0fb0 }, + { 0x8500, 0x0461, 0x3fff }, + { 0x8500, 0x045f, 0x2fb0 }, + { 0x0500, 0x045e, 0x0fb0 }, + { 0x0900, 0x0460, 0x0001 }, + { 0x8500, 0x0463, 0x2fff }, + { 0x0900, 0x0462, 0x0001 }, + { 0x0900, 0x0464, 0x0001 }, + { 0x8500, 0x046d, 0x4fff }, + { 0x8500, 0x0469, 0x3fff }, + { 0x8500, 0x0467, 0x2fff }, + { 0x0900, 0x0466, 0x0001 }, + { 0x0900, 0x0468, 0x0001 }, + { 0x8500, 0x046b, 0x2fff }, + { 0x0900, 0x046a, 0x0001 }, + { 0x0900, 0x046c, 0x0001 }, + { 0x8500, 0x0471, 0x3fff }, + { 0x8500, 0x046f, 0x2fff }, + { 0x0900, 0x046e, 0x0001 }, + { 0x0900, 0x0470, 0x0001 }, + { 0x8500, 0x0473, 0x2fff }, + { 0x0900, 0x0472, 0x0001 }, + { 0x0900, 0x0474, 0x0001 }, + { 0x8900, 0x0496, 0x6001 }, + { 0x8c00, 0x0485, 0x5000 }, + { 0x8500, 0x047d, 0x4fff }, + { 0x8500, 0x0479, 0x3fff }, + { 0x8500, 0x0477, 0x2fff }, + { 0x0900, 0x0476, 0x0001 }, + { 0x0900, 0x0478, 0x0001 }, + { 0x8500, 0x047b, 0x2fff }, + { 0x0900, 0x047a, 0x0001 }, + { 0x0900, 0x047c, 0x0001 }, + { 0x8500, 0x0481, 0x3fff }, + { 0x8500, 0x047f, 0x2fff }, + { 0x0900, 0x047e, 0x0001 }, + { 0x0900, 0x0480, 0x0001 }, + { 0x8c00, 0x0483, 0x2000 }, + { 0x1a00, 0x0482, 0x0000 }, + { 0x0c00, 0x0484, 0x0000 }, + { 0x8900, 0x048e, 0x4001 }, + { 0x8900, 0x048a, 0x3001 }, + { 0x8b00, 0x0488, 0x2000 }, + { 0x0c00, 0x0486, 0x0000 }, + { 0x0b00, 0x0489, 0x0000 }, + { 0x8900, 0x048c, 0x2001 }, + { 0x0500, 0x048b, 0x0fff }, + { 0x0500, 0x048d, 0x0fff }, + { 0x8900, 0x0492, 0x3001 }, + { 0x8900, 0x0490, 0x2001 }, + { 0x0500, 0x048f, 0x0fff }, + { 0x0500, 0x0491, 0x0fff }, + { 0x8900, 0x0494, 0x2001 }, + { 0x0500, 0x0493, 0x0fff }, + { 0x0500, 0x0495, 0x0fff }, + { 0x8900, 0x04a6, 0x5001 }, + { 0x8900, 0x049e, 0x4001 }, + { 0x8900, 0x049a, 0x3001 }, + { 0x8900, 0x0498, 0x2001 }, + { 0x0500, 0x0497, 0x0fff }, + { 0x0500, 0x0499, 0x0fff }, + { 0x8900, 0x049c, 0x2001 }, + { 0x0500, 0x049b, 0x0fff }, + { 0x0500, 0x049d, 0x0fff }, + { 0x8900, 0x04a2, 0x3001 }, + { 0x8900, 0x04a0, 0x2001 }, + { 0x0500, 0x049f, 0x0fff }, + { 0x0500, 0x04a1, 0x0fff }, + { 0x8900, 0x04a4, 0x2001 }, + { 0x0500, 0x04a3, 0x0fff }, + { 0x0500, 0x04a5, 0x0fff }, + { 0x8900, 0x04ae, 0x4001 }, + { 0x8900, 0x04aa, 0x3001 }, + { 0x8900, 0x04a8, 0x2001 }, + { 0x0500, 0x04a7, 0x0fff }, + { 0x0500, 0x04a9, 0x0fff }, + { 0x8900, 0x04ac, 0x2001 }, + { 0x0500, 0x04ab, 0x0fff }, + { 0x0500, 0x04ad, 0x0fff }, + { 0x8900, 0x04b2, 0x3001 }, + { 0x8900, 0x04b0, 0x2001 }, + { 0x0500, 0x04af, 0x0fff }, + { 0x0500, 0x04b1, 0x0fff }, + { 0x8900, 0x04b4, 0x2001 }, + { 0x0500, 0x04b3, 0x0fff }, + { 0x0500, 0x04b5, 0x0fff }, + { 0x8500, 0x04f9, 0x7fff }, + { 0x8500, 0x04d7, 0x6fff }, + { 0x8500, 0x04c6, 0x5fff }, + { 0x8900, 0x04be, 0x4001 }, + { 0x8900, 0x04ba, 0x3001 }, + { 0x8900, 0x04b8, 0x2001 }, + { 0x0500, 0x04b7, 0x0fff }, + { 0x0500, 0x04b9, 0x0fff }, + { 0x8900, 0x04bc, 0x2001 }, + { 0x0500, 0x04bb, 0x0fff }, + { 0x0500, 0x04bd, 0x0fff }, + { 0x8500, 0x04c2, 0x3fff }, + { 0x8900, 0x04c0, 0x2000 }, + { 0x0500, 0x04bf, 0x0fff }, + { 0x0900, 0x04c1, 0x0001 }, + { 0x8500, 0x04c4, 0x2fff }, + { 0x0900, 0x04c3, 0x0001 }, + { 0x0900, 0x04c5, 0x0001 }, + { 0x8500, 0x04ce, 0x4fff }, + { 0x8500, 0x04ca, 0x3fff }, + { 0x8500, 0x04c8, 0x2fff }, + { 0x0900, 0x04c7, 0x0001 }, + { 0x0900, 0x04c9, 0x0001 }, + { 0x8500, 0x04cc, 0x2fff }, + { 0x0900, 0x04cb, 0x0001 }, + { 0x0900, 0x04cd, 0x0001 }, + { 0x8500, 0x04d3, 0x3fff }, + { 0x8500, 0x04d1, 0x2fff }, + { 0x0900, 0x04d0, 0x0001 }, + { 0x0900, 0x04d2, 0x0001 }, + { 0x8500, 0x04d5, 0x2fff }, + { 0x0900, 0x04d4, 0x0001 }, + { 0x0900, 0x04d6, 0x0001 }, + { 0x8500, 0x04e7, 0x5fff }, + { 0x8500, 0x04df, 0x4fff }, + { 0x8500, 0x04db, 0x3fff }, + { 0x8500, 0x04d9, 0x2fff }, + { 0x0900, 0x04d8, 0x0001 }, + { 0x0900, 0x04da, 0x0001 }, + { 0x8500, 0x04dd, 0x2fff }, + { 0x0900, 0x04dc, 0x0001 }, + { 0x0900, 0x04de, 0x0001 }, + { 0x8500, 0x04e3, 0x3fff }, + { 0x8500, 0x04e1, 0x2fff }, + { 0x0900, 0x04e0, 0x0001 }, + { 0x0900, 0x04e2, 0x0001 }, + { 0x8500, 0x04e5, 0x2fff }, + { 0x0900, 0x04e4, 0x0001 }, + { 0x0900, 0x04e6, 0x0001 }, + { 0x8500, 0x04ef, 0x4fff }, + { 0x8500, 0x04eb, 0x3fff }, + { 0x8500, 0x04e9, 0x2fff }, + { 0x0900, 0x04e8, 0x0001 }, + { 0x0900, 0x04ea, 0x0001 }, + { 0x8500, 0x04ed, 0x2fff }, + { 0x0900, 0x04ec, 0x0001 }, + { 0x0900, 0x04ee, 0x0001 }, + { 0x8500, 0x04f3, 0x3fff }, + { 0x8500, 0x04f1, 0x2fff }, + { 0x0900, 0x04f0, 0x0001 }, + { 0x0900, 0x04f2, 0x0001 }, + { 0x8500, 0x04f5, 0x2fff }, + { 0x0900, 0x04f4, 0x0001 }, + { 0x0900, 0x04f8, 0x0001 }, + { 0x8900, 0x0540, 0x6030 }, + { 0x8500, 0x050f, 0x5fff }, + { 0x8500, 0x0507, 0x4fff }, + { 0x8500, 0x0503, 0x3fff }, + { 0x8500, 0x0501, 0x2fff }, + { 0x0900, 0x0500, 0x0001 }, + { 0x0900, 0x0502, 0x0001 }, + { 0x8500, 0x0505, 0x2fff }, + { 0x0900, 0x0504, 0x0001 }, + { 0x0900, 0x0506, 0x0001 }, + { 0x8500, 0x050b, 0x3fff }, + { 0x8500, 0x0509, 0x2fff }, + { 0x0900, 0x0508, 0x0001 }, + { 0x0900, 0x050a, 0x0001 }, + { 0x8500, 0x050d, 0x2fff }, + { 0x0900, 0x050c, 0x0001 }, + { 0x0900, 0x050e, 0x0001 }, + { 0x8900, 0x0538, 0x4030 }, + { 0x8900, 0x0534, 0x3030 }, + { 0x8900, 0x0532, 0x2030 }, + { 0x0900, 0x0531, 0x0030 }, + { 0x0900, 0x0533, 0x0030 }, + { 0x8900, 0x0536, 0x2030 }, + { 0x0900, 0x0535, 0x0030 }, + { 0x0900, 0x0537, 0x0030 }, + { 0x8900, 0x053c, 0x3030 }, + { 0x8900, 0x053a, 0x2030 }, + { 0x0900, 0x0539, 0x0030 }, + { 0x0900, 0x053b, 0x0030 }, + { 0x8900, 0x053e, 0x2030 }, + { 0x0900, 0x053d, 0x0030 }, + { 0x0900, 0x053f, 0x0030 }, + { 0x8900, 0x0550, 0x5030 }, + { 0x8900, 0x0548, 0x4030 }, + { 0x8900, 0x0544, 0x3030 }, + { 0x8900, 0x0542, 0x2030 }, + { 0x0900, 0x0541, 0x0030 }, + { 0x0900, 0x0543, 0x0030 }, + { 0x8900, 0x0546, 0x2030 }, + { 0x0900, 0x0545, 0x0030 }, + { 0x0900, 0x0547, 0x0030 }, + { 0x8900, 0x054c, 0x3030 }, + { 0x8900, 0x054a, 0x2030 }, + { 0x0900, 0x0549, 0x0030 }, + { 0x0900, 0x054b, 0x0030 }, + { 0x8900, 0x054e, 0x2030 }, + { 0x0900, 0x054d, 0x0030 }, + { 0x0900, 0x054f, 0x0030 }, + { 0x9500, 0x055a, 0x4000 }, + { 0x8900, 0x0554, 0x3030 }, + { 0x8900, 0x0552, 0x2030 }, + { 0x0900, 0x0551, 0x0030 }, + { 0x0900, 0x0553, 0x0030 }, + { 0x8900, 0x0556, 0x2030 }, + { 0x0900, 0x0555, 0x0030 }, + { 0x0600, 0x0559, 0x0000 }, + { 0x9500, 0x055e, 0x3000 }, + { 0x9500, 0x055c, 0x2000 }, + { 0x1500, 0x055b, 0x0000 }, + { 0x1500, 0x055d, 0x0000 }, + { 0x8500, 0x0561, 0x2fd0 }, + { 0x1500, 0x055f, 0x0000 }, + { 0x0500, 0x0562, 0x0fd0 }, + { 0x9a00, 0x060f, 0x8000 }, + { 0x8c00, 0x05ab, 0x7000 }, + { 0x8500, 0x0583, 0x6fd0 }, + { 0x8500, 0x0573, 0x5fd0 }, + { 0x8500, 0x056b, 0x4fd0 }, + { 0x8500, 0x0567, 0x3fd0 }, + { 0x8500, 0x0565, 0x2fd0 }, + { 0x0500, 0x0564, 0x0fd0 }, + { 0x0500, 0x0566, 0x0fd0 }, + { 0x8500, 0x0569, 0x2fd0 }, + { 0x0500, 0x0568, 0x0fd0 }, + { 0x0500, 0x056a, 0x0fd0 }, + { 0x8500, 0x056f, 0x3fd0 }, + { 0x8500, 0x056d, 0x2fd0 }, + { 0x0500, 0x056c, 0x0fd0 }, + { 0x0500, 0x056e, 0x0fd0 }, + { 0x8500, 0x0571, 0x2fd0 }, + { 0x0500, 0x0570, 0x0fd0 }, + { 0x0500, 0x0572, 0x0fd0 }, + { 0x8500, 0x057b, 0x4fd0 }, + { 0x8500, 0x0577, 0x3fd0 }, + { 0x8500, 0x0575, 0x2fd0 }, + { 0x0500, 0x0574, 0x0fd0 }, + { 0x0500, 0x0576, 0x0fd0 }, + { 0x8500, 0x0579, 0x2fd0 }, + { 0x0500, 0x0578, 0x0fd0 }, + { 0x0500, 0x057a, 0x0fd0 }, + { 0x8500, 0x057f, 0x3fd0 }, + { 0x8500, 0x057d, 0x2fd0 }, + { 0x0500, 0x057c, 0x0fd0 }, + { 0x0500, 0x057e, 0x0fd0 }, + { 0x8500, 0x0581, 0x2fd0 }, + { 0x0500, 0x0580, 0x0fd0 }, + { 0x0500, 0x0582, 0x0fd0 }, + { 0x8c00, 0x059a, 0x5000 }, + { 0x8c00, 0x0592, 0x4000 }, + { 0x8500, 0x0587, 0x3000 }, + { 0x8500, 0x0585, 0x2fd0 }, + { 0x0500, 0x0584, 0x0fd0 }, + { 0x0500, 0x0586, 0x0fd0 }, + { 0x9100, 0x058a, 0x2000 }, + { 0x1500, 0x0589, 0x0000 }, + { 0x0c00, 0x0591, 0x0000 }, + { 0x8c00, 0x0596, 0x3000 }, + { 0x8c00, 0x0594, 0x2000 }, + { 0x0c00, 0x0593, 0x0000 }, + { 0x0c00, 0x0595, 0x0000 }, + { 0x8c00, 0x0598, 0x2000 }, + { 0x0c00, 0x0597, 0x0000 }, + { 0x0c00, 0x0599, 0x0000 }, + { 0x8c00, 0x05a3, 0x4000 }, + { 0x8c00, 0x059e, 0x3000 }, + { 0x8c00, 0x059c, 0x2000 }, + { 0x0c00, 0x059b, 0x0000 }, + { 0x0c00, 0x059d, 0x0000 }, + { 0x8c00, 0x05a0, 0x2000 }, + { 0x0c00, 0x059f, 0x0000 }, + { 0x0c00, 0x05a1, 0x0000 }, + { 0x8c00, 0x05a7, 0x3000 }, + { 0x8c00, 0x05a5, 0x2000 }, + { 0x0c00, 0x05a4, 0x0000 }, + { 0x0c00, 0x05a6, 0x0000 }, + { 0x8c00, 0x05a9, 0x2000 }, + { 0x0c00, 0x05a8, 0x0000 }, + { 0x0c00, 0x05aa, 0x0000 }, + { 0x8700, 0x05d7, 0x6000 }, + { 0x8c00, 0x05bc, 0x5000 }, + { 0x8c00, 0x05b3, 0x4000 }, + { 0x8c00, 0x05af, 0x3000 }, + { 0x8c00, 0x05ad, 0x2000 }, + { 0x0c00, 0x05ac, 0x0000 }, + { 0x0c00, 0x05ae, 0x0000 }, + { 0x8c00, 0x05b1, 0x2000 }, + { 0x0c00, 0x05b0, 0x0000 }, + { 0x0c00, 0x05b2, 0x0000 }, + { 0x8c00, 0x05b7, 0x3000 }, + { 0x8c00, 0x05b5, 0x2000 }, + { 0x0c00, 0x05b4, 0x0000 }, + { 0x0c00, 0x05b6, 0x0000 }, + { 0x8c00, 0x05b9, 0x2000 }, + { 0x0c00, 0x05b8, 0x0000 }, + { 0x0c00, 0x05bb, 0x0000 }, + { 0x8c00, 0x05c4, 0x4000 }, + { 0x9500, 0x05c0, 0x3000 }, + { 0x9500, 0x05be, 0x2000 }, + { 0x0c00, 0x05bd, 0x0000 }, + { 0x0c00, 0x05bf, 0x0000 }, + { 0x8c00, 0x05c2, 0x2000 }, + { 0x0c00, 0x05c1, 0x0000 }, + { 0x1500, 0x05c3, 0x0000 }, + { 0x8700, 0x05d3, 0x3000 }, + { 0x8700, 0x05d1, 0x2000 }, + { 0x0700, 0x05d0, 0x0000 }, + { 0x0700, 0x05d2, 0x0000 }, + { 0x8700, 0x05d5, 0x2000 }, + { 0x0700, 0x05d4, 0x0000 }, + { 0x0700, 0x05d6, 0x0000 }, + { 0x8700, 0x05e7, 0x5000 }, + { 0x8700, 0x05df, 0x4000 }, + { 0x8700, 0x05db, 0x3000 }, + { 0x8700, 0x05d9, 0x2000 }, + { 0x0700, 0x05d8, 0x0000 }, + { 0x0700, 0x05da, 0x0000 }, + { 0x8700, 0x05dd, 0x2000 }, + { 0x0700, 0x05dc, 0x0000 }, + { 0x0700, 0x05de, 0x0000 }, + { 0x8700, 0x05e3, 0x3000 }, + { 0x8700, 0x05e1, 0x2000 }, + { 0x0700, 0x05e0, 0x0000 }, + { 0x0700, 0x05e2, 0x0000 }, + { 0x8700, 0x05e5, 0x2000 }, + { 0x0700, 0x05e4, 0x0000 }, + { 0x0700, 0x05e6, 0x0000 }, + { 0x9500, 0x05f4, 0x4000 }, + { 0x8700, 0x05f0, 0x3000 }, + { 0x8700, 0x05e9, 0x2000 }, + { 0x0700, 0x05e8, 0x0000 }, + { 0x0700, 0x05ea, 0x0000 }, + { 0x8700, 0x05f2, 0x2000 }, + { 0x0700, 0x05f1, 0x0000 }, + { 0x1500, 0x05f3, 0x0000 }, + { 0x8100, 0x0603, 0x3000 }, + { 0x8100, 0x0601, 0x2000 }, + { 0x0100, 0x0600, 0x0000 }, + { 0x0100, 0x0602, 0x0000 }, + { 0x9500, 0x060d, 0x2000 }, + { 0x1500, 0x060c, 0x0000 }, + { 0x1a00, 0x060e, 0x0000 }, + { 0x8d00, 0x0664, 0x7000 }, + { 0x8700, 0x0638, 0x6000 }, + { 0x8700, 0x0628, 0x5000 }, + { 0x9500, 0x061f, 0x4000 }, + { 0x8c00, 0x0613, 0x3000 }, + { 0x8c00, 0x0611, 0x2000 }, + { 0x0c00, 0x0610, 0x0000 }, + { 0x0c00, 0x0612, 0x0000 }, + { 0x8c00, 0x0615, 0x2000 }, + { 0x0c00, 0x0614, 0x0000 }, + { 0x1500, 0x061b, 0x0000 }, + { 0x8700, 0x0624, 0x3000 }, + { 0x8700, 0x0622, 0x2000 }, + { 0x0700, 0x0621, 0x0000 }, + { 0x0700, 0x0623, 0x0000 }, + { 0x8700, 0x0626, 0x2000 }, + { 0x0700, 0x0625, 0x0000 }, + { 0x0700, 0x0627, 0x0000 }, + { 0x8700, 0x0630, 0x4000 }, + { 0x8700, 0x062c, 0x3000 }, + { 0x8700, 0x062a, 0x2000 }, + { 0x0700, 0x0629, 0x0000 }, + { 0x0700, 0x062b, 0x0000 }, + { 0x8700, 0x062e, 0x2000 }, + { 0x0700, 0x062d, 0x0000 }, + { 0x0700, 0x062f, 0x0000 }, + { 0x8700, 0x0634, 0x3000 }, + { 0x8700, 0x0632, 0x2000 }, + { 0x0700, 0x0631, 0x0000 }, + { 0x0700, 0x0633, 0x0000 }, + { 0x8700, 0x0636, 0x2000 }, + { 0x0700, 0x0635, 0x0000 }, + { 0x0700, 0x0637, 0x0000 }, + { 0x8c00, 0x064d, 0x5000 }, + { 0x8700, 0x0645, 0x4000 }, + { 0x8700, 0x0641, 0x3000 }, + { 0x8700, 0x063a, 0x2000 }, + { 0x0700, 0x0639, 0x0000 }, + { 0x0600, 0x0640, 0x0000 }, + { 0x8700, 0x0643, 0x2000 }, + { 0x0700, 0x0642, 0x0000 }, + { 0x0700, 0x0644, 0x0000 }, + { 0x8700, 0x0649, 0x3000 }, + { 0x8700, 0x0647, 0x2000 }, + { 0x0700, 0x0646, 0x0000 }, + { 0x0700, 0x0648, 0x0000 }, + { 0x8c00, 0x064b, 0x2000 }, + { 0x0700, 0x064a, 0x0000 }, + { 0x0c00, 0x064c, 0x0000 }, + { 0x8c00, 0x0655, 0x4000 }, + { 0x8c00, 0x0651, 0x3000 }, + { 0x8c00, 0x064f, 0x2000 }, + { 0x0c00, 0x064e, 0x0000 }, + { 0x0c00, 0x0650, 0x0000 }, + { 0x8c00, 0x0653, 0x2000 }, + { 0x0c00, 0x0652, 0x0000 }, + { 0x0c00, 0x0654, 0x0000 }, + { 0x8d00, 0x0660, 0x3000 }, + { 0x8c00, 0x0657, 0x2000 }, + { 0x0c00, 0x0656, 0x0000 }, + { 0x0c00, 0x0658, 0x0000 }, + { 0x8d00, 0x0662, 0x2000 }, + { 0x0d00, 0x0661, 0x0000 }, + { 0x0d00, 0x0663, 0x0000 }, + { 0x8700, 0x0684, 0x6000 }, + { 0x8700, 0x0674, 0x5000 }, + { 0x9500, 0x066c, 0x4000 }, + { 0x8d00, 0x0668, 0x3000 }, + { 0x8d00, 0x0666, 0x2000 }, + { 0x0d00, 0x0665, 0x0000 }, + { 0x0d00, 0x0667, 0x0000 }, + { 0x9500, 0x066a, 0x2000 }, + { 0x0d00, 0x0669, 0x0000 }, + { 0x1500, 0x066b, 0x0000 }, + { 0x8c00, 0x0670, 0x3000 }, + { 0x8700, 0x066e, 0x2000 }, + { 0x1500, 0x066d, 0x0000 }, + { 0x0700, 0x066f, 0x0000 }, + { 0x8700, 0x0672, 0x2000 }, + { 0x0700, 0x0671, 0x0000 }, + { 0x0700, 0x0673, 0x0000 }, + { 0x8700, 0x067c, 0x4000 }, + { 0x8700, 0x0678, 0x3000 }, + { 0x8700, 0x0676, 0x2000 }, + { 0x0700, 0x0675, 0x0000 }, + { 0x0700, 0x0677, 0x0000 }, + { 0x8700, 0x067a, 0x2000 }, + { 0x0700, 0x0679, 0x0000 }, + { 0x0700, 0x067b, 0x0000 }, + { 0x8700, 0x0680, 0x3000 }, + { 0x8700, 0x067e, 0x2000 }, + { 0x0700, 0x067d, 0x0000 }, + { 0x0700, 0x067f, 0x0000 }, + { 0x8700, 0x0682, 0x2000 }, + { 0x0700, 0x0681, 0x0000 }, + { 0x0700, 0x0683, 0x0000 }, + { 0x8700, 0x0694, 0x5000 }, + { 0x8700, 0x068c, 0x4000 }, + { 0x8700, 0x0688, 0x3000 }, + { 0x8700, 0x0686, 0x2000 }, + { 0x0700, 0x0685, 0x0000 }, + { 0x0700, 0x0687, 0x0000 }, + { 0x8700, 0x068a, 0x2000 }, + { 0x0700, 0x0689, 0x0000 }, + { 0x0700, 0x068b, 0x0000 }, + { 0x8700, 0x0690, 0x3000 }, + { 0x8700, 0x068e, 0x2000 }, + { 0x0700, 0x068d, 0x0000 }, + { 0x0700, 0x068f, 0x0000 }, + { 0x8700, 0x0692, 0x2000 }, + { 0x0700, 0x0691, 0x0000 }, + { 0x0700, 0x0693, 0x0000 }, + { 0x8700, 0x069c, 0x4000 }, + { 0x8700, 0x0698, 0x3000 }, + { 0x8700, 0x0696, 0x2000 }, + { 0x0700, 0x0695, 0x0000 }, + { 0x0700, 0x0697, 0x0000 }, + { 0x8700, 0x069a, 0x2000 }, + { 0x0700, 0x0699, 0x0000 }, + { 0x0700, 0x069b, 0x0000 }, + { 0x8700, 0x06a0, 0x3000 }, + { 0x8700, 0x069e, 0x2000 }, + { 0x0700, 0x069d, 0x0000 }, + { 0x0700, 0x069f, 0x0000 }, + { 0x8700, 0x06a2, 0x2000 }, + { 0x0700, 0x06a1, 0x0000 }, + { 0x0700, 0x06a3, 0x0000 }, + { 0x8700, 0x0926, 0x9000 }, + { 0x8700, 0x0725, 0x8000 }, + { 0x8c00, 0x06e4, 0x7000 }, + { 0x8700, 0x06c4, 0x6000 }, + { 0x8700, 0x06b4, 0x5000 }, + { 0x8700, 0x06ac, 0x4000 }, + { 0x8700, 0x06a8, 0x3000 }, + { 0x8700, 0x06a6, 0x2000 }, + { 0x0700, 0x06a5, 0x0000 }, + { 0x0700, 0x06a7, 0x0000 }, + { 0x8700, 0x06aa, 0x2000 }, + { 0x0700, 0x06a9, 0x0000 }, + { 0x0700, 0x06ab, 0x0000 }, + { 0x8700, 0x06b0, 0x3000 }, + { 0x8700, 0x06ae, 0x2000 }, + { 0x0700, 0x06ad, 0x0000 }, + { 0x0700, 0x06af, 0x0000 }, + { 0x8700, 0x06b2, 0x2000 }, + { 0x0700, 0x06b1, 0x0000 }, + { 0x0700, 0x06b3, 0x0000 }, + { 0x8700, 0x06bc, 0x4000 }, + { 0x8700, 0x06b8, 0x3000 }, + { 0x8700, 0x06b6, 0x2000 }, + { 0x0700, 0x06b5, 0x0000 }, + { 0x0700, 0x06b7, 0x0000 }, + { 0x8700, 0x06ba, 0x2000 }, + { 0x0700, 0x06b9, 0x0000 }, + { 0x0700, 0x06bb, 0x0000 }, + { 0x8700, 0x06c0, 0x3000 }, + { 0x8700, 0x06be, 0x2000 }, + { 0x0700, 0x06bd, 0x0000 }, + { 0x0700, 0x06bf, 0x0000 }, + { 0x8700, 0x06c2, 0x2000 }, + { 0x0700, 0x06c1, 0x0000 }, + { 0x0700, 0x06c3, 0x0000 }, + { 0x9500, 0x06d4, 0x5000 }, + { 0x8700, 0x06cc, 0x4000 }, + { 0x8700, 0x06c8, 0x3000 }, + { 0x8700, 0x06c6, 0x2000 }, + { 0x0700, 0x06c5, 0x0000 }, + { 0x0700, 0x06c7, 0x0000 }, + { 0x8700, 0x06ca, 0x2000 }, + { 0x0700, 0x06c9, 0x0000 }, + { 0x0700, 0x06cb, 0x0000 }, + { 0x8700, 0x06d0, 0x3000 }, + { 0x8700, 0x06ce, 0x2000 }, + { 0x0700, 0x06cd, 0x0000 }, + { 0x0700, 0x06cf, 0x0000 }, + { 0x8700, 0x06d2, 0x2000 }, + { 0x0700, 0x06d1, 0x0000 }, + { 0x0700, 0x06d3, 0x0000 }, + { 0x8c00, 0x06dc, 0x4000 }, + { 0x8c00, 0x06d8, 0x3000 }, + { 0x8c00, 0x06d6, 0x2000 }, + { 0x0700, 0x06d5, 0x0000 }, + { 0x0c00, 0x06d7, 0x0000 }, + { 0x8c00, 0x06da, 0x2000 }, + { 0x0c00, 0x06d9, 0x0000 }, + { 0x0c00, 0x06db, 0x0000 }, + { 0x8c00, 0x06e0, 0x3000 }, + { 0x8b00, 0x06de, 0x2000 }, + { 0x0100, 0x06dd, 0x0000 }, + { 0x0c00, 0x06df, 0x0000 }, + { 0x8c00, 0x06e2, 0x2000 }, + { 0x0c00, 0x06e1, 0x0000 }, + { 0x0c00, 0x06e3, 0x0000 }, + { 0x9500, 0x0704, 0x6000 }, + { 0x8d00, 0x06f4, 0x5000 }, + { 0x8c00, 0x06ec, 0x4000 }, + { 0x8c00, 0x06e8, 0x3000 }, + { 0x8600, 0x06e6, 0x2000 }, + { 0x0600, 0x06e5, 0x0000 }, + { 0x0c00, 0x06e7, 0x0000 }, + { 0x8c00, 0x06ea, 0x2000 }, + { 0x1a00, 0x06e9, 0x0000 }, + { 0x0c00, 0x06eb, 0x0000 }, + { 0x8d00, 0x06f0, 0x3000 }, + { 0x8700, 0x06ee, 0x2000 }, + { 0x0c00, 0x06ed, 0x0000 }, + { 0x0700, 0x06ef, 0x0000 }, + { 0x8d00, 0x06f2, 0x2000 }, + { 0x0d00, 0x06f1, 0x0000 }, + { 0x0d00, 0x06f3, 0x0000 }, + { 0x8700, 0x06fc, 0x4000 }, + { 0x8d00, 0x06f8, 0x3000 }, + { 0x8d00, 0x06f6, 0x2000 }, + { 0x0d00, 0x06f5, 0x0000 }, + { 0x0d00, 0x06f7, 0x0000 }, + { 0x8700, 0x06fa, 0x2000 }, + { 0x0d00, 0x06f9, 0x0000 }, + { 0x0700, 0x06fb, 0x0000 }, + { 0x9500, 0x0700, 0x3000 }, + { 0x9a00, 0x06fe, 0x2000 }, + { 0x1a00, 0x06fd, 0x0000 }, + { 0x0700, 0x06ff, 0x0000 }, + { 0x9500, 0x0702, 0x2000 }, + { 0x1500, 0x0701, 0x0000 }, + { 0x1500, 0x0703, 0x0000 }, + { 0x8700, 0x0715, 0x5000 }, + { 0x9500, 0x070c, 0x4000 }, + { 0x9500, 0x0708, 0x3000 }, + { 0x9500, 0x0706, 0x2000 }, + { 0x1500, 0x0705, 0x0000 }, + { 0x1500, 0x0707, 0x0000 }, + { 0x9500, 0x070a, 0x2000 }, + { 0x1500, 0x0709, 0x0000 }, + { 0x1500, 0x070b, 0x0000 }, + { 0x8c00, 0x0711, 0x3000 }, + { 0x8100, 0x070f, 0x2000 }, + { 0x1500, 0x070d, 0x0000 }, + { 0x0700, 0x0710, 0x0000 }, + { 0x8700, 0x0713, 0x2000 }, + { 0x0700, 0x0712, 0x0000 }, + { 0x0700, 0x0714, 0x0000 }, + { 0x8700, 0x071d, 0x4000 }, + { 0x8700, 0x0719, 0x3000 }, + { 0x8700, 0x0717, 0x2000 }, + { 0x0700, 0x0716, 0x0000 }, + { 0x0700, 0x0718, 0x0000 }, + { 0x8700, 0x071b, 0x2000 }, + { 0x0700, 0x071a, 0x0000 }, + { 0x0700, 0x071c, 0x0000 }, + { 0x8700, 0x0721, 0x3000 }, + { 0x8700, 0x071f, 0x2000 }, + { 0x0700, 0x071e, 0x0000 }, + { 0x0700, 0x0720, 0x0000 }, + { 0x8700, 0x0723, 0x2000 }, + { 0x0700, 0x0722, 0x0000 }, + { 0x0700, 0x0724, 0x0000 }, + { 0x8700, 0x0797, 0x7000 }, + { 0x8c00, 0x0745, 0x6000 }, + { 0x8c00, 0x0735, 0x5000 }, + { 0x8700, 0x072d, 0x4000 }, + { 0x8700, 0x0729, 0x3000 }, + { 0x8700, 0x0727, 0x2000 }, + { 0x0700, 0x0726, 0x0000 }, + { 0x0700, 0x0728, 0x0000 }, + { 0x8700, 0x072b, 0x2000 }, + { 0x0700, 0x072a, 0x0000 }, + { 0x0700, 0x072c, 0x0000 }, + { 0x8c00, 0x0731, 0x3000 }, + { 0x8700, 0x072f, 0x2000 }, + { 0x0700, 0x072e, 0x0000 }, + { 0x0c00, 0x0730, 0x0000 }, + { 0x8c00, 0x0733, 0x2000 }, + { 0x0c00, 0x0732, 0x0000 }, + { 0x0c00, 0x0734, 0x0000 }, + { 0x8c00, 0x073d, 0x4000 }, + { 0x8c00, 0x0739, 0x3000 }, + { 0x8c00, 0x0737, 0x2000 }, + { 0x0c00, 0x0736, 0x0000 }, + { 0x0c00, 0x0738, 0x0000 }, + { 0x8c00, 0x073b, 0x2000 }, + { 0x0c00, 0x073a, 0x0000 }, + { 0x0c00, 0x073c, 0x0000 }, + { 0x8c00, 0x0741, 0x3000 }, + { 0x8c00, 0x073f, 0x2000 }, + { 0x0c00, 0x073e, 0x0000 }, + { 0x0c00, 0x0740, 0x0000 }, + { 0x8c00, 0x0743, 0x2000 }, + { 0x0c00, 0x0742, 0x0000 }, + { 0x0c00, 0x0744, 0x0000 }, + { 0x8700, 0x0787, 0x5000 }, + { 0x8700, 0x074f, 0x4000 }, + { 0x8c00, 0x0749, 0x3000 }, + { 0x8c00, 0x0747, 0x2000 }, + { 0x0c00, 0x0746, 0x0000 }, + { 0x0c00, 0x0748, 0x0000 }, + { 0x8700, 0x074d, 0x2000 }, + { 0x0c00, 0x074a, 0x0000 }, + { 0x0700, 0x074e, 0x0000 }, + { 0x8700, 0x0783, 0x3000 }, + { 0x8700, 0x0781, 0x2000 }, + { 0x0700, 0x0780, 0x0000 }, + { 0x0700, 0x0782, 0x0000 }, + { 0x8700, 0x0785, 0x2000 }, + { 0x0700, 0x0784, 0x0000 }, + { 0x0700, 0x0786, 0x0000 }, + { 0x8700, 0x078f, 0x4000 }, + { 0x8700, 0x078b, 0x3000 }, + { 0x8700, 0x0789, 0x2000 }, + { 0x0700, 0x0788, 0x0000 }, + { 0x0700, 0x078a, 0x0000 }, + { 0x8700, 0x078d, 0x2000 }, + { 0x0700, 0x078c, 0x0000 }, + { 0x0700, 0x078e, 0x0000 }, + { 0x8700, 0x0793, 0x3000 }, + { 0x8700, 0x0791, 0x2000 }, + { 0x0700, 0x0790, 0x0000 }, + { 0x0700, 0x0792, 0x0000 }, + { 0x8700, 0x0795, 0x2000 }, + { 0x0700, 0x0794, 0x0000 }, + { 0x0700, 0x0796, 0x0000 }, + { 0x8700, 0x0906, 0x6000 }, + { 0x8c00, 0x07a7, 0x5000 }, + { 0x8700, 0x079f, 0x4000 }, + { 0x8700, 0x079b, 0x3000 }, + { 0x8700, 0x0799, 0x2000 }, + { 0x0700, 0x0798, 0x0000 }, + { 0x0700, 0x079a, 0x0000 }, + { 0x8700, 0x079d, 0x2000 }, + { 0x0700, 0x079c, 0x0000 }, + { 0x0700, 0x079e, 0x0000 }, + { 0x8700, 0x07a3, 0x3000 }, + { 0x8700, 0x07a1, 0x2000 }, + { 0x0700, 0x07a0, 0x0000 }, + { 0x0700, 0x07a2, 0x0000 }, + { 0x8700, 0x07a5, 0x2000 }, + { 0x0700, 0x07a4, 0x0000 }, + { 0x0c00, 0x07a6, 0x0000 }, + { 0x8c00, 0x07af, 0x4000 }, + { 0x8c00, 0x07ab, 0x3000 }, + { 0x8c00, 0x07a9, 0x2000 }, + { 0x0c00, 0x07a8, 0x0000 }, + { 0x0c00, 0x07aa, 0x0000 }, + { 0x8c00, 0x07ad, 0x2000 }, + { 0x0c00, 0x07ac, 0x0000 }, + { 0x0c00, 0x07ae, 0x0000 }, + { 0x8c00, 0x0902, 0x3000 }, + { 0x8700, 0x07b1, 0x2000 }, + { 0x0c00, 0x07b0, 0x0000 }, + { 0x0c00, 0x0901, 0x0000 }, + { 0x8700, 0x0904, 0x2000 }, + { 0x0a00, 0x0903, 0x0000 }, + { 0x0700, 0x0905, 0x0000 }, + { 0x8700, 0x0916, 0x5000 }, + { 0x8700, 0x090e, 0x4000 }, + { 0x8700, 0x090a, 0x3000 }, + { 0x8700, 0x0908, 0x2000 }, + { 0x0700, 0x0907, 0x0000 }, + { 0x0700, 0x0909, 0x0000 }, + { 0x8700, 0x090c, 0x2000 }, + { 0x0700, 0x090b, 0x0000 }, + { 0x0700, 0x090d, 0x0000 }, + { 0x8700, 0x0912, 0x3000 }, + { 0x8700, 0x0910, 0x2000 }, + { 0x0700, 0x090f, 0x0000 }, + { 0x0700, 0x0911, 0x0000 }, + { 0x8700, 0x0914, 0x2000 }, + { 0x0700, 0x0913, 0x0000 }, + { 0x0700, 0x0915, 0x0000 }, + { 0x8700, 0x091e, 0x4000 }, + { 0x8700, 0x091a, 0x3000 }, + { 0x8700, 0x0918, 0x2000 }, + { 0x0700, 0x0917, 0x0000 }, + { 0x0700, 0x0919, 0x0000 }, + { 0x8700, 0x091c, 0x2000 }, + { 0x0700, 0x091b, 0x0000 }, + { 0x0700, 0x091d, 0x0000 }, + { 0x8700, 0x0922, 0x3000 }, + { 0x8700, 0x0920, 0x2000 }, + { 0x0700, 0x091f, 0x0000 }, + { 0x0700, 0x0921, 0x0000 }, + { 0x8700, 0x0924, 0x2000 }, + { 0x0700, 0x0923, 0x0000 }, + { 0x0700, 0x0925, 0x0000 }, + { 0x8c00, 0x09cd, 0x8000 }, + { 0x8d00, 0x096d, 0x7000 }, + { 0x8c00, 0x0948, 0x6000 }, + { 0x8700, 0x0936, 0x5000 }, + { 0x8700, 0x092e, 0x4000 }, + { 0x8700, 0x092a, 0x3000 }, + { 0x8700, 0x0928, 0x2000 }, + { 0x0700, 0x0927, 0x0000 }, + { 0x0700, 0x0929, 0x0000 }, + { 0x8700, 0x092c, 0x2000 }, + { 0x0700, 0x092b, 0x0000 }, + { 0x0700, 0x092d, 0x0000 }, + { 0x8700, 0x0932, 0x3000 }, + { 0x8700, 0x0930, 0x2000 }, + { 0x0700, 0x092f, 0x0000 }, + { 0x0700, 0x0931, 0x0000 }, + { 0x8700, 0x0934, 0x2000 }, + { 0x0700, 0x0933, 0x0000 }, + { 0x0700, 0x0935, 0x0000 }, + { 0x8a00, 0x0940, 0x4000 }, + { 0x8c00, 0x093c, 0x3000 }, + { 0x8700, 0x0938, 0x2000 }, + { 0x0700, 0x0937, 0x0000 }, + { 0x0700, 0x0939, 0x0000 }, + { 0x8a00, 0x093e, 0x2000 }, + { 0x0700, 0x093d, 0x0000 }, + { 0x0a00, 0x093f, 0x0000 }, + { 0x8c00, 0x0944, 0x3000 }, + { 0x8c00, 0x0942, 0x2000 }, + { 0x0c00, 0x0941, 0x0000 }, + { 0x0c00, 0x0943, 0x0000 }, + { 0x8c00, 0x0946, 0x2000 }, + { 0x0c00, 0x0945, 0x0000 }, + { 0x0c00, 0x0947, 0x0000 }, + { 0x8700, 0x095d, 0x5000 }, + { 0x8c00, 0x0952, 0x4000 }, + { 0x8a00, 0x094c, 0x3000 }, + { 0x8a00, 0x094a, 0x2000 }, + { 0x0a00, 0x0949, 0x0000 }, + { 0x0a00, 0x094b, 0x0000 }, + { 0x8700, 0x0950, 0x2000 }, + { 0x0c00, 0x094d, 0x0000 }, + { 0x0c00, 0x0951, 0x0000 }, + { 0x8700, 0x0959, 0x3000 }, + { 0x8c00, 0x0954, 0x2000 }, + { 0x0c00, 0x0953, 0x0000 }, + { 0x0700, 0x0958, 0x0000 }, + { 0x8700, 0x095b, 0x2000 }, + { 0x0700, 0x095a, 0x0000 }, + { 0x0700, 0x095c, 0x0000 }, + { 0x9500, 0x0965, 0x4000 }, + { 0x8700, 0x0961, 0x3000 }, + { 0x8700, 0x095f, 0x2000 }, + { 0x0700, 0x095e, 0x0000 }, + { 0x0700, 0x0960, 0x0000 }, + { 0x8c00, 0x0963, 0x2000 }, + { 0x0c00, 0x0962, 0x0000 }, + { 0x1500, 0x0964, 0x0000 }, + { 0x8d00, 0x0969, 0x3000 }, + { 0x8d00, 0x0967, 0x2000 }, + { 0x0d00, 0x0966, 0x0000 }, + { 0x0d00, 0x0968, 0x0000 }, + { 0x8d00, 0x096b, 0x2000 }, + { 0x0d00, 0x096a, 0x0000 }, + { 0x0d00, 0x096c, 0x0000 }, + { 0x8700, 0x09a2, 0x6000 }, + { 0x8700, 0x0990, 0x5000 }, + { 0x8700, 0x0986, 0x4000 }, + { 0x8c00, 0x0981, 0x3000 }, + { 0x8d00, 0x096f, 0x2000 }, + { 0x0d00, 0x096e, 0x0000 }, + { 0x1500, 0x0970, 0x0000 }, + { 0x8a00, 0x0983, 0x2000 }, + { 0x0a00, 0x0982, 0x0000 }, + { 0x0700, 0x0985, 0x0000 }, + { 0x8700, 0x098a, 0x3000 }, + { 0x8700, 0x0988, 0x2000 }, + { 0x0700, 0x0987, 0x0000 }, + { 0x0700, 0x0989, 0x0000 }, + { 0x8700, 0x098c, 0x2000 }, + { 0x0700, 0x098b, 0x0000 }, + { 0x0700, 0x098f, 0x0000 }, + { 0x8700, 0x099a, 0x4000 }, + { 0x8700, 0x0996, 0x3000 }, + { 0x8700, 0x0994, 0x2000 }, + { 0x0700, 0x0993, 0x0000 }, + { 0x0700, 0x0995, 0x0000 }, + { 0x8700, 0x0998, 0x2000 }, + { 0x0700, 0x0997, 0x0000 }, + { 0x0700, 0x0999, 0x0000 }, + { 0x8700, 0x099e, 0x3000 }, + { 0x8700, 0x099c, 0x2000 }, + { 0x0700, 0x099b, 0x0000 }, + { 0x0700, 0x099d, 0x0000 }, + { 0x8700, 0x09a0, 0x2000 }, + { 0x0700, 0x099f, 0x0000 }, + { 0x0700, 0x09a1, 0x0000 }, + { 0x8700, 0x09b7, 0x5000 }, + { 0x8700, 0x09ab, 0x4000 }, + { 0x8700, 0x09a6, 0x3000 }, + { 0x8700, 0x09a4, 0x2000 }, + { 0x0700, 0x09a3, 0x0000 }, + { 0x0700, 0x09a5, 0x0000 }, + { 0x8700, 0x09a8, 0x2000 }, + { 0x0700, 0x09a7, 0x0000 }, + { 0x0700, 0x09aa, 0x0000 }, + { 0x8700, 0x09af, 0x3000 }, + { 0x8700, 0x09ad, 0x2000 }, + { 0x0700, 0x09ac, 0x0000 }, + { 0x0700, 0x09ae, 0x0000 }, + { 0x8700, 0x09b2, 0x2000 }, + { 0x0700, 0x09b0, 0x0000 }, + { 0x0700, 0x09b6, 0x0000 }, + { 0x8c00, 0x09c1, 0x4000 }, + { 0x8700, 0x09bd, 0x3000 }, + { 0x8700, 0x09b9, 0x2000 }, + { 0x0700, 0x09b8, 0x0000 }, + { 0x0c00, 0x09bc, 0x0000 }, + { 0x8a00, 0x09bf, 0x2000 }, + { 0x0a00, 0x09be, 0x0000 }, + { 0x0a00, 0x09c0, 0x0000 }, + { 0x8a00, 0x09c7, 0x3000 }, + { 0x8c00, 0x09c3, 0x2000 }, + { 0x0c00, 0x09c2, 0x0000 }, + { 0x0c00, 0x09c4, 0x0000 }, + { 0x8a00, 0x09cb, 0x2000 }, + { 0x0a00, 0x09c8, 0x0000 }, + { 0x0a00, 0x09cc, 0x0000 }, + { 0x8700, 0x0a2b, 0x7000 }, + { 0x8a00, 0x0a03, 0x6000 }, + { 0x8d00, 0x09ed, 0x5000 }, + { 0x8c00, 0x09e3, 0x4000 }, + { 0x8700, 0x09df, 0x3000 }, + { 0x8700, 0x09dc, 0x2000 }, + { 0x0a00, 0x09d7, 0x0000 }, + { 0x0700, 0x09dd, 0x0000 }, + { 0x8700, 0x09e1, 0x2000 }, + { 0x0700, 0x09e0, 0x0000 }, + { 0x0c00, 0x09e2, 0x0000 }, + { 0x8d00, 0x09e9, 0x3000 }, + { 0x8d00, 0x09e7, 0x2000 }, + { 0x0d00, 0x09e6, 0x0000 }, + { 0x0d00, 0x09e8, 0x0000 }, + { 0x8d00, 0x09eb, 0x2000 }, + { 0x0d00, 0x09ea, 0x0000 }, + { 0x0d00, 0x09ec, 0x0000 }, + { 0x8f00, 0x09f5, 0x4000 }, + { 0x8700, 0x09f1, 0x3000 }, + { 0x8d00, 0x09ef, 0x2000 }, + { 0x0d00, 0x09ee, 0x0000 }, + { 0x0700, 0x09f0, 0x0000 }, + { 0x9700, 0x09f3, 0x2000 }, + { 0x1700, 0x09f2, 0x0000 }, + { 0x0f00, 0x09f4, 0x0000 }, + { 0x8f00, 0x09f9, 0x3000 }, + { 0x8f00, 0x09f7, 0x2000 }, + { 0x0f00, 0x09f6, 0x0000 }, + { 0x0f00, 0x09f8, 0x0000 }, + { 0x8c00, 0x0a01, 0x2000 }, + { 0x1a00, 0x09fa, 0x0000 }, + { 0x0c00, 0x0a02, 0x0000 }, + { 0x8700, 0x0a1a, 0x5000 }, + { 0x8700, 0x0a10, 0x4000 }, + { 0x8700, 0x0a08, 0x3000 }, + { 0x8700, 0x0a06, 0x2000 }, + { 0x0700, 0x0a05, 0x0000 }, + { 0x0700, 0x0a07, 0x0000 }, + { 0x8700, 0x0a0a, 0x2000 }, + { 0x0700, 0x0a09, 0x0000 }, + { 0x0700, 0x0a0f, 0x0000 }, + { 0x8700, 0x0a16, 0x3000 }, + { 0x8700, 0x0a14, 0x2000 }, + { 0x0700, 0x0a13, 0x0000 }, + { 0x0700, 0x0a15, 0x0000 }, + { 0x8700, 0x0a18, 0x2000 }, + { 0x0700, 0x0a17, 0x0000 }, + { 0x0700, 0x0a19, 0x0000 }, + { 0x8700, 0x0a22, 0x4000 }, + { 0x8700, 0x0a1e, 0x3000 }, + { 0x8700, 0x0a1c, 0x2000 }, + { 0x0700, 0x0a1b, 0x0000 }, + { 0x0700, 0x0a1d, 0x0000 }, + { 0x8700, 0x0a20, 0x2000 }, + { 0x0700, 0x0a1f, 0x0000 }, + { 0x0700, 0x0a21, 0x0000 }, + { 0x8700, 0x0a26, 0x3000 }, + { 0x8700, 0x0a24, 0x2000 }, + { 0x0700, 0x0a23, 0x0000 }, + { 0x0700, 0x0a25, 0x0000 }, + { 0x8700, 0x0a28, 0x2000 }, + { 0x0700, 0x0a27, 0x0000 }, + { 0x0700, 0x0a2a, 0x0000 }, + { 0x8d00, 0x0a6a, 0x6000 }, + { 0x8c00, 0x0a41, 0x5000 }, + { 0x8700, 0x0a35, 0x4000 }, + { 0x8700, 0x0a2f, 0x3000 }, + { 0x8700, 0x0a2d, 0x2000 }, + { 0x0700, 0x0a2c, 0x0000 }, + { 0x0700, 0x0a2e, 0x0000 }, + { 0x8700, 0x0a32, 0x2000 }, + { 0x0700, 0x0a30, 0x0000 }, + { 0x0700, 0x0a33, 0x0000 }, + { 0x8c00, 0x0a3c, 0x3000 }, + { 0x8700, 0x0a38, 0x2000 }, + { 0x0700, 0x0a36, 0x0000 }, + { 0x0700, 0x0a39, 0x0000 }, + { 0x8a00, 0x0a3f, 0x2000 }, + { 0x0a00, 0x0a3e, 0x0000 }, + { 0x0a00, 0x0a40, 0x0000 }, + { 0x8700, 0x0a5a, 0x4000 }, + { 0x8c00, 0x0a4b, 0x3000 }, + { 0x8c00, 0x0a47, 0x2000 }, + { 0x0c00, 0x0a42, 0x0000 }, + { 0x0c00, 0x0a48, 0x0000 }, + { 0x8c00, 0x0a4d, 0x2000 }, + { 0x0c00, 0x0a4c, 0x0000 }, + { 0x0700, 0x0a59, 0x0000 }, + { 0x8d00, 0x0a66, 0x3000 }, + { 0x8700, 0x0a5c, 0x2000 }, + { 0x0700, 0x0a5b, 0x0000 }, + { 0x0700, 0x0a5e, 0x0000 }, + { 0x8d00, 0x0a68, 0x2000 }, + { 0x0d00, 0x0a67, 0x0000 }, + { 0x0d00, 0x0a69, 0x0000 }, + { 0x8700, 0x0a87, 0x5000 }, + { 0x8700, 0x0a72, 0x4000 }, + { 0x8d00, 0x0a6e, 0x3000 }, + { 0x8d00, 0x0a6c, 0x2000 }, + { 0x0d00, 0x0a6b, 0x0000 }, + { 0x0d00, 0x0a6d, 0x0000 }, + { 0x8c00, 0x0a70, 0x2000 }, + { 0x0d00, 0x0a6f, 0x0000 }, + { 0x0c00, 0x0a71, 0x0000 }, + { 0x8c00, 0x0a82, 0x3000 }, + { 0x8700, 0x0a74, 0x2000 }, + { 0x0700, 0x0a73, 0x0000 }, + { 0x0c00, 0x0a81, 0x0000 }, + { 0x8700, 0x0a85, 0x2000 }, + { 0x0a00, 0x0a83, 0x0000 }, + { 0x0700, 0x0a86, 0x0000 }, + { 0x8700, 0x0a90, 0x4000 }, + { 0x8700, 0x0a8b, 0x3000 }, + { 0x8700, 0x0a89, 0x2000 }, + { 0x0700, 0x0a88, 0x0000 }, + { 0x0700, 0x0a8a, 0x0000 }, + { 0x8700, 0x0a8d, 0x2000 }, + { 0x0700, 0x0a8c, 0x0000 }, + { 0x0700, 0x0a8f, 0x0000 }, + { 0x8700, 0x0a95, 0x3000 }, + { 0x8700, 0x0a93, 0x2000 }, + { 0x0700, 0x0a91, 0x0000 }, + { 0x0700, 0x0a94, 0x0000 }, + { 0x8700, 0x0a97, 0x2000 }, + { 0x0700, 0x0a96, 0x0000 }, + { 0x0700, 0x0a98, 0x0000 }, + { 0x8700, 0x10ef, 0xb000 }, + { 0x8700, 0x0dc6, 0xa000 }, + { 0x8700, 0x0c31, 0x9000 }, + { 0x8700, 0x0b5f, 0x8000 }, + { 0x8a00, 0x0b03, 0x7000 }, + { 0x8a00, 0x0abe, 0x6000 }, + { 0x8700, 0x0aaa, 0x5000 }, + { 0x8700, 0x0aa1, 0x4000 }, + { 0x8700, 0x0a9d, 0x3000 }, + { 0x8700, 0x0a9b, 0x2000 }, + { 0x0700, 0x0a9a, 0x0000 }, + { 0x0700, 0x0a9c, 0x0000 }, + { 0x8700, 0x0a9f, 0x2000 }, + { 0x0700, 0x0a9e, 0x0000 }, + { 0x0700, 0x0aa0, 0x0000 }, + { 0x8700, 0x0aa5, 0x3000 }, + { 0x8700, 0x0aa3, 0x2000 }, + { 0x0700, 0x0aa2, 0x0000 }, + { 0x0700, 0x0aa4, 0x0000 }, + { 0x8700, 0x0aa7, 0x2000 }, + { 0x0700, 0x0aa6, 0x0000 }, + { 0x0700, 0x0aa8, 0x0000 }, + { 0x8700, 0x0ab3, 0x4000 }, + { 0x8700, 0x0aae, 0x3000 }, + { 0x8700, 0x0aac, 0x2000 }, + { 0x0700, 0x0aab, 0x0000 }, + { 0x0700, 0x0aad, 0x0000 }, + { 0x8700, 0x0ab0, 0x2000 }, + { 0x0700, 0x0aaf, 0x0000 }, + { 0x0700, 0x0ab2, 0x0000 }, + { 0x8700, 0x0ab8, 0x3000 }, + { 0x8700, 0x0ab6, 0x2000 }, + { 0x0700, 0x0ab5, 0x0000 }, + { 0x0700, 0x0ab7, 0x0000 }, + { 0x8c00, 0x0abc, 0x2000 }, + { 0x0700, 0x0ab9, 0x0000 }, + { 0x0700, 0x0abd, 0x0000 }, + { 0x8700, 0x0ae1, 0x5000 }, + { 0x8c00, 0x0ac7, 0x4000 }, + { 0x8c00, 0x0ac2, 0x3000 }, + { 0x8a00, 0x0ac0, 0x2000 }, + { 0x0a00, 0x0abf, 0x0000 }, + { 0x0c00, 0x0ac1, 0x0000 }, + { 0x8c00, 0x0ac4, 0x2000 }, + { 0x0c00, 0x0ac3, 0x0000 }, + { 0x0c00, 0x0ac5, 0x0000 }, + { 0x8a00, 0x0acc, 0x3000 }, + { 0x8a00, 0x0ac9, 0x2000 }, + { 0x0c00, 0x0ac8, 0x0000 }, + { 0x0a00, 0x0acb, 0x0000 }, + { 0x8700, 0x0ad0, 0x2000 }, + { 0x0c00, 0x0acd, 0x0000 }, + { 0x0700, 0x0ae0, 0x0000 }, + { 0x8d00, 0x0aeb, 0x4000 }, + { 0x8d00, 0x0ae7, 0x3000 }, + { 0x8c00, 0x0ae3, 0x2000 }, + { 0x0c00, 0x0ae2, 0x0000 }, + { 0x0d00, 0x0ae6, 0x0000 }, + { 0x8d00, 0x0ae9, 0x2000 }, + { 0x0d00, 0x0ae8, 0x0000 }, + { 0x0d00, 0x0aea, 0x0000 }, + { 0x8d00, 0x0aef, 0x3000 }, + { 0x8d00, 0x0aed, 0x2000 }, + { 0x0d00, 0x0aec, 0x0000 }, + { 0x0d00, 0x0aee, 0x0000 }, + { 0x8c00, 0x0b01, 0x2000 }, + { 0x1700, 0x0af1, 0x0000 }, + { 0x0a00, 0x0b02, 0x0000 }, + { 0x8700, 0x0b28, 0x6000 }, + { 0x8700, 0x0b18, 0x5000 }, + { 0x8700, 0x0b0c, 0x4000 }, + { 0x8700, 0x0b08, 0x3000 }, + { 0x8700, 0x0b06, 0x2000 }, + { 0x0700, 0x0b05, 0x0000 }, + { 0x0700, 0x0b07, 0x0000 }, + { 0x8700, 0x0b0a, 0x2000 }, + { 0x0700, 0x0b09, 0x0000 }, + { 0x0700, 0x0b0b, 0x0000 }, + { 0x8700, 0x0b14, 0x3000 }, + { 0x8700, 0x0b10, 0x2000 }, + { 0x0700, 0x0b0f, 0x0000 }, + { 0x0700, 0x0b13, 0x0000 }, + { 0x8700, 0x0b16, 0x2000 }, + { 0x0700, 0x0b15, 0x0000 }, + { 0x0700, 0x0b17, 0x0000 }, + { 0x8700, 0x0b20, 0x4000 }, + { 0x8700, 0x0b1c, 0x3000 }, + { 0x8700, 0x0b1a, 0x2000 }, + { 0x0700, 0x0b19, 0x0000 }, + { 0x0700, 0x0b1b, 0x0000 }, + { 0x8700, 0x0b1e, 0x2000 }, + { 0x0700, 0x0b1d, 0x0000 }, + { 0x0700, 0x0b1f, 0x0000 }, + { 0x8700, 0x0b24, 0x3000 }, + { 0x8700, 0x0b22, 0x2000 }, + { 0x0700, 0x0b21, 0x0000 }, + { 0x0700, 0x0b23, 0x0000 }, + { 0x8700, 0x0b26, 0x2000 }, + { 0x0700, 0x0b25, 0x0000 }, + { 0x0700, 0x0b27, 0x0000 }, + { 0x8700, 0x0b3d, 0x5000 }, + { 0x8700, 0x0b32, 0x4000 }, + { 0x8700, 0x0b2d, 0x3000 }, + { 0x8700, 0x0b2b, 0x2000 }, + { 0x0700, 0x0b2a, 0x0000 }, + { 0x0700, 0x0b2c, 0x0000 }, + { 0x8700, 0x0b2f, 0x2000 }, + { 0x0700, 0x0b2e, 0x0000 }, + { 0x0700, 0x0b30, 0x0000 }, + { 0x8700, 0x0b37, 0x3000 }, + { 0x8700, 0x0b35, 0x2000 }, + { 0x0700, 0x0b33, 0x0000 }, + { 0x0700, 0x0b36, 0x0000 }, + { 0x8700, 0x0b39, 0x2000 }, + { 0x0700, 0x0b38, 0x0000 }, + { 0x0c00, 0x0b3c, 0x0000 }, + { 0x8a00, 0x0b48, 0x4000 }, + { 0x8c00, 0x0b41, 0x3000 }, + { 0x8c00, 0x0b3f, 0x2000 }, + { 0x0a00, 0x0b3e, 0x0000 }, + { 0x0a00, 0x0b40, 0x0000 }, + { 0x8c00, 0x0b43, 0x2000 }, + { 0x0c00, 0x0b42, 0x0000 }, + { 0x0a00, 0x0b47, 0x0000 }, + { 0x8c00, 0x0b56, 0x3000 }, + { 0x8a00, 0x0b4c, 0x2000 }, + { 0x0a00, 0x0b4b, 0x0000 }, + { 0x0c00, 0x0b4d, 0x0000 }, + { 0x8700, 0x0b5c, 0x2000 }, + { 0x0a00, 0x0b57, 0x0000 }, + { 0x0700, 0x0b5d, 0x0000 }, + { 0x8d00, 0x0be7, 0x7000 }, + { 0x8700, 0x0b9c, 0x6000 }, + { 0x8700, 0x0b83, 0x5000 }, + { 0x8d00, 0x0b6b, 0x4000 }, + { 0x8d00, 0x0b67, 0x3000 }, + { 0x8700, 0x0b61, 0x2000 }, + { 0x0700, 0x0b60, 0x0000 }, + { 0x0d00, 0x0b66, 0x0000 }, + { 0x8d00, 0x0b69, 0x2000 }, + { 0x0d00, 0x0b68, 0x0000 }, + { 0x0d00, 0x0b6a, 0x0000 }, + { 0x8d00, 0x0b6f, 0x3000 }, + { 0x8d00, 0x0b6d, 0x2000 }, + { 0x0d00, 0x0b6c, 0x0000 }, + { 0x0d00, 0x0b6e, 0x0000 }, + { 0x8700, 0x0b71, 0x2000 }, + { 0x1a00, 0x0b70, 0x0000 }, + { 0x0c00, 0x0b82, 0x0000 }, + { 0x8700, 0x0b8f, 0x4000 }, + { 0x8700, 0x0b88, 0x3000 }, + { 0x8700, 0x0b86, 0x2000 }, + { 0x0700, 0x0b85, 0x0000 }, + { 0x0700, 0x0b87, 0x0000 }, + { 0x8700, 0x0b8a, 0x2000 }, + { 0x0700, 0x0b89, 0x0000 }, + { 0x0700, 0x0b8e, 0x0000 }, + { 0x8700, 0x0b94, 0x3000 }, + { 0x8700, 0x0b92, 0x2000 }, + { 0x0700, 0x0b90, 0x0000 }, + { 0x0700, 0x0b93, 0x0000 }, + { 0x8700, 0x0b99, 0x2000 }, + { 0x0700, 0x0b95, 0x0000 }, + { 0x0700, 0x0b9a, 0x0000 }, + { 0x8700, 0x0bb7, 0x5000 }, + { 0x8700, 0x0bae, 0x4000 }, + { 0x8700, 0x0ba4, 0x3000 }, + { 0x8700, 0x0b9f, 0x2000 }, + { 0x0700, 0x0b9e, 0x0000 }, + { 0x0700, 0x0ba3, 0x0000 }, + { 0x8700, 0x0ba9, 0x2000 }, + { 0x0700, 0x0ba8, 0x0000 }, + { 0x0700, 0x0baa, 0x0000 }, + { 0x8700, 0x0bb2, 0x3000 }, + { 0x8700, 0x0bb0, 0x2000 }, + { 0x0700, 0x0baf, 0x0000 }, + { 0x0700, 0x0bb1, 0x0000 }, + { 0x8700, 0x0bb4, 0x2000 }, + { 0x0700, 0x0bb3, 0x0000 }, + { 0x0700, 0x0bb5, 0x0000 }, + { 0x8a00, 0x0bc6, 0x4000 }, + { 0x8a00, 0x0bbf, 0x3000 }, + { 0x8700, 0x0bb9, 0x2000 }, + { 0x0700, 0x0bb8, 0x0000 }, + { 0x0a00, 0x0bbe, 0x0000 }, + { 0x8a00, 0x0bc1, 0x2000 }, + { 0x0c00, 0x0bc0, 0x0000 }, + { 0x0a00, 0x0bc2, 0x0000 }, + { 0x8a00, 0x0bcb, 0x3000 }, + { 0x8a00, 0x0bc8, 0x2000 }, + { 0x0a00, 0x0bc7, 0x0000 }, + { 0x0a00, 0x0bca, 0x0000 }, + { 0x8c00, 0x0bcd, 0x2000 }, + { 0x0a00, 0x0bcc, 0x0000 }, + { 0x0a00, 0x0bd7, 0x0000 }, + { 0x8700, 0x0c0f, 0x6000 }, + { 0x9a00, 0x0bf7, 0x5000 }, + { 0x8d00, 0x0bef, 0x4000 }, + { 0x8d00, 0x0beb, 0x3000 }, + { 0x8d00, 0x0be9, 0x2000 }, + { 0x0d00, 0x0be8, 0x0000 }, + { 0x0d00, 0x0bea, 0x0000 }, + { 0x8d00, 0x0bed, 0x2000 }, + { 0x0d00, 0x0bec, 0x0000 }, + { 0x0d00, 0x0bee, 0x0000 }, + { 0x9a00, 0x0bf3, 0x3000 }, + { 0x8f00, 0x0bf1, 0x2000 }, + { 0x0f00, 0x0bf0, 0x0000 }, + { 0x0f00, 0x0bf2, 0x0000 }, + { 0x9a00, 0x0bf5, 0x2000 }, + { 0x1a00, 0x0bf4, 0x0000 }, + { 0x1a00, 0x0bf6, 0x0000 }, + { 0x8700, 0x0c06, 0x4000 }, + { 0x8a00, 0x0c01, 0x3000 }, + { 0x9700, 0x0bf9, 0x2000 }, + { 0x1a00, 0x0bf8, 0x0000 }, + { 0x1a00, 0x0bfa, 0x0000 }, + { 0x8a00, 0x0c03, 0x2000 }, + { 0x0a00, 0x0c02, 0x0000 }, + { 0x0700, 0x0c05, 0x0000 }, + { 0x8700, 0x0c0a, 0x3000 }, + { 0x8700, 0x0c08, 0x2000 }, + { 0x0700, 0x0c07, 0x0000 }, + { 0x0700, 0x0c09, 0x0000 }, + { 0x8700, 0x0c0c, 0x2000 }, + { 0x0700, 0x0c0b, 0x0000 }, + { 0x0700, 0x0c0e, 0x0000 }, + { 0x8700, 0x0c20, 0x5000 }, + { 0x8700, 0x0c18, 0x4000 }, + { 0x8700, 0x0c14, 0x3000 }, + { 0x8700, 0x0c12, 0x2000 }, + { 0x0700, 0x0c10, 0x0000 }, + { 0x0700, 0x0c13, 0x0000 }, + { 0x8700, 0x0c16, 0x2000 }, + { 0x0700, 0x0c15, 0x0000 }, + { 0x0700, 0x0c17, 0x0000 }, + { 0x8700, 0x0c1c, 0x3000 }, + { 0x8700, 0x0c1a, 0x2000 }, + { 0x0700, 0x0c19, 0x0000 }, + { 0x0700, 0x0c1b, 0x0000 }, + { 0x8700, 0x0c1e, 0x2000 }, + { 0x0700, 0x0c1d, 0x0000 }, + { 0x0700, 0x0c1f, 0x0000 }, + { 0x8700, 0x0c28, 0x4000 }, + { 0x8700, 0x0c24, 0x3000 }, + { 0x8700, 0x0c22, 0x2000 }, + { 0x0700, 0x0c21, 0x0000 }, + { 0x0700, 0x0c23, 0x0000 }, + { 0x8700, 0x0c26, 0x2000 }, + { 0x0700, 0x0c25, 0x0000 }, + { 0x0700, 0x0c27, 0x0000 }, + { 0x8700, 0x0c2d, 0x3000 }, + { 0x8700, 0x0c2b, 0x2000 }, + { 0x0700, 0x0c2a, 0x0000 }, + { 0x0700, 0x0c2c, 0x0000 }, + { 0x8700, 0x0c2f, 0x2000 }, + { 0x0700, 0x0c2e, 0x0000 }, + { 0x0700, 0x0c30, 0x0000 }, + { 0x8700, 0x0d0e, 0x8000 }, + { 0x8700, 0x0ca1, 0x7000 }, + { 0x8d00, 0x0c6c, 0x6000 }, + { 0x8c00, 0x0c47, 0x5000 }, + { 0x8c00, 0x0c3e, 0x4000 }, + { 0x8700, 0x0c36, 0x3000 }, + { 0x8700, 0x0c33, 0x2000 }, + { 0x0700, 0x0c32, 0x0000 }, + { 0x0700, 0x0c35, 0x0000 }, + { 0x8700, 0x0c38, 0x2000 }, + { 0x0700, 0x0c37, 0x0000 }, + { 0x0700, 0x0c39, 0x0000 }, + { 0x8a00, 0x0c42, 0x3000 }, + { 0x8c00, 0x0c40, 0x2000 }, + { 0x0c00, 0x0c3f, 0x0000 }, + { 0x0a00, 0x0c41, 0x0000 }, + { 0x8a00, 0x0c44, 0x2000 }, + { 0x0a00, 0x0c43, 0x0000 }, + { 0x0c00, 0x0c46, 0x0000 }, + { 0x8700, 0x0c60, 0x4000 }, + { 0x8c00, 0x0c4c, 0x3000 }, + { 0x8c00, 0x0c4a, 0x2000 }, + { 0x0c00, 0x0c48, 0x0000 }, + { 0x0c00, 0x0c4b, 0x0000 }, + { 0x8c00, 0x0c55, 0x2000 }, + { 0x0c00, 0x0c4d, 0x0000 }, + { 0x0c00, 0x0c56, 0x0000 }, + { 0x8d00, 0x0c68, 0x3000 }, + { 0x8d00, 0x0c66, 0x2000 }, + { 0x0700, 0x0c61, 0x0000 }, + { 0x0d00, 0x0c67, 0x0000 }, + { 0x8d00, 0x0c6a, 0x2000 }, + { 0x0d00, 0x0c69, 0x0000 }, + { 0x0d00, 0x0c6b, 0x0000 }, + { 0x8700, 0x0c90, 0x5000 }, + { 0x8700, 0x0c87, 0x4000 }, + { 0x8a00, 0x0c82, 0x3000 }, + { 0x8d00, 0x0c6e, 0x2000 }, + { 0x0d00, 0x0c6d, 0x0000 }, + { 0x0d00, 0x0c6f, 0x0000 }, + { 0x8700, 0x0c85, 0x2000 }, + { 0x0a00, 0x0c83, 0x0000 }, + { 0x0700, 0x0c86, 0x0000 }, + { 0x8700, 0x0c8b, 0x3000 }, + { 0x8700, 0x0c89, 0x2000 }, + { 0x0700, 0x0c88, 0x0000 }, + { 0x0700, 0x0c8a, 0x0000 }, + { 0x8700, 0x0c8e, 0x2000 }, + { 0x0700, 0x0c8c, 0x0000 }, + { 0x0700, 0x0c8f, 0x0000 }, + { 0x8700, 0x0c99, 0x4000 }, + { 0x8700, 0x0c95, 0x3000 }, + { 0x8700, 0x0c93, 0x2000 }, + { 0x0700, 0x0c92, 0x0000 }, + { 0x0700, 0x0c94, 0x0000 }, + { 0x8700, 0x0c97, 0x2000 }, + { 0x0700, 0x0c96, 0x0000 }, + { 0x0700, 0x0c98, 0x0000 }, + { 0x8700, 0x0c9d, 0x3000 }, + { 0x8700, 0x0c9b, 0x2000 }, + { 0x0700, 0x0c9a, 0x0000 }, + { 0x0700, 0x0c9c, 0x0000 }, + { 0x8700, 0x0c9f, 0x2000 }, + { 0x0700, 0x0c9e, 0x0000 }, + { 0x0700, 0x0ca0, 0x0000 }, + { 0x8c00, 0x0cc6, 0x6000 }, + { 0x8700, 0x0cb2, 0x5000 }, + { 0x8700, 0x0caa, 0x4000 }, + { 0x8700, 0x0ca5, 0x3000 }, + { 0x8700, 0x0ca3, 0x2000 }, + { 0x0700, 0x0ca2, 0x0000 }, + { 0x0700, 0x0ca4, 0x0000 }, + { 0x8700, 0x0ca7, 0x2000 }, + { 0x0700, 0x0ca6, 0x0000 }, + { 0x0700, 0x0ca8, 0x0000 }, + { 0x8700, 0x0cae, 0x3000 }, + { 0x8700, 0x0cac, 0x2000 }, + { 0x0700, 0x0cab, 0x0000 }, + { 0x0700, 0x0cad, 0x0000 }, + { 0x8700, 0x0cb0, 0x2000 }, + { 0x0700, 0x0caf, 0x0000 }, + { 0x0700, 0x0cb1, 0x0000 }, + { 0x8700, 0x0cbd, 0x4000 }, + { 0x8700, 0x0cb7, 0x3000 }, + { 0x8700, 0x0cb5, 0x2000 }, + { 0x0700, 0x0cb3, 0x0000 }, + { 0x0700, 0x0cb6, 0x0000 }, + { 0x8700, 0x0cb9, 0x2000 }, + { 0x0700, 0x0cb8, 0x0000 }, + { 0x0c00, 0x0cbc, 0x0000 }, + { 0x8a00, 0x0cc1, 0x3000 }, + { 0x8c00, 0x0cbf, 0x2000 }, + { 0x0a00, 0x0cbe, 0x0000 }, + { 0x0a00, 0x0cc0, 0x0000 }, + { 0x8a00, 0x0cc3, 0x2000 }, + { 0x0a00, 0x0cc2, 0x0000 }, + { 0x0a00, 0x0cc4, 0x0000 }, + { 0x8d00, 0x0cea, 0x5000 }, + { 0x8a00, 0x0cd6, 0x4000 }, + { 0x8a00, 0x0ccb, 0x3000 }, + { 0x8a00, 0x0cc8, 0x2000 }, + { 0x0a00, 0x0cc7, 0x0000 }, + { 0x0a00, 0x0cca, 0x0000 }, + { 0x8c00, 0x0ccd, 0x2000 }, + { 0x0c00, 0x0ccc, 0x0000 }, + { 0x0a00, 0x0cd5, 0x0000 }, + { 0x8d00, 0x0ce6, 0x3000 }, + { 0x8700, 0x0ce0, 0x2000 }, + { 0x0700, 0x0cde, 0x0000 }, + { 0x0700, 0x0ce1, 0x0000 }, + { 0x8d00, 0x0ce8, 0x2000 }, + { 0x0d00, 0x0ce7, 0x0000 }, + { 0x0d00, 0x0ce9, 0x0000 }, + { 0x8700, 0x0d05, 0x4000 }, + { 0x8d00, 0x0cee, 0x3000 }, + { 0x8d00, 0x0cec, 0x2000 }, + { 0x0d00, 0x0ceb, 0x0000 }, + { 0x0d00, 0x0ced, 0x0000 }, + { 0x8a00, 0x0d02, 0x2000 }, + { 0x0d00, 0x0cef, 0x0000 }, + { 0x0a00, 0x0d03, 0x0000 }, + { 0x8700, 0x0d09, 0x3000 }, + { 0x8700, 0x0d07, 0x2000 }, + { 0x0700, 0x0d06, 0x0000 }, + { 0x0700, 0x0d08, 0x0000 }, + { 0x8700, 0x0d0b, 0x2000 }, + { 0x0700, 0x0d0a, 0x0000 }, + { 0x0700, 0x0d0c, 0x0000 }, + { 0x8d00, 0x0d6c, 0x7000 }, + { 0x8700, 0x0d30, 0x6000 }, + { 0x8700, 0x0d1f, 0x5000 }, + { 0x8700, 0x0d17, 0x4000 }, + { 0x8700, 0x0d13, 0x3000 }, + { 0x8700, 0x0d10, 0x2000 }, + { 0x0700, 0x0d0f, 0x0000 }, + { 0x0700, 0x0d12, 0x0000 }, + { 0x8700, 0x0d15, 0x2000 }, + { 0x0700, 0x0d14, 0x0000 }, + { 0x0700, 0x0d16, 0x0000 }, + { 0x8700, 0x0d1b, 0x3000 }, + { 0x8700, 0x0d19, 0x2000 }, + { 0x0700, 0x0d18, 0x0000 }, + { 0x0700, 0x0d1a, 0x0000 }, + { 0x8700, 0x0d1d, 0x2000 }, + { 0x0700, 0x0d1c, 0x0000 }, + { 0x0700, 0x0d1e, 0x0000 }, + { 0x8700, 0x0d27, 0x4000 }, + { 0x8700, 0x0d23, 0x3000 }, + { 0x8700, 0x0d21, 0x2000 }, + { 0x0700, 0x0d20, 0x0000 }, + { 0x0700, 0x0d22, 0x0000 }, + { 0x8700, 0x0d25, 0x2000 }, + { 0x0700, 0x0d24, 0x0000 }, + { 0x0700, 0x0d26, 0x0000 }, + { 0x8700, 0x0d2c, 0x3000 }, + { 0x8700, 0x0d2a, 0x2000 }, + { 0x0700, 0x0d28, 0x0000 }, + { 0x0700, 0x0d2b, 0x0000 }, + { 0x8700, 0x0d2e, 0x2000 }, + { 0x0700, 0x0d2d, 0x0000 }, + { 0x0700, 0x0d2f, 0x0000 }, + { 0x8a00, 0x0d46, 0x5000 }, + { 0x8700, 0x0d38, 0x4000 }, + { 0x8700, 0x0d34, 0x3000 }, + { 0x8700, 0x0d32, 0x2000 }, + { 0x0700, 0x0d31, 0x0000 }, + { 0x0700, 0x0d33, 0x0000 }, + { 0x8700, 0x0d36, 0x2000 }, + { 0x0700, 0x0d35, 0x0000 }, + { 0x0700, 0x0d37, 0x0000 }, + { 0x8a00, 0x0d40, 0x3000 }, + { 0x8a00, 0x0d3e, 0x2000 }, + { 0x0700, 0x0d39, 0x0000 }, + { 0x0a00, 0x0d3f, 0x0000 }, + { 0x8c00, 0x0d42, 0x2000 }, + { 0x0c00, 0x0d41, 0x0000 }, + { 0x0c00, 0x0d43, 0x0000 }, + { 0x8700, 0x0d60, 0x4000 }, + { 0x8a00, 0x0d4b, 0x3000 }, + { 0x8a00, 0x0d48, 0x2000 }, + { 0x0a00, 0x0d47, 0x0000 }, + { 0x0a00, 0x0d4a, 0x0000 }, + { 0x8c00, 0x0d4d, 0x2000 }, + { 0x0a00, 0x0d4c, 0x0000 }, + { 0x0a00, 0x0d57, 0x0000 }, + { 0x8d00, 0x0d68, 0x3000 }, + { 0x8d00, 0x0d66, 0x2000 }, + { 0x0700, 0x0d61, 0x0000 }, + { 0x0d00, 0x0d67, 0x0000 }, + { 0x8d00, 0x0d6a, 0x2000 }, + { 0x0d00, 0x0d69, 0x0000 }, + { 0x0d00, 0x0d6b, 0x0000 }, + { 0x8700, 0x0da2, 0x6000 }, + { 0x8700, 0x0d8f, 0x5000 }, + { 0x8700, 0x0d87, 0x4000 }, + { 0x8a00, 0x0d82, 0x3000 }, + { 0x8d00, 0x0d6e, 0x2000 }, + { 0x0d00, 0x0d6d, 0x0000 }, + { 0x0d00, 0x0d6f, 0x0000 }, + { 0x8700, 0x0d85, 0x2000 }, + { 0x0a00, 0x0d83, 0x0000 }, + { 0x0700, 0x0d86, 0x0000 }, + { 0x8700, 0x0d8b, 0x3000 }, + { 0x8700, 0x0d89, 0x2000 }, + { 0x0700, 0x0d88, 0x0000 }, + { 0x0700, 0x0d8a, 0x0000 }, + { 0x8700, 0x0d8d, 0x2000 }, + { 0x0700, 0x0d8c, 0x0000 }, + { 0x0700, 0x0d8e, 0x0000 }, + { 0x8700, 0x0d9a, 0x4000 }, + { 0x8700, 0x0d93, 0x3000 }, + { 0x8700, 0x0d91, 0x2000 }, + { 0x0700, 0x0d90, 0x0000 }, + { 0x0700, 0x0d92, 0x0000 }, + { 0x8700, 0x0d95, 0x2000 }, + { 0x0700, 0x0d94, 0x0000 }, + { 0x0700, 0x0d96, 0x0000 }, + { 0x8700, 0x0d9e, 0x3000 }, + { 0x8700, 0x0d9c, 0x2000 }, + { 0x0700, 0x0d9b, 0x0000 }, + { 0x0700, 0x0d9d, 0x0000 }, + { 0x8700, 0x0da0, 0x2000 }, + { 0x0700, 0x0d9f, 0x0000 }, + { 0x0700, 0x0da1, 0x0000 }, + { 0x8700, 0x0db3, 0x5000 }, + { 0x8700, 0x0daa, 0x4000 }, + { 0x8700, 0x0da6, 0x3000 }, + { 0x8700, 0x0da4, 0x2000 }, + { 0x0700, 0x0da3, 0x0000 }, + { 0x0700, 0x0da5, 0x0000 }, + { 0x8700, 0x0da8, 0x2000 }, + { 0x0700, 0x0da7, 0x0000 }, + { 0x0700, 0x0da9, 0x0000 }, + { 0x8700, 0x0dae, 0x3000 }, + { 0x8700, 0x0dac, 0x2000 }, + { 0x0700, 0x0dab, 0x0000 }, + { 0x0700, 0x0dad, 0x0000 }, + { 0x8700, 0x0db0, 0x2000 }, + { 0x0700, 0x0daf, 0x0000 }, + { 0x0700, 0x0db1, 0x0000 }, + { 0x8700, 0x0dbb, 0x4000 }, + { 0x8700, 0x0db7, 0x3000 }, + { 0x8700, 0x0db5, 0x2000 }, + { 0x0700, 0x0db4, 0x0000 }, + { 0x0700, 0x0db6, 0x0000 }, + { 0x8700, 0x0db9, 0x2000 }, + { 0x0700, 0x0db8, 0x0000 }, + { 0x0700, 0x0dba, 0x0000 }, + { 0x8700, 0x0dc2, 0x3000 }, + { 0x8700, 0x0dc0, 0x2000 }, + { 0x0700, 0x0dbd, 0x0000 }, + { 0x0700, 0x0dc1, 0x0000 }, + { 0x8700, 0x0dc4, 0x2000 }, + { 0x0700, 0x0dc3, 0x0000 }, + { 0x0700, 0x0dc5, 0x0000 }, + { 0x8700, 0x0f55, 0x9000 }, + { 0x8700, 0x0ea5, 0x8000 }, + { 0x8700, 0x0e2d, 0x7000 }, + { 0x8700, 0x0e0d, 0x6000 }, + { 0x8a00, 0x0ddf, 0x5000 }, + { 0x8c00, 0x0dd6, 0x4000 }, + { 0x8a00, 0x0dd1, 0x3000 }, + { 0x8a00, 0x0dcf, 0x2000 }, + { 0x0c00, 0x0dca, 0x0000 }, + { 0x0a00, 0x0dd0, 0x0000 }, + { 0x8c00, 0x0dd3, 0x2000 }, + { 0x0c00, 0x0dd2, 0x0000 }, + { 0x0c00, 0x0dd4, 0x0000 }, + { 0x8a00, 0x0ddb, 0x3000 }, + { 0x8a00, 0x0dd9, 0x2000 }, + { 0x0a00, 0x0dd8, 0x0000 }, + { 0x0a00, 0x0dda, 0x0000 }, + { 0x8a00, 0x0ddd, 0x2000 }, + { 0x0a00, 0x0ddc, 0x0000 }, + { 0x0a00, 0x0dde, 0x0000 }, + { 0x8700, 0x0e05, 0x4000 }, + { 0x8700, 0x0e01, 0x3000 }, + { 0x8a00, 0x0df3, 0x2000 }, + { 0x0a00, 0x0df2, 0x0000 }, + { 0x1500, 0x0df4, 0x0000 }, + { 0x8700, 0x0e03, 0x2000 }, + { 0x0700, 0x0e02, 0x0000 }, + { 0x0700, 0x0e04, 0x0000 }, + { 0x8700, 0x0e09, 0x3000 }, + { 0x8700, 0x0e07, 0x2000 }, + { 0x0700, 0x0e06, 0x0000 }, + { 0x0700, 0x0e08, 0x0000 }, + { 0x8700, 0x0e0b, 0x2000 }, + { 0x0700, 0x0e0a, 0x0000 }, + { 0x0700, 0x0e0c, 0x0000 }, + { 0x8700, 0x0e1d, 0x5000 }, + { 0x8700, 0x0e15, 0x4000 }, + { 0x8700, 0x0e11, 0x3000 }, + { 0x8700, 0x0e0f, 0x2000 }, + { 0x0700, 0x0e0e, 0x0000 }, + { 0x0700, 0x0e10, 0x0000 }, + { 0x8700, 0x0e13, 0x2000 }, + { 0x0700, 0x0e12, 0x0000 }, + { 0x0700, 0x0e14, 0x0000 }, + { 0x8700, 0x0e19, 0x3000 }, + { 0x8700, 0x0e17, 0x2000 }, + { 0x0700, 0x0e16, 0x0000 }, + { 0x0700, 0x0e18, 0x0000 }, + { 0x8700, 0x0e1b, 0x2000 }, + { 0x0700, 0x0e1a, 0x0000 }, + { 0x0700, 0x0e1c, 0x0000 }, + { 0x8700, 0x0e25, 0x4000 }, + { 0x8700, 0x0e21, 0x3000 }, + { 0x8700, 0x0e1f, 0x2000 }, + { 0x0700, 0x0e1e, 0x0000 }, + { 0x0700, 0x0e20, 0x0000 }, + { 0x8700, 0x0e23, 0x2000 }, + { 0x0700, 0x0e22, 0x0000 }, + { 0x0700, 0x0e24, 0x0000 }, + { 0x8700, 0x0e29, 0x3000 }, + { 0x8700, 0x0e27, 0x2000 }, + { 0x0700, 0x0e26, 0x0000 }, + { 0x0700, 0x0e28, 0x0000 }, + { 0x8700, 0x0e2b, 0x2000 }, + { 0x0700, 0x0e2a, 0x0000 }, + { 0x0700, 0x0e2c, 0x0000 }, + { 0x8d00, 0x0e51, 0x6000 }, + { 0x8700, 0x0e41, 0x5000 }, + { 0x8c00, 0x0e35, 0x4000 }, + { 0x8c00, 0x0e31, 0x3000 }, + { 0x8700, 0x0e2f, 0x2000 }, + { 0x0700, 0x0e2e, 0x0000 }, + { 0x0700, 0x0e30, 0x0000 }, + { 0x8700, 0x0e33, 0x2000 }, + { 0x0700, 0x0e32, 0x0000 }, + { 0x0c00, 0x0e34, 0x0000 }, + { 0x8c00, 0x0e39, 0x3000 }, + { 0x8c00, 0x0e37, 0x2000 }, + { 0x0c00, 0x0e36, 0x0000 }, + { 0x0c00, 0x0e38, 0x0000 }, + { 0x9700, 0x0e3f, 0x2000 }, + { 0x0c00, 0x0e3a, 0x0000 }, + { 0x0700, 0x0e40, 0x0000 }, + { 0x8c00, 0x0e49, 0x4000 }, + { 0x8700, 0x0e45, 0x3000 }, + { 0x8700, 0x0e43, 0x2000 }, + { 0x0700, 0x0e42, 0x0000 }, + { 0x0700, 0x0e44, 0x0000 }, + { 0x8c00, 0x0e47, 0x2000 }, + { 0x0600, 0x0e46, 0x0000 }, + { 0x0c00, 0x0e48, 0x0000 }, + { 0x8c00, 0x0e4d, 0x3000 }, + { 0x8c00, 0x0e4b, 0x2000 }, + { 0x0c00, 0x0e4a, 0x0000 }, + { 0x0c00, 0x0e4c, 0x0000 }, + { 0x9500, 0x0e4f, 0x2000 }, + { 0x0c00, 0x0e4e, 0x0000 }, + { 0x0d00, 0x0e50, 0x0000 }, + { 0x8700, 0x0e8a, 0x5000 }, + { 0x8d00, 0x0e59, 0x4000 }, + { 0x8d00, 0x0e55, 0x3000 }, + { 0x8d00, 0x0e53, 0x2000 }, + { 0x0d00, 0x0e52, 0x0000 }, + { 0x0d00, 0x0e54, 0x0000 }, + { 0x8d00, 0x0e57, 0x2000 }, + { 0x0d00, 0x0e56, 0x0000 }, + { 0x0d00, 0x0e58, 0x0000 }, + { 0x8700, 0x0e82, 0x3000 }, + { 0x9500, 0x0e5b, 0x2000 }, + { 0x1500, 0x0e5a, 0x0000 }, + { 0x0700, 0x0e81, 0x0000 }, + { 0x8700, 0x0e87, 0x2000 }, + { 0x0700, 0x0e84, 0x0000 }, + { 0x0700, 0x0e88, 0x0000 }, + { 0x8700, 0x0e9b, 0x4000 }, + { 0x8700, 0x0e96, 0x3000 }, + { 0x8700, 0x0e94, 0x2000 }, + { 0x0700, 0x0e8d, 0x0000 }, + { 0x0700, 0x0e95, 0x0000 }, + { 0x8700, 0x0e99, 0x2000 }, + { 0x0700, 0x0e97, 0x0000 }, + { 0x0700, 0x0e9a, 0x0000 }, + { 0x8700, 0x0e9f, 0x3000 }, + { 0x8700, 0x0e9d, 0x2000 }, + { 0x0700, 0x0e9c, 0x0000 }, + { 0x0700, 0x0e9e, 0x0000 }, + { 0x8700, 0x0ea2, 0x2000 }, + { 0x0700, 0x0ea1, 0x0000 }, + { 0x0700, 0x0ea3, 0x0000 }, + { 0x9a00, 0x0f14, 0x7000 }, + { 0x8d00, 0x0ed0, 0x6000 }, + { 0x8c00, 0x0eb9, 0x5000 }, + { 0x8c00, 0x0eb1, 0x4000 }, + { 0x8700, 0x0ead, 0x3000 }, + { 0x8700, 0x0eaa, 0x2000 }, + { 0x0700, 0x0ea7, 0x0000 }, + { 0x0700, 0x0eab, 0x0000 }, + { 0x8700, 0x0eaf, 0x2000 }, + { 0x0700, 0x0eae, 0x0000 }, + { 0x0700, 0x0eb0, 0x0000 }, + { 0x8c00, 0x0eb5, 0x3000 }, + { 0x8700, 0x0eb3, 0x2000 }, + { 0x0700, 0x0eb2, 0x0000 }, + { 0x0c00, 0x0eb4, 0x0000 }, + { 0x8c00, 0x0eb7, 0x2000 }, + { 0x0c00, 0x0eb6, 0x0000 }, + { 0x0c00, 0x0eb8, 0x0000 }, + { 0x8700, 0x0ec4, 0x4000 }, + { 0x8700, 0x0ec0, 0x3000 }, + { 0x8c00, 0x0ebc, 0x2000 }, + { 0x0c00, 0x0ebb, 0x0000 }, + { 0x0700, 0x0ebd, 0x0000 }, + { 0x8700, 0x0ec2, 0x2000 }, + { 0x0700, 0x0ec1, 0x0000 }, + { 0x0700, 0x0ec3, 0x0000 }, + { 0x8c00, 0x0eca, 0x3000 }, + { 0x8c00, 0x0ec8, 0x2000 }, + { 0x0600, 0x0ec6, 0x0000 }, + { 0x0c00, 0x0ec9, 0x0000 }, + { 0x8c00, 0x0ecc, 0x2000 }, + { 0x0c00, 0x0ecb, 0x0000 }, + { 0x0c00, 0x0ecd, 0x0000 }, + { 0x9500, 0x0f04, 0x5000 }, + { 0x8d00, 0x0ed8, 0x4000 }, + { 0x8d00, 0x0ed4, 0x3000 }, + { 0x8d00, 0x0ed2, 0x2000 }, + { 0x0d00, 0x0ed1, 0x0000 }, + { 0x0d00, 0x0ed3, 0x0000 }, + { 0x8d00, 0x0ed6, 0x2000 }, + { 0x0d00, 0x0ed5, 0x0000 }, + { 0x0d00, 0x0ed7, 0x0000 }, + { 0x8700, 0x0f00, 0x3000 }, + { 0x8700, 0x0edc, 0x2000 }, + { 0x0d00, 0x0ed9, 0x0000 }, + { 0x0700, 0x0edd, 0x0000 }, + { 0x9a00, 0x0f02, 0x2000 }, + { 0x1a00, 0x0f01, 0x0000 }, + { 0x1a00, 0x0f03, 0x0000 }, + { 0x9500, 0x0f0c, 0x4000 }, + { 0x9500, 0x0f08, 0x3000 }, + { 0x9500, 0x0f06, 0x2000 }, + { 0x1500, 0x0f05, 0x0000 }, + { 0x1500, 0x0f07, 0x0000 }, + { 0x9500, 0x0f0a, 0x2000 }, + { 0x1500, 0x0f09, 0x0000 }, + { 0x1500, 0x0f0b, 0x0000 }, + { 0x9500, 0x0f10, 0x3000 }, + { 0x9500, 0x0f0e, 0x2000 }, + { 0x1500, 0x0f0d, 0x0000 }, + { 0x1500, 0x0f0f, 0x0000 }, + { 0x9500, 0x0f12, 0x2000 }, + { 0x1500, 0x0f11, 0x0000 }, + { 0x1a00, 0x0f13, 0x0000 }, + { 0x9a00, 0x0f34, 0x6000 }, + { 0x8d00, 0x0f24, 0x5000 }, + { 0x9a00, 0x0f1c, 0x4000 }, + { 0x8c00, 0x0f18, 0x3000 }, + { 0x9a00, 0x0f16, 0x2000 }, + { 0x1a00, 0x0f15, 0x0000 }, + { 0x1a00, 0x0f17, 0x0000 }, + { 0x9a00, 0x0f1a, 0x2000 }, + { 0x0c00, 0x0f19, 0x0000 }, + { 0x1a00, 0x0f1b, 0x0000 }, + { 0x8d00, 0x0f20, 0x3000 }, + { 0x9a00, 0x0f1e, 0x2000 }, + { 0x1a00, 0x0f1d, 0x0000 }, + { 0x1a00, 0x0f1f, 0x0000 }, + { 0x8d00, 0x0f22, 0x2000 }, + { 0x0d00, 0x0f21, 0x0000 }, + { 0x0d00, 0x0f23, 0x0000 }, + { 0x8f00, 0x0f2c, 0x4000 }, + { 0x8d00, 0x0f28, 0x3000 }, + { 0x8d00, 0x0f26, 0x2000 }, + { 0x0d00, 0x0f25, 0x0000 }, + { 0x0d00, 0x0f27, 0x0000 }, + { 0x8f00, 0x0f2a, 0x2000 }, + { 0x0d00, 0x0f29, 0x0000 }, + { 0x0f00, 0x0f2b, 0x0000 }, + { 0x8f00, 0x0f30, 0x3000 }, + { 0x8f00, 0x0f2e, 0x2000 }, + { 0x0f00, 0x0f2d, 0x0000 }, + { 0x0f00, 0x0f2f, 0x0000 }, + { 0x8f00, 0x0f32, 0x2000 }, + { 0x0f00, 0x0f31, 0x0000 }, + { 0x0f00, 0x0f33, 0x0000 }, + { 0x8700, 0x0f44, 0x5000 }, + { 0x9600, 0x0f3c, 0x4000 }, + { 0x9a00, 0x0f38, 0x3000 }, + { 0x9a00, 0x0f36, 0x2000 }, + { 0x0c00, 0x0f35, 0x0000 }, + { 0x0c00, 0x0f37, 0x0000 }, + { 0x9600, 0x0f3a, 0x2000 }, + { 0x0c00, 0x0f39, 0x0000 }, + { 0x1200, 0x0f3b, 0x0000 }, + { 0x8700, 0x0f40, 0x3000 }, + { 0x8a00, 0x0f3e, 0x2000 }, + { 0x1200, 0x0f3d, 0x0000 }, + { 0x0a00, 0x0f3f, 0x0000 }, + { 0x8700, 0x0f42, 0x2000 }, + { 0x0700, 0x0f41, 0x0000 }, + { 0x0700, 0x0f43, 0x0000 }, + { 0x8700, 0x0f4d, 0x4000 }, + { 0x8700, 0x0f49, 0x3000 }, + { 0x8700, 0x0f46, 0x2000 }, + { 0x0700, 0x0f45, 0x0000 }, + { 0x0700, 0x0f47, 0x0000 }, + { 0x8700, 0x0f4b, 0x2000 }, + { 0x0700, 0x0f4a, 0x0000 }, + { 0x0700, 0x0f4c, 0x0000 }, + { 0x8700, 0x0f51, 0x3000 }, + { 0x8700, 0x0f4f, 0x2000 }, + { 0x0700, 0x0f4e, 0x0000 }, + { 0x0700, 0x0f50, 0x0000 }, + { 0x8700, 0x0f53, 0x2000 }, + { 0x0700, 0x0f52, 0x0000 }, + { 0x0700, 0x0f54, 0x0000 }, + { 0x8700, 0x1013, 0x8000 }, + { 0x8c00, 0x0fa0, 0x7000 }, + { 0x8c00, 0x0f7b, 0x6000 }, + { 0x8700, 0x0f65, 0x5000 }, + { 0x8700, 0x0f5d, 0x4000 }, + { 0x8700, 0x0f59, 0x3000 }, + { 0x8700, 0x0f57, 0x2000 }, + { 0x0700, 0x0f56, 0x0000 }, + { 0x0700, 0x0f58, 0x0000 }, + { 0x8700, 0x0f5b, 0x2000 }, + { 0x0700, 0x0f5a, 0x0000 }, + { 0x0700, 0x0f5c, 0x0000 }, + { 0x8700, 0x0f61, 0x3000 }, + { 0x8700, 0x0f5f, 0x2000 }, + { 0x0700, 0x0f5e, 0x0000 }, + { 0x0700, 0x0f60, 0x0000 }, + { 0x8700, 0x0f63, 0x2000 }, + { 0x0700, 0x0f62, 0x0000 }, + { 0x0700, 0x0f64, 0x0000 }, + { 0x8c00, 0x0f73, 0x4000 }, + { 0x8700, 0x0f69, 0x3000 }, + { 0x8700, 0x0f67, 0x2000 }, + { 0x0700, 0x0f66, 0x0000 }, + { 0x0700, 0x0f68, 0x0000 }, + { 0x8c00, 0x0f71, 0x2000 }, + { 0x0700, 0x0f6a, 0x0000 }, + { 0x0c00, 0x0f72, 0x0000 }, + { 0x8c00, 0x0f77, 0x3000 }, + { 0x8c00, 0x0f75, 0x2000 }, + { 0x0c00, 0x0f74, 0x0000 }, + { 0x0c00, 0x0f76, 0x0000 }, + { 0x8c00, 0x0f79, 0x2000 }, + { 0x0c00, 0x0f78, 0x0000 }, + { 0x0c00, 0x0f7a, 0x0000 }, + { 0x8700, 0x0f8b, 0x5000 }, + { 0x8c00, 0x0f83, 0x4000 }, + { 0x8a00, 0x0f7f, 0x3000 }, + { 0x8c00, 0x0f7d, 0x2000 }, + { 0x0c00, 0x0f7c, 0x0000 }, + { 0x0c00, 0x0f7e, 0x0000 }, + { 0x8c00, 0x0f81, 0x2000 }, + { 0x0c00, 0x0f80, 0x0000 }, + { 0x0c00, 0x0f82, 0x0000 }, + { 0x8c00, 0x0f87, 0x3000 }, + { 0x9500, 0x0f85, 0x2000 }, + { 0x0c00, 0x0f84, 0x0000 }, + { 0x0c00, 0x0f86, 0x0000 }, + { 0x8700, 0x0f89, 0x2000 }, + { 0x0700, 0x0f88, 0x0000 }, + { 0x0700, 0x0f8a, 0x0000 }, + { 0x8c00, 0x0f97, 0x4000 }, + { 0x8c00, 0x0f93, 0x3000 }, + { 0x8c00, 0x0f91, 0x2000 }, + { 0x0c00, 0x0f90, 0x0000 }, + { 0x0c00, 0x0f92, 0x0000 }, + { 0x8c00, 0x0f95, 0x2000 }, + { 0x0c00, 0x0f94, 0x0000 }, + { 0x0c00, 0x0f96, 0x0000 }, + { 0x8c00, 0x0f9c, 0x3000 }, + { 0x8c00, 0x0f9a, 0x2000 }, + { 0x0c00, 0x0f99, 0x0000 }, + { 0x0c00, 0x0f9b, 0x0000 }, + { 0x8c00, 0x0f9e, 0x2000 }, + { 0x0c00, 0x0f9d, 0x0000 }, + { 0x0c00, 0x0f9f, 0x0000 }, + { 0x9a00, 0x0fc1, 0x6000 }, + { 0x8c00, 0x0fb0, 0x5000 }, + { 0x8c00, 0x0fa8, 0x4000 }, + { 0x8c00, 0x0fa4, 0x3000 }, + { 0x8c00, 0x0fa2, 0x2000 }, + { 0x0c00, 0x0fa1, 0x0000 }, + { 0x0c00, 0x0fa3, 0x0000 }, + { 0x8c00, 0x0fa6, 0x2000 }, + { 0x0c00, 0x0fa5, 0x0000 }, + { 0x0c00, 0x0fa7, 0x0000 }, + { 0x8c00, 0x0fac, 0x3000 }, + { 0x8c00, 0x0faa, 0x2000 }, + { 0x0c00, 0x0fa9, 0x0000 }, + { 0x0c00, 0x0fab, 0x0000 }, + { 0x8c00, 0x0fae, 0x2000 }, + { 0x0c00, 0x0fad, 0x0000 }, + { 0x0c00, 0x0faf, 0x0000 }, + { 0x8c00, 0x0fb8, 0x4000 }, + { 0x8c00, 0x0fb4, 0x3000 }, + { 0x8c00, 0x0fb2, 0x2000 }, + { 0x0c00, 0x0fb1, 0x0000 }, + { 0x0c00, 0x0fb3, 0x0000 }, + { 0x8c00, 0x0fb6, 0x2000 }, + { 0x0c00, 0x0fb5, 0x0000 }, + { 0x0c00, 0x0fb7, 0x0000 }, + { 0x8c00, 0x0fbc, 0x3000 }, + { 0x8c00, 0x0fba, 0x2000 }, + { 0x0c00, 0x0fb9, 0x0000 }, + { 0x0c00, 0x0fbb, 0x0000 }, + { 0x9a00, 0x0fbf, 0x2000 }, + { 0x1a00, 0x0fbe, 0x0000 }, + { 0x1a00, 0x0fc0, 0x0000 }, + { 0x8700, 0x1003, 0x5000 }, + { 0x9a00, 0x0fc9, 0x4000 }, + { 0x9a00, 0x0fc5, 0x3000 }, + { 0x9a00, 0x0fc3, 0x2000 }, + { 0x1a00, 0x0fc2, 0x0000 }, + { 0x1a00, 0x0fc4, 0x0000 }, + { 0x9a00, 0x0fc7, 0x2000 }, + { 0x0c00, 0x0fc6, 0x0000 }, + { 0x1a00, 0x0fc8, 0x0000 }, + { 0x9a00, 0x0fcf, 0x3000 }, + { 0x9a00, 0x0fcb, 0x2000 }, + { 0x1a00, 0x0fca, 0x0000 }, + { 0x1a00, 0x0fcc, 0x0000 }, + { 0x8700, 0x1001, 0x2000 }, + { 0x0700, 0x1000, 0x0000 }, + { 0x0700, 0x1002, 0x0000 }, + { 0x8700, 0x100b, 0x4000 }, + { 0x8700, 0x1007, 0x3000 }, + { 0x8700, 0x1005, 0x2000 }, + { 0x0700, 0x1004, 0x0000 }, + { 0x0700, 0x1006, 0x0000 }, + { 0x8700, 0x1009, 0x2000 }, + { 0x0700, 0x1008, 0x0000 }, + { 0x0700, 0x100a, 0x0000 }, + { 0x8700, 0x100f, 0x3000 }, + { 0x8700, 0x100d, 0x2000 }, + { 0x0700, 0x100c, 0x0000 }, + { 0x0700, 0x100e, 0x0000 }, + { 0x8700, 0x1011, 0x2000 }, + { 0x0700, 0x1010, 0x0000 }, + { 0x0700, 0x1012, 0x0000 }, + { 0x8900, 0x10a5, 0x7000 }, + { 0x8c00, 0x1039, 0x6000 }, + { 0x8700, 0x1024, 0x5000 }, + { 0x8700, 0x101b, 0x4000 }, + { 0x8700, 0x1017, 0x3000 }, + { 0x8700, 0x1015, 0x2000 }, + { 0x0700, 0x1014, 0x0000 }, + { 0x0700, 0x1016, 0x0000 }, + { 0x8700, 0x1019, 0x2000 }, + { 0x0700, 0x1018, 0x0000 }, + { 0x0700, 0x101a, 0x0000 }, + { 0x8700, 0x101f, 0x3000 }, + { 0x8700, 0x101d, 0x2000 }, + { 0x0700, 0x101c, 0x0000 }, + { 0x0700, 0x101e, 0x0000 }, + { 0x8700, 0x1021, 0x2000 }, + { 0x0700, 0x1020, 0x0000 }, + { 0x0700, 0x1023, 0x0000 }, + { 0x8c00, 0x102e, 0x4000 }, + { 0x8700, 0x1029, 0x3000 }, + { 0x8700, 0x1026, 0x2000 }, + { 0x0700, 0x1025, 0x0000 }, + { 0x0700, 0x1027, 0x0000 }, + { 0x8a00, 0x102c, 0x2000 }, + { 0x0700, 0x102a, 0x0000 }, + { 0x0c00, 0x102d, 0x0000 }, + { 0x8c00, 0x1032, 0x3000 }, + { 0x8c00, 0x1030, 0x2000 }, + { 0x0c00, 0x102f, 0x0000 }, + { 0x0a00, 0x1031, 0x0000 }, + { 0x8c00, 0x1037, 0x2000 }, + { 0x0c00, 0x1036, 0x0000 }, + { 0x0a00, 0x1038, 0x0000 }, + { 0x9500, 0x104f, 0x5000 }, + { 0x8d00, 0x1047, 0x4000 }, + { 0x8d00, 0x1043, 0x3000 }, + { 0x8d00, 0x1041, 0x2000 }, + { 0x0d00, 0x1040, 0x0000 }, + { 0x0d00, 0x1042, 0x0000 }, + { 0x8d00, 0x1045, 0x2000 }, + { 0x0d00, 0x1044, 0x0000 }, + { 0x0d00, 0x1046, 0x0000 }, + { 0x9500, 0x104b, 0x3000 }, + { 0x8d00, 0x1049, 0x2000 }, + { 0x0d00, 0x1048, 0x0000 }, + { 0x1500, 0x104a, 0x0000 }, + { 0x9500, 0x104d, 0x2000 }, + { 0x1500, 0x104c, 0x0000 }, + { 0x1500, 0x104e, 0x0000 }, + { 0x8a00, 0x1057, 0x4000 }, + { 0x8700, 0x1053, 0x3000 }, + { 0x8700, 0x1051, 0x2000 }, + { 0x0700, 0x1050, 0x0000 }, + { 0x0700, 0x1052, 0x0000 }, + { 0x8700, 0x1055, 0x2000 }, + { 0x0700, 0x1054, 0x0000 }, + { 0x0a00, 0x1056, 0x0000 }, + { 0x8900, 0x10a1, 0x3000 }, + { 0x8c00, 0x1059, 0x2000 }, + { 0x0c00, 0x1058, 0x0000 }, + { 0x0900, 0x10a0, 0x0000 }, + { 0x8900, 0x10a3, 0x2000 }, + { 0x0900, 0x10a2, 0x0000 }, + { 0x0900, 0x10a4, 0x0000 }, + { 0x8900, 0x10c5, 0x6000 }, + { 0x8900, 0x10b5, 0x5000 }, + { 0x8900, 0x10ad, 0x4000 }, + { 0x8900, 0x10a9, 0x3000 }, + { 0x8900, 0x10a7, 0x2000 }, + { 0x0900, 0x10a6, 0x0000 }, + { 0x0900, 0x10a8, 0x0000 }, + { 0x8900, 0x10ab, 0x2000 }, + { 0x0900, 0x10aa, 0x0000 }, + { 0x0900, 0x10ac, 0x0000 }, + { 0x8900, 0x10b1, 0x3000 }, + { 0x8900, 0x10af, 0x2000 }, + { 0x0900, 0x10ae, 0x0000 }, + { 0x0900, 0x10b0, 0x0000 }, + { 0x8900, 0x10b3, 0x2000 }, + { 0x0900, 0x10b2, 0x0000 }, + { 0x0900, 0x10b4, 0x0000 }, + { 0x8900, 0x10bd, 0x4000 }, + { 0x8900, 0x10b9, 0x3000 }, + { 0x8900, 0x10b7, 0x2000 }, + { 0x0900, 0x10b6, 0x0000 }, + { 0x0900, 0x10b8, 0x0000 }, + { 0x8900, 0x10bb, 0x2000 }, + { 0x0900, 0x10ba, 0x0000 }, + { 0x0900, 0x10bc, 0x0000 }, + { 0x8900, 0x10c1, 0x3000 }, + { 0x8900, 0x10bf, 0x2000 }, + { 0x0900, 0x10be, 0x0000 }, + { 0x0900, 0x10c0, 0x0000 }, + { 0x8900, 0x10c3, 0x2000 }, + { 0x0900, 0x10c2, 0x0000 }, + { 0x0900, 0x10c4, 0x0000 }, + { 0x8700, 0x10df, 0x5000 }, + { 0x8700, 0x10d7, 0x4000 }, + { 0x8700, 0x10d3, 0x3000 }, + { 0x8700, 0x10d1, 0x2000 }, + { 0x0700, 0x10d0, 0x0000 }, + { 0x0700, 0x10d2, 0x0000 }, + { 0x8700, 0x10d5, 0x2000 }, + { 0x0700, 0x10d4, 0x0000 }, + { 0x0700, 0x10d6, 0x0000 }, + { 0x8700, 0x10db, 0x3000 }, + { 0x8700, 0x10d9, 0x2000 }, + { 0x0700, 0x10d8, 0x0000 }, + { 0x0700, 0x10da, 0x0000 }, + { 0x8700, 0x10dd, 0x2000 }, + { 0x0700, 0x10dc, 0x0000 }, + { 0x0700, 0x10de, 0x0000 }, + { 0x8700, 0x10e7, 0x4000 }, + { 0x8700, 0x10e3, 0x3000 }, + { 0x8700, 0x10e1, 0x2000 }, + { 0x0700, 0x10e0, 0x0000 }, + { 0x0700, 0x10e2, 0x0000 }, + { 0x8700, 0x10e5, 0x2000 }, + { 0x0700, 0x10e4, 0x0000 }, + { 0x0700, 0x10e6, 0x0000 }, + { 0x8700, 0x10eb, 0x3000 }, + { 0x8700, 0x10e9, 0x2000 }, + { 0x0700, 0x10e8, 0x0000 }, + { 0x0700, 0x10ea, 0x0000 }, + { 0x8700, 0x10ed, 0x2000 }, + { 0x0700, 0x10ec, 0x0000 }, + { 0x0700, 0x10ee, 0x0000 }, + { 0x8700, 0x1322, 0xa000 }, + { 0x8700, 0x1205, 0x9000 }, + { 0x8700, 0x117a, 0x8000 }, + { 0x8700, 0x1135, 0x7000 }, + { 0x8700, 0x1115, 0x6000 }, + { 0x8700, 0x1105, 0x5000 }, + { 0x8700, 0x10f7, 0x4000 }, + { 0x8700, 0x10f3, 0x3000 }, + { 0x8700, 0x10f1, 0x2000 }, + { 0x0700, 0x10f0, 0x0000 }, + { 0x0700, 0x10f2, 0x0000 }, + { 0x8700, 0x10f5, 0x2000 }, + { 0x0700, 0x10f4, 0x0000 }, + { 0x0700, 0x10f6, 0x0000 }, + { 0x8700, 0x1101, 0x3000 }, + { 0x9500, 0x10fb, 0x2000 }, + { 0x0700, 0x10f8, 0x0000 }, + { 0x0700, 0x1100, 0x0000 }, + { 0x8700, 0x1103, 0x2000 }, + { 0x0700, 0x1102, 0x0000 }, + { 0x0700, 0x1104, 0x0000 }, + { 0x8700, 0x110d, 0x4000 }, + { 0x8700, 0x1109, 0x3000 }, + { 0x8700, 0x1107, 0x2000 }, + { 0x0700, 0x1106, 0x0000 }, + { 0x0700, 0x1108, 0x0000 }, + { 0x8700, 0x110b, 0x2000 }, + { 0x0700, 0x110a, 0x0000 }, + { 0x0700, 0x110c, 0x0000 }, + { 0x8700, 0x1111, 0x3000 }, + { 0x8700, 0x110f, 0x2000 }, + { 0x0700, 0x110e, 0x0000 }, + { 0x0700, 0x1110, 0x0000 }, + { 0x8700, 0x1113, 0x2000 }, + { 0x0700, 0x1112, 0x0000 }, + { 0x0700, 0x1114, 0x0000 }, + { 0x8700, 0x1125, 0x5000 }, + { 0x8700, 0x111d, 0x4000 }, + { 0x8700, 0x1119, 0x3000 }, + { 0x8700, 0x1117, 0x2000 }, + { 0x0700, 0x1116, 0x0000 }, + { 0x0700, 0x1118, 0x0000 }, + { 0x8700, 0x111b, 0x2000 }, + { 0x0700, 0x111a, 0x0000 }, + { 0x0700, 0x111c, 0x0000 }, + { 0x8700, 0x1121, 0x3000 }, + { 0x8700, 0x111f, 0x2000 }, + { 0x0700, 0x111e, 0x0000 }, + { 0x0700, 0x1120, 0x0000 }, + { 0x8700, 0x1123, 0x2000 }, + { 0x0700, 0x1122, 0x0000 }, + { 0x0700, 0x1124, 0x0000 }, + { 0x8700, 0x112d, 0x4000 }, + { 0x8700, 0x1129, 0x3000 }, + { 0x8700, 0x1127, 0x2000 }, + { 0x0700, 0x1126, 0x0000 }, + { 0x0700, 0x1128, 0x0000 }, + { 0x8700, 0x112b, 0x2000 }, + { 0x0700, 0x112a, 0x0000 }, + { 0x0700, 0x112c, 0x0000 }, + { 0x8700, 0x1131, 0x3000 }, + { 0x8700, 0x112f, 0x2000 }, + { 0x0700, 0x112e, 0x0000 }, + { 0x0700, 0x1130, 0x0000 }, + { 0x8700, 0x1133, 0x2000 }, + { 0x0700, 0x1132, 0x0000 }, + { 0x0700, 0x1134, 0x0000 }, + { 0x8700, 0x1155, 0x6000 }, + { 0x8700, 0x1145, 0x5000 }, + { 0x8700, 0x113d, 0x4000 }, + { 0x8700, 0x1139, 0x3000 }, + { 0x8700, 0x1137, 0x2000 }, + { 0x0700, 0x1136, 0x0000 }, + { 0x0700, 0x1138, 0x0000 }, + { 0x8700, 0x113b, 0x2000 }, + { 0x0700, 0x113a, 0x0000 }, + { 0x0700, 0x113c, 0x0000 }, + { 0x8700, 0x1141, 0x3000 }, + { 0x8700, 0x113f, 0x2000 }, + { 0x0700, 0x113e, 0x0000 }, + { 0x0700, 0x1140, 0x0000 }, + { 0x8700, 0x1143, 0x2000 }, + { 0x0700, 0x1142, 0x0000 }, + { 0x0700, 0x1144, 0x0000 }, + { 0x8700, 0x114d, 0x4000 }, + { 0x8700, 0x1149, 0x3000 }, + { 0x8700, 0x1147, 0x2000 }, + { 0x0700, 0x1146, 0x0000 }, + { 0x0700, 0x1148, 0x0000 }, + { 0x8700, 0x114b, 0x2000 }, + { 0x0700, 0x114a, 0x0000 }, + { 0x0700, 0x114c, 0x0000 }, + { 0x8700, 0x1151, 0x3000 }, + { 0x8700, 0x114f, 0x2000 }, + { 0x0700, 0x114e, 0x0000 }, + { 0x0700, 0x1150, 0x0000 }, + { 0x8700, 0x1153, 0x2000 }, + { 0x0700, 0x1152, 0x0000 }, + { 0x0700, 0x1154, 0x0000 }, + { 0x8700, 0x116a, 0x5000 }, + { 0x8700, 0x1162, 0x4000 }, + { 0x8700, 0x1159, 0x3000 }, + { 0x8700, 0x1157, 0x2000 }, + { 0x0700, 0x1156, 0x0000 }, + { 0x0700, 0x1158, 0x0000 }, + { 0x8700, 0x1160, 0x2000 }, + { 0x0700, 0x115f, 0x0000 }, + { 0x0700, 0x1161, 0x0000 }, + { 0x8700, 0x1166, 0x3000 }, + { 0x8700, 0x1164, 0x2000 }, + { 0x0700, 0x1163, 0x0000 }, + { 0x0700, 0x1165, 0x0000 }, + { 0x8700, 0x1168, 0x2000 }, + { 0x0700, 0x1167, 0x0000 }, + { 0x0700, 0x1169, 0x0000 }, + { 0x8700, 0x1172, 0x4000 }, + { 0x8700, 0x116e, 0x3000 }, + { 0x8700, 0x116c, 0x2000 }, + { 0x0700, 0x116b, 0x0000 }, + { 0x0700, 0x116d, 0x0000 }, + { 0x8700, 0x1170, 0x2000 }, + { 0x0700, 0x116f, 0x0000 }, + { 0x0700, 0x1171, 0x0000 }, + { 0x8700, 0x1176, 0x3000 }, + { 0x8700, 0x1174, 0x2000 }, + { 0x0700, 0x1173, 0x0000 }, + { 0x0700, 0x1175, 0x0000 }, + { 0x8700, 0x1178, 0x2000 }, + { 0x0700, 0x1177, 0x0000 }, + { 0x0700, 0x1179, 0x0000 }, + { 0x8700, 0x11bf, 0x7000 }, + { 0x8700, 0x119a, 0x6000 }, + { 0x8700, 0x118a, 0x5000 }, + { 0x8700, 0x1182, 0x4000 }, + { 0x8700, 0x117e, 0x3000 }, + { 0x8700, 0x117c, 0x2000 }, + { 0x0700, 0x117b, 0x0000 }, + { 0x0700, 0x117d, 0x0000 }, + { 0x8700, 0x1180, 0x2000 }, + { 0x0700, 0x117f, 0x0000 }, + { 0x0700, 0x1181, 0x0000 }, + { 0x8700, 0x1186, 0x3000 }, + { 0x8700, 0x1184, 0x2000 }, + { 0x0700, 0x1183, 0x0000 }, + { 0x0700, 0x1185, 0x0000 }, + { 0x8700, 0x1188, 0x2000 }, + { 0x0700, 0x1187, 0x0000 }, + { 0x0700, 0x1189, 0x0000 }, + { 0x8700, 0x1192, 0x4000 }, + { 0x8700, 0x118e, 0x3000 }, + { 0x8700, 0x118c, 0x2000 }, + { 0x0700, 0x118b, 0x0000 }, + { 0x0700, 0x118d, 0x0000 }, + { 0x8700, 0x1190, 0x2000 }, + { 0x0700, 0x118f, 0x0000 }, + { 0x0700, 0x1191, 0x0000 }, + { 0x8700, 0x1196, 0x3000 }, + { 0x8700, 0x1194, 0x2000 }, + { 0x0700, 0x1193, 0x0000 }, + { 0x0700, 0x1195, 0x0000 }, + { 0x8700, 0x1198, 0x2000 }, + { 0x0700, 0x1197, 0x0000 }, + { 0x0700, 0x1199, 0x0000 }, + { 0x8700, 0x11af, 0x5000 }, + { 0x8700, 0x11a2, 0x4000 }, + { 0x8700, 0x119e, 0x3000 }, + { 0x8700, 0x119c, 0x2000 }, + { 0x0700, 0x119b, 0x0000 }, + { 0x0700, 0x119d, 0x0000 }, + { 0x8700, 0x11a0, 0x2000 }, + { 0x0700, 0x119f, 0x0000 }, + { 0x0700, 0x11a1, 0x0000 }, + { 0x8700, 0x11ab, 0x3000 }, + { 0x8700, 0x11a9, 0x2000 }, + { 0x0700, 0x11a8, 0x0000 }, + { 0x0700, 0x11aa, 0x0000 }, + { 0x8700, 0x11ad, 0x2000 }, + { 0x0700, 0x11ac, 0x0000 }, + { 0x0700, 0x11ae, 0x0000 }, + { 0x8700, 0x11b7, 0x4000 }, + { 0x8700, 0x11b3, 0x3000 }, + { 0x8700, 0x11b1, 0x2000 }, + { 0x0700, 0x11b0, 0x0000 }, + { 0x0700, 0x11b2, 0x0000 }, + { 0x8700, 0x11b5, 0x2000 }, + { 0x0700, 0x11b4, 0x0000 }, + { 0x0700, 0x11b6, 0x0000 }, + { 0x8700, 0x11bb, 0x3000 }, + { 0x8700, 0x11b9, 0x2000 }, + { 0x0700, 0x11b8, 0x0000 }, + { 0x0700, 0x11ba, 0x0000 }, + { 0x8700, 0x11bd, 0x2000 }, + { 0x0700, 0x11bc, 0x0000 }, + { 0x0700, 0x11be, 0x0000 }, + { 0x8700, 0x11df, 0x6000 }, + { 0x8700, 0x11cf, 0x5000 }, + { 0x8700, 0x11c7, 0x4000 }, + { 0x8700, 0x11c3, 0x3000 }, + { 0x8700, 0x11c1, 0x2000 }, + { 0x0700, 0x11c0, 0x0000 }, + { 0x0700, 0x11c2, 0x0000 }, + { 0x8700, 0x11c5, 0x2000 }, + { 0x0700, 0x11c4, 0x0000 }, + { 0x0700, 0x11c6, 0x0000 }, + { 0x8700, 0x11cb, 0x3000 }, + { 0x8700, 0x11c9, 0x2000 }, + { 0x0700, 0x11c8, 0x0000 }, + { 0x0700, 0x11ca, 0x0000 }, + { 0x8700, 0x11cd, 0x2000 }, + { 0x0700, 0x11cc, 0x0000 }, + { 0x0700, 0x11ce, 0x0000 }, + { 0x8700, 0x11d7, 0x4000 }, + { 0x8700, 0x11d3, 0x3000 }, + { 0x8700, 0x11d1, 0x2000 }, + { 0x0700, 0x11d0, 0x0000 }, + { 0x0700, 0x11d2, 0x0000 }, + { 0x8700, 0x11d5, 0x2000 }, + { 0x0700, 0x11d4, 0x0000 }, + { 0x0700, 0x11d6, 0x0000 }, + { 0x8700, 0x11db, 0x3000 }, + { 0x8700, 0x11d9, 0x2000 }, + { 0x0700, 0x11d8, 0x0000 }, + { 0x0700, 0x11da, 0x0000 }, + { 0x8700, 0x11dd, 0x2000 }, + { 0x0700, 0x11dc, 0x0000 }, + { 0x0700, 0x11de, 0x0000 }, + { 0x8700, 0x11ef, 0x5000 }, + { 0x8700, 0x11e7, 0x4000 }, + { 0x8700, 0x11e3, 0x3000 }, + { 0x8700, 0x11e1, 0x2000 }, + { 0x0700, 0x11e0, 0x0000 }, + { 0x0700, 0x11e2, 0x0000 }, + { 0x8700, 0x11e5, 0x2000 }, + { 0x0700, 0x11e4, 0x0000 }, + { 0x0700, 0x11e6, 0x0000 }, + { 0x8700, 0x11eb, 0x3000 }, + { 0x8700, 0x11e9, 0x2000 }, + { 0x0700, 0x11e8, 0x0000 }, + { 0x0700, 0x11ea, 0x0000 }, + { 0x8700, 0x11ed, 0x2000 }, + { 0x0700, 0x11ec, 0x0000 }, + { 0x0700, 0x11ee, 0x0000 }, + { 0x8700, 0x11f7, 0x4000 }, + { 0x8700, 0x11f3, 0x3000 }, + { 0x8700, 0x11f1, 0x2000 }, + { 0x0700, 0x11f0, 0x0000 }, + { 0x0700, 0x11f2, 0x0000 }, + { 0x8700, 0x11f5, 0x2000 }, + { 0x0700, 0x11f4, 0x0000 }, + { 0x0700, 0x11f6, 0x0000 }, + { 0x8700, 0x1201, 0x3000 }, + { 0x8700, 0x11f9, 0x2000 }, + { 0x0700, 0x11f8, 0x0000 }, + { 0x0700, 0x1200, 0x0000 }, + { 0x8700, 0x1203, 0x2000 }, + { 0x0700, 0x1202, 0x0000 }, + { 0x0700, 0x1204, 0x0000 }, + { 0x8700, 0x1292, 0x8000 }, + { 0x8700, 0x1246, 0x7000 }, + { 0x8700, 0x1226, 0x6000 }, + { 0x8700, 0x1216, 0x5000 }, + { 0x8700, 0x120e, 0x4000 }, + { 0x8700, 0x120a, 0x3000 }, + { 0x8700, 0x1208, 0x2000 }, + { 0x0700, 0x1206, 0x0000 }, + { 0x0700, 0x1209, 0x0000 }, + { 0x8700, 0x120c, 0x2000 }, + { 0x0700, 0x120b, 0x0000 }, + { 0x0700, 0x120d, 0x0000 }, + { 0x8700, 0x1212, 0x3000 }, + { 0x8700, 0x1210, 0x2000 }, + { 0x0700, 0x120f, 0x0000 }, + { 0x0700, 0x1211, 0x0000 }, + { 0x8700, 0x1214, 0x2000 }, + { 0x0700, 0x1213, 0x0000 }, + { 0x0700, 0x1215, 0x0000 }, + { 0x8700, 0x121e, 0x4000 }, + { 0x8700, 0x121a, 0x3000 }, + { 0x8700, 0x1218, 0x2000 }, + { 0x0700, 0x1217, 0x0000 }, + { 0x0700, 0x1219, 0x0000 }, + { 0x8700, 0x121c, 0x2000 }, + { 0x0700, 0x121b, 0x0000 }, + { 0x0700, 0x121d, 0x0000 }, + { 0x8700, 0x1222, 0x3000 }, + { 0x8700, 0x1220, 0x2000 }, + { 0x0700, 0x121f, 0x0000 }, + { 0x0700, 0x1221, 0x0000 }, + { 0x8700, 0x1224, 0x2000 }, + { 0x0700, 0x1223, 0x0000 }, + { 0x0700, 0x1225, 0x0000 }, + { 0x8700, 0x1236, 0x5000 }, + { 0x8700, 0x122e, 0x4000 }, + { 0x8700, 0x122a, 0x3000 }, + { 0x8700, 0x1228, 0x2000 }, + { 0x0700, 0x1227, 0x0000 }, + { 0x0700, 0x1229, 0x0000 }, + { 0x8700, 0x122c, 0x2000 }, + { 0x0700, 0x122b, 0x0000 }, + { 0x0700, 0x122d, 0x0000 }, + { 0x8700, 0x1232, 0x3000 }, + { 0x8700, 0x1230, 0x2000 }, + { 0x0700, 0x122f, 0x0000 }, + { 0x0700, 0x1231, 0x0000 }, + { 0x8700, 0x1234, 0x2000 }, + { 0x0700, 0x1233, 0x0000 }, + { 0x0700, 0x1235, 0x0000 }, + { 0x8700, 0x123e, 0x4000 }, + { 0x8700, 0x123a, 0x3000 }, + { 0x8700, 0x1238, 0x2000 }, + { 0x0700, 0x1237, 0x0000 }, + { 0x0700, 0x1239, 0x0000 }, + { 0x8700, 0x123c, 0x2000 }, + { 0x0700, 0x123b, 0x0000 }, + { 0x0700, 0x123d, 0x0000 }, + { 0x8700, 0x1242, 0x3000 }, + { 0x8700, 0x1240, 0x2000 }, + { 0x0700, 0x123f, 0x0000 }, + { 0x0700, 0x1241, 0x0000 }, + { 0x8700, 0x1244, 0x2000 }, + { 0x0700, 0x1243, 0x0000 }, + { 0x0700, 0x1245, 0x0000 }, + { 0x8700, 0x126e, 0x6000 }, + { 0x8700, 0x125c, 0x5000 }, + { 0x8700, 0x1252, 0x4000 }, + { 0x8700, 0x124c, 0x3000 }, + { 0x8700, 0x124a, 0x2000 }, + { 0x0700, 0x1248, 0x0000 }, + { 0x0700, 0x124b, 0x0000 }, + { 0x8700, 0x1250, 0x2000 }, + { 0x0700, 0x124d, 0x0000 }, + { 0x0700, 0x1251, 0x0000 }, + { 0x8700, 0x1256, 0x3000 }, + { 0x8700, 0x1254, 0x2000 }, + { 0x0700, 0x1253, 0x0000 }, + { 0x0700, 0x1255, 0x0000 }, + { 0x8700, 0x125a, 0x2000 }, + { 0x0700, 0x1258, 0x0000 }, + { 0x0700, 0x125b, 0x0000 }, + { 0x8700, 0x1266, 0x4000 }, + { 0x8700, 0x1262, 0x3000 }, + { 0x8700, 0x1260, 0x2000 }, + { 0x0700, 0x125d, 0x0000 }, + { 0x0700, 0x1261, 0x0000 }, + { 0x8700, 0x1264, 0x2000 }, + { 0x0700, 0x1263, 0x0000 }, + { 0x0700, 0x1265, 0x0000 }, + { 0x8700, 0x126a, 0x3000 }, + { 0x8700, 0x1268, 0x2000 }, + { 0x0700, 0x1267, 0x0000 }, + { 0x0700, 0x1269, 0x0000 }, + { 0x8700, 0x126c, 0x2000 }, + { 0x0700, 0x126b, 0x0000 }, + { 0x0700, 0x126d, 0x0000 }, + { 0x8700, 0x127e, 0x5000 }, + { 0x8700, 0x1276, 0x4000 }, + { 0x8700, 0x1272, 0x3000 }, + { 0x8700, 0x1270, 0x2000 }, + { 0x0700, 0x126f, 0x0000 }, + { 0x0700, 0x1271, 0x0000 }, + { 0x8700, 0x1274, 0x2000 }, + { 0x0700, 0x1273, 0x0000 }, + { 0x0700, 0x1275, 0x0000 }, + { 0x8700, 0x127a, 0x3000 }, + { 0x8700, 0x1278, 0x2000 }, + { 0x0700, 0x1277, 0x0000 }, + { 0x0700, 0x1279, 0x0000 }, + { 0x8700, 0x127c, 0x2000 }, + { 0x0700, 0x127b, 0x0000 }, + { 0x0700, 0x127d, 0x0000 }, + { 0x8700, 0x1286, 0x4000 }, + { 0x8700, 0x1282, 0x3000 }, + { 0x8700, 0x1280, 0x2000 }, + { 0x0700, 0x127f, 0x0000 }, + { 0x0700, 0x1281, 0x0000 }, + { 0x8700, 0x1284, 0x2000 }, + { 0x0700, 0x1283, 0x0000 }, + { 0x0700, 0x1285, 0x0000 }, + { 0x8700, 0x128c, 0x3000 }, + { 0x8700, 0x128a, 0x2000 }, + { 0x0700, 0x1288, 0x0000 }, + { 0x0700, 0x128b, 0x0000 }, + { 0x8700, 0x1290, 0x2000 }, + { 0x0700, 0x128d, 0x0000 }, + { 0x0700, 0x1291, 0x0000 }, + { 0x8700, 0x12dc, 0x7000 }, + { 0x8700, 0x12b4, 0x6000 }, + { 0x8700, 0x12a2, 0x5000 }, + { 0x8700, 0x129a, 0x4000 }, + { 0x8700, 0x1296, 0x3000 }, + { 0x8700, 0x1294, 0x2000 }, + { 0x0700, 0x1293, 0x0000 }, + { 0x0700, 0x1295, 0x0000 }, + { 0x8700, 0x1298, 0x2000 }, + { 0x0700, 0x1297, 0x0000 }, + { 0x0700, 0x1299, 0x0000 }, + { 0x8700, 0x129e, 0x3000 }, + { 0x8700, 0x129c, 0x2000 }, + { 0x0700, 0x129b, 0x0000 }, + { 0x0700, 0x129d, 0x0000 }, + { 0x8700, 0x12a0, 0x2000 }, + { 0x0700, 0x129f, 0x0000 }, + { 0x0700, 0x12a1, 0x0000 }, + { 0x8700, 0x12aa, 0x4000 }, + { 0x8700, 0x12a6, 0x3000 }, + { 0x8700, 0x12a4, 0x2000 }, + { 0x0700, 0x12a3, 0x0000 }, + { 0x0700, 0x12a5, 0x0000 }, + { 0x8700, 0x12a8, 0x2000 }, + { 0x0700, 0x12a7, 0x0000 }, + { 0x0700, 0x12a9, 0x0000 }, + { 0x8700, 0x12ae, 0x3000 }, + { 0x8700, 0x12ac, 0x2000 }, + { 0x0700, 0x12ab, 0x0000 }, + { 0x0700, 0x12ad, 0x0000 }, + { 0x8700, 0x12b2, 0x2000 }, + { 0x0700, 0x12b0, 0x0000 }, + { 0x0700, 0x12b3, 0x0000 }, + { 0x8700, 0x12ca, 0x5000 }, + { 0x8700, 0x12be, 0x4000 }, + { 0x8700, 0x12ba, 0x3000 }, + { 0x8700, 0x12b8, 0x2000 }, + { 0x0700, 0x12b5, 0x0000 }, + { 0x0700, 0x12b9, 0x0000 }, + { 0x8700, 0x12bc, 0x2000 }, + { 0x0700, 0x12bb, 0x0000 }, + { 0x0700, 0x12bd, 0x0000 }, + { 0x8700, 0x12c4, 0x3000 }, + { 0x8700, 0x12c2, 0x2000 }, + { 0x0700, 0x12c0, 0x0000 }, + { 0x0700, 0x12c3, 0x0000 }, + { 0x8700, 0x12c8, 0x2000 }, + { 0x0700, 0x12c5, 0x0000 }, + { 0x0700, 0x12c9, 0x0000 }, + { 0x8700, 0x12d3, 0x4000 }, + { 0x8700, 0x12ce, 0x3000 }, + { 0x8700, 0x12cc, 0x2000 }, + { 0x0700, 0x12cb, 0x0000 }, + { 0x0700, 0x12cd, 0x0000 }, + { 0x8700, 0x12d1, 0x2000 }, + { 0x0700, 0x12d0, 0x0000 }, + { 0x0700, 0x12d2, 0x0000 }, + { 0x8700, 0x12d8, 0x3000 }, + { 0x8700, 0x12d5, 0x2000 }, + { 0x0700, 0x12d4, 0x0000 }, + { 0x0700, 0x12d6, 0x0000 }, + { 0x8700, 0x12da, 0x2000 }, + { 0x0700, 0x12d9, 0x0000 }, + { 0x0700, 0x12db, 0x0000 }, + { 0x8700, 0x12fd, 0x6000 }, + { 0x8700, 0x12ec, 0x5000 }, + { 0x8700, 0x12e4, 0x4000 }, + { 0x8700, 0x12e0, 0x3000 }, + { 0x8700, 0x12de, 0x2000 }, + { 0x0700, 0x12dd, 0x0000 }, + { 0x0700, 0x12df, 0x0000 }, + { 0x8700, 0x12e2, 0x2000 }, + { 0x0700, 0x12e1, 0x0000 }, + { 0x0700, 0x12e3, 0x0000 }, + { 0x8700, 0x12e8, 0x3000 }, + { 0x8700, 0x12e6, 0x2000 }, + { 0x0700, 0x12e5, 0x0000 }, + { 0x0700, 0x12e7, 0x0000 }, + { 0x8700, 0x12ea, 0x2000 }, + { 0x0700, 0x12e9, 0x0000 }, + { 0x0700, 0x12eb, 0x0000 }, + { 0x8700, 0x12f5, 0x4000 }, + { 0x8700, 0x12f1, 0x3000 }, + { 0x8700, 0x12ee, 0x2000 }, + { 0x0700, 0x12ed, 0x0000 }, + { 0x0700, 0x12f0, 0x0000 }, + { 0x8700, 0x12f3, 0x2000 }, + { 0x0700, 0x12f2, 0x0000 }, + { 0x0700, 0x12f4, 0x0000 }, + { 0x8700, 0x12f9, 0x3000 }, + { 0x8700, 0x12f7, 0x2000 }, + { 0x0700, 0x12f6, 0x0000 }, + { 0x0700, 0x12f8, 0x0000 }, + { 0x8700, 0x12fb, 0x2000 }, + { 0x0700, 0x12fa, 0x0000 }, + { 0x0700, 0x12fc, 0x0000 }, + { 0x8700, 0x130d, 0x5000 }, + { 0x8700, 0x1305, 0x4000 }, + { 0x8700, 0x1301, 0x3000 }, + { 0x8700, 0x12ff, 0x2000 }, + { 0x0700, 0x12fe, 0x0000 }, + { 0x0700, 0x1300, 0x0000 }, + { 0x8700, 0x1303, 0x2000 }, + { 0x0700, 0x1302, 0x0000 }, + { 0x0700, 0x1304, 0x0000 }, + { 0x8700, 0x1309, 0x3000 }, + { 0x8700, 0x1307, 0x2000 }, + { 0x0700, 0x1306, 0x0000 }, + { 0x0700, 0x1308, 0x0000 }, + { 0x8700, 0x130b, 0x2000 }, + { 0x0700, 0x130a, 0x0000 }, + { 0x0700, 0x130c, 0x0000 }, + { 0x8700, 0x1319, 0x4000 }, + { 0x8700, 0x1313, 0x3000 }, + { 0x8700, 0x1310, 0x2000 }, + { 0x0700, 0x130e, 0x0000 }, + { 0x0700, 0x1312, 0x0000 }, + { 0x8700, 0x1315, 0x2000 }, + { 0x0700, 0x1314, 0x0000 }, + { 0x0700, 0x1318, 0x0000 }, + { 0x8700, 0x131d, 0x3000 }, + { 0x8700, 0x131b, 0x2000 }, + { 0x0700, 0x131a, 0x0000 }, + { 0x0700, 0x131c, 0x0000 }, + { 0x8700, 0x1320, 0x2000 }, + { 0x0700, 0x131e, 0x0000 }, + { 0x0700, 0x1321, 0x0000 }, + { 0x8700, 0x1458, 0x9000 }, + { 0x8700, 0x13cc, 0x8000 }, + { 0x8d00, 0x1369, 0x7000 }, + { 0x8700, 0x1342, 0x6000 }, + { 0x8700, 0x1332, 0x5000 }, + { 0x8700, 0x132a, 0x4000 }, + { 0x8700, 0x1326, 0x3000 }, + { 0x8700, 0x1324, 0x2000 }, + { 0x0700, 0x1323, 0x0000 }, + { 0x0700, 0x1325, 0x0000 }, + { 0x8700, 0x1328, 0x2000 }, + { 0x0700, 0x1327, 0x0000 }, + { 0x0700, 0x1329, 0x0000 }, + { 0x8700, 0x132e, 0x3000 }, + { 0x8700, 0x132c, 0x2000 }, + { 0x0700, 0x132b, 0x0000 }, + { 0x0700, 0x132d, 0x0000 }, + { 0x8700, 0x1330, 0x2000 }, + { 0x0700, 0x132f, 0x0000 }, + { 0x0700, 0x1331, 0x0000 }, + { 0x8700, 0x133a, 0x4000 }, + { 0x8700, 0x1336, 0x3000 }, + { 0x8700, 0x1334, 0x2000 }, + { 0x0700, 0x1333, 0x0000 }, + { 0x0700, 0x1335, 0x0000 }, + { 0x8700, 0x1338, 0x2000 }, + { 0x0700, 0x1337, 0x0000 }, + { 0x0700, 0x1339, 0x0000 }, + { 0x8700, 0x133e, 0x3000 }, + { 0x8700, 0x133c, 0x2000 }, + { 0x0700, 0x133b, 0x0000 }, + { 0x0700, 0x133d, 0x0000 }, + { 0x8700, 0x1340, 0x2000 }, + { 0x0700, 0x133f, 0x0000 }, + { 0x0700, 0x1341, 0x0000 }, + { 0x8700, 0x1353, 0x5000 }, + { 0x8700, 0x134b, 0x4000 }, + { 0x8700, 0x1346, 0x3000 }, + { 0x8700, 0x1344, 0x2000 }, + { 0x0700, 0x1343, 0x0000 }, + { 0x0700, 0x1345, 0x0000 }, + { 0x8700, 0x1349, 0x2000 }, + { 0x0700, 0x1348, 0x0000 }, + { 0x0700, 0x134a, 0x0000 }, + { 0x8700, 0x134f, 0x3000 }, + { 0x8700, 0x134d, 0x2000 }, + { 0x0700, 0x134c, 0x0000 }, + { 0x0700, 0x134e, 0x0000 }, + { 0x8700, 0x1351, 0x2000 }, + { 0x0700, 0x1350, 0x0000 }, + { 0x0700, 0x1352, 0x0000 }, + { 0x9500, 0x1361, 0x4000 }, + { 0x8700, 0x1357, 0x3000 }, + { 0x8700, 0x1355, 0x2000 }, + { 0x0700, 0x1354, 0x0000 }, + { 0x0700, 0x1356, 0x0000 }, + { 0x8700, 0x1359, 0x2000 }, + { 0x0700, 0x1358, 0x0000 }, + { 0x0700, 0x135a, 0x0000 }, + { 0x9500, 0x1365, 0x3000 }, + { 0x9500, 0x1363, 0x2000 }, + { 0x1500, 0x1362, 0x0000 }, + { 0x1500, 0x1364, 0x0000 }, + { 0x9500, 0x1367, 0x2000 }, + { 0x1500, 0x1366, 0x0000 }, + { 0x1500, 0x1368, 0x0000 }, + { 0x8700, 0x13ac, 0x6000 }, + { 0x8f00, 0x1379, 0x5000 }, + { 0x8d00, 0x1371, 0x4000 }, + { 0x8d00, 0x136d, 0x3000 }, + { 0x8d00, 0x136b, 0x2000 }, + { 0x0d00, 0x136a, 0x0000 }, + { 0x0d00, 0x136c, 0x0000 }, + { 0x8d00, 0x136f, 0x2000 }, + { 0x0d00, 0x136e, 0x0000 }, + { 0x0d00, 0x1370, 0x0000 }, + { 0x8f00, 0x1375, 0x3000 }, + { 0x8f00, 0x1373, 0x2000 }, + { 0x0f00, 0x1372, 0x0000 }, + { 0x0f00, 0x1374, 0x0000 }, + { 0x8f00, 0x1377, 0x2000 }, + { 0x0f00, 0x1376, 0x0000 }, + { 0x0f00, 0x1378, 0x0000 }, + { 0x8700, 0x13a4, 0x4000 }, + { 0x8700, 0x13a0, 0x3000 }, + { 0x8f00, 0x137b, 0x2000 }, + { 0x0f00, 0x137a, 0x0000 }, + { 0x0f00, 0x137c, 0x0000 }, + { 0x8700, 0x13a2, 0x2000 }, + { 0x0700, 0x13a1, 0x0000 }, + { 0x0700, 0x13a3, 0x0000 }, + { 0x8700, 0x13a8, 0x3000 }, + { 0x8700, 0x13a6, 0x2000 }, + { 0x0700, 0x13a5, 0x0000 }, + { 0x0700, 0x13a7, 0x0000 }, + { 0x8700, 0x13aa, 0x2000 }, + { 0x0700, 0x13a9, 0x0000 }, + { 0x0700, 0x13ab, 0x0000 }, + { 0x8700, 0x13bc, 0x5000 }, + { 0x8700, 0x13b4, 0x4000 }, + { 0x8700, 0x13b0, 0x3000 }, + { 0x8700, 0x13ae, 0x2000 }, + { 0x0700, 0x13ad, 0x0000 }, + { 0x0700, 0x13af, 0x0000 }, + { 0x8700, 0x13b2, 0x2000 }, + { 0x0700, 0x13b1, 0x0000 }, + { 0x0700, 0x13b3, 0x0000 }, + { 0x8700, 0x13b8, 0x3000 }, + { 0x8700, 0x13b6, 0x2000 }, + { 0x0700, 0x13b5, 0x0000 }, + { 0x0700, 0x13b7, 0x0000 }, + { 0x8700, 0x13ba, 0x2000 }, + { 0x0700, 0x13b9, 0x0000 }, + { 0x0700, 0x13bb, 0x0000 }, + { 0x8700, 0x13c4, 0x4000 }, + { 0x8700, 0x13c0, 0x3000 }, + { 0x8700, 0x13be, 0x2000 }, + { 0x0700, 0x13bd, 0x0000 }, + { 0x0700, 0x13bf, 0x0000 }, + { 0x8700, 0x13c2, 0x2000 }, + { 0x0700, 0x13c1, 0x0000 }, + { 0x0700, 0x13c3, 0x0000 }, + { 0x8700, 0x13c8, 0x3000 }, + { 0x8700, 0x13c6, 0x2000 }, + { 0x0700, 0x13c5, 0x0000 }, + { 0x0700, 0x13c7, 0x0000 }, + { 0x8700, 0x13ca, 0x2000 }, + { 0x0700, 0x13c9, 0x0000 }, + { 0x0700, 0x13cb, 0x0000 }, + { 0x8700, 0x1418, 0x7000 }, + { 0x8700, 0x13ec, 0x6000 }, + { 0x8700, 0x13dc, 0x5000 }, + { 0x8700, 0x13d4, 0x4000 }, + { 0x8700, 0x13d0, 0x3000 }, + { 0x8700, 0x13ce, 0x2000 }, + { 0x0700, 0x13cd, 0x0000 }, + { 0x0700, 0x13cf, 0x0000 }, + { 0x8700, 0x13d2, 0x2000 }, + { 0x0700, 0x13d1, 0x0000 }, + { 0x0700, 0x13d3, 0x0000 }, + { 0x8700, 0x13d8, 0x3000 }, + { 0x8700, 0x13d6, 0x2000 }, + { 0x0700, 0x13d5, 0x0000 }, + { 0x0700, 0x13d7, 0x0000 }, + { 0x8700, 0x13da, 0x2000 }, + { 0x0700, 0x13d9, 0x0000 }, + { 0x0700, 0x13db, 0x0000 }, + { 0x8700, 0x13e4, 0x4000 }, + { 0x8700, 0x13e0, 0x3000 }, + { 0x8700, 0x13de, 0x2000 }, + { 0x0700, 0x13dd, 0x0000 }, + { 0x0700, 0x13df, 0x0000 }, + { 0x8700, 0x13e2, 0x2000 }, + { 0x0700, 0x13e1, 0x0000 }, + { 0x0700, 0x13e3, 0x0000 }, + { 0x8700, 0x13e8, 0x3000 }, + { 0x8700, 0x13e6, 0x2000 }, + { 0x0700, 0x13e5, 0x0000 }, + { 0x0700, 0x13e7, 0x0000 }, + { 0x8700, 0x13ea, 0x2000 }, + { 0x0700, 0x13e9, 0x0000 }, + { 0x0700, 0x13eb, 0x0000 }, + { 0x8700, 0x1408, 0x5000 }, + { 0x8700, 0x13f4, 0x4000 }, + { 0x8700, 0x13f0, 0x3000 }, + { 0x8700, 0x13ee, 0x2000 }, + { 0x0700, 0x13ed, 0x0000 }, + { 0x0700, 0x13ef, 0x0000 }, + { 0x8700, 0x13f2, 0x2000 }, + { 0x0700, 0x13f1, 0x0000 }, + { 0x0700, 0x13f3, 0x0000 }, + { 0x8700, 0x1404, 0x3000 }, + { 0x8700, 0x1402, 0x2000 }, + { 0x0700, 0x1401, 0x0000 }, + { 0x0700, 0x1403, 0x0000 }, + { 0x8700, 0x1406, 0x2000 }, + { 0x0700, 0x1405, 0x0000 }, + { 0x0700, 0x1407, 0x0000 }, + { 0x8700, 0x1410, 0x4000 }, + { 0x8700, 0x140c, 0x3000 }, + { 0x8700, 0x140a, 0x2000 }, + { 0x0700, 0x1409, 0x0000 }, + { 0x0700, 0x140b, 0x0000 }, + { 0x8700, 0x140e, 0x2000 }, + { 0x0700, 0x140d, 0x0000 }, + { 0x0700, 0x140f, 0x0000 }, + { 0x8700, 0x1414, 0x3000 }, + { 0x8700, 0x1412, 0x2000 }, + { 0x0700, 0x1411, 0x0000 }, + { 0x0700, 0x1413, 0x0000 }, + { 0x8700, 0x1416, 0x2000 }, + { 0x0700, 0x1415, 0x0000 }, + { 0x0700, 0x1417, 0x0000 }, + { 0x8700, 0x1438, 0x6000 }, + { 0x8700, 0x1428, 0x5000 }, + { 0x8700, 0x1420, 0x4000 }, + { 0x8700, 0x141c, 0x3000 }, + { 0x8700, 0x141a, 0x2000 }, + { 0x0700, 0x1419, 0x0000 }, + { 0x0700, 0x141b, 0x0000 }, + { 0x8700, 0x141e, 0x2000 }, + { 0x0700, 0x141d, 0x0000 }, + { 0x0700, 0x141f, 0x0000 }, + { 0x8700, 0x1424, 0x3000 }, + { 0x8700, 0x1422, 0x2000 }, + { 0x0700, 0x1421, 0x0000 }, + { 0x0700, 0x1423, 0x0000 }, + { 0x8700, 0x1426, 0x2000 }, + { 0x0700, 0x1425, 0x0000 }, + { 0x0700, 0x1427, 0x0000 }, + { 0x8700, 0x1430, 0x4000 }, + { 0x8700, 0x142c, 0x3000 }, + { 0x8700, 0x142a, 0x2000 }, + { 0x0700, 0x1429, 0x0000 }, + { 0x0700, 0x142b, 0x0000 }, + { 0x8700, 0x142e, 0x2000 }, + { 0x0700, 0x142d, 0x0000 }, + { 0x0700, 0x142f, 0x0000 }, + { 0x8700, 0x1434, 0x3000 }, + { 0x8700, 0x1432, 0x2000 }, + { 0x0700, 0x1431, 0x0000 }, + { 0x0700, 0x1433, 0x0000 }, + { 0x8700, 0x1436, 0x2000 }, + { 0x0700, 0x1435, 0x0000 }, + { 0x0700, 0x1437, 0x0000 }, + { 0x8700, 0x1448, 0x5000 }, + { 0x8700, 0x1440, 0x4000 }, + { 0x8700, 0x143c, 0x3000 }, + { 0x8700, 0x143a, 0x2000 }, + { 0x0700, 0x1439, 0x0000 }, + { 0x0700, 0x143b, 0x0000 }, + { 0x8700, 0x143e, 0x2000 }, + { 0x0700, 0x143d, 0x0000 }, + { 0x0700, 0x143f, 0x0000 }, + { 0x8700, 0x1444, 0x3000 }, + { 0x8700, 0x1442, 0x2000 }, + { 0x0700, 0x1441, 0x0000 }, + { 0x0700, 0x1443, 0x0000 }, + { 0x8700, 0x1446, 0x2000 }, + { 0x0700, 0x1445, 0x0000 }, + { 0x0700, 0x1447, 0x0000 }, + { 0x8700, 0x1450, 0x4000 }, + { 0x8700, 0x144c, 0x3000 }, + { 0x8700, 0x144a, 0x2000 }, + { 0x0700, 0x1449, 0x0000 }, + { 0x0700, 0x144b, 0x0000 }, + { 0x8700, 0x144e, 0x2000 }, + { 0x0700, 0x144d, 0x0000 }, + { 0x0700, 0x144f, 0x0000 }, + { 0x8700, 0x1454, 0x3000 }, + { 0x8700, 0x1452, 0x2000 }, + { 0x0700, 0x1451, 0x0000 }, + { 0x0700, 0x1453, 0x0000 }, + { 0x8700, 0x1456, 0x2000 }, + { 0x0700, 0x1455, 0x0000 }, + { 0x0700, 0x1457, 0x0000 }, + { 0x8700, 0x14d8, 0x8000 }, + { 0x8700, 0x1498, 0x7000 }, + { 0x8700, 0x1478, 0x6000 }, + { 0x8700, 0x1468, 0x5000 }, + { 0x8700, 0x1460, 0x4000 }, + { 0x8700, 0x145c, 0x3000 }, + { 0x8700, 0x145a, 0x2000 }, + { 0x0700, 0x1459, 0x0000 }, + { 0x0700, 0x145b, 0x0000 }, + { 0x8700, 0x145e, 0x2000 }, + { 0x0700, 0x145d, 0x0000 }, + { 0x0700, 0x145f, 0x0000 }, + { 0x8700, 0x1464, 0x3000 }, + { 0x8700, 0x1462, 0x2000 }, + { 0x0700, 0x1461, 0x0000 }, + { 0x0700, 0x1463, 0x0000 }, + { 0x8700, 0x1466, 0x2000 }, + { 0x0700, 0x1465, 0x0000 }, + { 0x0700, 0x1467, 0x0000 }, + { 0x8700, 0x1470, 0x4000 }, + { 0x8700, 0x146c, 0x3000 }, + { 0x8700, 0x146a, 0x2000 }, + { 0x0700, 0x1469, 0x0000 }, + { 0x0700, 0x146b, 0x0000 }, + { 0x8700, 0x146e, 0x2000 }, + { 0x0700, 0x146d, 0x0000 }, + { 0x0700, 0x146f, 0x0000 }, + { 0x8700, 0x1474, 0x3000 }, + { 0x8700, 0x1472, 0x2000 }, + { 0x0700, 0x1471, 0x0000 }, + { 0x0700, 0x1473, 0x0000 }, + { 0x8700, 0x1476, 0x2000 }, + { 0x0700, 0x1475, 0x0000 }, + { 0x0700, 0x1477, 0x0000 }, + { 0x8700, 0x1488, 0x5000 }, + { 0x8700, 0x1480, 0x4000 }, + { 0x8700, 0x147c, 0x3000 }, + { 0x8700, 0x147a, 0x2000 }, + { 0x0700, 0x1479, 0x0000 }, + { 0x0700, 0x147b, 0x0000 }, + { 0x8700, 0x147e, 0x2000 }, + { 0x0700, 0x147d, 0x0000 }, + { 0x0700, 0x147f, 0x0000 }, + { 0x8700, 0x1484, 0x3000 }, + { 0x8700, 0x1482, 0x2000 }, + { 0x0700, 0x1481, 0x0000 }, + { 0x0700, 0x1483, 0x0000 }, + { 0x8700, 0x1486, 0x2000 }, + { 0x0700, 0x1485, 0x0000 }, + { 0x0700, 0x1487, 0x0000 }, + { 0x8700, 0x1490, 0x4000 }, + { 0x8700, 0x148c, 0x3000 }, + { 0x8700, 0x148a, 0x2000 }, + { 0x0700, 0x1489, 0x0000 }, + { 0x0700, 0x148b, 0x0000 }, + { 0x8700, 0x148e, 0x2000 }, + { 0x0700, 0x148d, 0x0000 }, + { 0x0700, 0x148f, 0x0000 }, + { 0x8700, 0x1494, 0x3000 }, + { 0x8700, 0x1492, 0x2000 }, + { 0x0700, 0x1491, 0x0000 }, + { 0x0700, 0x1493, 0x0000 }, + { 0x8700, 0x1496, 0x2000 }, + { 0x0700, 0x1495, 0x0000 }, + { 0x0700, 0x1497, 0x0000 }, + { 0x8700, 0x14b8, 0x6000 }, + { 0x8700, 0x14a8, 0x5000 }, + { 0x8700, 0x14a0, 0x4000 }, + { 0x8700, 0x149c, 0x3000 }, + { 0x8700, 0x149a, 0x2000 }, + { 0x0700, 0x1499, 0x0000 }, + { 0x0700, 0x149b, 0x0000 }, + { 0x8700, 0x149e, 0x2000 }, + { 0x0700, 0x149d, 0x0000 }, + { 0x0700, 0x149f, 0x0000 }, + { 0x8700, 0x14a4, 0x3000 }, + { 0x8700, 0x14a2, 0x2000 }, + { 0x0700, 0x14a1, 0x0000 }, + { 0x0700, 0x14a3, 0x0000 }, + { 0x8700, 0x14a6, 0x2000 }, + { 0x0700, 0x14a5, 0x0000 }, + { 0x0700, 0x14a7, 0x0000 }, + { 0x8700, 0x14b0, 0x4000 }, + { 0x8700, 0x14ac, 0x3000 }, + { 0x8700, 0x14aa, 0x2000 }, + { 0x0700, 0x14a9, 0x0000 }, + { 0x0700, 0x14ab, 0x0000 }, + { 0x8700, 0x14ae, 0x2000 }, + { 0x0700, 0x14ad, 0x0000 }, + { 0x0700, 0x14af, 0x0000 }, + { 0x8700, 0x14b4, 0x3000 }, + { 0x8700, 0x14b2, 0x2000 }, + { 0x0700, 0x14b1, 0x0000 }, + { 0x0700, 0x14b3, 0x0000 }, + { 0x8700, 0x14b6, 0x2000 }, + { 0x0700, 0x14b5, 0x0000 }, + { 0x0700, 0x14b7, 0x0000 }, + { 0x8700, 0x14c8, 0x5000 }, + { 0x8700, 0x14c0, 0x4000 }, + { 0x8700, 0x14bc, 0x3000 }, + { 0x8700, 0x14ba, 0x2000 }, + { 0x0700, 0x14b9, 0x0000 }, + { 0x0700, 0x14bb, 0x0000 }, + { 0x8700, 0x14be, 0x2000 }, + { 0x0700, 0x14bd, 0x0000 }, + { 0x0700, 0x14bf, 0x0000 }, + { 0x8700, 0x14c4, 0x3000 }, + { 0x8700, 0x14c2, 0x2000 }, + { 0x0700, 0x14c1, 0x0000 }, + { 0x0700, 0x14c3, 0x0000 }, + { 0x8700, 0x14c6, 0x2000 }, + { 0x0700, 0x14c5, 0x0000 }, + { 0x0700, 0x14c7, 0x0000 }, + { 0x8700, 0x14d0, 0x4000 }, + { 0x8700, 0x14cc, 0x3000 }, + { 0x8700, 0x14ca, 0x2000 }, + { 0x0700, 0x14c9, 0x0000 }, + { 0x0700, 0x14cb, 0x0000 }, + { 0x8700, 0x14ce, 0x2000 }, + { 0x0700, 0x14cd, 0x0000 }, + { 0x0700, 0x14cf, 0x0000 }, + { 0x8700, 0x14d4, 0x3000 }, + { 0x8700, 0x14d2, 0x2000 }, + { 0x0700, 0x14d1, 0x0000 }, + { 0x0700, 0x14d3, 0x0000 }, + { 0x8700, 0x14d6, 0x2000 }, + { 0x0700, 0x14d5, 0x0000 }, + { 0x0700, 0x14d7, 0x0000 }, + { 0x8700, 0x1518, 0x7000 }, + { 0x8700, 0x14f8, 0x6000 }, + { 0x8700, 0x14e8, 0x5000 }, + { 0x8700, 0x14e0, 0x4000 }, + { 0x8700, 0x14dc, 0x3000 }, + { 0x8700, 0x14da, 0x2000 }, + { 0x0700, 0x14d9, 0x0000 }, + { 0x0700, 0x14db, 0x0000 }, + { 0x8700, 0x14de, 0x2000 }, + { 0x0700, 0x14dd, 0x0000 }, + { 0x0700, 0x14df, 0x0000 }, + { 0x8700, 0x14e4, 0x3000 }, + { 0x8700, 0x14e2, 0x2000 }, + { 0x0700, 0x14e1, 0x0000 }, + { 0x0700, 0x14e3, 0x0000 }, + { 0x8700, 0x14e6, 0x2000 }, + { 0x0700, 0x14e5, 0x0000 }, + { 0x0700, 0x14e7, 0x0000 }, + { 0x8700, 0x14f0, 0x4000 }, + { 0x8700, 0x14ec, 0x3000 }, + { 0x8700, 0x14ea, 0x2000 }, + { 0x0700, 0x14e9, 0x0000 }, + { 0x0700, 0x14eb, 0x0000 }, + { 0x8700, 0x14ee, 0x2000 }, + { 0x0700, 0x14ed, 0x0000 }, + { 0x0700, 0x14ef, 0x0000 }, + { 0x8700, 0x14f4, 0x3000 }, + { 0x8700, 0x14f2, 0x2000 }, + { 0x0700, 0x14f1, 0x0000 }, + { 0x0700, 0x14f3, 0x0000 }, + { 0x8700, 0x14f6, 0x2000 }, + { 0x0700, 0x14f5, 0x0000 }, + { 0x0700, 0x14f7, 0x0000 }, + { 0x8700, 0x1508, 0x5000 }, + { 0x8700, 0x1500, 0x4000 }, + { 0x8700, 0x14fc, 0x3000 }, + { 0x8700, 0x14fa, 0x2000 }, + { 0x0700, 0x14f9, 0x0000 }, + { 0x0700, 0x14fb, 0x0000 }, + { 0x8700, 0x14fe, 0x2000 }, + { 0x0700, 0x14fd, 0x0000 }, + { 0x0700, 0x14ff, 0x0000 }, + { 0x8700, 0x1504, 0x3000 }, + { 0x8700, 0x1502, 0x2000 }, + { 0x0700, 0x1501, 0x0000 }, + { 0x0700, 0x1503, 0x0000 }, + { 0x8700, 0x1506, 0x2000 }, + { 0x0700, 0x1505, 0x0000 }, + { 0x0700, 0x1507, 0x0000 }, + { 0x8700, 0x1510, 0x4000 }, + { 0x8700, 0x150c, 0x3000 }, + { 0x8700, 0x150a, 0x2000 }, + { 0x0700, 0x1509, 0x0000 }, + { 0x0700, 0x150b, 0x0000 }, + { 0x8700, 0x150e, 0x2000 }, + { 0x0700, 0x150d, 0x0000 }, + { 0x0700, 0x150f, 0x0000 }, + { 0x8700, 0x1514, 0x3000 }, + { 0x8700, 0x1512, 0x2000 }, + { 0x0700, 0x1511, 0x0000 }, + { 0x0700, 0x1513, 0x0000 }, + { 0x8700, 0x1516, 0x2000 }, + { 0x0700, 0x1515, 0x0000 }, + { 0x0700, 0x1517, 0x0000 }, + { 0x8700, 0x1538, 0x6000 }, + { 0x8700, 0x1528, 0x5000 }, + { 0x8700, 0x1520, 0x4000 }, + { 0x8700, 0x151c, 0x3000 }, + { 0x8700, 0x151a, 0x2000 }, + { 0x0700, 0x1519, 0x0000 }, + { 0x0700, 0x151b, 0x0000 }, + { 0x8700, 0x151e, 0x2000 }, + { 0x0700, 0x151d, 0x0000 }, + { 0x0700, 0x151f, 0x0000 }, + { 0x8700, 0x1524, 0x3000 }, + { 0x8700, 0x1522, 0x2000 }, + { 0x0700, 0x1521, 0x0000 }, + { 0x0700, 0x1523, 0x0000 }, + { 0x8700, 0x1526, 0x2000 }, + { 0x0700, 0x1525, 0x0000 }, + { 0x0700, 0x1527, 0x0000 }, + { 0x8700, 0x1530, 0x4000 }, + { 0x8700, 0x152c, 0x3000 }, + { 0x8700, 0x152a, 0x2000 }, + { 0x0700, 0x1529, 0x0000 }, + { 0x0700, 0x152b, 0x0000 }, + { 0x8700, 0x152e, 0x2000 }, + { 0x0700, 0x152d, 0x0000 }, + { 0x0700, 0x152f, 0x0000 }, + { 0x8700, 0x1534, 0x3000 }, + { 0x8700, 0x1532, 0x2000 }, + { 0x0700, 0x1531, 0x0000 }, + { 0x0700, 0x1533, 0x0000 }, + { 0x8700, 0x1536, 0x2000 }, + { 0x0700, 0x1535, 0x0000 }, + { 0x0700, 0x1537, 0x0000 }, + { 0x8700, 0x1548, 0x5000 }, + { 0x8700, 0x1540, 0x4000 }, + { 0x8700, 0x153c, 0x3000 }, + { 0x8700, 0x153a, 0x2000 }, + { 0x0700, 0x1539, 0x0000 }, + { 0x0700, 0x153b, 0x0000 }, + { 0x8700, 0x153e, 0x2000 }, + { 0x0700, 0x153d, 0x0000 }, + { 0x0700, 0x153f, 0x0000 }, + { 0x8700, 0x1544, 0x3000 }, + { 0x8700, 0x1542, 0x2000 }, + { 0x0700, 0x1541, 0x0000 }, + { 0x0700, 0x1543, 0x0000 }, + { 0x8700, 0x1546, 0x2000 }, + { 0x0700, 0x1545, 0x0000 }, + { 0x0700, 0x1547, 0x0000 }, + { 0x8700, 0x1550, 0x4000 }, + { 0x8700, 0x154c, 0x3000 }, + { 0x8700, 0x154a, 0x2000 }, + { 0x0700, 0x1549, 0x0000 }, + { 0x0700, 0x154b, 0x0000 }, + { 0x8700, 0x154e, 0x2000 }, + { 0x0700, 0x154d, 0x0000 }, + { 0x0700, 0x154f, 0x0000 }, + { 0x8700, 0x1554, 0x3000 }, + { 0x8700, 0x1552, 0x2000 }, + { 0x0700, 0x1551, 0x0000 }, + { 0x0700, 0x1553, 0x0000 }, + { 0x8700, 0x1556, 0x2000 }, + { 0x0700, 0x1555, 0x0000 }, + { 0x0700, 0x1557, 0x0000 }, + { 0x9900, 0x22ae, 0xc000 }, + { 0x8900, 0x1e24, 0xb001 }, + { 0x8700, 0x17a2, 0xa000 }, + { 0x8700, 0x1658, 0x9000 }, + { 0x8700, 0x15d8, 0x8000 }, + { 0x8700, 0x1598, 0x7000 }, + { 0x8700, 0x1578, 0x6000 }, + { 0x8700, 0x1568, 0x5000 }, + { 0x8700, 0x1560, 0x4000 }, + { 0x8700, 0x155c, 0x3000 }, + { 0x8700, 0x155a, 0x2000 }, + { 0x0700, 0x1559, 0x0000 }, + { 0x0700, 0x155b, 0x0000 }, + { 0x8700, 0x155e, 0x2000 }, + { 0x0700, 0x155d, 0x0000 }, + { 0x0700, 0x155f, 0x0000 }, + { 0x8700, 0x1564, 0x3000 }, + { 0x8700, 0x1562, 0x2000 }, + { 0x0700, 0x1561, 0x0000 }, + { 0x0700, 0x1563, 0x0000 }, + { 0x8700, 0x1566, 0x2000 }, + { 0x0700, 0x1565, 0x0000 }, + { 0x0700, 0x1567, 0x0000 }, + { 0x8700, 0x1570, 0x4000 }, + { 0x8700, 0x156c, 0x3000 }, + { 0x8700, 0x156a, 0x2000 }, + { 0x0700, 0x1569, 0x0000 }, + { 0x0700, 0x156b, 0x0000 }, + { 0x8700, 0x156e, 0x2000 }, + { 0x0700, 0x156d, 0x0000 }, + { 0x0700, 0x156f, 0x0000 }, + { 0x8700, 0x1574, 0x3000 }, + { 0x8700, 0x1572, 0x2000 }, + { 0x0700, 0x1571, 0x0000 }, + { 0x0700, 0x1573, 0x0000 }, + { 0x8700, 0x1576, 0x2000 }, + { 0x0700, 0x1575, 0x0000 }, + { 0x0700, 0x1577, 0x0000 }, + { 0x8700, 0x1588, 0x5000 }, + { 0x8700, 0x1580, 0x4000 }, + { 0x8700, 0x157c, 0x3000 }, + { 0x8700, 0x157a, 0x2000 }, + { 0x0700, 0x1579, 0x0000 }, + { 0x0700, 0x157b, 0x0000 }, + { 0x8700, 0x157e, 0x2000 }, + { 0x0700, 0x157d, 0x0000 }, + { 0x0700, 0x157f, 0x0000 }, + { 0x8700, 0x1584, 0x3000 }, + { 0x8700, 0x1582, 0x2000 }, + { 0x0700, 0x1581, 0x0000 }, + { 0x0700, 0x1583, 0x0000 }, + { 0x8700, 0x1586, 0x2000 }, + { 0x0700, 0x1585, 0x0000 }, + { 0x0700, 0x1587, 0x0000 }, + { 0x8700, 0x1590, 0x4000 }, + { 0x8700, 0x158c, 0x3000 }, + { 0x8700, 0x158a, 0x2000 }, + { 0x0700, 0x1589, 0x0000 }, + { 0x0700, 0x158b, 0x0000 }, + { 0x8700, 0x158e, 0x2000 }, + { 0x0700, 0x158d, 0x0000 }, + { 0x0700, 0x158f, 0x0000 }, + { 0x8700, 0x1594, 0x3000 }, + { 0x8700, 0x1592, 0x2000 }, + { 0x0700, 0x1591, 0x0000 }, + { 0x0700, 0x1593, 0x0000 }, + { 0x8700, 0x1596, 0x2000 }, + { 0x0700, 0x1595, 0x0000 }, + { 0x0700, 0x1597, 0x0000 }, + { 0x8700, 0x15b8, 0x6000 }, + { 0x8700, 0x15a8, 0x5000 }, + { 0x8700, 0x15a0, 0x4000 }, + { 0x8700, 0x159c, 0x3000 }, + { 0x8700, 0x159a, 0x2000 }, + { 0x0700, 0x1599, 0x0000 }, + { 0x0700, 0x159b, 0x0000 }, + { 0x8700, 0x159e, 0x2000 }, + { 0x0700, 0x159d, 0x0000 }, + { 0x0700, 0x159f, 0x0000 }, + { 0x8700, 0x15a4, 0x3000 }, + { 0x8700, 0x15a2, 0x2000 }, + { 0x0700, 0x15a1, 0x0000 }, + { 0x0700, 0x15a3, 0x0000 }, + { 0x8700, 0x15a6, 0x2000 }, + { 0x0700, 0x15a5, 0x0000 }, + { 0x0700, 0x15a7, 0x0000 }, + { 0x8700, 0x15b0, 0x4000 }, + { 0x8700, 0x15ac, 0x3000 }, + { 0x8700, 0x15aa, 0x2000 }, + { 0x0700, 0x15a9, 0x0000 }, + { 0x0700, 0x15ab, 0x0000 }, + { 0x8700, 0x15ae, 0x2000 }, + { 0x0700, 0x15ad, 0x0000 }, + { 0x0700, 0x15af, 0x0000 }, + { 0x8700, 0x15b4, 0x3000 }, + { 0x8700, 0x15b2, 0x2000 }, + { 0x0700, 0x15b1, 0x0000 }, + { 0x0700, 0x15b3, 0x0000 }, + { 0x8700, 0x15b6, 0x2000 }, + { 0x0700, 0x15b5, 0x0000 }, + { 0x0700, 0x15b7, 0x0000 }, + { 0x8700, 0x15c8, 0x5000 }, + { 0x8700, 0x15c0, 0x4000 }, + { 0x8700, 0x15bc, 0x3000 }, + { 0x8700, 0x15ba, 0x2000 }, + { 0x0700, 0x15b9, 0x0000 }, + { 0x0700, 0x15bb, 0x0000 }, + { 0x8700, 0x15be, 0x2000 }, + { 0x0700, 0x15bd, 0x0000 }, + { 0x0700, 0x15bf, 0x0000 }, + { 0x8700, 0x15c4, 0x3000 }, + { 0x8700, 0x15c2, 0x2000 }, + { 0x0700, 0x15c1, 0x0000 }, + { 0x0700, 0x15c3, 0x0000 }, + { 0x8700, 0x15c6, 0x2000 }, + { 0x0700, 0x15c5, 0x0000 }, + { 0x0700, 0x15c7, 0x0000 }, + { 0x8700, 0x15d0, 0x4000 }, + { 0x8700, 0x15cc, 0x3000 }, + { 0x8700, 0x15ca, 0x2000 }, + { 0x0700, 0x15c9, 0x0000 }, + { 0x0700, 0x15cb, 0x0000 }, + { 0x8700, 0x15ce, 0x2000 }, + { 0x0700, 0x15cd, 0x0000 }, + { 0x0700, 0x15cf, 0x0000 }, + { 0x8700, 0x15d4, 0x3000 }, + { 0x8700, 0x15d2, 0x2000 }, + { 0x0700, 0x15d1, 0x0000 }, + { 0x0700, 0x15d3, 0x0000 }, + { 0x8700, 0x15d6, 0x2000 }, + { 0x0700, 0x15d5, 0x0000 }, + { 0x0700, 0x15d7, 0x0000 }, + { 0x8700, 0x1618, 0x7000 }, + { 0x8700, 0x15f8, 0x6000 }, + { 0x8700, 0x15e8, 0x5000 }, + { 0x8700, 0x15e0, 0x4000 }, + { 0x8700, 0x15dc, 0x3000 }, + { 0x8700, 0x15da, 0x2000 }, + { 0x0700, 0x15d9, 0x0000 }, + { 0x0700, 0x15db, 0x0000 }, + { 0x8700, 0x15de, 0x2000 }, + { 0x0700, 0x15dd, 0x0000 }, + { 0x0700, 0x15df, 0x0000 }, + { 0x8700, 0x15e4, 0x3000 }, + { 0x8700, 0x15e2, 0x2000 }, + { 0x0700, 0x15e1, 0x0000 }, + { 0x0700, 0x15e3, 0x0000 }, + { 0x8700, 0x15e6, 0x2000 }, + { 0x0700, 0x15e5, 0x0000 }, + { 0x0700, 0x15e7, 0x0000 }, + { 0x8700, 0x15f0, 0x4000 }, + { 0x8700, 0x15ec, 0x3000 }, + { 0x8700, 0x15ea, 0x2000 }, + { 0x0700, 0x15e9, 0x0000 }, + { 0x0700, 0x15eb, 0x0000 }, + { 0x8700, 0x15ee, 0x2000 }, + { 0x0700, 0x15ed, 0x0000 }, + { 0x0700, 0x15ef, 0x0000 }, + { 0x8700, 0x15f4, 0x3000 }, + { 0x8700, 0x15f2, 0x2000 }, + { 0x0700, 0x15f1, 0x0000 }, + { 0x0700, 0x15f3, 0x0000 }, + { 0x8700, 0x15f6, 0x2000 }, + { 0x0700, 0x15f5, 0x0000 }, + { 0x0700, 0x15f7, 0x0000 }, + { 0x8700, 0x1608, 0x5000 }, + { 0x8700, 0x1600, 0x4000 }, + { 0x8700, 0x15fc, 0x3000 }, + { 0x8700, 0x15fa, 0x2000 }, + { 0x0700, 0x15f9, 0x0000 }, + { 0x0700, 0x15fb, 0x0000 }, + { 0x8700, 0x15fe, 0x2000 }, + { 0x0700, 0x15fd, 0x0000 }, + { 0x0700, 0x15ff, 0x0000 }, + { 0x8700, 0x1604, 0x3000 }, + { 0x8700, 0x1602, 0x2000 }, + { 0x0700, 0x1601, 0x0000 }, + { 0x0700, 0x1603, 0x0000 }, + { 0x8700, 0x1606, 0x2000 }, + { 0x0700, 0x1605, 0x0000 }, + { 0x0700, 0x1607, 0x0000 }, + { 0x8700, 0x1610, 0x4000 }, + { 0x8700, 0x160c, 0x3000 }, + { 0x8700, 0x160a, 0x2000 }, + { 0x0700, 0x1609, 0x0000 }, + { 0x0700, 0x160b, 0x0000 }, + { 0x8700, 0x160e, 0x2000 }, + { 0x0700, 0x160d, 0x0000 }, + { 0x0700, 0x160f, 0x0000 }, + { 0x8700, 0x1614, 0x3000 }, + { 0x8700, 0x1612, 0x2000 }, + { 0x0700, 0x1611, 0x0000 }, + { 0x0700, 0x1613, 0x0000 }, + { 0x8700, 0x1616, 0x2000 }, + { 0x0700, 0x1615, 0x0000 }, + { 0x0700, 0x1617, 0x0000 }, + { 0x8700, 0x1638, 0x6000 }, + { 0x8700, 0x1628, 0x5000 }, + { 0x8700, 0x1620, 0x4000 }, + { 0x8700, 0x161c, 0x3000 }, + { 0x8700, 0x161a, 0x2000 }, + { 0x0700, 0x1619, 0x0000 }, + { 0x0700, 0x161b, 0x0000 }, + { 0x8700, 0x161e, 0x2000 }, + { 0x0700, 0x161d, 0x0000 }, + { 0x0700, 0x161f, 0x0000 }, + { 0x8700, 0x1624, 0x3000 }, + { 0x8700, 0x1622, 0x2000 }, + { 0x0700, 0x1621, 0x0000 }, + { 0x0700, 0x1623, 0x0000 }, + { 0x8700, 0x1626, 0x2000 }, + { 0x0700, 0x1625, 0x0000 }, + { 0x0700, 0x1627, 0x0000 }, + { 0x8700, 0x1630, 0x4000 }, + { 0x8700, 0x162c, 0x3000 }, + { 0x8700, 0x162a, 0x2000 }, + { 0x0700, 0x1629, 0x0000 }, + { 0x0700, 0x162b, 0x0000 }, + { 0x8700, 0x162e, 0x2000 }, + { 0x0700, 0x162d, 0x0000 }, + { 0x0700, 0x162f, 0x0000 }, + { 0x8700, 0x1634, 0x3000 }, + { 0x8700, 0x1632, 0x2000 }, + { 0x0700, 0x1631, 0x0000 }, + { 0x0700, 0x1633, 0x0000 }, + { 0x8700, 0x1636, 0x2000 }, + { 0x0700, 0x1635, 0x0000 }, + { 0x0700, 0x1637, 0x0000 }, + { 0x8700, 0x1648, 0x5000 }, + { 0x8700, 0x1640, 0x4000 }, + { 0x8700, 0x163c, 0x3000 }, + { 0x8700, 0x163a, 0x2000 }, + { 0x0700, 0x1639, 0x0000 }, + { 0x0700, 0x163b, 0x0000 }, + { 0x8700, 0x163e, 0x2000 }, + { 0x0700, 0x163d, 0x0000 }, + { 0x0700, 0x163f, 0x0000 }, + { 0x8700, 0x1644, 0x3000 }, + { 0x8700, 0x1642, 0x2000 }, + { 0x0700, 0x1641, 0x0000 }, + { 0x0700, 0x1643, 0x0000 }, + { 0x8700, 0x1646, 0x2000 }, + { 0x0700, 0x1645, 0x0000 }, + { 0x0700, 0x1647, 0x0000 }, + { 0x8700, 0x1650, 0x4000 }, + { 0x8700, 0x164c, 0x3000 }, + { 0x8700, 0x164a, 0x2000 }, + { 0x0700, 0x1649, 0x0000 }, + { 0x0700, 0x164b, 0x0000 }, + { 0x8700, 0x164e, 0x2000 }, + { 0x0700, 0x164d, 0x0000 }, + { 0x0700, 0x164f, 0x0000 }, + { 0x8700, 0x1654, 0x3000 }, + { 0x8700, 0x1652, 0x2000 }, + { 0x0700, 0x1651, 0x0000 }, + { 0x0700, 0x1653, 0x0000 }, + { 0x8700, 0x1656, 0x2000 }, + { 0x0700, 0x1655, 0x0000 }, + { 0x0700, 0x1657, 0x0000 }, + { 0x8700, 0x16e4, 0x8000 }, + { 0x8700, 0x16a4, 0x7000 }, + { 0x8700, 0x1681, 0x6000 }, + { 0x8700, 0x1668, 0x5000 }, + { 0x8700, 0x1660, 0x4000 }, + { 0x8700, 0x165c, 0x3000 }, + { 0x8700, 0x165a, 0x2000 }, + { 0x0700, 0x1659, 0x0000 }, + { 0x0700, 0x165b, 0x0000 }, + { 0x8700, 0x165e, 0x2000 }, + { 0x0700, 0x165d, 0x0000 }, + { 0x0700, 0x165f, 0x0000 }, + { 0x8700, 0x1664, 0x3000 }, + { 0x8700, 0x1662, 0x2000 }, + { 0x0700, 0x1661, 0x0000 }, + { 0x0700, 0x1663, 0x0000 }, + { 0x8700, 0x1666, 0x2000 }, + { 0x0700, 0x1665, 0x0000 }, + { 0x0700, 0x1667, 0x0000 }, + { 0x8700, 0x1670, 0x4000 }, + { 0x8700, 0x166c, 0x3000 }, + { 0x8700, 0x166a, 0x2000 }, + { 0x0700, 0x1669, 0x0000 }, + { 0x0700, 0x166b, 0x0000 }, + { 0x9500, 0x166e, 0x2000 }, + { 0x1500, 0x166d, 0x0000 }, + { 0x0700, 0x166f, 0x0000 }, + { 0x8700, 0x1674, 0x3000 }, + { 0x8700, 0x1672, 0x2000 }, + { 0x0700, 0x1671, 0x0000 }, + { 0x0700, 0x1673, 0x0000 }, + { 0x8700, 0x1676, 0x2000 }, + { 0x0700, 0x1675, 0x0000 }, + { 0x1d00, 0x1680, 0x0000 }, + { 0x8700, 0x1691, 0x5000 }, + { 0x8700, 0x1689, 0x4000 }, + { 0x8700, 0x1685, 0x3000 }, + { 0x8700, 0x1683, 0x2000 }, + { 0x0700, 0x1682, 0x0000 }, + { 0x0700, 0x1684, 0x0000 }, + { 0x8700, 0x1687, 0x2000 }, + { 0x0700, 0x1686, 0x0000 }, + { 0x0700, 0x1688, 0x0000 }, + { 0x8700, 0x168d, 0x3000 }, + { 0x8700, 0x168b, 0x2000 }, + { 0x0700, 0x168a, 0x0000 }, + { 0x0700, 0x168c, 0x0000 }, + { 0x8700, 0x168f, 0x2000 }, + { 0x0700, 0x168e, 0x0000 }, + { 0x0700, 0x1690, 0x0000 }, + { 0x8700, 0x1699, 0x4000 }, + { 0x8700, 0x1695, 0x3000 }, + { 0x8700, 0x1693, 0x2000 }, + { 0x0700, 0x1692, 0x0000 }, + { 0x0700, 0x1694, 0x0000 }, + { 0x8700, 0x1697, 0x2000 }, + { 0x0700, 0x1696, 0x0000 }, + { 0x0700, 0x1698, 0x0000 }, + { 0x8700, 0x16a0, 0x3000 }, + { 0x9600, 0x169b, 0x2000 }, + { 0x0700, 0x169a, 0x0000 }, + { 0x1200, 0x169c, 0x0000 }, + { 0x8700, 0x16a2, 0x2000 }, + { 0x0700, 0x16a1, 0x0000 }, + { 0x0700, 0x16a3, 0x0000 }, + { 0x8700, 0x16c4, 0x6000 }, + { 0x8700, 0x16b4, 0x5000 }, + { 0x8700, 0x16ac, 0x4000 }, + { 0x8700, 0x16a8, 0x3000 }, + { 0x8700, 0x16a6, 0x2000 }, + { 0x0700, 0x16a5, 0x0000 }, + { 0x0700, 0x16a7, 0x0000 }, + { 0x8700, 0x16aa, 0x2000 }, + { 0x0700, 0x16a9, 0x0000 }, + { 0x0700, 0x16ab, 0x0000 }, + { 0x8700, 0x16b0, 0x3000 }, + { 0x8700, 0x16ae, 0x2000 }, + { 0x0700, 0x16ad, 0x0000 }, + { 0x0700, 0x16af, 0x0000 }, + { 0x8700, 0x16b2, 0x2000 }, + { 0x0700, 0x16b1, 0x0000 }, + { 0x0700, 0x16b3, 0x0000 }, + { 0x8700, 0x16bc, 0x4000 }, + { 0x8700, 0x16b8, 0x3000 }, + { 0x8700, 0x16b6, 0x2000 }, + { 0x0700, 0x16b5, 0x0000 }, + { 0x0700, 0x16b7, 0x0000 }, + { 0x8700, 0x16ba, 0x2000 }, + { 0x0700, 0x16b9, 0x0000 }, + { 0x0700, 0x16bb, 0x0000 }, + { 0x8700, 0x16c0, 0x3000 }, + { 0x8700, 0x16be, 0x2000 }, + { 0x0700, 0x16bd, 0x0000 }, + { 0x0700, 0x16bf, 0x0000 }, + { 0x8700, 0x16c2, 0x2000 }, + { 0x0700, 0x16c1, 0x0000 }, + { 0x0700, 0x16c3, 0x0000 }, + { 0x8700, 0x16d4, 0x5000 }, + { 0x8700, 0x16cc, 0x4000 }, + { 0x8700, 0x16c8, 0x3000 }, + { 0x8700, 0x16c6, 0x2000 }, + { 0x0700, 0x16c5, 0x0000 }, + { 0x0700, 0x16c7, 0x0000 }, + { 0x8700, 0x16ca, 0x2000 }, + { 0x0700, 0x16c9, 0x0000 }, + { 0x0700, 0x16cb, 0x0000 }, + { 0x8700, 0x16d0, 0x3000 }, + { 0x8700, 0x16ce, 0x2000 }, + { 0x0700, 0x16cd, 0x0000 }, + { 0x0700, 0x16cf, 0x0000 }, + { 0x8700, 0x16d2, 0x2000 }, + { 0x0700, 0x16d1, 0x0000 }, + { 0x0700, 0x16d3, 0x0000 }, + { 0x8700, 0x16dc, 0x4000 }, + { 0x8700, 0x16d8, 0x3000 }, + { 0x8700, 0x16d6, 0x2000 }, + { 0x0700, 0x16d5, 0x0000 }, + { 0x0700, 0x16d7, 0x0000 }, + { 0x8700, 0x16da, 0x2000 }, + { 0x0700, 0x16d9, 0x0000 }, + { 0x0700, 0x16db, 0x0000 }, + { 0x8700, 0x16e0, 0x3000 }, + { 0x8700, 0x16de, 0x2000 }, + { 0x0700, 0x16dd, 0x0000 }, + { 0x0700, 0x16df, 0x0000 }, + { 0x8700, 0x16e2, 0x2000 }, + { 0x0700, 0x16e1, 0x0000 }, + { 0x0700, 0x16e3, 0x0000 }, + { 0x8700, 0x1748, 0x7000 }, + { 0x8c00, 0x1714, 0x6000 }, + { 0x8700, 0x1703, 0x5000 }, + { 0x9500, 0x16ec, 0x4000 }, + { 0x8700, 0x16e8, 0x3000 }, + { 0x8700, 0x16e6, 0x2000 }, + { 0x0700, 0x16e5, 0x0000 }, + { 0x0700, 0x16e7, 0x0000 }, + { 0x8700, 0x16ea, 0x2000 }, + { 0x0700, 0x16e9, 0x0000 }, + { 0x1500, 0x16eb, 0x0000 }, + { 0x8e00, 0x16f0, 0x3000 }, + { 0x8e00, 0x16ee, 0x2000 }, + { 0x1500, 0x16ed, 0x0000 }, + { 0x0e00, 0x16ef, 0x0000 }, + { 0x8700, 0x1701, 0x2000 }, + { 0x0700, 0x1700, 0x0000 }, + { 0x0700, 0x1702, 0x0000 }, + { 0x8700, 0x170b, 0x4000 }, + { 0x8700, 0x1707, 0x3000 }, + { 0x8700, 0x1705, 0x2000 }, + { 0x0700, 0x1704, 0x0000 }, + { 0x0700, 0x1706, 0x0000 }, + { 0x8700, 0x1709, 0x2000 }, + { 0x0700, 0x1708, 0x0000 }, + { 0x0700, 0x170a, 0x0000 }, + { 0x8700, 0x1710, 0x3000 }, + { 0x8700, 0x170e, 0x2000 }, + { 0x0700, 0x170c, 0x0000 }, + { 0x0700, 0x170f, 0x0000 }, + { 0x8c00, 0x1712, 0x2000 }, + { 0x0700, 0x1711, 0x0000 }, + { 0x0c00, 0x1713, 0x0000 }, + { 0x8700, 0x172f, 0x5000 }, + { 0x8700, 0x1727, 0x4000 }, + { 0x8700, 0x1723, 0x3000 }, + { 0x8700, 0x1721, 0x2000 }, + { 0x0700, 0x1720, 0x0000 }, + { 0x0700, 0x1722, 0x0000 }, + { 0x8700, 0x1725, 0x2000 }, + { 0x0700, 0x1724, 0x0000 }, + { 0x0700, 0x1726, 0x0000 }, + { 0x8700, 0x172b, 0x3000 }, + { 0x8700, 0x1729, 0x2000 }, + { 0x0700, 0x1728, 0x0000 }, + { 0x0700, 0x172a, 0x0000 }, + { 0x8700, 0x172d, 0x2000 }, + { 0x0700, 0x172c, 0x0000 }, + { 0x0700, 0x172e, 0x0000 }, + { 0x8700, 0x1740, 0x4000 }, + { 0x8c00, 0x1733, 0x3000 }, + { 0x8700, 0x1731, 0x2000 }, + { 0x0700, 0x1730, 0x0000 }, + { 0x0c00, 0x1732, 0x0000 }, + { 0x9500, 0x1735, 0x2000 }, + { 0x0c00, 0x1734, 0x0000 }, + { 0x1500, 0x1736, 0x0000 }, + { 0x8700, 0x1744, 0x3000 }, + { 0x8700, 0x1742, 0x2000 }, + { 0x0700, 0x1741, 0x0000 }, + { 0x0700, 0x1743, 0x0000 }, + { 0x8700, 0x1746, 0x2000 }, + { 0x0700, 0x1745, 0x0000 }, + { 0x0700, 0x1747, 0x0000 }, + { 0x8700, 0x1782, 0x6000 }, + { 0x8700, 0x1764, 0x5000 }, + { 0x8700, 0x1750, 0x4000 }, + { 0x8700, 0x174c, 0x3000 }, + { 0x8700, 0x174a, 0x2000 }, + { 0x0700, 0x1749, 0x0000 }, + { 0x0700, 0x174b, 0x0000 }, + { 0x8700, 0x174e, 0x2000 }, + { 0x0700, 0x174d, 0x0000 }, + { 0x0700, 0x174f, 0x0000 }, + { 0x8700, 0x1760, 0x3000 }, + { 0x8c00, 0x1752, 0x2000 }, + { 0x0700, 0x1751, 0x0000 }, + { 0x0c00, 0x1753, 0x0000 }, + { 0x8700, 0x1762, 0x2000 }, + { 0x0700, 0x1761, 0x0000 }, + { 0x0700, 0x1763, 0x0000 }, + { 0x8700, 0x176c, 0x4000 }, + { 0x8700, 0x1768, 0x3000 }, + { 0x8700, 0x1766, 0x2000 }, + { 0x0700, 0x1765, 0x0000 }, + { 0x0700, 0x1767, 0x0000 }, + { 0x8700, 0x176a, 0x2000 }, + { 0x0700, 0x1769, 0x0000 }, + { 0x0700, 0x176b, 0x0000 }, + { 0x8c00, 0x1772, 0x3000 }, + { 0x8700, 0x176f, 0x2000 }, + { 0x0700, 0x176e, 0x0000 }, + { 0x0700, 0x1770, 0x0000 }, + { 0x8700, 0x1780, 0x2000 }, + { 0x0c00, 0x1773, 0x0000 }, + { 0x0700, 0x1781, 0x0000 }, + { 0x8700, 0x1792, 0x5000 }, + { 0x8700, 0x178a, 0x4000 }, + { 0x8700, 0x1786, 0x3000 }, + { 0x8700, 0x1784, 0x2000 }, + { 0x0700, 0x1783, 0x0000 }, + { 0x0700, 0x1785, 0x0000 }, + { 0x8700, 0x1788, 0x2000 }, + { 0x0700, 0x1787, 0x0000 }, + { 0x0700, 0x1789, 0x0000 }, + { 0x8700, 0x178e, 0x3000 }, + { 0x8700, 0x178c, 0x2000 }, + { 0x0700, 0x178b, 0x0000 }, + { 0x0700, 0x178d, 0x0000 }, + { 0x8700, 0x1790, 0x2000 }, + { 0x0700, 0x178f, 0x0000 }, + { 0x0700, 0x1791, 0x0000 }, + { 0x8700, 0x179a, 0x4000 }, + { 0x8700, 0x1796, 0x3000 }, + { 0x8700, 0x1794, 0x2000 }, + { 0x0700, 0x1793, 0x0000 }, + { 0x0700, 0x1795, 0x0000 }, + { 0x8700, 0x1798, 0x2000 }, + { 0x0700, 0x1797, 0x0000 }, + { 0x0700, 0x1799, 0x0000 }, + { 0x8700, 0x179e, 0x3000 }, + { 0x8700, 0x179c, 0x2000 }, + { 0x0700, 0x179b, 0x0000 }, + { 0x0700, 0x179d, 0x0000 }, + { 0x8700, 0x17a0, 0x2000 }, + { 0x0700, 0x179f, 0x0000 }, + { 0x0700, 0x17a1, 0x0000 }, + { 0x8700, 0x1915, 0x9000 }, + { 0x8700, 0x1837, 0x8000 }, + { 0x8d00, 0x17e4, 0x7000 }, + { 0x8a00, 0x17c2, 0x6000 }, + { 0x8700, 0x17b2, 0x5000 }, + { 0x8700, 0x17aa, 0x4000 }, + { 0x8700, 0x17a6, 0x3000 }, + { 0x8700, 0x17a4, 0x2000 }, + { 0x0700, 0x17a3, 0x0000 }, + { 0x0700, 0x17a5, 0x0000 }, + { 0x8700, 0x17a8, 0x2000 }, + { 0x0700, 0x17a7, 0x0000 }, + { 0x0700, 0x17a9, 0x0000 }, + { 0x8700, 0x17ae, 0x3000 }, + { 0x8700, 0x17ac, 0x2000 }, + { 0x0700, 0x17ab, 0x0000 }, + { 0x0700, 0x17ad, 0x0000 }, + { 0x8700, 0x17b0, 0x2000 }, + { 0x0700, 0x17af, 0x0000 }, + { 0x0700, 0x17b1, 0x0000 }, + { 0x8c00, 0x17ba, 0x4000 }, + { 0x8a00, 0x17b6, 0x3000 }, + { 0x8100, 0x17b4, 0x2000 }, + { 0x0700, 0x17b3, 0x0000 }, + { 0x0100, 0x17b5, 0x0000 }, + { 0x8c00, 0x17b8, 0x2000 }, + { 0x0c00, 0x17b7, 0x0000 }, + { 0x0c00, 0x17b9, 0x0000 }, + { 0x8a00, 0x17be, 0x3000 }, + { 0x8c00, 0x17bc, 0x2000 }, + { 0x0c00, 0x17bb, 0x0000 }, + { 0x0c00, 0x17bd, 0x0000 }, + { 0x8a00, 0x17c0, 0x2000 }, + { 0x0a00, 0x17bf, 0x0000 }, + { 0x0a00, 0x17c1, 0x0000 }, + { 0x8c00, 0x17d2, 0x5000 }, + { 0x8c00, 0x17ca, 0x4000 }, + { 0x8c00, 0x17c6, 0x3000 }, + { 0x8a00, 0x17c4, 0x2000 }, + { 0x0a00, 0x17c3, 0x0000 }, + { 0x0a00, 0x17c5, 0x0000 }, + { 0x8a00, 0x17c8, 0x2000 }, + { 0x0a00, 0x17c7, 0x0000 }, + { 0x0c00, 0x17c9, 0x0000 }, + { 0x8c00, 0x17ce, 0x3000 }, + { 0x8c00, 0x17cc, 0x2000 }, + { 0x0c00, 0x17cb, 0x0000 }, + { 0x0c00, 0x17cd, 0x0000 }, + { 0x8c00, 0x17d0, 0x2000 }, + { 0x0c00, 0x17cf, 0x0000 }, + { 0x0c00, 0x17d1, 0x0000 }, + { 0x9500, 0x17da, 0x4000 }, + { 0x9500, 0x17d6, 0x3000 }, + { 0x9500, 0x17d4, 0x2000 }, + { 0x0c00, 0x17d3, 0x0000 }, + { 0x1500, 0x17d5, 0x0000 }, + { 0x9500, 0x17d8, 0x2000 }, + { 0x0600, 0x17d7, 0x0000 }, + { 0x1500, 0x17d9, 0x0000 }, + { 0x8d00, 0x17e0, 0x3000 }, + { 0x8700, 0x17dc, 0x2000 }, + { 0x1700, 0x17db, 0x0000 }, + { 0x0c00, 0x17dd, 0x0000 }, + { 0x8d00, 0x17e2, 0x2000 }, + { 0x0d00, 0x17e1, 0x0000 }, + { 0x0d00, 0x17e3, 0x0000 }, + { 0x8d00, 0x1811, 0x6000 }, + { 0x9500, 0x1800, 0x5000 }, + { 0x8f00, 0x17f2, 0x4000 }, + { 0x8d00, 0x17e8, 0x3000 }, + { 0x8d00, 0x17e6, 0x2000 }, + { 0x0d00, 0x17e5, 0x0000 }, + { 0x0d00, 0x17e7, 0x0000 }, + { 0x8f00, 0x17f0, 0x2000 }, + { 0x0d00, 0x17e9, 0x0000 }, + { 0x0f00, 0x17f1, 0x0000 }, + { 0x8f00, 0x17f6, 0x3000 }, + { 0x8f00, 0x17f4, 0x2000 }, + { 0x0f00, 0x17f3, 0x0000 }, + { 0x0f00, 0x17f5, 0x0000 }, + { 0x8f00, 0x17f8, 0x2000 }, + { 0x0f00, 0x17f7, 0x0000 }, + { 0x0f00, 0x17f9, 0x0000 }, + { 0x9500, 0x1808, 0x4000 }, + { 0x9500, 0x1804, 0x3000 }, + { 0x9500, 0x1802, 0x2000 }, + { 0x1500, 0x1801, 0x0000 }, + { 0x1500, 0x1803, 0x0000 }, + { 0x9100, 0x1806, 0x2000 }, + { 0x1500, 0x1805, 0x0000 }, + { 0x1500, 0x1807, 0x0000 }, + { 0x8c00, 0x180c, 0x3000 }, + { 0x9500, 0x180a, 0x2000 }, + { 0x1500, 0x1809, 0x0000 }, + { 0x0c00, 0x180b, 0x0000 }, + { 0x9d00, 0x180e, 0x2000 }, + { 0x0c00, 0x180d, 0x0000 }, + { 0x0d00, 0x1810, 0x0000 }, + { 0x8700, 0x1827, 0x5000 }, + { 0x8d00, 0x1819, 0x4000 }, + { 0x8d00, 0x1815, 0x3000 }, + { 0x8d00, 0x1813, 0x2000 }, + { 0x0d00, 0x1812, 0x0000 }, + { 0x0d00, 0x1814, 0x0000 }, + { 0x8d00, 0x1817, 0x2000 }, + { 0x0d00, 0x1816, 0x0000 }, + { 0x0d00, 0x1818, 0x0000 }, + { 0x8700, 0x1823, 0x3000 }, + { 0x8700, 0x1821, 0x2000 }, + { 0x0700, 0x1820, 0x0000 }, + { 0x0700, 0x1822, 0x0000 }, + { 0x8700, 0x1825, 0x2000 }, + { 0x0700, 0x1824, 0x0000 }, + { 0x0700, 0x1826, 0x0000 }, + { 0x8700, 0x182f, 0x4000 }, + { 0x8700, 0x182b, 0x3000 }, + { 0x8700, 0x1829, 0x2000 }, + { 0x0700, 0x1828, 0x0000 }, + { 0x0700, 0x182a, 0x0000 }, + { 0x8700, 0x182d, 0x2000 }, + { 0x0700, 0x182c, 0x0000 }, + { 0x0700, 0x182e, 0x0000 }, + { 0x8700, 0x1833, 0x3000 }, + { 0x8700, 0x1831, 0x2000 }, + { 0x0700, 0x1830, 0x0000 }, + { 0x0700, 0x1832, 0x0000 }, + { 0x8700, 0x1835, 0x2000 }, + { 0x0700, 0x1834, 0x0000 }, + { 0x0700, 0x1836, 0x0000 }, + { 0x8700, 0x1877, 0x7000 }, + { 0x8700, 0x1857, 0x6000 }, + { 0x8700, 0x1847, 0x5000 }, + { 0x8700, 0x183f, 0x4000 }, + { 0x8700, 0x183b, 0x3000 }, + { 0x8700, 0x1839, 0x2000 }, + { 0x0700, 0x1838, 0x0000 }, + { 0x0700, 0x183a, 0x0000 }, + { 0x8700, 0x183d, 0x2000 }, + { 0x0700, 0x183c, 0x0000 }, + { 0x0700, 0x183e, 0x0000 }, + { 0x8600, 0x1843, 0x3000 }, + { 0x8700, 0x1841, 0x2000 }, + { 0x0700, 0x1840, 0x0000 }, + { 0x0700, 0x1842, 0x0000 }, + { 0x8700, 0x1845, 0x2000 }, + { 0x0700, 0x1844, 0x0000 }, + { 0x0700, 0x1846, 0x0000 }, + { 0x8700, 0x184f, 0x4000 }, + { 0x8700, 0x184b, 0x3000 }, + { 0x8700, 0x1849, 0x2000 }, + { 0x0700, 0x1848, 0x0000 }, + { 0x0700, 0x184a, 0x0000 }, + { 0x8700, 0x184d, 0x2000 }, + { 0x0700, 0x184c, 0x0000 }, + { 0x0700, 0x184e, 0x0000 }, + { 0x8700, 0x1853, 0x3000 }, + { 0x8700, 0x1851, 0x2000 }, + { 0x0700, 0x1850, 0x0000 }, + { 0x0700, 0x1852, 0x0000 }, + { 0x8700, 0x1855, 0x2000 }, + { 0x0700, 0x1854, 0x0000 }, + { 0x0700, 0x1856, 0x0000 }, + { 0x8700, 0x1867, 0x5000 }, + { 0x8700, 0x185f, 0x4000 }, + { 0x8700, 0x185b, 0x3000 }, + { 0x8700, 0x1859, 0x2000 }, + { 0x0700, 0x1858, 0x0000 }, + { 0x0700, 0x185a, 0x0000 }, + { 0x8700, 0x185d, 0x2000 }, + { 0x0700, 0x185c, 0x0000 }, + { 0x0700, 0x185e, 0x0000 }, + { 0x8700, 0x1863, 0x3000 }, + { 0x8700, 0x1861, 0x2000 }, + { 0x0700, 0x1860, 0x0000 }, + { 0x0700, 0x1862, 0x0000 }, + { 0x8700, 0x1865, 0x2000 }, + { 0x0700, 0x1864, 0x0000 }, + { 0x0700, 0x1866, 0x0000 }, + { 0x8700, 0x186f, 0x4000 }, + { 0x8700, 0x186b, 0x3000 }, + { 0x8700, 0x1869, 0x2000 }, + { 0x0700, 0x1868, 0x0000 }, + { 0x0700, 0x186a, 0x0000 }, + { 0x8700, 0x186d, 0x2000 }, + { 0x0700, 0x186c, 0x0000 }, + { 0x0700, 0x186e, 0x0000 }, + { 0x8700, 0x1873, 0x3000 }, + { 0x8700, 0x1871, 0x2000 }, + { 0x0700, 0x1870, 0x0000 }, + { 0x0700, 0x1872, 0x0000 }, + { 0x8700, 0x1875, 0x2000 }, + { 0x0700, 0x1874, 0x0000 }, + { 0x0700, 0x1876, 0x0000 }, + { 0x8700, 0x189f, 0x6000 }, + { 0x8700, 0x188f, 0x5000 }, + { 0x8700, 0x1887, 0x4000 }, + { 0x8700, 0x1883, 0x3000 }, + { 0x8700, 0x1881, 0x2000 }, + { 0x0700, 0x1880, 0x0000 }, + { 0x0700, 0x1882, 0x0000 }, + { 0x8700, 0x1885, 0x2000 }, + { 0x0700, 0x1884, 0x0000 }, + { 0x0700, 0x1886, 0x0000 }, + { 0x8700, 0x188b, 0x3000 }, + { 0x8700, 0x1889, 0x2000 }, + { 0x0700, 0x1888, 0x0000 }, + { 0x0700, 0x188a, 0x0000 }, + { 0x8700, 0x188d, 0x2000 }, + { 0x0700, 0x188c, 0x0000 }, + { 0x0700, 0x188e, 0x0000 }, + { 0x8700, 0x1897, 0x4000 }, + { 0x8700, 0x1893, 0x3000 }, + { 0x8700, 0x1891, 0x2000 }, + { 0x0700, 0x1890, 0x0000 }, + { 0x0700, 0x1892, 0x0000 }, + { 0x8700, 0x1895, 0x2000 }, + { 0x0700, 0x1894, 0x0000 }, + { 0x0700, 0x1896, 0x0000 }, + { 0x8700, 0x189b, 0x3000 }, + { 0x8700, 0x1899, 0x2000 }, + { 0x0700, 0x1898, 0x0000 }, + { 0x0700, 0x189a, 0x0000 }, + { 0x8700, 0x189d, 0x2000 }, + { 0x0700, 0x189c, 0x0000 }, + { 0x0700, 0x189e, 0x0000 }, + { 0x8700, 0x1905, 0x5000 }, + { 0x8700, 0x18a7, 0x4000 }, + { 0x8700, 0x18a3, 0x3000 }, + { 0x8700, 0x18a1, 0x2000 }, + { 0x0700, 0x18a0, 0x0000 }, + { 0x0700, 0x18a2, 0x0000 }, + { 0x8700, 0x18a5, 0x2000 }, + { 0x0700, 0x18a4, 0x0000 }, + { 0x0700, 0x18a6, 0x0000 }, + { 0x8700, 0x1901, 0x3000 }, + { 0x8c00, 0x18a9, 0x2000 }, + { 0x0700, 0x18a8, 0x0000 }, + { 0x0700, 0x1900, 0x0000 }, + { 0x8700, 0x1903, 0x2000 }, + { 0x0700, 0x1902, 0x0000 }, + { 0x0700, 0x1904, 0x0000 }, + { 0x8700, 0x190d, 0x4000 }, + { 0x8700, 0x1909, 0x3000 }, + { 0x8700, 0x1907, 0x2000 }, + { 0x0700, 0x1906, 0x0000 }, + { 0x0700, 0x1908, 0x0000 }, + { 0x8700, 0x190b, 0x2000 }, + { 0x0700, 0x190a, 0x0000 }, + { 0x0700, 0x190c, 0x0000 }, + { 0x8700, 0x1911, 0x3000 }, + { 0x8700, 0x190f, 0x2000 }, + { 0x0700, 0x190e, 0x0000 }, + { 0x0700, 0x1910, 0x0000 }, + { 0x8700, 0x1913, 0x2000 }, + { 0x0700, 0x1912, 0x0000 }, + { 0x0700, 0x1914, 0x0000 }, + { 0x8500, 0x1d10, 0x8000 }, + { 0x8700, 0x1963, 0x7000 }, + { 0x9a00, 0x1940, 0x6000 }, + { 0x8c00, 0x1928, 0x5000 }, + { 0x8c00, 0x1920, 0x4000 }, + { 0x8700, 0x1919, 0x3000 }, + { 0x8700, 0x1917, 0x2000 }, + { 0x0700, 0x1916, 0x0000 }, + { 0x0700, 0x1918, 0x0000 }, + { 0x8700, 0x191b, 0x2000 }, + { 0x0700, 0x191a, 0x0000 }, + { 0x0700, 0x191c, 0x0000 }, + { 0x8a00, 0x1924, 0x3000 }, + { 0x8c00, 0x1922, 0x2000 }, + { 0x0c00, 0x1921, 0x0000 }, + { 0x0a00, 0x1923, 0x0000 }, + { 0x8a00, 0x1926, 0x2000 }, + { 0x0a00, 0x1925, 0x0000 }, + { 0x0c00, 0x1927, 0x0000 }, + { 0x8a00, 0x1934, 0x4000 }, + { 0x8a00, 0x1930, 0x3000 }, + { 0x8a00, 0x192a, 0x2000 }, + { 0x0a00, 0x1929, 0x0000 }, + { 0x0a00, 0x192b, 0x0000 }, + { 0x8c00, 0x1932, 0x2000 }, + { 0x0a00, 0x1931, 0x0000 }, + { 0x0a00, 0x1933, 0x0000 }, + { 0x8a00, 0x1938, 0x3000 }, + { 0x8a00, 0x1936, 0x2000 }, + { 0x0a00, 0x1935, 0x0000 }, + { 0x0a00, 0x1937, 0x0000 }, + { 0x8c00, 0x193a, 0x2000 }, + { 0x0c00, 0x1939, 0x0000 }, + { 0x0c00, 0x193b, 0x0000 }, + { 0x8700, 0x1953, 0x5000 }, + { 0x8d00, 0x194b, 0x4000 }, + { 0x8d00, 0x1947, 0x3000 }, + { 0x9500, 0x1945, 0x2000 }, + { 0x1500, 0x1944, 0x0000 }, + { 0x0d00, 0x1946, 0x0000 }, + { 0x8d00, 0x1949, 0x2000 }, + { 0x0d00, 0x1948, 0x0000 }, + { 0x0d00, 0x194a, 0x0000 }, + { 0x8d00, 0x194f, 0x3000 }, + { 0x8d00, 0x194d, 0x2000 }, + { 0x0d00, 0x194c, 0x0000 }, + { 0x0d00, 0x194e, 0x0000 }, + { 0x8700, 0x1951, 0x2000 }, + { 0x0700, 0x1950, 0x0000 }, + { 0x0700, 0x1952, 0x0000 }, + { 0x8700, 0x195b, 0x4000 }, + { 0x8700, 0x1957, 0x3000 }, + { 0x8700, 0x1955, 0x2000 }, + { 0x0700, 0x1954, 0x0000 }, + { 0x0700, 0x1956, 0x0000 }, + { 0x8700, 0x1959, 0x2000 }, + { 0x0700, 0x1958, 0x0000 }, + { 0x0700, 0x195a, 0x0000 }, + { 0x8700, 0x195f, 0x3000 }, + { 0x8700, 0x195d, 0x2000 }, + { 0x0700, 0x195c, 0x0000 }, + { 0x0700, 0x195e, 0x0000 }, + { 0x8700, 0x1961, 0x2000 }, + { 0x0700, 0x1960, 0x0000 }, + { 0x0700, 0x1962, 0x0000 }, + { 0x9a00, 0x19f0, 0x6000 }, + { 0x9a00, 0x19e0, 0x5000 }, + { 0x8700, 0x196b, 0x4000 }, + { 0x8700, 0x1967, 0x3000 }, + { 0x8700, 0x1965, 0x2000 }, + { 0x0700, 0x1964, 0x0000 }, + { 0x0700, 0x1966, 0x0000 }, + { 0x8700, 0x1969, 0x2000 }, + { 0x0700, 0x1968, 0x0000 }, + { 0x0700, 0x196a, 0x0000 }, + { 0x8700, 0x1971, 0x3000 }, + { 0x8700, 0x196d, 0x2000 }, + { 0x0700, 0x196c, 0x0000 }, + { 0x0700, 0x1970, 0x0000 }, + { 0x8700, 0x1973, 0x2000 }, + { 0x0700, 0x1972, 0x0000 }, + { 0x0700, 0x1974, 0x0000 }, + { 0x9a00, 0x19e8, 0x4000 }, + { 0x9a00, 0x19e4, 0x3000 }, + { 0x9a00, 0x19e2, 0x2000 }, + { 0x1a00, 0x19e1, 0x0000 }, + { 0x1a00, 0x19e3, 0x0000 }, + { 0x9a00, 0x19e6, 0x2000 }, + { 0x1a00, 0x19e5, 0x0000 }, + { 0x1a00, 0x19e7, 0x0000 }, + { 0x9a00, 0x19ec, 0x3000 }, + { 0x9a00, 0x19ea, 0x2000 }, + { 0x1a00, 0x19e9, 0x0000 }, + { 0x1a00, 0x19eb, 0x0000 }, + { 0x9a00, 0x19ee, 0x2000 }, + { 0x1a00, 0x19ed, 0x0000 }, + { 0x1a00, 0x19ef, 0x0000 }, + { 0x8500, 0x1d00, 0x5000 }, + { 0x9a00, 0x19f8, 0x4000 }, + { 0x9a00, 0x19f4, 0x3000 }, + { 0x9a00, 0x19f2, 0x2000 }, + { 0x1a00, 0x19f1, 0x0000 }, + { 0x1a00, 0x19f3, 0x0000 }, + { 0x9a00, 0x19f6, 0x2000 }, + { 0x1a00, 0x19f5, 0x0000 }, + { 0x1a00, 0x19f7, 0x0000 }, + { 0x9a00, 0x19fc, 0x3000 }, + { 0x9a00, 0x19fa, 0x2000 }, + { 0x1a00, 0x19f9, 0x0000 }, + { 0x1a00, 0x19fb, 0x0000 }, + { 0x9a00, 0x19fe, 0x2000 }, + { 0x1a00, 0x19fd, 0x0000 }, + { 0x1a00, 0x19ff, 0x0000 }, + { 0x8500, 0x1d08, 0x4000 }, + { 0x8500, 0x1d04, 0x3000 }, + { 0x8500, 0x1d02, 0x2000 }, + { 0x0500, 0x1d01, 0x0000 }, + { 0x0500, 0x1d03, 0x0000 }, + { 0x8500, 0x1d06, 0x2000 }, + { 0x0500, 0x1d05, 0x0000 }, + { 0x0500, 0x1d07, 0x0000 }, + { 0x8500, 0x1d0c, 0x3000 }, + { 0x8500, 0x1d0a, 0x2000 }, + { 0x0500, 0x1d09, 0x0000 }, + { 0x0500, 0x1d0b, 0x0000 }, + { 0x8500, 0x1d0e, 0x2000 }, + { 0x0500, 0x1d0d, 0x0000 }, + { 0x0500, 0x1d0f, 0x0000 }, + { 0x8600, 0x1d50, 0x7000 }, + { 0x8600, 0x1d30, 0x6000 }, + { 0x8500, 0x1d20, 0x5000 }, + { 0x8500, 0x1d18, 0x4000 }, + { 0x8500, 0x1d14, 0x3000 }, + { 0x8500, 0x1d12, 0x2000 }, + { 0x0500, 0x1d11, 0x0000 }, + { 0x0500, 0x1d13, 0x0000 }, + { 0x8500, 0x1d16, 0x2000 }, + { 0x0500, 0x1d15, 0x0000 }, + { 0x0500, 0x1d17, 0x0000 }, + { 0x8500, 0x1d1c, 0x3000 }, + { 0x8500, 0x1d1a, 0x2000 }, + { 0x0500, 0x1d19, 0x0000 }, + { 0x0500, 0x1d1b, 0x0000 }, + { 0x8500, 0x1d1e, 0x2000 }, + { 0x0500, 0x1d1d, 0x0000 }, + { 0x0500, 0x1d1f, 0x0000 }, + { 0x8500, 0x1d28, 0x4000 }, + { 0x8500, 0x1d24, 0x3000 }, + { 0x8500, 0x1d22, 0x2000 }, + { 0x0500, 0x1d21, 0x0000 }, + { 0x0500, 0x1d23, 0x0000 }, + { 0x8500, 0x1d26, 0x2000 }, + { 0x0500, 0x1d25, 0x0000 }, + { 0x0500, 0x1d27, 0x0000 }, + { 0x8600, 0x1d2c, 0x3000 }, + { 0x8500, 0x1d2a, 0x2000 }, + { 0x0500, 0x1d29, 0x0000 }, + { 0x0500, 0x1d2b, 0x0000 }, + { 0x8600, 0x1d2e, 0x2000 }, + { 0x0600, 0x1d2d, 0x0000 }, + { 0x0600, 0x1d2f, 0x0000 }, + { 0x8600, 0x1d40, 0x5000 }, + { 0x8600, 0x1d38, 0x4000 }, + { 0x8600, 0x1d34, 0x3000 }, + { 0x8600, 0x1d32, 0x2000 }, + { 0x0600, 0x1d31, 0x0000 }, + { 0x0600, 0x1d33, 0x0000 }, + { 0x8600, 0x1d36, 0x2000 }, + { 0x0600, 0x1d35, 0x0000 }, + { 0x0600, 0x1d37, 0x0000 }, + { 0x8600, 0x1d3c, 0x3000 }, + { 0x8600, 0x1d3a, 0x2000 }, + { 0x0600, 0x1d39, 0x0000 }, + { 0x0600, 0x1d3b, 0x0000 }, + { 0x8600, 0x1d3e, 0x2000 }, + { 0x0600, 0x1d3d, 0x0000 }, + { 0x0600, 0x1d3f, 0x0000 }, + { 0x8600, 0x1d48, 0x4000 }, + { 0x8600, 0x1d44, 0x3000 }, + { 0x8600, 0x1d42, 0x2000 }, + { 0x0600, 0x1d41, 0x0000 }, + { 0x0600, 0x1d43, 0x0000 }, + { 0x8600, 0x1d46, 0x2000 }, + { 0x0600, 0x1d45, 0x0000 }, + { 0x0600, 0x1d47, 0x0000 }, + { 0x8600, 0x1d4c, 0x3000 }, + { 0x8600, 0x1d4a, 0x2000 }, + { 0x0600, 0x1d49, 0x0000 }, + { 0x0600, 0x1d4b, 0x0000 }, + { 0x8600, 0x1d4e, 0x2000 }, + { 0x0600, 0x1d4d, 0x0000 }, + { 0x0600, 0x1d4f, 0x0000 }, + { 0x8900, 0x1e04, 0x6001 }, + { 0x8600, 0x1d60, 0x5000 }, + { 0x8600, 0x1d58, 0x4000 }, + { 0x8600, 0x1d54, 0x3000 }, + { 0x8600, 0x1d52, 0x2000 }, + { 0x0600, 0x1d51, 0x0000 }, + { 0x0600, 0x1d53, 0x0000 }, + { 0x8600, 0x1d56, 0x2000 }, + { 0x0600, 0x1d55, 0x0000 }, + { 0x0600, 0x1d57, 0x0000 }, + { 0x8600, 0x1d5c, 0x3000 }, + { 0x8600, 0x1d5a, 0x2000 }, + { 0x0600, 0x1d59, 0x0000 }, + { 0x0600, 0x1d5b, 0x0000 }, + { 0x8600, 0x1d5e, 0x2000 }, + { 0x0600, 0x1d5d, 0x0000 }, + { 0x0600, 0x1d5f, 0x0000 }, + { 0x8500, 0x1d68, 0x4000 }, + { 0x8500, 0x1d64, 0x3000 }, + { 0x8500, 0x1d62, 0x2000 }, + { 0x0600, 0x1d61, 0x0000 }, + { 0x0500, 0x1d63, 0x0000 }, + { 0x8500, 0x1d66, 0x2000 }, + { 0x0500, 0x1d65, 0x0000 }, + { 0x0500, 0x1d67, 0x0000 }, + { 0x8900, 0x1e00, 0x3001 }, + { 0x8500, 0x1d6a, 0x2000 }, + { 0x0500, 0x1d69, 0x0000 }, + { 0x0500, 0x1d6b, 0x0000 }, + { 0x8900, 0x1e02, 0x2001 }, + { 0x0500, 0x1e01, 0x0fff }, + { 0x0500, 0x1e03, 0x0fff }, + { 0x8900, 0x1e14, 0x5001 }, + { 0x8900, 0x1e0c, 0x4001 }, + { 0x8900, 0x1e08, 0x3001 }, + { 0x8900, 0x1e06, 0x2001 }, + { 0x0500, 0x1e05, 0x0fff }, + { 0x0500, 0x1e07, 0x0fff }, + { 0x8900, 0x1e0a, 0x2001 }, + { 0x0500, 0x1e09, 0x0fff }, + { 0x0500, 0x1e0b, 0x0fff }, + { 0x8900, 0x1e10, 0x3001 }, + { 0x8900, 0x1e0e, 0x2001 }, + { 0x0500, 0x1e0d, 0x0fff }, + { 0x0500, 0x1e0f, 0x0fff }, + { 0x8900, 0x1e12, 0x2001 }, + { 0x0500, 0x1e11, 0x0fff }, + { 0x0500, 0x1e13, 0x0fff }, + { 0x8900, 0x1e1c, 0x4001 }, + { 0x8900, 0x1e18, 0x3001 }, + { 0x8900, 0x1e16, 0x2001 }, + { 0x0500, 0x1e15, 0x0fff }, + { 0x0500, 0x1e17, 0x0fff }, + { 0x8900, 0x1e1a, 0x2001 }, + { 0x0500, 0x1e19, 0x0fff }, + { 0x0500, 0x1e1b, 0x0fff }, + { 0x8900, 0x1e20, 0x3001 }, + { 0x8900, 0x1e1e, 0x2001 }, + { 0x0500, 0x1e1d, 0x0fff }, + { 0x0500, 0x1e1f, 0x0fff }, + { 0x8900, 0x1e22, 0x2001 }, + { 0x0500, 0x1e21, 0x0fff }, + { 0x0500, 0x1e23, 0x0fff }, + { 0x9600, 0x2045, 0xa000 }, + { 0x8500, 0x1f32, 0x9008 }, + { 0x8900, 0x1ea8, 0x8001 }, + { 0x8900, 0x1e64, 0x7001 }, + { 0x8900, 0x1e44, 0x6001 }, + { 0x8900, 0x1e34, 0x5001 }, + { 0x8900, 0x1e2c, 0x4001 }, + { 0x8900, 0x1e28, 0x3001 }, + { 0x8900, 0x1e26, 0x2001 }, + { 0x0500, 0x1e25, 0x0fff }, + { 0x0500, 0x1e27, 0x0fff }, + { 0x8900, 0x1e2a, 0x2001 }, + { 0x0500, 0x1e29, 0x0fff }, + { 0x0500, 0x1e2b, 0x0fff }, + { 0x8900, 0x1e30, 0x3001 }, + { 0x8900, 0x1e2e, 0x2001 }, + { 0x0500, 0x1e2d, 0x0fff }, + { 0x0500, 0x1e2f, 0x0fff }, + { 0x8900, 0x1e32, 0x2001 }, + { 0x0500, 0x1e31, 0x0fff }, + { 0x0500, 0x1e33, 0x0fff }, + { 0x8900, 0x1e3c, 0x4001 }, + { 0x8900, 0x1e38, 0x3001 }, + { 0x8900, 0x1e36, 0x2001 }, + { 0x0500, 0x1e35, 0x0fff }, + { 0x0500, 0x1e37, 0x0fff }, + { 0x8900, 0x1e3a, 0x2001 }, + { 0x0500, 0x1e39, 0x0fff }, + { 0x0500, 0x1e3b, 0x0fff }, + { 0x8900, 0x1e40, 0x3001 }, + { 0x8900, 0x1e3e, 0x2001 }, + { 0x0500, 0x1e3d, 0x0fff }, + { 0x0500, 0x1e3f, 0x0fff }, + { 0x8900, 0x1e42, 0x2001 }, + { 0x0500, 0x1e41, 0x0fff }, + { 0x0500, 0x1e43, 0x0fff }, + { 0x8900, 0x1e54, 0x5001 }, + { 0x8900, 0x1e4c, 0x4001 }, + { 0x8900, 0x1e48, 0x3001 }, + { 0x8900, 0x1e46, 0x2001 }, + { 0x0500, 0x1e45, 0x0fff }, + { 0x0500, 0x1e47, 0x0fff }, + { 0x8900, 0x1e4a, 0x2001 }, + { 0x0500, 0x1e49, 0x0fff }, + { 0x0500, 0x1e4b, 0x0fff }, + { 0x8900, 0x1e50, 0x3001 }, + { 0x8900, 0x1e4e, 0x2001 }, + { 0x0500, 0x1e4d, 0x0fff }, + { 0x0500, 0x1e4f, 0x0fff }, + { 0x8900, 0x1e52, 0x2001 }, + { 0x0500, 0x1e51, 0x0fff }, + { 0x0500, 0x1e53, 0x0fff }, + { 0x8900, 0x1e5c, 0x4001 }, + { 0x8900, 0x1e58, 0x3001 }, + { 0x8900, 0x1e56, 0x2001 }, + { 0x0500, 0x1e55, 0x0fff }, + { 0x0500, 0x1e57, 0x0fff }, + { 0x8900, 0x1e5a, 0x2001 }, + { 0x0500, 0x1e59, 0x0fff }, + { 0x0500, 0x1e5b, 0x0fff }, + { 0x8900, 0x1e60, 0x3001 }, + { 0x8900, 0x1e5e, 0x2001 }, + { 0x0500, 0x1e5d, 0x0fff }, + { 0x0500, 0x1e5f, 0x0fff }, + { 0x8900, 0x1e62, 0x2001 }, + { 0x0500, 0x1e61, 0x0fff }, + { 0x0500, 0x1e63, 0x0fff }, + { 0x8900, 0x1e84, 0x6001 }, + { 0x8900, 0x1e74, 0x5001 }, + { 0x8900, 0x1e6c, 0x4001 }, + { 0x8900, 0x1e68, 0x3001 }, + { 0x8900, 0x1e66, 0x2001 }, + { 0x0500, 0x1e65, 0x0fff }, + { 0x0500, 0x1e67, 0x0fff }, + { 0x8900, 0x1e6a, 0x2001 }, + { 0x0500, 0x1e69, 0x0fff }, + { 0x0500, 0x1e6b, 0x0fff }, + { 0x8900, 0x1e70, 0x3001 }, + { 0x8900, 0x1e6e, 0x2001 }, + { 0x0500, 0x1e6d, 0x0fff }, + { 0x0500, 0x1e6f, 0x0fff }, + { 0x8900, 0x1e72, 0x2001 }, + { 0x0500, 0x1e71, 0x0fff }, + { 0x0500, 0x1e73, 0x0fff }, + { 0x8900, 0x1e7c, 0x4001 }, + { 0x8900, 0x1e78, 0x3001 }, + { 0x8900, 0x1e76, 0x2001 }, + { 0x0500, 0x1e75, 0x0fff }, + { 0x0500, 0x1e77, 0x0fff }, + { 0x8900, 0x1e7a, 0x2001 }, + { 0x0500, 0x1e79, 0x0fff }, + { 0x0500, 0x1e7b, 0x0fff }, + { 0x8900, 0x1e80, 0x3001 }, + { 0x8900, 0x1e7e, 0x2001 }, + { 0x0500, 0x1e7d, 0x0fff }, + { 0x0500, 0x1e7f, 0x0fff }, + { 0x8900, 0x1e82, 0x2001 }, + { 0x0500, 0x1e81, 0x0fff }, + { 0x0500, 0x1e83, 0x0fff }, + { 0x8900, 0x1e94, 0x5001 }, + { 0x8900, 0x1e8c, 0x4001 }, + { 0x8900, 0x1e88, 0x3001 }, + { 0x8900, 0x1e86, 0x2001 }, + { 0x0500, 0x1e85, 0x0fff }, + { 0x0500, 0x1e87, 0x0fff }, + { 0x8900, 0x1e8a, 0x2001 }, + { 0x0500, 0x1e89, 0x0fff }, + { 0x0500, 0x1e8b, 0x0fff }, + { 0x8900, 0x1e90, 0x3001 }, + { 0x8900, 0x1e8e, 0x2001 }, + { 0x0500, 0x1e8d, 0x0fff }, + { 0x0500, 0x1e8f, 0x0fff }, + { 0x8900, 0x1e92, 0x2001 }, + { 0x0500, 0x1e91, 0x0fff }, + { 0x0500, 0x1e93, 0x0fff }, + { 0x8900, 0x1ea0, 0x4001 }, + { 0x8500, 0x1e98, 0x3000 }, + { 0x8500, 0x1e96, 0x2000 }, + { 0x0500, 0x1e95, 0x0fff }, + { 0x0500, 0x1e97, 0x0000 }, + { 0x8500, 0x1e9a, 0x2000 }, + { 0x0500, 0x1e99, 0x0000 }, + { 0x0500, 0x1e9b, 0x0fc5 }, + { 0x8900, 0x1ea4, 0x3001 }, + { 0x8900, 0x1ea2, 0x2001 }, + { 0x0500, 0x1ea1, 0x0fff }, + { 0x0500, 0x1ea3, 0x0fff }, + { 0x8900, 0x1ea6, 0x2001 }, + { 0x0500, 0x1ea5, 0x0fff }, + { 0x0500, 0x1ea7, 0x0fff }, + { 0x8900, 0x1ee8, 0x7001 }, + { 0x8900, 0x1ec8, 0x6001 }, + { 0x8900, 0x1eb8, 0x5001 }, + { 0x8900, 0x1eb0, 0x4001 }, + { 0x8900, 0x1eac, 0x3001 }, + { 0x8900, 0x1eaa, 0x2001 }, + { 0x0500, 0x1ea9, 0x0fff }, + { 0x0500, 0x1eab, 0x0fff }, + { 0x8900, 0x1eae, 0x2001 }, + { 0x0500, 0x1ead, 0x0fff }, + { 0x0500, 0x1eaf, 0x0fff }, + { 0x8900, 0x1eb4, 0x3001 }, + { 0x8900, 0x1eb2, 0x2001 }, + { 0x0500, 0x1eb1, 0x0fff }, + { 0x0500, 0x1eb3, 0x0fff }, + { 0x8900, 0x1eb6, 0x2001 }, + { 0x0500, 0x1eb5, 0x0fff }, + { 0x0500, 0x1eb7, 0x0fff }, + { 0x8900, 0x1ec0, 0x4001 }, + { 0x8900, 0x1ebc, 0x3001 }, + { 0x8900, 0x1eba, 0x2001 }, + { 0x0500, 0x1eb9, 0x0fff }, + { 0x0500, 0x1ebb, 0x0fff }, + { 0x8900, 0x1ebe, 0x2001 }, + { 0x0500, 0x1ebd, 0x0fff }, + { 0x0500, 0x1ebf, 0x0fff }, + { 0x8900, 0x1ec4, 0x3001 }, + { 0x8900, 0x1ec2, 0x2001 }, + { 0x0500, 0x1ec1, 0x0fff }, + { 0x0500, 0x1ec3, 0x0fff }, + { 0x8900, 0x1ec6, 0x2001 }, + { 0x0500, 0x1ec5, 0x0fff }, + { 0x0500, 0x1ec7, 0x0fff }, + { 0x8900, 0x1ed8, 0x5001 }, + { 0x8900, 0x1ed0, 0x4001 }, + { 0x8900, 0x1ecc, 0x3001 }, + { 0x8900, 0x1eca, 0x2001 }, + { 0x0500, 0x1ec9, 0x0fff }, + { 0x0500, 0x1ecb, 0x0fff }, + { 0x8900, 0x1ece, 0x2001 }, + { 0x0500, 0x1ecd, 0x0fff }, + { 0x0500, 0x1ecf, 0x0fff }, + { 0x8900, 0x1ed4, 0x3001 }, + { 0x8900, 0x1ed2, 0x2001 }, + { 0x0500, 0x1ed1, 0x0fff }, + { 0x0500, 0x1ed3, 0x0fff }, + { 0x8900, 0x1ed6, 0x2001 }, + { 0x0500, 0x1ed5, 0x0fff }, + { 0x0500, 0x1ed7, 0x0fff }, + { 0x8900, 0x1ee0, 0x4001 }, + { 0x8900, 0x1edc, 0x3001 }, + { 0x8900, 0x1eda, 0x2001 }, + { 0x0500, 0x1ed9, 0x0fff }, + { 0x0500, 0x1edb, 0x0fff }, + { 0x8900, 0x1ede, 0x2001 }, + { 0x0500, 0x1edd, 0x0fff }, + { 0x0500, 0x1edf, 0x0fff }, + { 0x8900, 0x1ee4, 0x3001 }, + { 0x8900, 0x1ee2, 0x2001 }, + { 0x0500, 0x1ee1, 0x0fff }, + { 0x0500, 0x1ee3, 0x0fff }, + { 0x8900, 0x1ee6, 0x2001 }, + { 0x0500, 0x1ee5, 0x0fff }, + { 0x0500, 0x1ee7, 0x0fff }, + { 0x8900, 0x1f0e, 0x6ff8 }, + { 0x8900, 0x1ef8, 0x5001 }, + { 0x8900, 0x1ef0, 0x4001 }, + { 0x8900, 0x1eec, 0x3001 }, + { 0x8900, 0x1eea, 0x2001 }, + { 0x0500, 0x1ee9, 0x0fff }, + { 0x0500, 0x1eeb, 0x0fff }, + { 0x8900, 0x1eee, 0x2001 }, + { 0x0500, 0x1eed, 0x0fff }, + { 0x0500, 0x1eef, 0x0fff }, + { 0x8900, 0x1ef4, 0x3001 }, + { 0x8900, 0x1ef2, 0x2001 }, + { 0x0500, 0x1ef1, 0x0fff }, + { 0x0500, 0x1ef3, 0x0fff }, + { 0x8900, 0x1ef6, 0x2001 }, + { 0x0500, 0x1ef5, 0x0fff }, + { 0x0500, 0x1ef7, 0x0fff }, + { 0x8500, 0x1f06, 0x4008 }, + { 0x8500, 0x1f02, 0x3008 }, + { 0x8500, 0x1f00, 0x2008 }, + { 0x0500, 0x1ef9, 0x0fff }, + { 0x0500, 0x1f01, 0x0008 }, + { 0x8500, 0x1f04, 0x2008 }, + { 0x0500, 0x1f03, 0x0008 }, + { 0x0500, 0x1f05, 0x0008 }, + { 0x8900, 0x1f0a, 0x3ff8 }, + { 0x8900, 0x1f08, 0x2ff8 }, + { 0x0500, 0x1f07, 0x0008 }, + { 0x0900, 0x1f09, 0x0ff8 }, + { 0x8900, 0x1f0c, 0x2ff8 }, + { 0x0900, 0x1f0b, 0x0ff8 }, + { 0x0900, 0x1f0d, 0x0ff8 }, + { 0x8500, 0x1f22, 0x5008 }, + { 0x8900, 0x1f18, 0x4ff8 }, + { 0x8500, 0x1f12, 0x3008 }, + { 0x8500, 0x1f10, 0x2008 }, + { 0x0900, 0x1f0f, 0x0ff8 }, + { 0x0500, 0x1f11, 0x0008 }, + { 0x8500, 0x1f14, 0x2008 }, + { 0x0500, 0x1f13, 0x0008 }, + { 0x0500, 0x1f15, 0x0008 }, + { 0x8900, 0x1f1c, 0x3ff8 }, + { 0x8900, 0x1f1a, 0x2ff8 }, + { 0x0900, 0x1f19, 0x0ff8 }, + { 0x0900, 0x1f1b, 0x0ff8 }, + { 0x8500, 0x1f20, 0x2008 }, + { 0x0900, 0x1f1d, 0x0ff8 }, + { 0x0500, 0x1f21, 0x0008 }, + { 0x8900, 0x1f2a, 0x4ff8 }, + { 0x8500, 0x1f26, 0x3008 }, + { 0x8500, 0x1f24, 0x2008 }, + { 0x0500, 0x1f23, 0x0008 }, + { 0x0500, 0x1f25, 0x0008 }, + { 0x8900, 0x1f28, 0x2ff8 }, + { 0x0500, 0x1f27, 0x0008 }, + { 0x0900, 0x1f29, 0x0ff8 }, + { 0x8900, 0x1f2e, 0x3ff8 }, + { 0x8900, 0x1f2c, 0x2ff8 }, + { 0x0900, 0x1f2b, 0x0ff8 }, + { 0x0900, 0x1f2d, 0x0ff8 }, + { 0x8500, 0x1f30, 0x2008 }, + { 0x0900, 0x1f2f, 0x0ff8 }, + { 0x0500, 0x1f31, 0x0008 }, + { 0x9800, 0x1fbd, 0x8000 }, + { 0x8500, 0x1f7a, 0x7070 }, + { 0x8500, 0x1f56, 0x6000 }, + { 0x8500, 0x1f42, 0x5008 }, + { 0x8900, 0x1f3a, 0x4ff8 }, + { 0x8500, 0x1f36, 0x3008 }, + { 0x8500, 0x1f34, 0x2008 }, + { 0x0500, 0x1f33, 0x0008 }, + { 0x0500, 0x1f35, 0x0008 }, + { 0x8900, 0x1f38, 0x2ff8 }, + { 0x0500, 0x1f37, 0x0008 }, + { 0x0900, 0x1f39, 0x0ff8 }, + { 0x8900, 0x1f3e, 0x3ff8 }, + { 0x8900, 0x1f3c, 0x2ff8 }, + { 0x0900, 0x1f3b, 0x0ff8 }, + { 0x0900, 0x1f3d, 0x0ff8 }, + { 0x8500, 0x1f40, 0x2008 }, + { 0x0900, 0x1f3f, 0x0ff8 }, + { 0x0500, 0x1f41, 0x0008 }, + { 0x8900, 0x1f4c, 0x4ff8 }, + { 0x8900, 0x1f48, 0x3ff8 }, + { 0x8500, 0x1f44, 0x2008 }, + { 0x0500, 0x1f43, 0x0008 }, + { 0x0500, 0x1f45, 0x0008 }, + { 0x8900, 0x1f4a, 0x2ff8 }, + { 0x0900, 0x1f49, 0x0ff8 }, + { 0x0900, 0x1f4b, 0x0ff8 }, + { 0x8500, 0x1f52, 0x3000 }, + { 0x8500, 0x1f50, 0x2000 }, + { 0x0900, 0x1f4d, 0x0ff8 }, + { 0x0500, 0x1f51, 0x0008 }, + { 0x8500, 0x1f54, 0x2000 }, + { 0x0500, 0x1f53, 0x0008 }, + { 0x0500, 0x1f55, 0x0008 }, + { 0x8900, 0x1f6a, 0x5ff8 }, + { 0x8500, 0x1f62, 0x4008 }, + { 0x8900, 0x1f5d, 0x3ff8 }, + { 0x8900, 0x1f59, 0x2ff8 }, + { 0x0500, 0x1f57, 0x0008 }, + { 0x0900, 0x1f5b, 0x0ff8 }, + { 0x8500, 0x1f60, 0x2008 }, + { 0x0900, 0x1f5f, 0x0ff8 }, + { 0x0500, 0x1f61, 0x0008 }, + { 0x8500, 0x1f66, 0x3008 }, + { 0x8500, 0x1f64, 0x2008 }, + { 0x0500, 0x1f63, 0x0008 }, + { 0x0500, 0x1f65, 0x0008 }, + { 0x8900, 0x1f68, 0x2ff8 }, + { 0x0500, 0x1f67, 0x0008 }, + { 0x0900, 0x1f69, 0x0ff8 }, + { 0x8500, 0x1f72, 0x4056 }, + { 0x8900, 0x1f6e, 0x3ff8 }, + { 0x8900, 0x1f6c, 0x2ff8 }, + { 0x0900, 0x1f6b, 0x0ff8 }, + { 0x0900, 0x1f6d, 0x0ff8 }, + { 0x8500, 0x1f70, 0x204a }, + { 0x0900, 0x1f6f, 0x0ff8 }, + { 0x0500, 0x1f71, 0x004a }, + { 0x8500, 0x1f76, 0x3064 }, + { 0x8500, 0x1f74, 0x2056 }, + { 0x0500, 0x1f73, 0x0056 }, + { 0x0500, 0x1f75, 0x0056 }, + { 0x8500, 0x1f78, 0x2080 }, + { 0x0500, 0x1f77, 0x0064 }, + { 0x0500, 0x1f79, 0x0080 }, + { 0x8800, 0x1f9c, 0x6000 }, + { 0x8800, 0x1f8c, 0x5000 }, + { 0x8500, 0x1f84, 0x4008 }, + { 0x8500, 0x1f80, 0x3008 }, + { 0x8500, 0x1f7c, 0x207e }, + { 0x0500, 0x1f7b, 0x0070 }, + { 0x0500, 0x1f7d, 0x007e }, + { 0x8500, 0x1f82, 0x2008 }, + { 0x0500, 0x1f81, 0x0008 }, + { 0x0500, 0x1f83, 0x0008 }, + { 0x8800, 0x1f88, 0x3000 }, + { 0x8500, 0x1f86, 0x2008 }, + { 0x0500, 0x1f85, 0x0008 }, + { 0x0500, 0x1f87, 0x0008 }, + { 0x8800, 0x1f8a, 0x2000 }, + { 0x0800, 0x1f89, 0x0000 }, + { 0x0800, 0x1f8b, 0x0000 }, + { 0x8500, 0x1f94, 0x4008 }, + { 0x8500, 0x1f90, 0x3008 }, + { 0x8800, 0x1f8e, 0x2000 }, + { 0x0800, 0x1f8d, 0x0000 }, + { 0x0800, 0x1f8f, 0x0000 }, + { 0x8500, 0x1f92, 0x2008 }, + { 0x0500, 0x1f91, 0x0008 }, + { 0x0500, 0x1f93, 0x0008 }, + { 0x8800, 0x1f98, 0x3000 }, + { 0x8500, 0x1f96, 0x2008 }, + { 0x0500, 0x1f95, 0x0008 }, + { 0x0500, 0x1f97, 0x0008 }, + { 0x8800, 0x1f9a, 0x2000 }, + { 0x0800, 0x1f99, 0x0000 }, + { 0x0800, 0x1f9b, 0x0000 }, + { 0x8800, 0x1fac, 0x5000 }, + { 0x8500, 0x1fa4, 0x4008 }, + { 0x8500, 0x1fa0, 0x3008 }, + { 0x8800, 0x1f9e, 0x2000 }, + { 0x0800, 0x1f9d, 0x0000 }, + { 0x0800, 0x1f9f, 0x0000 }, + { 0x8500, 0x1fa2, 0x2008 }, + { 0x0500, 0x1fa1, 0x0008 }, + { 0x0500, 0x1fa3, 0x0008 }, + { 0x8800, 0x1fa8, 0x3000 }, + { 0x8500, 0x1fa6, 0x2008 }, + { 0x0500, 0x1fa5, 0x0008 }, + { 0x0500, 0x1fa7, 0x0008 }, + { 0x8800, 0x1faa, 0x2000 }, + { 0x0800, 0x1fa9, 0x0000 }, + { 0x0800, 0x1fab, 0x0000 }, + { 0x8500, 0x1fb4, 0x4000 }, + { 0x8500, 0x1fb0, 0x3008 }, + { 0x8800, 0x1fae, 0x2000 }, + { 0x0800, 0x1fad, 0x0000 }, + { 0x0800, 0x1faf, 0x0000 }, + { 0x8500, 0x1fb2, 0x2000 }, + { 0x0500, 0x1fb1, 0x0008 }, + { 0x0500, 0x1fb3, 0x0009 }, + { 0x8900, 0x1fb9, 0x3ff8 }, + { 0x8500, 0x1fb7, 0x2000 }, + { 0x0500, 0x1fb6, 0x0000 }, + { 0x0900, 0x1fb8, 0x0ff8 }, + { 0x8900, 0x1fbb, 0x2fb6 }, + { 0x0900, 0x1fba, 0x0fb6 }, + { 0x0800, 0x1fbc, 0x0000 }, + { 0x9d00, 0x2005, 0x7000 }, + { 0x8500, 0x1fe1, 0x6008 }, + { 0x9800, 0x1fce, 0x5000 }, + { 0x8500, 0x1fc6, 0x4000 }, + { 0x9800, 0x1fc1, 0x3000 }, + { 0x9800, 0x1fbf, 0x2000 }, + { 0x0500, 0x1fbe, 0x0000 }, + { 0x1800, 0x1fc0, 0x0000 }, + { 0x8500, 0x1fc3, 0x2009 }, + { 0x0500, 0x1fc2, 0x0000 }, + { 0x0500, 0x1fc4, 0x0000 }, + { 0x8900, 0x1fca, 0x3faa }, + { 0x8900, 0x1fc8, 0x2faa }, + { 0x0500, 0x1fc7, 0x0000 }, + { 0x0900, 0x1fc9, 0x0faa }, + { 0x8800, 0x1fcc, 0x2000 }, + { 0x0900, 0x1fcb, 0x0faa }, + { 0x1800, 0x1fcd, 0x0000 }, + { 0x8900, 0x1fd8, 0x4ff8 }, + { 0x8500, 0x1fd2, 0x3000 }, + { 0x8500, 0x1fd0, 0x2008 }, + { 0x1800, 0x1fcf, 0x0000 }, + { 0x0500, 0x1fd1, 0x0008 }, + { 0x8500, 0x1fd6, 0x2000 }, + { 0x0500, 0x1fd3, 0x0000 }, + { 0x0500, 0x1fd7, 0x0000 }, + { 0x9800, 0x1fdd, 0x3000 }, + { 0x8900, 0x1fda, 0x2f9c }, + { 0x0900, 0x1fd9, 0x0ff8 }, + { 0x0900, 0x1fdb, 0x0f9c }, + { 0x9800, 0x1fdf, 0x2000 }, + { 0x1800, 0x1fde, 0x0000 }, + { 0x0500, 0x1fe0, 0x0008 }, + { 0x8500, 0x1ff3, 0x5009 }, + { 0x8900, 0x1fe9, 0x4ff8 }, + { 0x8500, 0x1fe5, 0x3007 }, + { 0x8500, 0x1fe3, 0x2000 }, + { 0x0500, 0x1fe2, 0x0000 }, + { 0x0500, 0x1fe4, 0x0000 }, + { 0x8500, 0x1fe7, 0x2000 }, + { 0x0500, 0x1fe6, 0x0000 }, + { 0x0900, 0x1fe8, 0x0ff8 }, + { 0x9800, 0x1fed, 0x3000 }, + { 0x8900, 0x1feb, 0x2f90 }, + { 0x0900, 0x1fea, 0x0f90 }, + { 0x0900, 0x1fec, 0x0ff9 }, + { 0x9800, 0x1fef, 0x2000 }, + { 0x1800, 0x1fee, 0x0000 }, + { 0x0500, 0x1ff2, 0x0000 }, + { 0x8800, 0x1ffc, 0x4000 }, + { 0x8900, 0x1ff8, 0x3f80 }, + { 0x8500, 0x1ff6, 0x2000 }, + { 0x0500, 0x1ff4, 0x0000 }, + { 0x0500, 0x1ff7, 0x0000 }, + { 0x8900, 0x1ffa, 0x2f82 }, + { 0x0900, 0x1ff9, 0x0f80 }, + { 0x0900, 0x1ffb, 0x0f82 }, + { 0x9d00, 0x2001, 0x3000 }, + { 0x9800, 0x1ffe, 0x2000 }, + { 0x1800, 0x1ffd, 0x0000 }, + { 0x1d00, 0x2000, 0x0000 }, + { 0x9d00, 0x2003, 0x2000 }, + { 0x1d00, 0x2002, 0x0000 }, + { 0x1d00, 0x2004, 0x0000 }, + { 0x9500, 0x2025, 0x6000 }, + { 0x9100, 0x2015, 0x5000 }, + { 0x8100, 0x200d, 0x4000 }, + { 0x9d00, 0x2009, 0x3000 }, + { 0x9d00, 0x2007, 0x2000 }, + { 0x1d00, 0x2006, 0x0000 }, + { 0x1d00, 0x2008, 0x0000 }, + { 0x9d00, 0x200b, 0x2000 }, + { 0x1d00, 0x200a, 0x0000 }, + { 0x0100, 0x200c, 0x0000 }, + { 0x9100, 0x2011, 0x3000 }, + { 0x8100, 0x200f, 0x2000 }, + { 0x0100, 0x200e, 0x0000 }, + { 0x1100, 0x2010, 0x0000 }, + { 0x9100, 0x2013, 0x2000 }, + { 0x1100, 0x2012, 0x0000 }, + { 0x1100, 0x2014, 0x0000 }, + { 0x9300, 0x201d, 0x4000 }, + { 0x9300, 0x2019, 0x3000 }, + { 0x9500, 0x2017, 0x2000 }, + { 0x1500, 0x2016, 0x0000 }, + { 0x1400, 0x2018, 0x0000 }, + { 0x9400, 0x201b, 0x2000 }, + { 0x1600, 0x201a, 0x0000 }, + { 0x1400, 0x201c, 0x0000 }, + { 0x9500, 0x2021, 0x3000 }, + { 0x9400, 0x201f, 0x2000 }, + { 0x1600, 0x201e, 0x0000 }, + { 0x1500, 0x2020, 0x0000 }, + { 0x9500, 0x2023, 0x2000 }, + { 0x1500, 0x2022, 0x0000 }, + { 0x1500, 0x2024, 0x0000 }, + { 0x9500, 0x2035, 0x5000 }, + { 0x8100, 0x202d, 0x4000 }, + { 0x9c00, 0x2029, 0x3000 }, + { 0x9500, 0x2027, 0x2000 }, + { 0x1500, 0x2026, 0x0000 }, + { 0x1b00, 0x2028, 0x0000 }, + { 0x8100, 0x202b, 0x2000 }, + { 0x0100, 0x202a, 0x0000 }, + { 0x0100, 0x202c, 0x0000 }, + { 0x9500, 0x2031, 0x3000 }, + { 0x9d00, 0x202f, 0x2000 }, + { 0x0100, 0x202e, 0x0000 }, + { 0x1500, 0x2030, 0x0000 }, + { 0x9500, 0x2033, 0x2000 }, + { 0x1500, 0x2032, 0x0000 }, + { 0x1500, 0x2034, 0x0000 }, + { 0x9500, 0x203d, 0x4000 }, + { 0x9400, 0x2039, 0x3000 }, + { 0x9500, 0x2037, 0x2000 }, + { 0x1500, 0x2036, 0x0000 }, + { 0x1500, 0x2038, 0x0000 }, + { 0x9500, 0x203b, 0x2000 }, + { 0x1300, 0x203a, 0x0000 }, + { 0x1500, 0x203c, 0x0000 }, + { 0x9500, 0x2041, 0x3000 }, + { 0x9000, 0x203f, 0x2000 }, + { 0x1500, 0x203e, 0x0000 }, + { 0x1000, 0x2040, 0x0000 }, + { 0x9500, 0x2043, 0x2000 }, + { 0x1500, 0x2042, 0x0000 }, + { 0x1900, 0x2044, 0x0000 }, + { 0x9900, 0x21ae, 0x9000 }, + { 0x8900, 0x211a, 0x8000 }, + { 0x9700, 0x20a7, 0x7000 }, + { 0x8f00, 0x2076, 0x6000 }, + { 0x9500, 0x2057, 0x5000 }, + { 0x9500, 0x204d, 0x4000 }, + { 0x9500, 0x2049, 0x3000 }, + { 0x9500, 0x2047, 0x2000 }, + { 0x1200, 0x2046, 0x0000 }, + { 0x1500, 0x2048, 0x0000 }, + { 0x9500, 0x204b, 0x2000 }, + { 0x1500, 0x204a, 0x0000 }, + { 0x1500, 0x204c, 0x0000 }, + { 0x9500, 0x2051, 0x3000 }, + { 0x9500, 0x204f, 0x2000 }, + { 0x1500, 0x204e, 0x0000 }, + { 0x1500, 0x2050, 0x0000 }, + { 0x9500, 0x2053, 0x2000 }, + { 0x1900, 0x2052, 0x0000 }, + { 0x1000, 0x2054, 0x0000 }, + { 0x8100, 0x206c, 0x4000 }, + { 0x8100, 0x2062, 0x3000 }, + { 0x8100, 0x2060, 0x2000 }, + { 0x1d00, 0x205f, 0x0000 }, + { 0x0100, 0x2061, 0x0000 }, + { 0x8100, 0x206a, 0x2000 }, + { 0x0100, 0x2063, 0x0000 }, + { 0x0100, 0x206b, 0x0000 }, + { 0x8f00, 0x2070, 0x3000 }, + { 0x8100, 0x206e, 0x2000 }, + { 0x0100, 0x206d, 0x0000 }, + { 0x0100, 0x206f, 0x0000 }, + { 0x8f00, 0x2074, 0x2000 }, + { 0x0500, 0x2071, 0x0000 }, + { 0x0f00, 0x2075, 0x0000 }, + { 0x8f00, 0x2086, 0x5000 }, + { 0x9200, 0x207e, 0x4000 }, + { 0x9900, 0x207a, 0x3000 }, + { 0x8f00, 0x2078, 0x2000 }, + { 0x0f00, 0x2077, 0x0000 }, + { 0x0f00, 0x2079, 0x0000 }, + { 0x9900, 0x207c, 0x2000 }, + { 0x1900, 0x207b, 0x0000 }, + { 0x1600, 0x207d, 0x0000 }, + { 0x8f00, 0x2082, 0x3000 }, + { 0x8f00, 0x2080, 0x2000 }, + { 0x0500, 0x207f, 0x0000 }, + { 0x0f00, 0x2081, 0x0000 }, + { 0x8f00, 0x2084, 0x2000 }, + { 0x0f00, 0x2083, 0x0000 }, + { 0x0f00, 0x2085, 0x0000 }, + { 0x9200, 0x208e, 0x4000 }, + { 0x9900, 0x208a, 0x3000 }, + { 0x8f00, 0x2088, 0x2000 }, + { 0x0f00, 0x2087, 0x0000 }, + { 0x0f00, 0x2089, 0x0000 }, + { 0x9900, 0x208c, 0x2000 }, + { 0x1900, 0x208b, 0x0000 }, + { 0x1600, 0x208d, 0x0000 }, + { 0x9700, 0x20a3, 0x3000 }, + { 0x9700, 0x20a1, 0x2000 }, + { 0x1700, 0x20a0, 0x0000 }, + { 0x1700, 0x20a2, 0x0000 }, + { 0x9700, 0x20a5, 0x2000 }, + { 0x1700, 0x20a4, 0x0000 }, + { 0x1700, 0x20a6, 0x0000 }, + { 0x8c00, 0x20e5, 0x6000 }, + { 0x8c00, 0x20d5, 0x5000 }, + { 0x9700, 0x20af, 0x4000 }, + { 0x9700, 0x20ab, 0x3000 }, + { 0x9700, 0x20a9, 0x2000 }, + { 0x1700, 0x20a8, 0x0000 }, + { 0x1700, 0x20aa, 0x0000 }, + { 0x9700, 0x20ad, 0x2000 }, + { 0x1700, 0x20ac, 0x0000 }, + { 0x1700, 0x20ae, 0x0000 }, + { 0x8c00, 0x20d1, 0x3000 }, + { 0x9700, 0x20b1, 0x2000 }, + { 0x1700, 0x20b0, 0x0000 }, + { 0x0c00, 0x20d0, 0x0000 }, + { 0x8c00, 0x20d3, 0x2000 }, + { 0x0c00, 0x20d2, 0x0000 }, + { 0x0c00, 0x20d4, 0x0000 }, + { 0x8b00, 0x20dd, 0x4000 }, + { 0x8c00, 0x20d9, 0x3000 }, + { 0x8c00, 0x20d7, 0x2000 }, + { 0x0c00, 0x20d6, 0x0000 }, + { 0x0c00, 0x20d8, 0x0000 }, + { 0x8c00, 0x20db, 0x2000 }, + { 0x0c00, 0x20da, 0x0000 }, + { 0x0c00, 0x20dc, 0x0000 }, + { 0x8c00, 0x20e1, 0x3000 }, + { 0x8b00, 0x20df, 0x2000 }, + { 0x0b00, 0x20de, 0x0000 }, + { 0x0b00, 0x20e0, 0x0000 }, + { 0x8b00, 0x20e3, 0x2000 }, + { 0x0b00, 0x20e2, 0x0000 }, + { 0x0b00, 0x20e4, 0x0000 }, + { 0x8500, 0x210a, 0x5000 }, + { 0x8900, 0x2102, 0x4000 }, + { 0x8c00, 0x20e9, 0x3000 }, + { 0x8c00, 0x20e7, 0x2000 }, + { 0x0c00, 0x20e6, 0x0000 }, + { 0x0c00, 0x20e8, 0x0000 }, + { 0x9a00, 0x2100, 0x2000 }, + { 0x0c00, 0x20ea, 0x0000 }, + { 0x1a00, 0x2101, 0x0000 }, + { 0x9a00, 0x2106, 0x3000 }, + { 0x9a00, 0x2104, 0x2000 }, + { 0x1a00, 0x2103, 0x0000 }, + { 0x1a00, 0x2105, 0x0000 }, + { 0x9a00, 0x2108, 0x2000 }, + { 0x0900, 0x2107, 0x0000 }, + { 0x1a00, 0x2109, 0x0000 }, + { 0x8900, 0x2112, 0x4000 }, + { 0x8500, 0x210e, 0x3000 }, + { 0x8900, 0x210c, 0x2000 }, + { 0x0900, 0x210b, 0x0000 }, + { 0x0900, 0x210d, 0x0000 }, + { 0x8900, 0x2110, 0x2000 }, + { 0x0500, 0x210f, 0x0000 }, + { 0x0900, 0x2111, 0x0000 }, + { 0x9a00, 0x2116, 0x3000 }, + { 0x9a00, 0x2114, 0x2000 }, + { 0x0500, 0x2113, 0x0000 }, + { 0x0900, 0x2115, 0x0000 }, + { 0x9a00, 0x2118, 0x2000 }, + { 0x1a00, 0x2117, 0x0000 }, + { 0x0900, 0x2119, 0x0000 }, + { 0x8e00, 0x2162, 0x7000 }, + { 0x9a00, 0x213a, 0x6000 }, + { 0x8900, 0x212a, 0x5000 }, + { 0x9a00, 0x2122, 0x4000 }, + { 0x9a00, 0x211e, 0x3000 }, + { 0x8900, 0x211c, 0x2000 }, + { 0x0900, 0x211b, 0x0000 }, + { 0x0900, 0x211d, 0x0000 }, + { 0x9a00, 0x2120, 0x2000 }, + { 0x1a00, 0x211f, 0x0000 }, + { 0x1a00, 0x2121, 0x0000 }, + { 0x8900, 0x2126, 0x3000 }, + { 0x8900, 0x2124, 0x2000 }, + { 0x1a00, 0x2123, 0x0000 }, + { 0x1a00, 0x2125, 0x0000 }, + { 0x8900, 0x2128, 0x2000 }, + { 0x1a00, 0x2127, 0x0000 }, + { 0x1a00, 0x2129, 0x0000 }, + { 0x9a00, 0x2132, 0x4000 }, + { 0x9a00, 0x212e, 0x3000 }, + { 0x8900, 0x212c, 0x2000 }, + { 0x0900, 0x212b, 0x0000 }, + { 0x0900, 0x212d, 0x0000 }, + { 0x8900, 0x2130, 0x2000 }, + { 0x0500, 0x212f, 0x0000 }, + { 0x0900, 0x2131, 0x0000 }, + { 0x8700, 0x2136, 0x3000 }, + { 0x8500, 0x2134, 0x2000 }, + { 0x0900, 0x2133, 0x0000 }, + { 0x0700, 0x2135, 0x0000 }, + { 0x8700, 0x2138, 0x2000 }, + { 0x0700, 0x2137, 0x0000 }, + { 0x0500, 0x2139, 0x0000 }, + { 0x9900, 0x214b, 0x5000 }, + { 0x9900, 0x2143, 0x4000 }, + { 0x8900, 0x213f, 0x3000 }, + { 0x8500, 0x213d, 0x2000 }, + { 0x1a00, 0x213b, 0x0000 }, + { 0x0900, 0x213e, 0x0000 }, + { 0x9900, 0x2141, 0x2000 }, + { 0x1900, 0x2140, 0x0000 }, + { 0x1900, 0x2142, 0x0000 }, + { 0x8500, 0x2147, 0x3000 }, + { 0x8900, 0x2145, 0x2000 }, + { 0x1900, 0x2144, 0x0000 }, + { 0x0500, 0x2146, 0x0000 }, + { 0x8500, 0x2149, 0x2000 }, + { 0x0500, 0x2148, 0x0000 }, + { 0x1a00, 0x214a, 0x0000 }, + { 0x8f00, 0x215a, 0x4000 }, + { 0x8f00, 0x2156, 0x3000 }, + { 0x8f00, 0x2154, 0x2000 }, + { 0x0f00, 0x2153, 0x0000 }, + { 0x0f00, 0x2155, 0x0000 }, + { 0x8f00, 0x2158, 0x2000 }, + { 0x0f00, 0x2157, 0x0000 }, + { 0x0f00, 0x2159, 0x0000 }, + { 0x8f00, 0x215e, 0x3000 }, + { 0x8f00, 0x215c, 0x2000 }, + { 0x0f00, 0x215b, 0x0000 }, + { 0x0f00, 0x215d, 0x0000 }, + { 0x8e00, 0x2160, 0x2000 }, + { 0x0f00, 0x215f, 0x0000 }, + { 0x0e00, 0x2161, 0x0000 }, + { 0x8e00, 0x2182, 0x6000 }, + { 0x8e00, 0x2172, 0x5000 }, + { 0x8e00, 0x216a, 0x4000 }, + { 0x8e00, 0x2166, 0x3000 }, + { 0x8e00, 0x2164, 0x2000 }, + { 0x0e00, 0x2163, 0x0000 }, + { 0x0e00, 0x2165, 0x0000 }, + { 0x8e00, 0x2168, 0x2000 }, + { 0x0e00, 0x2167, 0x0000 }, + { 0x0e00, 0x2169, 0x0000 }, + { 0x8e00, 0x216e, 0x3000 }, + { 0x8e00, 0x216c, 0x2000 }, + { 0x0e00, 0x216b, 0x0000 }, + { 0x0e00, 0x216d, 0x0000 }, + { 0x8e00, 0x2170, 0x2000 }, + { 0x0e00, 0x216f, 0x0000 }, + { 0x0e00, 0x2171, 0x0000 }, + { 0x8e00, 0x217a, 0x4000 }, + { 0x8e00, 0x2176, 0x3000 }, + { 0x8e00, 0x2174, 0x2000 }, + { 0x0e00, 0x2173, 0x0000 }, + { 0x0e00, 0x2175, 0x0000 }, + { 0x8e00, 0x2178, 0x2000 }, + { 0x0e00, 0x2177, 0x0000 }, + { 0x0e00, 0x2179, 0x0000 }, + { 0x8e00, 0x217e, 0x3000 }, + { 0x8e00, 0x217c, 0x2000 }, + { 0x0e00, 0x217b, 0x0000 }, + { 0x0e00, 0x217d, 0x0000 }, + { 0x8e00, 0x2180, 0x2000 }, + { 0x0e00, 0x217f, 0x0000 }, + { 0x0e00, 0x2181, 0x0000 }, + { 0x9a00, 0x219e, 0x5000 }, + { 0x9a00, 0x2196, 0x4000 }, + { 0x9900, 0x2192, 0x3000 }, + { 0x9900, 0x2190, 0x2000 }, + { 0x0e00, 0x2183, 0x0000 }, + { 0x1900, 0x2191, 0x0000 }, + { 0x9900, 0x2194, 0x2000 }, + { 0x1900, 0x2193, 0x0000 }, + { 0x1a00, 0x2195, 0x0000 }, + { 0x9900, 0x219a, 0x3000 }, + { 0x9a00, 0x2198, 0x2000 }, + { 0x1a00, 0x2197, 0x0000 }, + { 0x1a00, 0x2199, 0x0000 }, + { 0x9a00, 0x219c, 0x2000 }, + { 0x1900, 0x219b, 0x0000 }, + { 0x1a00, 0x219d, 0x0000 }, + { 0x9900, 0x21a6, 0x4000 }, + { 0x9a00, 0x21a2, 0x3000 }, + { 0x9900, 0x21a0, 0x2000 }, + { 0x1a00, 0x219f, 0x0000 }, + { 0x1a00, 0x21a1, 0x0000 }, + { 0x9a00, 0x21a4, 0x2000 }, + { 0x1900, 0x21a3, 0x0000 }, + { 0x1a00, 0x21a5, 0x0000 }, + { 0x9a00, 0x21aa, 0x3000 }, + { 0x9a00, 0x21a8, 0x2000 }, + { 0x1a00, 0x21a7, 0x0000 }, + { 0x1a00, 0x21a9, 0x0000 }, + { 0x9a00, 0x21ac, 0x2000 }, + { 0x1a00, 0x21ab, 0x0000 }, + { 0x1a00, 0x21ad, 0x0000 }, + { 0x9900, 0x222e, 0x8000 }, + { 0x9a00, 0x21ee, 0x7000 }, + { 0x9900, 0x21ce, 0x6000 }, + { 0x9a00, 0x21be, 0x5000 }, + { 0x9a00, 0x21b6, 0x4000 }, + { 0x9a00, 0x21b2, 0x3000 }, + { 0x9a00, 0x21b0, 0x2000 }, + { 0x1a00, 0x21af, 0x0000 }, + { 0x1a00, 0x21b1, 0x0000 }, + { 0x9a00, 0x21b4, 0x2000 }, + { 0x1a00, 0x21b3, 0x0000 }, + { 0x1a00, 0x21b5, 0x0000 }, + { 0x9a00, 0x21ba, 0x3000 }, + { 0x9a00, 0x21b8, 0x2000 }, + { 0x1a00, 0x21b7, 0x0000 }, + { 0x1a00, 0x21b9, 0x0000 }, + { 0x9a00, 0x21bc, 0x2000 }, + { 0x1a00, 0x21bb, 0x0000 }, + { 0x1a00, 0x21bd, 0x0000 }, + { 0x9a00, 0x21c6, 0x4000 }, + { 0x9a00, 0x21c2, 0x3000 }, + { 0x9a00, 0x21c0, 0x2000 }, + { 0x1a00, 0x21bf, 0x0000 }, + { 0x1a00, 0x21c1, 0x0000 }, + { 0x9a00, 0x21c4, 0x2000 }, + { 0x1a00, 0x21c3, 0x0000 }, + { 0x1a00, 0x21c5, 0x0000 }, + { 0x9a00, 0x21ca, 0x3000 }, + { 0x9a00, 0x21c8, 0x2000 }, + { 0x1a00, 0x21c7, 0x0000 }, + { 0x1a00, 0x21c9, 0x0000 }, + { 0x9a00, 0x21cc, 0x2000 }, + { 0x1a00, 0x21cb, 0x0000 }, + { 0x1a00, 0x21cd, 0x0000 }, + { 0x9a00, 0x21de, 0x5000 }, + { 0x9a00, 0x21d6, 0x4000 }, + { 0x9900, 0x21d2, 0x3000 }, + { 0x9a00, 0x21d0, 0x2000 }, + { 0x1900, 0x21cf, 0x0000 }, + { 0x1a00, 0x21d1, 0x0000 }, + { 0x9900, 0x21d4, 0x2000 }, + { 0x1a00, 0x21d3, 0x0000 }, + { 0x1a00, 0x21d5, 0x0000 }, + { 0x9a00, 0x21da, 0x3000 }, + { 0x9a00, 0x21d8, 0x2000 }, + { 0x1a00, 0x21d7, 0x0000 }, + { 0x1a00, 0x21d9, 0x0000 }, + { 0x9a00, 0x21dc, 0x2000 }, + { 0x1a00, 0x21db, 0x0000 }, + { 0x1a00, 0x21dd, 0x0000 }, + { 0x9a00, 0x21e6, 0x4000 }, + { 0x9a00, 0x21e2, 0x3000 }, + { 0x9a00, 0x21e0, 0x2000 }, + { 0x1a00, 0x21df, 0x0000 }, + { 0x1a00, 0x21e1, 0x0000 }, + { 0x9a00, 0x21e4, 0x2000 }, + { 0x1a00, 0x21e3, 0x0000 }, + { 0x1a00, 0x21e5, 0x0000 }, + { 0x9a00, 0x21ea, 0x3000 }, + { 0x9a00, 0x21e8, 0x2000 }, + { 0x1a00, 0x21e7, 0x0000 }, + { 0x1a00, 0x21e9, 0x0000 }, + { 0x9a00, 0x21ec, 0x2000 }, + { 0x1a00, 0x21eb, 0x0000 }, + { 0x1a00, 0x21ed, 0x0000 }, + { 0x9900, 0x220e, 0x6000 }, + { 0x9900, 0x21fe, 0x5000 }, + { 0x9900, 0x21f6, 0x4000 }, + { 0x9a00, 0x21f2, 0x3000 }, + { 0x9a00, 0x21f0, 0x2000 }, + { 0x1a00, 0x21ef, 0x0000 }, + { 0x1a00, 0x21f1, 0x0000 }, + { 0x9900, 0x21f4, 0x2000 }, + { 0x1a00, 0x21f3, 0x0000 }, + { 0x1900, 0x21f5, 0x0000 }, + { 0x9900, 0x21fa, 0x3000 }, + { 0x9900, 0x21f8, 0x2000 }, + { 0x1900, 0x21f7, 0x0000 }, + { 0x1900, 0x21f9, 0x0000 }, + { 0x9900, 0x21fc, 0x2000 }, + { 0x1900, 0x21fb, 0x0000 }, + { 0x1900, 0x21fd, 0x0000 }, + { 0x9900, 0x2206, 0x4000 }, + { 0x9900, 0x2202, 0x3000 }, + { 0x9900, 0x2200, 0x2000 }, + { 0x1900, 0x21ff, 0x0000 }, + { 0x1900, 0x2201, 0x0000 }, + { 0x9900, 0x2204, 0x2000 }, + { 0x1900, 0x2203, 0x0000 }, + { 0x1900, 0x2205, 0x0000 }, + { 0x9900, 0x220a, 0x3000 }, + { 0x9900, 0x2208, 0x2000 }, + { 0x1900, 0x2207, 0x0000 }, + { 0x1900, 0x2209, 0x0000 }, + { 0x9900, 0x220c, 0x2000 }, + { 0x1900, 0x220b, 0x0000 }, + { 0x1900, 0x220d, 0x0000 }, + { 0x9900, 0x221e, 0x5000 }, + { 0x9900, 0x2216, 0x4000 }, + { 0x9900, 0x2212, 0x3000 }, + { 0x9900, 0x2210, 0x2000 }, + { 0x1900, 0x220f, 0x0000 }, + { 0x1900, 0x2211, 0x0000 }, + { 0x9900, 0x2214, 0x2000 }, + { 0x1900, 0x2213, 0x0000 }, + { 0x1900, 0x2215, 0x0000 }, + { 0x9900, 0x221a, 0x3000 }, + { 0x9900, 0x2218, 0x2000 }, + { 0x1900, 0x2217, 0x0000 }, + { 0x1900, 0x2219, 0x0000 }, + { 0x9900, 0x221c, 0x2000 }, + { 0x1900, 0x221b, 0x0000 }, + { 0x1900, 0x221d, 0x0000 }, + { 0x9900, 0x2226, 0x4000 }, + { 0x9900, 0x2222, 0x3000 }, + { 0x9900, 0x2220, 0x2000 }, + { 0x1900, 0x221f, 0x0000 }, + { 0x1900, 0x2221, 0x0000 }, + { 0x9900, 0x2224, 0x2000 }, + { 0x1900, 0x2223, 0x0000 }, + { 0x1900, 0x2225, 0x0000 }, + { 0x9900, 0x222a, 0x3000 }, + { 0x9900, 0x2228, 0x2000 }, + { 0x1900, 0x2227, 0x0000 }, + { 0x1900, 0x2229, 0x0000 }, + { 0x9900, 0x222c, 0x2000 }, + { 0x1900, 0x222b, 0x0000 }, + { 0x1900, 0x222d, 0x0000 }, + { 0x9900, 0x226e, 0x7000 }, + { 0x9900, 0x224e, 0x6000 }, + { 0x9900, 0x223e, 0x5000 }, + { 0x9900, 0x2236, 0x4000 }, + { 0x9900, 0x2232, 0x3000 }, + { 0x9900, 0x2230, 0x2000 }, + { 0x1900, 0x222f, 0x0000 }, + { 0x1900, 0x2231, 0x0000 }, + { 0x9900, 0x2234, 0x2000 }, + { 0x1900, 0x2233, 0x0000 }, + { 0x1900, 0x2235, 0x0000 }, + { 0x9900, 0x223a, 0x3000 }, + { 0x9900, 0x2238, 0x2000 }, + { 0x1900, 0x2237, 0x0000 }, + { 0x1900, 0x2239, 0x0000 }, + { 0x9900, 0x223c, 0x2000 }, + { 0x1900, 0x223b, 0x0000 }, + { 0x1900, 0x223d, 0x0000 }, + { 0x9900, 0x2246, 0x4000 }, + { 0x9900, 0x2242, 0x3000 }, + { 0x9900, 0x2240, 0x2000 }, + { 0x1900, 0x223f, 0x0000 }, + { 0x1900, 0x2241, 0x0000 }, + { 0x9900, 0x2244, 0x2000 }, + { 0x1900, 0x2243, 0x0000 }, + { 0x1900, 0x2245, 0x0000 }, + { 0x9900, 0x224a, 0x3000 }, + { 0x9900, 0x2248, 0x2000 }, + { 0x1900, 0x2247, 0x0000 }, + { 0x1900, 0x2249, 0x0000 }, + { 0x9900, 0x224c, 0x2000 }, + { 0x1900, 0x224b, 0x0000 }, + { 0x1900, 0x224d, 0x0000 }, + { 0x9900, 0x225e, 0x5000 }, + { 0x9900, 0x2256, 0x4000 }, + { 0x9900, 0x2252, 0x3000 }, + { 0x9900, 0x2250, 0x2000 }, + { 0x1900, 0x224f, 0x0000 }, + { 0x1900, 0x2251, 0x0000 }, + { 0x9900, 0x2254, 0x2000 }, + { 0x1900, 0x2253, 0x0000 }, + { 0x1900, 0x2255, 0x0000 }, + { 0x9900, 0x225a, 0x3000 }, + { 0x9900, 0x2258, 0x2000 }, + { 0x1900, 0x2257, 0x0000 }, + { 0x1900, 0x2259, 0x0000 }, + { 0x9900, 0x225c, 0x2000 }, + { 0x1900, 0x225b, 0x0000 }, + { 0x1900, 0x225d, 0x0000 }, + { 0x9900, 0x2266, 0x4000 }, + { 0x9900, 0x2262, 0x3000 }, + { 0x9900, 0x2260, 0x2000 }, + { 0x1900, 0x225f, 0x0000 }, + { 0x1900, 0x2261, 0x0000 }, + { 0x9900, 0x2264, 0x2000 }, + { 0x1900, 0x2263, 0x0000 }, + { 0x1900, 0x2265, 0x0000 }, + { 0x9900, 0x226a, 0x3000 }, + { 0x9900, 0x2268, 0x2000 }, + { 0x1900, 0x2267, 0x0000 }, + { 0x1900, 0x2269, 0x0000 }, + { 0x9900, 0x226c, 0x2000 }, + { 0x1900, 0x226b, 0x0000 }, + { 0x1900, 0x226d, 0x0000 }, + { 0x9900, 0x228e, 0x6000 }, + { 0x9900, 0x227e, 0x5000 }, + { 0x9900, 0x2276, 0x4000 }, + { 0x9900, 0x2272, 0x3000 }, + { 0x9900, 0x2270, 0x2000 }, + { 0x1900, 0x226f, 0x0000 }, + { 0x1900, 0x2271, 0x0000 }, + { 0x9900, 0x2274, 0x2000 }, + { 0x1900, 0x2273, 0x0000 }, + { 0x1900, 0x2275, 0x0000 }, + { 0x9900, 0x227a, 0x3000 }, + { 0x9900, 0x2278, 0x2000 }, + { 0x1900, 0x2277, 0x0000 }, + { 0x1900, 0x2279, 0x0000 }, + { 0x9900, 0x227c, 0x2000 }, + { 0x1900, 0x227b, 0x0000 }, + { 0x1900, 0x227d, 0x0000 }, + { 0x9900, 0x2286, 0x4000 }, + { 0x9900, 0x2282, 0x3000 }, + { 0x9900, 0x2280, 0x2000 }, + { 0x1900, 0x227f, 0x0000 }, + { 0x1900, 0x2281, 0x0000 }, + { 0x9900, 0x2284, 0x2000 }, + { 0x1900, 0x2283, 0x0000 }, + { 0x1900, 0x2285, 0x0000 }, + { 0x9900, 0x228a, 0x3000 }, + { 0x9900, 0x2288, 0x2000 }, + { 0x1900, 0x2287, 0x0000 }, + { 0x1900, 0x2289, 0x0000 }, + { 0x9900, 0x228c, 0x2000 }, + { 0x1900, 0x228b, 0x0000 }, + { 0x1900, 0x228d, 0x0000 }, + { 0x9900, 0x229e, 0x5000 }, + { 0x9900, 0x2296, 0x4000 }, + { 0x9900, 0x2292, 0x3000 }, + { 0x9900, 0x2290, 0x2000 }, + { 0x1900, 0x228f, 0x0000 }, + { 0x1900, 0x2291, 0x0000 }, + { 0x9900, 0x2294, 0x2000 }, + { 0x1900, 0x2293, 0x0000 }, + { 0x1900, 0x2295, 0x0000 }, + { 0x9900, 0x229a, 0x3000 }, + { 0x9900, 0x2298, 0x2000 }, + { 0x1900, 0x2297, 0x0000 }, + { 0x1900, 0x2299, 0x0000 }, + { 0x9900, 0x229c, 0x2000 }, + { 0x1900, 0x229b, 0x0000 }, + { 0x1900, 0x229d, 0x0000 }, + { 0x9900, 0x22a6, 0x4000 }, + { 0x9900, 0x22a2, 0x3000 }, + { 0x9900, 0x22a0, 0x2000 }, + { 0x1900, 0x229f, 0x0000 }, + { 0x1900, 0x22a1, 0x0000 }, + { 0x9900, 0x22a4, 0x2000 }, + { 0x1900, 0x22a3, 0x0000 }, + { 0x1900, 0x22a5, 0x0000 }, + { 0x9900, 0x22aa, 0x3000 }, + { 0x9900, 0x22a8, 0x2000 }, + { 0x1900, 0x22a7, 0x0000 }, + { 0x1900, 0x22a9, 0x0000 }, + { 0x9900, 0x22ac, 0x2000 }, + { 0x1900, 0x22ab, 0x0000 }, + { 0x1900, 0x22ad, 0x0000 }, + { 0x8f00, 0x2787, 0xb000 }, + { 0x9a00, 0x250b, 0xa000 }, + { 0x9900, 0x23ae, 0x9000 }, + { 0x9a00, 0x232e, 0x8000 }, + { 0x9900, 0x22ee, 0x7000 }, + { 0x9900, 0x22ce, 0x6000 }, + { 0x9900, 0x22be, 0x5000 }, + { 0x9900, 0x22b6, 0x4000 }, + { 0x9900, 0x22b2, 0x3000 }, + { 0x9900, 0x22b0, 0x2000 }, + { 0x1900, 0x22af, 0x0000 }, + { 0x1900, 0x22b1, 0x0000 }, + { 0x9900, 0x22b4, 0x2000 }, + { 0x1900, 0x22b3, 0x0000 }, + { 0x1900, 0x22b5, 0x0000 }, + { 0x9900, 0x22ba, 0x3000 }, + { 0x9900, 0x22b8, 0x2000 }, + { 0x1900, 0x22b7, 0x0000 }, + { 0x1900, 0x22b9, 0x0000 }, + { 0x9900, 0x22bc, 0x2000 }, + { 0x1900, 0x22bb, 0x0000 }, + { 0x1900, 0x22bd, 0x0000 }, + { 0x9900, 0x22c6, 0x4000 }, + { 0x9900, 0x22c2, 0x3000 }, + { 0x9900, 0x22c0, 0x2000 }, + { 0x1900, 0x22bf, 0x0000 }, + { 0x1900, 0x22c1, 0x0000 }, + { 0x9900, 0x22c4, 0x2000 }, + { 0x1900, 0x22c3, 0x0000 }, + { 0x1900, 0x22c5, 0x0000 }, + { 0x9900, 0x22ca, 0x3000 }, + { 0x9900, 0x22c8, 0x2000 }, + { 0x1900, 0x22c7, 0x0000 }, + { 0x1900, 0x22c9, 0x0000 }, + { 0x9900, 0x22cc, 0x2000 }, + { 0x1900, 0x22cb, 0x0000 }, + { 0x1900, 0x22cd, 0x0000 }, + { 0x9900, 0x22de, 0x5000 }, + { 0x9900, 0x22d6, 0x4000 }, + { 0x9900, 0x22d2, 0x3000 }, + { 0x9900, 0x22d0, 0x2000 }, + { 0x1900, 0x22cf, 0x0000 }, + { 0x1900, 0x22d1, 0x0000 }, + { 0x9900, 0x22d4, 0x2000 }, + { 0x1900, 0x22d3, 0x0000 }, + { 0x1900, 0x22d5, 0x0000 }, + { 0x9900, 0x22da, 0x3000 }, + { 0x9900, 0x22d8, 0x2000 }, + { 0x1900, 0x22d7, 0x0000 }, + { 0x1900, 0x22d9, 0x0000 }, + { 0x9900, 0x22dc, 0x2000 }, + { 0x1900, 0x22db, 0x0000 }, + { 0x1900, 0x22dd, 0x0000 }, + { 0x9900, 0x22e6, 0x4000 }, + { 0x9900, 0x22e2, 0x3000 }, + { 0x9900, 0x22e0, 0x2000 }, + { 0x1900, 0x22df, 0x0000 }, + { 0x1900, 0x22e1, 0x0000 }, + { 0x9900, 0x22e4, 0x2000 }, + { 0x1900, 0x22e3, 0x0000 }, + { 0x1900, 0x22e5, 0x0000 }, + { 0x9900, 0x22ea, 0x3000 }, + { 0x9900, 0x22e8, 0x2000 }, + { 0x1900, 0x22e7, 0x0000 }, + { 0x1900, 0x22e9, 0x0000 }, + { 0x9900, 0x22ec, 0x2000 }, + { 0x1900, 0x22eb, 0x0000 }, + { 0x1900, 0x22ed, 0x0000 }, + { 0x9a00, 0x230e, 0x6000 }, + { 0x9900, 0x22fe, 0x5000 }, + { 0x9900, 0x22f6, 0x4000 }, + { 0x9900, 0x22f2, 0x3000 }, + { 0x9900, 0x22f0, 0x2000 }, + { 0x1900, 0x22ef, 0x0000 }, + { 0x1900, 0x22f1, 0x0000 }, + { 0x9900, 0x22f4, 0x2000 }, + { 0x1900, 0x22f3, 0x0000 }, + { 0x1900, 0x22f5, 0x0000 }, + { 0x9900, 0x22fa, 0x3000 }, + { 0x9900, 0x22f8, 0x2000 }, + { 0x1900, 0x22f7, 0x0000 }, + { 0x1900, 0x22f9, 0x0000 }, + { 0x9900, 0x22fc, 0x2000 }, + { 0x1900, 0x22fb, 0x0000 }, + { 0x1900, 0x22fd, 0x0000 }, + { 0x9a00, 0x2306, 0x4000 }, + { 0x9a00, 0x2302, 0x3000 }, + { 0x9a00, 0x2300, 0x2000 }, + { 0x1900, 0x22ff, 0x0000 }, + { 0x1a00, 0x2301, 0x0000 }, + { 0x9a00, 0x2304, 0x2000 }, + { 0x1a00, 0x2303, 0x0000 }, + { 0x1a00, 0x2305, 0x0000 }, + { 0x9900, 0x230a, 0x3000 }, + { 0x9900, 0x2308, 0x2000 }, + { 0x1a00, 0x2307, 0x0000 }, + { 0x1900, 0x2309, 0x0000 }, + { 0x9a00, 0x230c, 0x2000 }, + { 0x1900, 0x230b, 0x0000 }, + { 0x1a00, 0x230d, 0x0000 }, + { 0x9a00, 0x231e, 0x5000 }, + { 0x9a00, 0x2316, 0x4000 }, + { 0x9a00, 0x2312, 0x3000 }, + { 0x9a00, 0x2310, 0x2000 }, + { 0x1a00, 0x230f, 0x0000 }, + { 0x1a00, 0x2311, 0x0000 }, + { 0x9a00, 0x2314, 0x2000 }, + { 0x1a00, 0x2313, 0x0000 }, + { 0x1a00, 0x2315, 0x0000 }, + { 0x9a00, 0x231a, 0x3000 }, + { 0x9a00, 0x2318, 0x2000 }, + { 0x1a00, 0x2317, 0x0000 }, + { 0x1a00, 0x2319, 0x0000 }, + { 0x9a00, 0x231c, 0x2000 }, + { 0x1a00, 0x231b, 0x0000 }, + { 0x1a00, 0x231d, 0x0000 }, + { 0x9a00, 0x2326, 0x4000 }, + { 0x9a00, 0x2322, 0x3000 }, + { 0x9900, 0x2320, 0x2000 }, + { 0x1a00, 0x231f, 0x0000 }, + { 0x1900, 0x2321, 0x0000 }, + { 0x9a00, 0x2324, 0x2000 }, + { 0x1a00, 0x2323, 0x0000 }, + { 0x1a00, 0x2325, 0x0000 }, + { 0x9200, 0x232a, 0x3000 }, + { 0x9a00, 0x2328, 0x2000 }, + { 0x1a00, 0x2327, 0x0000 }, + { 0x1600, 0x2329, 0x0000 }, + { 0x9a00, 0x232c, 0x2000 }, + { 0x1a00, 0x232b, 0x0000 }, + { 0x1a00, 0x232d, 0x0000 }, + { 0x9a00, 0x236e, 0x7000 }, + { 0x9a00, 0x234e, 0x6000 }, + { 0x9a00, 0x233e, 0x5000 }, + { 0x9a00, 0x2336, 0x4000 }, + { 0x9a00, 0x2332, 0x3000 }, + { 0x9a00, 0x2330, 0x2000 }, + { 0x1a00, 0x232f, 0x0000 }, + { 0x1a00, 0x2331, 0x0000 }, + { 0x9a00, 0x2334, 0x2000 }, + { 0x1a00, 0x2333, 0x0000 }, + { 0x1a00, 0x2335, 0x0000 }, + { 0x9a00, 0x233a, 0x3000 }, + { 0x9a00, 0x2338, 0x2000 }, + { 0x1a00, 0x2337, 0x0000 }, + { 0x1a00, 0x2339, 0x0000 }, + { 0x9a00, 0x233c, 0x2000 }, + { 0x1a00, 0x233b, 0x0000 }, + { 0x1a00, 0x233d, 0x0000 }, + { 0x9a00, 0x2346, 0x4000 }, + { 0x9a00, 0x2342, 0x3000 }, + { 0x9a00, 0x2340, 0x2000 }, + { 0x1a00, 0x233f, 0x0000 }, + { 0x1a00, 0x2341, 0x0000 }, + { 0x9a00, 0x2344, 0x2000 }, + { 0x1a00, 0x2343, 0x0000 }, + { 0x1a00, 0x2345, 0x0000 }, + { 0x9a00, 0x234a, 0x3000 }, + { 0x9a00, 0x2348, 0x2000 }, + { 0x1a00, 0x2347, 0x0000 }, + { 0x1a00, 0x2349, 0x0000 }, + { 0x9a00, 0x234c, 0x2000 }, + { 0x1a00, 0x234b, 0x0000 }, + { 0x1a00, 0x234d, 0x0000 }, + { 0x9a00, 0x235e, 0x5000 }, + { 0x9a00, 0x2356, 0x4000 }, + { 0x9a00, 0x2352, 0x3000 }, + { 0x9a00, 0x2350, 0x2000 }, + { 0x1a00, 0x234f, 0x0000 }, + { 0x1a00, 0x2351, 0x0000 }, + { 0x9a00, 0x2354, 0x2000 }, + { 0x1a00, 0x2353, 0x0000 }, + { 0x1a00, 0x2355, 0x0000 }, + { 0x9a00, 0x235a, 0x3000 }, + { 0x9a00, 0x2358, 0x2000 }, + { 0x1a00, 0x2357, 0x0000 }, + { 0x1a00, 0x2359, 0x0000 }, + { 0x9a00, 0x235c, 0x2000 }, + { 0x1a00, 0x235b, 0x0000 }, + { 0x1a00, 0x235d, 0x0000 }, + { 0x9a00, 0x2366, 0x4000 }, + { 0x9a00, 0x2362, 0x3000 }, + { 0x9a00, 0x2360, 0x2000 }, + { 0x1a00, 0x235f, 0x0000 }, + { 0x1a00, 0x2361, 0x0000 }, + { 0x9a00, 0x2364, 0x2000 }, + { 0x1a00, 0x2363, 0x0000 }, + { 0x1a00, 0x2365, 0x0000 }, + { 0x9a00, 0x236a, 0x3000 }, + { 0x9a00, 0x2368, 0x2000 }, + { 0x1a00, 0x2367, 0x0000 }, + { 0x1a00, 0x2369, 0x0000 }, + { 0x9a00, 0x236c, 0x2000 }, + { 0x1a00, 0x236b, 0x0000 }, + { 0x1a00, 0x236d, 0x0000 }, + { 0x9a00, 0x238e, 0x6000 }, + { 0x9a00, 0x237e, 0x5000 }, + { 0x9a00, 0x2376, 0x4000 }, + { 0x9a00, 0x2372, 0x3000 }, + { 0x9a00, 0x2370, 0x2000 }, + { 0x1a00, 0x236f, 0x0000 }, + { 0x1a00, 0x2371, 0x0000 }, + { 0x9a00, 0x2374, 0x2000 }, + { 0x1a00, 0x2373, 0x0000 }, + { 0x1a00, 0x2375, 0x0000 }, + { 0x9a00, 0x237a, 0x3000 }, + { 0x9a00, 0x2378, 0x2000 }, + { 0x1a00, 0x2377, 0x0000 }, + { 0x1a00, 0x2379, 0x0000 }, + { 0x9900, 0x237c, 0x2000 }, + { 0x1a00, 0x237b, 0x0000 }, + { 0x1a00, 0x237d, 0x0000 }, + { 0x9a00, 0x2386, 0x4000 }, + { 0x9a00, 0x2382, 0x3000 }, + { 0x9a00, 0x2380, 0x2000 }, + { 0x1a00, 0x237f, 0x0000 }, + { 0x1a00, 0x2381, 0x0000 }, + { 0x9a00, 0x2384, 0x2000 }, + { 0x1a00, 0x2383, 0x0000 }, + { 0x1a00, 0x2385, 0x0000 }, + { 0x9a00, 0x238a, 0x3000 }, + { 0x9a00, 0x2388, 0x2000 }, + { 0x1a00, 0x2387, 0x0000 }, + { 0x1a00, 0x2389, 0x0000 }, + { 0x9a00, 0x238c, 0x2000 }, + { 0x1a00, 0x238b, 0x0000 }, + { 0x1a00, 0x238d, 0x0000 }, + { 0x9900, 0x239e, 0x5000 }, + { 0x9a00, 0x2396, 0x4000 }, + { 0x9a00, 0x2392, 0x3000 }, + { 0x9a00, 0x2390, 0x2000 }, + { 0x1a00, 0x238f, 0x0000 }, + { 0x1a00, 0x2391, 0x0000 }, + { 0x9a00, 0x2394, 0x2000 }, + { 0x1a00, 0x2393, 0x0000 }, + { 0x1a00, 0x2395, 0x0000 }, + { 0x9a00, 0x239a, 0x3000 }, + { 0x9a00, 0x2398, 0x2000 }, + { 0x1a00, 0x2397, 0x0000 }, + { 0x1a00, 0x2399, 0x0000 }, + { 0x9900, 0x239c, 0x2000 }, + { 0x1900, 0x239b, 0x0000 }, + { 0x1900, 0x239d, 0x0000 }, + { 0x9900, 0x23a6, 0x4000 }, + { 0x9900, 0x23a2, 0x3000 }, + { 0x9900, 0x23a0, 0x2000 }, + { 0x1900, 0x239f, 0x0000 }, + { 0x1900, 0x23a1, 0x0000 }, + { 0x9900, 0x23a4, 0x2000 }, + { 0x1900, 0x23a3, 0x0000 }, + { 0x1900, 0x23a5, 0x0000 }, + { 0x9900, 0x23aa, 0x3000 }, + { 0x9900, 0x23a8, 0x2000 }, + { 0x1900, 0x23a7, 0x0000 }, + { 0x1900, 0x23a9, 0x0000 }, + { 0x9900, 0x23ac, 0x2000 }, + { 0x1900, 0x23ab, 0x0000 }, + { 0x1900, 0x23ad, 0x0000 }, + { 0x8f00, 0x248b, 0x8000 }, + { 0x9a00, 0x241d, 0x7000 }, + { 0x9a00, 0x23ce, 0x6000 }, + { 0x9a00, 0x23be, 0x5000 }, + { 0x9500, 0x23b6, 0x4000 }, + { 0x9900, 0x23b2, 0x3000 }, + { 0x9900, 0x23b0, 0x2000 }, + { 0x1900, 0x23af, 0x0000 }, + { 0x1900, 0x23b1, 0x0000 }, + { 0x9600, 0x23b4, 0x2000 }, + { 0x1900, 0x23b3, 0x0000 }, + { 0x1200, 0x23b5, 0x0000 }, + { 0x9a00, 0x23ba, 0x3000 }, + { 0x9a00, 0x23b8, 0x2000 }, + { 0x1a00, 0x23b7, 0x0000 }, + { 0x1a00, 0x23b9, 0x0000 }, + { 0x9a00, 0x23bc, 0x2000 }, + { 0x1a00, 0x23bb, 0x0000 }, + { 0x1a00, 0x23bd, 0x0000 }, + { 0x9a00, 0x23c6, 0x4000 }, + { 0x9a00, 0x23c2, 0x3000 }, + { 0x9a00, 0x23c0, 0x2000 }, + { 0x1a00, 0x23bf, 0x0000 }, + { 0x1a00, 0x23c1, 0x0000 }, + { 0x9a00, 0x23c4, 0x2000 }, + { 0x1a00, 0x23c3, 0x0000 }, + { 0x1a00, 0x23c5, 0x0000 }, + { 0x9a00, 0x23ca, 0x3000 }, + { 0x9a00, 0x23c8, 0x2000 }, + { 0x1a00, 0x23c7, 0x0000 }, + { 0x1a00, 0x23c9, 0x0000 }, + { 0x9a00, 0x23cc, 0x2000 }, + { 0x1a00, 0x23cb, 0x0000 }, + { 0x1a00, 0x23cd, 0x0000 }, + { 0x9a00, 0x240d, 0x5000 }, + { 0x9a00, 0x2405, 0x4000 }, + { 0x9a00, 0x2401, 0x3000 }, + { 0x9a00, 0x23d0, 0x2000 }, + { 0x1a00, 0x23cf, 0x0000 }, + { 0x1a00, 0x2400, 0x0000 }, + { 0x9a00, 0x2403, 0x2000 }, + { 0x1a00, 0x2402, 0x0000 }, + { 0x1a00, 0x2404, 0x0000 }, + { 0x9a00, 0x2409, 0x3000 }, + { 0x9a00, 0x2407, 0x2000 }, + { 0x1a00, 0x2406, 0x0000 }, + { 0x1a00, 0x2408, 0x0000 }, + { 0x9a00, 0x240b, 0x2000 }, + { 0x1a00, 0x240a, 0x0000 }, + { 0x1a00, 0x240c, 0x0000 }, + { 0x9a00, 0x2415, 0x4000 }, + { 0x9a00, 0x2411, 0x3000 }, + { 0x9a00, 0x240f, 0x2000 }, + { 0x1a00, 0x240e, 0x0000 }, + { 0x1a00, 0x2410, 0x0000 }, + { 0x9a00, 0x2413, 0x2000 }, + { 0x1a00, 0x2412, 0x0000 }, + { 0x1a00, 0x2414, 0x0000 }, + { 0x9a00, 0x2419, 0x3000 }, + { 0x9a00, 0x2417, 0x2000 }, + { 0x1a00, 0x2416, 0x0000 }, + { 0x1a00, 0x2418, 0x0000 }, + { 0x9a00, 0x241b, 0x2000 }, + { 0x1a00, 0x241a, 0x0000 }, + { 0x1a00, 0x241c, 0x0000 }, + { 0x8f00, 0x246b, 0x6000 }, + { 0x9a00, 0x2446, 0x5000 }, + { 0x9a00, 0x2425, 0x4000 }, + { 0x9a00, 0x2421, 0x3000 }, + { 0x9a00, 0x241f, 0x2000 }, + { 0x1a00, 0x241e, 0x0000 }, + { 0x1a00, 0x2420, 0x0000 }, + { 0x9a00, 0x2423, 0x2000 }, + { 0x1a00, 0x2422, 0x0000 }, + { 0x1a00, 0x2424, 0x0000 }, + { 0x9a00, 0x2442, 0x3000 }, + { 0x9a00, 0x2440, 0x2000 }, + { 0x1a00, 0x2426, 0x0000 }, + { 0x1a00, 0x2441, 0x0000 }, + { 0x9a00, 0x2444, 0x2000 }, + { 0x1a00, 0x2443, 0x0000 }, + { 0x1a00, 0x2445, 0x0000 }, + { 0x8f00, 0x2463, 0x4000 }, + { 0x9a00, 0x244a, 0x3000 }, + { 0x9a00, 0x2448, 0x2000 }, + { 0x1a00, 0x2447, 0x0000 }, + { 0x1a00, 0x2449, 0x0000 }, + { 0x8f00, 0x2461, 0x2000 }, + { 0x0f00, 0x2460, 0x0000 }, + { 0x0f00, 0x2462, 0x0000 }, + { 0x8f00, 0x2467, 0x3000 }, + { 0x8f00, 0x2465, 0x2000 }, + { 0x0f00, 0x2464, 0x0000 }, + { 0x0f00, 0x2466, 0x0000 }, + { 0x8f00, 0x2469, 0x2000 }, + { 0x0f00, 0x2468, 0x0000 }, + { 0x0f00, 0x246a, 0x0000 }, + { 0x8f00, 0x247b, 0x5000 }, + { 0x8f00, 0x2473, 0x4000 }, + { 0x8f00, 0x246f, 0x3000 }, + { 0x8f00, 0x246d, 0x2000 }, + { 0x0f00, 0x246c, 0x0000 }, + { 0x0f00, 0x246e, 0x0000 }, + { 0x8f00, 0x2471, 0x2000 }, + { 0x0f00, 0x2470, 0x0000 }, + { 0x0f00, 0x2472, 0x0000 }, + { 0x8f00, 0x2477, 0x3000 }, + { 0x8f00, 0x2475, 0x2000 }, + { 0x0f00, 0x2474, 0x0000 }, + { 0x0f00, 0x2476, 0x0000 }, + { 0x8f00, 0x2479, 0x2000 }, + { 0x0f00, 0x2478, 0x0000 }, + { 0x0f00, 0x247a, 0x0000 }, + { 0x8f00, 0x2483, 0x4000 }, + { 0x8f00, 0x247f, 0x3000 }, + { 0x8f00, 0x247d, 0x2000 }, + { 0x0f00, 0x247c, 0x0000 }, + { 0x0f00, 0x247e, 0x0000 }, + { 0x8f00, 0x2481, 0x2000 }, + { 0x0f00, 0x2480, 0x0000 }, + { 0x0f00, 0x2482, 0x0000 }, + { 0x8f00, 0x2487, 0x3000 }, + { 0x8f00, 0x2485, 0x2000 }, + { 0x0f00, 0x2484, 0x0000 }, + { 0x0f00, 0x2486, 0x0000 }, + { 0x8f00, 0x2489, 0x2000 }, + { 0x0f00, 0x2488, 0x0000 }, + { 0x0f00, 0x248a, 0x0000 }, + { 0x9a00, 0x24cb, 0x7000 }, + { 0x9a00, 0x24ab, 0x6000 }, + { 0x8f00, 0x249b, 0x5000 }, + { 0x8f00, 0x2493, 0x4000 }, + { 0x8f00, 0x248f, 0x3000 }, + { 0x8f00, 0x248d, 0x2000 }, + { 0x0f00, 0x248c, 0x0000 }, + { 0x0f00, 0x248e, 0x0000 }, + { 0x8f00, 0x2491, 0x2000 }, + { 0x0f00, 0x2490, 0x0000 }, + { 0x0f00, 0x2492, 0x0000 }, + { 0x8f00, 0x2497, 0x3000 }, + { 0x8f00, 0x2495, 0x2000 }, + { 0x0f00, 0x2494, 0x0000 }, + { 0x0f00, 0x2496, 0x0000 }, + { 0x8f00, 0x2499, 0x2000 }, + { 0x0f00, 0x2498, 0x0000 }, + { 0x0f00, 0x249a, 0x0000 }, + { 0x9a00, 0x24a3, 0x4000 }, + { 0x9a00, 0x249f, 0x3000 }, + { 0x9a00, 0x249d, 0x2000 }, + { 0x1a00, 0x249c, 0x0000 }, + { 0x1a00, 0x249e, 0x0000 }, + { 0x9a00, 0x24a1, 0x2000 }, + { 0x1a00, 0x24a0, 0x0000 }, + { 0x1a00, 0x24a2, 0x0000 }, + { 0x9a00, 0x24a7, 0x3000 }, + { 0x9a00, 0x24a5, 0x2000 }, + { 0x1a00, 0x24a4, 0x0000 }, + { 0x1a00, 0x24a6, 0x0000 }, + { 0x9a00, 0x24a9, 0x2000 }, + { 0x1a00, 0x24a8, 0x0000 }, + { 0x1a00, 0x24aa, 0x0000 }, + { 0x9a00, 0x24bb, 0x5000 }, + { 0x9a00, 0x24b3, 0x4000 }, + { 0x9a00, 0x24af, 0x3000 }, + { 0x9a00, 0x24ad, 0x2000 }, + { 0x1a00, 0x24ac, 0x0000 }, + { 0x1a00, 0x24ae, 0x0000 }, + { 0x9a00, 0x24b1, 0x2000 }, + { 0x1a00, 0x24b0, 0x0000 }, + { 0x1a00, 0x24b2, 0x0000 }, + { 0x9a00, 0x24b7, 0x3000 }, + { 0x9a00, 0x24b5, 0x2000 }, + { 0x1a00, 0x24b4, 0x0000 }, + { 0x1a00, 0x24b6, 0x0000 }, + { 0x9a00, 0x24b9, 0x2000 }, + { 0x1a00, 0x24b8, 0x0000 }, + { 0x1a00, 0x24ba, 0x0000 }, + { 0x9a00, 0x24c3, 0x4000 }, + { 0x9a00, 0x24bf, 0x3000 }, + { 0x9a00, 0x24bd, 0x2000 }, + { 0x1a00, 0x24bc, 0x0000 }, + { 0x1a00, 0x24be, 0x0000 }, + { 0x9a00, 0x24c1, 0x2000 }, + { 0x1a00, 0x24c0, 0x0000 }, + { 0x1a00, 0x24c2, 0x0000 }, + { 0x9a00, 0x24c7, 0x3000 }, + { 0x9a00, 0x24c5, 0x2000 }, + { 0x1a00, 0x24c4, 0x0000 }, + { 0x1a00, 0x24c6, 0x0000 }, + { 0x9a00, 0x24c9, 0x2000 }, + { 0x1a00, 0x24c8, 0x0000 }, + { 0x1a00, 0x24ca, 0x0000 }, + { 0x8f00, 0x24eb, 0x6000 }, + { 0x9a00, 0x24db, 0x5000 }, + { 0x9a00, 0x24d3, 0x4000 }, + { 0x9a00, 0x24cf, 0x3000 }, + { 0x9a00, 0x24cd, 0x2000 }, + { 0x1a00, 0x24cc, 0x0000 }, + { 0x1a00, 0x24ce, 0x0000 }, + { 0x9a00, 0x24d1, 0x2000 }, + { 0x1a00, 0x24d0, 0x0000 }, + { 0x1a00, 0x24d2, 0x0000 }, + { 0x9a00, 0x24d7, 0x3000 }, + { 0x9a00, 0x24d5, 0x2000 }, + { 0x1a00, 0x24d4, 0x0000 }, + { 0x1a00, 0x24d6, 0x0000 }, + { 0x9a00, 0x24d9, 0x2000 }, + { 0x1a00, 0x24d8, 0x0000 }, + { 0x1a00, 0x24da, 0x0000 }, + { 0x9a00, 0x24e3, 0x4000 }, + { 0x9a00, 0x24df, 0x3000 }, + { 0x9a00, 0x24dd, 0x2000 }, + { 0x1a00, 0x24dc, 0x0000 }, + { 0x1a00, 0x24de, 0x0000 }, + { 0x9a00, 0x24e1, 0x2000 }, + { 0x1a00, 0x24e0, 0x0000 }, + { 0x1a00, 0x24e2, 0x0000 }, + { 0x9a00, 0x24e7, 0x3000 }, + { 0x9a00, 0x24e5, 0x2000 }, + { 0x1a00, 0x24e4, 0x0000 }, + { 0x1a00, 0x24e6, 0x0000 }, + { 0x9a00, 0x24e9, 0x2000 }, + { 0x1a00, 0x24e8, 0x0000 }, + { 0x0f00, 0x24ea, 0x0000 }, + { 0x8f00, 0x24fb, 0x5000 }, + { 0x8f00, 0x24f3, 0x4000 }, + { 0x8f00, 0x24ef, 0x3000 }, + { 0x8f00, 0x24ed, 0x2000 }, + { 0x0f00, 0x24ec, 0x0000 }, + { 0x0f00, 0x24ee, 0x0000 }, + { 0x8f00, 0x24f1, 0x2000 }, + { 0x0f00, 0x24f0, 0x0000 }, + { 0x0f00, 0x24f2, 0x0000 }, + { 0x8f00, 0x24f7, 0x3000 }, + { 0x8f00, 0x24f5, 0x2000 }, + { 0x0f00, 0x24f4, 0x0000 }, + { 0x0f00, 0x24f6, 0x0000 }, + { 0x8f00, 0x24f9, 0x2000 }, + { 0x0f00, 0x24f8, 0x0000 }, + { 0x0f00, 0x24fa, 0x0000 }, + { 0x9a00, 0x2503, 0x4000 }, + { 0x8f00, 0x24ff, 0x3000 }, + { 0x8f00, 0x24fd, 0x2000 }, + { 0x0f00, 0x24fc, 0x0000 }, + { 0x0f00, 0x24fe, 0x0000 }, + { 0x9a00, 0x2501, 0x2000 }, + { 0x1a00, 0x2500, 0x0000 }, + { 0x1a00, 0x2502, 0x0000 }, + { 0x9a00, 0x2507, 0x3000 }, + { 0x9a00, 0x2505, 0x2000 }, + { 0x1a00, 0x2504, 0x0000 }, + { 0x1a00, 0x2506, 0x0000 }, + { 0x9a00, 0x2509, 0x2000 }, + { 0x1a00, 0x2508, 0x0000 }, + { 0x1a00, 0x250a, 0x0000 }, + { 0x9a00, 0x260b, 0x9000 }, + { 0x9a00, 0x258b, 0x8000 }, + { 0x9a00, 0x254b, 0x7000 }, + { 0x9a00, 0x252b, 0x6000 }, + { 0x9a00, 0x251b, 0x5000 }, + { 0x9a00, 0x2513, 0x4000 }, + { 0x9a00, 0x250f, 0x3000 }, + { 0x9a00, 0x250d, 0x2000 }, + { 0x1a00, 0x250c, 0x0000 }, + { 0x1a00, 0x250e, 0x0000 }, + { 0x9a00, 0x2511, 0x2000 }, + { 0x1a00, 0x2510, 0x0000 }, + { 0x1a00, 0x2512, 0x0000 }, + { 0x9a00, 0x2517, 0x3000 }, + { 0x9a00, 0x2515, 0x2000 }, + { 0x1a00, 0x2514, 0x0000 }, + { 0x1a00, 0x2516, 0x0000 }, + { 0x9a00, 0x2519, 0x2000 }, + { 0x1a00, 0x2518, 0x0000 }, + { 0x1a00, 0x251a, 0x0000 }, + { 0x9a00, 0x2523, 0x4000 }, + { 0x9a00, 0x251f, 0x3000 }, + { 0x9a00, 0x251d, 0x2000 }, + { 0x1a00, 0x251c, 0x0000 }, + { 0x1a00, 0x251e, 0x0000 }, + { 0x9a00, 0x2521, 0x2000 }, + { 0x1a00, 0x2520, 0x0000 }, + { 0x1a00, 0x2522, 0x0000 }, + { 0x9a00, 0x2527, 0x3000 }, + { 0x9a00, 0x2525, 0x2000 }, + { 0x1a00, 0x2524, 0x0000 }, + { 0x1a00, 0x2526, 0x0000 }, + { 0x9a00, 0x2529, 0x2000 }, + { 0x1a00, 0x2528, 0x0000 }, + { 0x1a00, 0x252a, 0x0000 }, + { 0x9a00, 0x253b, 0x5000 }, + { 0x9a00, 0x2533, 0x4000 }, + { 0x9a00, 0x252f, 0x3000 }, + { 0x9a00, 0x252d, 0x2000 }, + { 0x1a00, 0x252c, 0x0000 }, + { 0x1a00, 0x252e, 0x0000 }, + { 0x9a00, 0x2531, 0x2000 }, + { 0x1a00, 0x2530, 0x0000 }, + { 0x1a00, 0x2532, 0x0000 }, + { 0x9a00, 0x2537, 0x3000 }, + { 0x9a00, 0x2535, 0x2000 }, + { 0x1a00, 0x2534, 0x0000 }, + { 0x1a00, 0x2536, 0x0000 }, + { 0x9a00, 0x2539, 0x2000 }, + { 0x1a00, 0x2538, 0x0000 }, + { 0x1a00, 0x253a, 0x0000 }, + { 0x9a00, 0x2543, 0x4000 }, + { 0x9a00, 0x253f, 0x3000 }, + { 0x9a00, 0x253d, 0x2000 }, + { 0x1a00, 0x253c, 0x0000 }, + { 0x1a00, 0x253e, 0x0000 }, + { 0x9a00, 0x2541, 0x2000 }, + { 0x1a00, 0x2540, 0x0000 }, + { 0x1a00, 0x2542, 0x0000 }, + { 0x9a00, 0x2547, 0x3000 }, + { 0x9a00, 0x2545, 0x2000 }, + { 0x1a00, 0x2544, 0x0000 }, + { 0x1a00, 0x2546, 0x0000 }, + { 0x9a00, 0x2549, 0x2000 }, + { 0x1a00, 0x2548, 0x0000 }, + { 0x1a00, 0x254a, 0x0000 }, + { 0x9a00, 0x256b, 0x6000 }, + { 0x9a00, 0x255b, 0x5000 }, + { 0x9a00, 0x2553, 0x4000 }, + { 0x9a00, 0x254f, 0x3000 }, + { 0x9a00, 0x254d, 0x2000 }, + { 0x1a00, 0x254c, 0x0000 }, + { 0x1a00, 0x254e, 0x0000 }, + { 0x9a00, 0x2551, 0x2000 }, + { 0x1a00, 0x2550, 0x0000 }, + { 0x1a00, 0x2552, 0x0000 }, + { 0x9a00, 0x2557, 0x3000 }, + { 0x9a00, 0x2555, 0x2000 }, + { 0x1a00, 0x2554, 0x0000 }, + { 0x1a00, 0x2556, 0x0000 }, + { 0x9a00, 0x2559, 0x2000 }, + { 0x1a00, 0x2558, 0x0000 }, + { 0x1a00, 0x255a, 0x0000 }, + { 0x9a00, 0x2563, 0x4000 }, + { 0x9a00, 0x255f, 0x3000 }, + { 0x9a00, 0x255d, 0x2000 }, + { 0x1a00, 0x255c, 0x0000 }, + { 0x1a00, 0x255e, 0x0000 }, + { 0x9a00, 0x2561, 0x2000 }, + { 0x1a00, 0x2560, 0x0000 }, + { 0x1a00, 0x2562, 0x0000 }, + { 0x9a00, 0x2567, 0x3000 }, + { 0x9a00, 0x2565, 0x2000 }, + { 0x1a00, 0x2564, 0x0000 }, + { 0x1a00, 0x2566, 0x0000 }, + { 0x9a00, 0x2569, 0x2000 }, + { 0x1a00, 0x2568, 0x0000 }, + { 0x1a00, 0x256a, 0x0000 }, + { 0x9a00, 0x257b, 0x5000 }, + { 0x9a00, 0x2573, 0x4000 }, + { 0x9a00, 0x256f, 0x3000 }, + { 0x9a00, 0x256d, 0x2000 }, + { 0x1a00, 0x256c, 0x0000 }, + { 0x1a00, 0x256e, 0x0000 }, + { 0x9a00, 0x2571, 0x2000 }, + { 0x1a00, 0x2570, 0x0000 }, + { 0x1a00, 0x2572, 0x0000 }, + { 0x9a00, 0x2577, 0x3000 }, + { 0x9a00, 0x2575, 0x2000 }, + { 0x1a00, 0x2574, 0x0000 }, + { 0x1a00, 0x2576, 0x0000 }, + { 0x9a00, 0x2579, 0x2000 }, + { 0x1a00, 0x2578, 0x0000 }, + { 0x1a00, 0x257a, 0x0000 }, + { 0x9a00, 0x2583, 0x4000 }, + { 0x9a00, 0x257f, 0x3000 }, + { 0x9a00, 0x257d, 0x2000 }, + { 0x1a00, 0x257c, 0x0000 }, + { 0x1a00, 0x257e, 0x0000 }, + { 0x9a00, 0x2581, 0x2000 }, + { 0x1a00, 0x2580, 0x0000 }, + { 0x1a00, 0x2582, 0x0000 }, + { 0x9a00, 0x2587, 0x3000 }, + { 0x9a00, 0x2585, 0x2000 }, + { 0x1a00, 0x2584, 0x0000 }, + { 0x1a00, 0x2586, 0x0000 }, + { 0x9a00, 0x2589, 0x2000 }, + { 0x1a00, 0x2588, 0x0000 }, + { 0x1a00, 0x258a, 0x0000 }, + { 0x9a00, 0x25cb, 0x7000 }, + { 0x9a00, 0x25ab, 0x6000 }, + { 0x9a00, 0x259b, 0x5000 }, + { 0x9a00, 0x2593, 0x4000 }, + { 0x9a00, 0x258f, 0x3000 }, + { 0x9a00, 0x258d, 0x2000 }, + { 0x1a00, 0x258c, 0x0000 }, + { 0x1a00, 0x258e, 0x0000 }, + { 0x9a00, 0x2591, 0x2000 }, + { 0x1a00, 0x2590, 0x0000 }, + { 0x1a00, 0x2592, 0x0000 }, + { 0x9a00, 0x2597, 0x3000 }, + { 0x9a00, 0x2595, 0x2000 }, + { 0x1a00, 0x2594, 0x0000 }, + { 0x1a00, 0x2596, 0x0000 }, + { 0x9a00, 0x2599, 0x2000 }, + { 0x1a00, 0x2598, 0x0000 }, + { 0x1a00, 0x259a, 0x0000 }, + { 0x9a00, 0x25a3, 0x4000 }, + { 0x9a00, 0x259f, 0x3000 }, + { 0x9a00, 0x259d, 0x2000 }, + { 0x1a00, 0x259c, 0x0000 }, + { 0x1a00, 0x259e, 0x0000 }, + { 0x9a00, 0x25a1, 0x2000 }, + { 0x1a00, 0x25a0, 0x0000 }, + { 0x1a00, 0x25a2, 0x0000 }, + { 0x9a00, 0x25a7, 0x3000 }, + { 0x9a00, 0x25a5, 0x2000 }, + { 0x1a00, 0x25a4, 0x0000 }, + { 0x1a00, 0x25a6, 0x0000 }, + { 0x9a00, 0x25a9, 0x2000 }, + { 0x1a00, 0x25a8, 0x0000 }, + { 0x1a00, 0x25aa, 0x0000 }, + { 0x9a00, 0x25bb, 0x5000 }, + { 0x9a00, 0x25b3, 0x4000 }, + { 0x9a00, 0x25af, 0x3000 }, + { 0x9a00, 0x25ad, 0x2000 }, + { 0x1a00, 0x25ac, 0x0000 }, + { 0x1a00, 0x25ae, 0x0000 }, + { 0x9a00, 0x25b1, 0x2000 }, + { 0x1a00, 0x25b0, 0x0000 }, + { 0x1a00, 0x25b2, 0x0000 }, + { 0x9900, 0x25b7, 0x3000 }, + { 0x9a00, 0x25b5, 0x2000 }, + { 0x1a00, 0x25b4, 0x0000 }, + { 0x1a00, 0x25b6, 0x0000 }, + { 0x9a00, 0x25b9, 0x2000 }, + { 0x1a00, 0x25b8, 0x0000 }, + { 0x1a00, 0x25ba, 0x0000 }, + { 0x9a00, 0x25c3, 0x4000 }, + { 0x9a00, 0x25bf, 0x3000 }, + { 0x9a00, 0x25bd, 0x2000 }, + { 0x1a00, 0x25bc, 0x0000 }, + { 0x1a00, 0x25be, 0x0000 }, + { 0x9900, 0x25c1, 0x2000 }, + { 0x1a00, 0x25c0, 0x0000 }, + { 0x1a00, 0x25c2, 0x0000 }, + { 0x9a00, 0x25c7, 0x3000 }, + { 0x9a00, 0x25c5, 0x2000 }, + { 0x1a00, 0x25c4, 0x0000 }, + { 0x1a00, 0x25c6, 0x0000 }, + { 0x9a00, 0x25c9, 0x2000 }, + { 0x1a00, 0x25c8, 0x0000 }, + { 0x1a00, 0x25ca, 0x0000 }, + { 0x9a00, 0x25eb, 0x6000 }, + { 0x9a00, 0x25db, 0x5000 }, + { 0x9a00, 0x25d3, 0x4000 }, + { 0x9a00, 0x25cf, 0x3000 }, + { 0x9a00, 0x25cd, 0x2000 }, + { 0x1a00, 0x25cc, 0x0000 }, + { 0x1a00, 0x25ce, 0x0000 }, + { 0x9a00, 0x25d1, 0x2000 }, + { 0x1a00, 0x25d0, 0x0000 }, + { 0x1a00, 0x25d2, 0x0000 }, + { 0x9a00, 0x25d7, 0x3000 }, + { 0x9a00, 0x25d5, 0x2000 }, + { 0x1a00, 0x25d4, 0x0000 }, + { 0x1a00, 0x25d6, 0x0000 }, + { 0x9a00, 0x25d9, 0x2000 }, + { 0x1a00, 0x25d8, 0x0000 }, + { 0x1a00, 0x25da, 0x0000 }, + { 0x9a00, 0x25e3, 0x4000 }, + { 0x9a00, 0x25df, 0x3000 }, + { 0x9a00, 0x25dd, 0x2000 }, + { 0x1a00, 0x25dc, 0x0000 }, + { 0x1a00, 0x25de, 0x0000 }, + { 0x9a00, 0x25e1, 0x2000 }, + { 0x1a00, 0x25e0, 0x0000 }, + { 0x1a00, 0x25e2, 0x0000 }, + { 0x9a00, 0x25e7, 0x3000 }, + { 0x9a00, 0x25e5, 0x2000 }, + { 0x1a00, 0x25e4, 0x0000 }, + { 0x1a00, 0x25e6, 0x0000 }, + { 0x9a00, 0x25e9, 0x2000 }, + { 0x1a00, 0x25e8, 0x0000 }, + { 0x1a00, 0x25ea, 0x0000 }, + { 0x9900, 0x25fb, 0x5000 }, + { 0x9a00, 0x25f3, 0x4000 }, + { 0x9a00, 0x25ef, 0x3000 }, + { 0x9a00, 0x25ed, 0x2000 }, + { 0x1a00, 0x25ec, 0x0000 }, + { 0x1a00, 0x25ee, 0x0000 }, + { 0x9a00, 0x25f1, 0x2000 }, + { 0x1a00, 0x25f0, 0x0000 }, + { 0x1a00, 0x25f2, 0x0000 }, + { 0x9a00, 0x25f7, 0x3000 }, + { 0x9a00, 0x25f5, 0x2000 }, + { 0x1a00, 0x25f4, 0x0000 }, + { 0x1a00, 0x25f6, 0x0000 }, + { 0x9900, 0x25f9, 0x2000 }, + { 0x1900, 0x25f8, 0x0000 }, + { 0x1900, 0x25fa, 0x0000 }, + { 0x9a00, 0x2603, 0x4000 }, + { 0x9900, 0x25ff, 0x3000 }, + { 0x9900, 0x25fd, 0x2000 }, + { 0x1900, 0x25fc, 0x0000 }, + { 0x1900, 0x25fe, 0x0000 }, + { 0x9a00, 0x2601, 0x2000 }, + { 0x1a00, 0x2600, 0x0000 }, + { 0x1a00, 0x2602, 0x0000 }, + { 0x9a00, 0x2607, 0x3000 }, + { 0x9a00, 0x2605, 0x2000 }, + { 0x1a00, 0x2604, 0x0000 }, + { 0x1a00, 0x2606, 0x0000 }, + { 0x9a00, 0x2609, 0x2000 }, + { 0x1a00, 0x2608, 0x0000 }, + { 0x1a00, 0x260a, 0x0000 }, + { 0x9a00, 0x268e, 0x8000 }, + { 0x9a00, 0x264c, 0x7000 }, + { 0x9a00, 0x262c, 0x6000 }, + { 0x9a00, 0x261c, 0x5000 }, + { 0x9a00, 0x2613, 0x4000 }, + { 0x9a00, 0x260f, 0x3000 }, + { 0x9a00, 0x260d, 0x2000 }, + { 0x1a00, 0x260c, 0x0000 }, + { 0x1a00, 0x260e, 0x0000 }, + { 0x9a00, 0x2611, 0x2000 }, + { 0x1a00, 0x2610, 0x0000 }, + { 0x1a00, 0x2612, 0x0000 }, + { 0x9a00, 0x2617, 0x3000 }, + { 0x9a00, 0x2615, 0x2000 }, + { 0x1a00, 0x2614, 0x0000 }, + { 0x1a00, 0x2616, 0x0000 }, + { 0x9a00, 0x261a, 0x2000 }, + { 0x1a00, 0x2619, 0x0000 }, + { 0x1a00, 0x261b, 0x0000 }, + { 0x9a00, 0x2624, 0x4000 }, + { 0x9a00, 0x2620, 0x3000 }, + { 0x9a00, 0x261e, 0x2000 }, + { 0x1a00, 0x261d, 0x0000 }, + { 0x1a00, 0x261f, 0x0000 }, + { 0x9a00, 0x2622, 0x2000 }, + { 0x1a00, 0x2621, 0x0000 }, + { 0x1a00, 0x2623, 0x0000 }, + { 0x9a00, 0x2628, 0x3000 }, + { 0x9a00, 0x2626, 0x2000 }, + { 0x1a00, 0x2625, 0x0000 }, + { 0x1a00, 0x2627, 0x0000 }, + { 0x9a00, 0x262a, 0x2000 }, + { 0x1a00, 0x2629, 0x0000 }, + { 0x1a00, 0x262b, 0x0000 }, + { 0x9a00, 0x263c, 0x5000 }, + { 0x9a00, 0x2634, 0x4000 }, + { 0x9a00, 0x2630, 0x3000 }, + { 0x9a00, 0x262e, 0x2000 }, + { 0x1a00, 0x262d, 0x0000 }, + { 0x1a00, 0x262f, 0x0000 }, + { 0x9a00, 0x2632, 0x2000 }, + { 0x1a00, 0x2631, 0x0000 }, + { 0x1a00, 0x2633, 0x0000 }, + { 0x9a00, 0x2638, 0x3000 }, + { 0x9a00, 0x2636, 0x2000 }, + { 0x1a00, 0x2635, 0x0000 }, + { 0x1a00, 0x2637, 0x0000 }, + { 0x9a00, 0x263a, 0x2000 }, + { 0x1a00, 0x2639, 0x0000 }, + { 0x1a00, 0x263b, 0x0000 }, + { 0x9a00, 0x2644, 0x4000 }, + { 0x9a00, 0x2640, 0x3000 }, + { 0x9a00, 0x263e, 0x2000 }, + { 0x1a00, 0x263d, 0x0000 }, + { 0x1a00, 0x263f, 0x0000 }, + { 0x9a00, 0x2642, 0x2000 }, + { 0x1a00, 0x2641, 0x0000 }, + { 0x1a00, 0x2643, 0x0000 }, + { 0x9a00, 0x2648, 0x3000 }, + { 0x9a00, 0x2646, 0x2000 }, + { 0x1a00, 0x2645, 0x0000 }, + { 0x1a00, 0x2647, 0x0000 }, + { 0x9a00, 0x264a, 0x2000 }, + { 0x1a00, 0x2649, 0x0000 }, + { 0x1a00, 0x264b, 0x0000 }, + { 0x9a00, 0x266c, 0x6000 }, + { 0x9a00, 0x265c, 0x5000 }, + { 0x9a00, 0x2654, 0x4000 }, + { 0x9a00, 0x2650, 0x3000 }, + { 0x9a00, 0x264e, 0x2000 }, + { 0x1a00, 0x264d, 0x0000 }, + { 0x1a00, 0x264f, 0x0000 }, + { 0x9a00, 0x2652, 0x2000 }, + { 0x1a00, 0x2651, 0x0000 }, + { 0x1a00, 0x2653, 0x0000 }, + { 0x9a00, 0x2658, 0x3000 }, + { 0x9a00, 0x2656, 0x2000 }, + { 0x1a00, 0x2655, 0x0000 }, + { 0x1a00, 0x2657, 0x0000 }, + { 0x9a00, 0x265a, 0x2000 }, + { 0x1a00, 0x2659, 0x0000 }, + { 0x1a00, 0x265b, 0x0000 }, + { 0x9a00, 0x2664, 0x4000 }, + { 0x9a00, 0x2660, 0x3000 }, + { 0x9a00, 0x265e, 0x2000 }, + { 0x1a00, 0x265d, 0x0000 }, + { 0x1a00, 0x265f, 0x0000 }, + { 0x9a00, 0x2662, 0x2000 }, + { 0x1a00, 0x2661, 0x0000 }, + { 0x1a00, 0x2663, 0x0000 }, + { 0x9a00, 0x2668, 0x3000 }, + { 0x9a00, 0x2666, 0x2000 }, + { 0x1a00, 0x2665, 0x0000 }, + { 0x1a00, 0x2667, 0x0000 }, + { 0x9a00, 0x266a, 0x2000 }, + { 0x1a00, 0x2669, 0x0000 }, + { 0x1a00, 0x266b, 0x0000 }, + { 0x9a00, 0x267c, 0x5000 }, + { 0x9a00, 0x2674, 0x4000 }, + { 0x9a00, 0x2670, 0x3000 }, + { 0x9a00, 0x266e, 0x2000 }, + { 0x1a00, 0x266d, 0x0000 }, + { 0x1900, 0x266f, 0x0000 }, + { 0x9a00, 0x2672, 0x2000 }, + { 0x1a00, 0x2671, 0x0000 }, + { 0x1a00, 0x2673, 0x0000 }, + { 0x9a00, 0x2678, 0x3000 }, + { 0x9a00, 0x2676, 0x2000 }, + { 0x1a00, 0x2675, 0x0000 }, + { 0x1a00, 0x2677, 0x0000 }, + { 0x9a00, 0x267a, 0x2000 }, + { 0x1a00, 0x2679, 0x0000 }, + { 0x1a00, 0x267b, 0x0000 }, + { 0x9a00, 0x2686, 0x4000 }, + { 0x9a00, 0x2682, 0x3000 }, + { 0x9a00, 0x2680, 0x2000 }, + { 0x1a00, 0x267d, 0x0000 }, + { 0x1a00, 0x2681, 0x0000 }, + { 0x9a00, 0x2684, 0x2000 }, + { 0x1a00, 0x2683, 0x0000 }, + { 0x1a00, 0x2685, 0x0000 }, + { 0x9a00, 0x268a, 0x3000 }, + { 0x9a00, 0x2688, 0x2000 }, + { 0x1a00, 0x2687, 0x0000 }, + { 0x1a00, 0x2689, 0x0000 }, + { 0x9a00, 0x268c, 0x2000 }, + { 0x1a00, 0x268b, 0x0000 }, + { 0x1a00, 0x268d, 0x0000 }, + { 0x9a00, 0x273f, 0x7000 }, + { 0x9a00, 0x271e, 0x6000 }, + { 0x9a00, 0x270e, 0x5000 }, + { 0x9a00, 0x2703, 0x4000 }, + { 0x9a00, 0x26a0, 0x3000 }, + { 0x9a00, 0x2690, 0x2000 }, + { 0x1a00, 0x268f, 0x0000 }, + { 0x1a00, 0x2691, 0x0000 }, + { 0x9a00, 0x2701, 0x2000 }, + { 0x1a00, 0x26a1, 0x0000 }, + { 0x1a00, 0x2702, 0x0000 }, + { 0x9a00, 0x2708, 0x3000 }, + { 0x9a00, 0x2706, 0x2000 }, + { 0x1a00, 0x2704, 0x0000 }, + { 0x1a00, 0x2707, 0x0000 }, + { 0x9a00, 0x270c, 0x2000 }, + { 0x1a00, 0x2709, 0x0000 }, + { 0x1a00, 0x270d, 0x0000 }, + { 0x9a00, 0x2716, 0x4000 }, + { 0x9a00, 0x2712, 0x3000 }, + { 0x9a00, 0x2710, 0x2000 }, + { 0x1a00, 0x270f, 0x0000 }, + { 0x1a00, 0x2711, 0x0000 }, + { 0x9a00, 0x2714, 0x2000 }, + { 0x1a00, 0x2713, 0x0000 }, + { 0x1a00, 0x2715, 0x0000 }, + { 0x9a00, 0x271a, 0x3000 }, + { 0x9a00, 0x2718, 0x2000 }, + { 0x1a00, 0x2717, 0x0000 }, + { 0x1a00, 0x2719, 0x0000 }, + { 0x9a00, 0x271c, 0x2000 }, + { 0x1a00, 0x271b, 0x0000 }, + { 0x1a00, 0x271d, 0x0000 }, + { 0x9a00, 0x272f, 0x5000 }, + { 0x9a00, 0x2726, 0x4000 }, + { 0x9a00, 0x2722, 0x3000 }, + { 0x9a00, 0x2720, 0x2000 }, + { 0x1a00, 0x271f, 0x0000 }, + { 0x1a00, 0x2721, 0x0000 }, + { 0x9a00, 0x2724, 0x2000 }, + { 0x1a00, 0x2723, 0x0000 }, + { 0x1a00, 0x2725, 0x0000 }, + { 0x9a00, 0x272b, 0x3000 }, + { 0x9a00, 0x2729, 0x2000 }, + { 0x1a00, 0x2727, 0x0000 }, + { 0x1a00, 0x272a, 0x0000 }, + { 0x9a00, 0x272d, 0x2000 }, + { 0x1a00, 0x272c, 0x0000 }, + { 0x1a00, 0x272e, 0x0000 }, + { 0x9a00, 0x2737, 0x4000 }, + { 0x9a00, 0x2733, 0x3000 }, + { 0x9a00, 0x2731, 0x2000 }, + { 0x1a00, 0x2730, 0x0000 }, + { 0x1a00, 0x2732, 0x0000 }, + { 0x9a00, 0x2735, 0x2000 }, + { 0x1a00, 0x2734, 0x0000 }, + { 0x1a00, 0x2736, 0x0000 }, + { 0x9a00, 0x273b, 0x3000 }, + { 0x9a00, 0x2739, 0x2000 }, + { 0x1a00, 0x2738, 0x0000 }, + { 0x1a00, 0x273a, 0x0000 }, + { 0x9a00, 0x273d, 0x2000 }, + { 0x1a00, 0x273c, 0x0000 }, + { 0x1a00, 0x273e, 0x0000 }, + { 0x9a00, 0x2767, 0x6000 }, + { 0x9a00, 0x2751, 0x5000 }, + { 0x9a00, 0x2747, 0x4000 }, + { 0x9a00, 0x2743, 0x3000 }, + { 0x9a00, 0x2741, 0x2000 }, + { 0x1a00, 0x2740, 0x0000 }, + { 0x1a00, 0x2742, 0x0000 }, + { 0x9a00, 0x2745, 0x2000 }, + { 0x1a00, 0x2744, 0x0000 }, + { 0x1a00, 0x2746, 0x0000 }, + { 0x9a00, 0x274b, 0x3000 }, + { 0x9a00, 0x2749, 0x2000 }, + { 0x1a00, 0x2748, 0x0000 }, + { 0x1a00, 0x274a, 0x0000 }, + { 0x9a00, 0x274f, 0x2000 }, + { 0x1a00, 0x274d, 0x0000 }, + { 0x1a00, 0x2750, 0x0000 }, + { 0x9a00, 0x275d, 0x4000 }, + { 0x9a00, 0x2759, 0x3000 }, + { 0x9a00, 0x2756, 0x2000 }, + { 0x1a00, 0x2752, 0x0000 }, + { 0x1a00, 0x2758, 0x0000 }, + { 0x9a00, 0x275b, 0x2000 }, + { 0x1a00, 0x275a, 0x0000 }, + { 0x1a00, 0x275c, 0x0000 }, + { 0x9a00, 0x2763, 0x3000 }, + { 0x9a00, 0x2761, 0x2000 }, + { 0x1a00, 0x275e, 0x0000 }, + { 0x1a00, 0x2762, 0x0000 }, + { 0x9a00, 0x2765, 0x2000 }, + { 0x1a00, 0x2764, 0x0000 }, + { 0x1a00, 0x2766, 0x0000 }, + { 0x8f00, 0x2777, 0x5000 }, + { 0x9200, 0x276f, 0x4000 }, + { 0x9200, 0x276b, 0x3000 }, + { 0x9200, 0x2769, 0x2000 }, + { 0x1600, 0x2768, 0x0000 }, + { 0x1600, 0x276a, 0x0000 }, + { 0x9200, 0x276d, 0x2000 }, + { 0x1600, 0x276c, 0x0000 }, + { 0x1600, 0x276e, 0x0000 }, + { 0x9200, 0x2773, 0x3000 }, + { 0x9200, 0x2771, 0x2000 }, + { 0x1600, 0x2770, 0x0000 }, + { 0x1600, 0x2772, 0x0000 }, + { 0x9200, 0x2775, 0x2000 }, + { 0x1600, 0x2774, 0x0000 }, + { 0x0f00, 0x2776, 0x0000 }, + { 0x8f00, 0x277f, 0x4000 }, + { 0x8f00, 0x277b, 0x3000 }, + { 0x8f00, 0x2779, 0x2000 }, + { 0x0f00, 0x2778, 0x0000 }, + { 0x0f00, 0x277a, 0x0000 }, + { 0x8f00, 0x277d, 0x2000 }, + { 0x0f00, 0x277c, 0x0000 }, + { 0x0f00, 0x277e, 0x0000 }, + { 0x8f00, 0x2783, 0x3000 }, + { 0x8f00, 0x2781, 0x2000 }, + { 0x0f00, 0x2780, 0x0000 }, + { 0x0f00, 0x2782, 0x0000 }, + { 0x8f00, 0x2785, 0x2000 }, + { 0x0f00, 0x2784, 0x0000 }, + { 0x0f00, 0x2786, 0x0000 }, + { 0x9900, 0x29a0, 0xa000 }, + { 0x9a00, 0x28a0, 0x9000 }, + { 0x9a00, 0x2820, 0x8000 }, + { 0x9900, 0x27dc, 0x7000 }, + { 0x9a00, 0x27aa, 0x6000 }, + { 0x9a00, 0x279a, 0x5000 }, + { 0x8f00, 0x278f, 0x4000 }, + { 0x8f00, 0x278b, 0x3000 }, + { 0x8f00, 0x2789, 0x2000 }, + { 0x0f00, 0x2788, 0x0000 }, + { 0x0f00, 0x278a, 0x0000 }, + { 0x8f00, 0x278d, 0x2000 }, + { 0x0f00, 0x278c, 0x0000 }, + { 0x0f00, 0x278e, 0x0000 }, + { 0x8f00, 0x2793, 0x3000 }, + { 0x8f00, 0x2791, 0x2000 }, + { 0x0f00, 0x2790, 0x0000 }, + { 0x0f00, 0x2792, 0x0000 }, + { 0x9a00, 0x2798, 0x2000 }, + { 0x1a00, 0x2794, 0x0000 }, + { 0x1a00, 0x2799, 0x0000 }, + { 0x9a00, 0x27a2, 0x4000 }, + { 0x9a00, 0x279e, 0x3000 }, + { 0x9a00, 0x279c, 0x2000 }, + { 0x1a00, 0x279b, 0x0000 }, + { 0x1a00, 0x279d, 0x0000 }, + { 0x9a00, 0x27a0, 0x2000 }, + { 0x1a00, 0x279f, 0x0000 }, + { 0x1a00, 0x27a1, 0x0000 }, + { 0x9a00, 0x27a6, 0x3000 }, + { 0x9a00, 0x27a4, 0x2000 }, + { 0x1a00, 0x27a3, 0x0000 }, + { 0x1a00, 0x27a5, 0x0000 }, + { 0x9a00, 0x27a8, 0x2000 }, + { 0x1a00, 0x27a7, 0x0000 }, + { 0x1a00, 0x27a9, 0x0000 }, + { 0x9a00, 0x27bb, 0x5000 }, + { 0x9a00, 0x27b3, 0x4000 }, + { 0x9a00, 0x27ae, 0x3000 }, + { 0x9a00, 0x27ac, 0x2000 }, + { 0x1a00, 0x27ab, 0x0000 }, + { 0x1a00, 0x27ad, 0x0000 }, + { 0x9a00, 0x27b1, 0x2000 }, + { 0x1a00, 0x27af, 0x0000 }, + { 0x1a00, 0x27b2, 0x0000 }, + { 0x9a00, 0x27b7, 0x3000 }, + { 0x9a00, 0x27b5, 0x2000 }, + { 0x1a00, 0x27b4, 0x0000 }, + { 0x1a00, 0x27b6, 0x0000 }, + { 0x9a00, 0x27b9, 0x2000 }, + { 0x1a00, 0x27b8, 0x0000 }, + { 0x1a00, 0x27ba, 0x0000 }, + { 0x9900, 0x27d4, 0x4000 }, + { 0x9900, 0x27d0, 0x3000 }, + { 0x9a00, 0x27bd, 0x2000 }, + { 0x1a00, 0x27bc, 0x0000 }, + { 0x1a00, 0x27be, 0x0000 }, + { 0x9900, 0x27d2, 0x2000 }, + { 0x1900, 0x27d1, 0x0000 }, + { 0x1900, 0x27d3, 0x0000 }, + { 0x9900, 0x27d8, 0x3000 }, + { 0x9900, 0x27d6, 0x2000 }, + { 0x1900, 0x27d5, 0x0000 }, + { 0x1900, 0x27d7, 0x0000 }, + { 0x9900, 0x27da, 0x2000 }, + { 0x1900, 0x27d9, 0x0000 }, + { 0x1900, 0x27db, 0x0000 }, + { 0x9a00, 0x2800, 0x6000 }, + { 0x9900, 0x27f0, 0x5000 }, + { 0x9900, 0x27e4, 0x4000 }, + { 0x9900, 0x27e0, 0x3000 }, + { 0x9900, 0x27de, 0x2000 }, + { 0x1900, 0x27dd, 0x0000 }, + { 0x1900, 0x27df, 0x0000 }, + { 0x9900, 0x27e2, 0x2000 }, + { 0x1900, 0x27e1, 0x0000 }, + { 0x1900, 0x27e3, 0x0000 }, + { 0x9600, 0x27e8, 0x3000 }, + { 0x9600, 0x27e6, 0x2000 }, + { 0x1900, 0x27e5, 0x0000 }, + { 0x1200, 0x27e7, 0x0000 }, + { 0x9600, 0x27ea, 0x2000 }, + { 0x1200, 0x27e9, 0x0000 }, + { 0x1200, 0x27eb, 0x0000 }, + { 0x9900, 0x27f8, 0x4000 }, + { 0x9900, 0x27f4, 0x3000 }, + { 0x9900, 0x27f2, 0x2000 }, + { 0x1900, 0x27f1, 0x0000 }, + { 0x1900, 0x27f3, 0x0000 }, + { 0x9900, 0x27f6, 0x2000 }, + { 0x1900, 0x27f5, 0x0000 }, + { 0x1900, 0x27f7, 0x0000 }, + { 0x9900, 0x27fc, 0x3000 }, + { 0x9900, 0x27fa, 0x2000 }, + { 0x1900, 0x27f9, 0x0000 }, + { 0x1900, 0x27fb, 0x0000 }, + { 0x9900, 0x27fe, 0x2000 }, + { 0x1900, 0x27fd, 0x0000 }, + { 0x1900, 0x27ff, 0x0000 }, + { 0x9a00, 0x2810, 0x5000 }, + { 0x9a00, 0x2808, 0x4000 }, + { 0x9a00, 0x2804, 0x3000 }, + { 0x9a00, 0x2802, 0x2000 }, + { 0x1a00, 0x2801, 0x0000 }, + { 0x1a00, 0x2803, 0x0000 }, + { 0x9a00, 0x2806, 0x2000 }, + { 0x1a00, 0x2805, 0x0000 }, + { 0x1a00, 0x2807, 0x0000 }, + { 0x9a00, 0x280c, 0x3000 }, + { 0x9a00, 0x280a, 0x2000 }, + { 0x1a00, 0x2809, 0x0000 }, + { 0x1a00, 0x280b, 0x0000 }, + { 0x9a00, 0x280e, 0x2000 }, + { 0x1a00, 0x280d, 0x0000 }, + { 0x1a00, 0x280f, 0x0000 }, + { 0x9a00, 0x2818, 0x4000 }, + { 0x9a00, 0x2814, 0x3000 }, + { 0x9a00, 0x2812, 0x2000 }, + { 0x1a00, 0x2811, 0x0000 }, + { 0x1a00, 0x2813, 0x0000 }, + { 0x9a00, 0x2816, 0x2000 }, + { 0x1a00, 0x2815, 0x0000 }, + { 0x1a00, 0x2817, 0x0000 }, + { 0x9a00, 0x281c, 0x3000 }, + { 0x9a00, 0x281a, 0x2000 }, + { 0x1a00, 0x2819, 0x0000 }, + { 0x1a00, 0x281b, 0x0000 }, + { 0x9a00, 0x281e, 0x2000 }, + { 0x1a00, 0x281d, 0x0000 }, + { 0x1a00, 0x281f, 0x0000 }, + { 0x9a00, 0x2860, 0x7000 }, + { 0x9a00, 0x2840, 0x6000 }, + { 0x9a00, 0x2830, 0x5000 }, + { 0x9a00, 0x2828, 0x4000 }, + { 0x9a00, 0x2824, 0x3000 }, + { 0x9a00, 0x2822, 0x2000 }, + { 0x1a00, 0x2821, 0x0000 }, + { 0x1a00, 0x2823, 0x0000 }, + { 0x9a00, 0x2826, 0x2000 }, + { 0x1a00, 0x2825, 0x0000 }, + { 0x1a00, 0x2827, 0x0000 }, + { 0x9a00, 0x282c, 0x3000 }, + { 0x9a00, 0x282a, 0x2000 }, + { 0x1a00, 0x2829, 0x0000 }, + { 0x1a00, 0x282b, 0x0000 }, + { 0x9a00, 0x282e, 0x2000 }, + { 0x1a00, 0x282d, 0x0000 }, + { 0x1a00, 0x282f, 0x0000 }, + { 0x9a00, 0x2838, 0x4000 }, + { 0x9a00, 0x2834, 0x3000 }, + { 0x9a00, 0x2832, 0x2000 }, + { 0x1a00, 0x2831, 0x0000 }, + { 0x1a00, 0x2833, 0x0000 }, + { 0x9a00, 0x2836, 0x2000 }, + { 0x1a00, 0x2835, 0x0000 }, + { 0x1a00, 0x2837, 0x0000 }, + { 0x9a00, 0x283c, 0x3000 }, + { 0x9a00, 0x283a, 0x2000 }, + { 0x1a00, 0x2839, 0x0000 }, + { 0x1a00, 0x283b, 0x0000 }, + { 0x9a00, 0x283e, 0x2000 }, + { 0x1a00, 0x283d, 0x0000 }, + { 0x1a00, 0x283f, 0x0000 }, + { 0x9a00, 0x2850, 0x5000 }, + { 0x9a00, 0x2848, 0x4000 }, + { 0x9a00, 0x2844, 0x3000 }, + { 0x9a00, 0x2842, 0x2000 }, + { 0x1a00, 0x2841, 0x0000 }, + { 0x1a00, 0x2843, 0x0000 }, + { 0x9a00, 0x2846, 0x2000 }, + { 0x1a00, 0x2845, 0x0000 }, + { 0x1a00, 0x2847, 0x0000 }, + { 0x9a00, 0x284c, 0x3000 }, + { 0x9a00, 0x284a, 0x2000 }, + { 0x1a00, 0x2849, 0x0000 }, + { 0x1a00, 0x284b, 0x0000 }, + { 0x9a00, 0x284e, 0x2000 }, + { 0x1a00, 0x284d, 0x0000 }, + { 0x1a00, 0x284f, 0x0000 }, + { 0x9a00, 0x2858, 0x4000 }, + { 0x9a00, 0x2854, 0x3000 }, + { 0x9a00, 0x2852, 0x2000 }, + { 0x1a00, 0x2851, 0x0000 }, + { 0x1a00, 0x2853, 0x0000 }, + { 0x9a00, 0x2856, 0x2000 }, + { 0x1a00, 0x2855, 0x0000 }, + { 0x1a00, 0x2857, 0x0000 }, + { 0x9a00, 0x285c, 0x3000 }, + { 0x9a00, 0x285a, 0x2000 }, + { 0x1a00, 0x2859, 0x0000 }, + { 0x1a00, 0x285b, 0x0000 }, + { 0x9a00, 0x285e, 0x2000 }, + { 0x1a00, 0x285d, 0x0000 }, + { 0x1a00, 0x285f, 0x0000 }, + { 0x9a00, 0x2880, 0x6000 }, + { 0x9a00, 0x2870, 0x5000 }, + { 0x9a00, 0x2868, 0x4000 }, + { 0x9a00, 0x2864, 0x3000 }, + { 0x9a00, 0x2862, 0x2000 }, + { 0x1a00, 0x2861, 0x0000 }, + { 0x1a00, 0x2863, 0x0000 }, + { 0x9a00, 0x2866, 0x2000 }, + { 0x1a00, 0x2865, 0x0000 }, + { 0x1a00, 0x2867, 0x0000 }, + { 0x9a00, 0x286c, 0x3000 }, + { 0x9a00, 0x286a, 0x2000 }, + { 0x1a00, 0x2869, 0x0000 }, + { 0x1a00, 0x286b, 0x0000 }, + { 0x9a00, 0x286e, 0x2000 }, + { 0x1a00, 0x286d, 0x0000 }, + { 0x1a00, 0x286f, 0x0000 }, + { 0x9a00, 0x2878, 0x4000 }, + { 0x9a00, 0x2874, 0x3000 }, + { 0x9a00, 0x2872, 0x2000 }, + { 0x1a00, 0x2871, 0x0000 }, + { 0x1a00, 0x2873, 0x0000 }, + { 0x9a00, 0x2876, 0x2000 }, + { 0x1a00, 0x2875, 0x0000 }, + { 0x1a00, 0x2877, 0x0000 }, + { 0x9a00, 0x287c, 0x3000 }, + { 0x9a00, 0x287a, 0x2000 }, + { 0x1a00, 0x2879, 0x0000 }, + { 0x1a00, 0x287b, 0x0000 }, + { 0x9a00, 0x287e, 0x2000 }, + { 0x1a00, 0x287d, 0x0000 }, + { 0x1a00, 0x287f, 0x0000 }, + { 0x9a00, 0x2890, 0x5000 }, + { 0x9a00, 0x2888, 0x4000 }, + { 0x9a00, 0x2884, 0x3000 }, + { 0x9a00, 0x2882, 0x2000 }, + { 0x1a00, 0x2881, 0x0000 }, + { 0x1a00, 0x2883, 0x0000 }, + { 0x9a00, 0x2886, 0x2000 }, + { 0x1a00, 0x2885, 0x0000 }, + { 0x1a00, 0x2887, 0x0000 }, + { 0x9a00, 0x288c, 0x3000 }, + { 0x9a00, 0x288a, 0x2000 }, + { 0x1a00, 0x2889, 0x0000 }, + { 0x1a00, 0x288b, 0x0000 }, + { 0x9a00, 0x288e, 0x2000 }, + { 0x1a00, 0x288d, 0x0000 }, + { 0x1a00, 0x288f, 0x0000 }, + { 0x9a00, 0x2898, 0x4000 }, + { 0x9a00, 0x2894, 0x3000 }, + { 0x9a00, 0x2892, 0x2000 }, + { 0x1a00, 0x2891, 0x0000 }, + { 0x1a00, 0x2893, 0x0000 }, + { 0x9a00, 0x2896, 0x2000 }, + { 0x1a00, 0x2895, 0x0000 }, + { 0x1a00, 0x2897, 0x0000 }, + { 0x9a00, 0x289c, 0x3000 }, + { 0x9a00, 0x289a, 0x2000 }, + { 0x1a00, 0x2899, 0x0000 }, + { 0x1a00, 0x289b, 0x0000 }, + { 0x9a00, 0x289e, 0x2000 }, + { 0x1a00, 0x289d, 0x0000 }, + { 0x1a00, 0x289f, 0x0000 }, + { 0x9900, 0x2920, 0x8000 }, + { 0x9a00, 0x28e0, 0x7000 }, + { 0x9a00, 0x28c0, 0x6000 }, + { 0x9a00, 0x28b0, 0x5000 }, + { 0x9a00, 0x28a8, 0x4000 }, + { 0x9a00, 0x28a4, 0x3000 }, + { 0x9a00, 0x28a2, 0x2000 }, + { 0x1a00, 0x28a1, 0x0000 }, + { 0x1a00, 0x28a3, 0x0000 }, + { 0x9a00, 0x28a6, 0x2000 }, + { 0x1a00, 0x28a5, 0x0000 }, + { 0x1a00, 0x28a7, 0x0000 }, + { 0x9a00, 0x28ac, 0x3000 }, + { 0x9a00, 0x28aa, 0x2000 }, + { 0x1a00, 0x28a9, 0x0000 }, + { 0x1a00, 0x28ab, 0x0000 }, + { 0x9a00, 0x28ae, 0x2000 }, + { 0x1a00, 0x28ad, 0x0000 }, + { 0x1a00, 0x28af, 0x0000 }, + { 0x9a00, 0x28b8, 0x4000 }, + { 0x9a00, 0x28b4, 0x3000 }, + { 0x9a00, 0x28b2, 0x2000 }, + { 0x1a00, 0x28b1, 0x0000 }, + { 0x1a00, 0x28b3, 0x0000 }, + { 0x9a00, 0x28b6, 0x2000 }, + { 0x1a00, 0x28b5, 0x0000 }, + { 0x1a00, 0x28b7, 0x0000 }, + { 0x9a00, 0x28bc, 0x3000 }, + { 0x9a00, 0x28ba, 0x2000 }, + { 0x1a00, 0x28b9, 0x0000 }, + { 0x1a00, 0x28bb, 0x0000 }, + { 0x9a00, 0x28be, 0x2000 }, + { 0x1a00, 0x28bd, 0x0000 }, + { 0x1a00, 0x28bf, 0x0000 }, + { 0x9a00, 0x28d0, 0x5000 }, + { 0x9a00, 0x28c8, 0x4000 }, + { 0x9a00, 0x28c4, 0x3000 }, + { 0x9a00, 0x28c2, 0x2000 }, + { 0x1a00, 0x28c1, 0x0000 }, + { 0x1a00, 0x28c3, 0x0000 }, + { 0x9a00, 0x28c6, 0x2000 }, + { 0x1a00, 0x28c5, 0x0000 }, + { 0x1a00, 0x28c7, 0x0000 }, + { 0x9a00, 0x28cc, 0x3000 }, + { 0x9a00, 0x28ca, 0x2000 }, + { 0x1a00, 0x28c9, 0x0000 }, + { 0x1a00, 0x28cb, 0x0000 }, + { 0x9a00, 0x28ce, 0x2000 }, + { 0x1a00, 0x28cd, 0x0000 }, + { 0x1a00, 0x28cf, 0x0000 }, + { 0x9a00, 0x28d8, 0x4000 }, + { 0x9a00, 0x28d4, 0x3000 }, + { 0x9a00, 0x28d2, 0x2000 }, + { 0x1a00, 0x28d1, 0x0000 }, + { 0x1a00, 0x28d3, 0x0000 }, + { 0x9a00, 0x28d6, 0x2000 }, + { 0x1a00, 0x28d5, 0x0000 }, + { 0x1a00, 0x28d7, 0x0000 }, + { 0x9a00, 0x28dc, 0x3000 }, + { 0x9a00, 0x28da, 0x2000 }, + { 0x1a00, 0x28d9, 0x0000 }, + { 0x1a00, 0x28db, 0x0000 }, + { 0x9a00, 0x28de, 0x2000 }, + { 0x1a00, 0x28dd, 0x0000 }, + { 0x1a00, 0x28df, 0x0000 }, + { 0x9900, 0x2900, 0x6000 }, + { 0x9a00, 0x28f0, 0x5000 }, + { 0x9a00, 0x28e8, 0x4000 }, + { 0x9a00, 0x28e4, 0x3000 }, + { 0x9a00, 0x28e2, 0x2000 }, + { 0x1a00, 0x28e1, 0x0000 }, + { 0x1a00, 0x28e3, 0x0000 }, + { 0x9a00, 0x28e6, 0x2000 }, + { 0x1a00, 0x28e5, 0x0000 }, + { 0x1a00, 0x28e7, 0x0000 }, + { 0x9a00, 0x28ec, 0x3000 }, + { 0x9a00, 0x28ea, 0x2000 }, + { 0x1a00, 0x28e9, 0x0000 }, + { 0x1a00, 0x28eb, 0x0000 }, + { 0x9a00, 0x28ee, 0x2000 }, + { 0x1a00, 0x28ed, 0x0000 }, + { 0x1a00, 0x28ef, 0x0000 }, + { 0x9a00, 0x28f8, 0x4000 }, + { 0x9a00, 0x28f4, 0x3000 }, + { 0x9a00, 0x28f2, 0x2000 }, + { 0x1a00, 0x28f1, 0x0000 }, + { 0x1a00, 0x28f3, 0x0000 }, + { 0x9a00, 0x28f6, 0x2000 }, + { 0x1a00, 0x28f5, 0x0000 }, + { 0x1a00, 0x28f7, 0x0000 }, + { 0x9a00, 0x28fc, 0x3000 }, + { 0x9a00, 0x28fa, 0x2000 }, + { 0x1a00, 0x28f9, 0x0000 }, + { 0x1a00, 0x28fb, 0x0000 }, + { 0x9a00, 0x28fe, 0x2000 }, + { 0x1a00, 0x28fd, 0x0000 }, + { 0x1a00, 0x28ff, 0x0000 }, + { 0x9900, 0x2910, 0x5000 }, + { 0x9900, 0x2908, 0x4000 }, + { 0x9900, 0x2904, 0x3000 }, + { 0x9900, 0x2902, 0x2000 }, + { 0x1900, 0x2901, 0x0000 }, + { 0x1900, 0x2903, 0x0000 }, + { 0x9900, 0x2906, 0x2000 }, + { 0x1900, 0x2905, 0x0000 }, + { 0x1900, 0x2907, 0x0000 }, + { 0x9900, 0x290c, 0x3000 }, + { 0x9900, 0x290a, 0x2000 }, + { 0x1900, 0x2909, 0x0000 }, + { 0x1900, 0x290b, 0x0000 }, + { 0x9900, 0x290e, 0x2000 }, + { 0x1900, 0x290d, 0x0000 }, + { 0x1900, 0x290f, 0x0000 }, + { 0x9900, 0x2918, 0x4000 }, + { 0x9900, 0x2914, 0x3000 }, + { 0x9900, 0x2912, 0x2000 }, + { 0x1900, 0x2911, 0x0000 }, + { 0x1900, 0x2913, 0x0000 }, + { 0x9900, 0x2916, 0x2000 }, + { 0x1900, 0x2915, 0x0000 }, + { 0x1900, 0x2917, 0x0000 }, + { 0x9900, 0x291c, 0x3000 }, + { 0x9900, 0x291a, 0x2000 }, + { 0x1900, 0x2919, 0x0000 }, + { 0x1900, 0x291b, 0x0000 }, + { 0x9900, 0x291e, 0x2000 }, + { 0x1900, 0x291d, 0x0000 }, + { 0x1900, 0x291f, 0x0000 }, + { 0x9900, 0x2960, 0x7000 }, + { 0x9900, 0x2940, 0x6000 }, + { 0x9900, 0x2930, 0x5000 }, + { 0x9900, 0x2928, 0x4000 }, + { 0x9900, 0x2924, 0x3000 }, + { 0x9900, 0x2922, 0x2000 }, + { 0x1900, 0x2921, 0x0000 }, + { 0x1900, 0x2923, 0x0000 }, + { 0x9900, 0x2926, 0x2000 }, + { 0x1900, 0x2925, 0x0000 }, + { 0x1900, 0x2927, 0x0000 }, + { 0x9900, 0x292c, 0x3000 }, + { 0x9900, 0x292a, 0x2000 }, + { 0x1900, 0x2929, 0x0000 }, + { 0x1900, 0x292b, 0x0000 }, + { 0x9900, 0x292e, 0x2000 }, + { 0x1900, 0x292d, 0x0000 }, + { 0x1900, 0x292f, 0x0000 }, + { 0x9900, 0x2938, 0x4000 }, + { 0x9900, 0x2934, 0x3000 }, + { 0x9900, 0x2932, 0x2000 }, + { 0x1900, 0x2931, 0x0000 }, + { 0x1900, 0x2933, 0x0000 }, + { 0x9900, 0x2936, 0x2000 }, + { 0x1900, 0x2935, 0x0000 }, + { 0x1900, 0x2937, 0x0000 }, + { 0x9900, 0x293c, 0x3000 }, + { 0x9900, 0x293a, 0x2000 }, + { 0x1900, 0x2939, 0x0000 }, + { 0x1900, 0x293b, 0x0000 }, + { 0x9900, 0x293e, 0x2000 }, + { 0x1900, 0x293d, 0x0000 }, + { 0x1900, 0x293f, 0x0000 }, + { 0x9900, 0x2950, 0x5000 }, + { 0x9900, 0x2948, 0x4000 }, + { 0x9900, 0x2944, 0x3000 }, + { 0x9900, 0x2942, 0x2000 }, + { 0x1900, 0x2941, 0x0000 }, + { 0x1900, 0x2943, 0x0000 }, + { 0x9900, 0x2946, 0x2000 }, + { 0x1900, 0x2945, 0x0000 }, + { 0x1900, 0x2947, 0x0000 }, + { 0x9900, 0x294c, 0x3000 }, + { 0x9900, 0x294a, 0x2000 }, + { 0x1900, 0x2949, 0x0000 }, + { 0x1900, 0x294b, 0x0000 }, + { 0x9900, 0x294e, 0x2000 }, + { 0x1900, 0x294d, 0x0000 }, + { 0x1900, 0x294f, 0x0000 }, + { 0x9900, 0x2958, 0x4000 }, + { 0x9900, 0x2954, 0x3000 }, + { 0x9900, 0x2952, 0x2000 }, + { 0x1900, 0x2951, 0x0000 }, + { 0x1900, 0x2953, 0x0000 }, + { 0x9900, 0x2956, 0x2000 }, + { 0x1900, 0x2955, 0x0000 }, + { 0x1900, 0x2957, 0x0000 }, + { 0x9900, 0x295c, 0x3000 }, + { 0x9900, 0x295a, 0x2000 }, + { 0x1900, 0x2959, 0x0000 }, + { 0x1900, 0x295b, 0x0000 }, + { 0x9900, 0x295e, 0x2000 }, + { 0x1900, 0x295d, 0x0000 }, + { 0x1900, 0x295f, 0x0000 }, + { 0x9900, 0x2980, 0x6000 }, + { 0x9900, 0x2970, 0x5000 }, + { 0x9900, 0x2968, 0x4000 }, + { 0x9900, 0x2964, 0x3000 }, + { 0x9900, 0x2962, 0x2000 }, + { 0x1900, 0x2961, 0x0000 }, + { 0x1900, 0x2963, 0x0000 }, + { 0x9900, 0x2966, 0x2000 }, + { 0x1900, 0x2965, 0x0000 }, + { 0x1900, 0x2967, 0x0000 }, + { 0x9900, 0x296c, 0x3000 }, + { 0x9900, 0x296a, 0x2000 }, + { 0x1900, 0x2969, 0x0000 }, + { 0x1900, 0x296b, 0x0000 }, + { 0x9900, 0x296e, 0x2000 }, + { 0x1900, 0x296d, 0x0000 }, + { 0x1900, 0x296f, 0x0000 }, + { 0x9900, 0x2978, 0x4000 }, + { 0x9900, 0x2974, 0x3000 }, + { 0x9900, 0x2972, 0x2000 }, + { 0x1900, 0x2971, 0x0000 }, + { 0x1900, 0x2973, 0x0000 }, + { 0x9900, 0x2976, 0x2000 }, + { 0x1900, 0x2975, 0x0000 }, + { 0x1900, 0x2977, 0x0000 }, + { 0x9900, 0x297c, 0x3000 }, + { 0x9900, 0x297a, 0x2000 }, + { 0x1900, 0x2979, 0x0000 }, + { 0x1900, 0x297b, 0x0000 }, + { 0x9900, 0x297e, 0x2000 }, + { 0x1900, 0x297d, 0x0000 }, + { 0x1900, 0x297f, 0x0000 }, + { 0x9200, 0x2990, 0x5000 }, + { 0x9200, 0x2988, 0x4000 }, + { 0x9200, 0x2984, 0x3000 }, + { 0x9900, 0x2982, 0x2000 }, + { 0x1900, 0x2981, 0x0000 }, + { 0x1600, 0x2983, 0x0000 }, + { 0x9200, 0x2986, 0x2000 }, + { 0x1600, 0x2985, 0x0000 }, + { 0x1600, 0x2987, 0x0000 }, + { 0x9200, 0x298c, 0x3000 }, + { 0x9200, 0x298a, 0x2000 }, + { 0x1600, 0x2989, 0x0000 }, + { 0x1600, 0x298b, 0x0000 }, + { 0x9200, 0x298e, 0x2000 }, + { 0x1600, 0x298d, 0x0000 }, + { 0x1600, 0x298f, 0x0000 }, + { 0x9200, 0x2998, 0x4000 }, + { 0x9200, 0x2994, 0x3000 }, + { 0x9200, 0x2992, 0x2000 }, + { 0x1600, 0x2991, 0x0000 }, + { 0x1600, 0x2993, 0x0000 }, + { 0x9200, 0x2996, 0x2000 }, + { 0x1600, 0x2995, 0x0000 }, + { 0x1600, 0x2997, 0x0000 }, + { 0x9900, 0x299c, 0x3000 }, + { 0x9900, 0x299a, 0x2000 }, + { 0x1900, 0x2999, 0x0000 }, + { 0x1900, 0x299b, 0x0000 }, + { 0x9900, 0x299e, 0x2000 }, + { 0x1900, 0x299d, 0x0000 }, + { 0x1900, 0x299f, 0x0000 }, + { 0x9900, 0x2aa0, 0x9000 }, + { 0x9900, 0x2a20, 0x8000 }, + { 0x9900, 0x29e0, 0x7000 }, + { 0x9900, 0x29c0, 0x6000 }, + { 0x9900, 0x29b0, 0x5000 }, + { 0x9900, 0x29a8, 0x4000 }, + { 0x9900, 0x29a4, 0x3000 }, + { 0x9900, 0x29a2, 0x2000 }, + { 0x1900, 0x29a1, 0x0000 }, + { 0x1900, 0x29a3, 0x0000 }, + { 0x9900, 0x29a6, 0x2000 }, + { 0x1900, 0x29a5, 0x0000 }, + { 0x1900, 0x29a7, 0x0000 }, + { 0x9900, 0x29ac, 0x3000 }, + { 0x9900, 0x29aa, 0x2000 }, + { 0x1900, 0x29a9, 0x0000 }, + { 0x1900, 0x29ab, 0x0000 }, + { 0x9900, 0x29ae, 0x2000 }, + { 0x1900, 0x29ad, 0x0000 }, + { 0x1900, 0x29af, 0x0000 }, + { 0x9900, 0x29b8, 0x4000 }, + { 0x9900, 0x29b4, 0x3000 }, + { 0x9900, 0x29b2, 0x2000 }, + { 0x1900, 0x29b1, 0x0000 }, + { 0x1900, 0x29b3, 0x0000 }, + { 0x9900, 0x29b6, 0x2000 }, + { 0x1900, 0x29b5, 0x0000 }, + { 0x1900, 0x29b7, 0x0000 }, + { 0x9900, 0x29bc, 0x3000 }, + { 0x9900, 0x29ba, 0x2000 }, + { 0x1900, 0x29b9, 0x0000 }, + { 0x1900, 0x29bb, 0x0000 }, + { 0x9900, 0x29be, 0x2000 }, + { 0x1900, 0x29bd, 0x0000 }, + { 0x1900, 0x29bf, 0x0000 }, + { 0x9900, 0x29d0, 0x5000 }, + { 0x9900, 0x29c8, 0x4000 }, + { 0x9900, 0x29c4, 0x3000 }, + { 0x9900, 0x29c2, 0x2000 }, + { 0x1900, 0x29c1, 0x0000 }, + { 0x1900, 0x29c3, 0x0000 }, + { 0x9900, 0x29c6, 0x2000 }, + { 0x1900, 0x29c5, 0x0000 }, + { 0x1900, 0x29c7, 0x0000 }, + { 0x9900, 0x29cc, 0x3000 }, + { 0x9900, 0x29ca, 0x2000 }, + { 0x1900, 0x29c9, 0x0000 }, + { 0x1900, 0x29cb, 0x0000 }, + { 0x9900, 0x29ce, 0x2000 }, + { 0x1900, 0x29cd, 0x0000 }, + { 0x1900, 0x29cf, 0x0000 }, + { 0x9600, 0x29d8, 0x4000 }, + { 0x9900, 0x29d4, 0x3000 }, + { 0x9900, 0x29d2, 0x2000 }, + { 0x1900, 0x29d1, 0x0000 }, + { 0x1900, 0x29d3, 0x0000 }, + { 0x9900, 0x29d6, 0x2000 }, + { 0x1900, 0x29d5, 0x0000 }, + { 0x1900, 0x29d7, 0x0000 }, + { 0x9900, 0x29dc, 0x3000 }, + { 0x9600, 0x29da, 0x2000 }, + { 0x1200, 0x29d9, 0x0000 }, + { 0x1200, 0x29db, 0x0000 }, + { 0x9900, 0x29de, 0x2000 }, + { 0x1900, 0x29dd, 0x0000 }, + { 0x1900, 0x29df, 0x0000 }, + { 0x9900, 0x2a00, 0x6000 }, + { 0x9900, 0x29f0, 0x5000 }, + { 0x9900, 0x29e8, 0x4000 }, + { 0x9900, 0x29e4, 0x3000 }, + { 0x9900, 0x29e2, 0x2000 }, + { 0x1900, 0x29e1, 0x0000 }, + { 0x1900, 0x29e3, 0x0000 }, + { 0x9900, 0x29e6, 0x2000 }, + { 0x1900, 0x29e5, 0x0000 }, + { 0x1900, 0x29e7, 0x0000 }, + { 0x9900, 0x29ec, 0x3000 }, + { 0x9900, 0x29ea, 0x2000 }, + { 0x1900, 0x29e9, 0x0000 }, + { 0x1900, 0x29eb, 0x0000 }, + { 0x9900, 0x29ee, 0x2000 }, + { 0x1900, 0x29ed, 0x0000 }, + { 0x1900, 0x29ef, 0x0000 }, + { 0x9900, 0x29f8, 0x4000 }, + { 0x9900, 0x29f4, 0x3000 }, + { 0x9900, 0x29f2, 0x2000 }, + { 0x1900, 0x29f1, 0x0000 }, + { 0x1900, 0x29f3, 0x0000 }, + { 0x9900, 0x29f6, 0x2000 }, + { 0x1900, 0x29f5, 0x0000 }, + { 0x1900, 0x29f7, 0x0000 }, + { 0x9600, 0x29fc, 0x3000 }, + { 0x9900, 0x29fa, 0x2000 }, + { 0x1900, 0x29f9, 0x0000 }, + { 0x1900, 0x29fb, 0x0000 }, + { 0x9900, 0x29fe, 0x2000 }, + { 0x1200, 0x29fd, 0x0000 }, + { 0x1900, 0x29ff, 0x0000 }, + { 0x9900, 0x2a10, 0x5000 }, + { 0x9900, 0x2a08, 0x4000 }, + { 0x9900, 0x2a04, 0x3000 }, + { 0x9900, 0x2a02, 0x2000 }, + { 0x1900, 0x2a01, 0x0000 }, + { 0x1900, 0x2a03, 0x0000 }, + { 0x9900, 0x2a06, 0x2000 }, + { 0x1900, 0x2a05, 0x0000 }, + { 0x1900, 0x2a07, 0x0000 }, + { 0x9900, 0x2a0c, 0x3000 }, + { 0x9900, 0x2a0a, 0x2000 }, + { 0x1900, 0x2a09, 0x0000 }, + { 0x1900, 0x2a0b, 0x0000 }, + { 0x9900, 0x2a0e, 0x2000 }, + { 0x1900, 0x2a0d, 0x0000 }, + { 0x1900, 0x2a0f, 0x0000 }, + { 0x9900, 0x2a18, 0x4000 }, + { 0x9900, 0x2a14, 0x3000 }, + { 0x9900, 0x2a12, 0x2000 }, + { 0x1900, 0x2a11, 0x0000 }, + { 0x1900, 0x2a13, 0x0000 }, + { 0x9900, 0x2a16, 0x2000 }, + { 0x1900, 0x2a15, 0x0000 }, + { 0x1900, 0x2a17, 0x0000 }, + { 0x9900, 0x2a1c, 0x3000 }, + { 0x9900, 0x2a1a, 0x2000 }, + { 0x1900, 0x2a19, 0x0000 }, + { 0x1900, 0x2a1b, 0x0000 }, + { 0x9900, 0x2a1e, 0x2000 }, + { 0x1900, 0x2a1d, 0x0000 }, + { 0x1900, 0x2a1f, 0x0000 }, + { 0x9900, 0x2a60, 0x7000 }, + { 0x9900, 0x2a40, 0x6000 }, + { 0x9900, 0x2a30, 0x5000 }, + { 0x9900, 0x2a28, 0x4000 }, + { 0x9900, 0x2a24, 0x3000 }, + { 0x9900, 0x2a22, 0x2000 }, + { 0x1900, 0x2a21, 0x0000 }, + { 0x1900, 0x2a23, 0x0000 }, + { 0x9900, 0x2a26, 0x2000 }, + { 0x1900, 0x2a25, 0x0000 }, + { 0x1900, 0x2a27, 0x0000 }, + { 0x9900, 0x2a2c, 0x3000 }, + { 0x9900, 0x2a2a, 0x2000 }, + { 0x1900, 0x2a29, 0x0000 }, + { 0x1900, 0x2a2b, 0x0000 }, + { 0x9900, 0x2a2e, 0x2000 }, + { 0x1900, 0x2a2d, 0x0000 }, + { 0x1900, 0x2a2f, 0x0000 }, + { 0x9900, 0x2a38, 0x4000 }, + { 0x9900, 0x2a34, 0x3000 }, + { 0x9900, 0x2a32, 0x2000 }, + { 0x1900, 0x2a31, 0x0000 }, + { 0x1900, 0x2a33, 0x0000 }, + { 0x9900, 0x2a36, 0x2000 }, + { 0x1900, 0x2a35, 0x0000 }, + { 0x1900, 0x2a37, 0x0000 }, + { 0x9900, 0x2a3c, 0x3000 }, + { 0x9900, 0x2a3a, 0x2000 }, + { 0x1900, 0x2a39, 0x0000 }, + { 0x1900, 0x2a3b, 0x0000 }, + { 0x9900, 0x2a3e, 0x2000 }, + { 0x1900, 0x2a3d, 0x0000 }, + { 0x1900, 0x2a3f, 0x0000 }, + { 0x9900, 0x2a50, 0x5000 }, + { 0x9900, 0x2a48, 0x4000 }, + { 0x9900, 0x2a44, 0x3000 }, + { 0x9900, 0x2a42, 0x2000 }, + { 0x1900, 0x2a41, 0x0000 }, + { 0x1900, 0x2a43, 0x0000 }, + { 0x9900, 0x2a46, 0x2000 }, + { 0x1900, 0x2a45, 0x0000 }, + { 0x1900, 0x2a47, 0x0000 }, + { 0x9900, 0x2a4c, 0x3000 }, + { 0x9900, 0x2a4a, 0x2000 }, + { 0x1900, 0x2a49, 0x0000 }, + { 0x1900, 0x2a4b, 0x0000 }, + { 0x9900, 0x2a4e, 0x2000 }, + { 0x1900, 0x2a4d, 0x0000 }, + { 0x1900, 0x2a4f, 0x0000 }, + { 0x9900, 0x2a58, 0x4000 }, + { 0x9900, 0x2a54, 0x3000 }, + { 0x9900, 0x2a52, 0x2000 }, + { 0x1900, 0x2a51, 0x0000 }, + { 0x1900, 0x2a53, 0x0000 }, + { 0x9900, 0x2a56, 0x2000 }, + { 0x1900, 0x2a55, 0x0000 }, + { 0x1900, 0x2a57, 0x0000 }, + { 0x9900, 0x2a5c, 0x3000 }, + { 0x9900, 0x2a5a, 0x2000 }, + { 0x1900, 0x2a59, 0x0000 }, + { 0x1900, 0x2a5b, 0x0000 }, + { 0x9900, 0x2a5e, 0x2000 }, + { 0x1900, 0x2a5d, 0x0000 }, + { 0x1900, 0x2a5f, 0x0000 }, + { 0x9900, 0x2a80, 0x6000 }, + { 0x9900, 0x2a70, 0x5000 }, + { 0x9900, 0x2a68, 0x4000 }, + { 0x9900, 0x2a64, 0x3000 }, + { 0x9900, 0x2a62, 0x2000 }, + { 0x1900, 0x2a61, 0x0000 }, + { 0x1900, 0x2a63, 0x0000 }, + { 0x9900, 0x2a66, 0x2000 }, + { 0x1900, 0x2a65, 0x0000 }, + { 0x1900, 0x2a67, 0x0000 }, + { 0x9900, 0x2a6c, 0x3000 }, + { 0x9900, 0x2a6a, 0x2000 }, + { 0x1900, 0x2a69, 0x0000 }, + { 0x1900, 0x2a6b, 0x0000 }, + { 0x9900, 0x2a6e, 0x2000 }, + { 0x1900, 0x2a6d, 0x0000 }, + { 0x1900, 0x2a6f, 0x0000 }, + { 0x9900, 0x2a78, 0x4000 }, + { 0x9900, 0x2a74, 0x3000 }, + { 0x9900, 0x2a72, 0x2000 }, + { 0x1900, 0x2a71, 0x0000 }, + { 0x1900, 0x2a73, 0x0000 }, + { 0x9900, 0x2a76, 0x2000 }, + { 0x1900, 0x2a75, 0x0000 }, + { 0x1900, 0x2a77, 0x0000 }, + { 0x9900, 0x2a7c, 0x3000 }, + { 0x9900, 0x2a7a, 0x2000 }, + { 0x1900, 0x2a79, 0x0000 }, + { 0x1900, 0x2a7b, 0x0000 }, + { 0x9900, 0x2a7e, 0x2000 }, + { 0x1900, 0x2a7d, 0x0000 }, + { 0x1900, 0x2a7f, 0x0000 }, + { 0x9900, 0x2a90, 0x5000 }, + { 0x9900, 0x2a88, 0x4000 }, + { 0x9900, 0x2a84, 0x3000 }, + { 0x9900, 0x2a82, 0x2000 }, + { 0x1900, 0x2a81, 0x0000 }, + { 0x1900, 0x2a83, 0x0000 }, + { 0x9900, 0x2a86, 0x2000 }, + { 0x1900, 0x2a85, 0x0000 }, + { 0x1900, 0x2a87, 0x0000 }, + { 0x9900, 0x2a8c, 0x3000 }, + { 0x9900, 0x2a8a, 0x2000 }, + { 0x1900, 0x2a89, 0x0000 }, + { 0x1900, 0x2a8b, 0x0000 }, + { 0x9900, 0x2a8e, 0x2000 }, + { 0x1900, 0x2a8d, 0x0000 }, + { 0x1900, 0x2a8f, 0x0000 }, + { 0x9900, 0x2a98, 0x4000 }, + { 0x9900, 0x2a94, 0x3000 }, + { 0x9900, 0x2a92, 0x2000 }, + { 0x1900, 0x2a91, 0x0000 }, + { 0x1900, 0x2a93, 0x0000 }, + { 0x9900, 0x2a96, 0x2000 }, + { 0x1900, 0x2a95, 0x0000 }, + { 0x1900, 0x2a97, 0x0000 }, + { 0x9900, 0x2a9c, 0x3000 }, + { 0x9900, 0x2a9a, 0x2000 }, + { 0x1900, 0x2a99, 0x0000 }, + { 0x1900, 0x2a9b, 0x0000 }, + { 0x9900, 0x2a9e, 0x2000 }, + { 0x1900, 0x2a9d, 0x0000 }, + { 0x1900, 0x2a9f, 0x0000 }, + { 0x9a00, 0x2e92, 0x8000 }, + { 0x9900, 0x2ae0, 0x7000 }, + { 0x9900, 0x2ac0, 0x6000 }, + { 0x9900, 0x2ab0, 0x5000 }, + { 0x9900, 0x2aa8, 0x4000 }, + { 0x9900, 0x2aa4, 0x3000 }, + { 0x9900, 0x2aa2, 0x2000 }, + { 0x1900, 0x2aa1, 0x0000 }, + { 0x1900, 0x2aa3, 0x0000 }, + { 0x9900, 0x2aa6, 0x2000 }, + { 0x1900, 0x2aa5, 0x0000 }, + { 0x1900, 0x2aa7, 0x0000 }, + { 0x9900, 0x2aac, 0x3000 }, + { 0x9900, 0x2aaa, 0x2000 }, + { 0x1900, 0x2aa9, 0x0000 }, + { 0x1900, 0x2aab, 0x0000 }, + { 0x9900, 0x2aae, 0x2000 }, + { 0x1900, 0x2aad, 0x0000 }, + { 0x1900, 0x2aaf, 0x0000 }, + { 0x9900, 0x2ab8, 0x4000 }, + { 0x9900, 0x2ab4, 0x3000 }, + { 0x9900, 0x2ab2, 0x2000 }, + { 0x1900, 0x2ab1, 0x0000 }, + { 0x1900, 0x2ab3, 0x0000 }, + { 0x9900, 0x2ab6, 0x2000 }, + { 0x1900, 0x2ab5, 0x0000 }, + { 0x1900, 0x2ab7, 0x0000 }, + { 0x9900, 0x2abc, 0x3000 }, + { 0x9900, 0x2aba, 0x2000 }, + { 0x1900, 0x2ab9, 0x0000 }, + { 0x1900, 0x2abb, 0x0000 }, + { 0x9900, 0x2abe, 0x2000 }, + { 0x1900, 0x2abd, 0x0000 }, + { 0x1900, 0x2abf, 0x0000 }, + { 0x9900, 0x2ad0, 0x5000 }, + { 0x9900, 0x2ac8, 0x4000 }, + { 0x9900, 0x2ac4, 0x3000 }, + { 0x9900, 0x2ac2, 0x2000 }, + { 0x1900, 0x2ac1, 0x0000 }, + { 0x1900, 0x2ac3, 0x0000 }, + { 0x9900, 0x2ac6, 0x2000 }, + { 0x1900, 0x2ac5, 0x0000 }, + { 0x1900, 0x2ac7, 0x0000 }, + { 0x9900, 0x2acc, 0x3000 }, + { 0x9900, 0x2aca, 0x2000 }, + { 0x1900, 0x2ac9, 0x0000 }, + { 0x1900, 0x2acb, 0x0000 }, + { 0x9900, 0x2ace, 0x2000 }, + { 0x1900, 0x2acd, 0x0000 }, + { 0x1900, 0x2acf, 0x0000 }, + { 0x9900, 0x2ad8, 0x4000 }, + { 0x9900, 0x2ad4, 0x3000 }, + { 0x9900, 0x2ad2, 0x2000 }, + { 0x1900, 0x2ad1, 0x0000 }, + { 0x1900, 0x2ad3, 0x0000 }, + { 0x9900, 0x2ad6, 0x2000 }, + { 0x1900, 0x2ad5, 0x0000 }, + { 0x1900, 0x2ad7, 0x0000 }, + { 0x9900, 0x2adc, 0x3000 }, + { 0x9900, 0x2ada, 0x2000 }, + { 0x1900, 0x2ad9, 0x0000 }, + { 0x1900, 0x2adb, 0x0000 }, + { 0x9900, 0x2ade, 0x2000 }, + { 0x1900, 0x2add, 0x0000 }, + { 0x1900, 0x2adf, 0x0000 }, + { 0x9a00, 0x2b00, 0x6000 }, + { 0x9900, 0x2af0, 0x5000 }, + { 0x9900, 0x2ae8, 0x4000 }, + { 0x9900, 0x2ae4, 0x3000 }, + { 0x9900, 0x2ae2, 0x2000 }, + { 0x1900, 0x2ae1, 0x0000 }, + { 0x1900, 0x2ae3, 0x0000 }, + { 0x9900, 0x2ae6, 0x2000 }, + { 0x1900, 0x2ae5, 0x0000 }, + { 0x1900, 0x2ae7, 0x0000 }, + { 0x9900, 0x2aec, 0x3000 }, + { 0x9900, 0x2aea, 0x2000 }, + { 0x1900, 0x2ae9, 0x0000 }, + { 0x1900, 0x2aeb, 0x0000 }, + { 0x9900, 0x2aee, 0x2000 }, + { 0x1900, 0x2aed, 0x0000 }, + { 0x1900, 0x2aef, 0x0000 }, + { 0x9900, 0x2af8, 0x4000 }, + { 0x9900, 0x2af4, 0x3000 }, + { 0x9900, 0x2af2, 0x2000 }, + { 0x1900, 0x2af1, 0x0000 }, + { 0x1900, 0x2af3, 0x0000 }, + { 0x9900, 0x2af6, 0x2000 }, + { 0x1900, 0x2af5, 0x0000 }, + { 0x1900, 0x2af7, 0x0000 }, + { 0x9900, 0x2afc, 0x3000 }, + { 0x9900, 0x2afa, 0x2000 }, + { 0x1900, 0x2af9, 0x0000 }, + { 0x1900, 0x2afb, 0x0000 }, + { 0x9900, 0x2afe, 0x2000 }, + { 0x1900, 0x2afd, 0x0000 }, + { 0x1900, 0x2aff, 0x0000 }, + { 0x9a00, 0x2e82, 0x5000 }, + { 0x9a00, 0x2b08, 0x4000 }, + { 0x9a00, 0x2b04, 0x3000 }, + { 0x9a00, 0x2b02, 0x2000 }, + { 0x1a00, 0x2b01, 0x0000 }, + { 0x1a00, 0x2b03, 0x0000 }, + { 0x9a00, 0x2b06, 0x2000 }, + { 0x1a00, 0x2b05, 0x0000 }, + { 0x1a00, 0x2b07, 0x0000 }, + { 0x9a00, 0x2b0c, 0x3000 }, + { 0x9a00, 0x2b0a, 0x2000 }, + { 0x1a00, 0x2b09, 0x0000 }, + { 0x1a00, 0x2b0b, 0x0000 }, + { 0x9a00, 0x2e80, 0x2000 }, + { 0x1a00, 0x2b0d, 0x0000 }, + { 0x1a00, 0x2e81, 0x0000 }, + { 0x9a00, 0x2e8a, 0x4000 }, + { 0x9a00, 0x2e86, 0x3000 }, + { 0x9a00, 0x2e84, 0x2000 }, + { 0x1a00, 0x2e83, 0x0000 }, + { 0x1a00, 0x2e85, 0x0000 }, + { 0x9a00, 0x2e88, 0x2000 }, + { 0x1a00, 0x2e87, 0x0000 }, + { 0x1a00, 0x2e89, 0x0000 }, + { 0x9a00, 0x2e8e, 0x3000 }, + { 0x9a00, 0x2e8c, 0x2000 }, + { 0x1a00, 0x2e8b, 0x0000 }, + { 0x1a00, 0x2e8d, 0x0000 }, + { 0x9a00, 0x2e90, 0x2000 }, + { 0x1a00, 0x2e8f, 0x0000 }, + { 0x1a00, 0x2e91, 0x0000 }, + { 0x9a00, 0x2ed3, 0x7000 }, + { 0x9a00, 0x2eb3, 0x6000 }, + { 0x9a00, 0x2ea3, 0x5000 }, + { 0x9a00, 0x2e9b, 0x4000 }, + { 0x9a00, 0x2e96, 0x3000 }, + { 0x9a00, 0x2e94, 0x2000 }, + { 0x1a00, 0x2e93, 0x0000 }, + { 0x1a00, 0x2e95, 0x0000 }, + { 0x9a00, 0x2e98, 0x2000 }, + { 0x1a00, 0x2e97, 0x0000 }, + { 0x1a00, 0x2e99, 0x0000 }, + { 0x9a00, 0x2e9f, 0x3000 }, + { 0x9a00, 0x2e9d, 0x2000 }, + { 0x1a00, 0x2e9c, 0x0000 }, + { 0x1a00, 0x2e9e, 0x0000 }, + { 0x9a00, 0x2ea1, 0x2000 }, + { 0x1a00, 0x2ea0, 0x0000 }, + { 0x1a00, 0x2ea2, 0x0000 }, + { 0x9a00, 0x2eab, 0x4000 }, + { 0x9a00, 0x2ea7, 0x3000 }, + { 0x9a00, 0x2ea5, 0x2000 }, + { 0x1a00, 0x2ea4, 0x0000 }, + { 0x1a00, 0x2ea6, 0x0000 }, + { 0x9a00, 0x2ea9, 0x2000 }, + { 0x1a00, 0x2ea8, 0x0000 }, + { 0x1a00, 0x2eaa, 0x0000 }, + { 0x9a00, 0x2eaf, 0x3000 }, + { 0x9a00, 0x2ead, 0x2000 }, + { 0x1a00, 0x2eac, 0x0000 }, + { 0x1a00, 0x2eae, 0x0000 }, + { 0x9a00, 0x2eb1, 0x2000 }, + { 0x1a00, 0x2eb0, 0x0000 }, + { 0x1a00, 0x2eb2, 0x0000 }, + { 0x9a00, 0x2ec3, 0x5000 }, + { 0x9a00, 0x2ebb, 0x4000 }, + { 0x9a00, 0x2eb7, 0x3000 }, + { 0x9a00, 0x2eb5, 0x2000 }, + { 0x1a00, 0x2eb4, 0x0000 }, + { 0x1a00, 0x2eb6, 0x0000 }, + { 0x9a00, 0x2eb9, 0x2000 }, + { 0x1a00, 0x2eb8, 0x0000 }, + { 0x1a00, 0x2eba, 0x0000 }, + { 0x9a00, 0x2ebf, 0x3000 }, + { 0x9a00, 0x2ebd, 0x2000 }, + { 0x1a00, 0x2ebc, 0x0000 }, + { 0x1a00, 0x2ebe, 0x0000 }, + { 0x9a00, 0x2ec1, 0x2000 }, + { 0x1a00, 0x2ec0, 0x0000 }, + { 0x1a00, 0x2ec2, 0x0000 }, + { 0x9a00, 0x2ecb, 0x4000 }, + { 0x9a00, 0x2ec7, 0x3000 }, + { 0x9a00, 0x2ec5, 0x2000 }, + { 0x1a00, 0x2ec4, 0x0000 }, + { 0x1a00, 0x2ec6, 0x0000 }, + { 0x9a00, 0x2ec9, 0x2000 }, + { 0x1a00, 0x2ec8, 0x0000 }, + { 0x1a00, 0x2eca, 0x0000 }, + { 0x9a00, 0x2ecf, 0x3000 }, + { 0x9a00, 0x2ecd, 0x2000 }, + { 0x1a00, 0x2ecc, 0x0000 }, + { 0x1a00, 0x2ece, 0x0000 }, + { 0x9a00, 0x2ed1, 0x2000 }, + { 0x1a00, 0x2ed0, 0x0000 }, + { 0x1a00, 0x2ed2, 0x0000 }, + { 0x9a00, 0x2ef3, 0x6000 }, + { 0x9a00, 0x2ee3, 0x5000 }, + { 0x9a00, 0x2edb, 0x4000 }, + { 0x9a00, 0x2ed7, 0x3000 }, + { 0x9a00, 0x2ed5, 0x2000 }, + { 0x1a00, 0x2ed4, 0x0000 }, + { 0x1a00, 0x2ed6, 0x0000 }, + { 0x9a00, 0x2ed9, 0x2000 }, + { 0x1a00, 0x2ed8, 0x0000 }, + { 0x1a00, 0x2eda, 0x0000 }, + { 0x9a00, 0x2edf, 0x3000 }, + { 0x9a00, 0x2edd, 0x2000 }, + { 0x1a00, 0x2edc, 0x0000 }, + { 0x1a00, 0x2ede, 0x0000 }, + { 0x9a00, 0x2ee1, 0x2000 }, + { 0x1a00, 0x2ee0, 0x0000 }, + { 0x1a00, 0x2ee2, 0x0000 }, + { 0x9a00, 0x2eeb, 0x4000 }, + { 0x9a00, 0x2ee7, 0x3000 }, + { 0x9a00, 0x2ee5, 0x2000 }, + { 0x1a00, 0x2ee4, 0x0000 }, + { 0x1a00, 0x2ee6, 0x0000 }, + { 0x9a00, 0x2ee9, 0x2000 }, + { 0x1a00, 0x2ee8, 0x0000 }, + { 0x1a00, 0x2eea, 0x0000 }, + { 0x9a00, 0x2eef, 0x3000 }, + { 0x9a00, 0x2eed, 0x2000 }, + { 0x1a00, 0x2eec, 0x0000 }, + { 0x1a00, 0x2eee, 0x0000 }, + { 0x9a00, 0x2ef1, 0x2000 }, + { 0x1a00, 0x2ef0, 0x0000 }, + { 0x1a00, 0x2ef2, 0x0000 }, + { 0x9a00, 0x2f0f, 0x5000 }, + { 0x9a00, 0x2f07, 0x4000 }, + { 0x9a00, 0x2f03, 0x3000 }, + { 0x9a00, 0x2f01, 0x2000 }, + { 0x1a00, 0x2f00, 0x0000 }, + { 0x1a00, 0x2f02, 0x0000 }, + { 0x9a00, 0x2f05, 0x2000 }, + { 0x1a00, 0x2f04, 0x0000 }, + { 0x1a00, 0x2f06, 0x0000 }, + { 0x9a00, 0x2f0b, 0x3000 }, + { 0x9a00, 0x2f09, 0x2000 }, + { 0x1a00, 0x2f08, 0x0000 }, + { 0x1a00, 0x2f0a, 0x0000 }, + { 0x9a00, 0x2f0d, 0x2000 }, + { 0x1a00, 0x2f0c, 0x0000 }, + { 0x1a00, 0x2f0e, 0x0000 }, + { 0x9a00, 0x2f17, 0x4000 }, + { 0x9a00, 0x2f13, 0x3000 }, + { 0x9a00, 0x2f11, 0x2000 }, + { 0x1a00, 0x2f10, 0x0000 }, + { 0x1a00, 0x2f12, 0x0000 }, + { 0x9a00, 0x2f15, 0x2000 }, + { 0x1a00, 0x2f14, 0x0000 }, + { 0x1a00, 0x2f16, 0x0000 }, + { 0x9a00, 0x2f1b, 0x3000 }, + { 0x9a00, 0x2f19, 0x2000 }, + { 0x1a00, 0x2f18, 0x0000 }, + { 0x1a00, 0x2f1a, 0x0000 }, + { 0x9a00, 0x2f1d, 0x2000 }, + { 0x1a00, 0x2f1c, 0x0000 }, + { 0x1a00, 0x2f1e, 0x0000 }, + { 0x8701, 0x00f0, 0xd000 }, + { 0x8700, 0xa34d, 0xc000 }, + { 0x9a00, 0x3391, 0xb000 }, + { 0x8700, 0x3149, 0xa000 }, + { 0x9500, 0x303d, 0x9000 }, + { 0x9a00, 0x2f9f, 0x8000 }, + { 0x9a00, 0x2f5f, 0x7000 }, + { 0x9a00, 0x2f3f, 0x6000 }, + { 0x9a00, 0x2f2f, 0x5000 }, + { 0x9a00, 0x2f27, 0x4000 }, + { 0x9a00, 0x2f23, 0x3000 }, + { 0x9a00, 0x2f21, 0x2000 }, + { 0x1a00, 0x2f20, 0x0000 }, + { 0x1a00, 0x2f22, 0x0000 }, + { 0x9a00, 0x2f25, 0x2000 }, + { 0x1a00, 0x2f24, 0x0000 }, + { 0x1a00, 0x2f26, 0x0000 }, + { 0x9a00, 0x2f2b, 0x3000 }, + { 0x9a00, 0x2f29, 0x2000 }, + { 0x1a00, 0x2f28, 0x0000 }, + { 0x1a00, 0x2f2a, 0x0000 }, + { 0x9a00, 0x2f2d, 0x2000 }, + { 0x1a00, 0x2f2c, 0x0000 }, + { 0x1a00, 0x2f2e, 0x0000 }, + { 0x9a00, 0x2f37, 0x4000 }, + { 0x9a00, 0x2f33, 0x3000 }, + { 0x9a00, 0x2f31, 0x2000 }, + { 0x1a00, 0x2f30, 0x0000 }, + { 0x1a00, 0x2f32, 0x0000 }, + { 0x9a00, 0x2f35, 0x2000 }, + { 0x1a00, 0x2f34, 0x0000 }, + { 0x1a00, 0x2f36, 0x0000 }, + { 0x9a00, 0x2f3b, 0x3000 }, + { 0x9a00, 0x2f39, 0x2000 }, + { 0x1a00, 0x2f38, 0x0000 }, + { 0x1a00, 0x2f3a, 0x0000 }, + { 0x9a00, 0x2f3d, 0x2000 }, + { 0x1a00, 0x2f3c, 0x0000 }, + { 0x1a00, 0x2f3e, 0x0000 }, + { 0x9a00, 0x2f4f, 0x5000 }, + { 0x9a00, 0x2f47, 0x4000 }, + { 0x9a00, 0x2f43, 0x3000 }, + { 0x9a00, 0x2f41, 0x2000 }, + { 0x1a00, 0x2f40, 0x0000 }, + { 0x1a00, 0x2f42, 0x0000 }, + { 0x9a00, 0x2f45, 0x2000 }, + { 0x1a00, 0x2f44, 0x0000 }, + { 0x1a00, 0x2f46, 0x0000 }, + { 0x9a00, 0x2f4b, 0x3000 }, + { 0x9a00, 0x2f49, 0x2000 }, + { 0x1a00, 0x2f48, 0x0000 }, + { 0x1a00, 0x2f4a, 0x0000 }, + { 0x9a00, 0x2f4d, 0x2000 }, + { 0x1a00, 0x2f4c, 0x0000 }, + { 0x1a00, 0x2f4e, 0x0000 }, + { 0x9a00, 0x2f57, 0x4000 }, + { 0x9a00, 0x2f53, 0x3000 }, + { 0x9a00, 0x2f51, 0x2000 }, + { 0x1a00, 0x2f50, 0x0000 }, + { 0x1a00, 0x2f52, 0x0000 }, + { 0x9a00, 0x2f55, 0x2000 }, + { 0x1a00, 0x2f54, 0x0000 }, + { 0x1a00, 0x2f56, 0x0000 }, + { 0x9a00, 0x2f5b, 0x3000 }, + { 0x9a00, 0x2f59, 0x2000 }, + { 0x1a00, 0x2f58, 0x0000 }, + { 0x1a00, 0x2f5a, 0x0000 }, + { 0x9a00, 0x2f5d, 0x2000 }, + { 0x1a00, 0x2f5c, 0x0000 }, + { 0x1a00, 0x2f5e, 0x0000 }, + { 0x9a00, 0x2f7f, 0x6000 }, + { 0x9a00, 0x2f6f, 0x5000 }, + { 0x9a00, 0x2f67, 0x4000 }, + { 0x9a00, 0x2f63, 0x3000 }, + { 0x9a00, 0x2f61, 0x2000 }, + { 0x1a00, 0x2f60, 0x0000 }, + { 0x1a00, 0x2f62, 0x0000 }, + { 0x9a00, 0x2f65, 0x2000 }, + { 0x1a00, 0x2f64, 0x0000 }, + { 0x1a00, 0x2f66, 0x0000 }, + { 0x9a00, 0x2f6b, 0x3000 }, + { 0x9a00, 0x2f69, 0x2000 }, + { 0x1a00, 0x2f68, 0x0000 }, + { 0x1a00, 0x2f6a, 0x0000 }, + { 0x9a00, 0x2f6d, 0x2000 }, + { 0x1a00, 0x2f6c, 0x0000 }, + { 0x1a00, 0x2f6e, 0x0000 }, + { 0x9a00, 0x2f77, 0x4000 }, + { 0x9a00, 0x2f73, 0x3000 }, + { 0x9a00, 0x2f71, 0x2000 }, + { 0x1a00, 0x2f70, 0x0000 }, + { 0x1a00, 0x2f72, 0x0000 }, + { 0x9a00, 0x2f75, 0x2000 }, + { 0x1a00, 0x2f74, 0x0000 }, + { 0x1a00, 0x2f76, 0x0000 }, + { 0x9a00, 0x2f7b, 0x3000 }, + { 0x9a00, 0x2f79, 0x2000 }, + { 0x1a00, 0x2f78, 0x0000 }, + { 0x1a00, 0x2f7a, 0x0000 }, + { 0x9a00, 0x2f7d, 0x2000 }, + { 0x1a00, 0x2f7c, 0x0000 }, + { 0x1a00, 0x2f7e, 0x0000 }, + { 0x9a00, 0x2f8f, 0x5000 }, + { 0x9a00, 0x2f87, 0x4000 }, + { 0x9a00, 0x2f83, 0x3000 }, + { 0x9a00, 0x2f81, 0x2000 }, + { 0x1a00, 0x2f80, 0x0000 }, + { 0x1a00, 0x2f82, 0x0000 }, + { 0x9a00, 0x2f85, 0x2000 }, + { 0x1a00, 0x2f84, 0x0000 }, + { 0x1a00, 0x2f86, 0x0000 }, + { 0x9a00, 0x2f8b, 0x3000 }, + { 0x9a00, 0x2f89, 0x2000 }, + { 0x1a00, 0x2f88, 0x0000 }, + { 0x1a00, 0x2f8a, 0x0000 }, + { 0x9a00, 0x2f8d, 0x2000 }, + { 0x1a00, 0x2f8c, 0x0000 }, + { 0x1a00, 0x2f8e, 0x0000 }, + { 0x9a00, 0x2f97, 0x4000 }, + { 0x9a00, 0x2f93, 0x3000 }, + { 0x9a00, 0x2f91, 0x2000 }, + { 0x1a00, 0x2f90, 0x0000 }, + { 0x1a00, 0x2f92, 0x0000 }, + { 0x9a00, 0x2f95, 0x2000 }, + { 0x1a00, 0x2f94, 0x0000 }, + { 0x1a00, 0x2f96, 0x0000 }, + { 0x9a00, 0x2f9b, 0x3000 }, + { 0x9a00, 0x2f99, 0x2000 }, + { 0x1a00, 0x2f98, 0x0000 }, + { 0x1a00, 0x2f9a, 0x0000 }, + { 0x9a00, 0x2f9d, 0x2000 }, + { 0x1a00, 0x2f9c, 0x0000 }, + { 0x1a00, 0x2f9e, 0x0000 }, + { 0x9a00, 0x2ff9, 0x7000 }, + { 0x9a00, 0x2fbf, 0x6000 }, + { 0x9a00, 0x2faf, 0x5000 }, + { 0x9a00, 0x2fa7, 0x4000 }, + { 0x9a00, 0x2fa3, 0x3000 }, + { 0x9a00, 0x2fa1, 0x2000 }, + { 0x1a00, 0x2fa0, 0x0000 }, + { 0x1a00, 0x2fa2, 0x0000 }, + { 0x9a00, 0x2fa5, 0x2000 }, + { 0x1a00, 0x2fa4, 0x0000 }, + { 0x1a00, 0x2fa6, 0x0000 }, + { 0x9a00, 0x2fab, 0x3000 }, + { 0x9a00, 0x2fa9, 0x2000 }, + { 0x1a00, 0x2fa8, 0x0000 }, + { 0x1a00, 0x2faa, 0x0000 }, + { 0x9a00, 0x2fad, 0x2000 }, + { 0x1a00, 0x2fac, 0x0000 }, + { 0x1a00, 0x2fae, 0x0000 }, + { 0x9a00, 0x2fb7, 0x4000 }, + { 0x9a00, 0x2fb3, 0x3000 }, + { 0x9a00, 0x2fb1, 0x2000 }, + { 0x1a00, 0x2fb0, 0x0000 }, + { 0x1a00, 0x2fb2, 0x0000 }, + { 0x9a00, 0x2fb5, 0x2000 }, + { 0x1a00, 0x2fb4, 0x0000 }, + { 0x1a00, 0x2fb6, 0x0000 }, + { 0x9a00, 0x2fbb, 0x3000 }, + { 0x9a00, 0x2fb9, 0x2000 }, + { 0x1a00, 0x2fb8, 0x0000 }, + { 0x1a00, 0x2fba, 0x0000 }, + { 0x9a00, 0x2fbd, 0x2000 }, + { 0x1a00, 0x2fbc, 0x0000 }, + { 0x1a00, 0x2fbe, 0x0000 }, + { 0x9a00, 0x2fcf, 0x5000 }, + { 0x9a00, 0x2fc7, 0x4000 }, + { 0x9a00, 0x2fc3, 0x3000 }, + { 0x9a00, 0x2fc1, 0x2000 }, + { 0x1a00, 0x2fc0, 0x0000 }, + { 0x1a00, 0x2fc2, 0x0000 }, + { 0x9a00, 0x2fc5, 0x2000 }, + { 0x1a00, 0x2fc4, 0x0000 }, + { 0x1a00, 0x2fc6, 0x0000 }, + { 0x9a00, 0x2fcb, 0x3000 }, + { 0x9a00, 0x2fc9, 0x2000 }, + { 0x1a00, 0x2fc8, 0x0000 }, + { 0x1a00, 0x2fca, 0x0000 }, + { 0x9a00, 0x2fcd, 0x2000 }, + { 0x1a00, 0x2fcc, 0x0000 }, + { 0x1a00, 0x2fce, 0x0000 }, + { 0x9a00, 0x2ff1, 0x4000 }, + { 0x9a00, 0x2fd3, 0x3000 }, + { 0x9a00, 0x2fd1, 0x2000 }, + { 0x1a00, 0x2fd0, 0x0000 }, + { 0x1a00, 0x2fd2, 0x0000 }, + { 0x9a00, 0x2fd5, 0x2000 }, + { 0x1a00, 0x2fd4, 0x0000 }, + { 0x1a00, 0x2ff0, 0x0000 }, + { 0x9a00, 0x2ff5, 0x3000 }, + { 0x9a00, 0x2ff3, 0x2000 }, + { 0x1a00, 0x2ff2, 0x0000 }, + { 0x1a00, 0x2ff4, 0x0000 }, + { 0x9a00, 0x2ff7, 0x2000 }, + { 0x1a00, 0x2ff6, 0x0000 }, + { 0x1a00, 0x2ff8, 0x0000 }, + { 0x9600, 0x301d, 0x6000 }, + { 0x9200, 0x300d, 0x5000 }, + { 0x8600, 0x3005, 0x4000 }, + { 0x9500, 0x3001, 0x3000 }, + { 0x9a00, 0x2ffb, 0x2000 }, + { 0x1a00, 0x2ffa, 0x0000 }, + { 0x1d00, 0x3000, 0x0000 }, + { 0x9500, 0x3003, 0x2000 }, + { 0x1500, 0x3002, 0x0000 }, + { 0x1a00, 0x3004, 0x0000 }, + { 0x9200, 0x3009, 0x3000 }, + { 0x8e00, 0x3007, 0x2000 }, + { 0x0700, 0x3006, 0x0000 }, + { 0x1600, 0x3008, 0x0000 }, + { 0x9200, 0x300b, 0x2000 }, + { 0x1600, 0x300a, 0x0000 }, + { 0x1600, 0x300c, 0x0000 }, + { 0x9200, 0x3015, 0x4000 }, + { 0x9200, 0x3011, 0x3000 }, + { 0x9200, 0x300f, 0x2000 }, + { 0x1600, 0x300e, 0x0000 }, + { 0x1600, 0x3010, 0x0000 }, + { 0x9a00, 0x3013, 0x2000 }, + { 0x1a00, 0x3012, 0x0000 }, + { 0x1600, 0x3014, 0x0000 }, + { 0x9200, 0x3019, 0x3000 }, + { 0x9200, 0x3017, 0x2000 }, + { 0x1600, 0x3016, 0x0000 }, + { 0x1600, 0x3018, 0x0000 }, + { 0x9200, 0x301b, 0x2000 }, + { 0x1600, 0x301a, 0x0000 }, + { 0x1100, 0x301c, 0x0000 }, + { 0x8c00, 0x302d, 0x5000 }, + { 0x8e00, 0x3025, 0x4000 }, + { 0x8e00, 0x3021, 0x3000 }, + { 0x9200, 0x301f, 0x2000 }, + { 0x1200, 0x301e, 0x0000 }, + { 0x1a00, 0x3020, 0x0000 }, + { 0x8e00, 0x3023, 0x2000 }, + { 0x0e00, 0x3022, 0x0000 }, + { 0x0e00, 0x3024, 0x0000 }, + { 0x8e00, 0x3029, 0x3000 }, + { 0x8e00, 0x3027, 0x2000 }, + { 0x0e00, 0x3026, 0x0000 }, + { 0x0e00, 0x3028, 0x0000 }, + { 0x8c00, 0x302b, 0x2000 }, + { 0x0c00, 0x302a, 0x0000 }, + { 0x0c00, 0x302c, 0x0000 }, + { 0x8600, 0x3035, 0x4000 }, + { 0x8600, 0x3031, 0x3000 }, + { 0x8c00, 0x302f, 0x2000 }, + { 0x0c00, 0x302e, 0x0000 }, + { 0x1100, 0x3030, 0x0000 }, + { 0x8600, 0x3033, 0x2000 }, + { 0x0600, 0x3032, 0x0000 }, + { 0x0600, 0x3034, 0x0000 }, + { 0x8e00, 0x3039, 0x3000 }, + { 0x9a00, 0x3037, 0x2000 }, + { 0x1a00, 0x3036, 0x0000 }, + { 0x0e00, 0x3038, 0x0000 }, + { 0x8600, 0x303b, 0x2000 }, + { 0x0e00, 0x303a, 0x0000 }, + { 0x0700, 0x303c, 0x0000 }, + { 0x8700, 0x30c0, 0x8000 }, + { 0x8700, 0x307e, 0x7000 }, + { 0x8700, 0x305e, 0x6000 }, + { 0x8700, 0x304e, 0x5000 }, + { 0x8700, 0x3046, 0x4000 }, + { 0x8700, 0x3042, 0x3000 }, + { 0x9a00, 0x303f, 0x2000 }, + { 0x1a00, 0x303e, 0x0000 }, + { 0x0700, 0x3041, 0x0000 }, + { 0x8700, 0x3044, 0x2000 }, + { 0x0700, 0x3043, 0x0000 }, + { 0x0700, 0x3045, 0x0000 }, + { 0x8700, 0x304a, 0x3000 }, + { 0x8700, 0x3048, 0x2000 }, + { 0x0700, 0x3047, 0x0000 }, + { 0x0700, 0x3049, 0x0000 }, + { 0x8700, 0x304c, 0x2000 }, + { 0x0700, 0x304b, 0x0000 }, + { 0x0700, 0x304d, 0x0000 }, + { 0x8700, 0x3056, 0x4000 }, + { 0x8700, 0x3052, 0x3000 }, + { 0x8700, 0x3050, 0x2000 }, + { 0x0700, 0x304f, 0x0000 }, + { 0x0700, 0x3051, 0x0000 }, + { 0x8700, 0x3054, 0x2000 }, + { 0x0700, 0x3053, 0x0000 }, + { 0x0700, 0x3055, 0x0000 }, + { 0x8700, 0x305a, 0x3000 }, + { 0x8700, 0x3058, 0x2000 }, + { 0x0700, 0x3057, 0x0000 }, + { 0x0700, 0x3059, 0x0000 }, + { 0x8700, 0x305c, 0x2000 }, + { 0x0700, 0x305b, 0x0000 }, + { 0x0700, 0x305d, 0x0000 }, + { 0x8700, 0x306e, 0x5000 }, + { 0x8700, 0x3066, 0x4000 }, + { 0x8700, 0x3062, 0x3000 }, + { 0x8700, 0x3060, 0x2000 }, + { 0x0700, 0x305f, 0x0000 }, + { 0x0700, 0x3061, 0x0000 }, + { 0x8700, 0x3064, 0x2000 }, + { 0x0700, 0x3063, 0x0000 }, + { 0x0700, 0x3065, 0x0000 }, + { 0x8700, 0x306a, 0x3000 }, + { 0x8700, 0x3068, 0x2000 }, + { 0x0700, 0x3067, 0x0000 }, + { 0x0700, 0x3069, 0x0000 }, + { 0x8700, 0x306c, 0x2000 }, + { 0x0700, 0x306b, 0x0000 }, + { 0x0700, 0x306d, 0x0000 }, + { 0x8700, 0x3076, 0x4000 }, + { 0x8700, 0x3072, 0x3000 }, + { 0x8700, 0x3070, 0x2000 }, + { 0x0700, 0x306f, 0x0000 }, + { 0x0700, 0x3071, 0x0000 }, + { 0x8700, 0x3074, 0x2000 }, + { 0x0700, 0x3073, 0x0000 }, + { 0x0700, 0x3075, 0x0000 }, + { 0x8700, 0x307a, 0x3000 }, + { 0x8700, 0x3078, 0x2000 }, + { 0x0700, 0x3077, 0x0000 }, + { 0x0700, 0x3079, 0x0000 }, + { 0x8700, 0x307c, 0x2000 }, + { 0x0700, 0x307b, 0x0000 }, + { 0x0700, 0x307d, 0x0000 }, + { 0x9100, 0x30a0, 0x6000 }, + { 0x8700, 0x308e, 0x5000 }, + { 0x8700, 0x3086, 0x4000 }, + { 0x8700, 0x3082, 0x3000 }, + { 0x8700, 0x3080, 0x2000 }, + { 0x0700, 0x307f, 0x0000 }, + { 0x0700, 0x3081, 0x0000 }, + { 0x8700, 0x3084, 0x2000 }, + { 0x0700, 0x3083, 0x0000 }, + { 0x0700, 0x3085, 0x0000 }, + { 0x8700, 0x308a, 0x3000 }, + { 0x8700, 0x3088, 0x2000 }, + { 0x0700, 0x3087, 0x0000 }, + { 0x0700, 0x3089, 0x0000 }, + { 0x8700, 0x308c, 0x2000 }, + { 0x0700, 0x308b, 0x0000 }, + { 0x0700, 0x308d, 0x0000 }, + { 0x8700, 0x3096, 0x4000 }, + { 0x8700, 0x3092, 0x3000 }, + { 0x8700, 0x3090, 0x2000 }, + { 0x0700, 0x308f, 0x0000 }, + { 0x0700, 0x3091, 0x0000 }, + { 0x8700, 0x3094, 0x2000 }, + { 0x0700, 0x3093, 0x0000 }, + { 0x0700, 0x3095, 0x0000 }, + { 0x9800, 0x309c, 0x3000 }, + { 0x8c00, 0x309a, 0x2000 }, + { 0x0c00, 0x3099, 0x0000 }, + { 0x1800, 0x309b, 0x0000 }, + { 0x8600, 0x309e, 0x2000 }, + { 0x0600, 0x309d, 0x0000 }, + { 0x0700, 0x309f, 0x0000 }, + { 0x8700, 0x30b0, 0x5000 }, + { 0x8700, 0x30a8, 0x4000 }, + { 0x8700, 0x30a4, 0x3000 }, + { 0x8700, 0x30a2, 0x2000 }, + { 0x0700, 0x30a1, 0x0000 }, + { 0x0700, 0x30a3, 0x0000 }, + { 0x8700, 0x30a6, 0x2000 }, + { 0x0700, 0x30a5, 0x0000 }, + { 0x0700, 0x30a7, 0x0000 }, + { 0x8700, 0x30ac, 0x3000 }, + { 0x8700, 0x30aa, 0x2000 }, + { 0x0700, 0x30a9, 0x0000 }, + { 0x0700, 0x30ab, 0x0000 }, + { 0x8700, 0x30ae, 0x2000 }, + { 0x0700, 0x30ad, 0x0000 }, + { 0x0700, 0x30af, 0x0000 }, + { 0x8700, 0x30b8, 0x4000 }, + { 0x8700, 0x30b4, 0x3000 }, + { 0x8700, 0x30b2, 0x2000 }, + { 0x0700, 0x30b1, 0x0000 }, + { 0x0700, 0x30b3, 0x0000 }, + { 0x8700, 0x30b6, 0x2000 }, + { 0x0700, 0x30b5, 0x0000 }, + { 0x0700, 0x30b7, 0x0000 }, + { 0x8700, 0x30bc, 0x3000 }, + { 0x8700, 0x30ba, 0x2000 }, + { 0x0700, 0x30b9, 0x0000 }, + { 0x0700, 0x30bb, 0x0000 }, + { 0x8700, 0x30be, 0x2000 }, + { 0x0700, 0x30bd, 0x0000 }, + { 0x0700, 0x30bf, 0x0000 }, + { 0x8700, 0x3105, 0x7000 }, + { 0x8700, 0x30e0, 0x6000 }, + { 0x8700, 0x30d0, 0x5000 }, + { 0x8700, 0x30c8, 0x4000 }, + { 0x8700, 0x30c4, 0x3000 }, + { 0x8700, 0x30c2, 0x2000 }, + { 0x0700, 0x30c1, 0x0000 }, + { 0x0700, 0x30c3, 0x0000 }, + { 0x8700, 0x30c6, 0x2000 }, + { 0x0700, 0x30c5, 0x0000 }, + { 0x0700, 0x30c7, 0x0000 }, + { 0x8700, 0x30cc, 0x3000 }, + { 0x8700, 0x30ca, 0x2000 }, + { 0x0700, 0x30c9, 0x0000 }, + { 0x0700, 0x30cb, 0x0000 }, + { 0x8700, 0x30ce, 0x2000 }, + { 0x0700, 0x30cd, 0x0000 }, + { 0x0700, 0x30cf, 0x0000 }, + { 0x8700, 0x30d8, 0x4000 }, + { 0x8700, 0x30d4, 0x3000 }, + { 0x8700, 0x30d2, 0x2000 }, + { 0x0700, 0x30d1, 0x0000 }, + { 0x0700, 0x30d3, 0x0000 }, + { 0x8700, 0x30d6, 0x2000 }, + { 0x0700, 0x30d5, 0x0000 }, + { 0x0700, 0x30d7, 0x0000 }, + { 0x8700, 0x30dc, 0x3000 }, + { 0x8700, 0x30da, 0x2000 }, + { 0x0700, 0x30d9, 0x0000 }, + { 0x0700, 0x30db, 0x0000 }, + { 0x8700, 0x30de, 0x2000 }, + { 0x0700, 0x30dd, 0x0000 }, + { 0x0700, 0x30df, 0x0000 }, + { 0x8700, 0x30f0, 0x5000 }, + { 0x8700, 0x30e8, 0x4000 }, + { 0x8700, 0x30e4, 0x3000 }, + { 0x8700, 0x30e2, 0x2000 }, + { 0x0700, 0x30e1, 0x0000 }, + { 0x0700, 0x30e3, 0x0000 }, + { 0x8700, 0x30e6, 0x2000 }, + { 0x0700, 0x30e5, 0x0000 }, + { 0x0700, 0x30e7, 0x0000 }, + { 0x8700, 0x30ec, 0x3000 }, + { 0x8700, 0x30ea, 0x2000 }, + { 0x0700, 0x30e9, 0x0000 }, + { 0x0700, 0x30eb, 0x0000 }, + { 0x8700, 0x30ee, 0x2000 }, + { 0x0700, 0x30ed, 0x0000 }, + { 0x0700, 0x30ef, 0x0000 }, + { 0x8700, 0x30f8, 0x4000 }, + { 0x8700, 0x30f4, 0x3000 }, + { 0x8700, 0x30f2, 0x2000 }, + { 0x0700, 0x30f1, 0x0000 }, + { 0x0700, 0x30f3, 0x0000 }, + { 0x8700, 0x30f6, 0x2000 }, + { 0x0700, 0x30f5, 0x0000 }, + { 0x0700, 0x30f7, 0x0000 }, + { 0x8600, 0x30fc, 0x3000 }, + { 0x8700, 0x30fa, 0x2000 }, + { 0x0700, 0x30f9, 0x0000 }, + { 0x1000, 0x30fb, 0x0000 }, + { 0x8600, 0x30fe, 0x2000 }, + { 0x0600, 0x30fd, 0x0000 }, + { 0x0700, 0x30ff, 0x0000 }, + { 0x8700, 0x3125, 0x6000 }, + { 0x8700, 0x3115, 0x5000 }, + { 0x8700, 0x310d, 0x4000 }, + { 0x8700, 0x3109, 0x3000 }, + { 0x8700, 0x3107, 0x2000 }, + { 0x0700, 0x3106, 0x0000 }, + { 0x0700, 0x3108, 0x0000 }, + { 0x8700, 0x310b, 0x2000 }, + { 0x0700, 0x310a, 0x0000 }, + { 0x0700, 0x310c, 0x0000 }, + { 0x8700, 0x3111, 0x3000 }, + { 0x8700, 0x310f, 0x2000 }, + { 0x0700, 0x310e, 0x0000 }, + { 0x0700, 0x3110, 0x0000 }, + { 0x8700, 0x3113, 0x2000 }, + { 0x0700, 0x3112, 0x0000 }, + { 0x0700, 0x3114, 0x0000 }, + { 0x8700, 0x311d, 0x4000 }, + { 0x8700, 0x3119, 0x3000 }, + { 0x8700, 0x3117, 0x2000 }, + { 0x0700, 0x3116, 0x0000 }, + { 0x0700, 0x3118, 0x0000 }, + { 0x8700, 0x311b, 0x2000 }, + { 0x0700, 0x311a, 0x0000 }, + { 0x0700, 0x311c, 0x0000 }, + { 0x8700, 0x3121, 0x3000 }, + { 0x8700, 0x311f, 0x2000 }, + { 0x0700, 0x311e, 0x0000 }, + { 0x0700, 0x3120, 0x0000 }, + { 0x8700, 0x3123, 0x2000 }, + { 0x0700, 0x3122, 0x0000 }, + { 0x0700, 0x3124, 0x0000 }, + { 0x8700, 0x3139, 0x5000 }, + { 0x8700, 0x3131, 0x4000 }, + { 0x8700, 0x3129, 0x3000 }, + { 0x8700, 0x3127, 0x2000 }, + { 0x0700, 0x3126, 0x0000 }, + { 0x0700, 0x3128, 0x0000 }, + { 0x8700, 0x312b, 0x2000 }, + { 0x0700, 0x312a, 0x0000 }, + { 0x0700, 0x312c, 0x0000 }, + { 0x8700, 0x3135, 0x3000 }, + { 0x8700, 0x3133, 0x2000 }, + { 0x0700, 0x3132, 0x0000 }, + { 0x0700, 0x3134, 0x0000 }, + { 0x8700, 0x3137, 0x2000 }, + { 0x0700, 0x3136, 0x0000 }, + { 0x0700, 0x3138, 0x0000 }, + { 0x8700, 0x3141, 0x4000 }, + { 0x8700, 0x313d, 0x3000 }, + { 0x8700, 0x313b, 0x2000 }, + { 0x0700, 0x313a, 0x0000 }, + { 0x0700, 0x313c, 0x0000 }, + { 0x8700, 0x313f, 0x2000 }, + { 0x0700, 0x313e, 0x0000 }, + { 0x0700, 0x3140, 0x0000 }, + { 0x8700, 0x3145, 0x3000 }, + { 0x8700, 0x3143, 0x2000 }, + { 0x0700, 0x3142, 0x0000 }, + { 0x0700, 0x3144, 0x0000 }, + { 0x8700, 0x3147, 0x2000 }, + { 0x0700, 0x3146, 0x0000 }, + { 0x0700, 0x3148, 0x0000 }, + { 0x9a00, 0x3290, 0x9000 }, + { 0x9a00, 0x3202, 0x8000 }, + { 0x8700, 0x3189, 0x7000 }, + { 0x8700, 0x3169, 0x6000 }, + { 0x8700, 0x3159, 0x5000 }, + { 0x8700, 0x3151, 0x4000 }, + { 0x8700, 0x314d, 0x3000 }, + { 0x8700, 0x314b, 0x2000 }, + { 0x0700, 0x314a, 0x0000 }, + { 0x0700, 0x314c, 0x0000 }, + { 0x8700, 0x314f, 0x2000 }, + { 0x0700, 0x314e, 0x0000 }, + { 0x0700, 0x3150, 0x0000 }, + { 0x8700, 0x3155, 0x3000 }, + { 0x8700, 0x3153, 0x2000 }, + { 0x0700, 0x3152, 0x0000 }, + { 0x0700, 0x3154, 0x0000 }, + { 0x8700, 0x3157, 0x2000 }, + { 0x0700, 0x3156, 0x0000 }, + { 0x0700, 0x3158, 0x0000 }, + { 0x8700, 0x3161, 0x4000 }, + { 0x8700, 0x315d, 0x3000 }, + { 0x8700, 0x315b, 0x2000 }, + { 0x0700, 0x315a, 0x0000 }, + { 0x0700, 0x315c, 0x0000 }, + { 0x8700, 0x315f, 0x2000 }, + { 0x0700, 0x315e, 0x0000 }, + { 0x0700, 0x3160, 0x0000 }, + { 0x8700, 0x3165, 0x3000 }, + { 0x8700, 0x3163, 0x2000 }, + { 0x0700, 0x3162, 0x0000 }, + { 0x0700, 0x3164, 0x0000 }, + { 0x8700, 0x3167, 0x2000 }, + { 0x0700, 0x3166, 0x0000 }, + { 0x0700, 0x3168, 0x0000 }, + { 0x8700, 0x3179, 0x5000 }, + { 0x8700, 0x3171, 0x4000 }, + { 0x8700, 0x316d, 0x3000 }, + { 0x8700, 0x316b, 0x2000 }, + { 0x0700, 0x316a, 0x0000 }, + { 0x0700, 0x316c, 0x0000 }, + { 0x8700, 0x316f, 0x2000 }, + { 0x0700, 0x316e, 0x0000 }, + { 0x0700, 0x3170, 0x0000 }, + { 0x8700, 0x3175, 0x3000 }, + { 0x8700, 0x3173, 0x2000 }, + { 0x0700, 0x3172, 0x0000 }, + { 0x0700, 0x3174, 0x0000 }, + { 0x8700, 0x3177, 0x2000 }, + { 0x0700, 0x3176, 0x0000 }, + { 0x0700, 0x3178, 0x0000 }, + { 0x8700, 0x3181, 0x4000 }, + { 0x8700, 0x317d, 0x3000 }, + { 0x8700, 0x317b, 0x2000 }, + { 0x0700, 0x317a, 0x0000 }, + { 0x0700, 0x317c, 0x0000 }, + { 0x8700, 0x317f, 0x2000 }, + { 0x0700, 0x317e, 0x0000 }, + { 0x0700, 0x3180, 0x0000 }, + { 0x8700, 0x3185, 0x3000 }, + { 0x8700, 0x3183, 0x2000 }, + { 0x0700, 0x3182, 0x0000 }, + { 0x0700, 0x3184, 0x0000 }, + { 0x8700, 0x3187, 0x2000 }, + { 0x0700, 0x3186, 0x0000 }, + { 0x0700, 0x3188, 0x0000 }, + { 0x8700, 0x31aa, 0x6000 }, + { 0x9a00, 0x319a, 0x5000 }, + { 0x8f00, 0x3192, 0x4000 }, + { 0x8700, 0x318d, 0x3000 }, + { 0x8700, 0x318b, 0x2000 }, + { 0x0700, 0x318a, 0x0000 }, + { 0x0700, 0x318c, 0x0000 }, + { 0x9a00, 0x3190, 0x2000 }, + { 0x0700, 0x318e, 0x0000 }, + { 0x1a00, 0x3191, 0x0000 }, + { 0x9a00, 0x3196, 0x3000 }, + { 0x8f00, 0x3194, 0x2000 }, + { 0x0f00, 0x3193, 0x0000 }, + { 0x0f00, 0x3195, 0x0000 }, + { 0x9a00, 0x3198, 0x2000 }, + { 0x1a00, 0x3197, 0x0000 }, + { 0x1a00, 0x3199, 0x0000 }, + { 0x8700, 0x31a2, 0x4000 }, + { 0x9a00, 0x319e, 0x3000 }, + { 0x9a00, 0x319c, 0x2000 }, + { 0x1a00, 0x319b, 0x0000 }, + { 0x1a00, 0x319d, 0x0000 }, + { 0x8700, 0x31a0, 0x2000 }, + { 0x1a00, 0x319f, 0x0000 }, + { 0x0700, 0x31a1, 0x0000 }, + { 0x8700, 0x31a6, 0x3000 }, + { 0x8700, 0x31a4, 0x2000 }, + { 0x0700, 0x31a3, 0x0000 }, + { 0x0700, 0x31a5, 0x0000 }, + { 0x8700, 0x31a8, 0x2000 }, + { 0x0700, 0x31a7, 0x0000 }, + { 0x0700, 0x31a9, 0x0000 }, + { 0x8700, 0x31f2, 0x5000 }, + { 0x8700, 0x31b2, 0x4000 }, + { 0x8700, 0x31ae, 0x3000 }, + { 0x8700, 0x31ac, 0x2000 }, + { 0x0700, 0x31ab, 0x0000 }, + { 0x0700, 0x31ad, 0x0000 }, + { 0x8700, 0x31b0, 0x2000 }, + { 0x0700, 0x31af, 0x0000 }, + { 0x0700, 0x31b1, 0x0000 }, + { 0x8700, 0x31b6, 0x3000 }, + { 0x8700, 0x31b4, 0x2000 }, + { 0x0700, 0x31b3, 0x0000 }, + { 0x0700, 0x31b5, 0x0000 }, + { 0x8700, 0x31f0, 0x2000 }, + { 0x0700, 0x31b7, 0x0000 }, + { 0x0700, 0x31f1, 0x0000 }, + { 0x8700, 0x31fa, 0x4000 }, + { 0x8700, 0x31f6, 0x3000 }, + { 0x8700, 0x31f4, 0x2000 }, + { 0x0700, 0x31f3, 0x0000 }, + { 0x0700, 0x31f5, 0x0000 }, + { 0x8700, 0x31f8, 0x2000 }, + { 0x0700, 0x31f7, 0x0000 }, + { 0x0700, 0x31f9, 0x0000 }, + { 0x8700, 0x31fe, 0x3000 }, + { 0x8700, 0x31fc, 0x2000 }, + { 0x0700, 0x31fb, 0x0000 }, + { 0x0700, 0x31fd, 0x0000 }, + { 0x9a00, 0x3200, 0x2000 }, + { 0x0700, 0x31ff, 0x0000 }, + { 0x1a00, 0x3201, 0x0000 }, + { 0x9a00, 0x3243, 0x7000 }, + { 0x8f00, 0x3223, 0x6000 }, + { 0x9a00, 0x3212, 0x5000 }, + { 0x9a00, 0x320a, 0x4000 }, + { 0x9a00, 0x3206, 0x3000 }, + { 0x9a00, 0x3204, 0x2000 }, + { 0x1a00, 0x3203, 0x0000 }, + { 0x1a00, 0x3205, 0x0000 }, + { 0x9a00, 0x3208, 0x2000 }, + { 0x1a00, 0x3207, 0x0000 }, + { 0x1a00, 0x3209, 0x0000 }, + { 0x9a00, 0x320e, 0x3000 }, + { 0x9a00, 0x320c, 0x2000 }, + { 0x1a00, 0x320b, 0x0000 }, + { 0x1a00, 0x320d, 0x0000 }, + { 0x9a00, 0x3210, 0x2000 }, + { 0x1a00, 0x320f, 0x0000 }, + { 0x1a00, 0x3211, 0x0000 }, + { 0x9a00, 0x321a, 0x4000 }, + { 0x9a00, 0x3216, 0x3000 }, + { 0x9a00, 0x3214, 0x2000 }, + { 0x1a00, 0x3213, 0x0000 }, + { 0x1a00, 0x3215, 0x0000 }, + { 0x9a00, 0x3218, 0x2000 }, + { 0x1a00, 0x3217, 0x0000 }, + { 0x1a00, 0x3219, 0x0000 }, + { 0x9a00, 0x321e, 0x3000 }, + { 0x9a00, 0x321c, 0x2000 }, + { 0x1a00, 0x321b, 0x0000 }, + { 0x1a00, 0x321d, 0x0000 }, + { 0x8f00, 0x3221, 0x2000 }, + { 0x0f00, 0x3220, 0x0000 }, + { 0x0f00, 0x3222, 0x0000 }, + { 0x9a00, 0x3233, 0x5000 }, + { 0x9a00, 0x322b, 0x4000 }, + { 0x8f00, 0x3227, 0x3000 }, + { 0x8f00, 0x3225, 0x2000 }, + { 0x0f00, 0x3224, 0x0000 }, + { 0x0f00, 0x3226, 0x0000 }, + { 0x8f00, 0x3229, 0x2000 }, + { 0x0f00, 0x3228, 0x0000 }, + { 0x1a00, 0x322a, 0x0000 }, + { 0x9a00, 0x322f, 0x3000 }, + { 0x9a00, 0x322d, 0x2000 }, + { 0x1a00, 0x322c, 0x0000 }, + { 0x1a00, 0x322e, 0x0000 }, + { 0x9a00, 0x3231, 0x2000 }, + { 0x1a00, 0x3230, 0x0000 }, + { 0x1a00, 0x3232, 0x0000 }, + { 0x9a00, 0x323b, 0x4000 }, + { 0x9a00, 0x3237, 0x3000 }, + { 0x9a00, 0x3235, 0x2000 }, + { 0x1a00, 0x3234, 0x0000 }, + { 0x1a00, 0x3236, 0x0000 }, + { 0x9a00, 0x3239, 0x2000 }, + { 0x1a00, 0x3238, 0x0000 }, + { 0x1a00, 0x323a, 0x0000 }, + { 0x9a00, 0x323f, 0x3000 }, + { 0x9a00, 0x323d, 0x2000 }, + { 0x1a00, 0x323c, 0x0000 }, + { 0x1a00, 0x323e, 0x0000 }, + { 0x9a00, 0x3241, 0x2000 }, + { 0x1a00, 0x3240, 0x0000 }, + { 0x1a00, 0x3242, 0x0000 }, + { 0x9a00, 0x326f, 0x6000 }, + { 0x8f00, 0x325f, 0x5000 }, + { 0x8f00, 0x3257, 0x4000 }, + { 0x8f00, 0x3253, 0x3000 }, + { 0x8f00, 0x3251, 0x2000 }, + { 0x1a00, 0x3250, 0x0000 }, + { 0x0f00, 0x3252, 0x0000 }, + { 0x8f00, 0x3255, 0x2000 }, + { 0x0f00, 0x3254, 0x0000 }, + { 0x0f00, 0x3256, 0x0000 }, + { 0x8f00, 0x325b, 0x3000 }, + { 0x8f00, 0x3259, 0x2000 }, + { 0x0f00, 0x3258, 0x0000 }, + { 0x0f00, 0x325a, 0x0000 }, + { 0x8f00, 0x325d, 0x2000 }, + { 0x0f00, 0x325c, 0x0000 }, + { 0x0f00, 0x325e, 0x0000 }, + { 0x9a00, 0x3267, 0x4000 }, + { 0x9a00, 0x3263, 0x3000 }, + { 0x9a00, 0x3261, 0x2000 }, + { 0x1a00, 0x3260, 0x0000 }, + { 0x1a00, 0x3262, 0x0000 }, + { 0x9a00, 0x3265, 0x2000 }, + { 0x1a00, 0x3264, 0x0000 }, + { 0x1a00, 0x3266, 0x0000 }, + { 0x9a00, 0x326b, 0x3000 }, + { 0x9a00, 0x3269, 0x2000 }, + { 0x1a00, 0x3268, 0x0000 }, + { 0x1a00, 0x326a, 0x0000 }, + { 0x9a00, 0x326d, 0x2000 }, + { 0x1a00, 0x326c, 0x0000 }, + { 0x1a00, 0x326e, 0x0000 }, + { 0x8f00, 0x3280, 0x5000 }, + { 0x9a00, 0x3277, 0x4000 }, + { 0x9a00, 0x3273, 0x3000 }, + { 0x9a00, 0x3271, 0x2000 }, + { 0x1a00, 0x3270, 0x0000 }, + { 0x1a00, 0x3272, 0x0000 }, + { 0x9a00, 0x3275, 0x2000 }, + { 0x1a00, 0x3274, 0x0000 }, + { 0x1a00, 0x3276, 0x0000 }, + { 0x9a00, 0x327b, 0x3000 }, + { 0x9a00, 0x3279, 0x2000 }, + { 0x1a00, 0x3278, 0x0000 }, + { 0x1a00, 0x327a, 0x0000 }, + { 0x9a00, 0x327d, 0x2000 }, + { 0x1a00, 0x327c, 0x0000 }, + { 0x1a00, 0x327f, 0x0000 }, + { 0x8f00, 0x3288, 0x4000 }, + { 0x8f00, 0x3284, 0x3000 }, + { 0x8f00, 0x3282, 0x2000 }, + { 0x0f00, 0x3281, 0x0000 }, + { 0x0f00, 0x3283, 0x0000 }, + { 0x8f00, 0x3286, 0x2000 }, + { 0x0f00, 0x3285, 0x0000 }, + { 0x0f00, 0x3287, 0x0000 }, + { 0x9a00, 0x328c, 0x3000 }, + { 0x9a00, 0x328a, 0x2000 }, + { 0x0f00, 0x3289, 0x0000 }, + { 0x1a00, 0x328b, 0x0000 }, + { 0x9a00, 0x328e, 0x2000 }, + { 0x1a00, 0x328d, 0x0000 }, + { 0x1a00, 0x328f, 0x0000 }, + { 0x9a00, 0x3311, 0x8000 }, + { 0x9a00, 0x32d0, 0x7000 }, + { 0x9a00, 0x32b0, 0x6000 }, + { 0x9a00, 0x32a0, 0x5000 }, + { 0x9a00, 0x3298, 0x4000 }, + { 0x9a00, 0x3294, 0x3000 }, + { 0x9a00, 0x3292, 0x2000 }, + { 0x1a00, 0x3291, 0x0000 }, + { 0x1a00, 0x3293, 0x0000 }, + { 0x9a00, 0x3296, 0x2000 }, + { 0x1a00, 0x3295, 0x0000 }, + { 0x1a00, 0x3297, 0x0000 }, + { 0x9a00, 0x329c, 0x3000 }, + { 0x9a00, 0x329a, 0x2000 }, + { 0x1a00, 0x3299, 0x0000 }, + { 0x1a00, 0x329b, 0x0000 }, + { 0x9a00, 0x329e, 0x2000 }, + { 0x1a00, 0x329d, 0x0000 }, + { 0x1a00, 0x329f, 0x0000 }, + { 0x9a00, 0x32a8, 0x4000 }, + { 0x9a00, 0x32a4, 0x3000 }, + { 0x9a00, 0x32a2, 0x2000 }, + { 0x1a00, 0x32a1, 0x0000 }, + { 0x1a00, 0x32a3, 0x0000 }, + { 0x9a00, 0x32a6, 0x2000 }, + { 0x1a00, 0x32a5, 0x0000 }, + { 0x1a00, 0x32a7, 0x0000 }, + { 0x9a00, 0x32ac, 0x3000 }, + { 0x9a00, 0x32aa, 0x2000 }, + { 0x1a00, 0x32a9, 0x0000 }, + { 0x1a00, 0x32ab, 0x0000 }, + { 0x9a00, 0x32ae, 0x2000 }, + { 0x1a00, 0x32ad, 0x0000 }, + { 0x1a00, 0x32af, 0x0000 }, + { 0x9a00, 0x32c0, 0x5000 }, + { 0x8f00, 0x32b8, 0x4000 }, + { 0x8f00, 0x32b4, 0x3000 }, + { 0x8f00, 0x32b2, 0x2000 }, + { 0x0f00, 0x32b1, 0x0000 }, + { 0x0f00, 0x32b3, 0x0000 }, + { 0x8f00, 0x32b6, 0x2000 }, + { 0x0f00, 0x32b5, 0x0000 }, + { 0x0f00, 0x32b7, 0x0000 }, + { 0x8f00, 0x32bc, 0x3000 }, + { 0x8f00, 0x32ba, 0x2000 }, + { 0x0f00, 0x32b9, 0x0000 }, + { 0x0f00, 0x32bb, 0x0000 }, + { 0x8f00, 0x32be, 0x2000 }, + { 0x0f00, 0x32bd, 0x0000 }, + { 0x0f00, 0x32bf, 0x0000 }, + { 0x9a00, 0x32c8, 0x4000 }, + { 0x9a00, 0x32c4, 0x3000 }, + { 0x9a00, 0x32c2, 0x2000 }, + { 0x1a00, 0x32c1, 0x0000 }, + { 0x1a00, 0x32c3, 0x0000 }, + { 0x9a00, 0x32c6, 0x2000 }, + { 0x1a00, 0x32c5, 0x0000 }, + { 0x1a00, 0x32c7, 0x0000 }, + { 0x9a00, 0x32cc, 0x3000 }, + { 0x9a00, 0x32ca, 0x2000 }, + { 0x1a00, 0x32c9, 0x0000 }, + { 0x1a00, 0x32cb, 0x0000 }, + { 0x9a00, 0x32ce, 0x2000 }, + { 0x1a00, 0x32cd, 0x0000 }, + { 0x1a00, 0x32cf, 0x0000 }, + { 0x9a00, 0x32f0, 0x6000 }, + { 0x9a00, 0x32e0, 0x5000 }, + { 0x9a00, 0x32d8, 0x4000 }, + { 0x9a00, 0x32d4, 0x3000 }, + { 0x9a00, 0x32d2, 0x2000 }, + { 0x1a00, 0x32d1, 0x0000 }, + { 0x1a00, 0x32d3, 0x0000 }, + { 0x9a00, 0x32d6, 0x2000 }, + { 0x1a00, 0x32d5, 0x0000 }, + { 0x1a00, 0x32d7, 0x0000 }, + { 0x9a00, 0x32dc, 0x3000 }, + { 0x9a00, 0x32da, 0x2000 }, + { 0x1a00, 0x32d9, 0x0000 }, + { 0x1a00, 0x32db, 0x0000 }, + { 0x9a00, 0x32de, 0x2000 }, + { 0x1a00, 0x32dd, 0x0000 }, + { 0x1a00, 0x32df, 0x0000 }, + { 0x9a00, 0x32e8, 0x4000 }, + { 0x9a00, 0x32e4, 0x3000 }, + { 0x9a00, 0x32e2, 0x2000 }, + { 0x1a00, 0x32e1, 0x0000 }, + { 0x1a00, 0x32e3, 0x0000 }, + { 0x9a00, 0x32e6, 0x2000 }, + { 0x1a00, 0x32e5, 0x0000 }, + { 0x1a00, 0x32e7, 0x0000 }, + { 0x9a00, 0x32ec, 0x3000 }, + { 0x9a00, 0x32ea, 0x2000 }, + { 0x1a00, 0x32e9, 0x0000 }, + { 0x1a00, 0x32eb, 0x0000 }, + { 0x9a00, 0x32ee, 0x2000 }, + { 0x1a00, 0x32ed, 0x0000 }, + { 0x1a00, 0x32ef, 0x0000 }, + { 0x9a00, 0x3301, 0x5000 }, + { 0x9a00, 0x32f8, 0x4000 }, + { 0x9a00, 0x32f4, 0x3000 }, + { 0x9a00, 0x32f2, 0x2000 }, + { 0x1a00, 0x32f1, 0x0000 }, + { 0x1a00, 0x32f3, 0x0000 }, + { 0x9a00, 0x32f6, 0x2000 }, + { 0x1a00, 0x32f5, 0x0000 }, + { 0x1a00, 0x32f7, 0x0000 }, + { 0x9a00, 0x32fc, 0x3000 }, + { 0x9a00, 0x32fa, 0x2000 }, + { 0x1a00, 0x32f9, 0x0000 }, + { 0x1a00, 0x32fb, 0x0000 }, + { 0x9a00, 0x32fe, 0x2000 }, + { 0x1a00, 0x32fd, 0x0000 }, + { 0x1a00, 0x3300, 0x0000 }, + { 0x9a00, 0x3309, 0x4000 }, + { 0x9a00, 0x3305, 0x3000 }, + { 0x9a00, 0x3303, 0x2000 }, + { 0x1a00, 0x3302, 0x0000 }, + { 0x1a00, 0x3304, 0x0000 }, + { 0x9a00, 0x3307, 0x2000 }, + { 0x1a00, 0x3306, 0x0000 }, + { 0x1a00, 0x3308, 0x0000 }, + { 0x9a00, 0x330d, 0x3000 }, + { 0x9a00, 0x330b, 0x2000 }, + { 0x1a00, 0x330a, 0x0000 }, + { 0x1a00, 0x330c, 0x0000 }, + { 0x9a00, 0x330f, 0x2000 }, + { 0x1a00, 0x330e, 0x0000 }, + { 0x1a00, 0x3310, 0x0000 }, + { 0x9a00, 0x3351, 0x7000 }, + { 0x9a00, 0x3331, 0x6000 }, + { 0x9a00, 0x3321, 0x5000 }, + { 0x9a00, 0x3319, 0x4000 }, + { 0x9a00, 0x3315, 0x3000 }, + { 0x9a00, 0x3313, 0x2000 }, + { 0x1a00, 0x3312, 0x0000 }, + { 0x1a00, 0x3314, 0x0000 }, + { 0x9a00, 0x3317, 0x2000 }, + { 0x1a00, 0x3316, 0x0000 }, + { 0x1a00, 0x3318, 0x0000 }, + { 0x9a00, 0x331d, 0x3000 }, + { 0x9a00, 0x331b, 0x2000 }, + { 0x1a00, 0x331a, 0x0000 }, + { 0x1a00, 0x331c, 0x0000 }, + { 0x9a00, 0x331f, 0x2000 }, + { 0x1a00, 0x331e, 0x0000 }, + { 0x1a00, 0x3320, 0x0000 }, + { 0x9a00, 0x3329, 0x4000 }, + { 0x9a00, 0x3325, 0x3000 }, + { 0x9a00, 0x3323, 0x2000 }, + { 0x1a00, 0x3322, 0x0000 }, + { 0x1a00, 0x3324, 0x0000 }, + { 0x9a00, 0x3327, 0x2000 }, + { 0x1a00, 0x3326, 0x0000 }, + { 0x1a00, 0x3328, 0x0000 }, + { 0x9a00, 0x332d, 0x3000 }, + { 0x9a00, 0x332b, 0x2000 }, + { 0x1a00, 0x332a, 0x0000 }, + { 0x1a00, 0x332c, 0x0000 }, + { 0x9a00, 0x332f, 0x2000 }, + { 0x1a00, 0x332e, 0x0000 }, + { 0x1a00, 0x3330, 0x0000 }, + { 0x9a00, 0x3341, 0x5000 }, + { 0x9a00, 0x3339, 0x4000 }, + { 0x9a00, 0x3335, 0x3000 }, + { 0x9a00, 0x3333, 0x2000 }, + { 0x1a00, 0x3332, 0x0000 }, + { 0x1a00, 0x3334, 0x0000 }, + { 0x9a00, 0x3337, 0x2000 }, + { 0x1a00, 0x3336, 0x0000 }, + { 0x1a00, 0x3338, 0x0000 }, + { 0x9a00, 0x333d, 0x3000 }, + { 0x9a00, 0x333b, 0x2000 }, + { 0x1a00, 0x333a, 0x0000 }, + { 0x1a00, 0x333c, 0x0000 }, + { 0x9a00, 0x333f, 0x2000 }, + { 0x1a00, 0x333e, 0x0000 }, + { 0x1a00, 0x3340, 0x0000 }, + { 0x9a00, 0x3349, 0x4000 }, + { 0x9a00, 0x3345, 0x3000 }, + { 0x9a00, 0x3343, 0x2000 }, + { 0x1a00, 0x3342, 0x0000 }, + { 0x1a00, 0x3344, 0x0000 }, + { 0x9a00, 0x3347, 0x2000 }, + { 0x1a00, 0x3346, 0x0000 }, + { 0x1a00, 0x3348, 0x0000 }, + { 0x9a00, 0x334d, 0x3000 }, + { 0x9a00, 0x334b, 0x2000 }, + { 0x1a00, 0x334a, 0x0000 }, + { 0x1a00, 0x334c, 0x0000 }, + { 0x9a00, 0x334f, 0x2000 }, + { 0x1a00, 0x334e, 0x0000 }, + { 0x1a00, 0x3350, 0x0000 }, + { 0x9a00, 0x3371, 0x6000 }, + { 0x9a00, 0x3361, 0x5000 }, + { 0x9a00, 0x3359, 0x4000 }, + { 0x9a00, 0x3355, 0x3000 }, + { 0x9a00, 0x3353, 0x2000 }, + { 0x1a00, 0x3352, 0x0000 }, + { 0x1a00, 0x3354, 0x0000 }, + { 0x9a00, 0x3357, 0x2000 }, + { 0x1a00, 0x3356, 0x0000 }, + { 0x1a00, 0x3358, 0x0000 }, + { 0x9a00, 0x335d, 0x3000 }, + { 0x9a00, 0x335b, 0x2000 }, + { 0x1a00, 0x335a, 0x0000 }, + { 0x1a00, 0x335c, 0x0000 }, + { 0x9a00, 0x335f, 0x2000 }, + { 0x1a00, 0x335e, 0x0000 }, + { 0x1a00, 0x3360, 0x0000 }, + { 0x9a00, 0x3369, 0x4000 }, + { 0x9a00, 0x3365, 0x3000 }, + { 0x9a00, 0x3363, 0x2000 }, + { 0x1a00, 0x3362, 0x0000 }, + { 0x1a00, 0x3364, 0x0000 }, + { 0x9a00, 0x3367, 0x2000 }, + { 0x1a00, 0x3366, 0x0000 }, + { 0x1a00, 0x3368, 0x0000 }, + { 0x9a00, 0x336d, 0x3000 }, + { 0x9a00, 0x336b, 0x2000 }, + { 0x1a00, 0x336a, 0x0000 }, + { 0x1a00, 0x336c, 0x0000 }, + { 0x9a00, 0x336f, 0x2000 }, + { 0x1a00, 0x336e, 0x0000 }, + { 0x1a00, 0x3370, 0x0000 }, + { 0x9a00, 0x3381, 0x5000 }, + { 0x9a00, 0x3379, 0x4000 }, + { 0x9a00, 0x3375, 0x3000 }, + { 0x9a00, 0x3373, 0x2000 }, + { 0x1a00, 0x3372, 0x0000 }, + { 0x1a00, 0x3374, 0x0000 }, + { 0x9a00, 0x3377, 0x2000 }, + { 0x1a00, 0x3376, 0x0000 }, + { 0x1a00, 0x3378, 0x0000 }, + { 0x9a00, 0x337d, 0x3000 }, + { 0x9a00, 0x337b, 0x2000 }, + { 0x1a00, 0x337a, 0x0000 }, + { 0x1a00, 0x337c, 0x0000 }, + { 0x9a00, 0x337f, 0x2000 }, + { 0x1a00, 0x337e, 0x0000 }, + { 0x1a00, 0x3380, 0x0000 }, + { 0x9a00, 0x3389, 0x4000 }, + { 0x9a00, 0x3385, 0x3000 }, + { 0x9a00, 0x3383, 0x2000 }, + { 0x1a00, 0x3382, 0x0000 }, + { 0x1a00, 0x3384, 0x0000 }, + { 0x9a00, 0x3387, 0x2000 }, + { 0x1a00, 0x3386, 0x0000 }, + { 0x1a00, 0x3388, 0x0000 }, + { 0x9a00, 0x338d, 0x3000 }, + { 0x9a00, 0x338b, 0x2000 }, + { 0x1a00, 0x338a, 0x0000 }, + { 0x1a00, 0x338c, 0x0000 }, + { 0x9a00, 0x338f, 0x2000 }, + { 0x1a00, 0x338e, 0x0000 }, + { 0x1a00, 0x3390, 0x0000 }, + { 0x8700, 0xa14d, 0xa000 }, + { 0x8700, 0xa04d, 0x9000 }, + { 0x9a00, 0x4dcf, 0x8000 }, + { 0x9a00, 0x33d1, 0x7000 }, + { 0x9a00, 0x33b1, 0x6000 }, + { 0x9a00, 0x33a1, 0x5000 }, + { 0x9a00, 0x3399, 0x4000 }, + { 0x9a00, 0x3395, 0x3000 }, + { 0x9a00, 0x3393, 0x2000 }, + { 0x1a00, 0x3392, 0x0000 }, + { 0x1a00, 0x3394, 0x0000 }, + { 0x9a00, 0x3397, 0x2000 }, + { 0x1a00, 0x3396, 0x0000 }, + { 0x1a00, 0x3398, 0x0000 }, + { 0x9a00, 0x339d, 0x3000 }, + { 0x9a00, 0x339b, 0x2000 }, + { 0x1a00, 0x339a, 0x0000 }, + { 0x1a00, 0x339c, 0x0000 }, + { 0x9a00, 0x339f, 0x2000 }, + { 0x1a00, 0x339e, 0x0000 }, + { 0x1a00, 0x33a0, 0x0000 }, + { 0x9a00, 0x33a9, 0x4000 }, + { 0x9a00, 0x33a5, 0x3000 }, + { 0x9a00, 0x33a3, 0x2000 }, + { 0x1a00, 0x33a2, 0x0000 }, + { 0x1a00, 0x33a4, 0x0000 }, + { 0x9a00, 0x33a7, 0x2000 }, + { 0x1a00, 0x33a6, 0x0000 }, + { 0x1a00, 0x33a8, 0x0000 }, + { 0x9a00, 0x33ad, 0x3000 }, + { 0x9a00, 0x33ab, 0x2000 }, + { 0x1a00, 0x33aa, 0x0000 }, + { 0x1a00, 0x33ac, 0x0000 }, + { 0x9a00, 0x33af, 0x2000 }, + { 0x1a00, 0x33ae, 0x0000 }, + { 0x1a00, 0x33b0, 0x0000 }, + { 0x9a00, 0x33c1, 0x5000 }, + { 0x9a00, 0x33b9, 0x4000 }, + { 0x9a00, 0x33b5, 0x3000 }, + { 0x9a00, 0x33b3, 0x2000 }, + { 0x1a00, 0x33b2, 0x0000 }, + { 0x1a00, 0x33b4, 0x0000 }, + { 0x9a00, 0x33b7, 0x2000 }, + { 0x1a00, 0x33b6, 0x0000 }, + { 0x1a00, 0x33b8, 0x0000 }, + { 0x9a00, 0x33bd, 0x3000 }, + { 0x9a00, 0x33bb, 0x2000 }, + { 0x1a00, 0x33ba, 0x0000 }, + { 0x1a00, 0x33bc, 0x0000 }, + { 0x9a00, 0x33bf, 0x2000 }, + { 0x1a00, 0x33be, 0x0000 }, + { 0x1a00, 0x33c0, 0x0000 }, + { 0x9a00, 0x33c9, 0x4000 }, + { 0x9a00, 0x33c5, 0x3000 }, + { 0x9a00, 0x33c3, 0x2000 }, + { 0x1a00, 0x33c2, 0x0000 }, + { 0x1a00, 0x33c4, 0x0000 }, + { 0x9a00, 0x33c7, 0x2000 }, + { 0x1a00, 0x33c6, 0x0000 }, + { 0x1a00, 0x33c8, 0x0000 }, + { 0x9a00, 0x33cd, 0x3000 }, + { 0x9a00, 0x33cb, 0x2000 }, + { 0x1a00, 0x33ca, 0x0000 }, + { 0x1a00, 0x33cc, 0x0000 }, + { 0x9a00, 0x33cf, 0x2000 }, + { 0x1a00, 0x33ce, 0x0000 }, + { 0x1a00, 0x33d0, 0x0000 }, + { 0x9a00, 0x33f1, 0x6000 }, + { 0x9a00, 0x33e1, 0x5000 }, + { 0x9a00, 0x33d9, 0x4000 }, + { 0x9a00, 0x33d5, 0x3000 }, + { 0x9a00, 0x33d3, 0x2000 }, + { 0x1a00, 0x33d2, 0x0000 }, + { 0x1a00, 0x33d4, 0x0000 }, + { 0x9a00, 0x33d7, 0x2000 }, + { 0x1a00, 0x33d6, 0x0000 }, + { 0x1a00, 0x33d8, 0x0000 }, + { 0x9a00, 0x33dd, 0x3000 }, + { 0x9a00, 0x33db, 0x2000 }, + { 0x1a00, 0x33da, 0x0000 }, + { 0x1a00, 0x33dc, 0x0000 }, + { 0x9a00, 0x33df, 0x2000 }, + { 0x1a00, 0x33de, 0x0000 }, + { 0x1a00, 0x33e0, 0x0000 }, + { 0x9a00, 0x33e9, 0x4000 }, + { 0x9a00, 0x33e5, 0x3000 }, + { 0x9a00, 0x33e3, 0x2000 }, + { 0x1a00, 0x33e2, 0x0000 }, + { 0x1a00, 0x33e4, 0x0000 }, + { 0x9a00, 0x33e7, 0x2000 }, + { 0x1a00, 0x33e6, 0x0000 }, + { 0x1a00, 0x33e8, 0x0000 }, + { 0x9a00, 0x33ed, 0x3000 }, + { 0x9a00, 0x33eb, 0x2000 }, + { 0x1a00, 0x33ea, 0x0000 }, + { 0x1a00, 0x33ec, 0x0000 }, + { 0x9a00, 0x33ef, 0x2000 }, + { 0x1a00, 0x33ee, 0x0000 }, + { 0x1a00, 0x33f0, 0x0000 }, + { 0x8700, 0x4db5, 0x5000 }, + { 0x9a00, 0x33f9, 0x4000 }, + { 0x9a00, 0x33f5, 0x3000 }, + { 0x9a00, 0x33f3, 0x2000 }, + { 0x1a00, 0x33f2, 0x0000 }, + { 0x1a00, 0x33f4, 0x0000 }, + { 0x9a00, 0x33f7, 0x2000 }, + { 0x1a00, 0x33f6, 0x0000 }, + { 0x1a00, 0x33f8, 0x0000 }, + { 0x9a00, 0x33fd, 0x3000 }, + { 0x9a00, 0x33fb, 0x2000 }, + { 0x1a00, 0x33fa, 0x0000 }, + { 0x1a00, 0x33fc, 0x0000 }, + { 0x9a00, 0x33ff, 0x2000 }, + { 0x1a00, 0x33fe, 0x0000 }, + { 0x0700, 0x3400, 0x0000 }, + { 0x9a00, 0x4dc7, 0x4000 }, + { 0x9a00, 0x4dc3, 0x3000 }, + { 0x9a00, 0x4dc1, 0x2000 }, + { 0x1a00, 0x4dc0, 0x0000 }, + { 0x1a00, 0x4dc2, 0x0000 }, + { 0x9a00, 0x4dc5, 0x2000 }, + { 0x1a00, 0x4dc4, 0x0000 }, + { 0x1a00, 0x4dc6, 0x0000 }, + { 0x9a00, 0x4dcb, 0x3000 }, + { 0x9a00, 0x4dc9, 0x2000 }, + { 0x1a00, 0x4dc8, 0x0000 }, + { 0x1a00, 0x4dca, 0x0000 }, + { 0x9a00, 0x4dcd, 0x2000 }, + { 0x1a00, 0x4dcc, 0x0000 }, + { 0x1a00, 0x4dce, 0x0000 }, + { 0x8700, 0xa00d, 0x7000 }, + { 0x9a00, 0x4def, 0x6000 }, + { 0x9a00, 0x4ddf, 0x5000 }, + { 0x9a00, 0x4dd7, 0x4000 }, + { 0x9a00, 0x4dd3, 0x3000 }, + { 0x9a00, 0x4dd1, 0x2000 }, + { 0x1a00, 0x4dd0, 0x0000 }, + { 0x1a00, 0x4dd2, 0x0000 }, + { 0x9a00, 0x4dd5, 0x2000 }, + { 0x1a00, 0x4dd4, 0x0000 }, + { 0x1a00, 0x4dd6, 0x0000 }, + { 0x9a00, 0x4ddb, 0x3000 }, + { 0x9a00, 0x4dd9, 0x2000 }, + { 0x1a00, 0x4dd8, 0x0000 }, + { 0x1a00, 0x4dda, 0x0000 }, + { 0x9a00, 0x4ddd, 0x2000 }, + { 0x1a00, 0x4ddc, 0x0000 }, + { 0x1a00, 0x4dde, 0x0000 }, + { 0x9a00, 0x4de7, 0x4000 }, + { 0x9a00, 0x4de3, 0x3000 }, + { 0x9a00, 0x4de1, 0x2000 }, + { 0x1a00, 0x4de0, 0x0000 }, + { 0x1a00, 0x4de2, 0x0000 }, + { 0x9a00, 0x4de5, 0x2000 }, + { 0x1a00, 0x4de4, 0x0000 }, + { 0x1a00, 0x4de6, 0x0000 }, + { 0x9a00, 0x4deb, 0x3000 }, + { 0x9a00, 0x4de9, 0x2000 }, + { 0x1a00, 0x4de8, 0x0000 }, + { 0x1a00, 0x4dea, 0x0000 }, + { 0x9a00, 0x4ded, 0x2000 }, + { 0x1a00, 0x4dec, 0x0000 }, + { 0x1a00, 0x4dee, 0x0000 }, + { 0x9a00, 0x4dff, 0x5000 }, + { 0x9a00, 0x4df7, 0x4000 }, + { 0x9a00, 0x4df3, 0x3000 }, + { 0x9a00, 0x4df1, 0x2000 }, + { 0x1a00, 0x4df0, 0x0000 }, + { 0x1a00, 0x4df2, 0x0000 }, + { 0x9a00, 0x4df5, 0x2000 }, + { 0x1a00, 0x4df4, 0x0000 }, + { 0x1a00, 0x4df6, 0x0000 }, + { 0x9a00, 0x4dfb, 0x3000 }, + { 0x9a00, 0x4df9, 0x2000 }, + { 0x1a00, 0x4df8, 0x0000 }, + { 0x1a00, 0x4dfa, 0x0000 }, + { 0x9a00, 0x4dfd, 0x2000 }, + { 0x1a00, 0x4dfc, 0x0000 }, + { 0x1a00, 0x4dfe, 0x0000 }, + { 0x8700, 0xa005, 0x4000 }, + { 0x8700, 0xa001, 0x3000 }, + { 0x8700, 0x9fa5, 0x2000 }, + { 0x0700, 0x4e00, 0x0000 }, + { 0x0700, 0xa000, 0x0000 }, + { 0x8700, 0xa003, 0x2000 }, + { 0x0700, 0xa002, 0x0000 }, + { 0x0700, 0xa004, 0x0000 }, + { 0x8700, 0xa009, 0x3000 }, + { 0x8700, 0xa007, 0x2000 }, + { 0x0700, 0xa006, 0x0000 }, + { 0x0700, 0xa008, 0x0000 }, + { 0x8700, 0xa00b, 0x2000 }, + { 0x0700, 0xa00a, 0x0000 }, + { 0x0700, 0xa00c, 0x0000 }, + { 0x8700, 0xa02d, 0x6000 }, + { 0x8700, 0xa01d, 0x5000 }, + { 0x8700, 0xa015, 0x4000 }, + { 0x8700, 0xa011, 0x3000 }, + { 0x8700, 0xa00f, 0x2000 }, + { 0x0700, 0xa00e, 0x0000 }, + { 0x0700, 0xa010, 0x0000 }, + { 0x8700, 0xa013, 0x2000 }, + { 0x0700, 0xa012, 0x0000 }, + { 0x0700, 0xa014, 0x0000 }, + { 0x8700, 0xa019, 0x3000 }, + { 0x8700, 0xa017, 0x2000 }, + { 0x0700, 0xa016, 0x0000 }, + { 0x0700, 0xa018, 0x0000 }, + { 0x8700, 0xa01b, 0x2000 }, + { 0x0700, 0xa01a, 0x0000 }, + { 0x0700, 0xa01c, 0x0000 }, + { 0x8700, 0xa025, 0x4000 }, + { 0x8700, 0xa021, 0x3000 }, + { 0x8700, 0xa01f, 0x2000 }, + { 0x0700, 0xa01e, 0x0000 }, + { 0x0700, 0xa020, 0x0000 }, + { 0x8700, 0xa023, 0x2000 }, + { 0x0700, 0xa022, 0x0000 }, + { 0x0700, 0xa024, 0x0000 }, + { 0x8700, 0xa029, 0x3000 }, + { 0x8700, 0xa027, 0x2000 }, + { 0x0700, 0xa026, 0x0000 }, + { 0x0700, 0xa028, 0x0000 }, + { 0x8700, 0xa02b, 0x2000 }, + { 0x0700, 0xa02a, 0x0000 }, + { 0x0700, 0xa02c, 0x0000 }, + { 0x8700, 0xa03d, 0x5000 }, + { 0x8700, 0xa035, 0x4000 }, + { 0x8700, 0xa031, 0x3000 }, + { 0x8700, 0xa02f, 0x2000 }, + { 0x0700, 0xa02e, 0x0000 }, + { 0x0700, 0xa030, 0x0000 }, + { 0x8700, 0xa033, 0x2000 }, + { 0x0700, 0xa032, 0x0000 }, + { 0x0700, 0xa034, 0x0000 }, + { 0x8700, 0xa039, 0x3000 }, + { 0x8700, 0xa037, 0x2000 }, + { 0x0700, 0xa036, 0x0000 }, + { 0x0700, 0xa038, 0x0000 }, + { 0x8700, 0xa03b, 0x2000 }, + { 0x0700, 0xa03a, 0x0000 }, + { 0x0700, 0xa03c, 0x0000 }, + { 0x8700, 0xa045, 0x4000 }, + { 0x8700, 0xa041, 0x3000 }, + { 0x8700, 0xa03f, 0x2000 }, + { 0x0700, 0xa03e, 0x0000 }, + { 0x0700, 0xa040, 0x0000 }, + { 0x8700, 0xa043, 0x2000 }, + { 0x0700, 0xa042, 0x0000 }, + { 0x0700, 0xa044, 0x0000 }, + { 0x8700, 0xa049, 0x3000 }, + { 0x8700, 0xa047, 0x2000 }, + { 0x0700, 0xa046, 0x0000 }, + { 0x0700, 0xa048, 0x0000 }, + { 0x8700, 0xa04b, 0x2000 }, + { 0x0700, 0xa04a, 0x0000 }, + { 0x0700, 0xa04c, 0x0000 }, + { 0x8700, 0xa0cd, 0x8000 }, + { 0x8700, 0xa08d, 0x7000 }, + { 0x8700, 0xa06d, 0x6000 }, + { 0x8700, 0xa05d, 0x5000 }, + { 0x8700, 0xa055, 0x4000 }, + { 0x8700, 0xa051, 0x3000 }, + { 0x8700, 0xa04f, 0x2000 }, + { 0x0700, 0xa04e, 0x0000 }, + { 0x0700, 0xa050, 0x0000 }, + { 0x8700, 0xa053, 0x2000 }, + { 0x0700, 0xa052, 0x0000 }, + { 0x0700, 0xa054, 0x0000 }, + { 0x8700, 0xa059, 0x3000 }, + { 0x8700, 0xa057, 0x2000 }, + { 0x0700, 0xa056, 0x0000 }, + { 0x0700, 0xa058, 0x0000 }, + { 0x8700, 0xa05b, 0x2000 }, + { 0x0700, 0xa05a, 0x0000 }, + { 0x0700, 0xa05c, 0x0000 }, + { 0x8700, 0xa065, 0x4000 }, + { 0x8700, 0xa061, 0x3000 }, + { 0x8700, 0xa05f, 0x2000 }, + { 0x0700, 0xa05e, 0x0000 }, + { 0x0700, 0xa060, 0x0000 }, + { 0x8700, 0xa063, 0x2000 }, + { 0x0700, 0xa062, 0x0000 }, + { 0x0700, 0xa064, 0x0000 }, + { 0x8700, 0xa069, 0x3000 }, + { 0x8700, 0xa067, 0x2000 }, + { 0x0700, 0xa066, 0x0000 }, + { 0x0700, 0xa068, 0x0000 }, + { 0x8700, 0xa06b, 0x2000 }, + { 0x0700, 0xa06a, 0x0000 }, + { 0x0700, 0xa06c, 0x0000 }, + { 0x8700, 0xa07d, 0x5000 }, + { 0x8700, 0xa075, 0x4000 }, + { 0x8700, 0xa071, 0x3000 }, + { 0x8700, 0xa06f, 0x2000 }, + { 0x0700, 0xa06e, 0x0000 }, + { 0x0700, 0xa070, 0x0000 }, + { 0x8700, 0xa073, 0x2000 }, + { 0x0700, 0xa072, 0x0000 }, + { 0x0700, 0xa074, 0x0000 }, + { 0x8700, 0xa079, 0x3000 }, + { 0x8700, 0xa077, 0x2000 }, + { 0x0700, 0xa076, 0x0000 }, + { 0x0700, 0xa078, 0x0000 }, + { 0x8700, 0xa07b, 0x2000 }, + { 0x0700, 0xa07a, 0x0000 }, + { 0x0700, 0xa07c, 0x0000 }, + { 0x8700, 0xa085, 0x4000 }, + { 0x8700, 0xa081, 0x3000 }, + { 0x8700, 0xa07f, 0x2000 }, + { 0x0700, 0xa07e, 0x0000 }, + { 0x0700, 0xa080, 0x0000 }, + { 0x8700, 0xa083, 0x2000 }, + { 0x0700, 0xa082, 0x0000 }, + { 0x0700, 0xa084, 0x0000 }, + { 0x8700, 0xa089, 0x3000 }, + { 0x8700, 0xa087, 0x2000 }, + { 0x0700, 0xa086, 0x0000 }, + { 0x0700, 0xa088, 0x0000 }, + { 0x8700, 0xa08b, 0x2000 }, + { 0x0700, 0xa08a, 0x0000 }, + { 0x0700, 0xa08c, 0x0000 }, + { 0x8700, 0xa0ad, 0x6000 }, + { 0x8700, 0xa09d, 0x5000 }, + { 0x8700, 0xa095, 0x4000 }, + { 0x8700, 0xa091, 0x3000 }, + { 0x8700, 0xa08f, 0x2000 }, + { 0x0700, 0xa08e, 0x0000 }, + { 0x0700, 0xa090, 0x0000 }, + { 0x8700, 0xa093, 0x2000 }, + { 0x0700, 0xa092, 0x0000 }, + { 0x0700, 0xa094, 0x0000 }, + { 0x8700, 0xa099, 0x3000 }, + { 0x8700, 0xa097, 0x2000 }, + { 0x0700, 0xa096, 0x0000 }, + { 0x0700, 0xa098, 0x0000 }, + { 0x8700, 0xa09b, 0x2000 }, + { 0x0700, 0xa09a, 0x0000 }, + { 0x0700, 0xa09c, 0x0000 }, + { 0x8700, 0xa0a5, 0x4000 }, + { 0x8700, 0xa0a1, 0x3000 }, + { 0x8700, 0xa09f, 0x2000 }, + { 0x0700, 0xa09e, 0x0000 }, + { 0x0700, 0xa0a0, 0x0000 }, + { 0x8700, 0xa0a3, 0x2000 }, + { 0x0700, 0xa0a2, 0x0000 }, + { 0x0700, 0xa0a4, 0x0000 }, + { 0x8700, 0xa0a9, 0x3000 }, + { 0x8700, 0xa0a7, 0x2000 }, + { 0x0700, 0xa0a6, 0x0000 }, + { 0x0700, 0xa0a8, 0x0000 }, + { 0x8700, 0xa0ab, 0x2000 }, + { 0x0700, 0xa0aa, 0x0000 }, + { 0x0700, 0xa0ac, 0x0000 }, + { 0x8700, 0xa0bd, 0x5000 }, + { 0x8700, 0xa0b5, 0x4000 }, + { 0x8700, 0xa0b1, 0x3000 }, + { 0x8700, 0xa0af, 0x2000 }, + { 0x0700, 0xa0ae, 0x0000 }, + { 0x0700, 0xa0b0, 0x0000 }, + { 0x8700, 0xa0b3, 0x2000 }, + { 0x0700, 0xa0b2, 0x0000 }, + { 0x0700, 0xa0b4, 0x0000 }, + { 0x8700, 0xa0b9, 0x3000 }, + { 0x8700, 0xa0b7, 0x2000 }, + { 0x0700, 0xa0b6, 0x0000 }, + { 0x0700, 0xa0b8, 0x0000 }, + { 0x8700, 0xa0bb, 0x2000 }, + { 0x0700, 0xa0ba, 0x0000 }, + { 0x0700, 0xa0bc, 0x0000 }, + { 0x8700, 0xa0c5, 0x4000 }, + { 0x8700, 0xa0c1, 0x3000 }, + { 0x8700, 0xa0bf, 0x2000 }, + { 0x0700, 0xa0be, 0x0000 }, + { 0x0700, 0xa0c0, 0x0000 }, + { 0x8700, 0xa0c3, 0x2000 }, + { 0x0700, 0xa0c2, 0x0000 }, + { 0x0700, 0xa0c4, 0x0000 }, + { 0x8700, 0xa0c9, 0x3000 }, + { 0x8700, 0xa0c7, 0x2000 }, + { 0x0700, 0xa0c6, 0x0000 }, + { 0x0700, 0xa0c8, 0x0000 }, + { 0x8700, 0xa0cb, 0x2000 }, + { 0x0700, 0xa0ca, 0x0000 }, + { 0x0700, 0xa0cc, 0x0000 }, + { 0x8700, 0xa10d, 0x7000 }, + { 0x8700, 0xa0ed, 0x6000 }, + { 0x8700, 0xa0dd, 0x5000 }, + { 0x8700, 0xa0d5, 0x4000 }, + { 0x8700, 0xa0d1, 0x3000 }, + { 0x8700, 0xa0cf, 0x2000 }, + { 0x0700, 0xa0ce, 0x0000 }, + { 0x0700, 0xa0d0, 0x0000 }, + { 0x8700, 0xa0d3, 0x2000 }, + { 0x0700, 0xa0d2, 0x0000 }, + { 0x0700, 0xa0d4, 0x0000 }, + { 0x8700, 0xa0d9, 0x3000 }, + { 0x8700, 0xa0d7, 0x2000 }, + { 0x0700, 0xa0d6, 0x0000 }, + { 0x0700, 0xa0d8, 0x0000 }, + { 0x8700, 0xa0db, 0x2000 }, + { 0x0700, 0xa0da, 0x0000 }, + { 0x0700, 0xa0dc, 0x0000 }, + { 0x8700, 0xa0e5, 0x4000 }, + { 0x8700, 0xa0e1, 0x3000 }, + { 0x8700, 0xa0df, 0x2000 }, + { 0x0700, 0xa0de, 0x0000 }, + { 0x0700, 0xa0e0, 0x0000 }, + { 0x8700, 0xa0e3, 0x2000 }, + { 0x0700, 0xa0e2, 0x0000 }, + { 0x0700, 0xa0e4, 0x0000 }, + { 0x8700, 0xa0e9, 0x3000 }, + { 0x8700, 0xa0e7, 0x2000 }, + { 0x0700, 0xa0e6, 0x0000 }, + { 0x0700, 0xa0e8, 0x0000 }, + { 0x8700, 0xa0eb, 0x2000 }, + { 0x0700, 0xa0ea, 0x0000 }, + { 0x0700, 0xa0ec, 0x0000 }, + { 0x8700, 0xa0fd, 0x5000 }, + { 0x8700, 0xa0f5, 0x4000 }, + { 0x8700, 0xa0f1, 0x3000 }, + { 0x8700, 0xa0ef, 0x2000 }, + { 0x0700, 0xa0ee, 0x0000 }, + { 0x0700, 0xa0f0, 0x0000 }, + { 0x8700, 0xa0f3, 0x2000 }, + { 0x0700, 0xa0f2, 0x0000 }, + { 0x0700, 0xa0f4, 0x0000 }, + { 0x8700, 0xa0f9, 0x3000 }, + { 0x8700, 0xa0f7, 0x2000 }, + { 0x0700, 0xa0f6, 0x0000 }, + { 0x0700, 0xa0f8, 0x0000 }, + { 0x8700, 0xa0fb, 0x2000 }, + { 0x0700, 0xa0fa, 0x0000 }, + { 0x0700, 0xa0fc, 0x0000 }, + { 0x8700, 0xa105, 0x4000 }, + { 0x8700, 0xa101, 0x3000 }, + { 0x8700, 0xa0ff, 0x2000 }, + { 0x0700, 0xa0fe, 0x0000 }, + { 0x0700, 0xa100, 0x0000 }, + { 0x8700, 0xa103, 0x2000 }, + { 0x0700, 0xa102, 0x0000 }, + { 0x0700, 0xa104, 0x0000 }, + { 0x8700, 0xa109, 0x3000 }, + { 0x8700, 0xa107, 0x2000 }, + { 0x0700, 0xa106, 0x0000 }, + { 0x0700, 0xa108, 0x0000 }, + { 0x8700, 0xa10b, 0x2000 }, + { 0x0700, 0xa10a, 0x0000 }, + { 0x0700, 0xa10c, 0x0000 }, + { 0x8700, 0xa12d, 0x6000 }, + { 0x8700, 0xa11d, 0x5000 }, + { 0x8700, 0xa115, 0x4000 }, + { 0x8700, 0xa111, 0x3000 }, + { 0x8700, 0xa10f, 0x2000 }, + { 0x0700, 0xa10e, 0x0000 }, + { 0x0700, 0xa110, 0x0000 }, + { 0x8700, 0xa113, 0x2000 }, + { 0x0700, 0xa112, 0x0000 }, + { 0x0700, 0xa114, 0x0000 }, + { 0x8700, 0xa119, 0x3000 }, + { 0x8700, 0xa117, 0x2000 }, + { 0x0700, 0xa116, 0x0000 }, + { 0x0700, 0xa118, 0x0000 }, + { 0x8700, 0xa11b, 0x2000 }, + { 0x0700, 0xa11a, 0x0000 }, + { 0x0700, 0xa11c, 0x0000 }, + { 0x8700, 0xa125, 0x4000 }, + { 0x8700, 0xa121, 0x3000 }, + { 0x8700, 0xa11f, 0x2000 }, + { 0x0700, 0xa11e, 0x0000 }, + { 0x0700, 0xa120, 0x0000 }, + { 0x8700, 0xa123, 0x2000 }, + { 0x0700, 0xa122, 0x0000 }, + { 0x0700, 0xa124, 0x0000 }, + { 0x8700, 0xa129, 0x3000 }, + { 0x8700, 0xa127, 0x2000 }, + { 0x0700, 0xa126, 0x0000 }, + { 0x0700, 0xa128, 0x0000 }, + { 0x8700, 0xa12b, 0x2000 }, + { 0x0700, 0xa12a, 0x0000 }, + { 0x0700, 0xa12c, 0x0000 }, + { 0x8700, 0xa13d, 0x5000 }, + { 0x8700, 0xa135, 0x4000 }, + { 0x8700, 0xa131, 0x3000 }, + { 0x8700, 0xa12f, 0x2000 }, + { 0x0700, 0xa12e, 0x0000 }, + { 0x0700, 0xa130, 0x0000 }, + { 0x8700, 0xa133, 0x2000 }, + { 0x0700, 0xa132, 0x0000 }, + { 0x0700, 0xa134, 0x0000 }, + { 0x8700, 0xa139, 0x3000 }, + { 0x8700, 0xa137, 0x2000 }, + { 0x0700, 0xa136, 0x0000 }, + { 0x0700, 0xa138, 0x0000 }, + { 0x8700, 0xa13b, 0x2000 }, + { 0x0700, 0xa13a, 0x0000 }, + { 0x0700, 0xa13c, 0x0000 }, + { 0x8700, 0xa145, 0x4000 }, + { 0x8700, 0xa141, 0x3000 }, + { 0x8700, 0xa13f, 0x2000 }, + { 0x0700, 0xa13e, 0x0000 }, + { 0x0700, 0xa140, 0x0000 }, + { 0x8700, 0xa143, 0x2000 }, + { 0x0700, 0xa142, 0x0000 }, + { 0x0700, 0xa144, 0x0000 }, + { 0x8700, 0xa149, 0x3000 }, + { 0x8700, 0xa147, 0x2000 }, + { 0x0700, 0xa146, 0x0000 }, + { 0x0700, 0xa148, 0x0000 }, + { 0x8700, 0xa14b, 0x2000 }, + { 0x0700, 0xa14a, 0x0000 }, + { 0x0700, 0xa14c, 0x0000 }, + { 0x8700, 0xa24d, 0x9000 }, + { 0x8700, 0xa1cd, 0x8000 }, + { 0x8700, 0xa18d, 0x7000 }, + { 0x8700, 0xa16d, 0x6000 }, + { 0x8700, 0xa15d, 0x5000 }, + { 0x8700, 0xa155, 0x4000 }, + { 0x8700, 0xa151, 0x3000 }, + { 0x8700, 0xa14f, 0x2000 }, + { 0x0700, 0xa14e, 0x0000 }, + { 0x0700, 0xa150, 0x0000 }, + { 0x8700, 0xa153, 0x2000 }, + { 0x0700, 0xa152, 0x0000 }, + { 0x0700, 0xa154, 0x0000 }, + { 0x8700, 0xa159, 0x3000 }, + { 0x8700, 0xa157, 0x2000 }, + { 0x0700, 0xa156, 0x0000 }, + { 0x0700, 0xa158, 0x0000 }, + { 0x8700, 0xa15b, 0x2000 }, + { 0x0700, 0xa15a, 0x0000 }, + { 0x0700, 0xa15c, 0x0000 }, + { 0x8700, 0xa165, 0x4000 }, + { 0x8700, 0xa161, 0x3000 }, + { 0x8700, 0xa15f, 0x2000 }, + { 0x0700, 0xa15e, 0x0000 }, + { 0x0700, 0xa160, 0x0000 }, + { 0x8700, 0xa163, 0x2000 }, + { 0x0700, 0xa162, 0x0000 }, + { 0x0700, 0xa164, 0x0000 }, + { 0x8700, 0xa169, 0x3000 }, + { 0x8700, 0xa167, 0x2000 }, + { 0x0700, 0xa166, 0x0000 }, + { 0x0700, 0xa168, 0x0000 }, + { 0x8700, 0xa16b, 0x2000 }, + { 0x0700, 0xa16a, 0x0000 }, + { 0x0700, 0xa16c, 0x0000 }, + { 0x8700, 0xa17d, 0x5000 }, + { 0x8700, 0xa175, 0x4000 }, + { 0x8700, 0xa171, 0x3000 }, + { 0x8700, 0xa16f, 0x2000 }, + { 0x0700, 0xa16e, 0x0000 }, + { 0x0700, 0xa170, 0x0000 }, + { 0x8700, 0xa173, 0x2000 }, + { 0x0700, 0xa172, 0x0000 }, + { 0x0700, 0xa174, 0x0000 }, + { 0x8700, 0xa179, 0x3000 }, + { 0x8700, 0xa177, 0x2000 }, + { 0x0700, 0xa176, 0x0000 }, + { 0x0700, 0xa178, 0x0000 }, + { 0x8700, 0xa17b, 0x2000 }, + { 0x0700, 0xa17a, 0x0000 }, + { 0x0700, 0xa17c, 0x0000 }, + { 0x8700, 0xa185, 0x4000 }, + { 0x8700, 0xa181, 0x3000 }, + { 0x8700, 0xa17f, 0x2000 }, + { 0x0700, 0xa17e, 0x0000 }, + { 0x0700, 0xa180, 0x0000 }, + { 0x8700, 0xa183, 0x2000 }, + { 0x0700, 0xa182, 0x0000 }, + { 0x0700, 0xa184, 0x0000 }, + { 0x8700, 0xa189, 0x3000 }, + { 0x8700, 0xa187, 0x2000 }, + { 0x0700, 0xa186, 0x0000 }, + { 0x0700, 0xa188, 0x0000 }, + { 0x8700, 0xa18b, 0x2000 }, + { 0x0700, 0xa18a, 0x0000 }, + { 0x0700, 0xa18c, 0x0000 }, + { 0x8700, 0xa1ad, 0x6000 }, + { 0x8700, 0xa19d, 0x5000 }, + { 0x8700, 0xa195, 0x4000 }, + { 0x8700, 0xa191, 0x3000 }, + { 0x8700, 0xa18f, 0x2000 }, + { 0x0700, 0xa18e, 0x0000 }, + { 0x0700, 0xa190, 0x0000 }, + { 0x8700, 0xa193, 0x2000 }, + { 0x0700, 0xa192, 0x0000 }, + { 0x0700, 0xa194, 0x0000 }, + { 0x8700, 0xa199, 0x3000 }, + { 0x8700, 0xa197, 0x2000 }, + { 0x0700, 0xa196, 0x0000 }, + { 0x0700, 0xa198, 0x0000 }, + { 0x8700, 0xa19b, 0x2000 }, + { 0x0700, 0xa19a, 0x0000 }, + { 0x0700, 0xa19c, 0x0000 }, + { 0x8700, 0xa1a5, 0x4000 }, + { 0x8700, 0xa1a1, 0x3000 }, + { 0x8700, 0xa19f, 0x2000 }, + { 0x0700, 0xa19e, 0x0000 }, + { 0x0700, 0xa1a0, 0x0000 }, + { 0x8700, 0xa1a3, 0x2000 }, + { 0x0700, 0xa1a2, 0x0000 }, + { 0x0700, 0xa1a4, 0x0000 }, + { 0x8700, 0xa1a9, 0x3000 }, + { 0x8700, 0xa1a7, 0x2000 }, + { 0x0700, 0xa1a6, 0x0000 }, + { 0x0700, 0xa1a8, 0x0000 }, + { 0x8700, 0xa1ab, 0x2000 }, + { 0x0700, 0xa1aa, 0x0000 }, + { 0x0700, 0xa1ac, 0x0000 }, + { 0x8700, 0xa1bd, 0x5000 }, + { 0x8700, 0xa1b5, 0x4000 }, + { 0x8700, 0xa1b1, 0x3000 }, + { 0x8700, 0xa1af, 0x2000 }, + { 0x0700, 0xa1ae, 0x0000 }, + { 0x0700, 0xa1b0, 0x0000 }, + { 0x8700, 0xa1b3, 0x2000 }, + { 0x0700, 0xa1b2, 0x0000 }, + { 0x0700, 0xa1b4, 0x0000 }, + { 0x8700, 0xa1b9, 0x3000 }, + { 0x8700, 0xa1b7, 0x2000 }, + { 0x0700, 0xa1b6, 0x0000 }, + { 0x0700, 0xa1b8, 0x0000 }, + { 0x8700, 0xa1bb, 0x2000 }, + { 0x0700, 0xa1ba, 0x0000 }, + { 0x0700, 0xa1bc, 0x0000 }, + { 0x8700, 0xa1c5, 0x4000 }, + { 0x8700, 0xa1c1, 0x3000 }, + { 0x8700, 0xa1bf, 0x2000 }, + { 0x0700, 0xa1be, 0x0000 }, + { 0x0700, 0xa1c0, 0x0000 }, + { 0x8700, 0xa1c3, 0x2000 }, + { 0x0700, 0xa1c2, 0x0000 }, + { 0x0700, 0xa1c4, 0x0000 }, + { 0x8700, 0xa1c9, 0x3000 }, + { 0x8700, 0xa1c7, 0x2000 }, + { 0x0700, 0xa1c6, 0x0000 }, + { 0x0700, 0xa1c8, 0x0000 }, + { 0x8700, 0xa1cb, 0x2000 }, + { 0x0700, 0xa1ca, 0x0000 }, + { 0x0700, 0xa1cc, 0x0000 }, + { 0x8700, 0xa20d, 0x7000 }, + { 0x8700, 0xa1ed, 0x6000 }, + { 0x8700, 0xa1dd, 0x5000 }, + { 0x8700, 0xa1d5, 0x4000 }, + { 0x8700, 0xa1d1, 0x3000 }, + { 0x8700, 0xa1cf, 0x2000 }, + { 0x0700, 0xa1ce, 0x0000 }, + { 0x0700, 0xa1d0, 0x0000 }, + { 0x8700, 0xa1d3, 0x2000 }, + { 0x0700, 0xa1d2, 0x0000 }, + { 0x0700, 0xa1d4, 0x0000 }, + { 0x8700, 0xa1d9, 0x3000 }, + { 0x8700, 0xa1d7, 0x2000 }, + { 0x0700, 0xa1d6, 0x0000 }, + { 0x0700, 0xa1d8, 0x0000 }, + { 0x8700, 0xa1db, 0x2000 }, + { 0x0700, 0xa1da, 0x0000 }, + { 0x0700, 0xa1dc, 0x0000 }, + { 0x8700, 0xa1e5, 0x4000 }, + { 0x8700, 0xa1e1, 0x3000 }, + { 0x8700, 0xa1df, 0x2000 }, + { 0x0700, 0xa1de, 0x0000 }, + { 0x0700, 0xa1e0, 0x0000 }, + { 0x8700, 0xa1e3, 0x2000 }, + { 0x0700, 0xa1e2, 0x0000 }, + { 0x0700, 0xa1e4, 0x0000 }, + { 0x8700, 0xa1e9, 0x3000 }, + { 0x8700, 0xa1e7, 0x2000 }, + { 0x0700, 0xa1e6, 0x0000 }, + { 0x0700, 0xa1e8, 0x0000 }, + { 0x8700, 0xa1eb, 0x2000 }, + { 0x0700, 0xa1ea, 0x0000 }, + { 0x0700, 0xa1ec, 0x0000 }, + { 0x8700, 0xa1fd, 0x5000 }, + { 0x8700, 0xa1f5, 0x4000 }, + { 0x8700, 0xa1f1, 0x3000 }, + { 0x8700, 0xa1ef, 0x2000 }, + { 0x0700, 0xa1ee, 0x0000 }, + { 0x0700, 0xa1f0, 0x0000 }, + { 0x8700, 0xa1f3, 0x2000 }, + { 0x0700, 0xa1f2, 0x0000 }, + { 0x0700, 0xa1f4, 0x0000 }, + { 0x8700, 0xa1f9, 0x3000 }, + { 0x8700, 0xa1f7, 0x2000 }, + { 0x0700, 0xa1f6, 0x0000 }, + { 0x0700, 0xa1f8, 0x0000 }, + { 0x8700, 0xa1fb, 0x2000 }, + { 0x0700, 0xa1fa, 0x0000 }, + { 0x0700, 0xa1fc, 0x0000 }, + { 0x8700, 0xa205, 0x4000 }, + { 0x8700, 0xa201, 0x3000 }, + { 0x8700, 0xa1ff, 0x2000 }, + { 0x0700, 0xa1fe, 0x0000 }, + { 0x0700, 0xa200, 0x0000 }, + { 0x8700, 0xa203, 0x2000 }, + { 0x0700, 0xa202, 0x0000 }, + { 0x0700, 0xa204, 0x0000 }, + { 0x8700, 0xa209, 0x3000 }, + { 0x8700, 0xa207, 0x2000 }, + { 0x0700, 0xa206, 0x0000 }, + { 0x0700, 0xa208, 0x0000 }, + { 0x8700, 0xa20b, 0x2000 }, + { 0x0700, 0xa20a, 0x0000 }, + { 0x0700, 0xa20c, 0x0000 }, + { 0x8700, 0xa22d, 0x6000 }, + { 0x8700, 0xa21d, 0x5000 }, + { 0x8700, 0xa215, 0x4000 }, + { 0x8700, 0xa211, 0x3000 }, + { 0x8700, 0xa20f, 0x2000 }, + { 0x0700, 0xa20e, 0x0000 }, + { 0x0700, 0xa210, 0x0000 }, + { 0x8700, 0xa213, 0x2000 }, + { 0x0700, 0xa212, 0x0000 }, + { 0x0700, 0xa214, 0x0000 }, + { 0x8700, 0xa219, 0x3000 }, + { 0x8700, 0xa217, 0x2000 }, + { 0x0700, 0xa216, 0x0000 }, + { 0x0700, 0xa218, 0x0000 }, + { 0x8700, 0xa21b, 0x2000 }, + { 0x0700, 0xa21a, 0x0000 }, + { 0x0700, 0xa21c, 0x0000 }, + { 0x8700, 0xa225, 0x4000 }, + { 0x8700, 0xa221, 0x3000 }, + { 0x8700, 0xa21f, 0x2000 }, + { 0x0700, 0xa21e, 0x0000 }, + { 0x0700, 0xa220, 0x0000 }, + { 0x8700, 0xa223, 0x2000 }, + { 0x0700, 0xa222, 0x0000 }, + { 0x0700, 0xa224, 0x0000 }, + { 0x8700, 0xa229, 0x3000 }, + { 0x8700, 0xa227, 0x2000 }, + { 0x0700, 0xa226, 0x0000 }, + { 0x0700, 0xa228, 0x0000 }, + { 0x8700, 0xa22b, 0x2000 }, + { 0x0700, 0xa22a, 0x0000 }, + { 0x0700, 0xa22c, 0x0000 }, + { 0x8700, 0xa23d, 0x5000 }, + { 0x8700, 0xa235, 0x4000 }, + { 0x8700, 0xa231, 0x3000 }, + { 0x8700, 0xa22f, 0x2000 }, + { 0x0700, 0xa22e, 0x0000 }, + { 0x0700, 0xa230, 0x0000 }, + { 0x8700, 0xa233, 0x2000 }, + { 0x0700, 0xa232, 0x0000 }, + { 0x0700, 0xa234, 0x0000 }, + { 0x8700, 0xa239, 0x3000 }, + { 0x8700, 0xa237, 0x2000 }, + { 0x0700, 0xa236, 0x0000 }, + { 0x0700, 0xa238, 0x0000 }, + { 0x8700, 0xa23b, 0x2000 }, + { 0x0700, 0xa23a, 0x0000 }, + { 0x0700, 0xa23c, 0x0000 }, + { 0x8700, 0xa245, 0x4000 }, + { 0x8700, 0xa241, 0x3000 }, + { 0x8700, 0xa23f, 0x2000 }, + { 0x0700, 0xa23e, 0x0000 }, + { 0x0700, 0xa240, 0x0000 }, + { 0x8700, 0xa243, 0x2000 }, + { 0x0700, 0xa242, 0x0000 }, + { 0x0700, 0xa244, 0x0000 }, + { 0x8700, 0xa249, 0x3000 }, + { 0x8700, 0xa247, 0x2000 }, + { 0x0700, 0xa246, 0x0000 }, + { 0x0700, 0xa248, 0x0000 }, + { 0x8700, 0xa24b, 0x2000 }, + { 0x0700, 0xa24a, 0x0000 }, + { 0x0700, 0xa24c, 0x0000 }, + { 0x8700, 0xa2cd, 0x8000 }, + { 0x8700, 0xa28d, 0x7000 }, + { 0x8700, 0xa26d, 0x6000 }, + { 0x8700, 0xa25d, 0x5000 }, + { 0x8700, 0xa255, 0x4000 }, + { 0x8700, 0xa251, 0x3000 }, + { 0x8700, 0xa24f, 0x2000 }, + { 0x0700, 0xa24e, 0x0000 }, + { 0x0700, 0xa250, 0x0000 }, + { 0x8700, 0xa253, 0x2000 }, + { 0x0700, 0xa252, 0x0000 }, + { 0x0700, 0xa254, 0x0000 }, + { 0x8700, 0xa259, 0x3000 }, + { 0x8700, 0xa257, 0x2000 }, + { 0x0700, 0xa256, 0x0000 }, + { 0x0700, 0xa258, 0x0000 }, + { 0x8700, 0xa25b, 0x2000 }, + { 0x0700, 0xa25a, 0x0000 }, + { 0x0700, 0xa25c, 0x0000 }, + { 0x8700, 0xa265, 0x4000 }, + { 0x8700, 0xa261, 0x3000 }, + { 0x8700, 0xa25f, 0x2000 }, + { 0x0700, 0xa25e, 0x0000 }, + { 0x0700, 0xa260, 0x0000 }, + { 0x8700, 0xa263, 0x2000 }, + { 0x0700, 0xa262, 0x0000 }, + { 0x0700, 0xa264, 0x0000 }, + { 0x8700, 0xa269, 0x3000 }, + { 0x8700, 0xa267, 0x2000 }, + { 0x0700, 0xa266, 0x0000 }, + { 0x0700, 0xa268, 0x0000 }, + { 0x8700, 0xa26b, 0x2000 }, + { 0x0700, 0xa26a, 0x0000 }, + { 0x0700, 0xa26c, 0x0000 }, + { 0x8700, 0xa27d, 0x5000 }, + { 0x8700, 0xa275, 0x4000 }, + { 0x8700, 0xa271, 0x3000 }, + { 0x8700, 0xa26f, 0x2000 }, + { 0x0700, 0xa26e, 0x0000 }, + { 0x0700, 0xa270, 0x0000 }, + { 0x8700, 0xa273, 0x2000 }, + { 0x0700, 0xa272, 0x0000 }, + { 0x0700, 0xa274, 0x0000 }, + { 0x8700, 0xa279, 0x3000 }, + { 0x8700, 0xa277, 0x2000 }, + { 0x0700, 0xa276, 0x0000 }, + { 0x0700, 0xa278, 0x0000 }, + { 0x8700, 0xa27b, 0x2000 }, + { 0x0700, 0xa27a, 0x0000 }, + { 0x0700, 0xa27c, 0x0000 }, + { 0x8700, 0xa285, 0x4000 }, + { 0x8700, 0xa281, 0x3000 }, + { 0x8700, 0xa27f, 0x2000 }, + { 0x0700, 0xa27e, 0x0000 }, + { 0x0700, 0xa280, 0x0000 }, + { 0x8700, 0xa283, 0x2000 }, + { 0x0700, 0xa282, 0x0000 }, + { 0x0700, 0xa284, 0x0000 }, + { 0x8700, 0xa289, 0x3000 }, + { 0x8700, 0xa287, 0x2000 }, + { 0x0700, 0xa286, 0x0000 }, + { 0x0700, 0xa288, 0x0000 }, + { 0x8700, 0xa28b, 0x2000 }, + { 0x0700, 0xa28a, 0x0000 }, + { 0x0700, 0xa28c, 0x0000 }, + { 0x8700, 0xa2ad, 0x6000 }, + { 0x8700, 0xa29d, 0x5000 }, + { 0x8700, 0xa295, 0x4000 }, + { 0x8700, 0xa291, 0x3000 }, + { 0x8700, 0xa28f, 0x2000 }, + { 0x0700, 0xa28e, 0x0000 }, + { 0x0700, 0xa290, 0x0000 }, + { 0x8700, 0xa293, 0x2000 }, + { 0x0700, 0xa292, 0x0000 }, + { 0x0700, 0xa294, 0x0000 }, + { 0x8700, 0xa299, 0x3000 }, + { 0x8700, 0xa297, 0x2000 }, + { 0x0700, 0xa296, 0x0000 }, + { 0x0700, 0xa298, 0x0000 }, + { 0x8700, 0xa29b, 0x2000 }, + { 0x0700, 0xa29a, 0x0000 }, + { 0x0700, 0xa29c, 0x0000 }, + { 0x8700, 0xa2a5, 0x4000 }, + { 0x8700, 0xa2a1, 0x3000 }, + { 0x8700, 0xa29f, 0x2000 }, + { 0x0700, 0xa29e, 0x0000 }, + { 0x0700, 0xa2a0, 0x0000 }, + { 0x8700, 0xa2a3, 0x2000 }, + { 0x0700, 0xa2a2, 0x0000 }, + { 0x0700, 0xa2a4, 0x0000 }, + { 0x8700, 0xa2a9, 0x3000 }, + { 0x8700, 0xa2a7, 0x2000 }, + { 0x0700, 0xa2a6, 0x0000 }, + { 0x0700, 0xa2a8, 0x0000 }, + { 0x8700, 0xa2ab, 0x2000 }, + { 0x0700, 0xa2aa, 0x0000 }, + { 0x0700, 0xa2ac, 0x0000 }, + { 0x8700, 0xa2bd, 0x5000 }, + { 0x8700, 0xa2b5, 0x4000 }, + { 0x8700, 0xa2b1, 0x3000 }, + { 0x8700, 0xa2af, 0x2000 }, + { 0x0700, 0xa2ae, 0x0000 }, + { 0x0700, 0xa2b0, 0x0000 }, + { 0x8700, 0xa2b3, 0x2000 }, + { 0x0700, 0xa2b2, 0x0000 }, + { 0x0700, 0xa2b4, 0x0000 }, + { 0x8700, 0xa2b9, 0x3000 }, + { 0x8700, 0xa2b7, 0x2000 }, + { 0x0700, 0xa2b6, 0x0000 }, + { 0x0700, 0xa2b8, 0x0000 }, + { 0x8700, 0xa2bb, 0x2000 }, + { 0x0700, 0xa2ba, 0x0000 }, + { 0x0700, 0xa2bc, 0x0000 }, + { 0x8700, 0xa2c5, 0x4000 }, + { 0x8700, 0xa2c1, 0x3000 }, + { 0x8700, 0xa2bf, 0x2000 }, + { 0x0700, 0xa2be, 0x0000 }, + { 0x0700, 0xa2c0, 0x0000 }, + { 0x8700, 0xa2c3, 0x2000 }, + { 0x0700, 0xa2c2, 0x0000 }, + { 0x0700, 0xa2c4, 0x0000 }, + { 0x8700, 0xa2c9, 0x3000 }, + { 0x8700, 0xa2c7, 0x2000 }, + { 0x0700, 0xa2c6, 0x0000 }, + { 0x0700, 0xa2c8, 0x0000 }, + { 0x8700, 0xa2cb, 0x2000 }, + { 0x0700, 0xa2ca, 0x0000 }, + { 0x0700, 0xa2cc, 0x0000 }, + { 0x8700, 0xa30d, 0x7000 }, + { 0x8700, 0xa2ed, 0x6000 }, + { 0x8700, 0xa2dd, 0x5000 }, + { 0x8700, 0xa2d5, 0x4000 }, + { 0x8700, 0xa2d1, 0x3000 }, + { 0x8700, 0xa2cf, 0x2000 }, + { 0x0700, 0xa2ce, 0x0000 }, + { 0x0700, 0xa2d0, 0x0000 }, + { 0x8700, 0xa2d3, 0x2000 }, + { 0x0700, 0xa2d2, 0x0000 }, + { 0x0700, 0xa2d4, 0x0000 }, + { 0x8700, 0xa2d9, 0x3000 }, + { 0x8700, 0xa2d7, 0x2000 }, + { 0x0700, 0xa2d6, 0x0000 }, + { 0x0700, 0xa2d8, 0x0000 }, + { 0x8700, 0xa2db, 0x2000 }, + { 0x0700, 0xa2da, 0x0000 }, + { 0x0700, 0xa2dc, 0x0000 }, + { 0x8700, 0xa2e5, 0x4000 }, + { 0x8700, 0xa2e1, 0x3000 }, + { 0x8700, 0xa2df, 0x2000 }, + { 0x0700, 0xa2de, 0x0000 }, + { 0x0700, 0xa2e0, 0x0000 }, + { 0x8700, 0xa2e3, 0x2000 }, + { 0x0700, 0xa2e2, 0x0000 }, + { 0x0700, 0xa2e4, 0x0000 }, + { 0x8700, 0xa2e9, 0x3000 }, + { 0x8700, 0xa2e7, 0x2000 }, + { 0x0700, 0xa2e6, 0x0000 }, + { 0x0700, 0xa2e8, 0x0000 }, + { 0x8700, 0xa2eb, 0x2000 }, + { 0x0700, 0xa2ea, 0x0000 }, + { 0x0700, 0xa2ec, 0x0000 }, + { 0x8700, 0xa2fd, 0x5000 }, + { 0x8700, 0xa2f5, 0x4000 }, + { 0x8700, 0xa2f1, 0x3000 }, + { 0x8700, 0xa2ef, 0x2000 }, + { 0x0700, 0xa2ee, 0x0000 }, + { 0x0700, 0xa2f0, 0x0000 }, + { 0x8700, 0xa2f3, 0x2000 }, + { 0x0700, 0xa2f2, 0x0000 }, + { 0x0700, 0xa2f4, 0x0000 }, + { 0x8700, 0xa2f9, 0x3000 }, + { 0x8700, 0xa2f7, 0x2000 }, + { 0x0700, 0xa2f6, 0x0000 }, + { 0x0700, 0xa2f8, 0x0000 }, + { 0x8700, 0xa2fb, 0x2000 }, + { 0x0700, 0xa2fa, 0x0000 }, + { 0x0700, 0xa2fc, 0x0000 }, + { 0x8700, 0xa305, 0x4000 }, + { 0x8700, 0xa301, 0x3000 }, + { 0x8700, 0xa2ff, 0x2000 }, + { 0x0700, 0xa2fe, 0x0000 }, + { 0x0700, 0xa300, 0x0000 }, + { 0x8700, 0xa303, 0x2000 }, + { 0x0700, 0xa302, 0x0000 }, + { 0x0700, 0xa304, 0x0000 }, + { 0x8700, 0xa309, 0x3000 }, + { 0x8700, 0xa307, 0x2000 }, + { 0x0700, 0xa306, 0x0000 }, + { 0x0700, 0xa308, 0x0000 }, + { 0x8700, 0xa30b, 0x2000 }, + { 0x0700, 0xa30a, 0x0000 }, + { 0x0700, 0xa30c, 0x0000 }, + { 0x8700, 0xa32d, 0x6000 }, + { 0x8700, 0xa31d, 0x5000 }, + { 0x8700, 0xa315, 0x4000 }, + { 0x8700, 0xa311, 0x3000 }, + { 0x8700, 0xa30f, 0x2000 }, + { 0x0700, 0xa30e, 0x0000 }, + { 0x0700, 0xa310, 0x0000 }, + { 0x8700, 0xa313, 0x2000 }, + { 0x0700, 0xa312, 0x0000 }, + { 0x0700, 0xa314, 0x0000 }, + { 0x8700, 0xa319, 0x3000 }, + { 0x8700, 0xa317, 0x2000 }, + { 0x0700, 0xa316, 0x0000 }, + { 0x0700, 0xa318, 0x0000 }, + { 0x8700, 0xa31b, 0x2000 }, + { 0x0700, 0xa31a, 0x0000 }, + { 0x0700, 0xa31c, 0x0000 }, + { 0x8700, 0xa325, 0x4000 }, + { 0x8700, 0xa321, 0x3000 }, + { 0x8700, 0xa31f, 0x2000 }, + { 0x0700, 0xa31e, 0x0000 }, + { 0x0700, 0xa320, 0x0000 }, + { 0x8700, 0xa323, 0x2000 }, + { 0x0700, 0xa322, 0x0000 }, + { 0x0700, 0xa324, 0x0000 }, + { 0x8700, 0xa329, 0x3000 }, + { 0x8700, 0xa327, 0x2000 }, + { 0x0700, 0xa326, 0x0000 }, + { 0x0700, 0xa328, 0x0000 }, + { 0x8700, 0xa32b, 0x2000 }, + { 0x0700, 0xa32a, 0x0000 }, + { 0x0700, 0xa32c, 0x0000 }, + { 0x8700, 0xa33d, 0x5000 }, + { 0x8700, 0xa335, 0x4000 }, + { 0x8700, 0xa331, 0x3000 }, + { 0x8700, 0xa32f, 0x2000 }, + { 0x0700, 0xa32e, 0x0000 }, + { 0x0700, 0xa330, 0x0000 }, + { 0x8700, 0xa333, 0x2000 }, + { 0x0700, 0xa332, 0x0000 }, + { 0x0700, 0xa334, 0x0000 }, + { 0x8700, 0xa339, 0x3000 }, + { 0x8700, 0xa337, 0x2000 }, + { 0x0700, 0xa336, 0x0000 }, + { 0x0700, 0xa338, 0x0000 }, + { 0x8700, 0xa33b, 0x2000 }, + { 0x0700, 0xa33a, 0x0000 }, + { 0x0700, 0xa33c, 0x0000 }, + { 0x8700, 0xa345, 0x4000 }, + { 0x8700, 0xa341, 0x3000 }, + { 0x8700, 0xa33f, 0x2000 }, + { 0x0700, 0xa33e, 0x0000 }, + { 0x0700, 0xa340, 0x0000 }, + { 0x8700, 0xa343, 0x2000 }, + { 0x0700, 0xa342, 0x0000 }, + { 0x0700, 0xa344, 0x0000 }, + { 0x8700, 0xa349, 0x3000 }, + { 0x8700, 0xa347, 0x2000 }, + { 0x0700, 0xa346, 0x0000 }, + { 0x0700, 0xa348, 0x0000 }, + { 0x8700, 0xa34b, 0x2000 }, + { 0x0700, 0xa34a, 0x0000 }, + { 0x0700, 0xa34c, 0x0000 }, + { 0x8700, 0xfc4d, 0xb000 }, + { 0x8700, 0xf97f, 0xa000 }, + { 0x8700, 0xa44d, 0x9000 }, + { 0x8700, 0xa3cd, 0x8000 }, + { 0x8700, 0xa38d, 0x7000 }, + { 0x8700, 0xa36d, 0x6000 }, + { 0x8700, 0xa35d, 0x5000 }, + { 0x8700, 0xa355, 0x4000 }, + { 0x8700, 0xa351, 0x3000 }, + { 0x8700, 0xa34f, 0x2000 }, + { 0x0700, 0xa34e, 0x0000 }, + { 0x0700, 0xa350, 0x0000 }, + { 0x8700, 0xa353, 0x2000 }, + { 0x0700, 0xa352, 0x0000 }, + { 0x0700, 0xa354, 0x0000 }, + { 0x8700, 0xa359, 0x3000 }, + { 0x8700, 0xa357, 0x2000 }, + { 0x0700, 0xa356, 0x0000 }, + { 0x0700, 0xa358, 0x0000 }, + { 0x8700, 0xa35b, 0x2000 }, + { 0x0700, 0xa35a, 0x0000 }, + { 0x0700, 0xa35c, 0x0000 }, + { 0x8700, 0xa365, 0x4000 }, + { 0x8700, 0xa361, 0x3000 }, + { 0x8700, 0xa35f, 0x2000 }, + { 0x0700, 0xa35e, 0x0000 }, + { 0x0700, 0xa360, 0x0000 }, + { 0x8700, 0xa363, 0x2000 }, + { 0x0700, 0xa362, 0x0000 }, + { 0x0700, 0xa364, 0x0000 }, + { 0x8700, 0xa369, 0x3000 }, + { 0x8700, 0xa367, 0x2000 }, + { 0x0700, 0xa366, 0x0000 }, + { 0x0700, 0xa368, 0x0000 }, + { 0x8700, 0xa36b, 0x2000 }, + { 0x0700, 0xa36a, 0x0000 }, + { 0x0700, 0xa36c, 0x0000 }, + { 0x8700, 0xa37d, 0x5000 }, + { 0x8700, 0xa375, 0x4000 }, + { 0x8700, 0xa371, 0x3000 }, + { 0x8700, 0xa36f, 0x2000 }, + { 0x0700, 0xa36e, 0x0000 }, + { 0x0700, 0xa370, 0x0000 }, + { 0x8700, 0xa373, 0x2000 }, + { 0x0700, 0xa372, 0x0000 }, + { 0x0700, 0xa374, 0x0000 }, + { 0x8700, 0xa379, 0x3000 }, + { 0x8700, 0xa377, 0x2000 }, + { 0x0700, 0xa376, 0x0000 }, + { 0x0700, 0xa378, 0x0000 }, + { 0x8700, 0xa37b, 0x2000 }, + { 0x0700, 0xa37a, 0x0000 }, + { 0x0700, 0xa37c, 0x0000 }, + { 0x8700, 0xa385, 0x4000 }, + { 0x8700, 0xa381, 0x3000 }, + { 0x8700, 0xa37f, 0x2000 }, + { 0x0700, 0xa37e, 0x0000 }, + { 0x0700, 0xa380, 0x0000 }, + { 0x8700, 0xa383, 0x2000 }, + { 0x0700, 0xa382, 0x0000 }, + { 0x0700, 0xa384, 0x0000 }, + { 0x8700, 0xa389, 0x3000 }, + { 0x8700, 0xa387, 0x2000 }, + { 0x0700, 0xa386, 0x0000 }, + { 0x0700, 0xa388, 0x0000 }, + { 0x8700, 0xa38b, 0x2000 }, + { 0x0700, 0xa38a, 0x0000 }, + { 0x0700, 0xa38c, 0x0000 }, + { 0x8700, 0xa3ad, 0x6000 }, + { 0x8700, 0xa39d, 0x5000 }, + { 0x8700, 0xa395, 0x4000 }, + { 0x8700, 0xa391, 0x3000 }, + { 0x8700, 0xa38f, 0x2000 }, + { 0x0700, 0xa38e, 0x0000 }, + { 0x0700, 0xa390, 0x0000 }, + { 0x8700, 0xa393, 0x2000 }, + { 0x0700, 0xa392, 0x0000 }, + { 0x0700, 0xa394, 0x0000 }, + { 0x8700, 0xa399, 0x3000 }, + { 0x8700, 0xa397, 0x2000 }, + { 0x0700, 0xa396, 0x0000 }, + { 0x0700, 0xa398, 0x0000 }, + { 0x8700, 0xa39b, 0x2000 }, + { 0x0700, 0xa39a, 0x0000 }, + { 0x0700, 0xa39c, 0x0000 }, + { 0x8700, 0xa3a5, 0x4000 }, + { 0x8700, 0xa3a1, 0x3000 }, + { 0x8700, 0xa39f, 0x2000 }, + { 0x0700, 0xa39e, 0x0000 }, + { 0x0700, 0xa3a0, 0x0000 }, + { 0x8700, 0xa3a3, 0x2000 }, + { 0x0700, 0xa3a2, 0x0000 }, + { 0x0700, 0xa3a4, 0x0000 }, + { 0x8700, 0xa3a9, 0x3000 }, + { 0x8700, 0xa3a7, 0x2000 }, + { 0x0700, 0xa3a6, 0x0000 }, + { 0x0700, 0xa3a8, 0x0000 }, + { 0x8700, 0xa3ab, 0x2000 }, + { 0x0700, 0xa3aa, 0x0000 }, + { 0x0700, 0xa3ac, 0x0000 }, + { 0x8700, 0xa3bd, 0x5000 }, + { 0x8700, 0xa3b5, 0x4000 }, + { 0x8700, 0xa3b1, 0x3000 }, + { 0x8700, 0xa3af, 0x2000 }, + { 0x0700, 0xa3ae, 0x0000 }, + { 0x0700, 0xa3b0, 0x0000 }, + { 0x8700, 0xa3b3, 0x2000 }, + { 0x0700, 0xa3b2, 0x0000 }, + { 0x0700, 0xa3b4, 0x0000 }, + { 0x8700, 0xa3b9, 0x3000 }, + { 0x8700, 0xa3b7, 0x2000 }, + { 0x0700, 0xa3b6, 0x0000 }, + { 0x0700, 0xa3b8, 0x0000 }, + { 0x8700, 0xa3bb, 0x2000 }, + { 0x0700, 0xa3ba, 0x0000 }, + { 0x0700, 0xa3bc, 0x0000 }, + { 0x8700, 0xa3c5, 0x4000 }, + { 0x8700, 0xa3c1, 0x3000 }, + { 0x8700, 0xa3bf, 0x2000 }, + { 0x0700, 0xa3be, 0x0000 }, + { 0x0700, 0xa3c0, 0x0000 }, + { 0x8700, 0xa3c3, 0x2000 }, + { 0x0700, 0xa3c2, 0x0000 }, + { 0x0700, 0xa3c4, 0x0000 }, + { 0x8700, 0xa3c9, 0x3000 }, + { 0x8700, 0xa3c7, 0x2000 }, + { 0x0700, 0xa3c6, 0x0000 }, + { 0x0700, 0xa3c8, 0x0000 }, + { 0x8700, 0xa3cb, 0x2000 }, + { 0x0700, 0xa3ca, 0x0000 }, + { 0x0700, 0xa3cc, 0x0000 }, + { 0x8700, 0xa40d, 0x7000 }, + { 0x8700, 0xa3ed, 0x6000 }, + { 0x8700, 0xa3dd, 0x5000 }, + { 0x8700, 0xa3d5, 0x4000 }, + { 0x8700, 0xa3d1, 0x3000 }, + { 0x8700, 0xa3cf, 0x2000 }, + { 0x0700, 0xa3ce, 0x0000 }, + { 0x0700, 0xa3d0, 0x0000 }, + { 0x8700, 0xa3d3, 0x2000 }, + { 0x0700, 0xa3d2, 0x0000 }, + { 0x0700, 0xa3d4, 0x0000 }, + { 0x8700, 0xa3d9, 0x3000 }, + { 0x8700, 0xa3d7, 0x2000 }, + { 0x0700, 0xa3d6, 0x0000 }, + { 0x0700, 0xa3d8, 0x0000 }, + { 0x8700, 0xa3db, 0x2000 }, + { 0x0700, 0xa3da, 0x0000 }, + { 0x0700, 0xa3dc, 0x0000 }, + { 0x8700, 0xa3e5, 0x4000 }, + { 0x8700, 0xa3e1, 0x3000 }, + { 0x8700, 0xa3df, 0x2000 }, + { 0x0700, 0xa3de, 0x0000 }, + { 0x0700, 0xa3e0, 0x0000 }, + { 0x8700, 0xa3e3, 0x2000 }, + { 0x0700, 0xa3e2, 0x0000 }, + { 0x0700, 0xa3e4, 0x0000 }, + { 0x8700, 0xa3e9, 0x3000 }, + { 0x8700, 0xa3e7, 0x2000 }, + { 0x0700, 0xa3e6, 0x0000 }, + { 0x0700, 0xa3e8, 0x0000 }, + { 0x8700, 0xa3eb, 0x2000 }, + { 0x0700, 0xa3ea, 0x0000 }, + { 0x0700, 0xa3ec, 0x0000 }, + { 0x8700, 0xa3fd, 0x5000 }, + { 0x8700, 0xa3f5, 0x4000 }, + { 0x8700, 0xa3f1, 0x3000 }, + { 0x8700, 0xa3ef, 0x2000 }, + { 0x0700, 0xa3ee, 0x0000 }, + { 0x0700, 0xa3f0, 0x0000 }, + { 0x8700, 0xa3f3, 0x2000 }, + { 0x0700, 0xa3f2, 0x0000 }, + { 0x0700, 0xa3f4, 0x0000 }, + { 0x8700, 0xa3f9, 0x3000 }, + { 0x8700, 0xa3f7, 0x2000 }, + { 0x0700, 0xa3f6, 0x0000 }, + { 0x0700, 0xa3f8, 0x0000 }, + { 0x8700, 0xa3fb, 0x2000 }, + { 0x0700, 0xa3fa, 0x0000 }, + { 0x0700, 0xa3fc, 0x0000 }, + { 0x8700, 0xa405, 0x4000 }, + { 0x8700, 0xa401, 0x3000 }, + { 0x8700, 0xa3ff, 0x2000 }, + { 0x0700, 0xa3fe, 0x0000 }, + { 0x0700, 0xa400, 0x0000 }, + { 0x8700, 0xa403, 0x2000 }, + { 0x0700, 0xa402, 0x0000 }, + { 0x0700, 0xa404, 0x0000 }, + { 0x8700, 0xa409, 0x3000 }, + { 0x8700, 0xa407, 0x2000 }, + { 0x0700, 0xa406, 0x0000 }, + { 0x0700, 0xa408, 0x0000 }, + { 0x8700, 0xa40b, 0x2000 }, + { 0x0700, 0xa40a, 0x0000 }, + { 0x0700, 0xa40c, 0x0000 }, + { 0x8700, 0xa42d, 0x6000 }, + { 0x8700, 0xa41d, 0x5000 }, + { 0x8700, 0xa415, 0x4000 }, + { 0x8700, 0xa411, 0x3000 }, + { 0x8700, 0xa40f, 0x2000 }, + { 0x0700, 0xa40e, 0x0000 }, + { 0x0700, 0xa410, 0x0000 }, + { 0x8700, 0xa413, 0x2000 }, + { 0x0700, 0xa412, 0x0000 }, + { 0x0700, 0xa414, 0x0000 }, + { 0x8700, 0xa419, 0x3000 }, + { 0x8700, 0xa417, 0x2000 }, + { 0x0700, 0xa416, 0x0000 }, + { 0x0700, 0xa418, 0x0000 }, + { 0x8700, 0xa41b, 0x2000 }, + { 0x0700, 0xa41a, 0x0000 }, + { 0x0700, 0xa41c, 0x0000 }, + { 0x8700, 0xa425, 0x4000 }, + { 0x8700, 0xa421, 0x3000 }, + { 0x8700, 0xa41f, 0x2000 }, + { 0x0700, 0xa41e, 0x0000 }, + { 0x0700, 0xa420, 0x0000 }, + { 0x8700, 0xa423, 0x2000 }, + { 0x0700, 0xa422, 0x0000 }, + { 0x0700, 0xa424, 0x0000 }, + { 0x8700, 0xa429, 0x3000 }, + { 0x8700, 0xa427, 0x2000 }, + { 0x0700, 0xa426, 0x0000 }, + { 0x0700, 0xa428, 0x0000 }, + { 0x8700, 0xa42b, 0x2000 }, + { 0x0700, 0xa42a, 0x0000 }, + { 0x0700, 0xa42c, 0x0000 }, + { 0x8700, 0xa43d, 0x5000 }, + { 0x8700, 0xa435, 0x4000 }, + { 0x8700, 0xa431, 0x3000 }, + { 0x8700, 0xa42f, 0x2000 }, + { 0x0700, 0xa42e, 0x0000 }, + { 0x0700, 0xa430, 0x0000 }, + { 0x8700, 0xa433, 0x2000 }, + { 0x0700, 0xa432, 0x0000 }, + { 0x0700, 0xa434, 0x0000 }, + { 0x8700, 0xa439, 0x3000 }, + { 0x8700, 0xa437, 0x2000 }, + { 0x0700, 0xa436, 0x0000 }, + { 0x0700, 0xa438, 0x0000 }, + { 0x8700, 0xa43b, 0x2000 }, + { 0x0700, 0xa43a, 0x0000 }, + { 0x0700, 0xa43c, 0x0000 }, + { 0x8700, 0xa445, 0x4000 }, + { 0x8700, 0xa441, 0x3000 }, + { 0x8700, 0xa43f, 0x2000 }, + { 0x0700, 0xa43e, 0x0000 }, + { 0x0700, 0xa440, 0x0000 }, + { 0x8700, 0xa443, 0x2000 }, + { 0x0700, 0xa442, 0x0000 }, + { 0x0700, 0xa444, 0x0000 }, + { 0x8700, 0xa449, 0x3000 }, + { 0x8700, 0xa447, 0x2000 }, + { 0x0700, 0xa446, 0x0000 }, + { 0x0700, 0xa448, 0x0000 }, + { 0x8700, 0xa44b, 0x2000 }, + { 0x0700, 0xa44a, 0x0000 }, + { 0x0700, 0xa44c, 0x0000 }, + { 0x8300, 0xf8ff, 0x8000 }, + { 0x9a00, 0xa490, 0x7000 }, + { 0x8700, 0xa46d, 0x6000 }, + { 0x8700, 0xa45d, 0x5000 }, + { 0x8700, 0xa455, 0x4000 }, + { 0x8700, 0xa451, 0x3000 }, + { 0x8700, 0xa44f, 0x2000 }, + { 0x0700, 0xa44e, 0x0000 }, + { 0x0700, 0xa450, 0x0000 }, + { 0x8700, 0xa453, 0x2000 }, + { 0x0700, 0xa452, 0x0000 }, + { 0x0700, 0xa454, 0x0000 }, + { 0x8700, 0xa459, 0x3000 }, + { 0x8700, 0xa457, 0x2000 }, + { 0x0700, 0xa456, 0x0000 }, + { 0x0700, 0xa458, 0x0000 }, + { 0x8700, 0xa45b, 0x2000 }, + { 0x0700, 0xa45a, 0x0000 }, + { 0x0700, 0xa45c, 0x0000 }, + { 0x8700, 0xa465, 0x4000 }, + { 0x8700, 0xa461, 0x3000 }, + { 0x8700, 0xa45f, 0x2000 }, + { 0x0700, 0xa45e, 0x0000 }, + { 0x0700, 0xa460, 0x0000 }, + { 0x8700, 0xa463, 0x2000 }, + { 0x0700, 0xa462, 0x0000 }, + { 0x0700, 0xa464, 0x0000 }, + { 0x8700, 0xa469, 0x3000 }, + { 0x8700, 0xa467, 0x2000 }, + { 0x0700, 0xa466, 0x0000 }, + { 0x0700, 0xa468, 0x0000 }, + { 0x8700, 0xa46b, 0x2000 }, + { 0x0700, 0xa46a, 0x0000 }, + { 0x0700, 0xa46c, 0x0000 }, + { 0x8700, 0xa47d, 0x5000 }, + { 0x8700, 0xa475, 0x4000 }, + { 0x8700, 0xa471, 0x3000 }, + { 0x8700, 0xa46f, 0x2000 }, + { 0x0700, 0xa46e, 0x0000 }, + { 0x0700, 0xa470, 0x0000 }, + { 0x8700, 0xa473, 0x2000 }, + { 0x0700, 0xa472, 0x0000 }, + { 0x0700, 0xa474, 0x0000 }, + { 0x8700, 0xa479, 0x3000 }, + { 0x8700, 0xa477, 0x2000 }, + { 0x0700, 0xa476, 0x0000 }, + { 0x0700, 0xa478, 0x0000 }, + { 0x8700, 0xa47b, 0x2000 }, + { 0x0700, 0xa47a, 0x0000 }, + { 0x0700, 0xa47c, 0x0000 }, + { 0x8700, 0xa485, 0x4000 }, + { 0x8700, 0xa481, 0x3000 }, + { 0x8700, 0xa47f, 0x2000 }, + { 0x0700, 0xa47e, 0x0000 }, + { 0x0700, 0xa480, 0x0000 }, + { 0x8700, 0xa483, 0x2000 }, + { 0x0700, 0xa482, 0x0000 }, + { 0x0700, 0xa484, 0x0000 }, + { 0x8700, 0xa489, 0x3000 }, + { 0x8700, 0xa487, 0x2000 }, + { 0x0700, 0xa486, 0x0000 }, + { 0x0700, 0xa488, 0x0000 }, + { 0x8700, 0xa48b, 0x2000 }, + { 0x0700, 0xa48a, 0x0000 }, + { 0x0700, 0xa48c, 0x0000 }, + { 0x9a00, 0xa4b0, 0x6000 }, + { 0x9a00, 0xa4a0, 0x5000 }, + { 0x9a00, 0xa498, 0x4000 }, + { 0x9a00, 0xa494, 0x3000 }, + { 0x9a00, 0xa492, 0x2000 }, + { 0x1a00, 0xa491, 0x0000 }, + { 0x1a00, 0xa493, 0x0000 }, + { 0x9a00, 0xa496, 0x2000 }, + { 0x1a00, 0xa495, 0x0000 }, + { 0x1a00, 0xa497, 0x0000 }, + { 0x9a00, 0xa49c, 0x3000 }, + { 0x9a00, 0xa49a, 0x2000 }, + { 0x1a00, 0xa499, 0x0000 }, + { 0x1a00, 0xa49b, 0x0000 }, + { 0x9a00, 0xa49e, 0x2000 }, + { 0x1a00, 0xa49d, 0x0000 }, + { 0x1a00, 0xa49f, 0x0000 }, + { 0x9a00, 0xa4a8, 0x4000 }, + { 0x9a00, 0xa4a4, 0x3000 }, + { 0x9a00, 0xa4a2, 0x2000 }, + { 0x1a00, 0xa4a1, 0x0000 }, + { 0x1a00, 0xa4a3, 0x0000 }, + { 0x9a00, 0xa4a6, 0x2000 }, + { 0x1a00, 0xa4a5, 0x0000 }, + { 0x1a00, 0xa4a7, 0x0000 }, + { 0x9a00, 0xa4ac, 0x3000 }, + { 0x9a00, 0xa4aa, 0x2000 }, + { 0x1a00, 0xa4a9, 0x0000 }, + { 0x1a00, 0xa4ab, 0x0000 }, + { 0x9a00, 0xa4ae, 0x2000 }, + { 0x1a00, 0xa4ad, 0x0000 }, + { 0x1a00, 0xa4af, 0x0000 }, + { 0x9a00, 0xa4c0, 0x5000 }, + { 0x9a00, 0xa4b8, 0x4000 }, + { 0x9a00, 0xa4b4, 0x3000 }, + { 0x9a00, 0xa4b2, 0x2000 }, + { 0x1a00, 0xa4b1, 0x0000 }, + { 0x1a00, 0xa4b3, 0x0000 }, + { 0x9a00, 0xa4b6, 0x2000 }, + { 0x1a00, 0xa4b5, 0x0000 }, + { 0x1a00, 0xa4b7, 0x0000 }, + { 0x9a00, 0xa4bc, 0x3000 }, + { 0x9a00, 0xa4ba, 0x2000 }, + { 0x1a00, 0xa4b9, 0x0000 }, + { 0x1a00, 0xa4bb, 0x0000 }, + { 0x9a00, 0xa4be, 0x2000 }, + { 0x1a00, 0xa4bd, 0x0000 }, + { 0x1a00, 0xa4bf, 0x0000 }, + { 0x8700, 0xd7a3, 0x4000 }, + { 0x9a00, 0xa4c4, 0x3000 }, + { 0x9a00, 0xa4c2, 0x2000 }, + { 0x1a00, 0xa4c1, 0x0000 }, + { 0x1a00, 0xa4c3, 0x0000 }, + { 0x9a00, 0xa4c6, 0x2000 }, + { 0x1a00, 0xa4c5, 0x0000 }, + { 0x0700, 0xac00, 0x0000 }, + { 0x8400, 0xdbff, 0x3000 }, + { 0x8400, 0xdb7f, 0x2000 }, + { 0x0400, 0xd800, 0x0000 }, + { 0x0400, 0xdb80, 0x0000 }, + { 0x8400, 0xdfff, 0x2000 }, + { 0x0400, 0xdc00, 0x0000 }, + { 0x0300, 0xe000, 0x0000 }, + { 0x8700, 0xf93f, 0x7000 }, + { 0x8700, 0xf91f, 0x6000 }, + { 0x8700, 0xf90f, 0x5000 }, + { 0x8700, 0xf907, 0x4000 }, + { 0x8700, 0xf903, 0x3000 }, + { 0x8700, 0xf901, 0x2000 }, + { 0x0700, 0xf900, 0x0000 }, + { 0x0700, 0xf902, 0x0000 }, + { 0x8700, 0xf905, 0x2000 }, + { 0x0700, 0xf904, 0x0000 }, + { 0x0700, 0xf906, 0x0000 }, + { 0x8700, 0xf90b, 0x3000 }, + { 0x8700, 0xf909, 0x2000 }, + { 0x0700, 0xf908, 0x0000 }, + { 0x0700, 0xf90a, 0x0000 }, + { 0x8700, 0xf90d, 0x2000 }, + { 0x0700, 0xf90c, 0x0000 }, + { 0x0700, 0xf90e, 0x0000 }, + { 0x8700, 0xf917, 0x4000 }, + { 0x8700, 0xf913, 0x3000 }, + { 0x8700, 0xf911, 0x2000 }, + { 0x0700, 0xf910, 0x0000 }, + { 0x0700, 0xf912, 0x0000 }, + { 0x8700, 0xf915, 0x2000 }, + { 0x0700, 0xf914, 0x0000 }, + { 0x0700, 0xf916, 0x0000 }, + { 0x8700, 0xf91b, 0x3000 }, + { 0x8700, 0xf919, 0x2000 }, + { 0x0700, 0xf918, 0x0000 }, + { 0x0700, 0xf91a, 0x0000 }, + { 0x8700, 0xf91d, 0x2000 }, + { 0x0700, 0xf91c, 0x0000 }, + { 0x0700, 0xf91e, 0x0000 }, + { 0x8700, 0xf92f, 0x5000 }, + { 0x8700, 0xf927, 0x4000 }, + { 0x8700, 0xf923, 0x3000 }, + { 0x8700, 0xf921, 0x2000 }, + { 0x0700, 0xf920, 0x0000 }, + { 0x0700, 0xf922, 0x0000 }, + { 0x8700, 0xf925, 0x2000 }, + { 0x0700, 0xf924, 0x0000 }, + { 0x0700, 0xf926, 0x0000 }, + { 0x8700, 0xf92b, 0x3000 }, + { 0x8700, 0xf929, 0x2000 }, + { 0x0700, 0xf928, 0x0000 }, + { 0x0700, 0xf92a, 0x0000 }, + { 0x8700, 0xf92d, 0x2000 }, + { 0x0700, 0xf92c, 0x0000 }, + { 0x0700, 0xf92e, 0x0000 }, + { 0x8700, 0xf937, 0x4000 }, + { 0x8700, 0xf933, 0x3000 }, + { 0x8700, 0xf931, 0x2000 }, + { 0x0700, 0xf930, 0x0000 }, + { 0x0700, 0xf932, 0x0000 }, + { 0x8700, 0xf935, 0x2000 }, + { 0x0700, 0xf934, 0x0000 }, + { 0x0700, 0xf936, 0x0000 }, + { 0x8700, 0xf93b, 0x3000 }, + { 0x8700, 0xf939, 0x2000 }, + { 0x0700, 0xf938, 0x0000 }, + { 0x0700, 0xf93a, 0x0000 }, + { 0x8700, 0xf93d, 0x2000 }, + { 0x0700, 0xf93c, 0x0000 }, + { 0x0700, 0xf93e, 0x0000 }, + { 0x8700, 0xf95f, 0x6000 }, + { 0x8700, 0xf94f, 0x5000 }, + { 0x8700, 0xf947, 0x4000 }, + { 0x8700, 0xf943, 0x3000 }, + { 0x8700, 0xf941, 0x2000 }, + { 0x0700, 0xf940, 0x0000 }, + { 0x0700, 0xf942, 0x0000 }, + { 0x8700, 0xf945, 0x2000 }, + { 0x0700, 0xf944, 0x0000 }, + { 0x0700, 0xf946, 0x0000 }, + { 0x8700, 0xf94b, 0x3000 }, + { 0x8700, 0xf949, 0x2000 }, + { 0x0700, 0xf948, 0x0000 }, + { 0x0700, 0xf94a, 0x0000 }, + { 0x8700, 0xf94d, 0x2000 }, + { 0x0700, 0xf94c, 0x0000 }, + { 0x0700, 0xf94e, 0x0000 }, + { 0x8700, 0xf957, 0x4000 }, + { 0x8700, 0xf953, 0x3000 }, + { 0x8700, 0xf951, 0x2000 }, + { 0x0700, 0xf950, 0x0000 }, + { 0x0700, 0xf952, 0x0000 }, + { 0x8700, 0xf955, 0x2000 }, + { 0x0700, 0xf954, 0x0000 }, + { 0x0700, 0xf956, 0x0000 }, + { 0x8700, 0xf95b, 0x3000 }, + { 0x8700, 0xf959, 0x2000 }, + { 0x0700, 0xf958, 0x0000 }, + { 0x0700, 0xf95a, 0x0000 }, + { 0x8700, 0xf95d, 0x2000 }, + { 0x0700, 0xf95c, 0x0000 }, + { 0x0700, 0xf95e, 0x0000 }, + { 0x8700, 0xf96f, 0x5000 }, + { 0x8700, 0xf967, 0x4000 }, + { 0x8700, 0xf963, 0x3000 }, + { 0x8700, 0xf961, 0x2000 }, + { 0x0700, 0xf960, 0x0000 }, + { 0x0700, 0xf962, 0x0000 }, + { 0x8700, 0xf965, 0x2000 }, + { 0x0700, 0xf964, 0x0000 }, + { 0x0700, 0xf966, 0x0000 }, + { 0x8700, 0xf96b, 0x3000 }, + { 0x8700, 0xf969, 0x2000 }, + { 0x0700, 0xf968, 0x0000 }, + { 0x0700, 0xf96a, 0x0000 }, + { 0x8700, 0xf96d, 0x2000 }, + { 0x0700, 0xf96c, 0x0000 }, + { 0x0700, 0xf96e, 0x0000 }, + { 0x8700, 0xf977, 0x4000 }, + { 0x8700, 0xf973, 0x3000 }, + { 0x8700, 0xf971, 0x2000 }, + { 0x0700, 0xf970, 0x0000 }, + { 0x0700, 0xf972, 0x0000 }, + { 0x8700, 0xf975, 0x2000 }, + { 0x0700, 0xf974, 0x0000 }, + { 0x0700, 0xf976, 0x0000 }, + { 0x8700, 0xf97b, 0x3000 }, + { 0x8700, 0xf979, 0x2000 }, + { 0x0700, 0xf978, 0x0000 }, + { 0x0700, 0xf97a, 0x0000 }, + { 0x8700, 0xf97d, 0x2000 }, + { 0x0700, 0xf97c, 0x0000 }, + { 0x0700, 0xf97e, 0x0000 }, + { 0x8700, 0xfb27, 0x9000 }, + { 0x8700, 0xf9ff, 0x8000 }, + { 0x8700, 0xf9bf, 0x7000 }, + { 0x8700, 0xf99f, 0x6000 }, + { 0x8700, 0xf98f, 0x5000 }, + { 0x8700, 0xf987, 0x4000 }, + { 0x8700, 0xf983, 0x3000 }, + { 0x8700, 0xf981, 0x2000 }, + { 0x0700, 0xf980, 0x0000 }, + { 0x0700, 0xf982, 0x0000 }, + { 0x8700, 0xf985, 0x2000 }, + { 0x0700, 0xf984, 0x0000 }, + { 0x0700, 0xf986, 0x0000 }, + { 0x8700, 0xf98b, 0x3000 }, + { 0x8700, 0xf989, 0x2000 }, + { 0x0700, 0xf988, 0x0000 }, + { 0x0700, 0xf98a, 0x0000 }, + { 0x8700, 0xf98d, 0x2000 }, + { 0x0700, 0xf98c, 0x0000 }, + { 0x0700, 0xf98e, 0x0000 }, + { 0x8700, 0xf997, 0x4000 }, + { 0x8700, 0xf993, 0x3000 }, + { 0x8700, 0xf991, 0x2000 }, + { 0x0700, 0xf990, 0x0000 }, + { 0x0700, 0xf992, 0x0000 }, + { 0x8700, 0xf995, 0x2000 }, + { 0x0700, 0xf994, 0x0000 }, + { 0x0700, 0xf996, 0x0000 }, + { 0x8700, 0xf99b, 0x3000 }, + { 0x8700, 0xf999, 0x2000 }, + { 0x0700, 0xf998, 0x0000 }, + { 0x0700, 0xf99a, 0x0000 }, + { 0x8700, 0xf99d, 0x2000 }, + { 0x0700, 0xf99c, 0x0000 }, + { 0x0700, 0xf99e, 0x0000 }, + { 0x8700, 0xf9af, 0x5000 }, + { 0x8700, 0xf9a7, 0x4000 }, + { 0x8700, 0xf9a3, 0x3000 }, + { 0x8700, 0xf9a1, 0x2000 }, + { 0x0700, 0xf9a0, 0x0000 }, + { 0x0700, 0xf9a2, 0x0000 }, + { 0x8700, 0xf9a5, 0x2000 }, + { 0x0700, 0xf9a4, 0x0000 }, + { 0x0700, 0xf9a6, 0x0000 }, + { 0x8700, 0xf9ab, 0x3000 }, + { 0x8700, 0xf9a9, 0x2000 }, + { 0x0700, 0xf9a8, 0x0000 }, + { 0x0700, 0xf9aa, 0x0000 }, + { 0x8700, 0xf9ad, 0x2000 }, + { 0x0700, 0xf9ac, 0x0000 }, + { 0x0700, 0xf9ae, 0x0000 }, + { 0x8700, 0xf9b7, 0x4000 }, + { 0x8700, 0xf9b3, 0x3000 }, + { 0x8700, 0xf9b1, 0x2000 }, + { 0x0700, 0xf9b0, 0x0000 }, + { 0x0700, 0xf9b2, 0x0000 }, + { 0x8700, 0xf9b5, 0x2000 }, + { 0x0700, 0xf9b4, 0x0000 }, + { 0x0700, 0xf9b6, 0x0000 }, + { 0x8700, 0xf9bb, 0x3000 }, + { 0x8700, 0xf9b9, 0x2000 }, + { 0x0700, 0xf9b8, 0x0000 }, + { 0x0700, 0xf9ba, 0x0000 }, + { 0x8700, 0xf9bd, 0x2000 }, + { 0x0700, 0xf9bc, 0x0000 }, + { 0x0700, 0xf9be, 0x0000 }, + { 0x8700, 0xf9df, 0x6000 }, + { 0x8700, 0xf9cf, 0x5000 }, + { 0x8700, 0xf9c7, 0x4000 }, + { 0x8700, 0xf9c3, 0x3000 }, + { 0x8700, 0xf9c1, 0x2000 }, + { 0x0700, 0xf9c0, 0x0000 }, + { 0x0700, 0xf9c2, 0x0000 }, + { 0x8700, 0xf9c5, 0x2000 }, + { 0x0700, 0xf9c4, 0x0000 }, + { 0x0700, 0xf9c6, 0x0000 }, + { 0x8700, 0xf9cb, 0x3000 }, + { 0x8700, 0xf9c9, 0x2000 }, + { 0x0700, 0xf9c8, 0x0000 }, + { 0x0700, 0xf9ca, 0x0000 }, + { 0x8700, 0xf9cd, 0x2000 }, + { 0x0700, 0xf9cc, 0x0000 }, + { 0x0700, 0xf9ce, 0x0000 }, + { 0x8700, 0xf9d7, 0x4000 }, + { 0x8700, 0xf9d3, 0x3000 }, + { 0x8700, 0xf9d1, 0x2000 }, + { 0x0700, 0xf9d0, 0x0000 }, + { 0x0700, 0xf9d2, 0x0000 }, + { 0x8700, 0xf9d5, 0x2000 }, + { 0x0700, 0xf9d4, 0x0000 }, + { 0x0700, 0xf9d6, 0x0000 }, + { 0x8700, 0xf9db, 0x3000 }, + { 0x8700, 0xf9d9, 0x2000 }, + { 0x0700, 0xf9d8, 0x0000 }, + { 0x0700, 0xf9da, 0x0000 }, + { 0x8700, 0xf9dd, 0x2000 }, + { 0x0700, 0xf9dc, 0x0000 }, + { 0x0700, 0xf9de, 0x0000 }, + { 0x8700, 0xf9ef, 0x5000 }, + { 0x8700, 0xf9e7, 0x4000 }, + { 0x8700, 0xf9e3, 0x3000 }, + { 0x8700, 0xf9e1, 0x2000 }, + { 0x0700, 0xf9e0, 0x0000 }, + { 0x0700, 0xf9e2, 0x0000 }, + { 0x8700, 0xf9e5, 0x2000 }, + { 0x0700, 0xf9e4, 0x0000 }, + { 0x0700, 0xf9e6, 0x0000 }, + { 0x8700, 0xf9eb, 0x3000 }, + { 0x8700, 0xf9e9, 0x2000 }, + { 0x0700, 0xf9e8, 0x0000 }, + { 0x0700, 0xf9ea, 0x0000 }, + { 0x8700, 0xf9ed, 0x2000 }, + { 0x0700, 0xf9ec, 0x0000 }, + { 0x0700, 0xf9ee, 0x0000 }, + { 0x8700, 0xf9f7, 0x4000 }, + { 0x8700, 0xf9f3, 0x3000 }, + { 0x8700, 0xf9f1, 0x2000 }, + { 0x0700, 0xf9f0, 0x0000 }, + { 0x0700, 0xf9f2, 0x0000 }, + { 0x8700, 0xf9f5, 0x2000 }, + { 0x0700, 0xf9f4, 0x0000 }, + { 0x0700, 0xf9f6, 0x0000 }, + { 0x8700, 0xf9fb, 0x3000 }, + { 0x8700, 0xf9f9, 0x2000 }, + { 0x0700, 0xf9f8, 0x0000 }, + { 0x0700, 0xf9fa, 0x0000 }, + { 0x8700, 0xf9fd, 0x2000 }, + { 0x0700, 0xf9fc, 0x0000 }, + { 0x0700, 0xf9fe, 0x0000 }, + { 0x8700, 0xfa41, 0x7000 }, + { 0x8700, 0xfa1f, 0x6000 }, + { 0x8700, 0xfa0f, 0x5000 }, + { 0x8700, 0xfa07, 0x4000 }, + { 0x8700, 0xfa03, 0x3000 }, + { 0x8700, 0xfa01, 0x2000 }, + { 0x0700, 0xfa00, 0x0000 }, + { 0x0700, 0xfa02, 0x0000 }, + { 0x8700, 0xfa05, 0x2000 }, + { 0x0700, 0xfa04, 0x0000 }, + { 0x0700, 0xfa06, 0x0000 }, + { 0x8700, 0xfa0b, 0x3000 }, + { 0x8700, 0xfa09, 0x2000 }, + { 0x0700, 0xfa08, 0x0000 }, + { 0x0700, 0xfa0a, 0x0000 }, + { 0x8700, 0xfa0d, 0x2000 }, + { 0x0700, 0xfa0c, 0x0000 }, + { 0x0700, 0xfa0e, 0x0000 }, + { 0x8700, 0xfa17, 0x4000 }, + { 0x8700, 0xfa13, 0x3000 }, + { 0x8700, 0xfa11, 0x2000 }, + { 0x0700, 0xfa10, 0x0000 }, + { 0x0700, 0xfa12, 0x0000 }, + { 0x8700, 0xfa15, 0x2000 }, + { 0x0700, 0xfa14, 0x0000 }, + { 0x0700, 0xfa16, 0x0000 }, + { 0x8700, 0xfa1b, 0x3000 }, + { 0x8700, 0xfa19, 0x2000 }, + { 0x0700, 0xfa18, 0x0000 }, + { 0x0700, 0xfa1a, 0x0000 }, + { 0x8700, 0xfa1d, 0x2000 }, + { 0x0700, 0xfa1c, 0x0000 }, + { 0x0700, 0xfa1e, 0x0000 }, + { 0x8700, 0xfa31, 0x5000 }, + { 0x8700, 0xfa27, 0x4000 }, + { 0x8700, 0xfa23, 0x3000 }, + { 0x8700, 0xfa21, 0x2000 }, + { 0x0700, 0xfa20, 0x0000 }, + { 0x0700, 0xfa22, 0x0000 }, + { 0x8700, 0xfa25, 0x2000 }, + { 0x0700, 0xfa24, 0x0000 }, + { 0x0700, 0xfa26, 0x0000 }, + { 0x8700, 0xfa2b, 0x3000 }, + { 0x8700, 0xfa29, 0x2000 }, + { 0x0700, 0xfa28, 0x0000 }, + { 0x0700, 0xfa2a, 0x0000 }, + { 0x8700, 0xfa2d, 0x2000 }, + { 0x0700, 0xfa2c, 0x0000 }, + { 0x0700, 0xfa30, 0x0000 }, + { 0x8700, 0xfa39, 0x4000 }, + { 0x8700, 0xfa35, 0x3000 }, + { 0x8700, 0xfa33, 0x2000 }, + { 0x0700, 0xfa32, 0x0000 }, + { 0x0700, 0xfa34, 0x0000 }, + { 0x8700, 0xfa37, 0x2000 }, + { 0x0700, 0xfa36, 0x0000 }, + { 0x0700, 0xfa38, 0x0000 }, + { 0x8700, 0xfa3d, 0x3000 }, + { 0x8700, 0xfa3b, 0x2000 }, + { 0x0700, 0xfa3a, 0x0000 }, + { 0x0700, 0xfa3c, 0x0000 }, + { 0x8700, 0xfa3f, 0x2000 }, + { 0x0700, 0xfa3e, 0x0000 }, + { 0x0700, 0xfa40, 0x0000 }, + { 0x8700, 0xfa61, 0x6000 }, + { 0x8700, 0xfa51, 0x5000 }, + { 0x8700, 0xfa49, 0x4000 }, + { 0x8700, 0xfa45, 0x3000 }, + { 0x8700, 0xfa43, 0x2000 }, + { 0x0700, 0xfa42, 0x0000 }, + { 0x0700, 0xfa44, 0x0000 }, + { 0x8700, 0xfa47, 0x2000 }, + { 0x0700, 0xfa46, 0x0000 }, + { 0x0700, 0xfa48, 0x0000 }, + { 0x8700, 0xfa4d, 0x3000 }, + { 0x8700, 0xfa4b, 0x2000 }, + { 0x0700, 0xfa4a, 0x0000 }, + { 0x0700, 0xfa4c, 0x0000 }, + { 0x8700, 0xfa4f, 0x2000 }, + { 0x0700, 0xfa4e, 0x0000 }, + { 0x0700, 0xfa50, 0x0000 }, + { 0x8700, 0xfa59, 0x4000 }, + { 0x8700, 0xfa55, 0x3000 }, + { 0x8700, 0xfa53, 0x2000 }, + { 0x0700, 0xfa52, 0x0000 }, + { 0x0700, 0xfa54, 0x0000 }, + { 0x8700, 0xfa57, 0x2000 }, + { 0x0700, 0xfa56, 0x0000 }, + { 0x0700, 0xfa58, 0x0000 }, + { 0x8700, 0xfa5d, 0x3000 }, + { 0x8700, 0xfa5b, 0x2000 }, + { 0x0700, 0xfa5a, 0x0000 }, + { 0x0700, 0xfa5c, 0x0000 }, + { 0x8700, 0xfa5f, 0x2000 }, + { 0x0700, 0xfa5e, 0x0000 }, + { 0x0700, 0xfa60, 0x0000 }, + { 0x8500, 0xfb06, 0x5000 }, + { 0x8700, 0xfa69, 0x4000 }, + { 0x8700, 0xfa65, 0x3000 }, + { 0x8700, 0xfa63, 0x2000 }, + { 0x0700, 0xfa62, 0x0000 }, + { 0x0700, 0xfa64, 0x0000 }, + { 0x8700, 0xfa67, 0x2000 }, + { 0x0700, 0xfa66, 0x0000 }, + { 0x0700, 0xfa68, 0x0000 }, + { 0x8500, 0xfb02, 0x3000 }, + { 0x8500, 0xfb00, 0x2000 }, + { 0x0700, 0xfa6a, 0x0000 }, + { 0x0500, 0xfb01, 0x0000 }, + { 0x8500, 0xfb04, 0x2000 }, + { 0x0500, 0xfb03, 0x0000 }, + { 0x0500, 0xfb05, 0x0000 }, + { 0x8700, 0xfb1f, 0x4000 }, + { 0x8500, 0xfb16, 0x3000 }, + { 0x8500, 0xfb14, 0x2000 }, + { 0x0500, 0xfb13, 0x0000 }, + { 0x0500, 0xfb15, 0x0000 }, + { 0x8700, 0xfb1d, 0x2000 }, + { 0x0500, 0xfb17, 0x0000 }, + { 0x0c00, 0xfb1e, 0x0000 }, + { 0x8700, 0xfb23, 0x3000 }, + { 0x8700, 0xfb21, 0x2000 }, + { 0x0700, 0xfb20, 0x0000 }, + { 0x0700, 0xfb22, 0x0000 }, + { 0x8700, 0xfb25, 0x2000 }, + { 0x0700, 0xfb24, 0x0000 }, + { 0x0700, 0xfb26, 0x0000 }, + { 0x8700, 0xfbac, 0x8000 }, + { 0x8700, 0xfb6c, 0x7000 }, + { 0x8700, 0xfb4c, 0x6000 }, + { 0x8700, 0xfb38, 0x5000 }, + { 0x8700, 0xfb2f, 0x4000 }, + { 0x8700, 0xfb2b, 0x3000 }, + { 0x9900, 0xfb29, 0x2000 }, + { 0x0700, 0xfb28, 0x0000 }, + { 0x0700, 0xfb2a, 0x0000 }, + { 0x8700, 0xfb2d, 0x2000 }, + { 0x0700, 0xfb2c, 0x0000 }, + { 0x0700, 0xfb2e, 0x0000 }, + { 0x8700, 0xfb33, 0x3000 }, + { 0x8700, 0xfb31, 0x2000 }, + { 0x0700, 0xfb30, 0x0000 }, + { 0x0700, 0xfb32, 0x0000 }, + { 0x8700, 0xfb35, 0x2000 }, + { 0x0700, 0xfb34, 0x0000 }, + { 0x0700, 0xfb36, 0x0000 }, + { 0x8700, 0xfb43, 0x4000 }, + { 0x8700, 0xfb3c, 0x3000 }, + { 0x8700, 0xfb3a, 0x2000 }, + { 0x0700, 0xfb39, 0x0000 }, + { 0x0700, 0xfb3b, 0x0000 }, + { 0x8700, 0xfb40, 0x2000 }, + { 0x0700, 0xfb3e, 0x0000 }, + { 0x0700, 0xfb41, 0x0000 }, + { 0x8700, 0xfb48, 0x3000 }, + { 0x8700, 0xfb46, 0x2000 }, + { 0x0700, 0xfb44, 0x0000 }, + { 0x0700, 0xfb47, 0x0000 }, + { 0x8700, 0xfb4a, 0x2000 }, + { 0x0700, 0xfb49, 0x0000 }, + { 0x0700, 0xfb4b, 0x0000 }, + { 0x8700, 0xfb5c, 0x5000 }, + { 0x8700, 0xfb54, 0x4000 }, + { 0x8700, 0xfb50, 0x3000 }, + { 0x8700, 0xfb4e, 0x2000 }, + { 0x0700, 0xfb4d, 0x0000 }, + { 0x0700, 0xfb4f, 0x0000 }, + { 0x8700, 0xfb52, 0x2000 }, + { 0x0700, 0xfb51, 0x0000 }, + { 0x0700, 0xfb53, 0x0000 }, + { 0x8700, 0xfb58, 0x3000 }, + { 0x8700, 0xfb56, 0x2000 }, + { 0x0700, 0xfb55, 0x0000 }, + { 0x0700, 0xfb57, 0x0000 }, + { 0x8700, 0xfb5a, 0x2000 }, + { 0x0700, 0xfb59, 0x0000 }, + { 0x0700, 0xfb5b, 0x0000 }, + { 0x8700, 0xfb64, 0x4000 }, + { 0x8700, 0xfb60, 0x3000 }, + { 0x8700, 0xfb5e, 0x2000 }, + { 0x0700, 0xfb5d, 0x0000 }, + { 0x0700, 0xfb5f, 0x0000 }, + { 0x8700, 0xfb62, 0x2000 }, + { 0x0700, 0xfb61, 0x0000 }, + { 0x0700, 0xfb63, 0x0000 }, + { 0x8700, 0xfb68, 0x3000 }, + { 0x8700, 0xfb66, 0x2000 }, + { 0x0700, 0xfb65, 0x0000 }, + { 0x0700, 0xfb67, 0x0000 }, + { 0x8700, 0xfb6a, 0x2000 }, + { 0x0700, 0xfb69, 0x0000 }, + { 0x0700, 0xfb6b, 0x0000 }, + { 0x8700, 0xfb8c, 0x6000 }, + { 0x8700, 0xfb7c, 0x5000 }, + { 0x8700, 0xfb74, 0x4000 }, + { 0x8700, 0xfb70, 0x3000 }, + { 0x8700, 0xfb6e, 0x2000 }, + { 0x0700, 0xfb6d, 0x0000 }, + { 0x0700, 0xfb6f, 0x0000 }, + { 0x8700, 0xfb72, 0x2000 }, + { 0x0700, 0xfb71, 0x0000 }, + { 0x0700, 0xfb73, 0x0000 }, + { 0x8700, 0xfb78, 0x3000 }, + { 0x8700, 0xfb76, 0x2000 }, + { 0x0700, 0xfb75, 0x0000 }, + { 0x0700, 0xfb77, 0x0000 }, + { 0x8700, 0xfb7a, 0x2000 }, + { 0x0700, 0xfb79, 0x0000 }, + { 0x0700, 0xfb7b, 0x0000 }, + { 0x8700, 0xfb84, 0x4000 }, + { 0x8700, 0xfb80, 0x3000 }, + { 0x8700, 0xfb7e, 0x2000 }, + { 0x0700, 0xfb7d, 0x0000 }, + { 0x0700, 0xfb7f, 0x0000 }, + { 0x8700, 0xfb82, 0x2000 }, + { 0x0700, 0xfb81, 0x0000 }, + { 0x0700, 0xfb83, 0x0000 }, + { 0x8700, 0xfb88, 0x3000 }, + { 0x8700, 0xfb86, 0x2000 }, + { 0x0700, 0xfb85, 0x0000 }, + { 0x0700, 0xfb87, 0x0000 }, + { 0x8700, 0xfb8a, 0x2000 }, + { 0x0700, 0xfb89, 0x0000 }, + { 0x0700, 0xfb8b, 0x0000 }, + { 0x8700, 0xfb9c, 0x5000 }, + { 0x8700, 0xfb94, 0x4000 }, + { 0x8700, 0xfb90, 0x3000 }, + { 0x8700, 0xfb8e, 0x2000 }, + { 0x0700, 0xfb8d, 0x0000 }, + { 0x0700, 0xfb8f, 0x0000 }, + { 0x8700, 0xfb92, 0x2000 }, + { 0x0700, 0xfb91, 0x0000 }, + { 0x0700, 0xfb93, 0x0000 }, + { 0x8700, 0xfb98, 0x3000 }, + { 0x8700, 0xfb96, 0x2000 }, + { 0x0700, 0xfb95, 0x0000 }, + { 0x0700, 0xfb97, 0x0000 }, + { 0x8700, 0xfb9a, 0x2000 }, + { 0x0700, 0xfb99, 0x0000 }, + { 0x0700, 0xfb9b, 0x0000 }, + { 0x8700, 0xfba4, 0x4000 }, + { 0x8700, 0xfba0, 0x3000 }, + { 0x8700, 0xfb9e, 0x2000 }, + { 0x0700, 0xfb9d, 0x0000 }, + { 0x0700, 0xfb9f, 0x0000 }, + { 0x8700, 0xfba2, 0x2000 }, + { 0x0700, 0xfba1, 0x0000 }, + { 0x0700, 0xfba3, 0x0000 }, + { 0x8700, 0xfba8, 0x3000 }, + { 0x8700, 0xfba6, 0x2000 }, + { 0x0700, 0xfba5, 0x0000 }, + { 0x0700, 0xfba7, 0x0000 }, + { 0x8700, 0xfbaa, 0x2000 }, + { 0x0700, 0xfba9, 0x0000 }, + { 0x0700, 0xfbab, 0x0000 }, + { 0x8700, 0xfc0d, 0x7000 }, + { 0x8700, 0xfbed, 0x6000 }, + { 0x8700, 0xfbdd, 0x5000 }, + { 0x8700, 0xfbd5, 0x4000 }, + { 0x8700, 0xfbb0, 0x3000 }, + { 0x8700, 0xfbae, 0x2000 }, + { 0x0700, 0xfbad, 0x0000 }, + { 0x0700, 0xfbaf, 0x0000 }, + { 0x8700, 0xfbd3, 0x2000 }, + { 0x0700, 0xfbb1, 0x0000 }, + { 0x0700, 0xfbd4, 0x0000 }, + { 0x8700, 0xfbd9, 0x3000 }, + { 0x8700, 0xfbd7, 0x2000 }, + { 0x0700, 0xfbd6, 0x0000 }, + { 0x0700, 0xfbd8, 0x0000 }, + { 0x8700, 0xfbdb, 0x2000 }, + { 0x0700, 0xfbda, 0x0000 }, + { 0x0700, 0xfbdc, 0x0000 }, + { 0x8700, 0xfbe5, 0x4000 }, + { 0x8700, 0xfbe1, 0x3000 }, + { 0x8700, 0xfbdf, 0x2000 }, + { 0x0700, 0xfbde, 0x0000 }, + { 0x0700, 0xfbe0, 0x0000 }, + { 0x8700, 0xfbe3, 0x2000 }, + { 0x0700, 0xfbe2, 0x0000 }, + { 0x0700, 0xfbe4, 0x0000 }, + { 0x8700, 0xfbe9, 0x3000 }, + { 0x8700, 0xfbe7, 0x2000 }, + { 0x0700, 0xfbe6, 0x0000 }, + { 0x0700, 0xfbe8, 0x0000 }, + { 0x8700, 0xfbeb, 0x2000 }, + { 0x0700, 0xfbea, 0x0000 }, + { 0x0700, 0xfbec, 0x0000 }, + { 0x8700, 0xfbfd, 0x5000 }, + { 0x8700, 0xfbf5, 0x4000 }, + { 0x8700, 0xfbf1, 0x3000 }, + { 0x8700, 0xfbef, 0x2000 }, + { 0x0700, 0xfbee, 0x0000 }, + { 0x0700, 0xfbf0, 0x0000 }, + { 0x8700, 0xfbf3, 0x2000 }, + { 0x0700, 0xfbf2, 0x0000 }, + { 0x0700, 0xfbf4, 0x0000 }, + { 0x8700, 0xfbf9, 0x3000 }, + { 0x8700, 0xfbf7, 0x2000 }, + { 0x0700, 0xfbf6, 0x0000 }, + { 0x0700, 0xfbf8, 0x0000 }, + { 0x8700, 0xfbfb, 0x2000 }, + { 0x0700, 0xfbfa, 0x0000 }, + { 0x0700, 0xfbfc, 0x0000 }, + { 0x8700, 0xfc05, 0x4000 }, + { 0x8700, 0xfc01, 0x3000 }, + { 0x8700, 0xfbff, 0x2000 }, + { 0x0700, 0xfbfe, 0x0000 }, + { 0x0700, 0xfc00, 0x0000 }, + { 0x8700, 0xfc03, 0x2000 }, + { 0x0700, 0xfc02, 0x0000 }, + { 0x0700, 0xfc04, 0x0000 }, + { 0x8700, 0xfc09, 0x3000 }, + { 0x8700, 0xfc07, 0x2000 }, + { 0x0700, 0xfc06, 0x0000 }, + { 0x0700, 0xfc08, 0x0000 }, + { 0x8700, 0xfc0b, 0x2000 }, + { 0x0700, 0xfc0a, 0x0000 }, + { 0x0700, 0xfc0c, 0x0000 }, + { 0x8700, 0xfc2d, 0x6000 }, + { 0x8700, 0xfc1d, 0x5000 }, + { 0x8700, 0xfc15, 0x4000 }, + { 0x8700, 0xfc11, 0x3000 }, + { 0x8700, 0xfc0f, 0x2000 }, + { 0x0700, 0xfc0e, 0x0000 }, + { 0x0700, 0xfc10, 0x0000 }, + { 0x8700, 0xfc13, 0x2000 }, + { 0x0700, 0xfc12, 0x0000 }, + { 0x0700, 0xfc14, 0x0000 }, + { 0x8700, 0xfc19, 0x3000 }, + { 0x8700, 0xfc17, 0x2000 }, + { 0x0700, 0xfc16, 0x0000 }, + { 0x0700, 0xfc18, 0x0000 }, + { 0x8700, 0xfc1b, 0x2000 }, + { 0x0700, 0xfc1a, 0x0000 }, + { 0x0700, 0xfc1c, 0x0000 }, + { 0x8700, 0xfc25, 0x4000 }, + { 0x8700, 0xfc21, 0x3000 }, + { 0x8700, 0xfc1f, 0x2000 }, + { 0x0700, 0xfc1e, 0x0000 }, + { 0x0700, 0xfc20, 0x0000 }, + { 0x8700, 0xfc23, 0x2000 }, + { 0x0700, 0xfc22, 0x0000 }, + { 0x0700, 0xfc24, 0x0000 }, + { 0x8700, 0xfc29, 0x3000 }, + { 0x8700, 0xfc27, 0x2000 }, + { 0x0700, 0xfc26, 0x0000 }, + { 0x0700, 0xfc28, 0x0000 }, + { 0x8700, 0xfc2b, 0x2000 }, + { 0x0700, 0xfc2a, 0x0000 }, + { 0x0700, 0xfc2c, 0x0000 }, + { 0x8700, 0xfc3d, 0x5000 }, + { 0x8700, 0xfc35, 0x4000 }, + { 0x8700, 0xfc31, 0x3000 }, + { 0x8700, 0xfc2f, 0x2000 }, + { 0x0700, 0xfc2e, 0x0000 }, + { 0x0700, 0xfc30, 0x0000 }, + { 0x8700, 0xfc33, 0x2000 }, + { 0x0700, 0xfc32, 0x0000 }, + { 0x0700, 0xfc34, 0x0000 }, + { 0x8700, 0xfc39, 0x3000 }, + { 0x8700, 0xfc37, 0x2000 }, + { 0x0700, 0xfc36, 0x0000 }, + { 0x0700, 0xfc38, 0x0000 }, + { 0x8700, 0xfc3b, 0x2000 }, + { 0x0700, 0xfc3a, 0x0000 }, + { 0x0700, 0xfc3c, 0x0000 }, + { 0x8700, 0xfc45, 0x4000 }, + { 0x8700, 0xfc41, 0x3000 }, + { 0x8700, 0xfc3f, 0x2000 }, + { 0x0700, 0xfc3e, 0x0000 }, + { 0x0700, 0xfc40, 0x0000 }, + { 0x8700, 0xfc43, 0x2000 }, + { 0x0700, 0xfc42, 0x0000 }, + { 0x0700, 0xfc44, 0x0000 }, + { 0x8700, 0xfc49, 0x3000 }, + { 0x8700, 0xfc47, 0x2000 }, + { 0x0700, 0xfc46, 0x0000 }, + { 0x0700, 0xfc48, 0x0000 }, + { 0x8700, 0xfc4b, 0x2000 }, + { 0x0700, 0xfc4a, 0x0000 }, + { 0x0700, 0xfc4c, 0x0000 }, + { 0x8700, 0xfeac, 0xa000 }, + { 0x8700, 0xfd5d, 0x9000 }, + { 0x8700, 0xfccd, 0x8000 }, + { 0x8700, 0xfc8d, 0x7000 }, + { 0x8700, 0xfc6d, 0x6000 }, + { 0x8700, 0xfc5d, 0x5000 }, + { 0x8700, 0xfc55, 0x4000 }, + { 0x8700, 0xfc51, 0x3000 }, + { 0x8700, 0xfc4f, 0x2000 }, + { 0x0700, 0xfc4e, 0x0000 }, + { 0x0700, 0xfc50, 0x0000 }, + { 0x8700, 0xfc53, 0x2000 }, + { 0x0700, 0xfc52, 0x0000 }, + { 0x0700, 0xfc54, 0x0000 }, + { 0x8700, 0xfc59, 0x3000 }, + { 0x8700, 0xfc57, 0x2000 }, + { 0x0700, 0xfc56, 0x0000 }, + { 0x0700, 0xfc58, 0x0000 }, + { 0x8700, 0xfc5b, 0x2000 }, + { 0x0700, 0xfc5a, 0x0000 }, + { 0x0700, 0xfc5c, 0x0000 }, + { 0x8700, 0xfc65, 0x4000 }, + { 0x8700, 0xfc61, 0x3000 }, + { 0x8700, 0xfc5f, 0x2000 }, + { 0x0700, 0xfc5e, 0x0000 }, + { 0x0700, 0xfc60, 0x0000 }, + { 0x8700, 0xfc63, 0x2000 }, + { 0x0700, 0xfc62, 0x0000 }, + { 0x0700, 0xfc64, 0x0000 }, + { 0x8700, 0xfc69, 0x3000 }, + { 0x8700, 0xfc67, 0x2000 }, + { 0x0700, 0xfc66, 0x0000 }, + { 0x0700, 0xfc68, 0x0000 }, + { 0x8700, 0xfc6b, 0x2000 }, + { 0x0700, 0xfc6a, 0x0000 }, + { 0x0700, 0xfc6c, 0x0000 }, + { 0x8700, 0xfc7d, 0x5000 }, + { 0x8700, 0xfc75, 0x4000 }, + { 0x8700, 0xfc71, 0x3000 }, + { 0x8700, 0xfc6f, 0x2000 }, + { 0x0700, 0xfc6e, 0x0000 }, + { 0x0700, 0xfc70, 0x0000 }, + { 0x8700, 0xfc73, 0x2000 }, + { 0x0700, 0xfc72, 0x0000 }, + { 0x0700, 0xfc74, 0x0000 }, + { 0x8700, 0xfc79, 0x3000 }, + { 0x8700, 0xfc77, 0x2000 }, + { 0x0700, 0xfc76, 0x0000 }, + { 0x0700, 0xfc78, 0x0000 }, + { 0x8700, 0xfc7b, 0x2000 }, + { 0x0700, 0xfc7a, 0x0000 }, + { 0x0700, 0xfc7c, 0x0000 }, + { 0x8700, 0xfc85, 0x4000 }, + { 0x8700, 0xfc81, 0x3000 }, + { 0x8700, 0xfc7f, 0x2000 }, + { 0x0700, 0xfc7e, 0x0000 }, + { 0x0700, 0xfc80, 0x0000 }, + { 0x8700, 0xfc83, 0x2000 }, + { 0x0700, 0xfc82, 0x0000 }, + { 0x0700, 0xfc84, 0x0000 }, + { 0x8700, 0xfc89, 0x3000 }, + { 0x8700, 0xfc87, 0x2000 }, + { 0x0700, 0xfc86, 0x0000 }, + { 0x0700, 0xfc88, 0x0000 }, + { 0x8700, 0xfc8b, 0x2000 }, + { 0x0700, 0xfc8a, 0x0000 }, + { 0x0700, 0xfc8c, 0x0000 }, + { 0x8700, 0xfcad, 0x6000 }, + { 0x8700, 0xfc9d, 0x5000 }, + { 0x8700, 0xfc95, 0x4000 }, + { 0x8700, 0xfc91, 0x3000 }, + { 0x8700, 0xfc8f, 0x2000 }, + { 0x0700, 0xfc8e, 0x0000 }, + { 0x0700, 0xfc90, 0x0000 }, + { 0x8700, 0xfc93, 0x2000 }, + { 0x0700, 0xfc92, 0x0000 }, + { 0x0700, 0xfc94, 0x0000 }, + { 0x8700, 0xfc99, 0x3000 }, + { 0x8700, 0xfc97, 0x2000 }, + { 0x0700, 0xfc96, 0x0000 }, + { 0x0700, 0xfc98, 0x0000 }, + { 0x8700, 0xfc9b, 0x2000 }, + { 0x0700, 0xfc9a, 0x0000 }, + { 0x0700, 0xfc9c, 0x0000 }, + { 0x8700, 0xfca5, 0x4000 }, + { 0x8700, 0xfca1, 0x3000 }, + { 0x8700, 0xfc9f, 0x2000 }, + { 0x0700, 0xfc9e, 0x0000 }, + { 0x0700, 0xfca0, 0x0000 }, + { 0x8700, 0xfca3, 0x2000 }, + { 0x0700, 0xfca2, 0x0000 }, + { 0x0700, 0xfca4, 0x0000 }, + { 0x8700, 0xfca9, 0x3000 }, + { 0x8700, 0xfca7, 0x2000 }, + { 0x0700, 0xfca6, 0x0000 }, + { 0x0700, 0xfca8, 0x0000 }, + { 0x8700, 0xfcab, 0x2000 }, + { 0x0700, 0xfcaa, 0x0000 }, + { 0x0700, 0xfcac, 0x0000 }, + { 0x8700, 0xfcbd, 0x5000 }, + { 0x8700, 0xfcb5, 0x4000 }, + { 0x8700, 0xfcb1, 0x3000 }, + { 0x8700, 0xfcaf, 0x2000 }, + { 0x0700, 0xfcae, 0x0000 }, + { 0x0700, 0xfcb0, 0x0000 }, + { 0x8700, 0xfcb3, 0x2000 }, + { 0x0700, 0xfcb2, 0x0000 }, + { 0x0700, 0xfcb4, 0x0000 }, + { 0x8700, 0xfcb9, 0x3000 }, + { 0x8700, 0xfcb7, 0x2000 }, + { 0x0700, 0xfcb6, 0x0000 }, + { 0x0700, 0xfcb8, 0x0000 }, + { 0x8700, 0xfcbb, 0x2000 }, + { 0x0700, 0xfcba, 0x0000 }, + { 0x0700, 0xfcbc, 0x0000 }, + { 0x8700, 0xfcc5, 0x4000 }, + { 0x8700, 0xfcc1, 0x3000 }, + { 0x8700, 0xfcbf, 0x2000 }, + { 0x0700, 0xfcbe, 0x0000 }, + { 0x0700, 0xfcc0, 0x0000 }, + { 0x8700, 0xfcc3, 0x2000 }, + { 0x0700, 0xfcc2, 0x0000 }, + { 0x0700, 0xfcc4, 0x0000 }, + { 0x8700, 0xfcc9, 0x3000 }, + { 0x8700, 0xfcc7, 0x2000 }, + { 0x0700, 0xfcc6, 0x0000 }, + { 0x0700, 0xfcc8, 0x0000 }, + { 0x8700, 0xfccb, 0x2000 }, + { 0x0700, 0xfcca, 0x0000 }, + { 0x0700, 0xfccc, 0x0000 }, + { 0x8700, 0xfd0d, 0x7000 }, + { 0x8700, 0xfced, 0x6000 }, + { 0x8700, 0xfcdd, 0x5000 }, + { 0x8700, 0xfcd5, 0x4000 }, + { 0x8700, 0xfcd1, 0x3000 }, + { 0x8700, 0xfccf, 0x2000 }, + { 0x0700, 0xfcce, 0x0000 }, + { 0x0700, 0xfcd0, 0x0000 }, + { 0x8700, 0xfcd3, 0x2000 }, + { 0x0700, 0xfcd2, 0x0000 }, + { 0x0700, 0xfcd4, 0x0000 }, + { 0x8700, 0xfcd9, 0x3000 }, + { 0x8700, 0xfcd7, 0x2000 }, + { 0x0700, 0xfcd6, 0x0000 }, + { 0x0700, 0xfcd8, 0x0000 }, + { 0x8700, 0xfcdb, 0x2000 }, + { 0x0700, 0xfcda, 0x0000 }, + { 0x0700, 0xfcdc, 0x0000 }, + { 0x8700, 0xfce5, 0x4000 }, + { 0x8700, 0xfce1, 0x3000 }, + { 0x8700, 0xfcdf, 0x2000 }, + { 0x0700, 0xfcde, 0x0000 }, + { 0x0700, 0xfce0, 0x0000 }, + { 0x8700, 0xfce3, 0x2000 }, + { 0x0700, 0xfce2, 0x0000 }, + { 0x0700, 0xfce4, 0x0000 }, + { 0x8700, 0xfce9, 0x3000 }, + { 0x8700, 0xfce7, 0x2000 }, + { 0x0700, 0xfce6, 0x0000 }, + { 0x0700, 0xfce8, 0x0000 }, + { 0x8700, 0xfceb, 0x2000 }, + { 0x0700, 0xfcea, 0x0000 }, + { 0x0700, 0xfcec, 0x0000 }, + { 0x8700, 0xfcfd, 0x5000 }, + { 0x8700, 0xfcf5, 0x4000 }, + { 0x8700, 0xfcf1, 0x3000 }, + { 0x8700, 0xfcef, 0x2000 }, + { 0x0700, 0xfcee, 0x0000 }, + { 0x0700, 0xfcf0, 0x0000 }, + { 0x8700, 0xfcf3, 0x2000 }, + { 0x0700, 0xfcf2, 0x0000 }, + { 0x0700, 0xfcf4, 0x0000 }, + { 0x8700, 0xfcf9, 0x3000 }, + { 0x8700, 0xfcf7, 0x2000 }, + { 0x0700, 0xfcf6, 0x0000 }, + { 0x0700, 0xfcf8, 0x0000 }, + { 0x8700, 0xfcfb, 0x2000 }, + { 0x0700, 0xfcfa, 0x0000 }, + { 0x0700, 0xfcfc, 0x0000 }, + { 0x8700, 0xfd05, 0x4000 }, + { 0x8700, 0xfd01, 0x3000 }, + { 0x8700, 0xfcff, 0x2000 }, + { 0x0700, 0xfcfe, 0x0000 }, + { 0x0700, 0xfd00, 0x0000 }, + { 0x8700, 0xfd03, 0x2000 }, + { 0x0700, 0xfd02, 0x0000 }, + { 0x0700, 0xfd04, 0x0000 }, + { 0x8700, 0xfd09, 0x3000 }, + { 0x8700, 0xfd07, 0x2000 }, + { 0x0700, 0xfd06, 0x0000 }, + { 0x0700, 0xfd08, 0x0000 }, + { 0x8700, 0xfd0b, 0x2000 }, + { 0x0700, 0xfd0a, 0x0000 }, + { 0x0700, 0xfd0c, 0x0000 }, + { 0x8700, 0xfd2d, 0x6000 }, + { 0x8700, 0xfd1d, 0x5000 }, + { 0x8700, 0xfd15, 0x4000 }, + { 0x8700, 0xfd11, 0x3000 }, + { 0x8700, 0xfd0f, 0x2000 }, + { 0x0700, 0xfd0e, 0x0000 }, + { 0x0700, 0xfd10, 0x0000 }, + { 0x8700, 0xfd13, 0x2000 }, + { 0x0700, 0xfd12, 0x0000 }, + { 0x0700, 0xfd14, 0x0000 }, + { 0x8700, 0xfd19, 0x3000 }, + { 0x8700, 0xfd17, 0x2000 }, + { 0x0700, 0xfd16, 0x0000 }, + { 0x0700, 0xfd18, 0x0000 }, + { 0x8700, 0xfd1b, 0x2000 }, + { 0x0700, 0xfd1a, 0x0000 }, + { 0x0700, 0xfd1c, 0x0000 }, + { 0x8700, 0xfd25, 0x4000 }, + { 0x8700, 0xfd21, 0x3000 }, + { 0x8700, 0xfd1f, 0x2000 }, + { 0x0700, 0xfd1e, 0x0000 }, + { 0x0700, 0xfd20, 0x0000 }, + { 0x8700, 0xfd23, 0x2000 }, + { 0x0700, 0xfd22, 0x0000 }, + { 0x0700, 0xfd24, 0x0000 }, + { 0x8700, 0xfd29, 0x3000 }, + { 0x8700, 0xfd27, 0x2000 }, + { 0x0700, 0xfd26, 0x0000 }, + { 0x0700, 0xfd28, 0x0000 }, + { 0x8700, 0xfd2b, 0x2000 }, + { 0x0700, 0xfd2a, 0x0000 }, + { 0x0700, 0xfd2c, 0x0000 }, + { 0x8700, 0xfd3d, 0x5000 }, + { 0x8700, 0xfd35, 0x4000 }, + { 0x8700, 0xfd31, 0x3000 }, + { 0x8700, 0xfd2f, 0x2000 }, + { 0x0700, 0xfd2e, 0x0000 }, + { 0x0700, 0xfd30, 0x0000 }, + { 0x8700, 0xfd33, 0x2000 }, + { 0x0700, 0xfd32, 0x0000 }, + { 0x0700, 0xfd34, 0x0000 }, + { 0x8700, 0xfd39, 0x3000 }, + { 0x8700, 0xfd37, 0x2000 }, + { 0x0700, 0xfd36, 0x0000 }, + { 0x0700, 0xfd38, 0x0000 }, + { 0x8700, 0xfd3b, 0x2000 }, + { 0x0700, 0xfd3a, 0x0000 }, + { 0x0700, 0xfd3c, 0x0000 }, + { 0x8700, 0xfd55, 0x4000 }, + { 0x8700, 0xfd51, 0x3000 }, + { 0x9200, 0xfd3f, 0x2000 }, + { 0x1600, 0xfd3e, 0x0000 }, + { 0x0700, 0xfd50, 0x0000 }, + { 0x8700, 0xfd53, 0x2000 }, + { 0x0700, 0xfd52, 0x0000 }, + { 0x0700, 0xfd54, 0x0000 }, + { 0x8700, 0xfd59, 0x3000 }, + { 0x8700, 0xfd57, 0x2000 }, + { 0x0700, 0xfd56, 0x0000 }, + { 0x0700, 0xfd58, 0x0000 }, + { 0x8700, 0xfd5b, 0x2000 }, + { 0x0700, 0xfd5a, 0x0000 }, + { 0x0700, 0xfd5c, 0x0000 }, + { 0x8c00, 0xfe09, 0x8000 }, + { 0x8700, 0xfd9f, 0x7000 }, + { 0x8700, 0xfd7d, 0x6000 }, + { 0x8700, 0xfd6d, 0x5000 }, + { 0x8700, 0xfd65, 0x4000 }, + { 0x8700, 0xfd61, 0x3000 }, + { 0x8700, 0xfd5f, 0x2000 }, + { 0x0700, 0xfd5e, 0x0000 }, + { 0x0700, 0xfd60, 0x0000 }, + { 0x8700, 0xfd63, 0x2000 }, + { 0x0700, 0xfd62, 0x0000 }, + { 0x0700, 0xfd64, 0x0000 }, + { 0x8700, 0xfd69, 0x3000 }, + { 0x8700, 0xfd67, 0x2000 }, + { 0x0700, 0xfd66, 0x0000 }, + { 0x0700, 0xfd68, 0x0000 }, + { 0x8700, 0xfd6b, 0x2000 }, + { 0x0700, 0xfd6a, 0x0000 }, + { 0x0700, 0xfd6c, 0x0000 }, + { 0x8700, 0xfd75, 0x4000 }, + { 0x8700, 0xfd71, 0x3000 }, + { 0x8700, 0xfd6f, 0x2000 }, + { 0x0700, 0xfd6e, 0x0000 }, + { 0x0700, 0xfd70, 0x0000 }, + { 0x8700, 0xfd73, 0x2000 }, + { 0x0700, 0xfd72, 0x0000 }, + { 0x0700, 0xfd74, 0x0000 }, + { 0x8700, 0xfd79, 0x3000 }, + { 0x8700, 0xfd77, 0x2000 }, + { 0x0700, 0xfd76, 0x0000 }, + { 0x0700, 0xfd78, 0x0000 }, + { 0x8700, 0xfd7b, 0x2000 }, + { 0x0700, 0xfd7a, 0x0000 }, + { 0x0700, 0xfd7c, 0x0000 }, + { 0x8700, 0xfd8d, 0x5000 }, + { 0x8700, 0xfd85, 0x4000 }, + { 0x8700, 0xfd81, 0x3000 }, + { 0x8700, 0xfd7f, 0x2000 }, + { 0x0700, 0xfd7e, 0x0000 }, + { 0x0700, 0xfd80, 0x0000 }, + { 0x8700, 0xfd83, 0x2000 }, + { 0x0700, 0xfd82, 0x0000 }, + { 0x0700, 0xfd84, 0x0000 }, + { 0x8700, 0xfd89, 0x3000 }, + { 0x8700, 0xfd87, 0x2000 }, + { 0x0700, 0xfd86, 0x0000 }, + { 0x0700, 0xfd88, 0x0000 }, + { 0x8700, 0xfd8b, 0x2000 }, + { 0x0700, 0xfd8a, 0x0000 }, + { 0x0700, 0xfd8c, 0x0000 }, + { 0x8700, 0xfd97, 0x4000 }, + { 0x8700, 0xfd93, 0x3000 }, + { 0x8700, 0xfd8f, 0x2000 }, + { 0x0700, 0xfd8e, 0x0000 }, + { 0x0700, 0xfd92, 0x0000 }, + { 0x8700, 0xfd95, 0x2000 }, + { 0x0700, 0xfd94, 0x0000 }, + { 0x0700, 0xfd96, 0x0000 }, + { 0x8700, 0xfd9b, 0x3000 }, + { 0x8700, 0xfd99, 0x2000 }, + { 0x0700, 0xfd98, 0x0000 }, + { 0x0700, 0xfd9a, 0x0000 }, + { 0x8700, 0xfd9d, 0x2000 }, + { 0x0700, 0xfd9c, 0x0000 }, + { 0x0700, 0xfd9e, 0x0000 }, + { 0x8700, 0xfdbf, 0x6000 }, + { 0x8700, 0xfdaf, 0x5000 }, + { 0x8700, 0xfda7, 0x4000 }, + { 0x8700, 0xfda3, 0x3000 }, + { 0x8700, 0xfda1, 0x2000 }, + { 0x0700, 0xfda0, 0x0000 }, + { 0x0700, 0xfda2, 0x0000 }, + { 0x8700, 0xfda5, 0x2000 }, + { 0x0700, 0xfda4, 0x0000 }, + { 0x0700, 0xfda6, 0x0000 }, + { 0x8700, 0xfdab, 0x3000 }, + { 0x8700, 0xfda9, 0x2000 }, + { 0x0700, 0xfda8, 0x0000 }, + { 0x0700, 0xfdaa, 0x0000 }, + { 0x8700, 0xfdad, 0x2000 }, + { 0x0700, 0xfdac, 0x0000 }, + { 0x0700, 0xfdae, 0x0000 }, + { 0x8700, 0xfdb7, 0x4000 }, + { 0x8700, 0xfdb3, 0x3000 }, + { 0x8700, 0xfdb1, 0x2000 }, + { 0x0700, 0xfdb0, 0x0000 }, + { 0x0700, 0xfdb2, 0x0000 }, + { 0x8700, 0xfdb5, 0x2000 }, + { 0x0700, 0xfdb4, 0x0000 }, + { 0x0700, 0xfdb6, 0x0000 }, + { 0x8700, 0xfdbb, 0x3000 }, + { 0x8700, 0xfdb9, 0x2000 }, + { 0x0700, 0xfdb8, 0x0000 }, + { 0x0700, 0xfdba, 0x0000 }, + { 0x8700, 0xfdbd, 0x2000 }, + { 0x0700, 0xfdbc, 0x0000 }, + { 0x0700, 0xfdbe, 0x0000 }, + { 0x8700, 0xfdf7, 0x5000 }, + { 0x8700, 0xfdc7, 0x4000 }, + { 0x8700, 0xfdc3, 0x3000 }, + { 0x8700, 0xfdc1, 0x2000 }, + { 0x0700, 0xfdc0, 0x0000 }, + { 0x0700, 0xfdc2, 0x0000 }, + { 0x8700, 0xfdc5, 0x2000 }, + { 0x0700, 0xfdc4, 0x0000 }, + { 0x0700, 0xfdc6, 0x0000 }, + { 0x8700, 0xfdf3, 0x3000 }, + { 0x8700, 0xfdf1, 0x2000 }, + { 0x0700, 0xfdf0, 0x0000 }, + { 0x0700, 0xfdf2, 0x0000 }, + { 0x8700, 0xfdf5, 0x2000 }, + { 0x0700, 0xfdf4, 0x0000 }, + { 0x0700, 0xfdf6, 0x0000 }, + { 0x8c00, 0xfe01, 0x4000 }, + { 0x8700, 0xfdfb, 0x3000 }, + { 0x8700, 0xfdf9, 0x2000 }, + { 0x0700, 0xfdf8, 0x0000 }, + { 0x0700, 0xfdfa, 0x0000 }, + { 0x9a00, 0xfdfd, 0x2000 }, + { 0x1700, 0xfdfc, 0x0000 }, + { 0x0c00, 0xfe00, 0x0000 }, + { 0x8c00, 0xfe05, 0x3000 }, + { 0x8c00, 0xfe03, 0x2000 }, + { 0x0c00, 0xfe02, 0x0000 }, + { 0x0c00, 0xfe04, 0x0000 }, + { 0x8c00, 0xfe07, 0x2000 }, + { 0x0c00, 0xfe06, 0x0000 }, + { 0x0c00, 0xfe08, 0x0000 }, + { 0x9900, 0xfe66, 0x7000 }, + { 0x9500, 0xfe45, 0x6000 }, + { 0x9600, 0xfe35, 0x5000 }, + { 0x8c00, 0xfe21, 0x4000 }, + { 0x8c00, 0xfe0d, 0x3000 }, + { 0x8c00, 0xfe0b, 0x2000 }, + { 0x0c00, 0xfe0a, 0x0000 }, + { 0x0c00, 0xfe0c, 0x0000 }, + { 0x8c00, 0xfe0f, 0x2000 }, + { 0x0c00, 0xfe0e, 0x0000 }, + { 0x0c00, 0xfe20, 0x0000 }, + { 0x9100, 0xfe31, 0x3000 }, + { 0x8c00, 0xfe23, 0x2000 }, + { 0x0c00, 0xfe22, 0x0000 }, + { 0x1500, 0xfe30, 0x0000 }, + { 0x9000, 0xfe33, 0x2000 }, + { 0x1100, 0xfe32, 0x0000 }, + { 0x1000, 0xfe34, 0x0000 }, + { 0x9600, 0xfe3d, 0x4000 }, + { 0x9600, 0xfe39, 0x3000 }, + { 0x9600, 0xfe37, 0x2000 }, + { 0x1200, 0xfe36, 0x0000 }, + { 0x1200, 0xfe38, 0x0000 }, + { 0x9600, 0xfe3b, 0x2000 }, + { 0x1200, 0xfe3a, 0x0000 }, + { 0x1200, 0xfe3c, 0x0000 }, + { 0x9600, 0xfe41, 0x3000 }, + { 0x9600, 0xfe3f, 0x2000 }, + { 0x1200, 0xfe3e, 0x0000 }, + { 0x1200, 0xfe40, 0x0000 }, + { 0x9600, 0xfe43, 0x2000 }, + { 0x1200, 0xfe42, 0x0000 }, + { 0x1200, 0xfe44, 0x0000 }, + { 0x9500, 0xfe56, 0x5000 }, + { 0x9000, 0xfe4d, 0x4000 }, + { 0x9500, 0xfe49, 0x3000 }, + { 0x9600, 0xfe47, 0x2000 }, + { 0x1500, 0xfe46, 0x0000 }, + { 0x1200, 0xfe48, 0x0000 }, + { 0x9500, 0xfe4b, 0x2000 }, + { 0x1500, 0xfe4a, 0x0000 }, + { 0x1500, 0xfe4c, 0x0000 }, + { 0x9500, 0xfe51, 0x3000 }, + { 0x9000, 0xfe4f, 0x2000 }, + { 0x1000, 0xfe4e, 0x0000 }, + { 0x1500, 0xfe50, 0x0000 }, + { 0x9500, 0xfe54, 0x2000 }, + { 0x1500, 0xfe52, 0x0000 }, + { 0x1500, 0xfe55, 0x0000 }, + { 0x9200, 0xfe5e, 0x4000 }, + { 0x9200, 0xfe5a, 0x3000 }, + { 0x9100, 0xfe58, 0x2000 }, + { 0x1500, 0xfe57, 0x0000 }, + { 0x1600, 0xfe59, 0x0000 }, + { 0x9200, 0xfe5c, 0x2000 }, + { 0x1600, 0xfe5b, 0x0000 }, + { 0x1600, 0xfe5d, 0x0000 }, + { 0x9900, 0xfe62, 0x3000 }, + { 0x9500, 0xfe60, 0x2000 }, + { 0x1500, 0xfe5f, 0x0000 }, + { 0x1500, 0xfe61, 0x0000 }, + { 0x9900, 0xfe64, 0x2000 }, + { 0x1100, 0xfe63, 0x0000 }, + { 0x1900, 0xfe65, 0x0000 }, + { 0x8700, 0xfe8c, 0x6000 }, + { 0x8700, 0xfe7c, 0x5000 }, + { 0x8700, 0xfe73, 0x4000 }, + { 0x9500, 0xfe6b, 0x3000 }, + { 0x9700, 0xfe69, 0x2000 }, + { 0x1500, 0xfe68, 0x0000 }, + { 0x1500, 0xfe6a, 0x0000 }, + { 0x8700, 0xfe71, 0x2000 }, + { 0x0700, 0xfe70, 0x0000 }, + { 0x0700, 0xfe72, 0x0000 }, + { 0x8700, 0xfe78, 0x3000 }, + { 0x8700, 0xfe76, 0x2000 }, + { 0x0700, 0xfe74, 0x0000 }, + { 0x0700, 0xfe77, 0x0000 }, + { 0x8700, 0xfe7a, 0x2000 }, + { 0x0700, 0xfe79, 0x0000 }, + { 0x0700, 0xfe7b, 0x0000 }, + { 0x8700, 0xfe84, 0x4000 }, + { 0x8700, 0xfe80, 0x3000 }, + { 0x8700, 0xfe7e, 0x2000 }, + { 0x0700, 0xfe7d, 0x0000 }, + { 0x0700, 0xfe7f, 0x0000 }, + { 0x8700, 0xfe82, 0x2000 }, + { 0x0700, 0xfe81, 0x0000 }, + { 0x0700, 0xfe83, 0x0000 }, + { 0x8700, 0xfe88, 0x3000 }, + { 0x8700, 0xfe86, 0x2000 }, + { 0x0700, 0xfe85, 0x0000 }, + { 0x0700, 0xfe87, 0x0000 }, + { 0x8700, 0xfe8a, 0x2000 }, + { 0x0700, 0xfe89, 0x0000 }, + { 0x0700, 0xfe8b, 0x0000 }, + { 0x8700, 0xfe9c, 0x5000 }, + { 0x8700, 0xfe94, 0x4000 }, + { 0x8700, 0xfe90, 0x3000 }, + { 0x8700, 0xfe8e, 0x2000 }, + { 0x0700, 0xfe8d, 0x0000 }, + { 0x0700, 0xfe8f, 0x0000 }, + { 0x8700, 0xfe92, 0x2000 }, + { 0x0700, 0xfe91, 0x0000 }, + { 0x0700, 0xfe93, 0x0000 }, + { 0x8700, 0xfe98, 0x3000 }, + { 0x8700, 0xfe96, 0x2000 }, + { 0x0700, 0xfe95, 0x0000 }, + { 0x0700, 0xfe97, 0x0000 }, + { 0x8700, 0xfe9a, 0x2000 }, + { 0x0700, 0xfe99, 0x0000 }, + { 0x0700, 0xfe9b, 0x0000 }, + { 0x8700, 0xfea4, 0x4000 }, + { 0x8700, 0xfea0, 0x3000 }, + { 0x8700, 0xfe9e, 0x2000 }, + { 0x0700, 0xfe9d, 0x0000 }, + { 0x0700, 0xfe9f, 0x0000 }, + { 0x8700, 0xfea2, 0x2000 }, + { 0x0700, 0xfea1, 0x0000 }, + { 0x0700, 0xfea3, 0x0000 }, + { 0x8700, 0xfea8, 0x3000 }, + { 0x8700, 0xfea6, 0x2000 }, + { 0x0700, 0xfea5, 0x0000 }, + { 0x0700, 0xfea7, 0x0000 }, + { 0x8700, 0xfeaa, 0x2000 }, + { 0x0700, 0xfea9, 0x0000 }, + { 0x0700, 0xfeab, 0x0000 }, + { 0x8700, 0xffaf, 0x9000 }, + { 0x8900, 0xff2f, 0x8020 }, + { 0x8700, 0xfeec, 0x7000 }, + { 0x8700, 0xfecc, 0x6000 }, + { 0x8700, 0xfebc, 0x5000 }, + { 0x8700, 0xfeb4, 0x4000 }, + { 0x8700, 0xfeb0, 0x3000 }, + { 0x8700, 0xfeae, 0x2000 }, + { 0x0700, 0xfead, 0x0000 }, + { 0x0700, 0xfeaf, 0x0000 }, + { 0x8700, 0xfeb2, 0x2000 }, + { 0x0700, 0xfeb1, 0x0000 }, + { 0x0700, 0xfeb3, 0x0000 }, + { 0x8700, 0xfeb8, 0x3000 }, + { 0x8700, 0xfeb6, 0x2000 }, + { 0x0700, 0xfeb5, 0x0000 }, + { 0x0700, 0xfeb7, 0x0000 }, + { 0x8700, 0xfeba, 0x2000 }, + { 0x0700, 0xfeb9, 0x0000 }, + { 0x0700, 0xfebb, 0x0000 }, + { 0x8700, 0xfec4, 0x4000 }, + { 0x8700, 0xfec0, 0x3000 }, + { 0x8700, 0xfebe, 0x2000 }, + { 0x0700, 0xfebd, 0x0000 }, + { 0x0700, 0xfebf, 0x0000 }, + { 0x8700, 0xfec2, 0x2000 }, + { 0x0700, 0xfec1, 0x0000 }, + { 0x0700, 0xfec3, 0x0000 }, + { 0x8700, 0xfec8, 0x3000 }, + { 0x8700, 0xfec6, 0x2000 }, + { 0x0700, 0xfec5, 0x0000 }, + { 0x0700, 0xfec7, 0x0000 }, + { 0x8700, 0xfeca, 0x2000 }, + { 0x0700, 0xfec9, 0x0000 }, + { 0x0700, 0xfecb, 0x0000 }, + { 0x8700, 0xfedc, 0x5000 }, + { 0x8700, 0xfed4, 0x4000 }, + { 0x8700, 0xfed0, 0x3000 }, + { 0x8700, 0xfece, 0x2000 }, + { 0x0700, 0xfecd, 0x0000 }, + { 0x0700, 0xfecf, 0x0000 }, + { 0x8700, 0xfed2, 0x2000 }, + { 0x0700, 0xfed1, 0x0000 }, + { 0x0700, 0xfed3, 0x0000 }, + { 0x8700, 0xfed8, 0x3000 }, + { 0x8700, 0xfed6, 0x2000 }, + { 0x0700, 0xfed5, 0x0000 }, + { 0x0700, 0xfed7, 0x0000 }, + { 0x8700, 0xfeda, 0x2000 }, + { 0x0700, 0xfed9, 0x0000 }, + { 0x0700, 0xfedb, 0x0000 }, + { 0x8700, 0xfee4, 0x4000 }, + { 0x8700, 0xfee0, 0x3000 }, + { 0x8700, 0xfede, 0x2000 }, + { 0x0700, 0xfedd, 0x0000 }, + { 0x0700, 0xfedf, 0x0000 }, + { 0x8700, 0xfee2, 0x2000 }, + { 0x0700, 0xfee1, 0x0000 }, + { 0x0700, 0xfee3, 0x0000 }, + { 0x8700, 0xfee8, 0x3000 }, + { 0x8700, 0xfee6, 0x2000 }, + { 0x0700, 0xfee5, 0x0000 }, + { 0x0700, 0xfee7, 0x0000 }, + { 0x8700, 0xfeea, 0x2000 }, + { 0x0700, 0xfee9, 0x0000 }, + { 0x0700, 0xfeeb, 0x0000 }, + { 0x9500, 0xff0f, 0x6000 }, + { 0x8700, 0xfefc, 0x5000 }, + { 0x8700, 0xfef4, 0x4000 }, + { 0x8700, 0xfef0, 0x3000 }, + { 0x8700, 0xfeee, 0x2000 }, + { 0x0700, 0xfeed, 0x0000 }, + { 0x0700, 0xfeef, 0x0000 }, + { 0x8700, 0xfef2, 0x2000 }, + { 0x0700, 0xfef1, 0x0000 }, + { 0x0700, 0xfef3, 0x0000 }, + { 0x8700, 0xfef8, 0x3000 }, + { 0x8700, 0xfef6, 0x2000 }, + { 0x0700, 0xfef5, 0x0000 }, + { 0x0700, 0xfef7, 0x0000 }, + { 0x8700, 0xfefa, 0x2000 }, + { 0x0700, 0xfef9, 0x0000 }, + { 0x0700, 0xfefb, 0x0000 }, + { 0x9500, 0xff07, 0x4000 }, + { 0x9500, 0xff03, 0x3000 }, + { 0x9500, 0xff01, 0x2000 }, + { 0x0100, 0xfeff, 0x0000 }, + { 0x1500, 0xff02, 0x0000 }, + { 0x9500, 0xff05, 0x2000 }, + { 0x1700, 0xff04, 0x0000 }, + { 0x1500, 0xff06, 0x0000 }, + { 0x9900, 0xff0b, 0x3000 }, + { 0x9200, 0xff09, 0x2000 }, + { 0x1600, 0xff08, 0x0000 }, + { 0x1500, 0xff0a, 0x0000 }, + { 0x9100, 0xff0d, 0x2000 }, + { 0x1500, 0xff0c, 0x0000 }, + { 0x1500, 0xff0e, 0x0000 }, + { 0x9500, 0xff1f, 0x5000 }, + { 0x8d00, 0xff17, 0x4000 }, + { 0x8d00, 0xff13, 0x3000 }, + { 0x8d00, 0xff11, 0x2000 }, + { 0x0d00, 0xff10, 0x0000 }, + { 0x0d00, 0xff12, 0x0000 }, + { 0x8d00, 0xff15, 0x2000 }, + { 0x0d00, 0xff14, 0x0000 }, + { 0x0d00, 0xff16, 0x0000 }, + { 0x9500, 0xff1b, 0x3000 }, + { 0x8d00, 0xff19, 0x2000 }, + { 0x0d00, 0xff18, 0x0000 }, + { 0x1500, 0xff1a, 0x0000 }, + { 0x9900, 0xff1d, 0x2000 }, + { 0x1900, 0xff1c, 0x0000 }, + { 0x1900, 0xff1e, 0x0000 }, + { 0x8900, 0xff27, 0x4020 }, + { 0x8900, 0xff23, 0x3020 }, + { 0x8900, 0xff21, 0x2020 }, + { 0x1500, 0xff20, 0x0000 }, + { 0x0900, 0xff22, 0x0020 }, + { 0x8900, 0xff25, 0x2020 }, + { 0x0900, 0xff24, 0x0020 }, + { 0x0900, 0xff26, 0x0020 }, + { 0x8900, 0xff2b, 0x3020 }, + { 0x8900, 0xff29, 0x2020 }, + { 0x0900, 0xff28, 0x0020 }, + { 0x0900, 0xff2a, 0x0020 }, + { 0x8900, 0xff2d, 0x2020 }, + { 0x0900, 0xff2c, 0x0020 }, + { 0x0900, 0xff2e, 0x0020 }, + { 0x8700, 0xff6f, 0x7000 }, + { 0x8500, 0xff4f, 0x6fe0 }, + { 0x9000, 0xff3f, 0x5000 }, + { 0x8900, 0xff37, 0x4020 }, + { 0x8900, 0xff33, 0x3020 }, + { 0x8900, 0xff31, 0x2020 }, + { 0x0900, 0xff30, 0x0020 }, + { 0x0900, 0xff32, 0x0020 }, + { 0x8900, 0xff35, 0x2020 }, + { 0x0900, 0xff34, 0x0020 }, + { 0x0900, 0xff36, 0x0020 }, + { 0x9600, 0xff3b, 0x3000 }, + { 0x8900, 0xff39, 0x2020 }, + { 0x0900, 0xff38, 0x0020 }, + { 0x0900, 0xff3a, 0x0020 }, + { 0x9200, 0xff3d, 0x2000 }, + { 0x1500, 0xff3c, 0x0000 }, + { 0x1800, 0xff3e, 0x0000 }, + { 0x8500, 0xff47, 0x4fe0 }, + { 0x8500, 0xff43, 0x3fe0 }, + { 0x8500, 0xff41, 0x2fe0 }, + { 0x1800, 0xff40, 0x0000 }, + { 0x0500, 0xff42, 0x0fe0 }, + { 0x8500, 0xff45, 0x2fe0 }, + { 0x0500, 0xff44, 0x0fe0 }, + { 0x0500, 0xff46, 0x0fe0 }, + { 0x8500, 0xff4b, 0x3fe0 }, + { 0x8500, 0xff49, 0x2fe0 }, + { 0x0500, 0xff48, 0x0fe0 }, + { 0x0500, 0xff4a, 0x0fe0 }, + { 0x8500, 0xff4d, 0x2fe0 }, + { 0x0500, 0xff4c, 0x0fe0 }, + { 0x0500, 0xff4e, 0x0fe0 }, + { 0x9600, 0xff5f, 0x5000 }, + { 0x8500, 0xff57, 0x4fe0 }, + { 0x8500, 0xff53, 0x3fe0 }, + { 0x8500, 0xff51, 0x2fe0 }, + { 0x0500, 0xff50, 0x0fe0 }, + { 0x0500, 0xff52, 0x0fe0 }, + { 0x8500, 0xff55, 0x2fe0 }, + { 0x0500, 0xff54, 0x0fe0 }, + { 0x0500, 0xff56, 0x0fe0 }, + { 0x9600, 0xff5b, 0x3000 }, + { 0x8500, 0xff59, 0x2fe0 }, + { 0x0500, 0xff58, 0x0fe0 }, + { 0x0500, 0xff5a, 0x0fe0 }, + { 0x9200, 0xff5d, 0x2000 }, + { 0x1900, 0xff5c, 0x0000 }, + { 0x1900, 0xff5e, 0x0000 }, + { 0x8700, 0xff67, 0x4000 }, + { 0x9200, 0xff63, 0x3000 }, + { 0x9500, 0xff61, 0x2000 }, + { 0x1200, 0xff60, 0x0000 }, + { 0x1600, 0xff62, 0x0000 }, + { 0x9000, 0xff65, 0x2000 }, + { 0x1500, 0xff64, 0x0000 }, + { 0x0700, 0xff66, 0x0000 }, + { 0x8700, 0xff6b, 0x3000 }, + { 0x8700, 0xff69, 0x2000 }, + { 0x0700, 0xff68, 0x0000 }, + { 0x0700, 0xff6a, 0x0000 }, + { 0x8700, 0xff6d, 0x2000 }, + { 0x0700, 0xff6c, 0x0000 }, + { 0x0700, 0xff6e, 0x0000 }, + { 0x8700, 0xff8f, 0x6000 }, + { 0x8700, 0xff7f, 0x5000 }, + { 0x8700, 0xff77, 0x4000 }, + { 0x8700, 0xff73, 0x3000 }, + { 0x8700, 0xff71, 0x2000 }, + { 0x0600, 0xff70, 0x0000 }, + { 0x0700, 0xff72, 0x0000 }, + { 0x8700, 0xff75, 0x2000 }, + { 0x0700, 0xff74, 0x0000 }, + { 0x0700, 0xff76, 0x0000 }, + { 0x8700, 0xff7b, 0x3000 }, + { 0x8700, 0xff79, 0x2000 }, + { 0x0700, 0xff78, 0x0000 }, + { 0x0700, 0xff7a, 0x0000 }, + { 0x8700, 0xff7d, 0x2000 }, + { 0x0700, 0xff7c, 0x0000 }, + { 0x0700, 0xff7e, 0x0000 }, + { 0x8700, 0xff87, 0x4000 }, + { 0x8700, 0xff83, 0x3000 }, + { 0x8700, 0xff81, 0x2000 }, + { 0x0700, 0xff80, 0x0000 }, + { 0x0700, 0xff82, 0x0000 }, + { 0x8700, 0xff85, 0x2000 }, + { 0x0700, 0xff84, 0x0000 }, + { 0x0700, 0xff86, 0x0000 }, + { 0x8700, 0xff8b, 0x3000 }, + { 0x8700, 0xff89, 0x2000 }, + { 0x0700, 0xff88, 0x0000 }, + { 0x0700, 0xff8a, 0x0000 }, + { 0x8700, 0xff8d, 0x2000 }, + { 0x0700, 0xff8c, 0x0000 }, + { 0x0700, 0xff8e, 0x0000 }, + { 0x8600, 0xff9f, 0x5000 }, + { 0x8700, 0xff97, 0x4000 }, + { 0x8700, 0xff93, 0x3000 }, + { 0x8700, 0xff91, 0x2000 }, + { 0x0700, 0xff90, 0x0000 }, + { 0x0700, 0xff92, 0x0000 }, + { 0x8700, 0xff95, 0x2000 }, + { 0x0700, 0xff94, 0x0000 }, + { 0x0700, 0xff96, 0x0000 }, + { 0x8700, 0xff9b, 0x3000 }, + { 0x8700, 0xff99, 0x2000 }, + { 0x0700, 0xff98, 0x0000 }, + { 0x0700, 0xff9a, 0x0000 }, + { 0x8700, 0xff9d, 0x2000 }, + { 0x0700, 0xff9c, 0x0000 }, + { 0x0600, 0xff9e, 0x0000 }, + { 0x8700, 0xffa7, 0x4000 }, + { 0x8700, 0xffa3, 0x3000 }, + { 0x8700, 0xffa1, 0x2000 }, + { 0x0700, 0xffa0, 0x0000 }, + { 0x0700, 0xffa2, 0x0000 }, + { 0x8700, 0xffa5, 0x2000 }, + { 0x0700, 0xffa4, 0x0000 }, + { 0x0700, 0xffa6, 0x0000 }, + { 0x8700, 0xffab, 0x3000 }, + { 0x8700, 0xffa9, 0x2000 }, + { 0x0700, 0xffa8, 0x0000 }, + { 0x0700, 0xffaa, 0x0000 }, + { 0x8700, 0xffad, 0x2000 }, + { 0x0700, 0xffac, 0x0000 }, + { 0x0700, 0xffae, 0x0000 }, + { 0x8701, 0x004c, 0x8000 }, + { 0x8701, 0x0008, 0x7000 }, + { 0x8700, 0xffd6, 0x6000 }, + { 0x8700, 0xffc2, 0x5000 }, + { 0x8700, 0xffb7, 0x4000 }, + { 0x8700, 0xffb3, 0x3000 }, + { 0x8700, 0xffb1, 0x2000 }, + { 0x0700, 0xffb0, 0x0000 }, + { 0x0700, 0xffb2, 0x0000 }, + { 0x8700, 0xffb5, 0x2000 }, + { 0x0700, 0xffb4, 0x0000 }, + { 0x0700, 0xffb6, 0x0000 }, + { 0x8700, 0xffbb, 0x3000 }, + { 0x8700, 0xffb9, 0x2000 }, + { 0x0700, 0xffb8, 0x0000 }, + { 0x0700, 0xffba, 0x0000 }, + { 0x8700, 0xffbd, 0x2000 }, + { 0x0700, 0xffbc, 0x0000 }, + { 0x0700, 0xffbe, 0x0000 }, + { 0x8700, 0xffcc, 0x4000 }, + { 0x8700, 0xffc6, 0x3000 }, + { 0x8700, 0xffc4, 0x2000 }, + { 0x0700, 0xffc3, 0x0000 }, + { 0x0700, 0xffc5, 0x0000 }, + { 0x8700, 0xffca, 0x2000 }, + { 0x0700, 0xffc7, 0x0000 }, + { 0x0700, 0xffcb, 0x0000 }, + { 0x8700, 0xffd2, 0x3000 }, + { 0x8700, 0xffce, 0x2000 }, + { 0x0700, 0xffcd, 0x0000 }, + { 0x0700, 0xffcf, 0x0000 }, + { 0x8700, 0xffd4, 0x2000 }, + { 0x0700, 0xffd3, 0x0000 }, + { 0x0700, 0xffd5, 0x0000 }, + { 0x9900, 0xffec, 0x5000 }, + { 0x9800, 0xffe3, 0x4000 }, + { 0x8700, 0xffdc, 0x3000 }, + { 0x8700, 0xffda, 0x2000 }, + { 0x0700, 0xffd7, 0x0000 }, + { 0x0700, 0xffdb, 0x0000 }, + { 0x9700, 0xffe1, 0x2000 }, + { 0x1700, 0xffe0, 0x0000 }, + { 0x1900, 0xffe2, 0x0000 }, + { 0x9a00, 0xffe8, 0x3000 }, + { 0x9700, 0xffe5, 0x2000 }, + { 0x1a00, 0xffe4, 0x0000 }, + { 0x1700, 0xffe6, 0x0000 }, + { 0x9900, 0xffea, 0x2000 }, + { 0x1900, 0xffe9, 0x0000 }, + { 0x1900, 0xffeb, 0x0000 }, + { 0x8701, 0x0000, 0x4000 }, + { 0x8100, 0xfffa, 0x3000 }, + { 0x9a00, 0xffee, 0x2000 }, + { 0x1a00, 0xffed, 0x0000 }, + { 0x0100, 0xfff9, 0x0000 }, + { 0x9a00, 0xfffc, 0x2000 }, + { 0x0100, 0xfffb, 0x0000 }, + { 0x1a00, 0xfffd, 0x0000 }, + { 0x8701, 0x0004, 0x3000 }, + { 0x8701, 0x0002, 0x2000 }, + { 0x0701, 0x0001, 0x0000 }, + { 0x0701, 0x0003, 0x0000 }, + { 0x8701, 0x0006, 0x2000 }, + { 0x0701, 0x0005, 0x0000 }, + { 0x0701, 0x0007, 0x0000 }, + { 0x8701, 0x002a, 0x6000 }, + { 0x8701, 0x0019, 0x5000 }, + { 0x8701, 0x0011, 0x4000 }, + { 0x8701, 0x000d, 0x3000 }, + { 0x8701, 0x000a, 0x2000 }, + { 0x0701, 0x0009, 0x0000 }, + { 0x0701, 0x000b, 0x0000 }, + { 0x8701, 0x000f, 0x2000 }, + { 0x0701, 0x000e, 0x0000 }, + { 0x0701, 0x0010, 0x0000 }, + { 0x8701, 0x0015, 0x3000 }, + { 0x8701, 0x0013, 0x2000 }, + { 0x0701, 0x0012, 0x0000 }, + { 0x0701, 0x0014, 0x0000 }, + { 0x8701, 0x0017, 0x2000 }, + { 0x0701, 0x0016, 0x0000 }, + { 0x0701, 0x0018, 0x0000 }, + { 0x8701, 0x0021, 0x4000 }, + { 0x8701, 0x001d, 0x3000 }, + { 0x8701, 0x001b, 0x2000 }, + { 0x0701, 0x001a, 0x0000 }, + { 0x0701, 0x001c, 0x0000 }, + { 0x8701, 0x001f, 0x2000 }, + { 0x0701, 0x001e, 0x0000 }, + { 0x0701, 0x0020, 0x0000 }, + { 0x8701, 0x0025, 0x3000 }, + { 0x8701, 0x0023, 0x2000 }, + { 0x0701, 0x0022, 0x0000 }, + { 0x0701, 0x0024, 0x0000 }, + { 0x8701, 0x0028, 0x2000 }, + { 0x0701, 0x0026, 0x0000 }, + { 0x0701, 0x0029, 0x0000 }, + { 0x8701, 0x003a, 0x5000 }, + { 0x8701, 0x0032, 0x4000 }, + { 0x8701, 0x002e, 0x3000 }, + { 0x8701, 0x002c, 0x2000 }, + { 0x0701, 0x002b, 0x0000 }, + { 0x0701, 0x002d, 0x0000 }, + { 0x8701, 0x0030, 0x2000 }, + { 0x0701, 0x002f, 0x0000 }, + { 0x0701, 0x0031, 0x0000 }, + { 0x8701, 0x0036, 0x3000 }, + { 0x8701, 0x0034, 0x2000 }, + { 0x0701, 0x0033, 0x0000 }, + { 0x0701, 0x0035, 0x0000 }, + { 0x8701, 0x0038, 0x2000 }, + { 0x0701, 0x0037, 0x0000 }, + { 0x0701, 0x0039, 0x0000 }, + { 0x8701, 0x0044, 0x4000 }, + { 0x8701, 0x0040, 0x3000 }, + { 0x8701, 0x003d, 0x2000 }, + { 0x0701, 0x003c, 0x0000 }, + { 0x0701, 0x003f, 0x0000 }, + { 0x8701, 0x0042, 0x2000 }, + { 0x0701, 0x0041, 0x0000 }, + { 0x0701, 0x0043, 0x0000 }, + { 0x8701, 0x0048, 0x3000 }, + { 0x8701, 0x0046, 0x2000 }, + { 0x0701, 0x0045, 0x0000 }, + { 0x0701, 0x0047, 0x0000 }, + { 0x8701, 0x004a, 0x2000 }, + { 0x0701, 0x0049, 0x0000 }, + { 0x0701, 0x004b, 0x0000 }, + { 0x8701, 0x00b0, 0x7000 }, + { 0x8701, 0x0090, 0x6000 }, + { 0x8701, 0x0080, 0x5000 }, + { 0x8701, 0x0056, 0x4000 }, + { 0x8701, 0x0052, 0x3000 }, + { 0x8701, 0x0050, 0x2000 }, + { 0x0701, 0x004d, 0x0000 }, + { 0x0701, 0x0051, 0x0000 }, + { 0x8701, 0x0054, 0x2000 }, + { 0x0701, 0x0053, 0x0000 }, + { 0x0701, 0x0055, 0x0000 }, + { 0x8701, 0x005a, 0x3000 }, + { 0x8701, 0x0058, 0x2000 }, + { 0x0701, 0x0057, 0x0000 }, + { 0x0701, 0x0059, 0x0000 }, + { 0x8701, 0x005c, 0x2000 }, + { 0x0701, 0x005b, 0x0000 }, + { 0x0701, 0x005d, 0x0000 }, + { 0x8701, 0x0088, 0x4000 }, + { 0x8701, 0x0084, 0x3000 }, + { 0x8701, 0x0082, 0x2000 }, + { 0x0701, 0x0081, 0x0000 }, + { 0x0701, 0x0083, 0x0000 }, + { 0x8701, 0x0086, 0x2000 }, + { 0x0701, 0x0085, 0x0000 }, + { 0x0701, 0x0087, 0x0000 }, + { 0x8701, 0x008c, 0x3000 }, + { 0x8701, 0x008a, 0x2000 }, + { 0x0701, 0x0089, 0x0000 }, + { 0x0701, 0x008b, 0x0000 }, + { 0x8701, 0x008e, 0x2000 }, + { 0x0701, 0x008d, 0x0000 }, + { 0x0701, 0x008f, 0x0000 }, + { 0x8701, 0x00a0, 0x5000 }, + { 0x8701, 0x0098, 0x4000 }, + { 0x8701, 0x0094, 0x3000 }, + { 0x8701, 0x0092, 0x2000 }, + { 0x0701, 0x0091, 0x0000 }, + { 0x0701, 0x0093, 0x0000 }, + { 0x8701, 0x0096, 0x2000 }, + { 0x0701, 0x0095, 0x0000 }, + { 0x0701, 0x0097, 0x0000 }, + { 0x8701, 0x009c, 0x3000 }, + { 0x8701, 0x009a, 0x2000 }, + { 0x0701, 0x0099, 0x0000 }, + { 0x0701, 0x009b, 0x0000 }, + { 0x8701, 0x009e, 0x2000 }, + { 0x0701, 0x009d, 0x0000 }, + { 0x0701, 0x009f, 0x0000 }, + { 0x8701, 0x00a8, 0x4000 }, + { 0x8701, 0x00a4, 0x3000 }, + { 0x8701, 0x00a2, 0x2000 }, + { 0x0701, 0x00a1, 0x0000 }, + { 0x0701, 0x00a3, 0x0000 }, + { 0x8701, 0x00a6, 0x2000 }, + { 0x0701, 0x00a5, 0x0000 }, + { 0x0701, 0x00a7, 0x0000 }, + { 0x8701, 0x00ac, 0x3000 }, + { 0x8701, 0x00aa, 0x2000 }, + { 0x0701, 0x00a9, 0x0000 }, + { 0x0701, 0x00ab, 0x0000 }, + { 0x8701, 0x00ae, 0x2000 }, + { 0x0701, 0x00ad, 0x0000 }, + { 0x0701, 0x00af, 0x0000 }, + { 0x8701, 0x00d0, 0x6000 }, + { 0x8701, 0x00c0, 0x5000 }, + { 0x8701, 0x00b8, 0x4000 }, + { 0x8701, 0x00b4, 0x3000 }, + { 0x8701, 0x00b2, 0x2000 }, + { 0x0701, 0x00b1, 0x0000 }, + { 0x0701, 0x00b3, 0x0000 }, + { 0x8701, 0x00b6, 0x2000 }, + { 0x0701, 0x00b5, 0x0000 }, + { 0x0701, 0x00b7, 0x0000 }, + { 0x8701, 0x00bc, 0x3000 }, + { 0x8701, 0x00ba, 0x2000 }, + { 0x0701, 0x00b9, 0x0000 }, + { 0x0701, 0x00bb, 0x0000 }, + { 0x8701, 0x00be, 0x2000 }, + { 0x0701, 0x00bd, 0x0000 }, + { 0x0701, 0x00bf, 0x0000 }, + { 0x8701, 0x00c8, 0x4000 }, + { 0x8701, 0x00c4, 0x3000 }, + { 0x8701, 0x00c2, 0x2000 }, + { 0x0701, 0x00c1, 0x0000 }, + { 0x0701, 0x00c3, 0x0000 }, + { 0x8701, 0x00c6, 0x2000 }, + { 0x0701, 0x00c5, 0x0000 }, + { 0x0701, 0x00c7, 0x0000 }, + { 0x8701, 0x00cc, 0x3000 }, + { 0x8701, 0x00ca, 0x2000 }, + { 0x0701, 0x00c9, 0x0000 }, + { 0x0701, 0x00cb, 0x0000 }, + { 0x8701, 0x00ce, 0x2000 }, + { 0x0701, 0x00cd, 0x0000 }, + { 0x0701, 0x00cf, 0x0000 }, + { 0x8701, 0x00e0, 0x5000 }, + { 0x8701, 0x00d8, 0x4000 }, + { 0x8701, 0x00d4, 0x3000 }, + { 0x8701, 0x00d2, 0x2000 }, + { 0x0701, 0x00d1, 0x0000 }, + { 0x0701, 0x00d3, 0x0000 }, + { 0x8701, 0x00d6, 0x2000 }, + { 0x0701, 0x00d5, 0x0000 }, + { 0x0701, 0x00d7, 0x0000 }, + { 0x8701, 0x00dc, 0x3000 }, + { 0x8701, 0x00da, 0x2000 }, + { 0x0701, 0x00d9, 0x0000 }, + { 0x0701, 0x00db, 0x0000 }, + { 0x8701, 0x00de, 0x2000 }, + { 0x0701, 0x00dd, 0x0000 }, + { 0x0701, 0x00df, 0x0000 }, + { 0x8701, 0x00e8, 0x4000 }, + { 0x8701, 0x00e4, 0x3000 }, + { 0x8701, 0x00e2, 0x2000 }, + { 0x0701, 0x00e1, 0x0000 }, + { 0x0701, 0x00e3, 0x0000 }, + { 0x8701, 0x00e6, 0x2000 }, + { 0x0701, 0x00e5, 0x0000 }, + { 0x0701, 0x00e7, 0x0000 }, + { 0x8701, 0x00ec, 0x3000 }, + { 0x8701, 0x00ea, 0x2000 }, + { 0x0701, 0x00e9, 0x0000 }, + { 0x0701, 0x00eb, 0x0000 }, + { 0x8701, 0x00ee, 0x2000 }, + { 0x0701, 0x00ed, 0x0000 }, + { 0x0701, 0x00ef, 0x0000 }, + { 0x8501, 0xd459, 0xb000 }, + { 0x9a01, 0xd080, 0xa000 }, + { 0x8701, 0x045f, 0x9000 }, + { 0x8701, 0x0349, 0x8000 }, + { 0x9a01, 0x013c, 0x7000 }, + { 0x8f01, 0x0119, 0x6000 }, + { 0x8f01, 0x0109, 0x5000 }, + { 0x8701, 0x00f8, 0x4000 }, + { 0x8701, 0x00f4, 0x3000 }, + { 0x8701, 0x00f2, 0x2000 }, + { 0x0701, 0x00f1, 0x0000 }, + { 0x0701, 0x00f3, 0x0000 }, + { 0x8701, 0x00f6, 0x2000 }, + { 0x0701, 0x00f5, 0x0000 }, + { 0x0701, 0x00f7, 0x0000 }, + { 0x9501, 0x0101, 0x3000 }, + { 0x8701, 0x00fa, 0x2000 }, + { 0x0701, 0x00f9, 0x0000 }, + { 0x1501, 0x0100, 0x0000 }, + { 0x8f01, 0x0107, 0x2000 }, + { 0x1a01, 0x0102, 0x0000 }, + { 0x0f01, 0x0108, 0x0000 }, + { 0x8f01, 0x0111, 0x4000 }, + { 0x8f01, 0x010d, 0x3000 }, + { 0x8f01, 0x010b, 0x2000 }, + { 0x0f01, 0x010a, 0x0000 }, + { 0x0f01, 0x010c, 0x0000 }, + { 0x8f01, 0x010f, 0x2000 }, + { 0x0f01, 0x010e, 0x0000 }, + { 0x0f01, 0x0110, 0x0000 }, + { 0x8f01, 0x0115, 0x3000 }, + { 0x8f01, 0x0113, 0x2000 }, + { 0x0f01, 0x0112, 0x0000 }, + { 0x0f01, 0x0114, 0x0000 }, + { 0x8f01, 0x0117, 0x2000 }, + { 0x0f01, 0x0116, 0x0000 }, + { 0x0f01, 0x0118, 0x0000 }, + { 0x8f01, 0x0129, 0x5000 }, + { 0x8f01, 0x0121, 0x4000 }, + { 0x8f01, 0x011d, 0x3000 }, + { 0x8f01, 0x011b, 0x2000 }, + { 0x0f01, 0x011a, 0x0000 }, + { 0x0f01, 0x011c, 0x0000 }, + { 0x8f01, 0x011f, 0x2000 }, + { 0x0f01, 0x011e, 0x0000 }, + { 0x0f01, 0x0120, 0x0000 }, + { 0x8f01, 0x0125, 0x3000 }, + { 0x8f01, 0x0123, 0x2000 }, + { 0x0f01, 0x0122, 0x0000 }, + { 0x0f01, 0x0124, 0x0000 }, + { 0x8f01, 0x0127, 0x2000 }, + { 0x0f01, 0x0126, 0x0000 }, + { 0x0f01, 0x0128, 0x0000 }, + { 0x8f01, 0x0131, 0x4000 }, + { 0x8f01, 0x012d, 0x3000 }, + { 0x8f01, 0x012b, 0x2000 }, + { 0x0f01, 0x012a, 0x0000 }, + { 0x0f01, 0x012c, 0x0000 }, + { 0x8f01, 0x012f, 0x2000 }, + { 0x0f01, 0x012e, 0x0000 }, + { 0x0f01, 0x0130, 0x0000 }, + { 0x9a01, 0x0138, 0x3000 }, + { 0x8f01, 0x0133, 0x2000 }, + { 0x0f01, 0x0132, 0x0000 }, + { 0x1a01, 0x0137, 0x0000 }, + { 0x9a01, 0x013a, 0x2000 }, + { 0x1a01, 0x0139, 0x0000 }, + { 0x1a01, 0x013b, 0x0000 }, + { 0x8701, 0x031c, 0x6000 }, + { 0x8701, 0x030c, 0x5000 }, + { 0x8701, 0x0304, 0x4000 }, + { 0x8701, 0x0300, 0x3000 }, + { 0x9a01, 0x013e, 0x2000 }, + { 0x1a01, 0x013d, 0x0000 }, + { 0x1a01, 0x013f, 0x0000 }, + { 0x8701, 0x0302, 0x2000 }, + { 0x0701, 0x0301, 0x0000 }, + { 0x0701, 0x0303, 0x0000 }, + { 0x8701, 0x0308, 0x3000 }, + { 0x8701, 0x0306, 0x2000 }, + { 0x0701, 0x0305, 0x0000 }, + { 0x0701, 0x0307, 0x0000 }, + { 0x8701, 0x030a, 0x2000 }, + { 0x0701, 0x0309, 0x0000 }, + { 0x0701, 0x030b, 0x0000 }, + { 0x8701, 0x0314, 0x4000 }, + { 0x8701, 0x0310, 0x3000 }, + { 0x8701, 0x030e, 0x2000 }, + { 0x0701, 0x030d, 0x0000 }, + { 0x0701, 0x030f, 0x0000 }, + { 0x8701, 0x0312, 0x2000 }, + { 0x0701, 0x0311, 0x0000 }, + { 0x0701, 0x0313, 0x0000 }, + { 0x8701, 0x0318, 0x3000 }, + { 0x8701, 0x0316, 0x2000 }, + { 0x0701, 0x0315, 0x0000 }, + { 0x0701, 0x0317, 0x0000 }, + { 0x8701, 0x031a, 0x2000 }, + { 0x0701, 0x0319, 0x0000 }, + { 0x0701, 0x031b, 0x0000 }, + { 0x8701, 0x0339, 0x5000 }, + { 0x8701, 0x0331, 0x4000 }, + { 0x8f01, 0x0321, 0x3000 }, + { 0x8701, 0x031e, 0x2000 }, + { 0x0701, 0x031d, 0x0000 }, + { 0x0f01, 0x0320, 0x0000 }, + { 0x8f01, 0x0323, 0x2000 }, + { 0x0f01, 0x0322, 0x0000 }, + { 0x0701, 0x0330, 0x0000 }, + { 0x8701, 0x0335, 0x3000 }, + { 0x8701, 0x0333, 0x2000 }, + { 0x0701, 0x0332, 0x0000 }, + { 0x0701, 0x0334, 0x0000 }, + { 0x8701, 0x0337, 0x2000 }, + { 0x0701, 0x0336, 0x0000 }, + { 0x0701, 0x0338, 0x0000 }, + { 0x8701, 0x0341, 0x4000 }, + { 0x8701, 0x033d, 0x3000 }, + { 0x8701, 0x033b, 0x2000 }, + { 0x0701, 0x033a, 0x0000 }, + { 0x0701, 0x033c, 0x0000 }, + { 0x8701, 0x033f, 0x2000 }, + { 0x0701, 0x033e, 0x0000 }, + { 0x0701, 0x0340, 0x0000 }, + { 0x8701, 0x0345, 0x3000 }, + { 0x8701, 0x0343, 0x2000 }, + { 0x0701, 0x0342, 0x0000 }, + { 0x0701, 0x0344, 0x0000 }, + { 0x8701, 0x0347, 0x2000 }, + { 0x0701, 0x0346, 0x0000 }, + { 0x0701, 0x0348, 0x0000 }, + { 0x8901, 0x041f, 0x7028 }, + { 0x9501, 0x039f, 0x6000 }, + { 0x8701, 0x038e, 0x5000 }, + { 0x8701, 0x0386, 0x4000 }, + { 0x8701, 0x0382, 0x3000 }, + { 0x8701, 0x0380, 0x2000 }, + { 0x0e01, 0x034a, 0x0000 }, + { 0x0701, 0x0381, 0x0000 }, + { 0x8701, 0x0384, 0x2000 }, + { 0x0701, 0x0383, 0x0000 }, + { 0x0701, 0x0385, 0x0000 }, + { 0x8701, 0x038a, 0x3000 }, + { 0x8701, 0x0388, 0x2000 }, + { 0x0701, 0x0387, 0x0000 }, + { 0x0701, 0x0389, 0x0000 }, + { 0x8701, 0x038c, 0x2000 }, + { 0x0701, 0x038b, 0x0000 }, + { 0x0701, 0x038d, 0x0000 }, + { 0x8701, 0x0396, 0x4000 }, + { 0x8701, 0x0392, 0x3000 }, + { 0x8701, 0x0390, 0x2000 }, + { 0x0701, 0x038f, 0x0000 }, + { 0x0701, 0x0391, 0x0000 }, + { 0x8701, 0x0394, 0x2000 }, + { 0x0701, 0x0393, 0x0000 }, + { 0x0701, 0x0395, 0x0000 }, + { 0x8701, 0x039a, 0x3000 }, + { 0x8701, 0x0398, 0x2000 }, + { 0x0701, 0x0397, 0x0000 }, + { 0x0701, 0x0399, 0x0000 }, + { 0x8701, 0x039c, 0x2000 }, + { 0x0701, 0x039b, 0x0000 }, + { 0x0701, 0x039d, 0x0000 }, + { 0x8901, 0x040f, 0x5028 }, + { 0x8901, 0x0407, 0x4028 }, + { 0x8901, 0x0403, 0x3028 }, + { 0x8901, 0x0401, 0x2028 }, + { 0x0901, 0x0400, 0x0028 }, + { 0x0901, 0x0402, 0x0028 }, + { 0x8901, 0x0405, 0x2028 }, + { 0x0901, 0x0404, 0x0028 }, + { 0x0901, 0x0406, 0x0028 }, + { 0x8901, 0x040b, 0x3028 }, + { 0x8901, 0x0409, 0x2028 }, + { 0x0901, 0x0408, 0x0028 }, + { 0x0901, 0x040a, 0x0028 }, + { 0x8901, 0x040d, 0x2028 }, + { 0x0901, 0x040c, 0x0028 }, + { 0x0901, 0x040e, 0x0028 }, + { 0x8901, 0x0417, 0x4028 }, + { 0x8901, 0x0413, 0x3028 }, + { 0x8901, 0x0411, 0x2028 }, + { 0x0901, 0x0410, 0x0028 }, + { 0x0901, 0x0412, 0x0028 }, + { 0x8901, 0x0415, 0x2028 }, + { 0x0901, 0x0414, 0x0028 }, + { 0x0901, 0x0416, 0x0028 }, + { 0x8901, 0x041b, 0x3028 }, + { 0x8901, 0x0419, 0x2028 }, + { 0x0901, 0x0418, 0x0028 }, + { 0x0901, 0x041a, 0x0028 }, + { 0x8901, 0x041d, 0x2028 }, + { 0x0901, 0x041c, 0x0028 }, + { 0x0901, 0x041e, 0x0028 }, + { 0x8501, 0x043f, 0x6fd8 }, + { 0x8501, 0x042f, 0x5fd8 }, + { 0x8901, 0x0427, 0x4028 }, + { 0x8901, 0x0423, 0x3028 }, + { 0x8901, 0x0421, 0x2028 }, + { 0x0901, 0x0420, 0x0028 }, + { 0x0901, 0x0422, 0x0028 }, + { 0x8901, 0x0425, 0x2028 }, + { 0x0901, 0x0424, 0x0028 }, + { 0x0901, 0x0426, 0x0028 }, + { 0x8501, 0x042b, 0x3fd8 }, + { 0x8501, 0x0429, 0x2fd8 }, + { 0x0501, 0x0428, 0x0fd8 }, + { 0x0501, 0x042a, 0x0fd8 }, + { 0x8501, 0x042d, 0x2fd8 }, + { 0x0501, 0x042c, 0x0fd8 }, + { 0x0501, 0x042e, 0x0fd8 }, + { 0x8501, 0x0437, 0x4fd8 }, + { 0x8501, 0x0433, 0x3fd8 }, + { 0x8501, 0x0431, 0x2fd8 }, + { 0x0501, 0x0430, 0x0fd8 }, + { 0x0501, 0x0432, 0x0fd8 }, + { 0x8501, 0x0435, 0x2fd8 }, + { 0x0501, 0x0434, 0x0fd8 }, + { 0x0501, 0x0436, 0x0fd8 }, + { 0x8501, 0x043b, 0x3fd8 }, + { 0x8501, 0x0439, 0x2fd8 }, + { 0x0501, 0x0438, 0x0fd8 }, + { 0x0501, 0x043a, 0x0fd8 }, + { 0x8501, 0x043d, 0x2fd8 }, + { 0x0501, 0x043c, 0x0fd8 }, + { 0x0501, 0x043e, 0x0fd8 }, + { 0x8501, 0x044f, 0x5fd8 }, + { 0x8501, 0x0447, 0x4fd8 }, + { 0x8501, 0x0443, 0x3fd8 }, + { 0x8501, 0x0441, 0x2fd8 }, + { 0x0501, 0x0440, 0x0fd8 }, + { 0x0501, 0x0442, 0x0fd8 }, + { 0x8501, 0x0445, 0x2fd8 }, + { 0x0501, 0x0444, 0x0fd8 }, + { 0x0501, 0x0446, 0x0fd8 }, + { 0x8501, 0x044b, 0x3fd8 }, + { 0x8501, 0x0449, 0x2fd8 }, + { 0x0501, 0x0448, 0x0fd8 }, + { 0x0501, 0x044a, 0x0fd8 }, + { 0x8501, 0x044d, 0x2fd8 }, + { 0x0501, 0x044c, 0x0fd8 }, + { 0x0501, 0x044e, 0x0fd8 }, + { 0x8701, 0x0457, 0x4000 }, + { 0x8701, 0x0453, 0x3000 }, + { 0x8701, 0x0451, 0x2000 }, + { 0x0701, 0x0450, 0x0000 }, + { 0x0701, 0x0452, 0x0000 }, + { 0x8701, 0x0455, 0x2000 }, + { 0x0701, 0x0454, 0x0000 }, + { 0x0701, 0x0456, 0x0000 }, + { 0x8701, 0x045b, 0x3000 }, + { 0x8701, 0x0459, 0x2000 }, + { 0x0701, 0x0458, 0x0000 }, + { 0x0701, 0x045a, 0x0000 }, + { 0x8701, 0x045d, 0x2000 }, + { 0x0701, 0x045c, 0x0000 }, + { 0x0701, 0x045e, 0x0000 }, + { 0x9a01, 0xd000, 0x8000 }, + { 0x8d01, 0x04a1, 0x7000 }, + { 0x8701, 0x047f, 0x6000 }, + { 0x8701, 0x046f, 0x5000 }, + { 0x8701, 0x0467, 0x4000 }, + { 0x8701, 0x0463, 0x3000 }, + { 0x8701, 0x0461, 0x2000 }, + { 0x0701, 0x0460, 0x0000 }, + { 0x0701, 0x0462, 0x0000 }, + { 0x8701, 0x0465, 0x2000 }, + { 0x0701, 0x0464, 0x0000 }, + { 0x0701, 0x0466, 0x0000 }, + { 0x8701, 0x046b, 0x3000 }, + { 0x8701, 0x0469, 0x2000 }, + { 0x0701, 0x0468, 0x0000 }, + { 0x0701, 0x046a, 0x0000 }, + { 0x8701, 0x046d, 0x2000 }, + { 0x0701, 0x046c, 0x0000 }, + { 0x0701, 0x046e, 0x0000 }, + { 0x8701, 0x0477, 0x4000 }, + { 0x8701, 0x0473, 0x3000 }, + { 0x8701, 0x0471, 0x2000 }, + { 0x0701, 0x0470, 0x0000 }, + { 0x0701, 0x0472, 0x0000 }, + { 0x8701, 0x0475, 0x2000 }, + { 0x0701, 0x0474, 0x0000 }, + { 0x0701, 0x0476, 0x0000 }, + { 0x8701, 0x047b, 0x3000 }, + { 0x8701, 0x0479, 0x2000 }, + { 0x0701, 0x0478, 0x0000 }, + { 0x0701, 0x047a, 0x0000 }, + { 0x8701, 0x047d, 0x2000 }, + { 0x0701, 0x047c, 0x0000 }, + { 0x0701, 0x047e, 0x0000 }, + { 0x8701, 0x048f, 0x5000 }, + { 0x8701, 0x0487, 0x4000 }, + { 0x8701, 0x0483, 0x3000 }, + { 0x8701, 0x0481, 0x2000 }, + { 0x0701, 0x0480, 0x0000 }, + { 0x0701, 0x0482, 0x0000 }, + { 0x8701, 0x0485, 0x2000 }, + { 0x0701, 0x0484, 0x0000 }, + { 0x0701, 0x0486, 0x0000 }, + { 0x8701, 0x048b, 0x3000 }, + { 0x8701, 0x0489, 0x2000 }, + { 0x0701, 0x0488, 0x0000 }, + { 0x0701, 0x048a, 0x0000 }, + { 0x8701, 0x048d, 0x2000 }, + { 0x0701, 0x048c, 0x0000 }, + { 0x0701, 0x048e, 0x0000 }, + { 0x8701, 0x0497, 0x4000 }, + { 0x8701, 0x0493, 0x3000 }, + { 0x8701, 0x0491, 0x2000 }, + { 0x0701, 0x0490, 0x0000 }, + { 0x0701, 0x0492, 0x0000 }, + { 0x8701, 0x0495, 0x2000 }, + { 0x0701, 0x0494, 0x0000 }, + { 0x0701, 0x0496, 0x0000 }, + { 0x8701, 0x049b, 0x3000 }, + { 0x8701, 0x0499, 0x2000 }, + { 0x0701, 0x0498, 0x0000 }, + { 0x0701, 0x049a, 0x0000 }, + { 0x8701, 0x049d, 0x2000 }, + { 0x0701, 0x049c, 0x0000 }, + { 0x0d01, 0x04a0, 0x0000 }, + { 0x8701, 0x081a, 0x6000 }, + { 0x8701, 0x080a, 0x5000 }, + { 0x8d01, 0x04a9, 0x4000 }, + { 0x8d01, 0x04a5, 0x3000 }, + { 0x8d01, 0x04a3, 0x2000 }, + { 0x0d01, 0x04a2, 0x0000 }, + { 0x0d01, 0x04a4, 0x0000 }, + { 0x8d01, 0x04a7, 0x2000 }, + { 0x0d01, 0x04a6, 0x0000 }, + { 0x0d01, 0x04a8, 0x0000 }, + { 0x8701, 0x0803, 0x3000 }, + { 0x8701, 0x0801, 0x2000 }, + { 0x0701, 0x0800, 0x0000 }, + { 0x0701, 0x0802, 0x0000 }, + { 0x8701, 0x0805, 0x2000 }, + { 0x0701, 0x0804, 0x0000 }, + { 0x0701, 0x0808, 0x0000 }, + { 0x8701, 0x0812, 0x4000 }, + { 0x8701, 0x080e, 0x3000 }, + { 0x8701, 0x080c, 0x2000 }, + { 0x0701, 0x080b, 0x0000 }, + { 0x0701, 0x080d, 0x0000 }, + { 0x8701, 0x0810, 0x2000 }, + { 0x0701, 0x080f, 0x0000 }, + { 0x0701, 0x0811, 0x0000 }, + { 0x8701, 0x0816, 0x3000 }, + { 0x8701, 0x0814, 0x2000 }, + { 0x0701, 0x0813, 0x0000 }, + { 0x0701, 0x0815, 0x0000 }, + { 0x8701, 0x0818, 0x2000 }, + { 0x0701, 0x0817, 0x0000 }, + { 0x0701, 0x0819, 0x0000 }, + { 0x8701, 0x082a, 0x5000 }, + { 0x8701, 0x0822, 0x4000 }, + { 0x8701, 0x081e, 0x3000 }, + { 0x8701, 0x081c, 0x2000 }, + { 0x0701, 0x081b, 0x0000 }, + { 0x0701, 0x081d, 0x0000 }, + { 0x8701, 0x0820, 0x2000 }, + { 0x0701, 0x081f, 0x0000 }, + { 0x0701, 0x0821, 0x0000 }, + { 0x8701, 0x0826, 0x3000 }, + { 0x8701, 0x0824, 0x2000 }, + { 0x0701, 0x0823, 0x0000 }, + { 0x0701, 0x0825, 0x0000 }, + { 0x8701, 0x0828, 0x2000 }, + { 0x0701, 0x0827, 0x0000 }, + { 0x0701, 0x0829, 0x0000 }, + { 0x8701, 0x0832, 0x4000 }, + { 0x8701, 0x082e, 0x3000 }, + { 0x8701, 0x082c, 0x2000 }, + { 0x0701, 0x082b, 0x0000 }, + { 0x0701, 0x082d, 0x0000 }, + { 0x8701, 0x0830, 0x2000 }, + { 0x0701, 0x082f, 0x0000 }, + { 0x0701, 0x0831, 0x0000 }, + { 0x8701, 0x0837, 0x3000 }, + { 0x8701, 0x0834, 0x2000 }, + { 0x0701, 0x0833, 0x0000 }, + { 0x0701, 0x0835, 0x0000 }, + { 0x8701, 0x083c, 0x2000 }, + { 0x0701, 0x0838, 0x0000 }, + { 0x0701, 0x083f, 0x0000 }, + { 0x9a01, 0xd040, 0x7000 }, + { 0x9a01, 0xd020, 0x6000 }, + { 0x9a01, 0xd010, 0x5000 }, + { 0x9a01, 0xd008, 0x4000 }, + { 0x9a01, 0xd004, 0x3000 }, + { 0x9a01, 0xd002, 0x2000 }, + { 0x1a01, 0xd001, 0x0000 }, + { 0x1a01, 0xd003, 0x0000 }, + { 0x9a01, 0xd006, 0x2000 }, + { 0x1a01, 0xd005, 0x0000 }, + { 0x1a01, 0xd007, 0x0000 }, + { 0x9a01, 0xd00c, 0x3000 }, + { 0x9a01, 0xd00a, 0x2000 }, + { 0x1a01, 0xd009, 0x0000 }, + { 0x1a01, 0xd00b, 0x0000 }, + { 0x9a01, 0xd00e, 0x2000 }, + { 0x1a01, 0xd00d, 0x0000 }, + { 0x1a01, 0xd00f, 0x0000 }, + { 0x9a01, 0xd018, 0x4000 }, + { 0x9a01, 0xd014, 0x3000 }, + { 0x9a01, 0xd012, 0x2000 }, + { 0x1a01, 0xd011, 0x0000 }, + { 0x1a01, 0xd013, 0x0000 }, + { 0x9a01, 0xd016, 0x2000 }, + { 0x1a01, 0xd015, 0x0000 }, + { 0x1a01, 0xd017, 0x0000 }, + { 0x9a01, 0xd01c, 0x3000 }, + { 0x9a01, 0xd01a, 0x2000 }, + { 0x1a01, 0xd019, 0x0000 }, + { 0x1a01, 0xd01b, 0x0000 }, + { 0x9a01, 0xd01e, 0x2000 }, + { 0x1a01, 0xd01d, 0x0000 }, + { 0x1a01, 0xd01f, 0x0000 }, + { 0x9a01, 0xd030, 0x5000 }, + { 0x9a01, 0xd028, 0x4000 }, + { 0x9a01, 0xd024, 0x3000 }, + { 0x9a01, 0xd022, 0x2000 }, + { 0x1a01, 0xd021, 0x0000 }, + { 0x1a01, 0xd023, 0x0000 }, + { 0x9a01, 0xd026, 0x2000 }, + { 0x1a01, 0xd025, 0x0000 }, + { 0x1a01, 0xd027, 0x0000 }, + { 0x9a01, 0xd02c, 0x3000 }, + { 0x9a01, 0xd02a, 0x2000 }, + { 0x1a01, 0xd029, 0x0000 }, + { 0x1a01, 0xd02b, 0x0000 }, + { 0x9a01, 0xd02e, 0x2000 }, + { 0x1a01, 0xd02d, 0x0000 }, + { 0x1a01, 0xd02f, 0x0000 }, + { 0x9a01, 0xd038, 0x4000 }, + { 0x9a01, 0xd034, 0x3000 }, + { 0x9a01, 0xd032, 0x2000 }, + { 0x1a01, 0xd031, 0x0000 }, + { 0x1a01, 0xd033, 0x0000 }, + { 0x9a01, 0xd036, 0x2000 }, + { 0x1a01, 0xd035, 0x0000 }, + { 0x1a01, 0xd037, 0x0000 }, + { 0x9a01, 0xd03c, 0x3000 }, + { 0x9a01, 0xd03a, 0x2000 }, + { 0x1a01, 0xd039, 0x0000 }, + { 0x1a01, 0xd03b, 0x0000 }, + { 0x9a01, 0xd03e, 0x2000 }, + { 0x1a01, 0xd03d, 0x0000 }, + { 0x1a01, 0xd03f, 0x0000 }, + { 0x9a01, 0xd060, 0x6000 }, + { 0x9a01, 0xd050, 0x5000 }, + { 0x9a01, 0xd048, 0x4000 }, + { 0x9a01, 0xd044, 0x3000 }, + { 0x9a01, 0xd042, 0x2000 }, + { 0x1a01, 0xd041, 0x0000 }, + { 0x1a01, 0xd043, 0x0000 }, + { 0x9a01, 0xd046, 0x2000 }, + { 0x1a01, 0xd045, 0x0000 }, + { 0x1a01, 0xd047, 0x0000 }, + { 0x9a01, 0xd04c, 0x3000 }, + { 0x9a01, 0xd04a, 0x2000 }, + { 0x1a01, 0xd049, 0x0000 }, + { 0x1a01, 0xd04b, 0x0000 }, + { 0x9a01, 0xd04e, 0x2000 }, + { 0x1a01, 0xd04d, 0x0000 }, + { 0x1a01, 0xd04f, 0x0000 }, + { 0x9a01, 0xd058, 0x4000 }, + { 0x9a01, 0xd054, 0x3000 }, + { 0x9a01, 0xd052, 0x2000 }, + { 0x1a01, 0xd051, 0x0000 }, + { 0x1a01, 0xd053, 0x0000 }, + { 0x9a01, 0xd056, 0x2000 }, + { 0x1a01, 0xd055, 0x0000 }, + { 0x1a01, 0xd057, 0x0000 }, + { 0x9a01, 0xd05c, 0x3000 }, + { 0x9a01, 0xd05a, 0x2000 }, + { 0x1a01, 0xd059, 0x0000 }, + { 0x1a01, 0xd05b, 0x0000 }, + { 0x9a01, 0xd05e, 0x2000 }, + { 0x1a01, 0xd05d, 0x0000 }, + { 0x1a01, 0xd05f, 0x0000 }, + { 0x9a01, 0xd070, 0x5000 }, + { 0x9a01, 0xd068, 0x4000 }, + { 0x9a01, 0xd064, 0x3000 }, + { 0x9a01, 0xd062, 0x2000 }, + { 0x1a01, 0xd061, 0x0000 }, + { 0x1a01, 0xd063, 0x0000 }, + { 0x9a01, 0xd066, 0x2000 }, + { 0x1a01, 0xd065, 0x0000 }, + { 0x1a01, 0xd067, 0x0000 }, + { 0x9a01, 0xd06c, 0x3000 }, + { 0x9a01, 0xd06a, 0x2000 }, + { 0x1a01, 0xd069, 0x0000 }, + { 0x1a01, 0xd06b, 0x0000 }, + { 0x9a01, 0xd06e, 0x2000 }, + { 0x1a01, 0xd06d, 0x0000 }, + { 0x1a01, 0xd06f, 0x0000 }, + { 0x9a01, 0xd078, 0x4000 }, + { 0x9a01, 0xd074, 0x3000 }, + { 0x9a01, 0xd072, 0x2000 }, + { 0x1a01, 0xd071, 0x0000 }, + { 0x1a01, 0xd073, 0x0000 }, + { 0x9a01, 0xd076, 0x2000 }, + { 0x1a01, 0xd075, 0x0000 }, + { 0x1a01, 0xd077, 0x0000 }, + { 0x9a01, 0xd07c, 0x3000 }, + { 0x9a01, 0xd07a, 0x2000 }, + { 0x1a01, 0xd079, 0x0000 }, + { 0x1a01, 0xd07b, 0x0000 }, + { 0x9a01, 0xd07e, 0x2000 }, + { 0x1a01, 0xd07d, 0x0000 }, + { 0x1a01, 0xd07f, 0x0000 }, + { 0x9a01, 0xd18d, 0x9000 }, + { 0x9a01, 0xd10a, 0x8000 }, + { 0x9a01, 0xd0c0, 0x7000 }, + { 0x9a01, 0xd0a0, 0x6000 }, + { 0x9a01, 0xd090, 0x5000 }, + { 0x9a01, 0xd088, 0x4000 }, + { 0x9a01, 0xd084, 0x3000 }, + { 0x9a01, 0xd082, 0x2000 }, + { 0x1a01, 0xd081, 0x0000 }, + { 0x1a01, 0xd083, 0x0000 }, + { 0x9a01, 0xd086, 0x2000 }, + { 0x1a01, 0xd085, 0x0000 }, + { 0x1a01, 0xd087, 0x0000 }, + { 0x9a01, 0xd08c, 0x3000 }, + { 0x9a01, 0xd08a, 0x2000 }, + { 0x1a01, 0xd089, 0x0000 }, + { 0x1a01, 0xd08b, 0x0000 }, + { 0x9a01, 0xd08e, 0x2000 }, + { 0x1a01, 0xd08d, 0x0000 }, + { 0x1a01, 0xd08f, 0x0000 }, + { 0x9a01, 0xd098, 0x4000 }, + { 0x9a01, 0xd094, 0x3000 }, + { 0x9a01, 0xd092, 0x2000 }, + { 0x1a01, 0xd091, 0x0000 }, + { 0x1a01, 0xd093, 0x0000 }, + { 0x9a01, 0xd096, 0x2000 }, + { 0x1a01, 0xd095, 0x0000 }, + { 0x1a01, 0xd097, 0x0000 }, + { 0x9a01, 0xd09c, 0x3000 }, + { 0x9a01, 0xd09a, 0x2000 }, + { 0x1a01, 0xd099, 0x0000 }, + { 0x1a01, 0xd09b, 0x0000 }, + { 0x9a01, 0xd09e, 0x2000 }, + { 0x1a01, 0xd09d, 0x0000 }, + { 0x1a01, 0xd09f, 0x0000 }, + { 0x9a01, 0xd0b0, 0x5000 }, + { 0x9a01, 0xd0a8, 0x4000 }, + { 0x9a01, 0xd0a4, 0x3000 }, + { 0x9a01, 0xd0a2, 0x2000 }, + { 0x1a01, 0xd0a1, 0x0000 }, + { 0x1a01, 0xd0a3, 0x0000 }, + { 0x9a01, 0xd0a6, 0x2000 }, + { 0x1a01, 0xd0a5, 0x0000 }, + { 0x1a01, 0xd0a7, 0x0000 }, + { 0x9a01, 0xd0ac, 0x3000 }, + { 0x9a01, 0xd0aa, 0x2000 }, + { 0x1a01, 0xd0a9, 0x0000 }, + { 0x1a01, 0xd0ab, 0x0000 }, + { 0x9a01, 0xd0ae, 0x2000 }, + { 0x1a01, 0xd0ad, 0x0000 }, + { 0x1a01, 0xd0af, 0x0000 }, + { 0x9a01, 0xd0b8, 0x4000 }, + { 0x9a01, 0xd0b4, 0x3000 }, + { 0x9a01, 0xd0b2, 0x2000 }, + { 0x1a01, 0xd0b1, 0x0000 }, + { 0x1a01, 0xd0b3, 0x0000 }, + { 0x9a01, 0xd0b6, 0x2000 }, + { 0x1a01, 0xd0b5, 0x0000 }, + { 0x1a01, 0xd0b7, 0x0000 }, + { 0x9a01, 0xd0bc, 0x3000 }, + { 0x9a01, 0xd0ba, 0x2000 }, + { 0x1a01, 0xd0b9, 0x0000 }, + { 0x1a01, 0xd0bb, 0x0000 }, + { 0x9a01, 0xd0be, 0x2000 }, + { 0x1a01, 0xd0bd, 0x0000 }, + { 0x1a01, 0xd0bf, 0x0000 }, + { 0x9a01, 0xd0e0, 0x6000 }, + { 0x9a01, 0xd0d0, 0x5000 }, + { 0x9a01, 0xd0c8, 0x4000 }, + { 0x9a01, 0xd0c4, 0x3000 }, + { 0x9a01, 0xd0c2, 0x2000 }, + { 0x1a01, 0xd0c1, 0x0000 }, + { 0x1a01, 0xd0c3, 0x0000 }, + { 0x9a01, 0xd0c6, 0x2000 }, + { 0x1a01, 0xd0c5, 0x0000 }, + { 0x1a01, 0xd0c7, 0x0000 }, + { 0x9a01, 0xd0cc, 0x3000 }, + { 0x9a01, 0xd0ca, 0x2000 }, + { 0x1a01, 0xd0c9, 0x0000 }, + { 0x1a01, 0xd0cb, 0x0000 }, + { 0x9a01, 0xd0ce, 0x2000 }, + { 0x1a01, 0xd0cd, 0x0000 }, + { 0x1a01, 0xd0cf, 0x0000 }, + { 0x9a01, 0xd0d8, 0x4000 }, + { 0x9a01, 0xd0d4, 0x3000 }, + { 0x9a01, 0xd0d2, 0x2000 }, + { 0x1a01, 0xd0d1, 0x0000 }, + { 0x1a01, 0xd0d3, 0x0000 }, + { 0x9a01, 0xd0d6, 0x2000 }, + { 0x1a01, 0xd0d5, 0x0000 }, + { 0x1a01, 0xd0d7, 0x0000 }, + { 0x9a01, 0xd0dc, 0x3000 }, + { 0x9a01, 0xd0da, 0x2000 }, + { 0x1a01, 0xd0d9, 0x0000 }, + { 0x1a01, 0xd0db, 0x0000 }, + { 0x9a01, 0xd0de, 0x2000 }, + { 0x1a01, 0xd0dd, 0x0000 }, + { 0x1a01, 0xd0df, 0x0000 }, + { 0x9a01, 0xd0f0, 0x5000 }, + { 0x9a01, 0xd0e8, 0x4000 }, + { 0x9a01, 0xd0e4, 0x3000 }, + { 0x9a01, 0xd0e2, 0x2000 }, + { 0x1a01, 0xd0e1, 0x0000 }, + { 0x1a01, 0xd0e3, 0x0000 }, + { 0x9a01, 0xd0e6, 0x2000 }, + { 0x1a01, 0xd0e5, 0x0000 }, + { 0x1a01, 0xd0e7, 0x0000 }, + { 0x9a01, 0xd0ec, 0x3000 }, + { 0x9a01, 0xd0ea, 0x2000 }, + { 0x1a01, 0xd0e9, 0x0000 }, + { 0x1a01, 0xd0eb, 0x0000 }, + { 0x9a01, 0xd0ee, 0x2000 }, + { 0x1a01, 0xd0ed, 0x0000 }, + { 0x1a01, 0xd0ef, 0x0000 }, + { 0x9a01, 0xd102, 0x4000 }, + { 0x9a01, 0xd0f4, 0x3000 }, + { 0x9a01, 0xd0f2, 0x2000 }, + { 0x1a01, 0xd0f1, 0x0000 }, + { 0x1a01, 0xd0f3, 0x0000 }, + { 0x9a01, 0xd100, 0x2000 }, + { 0x1a01, 0xd0f5, 0x0000 }, + { 0x1a01, 0xd101, 0x0000 }, + { 0x9a01, 0xd106, 0x3000 }, + { 0x9a01, 0xd104, 0x2000 }, + { 0x1a01, 0xd103, 0x0000 }, + { 0x1a01, 0xd105, 0x0000 }, + { 0x9a01, 0xd108, 0x2000 }, + { 0x1a01, 0xd107, 0x0000 }, + { 0x1a01, 0xd109, 0x0000 }, + { 0x9a01, 0xd14d, 0x7000 }, + { 0x9a01, 0xd12d, 0x6000 }, + { 0x9a01, 0xd11a, 0x5000 }, + { 0x9a01, 0xd112, 0x4000 }, + { 0x9a01, 0xd10e, 0x3000 }, + { 0x9a01, 0xd10c, 0x2000 }, + { 0x1a01, 0xd10b, 0x0000 }, + { 0x1a01, 0xd10d, 0x0000 }, + { 0x9a01, 0xd110, 0x2000 }, + { 0x1a01, 0xd10f, 0x0000 }, + { 0x1a01, 0xd111, 0x0000 }, + { 0x9a01, 0xd116, 0x3000 }, + { 0x9a01, 0xd114, 0x2000 }, + { 0x1a01, 0xd113, 0x0000 }, + { 0x1a01, 0xd115, 0x0000 }, + { 0x9a01, 0xd118, 0x2000 }, + { 0x1a01, 0xd117, 0x0000 }, + { 0x1a01, 0xd119, 0x0000 }, + { 0x9a01, 0xd122, 0x4000 }, + { 0x9a01, 0xd11e, 0x3000 }, + { 0x9a01, 0xd11c, 0x2000 }, + { 0x1a01, 0xd11b, 0x0000 }, + { 0x1a01, 0xd11d, 0x0000 }, + { 0x9a01, 0xd120, 0x2000 }, + { 0x1a01, 0xd11f, 0x0000 }, + { 0x1a01, 0xd121, 0x0000 }, + { 0x9a01, 0xd126, 0x3000 }, + { 0x9a01, 0xd124, 0x2000 }, + { 0x1a01, 0xd123, 0x0000 }, + { 0x1a01, 0xd125, 0x0000 }, + { 0x9a01, 0xd12b, 0x2000 }, + { 0x1a01, 0xd12a, 0x0000 }, + { 0x1a01, 0xd12c, 0x0000 }, + { 0x9a01, 0xd13d, 0x5000 }, + { 0x9a01, 0xd135, 0x4000 }, + { 0x9a01, 0xd131, 0x3000 }, + { 0x9a01, 0xd12f, 0x2000 }, + { 0x1a01, 0xd12e, 0x0000 }, + { 0x1a01, 0xd130, 0x0000 }, + { 0x9a01, 0xd133, 0x2000 }, + { 0x1a01, 0xd132, 0x0000 }, + { 0x1a01, 0xd134, 0x0000 }, + { 0x9a01, 0xd139, 0x3000 }, + { 0x9a01, 0xd137, 0x2000 }, + { 0x1a01, 0xd136, 0x0000 }, + { 0x1a01, 0xd138, 0x0000 }, + { 0x9a01, 0xd13b, 0x2000 }, + { 0x1a01, 0xd13a, 0x0000 }, + { 0x1a01, 0xd13c, 0x0000 }, + { 0x9a01, 0xd145, 0x4000 }, + { 0x9a01, 0xd141, 0x3000 }, + { 0x9a01, 0xd13f, 0x2000 }, + { 0x1a01, 0xd13e, 0x0000 }, + { 0x1a01, 0xd140, 0x0000 }, + { 0x9a01, 0xd143, 0x2000 }, + { 0x1a01, 0xd142, 0x0000 }, + { 0x1a01, 0xd144, 0x0000 }, + { 0x9a01, 0xd149, 0x3000 }, + { 0x9a01, 0xd147, 0x2000 }, + { 0x1a01, 0xd146, 0x0000 }, + { 0x1a01, 0xd148, 0x0000 }, + { 0x9a01, 0xd14b, 0x2000 }, + { 0x1a01, 0xd14a, 0x0000 }, + { 0x1a01, 0xd14c, 0x0000 }, + { 0x8a01, 0xd16d, 0x6000 }, + { 0x9a01, 0xd15d, 0x5000 }, + { 0x9a01, 0xd155, 0x4000 }, + { 0x9a01, 0xd151, 0x3000 }, + { 0x9a01, 0xd14f, 0x2000 }, + { 0x1a01, 0xd14e, 0x0000 }, + { 0x1a01, 0xd150, 0x0000 }, + { 0x9a01, 0xd153, 0x2000 }, + { 0x1a01, 0xd152, 0x0000 }, + { 0x1a01, 0xd154, 0x0000 }, + { 0x9a01, 0xd159, 0x3000 }, + { 0x9a01, 0xd157, 0x2000 }, + { 0x1a01, 0xd156, 0x0000 }, + { 0x1a01, 0xd158, 0x0000 }, + { 0x9a01, 0xd15b, 0x2000 }, + { 0x1a01, 0xd15a, 0x0000 }, + { 0x1a01, 0xd15c, 0x0000 }, + { 0x8a01, 0xd165, 0x4000 }, + { 0x9a01, 0xd161, 0x3000 }, + { 0x9a01, 0xd15f, 0x2000 }, + { 0x1a01, 0xd15e, 0x0000 }, + { 0x1a01, 0xd160, 0x0000 }, + { 0x9a01, 0xd163, 0x2000 }, + { 0x1a01, 0xd162, 0x0000 }, + { 0x1a01, 0xd164, 0x0000 }, + { 0x8c01, 0xd169, 0x3000 }, + { 0x8c01, 0xd167, 0x2000 }, + { 0x0a01, 0xd166, 0x0000 }, + { 0x0c01, 0xd168, 0x0000 }, + { 0x9a01, 0xd16b, 0x2000 }, + { 0x1a01, 0xd16a, 0x0000 }, + { 0x1a01, 0xd16c, 0x0000 }, + { 0x8c01, 0xd17d, 0x5000 }, + { 0x8101, 0xd175, 0x4000 }, + { 0x8a01, 0xd171, 0x3000 }, + { 0x8a01, 0xd16f, 0x2000 }, + { 0x0a01, 0xd16e, 0x0000 }, + { 0x0a01, 0xd170, 0x0000 }, + { 0x8101, 0xd173, 0x2000 }, + { 0x0a01, 0xd172, 0x0000 }, + { 0x0101, 0xd174, 0x0000 }, + { 0x8101, 0xd179, 0x3000 }, + { 0x8101, 0xd177, 0x2000 }, + { 0x0101, 0xd176, 0x0000 }, + { 0x0101, 0xd178, 0x0000 }, + { 0x8c01, 0xd17b, 0x2000 }, + { 0x0101, 0xd17a, 0x0000 }, + { 0x0c01, 0xd17c, 0x0000 }, + { 0x8c01, 0xd185, 0x4000 }, + { 0x8c01, 0xd181, 0x3000 }, + { 0x8c01, 0xd17f, 0x2000 }, + { 0x0c01, 0xd17e, 0x0000 }, + { 0x0c01, 0xd180, 0x0000 }, + { 0x9a01, 0xd183, 0x2000 }, + { 0x0c01, 0xd182, 0x0000 }, + { 0x1a01, 0xd184, 0x0000 }, + { 0x8c01, 0xd189, 0x3000 }, + { 0x8c01, 0xd187, 0x2000 }, + { 0x0c01, 0xd186, 0x0000 }, + { 0x0c01, 0xd188, 0x0000 }, + { 0x8c01, 0xd18b, 0x2000 }, + { 0x0c01, 0xd18a, 0x0000 }, + { 0x1a01, 0xd18c, 0x0000 }, + { 0x9a01, 0xd32f, 0x8000 }, + { 0x9a01, 0xd1cd, 0x7000 }, + { 0x8c01, 0xd1ad, 0x6000 }, + { 0x9a01, 0xd19d, 0x5000 }, + { 0x9a01, 0xd195, 0x4000 }, + { 0x9a01, 0xd191, 0x3000 }, + { 0x9a01, 0xd18f, 0x2000 }, + { 0x1a01, 0xd18e, 0x0000 }, + { 0x1a01, 0xd190, 0x0000 }, + { 0x9a01, 0xd193, 0x2000 }, + { 0x1a01, 0xd192, 0x0000 }, + { 0x1a01, 0xd194, 0x0000 }, + { 0x9a01, 0xd199, 0x3000 }, + { 0x9a01, 0xd197, 0x2000 }, + { 0x1a01, 0xd196, 0x0000 }, + { 0x1a01, 0xd198, 0x0000 }, + { 0x9a01, 0xd19b, 0x2000 }, + { 0x1a01, 0xd19a, 0x0000 }, + { 0x1a01, 0xd19c, 0x0000 }, + { 0x9a01, 0xd1a5, 0x4000 }, + { 0x9a01, 0xd1a1, 0x3000 }, + { 0x9a01, 0xd19f, 0x2000 }, + { 0x1a01, 0xd19e, 0x0000 }, + { 0x1a01, 0xd1a0, 0x0000 }, + { 0x9a01, 0xd1a3, 0x2000 }, + { 0x1a01, 0xd1a2, 0x0000 }, + { 0x1a01, 0xd1a4, 0x0000 }, + { 0x9a01, 0xd1a9, 0x3000 }, + { 0x9a01, 0xd1a7, 0x2000 }, + { 0x1a01, 0xd1a6, 0x0000 }, + { 0x1a01, 0xd1a8, 0x0000 }, + { 0x8c01, 0xd1ab, 0x2000 }, + { 0x0c01, 0xd1aa, 0x0000 }, + { 0x0c01, 0xd1ac, 0x0000 }, + { 0x9a01, 0xd1bd, 0x5000 }, + { 0x9a01, 0xd1b5, 0x4000 }, + { 0x9a01, 0xd1b1, 0x3000 }, + { 0x9a01, 0xd1af, 0x2000 }, + { 0x1a01, 0xd1ae, 0x0000 }, + { 0x1a01, 0xd1b0, 0x0000 }, + { 0x9a01, 0xd1b3, 0x2000 }, + { 0x1a01, 0xd1b2, 0x0000 }, + { 0x1a01, 0xd1b4, 0x0000 }, + { 0x9a01, 0xd1b9, 0x3000 }, + { 0x9a01, 0xd1b7, 0x2000 }, + { 0x1a01, 0xd1b6, 0x0000 }, + { 0x1a01, 0xd1b8, 0x0000 }, + { 0x9a01, 0xd1bb, 0x2000 }, + { 0x1a01, 0xd1ba, 0x0000 }, + { 0x1a01, 0xd1bc, 0x0000 }, + { 0x9a01, 0xd1c5, 0x4000 }, + { 0x9a01, 0xd1c1, 0x3000 }, + { 0x9a01, 0xd1bf, 0x2000 }, + { 0x1a01, 0xd1be, 0x0000 }, + { 0x1a01, 0xd1c0, 0x0000 }, + { 0x9a01, 0xd1c3, 0x2000 }, + { 0x1a01, 0xd1c2, 0x0000 }, + { 0x1a01, 0xd1c4, 0x0000 }, + { 0x9a01, 0xd1c9, 0x3000 }, + { 0x9a01, 0xd1c7, 0x2000 }, + { 0x1a01, 0xd1c6, 0x0000 }, + { 0x1a01, 0xd1c8, 0x0000 }, + { 0x9a01, 0xd1cb, 0x2000 }, + { 0x1a01, 0xd1ca, 0x0000 }, + { 0x1a01, 0xd1cc, 0x0000 }, + { 0x9a01, 0xd30f, 0x6000 }, + { 0x9a01, 0xd1dd, 0x5000 }, + { 0x9a01, 0xd1d5, 0x4000 }, + { 0x9a01, 0xd1d1, 0x3000 }, + { 0x9a01, 0xd1cf, 0x2000 }, + { 0x1a01, 0xd1ce, 0x0000 }, + { 0x1a01, 0xd1d0, 0x0000 }, + { 0x9a01, 0xd1d3, 0x2000 }, + { 0x1a01, 0xd1d2, 0x0000 }, + { 0x1a01, 0xd1d4, 0x0000 }, + { 0x9a01, 0xd1d9, 0x3000 }, + { 0x9a01, 0xd1d7, 0x2000 }, + { 0x1a01, 0xd1d6, 0x0000 }, + { 0x1a01, 0xd1d8, 0x0000 }, + { 0x9a01, 0xd1db, 0x2000 }, + { 0x1a01, 0xd1da, 0x0000 }, + { 0x1a01, 0xd1dc, 0x0000 }, + { 0x9a01, 0xd307, 0x4000 }, + { 0x9a01, 0xd303, 0x3000 }, + { 0x9a01, 0xd301, 0x2000 }, + { 0x1a01, 0xd300, 0x0000 }, + { 0x1a01, 0xd302, 0x0000 }, + { 0x9a01, 0xd305, 0x2000 }, + { 0x1a01, 0xd304, 0x0000 }, + { 0x1a01, 0xd306, 0x0000 }, + { 0x9a01, 0xd30b, 0x3000 }, + { 0x9a01, 0xd309, 0x2000 }, + { 0x1a01, 0xd308, 0x0000 }, + { 0x1a01, 0xd30a, 0x0000 }, + { 0x9a01, 0xd30d, 0x2000 }, + { 0x1a01, 0xd30c, 0x0000 }, + { 0x1a01, 0xd30e, 0x0000 }, + { 0x9a01, 0xd31f, 0x5000 }, + { 0x9a01, 0xd317, 0x4000 }, + { 0x9a01, 0xd313, 0x3000 }, + { 0x9a01, 0xd311, 0x2000 }, + { 0x1a01, 0xd310, 0x0000 }, + { 0x1a01, 0xd312, 0x0000 }, + { 0x9a01, 0xd315, 0x2000 }, + { 0x1a01, 0xd314, 0x0000 }, + { 0x1a01, 0xd316, 0x0000 }, + { 0x9a01, 0xd31b, 0x3000 }, + { 0x9a01, 0xd319, 0x2000 }, + { 0x1a01, 0xd318, 0x0000 }, + { 0x1a01, 0xd31a, 0x0000 }, + { 0x9a01, 0xd31d, 0x2000 }, + { 0x1a01, 0xd31c, 0x0000 }, + { 0x1a01, 0xd31e, 0x0000 }, + { 0x9a01, 0xd327, 0x4000 }, + { 0x9a01, 0xd323, 0x3000 }, + { 0x9a01, 0xd321, 0x2000 }, + { 0x1a01, 0xd320, 0x0000 }, + { 0x1a01, 0xd322, 0x0000 }, + { 0x9a01, 0xd325, 0x2000 }, + { 0x1a01, 0xd324, 0x0000 }, + { 0x1a01, 0xd326, 0x0000 }, + { 0x9a01, 0xd32b, 0x3000 }, + { 0x9a01, 0xd329, 0x2000 }, + { 0x1a01, 0xd328, 0x0000 }, + { 0x1a01, 0xd32a, 0x0000 }, + { 0x9a01, 0xd32d, 0x2000 }, + { 0x1a01, 0xd32c, 0x0000 }, + { 0x1a01, 0xd32e, 0x0000 }, + { 0x8901, 0xd418, 0x7000 }, + { 0x9a01, 0xd34f, 0x6000 }, + { 0x9a01, 0xd33f, 0x5000 }, + { 0x9a01, 0xd337, 0x4000 }, + { 0x9a01, 0xd333, 0x3000 }, + { 0x9a01, 0xd331, 0x2000 }, + { 0x1a01, 0xd330, 0x0000 }, + { 0x1a01, 0xd332, 0x0000 }, + { 0x9a01, 0xd335, 0x2000 }, + { 0x1a01, 0xd334, 0x0000 }, + { 0x1a01, 0xd336, 0x0000 }, + { 0x9a01, 0xd33b, 0x3000 }, + { 0x9a01, 0xd339, 0x2000 }, + { 0x1a01, 0xd338, 0x0000 }, + { 0x1a01, 0xd33a, 0x0000 }, + { 0x9a01, 0xd33d, 0x2000 }, + { 0x1a01, 0xd33c, 0x0000 }, + { 0x1a01, 0xd33e, 0x0000 }, + { 0x9a01, 0xd347, 0x4000 }, + { 0x9a01, 0xd343, 0x3000 }, + { 0x9a01, 0xd341, 0x2000 }, + { 0x1a01, 0xd340, 0x0000 }, + { 0x1a01, 0xd342, 0x0000 }, + { 0x9a01, 0xd345, 0x2000 }, + { 0x1a01, 0xd344, 0x0000 }, + { 0x1a01, 0xd346, 0x0000 }, + { 0x9a01, 0xd34b, 0x3000 }, + { 0x9a01, 0xd349, 0x2000 }, + { 0x1a01, 0xd348, 0x0000 }, + { 0x1a01, 0xd34a, 0x0000 }, + { 0x9a01, 0xd34d, 0x2000 }, + { 0x1a01, 0xd34c, 0x0000 }, + { 0x1a01, 0xd34e, 0x0000 }, + { 0x8901, 0xd408, 0x5000 }, + { 0x8901, 0xd400, 0x4000 }, + { 0x9a01, 0xd353, 0x3000 }, + { 0x9a01, 0xd351, 0x2000 }, + { 0x1a01, 0xd350, 0x0000 }, + { 0x1a01, 0xd352, 0x0000 }, + { 0x9a01, 0xd355, 0x2000 }, + { 0x1a01, 0xd354, 0x0000 }, + { 0x1a01, 0xd356, 0x0000 }, + { 0x8901, 0xd404, 0x3000 }, + { 0x8901, 0xd402, 0x2000 }, + { 0x0901, 0xd401, 0x0000 }, + { 0x0901, 0xd403, 0x0000 }, + { 0x8901, 0xd406, 0x2000 }, + { 0x0901, 0xd405, 0x0000 }, + { 0x0901, 0xd407, 0x0000 }, + { 0x8901, 0xd410, 0x4000 }, + { 0x8901, 0xd40c, 0x3000 }, + { 0x8901, 0xd40a, 0x2000 }, + { 0x0901, 0xd409, 0x0000 }, + { 0x0901, 0xd40b, 0x0000 }, + { 0x8901, 0xd40e, 0x2000 }, + { 0x0901, 0xd40d, 0x0000 }, + { 0x0901, 0xd40f, 0x0000 }, + { 0x8901, 0xd414, 0x3000 }, + { 0x8901, 0xd412, 0x2000 }, + { 0x0901, 0xd411, 0x0000 }, + { 0x0901, 0xd413, 0x0000 }, + { 0x8901, 0xd416, 0x2000 }, + { 0x0901, 0xd415, 0x0000 }, + { 0x0901, 0xd417, 0x0000 }, + { 0x8901, 0xd438, 0x6000 }, + { 0x8501, 0xd428, 0x5000 }, + { 0x8501, 0xd420, 0x4000 }, + { 0x8501, 0xd41c, 0x3000 }, + { 0x8501, 0xd41a, 0x2000 }, + { 0x0901, 0xd419, 0x0000 }, + { 0x0501, 0xd41b, 0x0000 }, + { 0x8501, 0xd41e, 0x2000 }, + { 0x0501, 0xd41d, 0x0000 }, + { 0x0501, 0xd41f, 0x0000 }, + { 0x8501, 0xd424, 0x3000 }, + { 0x8501, 0xd422, 0x2000 }, + { 0x0501, 0xd421, 0x0000 }, + { 0x0501, 0xd423, 0x0000 }, + { 0x8501, 0xd426, 0x2000 }, + { 0x0501, 0xd425, 0x0000 }, + { 0x0501, 0xd427, 0x0000 }, + { 0x8501, 0xd430, 0x4000 }, + { 0x8501, 0xd42c, 0x3000 }, + { 0x8501, 0xd42a, 0x2000 }, + { 0x0501, 0xd429, 0x0000 }, + { 0x0501, 0xd42b, 0x0000 }, + { 0x8501, 0xd42e, 0x2000 }, + { 0x0501, 0xd42d, 0x0000 }, + { 0x0501, 0xd42f, 0x0000 }, + { 0x8901, 0xd434, 0x3000 }, + { 0x8501, 0xd432, 0x2000 }, + { 0x0501, 0xd431, 0x0000 }, + { 0x0501, 0xd433, 0x0000 }, + { 0x8901, 0xd436, 0x2000 }, + { 0x0901, 0xd435, 0x0000 }, + { 0x0901, 0xd437, 0x0000 }, + { 0x8901, 0xd448, 0x5000 }, + { 0x8901, 0xd440, 0x4000 }, + { 0x8901, 0xd43c, 0x3000 }, + { 0x8901, 0xd43a, 0x2000 }, + { 0x0901, 0xd439, 0x0000 }, + { 0x0901, 0xd43b, 0x0000 }, + { 0x8901, 0xd43e, 0x2000 }, + { 0x0901, 0xd43d, 0x0000 }, + { 0x0901, 0xd43f, 0x0000 }, + { 0x8901, 0xd444, 0x3000 }, + { 0x8901, 0xd442, 0x2000 }, + { 0x0901, 0xd441, 0x0000 }, + { 0x0901, 0xd443, 0x0000 }, + { 0x8901, 0xd446, 0x2000 }, + { 0x0901, 0xd445, 0x0000 }, + { 0x0901, 0xd447, 0x0000 }, + { 0x8501, 0xd450, 0x4000 }, + { 0x8901, 0xd44c, 0x3000 }, + { 0x8901, 0xd44a, 0x2000 }, + { 0x0901, 0xd449, 0x0000 }, + { 0x0901, 0xd44b, 0x0000 }, + { 0x8501, 0xd44e, 0x2000 }, + { 0x0901, 0xd44d, 0x0000 }, + { 0x0501, 0xd44f, 0x0000 }, + { 0x8501, 0xd454, 0x3000 }, + { 0x8501, 0xd452, 0x2000 }, + { 0x0501, 0xd451, 0x0000 }, + { 0x0501, 0xd453, 0x0000 }, + { 0x8501, 0xd457, 0x2000 }, + { 0x0501, 0xd456, 0x0000 }, + { 0x0501, 0xd458, 0x0000 }, + { 0x8702, 0xf876, 0xb000 }, + { 0x8901, 0xd670, 0xa000 }, + { 0x8901, 0xd570, 0x9000 }, + { 0x8901, 0xd4e4, 0x8000 }, + { 0x8501, 0xd499, 0x7000 }, + { 0x8901, 0xd479, 0x6000 }, + { 0x8901, 0xd469, 0x5000 }, + { 0x8501, 0xd461, 0x4000 }, + { 0x8501, 0xd45d, 0x3000 }, + { 0x8501, 0xd45b, 0x2000 }, + { 0x0501, 0xd45a, 0x0000 }, + { 0x0501, 0xd45c, 0x0000 }, + { 0x8501, 0xd45f, 0x2000 }, + { 0x0501, 0xd45e, 0x0000 }, + { 0x0501, 0xd460, 0x0000 }, + { 0x8501, 0xd465, 0x3000 }, + { 0x8501, 0xd463, 0x2000 }, + { 0x0501, 0xd462, 0x0000 }, + { 0x0501, 0xd464, 0x0000 }, + { 0x8501, 0xd467, 0x2000 }, + { 0x0501, 0xd466, 0x0000 }, + { 0x0901, 0xd468, 0x0000 }, + { 0x8901, 0xd471, 0x4000 }, + { 0x8901, 0xd46d, 0x3000 }, + { 0x8901, 0xd46b, 0x2000 }, + { 0x0901, 0xd46a, 0x0000 }, + { 0x0901, 0xd46c, 0x0000 }, + { 0x8901, 0xd46f, 0x2000 }, + { 0x0901, 0xd46e, 0x0000 }, + { 0x0901, 0xd470, 0x0000 }, + { 0x8901, 0xd475, 0x3000 }, + { 0x8901, 0xd473, 0x2000 }, + { 0x0901, 0xd472, 0x0000 }, + { 0x0901, 0xd474, 0x0000 }, + { 0x8901, 0xd477, 0x2000 }, + { 0x0901, 0xd476, 0x0000 }, + { 0x0901, 0xd478, 0x0000 }, + { 0x8501, 0xd489, 0x5000 }, + { 0x8901, 0xd481, 0x4000 }, + { 0x8901, 0xd47d, 0x3000 }, + { 0x8901, 0xd47b, 0x2000 }, + { 0x0901, 0xd47a, 0x0000 }, + { 0x0901, 0xd47c, 0x0000 }, + { 0x8901, 0xd47f, 0x2000 }, + { 0x0901, 0xd47e, 0x0000 }, + { 0x0901, 0xd480, 0x0000 }, + { 0x8501, 0xd485, 0x3000 }, + { 0x8501, 0xd483, 0x2000 }, + { 0x0501, 0xd482, 0x0000 }, + { 0x0501, 0xd484, 0x0000 }, + { 0x8501, 0xd487, 0x2000 }, + { 0x0501, 0xd486, 0x0000 }, + { 0x0501, 0xd488, 0x0000 }, + { 0x8501, 0xd491, 0x4000 }, + { 0x8501, 0xd48d, 0x3000 }, + { 0x8501, 0xd48b, 0x2000 }, + { 0x0501, 0xd48a, 0x0000 }, + { 0x0501, 0xd48c, 0x0000 }, + { 0x8501, 0xd48f, 0x2000 }, + { 0x0501, 0xd48e, 0x0000 }, + { 0x0501, 0xd490, 0x0000 }, + { 0x8501, 0xd495, 0x3000 }, + { 0x8501, 0xd493, 0x2000 }, + { 0x0501, 0xd492, 0x0000 }, + { 0x0501, 0xd494, 0x0000 }, + { 0x8501, 0xd497, 0x2000 }, + { 0x0501, 0xd496, 0x0000 }, + { 0x0501, 0xd498, 0x0000 }, + { 0x8501, 0xd4c3, 0x6000 }, + { 0x8901, 0xd4b1, 0x5000 }, + { 0x8901, 0xd4a6, 0x4000 }, + { 0x8901, 0xd49e, 0x3000 }, + { 0x8501, 0xd49b, 0x2000 }, + { 0x0501, 0xd49a, 0x0000 }, + { 0x0901, 0xd49c, 0x0000 }, + { 0x8901, 0xd4a2, 0x2000 }, + { 0x0901, 0xd49f, 0x0000 }, + { 0x0901, 0xd4a5, 0x0000 }, + { 0x8901, 0xd4ac, 0x3000 }, + { 0x8901, 0xd4aa, 0x2000 }, + { 0x0901, 0xd4a9, 0x0000 }, + { 0x0901, 0xd4ab, 0x0000 }, + { 0x8901, 0xd4af, 0x2000 }, + { 0x0901, 0xd4ae, 0x0000 }, + { 0x0901, 0xd4b0, 0x0000 }, + { 0x8501, 0xd4b9, 0x4000 }, + { 0x8901, 0xd4b5, 0x3000 }, + { 0x8901, 0xd4b3, 0x2000 }, + { 0x0901, 0xd4b2, 0x0000 }, + { 0x0901, 0xd4b4, 0x0000 }, + { 0x8501, 0xd4b7, 0x2000 }, + { 0x0501, 0xd4b6, 0x0000 }, + { 0x0501, 0xd4b8, 0x0000 }, + { 0x8501, 0xd4bf, 0x3000 }, + { 0x8501, 0xd4bd, 0x2000 }, + { 0x0501, 0xd4bb, 0x0000 }, + { 0x0501, 0xd4be, 0x0000 }, + { 0x8501, 0xd4c1, 0x2000 }, + { 0x0501, 0xd4c0, 0x0000 }, + { 0x0501, 0xd4c2, 0x0000 }, + { 0x8901, 0xd4d4, 0x5000 }, + { 0x8501, 0xd4cc, 0x4000 }, + { 0x8501, 0xd4c8, 0x3000 }, + { 0x8501, 0xd4c6, 0x2000 }, + { 0x0501, 0xd4c5, 0x0000 }, + { 0x0501, 0xd4c7, 0x0000 }, + { 0x8501, 0xd4ca, 0x2000 }, + { 0x0501, 0xd4c9, 0x0000 }, + { 0x0501, 0xd4cb, 0x0000 }, + { 0x8901, 0xd4d0, 0x3000 }, + { 0x8501, 0xd4ce, 0x2000 }, + { 0x0501, 0xd4cd, 0x0000 }, + { 0x0501, 0xd4cf, 0x0000 }, + { 0x8901, 0xd4d2, 0x2000 }, + { 0x0901, 0xd4d1, 0x0000 }, + { 0x0901, 0xd4d3, 0x0000 }, + { 0x8901, 0xd4dc, 0x4000 }, + { 0x8901, 0xd4d8, 0x3000 }, + { 0x8901, 0xd4d6, 0x2000 }, + { 0x0901, 0xd4d5, 0x0000 }, + { 0x0901, 0xd4d7, 0x0000 }, + { 0x8901, 0xd4da, 0x2000 }, + { 0x0901, 0xd4d9, 0x0000 }, + { 0x0901, 0xd4db, 0x0000 }, + { 0x8901, 0xd4e0, 0x3000 }, + { 0x8901, 0xd4de, 0x2000 }, + { 0x0901, 0xd4dd, 0x0000 }, + { 0x0901, 0xd4df, 0x0000 }, + { 0x8901, 0xd4e2, 0x2000 }, + { 0x0901, 0xd4e1, 0x0000 }, + { 0x0901, 0xd4e3, 0x0000 }, + { 0x8501, 0xd529, 0x7000 }, + { 0x8901, 0xd504, 0x6000 }, + { 0x8501, 0xd4f4, 0x5000 }, + { 0x8501, 0xd4ec, 0x4000 }, + { 0x8901, 0xd4e8, 0x3000 }, + { 0x8901, 0xd4e6, 0x2000 }, + { 0x0901, 0xd4e5, 0x0000 }, + { 0x0901, 0xd4e7, 0x0000 }, + { 0x8501, 0xd4ea, 0x2000 }, + { 0x0901, 0xd4e9, 0x0000 }, + { 0x0501, 0xd4eb, 0x0000 }, + { 0x8501, 0xd4f0, 0x3000 }, + { 0x8501, 0xd4ee, 0x2000 }, + { 0x0501, 0xd4ed, 0x0000 }, + { 0x0501, 0xd4ef, 0x0000 }, + { 0x8501, 0xd4f2, 0x2000 }, + { 0x0501, 0xd4f1, 0x0000 }, + { 0x0501, 0xd4f3, 0x0000 }, + { 0x8501, 0xd4fc, 0x4000 }, + { 0x8501, 0xd4f8, 0x3000 }, + { 0x8501, 0xd4f6, 0x2000 }, + { 0x0501, 0xd4f5, 0x0000 }, + { 0x0501, 0xd4f7, 0x0000 }, + { 0x8501, 0xd4fa, 0x2000 }, + { 0x0501, 0xd4f9, 0x0000 }, + { 0x0501, 0xd4fb, 0x0000 }, + { 0x8501, 0xd500, 0x3000 }, + { 0x8501, 0xd4fe, 0x2000 }, + { 0x0501, 0xd4fd, 0x0000 }, + { 0x0501, 0xd4ff, 0x0000 }, + { 0x8501, 0xd502, 0x2000 }, + { 0x0501, 0xd501, 0x0000 }, + { 0x0501, 0xd503, 0x0000 }, + { 0x8901, 0xd518, 0x5000 }, + { 0x8901, 0xd50f, 0x4000 }, + { 0x8901, 0xd509, 0x3000 }, + { 0x8901, 0xd507, 0x2000 }, + { 0x0901, 0xd505, 0x0000 }, + { 0x0901, 0xd508, 0x0000 }, + { 0x8901, 0xd50d, 0x2000 }, + { 0x0901, 0xd50a, 0x0000 }, + { 0x0901, 0xd50e, 0x0000 }, + { 0x8901, 0xd513, 0x3000 }, + { 0x8901, 0xd511, 0x2000 }, + { 0x0901, 0xd510, 0x0000 }, + { 0x0901, 0xd512, 0x0000 }, + { 0x8901, 0xd516, 0x2000 }, + { 0x0901, 0xd514, 0x0000 }, + { 0x0901, 0xd517, 0x0000 }, + { 0x8501, 0xd521, 0x4000 }, + { 0x8901, 0xd51c, 0x3000 }, + { 0x8901, 0xd51a, 0x2000 }, + { 0x0901, 0xd519, 0x0000 }, + { 0x0901, 0xd51b, 0x0000 }, + { 0x8501, 0xd51f, 0x2000 }, + { 0x0501, 0xd51e, 0x0000 }, + { 0x0501, 0xd520, 0x0000 }, + { 0x8501, 0xd525, 0x3000 }, + { 0x8501, 0xd523, 0x2000 }, + { 0x0501, 0xd522, 0x0000 }, + { 0x0501, 0xd524, 0x0000 }, + { 0x8501, 0xd527, 0x2000 }, + { 0x0501, 0xd526, 0x0000 }, + { 0x0501, 0xd528, 0x0000 }, + { 0x8901, 0xd54f, 0x6000 }, + { 0x8901, 0xd539, 0x5000 }, + { 0x8501, 0xd531, 0x4000 }, + { 0x8501, 0xd52d, 0x3000 }, + { 0x8501, 0xd52b, 0x2000 }, + { 0x0501, 0xd52a, 0x0000 }, + { 0x0501, 0xd52c, 0x0000 }, + { 0x8501, 0xd52f, 0x2000 }, + { 0x0501, 0xd52e, 0x0000 }, + { 0x0501, 0xd530, 0x0000 }, + { 0x8501, 0xd535, 0x3000 }, + { 0x8501, 0xd533, 0x2000 }, + { 0x0501, 0xd532, 0x0000 }, + { 0x0501, 0xd534, 0x0000 }, + { 0x8501, 0xd537, 0x2000 }, + { 0x0501, 0xd536, 0x0000 }, + { 0x0901, 0xd538, 0x0000 }, + { 0x8901, 0xd543, 0x4000 }, + { 0x8901, 0xd53e, 0x3000 }, + { 0x8901, 0xd53c, 0x2000 }, + { 0x0901, 0xd53b, 0x0000 }, + { 0x0901, 0xd53d, 0x0000 }, + { 0x8901, 0xd541, 0x2000 }, + { 0x0901, 0xd540, 0x0000 }, + { 0x0901, 0xd542, 0x0000 }, + { 0x8901, 0xd54b, 0x3000 }, + { 0x8901, 0xd546, 0x2000 }, + { 0x0901, 0xd544, 0x0000 }, + { 0x0901, 0xd54a, 0x0000 }, + { 0x8901, 0xd54d, 0x2000 }, + { 0x0901, 0xd54c, 0x0000 }, + { 0x0901, 0xd54e, 0x0000 }, + { 0x8501, 0xd560, 0x5000 }, + { 0x8501, 0xd558, 0x4000 }, + { 0x8501, 0xd554, 0x3000 }, + { 0x8501, 0xd552, 0x2000 }, + { 0x0901, 0xd550, 0x0000 }, + { 0x0501, 0xd553, 0x0000 }, + { 0x8501, 0xd556, 0x2000 }, + { 0x0501, 0xd555, 0x0000 }, + { 0x0501, 0xd557, 0x0000 }, + { 0x8501, 0xd55c, 0x3000 }, + { 0x8501, 0xd55a, 0x2000 }, + { 0x0501, 0xd559, 0x0000 }, + { 0x0501, 0xd55b, 0x0000 }, + { 0x8501, 0xd55e, 0x2000 }, + { 0x0501, 0xd55d, 0x0000 }, + { 0x0501, 0xd55f, 0x0000 }, + { 0x8501, 0xd568, 0x4000 }, + { 0x8501, 0xd564, 0x3000 }, + { 0x8501, 0xd562, 0x2000 }, + { 0x0501, 0xd561, 0x0000 }, + { 0x0501, 0xd563, 0x0000 }, + { 0x8501, 0xd566, 0x2000 }, + { 0x0501, 0xd565, 0x0000 }, + { 0x0501, 0xd567, 0x0000 }, + { 0x8901, 0xd56c, 0x3000 }, + { 0x8501, 0xd56a, 0x2000 }, + { 0x0501, 0xd569, 0x0000 }, + { 0x0501, 0xd56b, 0x0000 }, + { 0x8901, 0xd56e, 0x2000 }, + { 0x0901, 0xd56d, 0x0000 }, + { 0x0901, 0xd56f, 0x0000 }, + { 0x8501, 0xd5f0, 0x8000 }, + { 0x8901, 0xd5b0, 0x7000 }, + { 0x8501, 0xd590, 0x6000 }, + { 0x8901, 0xd580, 0x5000 }, + { 0x8901, 0xd578, 0x4000 }, + { 0x8901, 0xd574, 0x3000 }, + { 0x8901, 0xd572, 0x2000 }, + { 0x0901, 0xd571, 0x0000 }, + { 0x0901, 0xd573, 0x0000 }, + { 0x8901, 0xd576, 0x2000 }, + { 0x0901, 0xd575, 0x0000 }, + { 0x0901, 0xd577, 0x0000 }, + { 0x8901, 0xd57c, 0x3000 }, + { 0x8901, 0xd57a, 0x2000 }, + { 0x0901, 0xd579, 0x0000 }, + { 0x0901, 0xd57b, 0x0000 }, + { 0x8901, 0xd57e, 0x2000 }, + { 0x0901, 0xd57d, 0x0000 }, + { 0x0901, 0xd57f, 0x0000 }, + { 0x8501, 0xd588, 0x4000 }, + { 0x8901, 0xd584, 0x3000 }, + { 0x8901, 0xd582, 0x2000 }, + { 0x0901, 0xd581, 0x0000 }, + { 0x0901, 0xd583, 0x0000 }, + { 0x8501, 0xd586, 0x2000 }, + { 0x0901, 0xd585, 0x0000 }, + { 0x0501, 0xd587, 0x0000 }, + { 0x8501, 0xd58c, 0x3000 }, + { 0x8501, 0xd58a, 0x2000 }, + { 0x0501, 0xd589, 0x0000 }, + { 0x0501, 0xd58b, 0x0000 }, + { 0x8501, 0xd58e, 0x2000 }, + { 0x0501, 0xd58d, 0x0000 }, + { 0x0501, 0xd58f, 0x0000 }, + { 0x8901, 0xd5a0, 0x5000 }, + { 0x8501, 0xd598, 0x4000 }, + { 0x8501, 0xd594, 0x3000 }, + { 0x8501, 0xd592, 0x2000 }, + { 0x0501, 0xd591, 0x0000 }, + { 0x0501, 0xd593, 0x0000 }, + { 0x8501, 0xd596, 0x2000 }, + { 0x0501, 0xd595, 0x0000 }, + { 0x0501, 0xd597, 0x0000 }, + { 0x8501, 0xd59c, 0x3000 }, + { 0x8501, 0xd59a, 0x2000 }, + { 0x0501, 0xd599, 0x0000 }, + { 0x0501, 0xd59b, 0x0000 }, + { 0x8501, 0xd59e, 0x2000 }, + { 0x0501, 0xd59d, 0x0000 }, + { 0x0501, 0xd59f, 0x0000 }, + { 0x8901, 0xd5a8, 0x4000 }, + { 0x8901, 0xd5a4, 0x3000 }, + { 0x8901, 0xd5a2, 0x2000 }, + { 0x0901, 0xd5a1, 0x0000 }, + { 0x0901, 0xd5a3, 0x0000 }, + { 0x8901, 0xd5a6, 0x2000 }, + { 0x0901, 0xd5a5, 0x0000 }, + { 0x0901, 0xd5a7, 0x0000 }, + { 0x8901, 0xd5ac, 0x3000 }, + { 0x8901, 0xd5aa, 0x2000 }, + { 0x0901, 0xd5a9, 0x0000 }, + { 0x0901, 0xd5ab, 0x0000 }, + { 0x8901, 0xd5ae, 0x2000 }, + { 0x0901, 0xd5ad, 0x0000 }, + { 0x0901, 0xd5af, 0x0000 }, + { 0x8501, 0xd5d0, 0x6000 }, + { 0x8501, 0xd5c0, 0x5000 }, + { 0x8901, 0xd5b8, 0x4000 }, + { 0x8901, 0xd5b4, 0x3000 }, + { 0x8901, 0xd5b2, 0x2000 }, + { 0x0901, 0xd5b1, 0x0000 }, + { 0x0901, 0xd5b3, 0x0000 }, + { 0x8901, 0xd5b6, 0x2000 }, + { 0x0901, 0xd5b5, 0x0000 }, + { 0x0901, 0xd5b7, 0x0000 }, + { 0x8501, 0xd5bc, 0x3000 }, + { 0x8501, 0xd5ba, 0x2000 }, + { 0x0901, 0xd5b9, 0x0000 }, + { 0x0501, 0xd5bb, 0x0000 }, + { 0x8501, 0xd5be, 0x2000 }, + { 0x0501, 0xd5bd, 0x0000 }, + { 0x0501, 0xd5bf, 0x0000 }, + { 0x8501, 0xd5c8, 0x4000 }, + { 0x8501, 0xd5c4, 0x3000 }, + { 0x8501, 0xd5c2, 0x2000 }, + { 0x0501, 0xd5c1, 0x0000 }, + { 0x0501, 0xd5c3, 0x0000 }, + { 0x8501, 0xd5c6, 0x2000 }, + { 0x0501, 0xd5c5, 0x0000 }, + { 0x0501, 0xd5c7, 0x0000 }, + { 0x8501, 0xd5cc, 0x3000 }, + { 0x8501, 0xd5ca, 0x2000 }, + { 0x0501, 0xd5c9, 0x0000 }, + { 0x0501, 0xd5cb, 0x0000 }, + { 0x8501, 0xd5ce, 0x2000 }, + { 0x0501, 0xd5cd, 0x0000 }, + { 0x0501, 0xd5cf, 0x0000 }, + { 0x8901, 0xd5e0, 0x5000 }, + { 0x8901, 0xd5d8, 0x4000 }, + { 0x8901, 0xd5d4, 0x3000 }, + { 0x8501, 0xd5d2, 0x2000 }, + { 0x0501, 0xd5d1, 0x0000 }, + { 0x0501, 0xd5d3, 0x0000 }, + { 0x8901, 0xd5d6, 0x2000 }, + { 0x0901, 0xd5d5, 0x0000 }, + { 0x0901, 0xd5d7, 0x0000 }, + { 0x8901, 0xd5dc, 0x3000 }, + { 0x8901, 0xd5da, 0x2000 }, + { 0x0901, 0xd5d9, 0x0000 }, + { 0x0901, 0xd5db, 0x0000 }, + { 0x8901, 0xd5de, 0x2000 }, + { 0x0901, 0xd5dd, 0x0000 }, + { 0x0901, 0xd5df, 0x0000 }, + { 0x8901, 0xd5e8, 0x4000 }, + { 0x8901, 0xd5e4, 0x3000 }, + { 0x8901, 0xd5e2, 0x2000 }, + { 0x0901, 0xd5e1, 0x0000 }, + { 0x0901, 0xd5e3, 0x0000 }, + { 0x8901, 0xd5e6, 0x2000 }, + { 0x0901, 0xd5e5, 0x0000 }, + { 0x0901, 0xd5e7, 0x0000 }, + { 0x8901, 0xd5ec, 0x3000 }, + { 0x8901, 0xd5ea, 0x2000 }, + { 0x0901, 0xd5e9, 0x0000 }, + { 0x0901, 0xd5eb, 0x0000 }, + { 0x8501, 0xd5ee, 0x2000 }, + { 0x0901, 0xd5ed, 0x0000 }, + { 0x0501, 0xd5ef, 0x0000 }, + { 0x8501, 0xd630, 0x7000 }, + { 0x8901, 0xd610, 0x6000 }, + { 0x8501, 0xd600, 0x5000 }, + { 0x8501, 0xd5f8, 0x4000 }, + { 0x8501, 0xd5f4, 0x3000 }, + { 0x8501, 0xd5f2, 0x2000 }, + { 0x0501, 0xd5f1, 0x0000 }, + { 0x0501, 0xd5f3, 0x0000 }, + { 0x8501, 0xd5f6, 0x2000 }, + { 0x0501, 0xd5f5, 0x0000 }, + { 0x0501, 0xd5f7, 0x0000 }, + { 0x8501, 0xd5fc, 0x3000 }, + { 0x8501, 0xd5fa, 0x2000 }, + { 0x0501, 0xd5f9, 0x0000 }, + { 0x0501, 0xd5fb, 0x0000 }, + { 0x8501, 0xd5fe, 0x2000 }, + { 0x0501, 0xd5fd, 0x0000 }, + { 0x0501, 0xd5ff, 0x0000 }, + { 0x8901, 0xd608, 0x4000 }, + { 0x8501, 0xd604, 0x3000 }, + { 0x8501, 0xd602, 0x2000 }, + { 0x0501, 0xd601, 0x0000 }, + { 0x0501, 0xd603, 0x0000 }, + { 0x8501, 0xd606, 0x2000 }, + { 0x0501, 0xd605, 0x0000 }, + { 0x0501, 0xd607, 0x0000 }, + { 0x8901, 0xd60c, 0x3000 }, + { 0x8901, 0xd60a, 0x2000 }, + { 0x0901, 0xd609, 0x0000 }, + { 0x0901, 0xd60b, 0x0000 }, + { 0x8901, 0xd60e, 0x2000 }, + { 0x0901, 0xd60d, 0x0000 }, + { 0x0901, 0xd60f, 0x0000 }, + { 0x8901, 0xd620, 0x5000 }, + { 0x8901, 0xd618, 0x4000 }, + { 0x8901, 0xd614, 0x3000 }, + { 0x8901, 0xd612, 0x2000 }, + { 0x0901, 0xd611, 0x0000 }, + { 0x0901, 0xd613, 0x0000 }, + { 0x8901, 0xd616, 0x2000 }, + { 0x0901, 0xd615, 0x0000 }, + { 0x0901, 0xd617, 0x0000 }, + { 0x8901, 0xd61c, 0x3000 }, + { 0x8901, 0xd61a, 0x2000 }, + { 0x0901, 0xd619, 0x0000 }, + { 0x0901, 0xd61b, 0x0000 }, + { 0x8901, 0xd61e, 0x2000 }, + { 0x0901, 0xd61d, 0x0000 }, + { 0x0901, 0xd61f, 0x0000 }, + { 0x8501, 0xd628, 0x4000 }, + { 0x8501, 0xd624, 0x3000 }, + { 0x8501, 0xd622, 0x2000 }, + { 0x0901, 0xd621, 0x0000 }, + { 0x0501, 0xd623, 0x0000 }, + { 0x8501, 0xd626, 0x2000 }, + { 0x0501, 0xd625, 0x0000 }, + { 0x0501, 0xd627, 0x0000 }, + { 0x8501, 0xd62c, 0x3000 }, + { 0x8501, 0xd62a, 0x2000 }, + { 0x0501, 0xd629, 0x0000 }, + { 0x0501, 0xd62b, 0x0000 }, + { 0x8501, 0xd62e, 0x2000 }, + { 0x0501, 0xd62d, 0x0000 }, + { 0x0501, 0xd62f, 0x0000 }, + { 0x8901, 0xd650, 0x6000 }, + { 0x8901, 0xd640, 0x5000 }, + { 0x8501, 0xd638, 0x4000 }, + { 0x8501, 0xd634, 0x3000 }, + { 0x8501, 0xd632, 0x2000 }, + { 0x0501, 0xd631, 0x0000 }, + { 0x0501, 0xd633, 0x0000 }, + { 0x8501, 0xd636, 0x2000 }, + { 0x0501, 0xd635, 0x0000 }, + { 0x0501, 0xd637, 0x0000 }, + { 0x8901, 0xd63c, 0x3000 }, + { 0x8501, 0xd63a, 0x2000 }, + { 0x0501, 0xd639, 0x0000 }, + { 0x0501, 0xd63b, 0x0000 }, + { 0x8901, 0xd63e, 0x2000 }, + { 0x0901, 0xd63d, 0x0000 }, + { 0x0901, 0xd63f, 0x0000 }, + { 0x8901, 0xd648, 0x4000 }, + { 0x8901, 0xd644, 0x3000 }, + { 0x8901, 0xd642, 0x2000 }, + { 0x0901, 0xd641, 0x0000 }, + { 0x0901, 0xd643, 0x0000 }, + { 0x8901, 0xd646, 0x2000 }, + { 0x0901, 0xd645, 0x0000 }, + { 0x0901, 0xd647, 0x0000 }, + { 0x8901, 0xd64c, 0x3000 }, + { 0x8901, 0xd64a, 0x2000 }, + { 0x0901, 0xd649, 0x0000 }, + { 0x0901, 0xd64b, 0x0000 }, + { 0x8901, 0xd64e, 0x2000 }, + { 0x0901, 0xd64d, 0x0000 }, + { 0x0901, 0xd64f, 0x0000 }, + { 0x8501, 0xd660, 0x5000 }, + { 0x8501, 0xd658, 0x4000 }, + { 0x8901, 0xd654, 0x3000 }, + { 0x8901, 0xd652, 0x2000 }, + { 0x0901, 0xd651, 0x0000 }, + { 0x0901, 0xd653, 0x0000 }, + { 0x8501, 0xd656, 0x2000 }, + { 0x0901, 0xd655, 0x0000 }, + { 0x0501, 0xd657, 0x0000 }, + { 0x8501, 0xd65c, 0x3000 }, + { 0x8501, 0xd65a, 0x2000 }, + { 0x0501, 0xd659, 0x0000 }, + { 0x0501, 0xd65b, 0x0000 }, + { 0x8501, 0xd65e, 0x2000 }, + { 0x0501, 0xd65d, 0x0000 }, + { 0x0501, 0xd65f, 0x0000 }, + { 0x8501, 0xd668, 0x4000 }, + { 0x8501, 0xd664, 0x3000 }, + { 0x8501, 0xd662, 0x2000 }, + { 0x0501, 0xd661, 0x0000 }, + { 0x0501, 0xd663, 0x0000 }, + { 0x8501, 0xd666, 0x2000 }, + { 0x0501, 0xd665, 0x0000 }, + { 0x0501, 0xd667, 0x0000 }, + { 0x8501, 0xd66c, 0x3000 }, + { 0x8501, 0xd66a, 0x2000 }, + { 0x0501, 0xd669, 0x0000 }, + { 0x0501, 0xd66b, 0x0000 }, + { 0x8501, 0xd66e, 0x2000 }, + { 0x0501, 0xd66d, 0x0000 }, + { 0x0501, 0xd66f, 0x0000 }, + { 0x8501, 0xd774, 0x9000 }, + { 0x8901, 0xd6f4, 0x8000 }, + { 0x8901, 0xd6b4, 0x7000 }, + { 0x8501, 0xd690, 0x6000 }, + { 0x8901, 0xd680, 0x5000 }, + { 0x8901, 0xd678, 0x4000 }, + { 0x8901, 0xd674, 0x3000 }, + { 0x8901, 0xd672, 0x2000 }, + { 0x0901, 0xd671, 0x0000 }, + { 0x0901, 0xd673, 0x0000 }, + { 0x8901, 0xd676, 0x2000 }, + { 0x0901, 0xd675, 0x0000 }, + { 0x0901, 0xd677, 0x0000 }, + { 0x8901, 0xd67c, 0x3000 }, + { 0x8901, 0xd67a, 0x2000 }, + { 0x0901, 0xd679, 0x0000 }, + { 0x0901, 0xd67b, 0x0000 }, + { 0x8901, 0xd67e, 0x2000 }, + { 0x0901, 0xd67d, 0x0000 }, + { 0x0901, 0xd67f, 0x0000 }, + { 0x8901, 0xd688, 0x4000 }, + { 0x8901, 0xd684, 0x3000 }, + { 0x8901, 0xd682, 0x2000 }, + { 0x0901, 0xd681, 0x0000 }, + { 0x0901, 0xd683, 0x0000 }, + { 0x8901, 0xd686, 0x2000 }, + { 0x0901, 0xd685, 0x0000 }, + { 0x0901, 0xd687, 0x0000 }, + { 0x8501, 0xd68c, 0x3000 }, + { 0x8501, 0xd68a, 0x2000 }, + { 0x0901, 0xd689, 0x0000 }, + { 0x0501, 0xd68b, 0x0000 }, + { 0x8501, 0xd68e, 0x2000 }, + { 0x0501, 0xd68d, 0x0000 }, + { 0x0501, 0xd68f, 0x0000 }, + { 0x8501, 0xd6a0, 0x5000 }, + { 0x8501, 0xd698, 0x4000 }, + { 0x8501, 0xd694, 0x3000 }, + { 0x8501, 0xd692, 0x2000 }, + { 0x0501, 0xd691, 0x0000 }, + { 0x0501, 0xd693, 0x0000 }, + { 0x8501, 0xd696, 0x2000 }, + { 0x0501, 0xd695, 0x0000 }, + { 0x0501, 0xd697, 0x0000 }, + { 0x8501, 0xd69c, 0x3000 }, + { 0x8501, 0xd69a, 0x2000 }, + { 0x0501, 0xd699, 0x0000 }, + { 0x0501, 0xd69b, 0x0000 }, + { 0x8501, 0xd69e, 0x2000 }, + { 0x0501, 0xd69d, 0x0000 }, + { 0x0501, 0xd69f, 0x0000 }, + { 0x8901, 0xd6ac, 0x4000 }, + { 0x8901, 0xd6a8, 0x3000 }, + { 0x8501, 0xd6a2, 0x2000 }, + { 0x0501, 0xd6a1, 0x0000 }, + { 0x0501, 0xd6a3, 0x0000 }, + { 0x8901, 0xd6aa, 0x2000 }, + { 0x0901, 0xd6a9, 0x0000 }, + { 0x0901, 0xd6ab, 0x0000 }, + { 0x8901, 0xd6b0, 0x3000 }, + { 0x8901, 0xd6ae, 0x2000 }, + { 0x0901, 0xd6ad, 0x0000 }, + { 0x0901, 0xd6af, 0x0000 }, + { 0x8901, 0xd6b2, 0x2000 }, + { 0x0901, 0xd6b1, 0x0000 }, + { 0x0901, 0xd6b3, 0x0000 }, + { 0x8501, 0xd6d4, 0x6000 }, + { 0x8501, 0xd6c4, 0x5000 }, + { 0x8901, 0xd6bc, 0x4000 }, + { 0x8901, 0xd6b8, 0x3000 }, + { 0x8901, 0xd6b6, 0x2000 }, + { 0x0901, 0xd6b5, 0x0000 }, + { 0x0901, 0xd6b7, 0x0000 }, + { 0x8901, 0xd6ba, 0x2000 }, + { 0x0901, 0xd6b9, 0x0000 }, + { 0x0901, 0xd6bb, 0x0000 }, + { 0x8901, 0xd6c0, 0x3000 }, + { 0x8901, 0xd6be, 0x2000 }, + { 0x0901, 0xd6bd, 0x0000 }, + { 0x0901, 0xd6bf, 0x0000 }, + { 0x8501, 0xd6c2, 0x2000 }, + { 0x1901, 0xd6c1, 0x0000 }, + { 0x0501, 0xd6c3, 0x0000 }, + { 0x8501, 0xd6cc, 0x4000 }, + { 0x8501, 0xd6c8, 0x3000 }, + { 0x8501, 0xd6c6, 0x2000 }, + { 0x0501, 0xd6c5, 0x0000 }, + { 0x0501, 0xd6c7, 0x0000 }, + { 0x8501, 0xd6ca, 0x2000 }, + { 0x0501, 0xd6c9, 0x0000 }, + { 0x0501, 0xd6cb, 0x0000 }, + { 0x8501, 0xd6d0, 0x3000 }, + { 0x8501, 0xd6ce, 0x2000 }, + { 0x0501, 0xd6cd, 0x0000 }, + { 0x0501, 0xd6cf, 0x0000 }, + { 0x8501, 0xd6d2, 0x2000 }, + { 0x0501, 0xd6d1, 0x0000 }, + { 0x0501, 0xd6d3, 0x0000 }, + { 0x8901, 0xd6e4, 0x5000 }, + { 0x8501, 0xd6dc, 0x4000 }, + { 0x8501, 0xd6d8, 0x3000 }, + { 0x8501, 0xd6d6, 0x2000 }, + { 0x0501, 0xd6d5, 0x0000 }, + { 0x0501, 0xd6d7, 0x0000 }, + { 0x8501, 0xd6da, 0x2000 }, + { 0x0501, 0xd6d9, 0x0000 }, + { 0x1901, 0xd6db, 0x0000 }, + { 0x8501, 0xd6e0, 0x3000 }, + { 0x8501, 0xd6de, 0x2000 }, + { 0x0501, 0xd6dd, 0x0000 }, + { 0x0501, 0xd6df, 0x0000 }, + { 0x8901, 0xd6e2, 0x2000 }, + { 0x0501, 0xd6e1, 0x0000 }, + { 0x0901, 0xd6e3, 0x0000 }, + { 0x8901, 0xd6ec, 0x4000 }, + { 0x8901, 0xd6e8, 0x3000 }, + { 0x8901, 0xd6e6, 0x2000 }, + { 0x0901, 0xd6e5, 0x0000 }, + { 0x0901, 0xd6e7, 0x0000 }, + { 0x8901, 0xd6ea, 0x2000 }, + { 0x0901, 0xd6e9, 0x0000 }, + { 0x0901, 0xd6eb, 0x0000 }, + { 0x8901, 0xd6f0, 0x3000 }, + { 0x8901, 0xd6ee, 0x2000 }, + { 0x0901, 0xd6ed, 0x0000 }, + { 0x0901, 0xd6ef, 0x0000 }, + { 0x8901, 0xd6f2, 0x2000 }, + { 0x0901, 0xd6f1, 0x0000 }, + { 0x0901, 0xd6f3, 0x0000 }, + { 0x8901, 0xd734, 0x7000 }, + { 0x8501, 0xd714, 0x6000 }, + { 0x8501, 0xd704, 0x5000 }, + { 0x8501, 0xd6fc, 0x4000 }, + { 0x8901, 0xd6f8, 0x3000 }, + { 0x8901, 0xd6f6, 0x2000 }, + { 0x0901, 0xd6f5, 0x0000 }, + { 0x0901, 0xd6f7, 0x0000 }, + { 0x8901, 0xd6fa, 0x2000 }, + { 0x0901, 0xd6f9, 0x0000 }, + { 0x1901, 0xd6fb, 0x0000 }, + { 0x8501, 0xd700, 0x3000 }, + { 0x8501, 0xd6fe, 0x2000 }, + { 0x0501, 0xd6fd, 0x0000 }, + { 0x0501, 0xd6ff, 0x0000 }, + { 0x8501, 0xd702, 0x2000 }, + { 0x0501, 0xd701, 0x0000 }, + { 0x0501, 0xd703, 0x0000 }, + { 0x8501, 0xd70c, 0x4000 }, + { 0x8501, 0xd708, 0x3000 }, + { 0x8501, 0xd706, 0x2000 }, + { 0x0501, 0xd705, 0x0000 }, + { 0x0501, 0xd707, 0x0000 }, + { 0x8501, 0xd70a, 0x2000 }, + { 0x0501, 0xd709, 0x0000 }, + { 0x0501, 0xd70b, 0x0000 }, + { 0x8501, 0xd710, 0x3000 }, + { 0x8501, 0xd70e, 0x2000 }, + { 0x0501, 0xd70d, 0x0000 }, + { 0x0501, 0xd70f, 0x0000 }, + { 0x8501, 0xd712, 0x2000 }, + { 0x0501, 0xd711, 0x0000 }, + { 0x0501, 0xd713, 0x0000 }, + { 0x8901, 0xd724, 0x5000 }, + { 0x8901, 0xd71c, 0x4000 }, + { 0x8501, 0xd718, 0x3000 }, + { 0x8501, 0xd716, 0x2000 }, + { 0x1901, 0xd715, 0x0000 }, + { 0x0501, 0xd717, 0x0000 }, + { 0x8501, 0xd71a, 0x2000 }, + { 0x0501, 0xd719, 0x0000 }, + { 0x0501, 0xd71b, 0x0000 }, + { 0x8901, 0xd720, 0x3000 }, + { 0x8901, 0xd71e, 0x2000 }, + { 0x0901, 0xd71d, 0x0000 }, + { 0x0901, 0xd71f, 0x0000 }, + { 0x8901, 0xd722, 0x2000 }, + { 0x0901, 0xd721, 0x0000 }, + { 0x0901, 0xd723, 0x0000 }, + { 0x8901, 0xd72c, 0x4000 }, + { 0x8901, 0xd728, 0x3000 }, + { 0x8901, 0xd726, 0x2000 }, + { 0x0901, 0xd725, 0x0000 }, + { 0x0901, 0xd727, 0x0000 }, + { 0x8901, 0xd72a, 0x2000 }, + { 0x0901, 0xd729, 0x0000 }, + { 0x0901, 0xd72b, 0x0000 }, + { 0x8901, 0xd730, 0x3000 }, + { 0x8901, 0xd72e, 0x2000 }, + { 0x0901, 0xd72d, 0x0000 }, + { 0x0901, 0xd72f, 0x0000 }, + { 0x8901, 0xd732, 0x2000 }, + { 0x0901, 0xd731, 0x0000 }, + { 0x0901, 0xd733, 0x0000 }, + { 0x8501, 0xd754, 0x6000 }, + { 0x8501, 0xd744, 0x5000 }, + { 0x8501, 0xd73c, 0x4000 }, + { 0x8501, 0xd738, 0x3000 }, + { 0x8501, 0xd736, 0x2000 }, + { 0x1901, 0xd735, 0x0000 }, + { 0x0501, 0xd737, 0x0000 }, + { 0x8501, 0xd73a, 0x2000 }, + { 0x0501, 0xd739, 0x0000 }, + { 0x0501, 0xd73b, 0x0000 }, + { 0x8501, 0xd740, 0x3000 }, + { 0x8501, 0xd73e, 0x2000 }, + { 0x0501, 0xd73d, 0x0000 }, + { 0x0501, 0xd73f, 0x0000 }, + { 0x8501, 0xd742, 0x2000 }, + { 0x0501, 0xd741, 0x0000 }, + { 0x0501, 0xd743, 0x0000 }, + { 0x8501, 0xd74c, 0x4000 }, + { 0x8501, 0xd748, 0x3000 }, + { 0x8501, 0xd746, 0x2000 }, + { 0x0501, 0xd745, 0x0000 }, + { 0x0501, 0xd747, 0x0000 }, + { 0x8501, 0xd74a, 0x2000 }, + { 0x0501, 0xd749, 0x0000 }, + { 0x0501, 0xd74b, 0x0000 }, + { 0x8501, 0xd750, 0x3000 }, + { 0x8501, 0xd74e, 0x2000 }, + { 0x0501, 0xd74d, 0x0000 }, + { 0x1901, 0xd74f, 0x0000 }, + { 0x8501, 0xd752, 0x2000 }, + { 0x0501, 0xd751, 0x0000 }, + { 0x0501, 0xd753, 0x0000 }, + { 0x8901, 0xd764, 0x5000 }, + { 0x8901, 0xd75c, 0x4000 }, + { 0x8901, 0xd758, 0x3000 }, + { 0x8901, 0xd756, 0x2000 }, + { 0x0501, 0xd755, 0x0000 }, + { 0x0901, 0xd757, 0x0000 }, + { 0x8901, 0xd75a, 0x2000 }, + { 0x0901, 0xd759, 0x0000 }, + { 0x0901, 0xd75b, 0x0000 }, + { 0x8901, 0xd760, 0x3000 }, + { 0x8901, 0xd75e, 0x2000 }, + { 0x0901, 0xd75d, 0x0000 }, + { 0x0901, 0xd75f, 0x0000 }, + { 0x8901, 0xd762, 0x2000 }, + { 0x0901, 0xd761, 0x0000 }, + { 0x0901, 0xd763, 0x0000 }, + { 0x8901, 0xd76c, 0x4000 }, + { 0x8901, 0xd768, 0x3000 }, + { 0x8901, 0xd766, 0x2000 }, + { 0x0901, 0xd765, 0x0000 }, + { 0x0901, 0xd767, 0x0000 }, + { 0x8901, 0xd76a, 0x2000 }, + { 0x0901, 0xd769, 0x0000 }, + { 0x0901, 0xd76b, 0x0000 }, + { 0x8501, 0xd770, 0x3000 }, + { 0x8901, 0xd76e, 0x2000 }, + { 0x0901, 0xd76d, 0x0000 }, + { 0x1901, 0xd76f, 0x0000 }, + { 0x8501, 0xd772, 0x2000 }, + { 0x0501, 0xd771, 0x0000 }, + { 0x0501, 0xd773, 0x0000 }, + { 0x8d01, 0xd7f8, 0x8000 }, + { 0x8501, 0xd7b4, 0x7000 }, + { 0x8901, 0xd794, 0x6000 }, + { 0x8501, 0xd784, 0x5000 }, + { 0x8501, 0xd77c, 0x4000 }, + { 0x8501, 0xd778, 0x3000 }, + { 0x8501, 0xd776, 0x2000 }, + { 0x0501, 0xd775, 0x0000 }, + { 0x0501, 0xd777, 0x0000 }, + { 0x8501, 0xd77a, 0x2000 }, + { 0x0501, 0xd779, 0x0000 }, + { 0x0501, 0xd77b, 0x0000 }, + { 0x8501, 0xd780, 0x3000 }, + { 0x8501, 0xd77e, 0x2000 }, + { 0x0501, 0xd77d, 0x0000 }, + { 0x0501, 0xd77f, 0x0000 }, + { 0x8501, 0xd782, 0x2000 }, + { 0x0501, 0xd781, 0x0000 }, + { 0x0501, 0xd783, 0x0000 }, + { 0x8501, 0xd78c, 0x4000 }, + { 0x8501, 0xd788, 0x3000 }, + { 0x8501, 0xd786, 0x2000 }, + { 0x0501, 0xd785, 0x0000 }, + { 0x0501, 0xd787, 0x0000 }, + { 0x8501, 0xd78a, 0x2000 }, + { 0x1901, 0xd789, 0x0000 }, + { 0x0501, 0xd78b, 0x0000 }, + { 0x8901, 0xd790, 0x3000 }, + { 0x8501, 0xd78e, 0x2000 }, + { 0x0501, 0xd78d, 0x0000 }, + { 0x0501, 0xd78f, 0x0000 }, + { 0x8901, 0xd792, 0x2000 }, + { 0x0901, 0xd791, 0x0000 }, + { 0x0901, 0xd793, 0x0000 }, + { 0x8901, 0xd7a4, 0x5000 }, + { 0x8901, 0xd79c, 0x4000 }, + { 0x8901, 0xd798, 0x3000 }, + { 0x8901, 0xd796, 0x2000 }, + { 0x0901, 0xd795, 0x0000 }, + { 0x0901, 0xd797, 0x0000 }, + { 0x8901, 0xd79a, 0x2000 }, + { 0x0901, 0xd799, 0x0000 }, + { 0x0901, 0xd79b, 0x0000 }, + { 0x8901, 0xd7a0, 0x3000 }, + { 0x8901, 0xd79e, 0x2000 }, + { 0x0901, 0xd79d, 0x0000 }, + { 0x0901, 0xd79f, 0x0000 }, + { 0x8901, 0xd7a2, 0x2000 }, + { 0x0901, 0xd7a1, 0x0000 }, + { 0x0901, 0xd7a3, 0x0000 }, + { 0x8501, 0xd7ac, 0x4000 }, + { 0x8901, 0xd7a8, 0x3000 }, + { 0x8901, 0xd7a6, 0x2000 }, + { 0x0901, 0xd7a5, 0x0000 }, + { 0x0901, 0xd7a7, 0x0000 }, + { 0x8501, 0xd7aa, 0x2000 }, + { 0x1901, 0xd7a9, 0x0000 }, + { 0x0501, 0xd7ab, 0x0000 }, + { 0x8501, 0xd7b0, 0x3000 }, + { 0x8501, 0xd7ae, 0x2000 }, + { 0x0501, 0xd7ad, 0x0000 }, + { 0x0501, 0xd7af, 0x0000 }, + { 0x8501, 0xd7b2, 0x2000 }, + { 0x0501, 0xd7b1, 0x0000 }, + { 0x0501, 0xd7b3, 0x0000 }, + { 0x8d01, 0xd7d8, 0x6000 }, + { 0x8501, 0xd7c4, 0x5000 }, + { 0x8501, 0xd7bc, 0x4000 }, + { 0x8501, 0xd7b8, 0x3000 }, + { 0x8501, 0xd7b6, 0x2000 }, + { 0x0501, 0xd7b5, 0x0000 }, + { 0x0501, 0xd7b7, 0x0000 }, + { 0x8501, 0xd7ba, 0x2000 }, + { 0x0501, 0xd7b9, 0x0000 }, + { 0x0501, 0xd7bb, 0x0000 }, + { 0x8501, 0xd7c0, 0x3000 }, + { 0x8501, 0xd7be, 0x2000 }, + { 0x0501, 0xd7bd, 0x0000 }, + { 0x0501, 0xd7bf, 0x0000 }, + { 0x8501, 0xd7c2, 0x2000 }, + { 0x0501, 0xd7c1, 0x0000 }, + { 0x1901, 0xd7c3, 0x0000 }, + { 0x8d01, 0xd7d0, 0x4000 }, + { 0x8501, 0xd7c8, 0x3000 }, + { 0x8501, 0xd7c6, 0x2000 }, + { 0x0501, 0xd7c5, 0x0000 }, + { 0x0501, 0xd7c7, 0x0000 }, + { 0x8d01, 0xd7ce, 0x2000 }, + { 0x0501, 0xd7c9, 0x0000 }, + { 0x0d01, 0xd7cf, 0x0000 }, + { 0x8d01, 0xd7d4, 0x3000 }, + { 0x8d01, 0xd7d2, 0x2000 }, + { 0x0d01, 0xd7d1, 0x0000 }, + { 0x0d01, 0xd7d3, 0x0000 }, + { 0x8d01, 0xd7d6, 0x2000 }, + { 0x0d01, 0xd7d5, 0x0000 }, + { 0x0d01, 0xd7d7, 0x0000 }, + { 0x8d01, 0xd7e8, 0x5000 }, + { 0x8d01, 0xd7e0, 0x4000 }, + { 0x8d01, 0xd7dc, 0x3000 }, + { 0x8d01, 0xd7da, 0x2000 }, + { 0x0d01, 0xd7d9, 0x0000 }, + { 0x0d01, 0xd7db, 0x0000 }, + { 0x8d01, 0xd7de, 0x2000 }, + { 0x0d01, 0xd7dd, 0x0000 }, + { 0x0d01, 0xd7df, 0x0000 }, + { 0x8d01, 0xd7e4, 0x3000 }, + { 0x8d01, 0xd7e2, 0x2000 }, + { 0x0d01, 0xd7e1, 0x0000 }, + { 0x0d01, 0xd7e3, 0x0000 }, + { 0x8d01, 0xd7e6, 0x2000 }, + { 0x0d01, 0xd7e5, 0x0000 }, + { 0x0d01, 0xd7e7, 0x0000 }, + { 0x8d01, 0xd7f0, 0x4000 }, + { 0x8d01, 0xd7ec, 0x3000 }, + { 0x8d01, 0xd7ea, 0x2000 }, + { 0x0d01, 0xd7e9, 0x0000 }, + { 0x0d01, 0xd7eb, 0x0000 }, + { 0x8d01, 0xd7ee, 0x2000 }, + { 0x0d01, 0xd7ed, 0x0000 }, + { 0x0d01, 0xd7ef, 0x0000 }, + { 0x8d01, 0xd7f4, 0x3000 }, + { 0x8d01, 0xd7f2, 0x2000 }, + { 0x0d01, 0xd7f1, 0x0000 }, + { 0x0d01, 0xd7f3, 0x0000 }, + { 0x8d01, 0xd7f6, 0x2000 }, + { 0x0d01, 0xd7f5, 0x0000 }, + { 0x0d01, 0xd7f7, 0x0000 }, + { 0x8702, 0xf836, 0x7000 }, + { 0x8702, 0xf816, 0x6000 }, + { 0x8702, 0xf806, 0x5000 }, + { 0x8702, 0x0000, 0x4000 }, + { 0x8d01, 0xd7fc, 0x3000 }, + { 0x8d01, 0xd7fa, 0x2000 }, + { 0x0d01, 0xd7f9, 0x0000 }, + { 0x0d01, 0xd7fb, 0x0000 }, + { 0x8d01, 0xd7fe, 0x2000 }, + { 0x0d01, 0xd7fd, 0x0000 }, + { 0x0d01, 0xd7ff, 0x0000 }, + { 0x8702, 0xf802, 0x3000 }, + { 0x8702, 0xf800, 0x2000 }, + { 0x0702, 0xa6d6, 0x0000 }, + { 0x0702, 0xf801, 0x0000 }, + { 0x8702, 0xf804, 0x2000 }, + { 0x0702, 0xf803, 0x0000 }, + { 0x0702, 0xf805, 0x0000 }, + { 0x8702, 0xf80e, 0x4000 }, + { 0x8702, 0xf80a, 0x3000 }, + { 0x8702, 0xf808, 0x2000 }, + { 0x0702, 0xf807, 0x0000 }, + { 0x0702, 0xf809, 0x0000 }, + { 0x8702, 0xf80c, 0x2000 }, + { 0x0702, 0xf80b, 0x0000 }, + { 0x0702, 0xf80d, 0x0000 }, + { 0x8702, 0xf812, 0x3000 }, + { 0x8702, 0xf810, 0x2000 }, + { 0x0702, 0xf80f, 0x0000 }, + { 0x0702, 0xf811, 0x0000 }, + { 0x8702, 0xf814, 0x2000 }, + { 0x0702, 0xf813, 0x0000 }, + { 0x0702, 0xf815, 0x0000 }, + { 0x8702, 0xf826, 0x5000 }, + { 0x8702, 0xf81e, 0x4000 }, + { 0x8702, 0xf81a, 0x3000 }, + { 0x8702, 0xf818, 0x2000 }, + { 0x0702, 0xf817, 0x0000 }, + { 0x0702, 0xf819, 0x0000 }, + { 0x8702, 0xf81c, 0x2000 }, + { 0x0702, 0xf81b, 0x0000 }, + { 0x0702, 0xf81d, 0x0000 }, + { 0x8702, 0xf822, 0x3000 }, + { 0x8702, 0xf820, 0x2000 }, + { 0x0702, 0xf81f, 0x0000 }, + { 0x0702, 0xf821, 0x0000 }, + { 0x8702, 0xf824, 0x2000 }, + { 0x0702, 0xf823, 0x0000 }, + { 0x0702, 0xf825, 0x0000 }, + { 0x8702, 0xf82e, 0x4000 }, + { 0x8702, 0xf82a, 0x3000 }, + { 0x8702, 0xf828, 0x2000 }, + { 0x0702, 0xf827, 0x0000 }, + { 0x0702, 0xf829, 0x0000 }, + { 0x8702, 0xf82c, 0x2000 }, + { 0x0702, 0xf82b, 0x0000 }, + { 0x0702, 0xf82d, 0x0000 }, + { 0x8702, 0xf832, 0x3000 }, + { 0x8702, 0xf830, 0x2000 }, + { 0x0702, 0xf82f, 0x0000 }, + { 0x0702, 0xf831, 0x0000 }, + { 0x8702, 0xf834, 0x2000 }, + { 0x0702, 0xf833, 0x0000 }, + { 0x0702, 0xf835, 0x0000 }, + { 0x8702, 0xf856, 0x6000 }, + { 0x8702, 0xf846, 0x5000 }, + { 0x8702, 0xf83e, 0x4000 }, + { 0x8702, 0xf83a, 0x3000 }, + { 0x8702, 0xf838, 0x2000 }, + { 0x0702, 0xf837, 0x0000 }, + { 0x0702, 0xf839, 0x0000 }, + { 0x8702, 0xf83c, 0x2000 }, + { 0x0702, 0xf83b, 0x0000 }, + { 0x0702, 0xf83d, 0x0000 }, + { 0x8702, 0xf842, 0x3000 }, + { 0x8702, 0xf840, 0x2000 }, + { 0x0702, 0xf83f, 0x0000 }, + { 0x0702, 0xf841, 0x0000 }, + { 0x8702, 0xf844, 0x2000 }, + { 0x0702, 0xf843, 0x0000 }, + { 0x0702, 0xf845, 0x0000 }, + { 0x8702, 0xf84e, 0x4000 }, + { 0x8702, 0xf84a, 0x3000 }, + { 0x8702, 0xf848, 0x2000 }, + { 0x0702, 0xf847, 0x0000 }, + { 0x0702, 0xf849, 0x0000 }, + { 0x8702, 0xf84c, 0x2000 }, + { 0x0702, 0xf84b, 0x0000 }, + { 0x0702, 0xf84d, 0x0000 }, + { 0x8702, 0xf852, 0x3000 }, + { 0x8702, 0xf850, 0x2000 }, + { 0x0702, 0xf84f, 0x0000 }, + { 0x0702, 0xf851, 0x0000 }, + { 0x8702, 0xf854, 0x2000 }, + { 0x0702, 0xf853, 0x0000 }, + { 0x0702, 0xf855, 0x0000 }, + { 0x8702, 0xf866, 0x5000 }, + { 0x8702, 0xf85e, 0x4000 }, + { 0x8702, 0xf85a, 0x3000 }, + { 0x8702, 0xf858, 0x2000 }, + { 0x0702, 0xf857, 0x0000 }, + { 0x0702, 0xf859, 0x0000 }, + { 0x8702, 0xf85c, 0x2000 }, + { 0x0702, 0xf85b, 0x0000 }, + { 0x0702, 0xf85d, 0x0000 }, + { 0x8702, 0xf862, 0x3000 }, + { 0x8702, 0xf860, 0x2000 }, + { 0x0702, 0xf85f, 0x0000 }, + { 0x0702, 0xf861, 0x0000 }, + { 0x8702, 0xf864, 0x2000 }, + { 0x0702, 0xf863, 0x0000 }, + { 0x0702, 0xf865, 0x0000 }, + { 0x8702, 0xf86e, 0x4000 }, + { 0x8702, 0xf86a, 0x3000 }, + { 0x8702, 0xf868, 0x2000 }, + { 0x0702, 0xf867, 0x0000 }, + { 0x0702, 0xf869, 0x0000 }, + { 0x8702, 0xf86c, 0x2000 }, + { 0x0702, 0xf86b, 0x0000 }, + { 0x0702, 0xf86d, 0x0000 }, + { 0x8702, 0xf872, 0x3000 }, + { 0x8702, 0xf870, 0x2000 }, + { 0x0702, 0xf86f, 0x0000 }, + { 0x0702, 0xf871, 0x0000 }, + { 0x8702, 0xf874, 0x2000 }, + { 0x0702, 0xf873, 0x0000 }, + { 0x0702, 0xf875, 0x0000 }, + { 0x8702, 0xf976, 0x9000 }, + { 0x8702, 0xf8f6, 0x8000 }, + { 0x8702, 0xf8b6, 0x7000 }, + { 0x8702, 0xf896, 0x6000 }, + { 0x8702, 0xf886, 0x5000 }, + { 0x8702, 0xf87e, 0x4000 }, + { 0x8702, 0xf87a, 0x3000 }, + { 0x8702, 0xf878, 0x2000 }, + { 0x0702, 0xf877, 0x0000 }, + { 0x0702, 0xf879, 0x0000 }, + { 0x8702, 0xf87c, 0x2000 }, + { 0x0702, 0xf87b, 0x0000 }, + { 0x0702, 0xf87d, 0x0000 }, + { 0x8702, 0xf882, 0x3000 }, + { 0x8702, 0xf880, 0x2000 }, + { 0x0702, 0xf87f, 0x0000 }, + { 0x0702, 0xf881, 0x0000 }, + { 0x8702, 0xf884, 0x2000 }, + { 0x0702, 0xf883, 0x0000 }, + { 0x0702, 0xf885, 0x0000 }, + { 0x8702, 0xf88e, 0x4000 }, + { 0x8702, 0xf88a, 0x3000 }, + { 0x8702, 0xf888, 0x2000 }, + { 0x0702, 0xf887, 0x0000 }, + { 0x0702, 0xf889, 0x0000 }, + { 0x8702, 0xf88c, 0x2000 }, + { 0x0702, 0xf88b, 0x0000 }, + { 0x0702, 0xf88d, 0x0000 }, + { 0x8702, 0xf892, 0x3000 }, + { 0x8702, 0xf890, 0x2000 }, + { 0x0702, 0xf88f, 0x0000 }, + { 0x0702, 0xf891, 0x0000 }, + { 0x8702, 0xf894, 0x2000 }, + { 0x0702, 0xf893, 0x0000 }, + { 0x0702, 0xf895, 0x0000 }, + { 0x8702, 0xf8a6, 0x5000 }, + { 0x8702, 0xf89e, 0x4000 }, + { 0x8702, 0xf89a, 0x3000 }, + { 0x8702, 0xf898, 0x2000 }, + { 0x0702, 0xf897, 0x0000 }, + { 0x0702, 0xf899, 0x0000 }, + { 0x8702, 0xf89c, 0x2000 }, + { 0x0702, 0xf89b, 0x0000 }, + { 0x0702, 0xf89d, 0x0000 }, + { 0x8702, 0xf8a2, 0x3000 }, + { 0x8702, 0xf8a0, 0x2000 }, + { 0x0702, 0xf89f, 0x0000 }, + { 0x0702, 0xf8a1, 0x0000 }, + { 0x8702, 0xf8a4, 0x2000 }, + { 0x0702, 0xf8a3, 0x0000 }, + { 0x0702, 0xf8a5, 0x0000 }, + { 0x8702, 0xf8ae, 0x4000 }, + { 0x8702, 0xf8aa, 0x3000 }, + { 0x8702, 0xf8a8, 0x2000 }, + { 0x0702, 0xf8a7, 0x0000 }, + { 0x0702, 0xf8a9, 0x0000 }, + { 0x8702, 0xf8ac, 0x2000 }, + { 0x0702, 0xf8ab, 0x0000 }, + { 0x0702, 0xf8ad, 0x0000 }, + { 0x8702, 0xf8b2, 0x3000 }, + { 0x8702, 0xf8b0, 0x2000 }, + { 0x0702, 0xf8af, 0x0000 }, + { 0x0702, 0xf8b1, 0x0000 }, + { 0x8702, 0xf8b4, 0x2000 }, + { 0x0702, 0xf8b3, 0x0000 }, + { 0x0702, 0xf8b5, 0x0000 }, + { 0x8702, 0xf8d6, 0x6000 }, + { 0x8702, 0xf8c6, 0x5000 }, + { 0x8702, 0xf8be, 0x4000 }, + { 0x8702, 0xf8ba, 0x3000 }, + { 0x8702, 0xf8b8, 0x2000 }, + { 0x0702, 0xf8b7, 0x0000 }, + { 0x0702, 0xf8b9, 0x0000 }, + { 0x8702, 0xf8bc, 0x2000 }, + { 0x0702, 0xf8bb, 0x0000 }, + { 0x0702, 0xf8bd, 0x0000 }, + { 0x8702, 0xf8c2, 0x3000 }, + { 0x8702, 0xf8c0, 0x2000 }, + { 0x0702, 0xf8bf, 0x0000 }, + { 0x0702, 0xf8c1, 0x0000 }, + { 0x8702, 0xf8c4, 0x2000 }, + { 0x0702, 0xf8c3, 0x0000 }, + { 0x0702, 0xf8c5, 0x0000 }, + { 0x8702, 0xf8ce, 0x4000 }, + { 0x8702, 0xf8ca, 0x3000 }, + { 0x8702, 0xf8c8, 0x2000 }, + { 0x0702, 0xf8c7, 0x0000 }, + { 0x0702, 0xf8c9, 0x0000 }, + { 0x8702, 0xf8cc, 0x2000 }, + { 0x0702, 0xf8cb, 0x0000 }, + { 0x0702, 0xf8cd, 0x0000 }, + { 0x8702, 0xf8d2, 0x3000 }, + { 0x8702, 0xf8d0, 0x2000 }, + { 0x0702, 0xf8cf, 0x0000 }, + { 0x0702, 0xf8d1, 0x0000 }, + { 0x8702, 0xf8d4, 0x2000 }, + { 0x0702, 0xf8d3, 0x0000 }, + { 0x0702, 0xf8d5, 0x0000 }, + { 0x8702, 0xf8e6, 0x5000 }, + { 0x8702, 0xf8de, 0x4000 }, + { 0x8702, 0xf8da, 0x3000 }, + { 0x8702, 0xf8d8, 0x2000 }, + { 0x0702, 0xf8d7, 0x0000 }, + { 0x0702, 0xf8d9, 0x0000 }, + { 0x8702, 0xf8dc, 0x2000 }, + { 0x0702, 0xf8db, 0x0000 }, + { 0x0702, 0xf8dd, 0x0000 }, + { 0x8702, 0xf8e2, 0x3000 }, + { 0x8702, 0xf8e0, 0x2000 }, + { 0x0702, 0xf8df, 0x0000 }, + { 0x0702, 0xf8e1, 0x0000 }, + { 0x8702, 0xf8e4, 0x2000 }, + { 0x0702, 0xf8e3, 0x0000 }, + { 0x0702, 0xf8e5, 0x0000 }, + { 0x8702, 0xf8ee, 0x4000 }, + { 0x8702, 0xf8ea, 0x3000 }, + { 0x8702, 0xf8e8, 0x2000 }, + { 0x0702, 0xf8e7, 0x0000 }, + { 0x0702, 0xf8e9, 0x0000 }, + { 0x8702, 0xf8ec, 0x2000 }, + { 0x0702, 0xf8eb, 0x0000 }, + { 0x0702, 0xf8ed, 0x0000 }, + { 0x8702, 0xf8f2, 0x3000 }, + { 0x8702, 0xf8f0, 0x2000 }, + { 0x0702, 0xf8ef, 0x0000 }, + { 0x0702, 0xf8f1, 0x0000 }, + { 0x8702, 0xf8f4, 0x2000 }, + { 0x0702, 0xf8f3, 0x0000 }, + { 0x0702, 0xf8f5, 0x0000 }, + { 0x8702, 0xf936, 0x7000 }, + { 0x8702, 0xf916, 0x6000 }, + { 0x8702, 0xf906, 0x5000 }, + { 0x8702, 0xf8fe, 0x4000 }, + { 0x8702, 0xf8fa, 0x3000 }, + { 0x8702, 0xf8f8, 0x2000 }, + { 0x0702, 0xf8f7, 0x0000 }, + { 0x0702, 0xf8f9, 0x0000 }, + { 0x8702, 0xf8fc, 0x2000 }, + { 0x0702, 0xf8fb, 0x0000 }, + { 0x0702, 0xf8fd, 0x0000 }, + { 0x8702, 0xf902, 0x3000 }, + { 0x8702, 0xf900, 0x2000 }, + { 0x0702, 0xf8ff, 0x0000 }, + { 0x0702, 0xf901, 0x0000 }, + { 0x8702, 0xf904, 0x2000 }, + { 0x0702, 0xf903, 0x0000 }, + { 0x0702, 0xf905, 0x0000 }, + { 0x8702, 0xf90e, 0x4000 }, + { 0x8702, 0xf90a, 0x3000 }, + { 0x8702, 0xf908, 0x2000 }, + { 0x0702, 0xf907, 0x0000 }, + { 0x0702, 0xf909, 0x0000 }, + { 0x8702, 0xf90c, 0x2000 }, + { 0x0702, 0xf90b, 0x0000 }, + { 0x0702, 0xf90d, 0x0000 }, + { 0x8702, 0xf912, 0x3000 }, + { 0x8702, 0xf910, 0x2000 }, + { 0x0702, 0xf90f, 0x0000 }, + { 0x0702, 0xf911, 0x0000 }, + { 0x8702, 0xf914, 0x2000 }, + { 0x0702, 0xf913, 0x0000 }, + { 0x0702, 0xf915, 0x0000 }, + { 0x8702, 0xf926, 0x5000 }, + { 0x8702, 0xf91e, 0x4000 }, + { 0x8702, 0xf91a, 0x3000 }, + { 0x8702, 0xf918, 0x2000 }, + { 0x0702, 0xf917, 0x0000 }, + { 0x0702, 0xf919, 0x0000 }, + { 0x8702, 0xf91c, 0x2000 }, + { 0x0702, 0xf91b, 0x0000 }, + { 0x0702, 0xf91d, 0x0000 }, + { 0x8702, 0xf922, 0x3000 }, + { 0x8702, 0xf920, 0x2000 }, + { 0x0702, 0xf91f, 0x0000 }, + { 0x0702, 0xf921, 0x0000 }, + { 0x8702, 0xf924, 0x2000 }, + { 0x0702, 0xf923, 0x0000 }, + { 0x0702, 0xf925, 0x0000 }, + { 0x8702, 0xf92e, 0x4000 }, + { 0x8702, 0xf92a, 0x3000 }, + { 0x8702, 0xf928, 0x2000 }, + { 0x0702, 0xf927, 0x0000 }, + { 0x0702, 0xf929, 0x0000 }, + { 0x8702, 0xf92c, 0x2000 }, + { 0x0702, 0xf92b, 0x0000 }, + { 0x0702, 0xf92d, 0x0000 }, + { 0x8702, 0xf932, 0x3000 }, + { 0x8702, 0xf930, 0x2000 }, + { 0x0702, 0xf92f, 0x0000 }, + { 0x0702, 0xf931, 0x0000 }, + { 0x8702, 0xf934, 0x2000 }, + { 0x0702, 0xf933, 0x0000 }, + { 0x0702, 0xf935, 0x0000 }, + { 0x8702, 0xf956, 0x6000 }, + { 0x8702, 0xf946, 0x5000 }, + { 0x8702, 0xf93e, 0x4000 }, + { 0x8702, 0xf93a, 0x3000 }, + { 0x8702, 0xf938, 0x2000 }, + { 0x0702, 0xf937, 0x0000 }, + { 0x0702, 0xf939, 0x0000 }, + { 0x8702, 0xf93c, 0x2000 }, + { 0x0702, 0xf93b, 0x0000 }, + { 0x0702, 0xf93d, 0x0000 }, + { 0x8702, 0xf942, 0x3000 }, + { 0x8702, 0xf940, 0x2000 }, + { 0x0702, 0xf93f, 0x0000 }, + { 0x0702, 0xf941, 0x0000 }, + { 0x8702, 0xf944, 0x2000 }, + { 0x0702, 0xf943, 0x0000 }, + { 0x0702, 0xf945, 0x0000 }, + { 0x8702, 0xf94e, 0x4000 }, + { 0x8702, 0xf94a, 0x3000 }, + { 0x8702, 0xf948, 0x2000 }, + { 0x0702, 0xf947, 0x0000 }, + { 0x0702, 0xf949, 0x0000 }, + { 0x8702, 0xf94c, 0x2000 }, + { 0x0702, 0xf94b, 0x0000 }, + { 0x0702, 0xf94d, 0x0000 }, + { 0x8702, 0xf952, 0x3000 }, + { 0x8702, 0xf950, 0x2000 }, + { 0x0702, 0xf94f, 0x0000 }, + { 0x0702, 0xf951, 0x0000 }, + { 0x8702, 0xf954, 0x2000 }, + { 0x0702, 0xf953, 0x0000 }, + { 0x0702, 0xf955, 0x0000 }, + { 0x8702, 0xf966, 0x5000 }, + { 0x8702, 0xf95e, 0x4000 }, + { 0x8702, 0xf95a, 0x3000 }, + { 0x8702, 0xf958, 0x2000 }, + { 0x0702, 0xf957, 0x0000 }, + { 0x0702, 0xf959, 0x0000 }, + { 0x8702, 0xf95c, 0x2000 }, + { 0x0702, 0xf95b, 0x0000 }, + { 0x0702, 0xf95d, 0x0000 }, + { 0x8702, 0xf962, 0x3000 }, + { 0x8702, 0xf960, 0x2000 }, + { 0x0702, 0xf95f, 0x0000 }, + { 0x0702, 0xf961, 0x0000 }, + { 0x8702, 0xf964, 0x2000 }, + { 0x0702, 0xf963, 0x0000 }, + { 0x0702, 0xf965, 0x0000 }, + { 0x8702, 0xf96e, 0x4000 }, + { 0x8702, 0xf96a, 0x3000 }, + { 0x8702, 0xf968, 0x2000 }, + { 0x0702, 0xf967, 0x0000 }, + { 0x0702, 0xf969, 0x0000 }, + { 0x8702, 0xf96c, 0x2000 }, + { 0x0702, 0xf96b, 0x0000 }, + { 0x0702, 0xf96d, 0x0000 }, + { 0x8702, 0xf972, 0x3000 }, + { 0x8702, 0xf970, 0x2000 }, + { 0x0702, 0xf96f, 0x0000 }, + { 0x0702, 0xf971, 0x0000 }, + { 0x8702, 0xf974, 0x2000 }, + { 0x0702, 0xf973, 0x0000 }, + { 0x0702, 0xf975, 0x0000 }, + { 0x810e, 0x0077, 0x9000 }, + { 0x8702, 0xf9f6, 0x8000 }, + { 0x8702, 0xf9b6, 0x7000 }, + { 0x8702, 0xf996, 0x6000 }, + { 0x8702, 0xf986, 0x5000 }, + { 0x8702, 0xf97e, 0x4000 }, + { 0x8702, 0xf97a, 0x3000 }, + { 0x8702, 0xf978, 0x2000 }, + { 0x0702, 0xf977, 0x0000 }, + { 0x0702, 0xf979, 0x0000 }, + { 0x8702, 0xf97c, 0x2000 }, + { 0x0702, 0xf97b, 0x0000 }, + { 0x0702, 0xf97d, 0x0000 }, + { 0x8702, 0xf982, 0x3000 }, + { 0x8702, 0xf980, 0x2000 }, + { 0x0702, 0xf97f, 0x0000 }, + { 0x0702, 0xf981, 0x0000 }, + { 0x8702, 0xf984, 0x2000 }, + { 0x0702, 0xf983, 0x0000 }, + { 0x0702, 0xf985, 0x0000 }, + { 0x8702, 0xf98e, 0x4000 }, + { 0x8702, 0xf98a, 0x3000 }, + { 0x8702, 0xf988, 0x2000 }, + { 0x0702, 0xf987, 0x0000 }, + { 0x0702, 0xf989, 0x0000 }, + { 0x8702, 0xf98c, 0x2000 }, + { 0x0702, 0xf98b, 0x0000 }, + { 0x0702, 0xf98d, 0x0000 }, + { 0x8702, 0xf992, 0x3000 }, + { 0x8702, 0xf990, 0x2000 }, + { 0x0702, 0xf98f, 0x0000 }, + { 0x0702, 0xf991, 0x0000 }, + { 0x8702, 0xf994, 0x2000 }, + { 0x0702, 0xf993, 0x0000 }, + { 0x0702, 0xf995, 0x0000 }, + { 0x8702, 0xf9a6, 0x5000 }, + { 0x8702, 0xf99e, 0x4000 }, + { 0x8702, 0xf99a, 0x3000 }, + { 0x8702, 0xf998, 0x2000 }, + { 0x0702, 0xf997, 0x0000 }, + { 0x0702, 0xf999, 0x0000 }, + { 0x8702, 0xf99c, 0x2000 }, + { 0x0702, 0xf99b, 0x0000 }, + { 0x0702, 0xf99d, 0x0000 }, + { 0x8702, 0xf9a2, 0x3000 }, + { 0x8702, 0xf9a0, 0x2000 }, + { 0x0702, 0xf99f, 0x0000 }, + { 0x0702, 0xf9a1, 0x0000 }, + { 0x8702, 0xf9a4, 0x2000 }, + { 0x0702, 0xf9a3, 0x0000 }, + { 0x0702, 0xf9a5, 0x0000 }, + { 0x8702, 0xf9ae, 0x4000 }, + { 0x8702, 0xf9aa, 0x3000 }, + { 0x8702, 0xf9a8, 0x2000 }, + { 0x0702, 0xf9a7, 0x0000 }, + { 0x0702, 0xf9a9, 0x0000 }, + { 0x8702, 0xf9ac, 0x2000 }, + { 0x0702, 0xf9ab, 0x0000 }, + { 0x0702, 0xf9ad, 0x0000 }, + { 0x8702, 0xf9b2, 0x3000 }, + { 0x8702, 0xf9b0, 0x2000 }, + { 0x0702, 0xf9af, 0x0000 }, + { 0x0702, 0xf9b1, 0x0000 }, + { 0x8702, 0xf9b4, 0x2000 }, + { 0x0702, 0xf9b3, 0x0000 }, + { 0x0702, 0xf9b5, 0x0000 }, + { 0x8702, 0xf9d6, 0x6000 }, + { 0x8702, 0xf9c6, 0x5000 }, + { 0x8702, 0xf9be, 0x4000 }, + { 0x8702, 0xf9ba, 0x3000 }, + { 0x8702, 0xf9b8, 0x2000 }, + { 0x0702, 0xf9b7, 0x0000 }, + { 0x0702, 0xf9b9, 0x0000 }, + { 0x8702, 0xf9bc, 0x2000 }, + { 0x0702, 0xf9bb, 0x0000 }, + { 0x0702, 0xf9bd, 0x0000 }, + { 0x8702, 0xf9c2, 0x3000 }, + { 0x8702, 0xf9c0, 0x2000 }, + { 0x0702, 0xf9bf, 0x0000 }, + { 0x0702, 0xf9c1, 0x0000 }, + { 0x8702, 0xf9c4, 0x2000 }, + { 0x0702, 0xf9c3, 0x0000 }, + { 0x0702, 0xf9c5, 0x0000 }, + { 0x8702, 0xf9ce, 0x4000 }, + { 0x8702, 0xf9ca, 0x3000 }, + { 0x8702, 0xf9c8, 0x2000 }, + { 0x0702, 0xf9c7, 0x0000 }, + { 0x0702, 0xf9c9, 0x0000 }, + { 0x8702, 0xf9cc, 0x2000 }, + { 0x0702, 0xf9cb, 0x0000 }, + { 0x0702, 0xf9cd, 0x0000 }, + { 0x8702, 0xf9d2, 0x3000 }, + { 0x8702, 0xf9d0, 0x2000 }, + { 0x0702, 0xf9cf, 0x0000 }, + { 0x0702, 0xf9d1, 0x0000 }, + { 0x8702, 0xf9d4, 0x2000 }, + { 0x0702, 0xf9d3, 0x0000 }, + { 0x0702, 0xf9d5, 0x0000 }, + { 0x8702, 0xf9e6, 0x5000 }, + { 0x8702, 0xf9de, 0x4000 }, + { 0x8702, 0xf9da, 0x3000 }, + { 0x8702, 0xf9d8, 0x2000 }, + { 0x0702, 0xf9d7, 0x0000 }, + { 0x0702, 0xf9d9, 0x0000 }, + { 0x8702, 0xf9dc, 0x2000 }, + { 0x0702, 0xf9db, 0x0000 }, + { 0x0702, 0xf9dd, 0x0000 }, + { 0x8702, 0xf9e2, 0x3000 }, + { 0x8702, 0xf9e0, 0x2000 }, + { 0x0702, 0xf9df, 0x0000 }, + { 0x0702, 0xf9e1, 0x0000 }, + { 0x8702, 0xf9e4, 0x2000 }, + { 0x0702, 0xf9e3, 0x0000 }, + { 0x0702, 0xf9e5, 0x0000 }, + { 0x8702, 0xf9ee, 0x4000 }, + { 0x8702, 0xf9ea, 0x3000 }, + { 0x8702, 0xf9e8, 0x2000 }, + { 0x0702, 0xf9e7, 0x0000 }, + { 0x0702, 0xf9e9, 0x0000 }, + { 0x8702, 0xf9ec, 0x2000 }, + { 0x0702, 0xf9eb, 0x0000 }, + { 0x0702, 0xf9ed, 0x0000 }, + { 0x8702, 0xf9f2, 0x3000 }, + { 0x8702, 0xf9f0, 0x2000 }, + { 0x0702, 0xf9ef, 0x0000 }, + { 0x0702, 0xf9f1, 0x0000 }, + { 0x8702, 0xf9f4, 0x2000 }, + { 0x0702, 0xf9f3, 0x0000 }, + { 0x0702, 0xf9f5, 0x0000 }, + { 0x810e, 0x0037, 0x7000 }, + { 0x8702, 0xfa16, 0x6000 }, + { 0x8702, 0xfa06, 0x5000 }, + { 0x8702, 0xf9fe, 0x4000 }, + { 0x8702, 0xf9fa, 0x3000 }, + { 0x8702, 0xf9f8, 0x2000 }, + { 0x0702, 0xf9f7, 0x0000 }, + { 0x0702, 0xf9f9, 0x0000 }, + { 0x8702, 0xf9fc, 0x2000 }, + { 0x0702, 0xf9fb, 0x0000 }, + { 0x0702, 0xf9fd, 0x0000 }, + { 0x8702, 0xfa02, 0x3000 }, + { 0x8702, 0xfa00, 0x2000 }, + { 0x0702, 0xf9ff, 0x0000 }, + { 0x0702, 0xfa01, 0x0000 }, + { 0x8702, 0xfa04, 0x2000 }, + { 0x0702, 0xfa03, 0x0000 }, + { 0x0702, 0xfa05, 0x0000 }, + { 0x8702, 0xfa0e, 0x4000 }, + { 0x8702, 0xfa0a, 0x3000 }, + { 0x8702, 0xfa08, 0x2000 }, + { 0x0702, 0xfa07, 0x0000 }, + { 0x0702, 0xfa09, 0x0000 }, + { 0x8702, 0xfa0c, 0x2000 }, + { 0x0702, 0xfa0b, 0x0000 }, + { 0x0702, 0xfa0d, 0x0000 }, + { 0x8702, 0xfa12, 0x3000 }, + { 0x8702, 0xfa10, 0x2000 }, + { 0x0702, 0xfa0f, 0x0000 }, + { 0x0702, 0xfa11, 0x0000 }, + { 0x8702, 0xfa14, 0x2000 }, + { 0x0702, 0xfa13, 0x0000 }, + { 0x0702, 0xfa15, 0x0000 }, + { 0x810e, 0x0027, 0x5000 }, + { 0x810e, 0x0001, 0x4000 }, + { 0x8702, 0xfa1a, 0x3000 }, + { 0x8702, 0xfa18, 0x2000 }, + { 0x0702, 0xfa17, 0x0000 }, + { 0x0702, 0xfa19, 0x0000 }, + { 0x8702, 0xfa1c, 0x2000 }, + { 0x0702, 0xfa1b, 0x0000 }, + { 0x0702, 0xfa1d, 0x0000 }, + { 0x810e, 0x0023, 0x3000 }, + { 0x810e, 0x0021, 0x2000 }, + { 0x010e, 0x0020, 0x0000 }, + { 0x010e, 0x0022, 0x0000 }, + { 0x810e, 0x0025, 0x2000 }, + { 0x010e, 0x0024, 0x0000 }, + { 0x010e, 0x0026, 0x0000 }, + { 0x810e, 0x002f, 0x4000 }, + { 0x810e, 0x002b, 0x3000 }, + { 0x810e, 0x0029, 0x2000 }, + { 0x010e, 0x0028, 0x0000 }, + { 0x010e, 0x002a, 0x0000 }, + { 0x810e, 0x002d, 0x2000 }, + { 0x010e, 0x002c, 0x0000 }, + { 0x010e, 0x002e, 0x0000 }, + { 0x810e, 0x0033, 0x3000 }, + { 0x810e, 0x0031, 0x2000 }, + { 0x010e, 0x0030, 0x0000 }, + { 0x010e, 0x0032, 0x0000 }, + { 0x810e, 0x0035, 0x2000 }, + { 0x010e, 0x0034, 0x0000 }, + { 0x010e, 0x0036, 0x0000 }, + { 0x810e, 0x0057, 0x6000 }, + { 0x810e, 0x0047, 0x5000 }, + { 0x810e, 0x003f, 0x4000 }, + { 0x810e, 0x003b, 0x3000 }, + { 0x810e, 0x0039, 0x2000 }, + { 0x010e, 0x0038, 0x0000 }, + { 0x010e, 0x003a, 0x0000 }, + { 0x810e, 0x003d, 0x2000 }, + { 0x010e, 0x003c, 0x0000 }, + { 0x010e, 0x003e, 0x0000 }, + { 0x810e, 0x0043, 0x3000 }, + { 0x810e, 0x0041, 0x2000 }, + { 0x010e, 0x0040, 0x0000 }, + { 0x010e, 0x0042, 0x0000 }, + { 0x810e, 0x0045, 0x2000 }, + { 0x010e, 0x0044, 0x0000 }, + { 0x010e, 0x0046, 0x0000 }, + { 0x810e, 0x004f, 0x4000 }, + { 0x810e, 0x004b, 0x3000 }, + { 0x810e, 0x0049, 0x2000 }, + { 0x010e, 0x0048, 0x0000 }, + { 0x010e, 0x004a, 0x0000 }, + { 0x810e, 0x004d, 0x2000 }, + { 0x010e, 0x004c, 0x0000 }, + { 0x010e, 0x004e, 0x0000 }, + { 0x810e, 0x0053, 0x3000 }, + { 0x810e, 0x0051, 0x2000 }, + { 0x010e, 0x0050, 0x0000 }, + { 0x010e, 0x0052, 0x0000 }, + { 0x810e, 0x0055, 0x2000 }, + { 0x010e, 0x0054, 0x0000 }, + { 0x010e, 0x0056, 0x0000 }, + { 0x810e, 0x0067, 0x5000 }, + { 0x810e, 0x005f, 0x4000 }, + { 0x810e, 0x005b, 0x3000 }, + { 0x810e, 0x0059, 0x2000 }, + { 0x010e, 0x0058, 0x0000 }, + { 0x010e, 0x005a, 0x0000 }, + { 0x810e, 0x005d, 0x2000 }, + { 0x010e, 0x005c, 0x0000 }, + { 0x010e, 0x005e, 0x0000 }, + { 0x810e, 0x0063, 0x3000 }, + { 0x810e, 0x0061, 0x2000 }, + { 0x010e, 0x0060, 0x0000 }, + { 0x010e, 0x0062, 0x0000 }, + { 0x810e, 0x0065, 0x2000 }, + { 0x010e, 0x0064, 0x0000 }, + { 0x010e, 0x0066, 0x0000 }, + { 0x810e, 0x006f, 0x4000 }, + { 0x810e, 0x006b, 0x3000 }, + { 0x810e, 0x0069, 0x2000 }, + { 0x010e, 0x0068, 0x0000 }, + { 0x010e, 0x006a, 0x0000 }, + { 0x810e, 0x006d, 0x2000 }, + { 0x010e, 0x006c, 0x0000 }, + { 0x010e, 0x006e, 0x0000 }, + { 0x810e, 0x0073, 0x3000 }, + { 0x810e, 0x0071, 0x2000 }, + { 0x010e, 0x0070, 0x0000 }, + { 0x010e, 0x0072, 0x0000 }, + { 0x810e, 0x0075, 0x2000 }, + { 0x010e, 0x0074, 0x0000 }, + { 0x010e, 0x0076, 0x0000 }, + { 0x8c0e, 0x0177, 0x8000 }, + { 0x8c0e, 0x0137, 0x7000 }, + { 0x8c0e, 0x0117, 0x6000 }, + { 0x8c0e, 0x0107, 0x5000 }, + { 0x810e, 0x007f, 0x4000 }, + { 0x810e, 0x007b, 0x3000 }, + { 0x810e, 0x0079, 0x2000 }, + { 0x010e, 0x0078, 0x0000 }, + { 0x010e, 0x007a, 0x0000 }, + { 0x810e, 0x007d, 0x2000 }, + { 0x010e, 0x007c, 0x0000 }, + { 0x010e, 0x007e, 0x0000 }, + { 0x8c0e, 0x0103, 0x3000 }, + { 0x8c0e, 0x0101, 0x2000 }, + { 0x0c0e, 0x0100, 0x0000 }, + { 0x0c0e, 0x0102, 0x0000 }, + { 0x8c0e, 0x0105, 0x2000 }, + { 0x0c0e, 0x0104, 0x0000 }, + { 0x0c0e, 0x0106, 0x0000 }, + { 0x8c0e, 0x010f, 0x4000 }, + { 0x8c0e, 0x010b, 0x3000 }, + { 0x8c0e, 0x0109, 0x2000 }, + { 0x0c0e, 0x0108, 0x0000 }, + { 0x0c0e, 0x010a, 0x0000 }, + { 0x8c0e, 0x010d, 0x2000 }, + { 0x0c0e, 0x010c, 0x0000 }, + { 0x0c0e, 0x010e, 0x0000 }, + { 0x8c0e, 0x0113, 0x3000 }, + { 0x8c0e, 0x0111, 0x2000 }, + { 0x0c0e, 0x0110, 0x0000 }, + { 0x0c0e, 0x0112, 0x0000 }, + { 0x8c0e, 0x0115, 0x2000 }, + { 0x0c0e, 0x0114, 0x0000 }, + { 0x0c0e, 0x0116, 0x0000 }, + { 0x8c0e, 0x0127, 0x5000 }, + { 0x8c0e, 0x011f, 0x4000 }, + { 0x8c0e, 0x011b, 0x3000 }, + { 0x8c0e, 0x0119, 0x2000 }, + { 0x0c0e, 0x0118, 0x0000 }, + { 0x0c0e, 0x011a, 0x0000 }, + { 0x8c0e, 0x011d, 0x2000 }, + { 0x0c0e, 0x011c, 0x0000 }, + { 0x0c0e, 0x011e, 0x0000 }, + { 0x8c0e, 0x0123, 0x3000 }, + { 0x8c0e, 0x0121, 0x2000 }, + { 0x0c0e, 0x0120, 0x0000 }, + { 0x0c0e, 0x0122, 0x0000 }, + { 0x8c0e, 0x0125, 0x2000 }, + { 0x0c0e, 0x0124, 0x0000 }, + { 0x0c0e, 0x0126, 0x0000 }, + { 0x8c0e, 0x012f, 0x4000 }, + { 0x8c0e, 0x012b, 0x3000 }, + { 0x8c0e, 0x0129, 0x2000 }, + { 0x0c0e, 0x0128, 0x0000 }, + { 0x0c0e, 0x012a, 0x0000 }, + { 0x8c0e, 0x012d, 0x2000 }, + { 0x0c0e, 0x012c, 0x0000 }, + { 0x0c0e, 0x012e, 0x0000 }, + { 0x8c0e, 0x0133, 0x3000 }, + { 0x8c0e, 0x0131, 0x2000 }, + { 0x0c0e, 0x0130, 0x0000 }, + { 0x0c0e, 0x0132, 0x0000 }, + { 0x8c0e, 0x0135, 0x2000 }, + { 0x0c0e, 0x0134, 0x0000 }, + { 0x0c0e, 0x0136, 0x0000 }, + { 0x8c0e, 0x0157, 0x6000 }, + { 0x8c0e, 0x0147, 0x5000 }, + { 0x8c0e, 0x013f, 0x4000 }, + { 0x8c0e, 0x013b, 0x3000 }, + { 0x8c0e, 0x0139, 0x2000 }, + { 0x0c0e, 0x0138, 0x0000 }, + { 0x0c0e, 0x013a, 0x0000 }, + { 0x8c0e, 0x013d, 0x2000 }, + { 0x0c0e, 0x013c, 0x0000 }, + { 0x0c0e, 0x013e, 0x0000 }, + { 0x8c0e, 0x0143, 0x3000 }, + { 0x8c0e, 0x0141, 0x2000 }, + { 0x0c0e, 0x0140, 0x0000 }, + { 0x0c0e, 0x0142, 0x0000 }, + { 0x8c0e, 0x0145, 0x2000 }, + { 0x0c0e, 0x0144, 0x0000 }, + { 0x0c0e, 0x0146, 0x0000 }, + { 0x8c0e, 0x014f, 0x4000 }, + { 0x8c0e, 0x014b, 0x3000 }, + { 0x8c0e, 0x0149, 0x2000 }, + { 0x0c0e, 0x0148, 0x0000 }, + { 0x0c0e, 0x014a, 0x0000 }, + { 0x8c0e, 0x014d, 0x2000 }, + { 0x0c0e, 0x014c, 0x0000 }, + { 0x0c0e, 0x014e, 0x0000 }, + { 0x8c0e, 0x0153, 0x3000 }, + { 0x8c0e, 0x0151, 0x2000 }, + { 0x0c0e, 0x0150, 0x0000 }, + { 0x0c0e, 0x0152, 0x0000 }, + { 0x8c0e, 0x0155, 0x2000 }, + { 0x0c0e, 0x0154, 0x0000 }, + { 0x0c0e, 0x0156, 0x0000 }, + { 0x8c0e, 0x0167, 0x5000 }, + { 0x8c0e, 0x015f, 0x4000 }, + { 0x8c0e, 0x015b, 0x3000 }, + { 0x8c0e, 0x0159, 0x2000 }, + { 0x0c0e, 0x0158, 0x0000 }, + { 0x0c0e, 0x015a, 0x0000 }, + { 0x8c0e, 0x015d, 0x2000 }, + { 0x0c0e, 0x015c, 0x0000 }, + { 0x0c0e, 0x015e, 0x0000 }, + { 0x8c0e, 0x0163, 0x3000 }, + { 0x8c0e, 0x0161, 0x2000 }, + { 0x0c0e, 0x0160, 0x0000 }, + { 0x0c0e, 0x0162, 0x0000 }, + { 0x8c0e, 0x0165, 0x2000 }, + { 0x0c0e, 0x0164, 0x0000 }, + { 0x0c0e, 0x0166, 0x0000 }, + { 0x8c0e, 0x016f, 0x4000 }, + { 0x8c0e, 0x016b, 0x3000 }, + { 0x8c0e, 0x0169, 0x2000 }, + { 0x0c0e, 0x0168, 0x0000 }, + { 0x0c0e, 0x016a, 0x0000 }, + { 0x8c0e, 0x016d, 0x2000 }, + { 0x0c0e, 0x016c, 0x0000 }, + { 0x0c0e, 0x016e, 0x0000 }, + { 0x8c0e, 0x0173, 0x3000 }, + { 0x8c0e, 0x0171, 0x2000 }, + { 0x0c0e, 0x0170, 0x0000 }, + { 0x0c0e, 0x0172, 0x0000 }, + { 0x8c0e, 0x0175, 0x2000 }, + { 0x0c0e, 0x0174, 0x0000 }, + { 0x0c0e, 0x0176, 0x0000 }, + { 0x8c0e, 0x01b7, 0x7000 }, + { 0x8c0e, 0x0197, 0x6000 }, + { 0x8c0e, 0x0187, 0x5000 }, + { 0x8c0e, 0x017f, 0x4000 }, + { 0x8c0e, 0x017b, 0x3000 }, + { 0x8c0e, 0x0179, 0x2000 }, + { 0x0c0e, 0x0178, 0x0000 }, + { 0x0c0e, 0x017a, 0x0000 }, + { 0x8c0e, 0x017d, 0x2000 }, + { 0x0c0e, 0x017c, 0x0000 }, + { 0x0c0e, 0x017e, 0x0000 }, + { 0x8c0e, 0x0183, 0x3000 }, + { 0x8c0e, 0x0181, 0x2000 }, + { 0x0c0e, 0x0180, 0x0000 }, + { 0x0c0e, 0x0182, 0x0000 }, + { 0x8c0e, 0x0185, 0x2000 }, + { 0x0c0e, 0x0184, 0x0000 }, + { 0x0c0e, 0x0186, 0x0000 }, + { 0x8c0e, 0x018f, 0x4000 }, + { 0x8c0e, 0x018b, 0x3000 }, + { 0x8c0e, 0x0189, 0x2000 }, + { 0x0c0e, 0x0188, 0x0000 }, + { 0x0c0e, 0x018a, 0x0000 }, + { 0x8c0e, 0x018d, 0x2000 }, + { 0x0c0e, 0x018c, 0x0000 }, + { 0x0c0e, 0x018e, 0x0000 }, + { 0x8c0e, 0x0193, 0x3000 }, + { 0x8c0e, 0x0191, 0x2000 }, + { 0x0c0e, 0x0190, 0x0000 }, + { 0x0c0e, 0x0192, 0x0000 }, + { 0x8c0e, 0x0195, 0x2000 }, + { 0x0c0e, 0x0194, 0x0000 }, + { 0x0c0e, 0x0196, 0x0000 }, + { 0x8c0e, 0x01a7, 0x5000 }, + { 0x8c0e, 0x019f, 0x4000 }, + { 0x8c0e, 0x019b, 0x3000 }, + { 0x8c0e, 0x0199, 0x2000 }, + { 0x0c0e, 0x0198, 0x0000 }, + { 0x0c0e, 0x019a, 0x0000 }, + { 0x8c0e, 0x019d, 0x2000 }, + { 0x0c0e, 0x019c, 0x0000 }, + { 0x0c0e, 0x019e, 0x0000 }, + { 0x8c0e, 0x01a3, 0x3000 }, + { 0x8c0e, 0x01a1, 0x2000 }, + { 0x0c0e, 0x01a0, 0x0000 }, + { 0x0c0e, 0x01a2, 0x0000 }, + { 0x8c0e, 0x01a5, 0x2000 }, + { 0x0c0e, 0x01a4, 0x0000 }, + { 0x0c0e, 0x01a6, 0x0000 }, + { 0x8c0e, 0x01af, 0x4000 }, + { 0x8c0e, 0x01ab, 0x3000 }, + { 0x8c0e, 0x01a9, 0x2000 }, + { 0x0c0e, 0x01a8, 0x0000 }, + { 0x0c0e, 0x01aa, 0x0000 }, + { 0x8c0e, 0x01ad, 0x2000 }, + { 0x0c0e, 0x01ac, 0x0000 }, + { 0x0c0e, 0x01ae, 0x0000 }, + { 0x8c0e, 0x01b3, 0x3000 }, + { 0x8c0e, 0x01b1, 0x2000 }, + { 0x0c0e, 0x01b0, 0x0000 }, + { 0x0c0e, 0x01b2, 0x0000 }, + { 0x8c0e, 0x01b5, 0x2000 }, + { 0x0c0e, 0x01b4, 0x0000 }, + { 0x0c0e, 0x01b6, 0x0000 }, + { 0x8c0e, 0x01d7, 0x6000 }, + { 0x8c0e, 0x01c7, 0x5000 }, + { 0x8c0e, 0x01bf, 0x4000 }, + { 0x8c0e, 0x01bb, 0x3000 }, + { 0x8c0e, 0x01b9, 0x2000 }, + { 0x0c0e, 0x01b8, 0x0000 }, + { 0x0c0e, 0x01ba, 0x0000 }, + { 0x8c0e, 0x01bd, 0x2000 }, + { 0x0c0e, 0x01bc, 0x0000 }, + { 0x0c0e, 0x01be, 0x0000 }, + { 0x8c0e, 0x01c3, 0x3000 }, + { 0x8c0e, 0x01c1, 0x2000 }, + { 0x0c0e, 0x01c0, 0x0000 }, + { 0x0c0e, 0x01c2, 0x0000 }, + { 0x8c0e, 0x01c5, 0x2000 }, + { 0x0c0e, 0x01c4, 0x0000 }, + { 0x0c0e, 0x01c6, 0x0000 }, + { 0x8c0e, 0x01cf, 0x4000 }, + { 0x8c0e, 0x01cb, 0x3000 }, + { 0x8c0e, 0x01c9, 0x2000 }, + { 0x0c0e, 0x01c8, 0x0000 }, + { 0x0c0e, 0x01ca, 0x0000 }, + { 0x8c0e, 0x01cd, 0x2000 }, + { 0x0c0e, 0x01cc, 0x0000 }, + { 0x0c0e, 0x01ce, 0x0000 }, + { 0x8c0e, 0x01d3, 0x3000 }, + { 0x8c0e, 0x01d1, 0x2000 }, + { 0x0c0e, 0x01d0, 0x0000 }, + { 0x0c0e, 0x01d2, 0x0000 }, + { 0x8c0e, 0x01d5, 0x2000 }, + { 0x0c0e, 0x01d4, 0x0000 }, + { 0x0c0e, 0x01d6, 0x0000 }, + { 0x8c0e, 0x01e7, 0x5000 }, + { 0x8c0e, 0x01df, 0x4000 }, + { 0x8c0e, 0x01db, 0x3000 }, + { 0x8c0e, 0x01d9, 0x2000 }, + { 0x0c0e, 0x01d8, 0x0000 }, + { 0x0c0e, 0x01da, 0x0000 }, + { 0x8c0e, 0x01dd, 0x2000 }, + { 0x0c0e, 0x01dc, 0x0000 }, + { 0x0c0e, 0x01de, 0x0000 }, + { 0x8c0e, 0x01e3, 0x3000 }, + { 0x8c0e, 0x01e1, 0x2000 }, + { 0x0c0e, 0x01e0, 0x0000 }, + { 0x0c0e, 0x01e2, 0x0000 }, + { 0x8c0e, 0x01e5, 0x2000 }, + { 0x0c0e, 0x01e4, 0x0000 }, + { 0x0c0e, 0x01e6, 0x0000 }, + { 0x8c0e, 0x01ef, 0x4000 }, + { 0x8c0e, 0x01eb, 0x3000 }, + { 0x8c0e, 0x01e9, 0x2000 }, + { 0x0c0e, 0x01e8, 0x0000 }, + { 0x0c0e, 0x01ea, 0x0000 }, + { 0x8c0e, 0x01ed, 0x2000 }, + { 0x0c0e, 0x01ec, 0x0000 }, + { 0x0c0e, 0x01ee, 0x0000 }, + { 0x830f, 0xfffd, 0x2000 }, + { 0x030f, 0x0000, 0x0000 }, + { 0x0310, 0x0000, 0x1000 }, + { 0x0310, 0xfffd, 0x0000 }, +}; + + +/* In some environments, external functions have to be preceded by some magic. +In my world (Unix), they do not. Use a macro to deal with this. */ + +#ifndef EXPORT +#define EXPORT +#endif + + + +/************************************************* +* Search table and return data * +*************************************************/ + +/* Two values are returned: the category is ucp_C, ucp_L, etc. The detailed +character type is ucp_Lu, ucp_Nd, etc. + +Arguments: + c the character value + type_ptr the detailed character type is returned here + case_ptr for letters, the opposite case is returned here, if there + is one, else zero + +Returns: the character type category or -1 if not found +*/ + +EXPORT int +ucp_findchar(const int c, int *type_ptr, int *case_ptr) +{ +cnode *node = ucp_table; +register int cc = c; +int case_offset; + +for (;;) + { + register int d = node->f1 | ((node->f0 & f0_chhmask) << 16); + if (cc == d) break; + if (cc < d) + { + if ((node->f0 & f0_leftexists) == 0) return -1; + node ++; + } + else + { + register int roffset = (node->f2 & f2_rightmask) >> f2_rightshift; + if (roffset == 0) return -1; + node += 1 << (roffset - 1); + } + } + +switch ((*type_ptr = ((node->f0 & f0_typemask) >> f0_typeshift))) + { + case ucp_Cc: + case ucp_Cf: + case ucp_Cn: + case ucp_Co: + case ucp_Cs: + return ucp_C; + break; + + case ucp_Ll: + case ucp_Lu: + case_offset = node->f2 & f2_casemask; + if ((case_offset & 0x0100) != 0) case_offset |= 0xfffff000; + *case_ptr = (case_offset == 0)? 0 : cc + case_offset; + return ucp_L; + + case ucp_Lm: + case ucp_Lo: + case ucp_Lt: + *case_ptr = 0; + return ucp_L; + break; + + case ucp_Mc: + case ucp_Me: + case ucp_Mn: + return ucp_M; + break; + + case ucp_Nd: + case ucp_Nl: + case ucp_No: + return ucp_N; + break; + + case ucp_Pc: + case ucp_Pd: + case ucp_Pe: + case ucp_Pf: + case ucp_Pi: + case ucp_Ps: + case ucp_Po: + return ucp_P; + break; + + case ucp_Sc: + case ucp_Sk: + case ucp_Sm: + case ucp_So: + return ucp_S; + break; + + case ucp_Zl: + case ucp_Zp: + case ucp_Zs: + return ucp_Z; + break; + + default: /* "Should never happen" */ + return -1; + break; + } +} + +/* End of ucp_findchar.c */ + + +/* End of pcre_ucp_findchar.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains an internal function for validating UTF-8 character +strings. */ + + + + +/************************************************* +* Validate a UTF-8 string * +*************************************************/ + +/* This function is called (optionally) at the start of compile or match, to +validate that a supposed UTF-8 string is actually valid. The early check means +that subsequent code can assume it is dealing with a valid string. The check +can be turned off for maximum performance, but the consequences of supplying +an invalid string are then undefined. + +Arguments: + string points to the string + length length of string, or -1 if the string is zero-terminated + +Returns: < 0 if the string is a valid UTF-8 string + >= 0 otherwise; the value is the offset of the bad byte +*/ + +EXPORT int +_pcre_valid_utf8(const uschar *string, int length) +{ +register const uschar *p; + +if (length < 0) + { + for (p = string; *p != 0; p++); + length = p - string; + } + +for (p = string; length-- > 0; p++) + { + register int ab; + register int c = *p; + if (c < 128) continue; + if ((c & 0xc0) != 0xc0) return p - string; + ab = _pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ + if (length < ab) return p - string; + length -= ab; + + /* Check top bits in the second byte */ + if ((*(++p) & 0xc0) != 0x80) return p - string; + + /* Check for overlong sequences for each different length */ + switch (ab) + { + /* Check for xx00 000x */ + case 1: + if ((c & 0x3e) == 0) return p - string; + continue; /* We know there aren't any more bytes to check */ + + /* Check for 1110 0000, xx0x xxxx */ + case 2: + if (c == 0xe0 && (*p & 0x20) == 0) return p - string; + break; + + /* Check for 1111 0000, xx00 xxxx */ + case 3: + if (c == 0xf0 && (*p & 0x30) == 0) return p - string; + break; + + /* Check for 1111 1000, xx00 0xxx */ + case 4: + if (c == 0xf8 && (*p & 0x38) == 0) return p - string; + break; + + /* Check for leading 0xfe or 0xff, and then for 1111 1100, xx00 00xx */ + case 5: + if (c == 0xfe || c == 0xff || + (c == 0xfc && (*p & 0x3c) == 0)) return p - string; + break; + } + + /* Check for valid bytes after the 2nd, if any; all must start 10 */ + while (--ab > 0) + { + if ((*(++p) & 0xc0) != 0x80) return p - string; + } + } + +return -1; +} + +/* End of pcre_valid_utf8.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains the external function pcre_version(), which returns a +string that identifies the PCRE version that is in use. */ + + + + +/************************************************* +* Return version string * +*************************************************/ + +#define STRING(a) # a +#define XSTRING(s) STRING(s) + +EXPORT const char * +pcre_version(void) +{ +return XSTRING(PCRE_MAJOR) "." XSTRING(PCRE_MINOR) " " XSTRING(PCRE_DATE); +} + +/* End of pcre_version.c */ +/************************************************* +* Perl-Compatible Regular Expressions * +*************************************************/ + +/* PCRE is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + + Written by Philip Hazel + Copyright (c) 1997-2005 University of Cambridge + +----------------------------------------------------------------------------- +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +----------------------------------------------------------------------------- +*/ + + +/* This module contains an internal function that is used to match an extended +class (one that contains characters whose values are > 255). It is used by both +pcre_exec() and pcre_def_exec(). */ + + + + +/************************************************* +* Match character against an XCLASS * +*************************************************/ + +/* This function is called to match a character against an extended class that +might contain values > 255. + +Arguments: + c the character + data points to the flag byte of the XCLASS data + +Returns: TRUE if character matches, else FALSE +*/ + +EXPORT BOOL +_pcre_xclass(int c, const uschar *data) +{ +int t; +BOOL negated = (*data & XCL_NOT) != 0; + +/* Character values < 256 are matched against a bitmap, if one is present. If +not, we still carry on, because there may be ranges that start below 256 in the +additional data. */ + +if (c < 256) + { + if ((*data & XCL_MAP) != 0 && (data[1 + c/8] & (1 << (c&7))) != 0) + return !negated; /* char found */ + } + +/* First skip the bit map if present. Then match against the list of Unicode +properties or large chars or ranges that end with a large char. We won't ever +encounter XCL_PROP or XCL_NOTPROP when UCP support is not compiled. */ + +if ((*data++ & XCL_MAP) != 0) data += 32; + +while ((t = *data++) != XCL_END) + { + int x, y; + if (t == XCL_SINGLE) + { + GETCHARINC(x, data); + if (c == x) return !negated; + } + else if (t == XCL_RANGE) + { + GETCHARINC(x, data); + GETCHARINC(y, data); + if (c >= x && c <= y) return !negated; + } + +#ifdef SUPPORT_UCP + else /* XCL_PROP & XCL_NOTPROP */ + { + int chartype, othercase; + int rqdtype = *data++; + int category = ucp_findchar(c, &chartype, &othercase); + if (rqdtype >= 128) + { + if ((rqdtype - 128 == category) == (t == XCL_PROP)) return !negated; + } + else + { + if ((rqdtype == chartype) == (t == XCL_PROP)) return !negated; + } + } +#endif /* SUPPORT_UCP */ + } + +return negated; /* char did not match */ +} + +/* End of pcre_xclass.c */ diff --git a/lib/oldwrappers/postgres.nim b/lib/oldwrappers/postgres.nim new file mode 100644 index 000000000..4b43333d7 --- /dev/null +++ b/lib/oldwrappers/postgres.nim @@ -0,0 +1,386 @@ +# This module contains the definitions for structures and externs for +# functions used by frontend postgres applications. It is based on +# Postgresql's libpq-fe.h. +# +# It is for postgreSQL version 7.4 and higher with support for the v3.0 +# connection-protocol. +# + +{.deadCodeElim: on.} + +when defined(windows): + const dllName = "pq.dll" +elif defined(macosx): + const dllName = "libpq.dylib" +else: + const dllName = "libpq.so(.5|)" + +type + POid* = ptr Oid + Oid* = int32 + +const + ERROR_MSG_LENGTH* = 4096 + CMDSTATUS_LEN* = 40 + +type + TSockAddr* = array[1..112, int8] + TPGresAttDesc*{.pure, final.} = object + name*: cstring + adtid*: Oid + adtsize*: int + + PPGresAttDesc* = ptr TPGresAttDesc + PPPGresAttDesc* = ptr PPGresAttDesc + TPGresAttValue*{.pure, final.} = object + length*: int32 + value*: cstring + + PPGresAttValue* = ptr TPGresAttValue + PPPGresAttValue* = ptr PPGresAttValue + PExecStatusType* = ptr TExecStatusType + TExecStatusType* = enum + PGRES_EMPTY_QUERY = 0, PGRES_COMMAND_OK, PGRES_TUPLES_OK, PGRES_COPY_OUT, + PGRES_COPY_IN, PGRES_BAD_RESPONSE, PGRES_NONFATAL_ERROR, PGRES_FATAL_ERROR + TPGlobjfuncs*{.pure, final.} = object + fn_lo_open*: Oid + fn_lo_close*: Oid + fn_lo_creat*: Oid + fn_lo_unlink*: Oid + fn_lo_lseek*: Oid + fn_lo_tell*: Oid + fn_lo_read*: Oid + fn_lo_write*: Oid + + PPGlobjfuncs* = ptr TPGlobjfuncs + PConnStatusType* = ptr TConnStatusType + TConnStatusType* = enum + CONNECTION_OK, CONNECTION_BAD, CONNECTION_STARTED, CONNECTION_MADE, + CONNECTION_AWAITING_RESPONSE, CONNECTION_AUTH_OK, CONNECTION_SETENV, + CONNECTION_SSL_STARTUP, CONNECTION_NEEDED + TPGconn* {.pure, final.} = object + pghost*: cstring + pgtty*: cstring + pgport*: cstring + pgoptions*: cstring + dbName*: cstring + status*: TConnStatusType + errorMessage*: array[0..(ERROR_MSG_LENGTH) - 1, char] + Pfin*: TFile + Pfout*: TFile + Pfdebug*: TFile + sock*: int32 + laddr*: TSockAddr + raddr*: TSockAddr + salt*: array[0..(2) - 1, char] + asyncNotifyWaiting*: int32 + notifyList*: pointer + pguser*: cstring + pgpass*: cstring + lobjfuncs*: PPGlobjfuncs + + PPGconn* = ptr TPGconn + TPGresult* {.pure, final.} = object + ntups*: int32 + numAttributes*: int32 + attDescs*: PPGresAttDesc + tuples*: PPPGresAttValue + tupArrSize*: int32 + resultStatus*: TExecStatusType + cmdStatus*: array[0..(CMDSTATUS_LEN) - 1, char] + binary*: int32 + conn*: PPGconn + + PPGresult* = ptr TPGresult + PPostgresPollingStatusType* = ptr PostgresPollingStatusType + PostgresPollingStatusType* = enum + PGRES_POLLING_FAILED = 0, PGRES_POLLING_READING, PGRES_POLLING_WRITING, + PGRES_POLLING_OK, PGRES_POLLING_ACTIVE + PPGTransactionStatusType* = ptr PGTransactionStatusType + PGTransactionStatusType* = enum + PQTRANS_IDLE, PQTRANS_ACTIVE, PQTRANS_INTRANS, PQTRANS_INERROR, + PQTRANS_UNKNOWN + PPGVerbosity* = ptr PGVerbosity + PGVerbosity* = enum + PQERRORS_TERSE, PQERRORS_DEFAULT, PQERRORS_VERBOSE + PpgNotify* = ptr pgNotify + pgNotify* {.pure, final.} = object + relname*: cstring + be_pid*: int32 + extra*: cstring + + PQnoticeReceiver* = proc (arg: pointer, res: PPGresult){.cdecl.} + PQnoticeProcessor* = proc (arg: pointer, message: cstring){.cdecl.} + Ppqbool* = ptr pqbool + pqbool* = char + P_PQprintOpt* = ptr PQprintOpt + PQprintOpt* {.pure, final.} = object + header*: pqbool + align*: pqbool + standard*: pqbool + html3*: pqbool + expanded*: pqbool + pager*: pqbool + fieldSep*: cstring + tableOpt*: cstring + caption*: cstring + fieldName*: ptr cstring + + P_PQconninfoOption* = ptr PQconninfoOption + PQconninfoOption* {.pure, final.} = object + keyword*: cstring + envvar*: cstring + compiled*: cstring + val*: cstring + label*: cstring + dispchar*: cstring + dispsize*: int32 + + PPQArgBlock* = ptr PQArgBlock + PQArgBlock* {.pure, final.} = object + length*: int32 + isint*: int32 + p*: pointer + +proc PQconnectStart*(conninfo: cstring): PPGconn{.cdecl, dynlib: dllName, + importc: "PQconnectStart".} +proc PQconnectPoll*(conn: PPGconn): PostgresPollingStatusType{.cdecl, + dynlib: dllName, importc: "PQconnectPoll".} + +proc PQconnectdb*(conninfo: cstring): PPGconn{.cdecl, dynlib: dllName, + importc: "PQconnectdb".} +proc PQsetdbLogin*(pghost: cstring, pgport: cstring, pgoptions: cstring, + pgtty: cstring, dbName: cstring, login: cstring, pwd: cstring): PPGconn{. + cdecl, dynlib: dllName, importc: "PQsetdbLogin".} + +proc PQsetdb*(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME: cstring): ppgconn + +proc PQfinish*(conn: PPGconn){.cdecl, dynlib: dllName, importc: "PQfinish".} + +proc PQconndefaults*(): PPQconninfoOption{.cdecl, dynlib: dllName, + importc: "PQconndefaults".} + +proc PQconninfoFree*(connOptions: PPQconninfoOption){.cdecl, dynlib: dllName, + importc: "PQconninfoFree".} + +proc PQresetStart*(conn: PPGconn): int32{.cdecl, dynlib: dllName, + importc: "PQresetStart".} +proc PQresetPoll*(conn: PPGconn): PostgresPollingStatusType{.cdecl, + dynlib: dllName, importc: "PQresetPoll".} + +proc PQreset*(conn: PPGconn){.cdecl, dynlib: dllName, importc: "PQreset".} + +proc PQrequestCancel*(conn: PPGconn): int32{.cdecl, dynlib: dllName, + importc: "PQrequestCancel".} + +proc PQdb*(conn: PPGconn): cstring{.cdecl, dynlib: dllName, importc: "PQdb".} +proc PQuser*(conn: PPGconn): cstring{.cdecl, dynlib: dllName, importc: "PQuser".} +proc PQpass*(conn: PPGconn): cstring{.cdecl, dynlib: dllName, importc: "PQpass".} +proc PQhost*(conn: PPGconn): cstring{.cdecl, dynlib: dllName, importc: "PQhost".} +proc PQport*(conn: PPGconn): cstring{.cdecl, dynlib: dllName, importc: "PQport".} +proc PQtty*(conn: PPGconn): cstring{.cdecl, dynlib: dllName, importc: "PQtty".} +proc PQoptions*(conn: PPGconn): cstring{.cdecl, dynlib: dllName, + importc: "PQoptions".} +proc PQstatus*(conn: PPGconn): TConnStatusType{.cdecl, dynlib: dllName, + importc: "PQstatus".} +proc PQtransactionStatus*(conn: PPGconn): PGTransactionStatusType{.cdecl, + dynlib: dllName, importc: "PQtransactionStatus".} +proc PQparameterStatus*(conn: PPGconn, paramName: cstring): cstring{.cdecl, + dynlib: dllName, importc: "PQparameterStatus".} +proc PQprotocolVersion*(conn: PPGconn): int32{.cdecl, dynlib: dllName, + importc: "PQprotocolVersion".} +proc PQerrorMessage*(conn: PPGconn): cstring{.cdecl, dynlib: dllName, + importc: "PQerrorMessage".} +proc PQsocket*(conn: PPGconn): int32{.cdecl, dynlib: dllName, + importc: "PQsocket".} +proc PQbackendPID*(conn: PPGconn): int32{.cdecl, dynlib: dllName, + importc: "PQbackendPID".} +proc PQclientEncoding*(conn: PPGconn): int32{.cdecl, dynlib: dllName, + importc: "PQclientEncoding".} +proc PQsetClientEncoding*(conn: PPGconn, encoding: cstring): int32{.cdecl, + dynlib: dllName, importc: "PQsetClientEncoding".} +when defined(USE_SSL): + # Get the SSL structure associated with a connection + proc PQgetssl*(conn: PPGconn): PSSL{.cdecl, dynlib: dllName, + importc: "PQgetssl".} + +proc PQsetErrorVerbosity*(conn: PPGconn, verbosity: PGVerbosity): PGVerbosity{. + cdecl, dynlib: dllName, importc: "PQsetErrorVerbosity".} + +proc PQtrace*(conn: PPGconn, debug_port: TFile){.cdecl, dynlib: dllName, + importc: "PQtrace".} +proc PQuntrace*(conn: PPGconn){.cdecl, dynlib: dllName, importc: "PQuntrace".} + +proc PQsetNoticeReceiver*(conn: PPGconn, theProc: PQnoticeReceiver, + arg: pointer): PQnoticeReceiver {. + cdecl, dynlib: dllName, importc: "PQsetNoticeReceiver".} +proc PQsetNoticeProcessor*(conn: PPGconn, theProc: PQnoticeProcessor, + arg: pointer): PQnoticeProcessor{. + cdecl, dynlib: dllName, importc: "PQsetNoticeProcessor".} + +proc PQexec*(conn: PPGconn, query: cstring): PPGresult{.cdecl, dynlib: dllName, + importc: "PQexec".} +proc PQexecParams*(conn: PPGconn, command: cstring, nParams: int32, + paramTypes: POid, paramValues: cstringArray, + paramLengths, paramFormats: ptr int32, + resultFormat: int32): PPGresult {.cdecl, dynlib: dllName, + importc: "PQexecParams".} +proc PQexecPrepared*(conn: PPGconn, stmtName: cstring, nParams: int32, + paramValues: cstringArray, + paramLengths, paramFormats: ptr int32, + resultFormat: int32): PPGresult {. + cdecl, dynlib: dllName, importc: "PQexecPrepared".} + +proc PQsendQuery*(conn: PPGconn, query: cstring): int32{.cdecl, dynlib: dllName, + importc: "PQsendQuery".} +proc PQsendQueryParams*(conn: PPGconn, command: cstring, nParams: int32, + paramTypes: POid, paramValues: cstringArray, + paramLengths, paramFormats: ptr int32, + resultFormat: int32): int32 {.cdecl, dynlib: dllName, + importc: "PQsendQueryParams".} +proc PQsendQueryPrepared*(conn: PPGconn, stmtName: cstring, nParams: int32, + paramValues: cstringArray, + paramLengths, paramFormats: ptr int32, + resultFormat: int32): int32{. + cdecl, dynlib: dllName, importc: "PQsendQueryPrepared".} +proc PQgetResult*(conn: PPGconn): PPGresult{.cdecl, dynlib: dllName, + importc: "PQgetResult".} +proc PQisBusy*(conn: PPGconn): int32{.cdecl, dynlib: dllName, + importc: "PQisBusy".} +proc PQconsumeInput*(conn: PPGconn): int32{.cdecl, dynlib: dllName, + importc: "PQconsumeInput".} + +proc PQnotifies*(conn: PPGconn): PPGnotify{.cdecl, dynlib: dllName, + importc: "PQnotifies".} + +proc PQputCopyData*(conn: PPGconn, buffer: cstring, nbytes: int32): int32{. + cdecl, dynlib: dllName, importc: "PQputCopyData".} +proc PQputCopyEnd*(conn: PPGconn, errormsg: cstring): int32{.cdecl, + dynlib: dllName, importc: "PQputCopyEnd".} +proc PQgetCopyData*(conn: PPGconn, buffer: cstringArray, async: int32): int32{.cdecl, + dynlib: dllName, importc: "PQgetCopyData".} + +proc PQgetline*(conn: PPGconn, str: cstring, len: int32): int32{.cdecl, + dynlib: dllName, importc: "PQgetline".} +proc PQputline*(conn: PPGconn, str: cstring): int32{.cdecl, dynlib: dllName, + importc: "PQputline".} +proc PQgetlineAsync*(conn: PPGconn, buffer: cstring, bufsize: int32): int32{. + cdecl, dynlib: dllName, importc: "PQgetlineAsync".} +proc PQputnbytes*(conn: PPGconn, buffer: cstring, nbytes: int32): int32{.cdecl, + dynlib: dllName, importc: "PQputnbytes".} +proc PQendcopy*(conn: PPGconn): int32{.cdecl, dynlib: dllName, + importc: "PQendcopy".} + +proc PQsetnonblocking*(conn: PPGconn, arg: int32): int32{.cdecl, + dynlib: dllName, importc: "PQsetnonblocking".} +proc PQisnonblocking*(conn: PPGconn): int32{.cdecl, dynlib: dllName, + importc: "PQisnonblocking".} + +proc PQflush*(conn: PPGconn): int32{.cdecl, dynlib: dllName, importc: "PQflush".} + +proc PQfn*(conn: PPGconn, fnid: int32, result_buf, + result_len: ptr int32, result_is_int: int32, args: PPQArgBlock, + nargs: int32): PPGresult{.cdecl, dynlib: dllName, importc: "PQfn".} + +proc PQresultStatus*(res: PPGresult): TExecStatusType{.cdecl, dynlib: dllName, + importc: "PQresultStatus".} +proc PQresStatus*(status: TExecStatusType): cstring{.cdecl, dynlib: dllName, + importc: "PQresStatus".} +proc PQresultErrorMessage*(res: PPGresult): cstring{.cdecl, dynlib: dllName, + importc: "PQresultErrorMessage".} +proc PQresultErrorField*(res: PPGresult, fieldcode: int32): cstring{.cdecl, + dynlib: dllName, importc: "PQresultErrorField".} +proc PQntuples*(res: PPGresult): int32{.cdecl, dynlib: dllName, + importc: "PQntuples".} +proc PQnfields*(res: PPGresult): int32{.cdecl, dynlib: dllName, + importc: "PQnfields".} +proc PQbinaryTuples*(res: PPGresult): int32{.cdecl, dynlib: dllName, + importc: "PQbinaryTuples".} +proc PQfname*(res: PPGresult, field_num: int32): cstring{.cdecl, + dynlib: dllName, importc: "PQfname".} +proc PQfnumber*(res: PPGresult, field_name: cstring): int32{.cdecl, + dynlib: dllName, importc: "PQfnumber".} +proc PQftable*(res: PPGresult, field_num: int32): Oid{.cdecl, dynlib: dllName, + importc: "PQftable".} +proc PQftablecol*(res: PPGresult, field_num: int32): int32{.cdecl, + dynlib: dllName, importc: "PQftablecol".} +proc PQfformat*(res: PPGresult, field_num: int32): int32{.cdecl, + dynlib: dllName, importc: "PQfformat".} +proc PQftype*(res: PPGresult, field_num: int32): Oid{.cdecl, dynlib: dllName, + importc: "PQftype".} +proc PQfsize*(res: PPGresult, field_num: int32): int32{.cdecl, dynlib: dllName, + importc: "PQfsize".} +proc PQfmod*(res: PPGresult, field_num: int32): int32{.cdecl, dynlib: dllName, + importc: "PQfmod".} +proc PQcmdStatus*(res: PPGresult): cstring{.cdecl, dynlib: dllName, + importc: "PQcmdStatus".} +proc PQoidStatus*(res: PPGresult): cstring{.cdecl, dynlib: dllName, + importc: "PQoidStatus".} + +proc PQoidValue*(res: PPGresult): Oid{.cdecl, dynlib: dllName, + importc: "PQoidValue".} + +proc PQcmdTuples*(res: PPGresult): cstring{.cdecl, dynlib: dllName, + importc: "PQcmdTuples".} +proc PQgetvalue*(res: PPGresult, tup_num: int32, field_num: int32): cstring{. + cdecl, dynlib: dllName, importc: "PQgetvalue".} +proc PQgetlength*(res: PPGresult, tup_num: int32, field_num: int32): int32{. + cdecl, dynlib: dllName, importc: "PQgetlength".} +proc PQgetisnull*(res: PPGresult, tup_num: int32, field_num: int32): int32{. + cdecl, dynlib: dllName, importc: "PQgetisnull".} + +proc PQclear*(res: PPGresult){.cdecl, dynlib: dllName, importc: "PQclear".} + +proc PQfreemem*(p: pointer){.cdecl, dynlib: dllName, importc: "PQfreemem".} + +proc PQmakeEmptyPGresult*(conn: PPGconn, status: TExecStatusType): PPGresult{. + cdecl, dynlib: dllName, importc: "PQmakeEmptyPGresult".} + +proc PQescapeString*(till, `from`: cstring, len: int): int{.cdecl, + dynlib: dllName, importc: "PQescapeString".} +proc PQescapeBytea*(bintext: cstring, binlen: int, + bytealen: var int): cstring{. + cdecl, dynlib: dllName, importc: "PQescapeBytea".} +proc PQunescapeBytea*(strtext: cstring, retbuflen: var int): cstring{.cdecl, + dynlib: dllName, importc: "PQunescapeBytea".} + +proc PQprint*(fout: TFile, res: PPGresult, ps: PPQprintOpt){.cdecl, + dynlib: dllName, importc: "PQprint".} + +proc PQdisplayTuples*(res: PPGresult, fp: TFile, fillAlign: int32, + fieldSep: cstring, printHeader: int32, quiet: int32){. + cdecl, dynlib: dllName, importc: "PQdisplayTuples".} + +proc PQprintTuples*(res: PPGresult, fout: TFile, printAttName: int32, + terseOutput: int32, width: int32){.cdecl, dynlib: dllName, + importc: "PQprintTuples".} + +proc lo_open*(conn: PPGconn, lobjId: Oid, mode: int32): int32{.cdecl, + dynlib: dllName, importc: "lo_open".} +proc lo_close*(conn: PPGconn, fd: int32): int32{.cdecl, dynlib: dllName, + importc: "lo_close".} +proc lo_read*(conn: PPGconn, fd: int32, buf: cstring, length: int): int32{. + cdecl, dynlib: dllName, importc: "lo_read".} +proc lo_write*(conn: PPGconn, fd: int32, buf: cstring, length: int): int32{. + cdecl, dynlib: dllName, importc: "lo_write".} +proc lo_lseek*(conn: PPGconn, fd: int32, offset: int32, whence: int32): int32{. + cdecl, dynlib: dllName, importc: "lo_lseek".} +proc lo_creat*(conn: PPGconn, mode: int32): Oid{.cdecl, dynlib: dllName, + importc: "lo_creat".} +proc lo_tell*(conn: PPGconn, fd: int32): int32{.cdecl, dynlib: dllName, + importc: "lo_tell".} +proc lo_unlink*(conn: PPGconn, lobjId: Oid): int32{.cdecl, dynlib: dllName, + importc: "lo_unlink".} +proc lo_import*(conn: PPGconn, filename: cstring): Oid{.cdecl, dynlib: dllName, + importc: "lo_import".} +proc lo_export*(conn: PPGconn, lobjId: Oid, filename: cstring): int32{.cdecl, + dynlib: dllName, importc: "lo_export".} + +proc PQmblen*(s: cstring, encoding: int32): int32{.cdecl, dynlib: dllName, + importc: "PQmblen".} + +proc PQenv2encoding*(): int32{.cdecl, dynlib: dllName, importc: "PQenv2encoding".} + +proc PQsetdb(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME: cstring): ppgconn = + result = PQsetdbLogin(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME, "", "") + diff --git a/lib/oldwrappers/python.nim b/lib/oldwrappers/python.nim new file mode 100644 index 000000000..ea9ef1fd5 --- /dev/null +++ b/lib/oldwrappers/python.nim @@ -0,0 +1,1583 @@ +# +# Light-weight binding for the Python interpreter +# (c) 2010 Andreas Rumpf +# Based on 'PythonEngine' module by Dr. Dietmar Budelsky +# +# +#************************************************************************ +# +# Module: Unit 'PythonEngine' Copyright (c) 1997 +# +# Version: 3.0 Dr. Dietmar Budelsky +# Sub-Version: 0.25 dbudelsky@web.de +# Germany +# +# Morgan Martinet +# 4721 rue Brebeuf +# H2J 3L2 MONTREAL (QC) +# CANADA +# e-mail: mmm@free.fr +# +# look our page at: http://www.multimania.com/marat +#************************************************************************ +# Functionality: Delphi Components that provide an interface to the +# Python language (see python.txt for more infos on +# Python itself). +# +#************************************************************************ +# Contributors: +# Grzegorz Makarewicz (mak@mikroplan.com.pl) +# Andrew Robinson (andy@hps1.demon.co.uk) +# Mark Watts(mark_watts@hotmail.com) +# Olivier Deckmyn (olivier.deckmyn@mail.dotcom.fr) +# Sigve Tjora (public@tjora.no) +# Mark Derricutt (mark@talios.com) +# Igor E. Poteryaev (jah@mail.ru) +# Yuri Filimonov (fil65@mail.ru) +# Stefan Hoffmeister (Stefan.Hoffmeister@Econos.de) +#************************************************************************ +# This source code is distributed with no WARRANTY, for no reason or use. +# Everyone is allowed to use and change this code free for his own tasks +# and projects, as long as this header and its copyright text is intact. +# For changed versions of this code, which are public distributed the +# following additional conditions have to be fullfilled: +# 1) The header has to contain a comment on the change and the author of +# it. +# 2) A copy of the changed source has to be sent to the above E-Mail +# address or my then valid address, if this is possible to the +# author. +# The second condition has the target to maintain an up to date central +# version of the component. If this condition is not acceptable for +# confidential or legal reasons, everyone is free to derive a component +# or to generate a diff file to my or other original sources. +# Dr. Dietmar Budelsky, 1997-11-17 +#************************************************************************ + +{.deadCodeElim: on.} + +import + dynlib + + +when defined(windows): + const dllname = "python(26|25|24|23|22|21|20|16|15).dll" +elif defined(macosx): + const dllname = "libpython(2.6|2.5|2.4|2.3|2.2|2.1|2.0|1.6|1.5).dylib" +else: + const dllver = ".1" + const dllname = "libpython(2.6|2.5|2.4|2.3|2.2|2.1|2.0|1.6|1.5).so" & dllver + +const + PYT_METHOD_BUFFER_INCREASE* = 10 + PYT_MEMBER_BUFFER_INCREASE* = 10 + PYT_GETSET_BUFFER_INCREASE* = 10 + METH_VARARGS* = 0x0001 + METH_KEYWORDS* = 0x0002 # Masks for the co_flags field of PyCodeObject + CO_OPTIMIZED* = 0x0001 + CO_NEWLOCALS* = 0x0002 + CO_VARARGS* = 0x0004 + CO_VARKEYWORDS* = 0x0008 + +type # Rich comparison opcodes introduced in version 2.1 + TRichComparisonOpcode* = enum + pyLT, pyLE, pyEQ, pyNE, pyGT, pyGE + +const + Py_TPFLAGS_HAVE_GETCHARBUFFER* = (1 shl 0) # PySequenceMethods contains sq_contains + Py_TPFLAGS_HAVE_SEQUENCE_IN* = (1 shl 1) # Objects which participate in garbage collection (see objimp.h) + Py_TPFLAGS_GC* = (1 shl 2) # PySequenceMethods and PyNumberMethods contain in-place operators + Py_TPFLAGS_HAVE_INPLACEOPS* = (1 shl 3) # PyNumberMethods do their own coercion */ + Py_TPFLAGS_CHECKTYPES* = (1 shl 4) + Py_TPFLAGS_HAVE_RICHCOMPARE* = (1 shl 5) # Objects which are weakly referencable if their tp_weaklistoffset is >0 + # XXX Should this have the same value as Py_TPFLAGS_HAVE_RICHCOMPARE? + # These both indicate a feature that appeared in the same alpha release. + Py_TPFLAGS_HAVE_WEAKREFS* = (1 shl 6) # tp_iter is defined + Py_TPFLAGS_HAVE_ITER* = (1 shl 7) # New members introduced by Python 2.2 exist + Py_TPFLAGS_HAVE_CLASS* = (1 shl 8) # Set if the type object is dynamically allocated + Py_TPFLAGS_HEAPTYPE* = (1 shl 9) # Set if the type allows subclassing + Py_TPFLAGS_BASETYPE* = (1 shl 10) # Set if the type is 'ready' -- fully initialized + Py_TPFLAGS_READY* = (1 shl 12) # Set while the type is being 'readied', to prevent recursive ready calls + Py_TPFLAGS_READYING* = (1 shl 13) # Objects support garbage collection (see objimp.h) + Py_TPFLAGS_HAVE_GC* = (1 shl 14) + Py_TPFLAGS_DEFAULT* = Py_TPFLAGS_HAVE_GETCHARBUFFER or + Py_TPFLAGS_HAVE_SEQUENCE_IN or Py_TPFLAGS_HAVE_INPLACEOPS or + Py_TPFLAGS_HAVE_RICHCOMPARE or Py_TPFLAGS_HAVE_WEAKREFS or + Py_TPFLAGS_HAVE_ITER or Py_TPFLAGS_HAVE_CLASS + +type + TPFlag* = enum + tpfHaveGetCharBuffer, tpfHaveSequenceIn, tpfGC, tpfHaveInplaceOps, + tpfCheckTypes, tpfHaveRichCompare, tpfHaveWeakRefs, tpfHaveIter, + tpfHaveClass, tpfHeapType, tpfBaseType, tpfReady, tpfReadying, tpfHaveGC + TPFlags* = set[TPFlag] + +const + TPFLAGS_DEFAULT* = {tpfHaveGetCharBuffer, tpfHaveSequenceIn, + tpfHaveInplaceOps, tpfHaveRichCompare, tpfHaveWeakRefs, tpfHaveIter, + tpfHaveClass} + +const # Python opcodes + single_input* = 256 + file_input* = 257 + eval_input* = 258 + funcdef* = 259 + parameters* = 260 + varargslist* = 261 + fpdef* = 262 + fplist* = 263 + stmt* = 264 + simple_stmt* = 265 + small_stmt* = 266 + expr_stmt* = 267 + augassign* = 268 + print_stmt* = 269 + del_stmt* = 270 + pass_stmt* = 271 + flow_stmt* = 272 + break_stmt* = 273 + continue_stmt* = 274 + return_stmt* = 275 + raise_stmt* = 276 + import_stmt* = 277 + import_as_name* = 278 + dotted_as_name* = 279 + dotted_name* = 280 + global_stmt* = 281 + exec_stmt* = 282 + assert_stmt* = 283 + compound_stmt* = 284 + if_stmt* = 285 + while_stmt* = 286 + for_stmt* = 287 + try_stmt* = 288 + except_clause* = 289 + suite* = 290 + test* = 291 + and_test* = 291 + not_test* = 293 + comparison* = 294 + comp_op* = 295 + expr* = 296 + xor_expr* = 297 + and_expr* = 298 + shift_expr* = 299 + arith_expr* = 300 + term* = 301 + factor* = 302 + power* = 303 + atom* = 304 + listmaker* = 305 + lambdef* = 306 + trailer* = 307 + subscriptlist* = 308 + subscript* = 309 + sliceop* = 310 + exprlist* = 311 + testlist* = 312 + dictmaker* = 313 + classdef* = 314 + arglist* = 315 + argument* = 316 + list_iter* = 317 + list_for* = 318 + list_if* = 319 + +const + T_SHORT* = 0 + T_INT* = 1 + T_LONG* = 2 + T_FLOAT* = 3 + T_DOUBLE* = 4 + T_STRING* = 5 + T_OBJECT* = 6 + T_CHAR* = 7 # 1-character string + T_BYTE* = 8 # 8-bit signed int + T_UBYTE* = 9 + T_USHORT* = 10 + T_UINT* = 11 + T_ULONG* = 12 + T_STRING_INPLACE* = 13 + T_OBJECT_EX* = 16 + READONLY* = 1 + RO* = READONLY # Shorthand + READ_RESTRICTED* = 2 + WRITE_RESTRICTED* = 4 + RESTRICTED* = (READ_RESTRICTED or WRITE_RESTRICTED) + +type + TPyMemberType* = enum + mtShort, mtInt, mtLong, mtFloat, mtDouble, mtString, mtObject, mtChar, + mtByte, mtUByte, mtUShort, mtUInt, mtULong, mtStringInplace, mtObjectEx + TPyMemberFlag* = enum + mfDefault, mfReadOnly, mfReadRestricted, mfWriteRestricted, mfRestricted + +type + PInt* = ptr int + +# PLong* = ptr int32 +# PFloat* = ptr float32 +# PShort* = ptr int8 + +type + PP_frozen* = ptr Pfrozen + P_frozen* = ptr Tfrozen + PPyObject* = ptr TPyObject + PPPyObject* = ptr PPyObject + PPPPyObject* = ptr PPPyObject + PPyIntObject* = ptr TPyIntObject + PPyTypeObject* = ptr TPyTypeObject + PPySliceObject* = ptr TPySliceObject + TPyCFunction* = proc (self, args: PPyObject): PPyObject{.cdecl.} + Tunaryfunc* = proc (ob1: PPyObject): PPyObject{.cdecl.} + Tbinaryfunc* = proc (ob1, ob2: PPyObject): PPyObject{.cdecl.} + Tternaryfunc* = proc (ob1, ob2, ob3: PPyObject): PPyObject{.cdecl.} + Tinquiry* = proc (ob1: PPyObject): int{.cdecl.} + Tcoercion* = proc (ob1, ob2: PPPyObject): int{.cdecl.} + Tintargfunc* = proc (ob1: PPyObject, i: int): PPyObject{.cdecl.} + Tintintargfunc* = proc (ob1: PPyObject, i1, i2: int): PPyObject{.cdecl.} + Tintobjargproc* = proc (ob1: PPyObject, i: int, ob2: PPyObject): int{.cdecl.} + Tintintobjargproc* = proc (ob1: PPyObject, i1, i2: int, ob2: PPyObject): int{. + cdecl.} + Tobjobjargproc* = proc (ob1, ob2, ob3: PPyObject): int{.cdecl.} + Tpydestructor* = proc (ob: PPyObject){.cdecl.} + Tprintfunc* = proc (ob: PPyObject, f: TFile, i: int): int{.cdecl.} + Tgetattrfunc* = proc (ob1: PPyObject, name: cstring): PPyObject{.cdecl.} + Tsetattrfunc* = proc (ob1: PPyObject, name: cstring, ob2: PPyObject): int{. + cdecl.} + Tcmpfunc* = proc (ob1, ob2: PPyObject): int{.cdecl.} + Treprfunc* = proc (ob: PPyObject): PPyObject{.cdecl.} + Thashfunc* = proc (ob: PPyObject): int32{.cdecl.} + Tgetattrofunc* = proc (ob1, ob2: PPyObject): PPyObject{.cdecl.} + Tsetattrofunc* = proc (ob1, ob2, ob3: PPyObject): int{.cdecl.} + Tgetreadbufferproc* = proc (ob1: PPyObject, i: int, p: Pointer): int{.cdecl.} + Tgetwritebufferproc* = proc (ob1: PPyObject, i: int, p: Pointer): int{.cdecl.} + Tgetsegcountproc* = proc (ob1: PPyObject, i: int): int{.cdecl.} + Tgetcharbufferproc* = proc (ob1: PPyObject, i: int, pstr: cstring): int{.cdecl.} + Tobjobjproc* = proc (ob1, ob2: PPyObject): int{.cdecl.} + Tvisitproc* = proc (ob1: PPyObject, p: Pointer): int{.cdecl.} + Ttraverseproc* = proc (ob1: PPyObject, prc: TVisitproc, p: Pointer): int{. + cdecl.} + Trichcmpfunc* = proc (ob1, ob2: PPyObject, i: int): PPyObject{.cdecl.} + Tgetiterfunc* = proc (ob1: PPyObject): PPyObject{.cdecl.} + Titernextfunc* = proc (ob1: PPyObject): PPyObject{.cdecl.} + Tdescrgetfunc* = proc (ob1, ob2, ob3: PPyObject): PPyObject{.cdecl.} + Tdescrsetfunc* = proc (ob1, ob2, ob3: PPyObject): int{.cdecl.} + Tinitproc* = proc (self, args, kwds: PPyObject): int{.cdecl.} + Tnewfunc* = proc (subtype: PPyTypeObject, args, kwds: PPyObject): PPyObject{. + cdecl.} + Tallocfunc* = proc (self: PPyTypeObject, nitems: int): PPyObject{.cdecl.} + TPyNumberMethods*{.final.} = object + nb_add*: Tbinaryfunc + nb_substract*: Tbinaryfunc + nb_multiply*: Tbinaryfunc + nb_divide*: Tbinaryfunc + nb_remainder*: Tbinaryfunc + nb_divmod*: Tbinaryfunc + nb_power*: Tternaryfunc + nb_negative*: Tunaryfunc + nb_positive*: Tunaryfunc + nb_absolute*: Tunaryfunc + nb_nonzero*: Tinquiry + nb_invert*: Tunaryfunc + nb_lshift*: Tbinaryfunc + nb_rshift*: Tbinaryfunc + nb_and*: Tbinaryfunc + nb_xor*: Tbinaryfunc + nb_or*: Tbinaryfunc + nb_coerce*: Tcoercion + nb_int*: Tunaryfunc + nb_long*: Tunaryfunc + nb_float*: Tunaryfunc + nb_oct*: Tunaryfunc + nb_hex*: Tunaryfunc #/ jah 29-sep-2000: updated for python 2.0 + #/ added from .h + nb_inplace_add*: Tbinaryfunc + nb_inplace_subtract*: Tbinaryfunc + nb_inplace_multiply*: Tbinaryfunc + nb_inplace_divide*: Tbinaryfunc + nb_inplace_remainder*: Tbinaryfunc + nb_inplace_power*: Tternaryfunc + nb_inplace_lshift*: Tbinaryfunc + nb_inplace_rshift*: Tbinaryfunc + nb_inplace_and*: Tbinaryfunc + nb_inplace_xor*: Tbinaryfunc + nb_inplace_or*: Tbinaryfunc # Added in release 2.2 + # The following require the Py_TPFLAGS_HAVE_CLASS flag + nb_floor_divide*: Tbinaryfunc + nb_true_divide*: Tbinaryfunc + nb_inplace_floor_divide*: Tbinaryfunc + nb_inplace_true_divide*: Tbinaryfunc + + PPyNumberMethods* = ptr TPyNumberMethods + TPySequenceMethods*{.final.} = object + sq_length*: Tinquiry + sq_concat*: Tbinaryfunc + sq_repeat*: Tintargfunc + sq_item*: Tintargfunc + sq_slice*: Tintintargfunc + sq_ass_item*: Tintobjargproc + sq_ass_slice*: Tintintobjargproc + sq_contains*: Tobjobjproc + sq_inplace_concat*: Tbinaryfunc + sq_inplace_repeat*: Tintargfunc + + PPySequenceMethods* = ptr TPySequenceMethods + TPyMappingMethods*{.final.} = object + mp_length*: Tinquiry + mp_subscript*: Tbinaryfunc + mp_ass_subscript*: Tobjobjargproc + + PPyMappingMethods* = ptr TPyMappingMethods + TPyBufferProcs*{.final.} = object + bf_getreadbuffer*: Tgetreadbufferproc + bf_getwritebuffer*: Tgetwritebufferproc + bf_getsegcount*: Tgetsegcountproc + bf_getcharbuffer*: Tgetcharbufferproc + + PPyBufferProcs* = ptr TPyBufferProcs + TPy_complex*{.final.} = object + float*: float64 + imag*: float64 + + TPyObject*{.pure.} = object + ob_refcnt*: int + ob_type*: PPyTypeObject + + TPyIntObject* = object of TPyObject + ob_ival*: int32 + + PByte* = ptr int8 + Tfrozen*{.final.} = object + name*: cstring + code*: PByte + size*: int + + TPySliceObject* = object of TPyObject + start*, stop*, step*: PPyObject + + PPyMethodDef* = ptr TPyMethodDef + TPyMethodDef*{.final.} = object # structmember.h + ml_name*: cstring + ml_meth*: TPyCFunction + ml_flags*: int + ml_doc*: cstring + + PPyMemberDef* = ptr TPyMemberDef + TPyMemberDef*{.final.} = object # descrobject.h + # Descriptors + name*: cstring + theType*: int + offset*: int + flags*: int + doc*: cstring + + Tgetter* = proc (obj: PPyObject, context: Pointer): PPyObject{.cdecl.} + Tsetter* = proc (obj, value: PPyObject, context: Pointer): int{.cdecl.} + PPyGetSetDef* = ptr TPyGetSetDef + TPyGetSetDef*{.final.} = object + name*: cstring + get*: Tgetter + setter*: Tsetter + doc*: cstring + closure*: Pointer + + Twrapperfunc* = proc (self, args: PPyObject, wrapped: Pointer): PPyObject{. + cdecl.} + pwrapperbase* = ptr Twrapperbase + Twrapperbase*{.final.} = object # Various kinds of descriptor objects + ##define PyDescr_COMMON \ + # PyObject_HEAD \ + # PyTypeObject *d_type; \ + # PyObject *d_name + # + name*: cstring + wrapper*: Twrapperfunc + doc*: cstring + + PPyDescrObject* = ptr TPyDescrObject + TPyDescrObject* = object of TPyObject + d_type*: PPyTypeObject + d_name*: PPyObject + + PPyMethodDescrObject* = ptr TPyMethodDescrObject + TPyMethodDescrObject* = object of TPyDescrObject + d_method*: PPyMethodDef + + PPyMemberDescrObject* = ptr TPyMemberDescrObject + TPyMemberDescrObject* = object of TPyDescrObject + d_member*: PPyMemberDef + + PPyGetSetDescrObject* = ptr TPyGetSetDescrObject + TPyGetSetDescrObject* = object of TPyDescrObject + d_getset*: PPyGetSetDef + + PPyWrapperDescrObject* = ptr TPyWrapperDescrObject + TPyWrapperDescrObject* = object of TPyDescrObject # object.h + d_base*: pwrapperbase + d_wrapped*: Pointer # This can be any function pointer + + TPyTypeObject* = object of TPyObject + ob_size*: int # Number of items in variable part + tp_name*: cstring # For printing + tp_basicsize*, tp_itemsize*: int # For allocation + # Methods to implement standard operations + tp_dealloc*: Tpydestructor + tp_print*: Tprintfunc + tp_getattr*: Tgetattrfunc + tp_setattr*: Tsetattrfunc + tp_compare*: Tcmpfunc + tp_repr*: Treprfunc # Method suites for standard classes + tp_as_number*: PPyNumberMethods + tp_as_sequence*: PPySequenceMethods + tp_as_mapping*: PPyMappingMethods # More standard operations (here for binary compatibility) + tp_hash*: Thashfunc + tp_call*: Tternaryfunc + tp_str*: Treprfunc + tp_getattro*: Tgetattrofunc + tp_setattro*: Tsetattrofunc #/ jah 29-sep-2000: updated for python 2.0 + # Functions to access object as input/output buffer + tp_as_buffer*: PPyBufferProcs # Flags to define presence of optional/expanded features + tp_flags*: int32 + tp_doc*: cstring # Documentation string + # call function for all accessible objects + tp_traverse*: Ttraverseproc # delete references to contained objects + tp_clear*: Tinquiry # rich comparisons + tp_richcompare*: Trichcmpfunc # weak reference enabler + tp_weaklistoffset*: int32 # Iterators + tp_iter*: Tgetiterfunc + tp_iternext*: Titernextfunc # Attribute descriptor and subclassing stuff + tp_methods*: PPyMethodDef + tp_members*: PPyMemberDef + tp_getset*: PPyGetSetDef + tp_base*: PPyTypeObject + tp_dict*: PPyObject + tp_descr_get*: Tdescrgetfunc + tp_descr_set*: Tdescrsetfunc + tp_dictoffset*: int32 + tp_init*: Tinitproc + tp_alloc*: Tallocfunc + tp_new*: Tnewfunc + tp_free*: Tpydestructor # Low-level free-memory routine + tp_is_gc*: Tinquiry # For PyObject_IS_GC + tp_bases*: PPyObject + tp_mro*: PPyObject # method resolution order + tp_cache*: PPyObject + tp_subclasses*: PPyObject + tp_weaklist*: PPyObject #More spares + tp_xxx7*: pointer + tp_xxx8*: pointer + + PPyMethodChain* = ptr TPyMethodChain + TPyMethodChain*{.final.} = object + methods*: PPyMethodDef + link*: PPyMethodChain + + PPyClassObject* = ptr TPyClassObject + TPyClassObject* = object of TPyObject + cl_bases*: PPyObject # A tuple of class objects + cl_dict*: PPyObject # A dictionary + cl_name*: PPyObject # A string + # The following three are functions or NULL + cl_getattr*: PPyObject + cl_setattr*: PPyObject + cl_delattr*: PPyObject + + PPyInstanceObject* = ptr TPyInstanceObject + TPyInstanceObject* = object of TPyObject + in_class*: PPyClassObject # The class object + in_dict*: PPyObject # A dictionary + + PPyMethodObject* = ptr TPyMethodObject + TPyMethodObject* = object of TPyObject # Bytecode object, compile.h + im_func*: PPyObject # The function implementing the method + im_self*: PPyObject # The instance it is bound to, or NULL + im_class*: PPyObject # The class that defined the method + + PPyCodeObject* = ptr TPyCodeObject + TPyCodeObject* = object of TPyObject # from pystate.h + co_argcount*: int # #arguments, except *args + co_nlocals*: int # #local variables + co_stacksize*: int # #entries needed for evaluation stack + co_flags*: int # CO_..., see below + co_code*: PPyObject # instruction opcodes (it hides a PyStringObject) + co_consts*: PPyObject # list (constants used) + co_names*: PPyObject # list of strings (names used) + co_varnames*: PPyObject # tuple of strings (local variable names) + co_freevars*: PPyObject # tuple of strings (free variable names) + co_cellvars*: PPyObject # tuple of strings (cell variable names) + # The rest doesn't count for hash/cmp + co_filename*: PPyObject # string (where it was loaded from) + co_name*: PPyObject # string (name, for reference) + co_firstlineno*: int # first source line number + co_lnotab*: PPyObject # string (encoding addr<->lineno mapping) + + PPyInterpreterState* = ptr TPyInterpreterState + PPyThreadState* = ptr TPyThreadState + PPyFrameObject* = ptr TPyFrameObject # Interpreter environments + TPyInterpreterState*{.final.} = object # Thread specific information + next*: PPyInterpreterState + tstate_head*: PPyThreadState + modules*: PPyObject + sysdict*: PPyObject + builtins*: PPyObject + checkinterval*: int + + TPyThreadState*{.final.} = object # from frameobject.h + next*: PPyThreadState + interp*: PPyInterpreterState + frame*: PPyFrameObject + recursion_depth*: int + ticker*: int + tracing*: int + sys_profilefunc*: PPyObject + sys_tracefunc*: PPyObject + curexc_type*: PPyObject + curexc_value*: PPyObject + curexc_traceback*: PPyObject + exc_type*: PPyObject + exc_value*: PPyObject + exc_traceback*: PPyObject + dict*: PPyObject + + PPyTryBlock* = ptr TPyTryBlock + TPyTryBlock*{.final.} = object + b_type*: int # what kind of block this is + b_handler*: int # where to jump to find handler + b_level*: int # value stack level to pop to + + CO_MAXBLOCKS* = range[0..19] + TPyFrameObject* = object of TPyObject # start of the VAR_HEAD of an object + # From traceback.c + ob_size*: int # Number of items in variable part + # End of the Head of an object + f_back*: PPyFrameObject # previous frame, or NULL + f_code*: PPyCodeObject # code segment + f_builtins*: PPyObject # builtin symbol table (PyDictObject) + f_globals*: PPyObject # global symbol table (PyDictObject) + f_locals*: PPyObject # local symbol table (PyDictObject) + f_valuestack*: PPPyObject # points after the last local + # Next free slot in f_valuestack. Frame creation sets to f_valuestack. + # Frame evaluation usually NULLs it, but a frame that yields sets it + # to the current stack top. + f_stacktop*: PPPyObject + f_trace*: PPyObject # Trace function + f_exc_type*, f_exc_value*, f_exc_traceback*: PPyObject + f_tstate*: PPyThreadState + f_lasti*: int # Last instruction if called + f_lineno*: int # Current line number + f_restricted*: int # Flag set if restricted operations + # in this scope + f_iblock*: int # index in f_blockstack + f_blockstack*: array[CO_MAXBLOCKS, TPyTryBlock] # for try and loop blocks + f_nlocals*: int # number of locals + f_ncells*: int + f_nfreevars*: int + f_stacksize*: int # size of value stack + f_localsplus*: array[0..0, PPyObject] # locals+stack, dynamically sized + + PPyTraceBackObject* = ptr TPyTraceBackObject + TPyTraceBackObject* = object of TPyObject # Parse tree node interface + tb_next*: PPyTraceBackObject + tb_frame*: PPyFrameObject + tb_lasti*: int + tb_lineno*: int + + PNode* = ptr Tnode + Tnode*{.final.} = object # From weakrefobject.h + n_type*: int16 + n_str*: cstring + n_lineno*: int16 + n_nchildren*: int16 + n_child*: PNode + + PPyWeakReference* = ptr TPyWeakReference + TPyWeakReference* = object of TPyObject + wr_object*: PPyObject + wr_callback*: PPyObject + hash*: int32 + wr_prev*: PPyWeakReference + wr_next*: PPyWeakReference + + +const + PyDateTime_DATE_DATASIZE* = 4 # # of bytes for year, month, and day + PyDateTime_TIME_DATASIZE* = 6 # # of bytes for hour, minute, second, and usecond + PyDateTime_DATETIME_DATASIZE* = 10 # # of bytes for year, month, + # day, hour, minute, second, and usecond. + +type + TPyDateTime_Delta* = object of TPyObject + hashcode*: int # -1 when unknown + days*: int # -MAX_DELTA_DAYS <= days <= MAX_DELTA_DAYS + seconds*: int # 0 <= seconds < 24*3600 is invariant + microseconds*: int # 0 <= microseconds < 1000000 is invariant + + PPyDateTime_Delta* = ptr TPyDateTime_Delta + TPyDateTime_TZInfo* = object of TPyObject # a pure abstract base clase + PPyDateTime_TZInfo* = ptr TPyDateTime_TZInfo + TPyDateTime_BaseTZInfo* = object of TPyObject + hashcode*: int + hastzinfo*: bool # boolean flag + + PPyDateTime_BaseTZInfo* = ptr TPyDateTime_BaseTZInfo + TPyDateTime_BaseTime* = object of TPyDateTime_BaseTZInfo + data*: array[0..Pred(PyDateTime_TIME_DATASIZE), int8] + + PPyDateTime_BaseTime* = ptr TPyDateTime_BaseTime + TPyDateTime_Time* = object of TPyDateTime_BaseTime # hastzinfo true + tzinfo*: PPyObject + + PPyDateTime_Time* = ptr TPyDateTime_Time + TPyDateTime_Date* = object of TPyDateTime_BaseTZInfo + data*: array[0..Pred(PyDateTime_DATE_DATASIZE), int8] + + PPyDateTime_Date* = ptr TPyDateTime_Date + TPyDateTime_BaseDateTime* = object of TPyDateTime_BaseTZInfo + data*: array[0..Pred(PyDateTime_DATETIME_DATASIZE), int8] + + PPyDateTime_BaseDateTime* = ptr TPyDateTime_BaseDateTime + TPyDateTime_DateTime* = object of TPyDateTime_BaseTZInfo + data*: array[0..Pred(PyDateTime_DATETIME_DATASIZE), int8] + tzinfo*: PPyObject + + PPyDateTime_DateTime* = ptr TPyDateTime_DateTime + +#----------------------------------------------------# +# # +# New exception classes # +# # +#----------------------------------------------------# + +# +# // Python's exceptions +# EPythonError = object(Exception) +# EName: String; +# EValue: String; +# end; +# EPyExecError = object(EPythonError) +# end; +# +# // Standard exception classes of Python +# +#/// jah 29-sep-2000: updated for python 2.0 +#/// base classes updated according python documentation +# +#{ Hierarchy of Python exceptions, Python 2.3, copied from <INSTALL>\Python\exceptions.c +# +#Exception\n\ +# |\n\ +# +-- SystemExit\n\ +# +-- StopIteration\n\ +# +-- StandardError\n\ +# | |\n\ +# | +-- KeyboardInterrupt\n\ +# | +-- ImportError\n\ +# | +-- EnvironmentError\n\ +# | | |\n\ +# | | +-- IOError\n\ +# | | +-- OSError\n\ +# | | |\n\ +# | | +-- WindowsError\n\ +# | | +-- VMSError\n\ +# | |\n\ +# | +-- EOFError\n\ +# | +-- RuntimeError\n\ +# | | |\n\ +# | | +-- NotImplementedError\n\ +# | |\n\ +# | +-- NameError\n\ +# | | |\n\ +# | | +-- UnboundLocalError\n\ +# | |\n\ +# | +-- AttributeError\n\ +# | +-- SyntaxError\n\ +# | | |\n\ +# | | +-- IndentationError\n\ +# | | |\n\ +# | | +-- TabError\n\ +# | |\n\ +# | +-- TypeError\n\ +# | +-- AssertionError\n\ +# | +-- LookupError\n\ +# | | |\n\ +# | | +-- IndexError\n\ +# | | +-- KeyError\n\ +# | |\n\ +# | +-- ArithmeticError\n\ +# | | |\n\ +# | | +-- OverflowError\n\ +# | | +-- ZeroDivisionError\n\ +# | | +-- FloatingPointError\n\ +# | |\n\ +# | +-- ValueError\n\ +# | | |\n\ +# | | +-- UnicodeError\n\ +# | | |\n\ +# | | +-- UnicodeEncodeError\n\ +# | | +-- UnicodeDecodeError\n\ +# | | +-- UnicodeTranslateError\n\ +# | |\n\ +# | +-- ReferenceError\n\ +# | +-- SystemError\n\ +# | +-- MemoryError\n\ +# |\n\ +# +---Warning\n\ +# |\n\ +# +-- UserWarning\n\ +# +-- DeprecationWarning\n\ +# +-- PendingDeprecationWarning\n\ +# +-- SyntaxWarning\n\ +# +-- OverflowWarning\n\ +# +-- RuntimeWarning\n\ +# +-- FutureWarning" +#} +# EPyException = class (EPythonError); +# EPyStandardError = class (EPyException); +# EPyArithmeticError = class (EPyStandardError); +# EPyLookupError = class (EPyStandardError); +# EPyAssertionError = class (EPyStandardError); +# EPyAttributeError = class (EPyStandardError); +# EPyEOFError = class (EPyStandardError); +# EPyFloatingPointError = class (EPyArithmeticError); +# EPyEnvironmentError = class (EPyStandardError); +# EPyIOError = class (EPyEnvironmentError); +# EPyOSError = class (EPyEnvironmentError); +# EPyImportError = class (EPyStandardError); +# EPyIndexError = class (EPyLookupError); +# EPyKeyError = class (EPyLookupError); +# EPyKeyboardInterrupt = class (EPyStandardError); +# EPyMemoryError = class (EPyStandardError); +# EPyNameError = class (EPyStandardError); +# EPyOverflowError = class (EPyArithmeticError); +# EPyRuntimeError = class (EPyStandardError); +# EPyNotImplementedError = class (EPyRuntimeError); +# EPySyntaxError = class (EPyStandardError) +# public +# EFileName: string; +# ELineStr: string; +# ELineNumber: Integer; +# EOffset: Integer; +# end; +# EPyIndentationError = class (EPySyntaxError); +# EPyTabError = class (EPyIndentationError); +# EPySystemError = class (EPyStandardError); +# EPySystemExit = class (EPyException); +# EPyTypeError = class (EPyStandardError); +# EPyUnboundLocalError = class (EPyNameError); +# EPyValueError = class (EPyStandardError); +# EPyUnicodeError = class (EPyValueError); +# UnicodeEncodeError = class (EPyUnicodeError); +# UnicodeDecodeError = class (EPyUnicodeError); +# UnicodeTranslateError = class (EPyUnicodeError); +# EPyZeroDivisionError = class (EPyArithmeticError); +# EPyStopIteration = class(EPyException); +# EPyWarning = class (EPyException); +# EPyUserWarning = class (EPyWarning); +# EPyDeprecationWarning = class (EPyWarning); +# PendingDeprecationWarning = class (EPyWarning); +# FutureWarning = class (EPyWarning); +# EPySyntaxWarning = class (EPyWarning); +# EPyOverflowWarning = class (EPyWarning); +# EPyRuntimeWarning = class (EPyWarning); +# EPyReferenceError = class (EPyStandardError); +# + +var + PyArg_Parse*: proc (args: PPyObject, format: cstring): int{.cdecl, varargs.} + PyArg_ParseTuple*: proc (args: PPyObject, format: cstring, x1: Pointer = nil, + x2: Pointer = nil, x3: Pointer = nil): int{.cdecl, varargs.} + Py_BuildValue*: proc (format: cstring): PPyObject{.cdecl, varargs.} + PyCode_Addr2Line*: proc (co: PPyCodeObject, addrq: int): int{.cdecl.} + DLL_Py_GetBuildInfo*: proc (): cstring{.cdecl.} + +var + Py_DebugFlag*: PInt + Py_VerboseFlag*: PInt + Py_InteractiveFlag*: PInt + Py_OptimizeFlag*: PInt + Py_NoSiteFlag*: PInt + Py_UseClassExceptionsFlag*: PInt + Py_FrozenFlag*: PInt + Py_TabcheckFlag*: PInt + Py_UnicodeFlag*: PInt + Py_IgnoreEnvironmentFlag*: PInt + Py_DivisionWarningFlag*: PInt + #_PySys_TraceFunc: PPPyObject; + #_PySys_ProfileFunc: PPPPyObject; + PyImport_FrozenModules*: PP_frozen + Py_None*: PPyObject + Py_Ellipsis*: PPyObject + Py_False*: PPyIntObject + Py_True*: PPyIntObject + Py_NotImplemented*: PPyObject + PyExc_AttributeError*: PPPyObject + PyExc_EOFError*: PPPyObject + PyExc_IOError*: PPPyObject + PyExc_ImportError*: PPPyObject + PyExc_IndexError*: PPPyObject + PyExc_KeyError*: PPPyObject + PyExc_KeyboardInterrupt*: PPPyObject + PyExc_MemoryError*: PPPyObject + PyExc_NameError*: PPPyObject + PyExc_OverflowError*: PPPyObject + PyExc_RuntimeError*: PPPyObject + PyExc_SyntaxError*: PPPyObject + PyExc_SystemError*: PPPyObject + PyExc_SystemExit*: PPPyObject + PyExc_TypeError*: PPPyObject + PyExc_ValueError*: PPPyObject + PyExc_ZeroDivisionError*: PPPyObject + PyExc_ArithmeticError*: PPPyObject + PyExc_Exception*: PPPyObject + PyExc_FloatingPointError*: PPPyObject + PyExc_LookupError*: PPPyObject + PyExc_StandardError*: PPPyObject + PyExc_AssertionError*: PPPyObject + PyExc_EnvironmentError*: PPPyObject + PyExc_IndentationError*: PPPyObject + PyExc_MemoryErrorInst*: PPPyObject + PyExc_NotImplementedError*: PPPyObject + PyExc_OSError*: PPPyObject + PyExc_TabError*: PPPyObject + PyExc_UnboundLocalError*: PPPyObject + PyExc_UnicodeError*: PPPyObject + PyExc_Warning*: PPPyObject + PyExc_DeprecationWarning*: PPPyObject + PyExc_RuntimeWarning*: PPPyObject + PyExc_SyntaxWarning*: PPPyObject + PyExc_UserWarning*: PPPyObject + PyExc_OverflowWarning*: PPPyObject + PyExc_ReferenceError*: PPPyObject + PyExc_StopIteration*: PPPyObject + PyExc_FutureWarning*: PPPyObject + PyExc_PendingDeprecationWarning*: PPPyObject + PyExc_UnicodeDecodeError*: PPPyObject + PyExc_UnicodeEncodeError*: PPPyObject + PyExc_UnicodeTranslateError*: PPPyObject + PyType_Type*: PPyTypeObject + PyCFunction_Type*: PPyTypeObject + PyCObject_Type*: PPyTypeObject + PyClass_Type*: PPyTypeObject + PyCode_Type*: PPyTypeObject + PyComplex_Type*: PPyTypeObject + PyDict_Type*: PPyTypeObject + PyFile_Type*: PPyTypeObject + PyFloat_Type*: PPyTypeObject + PyFrame_Type*: PPyTypeObject + PyFunction_Type*: PPyTypeObject + PyInstance_Type*: PPyTypeObject + PyInt_Type*: PPyTypeObject + PyList_Type*: PPyTypeObject + PyLong_Type*: PPyTypeObject + PyMethod_Type*: PPyTypeObject + PyModule_Type*: PPyTypeObject + PyObject_Type*: PPyTypeObject + PyRange_Type*: PPyTypeObject + PySlice_Type*: PPyTypeObject + PyString_Type*: PPyTypeObject + PyTuple_Type*: PPyTypeObject + PyBaseObject_Type*: PPyTypeObject + PyBuffer_Type*: PPyTypeObject + PyCallIter_Type*: PPyTypeObject + PyCell_Type*: PPyTypeObject + PyClassMethod_Type*: PPyTypeObject + PyProperty_Type*: PPyTypeObject + PySeqIter_Type*: PPyTypeObject + PyStaticMethod_Type*: PPyTypeObject + PySuper_Type*: PPyTypeObject + PySymtableEntry_Type*: PPyTypeObject + PyTraceBack_Type*: PPyTypeObject + PyUnicode_Type*: PPyTypeObject + PyWrapperDescr_Type*: PPyTypeObject + PyBaseString_Type*: PPyTypeObject + PyBool_Type*: PPyTypeObject + PyEnum_Type*: PPyTypeObject + + #PyArg_GetObject: proc(args: PPyObject; nargs, i: integer; p_a: PPPyObject): integer; cdecl; + #PyArg_GetLong: proc(args: PPyObject; nargs, i: integer; p_a: PLong): integer; cdecl; + #PyArg_GetShort: proc(args: PPyObject; nargs, i: integer; p_a: PShort): integer; cdecl; + #PyArg_GetFloat: proc(args: PPyObject; nargs, i: integer; p_a: PFloat): integer; cdecl; + #PyArg_GetString: proc(args: PPyObject; nargs, i: integer; p_a: PString): integer; cdecl; + #PyArgs_VaParse: proc (args: PPyObject; format: PChar; + # va_list: array of const): integer; cdecl; + # Does not work! + # Py_VaBuildValue: proc (format: PChar; va_list: array of const): PPyObject; cdecl; + #PyBuiltin_Init: proc; cdecl; +proc PyComplex_FromCComplex*(c: TPy_complex): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyComplex_FromDoubles*(realv, imag: float64): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyComplex_RealAsDouble*(op: PPyObject): float64{.cdecl, importc, dynlib: dllname.} +proc PyComplex_ImagAsDouble*(op: PPyObject): float64{.cdecl, importc, dynlib: dllname.} +proc PyComplex_AsCComplex*(op: PPyObject): TPy_complex{.cdecl, importc, dynlib: dllname.} +proc PyCFunction_GetFunction*(ob: PPyObject): Pointer{.cdecl, importc, dynlib: dllname.} +proc PyCFunction_GetSelf*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyCallable_Check*(ob: PPyObject): int{.cdecl, importc, dynlib: dllname.} +proc PyCObject_FromVoidPtr*(cobj, destruct: Pointer): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyCObject_AsVoidPtr*(ob: PPyObject): Pointer{.cdecl, importc, dynlib: dllname.} +proc PyClass_New*(ob1, ob2, ob3: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyClass_IsSubclass*(ob1, ob2: PPyObject): int{.cdecl, importc, dynlib: dllname.} +proc Py_InitModule4*(name: cstring, methods: PPyMethodDef, doc: cstring, + passthrough: PPyObject, Api_Version: int): PPyObject{. + cdecl, importc, dynlib: dllname.} +proc PyErr_BadArgument*(): int{.cdecl, importc, dynlib: dllname.} +proc PyErr_BadInternalCall*(){.cdecl, importc, dynlib: dllname.} +proc PyErr_CheckSignals*(): int{.cdecl, importc, dynlib: dllname.} +proc PyErr_Clear*(){.cdecl, importc, dynlib: dllname.} +proc PyErr_Fetch*(errtype, errvalue, errtraceback: PPPyObject){.cdecl, importc, dynlib: dllname.} +proc PyErr_NoMemory*(): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyErr_Occurred*(): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyErr_Print*(){.cdecl, importc, dynlib: dllname.} +proc PyErr_Restore*(errtype, errvalue, errtraceback: PPyObject){.cdecl, importc, dynlib: dllname.} +proc PyErr_SetFromErrno*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyErr_SetNone*(value: PPyObject){.cdecl, importc, dynlib: dllname.} +proc PyErr_SetObject*(ob1, ob2: PPyObject){.cdecl, importc, dynlib: dllname.} +proc PyErr_SetString*(ErrorObject: PPyObject, text: cstring){.cdecl, importc, dynlib: dllname.} +proc PyImport_GetModuleDict*(): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyInt_FromLong*(x: int32): PPyObject{.cdecl, importc, dynlib: dllname.} +proc Py_Initialize*(){.cdecl, importc, dynlib: dllname.} +proc Py_Exit*(RetVal: int){.cdecl, importc, dynlib: dllname.} +proc PyEval_GetBuiltins*(): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyDict_GetItem*(mp, key: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyDict_SetItem*(mp, key, item: PPyObject): int{.cdecl, importc, dynlib: dllname.} +proc PyDict_DelItem*(mp, key: PPyObject): int{.cdecl, importc, dynlib: dllname.} +proc PyDict_Clear*(mp: PPyObject){.cdecl, importc, dynlib: dllname.} +proc PyDict_Next*(mp: PPyObject, pos: PInt, key, value: PPPyObject): int{. + cdecl, importc, dynlib: dllname.} +proc PyDict_Keys*(mp: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyDict_Values*(mp: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyDict_Items*(mp: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyDict_Size*(mp: PPyObject): int{.cdecl, importc, dynlib: dllname.} +proc PyDict_DelItemString*(dp: PPyObject, key: cstring): int{.cdecl, importc, dynlib: dllname.} +proc PyDict_New*(): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyDict_GetItemString*(dp: PPyObject, key: cstring): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyDict_SetItemString*(dp: PPyObject, key: cstring, item: PPyObject): int{. + cdecl, importc, dynlib: dllname.} +proc PyDictProxy_New*(obj: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyModule_GetDict*(module: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyObject_Str*(v: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyRun_String*(str: cstring, start: int, globals: PPyObject, + locals: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyRun_SimpleString*(str: cstring): int{.cdecl, importc, dynlib: dllname.} +proc PyString_AsString*(ob: PPyObject): cstring{.cdecl, importc, dynlib: dllname.} +proc PyString_FromString*(str: cstring): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PySys_SetArgv*(argc: int, argv: cstringArray){.cdecl, importc, dynlib: dllname.} + #+ means, Grzegorz or me has tested his non object version of this function + #+ +proc PyCFunction_New*(md: PPyMethodDef, ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #+ +proc PyEval_CallObject*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyEval_CallObjectWithKeywords*(ob1, ob2, ob3: PPyObject): PPyObject{. + cdecl, importc, dynlib: dllname.} #- +proc PyEval_GetFrame*(): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyEval_GetGlobals*(): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyEval_GetLocals*(): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyEval_GetOwner*(): PPyObject {.cdecl, importc, dynlib: dllname.} +proc PyEval_GetRestricted*(): int{.cdecl, importc, dynlib: dllname.} #- +proc PyEval_InitThreads*(){.cdecl, importc, dynlib: dllname.} #- +proc PyEval_RestoreThread*(tstate: PPyThreadState){.cdecl, importc, dynlib: dllname.} #- +proc PyEval_SaveThread*(): PPyThreadState{.cdecl, importc, dynlib: dllname.} #- +proc PyFile_FromString*(pc1, pc2: cstring): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyFile_GetLine*(ob: PPyObject, i: int): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyFile_Name*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyFile_SetBufSize*(ob: PPyObject, i: int){.cdecl, importc, dynlib: dllname.} #- +proc PyFile_SoftSpace*(ob: PPyObject, i: int): int{.cdecl, importc, dynlib: dllname.} #- +proc PyFile_WriteObject*(ob1, ob2: PPyObject, i: int): int{.cdecl, importc, dynlib: dllname.} #- +proc PyFile_WriteString*(s: cstring, ob: PPyObject){.cdecl, importc, dynlib: dllname.} #+ +proc PyFloat_AsDouble*(ob: PPyObject): float64{.cdecl, importc, dynlib: dllname.} #+ +proc PyFloat_FromDouble*(db: float64): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyFunction_GetCode*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyFunction_GetGlobals*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyFunction_New*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyImport_AddModule*(name: cstring): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyImport_Cleanup*(){.cdecl, importc, dynlib: dllname.} #- +proc PyImport_GetMagicNumber*(): int32{.cdecl, importc, dynlib: dllname.} #+ +proc PyImport_ImportFrozenModule*(key: cstring): int{.cdecl, importc, dynlib: dllname.} #+ +proc PyImport_ImportModule*(name: cstring): PPyObject{.cdecl, importc, dynlib: dllname.} #+ +proc PyImport_Import*(name: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- + +proc PyImport_Init*() {.cdecl, importc, dynlib: dllname.} +proc PyImport_ReloadModule*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyInstance_New*(obClass, obArg, obKW: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #+ +proc PyInt_AsLong*(ob: PPyObject): int32{.cdecl, importc, dynlib: dllname.} #- +proc PyList_Append*(ob1, ob2: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyList_AsTuple*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #+ +proc PyList_GetItem*(ob: PPyObject, i: int): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyList_GetSlice*(ob: PPyObject, i1, i2: int): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyList_Insert*(dp: PPyObject, idx: int, item: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyList_New*(size: int): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyList_Reverse*(ob: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyList_SetItem*(dp: PPyObject, idx: int, item: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyList_SetSlice*(ob: PPyObject, i1, i2: int, ob2: PPyObject): int{. + cdecl, importc, dynlib: dllname.} #+ +proc PyList_Size*(ob: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyList_Sort*(ob: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyLong_AsDouble*(ob: PPyObject): float64{.cdecl, importc, dynlib: dllname.} #+ +proc PyLong_AsLong*(ob: PPyObject): int32{.cdecl, importc, dynlib: dllname.} #+ +proc PyLong_FromDouble*(db: float64): PPyObject{.cdecl, importc, dynlib: dllname.} #+ +proc PyLong_FromLong*(L: int32): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyLong_FromString*(pc: cstring, ppc: var cstring, i: int): PPyObject{. + cdecl, importc, dynlib: dllname.} #- +proc PyLong_FromUnsignedLong*(val: int): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyLong_AsUnsignedLong*(ob: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyLong_FromUnicode*(ob: PPyObject, a, b: int): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyLong_FromLongLong*(val: Int64): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyLong_AsLongLong*(ob: PPyObject): Int64{.cdecl, importc, dynlib: dllname.} #- +proc PyMapping_Check*(ob: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyMapping_GetItemString*(ob: PPyObject, key: cstring): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyMapping_HasKey*(ob, key: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyMapping_HasKeyString*(ob: PPyObject, key: cstring): int{.cdecl, importc, dynlib: dllname.} #- +proc PyMapping_Length*(ob: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyMapping_SetItemString*(ob: PPyObject, key: cstring, value: PPyObject): int{. + cdecl, importc, dynlib: dllname.} #- +proc PyMethod_Class*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyMethod_Function*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyMethod_New*(ob1, ob2, ob3: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyMethod_Self*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyModule_GetName*(ob: PPyObject): cstring{.cdecl, importc, dynlib: dllname.} #- +proc PyModule_New*(key: cstring): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Absolute*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Add*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_And*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Check*(ob: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Coerce*(ob1, ob2: var PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Divide*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_FloorDivide*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_TrueDivide*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Divmod*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Float*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Int*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Invert*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Long*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Lshift*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Multiply*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Negative*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Or*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Positive*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Power*(ob1, ob2, ob3: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Remainder*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Rshift*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Subtract*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyNumber_Xor*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyOS_InitInterrupts*(){.cdecl, importc, dynlib: dllname.} #- +proc PyOS_InterruptOccurred*(): int{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_CallObject*(ob, args: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_Compare*(ob1, ob2: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_GetAttr*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #+ +proc PyObject_GetAttrString*(ob: PPyObject, c: cstring): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_GetItem*(ob, key: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_DelItem*(ob, key: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_HasAttrString*(ob: PPyObject, key: cstring): int{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_Hash*(ob: PPyObject): int32{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_IsTrue*(ob: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_Length*(ob: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_Repr*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_SetAttr*(ob1, ob2, ob3: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_SetAttrString*(ob: PPyObject, key: cstring, value: PPyObject): int{. + cdecl, importc, dynlib: dllname.} #- +proc PyObject_SetItem*(ob1, ob2, ob3: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_Init*(ob: PPyObject, t: PPyTypeObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_InitVar*(ob: PPyObject, t: PPyTypeObject, size: int): PPyObject{. + cdecl, importc, dynlib: dllname.} #- +proc PyObject_New*(t: PPyTypeObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_NewVar*(t: PPyTypeObject, size: int): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyObject_Free*(ob: PPyObject){.cdecl, importc, dynlib: dllname.} #- +proc PyObject_IsInstance*(inst, cls: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_IsSubclass*(derived, cls: PPyObject): int{.cdecl, importc, dynlib: dllname.} +proc PyObject_GenericGetAttr*(obj, name: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyObject_GenericSetAttr*(obj, name, value: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_GC_Malloc*(size: int): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_GC_New*(t: PPyTypeObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_GC_NewVar*(t: PPyTypeObject, size: int): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_GC_Resize*(t: PPyObject, newsize: int): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyObject_GC_Del*(ob: PPyObject){.cdecl, importc, dynlib: dllname.} #- +proc PyObject_GC_Track*(ob: PPyObject){.cdecl, importc, dynlib: dllname.} #- +proc PyObject_GC_UnTrack*(ob: PPyObject){.cdecl, importc, dynlib: dllname.} #- +proc PyRange_New*(l1, l2, l3: int32, i: int): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PySequence_Check*(ob: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PySequence_Concat*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PySequence_Count*(ob1, ob2: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PySequence_GetItem*(ob: PPyObject, i: int): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PySequence_GetSlice*(ob: PPyObject, i1, i2: int): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PySequence_In*(ob1, ob2: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PySequence_Index*(ob1, ob2: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PySequence_Length*(ob: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PySequence_Repeat*(ob: PPyObject, count: int): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PySequence_SetItem*(ob: PPyObject, i: int, value: PPyObject): int{. + cdecl, importc, dynlib: dllname.} #- +proc PySequence_SetSlice*(ob: PPyObject, i1, i2: int, value: PPyObject): int{. + cdecl, importc, dynlib: dllname.} #- +proc PySequence_DelSlice*(ob: PPyObject, i1, i2: int): int{.cdecl, importc, dynlib: dllname.} #- +proc PySequence_Tuple*(ob: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PySequence_Contains*(ob, value: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PySlice_GetIndices*(ob: PPySliceObject, len: int, + start, stop, step: var int): int{.cdecl, importc, dynlib: dllname.} #- +proc PySlice_GetIndicesEx*(ob: PPySliceObject, len: int, + start, stop, step, slicelength: var int): int{. + cdecl, importc, dynlib: dllname.} #- +proc PySlice_New*(start, stop, step: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyString_Concat*(ob1: var PPyObject, ob2: PPyObject){.cdecl, importc, dynlib: dllname.} #- +proc PyString_ConcatAndDel*(ob1: var PPyObject, ob2: PPyObject){.cdecl, importc, dynlib: dllname.} #- +proc PyString_Format*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyString_FromStringAndSize*(s: cstring, i: int): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyString_Size*(ob: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyString_DecodeEscape*(s: cstring, length: int, errors: cstring, + unicode: int, recode_encoding: cstring): PPyObject{. + cdecl, importc, dynlib: dllname.} #- +proc PyString_Repr*(ob: PPyObject, smartquotes: int): PPyObject{.cdecl, importc, dynlib: dllname.} #+ +proc PySys_GetObject*(s: cstring): PPyObject{.cdecl, importc, dynlib: dllname.} +#- +#PySys_Init:procedure; cdecl, importc, dynlib: dllname; +#- +proc PySys_SetObject*(s: cstring, ob: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PySys_SetPath*(path: cstring){.cdecl, importc, dynlib: dllname.} #- +#PyTraceBack_Fetch:function:PPyObject; cdecl, importc, dynlib: dllname; +#- +proc PyTraceBack_Here*(p: pointer): int{.cdecl, importc, dynlib: dllname.} #- +proc PyTraceBack_Print*(ob1, ob2: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +#PyTraceBack_Store:function (ob:PPyObject):integer; cdecl, importc, dynlib: dllname; +#+ +proc PyTuple_GetItem*(ob: PPyObject, i: int): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc PyTuple_GetSlice*(ob: PPyObject, i1, i2: int): PPyObject{.cdecl, importc, dynlib: dllname.} #+ +proc PyTuple_New*(size: int): PPyObject{.cdecl, importc, dynlib: dllname.} #+ +proc PyTuple_SetItem*(ob: PPyObject, key: int, value: PPyObject): int{.cdecl, importc, dynlib: dllname.} #+ +proc PyTuple_Size*(ob: PPyObject): int{.cdecl, importc, dynlib: dllname.} #+ +proc PyType_IsSubtype*(a, b: PPyTypeObject): int{.cdecl, importc, dynlib: dllname.} +proc PyType_GenericAlloc*(atype: PPyTypeObject, nitems: int): PPyObject{. + cdecl, importc, dynlib: dllname.} +proc PyType_GenericNew*(atype: PPyTypeObject, args, kwds: PPyObject): PPyObject{. + cdecl, importc, dynlib: dllname.} +proc PyType_Ready*(atype: PPyTypeObject): int{.cdecl, importc, dynlib: dllname.} #+ +proc PyUnicode_FromWideChar*(w: pointer, size: int): PPyObject{.cdecl, importc, dynlib: dllname.} #+ +proc PyUnicode_AsWideChar*(unicode: PPyObject, w: pointer, size: int): int{. + cdecl, importc, dynlib: dllname.} #- +proc PyUnicode_FromOrdinal*(ordinal: int): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyWeakref_GetObject*(theRef: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyWeakref_NewProxy*(ob, callback: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyWeakref_NewRef*(ob, callback: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyWrapper_New*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.} +proc PyBool_FromLong*(ok: int): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc Py_AtExit*(prc: proc ()): int{.cdecl, importc, dynlib: dllname.} #- +#Py_Cleanup:procedure; cdecl, importc, dynlib: dllname; +#- +proc Py_CompileString*(s1, s2: cstring, i: int): PPyObject{.cdecl, importc, dynlib: dllname.} #- +proc Py_FatalError*(s: cstring){.cdecl, importc, dynlib: dllname.} #- +proc Py_FindMethod*(md: PPyMethodDef, ob: PPyObject, key: cstring): PPyObject{. + cdecl, importc, dynlib: dllname.} #- +proc Py_FindMethodInChain*(mc: PPyMethodChain, ob: PPyObject, key: cstring): PPyObject{. + cdecl, importc, dynlib: dllname.} #- +proc Py_FlushLine*(){.cdecl, importc, dynlib: dllname.} #+ +proc Py_Finalize*(){.cdecl, importc, dynlib: dllname.} #- +proc PyErr_ExceptionMatches*(exc: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyErr_GivenExceptionMatches*(raised_exc, exc: PPyObject): int{.cdecl, importc, dynlib: dllname.} #- +proc PyEval_EvalCode*(co: PPyCodeObject, globals, locals: PPyObject): PPyObject{. + cdecl, importc, dynlib: dllname.} #+ +proc Py_GetVersion*(): cstring{.cdecl, importc, dynlib: dllname.} #+ +proc Py_GetCopyright*(): cstring{.cdecl, importc, dynlib: dllname.} #+ +proc Py_GetExecPrefix*(): cstring{.cdecl, importc, dynlib: dllname.} #+ +proc Py_GetPath*(): cstring{.cdecl, importc, dynlib: dllname.} #+ +proc Py_GetPrefix*(): cstring{.cdecl, importc, dynlib: dllname.} #+ +proc Py_GetProgramName*(): cstring{.cdecl, importc, dynlib: dllname.} #- +proc PyParser_SimpleParseString*(str: cstring, start: int): PNode{.cdecl, importc, dynlib: dllname.} #- +proc PyNode_Free*(n: PNode){.cdecl, importc, dynlib: dllname.} #- +proc PyErr_NewException*(name: cstring, base, dict: PPyObject): PPyObject{. + cdecl, importc, dynlib: dllname.} #- +proc Py_Malloc*(size: int): Pointer {.cdecl, importc, dynlib: dllname.} +proc PyMem_Malloc*(size: int): Pointer {.cdecl, importc, dynlib: dllname.} +proc PyObject_CallMethod*(obj: PPyObject, theMethod, + format: cstring): PPyObject{.cdecl, importc, dynlib: dllname.} +proc Py_SetProgramName*(name: cstring){.cdecl, importc, dynlib: dllname.} +proc Py_IsInitialized*(): int{.cdecl, importc, dynlib: dllname.} +proc Py_GetProgramFullPath*(): cstring{.cdecl, importc, dynlib: dllname.} +proc Py_NewInterpreter*(): PPyThreadState{.cdecl, importc, dynlib: dllname.} +proc Py_EndInterpreter*(tstate: PPyThreadState){.cdecl, importc, dynlib: dllname.} +proc PyEval_AcquireLock*(){.cdecl, importc, dynlib: dllname.} +proc PyEval_ReleaseLock*(){.cdecl, importc, dynlib: dllname.} +proc PyEval_AcquireThread*(tstate: PPyThreadState){.cdecl, importc, dynlib: dllname.} +proc PyEval_ReleaseThread*(tstate: PPyThreadState){.cdecl, importc, dynlib: dllname.} +proc PyInterpreterState_New*(): PPyInterpreterState{.cdecl, importc, dynlib: dllname.} +proc PyInterpreterState_Clear*(interp: PPyInterpreterState){.cdecl, importc, dynlib: dllname.} +proc PyInterpreterState_Delete*(interp: PPyInterpreterState){.cdecl, importc, dynlib: dllname.} +proc PyThreadState_New*(interp: PPyInterpreterState): PPyThreadState{.cdecl, importc, dynlib: dllname.} +proc PyThreadState_Clear*(tstate: PPyThreadState){.cdecl, importc, dynlib: dllname.} +proc PyThreadState_Delete*(tstate: PPyThreadState){.cdecl, importc, dynlib: dllname.} +proc PyThreadState_Get*(): PPyThreadState{.cdecl, importc, dynlib: dllname.} +proc PyThreadState_Swap*(tstate: PPyThreadState): PPyThreadState{.cdecl, importc, dynlib: dllname.} + +#Further exported Objects, may be implemented later +# +# PyCode_New: Pointer; +# PyErr_SetInterrupt: Pointer; +# PyFile_AsFile: Pointer; +# PyFile_FromFile: Pointer; +# PyFloat_AsString: Pointer; +# PyFrame_BlockPop: Pointer; +# PyFrame_BlockSetup: Pointer; +# PyFrame_ExtendStack: Pointer; +# PyFrame_FastToLocals: Pointer; +# PyFrame_LocalsToFast: Pointer; +# PyFrame_New: Pointer; +# PyGrammar_AddAccelerators: Pointer; +# PyGrammar_FindDFA: Pointer; +# PyGrammar_LabelRepr: Pointer; +# PyInstance_DoBinOp: Pointer; +# PyInt_GetMax: Pointer; +# PyMarshal_Init: Pointer; +# PyMarshal_ReadLongFromFile: Pointer; +# PyMarshal_ReadObjectFromFile: Pointer; +# PyMarshal_ReadObjectFromString: Pointer; +# PyMarshal_WriteLongToFile: Pointer; +# PyMarshal_WriteObjectToFile: Pointer; +# PyMember_Get: Pointer; +# PyMember_Set: Pointer; +# PyNode_AddChild: Pointer; +# PyNode_Compile: Pointer; +# PyNode_New: Pointer; +# PyOS_GetLastModificationTime: Pointer; +# PyOS_Readline: Pointer; +# PyOS_strtol: Pointer; +# PyOS_strtoul: Pointer; +# PyObject_CallFunction: Pointer; +# PyObject_CallMethod: Pointer; +# PyObject_Print: Pointer; +# PyParser_AddToken: Pointer; +# PyParser_Delete: Pointer; +# PyParser_New: Pointer; +# PyParser_ParseFile: Pointer; +# PyParser_ParseString: Pointer; +# PyParser_SimpleParseFile: Pointer; +# PyRun_AnyFile: Pointer; +# PyRun_File: Pointer; +# PyRun_InteractiveLoop: Pointer; +# PyRun_InteractiveOne: Pointer; +# PyRun_SimpleFile: Pointer; +# PySys_GetFile: Pointer; +# PyToken_OneChar: Pointer; +# PyToken_TwoChars: Pointer; +# PyTokenizer_Free: Pointer; +# PyTokenizer_FromFile: Pointer; +# PyTokenizer_FromString: Pointer; +# PyTokenizer_Get: Pointer; +# Py_Main: Pointer; +# _PyObject_NewVar: Pointer; +# _PyParser_Grammar: Pointer; +# _PyParser_TokenNames: Pointer; +# _PyThread_Started: Pointer; +# _Py_c_diff: Pointer; +# _Py_c_neg: Pointer; +# _Py_c_pow: Pointer; +# _Py_c_prod: Pointer; +# _Py_c_quot: Pointer; +# _Py_c_sum: Pointer; +# + +# This function handles all cardinals, pointer types (with no adjustment of pointers!) +# (Extended) floats, which are handled as Python doubles and currencies, handled +# as (normalized) Python doubles. +proc PyImport_ExecCodeModule*(name: String, codeobject: PPyObject): PPyObject +proc PyString_Check*(obj: PPyObject): bool +proc PyString_CheckExact*(obj: PPyObject): bool +proc PyFloat_Check*(obj: PPyObject): bool +proc PyFloat_CheckExact*(obj: PPyObject): bool +proc PyInt_Check*(obj: PPyObject): bool +proc PyInt_CheckExact*(obj: PPyObject): bool +proc PyLong_Check*(obj: PPyObject): bool +proc PyLong_CheckExact*(obj: PPyObject): bool +proc PyTuple_Check*(obj: PPyObject): bool +proc PyTuple_CheckExact*(obj: PPyObject): bool +proc PyInstance_Check*(obj: PPyObject): bool +proc PyClass_Check*(obj: PPyObject): bool +proc PyMethod_Check*(obj: PPyObject): bool +proc PyList_Check*(obj: PPyObject): bool +proc PyList_CheckExact*(obj: PPyObject): bool +proc PyDict_Check*(obj: PPyObject): bool +proc PyDict_CheckExact*(obj: PPyObject): bool +proc PyModule_Check*(obj: PPyObject): bool +proc PyModule_CheckExact*(obj: PPyObject): bool +proc PySlice_Check*(obj: PPyObject): bool +proc PyFunction_Check*(obj: PPyObject): bool +proc PyUnicode_Check*(obj: PPyObject): bool +proc PyUnicode_CheckExact*(obj: PPyObject): bool +proc PyType_IS_GC*(t: PPyTypeObject): bool +proc PyObject_IS_GC*(obj: PPyObject): bool +proc PyBool_Check*(obj: PPyObject): bool +proc PyBaseString_Check*(obj: PPyObject): bool +proc PyEnum_Check*(obj: PPyObject): bool +proc PyObject_TypeCheck*(obj: PPyObject, t: PPyTypeObject): bool +proc Py_InitModule*(name: cstring, md: PPyMethodDef): PPyObject +proc PyType_HasFeature*(AType: PPyTypeObject, AFlag: int): bool +# implementation + +proc Py_INCREF*(op: PPyObject) {.inline.} = + Inc(op.ob_refcnt) + +proc Py_DECREF*(op: PPyObject) {.inline.} = + Dec(op.ob_refcnt) + if op.ob_refcnt == 0: + op.ob_type.tp_dealloc(op) + +proc Py_XINCREF*(op: PPyObject) {.inline.} = + if op != nil: Py_INCREF(op) + +proc Py_XDECREF*(op: PPyObject) {.inline.} = + if op != nil: Py_DECREF(op) + +proc PyImport_ExecCodeModule(name: string, codeobject: PPyObject): PPyObject = + var m, d, v, modules: PPyObject + m = PyImport_AddModule(cstring(name)) + if m == nil: + return nil + d = PyModule_GetDict(m) + if PyDict_GetItemString(d, "__builtins__") == nil: + if PyDict_SetItemString(d, "__builtins__", PyEval_GetBuiltins()) != 0: + return nil + if PyDict_SetItemString(d, "__file__", + PPyCodeObject(codeobject).co_filename) != 0: + PyErr_Clear() # Not important enough to report + v = PyEval_EvalCode(PPyCodeObject(codeobject), d, d) # XXX owner ? + if v == nil: + return nil + Py_XDECREF(v) + modules = PyImport_GetModuleDict() + if PyDict_GetItemString(modules, cstring(name)) == nil: + PyErr_SetString(PyExc_ImportError^ , cstring( + "Loaded module " & name & "not found in sys.modules")) + return nil + Py_XINCREF(m) + Result = m + +proc PyString_Check(obj: PPyObject): bool = + Result = PyObject_TypeCheck(obj, PyString_Type) + +proc PyString_CheckExact(obj: PPyObject): bool = + Result = (obj != nil) and (obj.ob_type == PyString_Type) + +proc PyFloat_Check(obj: PPyObject): bool = + Result = PyObject_TypeCheck(obj, PyFloat_Type) + +proc PyFloat_CheckExact(obj: PPyObject): bool = + Result = (obj != nil) and (obj.ob_type == PyFloat_Type) + +proc PyInt_Check(obj: PPyObject): bool = + Result = PyObject_TypeCheck(obj, PyInt_Type) + +proc PyInt_CheckExact(obj: PPyObject): bool = + Result = (obj != nil) and (obj.ob_type == PyInt_Type) + +proc PyLong_Check(obj: PPyObject): bool = + Result = PyObject_TypeCheck(obj, PyLong_Type) + +proc PyLong_CheckExact(obj: PPyObject): bool = + Result = (obj != nil) and (obj.ob_type == PyLong_Type) + +proc PyTuple_Check(obj: PPyObject): bool = + Result = PyObject_TypeCheck(obj, PyTuple_Type) + +proc PyTuple_CheckExact(obj: PPyObject): bool = + Result = (obj != nil) and (obj^ .ob_type == PyTuple_Type) + +proc PyInstance_Check(obj: PPyObject): bool = + Result = (obj != nil) and (obj^ .ob_type == PyInstance_Type) + +proc PyClass_Check(obj: PPyObject): bool = + Result = (obj != nil) and (obj^ .ob_type == PyClass_Type) + +proc PyMethod_Check(obj: PPyObject): bool = + Result = (obj != nil) and (obj^ .ob_type == PyMethod_Type) + +proc PyList_Check(obj: PPyObject): bool = + Result = PyObject_TypeCheck(obj, PyList_Type) + +proc PyList_CheckExact(obj: PPyObject): bool = + Result = (obj != nil) and (obj^ .ob_type == PyList_Type) + +proc PyDict_Check(obj: PPyObject): bool = + Result = PyObject_TypeCheck(obj, PyDict_Type) + +proc PyDict_CheckExact(obj: PPyObject): bool = + Result = (obj != nil) and (obj^ .ob_type == PyDict_Type) + +proc PyModule_Check(obj: PPyObject): bool = + Result = PyObject_TypeCheck(obj, PyModule_Type) + +proc PyModule_CheckExact(obj: PPyObject): bool = + Result = (obj != nil) and (obj^ .ob_type == PyModule_Type) + +proc PySlice_Check(obj: PPyObject): bool = + Result = (obj != nil) and (obj^ .ob_type == PySlice_Type) + +proc PyFunction_Check(obj: PPyObject): bool = + Result = (obj != nil) and + ((obj.ob_type == PyCFunction_Type) or + (obj.ob_type == PyFunction_Type)) + +proc PyUnicode_Check(obj: PPyObject): bool = + Result = PyObject_TypeCheck(obj, PyUnicode_Type) + +proc PyUnicode_CheckExact(obj: PPyObject): bool = + Result = (obj != nil) and (obj.ob_type == PyUnicode_Type) + +proc PyType_IS_GC(t: PPyTypeObject): bool = + Result = PyType_HasFeature(t, Py_TPFLAGS_HAVE_GC) + +proc PyObject_IS_GC(obj: PPyObject): bool = + Result = PyType_IS_GC(obj.ob_type) and + ((obj.ob_type.tp_is_gc == nil) or (obj.ob_type.tp_is_gc(obj) == 1)) + +proc PyBool_Check(obj: PPyObject): bool = + Result = (obj != nil) and (obj.ob_type == PyBool_Type) + +proc PyBaseString_Check(obj: PPyObject): bool = + Result = PyObject_TypeCheck(obj, PyBaseString_Type) + +proc PyEnum_Check(obj: PPyObject): bool = + Result = (obj != nil) and (obj.ob_type == PyEnum_Type) + +proc PyObject_TypeCheck(obj: PPyObject, t: PPyTypeObject): bool = + Result = (obj != nil) and (obj.ob_type == t) + if not Result and (obj != nil) and (t != nil): + Result = PyType_IsSubtype(obj.ob_type, t) == 1 + +proc Py_InitModule(name: cstring, md: PPyMethodDef): PPyObject = + result = Py_InitModule4(name, md, nil, nil, 1012) + +proc PyType_HasFeature(AType: PPyTypeObject, AFlag: int): bool = + #(((t)->tp_flags & (f)) != 0) + Result = (AType.tp_flags and AFlag) != 0 + +proc init(lib: TLibHandle) = + Py_DebugFlag = cast[PInt](symAddr(lib, "Py_DebugFlag")) + Py_VerboseFlag = cast[PInt](symAddr(lib, "Py_VerboseFlag")) + Py_InteractiveFlag = cast[PInt](symAddr(lib, "Py_InteractiveFlag")) + Py_OptimizeFlag = cast[PInt](symAddr(lib, "Py_OptimizeFlag")) + Py_NoSiteFlag = cast[PInt](symAddr(lib, "Py_NoSiteFlag")) + Py_UseClassExceptionsFlag = cast[PInt](symAddr(lib, "Py_UseClassExceptionsFlag")) + Py_FrozenFlag = cast[PInt](symAddr(lib, "Py_FrozenFlag")) + Py_TabcheckFlag = cast[PInt](symAddr(lib, "Py_TabcheckFlag")) + Py_UnicodeFlag = cast[PInt](symAddr(lib, "Py_UnicodeFlag")) + Py_IgnoreEnvironmentFlag = cast[PInt](symAddr(lib, "Py_IgnoreEnvironmentFlag")) + Py_DivisionWarningFlag = cast[PInt](symAddr(lib, "Py_DivisionWarningFlag")) + Py_None = cast[PPyObject](symAddr(lib, "_Py_NoneStruct")) + Py_Ellipsis = cast[PPyObject](symAddr(lib, "_Py_EllipsisObject")) + Py_False = cast[PPyIntObject](symAddr(lib, "_Py_ZeroStruct")) + Py_True = cast[PPyIntObject](symAddr(lib, "_Py_TrueStruct")) + Py_NotImplemented = cast[PPyObject](symAddr(lib, "_Py_NotImplementedStruct")) + PyImport_FrozenModules = cast[PP_frozen](symAddr(lib, "PyImport_FrozenModules")) + PyExc_AttributeError = cast[PPPyObject](symAddr(lib, "PyExc_AttributeError")) + PyExc_EOFError = cast[PPPyObject](symAddr(lib, "PyExc_EOFError")) + PyExc_IOError = cast[PPPyObject](symAddr(lib, "PyExc_IOError")) + PyExc_ImportError = cast[PPPyObject](symAddr(lib, "PyExc_ImportError")) + PyExc_IndexError = cast[PPPyObject](symAddr(lib, "PyExc_IndexError")) + PyExc_KeyError = cast[PPPyObject](symAddr(lib, "PyExc_KeyError")) + PyExc_KeyboardInterrupt = cast[PPPyObject](symAddr(lib, "PyExc_KeyboardInterrupt")) + PyExc_MemoryError = cast[PPPyObject](symAddr(lib, "PyExc_MemoryError")) + PyExc_NameError = cast[PPPyObject](symAddr(lib, "PyExc_NameError")) + PyExc_OverflowError = cast[PPPyObject](symAddr(lib, "PyExc_OverflowError")) + PyExc_RuntimeError = cast[PPPyObject](symAddr(lib, "PyExc_RuntimeError")) + PyExc_SyntaxError = cast[PPPyObject](symAddr(lib, "PyExc_SyntaxError")) + PyExc_SystemError = cast[PPPyObject](symAddr(lib, "PyExc_SystemError")) + PyExc_SystemExit = cast[PPPyObject](symAddr(lib, "PyExc_SystemExit")) + PyExc_TypeError = cast[PPPyObject](symAddr(lib, "PyExc_TypeError")) + PyExc_ValueError = cast[PPPyObject](symAddr(lib, "PyExc_ValueError")) + PyExc_ZeroDivisionError = cast[PPPyObject](symAddr(lib, "PyExc_ZeroDivisionError")) + PyExc_ArithmeticError = cast[PPPyObject](symAddr(lib, "PyExc_ArithmeticError")) + PyExc_Exception = cast[PPPyObject](symAddr(lib, "PyExc_Exception")) + PyExc_FloatingPointError = cast[PPPyObject](symAddr(lib, "PyExc_FloatingPointError")) + PyExc_LookupError = cast[PPPyObject](symAddr(lib, "PyExc_LookupError")) + PyExc_StandardError = cast[PPPyObject](symAddr(lib, "PyExc_StandardError")) + PyExc_AssertionError = cast[PPPyObject](symAddr(lib, "PyExc_AssertionError")) + PyExc_EnvironmentError = cast[PPPyObject](symAddr(lib, "PyExc_EnvironmentError")) + PyExc_IndentationError = cast[PPPyObject](symAddr(lib, "PyExc_IndentationError")) + PyExc_MemoryErrorInst = cast[PPPyObject](symAddr(lib, "PyExc_MemoryErrorInst")) + PyExc_NotImplementedError = cast[PPPyObject](symAddr(lib, "PyExc_NotImplementedError")) + PyExc_OSError = cast[PPPyObject](symAddr(lib, "PyExc_OSError")) + PyExc_TabError = cast[PPPyObject](symAddr(lib, "PyExc_TabError")) + PyExc_UnboundLocalError = cast[PPPyObject](symAddr(lib, "PyExc_UnboundLocalError")) + PyExc_UnicodeError = cast[PPPyObject](symAddr(lib, "PyExc_UnicodeError")) + PyExc_Warning = cast[PPPyObject](symAddr(lib, "PyExc_Warning")) + PyExc_DeprecationWarning = cast[PPPyObject](symAddr(lib, "PyExc_DeprecationWarning")) + PyExc_RuntimeWarning = cast[PPPyObject](symAddr(lib, "PyExc_RuntimeWarning")) + PyExc_SyntaxWarning = cast[PPPyObject](symAddr(lib, "PyExc_SyntaxWarning")) + PyExc_UserWarning = cast[PPPyObject](symAddr(lib, "PyExc_UserWarning")) + PyExc_OverflowWarning = cast[PPPyObject](symAddr(lib, "PyExc_OverflowWarning")) + PyExc_ReferenceError = cast[PPPyObject](symAddr(lib, "PyExc_ReferenceError")) + PyExc_StopIteration = cast[PPPyObject](symAddr(lib, "PyExc_StopIteration")) + PyExc_FutureWarning = cast[PPPyObject](symAddr(lib, "PyExc_FutureWarning")) + PyExc_PendingDeprecationWarning = cast[PPPyObject](symAddr(lib, + "PyExc_PendingDeprecationWarning")) + PyExc_UnicodeDecodeError = cast[PPPyObject](symAddr(lib, "PyExc_UnicodeDecodeError")) + PyExc_UnicodeEncodeError = cast[PPPyObject](symAddr(lib, "PyExc_UnicodeEncodeError")) + PyExc_UnicodeTranslateError = cast[PPPyObject](symAddr(lib, "PyExc_UnicodeTranslateError")) + PyType_Type = cast[PPyTypeObject](symAddr(lib, "PyType_Type")) + PyCFunction_Type = cast[PPyTypeObject](symAddr(lib, "PyCFunction_Type")) + PyCObject_Type = cast[PPyTypeObject](symAddr(lib, "PyCObject_Type")) + PyClass_Type = cast[PPyTypeObject](symAddr(lib, "PyClass_Type")) + PyCode_Type = cast[PPyTypeObject](symAddr(lib, "PyCode_Type")) + PyComplex_Type = cast[PPyTypeObject](symAddr(lib, "PyComplex_Type")) + PyDict_Type = cast[PPyTypeObject](symAddr(lib, "PyDict_Type")) + PyFile_Type = cast[PPyTypeObject](symAddr(lib, "PyFile_Type")) + PyFloat_Type = cast[PPyTypeObject](symAddr(lib, "PyFloat_Type")) + PyFrame_Type = cast[PPyTypeObject](symAddr(lib, "PyFrame_Type")) + PyFunction_Type = cast[PPyTypeObject](symAddr(lib, "PyFunction_Type")) + PyInstance_Type = cast[PPyTypeObject](symAddr(lib, "PyInstance_Type")) + PyInt_Type = cast[PPyTypeObject](symAddr(lib, "PyInt_Type")) + PyList_Type = cast[PPyTypeObject](symAddr(lib, "PyList_Type")) + PyLong_Type = cast[PPyTypeObject](symAddr(lib, "PyLong_Type")) + PyMethod_Type = cast[PPyTypeObject](symAddr(lib, "PyMethod_Type")) + PyModule_Type = cast[PPyTypeObject](symAddr(lib, "PyModule_Type")) + PyObject_Type = cast[PPyTypeObject](symAddr(lib, "PyObject_Type")) + PyRange_Type = cast[PPyTypeObject](symAddr(lib, "PyRange_Type")) + PySlice_Type = cast[PPyTypeObject](symAddr(lib, "PySlice_Type")) + PyString_Type = cast[PPyTypeObject](symAddr(lib, "PyString_Type")) + PyTuple_Type = cast[PPyTypeObject](symAddr(lib, "PyTuple_Type")) + PyUnicode_Type = cast[PPyTypeObject](symAddr(lib, "PyUnicode_Type")) + PyBaseObject_Type = cast[PPyTypeObject](symAddr(lib, "PyBaseObject_Type")) + PyBuffer_Type = cast[PPyTypeObject](symAddr(lib, "PyBuffer_Type")) + PyCallIter_Type = cast[PPyTypeObject](symAddr(lib, "PyCallIter_Type")) + PyCell_Type = cast[PPyTypeObject](symAddr(lib, "PyCell_Type")) + PyClassMethod_Type = cast[PPyTypeObject](symAddr(lib, "PyClassMethod_Type")) + PyProperty_Type = cast[PPyTypeObject](symAddr(lib, "PyProperty_Type")) + PySeqIter_Type = cast[PPyTypeObject](symAddr(lib, "PySeqIter_Type")) + PyStaticMethod_Type = cast[PPyTypeObject](symAddr(lib, "PyStaticMethod_Type")) + PySuper_Type = cast[PPyTypeObject](symAddr(lib, "PySuper_Type")) + PySymtableEntry_Type = cast[PPyTypeObject](symAddr(lib, "PySymtableEntry_Type")) + PyTraceBack_Type = cast[PPyTypeObject](symAddr(lib, "PyTraceBack_Type")) + PyWrapperDescr_Type = cast[PPyTypeObject](symAddr(lib, "PyWrapperDescr_Type")) + PyBaseString_Type = cast[PPyTypeObject](symAddr(lib, "PyBaseString_Type")) + PyBool_Type = cast[PPyTypeObject](symAddr(lib, "PyBool_Type")) + PyEnum_Type = cast[PPyTypeObject](symAddr(lib, "PyEnum_Type")) + +# Unfortunately we have to duplicate the loading mechanism here, because Nimrod +# does not support variables from dynamic libraries. Well designed API's don't +# require this anyway. Python is an exception. + +var + lib: TLibHandle + +when defined(windows): + const + LibNames = ["python26.dll", "python25.dll", + "python24.dll", "python23.dll", "python22.dll", "python21.dll", + "python20.dll", "python16.dll", "python15.dll"] +elif defined(macosx): + const + LibNames = ["libpython2.6.dylib", "libpython2.5.dylib", + "libpython2.4.dylib", "libpython2.3.dylib", "libpython2.2.dylib", + "libpython2.1.dylib", "libpython2.0.dylib", + "libpython1.6.dylib", "libpython1.5.dylib"] +else: + const + LibNames = ["libpython2.6.so" & dllver, + "libpython2.5.so" & dllver, + "libpython2.4.so" & dllver, + "libpython2.3.so" & dllver, + "libpython2.2.so" & dllver, + "libpython2.1.so" & dllver, + "libpython2.0.so" & dllver, + "libpython1.6.so" & dllver, + "libpython1.5.so" & dllver] + +for libName in items(libNames): + lib = loadLib(libName) + if lib != nil: break + +if lib == nil: quit("could not load python library") +init(lib) + diff --git a/lib/oldwrappers/sdl/sdl.nim b/lib/oldwrappers/sdl/sdl.nim new file mode 100644 index 000000000..7d2b6ba26 --- /dev/null +++ b/lib/oldwrappers/sdl/sdl.nim @@ -0,0 +1,2522 @@ + +#****************************************************************************** +# +# JEDI-SDL : Pascal units for SDL - Simple DirectMedia Layer +# Conversion of the Simple DirectMedia Layer Headers +# +# Portions created by Sam Lantinga <slouken@devolution.com> are +# Copyright (C) 1997-2004 Sam Lantinga +# 5635-34 Springhouse Dr. +# Pleasanton, CA 94588 (USA) +# +# All Rights Reserved. +# +# The original files are : SDL.h +# SDL_main.h +# SDL_types.h +# SDL_rwops.h +# SDL_timer.h +# SDL_audio.h +# SDL_cdrom.h +# SDL_joystick.h +# SDL_mouse.h +# SDL_keyboard.h +# SDL_events.h +# SDL_video.h +# SDL_byteorder.h +# SDL_version.h +# SDL_active.h +# SDL_thread.h +# SDL_mutex .h +# SDL_getenv.h +# SDL_loadso.h +# +# The initial developer of this Pascal code was : +# Dominique Louis <Dominique@SavageSoftware.com.au> +# +# Portions created by Dominique Louis are +# Copyright (C) 2000 - 2004 Dominique Louis. +# +# +# Contributor(s) +# -------------- +# Tom Jones <tigertomjones@gmx.de> His Project inspired this conversion +# Matthias Thoma <ma.thoma@gmx.de> +# +# Obtained through: +# Joint Endeavour of Delphi Innovators ( Project JEDI ) +# +# You may retrieve the latest version of this file at the Project +# JEDI home page, located at http://delphi-jedi.org +# +# The contents of this file are used with permission, subject to +# the Mozilla Public License Version 1.1 (the "License"); you may +# not use this file except in compliance with the License. You may +# obtain a copy of the License at +# http://www.mozilla.org/MPL/MPL-1.1.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# Description +# ----------- +# +# +# +# +# +# +# +# Requires +# -------- +# The SDL Runtime libraris on Win32 : SDL.dll on Linux : libSDL.so +# They are available from... +# http://www.libsdl.org . +# +# Programming Notes +# ----------------- +# +# +# +# +# Revision History +# ---------------- +# May 08 2001 - DL : Added Keyboard State Array ( See demos for how to +# use ) +# PKeyStateArr = ^TKeyStateArr; +# TKeyStateArr = array[0..65000] of UInt8; +# As most games will need it. +# +# April 02 2001 - DL : Added SDL_getenv.h definitions and tested version +# 1.2.0 compatability. +# +# March 13 2001 - MT : Added Linux compatibility. +# +# March 10 2001 - MT : Added externalsyms for DEFINES +# Changed the license header +# +# March 09 2001 - MT : Added Kylix Ifdefs/Deleted the uses mmsystem +# +# March 01 2001 - DL : Update conversion of version 1.1.8 +# +# July 22 2001 - DL : Added TUInt8Array and PUIntArray after suggestions +# from Matthias Thoma and Eric Grange. +# +# October 12 2001 - DL : Various changes as suggested by Matthias Thoma and +# David Acklam +# +# October 24 2001 - DL : Added FreePascal support as per suggestions from +# Dean Ellis. +# +# October 27 2001 - DL : Added SDL_BUTTON macro +# +# November 08 2001 - DL : Bug fix as pointed out by Puthoon. +# +# November 29 2001 - DL : Bug fix of SDL_SetGammaRamp as pointed out by Simon +# Rushton. +# +# November 30 2001 - DL : SDL_NOFRAME added as pointed out by Simon Rushton. +# +# December 11 2001 - DL : Added $WEAKPACKAGEUNIT ON to facilitate useage in +# Components +# +# January 05 2002 - DL : Added SDL_Swap32 function as suggested by Matthias +# Thoma and also made sure the _getenv from +# MSVCRT.DLL uses the right calling convention +# +# January 25 2002 - DL : Updated conversion of SDL_AddTimer & +# SDL_RemoveTimer as per suggestions from Matthias +# Thoma. +# +# January 27 2002 - DL : Commented out exported function putenv and getenv +# So that developers get used to using SDL_putenv +# SDL_getenv, as they are more portable +# +# March 05 2002 - DL : Added FreeAnNil procedure for Delphi 4 users. +# +# October 23 2002 - DL : Added Delphi 3 Define of Win32. +# If you intend to you Delphi 3... +# ( which is officially unsupported ) make sure you +# remove references to $EXTERNALSYM in this and other +# SDL files. +# +# November 29 2002 - DL : Fixed bug in Declaration of SDL_GetRGBA that was +# pointed out by Todd Lang +# +# April 03 2003 - DL : Added jedi-sdl.inc include file to support more +# Pascal compilers. Initial support is now included +# for GnuPascal, VirtualPascal, TMT and obviously +# continue support for Delphi Kylix and FreePascal. +# +# April 08 2003 - MK : Aka Mr Kroket - Added Better FPC support +# +# April 24 2003 - DL : under instruction from Alexey Barkovoy, I have added +# better TMT Pascal support and under instruction +# from Prof. Abimbola Olowofoyeku (The African Chief), +# I have added better Gnu Pascal support +# +# April 30 2003 - DL : under instruction from David Mears AKA +# Jason Siletto, I have added FPC Linux support. +# This was compiled with fpc 1.1, so remember to set +# include file path. ie. -Fi/usr/share/fpcsrc/rtl/* +# +# +# +# Revision 1.31 2007/05/29 21:30:48 savage +# Changes as suggested by Almindor for 64bit compatibility. +# +# Revision 1.30 2007/05/29 19:31:03 savage +# Fix to TSDL_Overlay structure - thanks David Pethes (aka imcold) +# +# Revision 1.29 2007/05/20 20:29:11 savage +# Initial Changes to Handle 64 Bits +# +# Revision 1.26 2007/02/11 13:38:04 savage +# Added Nintendo DS support - Thanks Dean. +# +# Revision 1.25 2006/12/02 00:12:52 savage +# Updated to latest version +# +# Revision 1.24 2006/05/18 21:10:04 savage +# Added 1.2.10 Changes +# +# Revision 1.23 2005/12/04 23:17:52 drellis +# Added declaration of SInt8 and PSInt8 +# +# Revision 1.22 2005/05/24 21:59:03 savage +# Re-arranged uses clause to work on Win32 and Linux, Thanks again Michalis. +# +# Revision 1.21 2005/05/22 18:42:31 savage +# Changes as suggested by Michalis Kamburelis. Thanks again. +# +# Revision 1.20 2005/04/10 11:48:33 savage +# Changes as suggested by Michalis, thanks. +# +# Revision 1.19 2005/01/05 01:47:06 savage +# Changed LibName to reflect what MacOS X should have. ie libSDL*-1.2.0.dylib respectively. +# +# Revision 1.18 2005/01/04 23:14:41 savage +# Changed LibName to reflect what most Linux distros will have. ie libSDL*-1.2.so.0 respectively. +# +# Revision 1.17 2005/01/03 18:40:59 savage +# Updated Version number to reflect latest one +# +# Revision 1.16 2005/01/01 02:02:06 savage +# Updated to v1.2.8 +# +# Revision 1.15 2004/12/24 18:57:11 savage +# forgot to apply Michalis Kamburelis' patch to the implementation section. now fixed +# +# Revision 1.14 2004/12/23 23:42:18 savage +# Applied Patches supplied by Michalis Kamburelis ( THANKS! ), for greater FreePascal compatability. +# +# Revision 1.13 2004/09/30 22:31:59 savage +# Updated with slightly different header comments +# +# Revision 1.12 2004/09/12 21:52:58 savage +# Slight changes to fix some issues with the sdl classes. +# +# Revision 1.11 2004/08/14 22:54:30 savage +# Updated so that Library name defines are correctly defined for MacOS X. +# +# Revision 1.10 2004/07/20 23:57:33 savage +# Thanks to Paul Toth for spotting an error in the SDL Audio Convertion structures. +# In TSDL_AudioCVT the filters variable should point to and array of pointers and not what I had there previously. +# +# Revision 1.9 2004/07/03 22:07:22 savage +# Added Bitwise Manipulation Functions for TSDL_VideoInfo struct. +# +# Revision 1.8 2004/05/10 14:10:03 savage +# Initial MacOS X support. Fixed defines for MACOS ( Classic ) and DARWIN ( MacOS X ). +# +# Revision 1.7 2004/04/13 09:32:08 savage +# Changed Shared object names back to just the .so extension to avoid conflicts on various Linux/Unix distros. Therefore developers will need to create Symbolic links to the actual Share Objects if necessary. +# +# Revision 1.6 2004/04/01 20:53:23 savage +# Changed Linux Shared Object names so they reflect the Symbolic Links that are created when installing the RPMs from the SDL site. +# +# Revision 1.5 2004/02/22 15:32:10 savage +# SDL_GetEnv Fix so it also works on FPC/Linux. Thanks to Rodrigo for pointing this out. +# +# Revision 1.4 2004/02/21 23:24:29 savage +# SDL_GetEnv Fix so that it is not define twice for FPC. Thanks to Rene Hugentobler for pointing out this bug, +# +# Revision 1.3 2004/02/18 22:35:51 savage +# Brought sdl.pas up to 1.2.7 compatability +# Thus... +# Added SDL_GL_STEREO, +# SDL_GL_MULTISAMPLEBUFFERS, +# SDL_GL_MULTISAMPLESAMPLES +# +# Add DLL/Shared object functions +# function SDL_LoadObject( const sofile : PChar ) : Pointer; +# +# function SDL_LoadFunction( handle : Pointer; const name : PChar ) : Pointer; +# +# procedure SDL_UnloadObject( handle : Pointer ); +# +# Added function to create RWops from const memory: SDL_RWFromConstMem() +# function SDL_RWFromConstMem(const mem: Pointer; size: Integer) : PSDL_RWops; +# +# Ported SDL_cpuinfo.h so Now you can test for Specific CPU types. +# +# Revision 1.2 2004/02/17 21:37:12 savage +# Tidying up of units +# +# Revision 1.1 2004/02/05 00:08:20 savage +# Module 1.0 release +# +# + +{.deadCodeElim: on.} + +when defined(windows): + const SDLLibName = "SDL.dll" +elif defined(macosx): + const SDLLibName = "libSDL-1.2.0.dylib" +else: + const SDLLibName = "libSDL.so" + +const + SDL_MAJOR_VERSION* = 1'i8 + SDL_MINOR_VERSION* = 2'i8 + SDL_PATCHLEVEL* = 11'i8 # SDL.h constants + SDL_INIT_TIMER* = 0x00000001 + SDL_INIT_AUDIO* = 0x00000010 + SDL_INIT_VIDEO* = 0x00000020 + SDL_INIT_CDROM* = 0x00000100 + SDL_INIT_JOYSTICK* = 0x00000200 + SDL_INIT_NOPARACHUTE* = 0x00100000 # Don't catch fatal signals + SDL_INIT_EVENTTHREAD* = 0x01000000 # Not supported on all OS's + SDL_INIT_EVERYTHING* = 0x0000FFFF # SDL_error.h constants + ERR_MAX_STRLEN* = 128 + ERR_MAX_ARGS* = 5 # SDL_types.h constants + SDL_PRESSED* = 0x00000001 + SDL_RELEASED* = 0x00000000 # SDL_timer.h constants + # This is the OS scheduler timeslice, in milliseconds + SDL_TIMESLICE* = 10 # This is the maximum resolution of the SDL timer on all platforms + TIMER_RESOLUTION* = 10 # Experimentally determined + # SDL_audio.h constants + AUDIO_U8* = 0x00000008 # Unsigned 8-bit samples + AUDIO_S8* = 0x00008008 # Signed 8-bit samples + AUDIO_U16LSB* = 0x00000010 # Unsigned 16-bit samples + AUDIO_S16LSB* = 0x00008010 # Signed 16-bit samples + AUDIO_U16MSB* = 0x00001010 # As above, but big-endian byte order + AUDIO_S16MSB* = 0x00009010 # As above, but big-endian byte order + AUDIO_U16* = AUDIO_U16LSB + AUDIO_S16* = AUDIO_S16LSB # SDL_cdrom.h constants + # The maximum number of CD-ROM tracks on a disk + SDL_MAX_TRACKS* = 99 # The types of CD-ROM track possible + SDL_AUDIO_TRACK* = 0x00000000 + SDL_DATA_TRACK* = 0x00000004 # Conversion functions from frames to Minute/Second/Frames and vice versa + CD_FPS* = 75 # SDL_byteorder.h constants + # The two types of endianness + SDL_LIL_ENDIAN* = 1234 + SDL_BIG_ENDIAN* = 4321 + +when cpuEndian == littleEndian: + const + SDL_BYTEORDER* = SDL_LIL_ENDIAN # Native audio byte ordering + AUDIO_U16SYS* = AUDIO_U16LSB + AUDIO_S16SYS* = AUDIO_S16LSB +else: + const + SDL_BYTEORDER* = SDL_BIG_ENDIAN # Native audio byte ordering + AUDIO_U16SYS* = AUDIO_U16MSB + AUDIO_S16SYS* = AUDIO_S16MSB +const + SDL_MIX_MAXVOLUME* = 128 # SDL_joystick.h constants + MAX_JOYSTICKS* = 2 # only 2 are supported in the multimedia API + MAX_AXES* = 6 # each joystick can have up to 6 axes + MAX_BUTTONS* = 32 # and 32 buttons + AXIS_MIN* = - 32768 # minimum value for axis coordinate + AXIS_MAX* = 32767 # maximum value for axis coordinate + JOY_AXIS_THRESHOLD* = (toFloat((AXIS_MAX) - (AXIS_MIN)) / 100.0) # 1% motion + SDL_HAT_CENTERED* = 0x00000000 + SDL_HAT_UP* = 0x00000001 + SDL_HAT_RIGHT* = 0x00000002 + SDL_HAT_DOWN* = 0x00000004 + SDL_HAT_LEFT* = 0x00000008 + SDL_HAT_RIGHTUP* = SDL_HAT_RIGHT or SDL_HAT_UP + SDL_HAT_RIGHTDOWN* = SDL_HAT_RIGHT or SDL_HAT_DOWN + SDL_HAT_LEFTUP* = SDL_HAT_LEFT or SDL_HAT_UP + SDL_HAT_LEFTDOWN* = SDL_HAT_LEFT or SDL_HAT_DOWN # SDL_events.h constants + +type + TSDL_EventKind* = enum # kind of an SDL event + SDL_NOEVENT = 0, # Unused (do not remove) + SDL_ACTIVEEVENT = 1, # Application loses/gains visibility + SDL_KEYDOWN = 2, # Keys pressed + SDL_KEYUP = 3, # Keys released + SDL_MOUSEMOTION = 4, # Mouse moved + SDL_MOUSEBUTTONDOWN = 5, # Mouse button pressed + SDL_MOUSEBUTTONUP = 6, # Mouse button released + SDL_JOYAXISMOTION = 7, # Joystick axis motion + SDL_JOYBALLMOTION = 8, # Joystick trackball motion + SDL_JOYHATMOTION = 9, # Joystick hat position change + SDL_JOYBUTTONDOWN = 10, # Joystick button pressed + SDL_JOYBUTTONUP = 11, # Joystick button released + SDL_QUITEV = 12, # User-requested quit ( Changed due to procedure conflict ) + SDL_SYSWMEVENT = 13, # System specific event + SDL_EVENT_RESERVEDA = 14, # Reserved for future use.. + SDL_EVENT_RESERVED = 15, # Reserved for future use.. + SDL_VIDEORESIZE = 16, # User resized video mode + SDL_VIDEOEXPOSE = 17, # Screen needs to be redrawn + SDL_EVENT_RESERVED2 = 18, # Reserved for future use.. + SDL_EVENT_RESERVED3 = 19, # Reserved for future use.. + SDL_EVENT_RESERVED4 = 20, # Reserved for future use.. + SDL_EVENT_RESERVED5 = 21, # Reserved for future use.. + SDL_EVENT_RESERVED6 = 22, # Reserved for future use.. + SDL_EVENT_RESERVED7 = 23, # Reserved for future use.. + # Events SDL_USEREVENT through SDL_MAXEVENTS-1 are for your use + SDL_USEREVENT = 24 # This last event is only for bounding internal arrays + # It is the number of bits in the event mask datatype -- UInt32 + +const + SDL_NUMEVENTS* = 32 + SDL_ALLEVENTS* = 0xFFFFFFFF + SDL_ACTIVEEVENTMASK* = 1 shl ord(SDL_ACTIVEEVENT) + SDL_KEYDOWNMASK* = 1 shl ord(SDL_KEYDOWN) + SDL_KEYUPMASK* = 1 shl ord(SDL_KEYUP) + SDL_MOUSEMOTIONMASK* = 1 shl ord(SDL_MOUSEMOTION) + SDL_MOUSEBUTTONDOWNMASK* = 1 shl ord(SDL_MOUSEBUTTONDOWN) + SDL_MOUSEBUTTONUPMASK* = 1 shl ord(SDL_MOUSEBUTTONUP) + SDL_MOUSEEVENTMASK* = 1 shl ord(SDL_MOUSEMOTION) or 1 shl ord(SDL_MOUSEBUTTONDOWN) or + 1 shl ord(SDL_MOUSEBUTTONUP) + SDL_JOYAXISMOTIONMASK* = 1 shl ord(SDL_JOYAXISMOTION) + SDL_JOYBALLMOTIONMASK* = 1 shl ord(SDL_JOYBALLMOTION) + SDL_JOYHATMOTIONMASK* = 1 shl ord(SDL_JOYHATMOTION) + SDL_JOYBUTTONDOWNMASK* = 1 shl ord(SDL_JOYBUTTONDOWN) + SDL_JOYBUTTONUPMASK* = 1 shl ord(SDL_JOYBUTTONUP) + SDL_JOYEVENTMASK* = 1 shl ord(SDL_JOYAXISMOTION) or 1 shl ord(SDL_JOYBALLMOTION) or + 1 shl ord(SDL_JOYHATMOTION) or 1 shl ord(SDL_JOYBUTTONDOWN) or + 1 shl ord(SDL_JOYBUTTONUP) + SDL_VIDEORESIZEMASK* = 1 shl ord(SDL_VIDEORESIZE) + SDL_QUITMASK* = 1 shl ord(SDL_QUITEV) + SDL_SYSWMEVENTMASK* = 1 shl ord(SDL_SYSWMEVENT) + SDL_QUERY* = - 1 + SDL_IGNORE* = 0 + SDL_DISABLE* = 0 + SDL_ENABLE* = 1 #SDL_keyboard.h constants + # This is the mask which refers to all hotkey bindings + SDL_ALL_HOTKEYS* = 0xFFFFFFFF # Enable/Disable keyboard repeat. Keyboard repeat defaults to off. + # 'delay' is the initial delay in ms between the time when a key is + # pressed, and keyboard repeat begins. + # 'interval' is the time in ms between keyboard repeat events. + SDL_DEFAULT_REPEAT_DELAY* = 500 + SDL_DEFAULT_REPEAT_INTERVAL* = 30 # The keyboard syms have been cleverly chosen to map to ASCII + SDLK_UNKNOWN* = 0 + SDLK_FIRST* = 0 + SDLK_BACKSPACE* = 8 + SDLK_TAB* = 9 + SDLK_CLEAR* = 12 + SDLK_RETURN* = 13 + SDLK_PAUSE* = 19 + SDLK_ESCAPE* = 27 + SDLK_SPACE* = 32 + SDLK_EXCLAIM* = 33 + SDLK_QUOTEDBL* = 34 + SDLK_HASH* = 35 + SDLK_DOLLAR* = 36 + SDLK_AMPERSAND* = 38 + SDLK_QUOTE* = 39 + SDLK_LEFTPAREN* = 40 + SDLK_RIGHTPAREN* = 41 + SDLK_ASTERISK* = 42 + SDLK_PLUS* = 43 + SDLK_COMMA* = 44 + SDLK_MINUS* = 45 + SDLK_PERIOD* = 46 + SDLK_SLASH* = 47 + SDLK_0* = 48 + SDLK_1* = 49 + SDLK_2* = 50 + SDLK_3* = 51 + SDLK_4* = 52 + SDLK_5* = 53 + SDLK_6* = 54 + SDLK_7* = 55 + SDLK_8* = 56 + SDLK_9* = 57 + SDLK_COLON* = 58 + SDLK_SEMICOLON* = 59 + SDLK_LESS* = 60 + SDLK_EQUALS* = 61 + SDLK_GREATER* = 62 + SDLK_QUESTION* = 63 + SDLK_AT* = 64 # Skip uppercase letters + SDLK_LEFTBRACKET* = 91 + SDLK_BACKSLASH* = 92 + SDLK_RIGHTBRACKET* = 93 + SDLK_CARET* = 94 + SDLK_UNDERSCORE* = 95 + SDLK_BACKQUOTE* = 96 + SDLK_a* = 97 + SDLK_b* = 98 + SDLK_c* = 99 + SDLK_d* = 100 + SDLK_e* = 101 + SDLK_f* = 102 + SDLK_g* = 103 + SDLK_h* = 104 + SDLK_i* = 105 + SDLK_j* = 106 + SDLK_k* = 107 + SDLK_l* = 108 + SDLK_m* = 109 + SDLK_n* = 110 + SDLK_o* = 111 + SDLK_p* = 112 + SDLK_q* = 113 + SDLK_r* = 114 + SDLK_s* = 115 + SDLK_t* = 116 + SDLK_u* = 117 + SDLK_v* = 118 + SDLK_w* = 119 + SDLK_x* = 120 + SDLK_y* = 121 + SDLK_z* = 122 + SDLK_DELETE* = 127 # End of ASCII mapped keysyms + # International keyboard syms + SDLK_WORLD_0* = 160 # 0xA0 + SDLK_WORLD_1* = 161 + SDLK_WORLD_2* = 162 + SDLK_WORLD_3* = 163 + SDLK_WORLD_4* = 164 + SDLK_WORLD_5* = 165 + SDLK_WORLD_6* = 166 + SDLK_WORLD_7* = 167 + SDLK_WORLD_8* = 168 + SDLK_WORLD_9* = 169 + SDLK_WORLD_10* = 170 + SDLK_WORLD_11* = 171 + SDLK_WORLD_12* = 172 + SDLK_WORLD_13* = 173 + SDLK_WORLD_14* = 174 + SDLK_WORLD_15* = 175 + SDLK_WORLD_16* = 176 + SDLK_WORLD_17* = 177 + SDLK_WORLD_18* = 178 + SDLK_WORLD_19* = 179 + SDLK_WORLD_20* = 180 + SDLK_WORLD_21* = 181 + SDLK_WORLD_22* = 182 + SDLK_WORLD_23* = 183 + SDLK_WORLD_24* = 184 + SDLK_WORLD_25* = 185 + SDLK_WORLD_26* = 186 + SDLK_WORLD_27* = 187 + SDLK_WORLD_28* = 188 + SDLK_WORLD_29* = 189 + SDLK_WORLD_30* = 190 + SDLK_WORLD_31* = 191 + SDLK_WORLD_32* = 192 + SDLK_WORLD_33* = 193 + SDLK_WORLD_34* = 194 + SDLK_WORLD_35* = 195 + SDLK_WORLD_36* = 196 + SDLK_WORLD_37* = 197 + SDLK_WORLD_38* = 198 + SDLK_WORLD_39* = 199 + SDLK_WORLD_40* = 200 + SDLK_WORLD_41* = 201 + SDLK_WORLD_42* = 202 + SDLK_WORLD_43* = 203 + SDLK_WORLD_44* = 204 + SDLK_WORLD_45* = 205 + SDLK_WORLD_46* = 206 + SDLK_WORLD_47* = 207 + SDLK_WORLD_48* = 208 + SDLK_WORLD_49* = 209 + SDLK_WORLD_50* = 210 + SDLK_WORLD_51* = 211 + SDLK_WORLD_52* = 212 + SDLK_WORLD_53* = 213 + SDLK_WORLD_54* = 214 + SDLK_WORLD_55* = 215 + SDLK_WORLD_56* = 216 + SDLK_WORLD_57* = 217 + SDLK_WORLD_58* = 218 + SDLK_WORLD_59* = 219 + SDLK_WORLD_60* = 220 + SDLK_WORLD_61* = 221 + SDLK_WORLD_62* = 222 + SDLK_WORLD_63* = 223 + SDLK_WORLD_64* = 224 + SDLK_WORLD_65* = 225 + SDLK_WORLD_66* = 226 + SDLK_WORLD_67* = 227 + SDLK_WORLD_68* = 228 + SDLK_WORLD_69* = 229 + SDLK_WORLD_70* = 230 + SDLK_WORLD_71* = 231 + SDLK_WORLD_72* = 232 + SDLK_WORLD_73* = 233 + SDLK_WORLD_74* = 234 + SDLK_WORLD_75* = 235 + SDLK_WORLD_76* = 236 + SDLK_WORLD_77* = 237 + SDLK_WORLD_78* = 238 + SDLK_WORLD_79* = 239 + SDLK_WORLD_80* = 240 + SDLK_WORLD_81* = 241 + SDLK_WORLD_82* = 242 + SDLK_WORLD_83* = 243 + SDLK_WORLD_84* = 244 + SDLK_WORLD_85* = 245 + SDLK_WORLD_86* = 246 + SDLK_WORLD_87* = 247 + SDLK_WORLD_88* = 248 + SDLK_WORLD_89* = 249 + SDLK_WORLD_90* = 250 + SDLK_WORLD_91* = 251 + SDLK_WORLD_92* = 252 + SDLK_WORLD_93* = 253 + SDLK_WORLD_94* = 254 + SDLK_WORLD_95* = 255 # 0xFF + # Numeric keypad + SDLK_KP0* = 256 + SDLK_KP1* = 257 + SDLK_KP2* = 258 + SDLK_KP3* = 259 + SDLK_KP4* = 260 + SDLK_KP5* = 261 + SDLK_KP6* = 262 + SDLK_KP7* = 263 + SDLK_KP8* = 264 + SDLK_KP9* = 265 + SDLK_KP_PERIOD* = 266 + SDLK_KP_DIVIDE* = 267 + SDLK_KP_MULTIPLY* = 268 + SDLK_KP_MINUS* = 269 + SDLK_KP_PLUS* = 270 + SDLK_KP_ENTER* = 271 + SDLK_KP_EQUALS* = 272 # Arrows + Home/End pad + SDLK_UP* = 273 + SDLK_DOWN* = 274 + SDLK_RIGHT* = 275 + SDLK_LEFT* = 276 + SDLK_INSERT* = 277 + SDLK_HOME* = 278 + SDLK_END* = 279 + SDLK_PAGEUP* = 280 + SDLK_PAGEDOWN* = 281 # Function keys + SDLK_F1* = 282 + SDLK_F2* = 283 + SDLK_F3* = 284 + SDLK_F4* = 285 + SDLK_F5* = 286 + SDLK_F6* = 287 + SDLK_F7* = 288 + SDLK_F8* = 289 + SDLK_F9* = 290 + SDLK_F10* = 291 + SDLK_F11* = 292 + SDLK_F12* = 293 + SDLK_F13* = 294 + SDLK_F14* = 295 + SDLK_F15* = 296 # Key state modifier keys + SDLK_NUMLOCK* = 300 + SDLK_CAPSLOCK* = 301 + SDLK_SCROLLOCK* = 302 + SDLK_RSHIFT* = 303 + SDLK_LSHIFT* = 304 + SDLK_RCTRL* = 305 + SDLK_LCTRL* = 306 + SDLK_RALT* = 307 + SDLK_LALT* = 308 + SDLK_RMETA* = 309 + SDLK_LMETA* = 310 + SDLK_LSUPER* = 311 # Left "Windows" key + SDLK_RSUPER* = 312 # Right "Windows" key + SDLK_MODE* = 313 # "Alt Gr" key + SDLK_COMPOSE* = 314 # Multi-key compose key + # Miscellaneous function keys + SDLK_HELP* = 315 + SDLK_PRINT* = 316 + SDLK_SYSREQ* = 317 + SDLK_BREAK* = 318 + SDLK_MENU* = 319 + SDLK_POWER* = 320 # Power Macintosh power key + SDLK_EURO* = 321 # Some european keyboards + SDLK_GP2X_UP* = 0 + SDLK_GP2X_UPLEFT* = 1 + SDLK_GP2X_LEFT* = 2 + SDLK_GP2X_DOWNLEFT* = 3 + SDLK_GP2X_DOWN* = 4 + SDLK_GP2X_DOWNRIGHT* = 5 + SDLK_GP2X_RIGHT* = 6 + SDLK_GP2X_UPRIGHT* = 7 + SDLK_GP2X_START* = 8 + SDLK_GP2X_SELECT* = 9 + SDLK_GP2X_L* = 10 + SDLK_GP2X_R* = 11 + SDLK_GP2X_A* = 12 + SDLK_GP2X_B* = 13 + SDLK_GP2X_Y* = 14 + SDLK_GP2X_X* = 15 + SDLK_GP2X_VOLUP* = 16 + SDLK_GP2X_VOLDOWN* = 17 + SDLK_GP2X_CLICK* = 18 + +const # Enumeration of valid key mods (possibly OR'd together) + KMOD_NONE* = 0x00000000 + KMOD_LSHIFT* = 0x00000001 + KMOD_RSHIFT* = 0x00000002 + KMOD_LCTRL* = 0x00000040 + KMOD_RCTRL* = 0x00000080 + KMOD_LALT* = 0x00000100 + KMOD_RALT* = 0x00000200 + KMOD_LMETA* = 0x00000400 + KMOD_RMETA* = 0x00000800 + KMOD_NUM* = 0x00001000 + KMOD_CAPS* = 0x00002000 + KMOD_MODE* = 44000 + KMOD_RESERVED* = 0x00008000 + KMOD_CTRL* = (KMOD_LCTRL or KMOD_RCTRL) + KMOD_SHIFT* = (KMOD_LSHIFT or KMOD_RSHIFT) + KMOD_ALT* = (KMOD_LALT or KMOD_RALT) + KMOD_META* = (KMOD_LMETA or KMOD_RMETA) #SDL_video.h constants + # Transparency definitions: These define alpha as the opacity of a surface */ + SDL_ALPHA_OPAQUE* = 255 + SDL_ALPHA_TRANSPARENT* = 0 # These are the currently supported flags for the SDL_surface + # Available for SDL_CreateRGBSurface() or SDL_SetVideoMode() + SDL_SWSURFACE* = 0x00000000 # Surface is in system memory + SDL_HWSURFACE* = 0x00000001 # Surface is in video memory + SDL_ASYNCBLIT* = 0x00000004 # Use asynchronous blits if possible + # Available for SDL_SetVideoMode() + SDL_ANYFORMAT* = 0x10000000 # Allow any video depth/pixel-format + SDL_HWPALETTE* = 0x20000000 # Surface has exclusive palette + SDL_DOUBLEBUF* = 0x40000000 # Set up double-buffered video mode + SDL_FULLSCREEN* = 0x80000000 # Surface is a full screen display + SDL_OPENGL* = 0x00000002 # Create an OpenGL rendering context + SDL_OPENGLBLIT* = 0x00000002 # Create an OpenGL rendering context + SDL_RESIZABLE* = 0x00000010 # This video mode may be resized + SDL_NOFRAME* = 0x00000020 # No window caption or edge frame + # Used internally (read-only) + SDL_HWACCEL* = 0x00000100 # Blit uses hardware acceleration + SDL_SRCCOLORKEY* = 0x00001000 # Blit uses a source color key + SDL_RLEACCELOK* = 0x00002000 # Private flag + SDL_RLEACCEL* = 0x00004000 # Colorkey blit is RLE accelerated + SDL_SRCALPHA* = 0x00010000 # Blit uses source alpha blending + SDL_SRCCLIPPING* = 0x00100000 # Blit uses source clipping + SDL_PREALLOC* = 0x01000000 # Surface uses preallocated memory + # The most common video overlay formats. + # For an explanation of these pixel formats, see: + # http://www.webartz.com/fourcc/indexyuv.htm + # + # For information on the relationship between color spaces, see: + # + # http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html + SDL_YV12_OVERLAY* = 0x32315659 # Planar mode: Y + V + U (3 planes) + SDL_IYUV_OVERLAY* = 0x56555949 # Planar mode: Y + U + V (3 planes) + SDL_YUY2_OVERLAY* = 0x32595559 # Packed mode: Y0+U0+Y1+V0 (1 plane) + SDL_UYVY_OVERLAY* = 0x59565955 # Packed mode: U0+Y0+V0+Y1 (1 plane) + SDL_YVYU_OVERLAY* = 0x55595659 # Packed mode: Y0+V0+Y1+U0 (1 plane) + # flags for SDL_SetPalette() + SDL_LOGPAL* = 0x00000001 + SDL_PHYSPAL* = 0x00000002 #SDL_mouse.h constants + # Used as a mask when testing buttons in buttonstate + # Button 1: Left mouse button + # Button 2: Middle mouse button + # Button 3: Right mouse button + # Button 4: Mouse Wheel Up + # Button 5: Mouse Wheel Down + # + SDL_BUTTON_LEFT* = 1 + SDL_BUTTON_MIDDLE* = 2 + SDL_BUTTON_RIGHT* = 3 + SDL_BUTTON_WHEELUP* = 4 + SDL_BUTTON_WHEELDOWN* = 5 + SDL_BUTTON_LMASK* = SDL_PRESSED shl (SDL_BUTTON_LEFT - 1) + SDL_BUTTON_MMASK* = SDL_PRESSED shl (SDL_BUTTON_MIDDLE - 1) + SDL_BUTTON_RMask* = SDL_PRESSED shl (SDL_BUTTON_RIGHT - 1) # SDL_active.h constants + # The available application states + SDL_APPMOUSEFOCUS* = 0x00000001 # The app has mouse coverage + SDL_APPINPUTFOCUS* = 0x00000002 # The app has input focus + SDL_APPACTIVE* = 0x00000004 # The application is active + # SDL_mutex.h constants + # Synchronization functions which can time out return this value + # they time out. + SDL_MUTEX_TIMEDOUT* = 1 # This is the timeout value which corresponds to never time out + SDL_MUTEX_MAXWAIT* = not int(0) + SDL_GRAB_QUERY* = - 1 + SDL_GRAB_OFF* = 0 + SDL_GRAB_ON* = 1 #SDL_GRAB_FULLSCREEN // Used internally + +type + THandle* = int #SDL_types.h types + # Basic data types + TSDL_Bool* = enum + SDL_FALSE, SDL_TRUE + PUInt8Array* = ptr TUInt8Array + PUInt8* = ptr UInt8 + PPUInt8* = ptr PUInt8 + UInt8* = int8 + TUInt8Array* = array[0..high(int) shr 1, UInt8] + PUInt16* = ptr UInt16 + UInt16* = int16 + PSInt8* = ptr SInt8 + SInt8* = int8 + PSInt16* = ptr SInt16 + SInt16* = int16 + PUInt32* = ptr UInt32 + UInt32* = int + SInt32* = int + PInt* = ptr int + PShortInt* = ptr int8 + PUInt64* = ptr UInt64 + UInt64*{.final.} = object + hi*: UInt32 + lo*: UInt32 + + PSInt64* = ptr SInt64 + SInt64*{.final.} = object + hi*: UInt32 + lo*: UInt32 + + TSDL_GrabMode* = int # SDL_error.h types + TSDL_errorcode* = enum + SDL_ENOMEM, SDL_EFREAD, SDL_EFWRITE, SDL_EFSEEK, SDL_LASTERROR + SDL_errorcode* = TSDL_errorcode + TArg*{.final.} = object + buf*: array[0..ERR_MAX_STRLEN - 1, int8] + + PSDL_error* = ptr TSDL_error + TSDL_error*{.final.} = object # This is a numeric value corresponding to the current error + # SDL_rwops.h types + # This is the read/write operation structure -- very basic + # some helper types to handle the unions + # "packed" is only guessed + error*: int # This is a key used to index into a language hashtable containing + # internationalized versions of the SDL error messages. If the key + # is not in the hashtable, or no hashtable is available, the key is + # used directly as an error message format string. + key*: array[0..ERR_MAX_STRLEN - 1, int8] # These are the arguments for the error functions + argc*: int + args*: array[0..ERR_MAX_ARGS - 1, TArg] + + TStdio*{.final.} = object + autoclose*: int # FILE * is only defined in Kylix so we use a simple Pointer + fp*: Pointer + + TMem*{.final.} = object + base*: PUInt8 + here*: PUInt8 + stop*: PUInt8 + + TUnknown*{.final.} = object # first declare the pointer type + data1*: Pointer + + PSDL_RWops* = ptr TSDL_RWops # now the pointer to function types + TSeek* = proc (context: PSDL_RWops, offset: int, whence: int): int{.cdecl.} + TRead* = proc (context: PSDL_RWops, thePtr: Pointer, size: int, maxnum: int): int{. + cdecl.} + TWrite* = proc (context: PSDL_RWops, thePtr: Pointer, size: int, num: int): int{. + cdecl.} + TClose* = proc (context: PSDL_RWops): int{.cdecl.} # the variant record itself + trange010 = range[0..2] + TSDL_RWops*{.final.} = object + seek*: TSeek + read*: TRead + write*: TWrite + closeFile*: TClose # a keyword as name is not allowed + # be warned! structure alignment may arise at this point + case theType*: trange010 + of trange010(0): + stdio*: TStdio + of trange010(1): + mem*: TMem + of trange010(2): + unknown*: TUnknown + + + SDL_RWops* = TSDL_RWops # SDL_timer.h types + # Function prototype for the timer callback function + TSDL_TimerCallback* = proc (interval: UInt32): UInt32{.cdecl.} # New timer API, supports multiple timers + # Written by Stephane Peter + # <megastep@lokigames.com> + # Function prototype for the new timer callback function. + # The callback function is passed the current timer interval and returns + # the next timer interval. If the returned value is the same as the one + # passed in, the periodic alarm continues, otherwise a new alarm is + # scheduled. If the callback returns 0, the periodic alarm is cancelled. + TSDL_NewTimerCallback* = proc (interval: UInt32, param: Pointer): UInt32{. + cdecl.} # Definition of the timer ID type + PSDL_TimerID* = ptr TSDL_TimerID + TSDL_TimerID*{.final.} = object + interval*: UInt32 + callback*: TSDL_NewTimerCallback + param*: Pointer + last_alarm*: UInt32 + next*: PSDL_TimerID + + TSDL_AudioSpecCallback* = proc (userdata: Pointer, stream: PUInt8, length: int){. + cdecl.} # SDL_audio.h types + # The calculated values in this structure are calculated by SDL_OpenAudio() + PSDL_AudioSpec* = ptr TSDL_AudioSpec + TSDL_AudioSpec*{.final.} = object # A structure to hold a set of audio conversion filters and buffers + freq*: int # DSP frequency -- samples per second + format*: UInt16 # Audio data format + channels*: UInt8 # Number of channels: 1 mono, 2 stereo + silence*: UInt8 # Audio buffer silence value (calculated) + samples*: UInt16 # Audio buffer size in samples + padding*: UInt16 # Necessary for some compile environments + size*: UInt32 # Audio buffer size in bytes (calculated) + # This function is called when the audio device needs more data. + # 'stream' is a pointer to the audio data buffer + # 'len' is the length of that buffer in bytes. + # Once the callback returns, the buffer will no longer be valid. + # Stereo samples are stored in a LRLRLR ordering. + callback*: TSDL_AudioSpecCallback + userdata*: Pointer + + PSDL_AudioCVT* = ptr TSDL_AudioCVT + PSDL_AudioCVTFilter* = ptr TSDL_AudioCVTFilter + TSDL_AudioCVTFilter*{.final.} = object + cvt*: PSDL_AudioCVT + format*: UInt16 + + PSDL_AudioCVTFilterArray* = ptr TSDL_AudioCVTFilterArray + TSDL_AudioCVTFilterArray* = array[0..9, PSDL_AudioCVTFilter] + TSDL_AudioCVT*{.final.} = object + needed*: int # Set to 1 if conversion possible + src_format*: UInt16 # Source audio format + dst_format*: UInt16 # Target audio format + rate_incr*: float64 # Rate conversion increment + buf*: PUInt8 # Buffer to hold entire audio data + length*: int # Length of original audio buffer + len_cvt*: int # Length of converted audio buffer + len_mult*: int # buffer must be len*len_mult big + len_ratio*: float64 # Given len, final size is len*len_ratio + filters*: TSDL_AudioCVTFilterArray + filter_index*: int # Current audio conversion function + + TSDL_Audiostatus* = enum # SDL_cdrom.h types + SDL_AUDIO_STOPPED, SDL_AUDIO_PLAYING, SDL_AUDIO_PAUSED + TSDL_CDStatus* = enum + CD_ERROR, CD_TRAYEMPTY, CD_STOPPED, CD_PLAYING, CD_PAUSED + PSDL_CDTrack* = ptr TSDL_CDTrack + TSDL_CDTrack*{.final.} = object # This structure is only current as of the last call to SDL_CDStatus() + id*: UInt8 # Track number + theType*: UInt8 # Data or audio track + unused*: UInt16 + len*: UInt32 # Length, in frames, of this track + offset*: UInt32 # Offset, in frames, from start of disk + + PSDL_CD* = ptr TSDL_CD + TSDL_CD*{.final.} = object #SDL_joystick.h types + id*: int # Private drive identifier + status*: TSDL_CDStatus # Current drive status + # The rest of this structure is only valid if there's a CD in drive + numtracks*: int # Number of tracks on disk + cur_track*: int # Current track position + cur_frame*: int # Current frame offset within current track + track*: array[0..SDL_MAX_TRACKS, TSDL_CDTrack] + + PTransAxis* = ptr TTransAxis + TTransAxis*{.final.} = object # The private structure used to keep track of a joystick + offset*: int + scale*: float32 + + PJoystick_hwdata* = ptr TJoystick_hwdata + TJoystick_hwdata*{.final.} = object # joystick ID + id*: int # values used to translate device-specific coordinates into SDL-standard ranges + transaxis*: array[0..5, TTransAxis] + + PBallDelta* = ptr TBallDelta + TBallDelta*{.final.} = object # Current ball motion deltas + # The SDL joystick structure + dx*: int + dy*: int + + PSDL_Joystick* = ptr TSDL_Joystick + TSDL_Joystick*{.final.} = object # SDL_verion.h types + index*: UInt8 # Device index + name*: cstring # Joystick name - system dependent + naxes*: int # Number of axis controls on the joystick + axes*: PUInt16 # Current axis states + nhats*: int # Number of hats on the joystick + hats*: PUInt8 # Current hat states + nballs*: int # Number of trackballs on the joystick + balls*: PBallDelta # Current ball motion deltas + nbuttons*: int # Number of buttons on the joystick + buttons*: PUInt8 # Current button states + hwdata*: PJoystick_hwdata # Driver dependent information + ref_count*: int # Reference count for multiple opens + + PSDL_version* = ptr TSDL_version + TSDL_version*{.final.} = object # SDL_keyboard.h types + major*: UInt8 + minor*: UInt8 + patch*: UInt8 + + TSDLKey* = int32 + TSDLMod* = int32 + PSDL_KeySym* = ptr TSDL_KeySym + TSDL_KeySym*{.final.} = object # SDL_events.h types + #Checks the event queue for messages and optionally returns them. + # If 'action' is SDL_ADDEVENT, up to 'numevents' events will be added to + # the back of the event queue. + # If 'action' is SDL_PEEKEVENT, up to 'numevents' events at the front + # of the event queue, matching 'mask', will be returned and will not + # be removed from the queue. + # If 'action' is SDL_GETEVENT, up to 'numevents' events at the front + # of the event queue, matching 'mask', will be returned and will be + # removed from the queue. + # This function returns the number of events actually stored, or -1 + # if there was an error. This function is thread-safe. + scancode*: UInt8 # hardware specific scancode + sym*: TSDLKey # SDL virtual keysym + modifier*: TSDLMod # current key modifiers + unicode*: UInt16 # translated character + + TSDL_EventAction* = enum # Application visibility event structure + SDL_ADDEVENT, SDL_PEEKEVENT, SDL_GETEVENT + TSDL_ActiveEvent*{.final.} = object # SDL_ACTIVEEVENT + # Keyboard event structure + gain*: UInt8 # Whether given states were gained or lost (1/0) + state*: UInt8 # A mask of the focus states + + TSDL_KeyboardEvent*{.final.} = object # SDL_KEYDOWN or SDL_KEYUP + # Mouse motion event structure + which*: UInt8 # The keyboard device index + state*: UInt8 # SDL_PRESSED or SDL_RELEASED + keysym*: TSDL_KeySym + + TSDL_MouseMotionEvent*{.final.} = object # SDL_MOUSEMOTION + # Mouse button event structure + which*: UInt8 # The mouse device index + state*: UInt8 # The current button state + x*, y*: UInt16 # The X/Y coordinates of the mouse + xrel*: SInt16 # The relative motion in the X direction + yrel*: SInt16 # The relative motion in the Y direction + + TSDL_MouseButtonEvent*{.final.} = object # SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP + # Joystick axis motion event structure + which*: UInt8 # The mouse device index + button*: UInt8 # The mouse button index + state*: UInt8 # SDL_PRESSED or SDL_RELEASED + x*: UInt16 # The X coordinates of the mouse at press time + y*: UInt16 # The Y coordinates of the mouse at press time + + TSDL_JoyAxisEvent*{.final.} = object # SDL_JOYAXISMOTION + # Joystick trackball motion event structure + which*: UInt8 # The joystick device index + axis*: UInt8 # The joystick axis index + value*: SInt16 # The axis value (range: -32768 to 32767) + + TSDL_JoyBallEvent*{.final.} = object # SDL_JOYAVBALLMOTION + # Joystick hat position change event structure + which*: UInt8 # The joystick device index + ball*: UInt8 # The joystick trackball index + xrel*: SInt16 # The relative motion in the X direction + yrel*: SInt16 # The relative motion in the Y direction + + TSDL_JoyHatEvent*{.final.} = object # SDL_JOYHATMOTION */ + # Joystick button event structure + which*: UInt8 # The joystick device index */ + hat*: UInt8 # The joystick hat index */ + value*: UInt8 # The hat position value: + # 8 1 2 + # 7 0 3 + # 6 5 4 + # Note that zero means the POV is centered. + + TSDL_JoyButtonEvent*{.final.} = object # SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP + # The "window resized" event + # When you get this event, you are responsible for setting a new video + # mode with the new width and height. + which*: UInt8 # The joystick device index + button*: UInt8 # The joystick button index + state*: UInt8 # SDL_PRESSED or SDL_RELEASED + + TSDL_ResizeEvent*{.final.} = object # SDL_VIDEORESIZE + # A user-defined event type + w*: int # New width + h*: int # New height + + PSDL_UserEvent* = ptr TSDL_UserEvent + TSDL_UserEvent*{.final.} = object # SDL_USEREVENT through SDL_NUMEVENTS-1 + code*: int # User defined event code */ + data1*: Pointer # User defined data pointer */ + data2*: Pointer # User defined data pointer */ + + +when defined(Unix): + type #These are the various supported subsystems under UNIX + TSDL_SysWm* = enum + SDL_SYSWM_X11 +# The windows custom event structure + +when defined(WINDOWS): + type + PSDL_SysWMmsg* = ptr TSDL_SysWMmsg + TSDL_SysWMmsg*{.final.} = object + version*: TSDL_version + hwnd*: THandle # The window for the message + msg*: int # The type of message + w_Param*: int32 # WORD message parameter + lParam*: int32 # LONG message parameter + +elif defined(Unix): + type # The Linux custom event structure + PSDL_SysWMmsg* = ptr TSDL_SysWMmsg + TSDL_SysWMmsg*{.final.} = object + version*: TSDL_version + subsystem*: TSDL_SysWm + when false: + event*: TXEvent +else: + type # The generic custom event structure + PSDL_SysWMmsg* = ptr TSDL_SysWMmsg + TSDL_SysWMmsg*{.final.} = object + version*: TSDL_version + data*: int + +# The Windows custom window manager information structure + +when defined(WINDOWS): + type + PSDL_SysWMinfo* = ptr TSDL_SysWMinfo + TSDL_SysWMinfo*{.final.} = object + version*: TSDL_version + window*: THandle # The display window + +elif defined(Unix): + type + TX11*{.final.} = object + when false: + display*: PDisplay # The X11 display + window*: TWindow # The X11 display window + # These locking functions should be called around + # any X11 functions using the display variable. + # They lock the event thread, so should not be + # called around event functions or from event filters. + lock_func*: Pointer + unlock_func*: Pointer # Introduced in SDL 1.0.2 + fswindow*: TWindow # The X11 fullscreen window + wmwindow*: TWindow # The X11 managed input window + + type + PSDL_SysWMinfo* = ptr TSDL_SysWMinfo + TSDL_SysWMinfo*{.final.} = object + version*: TSDL_version + subsystem*: TSDL_SysWm + X11*: TX11 +else: + type # The generic custom window manager information structure + PSDL_SysWMinfo* = ptr TSDL_SysWMinfo + TSDL_SysWMinfo*{.final.} = object + version*: TSDL_version + data*: int + +type + PSDL_SysWMEvent* = ptr TSDL_SysWMEvent + TSDL_SysWMEvent*{.final.} = object + msg*: PSDL_SysWMmsg + + PSDL_Event* = ptr TSDL_Event + TSDL_Event*{.final.} = object # This function sets up a filter to process all events before they + # change internal state and are posted to the internal event queue. + # + # The filter is protypted as: + case theType*: TSDL_EventKind # SDL_NOEVENT, SDL_QUITEV: (); + of SDL_ACTIVEEVENT: + active*: TSDL_ActiveEvent + of SDL_KEYDOWN, SDL_KEYUP: + key*: TSDL_KeyboardEvent + of SDL_MOUSEMOTION: + motion*: TSDL_MouseMotionEvent + of SDL_MOUSEBUTTONDOWN, SDL_MOUSEBUTTONUP: + button*: TSDL_MouseButtonEvent + of SDL_JOYAXISMOTION: + jaxis*: TSDL_JoyAxisEvent + of SDL_JOYBALLMOTION: + jball*: TSDL_JoyBallEvent + of SDL_JOYHATMOTION: + jhat*: TSDL_JoyHatEvent + of SDL_JOYBUTTONDOWN, SDL_JOYBUTTONUP: + jbutton*: TSDL_JoyButtonEvent + of SDL_VIDEORESIZE: + resize*: TSDL_ResizeEvent + of SDL_USEREVENT: + user*: TSDL_UserEvent + of SDL_SYSWMEVENT: + syswm*: TSDL_SysWMEvent + else: + nil + + TSDL_EventFilter* = proc (event: PSDL_Event): int{.cdecl.} # SDL_video.h types + # Useful data types + PPSDL_Rect* = ptr PSDL_Rect + PSDL_Rect* = ptr TSDL_Rect + TSDL_Rect*{.final.} = object + x*, y*: SInt16 + w*, h*: UInt16 + + SDL_Rect* = TSDL_Rect + PSDL_Color* = ptr TSDL_Color + TSDL_Color*{.final.} = object + r*: UInt8 + g*: UInt8 + b*: UInt8 + unused*: UInt8 + + PSDL_ColorArray* = ptr TSDL_ColorArray + TSDL_ColorArray* = array[0..65000, TSDL_Color] + PSDL_Palette* = ptr TSDL_Palette + TSDL_Palette*{.final.} = object # Everything in the pixel format structure is read-only + ncolors*: int + colors*: PSDL_ColorArray + + PSDL_PixelFormat* = ptr TSDL_PixelFormat + TSDL_PixelFormat*{.final.} = object # The structure passed to the low level blit functions + palette*: PSDL_Palette + BitsPerPixel*: UInt8 + BytesPerPixel*: UInt8 + Rloss*: UInt8 + Gloss*: UInt8 + Bloss*: UInt8 + Aloss*: UInt8 + Rshift*: UInt8 + Gshift*: UInt8 + Bshift*: UInt8 + Ashift*: UInt8 + RMask*: UInt32 + GMask*: UInt32 + BMask*: UInt32 + AMask*: UInt32 + colorkey*: UInt32 # RGB color key information + alpha*: UInt8 # Alpha value information (per-surface alpha) + + PSDL_BlitInfo* = ptr TSDL_BlitInfo + TSDL_BlitInfo*{.final.} = object # typedef for private surface blitting functions + s_pixels*: PUInt8 + s_width*: int + s_height*: int + s_skip*: int + d_pixels*: PUInt8 + d_width*: int + d_height*: int + d_skip*: int + aux_data*: Pointer + src*: PSDL_PixelFormat + table*: PUInt8 + dst*: PSDL_PixelFormat + + PSDL_Surface* = ptr TSDL_Surface + TSDL_Blit* = proc (src: PSDL_Surface, srcrect: PSDL_Rect, dst: PSDL_Surface, + dstrect: PSDL_Rect): int{.cdecl.} + TSDL_Surface*{.final.} = object # Useful for determining the video hardware capabilities + flags*: UInt32 # Read-only + format*: PSDL_PixelFormat # Read-only + w*, h*: int # Read-only + pitch*: UInt16 # Read-only + pixels*: Pointer # Read-write + offset*: int # Private + hwdata*: Pointer #TPrivate_hwdata; Hardware-specific surface info + # clipping information: + clip_rect*: TSDL_Rect # Read-only + unused1*: UInt32 # for binary compatibility + # Allow recursive locks + locked*: UInt32 # Private + # info for fast blit mapping to other surfaces + Blitmap*: Pointer # PSDL_BlitMap; // Private + # format version, bumped at every change to invalidate blit maps + format_version*: int # Private + refcount*: int + + PSDL_VideoInfo* = ptr TSDL_VideoInfo + TSDL_VideoInfo*{.final.} = object # The YUV hardware video overlay + hw_available*: UInt8 # Hardware and WindowManager flags in first 2 bits ( see below ) + #hw_available: 1; // Can you create hardware surfaces + # wm_available: 1; // Can you talk to a window manager? + # UnusedBits1: 6; + blit_hw*: UInt8 # Blit Hardware flags. See below for which bits do what + #UnusedBits2: 1; + # blit_hw: 1; // Flag:UInt32 Accelerated blits HW --> HW + # blit_hw_CC: 1; // Flag:UInt32 Accelerated blits with Colorkey + # blit_hw_A: 1; // Flag:UInt32 Accelerated blits with Alpha + # blit_sw: 1; // Flag:UInt32 Accelerated blits SW --> HW + # blit_sw_CC: 1; // Flag:UInt32 Accelerated blits with Colorkey + # blit_sw_A: 1; // Flag:UInt32 Accelerated blits with Alpha + # blit_fill: 1; // Flag:UInt32 Accelerated color fill + UnusedBits3*: UInt8 # Unused at this point + video_mem*: UInt32 # The total amount of video memory (in K) + vfmt*: PSDL_PixelFormat # Value: The format of the video surface + current_w*: SInt32 # Value: The current video mode width + current_h*: SInt32 # Value: The current video mode height + + PSDL_Overlay* = ptr TSDL_Overlay + TSDL_Overlay*{.final.} = object # Public enumeration for setting the OpenGL window attributes. + format*: UInt32 # Overlay format + w*, h*: int # Width and height of overlay + planes*: int # Number of planes in the overlay. Usually either 1 or 3 + pitches*: PUInt16 # An array of pitches, one for each plane. Pitch is the length of a row in bytes. + pixels*: PPUInt8 # An array of pointers to the data of each plane. The overlay should be locked before these pointers are used. + hw_overlay*: UInt32 # This will be set to 1 if the overlay is hardware accelerated. + + TSDL_GLAttr* = enum + SDL_GL_RED_SIZE, SDL_GL_GREEN_SIZE, SDL_GL_BLUE_SIZE, SDL_GL_ALPHA_SIZE, + SDL_GL_BUFFER_SIZE, SDL_GL_DOUBLEBUFFER, SDL_GL_DEPTH_SIZE, + SDL_GL_STENCIL_SIZE, SDL_GL_ACCUM_RED_SIZE, SDL_GL_ACCUM_GREEN_SIZE, + SDL_GL_ACCUM_BLUE_SIZE, SDL_GL_ACCUM_ALPHA_SIZE, SDL_GL_STEREO, + SDL_GL_MULTISAMPLEBUFFERS, SDL_GL_MULTISAMPLESAMPLES, + SDL_GL_ACCELERATED_VISUAL, SDL_GL_SWAP_CONTROL + PSDL_Cursor* = ptr TSDL_Cursor + TSDL_Cursor*{.final.} = object # SDL_mutex.h types + area*: TSDL_Rect # The area of the mouse cursor + hot_x*, hot_y*: SInt16 # The "tip" of the cursor + data*: PUInt8 # B/W cursor data + mask*: PUInt8 # B/W cursor mask + save*: array[1..2, PUInt8] # Place to save cursor area + wm_cursor*: Pointer # Window-manager cursor + + +type + PSDL_Mutex* = ptr TSDL_Mutex + TSDL_Mutex*{.final.} = object + PSDL_semaphore* = ptr TSDL_semaphore + TSDL_semaphore*{.final.} = object + PSDL_Sem* = ptr TSDL_Sem + TSDL_Sem* = TSDL_Semaphore + PSDL_Cond* = ptr TSDL_Cond + TSDL_Cond*{.final.} = object # SDL_thread.h types + +when defined(WINDOWS): + type + TSYS_ThreadHandle* = THandle +when defined(Unix): + type + TSYS_ThreadHandle* = pointer +type # This is the system-independent thread info structure + PSDL_Thread* = ptr TSDL_Thread + TSDL_Thread*{.final.} = object # Helper Types + # Keyboard State Array ( See demos for how to use ) + threadid*: UInt32 + handle*: TSYS_ThreadHandle + status*: int + errbuf*: TSDL_Error + data*: Pointer + + PKeyStateArr* = ptr TKeyStateArr + TKeyStateArr* = array[0..65000, UInt8] # Types required so we don't need to use Windows.pas + PInteger* = ptr int + PByte* = ptr int8 + PWord* = ptr int16 + PLongWord* = ptr int32 # General arrays + PByteArray* = ptr TByteArray + TByteArray* = array[0..32767, int8] + PWordArray* = ptr TWordArray + TWordArray* = array[0..16383, int16] # Generic procedure pointer + TProcedure* = proc () #------------------------------------------------------------------------------ + # initialization + #------------------------------------------------------------------------------ + # This function loads the SDL dynamically linked library and initializes + # the subsystems specified by 'flags' (and those satisfying dependencies) + # Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup + # signal handlers for some commonly ignored fatal signals (like SIGSEGV) + +proc SDL_Init*(flags: UInt32): int{.cdecl, importc, dynlib: SDLLibName.} + # This function initializes specific SDL subsystems +proc SDL_InitSubSystem*(flags: UInt32): int{.cdecl, importc, dynlib: SDLLibName.} + # This function cleans up specific SDL subsystems +proc SDL_QuitSubSystem*(flags: UInt32){.cdecl, importc, dynlib: SDLLibName.} + # This function returns mask of the specified subsystems which have + # been initialized. + # If 'flags' is 0, it returns a mask of all initialized subsystems. +proc SDL_WasInit*(flags: UInt32): UInt32{.cdecl, importc, dynlib: SDLLibName.} + # This function cleans up all initialized subsystems and unloads the + # dynamically linked library. You should call it upon all exit conditions. +proc SDL_Quit*(){.cdecl, importc, dynlib: SDLLibName.} +when defined(WINDOWS): + # This should be called from your WinMain() function, if any + proc SDL_RegisterApp*(name: cstring, style: UInt32, h_Inst: Pointer): int{. + cdecl, importc, dynlib: SDLLibName.} +#------------------------------------------------------------------------------ +# types +#------------------------------------------------------------------------------ +# The number of elements in a table + +proc SDL_TableSize*(table: cstring): int + #------------------------------------------------------------------------------ + # error-handling + #------------------------------------------------------------------------------ + # Public functions +proc SDL_GetError*(): cstring{.cdecl, importc, dynlib: SDLLibName.} +proc SDL_SetError*(fmt: cstring){.cdecl, importc, dynlib: SDLLibName.} +proc SDL_ClearError*(){.cdecl, importc, dynlib: SDLLibName.} +when not(defined(WINDOWS)): + proc SDL_Error*(Code: TSDL_errorcode){.cdecl, importc, dynlib: SDLLibName.} +# Private error message function - used internally + +proc SDL_OutOfMemory*() + #------------------------------------------------------------------------------ + # io handling + #------------------------------------------------------------------------------ + # Functions to create SDL_RWops structures from various data sources +proc SDL_RWFromFile*(filename, mode: cstring): PSDL_RWops{.cdecl, + importc, dynlib: SDLLibName.} +proc SDL_FreeRW*(area: PSDL_RWops){.cdecl, importc, dynlib: SDLLibName.} + #fp is FILE *fp ??? +proc SDL_RWFromFP*(fp: Pointer, autoclose: int): PSDL_RWops{.cdecl, + importc, dynlib: SDLLibName.} +proc SDL_RWFromMem*(mem: Pointer, size: int): PSDL_RWops{.cdecl, + importc, dynlib: SDLLibName.} +proc SDL_RWFromConstMem*(mem: Pointer, size: int): PSDL_RWops{.cdecl, + importc, dynlib: SDLLibName.} +proc SDL_AllocRW*(): PSDL_RWops{.cdecl, importc, dynlib: SDLLibName.} +proc SDL_RWSeek*(context: PSDL_RWops, offset: int, whence: int): int +proc SDL_RWTell*(context: PSDL_RWops): int +proc SDL_RWRead*(context: PSDL_RWops, theptr: Pointer, size: int, n: int): int +proc SDL_RWWrite*(context: PSDL_RWops, theptr: Pointer, size: int, n: int): int +proc SDL_RWClose*(context: PSDL_RWops): int + #------------------------------------------------------------------------------ + # time-handling + #------------------------------------------------------------------------------ + # Get the number of milliseconds since the SDL library initialization. + # Note that this value wraps if the program runs for more than ~49 days. +proc SDL_GetTicks*(): UInt32{.cdecl, importc, dynlib: SDLLibName.} + # Wait a specified number of milliseconds before returning +proc SDL_Delay*(msec: UInt32){.cdecl, importc, dynlib: SDLLibName.} + # Add a new timer to the pool of timers already running. + # Returns a timer ID, or NULL when an error occurs. +proc SDL_AddTimer*(interval: UInt32, callback: TSDL_NewTimerCallback, + param: Pointer): PSDL_TimerID{.cdecl, importc, dynlib: SDLLibName.} + # Remove one of the multiple timers knowing its ID. + # Returns a boolean value indicating success. +proc SDL_RemoveTimer*(t: PSDL_TimerID): TSDL_Bool{.cdecl, importc, dynlib: SDLLibName.} +proc SDL_SetTimer*(interval: UInt32, callback: TSDL_TimerCallback): int{.cdecl, + importc, dynlib: SDLLibName.} + #------------------------------------------------------------------------------ + # audio-routines + #------------------------------------------------------------------------------ + # These functions are used internally, and should not be used unless you + # have a specific need to specify the audio driver you want to use. + # You should normally use SDL_Init() or SDL_InitSubSystem(). +proc SDL_AudioInit*(driver_name: cstring): int{.cdecl, importc, dynlib: SDLLibName.} +proc SDL_AudioQuit*(){.cdecl, importc, dynlib: SDLLibName.} + # This function fills the given character buffer with the name of the + # current audio driver, and returns a Pointer to it if the audio driver has + # been initialized. It returns NULL if no driver has been initialized. +proc SDL_AudioDriverName*(namebuf: cstring, maxlen: int): cstring{.cdecl, + importc, dynlib: SDLLibName.} + # This function opens the audio device with the desired parameters, and + # returns 0 if successful, placing the actual hardware parameters in the + # structure pointed to by 'obtained'. If 'obtained' is NULL, the audio + # data passed to the callback function will be guaranteed to be in the + # requested format, and will be automatically converted to the hardware + # audio format if necessary. This function returns -1 if it failed + # to open the audio device, or couldn't set up the audio thread. + # + # When filling in the desired audio spec structure, + # 'desired->freq' should be the desired audio frequency in samples-per-second. + # 'desired->format' should be the desired audio format. + # 'desired->samples' is the desired size of the audio buffer, in samples. + # This number should be a power of two, and may be adjusted by the audio + # driver to a value more suitable for the hardware. Good values seem to + # range between 512 and 8096 inclusive, depending on the application and + # CPU speed. Smaller values yield faster response time, but can lead + # to underflow if the application is doing heavy processing and cannot + # fill the audio buffer in time. A stereo sample consists of both right + # and left channels in LR ordering. + # Note that the number of samples is directly related to time by the + # following formula: ms = (samples*1000)/freq + # 'desired->size' is the size in bytes of the audio buffer, and is + # calculated by SDL_OpenAudio(). + # 'desired->silence' is the value used to set the buffer to silence, + # and is calculated by SDL_OpenAudio(). + # 'desired->callback' should be set to a function that will be called + # when the audio device is ready for more data. It is passed a pointer + # to the audio buffer, and the length in bytes of the audio buffer. + # This function usually runs in a separate thread, and so you should + # protect data structures that it accesses by calling SDL_LockAudio() + # and SDL_UnlockAudio() in your code. + # 'desired->userdata' is passed as the first parameter to your callback + # function. + # + # The audio device starts out playing silence when it's opened, and should + # be enabled for playing by calling SDL_PauseAudio(0) when you are ready + # for your audio callback function to be called. Since the audio driver + # may modify the requested size of the audio buffer, you should allocate + # any local mixing buffers after you open the audio device. +proc SDL_OpenAudio*(desired, obtained: PSDL_AudioSpec): int{.cdecl, + importc, dynlib: SDLLibName.} + # Get the current audio state: +proc SDL_GetAudioStatus*(): TSDL_Audiostatus{.cdecl, importc, dynlib: SDLLibName.} + # This function pauses and unpauses the audio callback processing. + # It should be called with a parameter of 0 after opening the audio + # device to start playing sound. This is so you can safely initialize + # data for your callback function after opening the audio device. + # Silence will be written to the audio device during the pause. +proc SDL_PauseAudio*(pause_on: int){.cdecl, importc, dynlib: SDLLibName.} + # This function loads a WAVE from the data source, automatically freeing + # that source if 'freesrc' is non-zero. For example, to load a WAVE file, + # you could do: + # SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...); + # + # If this function succeeds, it returns the given SDL_AudioSpec, + # filled with the audio data format of the wave data, and sets + # 'audio_buf' to a malloc()'d buffer containing the audio data, + # and sets 'audio_len' to the length of that audio buffer, in bytes. + # You need to free the audio buffer with SDL_FreeWAV() when you are + # done with it. + # + # This function returns NULL and sets the SDL error message if the + # wave file cannot be opened, uses an unknown data format, or is + # corrupt. Currently raw and MS-ADPCM WAVE files are supported. +proc SDL_LoadWAV_RW*(src: PSDL_RWops, freesrc: int, spec: PSDL_AudioSpec, + audio_buf: PUInt8, audiolen: PUInt32): PSDL_AudioSpec{. + cdecl, importc, dynlib: SDLLibName.} + # Compatibility convenience function -- loads a WAV from a file +proc SDL_LoadWAV*(filename: cstring, spec: PSDL_AudioSpec, audio_buf: PUInt8, + audiolen: PUInt32): PSDL_AudioSpec + # This function frees data previously allocated with SDL_LoadWAV_RW() +proc SDL_FreeWAV*(audio_buf: PUInt8){.cdecl, importc, dynlib: SDLLibName.} + # This function takes a source format and rate and a destination format + # and rate, and initializes the 'cvt' structure with information needed + # by SDL_ConvertAudio() to convert a buffer of audio data from one format + # to the other. + # This function returns 0, or -1 if there was an error. +proc SDL_BuildAudioCVT*(cvt: PSDL_AudioCVT, src_format: UInt16, + src_channels: UInt8, src_rate: int, dst_format: UInt16, + dst_channels: UInt8, dst_rate: int): int{.cdecl, + importc, dynlib: SDLLibName.} + # Once you have initialized the 'cvt' structure using SDL_BuildAudioCVT(), + # created an audio buffer cvt->buf, and filled it with cvt->len bytes of + # audio data in the source format, this function will convert it in-place + # to the desired format. + # The data conversion may expand the size of the audio data, so the buffer + # cvt->buf should be allocated after the cvt structure is initialized by + # SDL_BuildAudioCVT(), and should be cvt->len*cvt->len_mult bytes long. +proc SDL_ConvertAudio*(cvt: PSDL_AudioCVT): int{.cdecl, importc, dynlib: SDLLibName.} + # This takes two audio buffers of the playing audio format and mixes + # them, performing addition, volume adjustment, and overflow clipping. + # The volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME + # for full audio volume. Note this does not change hardware volume. + # This is provided for convenience -- you can mix your own audio data. +proc SDL_MixAudio*(dst, src: PUInt8, length: UInt32, volume: int){.cdecl, + importc, dynlib: SDLLibName.} + # The lock manipulated by these functions protects the callback function. + # During a LockAudio/UnlockAudio pair, you can be guaranteed that the + # callback function is not running. Do not call these from the callback + # function or you will cause deadlock. +proc SDL_LockAudio*(){.cdecl, importc, dynlib: SDLLibName.} +proc SDL_UnlockAudio*(){.cdecl, importc, dynlib: SDLLibName.} + # This function shuts down audio processing and closes the audio device. +proc SDL_CloseAudio*(){.cdecl, importc, dynlib: SDLLibName.} + #------------------------------------------------------------------------------ + # CD-routines + #------------------------------------------------------------------------------ + # Returns the number of CD-ROM drives on the system, or -1 if + # SDL_Init() has not been called with the SDL_INIT_CDROM flag. +proc SDL_CDNumDrives*(): int{.cdecl, importc, dynlib: SDLLibName.} + # Returns a human-readable, system-dependent identifier for the CD-ROM. + # Example: + # "/dev/cdrom" + # "E:" + # "/dev/disk/ide/1/master" +proc SDL_CDName*(drive: int): cstring{.cdecl, importc, dynlib: SDLLibName.} + # Opens a CD-ROM drive for access. It returns a drive handle on success, + # or NULL if the drive was invalid or busy. This newly opened CD-ROM + # becomes the default CD used when other CD functions are passed a NULL + # CD-ROM handle. + # Drives are numbered starting with 0. Drive 0 is the system default CD-ROM. +proc SDL_CDOpen*(drive: int): PSDL_CD{.cdecl, importc, dynlib: SDLLibName.} + # This function returns the current status of the given drive. + # If the drive has a CD in it, the table of contents of the CD and current + # play position of the CD will be stored in the SDL_CD structure. +proc SDL_CDStatus*(cdrom: PSDL_CD): TSDL_CDStatus{.cdecl, importc, dynlib: SDLLibName.} + # Play the given CD starting at 'start_track' and 'start_frame' for 'ntracks' + # tracks and 'nframes' frames. If both 'ntrack' and 'nframe' are 0, play + # until the end of the CD. This function will skip data tracks. + # This function should only be called after calling SDL_CDStatus() to + # get track information about the CD. + # + # For example: + # // Play entire CD: + # if ( CD_INDRIVE(SDL_CDStatus(cdrom)) ) then + # SDL_CDPlayTracks(cdrom, 0, 0, 0, 0); + # // Play last track: + # if ( CD_INDRIVE(SDL_CDStatus(cdrom)) ) then + # begin + # SDL_CDPlayTracks(cdrom, cdrom->numtracks-1, 0, 0, 0); + # end; + # + # // Play first and second track and 10 seconds of third track: + # if ( CD_INDRIVE(SDL_CDStatus(cdrom)) ) + # SDL_CDPlayTracks(cdrom, 0, 0, 2, 10); + # + # This function returns 0, or -1 if there was an error. +proc SDL_CDPlayTracks*(cdrom: PSDL_CD, start_track: int, start_frame: int, + ntracks: int, nframes: int): int{.cdecl, + importc, dynlib: SDLLibName.} + # Play the given CD starting at 'start' frame for 'length' frames. + # It returns 0, or -1 if there was an error. +proc SDL_CDPlay*(cdrom: PSDL_CD, start: int, len: int): int{.cdecl, + importc, dynlib: SDLLibName.} + # Pause play -- returns 0, or -1 on error +proc SDL_CDPause*(cdrom: PSDL_CD): int{.cdecl, importc, dynlib: SDLLibName.} + # Resume play -- returns 0, or -1 on error +proc SDL_CDResume*(cdrom: PSDL_CD): int{.cdecl, importc, dynlib: SDLLibName.} + # Stop play -- returns 0, or -1 on error +proc SDL_CDStop*(cdrom: PSDL_CD): int{.cdecl, importc, dynlib: SDLLibName.} + # Eject CD-ROM -- returns 0, or -1 on error +proc SDL_CDEject*(cdrom: PSDL_CD): int{.cdecl, importc, dynlib: SDLLibName.} + # Closes the handle for the CD-ROM drive +proc SDL_CDClose*(cdrom: PSDL_CD){.cdecl, importc, dynlib: SDLLibName.} + # Given a status, returns true if there's a disk in the drive +proc SDL_CDInDrive*(status: TSDL_CDStatus): bool + # Conversion functions from frames to Minute/Second/Frames and vice versa +proc FRAMES_TO_MSF*(frames: int, M: var int, S: var int, F: var int) +proc MSF_TO_FRAMES*(M: int, S: int, F: int): int + #------------------------------------------------------------------------------ + # JoyStick-routines + #------------------------------------------------------------------------------ + # Count the number of joysticks attached to the system +proc SDL_NumJoysticks*(): int{.cdecl, importc, dynlib: SDLLibName.} + # Get the implementation dependent name of a joystick. + # This can be called before any joysticks are opened. + # If no name can be found, this function returns NULL. +proc SDL_JoystickName*(index: int): cstring{.cdecl, importc, dynlib: SDLLibName.} + # Open a joystick for use - the index passed as an argument refers to + # the N'th joystick on the system. This index is the value which will + # identify this joystick in future joystick events. + # + # This function returns a joystick identifier, or NULL if an error occurred. +proc SDL_JoystickOpen*(index: int): PSDL_Joystick{.cdecl, importc, dynlib: SDLLibName.} + # Returns 1 if the joystick has been opened, or 0 if it has not. +proc SDL_JoystickOpened*(index: int): int{.cdecl, importc, dynlib: SDLLibName.} + # Get the device index of an opened joystick. +proc SDL_JoystickIndex*(joystick: PSDL_Joystick): int{.cdecl, importc, dynlib: SDLLibName.} + # Get the number of general axis controls on a joystick +proc SDL_JoystickNumAxes*(joystick: PSDL_Joystick): int{.cdecl, + importc, dynlib: SDLLibName.} + # Get the number of trackballs on a joystick + # Joystick trackballs have only relative motion events associated + # with them and their state cannot be polled. +proc SDL_JoystickNumBalls*(joystick: PSDL_Joystick): int{.cdecl, + importc, dynlib: SDLLibName.} + # Get the number of POV hats on a joystick +proc SDL_JoystickNumHats*(joystick: PSDL_Joystick): int{.cdecl, + importc, dynlib: SDLLibName.} + # Get the number of buttons on a joystick +proc SDL_JoystickNumButtons*(joystick: PSDL_Joystick): int{.cdecl, + importc, dynlib: SDLLibName.} + # Update the current state of the open joysticks. + # This is called automatically by the event loop if any joystick + # events are enabled. +proc SDL_JoystickUpdate*(){.cdecl, importc, dynlib: SDLLibName.} + # Enable/disable joystick event polling. + # If joystick events are disabled, you must call SDL_JoystickUpdate() + # yourself and check the state of the joystick when you want joystick + # information. + # The state can be one of SDL_QUERY, SDL_ENABLE or SDL_IGNORE. +proc SDL_JoystickEventState*(state: int): int{.cdecl, importc, dynlib: SDLLibName.} + # Get the current state of an axis control on a joystick + # The state is a value ranging from -32768 to 32767. + # The axis indices start at index 0. +proc SDL_JoystickGetAxis*(joystick: PSDL_Joystick, axis: int): SInt16{.cdecl, + importc, dynlib: SDLLibName.} + # The hat indices start at index 0. +proc SDL_JoystickGetHat*(joystick: PSDL_Joystick, hat: int): UInt8{.cdecl, + importc, dynlib: SDLLibName.} + # Get the ball axis change since the last poll + # This returns 0, or -1 if you passed it invalid parameters. + # The ball indices start at index 0. +proc SDL_JoystickGetBall*(joystick: PSDL_Joystick, ball: int, dx: var int, + dy: var int): int{.cdecl, importc, dynlib: SDLLibName.} + # Get the current state of a button on a joystick + # The button indices start at index 0. +proc SDL_JoystickGetButton*(joystick: PSDL_Joystick, Button: int): UInt8{.cdecl, + importc, dynlib: SDLLibName.} + # Close a joystick previously opened with SDL_JoystickOpen() +proc SDL_JoystickClose*(joystick: PSDL_Joystick){.cdecl, importc, dynlib: SDLLibName.} + #------------------------------------------------------------------------------ + # event-handling + #------------------------------------------------------------------------------ + # Pumps the event loop, gathering events from the input devices. + # This function updates the event queue and internal input device state. + # This should only be run in the thread that sets the video mode. +proc SDL_PumpEvents*(){.cdecl, importc, dynlib: SDLLibName.} + # Checks the event queue for messages and optionally returns them. + # If 'action' is SDL_ADDEVENT, up to 'numevents' events will be added to + # the back of the event queue. + # If 'action' is SDL_PEEKEVENT, up to 'numevents' events at the front + # of the event queue, matching 'mask', will be returned and will not + # be removed from the queue. + # If 'action' is SDL_GETEVENT, up to 'numevents' events at the front + # of the event queue, matching 'mask', will be returned and will be + # removed from the queue. + # This function returns the number of events actually stored, or -1 + # if there was an error. This function is thread-safe. +proc SDL_PeepEvents*(events: PSDL_Event, numevents: int, + action: TSDL_eventaction, mask: UInt32): int{.cdecl, + importc, dynlib: SDLLibName.} + # Polls for currently pending events, and returns 1 if there are any pending + # events, or 0 if there are none available. If 'event' is not NULL, the next + # event is removed from the queue and stored in that area. +proc SDL_PollEvent*(event: PSDL_Event): int{.cdecl, importc, dynlib: SDLLibName.} + # Waits indefinitely for the next available event, returning 1, or 0 if there + # was an error while waiting for events. If 'event' is not NULL, the next + # event is removed from the queue and stored in that area. +proc SDL_WaitEvent*(event: PSDL_Event): int{.cdecl, importc, dynlib: SDLLibName.} +proc SDL_PushEvent*(event: PSDL_Event): int{.cdecl, importc, dynlib: SDLLibName.} + # If the filter returns 1, then the event will be added to the internal queue. + # If it returns 0, then the event will be dropped from the queue, but the + # internal state will still be updated. This allows selective filtering of + # dynamically arriving events. + # + # WARNING: Be very careful of what you do in the event filter function, as + # it may run in a different thread! + # + # There is one caveat when dealing with the SDL_QUITEVENT event type. The + # event filter is only called when the window manager desires to close the + # application window. If the event filter returns 1, then the window will + # be closed, otherwise the window will remain open if possible. + # If the quit event is generated by an interrupt signal, it will bypass the + # internal queue and be delivered to the application at the next event poll. +proc SDL_SetEventFilter*(filter: TSDL_EventFilter){.cdecl, importc, dynlib: SDLLibName.} + # Return the current event filter - can be used to "chain" filters. + # If there is no event filter set, this function returns NULL. +proc SDL_GetEventFilter*(): TSDL_EventFilter{.cdecl, importc, dynlib: SDLLibName.} + # This function allows you to set the state of processing certain events. + # If 'state' is set to SDL_IGNORE, that event will be automatically dropped + # from the event queue and will not event be filtered. + # If 'state' is set to SDL_ENABLE, that event will be processed normally. + # If 'state' is set to SDL_QUERY, SDL_EventState() will return the + # current processing state of the specified event. +proc SDL_EventState*(theType: UInt8, state: int): UInt8{.cdecl, + importc, dynlib: SDLLibName.} + #------------------------------------------------------------------------------ + # Version Routines + #------------------------------------------------------------------------------ + # This macro can be used to fill a version structure with the compile-time + # version of the SDL library. +proc SDL_VERSION*(X: var TSDL_Version) + # This macro turns the version numbers into a numeric value: + # (1,2,3) -> (1203) + # This assumes that there will never be more than 100 patchlevels +proc SDL_VERSIONNUM*(X, Y, Z: int): int + # This is the version number macro for the current SDL version +proc SDL_COMPILEDVERSION*(): int + # This macro will evaluate to true if compiled with SDL at least X.Y.Z +proc SDL_VERSION_ATLEAST*(X: int, Y: int, Z: int): bool + # This function gets the version of the dynamically linked SDL library. + # it should NOT be used to fill a version structure, instead you should + # use the SDL_Version() macro. +proc SDL_Linked_Version*(): PSDL_version{.cdecl, importc, dynlib: SDLLibName.} + #------------------------------------------------------------------------------ + # video + #------------------------------------------------------------------------------ + # These functions are used internally, and should not be used unless you + # have a specific need to specify the video driver you want to use. + # You should normally use SDL_Init() or SDL_InitSubSystem(). + # + # SDL_VideoInit() initializes the video subsystem -- sets up a connection + # to the window manager, etc, and determines the current video mode and + # pixel format, but does not initialize a window or graphics mode. + # Note that event handling is activated by this routine. + # + # If you use both sound and video in your application, you need to call + # SDL_Init() before opening the sound device, otherwise under Win32 DirectX, + # you won't be able to set full-screen display modes. +proc SDL_VideoInit*(driver_name: cstring, flags: UInt32): int{.cdecl, + importc, dynlib: SDLLibName.} +proc SDL_VideoQuit*(){.cdecl, importc, dynlib: SDLLibName.} + # This function fills the given character buffer with the name of the + # video driver, and returns a pointer to it if the video driver has + # been initialized. It returns NULL if no driver has been initialized. +proc SDL_VideoDriverName*(namebuf: cstring, maxlen: int): cstring{.cdecl, + importc, dynlib: SDLLibName.} + # This function returns a pointer to the current display surface. + # If SDL is doing format conversion on the display surface, this + # function returns the publicly visible surface, not the real video + # surface. +proc SDL_GetVideoSurface*(): PSDL_Surface{.cdecl, importc, dynlib: SDLLibName.} + # This function returns a read-only pointer to information about the + # video hardware. If this is called before SDL_SetVideoMode(), the 'vfmt' + # member of the returned structure will contain the pixel format of the + # "best" video mode. +proc SDL_GetVideoInfo*(): PSDL_VideoInfo{.cdecl, importc, dynlib: SDLLibName.} + # Check to see if a particular video mode is supported. + # It returns 0 if the requested mode is not supported under any bit depth, + # or returns the bits-per-pixel of the closest available mode with the + # given width and height. If this bits-per-pixel is different from the + # one used when setting the video mode, SDL_SetVideoMode() will succeed, + # but will emulate the requested bits-per-pixel with a shadow surface. + # + # The arguments to SDL_VideoModeOK() are the same ones you would pass to + # SDL_SetVideoMode() +proc SDL_VideoModeOK*(width, height, bpp: int, flags: UInt32): int{.cdecl, + importc, importc, dynlib: SDLLibName.} + # Return a pointer to an array of available screen dimensions for the + # given format and video flags, sorted largest to smallest. Returns + # NULL if there are no dimensions available for a particular format, + # or (SDL_Rect **)-1 if any dimension is okay for the given format. + # + # if 'format' is NULL, the mode list will be for the format given + # by SDL_GetVideoInfo( ) - > vfmt +proc SDL_ListModes*(format: PSDL_PixelFormat, flags: UInt32): PPSDL_Rect{.cdecl, + importc, dynlib: SDLLibName.} + # Set up a video mode with the specified width, height and bits-per-pixel. + # + # If 'bpp' is 0, it is treated as the current display bits per pixel. + # + # If SDL_ANYFORMAT is set in 'flags', the SDL library will try to set the + # requested bits-per-pixel, but will return whatever video pixel format is + # available. The default is to emulate the requested pixel format if it + # is not natively available. + # + # If SDL_HWSURFACE is set in 'flags', the video surface will be placed in + # video memory, if possible, and you may have to call SDL_LockSurface() + # in order to access the raw framebuffer. Otherwise, the video surface + # will be created in system memory. + # + # If SDL_ASYNCBLIT is set in 'flags', SDL will try to perform rectangle + # updates asynchronously, but you must always lock before accessing pixels. + # SDL will wait for updates to complete before returning from the lock. + # + # If SDL_HWPALETTE is set in 'flags', the SDL library will guarantee + # that the colors set by SDL_SetColors() will be the colors you get. + # Otherwise, in 8-bit mode, SDL_SetColors() may not be able to set all + # of the colors exactly the way they are requested, and you should look + # at the video surface structure to determine the actual palette. + # If SDL cannot guarantee that the colors you request can be set, + # i.e. if the colormap is shared, then the video surface may be created + # under emulation in system memory, overriding the SDL_HWSURFACE flag. + # + # If SDL_FULLSCREEN is set in 'flags', the SDL library will try to set + # a fullscreen video mode. The default is to create a windowed mode + # if the current graphics system has a window manager. + # If the SDL library is able to set a fullscreen video mode, this flag + # will be set in the surface that is returned. + # + # If SDL_DOUBLEBUF is set in 'flags', the SDL library will try to set up + # two surfaces in video memory and swap between them when you call + # SDL_Flip(). This is usually slower than the normal single-buffering + # scheme, but prevents "tearing" artifacts caused by modifying video + # memory while the monitor is refreshing. It should only be used by + # applications that redraw the entire screen on every update. + # + # This function returns the video framebuffer surface, or NULL if it fails. +proc SDL_SetVideoMode*(width, height, bpp: int, flags: UInt32): PSDL_Surface{. + cdecl, importc, dynlib: SDLLibName.} + # Makes sure the given list of rectangles is updated on the given screen. + # If 'x', 'y', 'w' and 'h' are all 0, SDL_UpdateRect will update the entire + # screen. + # These functions should not be called while 'screen' is locked. +proc SDL_UpdateRects*(screen: PSDL_Surface, numrects: int, rects: PSDL_Rect){. + cdecl, importc, dynlib: SDLLibName.} +proc SDL_UpdateRect*(screen: PSDL_Surface, x, y: SInt32, w, h: UInt32){.cdecl, + importc, dynlib: SDLLibName.} + # On hardware that supports double-buffering, this function sets up a flip + # and returns. The hardware will wait for vertical retrace, and then swap + # video buffers before the next video surface blit or lock will return. + # On hardware that doesn not support double-buffering, this is equivalent + # to calling SDL_UpdateRect(screen, 0, 0, 0, 0); + # The SDL_DOUBLEBUF flag must have been passed to SDL_SetVideoMode() when + # setting the video mode for this function to perform hardware flipping. + # This function returns 0 if successful, or -1 if there was an error. +proc SDL_Flip*(screen: PSDL_Surface): int{.cdecl, importc, dynlib: SDLLibName.} + # Set the gamma correction for each of the color channels. + # The gamma values range (approximately) between 0.1 and 10.0 + # + # If this function isn't supported directly by the hardware, it will + # be emulated using gamma ramps, if available. If successful, this + # function returns 0, otherwise it returns -1. +proc SDL_SetGamma*(redgamma: float32, greengamma: float32, bluegamma: float32): int{. + cdecl, importc, dynlib: SDLLibName.} + # Set the gamma translation table for the red, green, and blue channels + # of the video hardware. Each table is an array of 256 16-bit quantities, + # representing a mapping between the input and output for that channel. + # The input is the index into the array, and the output is the 16-bit + # gamma value at that index, scaled to the output color precision. + # + # You may pass NULL for any of the channels to leave it unchanged. + # If the call succeeds, it will return 0. If the display driver or + # hardware does not support gamma translation, or otherwise fails, + # this function will return -1. +proc SDL_SetGammaRamp*(redtable: PUInt16, greentable: PUInt16, + bluetable: PUInt16): int{.cdecl, importc, dynlib: SDLLibName.} + # Retrieve the current values of the gamma translation tables. + # + # You must pass in valid pointers to arrays of 256 16-bit quantities. + # Any of the pointers may be NULL to ignore that channel. + # If the call succeeds, it will return 0. If the display driver or + # hardware does not support gamma translation, or otherwise fails, + # this function will return -1. +proc SDL_GetGammaRamp*(redtable: PUInt16, greentable: PUInt16, + bluetable: PUInt16): int{.cdecl, importc, dynlib: SDLLibName.} + # Sets a portion of the colormap for the given 8-bit surface. If 'surface' + # is not a palettized surface, this function does nothing, returning 0. + # If all of the colors were set as passed to SDL_SetColors(), it will + # return 1. If not all the color entries were set exactly as given, + # it will return 0, and you should look at the surface palette to + # determine the actual color palette. + # + # When 'surface' is the surface associated with the current display, the + # display colormap will be updated with the requested colors. If + # SDL_HWPALETTE was set in SDL_SetVideoMode() flags, SDL_SetColors() + # will always return 1, and the palette is guaranteed to be set the way + # you desire, even if the window colormap has to be warped or run under + # emulation. +proc SDL_SetColors*(surface: PSDL_Surface, colors: PSDL_Color, firstcolor: int, + ncolors: int): int{.cdecl, importc, dynlib: SDLLibName.} + # Sets a portion of the colormap for a given 8-bit surface. + # 'flags' is one or both of: + # SDL_LOGPAL -- set logical palette, which controls how blits are mapped + # to/from the surface, + # SDL_PHYSPAL -- set physical palette, which controls how pixels look on + # the screen + # Only screens have physical palettes. Separate change of physical/logical + # palettes is only possible if the screen has SDL_HWPALETTE set. + # + # The return value is 1 if all colours could be set as requested, and 0 + # otherwise. + # + # SDL_SetColors() is equivalent to calling this function with + # flags = (SDL_LOGPAL or SDL_PHYSPAL). +proc SDL_SetPalette*(surface: PSDL_Surface, flags: int, colors: PSDL_Color, + firstcolor: int, ncolors: int): int{.cdecl, + importc, dynlib: SDLLibName.} + # Maps an RGB triple to an opaque pixel value for a given pixel format +proc SDL_MapRGB*(format: PSDL_PixelFormat, r: UInt8, g: UInt8, b: UInt8): UInt32{. + cdecl, importc, dynlib: SDLLibName.} + # Maps an RGBA quadruple to a pixel value for a given pixel format +proc SDL_MapRGBA*(format: PSDL_PixelFormat, r: UInt8, g: UInt8, b: UInt8, + a: UInt8): UInt32{.cdecl, importc, dynlib: SDLLibName.} + # Maps a pixel value into the RGB components for a given pixel format +proc SDL_GetRGB*(pixel: UInt32, fmt: PSDL_PixelFormat, r: PUInt8, g: PUInt8, + b: PUInt8){.cdecl, importc, dynlib: SDLLibName.} + # Maps a pixel value into the RGBA components for a given pixel format +proc SDL_GetRGBA*(pixel: UInt32, fmt: PSDL_PixelFormat, r: PUInt8, g: PUInt8, + b: PUInt8, a: PUInt8){.cdecl, importc, dynlib: SDLLibName.} + # Allocate and free an RGB surface (must be called after SDL_SetVideoMode) + # If the depth is 4 or 8 bits, an empty palette is allocated for the surface. + # If the depth is greater than 8 bits, the pixel format is set using the + # flags '[RGB]mask'. + # If the function runs out of memory, it will return NULL. + # + # The 'flags' tell what kind of surface to create. + # SDL_SWSURFACE means that the surface should be created in system memory. + # SDL_HWSURFACE means that the surface should be created in video memory, + # with the same format as the display surface. This is useful for surfaces + # that will not change much, to take advantage of hardware acceleration + # when being blitted to the display surface. + # SDL_ASYNCBLIT means that SDL will try to perform asynchronous blits with + # this surface, but you must always lock it before accessing the pixels. + # SDL will wait for current blits to finish before returning from the lock. + # SDL_SRCCOLORKEY indicates that the surface will be used for colorkey blits. + # If the hardware supports acceleration of colorkey blits between + # two surfaces in video memory, SDL will try to place the surface in + # video memory. If this isn't possible or if there is no hardware + # acceleration available, the surface will be placed in system memory. + # SDL_SRCALPHA means that the surface will be used for alpha blits and + # if the hardware supports hardware acceleration of alpha blits between + # two surfaces in video memory, to place the surface in video memory + # if possible, otherwise it will be placed in system memory. + # If the surface is created in video memory, blits will be _much_ faster, + # but the surface format must be identical to the video surface format, + # and the only way to access the pixels member of the surface is to use + # the SDL_LockSurface() and SDL_UnlockSurface() calls. + # If the requested surface actually resides in video memory, SDL_HWSURFACE + # will be set in the flags member of the returned surface. If for some + # reason the surface could not be placed in video memory, it will not have + # the SDL_HWSURFACE flag set, and will be created in system memory instead. +proc SDL_AllocSurface*(flags: UInt32, width, height, depth: int, + RMask, GMask, BMask, AMask: UInt32): PSDL_Surface +proc SDL_CreateRGBSurface*(flags: UInt32, width, height, depth: int, + RMask, GMask, BMask, AMask: UInt32): PSDL_Surface{. + cdecl, importc, dynlib: SDLLibName.} +proc SDL_CreateRGBSurfaceFrom*(pixels: Pointer, + width, height, depth, pitch: int, + RMask, GMask, BMask, AMask: UInt32): PSDL_Surface{. + cdecl, importc, dynlib: SDLLibName.} +proc SDL_FreeSurface*(surface: PSDL_Surface){.cdecl, importc, dynlib: SDLLibName.} +proc SDL_MustLock*(Surface: PSDL_Surface): bool + # SDL_LockSurface() sets up a surface for directly accessing the pixels. + # Between calls to SDL_LockSurface()/SDL_UnlockSurface(), you can write + # to and read from 'surface->pixels', using the pixel format stored in + # 'surface->format'. Once you are done accessing the surface, you should + # use SDL_UnlockSurface() to release it. + # + # Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates + # to 0, then you can read and write to the surface at any time, and the + # pixel format of the surface will not change. In particular, if the + # SDL_HWSURFACE flag is not given when calling SDL_SetVideoMode(), you + # will not need to lock the display surface before accessing it. + # + # No operating system or library calls should be made between lock/unlock + # pairs, as critical system locks may be held during this time. + # + # SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked. +proc SDL_LockSurface*(surface: PSDL_Surface): int{.cdecl, importc, dynlib: SDLLibName.} +proc SDL_UnlockSurface*(surface: PSDL_Surface){.cdecl, importc, dynlib: SDLLibName.} + # Load a surface from a seekable SDL data source (memory or file.) + # If 'freesrc' is non-zero, the source will be closed after being read. + # Returns the new surface, or NULL if there was an error. + # The new surface should be freed with SDL_FreeSurface(). +proc SDL_LoadBMP_RW*(src: PSDL_RWops, freesrc: int): PSDL_Surface{.cdecl, + importc, dynlib: SDLLibName.} + # Convenience macro -- load a surface from a file +proc SDL_LoadBMP*(filename: cstring): PSDL_Surface + # Save a surface to a seekable SDL data source (memory or file.) + # If 'freedst' is non-zero, the source will be closed after being written. + # Returns 0 if successful or -1 if there was an error. +proc SDL_SaveBMP_RW*(surface: PSDL_Surface, dst: PSDL_RWops, freedst: int): int{. + cdecl, importc, dynlib: SDLLibName.} + # Convenience macro -- save a surface to a file +proc SDL_SaveBMP*(surface: PSDL_Surface, filename: cstring): int + # Sets the color key (transparent pixel) in a blittable surface. + # If 'flag' is SDL_SRCCOLORKEY (optionally OR'd with SDL_RLEACCEL), + # 'key' will be the transparent pixel in the source image of a blit. + # SDL_RLEACCEL requests RLE acceleration for the surface if present, + # and removes RLE acceleration if absent. + # If 'flag' is 0, this function clears any current color key. + # This function returns 0, or -1 if there was an error. +proc SDL_SetColorKey*(surface: PSDL_Surface, flag, key: UInt32): int{.cdecl, + importc, dynlib: SDLLibName.} + # This function sets the alpha value for the entire surface, as opposed to + # using the alpha component of each pixel. This value measures the range + # of transparency of the surface, 0 being completely transparent to 255 + # being completely opaque. An 'alpha' value of 255 causes blits to be + # opaque, the source pixels copied to the destination (the default). Note + # that per-surface alpha can be combined with colorkey transparency. + # + # If 'flag' is 0, alpha blending is disabled for the surface. + # If 'flag' is SDL_SRCALPHA, alpha blending is enabled for the surface. + # OR:ing the flag with SDL_RLEACCEL requests RLE acceleration for the + # surface; if SDL_RLEACCEL is not specified, the RLE accel will be removed. +proc SDL_SetAlpha*(surface: PSDL_Surface, flag: UInt32, alpha: UInt8): int{. + cdecl, importc, dynlib: SDLLibName.} + # Sets the clipping rectangle for the destination surface in a blit. + # + # If the clip rectangle is NULL, clipping will be disabled. + # If the clip rectangle doesn't intersect the surface, the function will + # return SDL_FALSE and blits will be completely clipped. Otherwise the + # function returns SDL_TRUE and blits to the surface will be clipped to + # the intersection of the surface area and the clipping rectangle. + # + # Note that blits are automatically clipped to the edges of the source + # and destination surfaces. +proc SDL_SetClipRect*(surface: PSDL_Surface, rect: PSDL_Rect){.cdecl, + importc, dynlib: SDLLibName.} + # Gets the clipping rectangle for the destination surface in a blit. + # 'rect' must be a pointer to a valid rectangle which will be filled + # with the correct values. +proc SDL_GetClipRect*(surface: PSDL_Surface, rect: PSDL_Rect){.cdecl, + importc, dynlib: SDLLibName.} + # Creates a new surface of the specified format, and then copies and maps + # the given surface to it so the blit of the converted surface will be as + # fast as possible. If this function fails, it returns NULL. + # + # The 'flags' parameter is passed to SDL_CreateRGBSurface() and has those + # semantics. You can also pass SDL_RLEACCEL in the flags parameter and + # SDL will try to RLE accelerate colorkey and alpha blits in the resulting + # surface. + # + # This function is used internally by SDL_DisplayFormat(). +proc SDL_ConvertSurface*(src: PSDL_Surface, fmt: PSDL_PixelFormat, flags: UInt32): PSDL_Surface{. + cdecl, importc, dynlib: SDLLibName.} + # + # This performs a fast blit from the source surface to the destination + # surface. It assumes that the source and destination rectangles are + # the same size. If either 'srcrect' or 'dstrect' are NULL, the entire + # surface (src or dst) is copied. The final blit rectangles are saved + # in 'srcrect' and 'dstrect' after all clipping is performed. + # If the blit is successful, it returns 0, otherwise it returns -1. + # + # The blit function should not be called on a locked surface. + # + # The blit semantics for surfaces with and without alpha and colorkey + # are defined as follows: + # + # RGBA->RGB: + # SDL_SRCALPHA set: + # alpha-blend (using alpha-channel). + # SDL_SRCCOLORKEY ignored. + # SDL_SRCALPHA not set: + # copy RGB. + # if SDL_SRCCOLORKEY set, only copy the pixels matching the + # RGB values of the source colour key, ignoring alpha in the + # comparison. + # + # RGB->RGBA: + # SDL_SRCALPHA set: + # alpha-blend (using the source per-surface alpha value); + # set destination alpha to opaque. + # SDL_SRCALPHA not set: + # copy RGB, set destination alpha to opaque. + # both: + # if SDL_SRCCOLORKEY set, only copy the pixels matching the + # source colour key. + # + # RGBA->RGBA: + # SDL_SRCALPHA set: + # alpha-blend (using the source alpha channel) the RGB values; + # leave destination alpha untouched. [Note: is this correct?] + # SDL_SRCCOLORKEY ignored. + # SDL_SRCALPHA not set: + # copy all of RGBA to the destination. + # if SDL_SRCCOLORKEY set, only copy the pixels matching the + # RGB values of the source colour key, ignoring alpha in the + # comparison. + # + # RGB->RGB: + # SDL_SRCALPHA set: + # alpha-blend (using the source per-surface alpha value). + # SDL_SRCALPHA not set: + # copy RGB. + # both: + # if SDL_SRCCOLORKEY set, only copy the pixels matching the + # source colour key. + # + # If either of the surfaces were in video memory, and the blit returns -2, + # the video memory was lost, so it should be reloaded with artwork and + # re-blitted: + # while ( SDL_BlitSurface(image, imgrect, screen, dstrect) = -2 ) do + # begin + # while ( SDL_LockSurface(image) < 0 ) do + # Sleep(10); + # -- Write image pixels to image->pixels -- + # SDL_UnlockSurface(image); + # end; + # + # This happens under DirectX 5.0 when the system switches away from your + # fullscreen application. The lock will also fail until you have access + # to the video memory again. + # You should call SDL_BlitSurface() unless you know exactly how SDL + # blitting works internally and how to use the other blit functions. +proc SDL_BlitSurface*(src: PSDL_Surface, srcrect: PSDL_Rect, dst: PSDL_Surface, + dstrect: PSDL_Rect): int + # This is the public blit function, SDL_BlitSurface(), and it performs + # rectangle validation and clipping before passing it to SDL_LowerBlit() +proc SDL_UpperBlit*(src: PSDL_Surface, srcrect: PSDL_Rect, dst: PSDL_Surface, + dstrect: PSDL_Rect): int{.cdecl, importc, dynlib: SDLLibName.} + # This is a semi-private blit function and it performs low-level surface + # blitting only. +proc SDL_LowerBlit*(src: PSDL_Surface, srcrect: PSDL_Rect, dst: PSDL_Surface, + dstrect: PSDL_Rect): int{.cdecl, importc, dynlib: SDLLibName.} + # This function performs a fast fill of the given rectangle with 'color' + # The given rectangle is clipped to the destination surface clip area + # and the final fill rectangle is saved in the passed in pointer. + # If 'dstrect' is NULL, the whole surface will be filled with 'color' + # The color should be a pixel of the format used by the surface, and + # can be generated by the SDL_MapRGB() function. + # This function returns 0 on success, or -1 on error. +proc SDL_FillRect*(dst: PSDL_Surface, dstrect: PSDL_Rect, color: UInt32): int{. + cdecl, importc, dynlib: SDLLibName.} + # This function takes a surface and copies it to a new surface of the + # pixel format and colors of the video framebuffer, suitable for fast + # blitting onto the display surface. It calls SDL_ConvertSurface() + # + # If you want to take advantage of hardware colorkey or alpha blit + # acceleration, you should set the colorkey and alpha value before + # calling this function. + # + # If the conversion fails or runs out of memory, it returns NULL +proc SDL_DisplayFormat*(surface: PSDL_Surface): PSDL_Surface{.cdecl, + importc, dynlib: SDLLibName.} + # This function takes a surface and copies it to a new surface of the + # pixel format and colors of the video framebuffer (if possible), + # suitable for fast alpha blitting onto the display surface. + # The new surface will always have an alpha channel. + # + # If you want to take advantage of hardware colorkey or alpha blit + # acceleration, you should set the colorkey and alpha value before + # calling this function. + # + # If the conversion fails or runs out of memory, it returns NULL +proc SDL_DisplayFormatAlpha*(surface: PSDL_Surface): PSDL_Surface{.cdecl, + importc, dynlib: SDLLibName.} + #* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + #* YUV video surface overlay functions */ + #* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + # This function creates a video output overlay + # Calling the returned surface an overlay is something of a misnomer because + # the contents of the display surface underneath the area where the overlay + # is shown is undefined - it may be overwritten with the converted YUV data. +proc SDL_CreateYUVOverlay*(width: int, height: int, format: UInt32, + display: PSDL_Surface): PSDL_Overlay{.cdecl, + importc, dynlib: SDLLibName.} + # Lock an overlay for direct access, and unlock it when you are done +proc SDL_LockYUVOverlay*(Overlay: PSDL_Overlay): int{.cdecl, importc, dynlib: SDLLibName.} +proc SDL_UnlockYUVOverlay*(Overlay: PSDL_Overlay){.cdecl, importc, dynlib: SDLLibName.} + # Blit a video overlay to the display surface. + # The contents of the video surface underneath the blit destination are + # not defined. + # The width and height of the destination rectangle may be different from + # that of the overlay, but currently only 2x scaling is supported. +proc SDL_DisplayYUVOverlay*(Overlay: PSDL_Overlay, dstrect: PSDL_Rect): int{. + cdecl, importc, dynlib: SDLLibName.} + # Free a video overlay +proc SDL_FreeYUVOverlay*(Overlay: PSDL_Overlay){.cdecl, importc, dynlib: SDLLibName.} + #------------------------------------------------------------------------------ + # OpenGL Routines + #------------------------------------------------------------------------------ + # Dynamically load a GL driver, if SDL is built with dynamic GL. + # + # SDL links normally with the OpenGL library on your system by default, + # but you can compile it to dynamically load the GL driver at runtime. + # If you do this, you need to retrieve all of the GL functions used in + # your program from the dynamic library using SDL_GL_GetProcAddress(). + # + # This is disabled in default builds of SDL. +proc SDL_GL_LoadLibrary*(filename: cstring): int{.cdecl, importc, dynlib: SDLLibName.} + # Get the address of a GL function (for extension functions) +proc SDL_GL_GetProcAddress*(procname: cstring): Pointer{.cdecl, + importc, dynlib: SDLLibName.} + # Set an attribute of the OpenGL subsystem before intialization. +proc SDL_GL_SetAttribute*(attr: TSDL_GLAttr, value: int): int{.cdecl, + importc, dynlib: SDLLibName.} + # Get an attribute of the OpenGL subsystem from the windowing + # interface, such as glX. This is of course different from getting + # the values from SDL's internal OpenGL subsystem, which only + # stores the values you request before initialization. + # + # Developers should track the values they pass into SDL_GL_SetAttribute + # themselves if they want to retrieve these values. +proc SDL_GL_GetAttribute*(attr: TSDL_GLAttr, value: var int): int{.cdecl, + importc, dynlib: SDLLibName.} + # Swap the OpenGL buffers, if double-buffering is supported. +proc SDL_GL_SwapBuffers*(){.cdecl, importc, dynlib: SDLLibName.} + # Internal functions that should not be called unless you have read + # and understood the source code for these functions. +proc SDL_GL_UpdateRects*(numrects: int, rects: PSDL_Rect){.cdecl, + importc, dynlib: SDLLibName.} +proc SDL_GL_Lock*(){.cdecl, importc, dynlib: SDLLibName.} +proc SDL_GL_Unlock*(){.cdecl, importc, dynlib: SDLLibName.} + #* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + #* These functions allow interaction with the window manager, if any. * + #* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + # Sets/Gets the title and icon text of the display window +proc SDL_WM_GetCaption*(title: var cstring, icon: var cstring){.cdecl, + importc, dynlib: SDLLibName.} +proc SDL_WM_SetCaption*(title: cstring, icon: cstring){.cdecl, + importc, dynlib: SDLLibName.} + # Sets the icon for the display window. + # This function must be called before the first call to SDL_SetVideoMode(). + # It takes an icon surface, and a mask in MSB format. + # If 'mask' is NULL, the entire icon surface will be used as the icon. +proc SDL_WM_SetIcon*(icon: PSDL_Surface, mask: UInt8){.cdecl, importc, dynlib: SDLLibName.} + # This function iconifies the window, and returns 1 if it succeeded. + # If the function succeeds, it generates an SDL_APPACTIVE loss event. + # This function is a noop and returns 0 in non-windowed environments. +proc SDL_WM_IconifyWindow*(): int{.cdecl, importc, dynlib: SDLLibName.} + # Toggle fullscreen mode without changing the contents of the screen. + # If the display surface does not require locking before accessing + # the pixel information, then the memory pointers will not change. + # + # If this function was able to toggle fullscreen mode (change from + # running in a window to fullscreen, or vice-versa), it will return 1. + # If it is not implemented, or fails, it returns 0. + # + # The next call to SDL_SetVideoMode() will set the mode fullscreen + # attribute based on the flags parameter - if SDL_FULLSCREEN is not + # set, then the display will be windowed by default where supported. + # + # This is currently only implemented in the X11 video driver. +proc SDL_WM_ToggleFullScreen*(surface: PSDL_Surface): int{.cdecl, + importc, dynlib: SDLLibName.} + # Grabbing means that the mouse is confined to the application window, + # and nearly all keyboard input is passed directly to the application, + # and not interpreted by a window manager, if any. +proc SDL_WM_GrabInput*(mode: TSDL_GrabMode): TSDL_GrabMode{.cdecl, + importc, dynlib: SDLLibName.} + #------------------------------------------------------------------------------ + # mouse-routines + #------------------------------------------------------------------------------ + # Retrieve the current state of the mouse. + # The current button state is returned as a button bitmask, which can + # be tested using the SDL_BUTTON(X) macros, and x and y are set to the + # current mouse cursor position. You can pass NULL for either x or y. +proc SDL_GetMouseState*(x: var int, y: var int): UInt8{.cdecl, + importc, dynlib: SDLLibName.} + # Retrieve the current state of the mouse. + # The current button state is returned as a button bitmask, which can + # be tested using the SDL_BUTTON(X) macros, and x and y are set to the + # mouse deltas since the last call to SDL_GetRelativeMouseState(). +proc SDL_GetRelativeMouseState*(x: var int, y: var int): UInt8{.cdecl, + importc, dynlib: SDLLibName.} + # Set the position of the mouse cursor (generates a mouse motion event) +proc SDL_WarpMouse*(x, y: UInt16){.cdecl, importc, dynlib: SDLLibName.} + # Create a cursor using the specified data and mask (in MSB format). + # The cursor width must be a multiple of 8 bits. + # + # The cursor is created in black and white according to the following: + # data mask resulting pixel on screen + # 0 1 White + # 1 1 Black + # 0 0 Transparent + # 1 0 Inverted color if possible, black if not. + # + # Cursors created with this function must be freed with SDL_FreeCursor(). +proc SDL_CreateCursor*(data, mask: PUInt8, w, h, hot_x, hot_y: int): PSDL_Cursor{. + cdecl, importc, dynlib: SDLLibName.} + # Set the currently active cursor to the specified one. + # If the cursor is currently visible, the change will be immediately + # represented on the display. +proc SDL_SetCursor*(cursor: PSDL_Cursor){.cdecl, importc, dynlib: SDLLibName.} + # Returns the currently active cursor. +proc SDL_GetCursor*(): PSDL_Cursor{.cdecl, importc, dynlib: SDLLibName.} + # Deallocates a cursor created with SDL_CreateCursor(). +proc SDL_FreeCursor*(cursor: PSDL_Cursor){.cdecl, importc, dynlib: SDLLibName.} + # Toggle whether or not the cursor is shown on the screen. + # The cursor start off displayed, but can be turned off. + # SDL_ShowCursor() returns 1 if the cursor was being displayed + # before the call, or 0 if it was not. You can query the current + # state by passing a 'toggle' value of -1. +proc SDL_ShowCursor*(toggle: int): int{.cdecl, importc, dynlib: SDLLibName.} +proc SDL_BUTTON*(Button: int): int + #------------------------------------------------------------------------------ + # Keyboard-routines + #------------------------------------------------------------------------------ + # Enable/Disable UNICODE translation of keyboard input. + # This translation has some overhead, so translation defaults off. + # If 'enable' is 1, translation is enabled. + # If 'enable' is 0, translation is disabled. + # If 'enable' is -1, the translation state is not changed. + # It returns the previous state of keyboard translation. +proc SDL_EnableUNICODE*(enable: int): int{.cdecl, importc, dynlib: SDLLibName.} + # If 'delay' is set to 0, keyboard repeat is disabled. +proc SDL_EnableKeyRepeat*(delay: int, interval: int): int{.cdecl, + importc, dynlib: SDLLibName.} +proc SDL_GetKeyRepeat*(delay: PInteger, interval: PInteger){.cdecl, + importc, dynlib: SDLLibName.} + # Get a snapshot of the current state of the keyboard. + # Returns an array of keystates, indexed by the SDLK_* syms. + # Used: + # + # UInt8 *keystate = SDL_GetKeyState(NULL); + # if ( keystate[SDLK_RETURN] ) ... <RETURN> is pressed +proc SDL_GetKeyState*(numkeys: PInt): PUInt8{.cdecl, importc, dynlib: SDLLibName.} + # Get the current key modifier state +proc SDL_GetModState*(): TSDLMod{.cdecl, importc, dynlib: SDLLibName.} + # Set the current key modifier state + # This does not change the keyboard state, only the key modifier flags. +proc SDL_SetModState*(modstate: TSDLMod){.cdecl, importc, dynlib: SDLLibName.} + # Get the name of an SDL virtual keysym +proc SDL_GetKeyName*(key: TSDLKey): cstring{.cdecl, importc, dynlib: SDLLibName.} + #------------------------------------------------------------------------------ + # Active Routines + #------------------------------------------------------------------------------ + # This function returns the current state of the application, which is a + # bitwise combination of SDL_APPMOUSEFOCUS, SDL_APPINPUTFOCUS, and + # SDL_APPACTIVE. If SDL_APPACTIVE is set, then the user is able to + # see your application, otherwise it has been iconified or disabled. +proc SDL_GetAppState*(): UInt8{.cdecl, importc, dynlib: SDLLibName.} + # Mutex functions + # Create a mutex, initialized unlocked +proc SDL_CreateMutex*(): PSDL_Mutex{.cdecl, importc, dynlib: SDLLibName.} + # Lock the mutex (Returns 0, or -1 on error) +proc SDL_mutexP*(mutex: PSDL_mutex): int{.cdecl, importc, dynlib: SDLLibName.} +proc SDL_LockMutex*(mutex: PSDL_mutex): int + # Unlock the mutex (Returns 0, or -1 on error) +proc SDL_mutexV*(mutex: PSDL_mutex): int{.cdecl, importc, dynlib: SDLLibName.} +proc SDL_UnlockMutex*(mutex: PSDL_mutex): int + # Destroy a mutex +proc SDL_DestroyMutex*(mutex: PSDL_mutex){.cdecl, importc, dynlib: SDLLibName.} + # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + # Semaphore functions + # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + # Create a semaphore, initialized with value, returns NULL on failure. +proc SDL_CreateSemaphore*(initial_value: UInt32): PSDL_Sem{.cdecl, + importc, dynlib: SDLLibName.} + # Destroy a semaphore +proc SDL_DestroySemaphore*(sem: PSDL_sem){.cdecl, importc, dynlib: SDLLibName.} + # This function suspends the calling thread until the semaphore pointed + # to by sem has a positive count. It then atomically decreases the semaphore + # count. +proc SDL_SemWait*(sem: PSDL_sem): int{.cdecl, importc, dynlib: SDLLibName.} + # Non-blocking variant of SDL_SemWait(), returns 0 if the wait succeeds, + # SDL_MUTEX_TIMEDOUT if the wait would block, and -1 on error. +proc SDL_SemTryWait*(sem: PSDL_sem): int{.cdecl, importc, dynlib: SDLLibName.} + # Variant of SDL_SemWait() with a timeout in milliseconds, returns 0 if + # the wait succeeds, SDL_MUTEX_TIMEDOUT if the wait does not succeed in + # the allotted time, and -1 on error. + # On some platforms this function is implemented by looping with a delay + # of 1 ms, and so should be avoided if possible. +proc SDL_SemWaitTimeout*(sem: PSDL_sem, ms: UInt32): int{.cdecl, + importc, dynlib: SDLLibName.} + # Atomically increases the semaphore's count (not blocking), returns 0, + # or -1 on error. +proc SDL_SemPost*(sem: PSDL_sem): int{.cdecl, importc, dynlib: SDLLibName.} + # Returns the current count of the semaphore +proc SDL_SemValue*(sem: PSDL_sem): UInt32{.cdecl, importc, dynlib: SDLLibName.} + # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + # Condition variable functions + # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + # Create a condition variable +proc SDL_CreateCond*(): PSDL_Cond{.cdecl, importc, dynlib: SDLLibName.} + # Destroy a condition variable +proc SDL_DestroyCond*(cond: PSDL_Cond){.cdecl, importc, dynlib: SDLLibName.} + # Restart one of the threads that are waiting on the condition variable, + # returns 0 or -1 on error. +proc SDL_CondSignal*(cond: PSDL_cond): int{.cdecl, importc, dynlib: SDLLibName.} + # Restart all threads that are waiting on the condition variable, + # returns 0 or -1 on error. +proc SDL_CondBroadcast*(cond: PSDL_cond): int{.cdecl, importc, dynlib: SDLLibName.} + # Wait on the condition variable, unlocking the provided mutex. + # The mutex must be locked before entering this function! + # Returns 0 when it is signaled, or -1 on error. +proc SDL_CondWait*(cond: PSDL_cond, mut: PSDL_mutex): int{.cdecl, + importc, dynlib: SDLLibName.} + # Waits for at most 'ms' milliseconds, and returns 0 if the condition + # variable is signaled, SDL_MUTEX_TIMEDOUT if the condition is not + # signaled in the allotted time, and -1 on error. + # On some platforms this function is implemented by looping with a delay + # of 1 ms, and so should be avoided if possible. +proc SDL_CondWaitTimeout*(cond: PSDL_cond, mut: PSDL_mutex, ms: UInt32): int{. + cdecl, importc, dynlib: SDLLibName.} + # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + # Condition variable functions + # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + # Create a thread +proc SDL_CreateThread*(fn: PInt, data: Pointer): PSDL_Thread{.cdecl, + importc, dynlib: SDLLibName.} + # Get the 32-bit thread identifier for the current thread +proc SDL_ThreadID*(): UInt32{.cdecl, importc, dynlib: SDLLibName.} + # Get the 32-bit thread identifier for the specified thread, + # equivalent to SDL_ThreadID() if the specified thread is NULL. +proc SDL_GetThreadID*(thread: PSDL_Thread): UInt32{.cdecl, importc, dynlib: SDLLibName.} + # Wait for a thread to finish. + # The return code for the thread function is placed in the area + # pointed to by 'status', if 'status' is not NULL. +proc SDL_WaitThread*(thread: PSDL_Thread, status: var int){.cdecl, + importc, dynlib: SDLLibName.} + # Forcefully kill a thread without worrying about its state +proc SDL_KillThread*(thread: PSDL_Thread){.cdecl, importc, dynlib: SDLLibName.} + #------------------------------------------------------------------------------ + # Get Environment Routines + #------------------------------------------------------------------------------ + #* + # * This function gives you custom hooks into the window manager information. + # * It fills the structure pointed to by 'info' with custom information and + # * returns 1 if the function is implemented. If it's not implemented, or + # * the version member of the 'info' structure is invalid, it returns 0. + # * +proc SDL_GetWMInfo*(info: PSDL_SysWMinfo): int{.cdecl, importc, dynlib: SDLLibName.} + #------------------------------------------------------------------------------ + #SDL_loadso.h + #* This function dynamically loads a shared object and returns a pointer + # * to the object handle (or NULL if there was an error). + # * The 'sofile' parameter is a system dependent name of the object file. + # * +proc SDL_LoadObject*(sofile: cstring): Pointer{.cdecl, importc, dynlib: SDLLibName.} + #* Given an object handle, this function looks up the address of the + # * named function in the shared object and returns it. This address + # * is no longer valid after calling SDL_UnloadObject(). + # * +proc SDL_LoadFunction*(handle: Pointer, name: cstring): Pointer{.cdecl, + importc, dynlib: SDLLibName.} + #* Unload a shared object from memory * +proc SDL_UnloadObject*(handle: Pointer){.cdecl, importc, dynlib: SDLLibName.} + #------------------------------------------------------------------------------ +proc SDL_Swap32*(D: Uint32): Uint32 + # Bitwise Checking functions +proc IsBitOn*(value: int, bit: int8): bool +proc TurnBitOn*(value: int, bit: int8): int +proc TurnBitOff*(value: int, bit: int8): int +# implementation + +proc SDL_TABLESIZE(table: cstring): int = + Result = SizeOf(table) div SizeOf(table[0]) + +proc SDL_OutOfMemory() = + when not(defined(WINDOWS)): SDL_Error(SDL_ENOMEM) + +proc SDL_RWSeek(context: PSDL_RWops, offset: int, whence: int): int = + Result = context.seek(context, offset, whence) + +proc SDL_RWTell(context: PSDL_RWops): int = + Result = context.seek(context, 0, 1) + +proc SDL_RWRead(context: PSDL_RWops, theptr: Pointer, size: int, n: int): int = + Result = context.read(context, theptr, size, n) + +proc SDL_RWWrite(context: PSDL_RWops, theptr: Pointer, size: int, n: int): int = + Result = context.write(context, theptr, size, n) + +proc SDL_RWClose(context: PSDL_RWops): int = + Result = context.closeFile(context) + +proc SDL_LoadWAV(filename: cstring, spec: PSDL_AudioSpec, audio_buf: PUInt8, + audiolen: PUInt32): PSDL_AudioSpec = + Result = SDL_LoadWAV_RW(SDL_RWFromFile(filename, "rb"), 1, spec, audio_buf, + audiolen) + +proc SDL_CDInDrive(status: TSDL_CDStatus): bool = + Result = ord(status) > ord(CD_ERROR) + +proc FRAMES_TO_MSF(frames: int, M: var int, S: var int, F: var int) = + var value: int + value = frames + F = value mod CD_FPS + value = value div CD_FPS + S = value mod 60 + value = value div 60 + M = value + +proc MSF_TO_FRAMES(M: int, S: int, F: int): int = + Result = M * 60 * CD_FPS + S * CD_FPS + F + +proc SDL_VERSION(X: var TSDL_Version) = + X.major = SDL_MAJOR_VERSION + X.minor = SDL_MINOR_VERSION + X.patch = SDL_PATCHLEVEL + +proc SDL_VERSIONNUM(X, Y, Z: int): int = + Result = X * 1000 + Y * 100 + Z + +proc SDL_COMPILEDVERSION(): int = + Result = SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL) + +proc SDL_VERSION_ATLEAST(X, Y, Z: int): bool = + Result = (SDL_COMPILEDVERSION() >= SDL_VERSIONNUM(X, Y, Z)) + +proc SDL_LoadBMP(filename: cstring): PSDL_Surface = + Result = SDL_LoadBMP_RW(SDL_RWFromFile(filename, "rb"), 1) + +proc SDL_SaveBMP(surface: PSDL_Surface, filename: cstring): int = + Result = SDL_SaveBMP_RW(surface, SDL_RWFromFile(filename, "wb"), 1) + +proc SDL_BlitSurface(src: PSDL_Surface, srcrect: PSDL_Rect, dst: PSDL_Surface, + dstrect: PSDL_Rect): int = + Result = SDL_UpperBlit(src, srcrect, dst, dstrect) + +proc SDL_AllocSurface(flags: UInt32, width, height, depth: int, + RMask, GMask, BMask, AMask: UInt32): PSDL_Surface = + Result = SDL_CreateRGBSurface(flags, width, height, depth, RMask, GMask, + BMask, AMask) + +proc SDL_MustLock(Surface: PSDL_Surface): bool = + Result = ((surface^ .offset != 0) or + ((surface^ .flags and (SDL_HWSURFACE or SDL_ASYNCBLIT or SDL_RLEACCEL)) != + 0)) + +proc SDL_LockMutex(mutex: PSDL_mutex): int = + Result = SDL_mutexP(mutex) + +proc SDL_UnlockMutex(mutex: PSDL_mutex): int = + Result = SDL_mutexV(mutex) + +proc SDL_BUTTON(Button: int): int = + Result = SDL_PRESSED shl (Button - 1) + +proc SDL_Swap32(D: Uint32): Uint32 = + Result = ((D shl 24) or ((D shl 8) and 0x00FF0000) or + ((D shr 8) and 0x0000FF00) or (D shr 24)) + +proc IsBitOn(value: int, bit: int8): bool = + result = ((value and (1 shl ze(bit))) != 0) + +proc TurnBitOn(value: int, bit: int8): int = + result = (value or (1 shl ze(bit))) + +proc TurnBitOff(value: int, bit: int8): int = + result = (value and not (1 shl ze(bit))) diff --git a/lib/oldwrappers/sdl/sdl_gfx.nim b/lib/oldwrappers/sdl/sdl_gfx.nim new file mode 100644 index 000000000..8ae8eca0b --- /dev/null +++ b/lib/oldwrappers/sdl/sdl_gfx.nim @@ -0,0 +1,421 @@ + +# +# $Id: sdl_gfx.pas,v 1.3 2007/05/29 21:31:04 savage Exp $ +# +# +# +# $Log: sdl_gfx.pas,v $ +# Revision 1.3 2007/05/29 21:31:04 savage +# Changes as suggested by Almindor for 64bit compatibility. +# +# Revision 1.2 2007/05/20 20:30:18 savage +# Initial Changes to Handle 64 Bits +# +# Revision 1.1 2005/01/03 19:08:32 savage +# Header for the SDL_Gfx library. +# +# +# +# + +import + sdl + +when defined(windows): + const SDLgfxLibName = "SDL_gfx.dll" +elif defined(macosx): + const SDLgfxLibName = "libSDL_gfx.dylib" +else: + const SDLgfxLibName = "libSDL_gfx.so" + +const # Some rates in Hz + FPS_UPPER_LIMIT* = 200 + FPS_LOWER_LIMIT* = 1 + FPS_DEFAULT* = 30 # ---- Defines + SMOOTHING_OFF* = 0 + SMOOTHING_ON* = 1 + +type + PFPSmanager* = ptr TFPSmanager + TFPSmanager*{.final.} = object # ---- Structures + framecount*: Uint32 + rateticks*: float32 + lastticks*: Uint32 + rate*: Uint32 + + PColorRGBA* = ptr TColorRGBA + TColorRGBA*{.final.} = object + r*: Uint8 + g*: Uint8 + b*: Uint8 + a*: Uint8 + + PColorY* = ptr TColorY + TColorY*{.final.} = object # + # + # SDL_framerate: framerate manager + # + # LGPL (c) A. Schiffler + # + # + y*: Uint8 + + +proc SDL_initFramerate*(manager: PFPSmanager){.cdecl, importc, dynlib: SDLgfxLibName.} +proc SDL_setFramerate*(manager: PFPSmanager, rate: int): int{.cdecl, + importc, dynlib: SDLgfxLibName.} +proc SDL_getFramerate*(manager: PFPSmanager): int{.cdecl, importc, dynlib: SDLgfxLibName.} +proc SDL_framerateDelay*(manager: PFPSmanager){.cdecl, importc, dynlib: SDLgfxLibName.} + # + # + # SDL_gfxPrimitives: graphics primitives for SDL + # + # LGPL (c) A. Schiffler + # + # + # Note: all ___Color routines expect the color to be in format 0xRRGGBBAA + # Pixel +proc pixelColor*(dst: PSDL_Surface, x: Sint16, y: Sint16, color: Uint32): int{. + cdecl, importc, dynlib: SDLgfxLibName.} +proc pixelRGBA*(dst: PSDL_Surface, x: Sint16, y: Sint16, r: Uint8, g: Uint8, + b: Uint8, a: Uint8): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # Horizontal line +proc hlineColor*(dst: PSDL_Surface, x1: Sint16, x2: Sint16, y: Sint16, + color: Uint32): int{.cdecl, importc, dynlib: SDLgfxLibName.} +proc hlineRGBA*(dst: PSDL_Surface, x1: Sint16, x2: Sint16, y: Sint16, r: Uint8, + g: Uint8, b: Uint8, a: Uint8): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # Vertical line +proc vlineColor*(dst: PSDL_Surface, x: Sint16, y1: Sint16, y2: Sint16, + color: Uint32): int{.cdecl, importc, dynlib: SDLgfxLibName.} +proc vlineRGBA*(dst: PSDL_Surface, x: Sint16, y1: Sint16, y2: Sint16, r: Uint8, + g: Uint8, b: Uint8, a: Uint8): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # Rectangle +proc rectangleColor*(dst: PSDL_Surface, x1: Sint16, y1: Sint16, x2: Sint16, + y2: Sint16, color: Uint32): int{.cdecl, + importc, dynlib: SDLgfxLibName.} +proc rectangleRGBA*(dst: PSDL_Surface, x1: Sint16, y1: Sint16, x2: Sint16, + y2: Sint16, r: Uint8, g: Uint8, b: Uint8, a: Uint8): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # Filled rectangle (Box) +proc boxColor*(dst: PSDL_Surface, x1: Sint16, y1: Sint16, x2: Sint16, + y2: Sint16, color: Uint32): int{.cdecl, importc, dynlib: SDLgfxLibName.} +proc boxRGBA*(dst: PSDL_Surface, x1: Sint16, y1: Sint16, x2: Sint16, y2: Sint16, + r: Uint8, g: Uint8, b: Uint8, a: Uint8): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # Line +proc lineColor*(dst: PSDL_Surface, x1: Sint16, y1: Sint16, x2: Sint16, + y2: Sint16, color: Uint32): int{.cdecl, importc, dynlib: SDLgfxLibName.} +proc lineRGBA*(dst: PSDL_Surface, x1: Sint16, y1: Sint16, x2: Sint16, + y2: Sint16, r: Uint8, g: Uint8, b: Uint8, a: Uint8): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # AA Line +proc aalineColor*(dst: PSDL_Surface, x1: Sint16, y1: Sint16, x2: Sint16, + y2: Sint16, color: Uint32): int{.cdecl, importc, dynlib: SDLgfxLibName.} +proc aalineRGBA*(dst: PSDL_Surface, x1: Sint16, y1: Sint16, x2: Sint16, + y2: Sint16, r: Uint8, g: Uint8, b: Uint8, a: Uint8): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # Circle +proc circleColor*(dst: PSDL_Surface, x: Sint16, y: Sint16, r: Sint16, + color: Uint32): int{.cdecl, importc, dynlib: SDLgfxLibName.} +proc circleRGBA*(dst: PSDL_Surface, x: Sint16, y: Sint16, rad: Sint16, r: Uint8, + g: Uint8, b: Uint8, a: Uint8): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # AA Circle +proc aacircleColor*(dst: PSDL_Surface, x: Sint16, y: Sint16, r: Sint16, + color: Uint32): int{.cdecl, importc, dynlib: SDLgfxLibName.} +proc aacircleRGBA*(dst: PSDL_Surface, x: Sint16, y: Sint16, rad: Sint16, + r: Uint8, g: Uint8, b: Uint8, a: Uint8): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # Filled Circle +proc filledCircleColor*(dst: PSDL_Surface, x: Sint16, y: Sint16, r: Sint16, + color: Uint32): int{.cdecl, importc, dynlib: SDLgfxLibName.} +proc filledCircleRGBA*(dst: PSDL_Surface, x: Sint16, y: Sint16, rad: Sint16, + r: Uint8, g: Uint8, b: Uint8, a: Uint8): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # Ellipse +proc ellipseColor*(dst: PSDL_Surface, x: Sint16, y: Sint16, rx: Sint16, + ry: Sint16, color: Uint32): int{.cdecl, importc, dynlib: SDLgfxLibName.} +proc ellipseRGBA*(dst: PSDL_Surface, x: Sint16, y: Sint16, rx: Sint16, + ry: Sint16, r: Uint8, g: Uint8, b: Uint8, a: Uint8): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # AA Ellipse +proc aaellipseColor*(dst: PSDL_Surface, xc: Sint16, yc: Sint16, rx: Sint16, + ry: Sint16, color: Uint32): int{.cdecl, + importc, dynlib: SDLgfxLibName.} +proc aaellipseRGBA*(dst: PSDL_Surface, x: Sint16, y: Sint16, rx: Sint16, + ry: Sint16, r: Uint8, g: Uint8, b: Uint8, a: Uint8): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # Filled Ellipse +proc filledEllipseColor*(dst: PSDL_Surface, x: Sint16, y: Sint16, rx: Sint16, + ry: Sint16, color: Uint32): int{.cdecl, + importc, dynlib: SDLgfxLibName.} +proc filledEllipseRGBA*(dst: PSDL_Surface, x: Sint16, y: Sint16, rx: Sint16, + ry: Sint16, r: Uint8, g: Uint8, b: Uint8, a: Uint8): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # Pie +proc pieColor*(dst: PSDL_Surface, x: Sint16, y: Sint16, rad: Sint16, + start: Sint16, finish: Sint16, color: Uint32): int{.cdecl, + importc, dynlib: SDLgfxLibName.} +proc pieRGBA*(dst: PSDL_Surface, x: Sint16, y: Sint16, rad: Sint16, + start: Sint16, finish: Sint16, r: Uint8, g: Uint8, b: Uint8, + a: Uint8): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # Filled Pie +proc filledPieColor*(dst: PSDL_Surface, x: Sint16, y: Sint16, rad: Sint16, + start: Sint16, finish: Sint16, color: Uint32): int{.cdecl, + importc, dynlib: SDLgfxLibName.} +proc filledPieRGBA*(dst: PSDL_Surface, x: Sint16, y: Sint16, rad: Sint16, + start: Sint16, finish: Sint16, r: Uint8, g: Uint8, b: Uint8, + a: Uint8): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # Trigon +proc trigonColor*(dst: PSDL_Surface, x1: Sint16, y1: Sint16, x2: Sint16, + y2: Sint16, x3: Sint16, y3: Sint16, color: Uint32): int{. + cdecl, importc, dynlib: SDLgfxLibName.} +proc trigonRGBA*(dst: PSDL_Surface, x1: Sint16, y1: Sint16, x2: Sint16, + y2: Sint16, x3: Sint16, y3: Sint16, r: Uint8, g: Uint8, + b: Uint8, a: Uint8): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # AA-Trigon +proc aatrigonColor*(dst: PSDL_Surface, x1: Sint16, y1: Sint16, x2: Sint16, + y2: Sint16, x3: Sint16, y3: Sint16, color: Uint32): int{. + cdecl, importc, dynlib: SDLgfxLibName.} +proc aatrigonRGBA*(dst: PSDL_Surface, x1: Sint16, y1: Sint16, x2: Sint16, + y2: Sint16, x3: Sint16, y3: Sint16, r: Uint8, g: Uint8, + b: Uint8, a: Uint8): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # Filled Trigon +proc filledTrigonColor*(dst: PSDL_Surface, x1: Sint16, y1: Sint16, x2: Sint16, + y2: Sint16, x3: Sint16, y3: Sint16, color: Uint32): int{. + cdecl, importc, dynlib: SDLgfxLibName.} +proc filledTrigonRGBA*(dst: PSDL_Surface, x1: Sint16, y1: Sint16, x2: Sint16, + y2: Sint16, x3: Sint16, y3: Sint16, r: Uint8, g: Uint8, + b: Uint8, a: Uint8): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # Polygon +proc polygonColor*(dst: PSDL_Surface, vx: PSint16, vy: PSint16, n: int, + color: Uint32): int{.cdecl, importc, dynlib: SDLgfxLibName.} +proc polygonRGBA*(dst: PSDL_Surface, vx: PSint16, vy: PSint16, n: int, r: Uint8, + g: Uint8, b: Uint8, a: Uint8): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # AA-Polygon +proc aapolygonColor*(dst: PSDL_Surface, vx: PSint16, vy: PSint16, n: int, + color: Uint32): int{.cdecl, importc, dynlib: SDLgfxLibName.} +proc aapolygonRGBA*(dst: PSDL_Surface, vx: PSint16, vy: PSint16, n: int, + r: Uint8, g: Uint8, b: Uint8, a: Uint8): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # Filled Polygon +proc filledPolygonColor*(dst: PSDL_Surface, vx: PSint16, vy: PSint16, n: int, + color: Uint32): int{.cdecl, importc, dynlib: SDLgfxLibName.} +proc filledPolygonRGBA*(dst: PSDL_Surface, vx: PSint16, vy: PSint16, n: int, + r: Uint8, g: Uint8, b: Uint8, a: Uint8): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # Bezier + # s = number of steps +proc bezierColor*(dst: PSDL_Surface, vx: PSint16, vy: PSint16, n: int, s: int, + color: Uint32): int{.cdecl, importc, dynlib: SDLgfxLibName.} +proc bezierRGBA*(dst: PSDL_Surface, vx: PSint16, vy: PSint16, n: int, s: int, + r: Uint8, g: Uint8, b: Uint8, a: Uint8): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # Characters/Strings +proc characterColor*(dst: PSDL_Surface, x: Sint16, y: Sint16, c: char, + color: Uint32): int{.cdecl, importc, dynlib: SDLgfxLibName.} +proc characterRGBA*(dst: PSDL_Surface, x: Sint16, y: Sint16, c: char, r: Uint8, + g: Uint8, b: Uint8, a: Uint8): int{.cdecl, + importc, dynlib: SDLgfxLibName.} +proc stringColor*(dst: PSDL_Surface, x: Sint16, y: Sint16, c: cstring, + color: Uint32): int{.cdecl, importc, dynlib: SDLgfxLibName.} +proc stringRGBA*(dst: PSDL_Surface, x: Sint16, y: Sint16, c: cstring, r: Uint8, + g: Uint8, b: Uint8, a: Uint8): int{.cdecl, + importc, dynlib: SDLgfxLibName.} +proc gfxPrimitivesSetFont*(fontdata: Pointer, cw: int, ch: int){.cdecl, + importc, dynlib: SDLgfxLibName.} + # + # + # SDL_imageFilter - bytes-image "filter" routines + # (uses inline x86 MMX optimizations if available) + # + # LGPL (c) A. Schiffler + # + # + # Comments: + # 1.) MMX functions work best if all data blocks are aligned on a 32 bytes boundary. + # 2.) Data that is not within an 8 byte boundary is processed using the C routine. + # 3.) Convolution routines do not have C routines at this time. + # Detect MMX capability in CPU +proc SDL_imageFilterMMXdetect*(): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # Force use of MMX off (or turn possible use back on) +proc SDL_imageFilterMMXoff*(){.cdecl, importc, dynlib: SDLgfxLibName.} +proc SDL_imageFilterMMXon*(){.cdecl, importc, dynlib: SDLgfxLibName.} + # + # All routines return: + # 0 OK + # -1 Error (internal error, parameter error) + # + # SDL_imageFilterAdd: D = saturation255(S1 + S2) +proc SDL_imageFilterAdd*(Src1: cstring, Src2: cstring, Dest: cstring, len: int): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterMean: D = S1/2 + S2/2 +proc SDL_imageFilterMean*(Src1: cstring, Src2: cstring, Dest: cstring, len: int): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterSub: D = saturation0(S1 - S2) +proc SDL_imageFilterSub*(Src1: cstring, Src2: cstring, Dest: cstring, len: int): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterAbsDiff: D = | S1 - S2 | +proc SDL_imageFilterAbsDiff*(Src1: cstring, Src2: cstring, Dest: cstring, + len: int): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterMult: D = saturation(S1 * S2) +proc SDL_imageFilterMult*(Src1: cstring, Src2: cstring, Dest: cstring, len: int): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterMultNor: D = S1 * S2 (non-MMX) +proc SDL_imageFilterMultNor*(Src1: cstring, Src2: cstring, Dest: cstring, + len: int): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterMultDivby2: D = saturation255(S1/2 * S2) +proc SDL_imageFilterMultDivby2*(Src1: cstring, Src2: cstring, Dest: cstring, + len: int): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterMultDivby4: D = saturation255(S1/2 * S2/2) +proc SDL_imageFilterMultDivby4*(Src1: cstring, Src2: cstring, Dest: cstring, + len: int): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterBitAnd: D = S1 & S2 +proc SDL_imageFilterBitAnd*(Src1: cstring, Src2: cstring, Dest: cstring, + len: int): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterBitOr: D = S1 | S2 +proc SDL_imageFilterBitOr*(Src1: cstring, Src2: cstring, Dest: cstring, len: int): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterDiv: D = S1 / S2 (non-MMX) +proc SDL_imageFilterDiv*(Src1: cstring, Src2: cstring, Dest: cstring, len: int): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterBitNegation: D = !S +proc SDL_imageFilterBitNegation*(Src1: cstring, Dest: cstring, len: int): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterAddByte: D = saturation255(S + C) +proc SDL_imageFilterAddByte*(Src1: cstring, Dest: cstring, len: int, C: char): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterAddUint: D = saturation255(S + (uint)C) +proc SDL_imageFilterAddUint*(Src1: cstring, Dest: cstring, len: int, C: int): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterAddByteToHalf: D = saturation255(S/2 + C) +proc SDL_imageFilterAddByteToHalf*(Src1: cstring, Dest: cstring, len: int, + C: char): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterSubByte: D = saturation0(S - C) +proc SDL_imageFilterSubByte*(Src1: cstring, Dest: cstring, len: int, C: char): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterSubUint: D = saturation0(S - (uint)C) +proc SDL_imageFilterSubUint*(Src1: cstring, Dest: cstring, len: int, C: int): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterShiftRight: D = saturation0(S >> N) +proc SDL_imageFilterShiftRight*(Src1: cstring, Dest: cstring, len: int, N: char): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterShiftRightUint: D = saturation0((uint)S >> N) +proc SDL_imageFilterShiftRightUint*(Src1: cstring, Dest: cstring, len: int, + N: char): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterMultByByte: D = saturation255(S * C) +proc SDL_imageFilterMultByByte*(Src1: cstring, Dest: cstring, len: int, C: char): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterShiftRightAndMultByByte: D = saturation255((S >> N) * C) +proc SDL_imageFilterShiftRightAndMultByByte*(Src1: cstring, Dest: cstring, + len: int, N: char, C: char): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterShiftLeftByte: D = (S << N) +proc SDL_imageFilterShiftLeftByte*(Src1: cstring, Dest: cstring, len: int, + N: char): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterShiftLeftUint: D = ((uint)S << N) +proc SDL_imageFilterShiftLeftUint*(Src1: cstring, Dest: cstring, len: int, + N: char): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterShiftLeft: D = saturation255(S << N) +proc SDL_imageFilterShiftLeft*(Src1: cstring, Dest: cstring, len: int, N: char): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterBinarizeUsingThreshold: D = S >= T ? 255:0 +proc SDL_imageFilterBinarizeUsingThreshold*(Src1: cstring, Dest: cstring, + len: int, T: char): int{.cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterClipToRange: D = (S >= Tmin) & (S <= Tmax) 255:0 +proc SDL_imageFilterClipToRange*(Src1: cstring, Dest: cstring, len: int, + Tmin: int8, Tmax: int8): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterNormalizeLinear: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin) +proc SDL_imageFilterNormalizeLinear*(Src1: cstring, Dest: cstring, len: int, + Cmin: int, Cmax: int, Nmin: int, Nmax: int): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # !!! NO C-ROUTINE FOR THESE FUNCTIONS YET !!! + # SDL_imageFilterConvolveKernel3x3Divide: Dij = saturation0and255( ... ) +proc SDL_imageFilterConvolveKernel3x3Divide*(Src: cstring, Dest: cstring, + rows: int, columns: int, Kernel: PShortInt, Divisor: int8): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterConvolveKernel5x5Divide: Dij = saturation0and255( ... ) +proc SDL_imageFilterConvolveKernel5x5Divide*(Src: cstring, Dest: cstring, + rows: int, columns: int, Kernel: PShortInt, Divisor: int8): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterConvolveKernel7x7Divide: Dij = saturation0and255( ... ) +proc SDL_imageFilterConvolveKernel7x7Divide*(Src: cstring, Dest: cstring, + rows: int, columns: int, Kernel: PShortInt, Divisor: int8): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterConvolveKernel9x9Divide: Dij = saturation0and255( ... ) +proc SDL_imageFilterConvolveKernel9x9Divide*(Src: cstring, Dest: cstring, + rows: int, columns: int, Kernel: PShortInt, Divisor: int8): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterConvolveKernel3x3ShiftRight: Dij = saturation0and255( ... ) +proc SDL_imageFilterConvolveKernel3x3ShiftRight*(Src: cstring, Dest: cstring, + rows: int, columns: int, Kernel: PShortInt, NRightShift: char): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterConvolveKernel5x5ShiftRight: Dij = saturation0and255( ... ) +proc SDL_imageFilterConvolveKernel5x5ShiftRight*(Src: cstring, Dest: cstring, + rows: int, columns: int, Kernel: PShortInt, NRightShift: char): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterConvolveKernel7x7ShiftRight: Dij = saturation0and255( ... ) +proc SDL_imageFilterConvolveKernel7x7ShiftRight*(Src: cstring, Dest: cstring, + rows: int, columns: int, Kernel: PShortInt, NRightShift: char): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterConvolveKernel9x9ShiftRight: Dij = saturation0and255( ... ) +proc SDL_imageFilterConvolveKernel9x9ShiftRight*(Src: cstring, Dest: cstring, + rows: int, columns: int, Kernel: PShortInt, NRightShift: char): int{.cdecl, + importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterSobelX: Dij = saturation255( ... ) +proc SDL_imageFilterSobelX*(Src: cstring, Dest: cstring, rows: int, columns: int): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # SDL_imageFilterSobelXShiftRight: Dij = saturation255( ... ) +proc SDL_imageFilterSobelXShiftRight*(Src: cstring, Dest: cstring, rows: int, + columns: int, NRightShift: char): int{. + cdecl, importc, dynlib: SDLgfxLibName.} + # Align/restore stack to 32 byte boundary -- Functionality untested! -- +proc SDL_imageFilterAlignStack*(){.cdecl, importc, dynlib: SDLgfxLibName.} +proc SDL_imageFilterRestoreStack*(){.cdecl, importc, dynlib: SDLgfxLibName.} + # + # + # SDL_rotozoom - rotozoomer + # + # LGPL (c) A. Schiffler + # + # + # + # + # rotozoomSurface() + # + # Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. + # 'angle' is the rotation in degrees. 'zoom' a scaling factor. If 'smooth' is 1 + # then the destination 32bit surface is anti-aliased. If the surface is not 8bit + # or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. + # + # +proc rotozoomSurface*(src: PSDL_Surface, angle: float64, zoom: float64, + smooth: int): PSDL_Surface{.cdecl, importc, dynlib: SDLgfxLibName.} +proc rotozoomSurfaceXY*(src: PSDL_Surface, angle: float64, zoomx: float64, + zoomy: float64, smooth: int): PSDL_Surface{.cdecl, + importc, dynlib: SDLgfxLibName.} + # Returns the size of the target surface for a rotozoomSurface() call +proc rotozoomSurfaceSize*(width: int, height: int, angle: float64, + zoom: float64, dstwidth: var int, dstheight: var int){. + cdecl, importc, dynlib: SDLgfxLibName.} +proc rotozoomSurfaceSizeXY*(width: int, height: int, angle: float64, + zoomx: float64, zoomy: float64, dstwidth: var int, + dstheight: var int){.cdecl, importc, dynlib: SDLgfxLibName.} + # + # + # zoomSurface() + # + # Zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. + # 'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is 1 + # then the destination 32bit surface is anti-aliased. If the surface is not 8bit + # or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. + # + # +proc zoomSurface*(src: PSDL_Surface, zoomx: float64, zoomy: float64, smooth: int): PSDL_Surface{. + cdecl, importc, dynlib: SDLgfxLibName.} + # Returns the size of the target surface for a zoomSurface() call +proc zoomSurfaceSize*(width: int, height: int, zoomx: float64, zoomy: float64, + dstwidth: var int, dstheight: var int){.cdecl, + importc, dynlib: SDLgfxLibName.} +# implementation diff --git a/lib/oldwrappers/sdl/sdl_image.nim b/lib/oldwrappers/sdl/sdl_image.nim new file mode 100644 index 000000000..a15afd575 --- /dev/null +++ b/lib/oldwrappers/sdl/sdl_image.nim @@ -0,0 +1,227 @@ + +# +# $Id: sdl_image.pas,v 1.14 2007/05/29 21:31:13 savage Exp $ +# +# +#****************************************************************************** +# +# Borland Delphi SDL_Image - An example image loading library for use +# with SDL +# Conversion of the Simple DirectMedia Layer Image Headers +# +# Portions created by Sam Lantinga <slouken@devolution.com> are +# Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga +# 5635-34 Springhouse Dr. +# Pleasanton, CA 94588 (USA) +# +# All Rights Reserved. +# +# The original files are : SDL_image.h +# +# The initial developer of this Pascal code was : +# Matthias Thoma <ma.thoma@gmx.de> +# +# Portions created by Matthias Thoma are +# Copyright (C) 2000 - 2001 Matthias Thoma. +# +# +# Contributor(s) +# -------------- +# Dominique Louis <Dominique@SavageSoftware.com.au> +# +# Obtained through: +# Joint Endeavour of Delphi Innovators ( Project JEDI ) +# +# You may retrieve the latest version of this file at the Project +# JEDI home page, located at http://delphi-jedi.org +# +# The contents of this file are used with permission, subject to +# the Mozilla Public License Version 1.1 (the "License"); you may +# not use this file except in compliance with the License. You may +# obtain a copy of the License at +# http://www.mozilla.org/MPL/MPL-1.1.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# Description +# ----------- +# A simple library to load images of various formats as SDL surfaces +# +# Requires +# -------- +# SDL.pas in your search path. +# +# Programming Notes +# ----------------- +# See the Aliens Demo on how to make use of this libaray +# +# Revision History +# ---------------- +# April 02 2001 - MT : Initial Translation +# +# May 08 2001 - DL : Added ExternalSym derectives and copyright header +# +# April 03 2003 - DL : Added jedi-sdl.inc include file to support more +# Pascal compilers. Initial support is now included +# for GnuPascal, VirtualPascal, TMT and obviously +# continue support for Delphi Kylix and FreePascal. +# +# April 08 2003 - MK : Aka Mr Kroket - Added Better FPC support +# +# April 24 2003 - DL : under instruction from Alexey Barkovoy, I have added +# better TMT Pascal support and under instruction +# from Prof. Abimbola Olowofoyeku (The African Chief), +# I have added better Gnu Pascal support +# +# April 30 2003 - DL : under instruction from David Mears AKA +# Jason Siletto, I have added FPC Linux support. +# This was compiled with fpc 1.1, so remember to set +# include file path. ie. -Fi/usr/share/fpcsrc/rtl/* +# +# +# $Log: sdl_image.pas,v $ +# Revision 1.14 2007/05/29 21:31:13 savage +# Changes as suggested by Almindor for 64bit compatibility. +# +# Revision 1.13 2007/05/20 20:30:54 savage +# Initial Changes to Handle 64 Bits +# +# Revision 1.12 2006/12/02 00:14:40 savage +# Updated to latest version +# +# Revision 1.11 2005/04/10 18:22:59 savage +# Changes as suggested by Michalis, thanks. +# +# Revision 1.10 2005/04/10 11:48:33 savage +# Changes as suggested by Michalis, thanks. +# +# Revision 1.9 2005/01/05 01:47:07 savage +# Changed LibName to reflect what MacOS X should have. ie libSDL*-1.2.0.dylib respectively. +# +# Revision 1.8 2005/01/04 23:14:44 savage +# Changed LibName to reflect what most Linux distros will have. ie libSDL*-1.2.so.0 respectively. +# +# Revision 1.7 2005/01/01 02:03:12 savage +# Updated to v1.2.4 +# +# Revision 1.6 2004/08/14 22:54:30 savage +# Updated so that Library name defines are correctly defined for MacOS X. +# +# Revision 1.5 2004/05/10 14:10:04 savage +# Initial MacOS X support. Fixed defines for MACOS ( Classic ) and DARWIN ( MacOS X ). +# +# Revision 1.4 2004/04/13 09:32:08 savage +# Changed Shared object names back to just the .so extension to avoid conflicts on various Linux/Unix distros. Therefore developers will need to create Symbolic links to the actual Share Objects if necessary. +# +# Revision 1.3 2004/04/01 20:53:23 savage +# Changed Linux Shared Object names so they reflect the Symbolic Links that are created when installing the RPMs from the SDL site. +# +# Revision 1.2 2004/03/30 20:23:28 savage +# Tidied up use of UNIX compiler directive. +# +# Revision 1.1 2004/02/14 23:35:42 savage +# version 1 of sdl_image, sdl_mixer and smpeg. +# +# +# +#****************************************************************************** + +import + sdl + +when defined(windows): + const SDL_ImageLibName = "SDL_Image.dll" +elif defined(macosx): + const SDL_ImageLibName = "libSDL_image-1.2.0.dylib" +else: + const SDL_ImageLibName = "libSDL_image.so" + +const + SDL_IMAGE_MAJOR_VERSION* = 1'i8 + SDL_IMAGE_MINOR_VERSION* = 2'i8 + SDL_IMAGE_PATCHLEVEL* = 5'i8 + +# This macro can be used to fill a version structure with the compile-time +# version of the SDL_image library. + +proc SDL_IMAGE_VERSION*(X: var TSDL_Version) + # This function gets the version of the dynamically linked SDL_image library. + # it should NOT be used to fill a version structure, instead you should + # use the SDL_IMAGE_VERSION() macro. + # +proc IMG_Linked_Version*(): PSDL_version{.importc, dynlib: SDL_ImageLibName.} + # Load an image from an SDL data source. + # The 'type' may be one of: "BMP", "GIF", "PNG", etc. + # + # If the image format supports a transparent pixel, SDL will set the + # colorkey for the surface. You can enable RLE acceleration on the + # surface afterwards by calling: + # SDL_SetColorKey(image, SDL_RLEACCEL, image.format.colorkey); + # +proc IMG_LoadTyped_RW*(src: PSDL_RWops, freesrc: int, theType: cstring): PSDL_Surface{. + cdecl, importc, dynlib: SDL_ImageLibName.} + # Convenience functions +proc IMG_Load*(theFile: cstring): PSDL_Surface{.cdecl, importc, dynlib: SDL_ImageLibName.} +proc IMG_Load_RW*(src: PSDL_RWops, freesrc: int): PSDL_Surface{.cdecl, + importc, dynlib: SDL_ImageLibName.} + # Invert the alpha of a surface for use with OpenGL + # This function is now a no-op, and only provided for backwards compatibility. +proc IMG_InvertAlpha*(theOn: int): int{.cdecl, importc, dynlib: SDL_ImageLibName.} + # Functions to detect a file type, given a seekable source +proc IMG_isBMP*(src: PSDL_RWops): int{.cdecl, importc, dynlib: SDL_ImageLibName.} +proc IMG_isGIF*(src: PSDL_RWops): int{.cdecl, importc, dynlib: SDL_ImageLibName.} +proc IMG_isJPG*(src: PSDL_RWops): int{.cdecl, importc, dynlib: SDL_ImageLibName.} +proc IMG_isLBM*(src: PSDL_RWops): int{.cdecl, importc, dynlib: SDL_ImageLibName.} +proc IMG_isPCX*(src: PSDL_RWops): int{.cdecl, importc, dynlib: SDL_ImageLibName.} +proc IMG_isPNG*(src: PSDL_RWops): int{.cdecl, importc, dynlib: SDL_ImageLibName.} +proc IMG_isPNM*(src: PSDL_RWops): int{.cdecl, importc, dynlib: SDL_ImageLibName.} +proc IMG_isTIF*(src: PSDL_RWops): int{.cdecl, importc, dynlib: SDL_ImageLibName.} +proc IMG_isXCF*(src: PSDL_RWops): int{.cdecl, importc, dynlib: SDL_ImageLibName.} +proc IMG_isXPM*(src: PSDL_RWops): int{.cdecl, importc, dynlib: SDL_ImageLibName.} +proc IMG_isXV*(src: PSDL_RWops): int{.cdecl, importc, dynlib: SDL_ImageLibName.} + # Individual loading functions +proc IMG_LoadBMP_RW*(src: PSDL_RWops): PSDL_Surface{.cdecl, + importc, dynlib: SDL_ImageLibName.} +proc IMG_LoadGIF_RW*(src: PSDL_RWops): PSDL_Surface{.cdecl, + importc, dynlib: SDL_ImageLibName.} +proc IMG_LoadJPG_RW*(src: PSDL_RWops): PSDL_Surface{.cdecl, + importc, dynlib: SDL_ImageLibName.} +proc IMG_LoadLBM_RW*(src: PSDL_RWops): PSDL_Surface{.cdecl, + importc, dynlib: SDL_ImageLibName.} +proc IMG_LoadPCX_RW*(src: PSDL_RWops): PSDL_Surface{.cdecl, + importc, dynlib: SDL_ImageLibName.} +proc IMG_LoadPNM_RW*(src: PSDL_RWops): PSDL_Surface{.cdecl, + importc, dynlib: SDL_ImageLibName.} +proc IMG_LoadPNG_RW*(src: PSDL_RWops): PSDL_Surface{.cdecl, + importc, dynlib: SDL_ImageLibName.} +proc IMG_LoadTGA_RW*(src: PSDL_RWops): PSDL_Surface{.cdecl, + importc, dynlib: SDL_ImageLibName.} +proc IMG_LoadTIF_RW*(src: PSDL_RWops): PSDL_Surface{.cdecl, + importc, dynlib: SDL_ImageLibName.} +proc IMG_LoadXCF_RW*(src: PSDL_RWops): PSDL_Surface{.cdecl, + importc, dynlib: SDL_ImageLibName.} +proc IMG_LoadXPM_RW*(src: PSDL_RWops): PSDL_Surface{.cdecl, + importc, dynlib: SDL_ImageLibName.} +proc IMG_LoadXV_RW*(src: PSDL_RWops): PSDL_Surface{.cdecl, + importc, dynlib: SDL_ImageLibName.} +proc IMG_ReadXPMFromArray*(xpm: cstringArray): PSDL_Surface{.cdecl, + importc, dynlib: SDL_ImageLibName.} + # Error Macros + # We'll use SDL for reporting errors +proc IMG_SetError*(fmt: cstring) +proc IMG_GetError*(): cstring +# implementation + +proc SDL_IMAGE_VERSION(X: var TSDL_Version) = + X.major = SDL_IMAGE_MAJOR_VERSION + X.minor = SDL_IMAGE_MINOR_VERSION + X.patch = SDL_IMAGE_PATCHLEVEL + +proc IMG_SetError(fmt: cstring) = + SDL_SetError(fmt) + +proc IMG_GetError(): cstring = + result = SDL_GetError() diff --git a/lib/oldwrappers/sdl/sdl_mixer.nim b/lib/oldwrappers/sdl/sdl_mixer.nim new file mode 100644 index 000000000..a17ef09d4 --- /dev/null +++ b/lib/oldwrappers/sdl/sdl_mixer.nim @@ -0,0 +1,737 @@ + +#****************************************************************************** +# +# $Id: sdl_mixer.pas,v 1.18 2007/05/29 21:31:44 savage Exp $ +# +# +# +# Borland Delphi SDL_Mixer - Simple DirectMedia Layer Mixer Library +# Conversion of the Simple DirectMedia Layer Headers +# +# Portions created by Sam Lantinga <slouken@devolution.com> are +# Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga +# 5635-34 Springhouse Dr. +# Pleasanton, CA 94588 (USA) +# +# All Rights Reserved. +# +# The original files are : SDL_mixer.h +# music_cmd.h +# wavestream.h +# timidity.h +# playmidi.h +# music_ogg.h +# mikmod.h +# +# The initial developer of this Pascal code was : +# Dominqiue Louis <Dominique@SavageSoftware.com.au> +# +# Portions created by Dominqiue Louis are +# Copyright (C) 2000 - 2001 Dominqiue Louis. +# +# +# Contributor(s) +# -------------- +# Matthias Thoma <ma.thoma@gmx.de> +# +# Obtained through: +# Joint Endeavour of Delphi Innovators ( Project JEDI ) +# +# You may retrieve the latest version of this file at the Project +# JEDI home page, located at http://delphi-jedi.org +# +# The contents of this file are used with permission, subject to +# the Mozilla Public License Version 1.1 (the "License"); you may +# not use this file except in compliance with the License. You may +# obtain a copy of the License at +# http://www.mozilla.org/MPL/MPL-1.1.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# Description +# ----------- +# +# +# +# +# +# +# +# Requires +# -------- +# SDL.pas & SMPEG.pas somewhere within your search path. +# +# Programming Notes +# ----------------- +# See the Aliens Demo to see how this library is used +# +# Revision History +# ---------------- +# April 02 2001 - DL : Initial Translation +# +# February 02 2002 - DL : Update to version 1.2.1 +# +# April 03 2003 - DL : Added jedi-sdl.inc include file to support more +# Pascal compilers. Initial support is now included +# for GnuPascal, VirtualPascal, TMT and obviously +# continue support for Delphi Kylix and FreePascal. +# +# April 24 2003 - DL : under instruction from Alexey Barkovoy, I have added +# better TMT Pascal support and under instruction +# from Prof. Abimbola Olowofoyeku (The African Chief), +# I have added better Gnu Pascal support +# +# April 30 2003 - DL : under instruction from David Mears AKA +# Jason Siletto, I have added FPC Linux support. +# This was compiled with fpc 1.1, so remember to set +# include file path. ie. -Fi/usr/share/fpcsrc/rtl/* +# +# +# $Log: sdl_mixer.pas,v $ +# Revision 1.18 2007/05/29 21:31:44 savage +# Changes as suggested by Almindor for 64bit compatibility. +# +# Revision 1.17 2007/05/20 20:31:17 savage +# Initial Changes to Handle 64 Bits +# +# Revision 1.16 2006/12/02 00:16:17 savage +# Updated to latest version +# +# Revision 1.15 2005/04/10 11:48:33 savage +# Changes as suggested by Michalis, thanks. +# +# Revision 1.14 2005/02/24 20:20:07 savage +# Changed definition of MusicType and added GetMusicType function +# +# Revision 1.13 2005/01/05 01:47:09 savage +# Changed LibName to reflect what MacOS X should have. ie libSDL*-1.2.0.dylib respectively. +# +# Revision 1.12 2005/01/04 23:14:56 savage +# Changed LibName to reflect what most Linux distros will have. ie libSDL*-1.2.so.0 respectively. +# +# Revision 1.11 2005/01/01 02:05:19 savage +# Updated to v1.2.6 +# +# Revision 1.10 2004/09/12 21:45:17 savage +# Robert Reed spotted that Mix_SetMusicPosition was missing from the conversion, so this has now been added. +# +# Revision 1.9 2004/08/27 21:48:24 savage +# IFDEFed out Smpeg support on MacOS X +# +# Revision 1.8 2004/08/14 22:54:30 savage +# Updated so that Library name defines are correctly defined for MacOS X. +# +# Revision 1.7 2004/05/10 14:10:04 savage +# Initial MacOS X support. Fixed defines for MACOS ( Classic ) and DARWIN ( MacOS X ). +# +# Revision 1.6 2004/04/13 09:32:08 savage +# Changed Shared object names back to just the .so extension to avoid conflicts on various Linux/Unix distros. Therefore developers will need to create Symbolic links to the actual Share Objects if necessary. +# +# Revision 1.5 2004/04/01 20:53:23 savage +# Changed Linux Shared Object names so they reflect the Symbolic Links that are created when installing the RPMs from the SDL site. +# +# Revision 1.4 2004/03/31 22:20:02 savage +# Windows unit not used in this file, so it was removed to keep the code tidy. +# +# Revision 1.3 2004/03/31 10:05:08 savage +# Better defines for Endianess under FreePascal and Borland compilers. +# +# Revision 1.2 2004/03/30 20:23:28 savage +# Tidied up use of UNIX compiler directive. +# +# Revision 1.1 2004/02/14 23:35:42 savage +# version 1 of sdl_image, sdl_mixer and smpeg. +# +# +# +#****************************************************************************** + +import + sdl, smpeg + +when defined(windows): + const SDL_MixerLibName = "SDL_mixer.dll" +elif defined(macosx): + const SDL_MixerLibName = "libSDL_mixer-1.2.0.dylib" +else: + const SDL_MixerLibName = "libSDL_mixer.so" + +const + SDL_MIXER_MAJOR_VERSION* = 1'i8 + SDL_MIXER_MINOR_VERSION* = 2'i8 + SDL_MIXER_PATCHLEVEL* = 7'i8 # Backwards compatibility + MIX_MAJOR_VERSION* = SDL_MIXER_MAJOR_VERSION + MIX_MINOR_VERSION* = SDL_MIXER_MINOR_VERSION + MIX_PATCHLEVEL* = SDL_MIXER_PATCHLEVEL # SDL_Mixer.h constants + # The default mixer has 8 simultaneous mixing channels + MIX_CHANNELS* = 8 # Good default values for a PC soundcard + MIX_DEFAULT_FREQUENCY* = 22050 + +when defined(IA32): + const + MIX_DEFAULT_FORMAT* = AUDIO_S16LSB +else: + const + MIX_DEFAULT_FORMAT* = AUDIO_S16MSB +const + MIX_DEFAULT_CHANNELS* = 2 + MIX_MAX_VOLUME* = 128 # Volume of a chunk + PATH_MAX* = 255 # mikmod.h constants + #* + # * Library version + # * + LIBMIKMOD_VERSION_MAJOR* = 3 + LIBMIKMOD_VERSION_MINOR* = 1 + LIBMIKMOD_REVISION* = 8 + LIBMIKMOD_VERSION* = ((LIBMIKMOD_VERSION_MAJOR shl 16) or + (LIBMIKMOD_VERSION_MINOR shl 8) or (LIBMIKMOD_REVISION)) + +type #music_cmd.h types + PMusicCMD* = ptr TMusicCMD + TMusicCMD*{.final.} = object #wavestream.h types + filename*: array[0..PATH_MAX - 1, char] + cmd*: array[0..PATH_MAX - 1, char] + pid*: TSYS_ThreadHandle + + PWAVStream* = ptr TWAVStream + TWAVStream*{.final.} = object #playmidi.h types + wavefp*: Pointer + start*: int32 + stop*: int32 + cvt*: TSDL_AudioCVT + + PMidiEvent* = ptr TMidiEvent + TMidiEvent*{.final.} = object + time*: int32 + channel*: uint8 + typ*: uint8 + a*: uint8 + b*: uint8 + + PMidiSong* = ptr TMidiSong + TMidiSong*{.final.} = object #music_ogg.h types + samples*: int32 + events*: PMidiEvent + + POGG_Music* = ptr TOGG_Music + TOGG_Music*{.final.} = object # mikmod.h types + #* + # * Error codes + # * + playing*: int + volume*: int #vf: OggVorbis_File; + section*: int + cvt*: TSDL_AudioCVT + len_available*: int + snd_available*: PUint8 + + TErrorEnum* = enum + MMERR_OPENING_FILE, MMERR_OUT_OF_MEMORY, MMERR_DYNAMIC_LINKING, + MMERR_SAMPLE_TOO_BIG, MMERR_OUT_OF_HANDLES, MMERR_UNKNOWN_WAVE_TYPE, + MMERR_LOADING_PATTERN, MMERR_LOADING_TRACK, MMERR_LOADING_HEADER, + MMERR_LOADING_SAMPLEINFO, MMERR_NOT_A_MODULE, MMERR_NOT_A_STREAM, + MMERR_MED_SYNTHSAMPLES, MMERR_ITPACK_INVALID_DATA, MMERR_DETECTING_DEVICE, + MMERR_INVALID_DEVICE, MMERR_INITIALIZING_MIXER, MMERR_OPENING_AUDIO, + MMERR_8BIT_ONLY, MMERR_16BIT_ONLY, MMERR_STEREO_ONLY, MMERR_ULAW, + MMERR_NON_BLOCK, MMERR_AF_AUDIO_PORT, MMERR_AIX_CONFIG_INIT, + MMERR_AIX_CONFIG_CONTROL, MMERR_AIX_CONFIG_START, MMERR_GUS_SETTINGS, + MMERR_GUS_RESET, MMERR_GUS_TIMER, MMERR_HP_SETSAMPLESIZE, MMERR_HP_SETSPEED, + MMERR_HP_CHANNELS, MMERR_HP_AUDIO_OUTPUT, MMERR_HP_AUDIO_DESC, + MMERR_HP_BUFFERSIZE, MMERR_OSS_SETFRAGMENT, MMERR_OSS_SETSAMPLESIZE, + MMERR_OSS_SETSTEREO, MMERR_OSS_SETSPEED, MMERR_SGI_SPEED, MMERR_SGI_16BIT, + MMERR_SGI_8BIT, MMERR_SGI_STEREO, MMERR_SGI_MONO, MMERR_SUN_INIT, + MMERR_OS2_MIXSETUP, MMERR_OS2_SEMAPHORE, MMERR_OS2_TIMER, MMERR_OS2_THREAD, + MMERR_DS_PRIORITY, MMERR_DS_BUFFER, MMERR_DS_FORMAT, MMERR_DS_NOTIFY, + MMERR_DS_EVENT, MMERR_DS_THREAD, MMERR_DS_UPDATE, MMERR_WINMM_HANDLE, + MMERR_WINMM_ALLOCATED, MMERR_WINMM_DEVICEID, MMERR_WINMM_FORMAT, + MMERR_WINMM_UNKNOWN, MMERR_MAC_SPEED, MMERR_MAC_START, MMERR_MAX + PMODULE* = ptr TMODULE + TMODULE*{.final.} = object + PUNIMOD* = ptr TUNIMOD + TUNIMOD* = TMODULE #SDL_mixer.h types + # The internal format for an audio chunk + PMix_Chunk* = ptr TMix_Chunk + TMix_Chunk*{.final.} = object + allocated*: int + abuf*: PUint8 + alen*: Uint32 + volume*: Uint8 # Per-sample volume, 0-128 + + Mix_Chunk* = TMix_Chunk # The different fading types supported + TMix_Fading* = enum + MIX_NO_FADING, MIX_FADING_OUT, MIX_FADING_IN + Mix_Fading* = TMix_Fading + TMix_MusicType* = enum + MUS_NONE, MUS_CMD, MUS_WAV, MUS_MOD, MUS_MID, MUS_OGG, MUS_MP3 + Mix_MusicType* = TMix_MusicType # + # TMusicUnion = record + # case XXX: Byte of + # 0 : ( cmd : PMusicCMD ); + # 1 : ( wave : PWAVStream ); + # 2 : ( module : PUNIMOD ); + # 3 : ( midi : TMidiSong ); + # 4 : ( ogg : POGG_music ); + # {$IFNDEF DARWIN} + # 5 : ( mp3 : PSMPEG ); + # {$ENDIF} + # end; + PMix_Music* = ptr TMix_Music + TMix_Music*{.final.} = object # The internal format for a music chunk interpreted via mikmod + typ*: TMix_MusicType # other fields are not aviable + # data : TMusicUnion; + # fading : TMix_Fading; + # fade_volume : integer; + # fade_step : integer; + # fade_steps : integer; + # error : integer; + + TMixFunction* = proc (udata: Pointer, stream: PUint8, length: int): Pointer{. + cdecl.} # This macro can be used to fill a version structure with the compile-time + # version of the SDL_mixer library. + +proc SDL_MIXER_VERSION*(X: var TSDL_Version) + # This function gets the version of the dynamically linked SDL_mixer library. + # It should NOT be used to fill a version structure, instead you should use the + # SDL_MIXER_VERSION() macro. +proc Mix_Linked_Version*(): PSDL_version{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Open the mixer with a certain audio format +proc Mix_OpenAudio*(frequency: int, format: Uint16, channels: int, + chunksize: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Dynamically change the number of channels managed by the mixer. + # If decreasing the number of channels, the upper channels are + # stopped. + # This function returns the new number of allocated channels. + # +proc Mix_AllocateChannels*(numchannels: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Find out what the actual audio device parameters are. + # This function returns 1 if the audio has been opened, 0 otherwise. + # +proc Mix_QuerySpec*(frequency: var int, format: var Uint16, channels: var int): int{. + cdecl, importc, dynlib: SDL_MixerLibName.} + # Load a wave file or a music (.mod .s3m .it .xm) file +proc Mix_LoadWAV_RW*(src: PSDL_RWops, freesrc: int): PMix_Chunk{.cdecl, + importc, dynlib: SDL_MixerLibName.} +proc Mix_LoadWAV*(filename: cstring): PMix_Chunk +proc Mix_LoadMUS*(filename: cstring): PMix_Music{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Load a wave file of the mixer format from a memory buffer +proc Mix_QuickLoad_WAV*(mem: PUint8): PMix_Chunk{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Free an audio chunk previously loaded +proc Mix_FreeChunk*(chunk: PMix_Chunk){.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_FreeMusic*(music: PMix_Music){.cdecl, importc, dynlib: SDL_MixerLibName.} + # Find out the music format of a mixer music, or the currently playing + # music, if 'music' is NULL. +proc Mix_GetMusicType*(music: PMix_Music): TMix_MusicType{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Set a function that is called after all mixing is performed. + # This can be used to provide real-time visual display of the audio stream + # or add a custom mixer filter for the stream data. + # +proc Mix_SetPostMix*(mix_func: TMixFunction, arg: Pointer){.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Add your own music player or additional mixer function. + # If 'mix_func' is NULL, the default music player is re-enabled. + # +proc Mix_HookMusic*(mix_func: TMixFunction, arg: Pointer){.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Add your own callback when the music has finished playing. + # +proc Mix_HookMusicFinished*(music_finished: Pointer){.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Get a pointer to the user data for the current music hook +proc Mix_GetMusicHookData*(): Pointer{.cdecl, importc, dynlib: SDL_MixerLibName.} + #* Add your own callback when a channel has finished playing. NULL + # * to disable callback.* +type + TChannel_finished* = proc (channel: int){.cdecl.} + +proc Mix_ChannelFinished*(channel_finished: TChannel_finished){.cdecl, + importc, dynlib: SDL_MixerLibName.} +const + MIX_CHANNEL_POST* = - 2 + # This is the format of a special effect callback: + # myeffect(int chan, void *stream, int len, void *udata); + # + # (chan) is the channel number that your effect is affecting. (stream) is + # the buffer of data to work upon. (len) is the size of (stream), and + # (udata) is a user-defined bit of data, which you pass as the last arg of + # Mix_RegisterEffect(), and is passed back unmolested to your callback. + # Your effect changes the contents of (stream) based on whatever parameters + # are significant, or just leaves it be, if you prefer. You can do whatever + # you like to the buffer, though, and it will continue in its changed state + # down the mixing pipeline, through any other effect functions, then finally + # to be mixed with the rest of the channels and music for the final output + # stream. + # + +type + TMix_EffectFunc* = proc (chan: int, stream: Pointer, length: int, + udata: Pointer): Pointer{.cdecl.} + # * This is a callback that signifies that a channel has finished all its + # * loops and has completed playback. This gets called if the buffer + # * plays out normally, or if you call Mix_HaltChannel(), implicitly stop + # * a channel via Mix_AllocateChannels(), or unregister a callback while + # * it's still playing. + TMix_EffectDone* = proc (chan: int, udata: Pointer): Pointer{.cdecl.} + #* Register a special effect function. At mixing time, the channel data is + # * copied into a buffer and passed through each registered effect function. + # * After it passes through all the functions, it is mixed into the final + # * output stream. The copy to buffer is performed once, then each effect + # * function performs on the output of the previous effect. Understand that + # * this extra copy to a buffer is not performed if there are no effects + # * registered for a given chunk, which saves CPU cycles, and any given + # * effect will be extra cycles, too, so it is crucial that your code run + # * fast. Also note that the data that your function is given is in the + # * format of the sound device, and not the format you gave to Mix_OpenAudio(), + # * although they may in reality be the same. This is an unfortunate but + # * necessary speed concern. Use Mix_QuerySpec() to determine if you can + # * handle the data before you register your effect, and take appropriate + # * actions. + # * You may also specify a callback (Mix_EffectDone_t) that is called when + # * the channel finishes playing. This gives you a more fine-grained control + # * than Mix_ChannelFinished(), in case you need to free effect-specific + # * resources, etc. If you don't need this, you can specify NULL. + # * You may set the callbacks before or after calling Mix_PlayChannel(). + # * Things like Mix_SetPanning() are just internal special effect functions, + # * so if you are using that, you've already incurred the overhead of a copy + # * to a separate buffer, and that these effects will be in the queue with + # * any functions you've registered. The list of registered effects for a + # * channel is reset when a chunk finishes playing, so you need to explicitly + # * set them with each call to Mix_PlayChannel*(). + # * You may also register a special effect function that is to be run after + # * final mixing occurs. The rules for these callbacks are identical to those + # * in Mix_RegisterEffect, but they are run after all the channels and the + # * music have been mixed into a single stream, whereas channel-specific + # * effects run on a given channel before any other mixing occurs. These + # * global effect callbacks are call "posteffects". Posteffects only have + # * their Mix_EffectDone_t function called when they are unregistered (since + # * the main output stream is never "done" in the same sense as a channel). + # * You must unregister them manually when you've had enough. Your callback + # * will be told that the channel being mixed is (MIX_CHANNEL_POST) if the + # * processing is considered a posteffect. + # * + # * After all these effects have finished processing, the callback registered + # * through Mix_SetPostMix() runs, and then the stream goes to the audio + # * device. + # * + # * returns zero if error (no such channel), nonzero if added. + # * Error messages can be retrieved from Mix_GetError(). + # * + +proc Mix_RegisterEffect*(chan: int, f: TMix_EffectFunc, d: TMix_EffectDone, + arg: Pointer): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + #* You may not need to call this explicitly, unless you need to stop an + # * effect from processing in the middle of a chunk's playback. + # * Posteffects are never implicitly unregistered as they are for channels, + # * but they may be explicitly unregistered through this function by + # * specifying MIX_CHANNEL_POST for a channel. + # * returns zero if error (no such channel or effect), nonzero if removed. + # * Error messages can be retrieved from Mix_GetError(). + # * +proc Mix_UnregisterEffect*(channel: int, f: TMix_EffectFunc): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + #* You may not need to call this explicitly, unless you need to stop all + # * effects from processing in the middle of a chunk's playback. Note that + # * this will also shut off some internal effect processing, since + # * Mix_SetPanning( ) and others may use this API under the hood.This is + # * called internally when a channel completes playback. + # * Posteffects are never implicitly unregistered as they are for channels, + # * but they may be explicitly unregistered through this function by + # * specifying MIX_CHANNEL_POST for a channel. + # * returns zero if error( no such channel ), nonzero if all effects removed. + # * Error messages can be retrieved from Mix_GetError( ). + # * +proc Mix_UnregisterAllEffects*(channel: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} +const + MIX_EFFECTSMAXSPEED* = "MIX_EFFECTSMAXSPEED" + # * These are the internally - defined mixing effects.They use the same API that + # * effects defined in the application use, but are provided here as a + # * convenience.Some effects can reduce their quality or use more memory in + # * the name of speed; to enable this, make sure the environment variable + # * MIX_EFFECTSMAXSPEED( see above ) is defined before you call + # * Mix_OpenAudio( ). + # * + #* set the panning of a channel.The left and right channels are specified + # * as integers between 0 and 255, quietest to loudest, respectively. + # * + # * Technically, this is just individual volume control for a sample with + # * two( stereo )channels, so it can be used for more than just panning. + # * if you want real panning, call it like this : + # * + # * Mix_SetPanning( channel, left, 255 - left ); + # * + # * ...which isn't so hard. + # * + # * Setting( channel ) to MIX_CHANNEL_POST registers this as a posteffect, and + # * the panning will be done to the final mixed stream before passing it on + # * to the audio device. + # * + # * This uses the Mix_RegisterEffect( )API internally, and returns without + # * registering the effect function if the audio device is not configured + # * for stereo output.Setting both( left ) and ( right ) to 255 causes this + # * effect to be unregistered, since that is the data's normal state. + # * + # * returns zero if error( no such channel or Mix_RegisterEffect( )fails ), + # * nonzero if panning effect enabled.Note that an audio device in mono + # * mode is a no - op, but this call will return successful in that case . + # * Error messages can be retrieved from Mix_GetError( ). + # * + +proc Mix_SetPanning*(channel: int, left: Uint8, right: Uint8): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # * set the position ofa channel.( angle ) is an integer from 0 to 360, that + # * specifies the location of the sound in relation to the listener.( angle ) + # * will be reduced as neccesary( 540 becomes 180 degrees, -100 becomes 260 ). + # * Angle 0 is due north, and rotates clockwise as the value increases. + # * for efficiency, the precision of this effect may be limited( angles 1 + # * through 7 might all produce the same effect, 8 through 15 are equal, etc ). + # * ( distance ) is an integer between 0 and 255 that specifies the space + # * between the sound and the listener.The larger the number, the further + # * away the sound is .Using 255 does not guarantee that the channel will be + # * culled from the mixing process or be completely silent.For efficiency, + # * the precision of this effect may be limited( distance 0 through 5 might + # * all produce the same effect, 6 through 10 are equal, etc ).Setting( angle ) + # * and ( distance ) to 0 unregisters this effect, since the data would be + # * unchanged. + # * + # * if you need more precise positional audio, consider using OpenAL for + # * spatialized effects instead of SDL_mixer.This is only meant to be a + # * basic effect for simple "3D" games. + # * + # * if the audio device is configured for mono output, then you won't get + # * any effectiveness from the angle; however, distance attenuation on the + # * channel will still occur.While this effect will function with stereo + # * voices, it makes more sense to use voices with only one channel of sound, + # * so when they are mixed through this effect, the positioning will sound + # * correct.You can convert them to mono through SDL before giving them to + # * the mixer in the first place if you like. + # * + # * Setting( channel ) to MIX_CHANNEL_POST registers this as a posteffect, and + # * the positioning will be done to the final mixed stream before passing it + # * on to the audio device. + # * + # * This is a convenience wrapper over Mix_SetDistance( ) and Mix_SetPanning( ). + # * + # * returns zero if error( no such channel or Mix_RegisterEffect( )fails ), + # * nonzero if position effect is enabled. + # * Error messages can be retrieved from Mix_GetError( ). + # * +proc Mix_SetPosition*(channel: int, angle: Sint16, distance: Uint8): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + #* set the "distance" of a channel.( distance ) is an integer from 0 to 255 + # * that specifies the location of the sound in relation to the listener. + # * Distance 0 is overlapping the listener, and 255 is as far away as possible + # * A distance of 255 does not guarantee silence; in such a case , you might + # * want to try changing the chunk's volume, or just cull the sample from the + # * mixing process with Mix_HaltChannel( ). + # * for efficiency, the precision of this effect may be limited( distances 1 + # * through 7 might all produce the same effect, 8 through 15 are equal, etc ). + # * ( distance ) is an integer between 0 and 255 that specifies the space + # * between the sound and the listener.The larger the number, the further + # * away the sound is . + # * Setting( distance ) to 0 unregisters this effect, since the data would be + # * unchanged. + # * if you need more precise positional audio, consider using OpenAL for + # * spatialized effects instead of SDL_mixer.This is only meant to be a + # * basic effect for simple "3D" games. + # * + # * Setting( channel ) to MIX_CHANNEL_POST registers this as a posteffect, and + # * the distance attenuation will be done to the final mixed stream before + # * passing it on to the audio device. + # * + # * This uses the Mix_RegisterEffect( )API internally. + # * + # * returns zero if error( no such channel or Mix_RegisterEffect( )fails ), + # * nonzero if position effect is enabled. + # * Error messages can be retrieved from Mix_GetError( ). + # * +proc Mix_SetDistance*(channel: int, distance: Uint8): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # * + # * !!! FIXME : Haven't implemented, since the effect goes past the + # * end of the sound buffer.Will have to think about this. + # * - -ryan. + # * / + # { if 0 + # { * Causes an echo effect to be mixed into a sound.( echo ) is the amount + # * of echo to mix.0 is no echo, 255 is infinite( and probably not + # * what you want ). + # * + # * Setting( channel ) to MIX_CHANNEL_POST registers this as a posteffect, and + # * the reverbing will be done to the final mixed stream before passing it on + # * to the audio device. + # * + # * This uses the Mix_RegisterEffect( )API internally.If you specify an echo + # * of zero, the effect is unregistered, as the data is already in that state. + # * + # * returns zero if error( no such channel or Mix_RegisterEffect( )fails ), + # * nonzero if reversing effect is enabled. + # * Error messages can be retrieved from Mix_GetError( ). + # * + # extern no_parse_DECLSPEC int Mix_SetReverb( int channel, Uint8 echo ); + # #E ndif + # * Causes a channel to reverse its stereo.This is handy if the user has his + # * speakers hooked up backwards, or you would like to have a minor bit of + # * psychedelia in your sound code. : )Calling this function with ( flip ) + # * set to non - zero reverses the chunks's usual channels. If (flip) is zero, + # * the effect is unregistered. + # * + # * This uses the Mix_RegisterEffect( )API internally, and thus is probably + # * more CPU intensive than having the user just plug in his speakers + # * correctly.Mix_SetReverseStereo( )returns without registering the effect + # * function if the audio device is not configured for stereo output. + # * + # * if you specify MIX_CHANNEL_POST for ( channel ), then this the effect is used + # * on the final mixed stream before sending it on to the audio device( a + # * posteffect ). + # * + # * returns zero if error( no such channel or Mix_RegisterEffect( )fails ), + # * nonzero if reversing effect is enabled.Note that an audio device in mono + # * mode is a no - op, but this call will return successful in that case . + # * Error messages can be retrieved from Mix_GetError( ). + # * +proc Mix_SetReverseStereo*(channel: int, flip: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # end of effects API. - -ryan. * + # Reserve the first channels (0 -> n-1) for the application, i.e. don't allocate + # them dynamically to the next sample if requested with a -1 value below. + # Returns the number of reserved channels. + # +proc Mix_ReserveChannels*(num: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Channel grouping functions + # Attach a tag to a channel. A tag can be assigned to several mixer + # channels, to form groups of channels. + # If 'tag' is -1, the tag is removed (actually -1 is the tag used to + # represent the group of all the channels). + # Returns true if everything was OK. + # +proc Mix_GroupChannel*(which: int, tag: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Assign several consecutive channels to a group +proc Mix_GroupChannels*(`from`: int, `to`: int, tag: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Finds the first available channel in a group of channels +proc Mix_GroupAvailable*(tag: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Returns the number of channels in a group. This is also a subtle + # way to get the total number of channels when 'tag' is -1 + # +proc Mix_GroupCount*(tag: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Finds the "oldest" sample playing in a group of channels +proc Mix_GroupOldest*(tag: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Finds the "most recent" (i.e. last) sample playing in a group of channels +proc Mix_GroupNewer*(tag: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # The same as above, but the sound is played at most 'ticks' milliseconds +proc Mix_PlayChannelTimed*(channel: int, chunk: PMix_Chunk, loops: int, + ticks: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Play an audio chunk on a specific channel. + # If the specified channel is -1, play on the first free channel. + # If 'loops' is greater than zero, loop the sound that many times. + # If 'loops' is -1, loop inifinitely (~65000 times). + # Returns which channel was used to play the sound. + # +proc Mix_PlayChannel*(channel: int, chunk: PMix_Chunk, loops: int): int +proc Mix_PlayMusic*(music: PMix_Music, loops: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Fade in music or a channel over "ms" milliseconds, same semantics as the "Play" functions +proc Mix_FadeInMusic*(music: PMix_Music, loops: int, ms: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} +proc Mix_FadeInChannelTimed*(channel: int, chunk: PMix_Chunk, loops: int, + ms: int, ticks: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} +proc Mix_FadeInChannel*(channel: int, chunk: PMix_Chunk, loops: int, ms: int): int + # Set the volume in the range of 0-128 of a specific channel or chunk. + # If the specified channel is -1, set volume for all channels. + # Returns the original volume. + # If the specified volume is -1, just return the current volume. + # +proc Mix_Volume*(channel: int, volume: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} +proc Mix_VolumeChunk*(chunk: PMix_Chunk, volume: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} +proc Mix_VolumeMusic*(volume: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Halt playing of a particular channel +proc Mix_HaltChannel*(channel: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_HaltGroup*(tag: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_HaltMusic*(): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Change the expiration delay for a particular channel. + # The sample will stop playing after the 'ticks' milliseconds have elapsed, + # or remove the expiration if 'ticks' is -1 + # +proc Mix_ExpireChannel*(channel: int, ticks: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Halt a channel, fading it out progressively till it's silent + # The ms parameter indicates the number of milliseconds the fading + # will take. + # +proc Mix_FadeOutChannel*(which: int, ms: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} +proc Mix_FadeOutGroup*(tag: int, ms: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_FadeOutMusic*(ms: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Query the fading status of a channel +proc Mix_FadingMusic*(): TMix_Fading{.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_FadingChannel*(which: int): TMix_Fading{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Pause/Resume a particular channel +proc Mix_Pause*(channel: int){.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_Resume*(channel: int){.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_Paused*(channel: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Pause/Resume the music stream +proc Mix_PauseMusic*(){.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_ResumeMusic*(){.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_RewindMusic*(){.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_PausedMusic*(): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Set the current position in the music stream. + # This returns 0 if successful, or -1 if it failed or isn't implemented. + # This function is only implemented for MOD music formats (set pattern + # order number) and for OGG music (set position in seconds), at the + # moment. + # +proc Mix_SetMusicPosition*(position: float64): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Check the status of a specific channel. + # If the specified channel is -1, check all channels. + # +proc Mix_Playing*(channel: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_PlayingMusic*(): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Stop music and set external music playback command +proc Mix_SetMusicCMD*(command: cstring): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Synchro value is set by MikMod from modules while playing +proc Mix_SetSynchroValue*(value: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_GetSynchroValue*(): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # + # Get the Mix_Chunk currently associated with a mixer channel + # Returns nil if it's an invalid channel, or there's no chunk associated. + # +proc Mix_GetChunk*(channel: int): PMix_Chunk{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Close the mixer, halting all playing audio +proc Mix_CloseAudio*(){.cdecl, importc, dynlib: SDL_MixerLibName.} + # We'll use SDL for reporting errors +proc Mix_SetError*(fmt: cstring) +proc Mix_GetError*(): cstring +# implementation + +proc SDL_MIXER_VERSION(X: var TSDL_version) = + X.major = SDL_MIXER_MAJOR_VERSION + X.minor = SDL_MIXER_MINOR_VERSION + X.patch = SDL_MIXER_PATCHLEVEL + +proc Mix_LoadWAV(filename: cstring): PMix_Chunk = + result = Mix_LoadWAV_RW(SDL_RWFromFile(filename, "rb"), 1) + +proc Mix_PlayChannel(channel: int, chunk: PMix_Chunk, loops: int): int = + result = Mix_PlayChannelTimed(channel, chunk, loops, - 1) + +proc Mix_FadeInChannel(channel: int, chunk: PMix_Chunk, loops: int, ms: int): int = + result = Mix_FadeInChannelTimed(channel, chunk, loops, ms, - 1) + +proc Mix_SetError(fmt: cstring) = + SDL_SetError(fmt) + +proc Mix_GetError(): cstring = + result = SDL_GetError() diff --git a/lib/oldwrappers/sdl/sdl_mixer_nosmpeg.nim b/lib/oldwrappers/sdl/sdl_mixer_nosmpeg.nim new file mode 100644 index 000000000..879867607 --- /dev/null +++ b/lib/oldwrappers/sdl/sdl_mixer_nosmpeg.nim @@ -0,0 +1,572 @@ + +#****************************************************************************** +# Copy of SDL_Mixer without smpeg dependency and mp3 support +#****************************************************************************** + +import + sdl + +when defined(windows): + const SDL_MixerLibName = "SDL_mixer.dll" +elif defined(macosx): + const SDL_MixerLibName = "libSDL_mixer-1.2.0.dylib" +else: + const SDL_MixerLibName = "libSDL_mixer.so" + +const + SDL_MIXER_MAJOR_VERSION* = 1'i8 + SDL_MIXER_MINOR_VERSION* = 2'i8 + SDL_MIXER_PATCHLEVEL* = 7'i8 # Backwards compatibility + MIX_MAJOR_VERSION* = SDL_MIXER_MAJOR_VERSION + MIX_MINOR_VERSION* = SDL_MIXER_MINOR_VERSION + MIX_PATCHLEVEL* = SDL_MIXER_PATCHLEVEL # SDL_Mixer.h constants + # The default mixer has 8 simultaneous mixing channels + MIX_CHANNELS* = 8 # Good default values for a PC soundcard + MIX_DEFAULT_FREQUENCY* = 22050 + +when defined(IA32): + const + MIX_DEFAULT_FORMAT* = AUDIO_S16LSB +else: + const + MIX_DEFAULT_FORMAT* = AUDIO_S16MSB +const + MIX_DEFAULT_CHANNELS* = 2 + MIX_MAX_VOLUME* = 128 # Volume of a chunk + PATH_MAX* = 255 # mikmod.h constants + #* + # * Library version + # * + LIBMIKMOD_VERSION_MAJOR* = 3 + LIBMIKMOD_VERSION_MINOR* = 1 + LIBMIKMOD_REVISION* = 8 + LIBMIKMOD_VERSION* = ((LIBMIKMOD_VERSION_MAJOR shl 16) or + (LIBMIKMOD_VERSION_MINOR shl 8) or (LIBMIKMOD_REVISION)) + +type #music_cmd.h types + PMusicCMD* = ptr TMusicCMD + TMusicCMD*{.final.} = object #wavestream.h types + filename*: array[0..PATH_MAX - 1, char] + cmd*: array[0..PATH_MAX - 1, char] + pid*: TSYS_ThreadHandle + + PWAVStream* = ptr TWAVStream + TWAVStream*{.final.} = object #playmidi.h types + wavefp*: Pointer + start*: int32 + stop*: int32 + cvt*: TSDL_AudioCVT + + PMidiEvent* = ptr TMidiEvent + TMidiEvent*{.final.} = object + time*: int32 + channel*: uint8 + typ*: uint8 + a*: uint8 + b*: uint8 + + PMidiSong* = ptr TMidiSong + TMidiSong*{.final.} = object #music_ogg.h types + samples*: int32 + events*: PMidiEvent + + POGG_Music* = ptr TOGG_Music + TOGG_Music*{.final.} = object # mikmod.h types + #* + # * Error codes + # * + playing*: int + volume*: int #vf: OggVorbis_File; + section*: int + cvt*: TSDL_AudioCVT + len_available*: int + snd_available*: PUint8 + + TErrorEnum* = enum + MMERR_OPENING_FILE, MMERR_OUT_OF_MEMORY, MMERR_DYNAMIC_LINKING, + MMERR_SAMPLE_TOO_BIG, MMERR_OUT_OF_HANDLES, MMERR_UNKNOWN_WAVE_TYPE, + MMERR_LOADING_PATTERN, MMERR_LOADING_TRACK, MMERR_LOADING_HEADER, + MMERR_LOADING_SAMPLEINFO, MMERR_NOT_A_MODULE, MMERR_NOT_A_STREAM, + MMERR_MED_SYNTHSAMPLES, MMERR_ITPACK_INVALID_DATA, MMERR_DETECTING_DEVICE, + MMERR_INVALID_DEVICE, MMERR_INITIALIZING_MIXER, MMERR_OPENING_AUDIO, + MMERR_8BIT_ONLY, MMERR_16BIT_ONLY, MMERR_STEREO_ONLY, MMERR_ULAW, + MMERR_NON_BLOCK, MMERR_AF_AUDIO_PORT, MMERR_AIX_CONFIG_INIT, + MMERR_AIX_CONFIG_CONTROL, MMERR_AIX_CONFIG_START, MMERR_GUS_SETTINGS, + MMERR_GUS_RESET, MMERR_GUS_TIMER, MMERR_HP_SETSAMPLESIZE, MMERR_HP_SETSPEED, + MMERR_HP_CHANNELS, MMERR_HP_AUDIO_OUTPUT, MMERR_HP_AUDIO_DESC, + MMERR_HP_BUFFERSIZE, MMERR_OSS_SETFRAGMENT, MMERR_OSS_SETSAMPLESIZE, + MMERR_OSS_SETSTEREO, MMERR_OSS_SETSPEED, MMERR_SGI_SPEED, MMERR_SGI_16BIT, + MMERR_SGI_8BIT, MMERR_SGI_STEREO, MMERR_SGI_MONO, MMERR_SUN_INIT, + MMERR_OS2_MIXSETUP, MMERR_OS2_SEMAPHORE, MMERR_OS2_TIMER, MMERR_OS2_THREAD, + MMERR_DS_PRIORITY, MMERR_DS_BUFFER, MMERR_DS_FORMAT, MMERR_DS_NOTIFY, + MMERR_DS_EVENT, MMERR_DS_THREAD, MMERR_DS_UPDATE, MMERR_WINMM_HANDLE, + MMERR_WINMM_ALLOCATED, MMERR_WINMM_DEVICEID, MMERR_WINMM_FORMAT, + MMERR_WINMM_UNKNOWN, MMERR_MAC_SPEED, MMERR_MAC_START, MMERR_MAX + PMODULE* = ptr TMODULE + TMODULE*{.final.} = object + PUNIMOD* = ptr TUNIMOD + TUNIMOD* = TMODULE #SDL_mixer.h types + # The internal format for an audio chunk + PMix_Chunk* = ptr TMix_Chunk + TMix_Chunk*{.final.} = object + allocated*: int + abuf*: PUint8 + alen*: Uint32 + volume*: Uint8 # Per-sample volume, 0-128 + + Mix_Chunk* = TMix_Chunk # The different fading types supported + TMix_Fading* = enum + MIX_NO_FADING, MIX_FADING_OUT, MIX_FADING_IN + Mix_Fading* = TMix_Fading + TMix_MusicType* = enum + MUS_NONE, MUS_CMD, MUS_WAV, MUS_MOD, MUS_MID, MUS_OGG + PMix_Music* = ptr TMix_Music + TMix_Music*{.final.} = object + typ*: TMix_MusicType + + TMixFunction* = proc (udata: Pointer, stream: PUint8, length: int): Pointer{. + cdecl.} # This macro can be used to fill a version structure with the compile-time + # version of the SDL_mixer library. + +proc SDL_MIXER_VERSION*(X: var TSDL_Version) + # This function gets the version of the dynamically linked SDL_mixer library. + # It should NOT be used to fill a version structure, instead you should use the + # SDL_MIXER_VERSION() macro. +proc Mix_Linked_Version*(): PSDL_version{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Open the mixer with a certain audio format +proc Mix_OpenAudio*(frequency: int, format: Uint16, channels: int, + chunksize: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Dynamically change the number of channels managed by the mixer. + # If decreasing the number of channels, the upper channels are + # stopped. + # This function returns the new number of allocated channels. + # +proc Mix_AllocateChannels*(numchannels: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Find out what the actual audio device parameters are. + # This function returns 1 if the audio has been opened, 0 otherwise. + # +proc Mix_QuerySpec*(frequency: var int, format: var Uint16, channels: var int): int{. + cdecl, importc, dynlib: SDL_MixerLibName.} + # Load a wave file or a music (.mod .s3m .it .xm) file +proc Mix_LoadWAV_RW*(src: PSDL_RWops, freesrc: int): PMix_Chunk{.cdecl, + importc, dynlib: SDL_MixerLibName.} +proc Mix_LoadWAV*(filename: cstring): PMix_Chunk +proc Mix_LoadMUS*(filename: cstring): PMix_Music{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Load a wave file of the mixer format from a memory buffer +proc Mix_QuickLoad_WAV*(mem: PUint8): PMix_Chunk{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Free an audio chunk previously loaded +proc Mix_FreeChunk*(chunk: PMix_Chunk){.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_FreeMusic*(music: PMix_Music){.cdecl, importc, dynlib: SDL_MixerLibName.} + # Find out the music format of a mixer music, or the currently playing + # music, if 'music' is NULL. +proc Mix_GetMusicType*(music: PMix_Music): TMix_MusicType{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Set a function that is called after all mixing is performed. + # This can be used to provide real-time visual display of the audio stream + # or add a custom mixer filter for the stream data. + # +proc Mix_SetPostMix*(mix_func: TMixFunction, arg: Pointer){.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Add your own music player or additional mixer function. + # If 'mix_func' is NULL, the default music player is re-enabled. + # +proc Mix_HookMusic*(mix_func: TMixFunction, arg: Pointer){.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Add your own callback when the music has finished playing. + # +proc Mix_HookMusicFinished*(music_finished: Pointer){.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Get a pointer to the user data for the current music hook +proc Mix_GetMusicHookData*(): Pointer{.cdecl, importc, dynlib: SDL_MixerLibName.} + #* Add your own callback when a channel has finished playing. NULL + # * to disable callback.* +type + TChannel_finished* = proc (channel: int){.cdecl.} + +proc Mix_ChannelFinished*(channel_finished: TChannel_finished){.cdecl, + importc, dynlib: SDL_MixerLibName.} +const + MIX_CHANNEL_POST* = - 2 #* This is the format of a special effect callback: + # * + # * myeffect(int chan, void *stream, int len, void *udata); + # * + # * (chan) is the channel number that your effect is affecting. (stream) is + # * the buffer of data to work upon. (len) is the size of (stream), and + # * (udata) is a user-defined bit of data, which you pass as the last arg of + # * Mix_RegisterEffect(), and is passed back unmolested to your callback. + # * Your effect changes the contents of (stream) based on whatever parameters + # * are significant, or just leaves it be, if you prefer. You can do whatever + # * you like to the buffer, though, and it will continue in its changed state + # * down the mixing pipeline, through any other effect functions, then finally + # * to be mixed with the rest of the channels and music for the final output + # * stream. + # * + +type + TMix_EffectFunc* = proc (chan: int, stream: Pointer, length: int, + udata: Pointer): Pointer{.cdecl.} + # * This is a callback that signifies that a channel has finished all its + # * loops and has completed playback. This gets called if the buffer + # * plays out normally, or if you call Mix_HaltChannel(), implicitly stop + # * a channel via Mix_AllocateChannels(), or unregister a callback while + # * it's still playing. + TMix_EffectDone* = proc (chan: int, udata: Pointer): Pointer{.cdecl.} + #* Register a special effect function. At mixing time, the channel data is + # * copied into a buffer and passed through each registered effect function. + # * After it passes through all the functions, it is mixed into the final + # * output stream. The copy to buffer is performed once, then each effect + # * function performs on the output of the previous effect. Understand that + # * this extra copy to a buffer is not performed if there are no effects + # * registered for a given chunk, which saves CPU cycles, and any given + # * effect will be extra cycles, too, so it is crucial that your code run + # * fast. Also note that the data that your function is given is in the + # * format of the sound device, and not the format you gave to Mix_OpenAudio(), + # * although they may in reality be the same. This is an unfortunate but + # * necessary speed concern. Use Mix_QuerySpec() to determine if you can + # * handle the data before you register your effect, and take appropriate + # * actions. + # * You may also specify a callback (Mix_EffectDone_t) that is called when + # * the channel finishes playing. This gives you a more fine-grained control + # * than Mix_ChannelFinished(), in case you need to free effect-specific + # * resources, etc. If you don't need this, you can specify NULL. + # * You may set the callbacks before or after calling Mix_PlayChannel(). + # * Things like Mix_SetPanning() are just internal special effect functions, + # * so if you are using that, you've already incurred the overhead of a copy + # * to a separate buffer, and that these effects will be in the queue with + # * any functions you've registered. The list of registered effects for a + # * channel is reset when a chunk finishes playing, so you need to explicitly + # * set them with each call to Mix_PlayChannel*(). + # * You may also register a special effect function that is to be run after + # * final mixing occurs. The rules for these callbacks are identical to those + # * in Mix_RegisterEffect, but they are run after all the channels and the + # * music have been mixed into a single stream, whereas channel-specific + # * effects run on a given channel before any other mixing occurs. These + # * global effect callbacks are call "posteffects". Posteffects only have + # * their Mix_EffectDone_t function called when they are unregistered (since + # * the main output stream is never "done" in the same sense as a channel). + # * You must unregister them manually when you've had enough. Your callback + # * will be told that the channel being mixed is (MIX_CHANNEL_POST) if the + # * processing is considered a posteffect. + # * + # * After all these effects have finished processing, the callback registered + # * through Mix_SetPostMix() runs, and then the stream goes to the audio + # * device. + # * + # * returns zero if error (no such channel), nonzero if added. + # * Error messages can be retrieved from Mix_GetError(). + +proc Mix_RegisterEffect*(chan: int, f: TMix_EffectFunc, d: TMix_EffectDone, + arg: Pointer): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + #* You may not need to call this explicitly, unless you need to stop an + # * effect from processing in the middle of a chunk's playback. + # * Posteffects are never implicitly unregistered as they are for channels, + # * but they may be explicitly unregistered through this function by + # * specifying MIX_CHANNEL_POST for a channel. + # * returns zero if error (no such channel or effect), nonzero if removed. + # * Error messages can be retrieved from Mix_GetError(). + # * +proc Mix_UnregisterEffect*(channel: int, f: TMix_EffectFunc): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + #* You may not need to call this explicitly, unless you need to stop all + # * effects from processing in the middle of a chunk's playback. Note that + # * this will also shut off some internal effect processing, since + # * Mix_SetPanning( ) and others may use this API under the hood.This is + # * called internally when a channel completes playback. + # * Posteffects are never implicitly unregistered as they are for channels, + # * but they may be explicitly unregistered through this function by + # * specifying MIX_CHANNEL_POST for a channel. + # * returns zero if error( no such channel ), nonzero if all effects removed. + # * Error messages can be retrieved from Mix_GetError( ). + # * +proc Mix_UnregisterAllEffects*(channel: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} +const + MIX_EFFECTSMAXSPEED* = "MIX_EFFECTSMAXSPEED" + # * These are the internally - defined mixing effects.They use the same API that + # * effects defined in the application use, but are provided here as a + # * convenience.Some effects can reduce their quality or use more memory in + # * the name of speed; to enable this, make sure the environment variable + # * MIX_EFFECTSMAXSPEED( see above ) is defined before you call + # * Mix_OpenAudio( ). + # * + #* set the panning of a channel.The left and right channels are specified + # * as integers between 0 and 255, quietest to loudest, respectively. + # * + # * Technically, this is just individual volume control for a sample with + # * two( stereo )channels, so it can be used for more than just panning. + # * if you want real panning, call it like this : + # * + # * Mix_SetPanning( channel, left, 255 - left ); + # * + # * ...which isn't so hard. + # * + # * Setting( channel ) to MIX_CHANNEL_POST registers this as a posteffect, and + # * the panning will be done to the final mixed stream before passing it on + # * to the audio device. + # * + # * This uses the Mix_RegisterEffect( )API internally, and returns without + # * registering the effect function if the audio device is not configured + # * for stereo output.Setting both( left ) and ( right ) to 255 causes this + # * effect to be unregistered, since that is the data's normal state. + # * + # * returns zero if error( no such channel or Mix_RegisterEffect( )fails ), + # * nonzero if panning effect enabled.Note that an audio device in mono + # * mode is a no - op, but this call will return successful in that case . + # * Error messages can be retrieved from Mix_GetError( ). + + +proc Mix_SetPanning*(channel: int, left: Uint8, right: Uint8): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # * set the position ofa channel.( angle ) is an integer from 0 to 360, that + # * specifies the location of the sound in relation to the listener.( angle ) + # * will be reduced as neccesary( 540 becomes 180 degrees, -100 becomes 260 ). + # * Angle 0 is due north, and rotates clockwise as the value increases. + # * for efficiency, the precision of this effect may be limited( angles 1 + # * through 7 might all produce the same effect, 8 through 15 are equal, etc ). + # * ( distance ) is an integer between 0 and 255 that specifies the space + # * between the sound and the listener.The larger the number, the further + # * away the sound is .Using 255 does not guarantee that the channel will be + # * culled from the mixing process or be completely silent.For efficiency, + # * the precision of this effect may be limited( distance 0 through 5 might + # * all produce the same effect, 6 through 10 are equal, etc ).Setting( angle ) + # * and ( distance ) to 0 unregisters this effect, since the data would be + # * unchanged. + # * + # * if you need more precise positional audio, consider using OpenAL for + # * spatialized effects instead of SDL_mixer.This is only meant to be a + # * basic effect for simple "3D" games. + # * + # * if the audio device is configured for mono output, then you won't get + # * any effectiveness from the angle; however, distance attenuation on the + # * channel will still occur.While this effect will function with stereo + # * voices, it makes more sense to use voices with only one channel of sound, + # * so when they are mixed through this effect, the positioning will sound + # * correct.You can convert them to mono through SDL before giving them to + # * the mixer in the first place if you like. + # * + # * Setting( channel ) to MIX_CHANNEL_POST registers this as a posteffect, and + # * the positioning will be done to the final mixed stream before passing it + # * on to the audio device. + # * + # * This is a convenience wrapper over Mix_SetDistance( ) and Mix_SetPanning( ). + # * + # * returns zero if error( no such channel or Mix_RegisterEffect( )fails ), + # * nonzero if position effect is enabled. + # * Error messages can be retrieved from Mix_GetError( ). + # * +proc Mix_SetPosition*(channel: int, angle: Sint16, distance: Uint8): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + #* set the "distance" of a channel.( distance ) is an integer from 0 to 255 + # * that specifies the location of the sound in relation to the listener. + # * Distance 0 is overlapping the listener, and 255 is as far away as possible + # * A distance of 255 does not guarantee silence; in such a case , you might + # * want to try changing the chunk's volume, or just cull the sample from the + # * mixing process with Mix_HaltChannel( ). + # * for efficiency, the precision of this effect may be limited( distances 1 + # * through 7 might all produce the same effect, 8 through 15 are equal, etc ). + # * ( distance ) is an integer between 0 and 255 that specifies the space + # * between the sound and the listener.The larger the number, the further + # * away the sound is . + # * Setting( distance ) to 0 unregisters this effect, since the data would be + # * unchanged. + # * if you need more precise positional audio, consider using OpenAL for + # * spatialized effects instead of SDL_mixer.This is only meant to be a + # * basic effect for simple "3D" games. + # * + # * Setting( channel ) to MIX_CHANNEL_POST registers this as a posteffect, and + # * the distance attenuation will be done to the final mixed stream before + # * passing it on to the audio device. + # * + # * This uses the Mix_RegisterEffect( )API internally. + # * + # * returns zero if error( no such channel or Mix_RegisterEffect( )fails ), + # * nonzero if position effect is enabled. + # * Error messages can be retrieved from Mix_GetError( ). + # * +proc Mix_SetDistance*(channel: int, distance: Uint8): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # * + # * !!! FIXME : Haven't implemented, since the effect goes past the + # * end of the sound buffer.Will have to think about this. + # * - -ryan. + # * / + # { if 0 + # { * Causes an echo effect to be mixed into a sound.( echo ) is the amount + # * of echo to mix.0 is no echo, 255 is infinite( and probably not + # * what you want ). + # * + # * Setting( channel ) to MIX_CHANNEL_POST registers this as a posteffect, and + # * the reverbing will be done to the final mixed stream before passing it on + # * to the audio device. + # * + # * This uses the Mix_RegisterEffect( )API internally.If you specify an echo + # * of zero, the effect is unregistered, as the data is already in that state. + # * + # * returns zero if error( no such channel or Mix_RegisterEffect( )fails ), + # * nonzero if reversing effect is enabled. + # * Error messages can be retrieved from Mix_GetError( ). + # * + # extern no_parse_DECLSPEC int Mix_SetReverb( int channel, Uint8 echo ); + # #E ndif + # * Causes a channel to reverse its stereo.This is handy if the user has his + # * speakers hooked up backwards, or you would like to have a minor bit of + # * psychedelia in your sound code. : )Calling this function with ( flip ) + # * set to non - zero reverses the chunks's usual channels. If (flip) is zero, + # * the effect is unregistered. + # * + # * This uses the Mix_RegisterEffect( )API internally, and thus is probably + # * more CPU intensive than having the user just plug in his speakers + # * correctly.Mix_SetReverseStereo( )returns without registering the effect + # * function if the audio device is not configured for stereo output. + # * + # * if you specify MIX_CHANNEL_POST for ( channel ), then this the effect is used + # * on the final mixed stream before sending it on to the audio device( a + # * posteffect ). + # * + # * returns zero if error( no such channel or Mix_RegisterEffect( )fails ), + # * nonzero if reversing effect is enabled.Note that an audio device in mono + # * mode is a no - op, but this call will return successful in that case . + # * Error messages can be retrieved from Mix_GetError( ). + # * +proc Mix_SetReverseStereo*(channel: int, flip: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # end of effects API. - -ryan. * + # Reserve the first channels (0 -> n-1) for the application, i.e. don't allocate + # them dynamically to the next sample if requested with a -1 value below. + # Returns the number of reserved channels. + # +proc Mix_ReserveChannels*(num: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Channel grouping functions + # Attach a tag to a channel. A tag can be assigned to several mixer + # channels, to form groups of channels. + # If 'tag' is -1, the tag is removed (actually -1 is the tag used to + # represent the group of all the channels). + # Returns true if everything was OK. + # +proc Mix_GroupChannel*(which: int, tag: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Assign several consecutive channels to a group +proc Mix_GroupChannels*(`from`: int, `to`: int, tag: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Finds the first available channel in a group of channels +proc Mix_GroupAvailable*(tag: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Returns the number of channels in a group. This is also a subtle + # way to get the total number of channels when 'tag' is -1 + # +proc Mix_GroupCount*(tag: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Finds the "oldest" sample playing in a group of channels +proc Mix_GroupOldest*(tag: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Finds the "most recent" (i.e. last) sample playing in a group of channels +proc Mix_GroupNewer*(tag: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # The same as above, but the sound is played at most 'ticks' milliseconds +proc Mix_PlayChannelTimed*(channel: int, chunk: PMix_Chunk, loops: int, + ticks: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Play an audio chunk on a specific channel. + # If the specified channel is -1, play on the first free channel. + # If 'loops' is greater than zero, loop the sound that many times. + # If 'loops' is -1, loop inifinitely (~65000 times). + # Returns which channel was used to play the sound. + # +proc Mix_PlayChannel*(channel: int, chunk: PMix_Chunk, loops: int): int +proc Mix_PlayMusic*(music: PMix_Music, loops: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Fade in music or a channel over "ms" milliseconds, same semantics as the "Play" functions +proc Mix_FadeInMusic*(music: PMix_Music, loops: int, ms: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} +proc Mix_FadeInChannelTimed*(channel: int, chunk: PMix_Chunk, loops: int, + ms: int, ticks: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} +proc Mix_FadeInChannel*(channel: int, chunk: PMix_Chunk, loops: int, ms: int): int + # Set the volume in the range of 0-128 of a specific channel or chunk. + # If the specified channel is -1, set volume for all channels. + # Returns the original volume. + # If the specified volume is -1, just return the current volume. + # +proc Mix_Volume*(channel: int, volume: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} +proc Mix_VolumeChunk*(chunk: PMix_Chunk, volume: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} +proc Mix_VolumeMusic*(volume: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Halt playing of a particular channel +proc Mix_HaltChannel*(channel: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_HaltGroup*(tag: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_HaltMusic*(): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Change the expiration delay for a particular channel. + # The sample will stop playing after the 'ticks' milliseconds have elapsed, + # or remove the expiration if 'ticks' is -1 + # +proc Mix_ExpireChannel*(channel: int, ticks: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Halt a channel, fading it out progressively till it's silent + # The ms parameter indicates the number of milliseconds the fading + # will take. + # +proc Mix_FadeOutChannel*(which: int, ms: int): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} +proc Mix_FadeOutGroup*(tag: int, ms: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_FadeOutMusic*(ms: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Query the fading status of a channel +proc Mix_FadingMusic*(): TMix_Fading{.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_FadingChannel*(which: int): TMix_Fading{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Pause/Resume a particular channel +proc Mix_Pause*(channel: int){.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_Resume*(channel: int){.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_Paused*(channel: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Pause/Resume the music stream +proc Mix_PauseMusic*(){.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_ResumeMusic*(){.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_RewindMusic*(){.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_PausedMusic*(): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Set the current position in the music stream. + # This returns 0 if successful, or -1 if it failed or isn't implemented. + # This function is only implemented for MOD music formats (set pattern + # order number) and for OGG music (set position in seconds), at the + # moment. + # +proc Mix_SetMusicPosition*(position: float64): int{.cdecl, + importc, dynlib: SDL_MixerLibName.} + # Check the status of a specific channel. + # If the specified channel is -1, check all channels. + # +proc Mix_Playing*(channel: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_PlayingMusic*(): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Stop music and set external music playback command +proc Mix_SetMusicCMD*(command: cstring): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Synchro value is set by MikMod from modules while playing +proc Mix_SetSynchroValue*(value: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} +proc Mix_GetSynchroValue*(): int{.cdecl, importc, dynlib: SDL_MixerLibName.} + # + # Get the Mix_Chunk currently associated with a mixer channel + # Returns nil if it's an invalid channel, or there's no chunk associated. + # +proc Mix_GetChunk*(channel: int): PMix_Chunk{.cdecl, importc, dynlib: SDL_MixerLibName.} + # Close the mixer, halting all playing audio +proc Mix_CloseAudio*(){.cdecl, importc, dynlib: SDL_MixerLibName.} + # We'll use SDL for reporting errors +proc Mix_SetError*(fmt: cstring) +proc Mix_GetError*(): cstring +# implementation + +proc SDL_MIXER_VERSION(X: var TSDL_version) = + X.major = SDL_MIXER_MAJOR_VERSION + X.minor = SDL_MIXER_MINOR_VERSION + X.patch = SDL_MIXER_PATCHLEVEL + +proc Mix_LoadWAV(filename: cstring): PMix_Chunk = + result = Mix_LoadWAV_RW(SDL_RWFromFile(filename, "rb"), 1) + +proc Mix_PlayChannel(channel: int, chunk: PMix_Chunk, loops: int): int = + result = Mix_PlayChannelTimed(channel, chunk, loops, - 1) + +proc Mix_FadeInChannel(channel: int, chunk: PMix_Chunk, loops: int, ms: int): int = + result = Mix_FadeInChannelTimed(channel, chunk, loops, ms, - 1) + +proc Mix_SetError(fmt: cstring) = + SDL_SetError(fmt) + +proc Mix_GetError(): cstring = + result = SDL_GetError() diff --git a/lib/oldwrappers/sdl/sdl_net.nim b/lib/oldwrappers/sdl/sdl_net.nim new file mode 100644 index 000000000..f27a674ae --- /dev/null +++ b/lib/oldwrappers/sdl/sdl_net.nim @@ -0,0 +1,431 @@ + +#****************************************************************************** +# +# $Id: sdl_net.pas,v 1.7 2005/01/01 02:14:21 savage Exp $ +# +# +# +# Borland Delphi SDL_Net - A x-platform network library for use with SDL. +# Conversion of the Simple DirectMedia Layer Network Headers +# +# Portions created by Sam Lantinga <slouken@devolution.com> are +# Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga +# 5635-34 Springhouse Dr. +# Pleasanton, CA 94588 (USA) +# +# All Rights Reserved. +# +# The original files are : SDL_net.h +# +# The initial developer of this Pascal code was : +# Dominqiue Louis <Dominique@SavageSoftware.com.au> +# +# Portions created by Dominqiue Louis are +# Copyright (C) 2000 - 2001 Dominqiue Louis. +# +# +# Contributor(s) +# -------------- +# Matthias Thoma <ma.thoma@gmx.de> +# +# Obtained through: +# Joint Endeavour of Delphi Innovators ( Project JEDI ) +# +# You may retrieve the latest version of this file at the Project +# JEDI home page, located at http://delphi-jedi.org +# +# The contents of this file are used with permission, subject to +# the Mozilla Public License Version 1.1 (the "License"); you may +# not use this file except in compliance with the License. You may +# obtain a copy of the License at +# http://www.mozilla.org/MPL/MPL-1.1.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# Description +# ----------- +# +# +# +# +# +# +# +# Requires +# -------- +# SDL.pas somehere in your search path +# +# Programming Notes +# ----------------- +# +# +# +# +# Revision History +# ---------------- +# April 09 2001 - DL : Initial Translation +# +# April 03 2003 - DL : Added jedi-sdl.inc include file to support more +# Pascal compilers. Initial support is now included +# for GnuPascal, VirtualPascal, TMT and obviously +# continue support for Delphi Kylix and FreePascal. +# +# April 24 2003 - DL : under instruction from Alexey Barkovoy, I have added +# better TMT Pascal support and under instruction +# from Prof. Abimbola Olowofoyeku (The African Chief), +# I have added better Gnu Pascal support +# +# April 30 2003 - DL : under instruction from David Mears AKA +# Jason Siletto, I have added FPC Linux support. +# This was compiled with fpc 1.1, so remember to set +# include file path. ie. -Fi/usr/share/fpcsrc/rtl/* +# +# +# $Log: sdl_net.pas,v $ +# Revision 1.7 2005/01/01 02:14:21 savage +# Updated to v1.2.5 +# +# Revision 1.6 2004/08/14 22:54:30 savage +# Updated so that Library name defines are correctly defined for MacOS X. +# +# Revision 1.5 2004/05/10 14:10:04 savage +# Initial MacOS X support. Fixed defines for MACOS ( Classic ) and DARWIN ( MacOS X ). +# +# Revision 1.4 2004/04/13 09:32:08 savage +# Changed Shared object names back to just the .so extension to avoid conflicts on various Linux/Unix distros. Therefore developers will need to create Symbolic links to the actual Share Objects if necessary. +# +# Revision 1.3 2004/04/01 20:53:23 savage +# Changed Linux Shared Object names so they reflect the Symbolic Links that are created when installing the RPMs from the SDL site. +# +# Revision 1.2 2004/03/30 20:23:28 savage +# Tidied up use of UNIX compiler directive. +# +# Revision 1.1 2004/02/16 22:16:40 savage +# v1.0 changes +# +# +# +#****************************************************************************** + +import + sdl + +when defined(windows): + const SDLNetLibName = "SDL_net.dll" +elif defined(macosx): + const SDLNetLibName = "libSDL_net.dylib" +else: + const SDLNetLibName = "libSDL_net.so" + +const #* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL * + SDL_NET_MAJOR_VERSION* = 1'i8 + SDL_NET_MINOR_VERSION* = 2'i8 + SDL_NET_PATCHLEVEL* = 5'i8 # SDL_Net.h constants + #* Resolve a host name and port to an IP address in network form. + # If the function succeeds, it will return 0. + # If the host couldn't be resolved, the host portion of the returned + # address will be INADDR_NONE, and the function will return -1. + # If 'host' is NULL, the resolved host will be set to INADDR_ANY. + # * + INADDR_ANY* = 0x00000000 + INADDR_NONE* = 0xFFFFFFFF #*********************************************************************** + #* UDP network API * + #*********************************************************************** + #* The maximum channels on a a UDP socket * + SDLNET_MAX_UDPCHANNELS* = 32 #* The maximum addresses bound to a single UDP socket channel * + SDLNET_MAX_UDPADDRESSES* = 4 + +type # SDL_net.h types + #*********************************************************************** + #* IPv4 hostname resolution API * + #*********************************************************************** + PIPAddress* = ptr TIPAddress + TIPAddress*{.final.} = object #* TCP network API + host*: Uint32 # 32-bit IPv4 host address */ + port*: Uint16 # 16-bit protocol port */ + + PTCPSocket* = ptr TTCPSocket + TTCPSocket*{.final.} = object #*********************************************************************** + #* UDP network API * + #*********************************************************************** + ready*: int + channel*: int + remoteAddress*: TIPaddress + localAddress*: TIPaddress + sflag*: int + + PUDP_Channel* = ptr TUDP_Channel + TUDP_Channel*{.final.} = object + numbound*: int + address*: array[0..SDLNET_MAX_UDPADDRESSES - 1, TIPAddress] + + PUDPSocket* = ptr TUDPSocket + TUDPSocket*{.final.} = object + ready*: int + channel*: int + address*: TIPAddress + binding*: array[0..SDLNET_MAX_UDPCHANNELS - 1, TUDP_Channel] + + PUDPpacket* = ptr TUDPpacket + PPUDPpacket* = ptr PUDPpacket + TUDPpacket*{.final.} = object #*********************************************************************** + #* Hooks for checking sockets for available data * + #*********************************************************************** + channel*: int #* The src/dst channel of the packet * + data*: PUint8 #* The packet data * + length*: int #* The length of the packet data * + maxlen*: int #* The size of the data buffer * + status*: int #* packet status after sending * + address*: TIPAddress #* The source/dest address of an incoming/outgoing packet * + + PSDLNet_Socket* = ptr TSDLNet_Socket + TSDLNet_Socket*{.final.} = object + ready*: int + channel*: int + + PSDLNet_SocketSet* = ptr TSDLNet_SocketSet + TSDLNet_SocketSet*{.final.} = object #* Any network socket can be safely cast to this socket type * + numsockets*: int + maxsockets*: int + sockets*: PSDLNet_Socket + + PSDLNet_GenericSocket* = ptr TSDLNet_GenericSocket + TSDLNet_GenericSocket*{.final.} = object # This macro can be used to fill a version structure with the compile-time + # version of the SDL_net library. + ready*: int + + +proc SDL_NET_VERSION*(X: var TSDL_version) + #* Initialize/Cleanup the network API + # SDL must be initialized before calls to functions in this library, + # because this library uses utility functions from the SDL library. + #* +proc SDLNet_Init*(): int{.cdecl, importc, dynlib: SDLNetLibName.} +proc SDLNet_Quit*(){.cdecl, importc, dynlib: SDLNetLibName.} + #* Resolve a host name and port to an IP address in network form. + # If the function succeeds, it will return 0. + # If the host couldn't be resolved, the host portion of the returned + # address will be INADDR_NONE, and the function will return -1. + # If 'host' is NULL, the resolved host will be set to INADDR_ANY. + # * +proc SDLNet_ResolveHost*(address: var TIPaddress, host: cstring, port: Uint16): int{. + cdecl, importc, dynlib: SDLNetLibName.} + #* Resolve an ip address to a host name in canonical form. + # If the ip couldn't be resolved, this function returns NULL, + # otherwise a pointer to a static buffer containing the hostname + # is returned. Note that this function is not thread-safe. + #* +proc SDLNet_ResolveIP*(ip: var TIPaddress): cstring{.cdecl, + importc, dynlib: SDLNetLibName.} + #*********************************************************************** + #* TCP network API * + #*********************************************************************** + #* Open a TCP network socket + # If ip.host is INADDR_NONE, this creates a local server socket on the + # given port, otherwise a TCP connection to the remote host and port is + # attempted. The address passed in should already be swapped to network + # byte order (addresses returned from SDLNet_ResolveHost() are already + # in the correct form). + # The newly created socket is returned, or NULL if there was an error. + #* +proc SDLNet_TCP_Open*(ip: var TIPaddress): PTCPSocket{.cdecl, + importc, dynlib: SDLNetLibName.} + #* Accept an incoming connection on the given server socket. + # The newly created socket is returned, or NULL if there was an error. + #* +proc SDLNet_TCP_Accept*(server: PTCPsocket): PTCPSocket{.cdecl, + importc, dynlib: SDLNetLibName.} + #* Get the IP address of the remote system associated with the socket. + # If the socket is a server socket, this function returns NULL. + #* +proc SDLNet_TCP_GetPeerAddress*(sock: PTCPsocket): PIPAddress{.cdecl, + importc, dynlib: SDLNetLibName.} + #* Send 'len' bytes of 'data' over the non-server socket 'sock' + # This function returns the actual amount of data sent. If the return value + # is less than the amount of data sent, then either the remote connection was + # closed, or an unknown socket error occurred. + #* +proc SDLNet_TCP_Send*(sock: PTCPsocket, data: Pointer, length: int): int{.cdecl, + importc, dynlib: SDLNetLibName.} + #* Receive up to 'maxlen' bytes of data over the non-server socket 'sock', + # and store them in the buffer pointed to by 'data'. + # This function returns the actual amount of data received. If the return + # value is less than or equal to zero, then either the remote connection was + # closed, or an unknown socket error occurred. + #* +proc SDLNet_TCP_Recv*(sock: PTCPsocket, data: Pointer, maxlen: int): int{.cdecl, + importc, dynlib: SDLNetLibName.} + #* Close a TCP network socket * +proc SDLNet_TCP_Close*(sock: PTCPsocket){.cdecl, importc, dynlib: SDLNetLibName.} + #*********************************************************************** + #* UDP network API * + #*********************************************************************** + #* Allocate/resize/free a single UDP packet 'size' bytes long. + # The new packet is returned, or NULL if the function ran out of memory. + # * +proc SDLNet_AllocPacket*(size: int): PUDPpacket{.cdecl, importc, dynlib: SDLNetLibName.} +proc SDLNet_ResizePacket*(packet: PUDPpacket, newsize: int): int{.cdecl, + importc, dynlib: SDLNetLibName.} +proc SDLNet_FreePacket*(packet: PUDPpacket){.cdecl, importc, dynlib: SDLNetLibName.} + #* Allocate/Free a UDP packet vector (array of packets) of 'howmany' packets, + # each 'size' bytes long. + # A pointer to the first packet in the array is returned, or NULL if the + # function ran out of memory. + # * +proc SDLNet_AllocPacketV*(howmany: int, size: int): PUDPpacket{.cdecl, + importc, dynlib: SDLNetLibName.} +proc SDLNet_FreePacketV*(packetV: PUDPpacket){.cdecl, importc, dynlib: SDLNetLibName.} + #* Open a UDP network socket + # If 'port' is non-zero, the UDP socket is bound to a local port. + # This allows other systems to send to this socket via a known port. + #* +proc SDLNet_UDP_Open*(port: Uint16): PUDPsocket{.cdecl, importc, dynlib: SDLNetLibName.} + #* Bind the address 'address' to the requested channel on the UDP socket. + # If the channel is -1, then the first unbound channel will be bound with + # the given address as it's primary address. + # If the channel is already bound, this new address will be added to the + # list of valid source addresses for packets arriving on the channel. + # If the channel is not already bound, then the address becomes the primary + # address, to which all outbound packets on the channel are sent. + # This function returns the channel which was bound, or -1 on error. + #* +proc SDLNet_UDP_Bind*(sock: PUDPsocket, channel: int, address: var TIPaddress): int{. + cdecl, importc, dynlib: SDLNetLibName.} + #* Unbind all addresses from the given channel * +proc SDLNet_UDP_Unbind*(sock: PUDPsocket, channel: int){.cdecl, + importc, dynlib: SDLNetLibName.} + #* Get the primary IP address of the remote system associated with the + # socket and channel. If the channel is -1, then the primary IP port + # of the UDP socket is returned -- this is only meaningful for sockets + # opened with a specific port. + # If the channel is not bound and not -1, this function returns NULL. + # * +proc SDLNet_UDP_GetPeerAddress*(sock: PUDPsocket, channel: int): PIPAddress{. + cdecl, importc, dynlib: SDLNetLibName.} + #* Send a vector of packets to the the channels specified within the packet. + # If the channel specified in the packet is -1, the packet will be sent to + # the address in the 'src' member of the packet. + # Each packet will be updated with the status of the packet after it has + # been sent, -1 if the packet send failed. + # This function returns the number of packets sent. + #* +proc SDLNet_UDP_SendV*(sock: PUDPsocket, packets: PPUDPpacket, npackets: int): int{. + cdecl, importc, dynlib: SDLNetLibName.} + #* Send a single packet to the specified channel. + # If the channel specified in the packet is -1, the packet will be sent to + # the address in the 'src' member of the packet. + # The packet will be updated with the status of the packet after it has + # been sent. + # This function returns 1 if the packet was sent, or 0 on error. + #* +proc SDLNet_UDP_Send*(sock: PUDPsocket, channel: int, packet: PUDPpacket): int{. + cdecl, importc, dynlib: SDLNetLibName.} + #* Receive a vector of pending packets from the UDP socket. + # The returned packets contain the source address and the channel they arrived + # on. If they did not arrive on a bound channel, the the channel will be set + # to -1. + # The channels are checked in highest to lowest order, so if an address is + # bound to multiple channels, the highest channel with the source address + # bound will be returned. + # This function returns the number of packets read from the network, or -1 + # on error. This function does not block, so can return 0 packets pending. + #* +proc SDLNet_UDP_RecvV*(sock: PUDPsocket, packets: PPUDPpacket): int{.cdecl, + importc, dynlib: SDLNetLibName.} + #* Receive a single packet from the UDP socket. + # The returned packet contains the source address and the channel it arrived + # on. If it did not arrive on a bound channel, the the channel will be set + # to -1. + # The channels are checked in highest to lowest order, so if an address is + # bound to multiple channels, the highest channel with the source address + # bound will be returned. + # This function returns the number of packets read from the network, or -1 + # on error. This function does not block, so can return 0 packets pending. + #* +proc SDLNet_UDP_Recv*(sock: PUDPsocket, packet: PUDPpacket): int{.cdecl, + importc, dynlib: SDLNetLibName.} + #* Close a UDP network socket * +proc SDLNet_UDP_Close*(sock: PUDPsocket){.cdecl, importc, dynlib: SDLNetLibName.} + #*********************************************************************** + #* Hooks for checking sockets for available data * + #*********************************************************************** + #* Allocate a socket set for use with SDLNet_CheckSockets() + # This returns a socket set for up to 'maxsockets' sockets, or NULL if + # the function ran out of memory. + # * +proc SDLNet_AllocSocketSet*(maxsockets: int): PSDLNet_SocketSet{.cdecl, + importc, dynlib: SDLNetLibName.} + #* Add a socket to a set of sockets to be checked for available data * +proc SDLNet_AddSocket*(theSet: PSDLNet_SocketSet, sock: PSDLNet_GenericSocket): int{. + cdecl, importc, dynlib: SDLNetLibName.} +proc SDLNet_TCP_AddSocket*(theSet: PSDLNet_SocketSet, sock: PTCPSocket): int +proc SDLNet_UDP_AddSocket*(theSet: PSDLNet_SocketSet, sock: PUDPSocket): int + #* Remove a socket from a set of sockets to be checked for available data * +proc SDLNet_DelSocket*(theSet: PSDLNet_SocketSet, sock: PSDLNet_GenericSocket): int{. + cdecl, importc, dynlib: SDLNetLibName.} +proc SDLNet_TCP_DelSocket*(theSet: PSDLNet_SocketSet, sock: PTCPSocket): int + # SDLNet_DelSocket(set, (SDLNet_GenericSocket)sock) +proc SDLNet_UDP_DelSocket*(theSet: PSDLNet_SocketSet, sock: PUDPSocket): int + #SDLNet_DelSocket(set, (SDLNet_GenericSocket)sock) + #* This function checks to see if data is available for reading on the + # given set of sockets. If 'timeout' is 0, it performs a quick poll, + # otherwise the function returns when either data is available for + # reading, or the timeout in milliseconds has elapsed, which ever occurs + # first. This function returns the number of sockets ready for reading, + # or -1 if there was an error with the select() system call. + #* +proc SDLNet_CheckSockets*(theSet: PSDLNet_SocketSet, timeout: Sint32): int{. + cdecl, importc, dynlib: SDLNetLibName.} + #* After calling SDLNet_CheckSockets(), you can use this function on a + # socket that was in the socket set, to find out if data is available + # for reading. + #* +proc SDLNet_SocketReady*(sock: PSDLNet_GenericSocket): bool + #* Free a set of sockets allocated by SDL_NetAllocSocketSet() * +proc SDLNet_FreeSocketSet*(theSet: PSDLNet_SocketSet){.cdecl, + importc, dynlib: SDLNetLibName.} + #*********************************************************************** + #* Platform-independent data conversion functions * + #*********************************************************************** + #* Write a 16/32 bit value to network packet buffer * +proc SDLNet_Write16*(value: Uint16, area: Pointer){.cdecl, importc, dynlib: SDLNetLibName.} +proc SDLNet_Write32*(value: Uint32, area: Pointer){.cdecl, importc, dynlib: SDLNetLibName.} + #* Read a 16/32 bit value from network packet buffer * +proc SDLNet_Read16*(area: Pointer): Uint16{.cdecl, importc, dynlib: SDLNetLibName.} +proc SDLNet_Read32*(area: Pointer): Uint32{.cdecl, importc, dynlib: SDLNetLibName.} + #*********************************************************************** + #* Error reporting functions * + #*********************************************************************** + #* We'll use SDL's functions for error reporting * +proc SDLNet_SetError*(fmt: cstring) +proc SDLNet_GetError*(): cstring +# implementation + +proc SDL_NET_VERSION(X: var TSDL_version) = + X.major = SDL_NET_MAJOR_VERSION + X.minor = SDL_NET_MINOR_VERSION + X.patch = SDL_NET_PATCHLEVEL + +proc SDLNet_TCP_AddSocket(theSet: PSDLNet_SocketSet, sock: PTCPSocket): int = + result = SDLNet_AddSocket(theSet, cast[PSDLNet_GenericSocket](sock)) + +proc SDLNet_UDP_AddSocket(theSet: PSDLNet_SocketSet, sock: PUDPSocket): int = + result = SDLNet_AddSocket(theSet, cast[PSDLNet_GenericSocket](sock)) + +proc SDLNet_TCP_DelSocket(theSet: PSDLNet_SocketSet, sock: PTCPSocket): int = + result = SDLNet_DelSocket(theSet, cast[PSDLNet_GenericSocket](sock)) + +proc SDLNet_UDP_DelSocket(theSet: PSDLNet_SocketSet, sock: PUDPSocket): int = + result = SDLNet_DelSocket(theSet, cast[PSDLNet_GenericSocket](sock)) + +proc SDLNet_SocketReady(sock: PSDLNet_GenericSocket): bool = + result = ((sock != nil) and (sock.ready == 1)) + +proc SDLNet_SetError(fmt: cstring) = + SDL_SetError(fmt) + +proc SDLNet_GetError(): cstring = + result = SDL_GetError() diff --git a/lib/oldwrappers/sdl/sdl_ttf.nim b/lib/oldwrappers/sdl/sdl_ttf.nim new file mode 100644 index 000000000..724c2f634 --- /dev/null +++ b/lib/oldwrappers/sdl/sdl_ttf.nim @@ -0,0 +1,346 @@ + +# +# $Id: sdl_ttf.pas,v 1.18 2007/06/01 11:16:33 savage Exp $ +# +# +#****************************************************************************** +# +# JEDI-SDL : Pascal units for SDL - Simple DirectMedia Layer +# Conversion of the Simple DirectMedia Layer Headers +# +# Portions created by Sam Lantinga <slouken@devolution.com> are +# Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga +# 5635-34 Springhouse Dr. +# Pleasanton, CA 94588 (USA) +# +# All Rights Reserved. +# +# The original files are : SDL_ttf.h +# +# The initial developer of this Pascal code was : +# Dominqiue Louis <Dominique@SavageSoftware.com.au> +# +# Portions created by Dominqiue Louis are +# Copyright (C) 2000 - 2001 Dominqiue Louis. +# +# +# Contributor(s) +# -------------- +# Tom Jones <tigertomjones@gmx.de> His Project inspired this conversion +# +# Obtained through: +# Joint Endeavour of Delphi Innovators ( Project JEDI ) +# +# You may retrieve the latest version of this file at the Project +# JEDI home page, located at http://delphi-jedi.org +# +# The contents of this file are used with permission, subject to +# the Mozilla Public License Version 1.1 (the "License"); you may +# not use this file except in compliance with the License. You may +# obtain a copy of the License at +# http://www.mozilla.org/MPL/MPL-1.1.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# Description +# ----------- +# +# +# +# +# +# +# +# Requires +# -------- +# The SDL Runtime libraris on Win32 : SDL.dll on Linux : libSDL.so +# They are available from... +# http://www.libsdl.org . +# +# Programming Notes +# ----------------- +# +# +# +# +# Revision History +# ---------------- +# December 08 2002 - DL : Fixed definition of TTF_RenderUnicode_Solid +# +# April 03 2003 - DL : Added jedi-sdl.inc include file to support more +# Pascal compilers. Initial support is now included +# for GnuPascal, VirtualPascal, TMT and obviously +# continue support for Delphi Kylix and FreePascal. +# +# April 24 2003 - DL : under instruction from Alexey Barkovoy, I have added +# better TMT Pascal support and under instruction +# from Prof. Abimbola Olowofoyeku (The African Chief), +# I have added better Gnu Pascal support +# +# April 30 2003 - DL : under instruction from David Mears AKA +# Jason Siletto, I have added FPC Linux support. +# This was compiled with fpc 1.1, so remember to set +# include file path. ie. -Fi/usr/share/fpcsrc/rtl/* +# +# +# $Log: sdl_ttf.pas,v $ +# Revision 1.18 2007/06/01 11:16:33 savage +# Added IFDEF UNIX for Workaround. +# +# Revision 1.17 2007/06/01 08:38:21 savage +# Added TTF_RenderText_Solid workaround as suggested by Michalis Kamburelis +# +# Revision 1.16 2007/05/29 21:32:14 savage +# Changes as suggested by Almindor for 64bit compatibility. +# +# Revision 1.15 2007/05/20 20:32:45 savage +# Initial Changes to Handle 64 Bits +# +# Revision 1.14 2006/12/02 00:19:01 savage +# Updated to latest version +# +# Revision 1.13 2005/04/10 11:48:33 savage +# Changes as suggested by Michalis, thanks. +# +# Revision 1.12 2005/01/05 01:47:14 savage +# Changed LibName to reflect what MacOS X should have. ie libSDL*-1.2.0.dylib respectively. +# +# Revision 1.11 2005/01/04 23:14:57 savage +# Changed LibName to reflect what most Linux distros will have. ie libSDL*-1.2.so.0 respectively. +# +# Revision 1.10 2005/01/02 19:07:32 savage +# Slight bug fix to use LongInt instead of Long ( Thanks Michalis Kamburelis ) +# +# Revision 1.9 2005/01/01 02:15:20 savage +# Updated to v2.0.7 +# +# Revision 1.8 2004/10/07 21:02:32 savage +# Fix for FPC +# +# Revision 1.7 2004/09/30 22:39:50 savage +# Added a true type font class which contains a wrap text function. +# Changed the sdl_ttf.pas header to reflect the future of jedi-sdl. +# +# Revision 1.6 2004/08/14 22:54:30 savage +# Updated so that Library name defines are correctly defined for MacOS X. +# +# Revision 1.5 2004/05/10 14:10:04 savage +# Initial MacOS X support. Fixed defines for MACOS ( Classic ) and DARWIN ( MacOS X ). +# +# Revision 1.4 2004/04/13 09:32:08 savage +# Changed Shared object names back to just the .so extension to avoid conflicts on various Linux/Unix distros. Therefore developers will need to create Symbolic links to the actual Share Objects if necessary. +# +# Revision 1.3 2004/04/01 20:53:24 savage +# Changed Linux Shared Object names so they reflect the Symbolic Links that are created when installing the RPMs from the SDL site. +# +# Revision 1.2 2004/03/30 20:23:28 savage +# Tidied up use of UNIX compiler directive. +# +# Revision 1.1 2004/02/16 22:16:40 savage +# v1.0 changes +# +# +# +#****************************************************************************** +# +# Define this to workaround a known bug in some freetype versions. +# The error manifests as TTF_RenderGlyph_Solid returning nil (error) +# and error message (in SDL_Error) is +# "Failed loading DPMSDisable: /usr/lib/libX11.so.6: undefined symbol: DPMSDisable" +# See [http://lists.libsdl.org/pipermail/sdl-libsdl.org/2007-March/060459.html] +# + +import sdl + +when defined(windows): + const SDLttfLibName = "SDL_ttf.dll" +elif defined(macosx): + const SDLttfLibName = "libSDL_ttf-2.0.0.dylib" +else: + const SDLttfLibName = "libSDL_ttf.so" + +const + SDL_TTF_MAJOR_VERSION* = 2'i8 + SDL_TTF_MINOR_VERSION* = 0'i8 + SDL_TTF_PATCHLEVEL* = 8'i8 # Backwards compatibility + TTF_MAJOR_VERSION* = SDL_TTF_MAJOR_VERSION + TTF_MINOR_VERSION* = SDL_TTF_MINOR_VERSION + TTF_PATCHLEVEL* = SDL_TTF_PATCHLEVEL #* + # Set and retrieve the font style + # This font style is implemented by modifying the font glyphs, and + # doesn't reflect any inherent properties of the truetype font file. + #* + TTF_STYLE_NORMAL* = 0x00000000 + TTF_STYLE_BOLD* = 0x00000001 + TTF_STYLE_ITALIC* = 0x00000002 + TTF_STYLE_UNDERLINE* = 0x00000004 # ZERO WIDTH NO-BREAKSPACE (Unicode byte order mark) + UNICODE_BOM_NATIVE* = 0x0000FEFF + UNICODE_BOM_SWAPPED* = 0x0000FFFE + +type + PTTF_Font* = ptr TTTF_font + TTTF_Font*{.final.} = object # This macro can be used to fill a version structure with the compile-time + # version of the SDL_ttf library. + +proc SDL_TTF_VERSION*(X: var TSDL_version) + # This function gets the version of the dynamically linked SDL_ttf library. + # It should NOT be used to fill a version structure, instead you should use the + # SDL_TTF_VERSION() macro. +proc TTF_Linked_Version*(): PSDL_version{.cdecl, importc, dynlib: SDLttfLibName.} + # This function tells the library whether UNICODE text is generally + # byteswapped. A UNICODE BOM character in a string will override + # this setting for the remainder of that string. + # +proc TTF_ByteSwappedUNICODE*(swapped: int){.cdecl, importc, dynlib: SDLttfLibName.} + #returns 0 on succes, -1 if error occurs +proc TTF_Init*(): int{.cdecl, importc, dynlib: SDLttfLibName.} + # + # Open a font file and create a font of the specified point size. + # Some .fon fonts will have several sizes embedded in the file, so the + # point size becomes the index of choosing which size. If the value + # is too high, the last indexed size will be the default. + # +proc TTF_OpenFont*(filename: cstring, ptsize: int): PTTF_Font{.cdecl, + importc, dynlib: SDLttfLibName.} +proc TTF_OpenFontIndex*(filename: cstring, ptsize: int, index: int32): PTTF_Font{. + cdecl, importc, dynlib: SDLttfLibName.} +proc TTF_OpenFontRW*(src: PSDL_RWops, freesrc: int, ptsize: int): PTTF_Font{. + cdecl, importc, dynlib: SDLttfLibName.} +proc TTF_OpenFontIndexRW*(src: PSDL_RWops, freesrc: int, ptsize: int, + index: int32): PTTF_Font{.cdecl, importc, dynlib: SDLttfLibName.} +proc TTF_GetFontStyle*(font: PTTF_Font): int{.cdecl, importc, dynlib: SDLttfLibName.} +proc TTF_SetFontStyle*(font: PTTF_Font, style: int){.cdecl, + importc, dynlib: SDLttfLibName.} + # Get the total height of the font - usually equal to point size +proc TTF_FontHeight*(font: PTTF_Font): int{.cdecl, importc, dynlib: SDLttfLibName.} + # Get the offset from the baseline to the top of the font + # This is a positive value, relative to the baseline. + # +proc TTF_FontAscent*(font: PTTF_Font): int{.cdecl, importc, dynlib: SDLttfLibName.} + # Get the offset from the baseline to the bottom of the font + # This is a negative value, relative to the baseline. + # +proc TTF_FontDescent*(font: PTTF_Font): int{.cdecl, importc, dynlib: SDLttfLibName.} + # Get the recommended spacing between lines of text for this font +proc TTF_FontLineSkip*(font: PTTF_Font): int{.cdecl, importc, dynlib: SDLttfLibName.} + # Get the number of faces of the font +proc TTF_FontFaces*(font: PTTF_Font): int32{.cdecl, importc, dynlib: SDLttfLibName.} + # Get the font face attributes, if any +proc TTF_FontFaceIsFixedWidth*(font: PTTF_Font): int{.cdecl, + importc, dynlib: SDLttfLibName.} +proc TTF_FontFaceFamilyName*(font: PTTF_Font): cstring{.cdecl, + importc, dynlib: SDLttfLibName.} +proc TTF_FontFaceStyleName*(font: PTTF_Font): cstring{.cdecl, + importc, dynlib: SDLttfLibName.} + # Get the metrics (dimensions) of a glyph +proc TTF_GlyphMetrics*(font: PTTF_Font, ch: Uint16, minx: var int, + maxx: var int, miny: var int, maxy: var int, + advance: var int): int{.cdecl, importc, dynlib: SDLttfLibName.} + # Get the dimensions of a rendered string of text +proc TTF_SizeText*(font: PTTF_Font, text: cstring, w: var int, y: var int): int{. + cdecl, importc, dynlib: SDLttfLibName.} +proc TTF_SizeUTF8*(font: PTTF_Font, text: cstring, w: var int, y: var int): int{. + cdecl, importc, dynlib: SDLttfLibName.} +proc TTF_SizeUNICODE*(font: PTTF_Font, text: PUint16, w: var int, y: var int): int{. + cdecl, importc, dynlib: SDLttfLibName.} + # Create an 8-bit palettized surface and render the given text at + # fast quality with the given font and color. The 0 pixel is the + # colorkey, giving a transparent background, and the 1 pixel is set + # to the text color. + # This function returns the new surface, or NULL if there was an error. + # +proc TTF_RenderUTF8_Solid*(font: PTTF_Font, text: cstring, fg: TSDL_Color): PSDL_Surface{. + cdecl, importc, dynlib: SDLttfLibName.} +proc TTF_RenderUNICODE_Solid*(font: PTTF_Font, text: PUint16, fg: TSDL_Color): PSDL_Surface{. + cdecl, importc, dynlib: SDLttfLibName.} + # + #Create an 8-bit palettized surface and render the given glyph at + # fast quality with the given font and color. The 0 pixel is the + # colorkey, giving a transparent background, and the 1 pixel is set + # to the text color. The glyph is rendered without any padding or + # centering in the X direction, and aligned normally in the Y direction. + # This function returns the new surface, or NULL if there was an error. + # +proc TTF_RenderGlyph_Solid*(font: PTTF_Font, ch: Uint16, fg: TSDL_Color): PSDL_Surface{. + cdecl, importc, dynlib: SDLttfLibName.} + # Create an 8-bit palettized surface and render the given text at + # high quality with the given font and colors. The 0 pixel is background, + # while other pixels have varying degrees of the foreground color. + # This function returns the new surface, or NULL if there was an error. + # +proc TTF_RenderText_Shaded*(font: PTTF_Font, text: cstring, fg: TSDL_Color, + bg: TSDL_Color): PSDL_Surface{.cdecl, + importc, dynlib: SDLttfLibName.} +proc TTF_RenderUTF8_Shaded*(font: PTTF_Font, text: cstring, fg: TSDL_Color, + bg: TSDL_Color): PSDL_Surface{.cdecl, + importc, dynlib: SDLttfLibName.} +proc TTF_RenderUNICODE_Shaded*(font: PTTF_Font, text: PUint16, fg: TSDL_Color, + bg: TSDL_Color): PSDL_Surface{.cdecl, + importc, dynlib: SDLttfLibName.} + # Create an 8-bit palettized surface and render the given glyph at + # high quality with the given font and colors. The 0 pixel is background, + # while other pixels have varying degrees of the foreground color. + # The glyph is rendered without any padding or centering in the X + # direction, and aligned normally in the Y direction. + # This function returns the new surface, or NULL if there was an error. + # +proc TTF_RenderGlyph_Shaded*(font: PTTF_Font, ch: Uint16, fg: TSDL_Color, + bg: TSDL_Color): PSDL_Surface{.cdecl, + importc, dynlib: SDLttfLibName.} + # Create a 32-bit ARGB surface and render the given text at high quality, + # using alpha blending to dither the font with the given color. + # This function returns the new surface, or NULL if there was an error. + # +proc TTF_RenderText_Blended*(font: PTTF_Font, text: cstring, fg: TSDL_Color): PSDL_Surface{. + cdecl, importc, dynlib: SDLttfLibName.} +proc TTF_RenderUTF8_Blended*(font: PTTF_Font, text: cstring, fg: TSDL_Color): PSDL_Surface{. + cdecl, importc, dynlib: SDLttfLibName.} +proc TTF_RenderUNICODE_Blended*(font: PTTF_Font, text: PUint16, fg: TSDL_Color): PSDL_Surface{. + cdecl, importc, dynlib: SDLttfLibName.} + # Create a 32-bit ARGB surface and render the given glyph at high quality, + # using alpha blending to dither the font with the given color. + # The glyph is rendered without any padding or centering in the X + # direction, and aligned normally in the Y direction. + # This function returns the new surface, or NULL if there was an error. + # +proc TTF_RenderGlyph_Blended*(font: PTTF_Font, ch: Uint16, fg: TSDL_Color): PSDL_Surface{. + cdecl, importc, dynlib: SDLttfLibName.} + # For compatibility with previous versions, here are the old functions + ##define TTF_RenderText(font, text, fg, bg) + # TTF_RenderText_Shaded(font, text, fg, bg) + ##define TTF_RenderUTF8(font, text, fg, bg) + # TTF_RenderUTF8_Shaded(font, text, fg, bg) + ##define TTF_RenderUNICODE(font, text, fg, bg) + # TTF_RenderUNICODE_Shaded(font, text, fg, bg) + # Close an opened font file +proc TTF_CloseFont*(font: PTTF_Font){.cdecl, importc, dynlib: SDLttfLibName.} + #De-initialize TTF engine +proc TTF_Quit*(){.cdecl, importc, dynlib: SDLttfLibName.} + # Check if the TTF engine is initialized +proc TTF_WasInit*(): int{.cdecl, importc, dynlib: SDLttfLibName.} + # We'll use SDL for reporting errors +proc TTF_SetError*(fmt: cstring) +proc TTF_GetError*(): cstring +# implementation + +proc SDL_TTF_VERSION(X: var TSDL_version) = + X.major = SDL_TTF_MAJOR_VERSION + X.minor = SDL_TTF_MINOR_VERSION + X.patch = SDL_TTF_PATCHLEVEL + +proc TTF_SetError(fmt: cstring) = + SDL_SetError(fmt) + +proc TTF_GetError(): cstring = + result = SDL_GetError() + +when not(defined(Workaround_TTF_RenderText_Solid)): + proc TTF_RenderText_Solid*(font: PTTF_Font, text: cstring, fg: TSDL_Color): PSDL_Surface{. + cdecl, importc, dynlib: SDLttfLibName.} +else: + proc TTF_RenderText_Solid(font: PTTF_Font, text: cstring, fg: TSDL_Color): PSDL_Surface = + var Black: TSDL_Color # initialized to zero + Result = TTF_RenderText_Shaded(font, text, fg, Black) diff --git a/lib/oldwrappers/sdl/smpeg.nim b/lib/oldwrappers/sdl/smpeg.nim new file mode 100644 index 000000000..733a3fcf9 --- /dev/null +++ b/lib/oldwrappers/sdl/smpeg.nim @@ -0,0 +1,319 @@ + +#****************************************************************************** +# +# $Id: smpeg.pas,v 1.7 2004/08/14 22:54:30 savage Exp $ +# +# +# +# Borland Delphi SMPEG - SDL MPEG Player Library +# Conversion of the SMPEG - SDL MPEG Player Library +# +# Portions created by Sam Lantinga <slouken@devolution.com> are +# Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga +# 5635-34 Springhouse Dr. +# Pleasanton, CA 94588 (USA) +# +# All Rights Reserved. +# +# The original files are : smpeg.h +# +# The initial developer of this Pascal code was : +# Matthias Thoma <ma.thoma@gmx.de> +# +# Portions created by Matthias Thoma are +# Copyright (C) 2000 - 2001 Matthias Thoma. +# +# +# Contributor(s) +# -------------- +# Tom Jones <tigertomjones@gmx.de> His Project inspired this conversion +# Matthias Thoma <ma.thoma@gmx.de> +# +# Obtained through: +# Joint Endeavour of Delphi Innovators ( Project JEDI ) +# +# You may retrieve the latest version of this file at the Project +# JEDI home page, located at http://delphi-jedi.org +# +# The contents of this file are used with permission, subject to +# the Mozilla Public License Version 1.1 (the "License"); you may +# not use this file except in compliance with the License. You may +# obtain a copy of the License at +# http://www.mozilla.org/MPL/MPL-1.1.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# Description +# ----------- +# +# +# +# +# +# +# +# Requires +# -------- +# The SDL Runtime libraris on Win32 : SDL.dll on Linux : libSDL-1.2.so.0 +# They are available from... +# http://www.libsdl.org . +# +# Programming Notes +# ----------------- +# +# +# +# +# Revision History +# ---------------- +# May 08 2001 - MT : Initial conversion +# +# October 12 2001 - DA : Various changes as suggested by David Acklam +# +# April 03 2003 - DL : Added jedi-sdl.inc include file to support more +# Pascal compilers. Initial support is now included +# for GnuPascal, VirtualPascal, TMT and obviously +# continue support for Delphi Kylix and FreePascal. +# +# April 08 2003 - MK : Aka Mr Kroket - Added Better FPC support +# Fixed all invalid calls to DLL. +# Changed constant names to: +# const +# STATUS_SMPEG_ERROR = -1; +# STATUS_SMPEG_STOPPED = 0; +# STATUS_SMPEG_PLAYING = 1; +# because SMPEG_ERROR is a function (_SMPEG_error +# isn't correct), and cannot be two elements with the +# same name +# +# April 24 2003 - DL : under instruction from Alexey Barkovoy, I have added +# better TMT Pascal support and under instruction +# from Prof. Abimbola Olowofoyeku (The African Chief), +# I have added better Gnu Pascal support +# +# April 30 2003 - DL : under instruction from David Mears AKA +# Jason Siletto, I have added FPC Linux support. +# This was compiled with fpc 1.1, so remember to set +# include file path. ie. -Fi/usr/share/fpcsrc/rtl/* +# +# +# $Log: smpeg.pas,v $ +# Revision 1.7 2004/08/14 22:54:30 savage +# Updated so that Library name defines are correctly defined for MacOS X. +# +# Revision 1.6 2004/05/10 14:10:04 savage +# Initial MacOS X support. Fixed defines for MACOS ( Classic ) and DARWIN ( MacOS X ). +# +# Revision 1.5 2004/04/13 09:32:08 savage +# Changed Shared object names back to just the .so extension to avoid conflicts on various Linux/Unix distros. Therefore developers will need to create Symbolic links to the actual Share Objects if necessary. +# +# Revision 1.4 2004/04/02 10:40:55 savage +# Changed Linux Shared Object name so they reflect the Symbolic Links that are created when installing the RPMs from the SDL site. +# +# Revision 1.3 2004/03/31 22:20:02 savage +# Windows unit not used in this file, so it was removed to keep the code tidy. +# +# Revision 1.2 2004/03/30 20:23:28 savage +# Tidied up use of UNIX compiler directive. +# +# Revision 1.1 2004/02/14 23:35:42 savage +# version 1 of sdl_image, sdl_mixer and smpeg. +# +# +# +#****************************************************************************** + +import + sdl + +when defined(windows): + const SmpegLibName = "smpeg.dll" +elif defined(macosx): + const SmpegLibName = "libsmpeg.dylib" +else: + const SmpegLibName = "libsmpeg.so" + +const + SMPEG_FILTER_INFO_MB_ERROR* = 1 + SMPEG_FILTER_INFO_PIXEL_ERROR* = 2 # Filter info from SMPEG + +type + SMPEG_FilterInfo*{.final.} = object + yuv_mb_square_error*: PUint16 + yuv_pixel_square_error*: PUint16 + + TSMPEG_FilterInfo* = SMPEG_FilterInfo + PSMPEG_FilterInfo* = ptr SMPEG_FilterInfo # MPEG filter definition + PSMPEG_Filter* = ptr TSMPEG_Filter # Callback functions for the filter + TSMPEG_FilterCallback* = proc (dest, source: PSDL_Overlay, region: PSDL_Rect, + filter_info: PSMPEG_FilterInfo, data: Pointer): Pointer{. + cdecl.} + TSMPEG_FilterDestroy* = proc (Filter: PSMPEG_Filter): Pointer{.cdecl.} # The filter + # definition itself + TSMPEG_Filter*{.final.} = object # The null filter (default). It simply copies the source rectangle to the video overlay. + flags*: Uint32 + data*: Pointer + callback*: TSMPEG_FilterCallback + destroy*: TSMPEG_FilterDestroy + + +proc SMPEGfilter_null*(): PSMPEG_Filter{.cdecl, importc, dynlib: SmpegLibName.} + # The bilinear filter. A basic low-pass filter that will produce a smoother image. +proc SMPEGfilter_bilinear*(): PSMPEG_Filter{.cdecl, importc, dynlib: SmpegLibName.} + # The deblocking filter. It filters block borders and non-intra coded blocks to reduce blockiness +proc SMPEGfilter_deblocking*(): PSMPEG_Filter{.cdecl, importc, dynlib: SmpegLibName.} + #------------------------------------------------------------------------------ + # SMPEG.h + #------------------------------------------------------------------------------ +const + SMPEG_MAJOR_VERSION* = 0'i8 + SMPEG_MINOR_VERSION* = 4'i8 + SMPEG_PATCHLEVEL* = 2'i8 + +type + SMPEG_version*{.final.} = object + major*: UInt8 + minor*: UInt8 + patch*: UInt8 + + TSMPEG_version* = SMPEG_version + PSMPEG_version* = ptr TSMPEG_version # This is the actual SMPEG object + TSMPEG*{.final.} = object + PSMPEG* = ptr TSMPEG # Used to get information about the SMPEG object + TSMPEG_Info*{.final.} = object + has_audio*: int + has_video*: int + width*: int + height*: int + current_frame*: int + current_fps*: float64 + audio_string*: array[0..79, char] + audio_current_frame*: int + current_offset*: UInt32 + total_size*: UInt32 + current_time*: float64 + total_time*: float64 + + PSMPEG_Info* = ptr TSMPEG_Info # Possible MPEG status codes + +const + STATUS_SMPEG_ERROR* = - 1 + STATUS_SMPEG_STOPPED* = 0 + STATUS_SMPEG_PLAYING* = 1 + +type + TSMPEGstatus* = int + PSMPEGstatus* = ptr int # Matches the declaration of SDL_UpdateRect() + TSMPEG_DisplayCallback* = proc (dst: PSDL_Surface, x, y: int, w, h: int): Pointer{. + cdecl.} # Create a new SMPEG object from an MPEG file. + # On return, if 'info' is not NULL, it will be filled with information + # about the MPEG object. + # This function returns a new SMPEG object. Use SMPEG_error() to find out + # whether or not there was a problem building the MPEG stream. + # The sdl_audio parameter indicates if SMPEG should initialize the SDL audio + # subsystem. If not, you will have to use the SMPEG_playaudio() function below + # to extract the decoded data. + +proc SMPEG_new*(theFile: cstring, info: PSMPEG_Info, sdl_audio: int): PSMPEG{. + cdecl, importc, dynlib: SmpegLibName.} + # The same as above for a file descriptor +proc SMPEG_new_descr*(theFile: int, info: PSMPEG_Info, sdl_audio: int): PSMPEG{. + cdecl, importc, dynlib: SmpegLibName.} + # The same as above but for a raw chunk of data. SMPEG makes a copy of the + # data, so the application is free to delete after a successful call to this + # function. +proc SMPEG_new_data*(data: Pointer, size: int, info: PSMPEG_Info, sdl_audio: int): PSMPEG{. + cdecl, importc, dynlib: SmpegLibName.} + # Get current information about an SMPEG object +proc SMPEG_getinfo*(mpeg: PSMPEG, info: PSMPEG_Info){.cdecl, + importc, dynlib: SmpegLibName.} + #procedure SMPEG_getinfo(mpeg: PSMPEG; info: Pointer); + #cdecl; external SmpegLibName; + # Enable or disable audio playback in MPEG stream +proc SMPEG_enableaudio*(mpeg: PSMPEG, enable: int){.cdecl, importc, dynlib: SmpegLibName.} + # Enable or disable video playback in MPEG stream +proc SMPEG_enablevideo*(mpeg: PSMPEG, enable: int){.cdecl, importc, dynlib: SmpegLibName.} + # Delete an SMPEG object +proc SMPEG_delete*(mpeg: PSMPEG){.cdecl, importc, dynlib: SmpegLibName.} + # Get the current status of an SMPEG object +proc SMPEG_status*(mpeg: PSMPEG): TSMPEGstatus{.cdecl, importc, dynlib: SmpegLibName.} + # status + # Set the audio volume of an MPEG stream, in the range 0-100 +proc SMPEG_setvolume*(mpeg: PSMPEG, volume: int){.cdecl, importc, dynlib: SmpegLibName.} + # Set the destination surface for MPEG video playback + # 'surfLock' is a mutex used to synchronize access to 'dst', and can be NULL. + # 'callback' is a function called when an area of 'dst' needs to be updated. + # If 'callback' is NULL, the default function (SDL_UpdateRect) will be used. +proc SMPEG_setdisplay*(mpeg: PSMPEG, dst: PSDL_Surface, surfLock: PSDL_mutex, + callback: TSMPEG_DisplayCallback){.cdecl, + importc, dynlib: SmpegLibName.} + # Set or clear looping play on an SMPEG object +proc SMPEG_loop*(mpeg: PSMPEG, repeat: int){.cdecl, importc, dynlib: SmpegLibName.} + # Scale pixel display on an SMPEG object +proc SMPEG_scaleXY*(mpeg: PSMPEG, width, height: int){.cdecl, + importc, dynlib: SmpegLibName.} +proc SMPEG_scale*(mpeg: PSMPEG, scale: int){.cdecl, importc, dynlib: SmpegLibName.} +proc SMPEG_Double*(mpeg: PSMPEG, doubleit: bool) + # Move the video display area within the destination surface +proc SMPEG_move*(mpeg: PSMPEG, x, y: int){.cdecl, importc, dynlib: SmpegLibName.} + # Set the region of the video to be shown +proc SMPEG_setdisplayregion*(mpeg: PSMPEG, x, y, w, h: int){.cdecl, + importc, dynlib: SmpegLibName.} + # Play an SMPEG object +proc SMPEG_play*(mpeg: PSMPEG){.cdecl, importc, dynlib: SmpegLibName.} + # Pause/Resume playback of an SMPEG object +proc SMPEG_pause*(mpeg: PSMPEG){.cdecl, importc, dynlib: SmpegLibName.} + # Stop playback of an SMPEG object +proc SMPEG_stop*(mpeg: PSMPEG){.cdecl, importc, dynlib: SmpegLibName.} + # Rewind the play position of an SMPEG object to the beginning of the MPEG +proc SMPEG_rewind*(mpeg: PSMPEG){.cdecl, importc, dynlib: SmpegLibName.} + # Seek 'bytes' bytes in the MPEG stream +proc SMPEG_seek*(mpeg: PSMPEG, bytes: int){.cdecl, importc, dynlib: SmpegLibName.} + # Skip 'seconds' seconds in the MPEG stream +proc SMPEG_skip*(mpeg: PSMPEG, seconds: float32){.cdecl, importc, dynlib: SmpegLibName.} + # Render a particular frame in the MPEG video + # API CHANGE: This function no longer takes a target surface and position. + # Use SMPEG_setdisplay() and SMPEG_move() to set this information. +proc SMPEG_renderFrame*(mpeg: PSMPEG, framenum: int){.cdecl, + importc, dynlib: SmpegLibName.} + # Render the last frame of an MPEG video +proc SMPEG_renderFinal*(mpeg: PSMPEG, dst: PSDL_Surface, x, y: int){.cdecl, + importc, dynlib: SmpegLibName.} + # Set video filter +proc SMPEG_filter*(mpeg: PSMPEG, filter: PSMPEG_Filter): PSMPEG_Filter{.cdecl, + importc, dynlib: SmpegLibName.} + # Return NULL if there is no error in the MPEG stream, or an error message + # if there was a fatal error in the MPEG stream for the SMPEG object. +proc SMPEG_error*(mpeg: PSMPEG): cstring{.cdecl, importc, dynlib: SmpegLibName.} + # Exported callback function for audio playback. + # The function takes a buffer and the amount of data to fill, and returns + # the amount of data in bytes that was actually written. This will be the + # amount requested unless the MPEG audio has finished. + # +proc SMPEG_playAudio*(mpeg: PSMPEG, stream: PUInt8, length: int): int{.cdecl, + importc, dynlib: SmpegLibName.} + # Wrapper for SMPEG_playAudio() that can be passed to SDL and SDL_mixer +proc SMPEG_playAudioSDL*(mpeg: Pointer, stream: PUInt8, length: int){.cdecl, + importc, dynlib: SmpegLibName.} + # Get the best SDL audio spec for the audio stream +proc SMPEG_wantedSpec*(mpeg: PSMPEG, wanted: PSDL_AudioSpec): int{.cdecl, + importc, dynlib: SmpegLibName.} + # Inform SMPEG of the actual SDL audio spec used for sound playback +proc SMPEG_actualSpec*(mpeg: PSMPEG, spec: PSDL_AudioSpec){.cdecl, + importc, dynlib: SmpegLibName.} + # This macro can be used to fill a version structure with the compile-time + # version of the SDL library. +proc SMPEG_GETVERSION*(X: var TSMPEG_version) +# implementation + +proc SMPEG_double(mpeg: PSMPEG, doubleit: bool) = + if doubleit: SMPEG_scale(mpeg, 2) + else: SMPEG_scale(mpeg, 1) + +proc SMPEG_GETVERSION(X: var TSMPEG_version) = + X.major = SMPEG_MAJOR_VERSION + X.minor = SMPEG_MINOR_VERSION + X.patch = SMPEG_PATCHLEVEL diff --git a/lib/oldwrappers/sqlite3.nim b/lib/oldwrappers/sqlite3.nim new file mode 100644 index 000000000..7dd33f296 --- /dev/null +++ b/lib/oldwrappers/sqlite3.nim @@ -0,0 +1,376 @@ +# +# +# Nimrod's Runtime Library +# (c) Copyright 2010 Andreas Rumpf +# +# See the file "copying.txt", included in this +# distribution, for details about the copyright. +# + +{.deadCodeElim: on.} + +when defined(windows): + const Sqlite3Lib = "sqlite3.dll" +elif defined(macosx): + const Sqlite3Lib = "sqlite-3.6.13.dylib" +else: + const Sqlite3Lib = "libsqlite3.so" + +const + SQLITE_INTEGER* = 1 + SQLITE_FLOAT* = 2 + SQLITE_BLOB* = 4 + SQLITE_NULL* = 5 + SQLITE_TEXT* = 3 + SQLITE3_TEXT* = 3 + SQLITE_UTF8* = 1 + SQLITE_UTF16LE* = 2 + SQLITE_UTF16BE* = 3 # Use native byte order + SQLITE_UTF16* = 4 # sqlite3_create_function only + SQLITE_ANY* = 5 #sqlite_exec return values + SQLITE_OK* = 0 + SQLITE_ERROR* = 1 # SQL error or missing database + SQLITE_INTERNAL* = 2 # An internal logic error in SQLite + SQLITE_PERM* = 3 # Access permission denied + SQLITE_ABORT* = 4 # Callback routine requested an abort + SQLITE_BUSY* = 5 # The database file is locked + SQLITE_LOCKED* = 6 # A table in the database is locked + SQLITE_NOMEM* = 7 # A malloc() failed + SQLITE_READONLY* = 8 # Attempt to write a readonly database + SQLITE_INTERRUPT* = 9 # Operation terminated by sqlite3_interrupt() + SQLITE_IOERR* = 10 # Some kind of disk I/O error occurred + SQLITE_CORRUPT* = 11 # The database disk image is malformed + SQLITE_NOTFOUND* = 12 # (Internal Only) Table or record not found + SQLITE_FULL* = 13 # Insertion failed because database is full + SQLITE_CANTOPEN* = 14 # Unable to open the database file + SQLITE_PROTOCOL* = 15 # Database lock protocol error + SQLITE_EMPTY* = 16 # Database is empty + SQLITE_SCHEMA* = 17 # The database schema changed + SQLITE_TOOBIG* = 18 # Too much data for one row of a table + SQLITE_CONSTRAINT* = 19 # Abort due to contraint violation + SQLITE_MISMATCH* = 20 # Data type mismatch + SQLITE_MISUSE* = 21 # Library used incorrectly + SQLITE_NOLFS* = 22 # Uses OS features not supported on host + SQLITE_AUTH* = 23 # Authorization denied + SQLITE_FORMAT* = 24 # Auxiliary database format error + SQLITE_RANGE* = 25 # 2nd parameter to sqlite3_bind out of range + SQLITE_NOTADB* = 26 # File opened that is not a database file + SQLITE_ROW* = 100 # sqlite3_step() has another row ready + SQLITE_DONE* = 101 # sqlite3_step() has finished executing + SQLITE_COPY* = 0 + SQLITE_CREATE_INDEX* = 1 + SQLITE_CREATE_TABLE* = 2 + SQLITE_CREATE_TEMP_INDEX* = 3 + SQLITE_CREATE_TEMP_TABLE* = 4 + SQLITE_CREATE_TEMP_TRIGGER* = 5 + SQLITE_CREATE_TEMP_VIEW* = 6 + SQLITE_CREATE_TRIGGER* = 7 + SQLITE_CREATE_VIEW* = 8 + SQLITE_DELETE* = 9 + SQLITE_DROP_INDEX* = 10 + SQLITE_DROP_TABLE* = 11 + SQLITE_DROP_TEMP_INDEX* = 12 + SQLITE_DROP_TEMP_TABLE* = 13 + SQLITE_DROP_TEMP_TRIGGER* = 14 + SQLITE_DROP_TEMP_VIEW* = 15 + SQLITE_DROP_TRIGGER* = 16 + SQLITE_DROP_VIEW* = 17 + SQLITE_INSERT* = 18 + SQLITE_PRAGMA* = 19 + SQLITE_READ* = 20 + SQLITE_SELECT* = 21 + SQLITE_TRANSACTION* = 22 + SQLITE_UPDATE* = 23 + SQLITE_ATTACH* = 24 + SQLITE_DETACH* = 25 + SQLITE_ALTER_TABLE* = 26 + SQLITE_REINDEX* = 27 + SQLITE_DENY* = 1 + SQLITE_IGNORE* = 2 # Original from sqlite3.h: + ##define SQLITE_STATIC ((void(*)(void *))0) + ##define SQLITE_TRANSIENT ((void(*)(void *))-1) + +const + SQLITE_STATIC* = nil + SQLITE_TRANSIENT* = cast[pointer](-1) + +type + sqlite_int64* = int64 + PPPChar* = ptr ptr cstring + TSqlite3 {.pure, final.} = object + Psqlite3* = ptr TSqlite3 + PPSqlite3* = ptr PSqlite3 + TSqlLite3Context {.pure, final.} = object + Psqlite3_context* = ptr TSqlLite3Context + Tsqlite3_stmt {.pure, final.} = object + Psqlite3_stmt* = ptr TSqlite3_stmt + PPsqlite3_stmt* = ptr Psqlite3_stmt + Tsqlite3_value {.pure, final.} = object + Psqlite3_value* = ptr Tsqlite3_value + PPsqlite3_value* = ptr Psqlite3_value #Callback function types + #Notice that most functions + #were named using as prefix the + #function name that uses them, + #rather than describing their functions + Tsqlite3_callback* = proc (para1: pointer, para2: int32, para3, + para4: cstringArray): int32{.cdecl.} + Tbind_destructor_func* = proc (para1: pointer){.cdecl.} + Tcreate_function_step_func* = proc (para1: Psqlite3_context, para2: int32, + para3: PPsqlite3_value){.cdecl.} + Tcreate_function_func_func* = proc (para1: Psqlite3_context, para2: int32, + para3: PPsqlite3_value){.cdecl.} + Tcreate_function_final_func* = proc (para1: Psqlite3_context){.cdecl.} + Tsqlite3_result_func* = proc (para1: pointer){.cdecl.} + Tsqlite3_create_collation_func* = proc (para1: pointer, para2: int32, + para3: pointer, para4: int32, para5: pointer): int32{.cdecl.} + Tsqlite3_collation_needed_func* = proc (para1: pointer, para2: Psqlite3, + eTextRep: int32, para4: cstring){.cdecl.} + +proc sqlite3_close*(para1: Psqlite3): int32{.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_close".} +proc sqlite3_exec*(para1: Psqlite3, sql: cstring, para3: Tsqlite3_callback, + para4: pointer, errmsg: var cstring): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_exec".} +proc sqlite3_last_insert_rowid*(para1: Psqlite3): sqlite_int64{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_last_insert_rowid".} +proc sqlite3_changes*(para1: Psqlite3): int32{.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_changes".} +proc sqlite3_total_changes*(para1: Psqlite3): int32{.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_total_changes".} +proc sqlite3_interrupt*(para1: Psqlite3){.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_interrupt".} +proc sqlite3_complete*(sql: cstring): int32{.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_complete".} +proc sqlite3_complete16*(sql: pointer): int32{.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_complete16".} +proc sqlite3_busy_handler*(para1: Psqlite3, + para2: proc (para1: pointer, para2: int32): int32 {.cdecl.}, + para3: pointer): int32{.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_busy_handler".} +proc sqlite3_busy_timeout*(para1: Psqlite3, ms: int32): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_busy_timeout".} +proc sqlite3_get_table*(para1: Psqlite3, sql: cstring, resultp: var cstringArray, + nrow, ncolumn: var cint, errmsg: ptr cstring): int32{. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_get_table".} +proc sqlite3_free_table*(result: cstringArray){.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_free_table".} + # Todo: see how translate sqlite3_mprintf, sqlite3_vmprintf, sqlite3_snprintf + # function sqlite3_mprintf(_para1:Pchar; args:array of const):Pchar;cdecl; external Sqlite3Lib name 'sqlite3_mprintf'; +proc sqlite3_mprintf*(para1: cstring): cstring{.cdecl, varargs, dynlib: Sqlite3Lib, + importc: "sqlite3_mprintf".} + #function sqlite3_vmprintf(_para1:Pchar; _para2:va_list):Pchar;cdecl; external Sqlite3Lib name 'sqlite3_vmprintf'; +proc sqlite3_free*(z: cstring){.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_free".} + #function sqlite3_snprintf(_para1:longint; _para2:Pchar; _para3:Pchar; args:array of const):Pchar;cdecl; external Sqlite3Lib name 'sqlite3_snprintf'; +proc sqlite3_snprintf*(para1: int32, para2: cstring, para3: cstring): cstring{. + cdecl, dynlib: Sqlite3Lib, varargs, importc: "sqlite3_snprintf".} +proc sqlite3_set_authorizer*(para1: Psqlite3, + xAuth: proc (para1: pointer, para2: int32, + para3: cstring, para4: cstring, + para5: cstring, + para6: cstring): int32{.cdecl.}, + pUserData: pointer): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_set_authorizer".} +proc sqlite3_trace*(para1: Psqlite3, + xTrace: proc (para1: pointer, para2: cstring){.cdecl.}, + para3: pointer): pointer{. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_trace".} +proc sqlite3_progress_handler*(para1: Psqlite3, para2: int32, + para3: proc (para1: pointer): int32 {.cdecl.}, + para4: pointer){.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_progress_handler".} +proc sqlite3_commit_hook*(para1: Psqlite3, + para2: proc (para1: pointer): int32{.cdecl.}, + para3: pointer): pointer{.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_commit_hook".} +proc sqlite3_open*(filename: cstring, ppDb: var Psqlite3): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_open".} +proc sqlite3_open16*(filename: pointer, ppDb: var Psqlite3): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_open16".} +proc sqlite3_errcode*(db: Psqlite3): int32{.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_errcode".} +proc sqlite3_errmsg*(para1: Psqlite3): cstring{.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_errmsg".} +proc sqlite3_errmsg16*(para1: Psqlite3): pointer{.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_errmsg16".} +proc sqlite3_prepare*(db: Psqlite3, zSql: cstring, nBytes: int32, + ppStmt: PPsqlite3_stmt, pzTail: ptr cstring): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_prepare".} +proc sqlite3_prepare16*(db: Psqlite3, zSql: pointer, nBytes: int32, + ppStmt: PPsqlite3_stmt, pzTail: var pointer): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_prepare16".} +proc sqlite3_bind_blob*(para1: Psqlite3_stmt, para2: int32, para3: pointer, + n: int32, para5: Tbind_destructor_func): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_bind_blob".} +proc sqlite3_bind_double*(para1: Psqlite3_stmt, para2: int32, para3: float64): int32{. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_bind_double".} +proc sqlite3_bind_int*(para1: Psqlite3_stmt, para2: int32, para3: int32): int32{. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_bind_int".} +proc sqlite3_bind_int64*(para1: Psqlite3_stmt, para2: int32, para3: sqlite_int64): int32{. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_bind_int64".} +proc sqlite3_bind_null*(para1: Psqlite3_stmt, para2: int32): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_bind_null".} +proc sqlite3_bind_text*(para1: Psqlite3_stmt, para2: int32, para3: cstring, + n: int32, para5: Tbind_destructor_func): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_bind_text".} +proc sqlite3_bind_text16*(para1: Psqlite3_stmt, para2: int32, para3: pointer, + para4: int32, para5: Tbind_destructor_func): int32{. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_bind_text16".} + #function sqlite3_bind_value(_para1:Psqlite3_stmt; _para2:longint; _para3:Psqlite3_value):longint;cdecl; external Sqlite3Lib name 'sqlite3_bind_value'; + #These overloaded functions were introduced to allow the use of SQLITE_STATIC and SQLITE_TRANSIENT + #It's the c world man ;-) +proc sqlite3_bind_blob*(para1: Psqlite3_stmt, para2: int32, para3: pointer, + n: int32, para5: int32): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_bind_blob".} +proc sqlite3_bind_text*(para1: Psqlite3_stmt, para2: int32, para3: cstring, + n: int32, para5: int32): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_bind_text".} +proc sqlite3_bind_text16*(para1: Psqlite3_stmt, para2: int32, para3: pointer, + para4: int32, para5: int32): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_bind_text16".} +proc sqlite3_bind_parameter_count*(para1: Psqlite3_stmt): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_bind_parameter_count".} +proc sqlite3_bind_parameter_name*(para1: Psqlite3_stmt, para2: int32): cstring{. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_bind_parameter_name".} +proc sqlite3_bind_parameter_index*(para1: Psqlite3_stmt, zName: cstring): int32{. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_bind_parameter_index".} + #function sqlite3_clear_bindings(_para1:Psqlite3_stmt):longint;cdecl; external Sqlite3Lib name 'sqlite3_clear_bindings'; +proc sqlite3_column_count*(pStmt: Psqlite3_stmt): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_column_count".} +proc sqlite3_column_name*(para1: Psqlite3_stmt, para2: int32): cstring{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_column_name".} +proc sqlite3_column_name16*(para1: Psqlite3_stmt, para2: int32): pointer{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_column_name16".} +proc sqlite3_column_decltype*(para1: Psqlite3_stmt, i: int32): cstring{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_column_decltype".} +proc sqlite3_column_decltype16*(para1: Psqlite3_stmt, para2: int32): pointer{. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_column_decltype16".} +proc sqlite3_step*(para1: Psqlite3_stmt): int32{.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_step".} +proc sqlite3_data_count*(pStmt: Psqlite3_stmt): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_data_count".} +proc sqlite3_column_blob*(para1: Psqlite3_stmt, iCol: int32): pointer{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_column_blob".} +proc sqlite3_column_bytes*(para1: Psqlite3_stmt, iCol: int32): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_column_bytes".} +proc sqlite3_column_bytes16*(para1: Psqlite3_stmt, iCol: int32): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_column_bytes16".} +proc sqlite3_column_double*(para1: Psqlite3_stmt, iCol: int32): float64{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_column_double".} +proc sqlite3_column_int*(para1: Psqlite3_stmt, iCol: int32): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_column_int".} +proc sqlite3_column_int64*(para1: Psqlite3_stmt, iCol: int32): sqlite_int64{. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_column_int64".} +proc sqlite3_column_text*(para1: Psqlite3_stmt, iCol: int32): cstring{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_column_text".} +proc sqlite3_column_text16*(para1: Psqlite3_stmt, iCol: int32): pointer{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_column_text16".} +proc sqlite3_column_type*(para1: Psqlite3_stmt, iCol: int32): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_column_type".} +proc sqlite3_finalize*(pStmt: Psqlite3_stmt): int32{.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_finalize".} +proc sqlite3_reset*(pStmt: Psqlite3_stmt): int32{.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_reset".} +proc sqlite3_create_function*(para1: Psqlite3, zFunctionName: cstring, + nArg: int32, eTextRep: int32, para5: pointer, + xFunc: Tcreate_function_func_func, + xStep: Tcreate_function_step_func, + xFinal: Tcreate_function_final_func): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_create_function".} +proc sqlite3_create_function16*(para1: Psqlite3, zFunctionName: pointer, + nArg: int32, eTextRep: int32, para5: pointer, + xFunc: Tcreate_function_func_func, + xStep: Tcreate_function_step_func, + xFinal: Tcreate_function_final_func): int32{. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_create_function16".} +proc sqlite3_aggregate_count*(para1: Psqlite3_context): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_aggregate_count".} +proc sqlite3_value_blob*(para1: Psqlite3_value): pointer{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_value_blob".} +proc sqlite3_value_bytes*(para1: Psqlite3_value): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_value_bytes".} +proc sqlite3_value_bytes16*(para1: Psqlite3_value): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_value_bytes16".} +proc sqlite3_value_double*(para1: Psqlite3_value): float64{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_value_double".} +proc sqlite3_value_int*(para1: Psqlite3_value): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_value_int".} +proc sqlite3_value_int64*(para1: Psqlite3_value): sqlite_int64{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_value_int64".} +proc sqlite3_value_text*(para1: Psqlite3_value): cstring{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_value_text".} +proc sqlite3_value_text16*(para1: Psqlite3_value): pointer{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_value_text16".} +proc sqlite3_value_text16le*(para1: Psqlite3_value): pointer{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_value_text16le".} +proc sqlite3_value_text16be*(para1: Psqlite3_value): pointer{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_value_text16be".} +proc sqlite3_value_type*(para1: Psqlite3_value): int32{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_value_type".} +proc sqlite3_aggregate_context*(para1: Psqlite3_context, nBytes: int32): pointer{. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_aggregate_context".} +proc sqlite3_user_data*(para1: Psqlite3_context): pointer{.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_user_data".} +proc sqlite3_get_auxdata*(para1: Psqlite3_context, para2: int32): pointer{. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_get_auxdata".} +proc sqlite3_set_auxdata*(para1: Psqlite3_context, para2: int32, para3: pointer, + para4: proc (para1: pointer) {.cdecl.}){.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_set_auxdata".} +proc sqlite3_result_blob*(para1: Psqlite3_context, para2: pointer, para3: int32, + para4: Tsqlite3_result_func){.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_result_blob".} +proc sqlite3_result_double*(para1: Psqlite3_context, para2: float64){.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_result_double".} +proc sqlite3_result_error*(para1: Psqlite3_context, para2: cstring, para3: int32){. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_result_error".} +proc sqlite3_result_error16*(para1: Psqlite3_context, para2: pointer, + para3: int32){.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_result_error16".} +proc sqlite3_result_int*(para1: Psqlite3_context, para2: int32){.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_result_int".} +proc sqlite3_result_int64*(para1: Psqlite3_context, para2: sqlite_int64){.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_result_int64".} +proc sqlite3_result_null*(para1: Psqlite3_context){.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_result_null".} +proc sqlite3_result_text*(para1: Psqlite3_context, para2: cstring, para3: int32, + para4: Tsqlite3_result_func){.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_result_text".} +proc sqlite3_result_text16*(para1: Psqlite3_context, para2: pointer, + para3: int32, para4: Tsqlite3_result_func){.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_result_text16".} +proc sqlite3_result_text16le*(para1: Psqlite3_context, para2: pointer, + para3: int32, para4: Tsqlite3_result_func){.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_result_text16le".} +proc sqlite3_result_text16be*(para1: Psqlite3_context, para2: pointer, + para3: int32, para4: Tsqlite3_result_func){.cdecl, + dynlib: Sqlite3Lib, importc: "sqlite3_result_text16be".} +proc sqlite3_result_value*(para1: Psqlite3_context, para2: Psqlite3_value){. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_result_value".} +proc sqlite3_create_collation*(para1: Psqlite3, zName: cstring, eTextRep: int32, + para4: pointer, + xCompare: Tsqlite3_create_collation_func): int32{. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_create_collation".} +proc sqlite3_create_collation16*(para1: Psqlite3, zName: cstring, + eTextRep: int32, para4: pointer, + xCompare: Tsqlite3_create_collation_func): int32{. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_create_collation16".} +proc sqlite3_collation_needed*(para1: Psqlite3, para2: pointer, + para3: Tsqlite3_collation_needed_func): int32{. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_collation_needed".} +proc sqlite3_collation_needed16*(para1: Psqlite3, para2: pointer, + para3: Tsqlite3_collation_needed_func): int32{. + cdecl, dynlib: Sqlite3Lib, importc: "sqlite3_collation_needed16".} +proc sqlite3_libversion*(): cstring{.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_libversion".} + #Alias for allowing better code portability (win32 is not working with external variables) +proc sqlite3_version*(): cstring{.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_libversion".} + # Not published functions +proc sqlite3_libversion_number*(): int32{.cdecl, dynlib: Sqlite3Lib, + importc: "sqlite3_libversion_number".} + #function sqlite3_key(db:Psqlite3; pKey:pointer; nKey:longint):longint;cdecl; external Sqlite3Lib name 'sqlite3_key'; + #function sqlite3_rekey(db:Psqlite3; pKey:pointer; nKey:longint):longint;cdecl; external Sqlite3Lib name 'sqlite3_rekey'; + #function sqlite3_sleep(_para1:longint):longint;cdecl; external Sqlite3Lib name 'sqlite3_sleep'; + #function sqlite3_expired(_para1:Psqlite3_stmt):longint;cdecl; external Sqlite3Lib name 'sqlite3_expired'; + #function sqlite3_global_recover:longint;cdecl; external Sqlite3Lib name 'sqlite3_global_recover'; +# implementation diff --git a/lib/oldwrappers/tcl.nim b/lib/oldwrappers/tcl.nim new file mode 100644 index 000000000..813714ecd --- /dev/null +++ b/lib/oldwrappers/tcl.nim @@ -0,0 +1,857 @@ +# +# +# Nimrod's Runtime Library +# (c) Copyright 2009 Andreas Rumpf +# +# See the file "copying.txt", included in this +# distribution, for details about the copyright. +# + +## This module is a wrapper for the TCL programming language. + +# +# tcl.h -- +# +# This header file describes the externally-visible facilities of the Tcl +# interpreter. +# +# Translated to Pascal Copyright (c) 2002 by Max Artemev +# aka Bert Raccoon (bert@furry.ru, bert_raccoon@freemail.ru) +# +# +# Copyright (c) 1998-2000 by Scriptics Corporation. +# Copyright (c) 1994-1998 Sun Microsystems, Inc. +# Copyright (c) 1993-1996 Lucent Technologies. +# Copyright (c) 1987-1994 John Ousterhout, The Regents of the +# University of California, Berkeley. +# +# *********************************************************************** +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# *********************************************************************** +# + +{.deadCodeElim: on.} + +when defined(WIN32): + const dllName = "tcl(85|84|83|82|81|80).dll" +elif defined(macosx): + const dllName = "libtcl(8.5|8.4|8.3|8.2|8.1).dynlib" +else: + const dllName = "libtcl(8.5|8.4|8.3|8.2|8.1).so.(1|0)" + +const + TCL_DESTROYED* = 0xDEADDEAD + TCL_OK* = 0 + TCL_ERROR* = 1 + TCL_RETURN* = 2 + TCL_BREAK* = 3 + TCL_CONTINUE* = 4 + TCL_RESULT_SIZE* = 200 + MAX_ARGV* = 0x00007FFF + TCL_VERSION_MAJOR* = 0 + TCL_VERSION_MINOR* = 0 + TCL_NO_EVAL* = 0x00010000 + TCL_EVAL_GLOBAL* = 0x00020000 # Flag values passed to variable-related procedures. * + TCL_GLOBAL_ONLY* = 1 + TCL_NAMESPACE_ONLY* = 2 + TCL_APPEND_VALUE* = 4 + TCL_LIST_ELEMENT* = 8 + TCL_TRACE_READS* = 0x00000010 + TCL_TRACE_WRITES* = 0x00000020 + TCL_TRACE_UNSETS* = 0x00000040 + TCL_TRACE_DESTROYED* = 0x00000080 + TCL_INTERP_DESTROYED* = 0x00000100 + TCL_LEAVE_ERR_MSG* = 0x00000200 + TCL_PARSE_PART1* = 0x00000400 # Types for linked variables: * + TCL_LINK_INT* = 1 + TCL_LINK_DOUBLE* = 2 + TCL_LINK_BOOLEAN* = 3 + TCL_LINK_STRING* = 4 + TCL_LINK_READ_ONLY* = 0x00000080 + TCL_SMALL_HASH_TABLE* = 4 # Hash Table * + TCL_STRING_KEYS* = 0 + TCL_ONE_WORD_KEYS* = 1 # Const/enums Tcl_QueuePosition * + # typedef enum { + TCL_QUEUE_TAIL* = 0 + TCL_QUEUE_HEAD* = 1 + TCL_QUEUE_MARK* = 2 #} Tcl_QueuePosition; + # Event Flags + TCL_DONT_WAIT* = 1 shl 1 + TCL_WINDOW_EVENTS* = 1 shl 2 + TCL_FILE_EVENTS* = 1 shl 3 + TCL_TIMER_EVENTS* = 1 shl 4 + TCL_IDLE_EVENTS* = 1 shl 5 # WAS 0x10 ???? * + TCL_ALL_EVENTS* = not TCL_DONT_WAIT + + TCL_VOLATILE* = 1 + TCL_STATIC* = 0 + TCL_DYNAMIC* = 3 # Channel + TCL_STDIN* = 1 shl 1 + TCL_STDOUT* = 1 shl 2 + TCL_STDERR* = 1 shl 3 + TCL_ENFORCE_MODE* = 1 shl 4 + TCL_READABLE* = 1 shl 1 + TCL_WRITABLE* = 1 shl 2 + TCL_EXCEPTION* = 1 shl 3 # POSIX * + EPERM* = 1 # Operation not permitted; only the owner of the file (or other + # resource) or processes with special privileges can perform the + # operation. + # + ENOENT* = 2 # No such file or directory. This is a "file doesn't exist" error + # for ordinary files that are referenced in contexts where they are + # expected to already exist. + # + ESRCH* = 3 # No process matches the specified process ID. * + EINTR* = 4 # Interrupted function call; an asynchronous signal occurred and + # prevented completion of the call. When this happens, you should + # try the call again. + # + EIO* = 5 # Input/output error; usually used for physical read or write errors. * + ENXIO* = 6 # No such device or address. The system tried to use the device + # represented by a file you specified, and it couldn't find the + # device. This can mean that the device file was installed + # incorrectly, or that the physical device is missing or not + # correctly attached to the computer. + # + E2BIG* = 7 # Argument list too long; used when the arguments passed to a new + # program being executed with one of the `exec' functions (*note + # Executing a File::.) occupy too much memory space. This condition + # never arises in the GNU system. + # + ENOEXEC* = 8 # Invalid executable file format. This condition is detected by the + # `exec' functions; see *Note Executing a File::. + # + EBADF* = 9 # Bad file descriptor; for example, I/O on a descriptor that has been + # closed or reading from a descriptor open only for writing (or vice + # versa). + # + ECHILD* = 10 # There are no child processes. This error happens on operations + # that are supposed to manipulate child processes, when there aren't + # any processes to manipulate. + # + EDEADLK* = 11 # Deadlock avoided; allocating a system resource would have resulted + # in a deadlock situation. The system does not guarantee that it + # will notice all such situations. This error means you got lucky + # and the system noticed; it might just hang. *Note File Locks::, + # for an example. + # + ENOMEM* = 12 # No memory available. The system cannot allocate more virtual + # memory because its capacity is full. + # + EACCES* = 13 # Permission denied; the file permissions do not allow the attempted + # operation. + # + EFAULT* = 14 # Bad address; an invalid pointer was detected. In the GNU system, + # this error never happens; you get a signal instead. + # + ENOTBLK* = 15 # A file that isn't a block special file was given in a situation + # that requires one. For example, trying to mount an ordinary file + # as a file system in Unix gives this error. + # + EBUSY* = 16 # Resource busy; a system resource that can't be shared is already + # in use. For example, if you try to delete a file that is the root + # of a currently mounted filesystem, you get this error. + # + EEXIST* = 17 # File exists; an existing file was specified in a context where it + # only makes sense to specify a new file. + # + EXDEV* = 18 # An attempt to make an improper link across file systems was + # detected. This happens not only when you use `link' (*note Hard + # Links::.) but also when you rename a file with `rename' (*note + # Renaming Files::.). + # + ENODEV* = 19 # The wrong type of device was given to a function that expects a + # particular sort of device. + # + ENOTDIR* = 20 # A file that isn't a directory was specified when a directory is + # required. + # + EISDIR* = 21 # File is a directory; you cannot open a directory for writing, or + # create or remove hard links to it. + # + EINVAL* = 22 # Invalid argument. This is used to indicate various kinds of + # problems with passing the wrong argument to a library function. + # + EMFILE* = 24 # The current process has too many files open and can't open any + # more. Duplicate descriptors do count toward this limit. + # + # In BSD and GNU, the number of open files is controlled by a + # resource limit that can usually be increased. If you get this + # error, you might want to increase the `RLIMIT_NOFILE' limit or + # make it unlimited; *note Limits on Resources::.. + # + ENFILE* = 23 # There are too many distinct file openings in the entire system. + # Note that any number of linked channels count as just one file + # opening; see *Note Linked Channels::. This error never occurs in + # the GNU system. + # + ENOTTY* = 25 # Inappropriate I/O control operation, such as trying to set terminal + # modes on an ordinary file. + # + ETXTBSY* = 26 # An attempt to execute a file that is currently open for writing, or + # write to a file that is currently being executed. Often using a + # debugger to run a program is considered having it open for writing + # and will cause this error. (The name stands for "text file + # busy".) This is not an error in the GNU system; the text is + # copied as necessary. + # + EFBIG* = 27 # File too big; the size of a file would be larger than allowed by + # the system. + # + ENOSPC* = 28 # No space left on device; write operation on a file failed because + # the disk is full. + # + ESPIPE* = 29 # Invalid seek operation (such as on a pipe). * + EROFS* = 30 # An attempt was made to modify something on a read-only file system. * + EMLINK* = 31 # Too many links; the link count of a single file would become too + # large. `rename' can cause this error if the file being renamed + # already has as many links as it can take (*note Renaming Files::.). + # + EPIPE* = 32 # Broken pipe; there is no process reading from the other end of a + # pipe. Every library function that returns this error code also + # generates a `SIGPIPE' signal; this signal terminates the program + # if not handled or blocked. Thus, your program will never actually + # see `EPIPE' unless it has handled or blocked `SIGPIPE'. + # + EDOM* = 33 # Domain error; used by mathematical functions when an argument + # value does not fall into the domain over which the function is + # defined. + # + ERANGE* = 34 # Range error; used by mathematical functions when the result value + # is not representable because of overflow or underflow. + # + EAGAIN* = 35 # Resource temporarily unavailable; the call might work if you try + # again later. The macro `EWOULDBLOCK' is another name for `EAGAIN'; + # they are always the same in the GNU C library. + # + EWOULDBLOCK* = EAGAIN # In the GNU C library, this is another name for `EAGAIN' (above). + # The values are always the same, on every operating system. + # C libraries in many older Unix systems have `EWOULDBLOCK' as a + # separate error code. + # + EINPROGRESS* = 36 # An operation that cannot complete immediately was initiated on an + # object that has non-blocking mode selected. Some functions that + # must always block (such as `connect'; *note Connecting::.) never + # return `EAGAIN'. Instead, they return `EINPROGRESS' to indicate + # that the operation has begun and will take some time. Attempts to + # manipulate the object before the call completes return `EALREADY'. + # You can use the `select' function to find out when the pending + # operation has completed; *note Waiting for I/O::.. + # + EALREADY* = 37 # An operation is already in progress on an object that has + # non-blocking mode selected. + # + ENOTSOCK* = 38 # A file that isn't a socket was specified when a socket is required. * + EDESTADDRREQ* = 39 # No default destination address was set for the socket. You get + # this error when you try to transmit data over a connectionless + # socket, without first specifying a destination for the data with + # `connect'. + # + EMSGSIZE* = 40 # The size of a message sent on a socket was larger than the + # supported maximum size. + # + EPROTOTYPE* = 41 # The socket type does not support the requested communications + # protocol. + # + ENOPROTOOPT* = 42 # You specified a socket option that doesn't make sense for the + # particular protocol being used by the socket. *Note Socket + # Options::. + # + EPROTONOSUPPORT* = 43 # The socket domain does not support the requested communications + # protocol (perhaps because the requested protocol is completely + # invalid.) *Note Creating a Socket::. + # + ESOCKTNOSUPPORT* = 44 # The socket type is not supported. * + EOPNOTSUPP* = 45 # The operation you requested is not supported. Some socket + # functions don't make sense for all types of sockets, and others + # may not be implemented for all communications protocols. In the + # GNU system, this error can happen for many calls when the object + # does not support the particular operation; it is a generic + # indication that the server knows nothing to do for that call. + # + EPFNOSUPPORT* = 46 # The socket communications protocol family you requested is not + # supported. + # + EAFNOSUPPORT* = 47 # The address family specified for a socket is not supported; it is + # inconsistent with the protocol being used on the socket. *Note + # Sockets::. + # + EADDRINUSE* = 48 # The requested socket address is already in use. *Note Socket + # Addresses::. + # + EADDRNOTAVAIL* = 49 # The requested socket address is not available; for example, you + # tried to give a socket a name that doesn't match the local host + # name. *Note Socket Addresses::. + # + ENETDOWN* = 50 # A socket operation failed because the network was down. * + ENETUNREACH* = 51 # A socket operation failed because the subnet containing the remote + # host was unreachable. + # + ENETRESET* = 52 # A network connection was reset because the remote host crashed. * + ECONNABORTED* = 53 # A network connection was aborted locally. * + ECONNRESET* = 54 # A network connection was closed for reasons outside the control of + # the local host, such as by the remote machine rebooting or an + # unrecoverable protocol violation. + # + ENOBUFS* = 55 # The kernel's buffers for I/O operations are all in use. In GNU, + # this error is always synonymous with `ENOMEM'; you may get one or + # the other from network operations. + # + EISCONN* = 56 # You tried to connect a socket that is already connected. *Note + # Connecting::. + # + ENOTCONN* = 57 # The socket is not connected to anything. You get this error when + # you try to transmit data over a socket, without first specifying a + # destination for the data. For a connectionless socket (for + # datagram protocols, such as UDP), you get `EDESTADDRREQ' instead. + # + ESHUTDOWN* = 58 # The socket has already been shut down. * + ETOOMANYREFS* = 59 # ??? * + ETIMEDOUT* = 60 # A socket operation with a specified timeout received no response + # during the timeout period. + # + ECONNREFUSED* = 61 # A remote host refused to allow the network connection (typically + # because it is not running the requested service). + # + ELOOP* = 62 # Too many levels of symbolic links were encountered in looking up a + # file name. This often indicates a cycle of symbolic links. + # + ENAMETOOLONG* = 63 # Filename too long (longer than `PATH_MAX'; *note Limits for + # Files::.) or host name too long (in `gethostname' or + # `sethostname'; *note Host Identification::.). + # + EHOSTDOWN* = 64 # The remote host for a requested network connection is down. * + EHOSTUNREACH* = 65 # The remote host for a requested network connection is not + # reachable. + # + ENOTEMPTY* = 66 # Directory not empty, where an empty directory was expected. + # Typically, this error occurs when you are trying to delete a + # directory. + # + EPROCLIM* = 67 # This means that the per-user limit on new process would be + # exceeded by an attempted `fork'. *Note Limits on Resources::, for + # details on the `RLIMIT_NPROC' limit. + # + EUSERS* = 68 # The file quota system is confused because there are too many users. * + EDQUOT* = 69 # The user's disk quota was exceeded. * + ESTALE* = 70 # Stale NFS file handle. This indicates an internal confusion in + # the NFS system which is due to file system rearrangements on the + # server host. Repairing this condition usually requires unmounting + # and remounting the NFS file system on the local host. + # + EREMOTE* = 71 # An attempt was made to NFS-mount a remote file system with a file + # name that already specifies an NFS-mounted file. (This is an + # error on some operating systems, but we expect it to work properly + # on the GNU system, making this error code impossible.) + # + EBADRPC* = 72 # ??? * + ERPCMISMATCH* = 73 # ??? * + EPROGUNAVAIL* = 74 # ??? * + EPROGMISMATCH* = 75 # ??? * + EPROCUNAVAIL* = 76 # ??? * + ENOLCK* = 77 # No locks available. This is used by the file locking facilities; + # see *Note File Locks::. This error is never generated by the GNU + # system, but it can result from an operation to an NFS server + # running another operating system. + # + ENOSYS* = 78 # Function not implemented. Some functions have commands or options + # defined that might not be supported in all implementations, and + # this is the kind of error you get if you request them and they are + # not supported. + # + EFTYPE* = 79 # Inappropriate file type or format. The file was the wrong type + # for the operation, or a data file had the wrong format. + # On some systems `chmod' returns this error if you try to set the + # sticky bit on a non-directory file; *note Setting Permissions::.. + # + +type + Tcl_Argv* = cstringArray + Tcl_ClientData* = pointer + Tcl_FreeProc* = proc (theBlock: pointer){.cdecl.} + PTcl_Interp* = ptr Tcl_Interp + Tcl_Interp*{.final.} = object # Event Definitions * + result*: cstring # Do not access this directly. Use + # * Tcl_GetStringResult since result + # * may be pointing to an object + # * + freeProc*: Tcl_FreeProc + errorLine*: int + + TTcl_EventSetupProc* = proc (clientData: Tcl_ClientData, flags: int){.cdecl.} + TTcl_EventCheckProc* = TTcl_EventSetupProc + PTcl_Event* = ptr Tcl_Event + TTcl_EventProc* = proc (evPtr: PTcl_Event, flags: int): int{.cdecl.} + Tcl_Event*{.final.} = object + prc*: TTcl_EventProc + nextPtr*: PTcl_Event + ClientData*: TObject # ClientData is just pointer.* + + PTcl_Time* = ptr Tcl_Time + Tcl_Time*{.final.} = object + sec*: int32 # Seconds. * + usec*: int32 # Microseconds. * + + Tcl_TimerToken* = pointer + PInteger* = ptr int + PTcl_HashTable* = pointer + PTcl_HashEntry* = ptr Tcl_HashEntry + PPTcl_HashEntry* = ptr PTcl_HashEntry + Tcl_HashEntry*{.final.} = object + nextPtr*: PTcl_HashEntry + tablePtr*: PTcl_HashTable + bucketPtr*: PPTcl_HashEntry + clientData*: Tcl_ClientData + key*: cstring + + Tcl_HashFindProc* = proc (tablePtr: PTcl_HashTable, key: cstring): PTcl_HashEntry{. + cdecl.} + Tcl_HashCreateProc* = proc (tablePtr: PTcl_HashTable, key: cstring, + newPtr: PInteger): PTcl_HashEntry{.cdecl.} + PHashTable* = ptr Tcl_HashTable + Tcl_HashTable*{.final.} = object + buckets*: ppTcl_HashEntry + staticBuckets*: array[0..TCL_SMALL_HASH_TABLE - 1, PTcl_HashEntry] + numBuckets*: int + numEntries*: int + rebuildSize*: int + downShift*: int + mask*: int + keyType*: int + findProc*: Tcl_HashFindProc + createProc*: Tcl_HashCreateProc + + PTcl_HashSearch* = ptr Tcl_HashSearch + Tcl_HashSearch*{.final.} = object + tablePtr*: PTcl_HashTable + nextIndex*: int + nextEntryPtr*: PTcl_HashEntry + + TTclAppInitProc* = proc (interp: pTcl_Interp): int{.cdecl.} + TTclPackageInitProc* = proc (interp: pTcl_Interp): int{.cdecl.} + TTclCmdProc* = proc (clientData: Tcl_ClientData, interp: pTcl_Interp, + argc: int, argv: Tcl_Argv): int{.cdecl.} + TTclVarTraceProc* = proc (clientData: Tcl_ClientData, interp: pTcl_Interp, + varName: cstring, elemName: cstring, flags: int): cstring{. + cdecl.} + TTclFreeProc* = proc (theBlock: pointer){.cdecl.} + TTclInterpDeleteProc* = proc (clientData: Tcl_ClientData, interp: pTcl_Interp){. + cdecl.} + TTclCmdDeleteProc* = proc (clientData: Tcl_ClientData){.cdecl.} + TTclNamespaceDeleteProc* = proc (clientData: Tcl_ClientData){.cdecl.} + +const + TCL_DSTRING_STATIC_SIZE* = 200 + +type + PTcl_DString* = ptr Tcl_DString + Tcl_DString*{.final.} = object + str*: cstring + len*: int + spaceAvl*: int + staticSpace*: array[0..TCL_DSTRING_STATIC_SIZE - 1, char] + + PTcl_Channel* = ptr Tcl_Channel + Tcl_Channel*{.final.} = object + TTclDriverBlockModeProc* = proc (instanceData: Tcl_ClientData, mode: int): int{. + cdecl.} + TTclDriverCloseProc* = proc (instanceData: Tcl_ClientData, interp: PTcl_Interp): int{. + cdecl.} + TTclDriverInputProc* = proc (instanceData: Tcl_ClientData, buf: cstring, + toRead: int, errorCodePtr: PInteger): int{.cdecl.} + TTclDriverOutputProc* = proc (instanceData: Tcl_ClientData, buf: cstring, + toWrite: int, errorCodePtr: PInteger): int{. + cdecl.} + TTclDriverSeekProc* = proc (instanceData: Tcl_ClientData, offset: int32, + mode: int, errorCodePtr: PInteger): int{.cdecl.} + TTclDriverSetOptionProc* = proc (instanceData: Tcl_ClientData, + interp: PTcl_Interp, optionName: cstring, + value: cstring): int{.cdecl.} + TTclDriverGetOptionProc* = proc (instanceData: Tcl_ClientData, + interp: pTcl_Interp, optionName: cstring, + dsPtr: PTcl_DString): int{.cdecl.} + TTclDriverWatchProc* = proc (instanceData: Tcl_ClientData, mask: int){.cdecl.} + TTclDriverGetHandleProc* = proc (instanceData: Tcl_ClientData, direction: int, + handlePtr: var Tcl_ClientData): int{.cdecl.} + PTcl_ChannelType* = ptr Tcl_ChannelType + Tcl_ChannelType*{.final.} = object + typeName*: cstring + blockModeProc*: TTclDriverBlockModeProc + closeProc*: TTclDriverCloseProc + inputProc*: TTclDriverInputProc + ouputProc*: TTclDriverOutputProc + seekProc*: TTclDriverSeekProc + setOptionProc*: TTclDriverSetOptionProc + getOptionProc*: TTclDriverGetOptionProc + watchProc*: TTclDriverWatchProc + getHandleProc*: TTclDriverGetHandleProc + + TTclChannelProc* = proc (clientData: Tcl_ClientData, mask: int){.cdecl.} + PTcl_Obj* = ptr Tcl_Obj + PPTcl_Obj* = ptr PTcl_Obj + Tcl_Obj*{.final.} = object + refCount*: int # ... + + TTclObjCmdProc* = proc (clientData: Tcl_ClientData, interp: PTcl_Interp, + objc: int, PPObj: PPTcl_Obj): int{.cdecl.} + PTcl_Namespace* = ptr Tcl_Namespace + Tcl_Namespace*{.final.} = object + name*: cstring + fullName*: cstring + clientData*: Tcl_ClientData + deleteProc*: TTclNamespaceDeleteProc + parentPtr*: PTcl_Namespace + + PTcl_CallFrame* = ptr Tcl_CallFrame + Tcl_CallFrame*{.final.} = object + nsPtr*: PTcl_Namespace + dummy1*: int + dummy2*: int + dummy3*: cstring + dummy4*: cstring + dummy5*: cstring + dummy6*: int + dummy7*: cstring + dummy8*: cstring + dummy9*: int + dummy10*: cstring + + PTcl_CmdInfo* = ptr Tcl_CmdInfo + Tcl_CmdInfo*{.final.} = object + isNativeObjectProc*: int + objProc*: TTclObjCmdProc + objClientData*: Tcl_ClientData + prc*: TTclCmdProc + clientData*: Tcl_ClientData + deleteProc*: TTclCmdDeleteProc + deleteData*: Tcl_ClientData + namespacePtr*: pTcl_Namespace + + pTcl_Command* = ptr Tcl_Command + Tcl_Command*{.final.} = object # hPtr : pTcl_HashEntry; + # nsPtr : pTcl_Namespace; + # refCount : integer; + # isCmdEpoch : integer; + # compileProc : pointer; + # objProc : pointer; + # objClientData : Tcl_ClientData; + # proc : pointer; + # clientData : Tcl_ClientData; + # deleteProc : TTclCmdDeleteProc; + # deleteData : Tcl_ClientData; + # deleted : integer; + # importRefPtr : pointer; + # + +type + TTclPanicProc* = proc (fmt, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8: cstring){. + cdecl.} # 1/15/97 orig. Tcl style + TTclClientDataProc* = proc (clientData: Tcl_ClientData){.cdecl.} + TTclIdleProc* = proc (clientData: Tcl_ClientData){.cdecl.} + TTclTimerProc* = TTclIdleProc + TTclCreateCloseHandler* = proc (channel: pTcl_Channel, + prc: TTclClientDataProc, + clientData: Tcl_ClientData){.cdecl.} + TTclDeleteCloseHandler* = TTclCreateCloseHandler + TTclEventDeleteProc* = proc (evPtr: pTcl_Event, clientData: Tcl_ClientData): int{. + cdecl.} + +proc Tcl_Alloc*(size: int): cstring{.cdecl, dynlib: dllName, importc.} +proc Tcl_CreateInterp*(): pTcl_Interp{.cdecl, dynlib: dllName, importc.} +proc Tcl_DeleteInterp*(interp: pTcl_Interp){.cdecl, dynlib: dllName, importc.} +proc Tcl_ResetResult*(interp: pTcl_Interp){.cdecl, dynlib: dllName, importc.} +proc Tcl_Eval*(interp: pTcl_Interp, script: cstring): int{.cdecl, + dynlib: dllName, importc.} +proc Tcl_EvalFile*(interp: pTcl_Interp, filename: cstring): int{.cdecl, + dynlib: dllName, importc.} +proc Tcl_AddErrorInfo*(interp: pTcl_Interp, message: cstring){.cdecl, + dynlib: dllName, importc.} +proc Tcl_BackgroundError*(interp: pTcl_Interp){.cdecl, dynlib: dllName, + importc.} +proc Tcl_CreateCommand*(interp: pTcl_Interp, name: cstring, + cmdProc: TTclCmdProc, clientData: Tcl_ClientData, + deleteProc: TTclCmdDeleteProc): pTcl_Command{.cdecl, + dynlib: dllName, importc.} +proc Tcl_DeleteCommand*(interp: pTcl_Interp, name: cstring): int{.cdecl, + dynlib: dllName, importc.} +proc Tcl_CallWhenDeleted*(interp: pTcl_Interp, prc: TTclInterpDeleteProc, + clientData: Tcl_ClientData){.cdecl, + dynlib: dllName, importc.} +proc Tcl_DontCallWhenDeleted*(interp: pTcl_Interp, prc: TTclInterpDeleteProc, + clientData: Tcl_ClientData){.cdecl, + dynlib: dllName, importc.} +proc Tcl_CommandComplete*(cmd: cstring): int{.cdecl, dynlib: dllName, + importc.} +proc Tcl_LinkVar*(interp: pTcl_Interp, varName: cstring, varAddr: pointer, + typ: int): int{.cdecl, dynlib: dllName, importc.} +proc Tcl_UnlinkVar*(interp: pTcl_Interp, varName: cstring){.cdecl, + dynlib: dllName, importc.} +proc Tcl_TraceVar*(interp: pTcl_Interp, varName: cstring, flags: int, + prc: TTclVarTraceProc, clientData: Tcl_ClientData): int{. + cdecl, dynlib: dllName, importc.} +proc Tcl_TraceVar2*(interp: pTcl_Interp, varName: cstring, elemName: cstring, + flags: int, prc: TTclVarTraceProc, + clientData: Tcl_ClientData): int{.cdecl, + dynlib: dllName, importc.} +proc Tcl_UntraceVar*(interp: pTcl_Interp, varName: cstring, flags: int, + prc: TTclVarTraceProc, clientData: Tcl_ClientData){.cdecl, + dynlib: dllName, importc.} +proc Tcl_UntraceVar2*(interp: pTcl_Interp, varName: cstring, elemName: cstring, + flags: int, prc: TTclVarTraceProc, + clientData: Tcl_ClientData){.cdecl, dynlib: dllName, + importc.} +proc Tcl_GetVar*(interp: pTcl_Interp, varName: cstring, flags: int): cstring{. + cdecl, dynlib: dllName, importc.} +proc Tcl_GetVar2*(interp: pTcl_Interp, varName: cstring, elemName: cstring, + flags: int): cstring{.cdecl, dynlib: dllName, importc.} +proc Tcl_SetVar*(interp: pTcl_Interp, varName: cstring, newValue: cstring, + flags: int): cstring{.cdecl, dynlib: dllName, importc.} +proc Tcl_SetVar2*(interp: pTcl_Interp, varName: cstring, elemName: cstring, + newValue: cstring, flags: int): cstring{.cdecl, + dynlib: dllName, importc.} +proc Tcl_UnsetVar*(interp: pTcl_Interp, varName: cstring, flags: int): int{. + cdecl, dynlib: dllName, importc.} +proc Tcl_UnsetVar2*(interp: pTcl_Interp, varName: cstring, elemName: cstring, + flags: int): int{.cdecl, dynlib: dllName, importc.} +proc Tcl_SetResult*(interp: pTcl_Interp, newValue: cstring, + freeProc: TTclFreeProc){.cdecl, dynlib: dllName, importc.} +proc Tcl_FirstHashEntry*(hashTbl: pTcl_HashTable, searchInfo: var Tcl_HashSearch): pTcl_HashEntry{. + cdecl, dynlib: dllName, importc.} +proc Tcl_NextHashEntry*(searchInfo: var Tcl_HashSearch): pTcl_HashEntry{.cdecl, + dynlib: dllName, importc.} +proc Tcl_InitHashTable*(hashTbl: pTcl_HashTable, keyType: int){.cdecl, + dynlib: dllName, importc.} +proc Tcl_StringMatch*(str: cstring, pattern: cstring): int{.cdecl, + dynlib: dllName, importc.} + +proc Tcl_GetErrno*(): int{.cdecl, dynlib: dllName, importc.} +proc Tcl_SetErrno*(val: int){.cdecl, dynlib: dllName, importc.} +proc Tcl_SetPanicProc*(prc: TTclPanicProc){.cdecl, dynlib: dllName, importc.} +proc Tcl_PkgProvide*(interp: pTcl_Interp, name: cstring, version: cstring): int{. + cdecl, dynlib: dllName, importc.} +proc Tcl_StaticPackage*(interp: pTcl_Interp, pkgName: cstring, + initProc: TTclPackageInitProc, + safeInitProc: TTclPackageInitProc){.cdecl, + dynlib: dllName, importc.} +proc Tcl_CreateEventSource*(setupProc: TTcl_EventSetupProc, + checkProc: TTcl_EventCheckProc, + clientData: Tcl_ClientData){.cdecl, + dynlib: dllName, importc.} +proc Tcl_DeleteEventSource*(setupProc: TTcl_EventSetupProc, + checkProc: TTcl_EventCheckProc, + clientData: Tcl_ClientData){.cdecl, + dynlib: dllName, importc.} +proc Tcl_QueueEvent*(evPtr: pTcl_Event, pos: int){.cdecl, dynlib: dllName, + importc.} +proc Tcl_SetMaxBlockTime*(timePtr: pTcl_Time){.cdecl, dynlib: dllName, + importc.} +proc Tcl_DeleteEvents*(prc: TTclEventDeleteProc, clientData: Tcl_ClientData){. + cdecl, dynlib: dllName, importc.} +proc Tcl_DoOneEvent*(flags: int): int{.cdecl, dynlib: dllName, importc.} +proc Tcl_DoWhenIdle*(prc: TTclIdleProc, clientData: Tcl_ClientData){.cdecl, + dynlib: dllName, importc.} +proc Tcl_CancelIdleCall*(prc: TTclIdleProc, clientData: Tcl_ClientData){.cdecl, + dynlib: dllName, importc.} +proc Tcl_CreateTimerHandler*(milliseconds: int, prc: TTclTimerProc, + clientData: Tcl_ClientData): Tcl_TimerToken{.cdecl, + dynlib: dllName, importc.} +proc Tcl_DeleteTimerHandler*(token: Tcl_TimerToken){.cdecl, dynlib: dllName, + importc.} + # procedure Tcl_CreateModalTimeout(milliseconds: integer; prc: TTclTimerProc; clientData: Tcl_ClientData); cdecl; external dllName; + # procedure Tcl_DeleteModalTimeout(prc: TTclTimerProc; clientData: Tcl_ClientData); cdecl; external dllName; +proc Tcl_SplitList*(interp: pTcl_Interp, list: cstring, argcPtr: var int, + argvPtr: var Tcl_Argv): int{.cdecl, dynlib: dllName, + importc.} +proc Tcl_Merge*(argc: int, argv: Tcl_Argv): cstring{.cdecl, dynlib: dllName, + importc.} +proc Tcl_Free*(p: cstring){.cdecl, dynlib: dllName, importc.} +proc Tcl_Init*(interp: pTcl_Interp): int{.cdecl, dynlib: dllName, importc.} + # procedure Tcl_InterpDeleteProc(clientData: Tcl_ClientData; interp: pTcl_Interp); cdecl; external dllName; +proc Tcl_GetAssocData*(interp: pTcl_Interp, key: cstring, + prc: var TTclInterpDeleteProc): Tcl_ClientData{.cdecl, + dynlib: dllName, importc.} +proc Tcl_DeleteAssocData*(interp: pTcl_Interp, key: cstring){.cdecl, + dynlib: dllName, importc.} +proc Tcl_SetAssocData*(interp: pTcl_Interp, key: cstring, + prc: TTclInterpDeleteProc, clientData: Tcl_ClientData){. + cdecl, dynlib: dllName, importc.} +proc Tcl_IsSafe*(interp: pTcl_Interp): int{.cdecl, dynlib: dllName, importc.} +proc Tcl_MakeSafe*(interp: pTcl_Interp): int{.cdecl, dynlib: dllName, + importc.} +proc Tcl_CreateSlave*(interp: pTcl_Interp, slaveName: cstring, isSafe: int): pTcl_Interp{. + cdecl, dynlib: dllName, importc.} +proc Tcl_GetSlave*(interp: pTcl_Interp, slaveName: cstring): pTcl_Interp{.cdecl, + dynlib: dllName, importc.} +proc Tcl_GetMaster*(interp: pTcl_Interp): pTcl_Interp{.cdecl, + dynlib: dllName, importc.} +proc Tcl_GetInterpPath*(askingInterp: pTcl_Interp, slaveInterp: pTcl_Interp): int{. + cdecl, dynlib: dllName, importc.} +proc Tcl_CreateAlias*(slaveInterp: pTcl_Interp, srcCmd: cstring, + targetInterp: pTcl_Interp, targetCmd: cstring, argc: int, + argv: Tcl_Argv): int{.cdecl, dynlib: dllName, importc.} +proc Tcl_GetAlias*(interp: pTcl_Interp, srcCmd: cstring, + targetInterp: var pTcl_Interp, targetCmd: var cstring, + argc: var int, argv: var Tcl_Argv): int{.cdecl, + dynlib: dllName, importc.} +proc Tcl_ExposeCommand*(interp: pTcl_Interp, hiddenCmdName: cstring, + cmdName: cstring): int{.cdecl, dynlib: dllName, + importc.} +proc Tcl_HideCommand*(interp: pTcl_Interp, cmdName: cstring, + hiddenCmdName: cstring): int{.cdecl, dynlib: dllName, + importc.} +proc Tcl_EventuallyFree*(clientData: Tcl_ClientData, freeProc: TTclFreeProc){. + cdecl, dynlib: dllName, importc.} +proc Tcl_Preserve*(clientData: Tcl_ClientData){.cdecl, dynlib: dllName, + importc.} +proc Tcl_Release*(clientData: Tcl_ClientData){.cdecl, dynlib: dllName, + importc.} +proc Tcl_InterpDeleted*(interp: pTcl_Interp): int{.cdecl, dynlib: dllName, + importc.} +proc Tcl_GetCommandInfo*(interp: pTcl_Interp, cmdName: cstring, + info: var Tcl_CmdInfo): int{.cdecl, + dynlib: dllName, importc.} +proc Tcl_SetCommandInfo*(interp: pTcl_Interp, cmdName: cstring, + info: var Tcl_CmdInfo): int{.cdecl, + dynlib: dllName, importc.} +proc Tcl_FindExecutable*(path: cstring){.cdecl, dynlib: dllName, importc.} +proc Tcl_GetStringResult*(interp: pTcl_Interp): cstring{.cdecl, + dynlib: dllName, importc.} + #v1.0 +proc Tcl_FindCommand*(interp: pTcl_Interp, cmdName: cstring, + contextNsPtr: pTcl_Namespace, flags: int): Tcl_Command{. + cdecl, dynlib: dllName, importc.} + #v1.0 +proc Tcl_DeleteCommandFromToken*(interp: pTcl_Interp, cmd: pTcl_Command): int{. + cdecl, dynlib: dllName, importc.} +proc Tcl_CreateNamespace*(interp: pTcl_Interp, name: cstring, + clientData: Tcl_ClientData, + deleteProc: TTclNamespaceDeleteProc): pTcl_Namespace{. + cdecl, dynlib: dllName, importc.} + #v1.0 +proc Tcl_DeleteNamespace*(namespacePtr: pTcl_Namespace){.cdecl, + dynlib: dllName, importc.} +proc Tcl_FindNamespace*(interp: pTcl_Interp, name: cstring, + contextNsPtr: pTcl_Namespace, flags: int): pTcl_Namespace{. + cdecl, dynlib: dllName, importc.} +proc Tcl_Export*(interp: pTcl_Interp, namespacePtr: pTcl_Namespace, + pattern: cstring, resetListFirst: int): int{.cdecl, + dynlib: dllName, importc.} +proc Tcl_Import*(interp: pTcl_Interp, namespacePtr: pTcl_Namespace, + pattern: cstring, allowOverwrite: int): int{.cdecl, + dynlib: dllName, importc.} +proc Tcl_GetCurrentNamespace*(interp: pTcl_Interp): pTcl_Namespace{.cdecl, + dynlib: dllName, importc.} +proc Tcl_GetGlobalNamespace*(interp: pTcl_Interp): pTcl_Namespace{.cdecl, + dynlib: dllName, importc.} +proc Tcl_PushCallFrame*(interp: pTcl_Interp, callFramePtr: var Tcl_CallFrame, + namespacePtr: pTcl_Namespace, isProcCallFrame: int): int{. + cdecl, dynlib: dllName, importc.} +proc Tcl_PopCallFrame*(interp: pTcl_Interp){.cdecl, dynlib: dllName, importc.} +proc Tcl_VarEval*(interp: pTcl_Interp): int{.cdecl, varargs, + dynlib: dllName, importc.} + # For TkConsole.c * +proc Tcl_RecordAndEval*(interp: pTcl_Interp, cmd: cstring, flags: int): int{. + cdecl, dynlib: dllName, importc.} +proc Tcl_GlobalEval*(interp: pTcl_Interp, command: cstring): int{.cdecl, + dynlib: dllName, importc.} +proc Tcl_DStringFree*(dsPtr: pTcl_DString){.cdecl, dynlib: dllName, importc.} +proc Tcl_DStringAppend*(dsPtr: pTcl_DString, str: cstring, length: int): cstring{. + cdecl, dynlib: dllName, importc.} +proc Tcl_DStringAppendElement*(dsPtr: pTcl_DString, str: cstring): cstring{. + cdecl, dynlib: dllName, importc.} +proc Tcl_DStringInit*(dsPtr: pTcl_DString){.cdecl, dynlib: dllName, importc.} +proc Tcl_AppendResult*(interp: pTcl_Interp){.cdecl, varargs, + dynlib: dllName, importc.} + # actually a "C" var array +proc Tcl_SetStdChannel*(channel: pTcl_Channel, typ: int){.cdecl, + dynlib: dllName, importc.} +proc Tcl_SetChannelOption*(interp: pTcl_Interp, chan: pTcl_Channel, + optionName: cstring, newValue: cstring): int{.cdecl, + dynlib: dllName, importc.} +proc Tcl_GetChannelOption*(interp: pTcl_Interp, chan: pTcl_Channel, + optionName: cstring, dsPtr: pTcl_DString): int{. + cdecl, dynlib: dllName, importc.} +proc Tcl_CreateChannel*(typePtr: pTcl_ChannelType, chanName: cstring, + instanceData: Tcl_ClientData, mask: int): pTcl_Channel{. + cdecl, dynlib: dllName, importc.} +proc Tcl_RegisterChannel*(interp: pTcl_Interp, channel: pTcl_Channel){.cdecl, + dynlib: dllName, importc.} +proc Tcl_UnregisterChannel*(interp: pTcl_Interp, channel: pTcl_Channel): int{. + cdecl, dynlib: dllName, importc.} +proc Tcl_CreateChannelHandler*(chan: pTcl_Channel, mask: int, + prc: TTclChannelProc, clientData: Tcl_ClientData){. + cdecl, dynlib: dllName, importc.} +proc Tcl_GetChannel*(interp: pTcl_Interp, chanName: cstring, modePtr: pInteger): pTcl_Channel{. + cdecl, dynlib: dllName, importc.} +proc Tcl_GetStdChannel*(typ: int): pTcl_Channel{.cdecl, dynlib: dllName, + importc.} +proc Tcl_Gets*(chan: pTcl_Channel, dsPtr: pTcl_DString): int{.cdecl, + dynlib: dllName, importc.} +proc Tcl_Write*(chan: pTcl_Channel, s: cstring, slen: int): int{.cdecl, + dynlib: dllName, importc.} +proc Tcl_Flush*(chan: pTcl_Channel): int{.cdecl, dynlib: dllName, importc.} + # TclWinLoadLibrary = function(name: PChar): HMODULE; cdecl; external dllName; +proc Tcl_CreateExitHandler*(prc: TTclClientDataProc, clientData: Tcl_ClientData){. + cdecl, dynlib: dllName, importc.} +proc Tcl_DeleteExitHandler*(prc: TTclClientDataProc, clientData: Tcl_ClientData){. + cdecl, dynlib: dllName, importc.} +proc Tcl_GetStringFromObj*(pObj: pTcl_Obj, pLen: pInteger): cstring{.cdecl, + dynlib: dllName, importc.} +proc Tcl_CreateObjCommand*(interp: pTcl_Interp, name: cstring, + cmdProc: TTclObjCmdProc, clientData: Tcl_ClientData, + deleteProc: TTclCmdDeleteProc): pTcl_Command{.cdecl, + dynlib: dllName, importc.} +proc Tcl_NewStringObj*(bytes: cstring, length: int): pTcl_Obj{.cdecl, + dynlib: dllName, importc.} + # procedure TclFreeObj(pObj: pTcl_Obj); cdecl; external dllName; +proc Tcl_EvalObj*(interp: pTcl_Interp, pObj: pTcl_Obj): int{.cdecl, + dynlib: dllName, importc.} +proc Tcl_GlobalEvalObj*(interp: pTcl_Interp, pObj: pTcl_Obj): int{.cdecl, + dynlib: dllName, importc.} +proc TclRegComp*(exp: cstring): pointer{.cdecl, dynlib: dllName, importc.} +proc TclRegExec*(prog: pointer, str: cstring, start: cstring): int{.cdecl, + dynlib: dllName, importc.} +proc TclRegError*(msg: cstring){.cdecl, dynlib: dllName, importc.} +proc TclGetRegError*(): cstring{.cdecl, dynlib: dllName, importc.} +proc Tcl_RegExpRange*(prog: pointer, index: int, head: var cstring, + tail: var cstring){.cdecl, dynlib: dllName, importc.} + +proc Tcl_GetCommandTable*(interp: pTcl_Interp): pHashTable = + if interp != nil: + result = cast[pHashTable](cast[int](interp) + sizeof(Tcl_Interp) + + sizeof(pointer)) + +proc Tcl_CreateHashEntry*(tablePtr: pTcl_HashTable, key: cstring, + newPtr: pInteger): pTcl_HashEntry = + result = cast[pHashTable](tablePtr).createProc(tablePtr, key, newPtr) + +proc Tcl_FindHashEntry*(tablePtr: pTcl_HashTable, + key: cstring): pTcl_HashEntry = + result = cast[pHashTable](tablePtr).findProc(tablePtr, key) + +proc Tcl_SetHashValue*(h: pTcl_HashEntry, clientData: Tcl_ClientData) = + h.clientData = clientData + +proc Tcl_GetHashValue*(h: pTcl_HashEntry): Tcl_ClientData = + result = h.clientData + +proc Tcl_IncrRefCount*(pObj: pTcl_Obj) = + inc(pObj.refCount) + +proc Tcl_DecrRefCount*(pObj: pTcl_Obj) = + dec(pObj.refCount) + if pObj.refCount <= 0: + dealloc(pObj) + +proc Tcl_IsShared*(pObj: pTcl_Obj): bool = + return pObj.refCount > 1 + +proc Tcl_GetHashKey*(hashTbl: pTcl_HashTable, + hashEntry: pTcl_HashEntry): cstring = + if hashTbl == nil or hashEntry == nil: + result = nil + else: + result = hashEntry.key + diff --git a/lib/oldwrappers/x11/cursorfont.nim b/lib/oldwrappers/x11/cursorfont.nim new file mode 100644 index 000000000..b262ad7c1 --- /dev/null +++ b/lib/oldwrappers/x11/cursorfont.nim @@ -0,0 +1,110 @@ +# $Xorg: cursorfont.h,v 1.4 2001/02/09 02:03:39 xorgcvs Exp $ +# +# +#Copyright 1987, 1998 The Open Group +# +#Permission to use, copy, modify, distribute, and sell this software and its +#documentation for any purpose is hereby granted without fee, provided that +#the above copyright notice appear in all copies and that both that +#copyright notice and this permission notice appear in supporting +#documentation. +# +#The above copyright notice and this permission notice shall be included +#in all copies or substantial portions of the Software. +# +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +#OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +#MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +#IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +#OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +#ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +#OTHER DEALINGS IN THE SOFTWARE. +# +#Except as contained in this notice, the name of The Open Group shall +#not be used in advertising or otherwise to promote the sale, use or +#other dealings in this Software without prior written authorization +#from The Open Group. +# +# + +const + XC_num_glyphs* = 154 + XC_X_cursor* = 0 + XC_arrow* = 2 + XC_based_arrow_down* = 4 + XC_based_arrow_up* = 6 + XC_boat* = 8 + XC_bogosity* = 10 + XC_bottom_left_corner* = 12 + XC_bottom_right_corner* = 14 + XC_bottom_side* = 16 + XC_bottom_tee* = 18 + XC_box_spiral* = 20 + XC_center_ptr* = 22 + XC_circle* = 24 + XC_clock* = 26 + XC_coffee_mug* = 28 + XC_cross* = 30 + XC_cross_reverse* = 32 + XC_crosshair* = 34 + XC_diamond_cross* = 36 + XC_dot* = 38 + XC_dotbox* = 40 + XC_double_arrow* = 42 + XC_draft_large* = 44 + XC_draft_small* = 46 + XC_draped_box* = 48 + XC_exchange* = 50 + XC_fleur* = 52 + XC_gobbler* = 54 + XC_gumby* = 56 + XC_hand1* = 58 + XC_hand2* = 60 + XC_heart* = 62 + XC_icon* = 64 + XC_iron_cross* = 66 + XC_left_ptr* = 68 + XC_left_side* = 70 + XC_left_tee* = 72 + XC_leftbutton* = 74 + XC_ll_angle* = 76 + XC_lr_angle* = 78 + XC_man* = 80 + XC_middlebutton* = 82 + XC_mouse* = 84 + XC_pencil* = 86 + XC_pirate* = 88 + XC_plus* = 90 + XC_question_arrow* = 92 + XC_right_ptr* = 94 + XC_right_side* = 96 + XC_right_tee* = 98 + XC_rightbutton* = 100 + XC_rtl_logo* = 102 + XC_sailboat* = 104 + XC_sb_down_arrow* = 106 + XC_sb_h_double_arrow* = 108 + XC_sb_left_arrow* = 110 + XC_sb_right_arrow* = 112 + XC_sb_up_arrow* = 114 + XC_sb_v_double_arrow* = 116 + XC_shuttle* = 118 + XC_sizing* = 120 + XC_spider* = 122 + XC_spraycan* = 124 + XC_star* = 126 + XC_target* = 128 + XC_tcross* = 130 + XC_top_left_arrow* = 132 + XC_top_left_corner* = 134 + XC_top_right_corner* = 136 + XC_top_side* = 138 + XC_top_tee* = 140 + XC_trek* = 142 + XC_ul_angle* = 144 + XC_umbrella* = 146 + XC_ur_angle* = 148 + XC_watch* = 150 + XC_xterm* = 152 + +# implementation diff --git a/lib/oldwrappers/x11/keysym.nim b/lib/oldwrappers/x11/keysym.nim new file mode 100644 index 000000000..b1fe13b80 --- /dev/null +++ b/lib/oldwrappers/x11/keysym.nim @@ -0,0 +1,1925 @@ +# +#Converted from X11/keysym.h and X11/keysymdef.h +# +#Capital letter consts renamed from XK_... to XKc_... +# (since Pascal isn't case-sensitive) +# +#i.e. +#C Pascal +#XK_a XK_a +#XK_A XKc_A +# + +#* default keysyms * + +const + XK_VoidSymbol* = 0x00FFFFFF # void symbol + +when defined(XK_MISCELLANY) or true: + const + #* + # * TTY Functions, cleverly chosen to map to ascii, for convenience of + # * programming, but could have been arbitrary (at the cost of lookup + # * tables in client code. + # * + XK_BackSpace* = 0x0000FF08 # back space, back char + XK_Tab* = 0x0000FF09 + XK_Linefeed* = 0x0000FF0A # Linefeed, LF + XK_Clear* = 0x0000FF0B + XK_Return* = 0x0000FF0D # Return, enter + XK_Pause* = 0x0000FF13 # Pause, hold + XK_Scroll_Lock* = 0x0000FF14 + XK_Sys_Req* = 0x0000FF15 + XK_Escape* = 0x0000FF1B + XK_Delete* = 0x0000FFFF # Delete, rubout + # International & multi-key character composition + XK_Multi_key* = 0x0000FF20 # Multi-key character compose + XK_Codeinput* = 0x0000FF37 + XK_SingleCandidate* = 0x0000FF3C + XK_MultipleCandidate* = 0x0000FF3D + XK_PreviousCandidate* = 0x0000FF3E # Japanese keyboard support + XK_Kanji* = 0x0000FF21 # Kanji, Kanji convert + XK_Muhenkan* = 0x0000FF22 # Cancel Conversion + XK_Henkan_Mode* = 0x0000FF23 # Start/Stop Conversion + XK_Henkan* = 0x0000FF23 # Alias for Henkan_Mode + XK_Romaji* = 0x0000FF24 # to Romaji + XK_Hiragana* = 0x0000FF25 # to Hiragana + XK_Katakana* = 0x0000FF26 # to Katakana + XK_Hiragana_Katakana* = 0x0000FF27 # Hiragana/Katakana toggle + XK_Zenkaku* = 0x0000FF28 # to Zenkaku + XK_Hankaku* = 0x0000FF29 # to Hankaku + XK_Zenkaku_Hankaku* = 0x0000FF2A # Zenkaku/Hankaku toggle + XK_Touroku* = 0x0000FF2B # Add to Dictionary + XK_Massyo* = 0x0000FF2C # Delete from Dictionary + XK_Kana_Lock* = 0x0000FF2D # Kana Lock + XK_Kana_Shift* = 0x0000FF2E # Kana Shift + XK_Eisu_Shift* = 0x0000FF2F # Alphanumeric Shift + XK_Eisu_toggle* = 0x0000FF30 # Alphanumeric toggle + XK_Kanji_Bangou* = 0x0000FF37 # Codeinput + XK_Zen_Koho* = 0x0000FF3D # Multiple/All Candidate(s) + XK_Mae_Koho* = 0x0000FF3E # Previous Candidate + # = $FF31 thru = $FF3F are under XK_KOREAN + # Cursor control & motion + XK_Home* = 0x0000FF50 + XK_Left* = 0x0000FF51 # Move left, left arrow + XK_Up* = 0x0000FF52 # Move up, up arrow + XK_Right* = 0x0000FF53 # Move right, right arrow + XK_Down* = 0x0000FF54 # Move down, down arrow + XK_Prior* = 0x0000FF55 # Prior, previous + XK_Page_Up* = 0x0000FF55 + XK_Next* = 0x0000FF56 # Next + XK_Page_Down* = 0x0000FF56 + XK_End* = 0x0000FF57 # EOL + XK_Begin* = 0x0000FF58 # BOL + # Misc Functions + XK_Select* = 0x0000FF60 # Select, mark + XK_Print* = 0x0000FF61 + XK_Execute* = 0x0000FF62 # Execute, run, do + XK_Insert* = 0x0000FF63 # Insert, insert here + XK_Undo* = 0x0000FF65 # Undo, oops + XK_Redo* = 0x0000FF66 # redo, again + XK_Menu* = 0x0000FF67 + XK_Find* = 0x0000FF68 # Find, search + XK_Cancel* = 0x0000FF69 # Cancel, stop, abort, exit + XK_Help* = 0x0000FF6A # Help + XK_Break* = 0x0000FF6B + XK_Mode_switch* = 0x0000FF7E # Character set switch + XK_script_switch* = 0x0000FF7E # Alias for mode_switch + XK_Num_Lock* = 0x0000FF7F # Keypad Functions, keypad numbers cleverly chosen to map to ascii + XK_KP_Space* = 0x0000FF80 # space + XK_KP_Tab* = 0x0000FF89 + XK_KP_Enter* = 0x0000FF8D # enter + XK_KP_F1* = 0x0000FF91 # PF1, KP_A, ... + XK_KP_F2* = 0x0000FF92 + XK_KP_F3* = 0x0000FF93 + XK_KP_F4* = 0x0000FF94 + XK_KP_Home* = 0x0000FF95 + XK_KP_Left* = 0x0000FF96 + XK_KP_Up* = 0x0000FF97 + XK_KP_Right* = 0x0000FF98 + XK_KP_Down* = 0x0000FF99 + XK_KP_Prior* = 0x0000FF9A + XK_KP_Page_Up* = 0x0000FF9A + XK_KP_Next* = 0x0000FF9B + XK_KP_Page_Down* = 0x0000FF9B + XK_KP_End* = 0x0000FF9C + XK_KP_Begin* = 0x0000FF9D + XK_KP_Insert* = 0x0000FF9E + XK_KP_Delete* = 0x0000FF9F + XK_KP_Equal* = 0x0000FFBD # equals + XK_KP_Multiply* = 0x0000FFAA + XK_KP_Add* = 0x0000FFAB + XK_KP_Separator* = 0x0000FFAC # separator, often comma + XK_KP_Subtract* = 0x0000FFAD + XK_KP_Decimal* = 0x0000FFAE + XK_KP_Divide* = 0x0000FFAF + XK_KP_0* = 0x0000FFB0 + XK_KP_1* = 0x0000FFB1 + XK_KP_2* = 0x0000FFB2 + XK_KP_3* = 0x0000FFB3 + XK_KP_4* = 0x0000FFB4 + XK_KP_5* = 0x0000FFB5 + XK_KP_6* = 0x0000FFB6 + XK_KP_7* = 0x0000FFB7 + XK_KP_8* = 0x0000FFB8 + XK_KP_9* = 0x0000FFB9 #* + # * Auxilliary Functions; note the duplicate definitions for left and right + # * function keys; Sun keyboards and a few other manufactures have such + # * function key groups on the left and/or right sides of the keyboard. + # * We've not found a keyboard with more than 35 function keys total. + # * + XK_F1* = 0x0000FFBE + XK_F2* = 0x0000FFBF + XK_F3* = 0x0000FFC0 + XK_F4* = 0x0000FFC1 + XK_F5* = 0x0000FFC2 + XK_F6* = 0x0000FFC3 + XK_F7* = 0x0000FFC4 + XK_F8* = 0x0000FFC5 + XK_F9* = 0x0000FFC6 + XK_F10* = 0x0000FFC7 + XK_F11* = 0x0000FFC8 + XK_L1* = 0x0000FFC8 + XK_F12* = 0x0000FFC9 + XK_L2* = 0x0000FFC9 + XK_F13* = 0x0000FFCA + XK_L3* = 0x0000FFCA + XK_F14* = 0x0000FFCB + XK_L4* = 0x0000FFCB + XK_F15* = 0x0000FFCC + XK_L5* = 0x0000FFCC + XK_F16* = 0x0000FFCD + XK_L6* = 0x0000FFCD + XK_F17* = 0x0000FFCE + XK_L7* = 0x0000FFCE + XK_F18* = 0x0000FFCF + XK_L8* = 0x0000FFCF + XK_F19* = 0x0000FFD0 + XK_L9* = 0x0000FFD0 + XK_F20* = 0x0000FFD1 + XK_L10* = 0x0000FFD1 + XK_F21* = 0x0000FFD2 + XK_R1* = 0x0000FFD2 + XK_F22* = 0x0000FFD3 + XK_R2* = 0x0000FFD3 + XK_F23* = 0x0000FFD4 + XK_R3* = 0x0000FFD4 + XK_F24* = 0x0000FFD5 + XK_R4* = 0x0000FFD5 + XK_F25* = 0x0000FFD6 + XK_R5* = 0x0000FFD6 + XK_F26* = 0x0000FFD7 + XK_R6* = 0x0000FFD7 + XK_F27* = 0x0000FFD8 + XK_R7* = 0x0000FFD8 + XK_F28* = 0x0000FFD9 + XK_R8* = 0x0000FFD9 + XK_F29* = 0x0000FFDA + XK_R9* = 0x0000FFDA + XK_F30* = 0x0000FFDB + XK_R10* = 0x0000FFDB + XK_F31* = 0x0000FFDC + XK_R11* = 0x0000FFDC + XK_F32* = 0x0000FFDD + XK_R12* = 0x0000FFDD + XK_F33* = 0x0000FFDE + XK_R13* = 0x0000FFDE + XK_F34* = 0x0000FFDF + XK_R14* = 0x0000FFDF + XK_F35* = 0x0000FFE0 + XK_R15* = 0x0000FFE0 # Modifiers + XK_Shift_L* = 0x0000FFE1 # Left shift + XK_Shift_R* = 0x0000FFE2 # Right shift + XK_Control_L* = 0x0000FFE3 # Left control + XK_Control_R* = 0x0000FFE4 # Right control + XK_Caps_Lock* = 0x0000FFE5 # Caps lock + XK_Shift_Lock* = 0x0000FFE6 # Shift lock + XK_Meta_L* = 0x0000FFE7 # Left meta + XK_Meta_R* = 0x0000FFE8 # Right meta + XK_Alt_L* = 0x0000FFE9 # Left alt + XK_Alt_R* = 0x0000FFEA # Right alt + XK_Super_L* = 0x0000FFEB # Left super + XK_Super_R* = 0x0000FFEC # Right super + XK_Hyper_L* = 0x0000FFED # Left hyper + XK_Hyper_R* = 0x0000FFEE # Right hyper +# XK_MISCELLANY +#* +# * ISO 9995 Function and Modifier Keys +# * Byte 3 = = $FE +# * + +when defined(XK_XKB_KEYS) or true: + const + XK_ISO_Lock* = 0x0000FE01 + XK_ISO_Level2_Latch* = 0x0000FE02 + XK_ISO_Level3_Shift* = 0x0000FE03 + XK_ISO_Level3_Latch* = 0x0000FE04 + XK_ISO_Level3_Lock* = 0x0000FE05 + XK_ISO_Group_Shift* = 0x0000FF7E # Alias for mode_switch + XK_ISO_Group_Latch* = 0x0000FE06 + XK_ISO_Group_Lock* = 0x0000FE07 + XK_ISO_Next_Group* = 0x0000FE08 + XK_ISO_Next_Group_Lock* = 0x0000FE09 + XK_ISO_Prev_Group* = 0x0000FE0A + XK_ISO_Prev_Group_Lock* = 0x0000FE0B + XK_ISO_First_Group* = 0x0000FE0C + XK_ISO_First_Group_Lock* = 0x0000FE0D + XK_ISO_Last_Group* = 0x0000FE0E + XK_ISO_Last_Group_Lock* = 0x0000FE0F + XK_ISO_Left_Tab* = 0x0000FE20 + XK_ISO_Move_Line_Up* = 0x0000FE21 + XK_ISO_Move_Line_Down* = 0x0000FE22 + XK_ISO_Partial_Line_Up* = 0x0000FE23 + XK_ISO_Partial_Line_Down* = 0x0000FE24 + XK_ISO_Partial_Space_Left* = 0x0000FE25 + XK_ISO_Partial_Space_Right* = 0x0000FE26 + XK_ISO_Set_Margin_Left* = 0x0000FE27 + XK_ISO_Set_Margin_Right* = 0x0000FE28 + XK_ISO_Release_Margin_Left* = 0x0000FE29 + XK_ISO_Release_Margin_Right* = 0x0000FE2A + XK_ISO_Release_Both_Margins* = 0x0000FE2B + XK_ISO_Fast_Cursor_Left* = 0x0000FE2C + XK_ISO_Fast_Cursor_Right* = 0x0000FE2D + XK_ISO_Fast_Cursor_Up* = 0x0000FE2E + XK_ISO_Fast_Cursor_Down* = 0x0000FE2F + XK_ISO_Continuous_Underline* = 0x0000FE30 + XK_ISO_Discontinuous_Underline* = 0x0000FE31 + XK_ISO_Emphasize* = 0x0000FE32 + XK_ISO_Center_Object* = 0x0000FE33 + XK_ISO_Enter* = 0x0000FE34 + XK_dead_grave* = 0x0000FE50 + XK_dead_acute* = 0x0000FE51 + XK_dead_circumflex* = 0x0000FE52 + XK_dead_tilde* = 0x0000FE53 + XK_dead_macron* = 0x0000FE54 + XK_dead_breve* = 0x0000FE55 + XK_dead_abovedot* = 0x0000FE56 + XK_dead_diaeresis* = 0x0000FE57 + XK_dead_abovering* = 0x0000FE58 + XK_dead_doubleacute* = 0x0000FE59 + XK_dead_caron* = 0x0000FE5A + XK_dead_cedilla* = 0x0000FE5B + XK_dead_ogonek* = 0x0000FE5C + XK_dead_iota* = 0x0000FE5D + XK_dead_voiced_sound* = 0x0000FE5E + XK_dead_semivoiced_sound* = 0x0000FE5F + XK_dead_belowdot* = 0x0000FE60 + XK_dead_hook* = 0x0000FE61 + XK_dead_horn* = 0x0000FE62 + XK_First_Virtual_Screen* = 0x0000FED0 + XK_Prev_Virtual_Screen* = 0x0000FED1 + XK_Next_Virtual_Screen* = 0x0000FED2 + XK_Last_Virtual_Screen* = 0x0000FED4 + XK_Terminate_Server* = 0x0000FED5 + XK_AccessX_Enable* = 0x0000FE70 + XK_AccessX_Feedback_Enable* = 0x0000FE71 + XK_RepeatKeys_Enable* = 0x0000FE72 + XK_SlowKeys_Enable* = 0x0000FE73 + XK_BounceKeys_Enable* = 0x0000FE74 + XK_StickyKeys_Enable* = 0x0000FE75 + XK_MouseKeys_Enable* = 0x0000FE76 + XK_MouseKeys_Accel_Enable* = 0x0000FE77 + XK_Overlay1_Enable* = 0x0000FE78 + XK_Overlay2_Enable* = 0x0000FE79 + XK_AudibleBell_Enable* = 0x0000FE7A + XK_Pointer_Left* = 0x0000FEE0 + XK_Pointer_Right* = 0x0000FEE1 + XK_Pointer_Up* = 0x0000FEE2 + XK_Pointer_Down* = 0x0000FEE3 + XK_Pointer_UpLeft* = 0x0000FEE4 + XK_Pointer_UpRight* = 0x0000FEE5 + XK_Pointer_DownLeft* = 0x0000FEE6 + XK_Pointer_DownRight* = 0x0000FEE7 + XK_Pointer_Button_Dflt* = 0x0000FEE8 + XK_Pointer_Button1* = 0x0000FEE9 + XK_Pointer_Button2* = 0x0000FEEA + XK_Pointer_Button3* = 0x0000FEEB + XK_Pointer_Button4* = 0x0000FEEC + XK_Pointer_Button5* = 0x0000FEED + XK_Pointer_DblClick_Dflt* = 0x0000FEEE + XK_Pointer_DblClick1* = 0x0000FEEF + XK_Pointer_DblClick2* = 0x0000FEF0 + XK_Pointer_DblClick3* = 0x0000FEF1 + XK_Pointer_DblClick4* = 0x0000FEF2 + XK_Pointer_DblClick5* = 0x0000FEF3 + XK_Pointer_Drag_Dflt* = 0x0000FEF4 + XK_Pointer_Drag1* = 0x0000FEF5 + XK_Pointer_Drag2* = 0x0000FEF6 + XK_Pointer_Drag3* = 0x0000FEF7 + XK_Pointer_Drag4* = 0x0000FEF8 + XK_Pointer_Drag5* = 0x0000FEFD + XK_Pointer_EnableKeys* = 0x0000FEF9 + XK_Pointer_Accelerate* = 0x0000FEFA + XK_Pointer_DfltBtnNext* = 0x0000FEFB + XK_Pointer_DfltBtnPrev* = 0x0000FEFC + #* + # * 3270 Terminal Keys + # * Byte 3 = = $FD + # * + +when defined(XK_3270) or true: + const + XK_3270_Duplicate* = 0x0000FD01 + XK_3270_FieldMark* = 0x0000FD02 + XK_3270_Right2* = 0x0000FD03 + XK_3270_Left2* = 0x0000FD04 + XK_3270_BackTab* = 0x0000FD05 + XK_3270_EraseEOF* = 0x0000FD06 + XK_3270_EraseInput* = 0x0000FD07 + XK_3270_Reset* = 0x0000FD08 + XK_3270_Quit* = 0x0000FD09 + XK_3270_PA1* = 0x0000FD0A + XK_3270_PA2* = 0x0000FD0B + XK_3270_PA3* = 0x0000FD0C + XK_3270_Test* = 0x0000FD0D + XK_3270_Attn* = 0x0000FD0E + XK_3270_CursorBlink* = 0x0000FD0F + XK_3270_AltCursor* = 0x0000FD10 + XK_3270_KeyClick* = 0x0000FD11 + XK_3270_Jump* = 0x0000FD12 + XK_3270_Ident* = 0x0000FD13 + XK_3270_Rule* = 0x0000FD14 + XK_3270_Copy* = 0x0000FD15 + XK_3270_Play* = 0x0000FD16 + XK_3270_Setup* = 0x0000FD17 + XK_3270_Record* = 0x0000FD18 + XK_3270_ChangeScreen* = 0x0000FD19 + XK_3270_DeleteWord* = 0x0000FD1A + XK_3270_ExSelect* = 0x0000FD1B + XK_3270_CursorSelect* = 0x0000FD1C + XK_3270_PrintScreen* = 0x0000FD1D + XK_3270_Enter* = 0x0000FD1E +#* +# * Latin 1 +# * Byte 3 = 0 +# * + +when defined(XK_LATIN1) or true: + const + XK_space* = 0x00000020 + XK_exclam* = 0x00000021 + XK_quotedbl* = 0x00000022 + XK_numbersign* = 0x00000023 + XK_dollar* = 0x00000024 + XK_percent* = 0x00000025 + XK_ampersand* = 0x00000026 + XK_apostrophe* = 0x00000027 + XK_quoteright* = 0x00000027 # deprecated + XK_parenleft* = 0x00000028 + XK_parenright* = 0x00000029 + XK_asterisk* = 0x0000002A + XK_plus* = 0x0000002B + XK_comma* = 0x0000002C + XK_minus* = 0x0000002D + XK_period* = 0x0000002E + XK_slash* = 0x0000002F + XK_0* = 0x00000030 + XK_1* = 0x00000031 + XK_2* = 0x00000032 + XK_3* = 0x00000033 + XK_4* = 0x00000034 + XK_5* = 0x00000035 + XK_6* = 0x00000036 + XK_7* = 0x00000037 + XK_8* = 0x00000038 + XK_9* = 0x00000039 + XK_colon* = 0x0000003A + XK_semicolon* = 0x0000003B + XK_less* = 0x0000003C + XK_equal* = 0x0000003D + XK_greater* = 0x0000003E + XK_question* = 0x0000003F + XK_at* = 0x00000040 + XKc_A* = 0x00000041 + XKc_B* = 0x00000042 + XKc_C* = 0x00000043 + XKc_D* = 0x00000044 + XKc_E* = 0x00000045 + XKc_F* = 0x00000046 + XKc_G* = 0x00000047 + XKc_H* = 0x00000048 + XKc_I* = 0x00000049 + XKc_J* = 0x0000004A + XKc_K* = 0x0000004B + XKc_L* = 0x0000004C + XKc_M* = 0x0000004D + XKc_N* = 0x0000004E + XKc_O* = 0x0000004F + XKc_P* = 0x00000050 + XKc_Q* = 0x00000051 + XKc_R* = 0x00000052 + XKc_S* = 0x00000053 + XKc_T* = 0x00000054 + XKc_U* = 0x00000055 + XKc_V* = 0x00000056 + XKc_W* = 0x00000057 + XKc_X* = 0x00000058 + XKc_Y* = 0x00000059 + XKc_Z* = 0x0000005A + XK_bracketleft* = 0x0000005B + XK_backslash* = 0x0000005C + XK_bracketright* = 0x0000005D + XK_asciicircum* = 0x0000005E + XK_underscore* = 0x0000005F + XK_grave* = 0x00000060 + XK_quoteleft* = 0x00000060 # deprecated + XK_a* = 0x00000061 + XK_b* = 0x00000062 + XK_c* = 0x00000063 + XK_d* = 0x00000064 + XK_e* = 0x00000065 + XK_f* = 0x00000066 + XK_g* = 0x00000067 + XK_h* = 0x00000068 + XK_i* = 0x00000069 + XK_j* = 0x0000006A + XK_k* = 0x0000006B + XK_l* = 0x0000006C + XK_m* = 0x0000006D + XK_n* = 0x0000006E + XK_o* = 0x0000006F + XK_p* = 0x00000070 + XK_q* = 0x00000071 + XK_r* = 0x00000072 + XK_s* = 0x00000073 + XK_t* = 0x00000074 + XK_u* = 0x00000075 + XK_v* = 0x00000076 + XK_w* = 0x00000077 + XK_x* = 0x00000078 + XK_y* = 0x00000079 + XK_z* = 0x0000007A + XK_braceleft* = 0x0000007B + XK_bar* = 0x0000007C + XK_braceright* = 0x0000007D + XK_asciitilde* = 0x0000007E + XK_nobreakspace* = 0x000000A0 + XK_exclamdown* = 0x000000A1 + XK_cent* = 0x000000A2 + XK_sterling* = 0x000000A3 + XK_currency* = 0x000000A4 + XK_yen* = 0x000000A5 + XK_brokenbar* = 0x000000A6 + XK_section* = 0x000000A7 + XK_diaeresis* = 0x000000A8 + XK_copyright* = 0x000000A9 + XK_ordfeminine* = 0x000000AA + XK_guillemotleft* = 0x000000AB # left angle quotation mark + XK_notsign* = 0x000000AC + XK_hyphen* = 0x000000AD + XK_registered* = 0x000000AE + XK_macron* = 0x000000AF + XK_degree* = 0x000000B0 + XK_plusminus* = 0x000000B1 + XK_twosuperior* = 0x000000B2 + XK_threesuperior* = 0x000000B3 + XK_acute* = 0x000000B4 + XK_mu* = 0x000000B5 + XK_paragraph* = 0x000000B6 + XK_periodcentered* = 0x000000B7 + XK_cedilla* = 0x000000B8 + XK_onesuperior* = 0x000000B9 + XK_masculine* = 0x000000BA + XK_guillemotright* = 0x000000BB # right angle quotation mark + XK_onequarter* = 0x000000BC + XK_onehalf* = 0x000000BD + XK_threequarters* = 0x000000BE + XK_questiondown* = 0x000000BF + XKc_Agrave* = 0x000000C0 + XKc_Aacute* = 0x000000C1 + XKc_Acircumflex* = 0x000000C2 + XKc_Atilde* = 0x000000C3 + XKc_Adiaeresis* = 0x000000C4 + XKc_Aring* = 0x000000C5 + XKc_AE* = 0x000000C6 + XKc_Ccedilla* = 0x000000C7 + XKc_Egrave* = 0x000000C8 + XKc_Eacute* = 0x000000C9 + XKc_Ecircumflex* = 0x000000CA + XKc_Ediaeresis* = 0x000000CB + XKc_Igrave* = 0x000000CC + XKc_Iacute* = 0x000000CD + XKc_Icircumflex* = 0x000000CE + XKc_Idiaeresis* = 0x000000CF + XKc_ETH* = 0x000000D0 + XKc_Ntilde* = 0x000000D1 + XKc_Ograve* = 0x000000D2 + XKc_Oacute* = 0x000000D3 + XKc_Ocircumflex* = 0x000000D4 + XKc_Otilde* = 0x000000D5 + XKc_Odiaeresis* = 0x000000D6 + XK_multiply* = 0x000000D7 + XKc_Ooblique* = 0x000000D8 + XKc_Oslash* = XKc_Ooblique + XKc_Ugrave* = 0x000000D9 + XKc_Uacute* = 0x000000DA + XKc_Ucircumflex* = 0x000000DB + XKc_Udiaeresis* = 0x000000DC + XKc_Yacute* = 0x000000DD + XKc_THORN* = 0x000000DE + XK_ssharp* = 0x000000DF + XK_agrave* = 0x000000E0 + XK_aacute* = 0x000000E1 + XK_acircumflex* = 0x000000E2 + XK_atilde* = 0x000000E3 + XK_adiaeresis* = 0x000000E4 + XK_aring* = 0x000000E5 + XK_ae* = 0x000000E6 + XK_ccedilla* = 0x000000E7 + XK_egrave* = 0x000000E8 + XK_eacute* = 0x000000E9 + XK_ecircumflex* = 0x000000EA + XK_ediaeresis* = 0x000000EB + XK_igrave* = 0x000000EC + XK_iacute* = 0x000000ED + XK_icircumflex* = 0x000000EE + XK_idiaeresis* = 0x000000EF + XK_eth* = 0x000000F0 + XK_ntilde* = 0x000000F1 + XK_ograve* = 0x000000F2 + XK_oacute* = 0x000000F3 + XK_ocircumflex* = 0x000000F4 + XK_otilde* = 0x000000F5 + XK_odiaeresis* = 0x000000F6 + XK_division* = 0x000000F7 + XK_oslash* = 0x000000F8 + XK_ooblique* = XK_oslash + XK_ugrave* = 0x000000F9 + XK_uacute* = 0x000000FA + XK_ucircumflex* = 0x000000FB + XK_udiaeresis* = 0x000000FC + XK_yacute* = 0x000000FD + XK_thorn* = 0x000000FE + XK_ydiaeresis* = 0x000000FF +# XK_LATIN1 +#* +# * Latin 2 +# * Byte 3 = 1 +# * + +when defined(XK_LATIN2) or true: + const + XKc_Aogonek* = 0x000001A1 + XK_breve* = 0x000001A2 + XKc_Lstroke* = 0x000001A3 + XKc_Lcaron* = 0x000001A5 + XKc_Sacute* = 0x000001A6 + XKc_Scaron* = 0x000001A9 + XKc_Scedilla* = 0x000001AA + XKc_Tcaron* = 0x000001AB + XKc_Zacute* = 0x000001AC + XKc_Zcaron* = 0x000001AE + XKc_Zabovedot* = 0x000001AF + XK_aogonek* = 0x000001B1 + XK_ogonek* = 0x000001B2 + XK_lstroke* = 0x000001B3 + XK_lcaron* = 0x000001B5 + XK_sacute* = 0x000001B6 + XK_caron* = 0x000001B7 + XK_scaron* = 0x000001B9 + XK_scedilla* = 0x000001BA + XK_tcaron* = 0x000001BB + XK_zacute* = 0x000001BC + XK_doubleacute* = 0x000001BD + XK_zcaron* = 0x000001BE + XK_zabovedot* = 0x000001BF + XKc_Racute* = 0x000001C0 + XKc_Abreve* = 0x000001C3 + XKc_Lacute* = 0x000001C5 + XKc_Cacute* = 0x000001C6 + XKc_Ccaron* = 0x000001C8 + XKc_Eogonek* = 0x000001CA + XKc_Ecaron* = 0x000001CC + XKc_Dcaron* = 0x000001CF + XKc_Dstroke* = 0x000001D0 + XKc_Nacute* = 0x000001D1 + XKc_Ncaron* = 0x000001D2 + XKc_Odoubleacute* = 0x000001D5 + XKc_Rcaron* = 0x000001D8 + XKc_Uring* = 0x000001D9 + XKc_Udoubleacute* = 0x000001DB + XKc_Tcedilla* = 0x000001DE + XK_racute* = 0x000001E0 + XK_abreve* = 0x000001E3 + XK_lacute* = 0x000001E5 + XK_cacute* = 0x000001E6 + XK_ccaron* = 0x000001E8 + XK_eogonek* = 0x000001EA + XK_ecaron* = 0x000001EC + XK_dcaron* = 0x000001EF + XK_dstroke* = 0x000001F0 + XK_nacute* = 0x000001F1 + XK_ncaron* = 0x000001F2 + XK_odoubleacute* = 0x000001F5 + XK_udoubleacute* = 0x000001FB + XK_rcaron* = 0x000001F8 + XK_uring* = 0x000001F9 + XK_tcedilla* = 0x000001FE + XK_abovedot* = 0x000001FF +# XK_LATIN2 +#* +# * Latin 3 +# * Byte 3 = 2 +# * + +when defined(XK_LATIN3) or true: + const + XKc_Hstroke* = 0x000002A1 + XKc_Hcircumflex* = 0x000002A6 + XKc_Iabovedot* = 0x000002A9 + XKc_Gbreve* = 0x000002AB + XKc_Jcircumflex* = 0x000002AC + XK_hstroke* = 0x000002B1 + XK_hcircumflex* = 0x000002B6 + XK_idotless* = 0x000002B9 + XK_gbreve* = 0x000002BB + XK_jcircumflex* = 0x000002BC + XKc_Cabovedot* = 0x000002C5 + XKc_Ccircumflex* = 0x000002C6 + XKc_Gabovedot* = 0x000002D5 + XKc_Gcircumflex* = 0x000002D8 + XKc_Ubreve* = 0x000002DD + XKc_Scircumflex* = 0x000002DE + XK_cabovedot* = 0x000002E5 + XK_ccircumflex* = 0x000002E6 + XK_gabovedot* = 0x000002F5 + XK_gcircumflex* = 0x000002F8 + XK_ubreve* = 0x000002FD + XK_scircumflex* = 0x000002FE +# XK_LATIN3 +#* +# * Latin 4 +# * Byte 3 = 3 +# * + +when defined(XK_LATIN4) or true: + const + XK_kra* = 0x000003A2 + XK_kappa* = 0x000003A2 # deprecated + XKc_Rcedilla* = 0x000003A3 + XKc_Itilde* = 0x000003A5 + XKc_Lcedilla* = 0x000003A6 + XKc_Emacron* = 0x000003AA + XKc_Gcedilla* = 0x000003AB + XKc_Tslash* = 0x000003AC + XK_rcedilla* = 0x000003B3 + XK_itilde* = 0x000003B5 + XK_lcedilla* = 0x000003B6 + XK_emacron* = 0x000003BA + XK_gcedilla* = 0x000003BB + XK_tslash* = 0x000003BC + XKc_ENG* = 0x000003BD + XK_eng* = 0x000003BF + XKc_Amacron* = 0x000003C0 + XKc_Iogonek* = 0x000003C7 + XKc_Eabovedot* = 0x000003CC + XKc_Imacron* = 0x000003CF + XKc_Ncedilla* = 0x000003D1 + XKc_Omacron* = 0x000003D2 + XKc_Kcedilla* = 0x000003D3 + XKc_Uogonek* = 0x000003D9 + XKc_Utilde* = 0x000003DD + XKc_Umacron* = 0x000003DE + XK_amacron* = 0x000003E0 + XK_iogonek* = 0x000003E7 + XK_eabovedot* = 0x000003EC + XK_imacron* = 0x000003EF + XK_ncedilla* = 0x000003F1 + XK_omacron* = 0x000003F2 + XK_kcedilla* = 0x000003F3 + XK_uogonek* = 0x000003F9 + XK_utilde* = 0x000003FD + XK_umacron* = 0x000003FE +# XK_LATIN4 +#* +# * Latin-8 +# * Byte 3 = 18 +# * + +when defined(XK_LATIN8) or true: + const + XKc_Babovedot* = 0x000012A1 + XK_babovedot* = 0x000012A2 + XKc_Dabovedot* = 0x000012A6 + XKc_Wgrave* = 0x000012A8 + XKc_Wacute* = 0x000012AA + XK_dabovedot* = 0x000012AB + XKc_Ygrave* = 0x000012AC + XKc_Fabovedot* = 0x000012B0 + XK_fabovedot* = 0x000012B1 + XKc_Mabovedot* = 0x000012B4 + XK_mabovedot* = 0x000012B5 + XKc_Pabovedot* = 0x000012B7 + XK_wgrave* = 0x000012B8 + XK_pabovedot* = 0x000012B9 + XK_wacute* = 0x000012BA + XKc_Sabovedot* = 0x000012BB + XK_ygrave* = 0x000012BC + XKc_Wdiaeresis* = 0x000012BD + XK_wdiaeresis* = 0x000012BE + XK_sabovedot* = 0x000012BF + XKc_Wcircumflex* = 0x000012D0 + XKc_Tabovedot* = 0x000012D7 + XKc_Ycircumflex* = 0x000012DE + XK_wcircumflex* = 0x000012F0 + XK_tabovedot* = 0x000012F7 + XK_ycircumflex* = 0x000012FE +# XK_LATIN8 +#* +# * Latin-9 (a.k.a. Latin-0) +# * Byte 3 = 19 +# * + +when defined(XK_LATIN9) or true: + const + XKc_OE* = 0x000013BC + XK_oe* = 0x000013BD + XKc_Ydiaeresis* = 0x000013BE +# XK_LATIN9 +#* +# * Katakana +# * Byte 3 = 4 +# * + +when defined(XK_KATAKANA) or true: + const + XK_overline* = 0x0000047E + XK_kana_fullstop* = 0x000004A1 + XK_kana_openingbracket* = 0x000004A2 + XK_kana_closingbracket* = 0x000004A3 + XK_kana_comma* = 0x000004A4 + XK_kana_conjunctive* = 0x000004A5 + XK_kana_middledot* = 0x000004A5 # deprecated + XKc_kana_WO* = 0x000004A6 + XK_kana_a* = 0x000004A7 + XK_kana_i* = 0x000004A8 + XK_kana_u* = 0x000004A9 + XK_kana_e* = 0x000004AA + XK_kana_o* = 0x000004AB + XK_kana_ya* = 0x000004AC + XK_kana_yu* = 0x000004AD + XK_kana_yo* = 0x000004AE + XK_kana_tsu* = 0x000004AF + XK_kana_tu* = 0x000004AF # deprecated + XK_prolongedsound* = 0x000004B0 + XKc_kana_A* = 0x000004B1 + XKc_kana_I* = 0x000004B2 + XKc_kana_U* = 0x000004B3 + XKc_kana_E* = 0x000004B4 + XKc_kana_O* = 0x000004B5 + XKc_kana_KA* = 0x000004B6 + XKc_kana_KI* = 0x000004B7 + XKc_kana_KU* = 0x000004B8 + XKc_kana_KE* = 0x000004B9 + XKc_kana_KO* = 0x000004BA + XKc_kana_SA* = 0x000004BB + XKc_kana_SHI* = 0x000004BC + XKc_kana_SU* = 0x000004BD + XKc_kana_SE* = 0x000004BE + XKc_kana_SO* = 0x000004BF + XKc_kana_TA* = 0x000004C0 + XKc_kana_CHI* = 0x000004C1 + XKc_kana_TI* = 0x000004C1 # deprecated + XKc_kana_TSU* = 0x000004C2 + XKc_kana_TU* = 0x000004C2 # deprecated + XKc_kana_TE* = 0x000004C3 + XKc_kana_TO* = 0x000004C4 + XKc_kana_NA* = 0x000004C5 + XKc_kana_NI* = 0x000004C6 + XKc_kana_NU* = 0x000004C7 + XKc_kana_NE* = 0x000004C8 + XKc_kana_NO* = 0x000004C9 + XKc_kana_HA* = 0x000004CA + XKc_kana_HI* = 0x000004CB + XKc_kana_FU* = 0x000004CC + XKc_kana_HU* = 0x000004CC # deprecated + XKc_kana_HE* = 0x000004CD + XKc_kana_HO* = 0x000004CE + XKc_kana_MA* = 0x000004CF + XKc_kana_MI* = 0x000004D0 + XKc_kana_MU* = 0x000004D1 + XKc_kana_ME* = 0x000004D2 + XKc_kana_MO* = 0x000004D3 + XKc_kana_YA* = 0x000004D4 + XKc_kana_YU* = 0x000004D5 + XKc_kana_YO* = 0x000004D6 + XKc_kana_RA* = 0x000004D7 + XKc_kana_RI* = 0x000004D8 + XKc_kana_RU* = 0x000004D9 + XKc_kana_RE* = 0x000004DA + XKc_kana_RO* = 0x000004DB + XKc_kana_WA* = 0x000004DC + XKc_kana_N* = 0x000004DD + XK_voicedsound* = 0x000004DE + XK_semivoicedsound* = 0x000004DF + XK_kana_switch* = 0x0000FF7E # Alias for mode_switch +# XK_KATAKANA +#* +# * Arabic +# * Byte 3 = 5 +# * + +when defined(XK_ARABIC) or true: + const + XK_Farsi_0* = 0x00000590 + XK_Farsi_1* = 0x00000591 + XK_Farsi_2* = 0x00000592 + XK_Farsi_3* = 0x00000593 + XK_Farsi_4* = 0x00000594 + XK_Farsi_5* = 0x00000595 + XK_Farsi_6* = 0x00000596 + XK_Farsi_7* = 0x00000597 + XK_Farsi_8* = 0x00000598 + XK_Farsi_9* = 0x00000599 + XK_Arabic_percent* = 0x000005A5 + XK_Arabic_superscript_alef* = 0x000005A6 + XK_Arabic_tteh* = 0x000005A7 + XK_Arabic_peh* = 0x000005A8 + XK_Arabic_tcheh* = 0x000005A9 + XK_Arabic_ddal* = 0x000005AA + XK_Arabic_rreh* = 0x000005AB + XK_Arabic_comma* = 0x000005AC + XK_Arabic_fullstop* = 0x000005AE + XK_Arabic_0* = 0x000005B0 + XK_Arabic_1* = 0x000005B1 + XK_Arabic_2* = 0x000005B2 + XK_Arabic_3* = 0x000005B3 + XK_Arabic_4* = 0x000005B4 + XK_Arabic_5* = 0x000005B5 + XK_Arabic_6* = 0x000005B6 + XK_Arabic_7* = 0x000005B7 + XK_Arabic_8* = 0x000005B8 + XK_Arabic_9* = 0x000005B9 + XK_Arabic_semicolon* = 0x000005BB + XK_Arabic_question_mark* = 0x000005BF + XK_Arabic_hamza* = 0x000005C1 + XK_Arabic_maddaonalef* = 0x000005C2 + XK_Arabic_hamzaonalef* = 0x000005C3 + XK_Arabic_hamzaonwaw* = 0x000005C4 + XK_Arabic_hamzaunderalef* = 0x000005C5 + XK_Arabic_hamzaonyeh* = 0x000005C6 + XK_Arabic_alef* = 0x000005C7 + XK_Arabic_beh* = 0x000005C8 + XK_Arabic_tehmarbuta* = 0x000005C9 + XK_Arabic_teh* = 0x000005CA + XK_Arabic_theh* = 0x000005CB + XK_Arabic_jeem* = 0x000005CC + XK_Arabic_hah* = 0x000005CD + XK_Arabic_khah* = 0x000005CE + XK_Arabic_dal* = 0x000005CF + XK_Arabic_thal* = 0x000005D0 + XK_Arabic_ra* = 0x000005D1 + XK_Arabic_zain* = 0x000005D2 + XK_Arabic_seen* = 0x000005D3 + XK_Arabic_sheen* = 0x000005D4 + XK_Arabic_sad* = 0x000005D5 + XK_Arabic_dad* = 0x000005D6 + XK_Arabic_tah* = 0x000005D7 + XK_Arabic_zah* = 0x000005D8 + XK_Arabic_ain* = 0x000005D9 + XK_Arabic_ghain* = 0x000005DA + XK_Arabic_tatweel* = 0x000005E0 + XK_Arabic_feh* = 0x000005E1 + XK_Arabic_qaf* = 0x000005E2 + XK_Arabic_kaf* = 0x000005E3 + XK_Arabic_lam* = 0x000005E4 + XK_Arabic_meem* = 0x000005E5 + XK_Arabic_noon* = 0x000005E6 + XK_Arabic_ha* = 0x000005E7 + XK_Arabic_heh* = 0x000005E7 # deprecated + XK_Arabic_waw* = 0x000005E8 + XK_Arabic_alefmaksura* = 0x000005E9 + XK_Arabic_yeh* = 0x000005EA + XK_Arabic_fathatan* = 0x000005EB + XK_Arabic_dammatan* = 0x000005EC + XK_Arabic_kasratan* = 0x000005ED + XK_Arabic_fatha* = 0x000005EE + XK_Arabic_damma* = 0x000005EF + XK_Arabic_kasra* = 0x000005F0 + XK_Arabic_shadda* = 0x000005F1 + XK_Arabic_sukun* = 0x000005F2 + XK_Arabic_madda_above* = 0x000005F3 + XK_Arabic_hamza_above* = 0x000005F4 + XK_Arabic_hamza_below* = 0x000005F5 + XK_Arabic_jeh* = 0x000005F6 + XK_Arabic_veh* = 0x000005F7 + XK_Arabic_keheh* = 0x000005F8 + XK_Arabic_gaf* = 0x000005F9 + XK_Arabic_noon_ghunna* = 0x000005FA + XK_Arabic_heh_doachashmee* = 0x000005FB + XK_Farsi_yeh* = 0x000005FC + XK_Arabic_farsi_yeh* = XK_Farsi_yeh + XK_Arabic_yeh_baree* = 0x000005FD + XK_Arabic_heh_goal* = 0x000005FE + XK_Arabic_switch* = 0x0000FF7E # Alias for mode_switch +# XK_ARABIC +#* +# * Cyrillic +# * Byte 3 = 6 +# * + +when defined(XK_CYRILLIC) or true: + const + XKc_Cyrillic_GHE_bar* = 0x00000680 + XK_Cyrillic_ghe_bar* = 0x00000690 + XKc_Cyrillic_ZHE_descender* = 0x00000681 + XK_Cyrillic_zhe_descender* = 0x00000691 + XKc_Cyrillic_KA_descender* = 0x00000682 + XK_Cyrillic_ka_descender* = 0x00000692 + XKc_Cyrillic_KA_vertstroke* = 0x00000683 + XK_Cyrillic_ka_vertstroke* = 0x00000693 + XKc_Cyrillic_EN_descender* = 0x00000684 + XK_Cyrillic_en_descender* = 0x00000694 + XKc_Cyrillic_U_straight* = 0x00000685 + XK_Cyrillic_u_straight* = 0x00000695 + XKc_Cyrillic_U_straight_bar* = 0x00000686 + XK_Cyrillic_u_straight_bar* = 0x00000696 + XKc_Cyrillic_HA_descender* = 0x00000687 + XK_Cyrillic_ha_descender* = 0x00000697 + XKc_Cyrillic_CHE_descender* = 0x00000688 + XK_Cyrillic_che_descender* = 0x00000698 + XKc_Cyrillic_CHE_vertstroke* = 0x00000689 + XK_Cyrillic_che_vertstroke* = 0x00000699 + XKc_Cyrillic_SHHA* = 0x0000068A + XK_Cyrillic_shha* = 0x0000069A + XKc_Cyrillic_SCHWA* = 0x0000068C + XK_Cyrillic_schwa* = 0x0000069C + XKc_Cyrillic_I_macron* = 0x0000068D + XK_Cyrillic_i_macron* = 0x0000069D + XKc_Cyrillic_O_bar* = 0x0000068E + XK_Cyrillic_o_bar* = 0x0000069E + XKc_Cyrillic_U_macron* = 0x0000068F + XK_Cyrillic_u_macron* = 0x0000069F + XK_Serbian_dje* = 0x000006A1 + XK_Macedonia_gje* = 0x000006A2 + XK_Cyrillic_io* = 0x000006A3 + XK_Ukrainian_ie* = 0x000006A4 + XK_Ukranian_je* = 0x000006A4 # deprecated + XK_Macedonia_dse* = 0x000006A5 + XK_Ukrainian_i* = 0x000006A6 + XK_Ukranian_i* = 0x000006A6 # deprecated + XK_Ukrainian_yi* = 0x000006A7 + XK_Ukranian_yi* = 0x000006A7 # deprecated + XK_Cyrillic_je* = 0x000006A8 + XK_Serbian_je* = 0x000006A8 # deprecated + XK_Cyrillic_lje* = 0x000006A9 + XK_Serbian_lje* = 0x000006A9 # deprecated + XK_Cyrillic_nje* = 0x000006AA + XK_Serbian_nje* = 0x000006AA # deprecated + XK_Serbian_tshe* = 0x000006AB + XK_Macedonia_kje* = 0x000006AC + XK_Ukrainian_ghe_with_upturn* = 0x000006AD + XK_Byelorussian_shortu* = 0x000006AE + XK_Cyrillic_dzhe* = 0x000006AF + XK_Serbian_dze* = 0x000006AF # deprecated + XK_numerosign* = 0x000006B0 + XKc_Serbian_DJE* = 0x000006B1 + XKc_Macedonia_GJE* = 0x000006B2 + XKc_Cyrillic_IO* = 0x000006B3 + XKc_Ukrainian_IE* = 0x000006B4 + XKc_Ukranian_JE* = 0x000006B4 # deprecated + XKc_Macedonia_DSE* = 0x000006B5 + XKc_Ukrainian_I* = 0x000006B6 + XKc_Ukranian_I* = 0x000006B6 # deprecated + XKc_Ukrainian_YI* = 0x000006B7 + XKc_Ukranian_YI* = 0x000006B7 # deprecated + XKc_Cyrillic_JE* = 0x000006B8 + XKc_Serbian_JE* = 0x000006B8 # deprecated + XKc_Cyrillic_LJE* = 0x000006B9 + XKc_Serbian_LJE* = 0x000006B9 # deprecated + XKc_Cyrillic_NJE* = 0x000006BA + XKc_Serbian_NJE* = 0x000006BA # deprecated + XKc_Serbian_TSHE* = 0x000006BB + XKc_Macedonia_KJE* = 0x000006BC + XKc_Ukrainian_GHE_WITH_UPTURN* = 0x000006BD + XKc_Byelorussian_SHORTU* = 0x000006BE + XKc_Cyrillic_DZHE* = 0x000006BF + XKc_Serbian_DZE* = 0x000006BF # deprecated + XK_Cyrillic_yu* = 0x000006C0 + XK_Cyrillic_a* = 0x000006C1 + XK_Cyrillic_be* = 0x000006C2 + XK_Cyrillic_tse* = 0x000006C3 + XK_Cyrillic_de* = 0x000006C4 + XK_Cyrillic_ie* = 0x000006C5 + XK_Cyrillic_ef* = 0x000006C6 + XK_Cyrillic_ghe* = 0x000006C7 + XK_Cyrillic_ha* = 0x000006C8 + XK_Cyrillic_i* = 0x000006C9 + XK_Cyrillic_shorti* = 0x000006CA + XK_Cyrillic_ka* = 0x000006CB + XK_Cyrillic_el* = 0x000006CC + XK_Cyrillic_em* = 0x000006CD + XK_Cyrillic_en* = 0x000006CE + XK_Cyrillic_o* = 0x000006CF + XK_Cyrillic_pe* = 0x000006D0 + XK_Cyrillic_ya* = 0x000006D1 + XK_Cyrillic_er* = 0x000006D2 + XK_Cyrillic_es* = 0x000006D3 + XK_Cyrillic_te* = 0x000006D4 + XK_Cyrillic_u* = 0x000006D5 + XK_Cyrillic_zhe* = 0x000006D6 + XK_Cyrillic_ve* = 0x000006D7 + XK_Cyrillic_softsign* = 0x000006D8 + XK_Cyrillic_yeru* = 0x000006D9 + XK_Cyrillic_ze* = 0x000006DA + XK_Cyrillic_sha* = 0x000006DB + XK_Cyrillic_e* = 0x000006DC + XK_Cyrillic_shcha* = 0x000006DD + XK_Cyrillic_che* = 0x000006DE + XK_Cyrillic_hardsign* = 0x000006DF + XKc_Cyrillic_YU* = 0x000006E0 + XKc_Cyrillic_A* = 0x000006E1 + XKc_Cyrillic_BE* = 0x000006E2 + XKc_Cyrillic_TSE* = 0x000006E3 + XKc_Cyrillic_DE* = 0x000006E4 + XKc_Cyrillic_IE* = 0x000006E5 + XKc_Cyrillic_EF* = 0x000006E6 + XKc_Cyrillic_GHE* = 0x000006E7 + XKc_Cyrillic_HA* = 0x000006E8 + XKc_Cyrillic_I* = 0x000006E9 + XKc_Cyrillic_SHORTI* = 0x000006EA + XKc_Cyrillic_KA* = 0x000006EB + XKc_Cyrillic_EL* = 0x000006EC + XKc_Cyrillic_EM* = 0x000006ED + XKc_Cyrillic_EN* = 0x000006EE + XKc_Cyrillic_O* = 0x000006EF + XKc_Cyrillic_PE* = 0x000006F0 + XKc_Cyrillic_YA* = 0x000006F1 + XKc_Cyrillic_ER* = 0x000006F2 + XKc_Cyrillic_ES* = 0x000006F3 + XKc_Cyrillic_TE* = 0x000006F4 + XKc_Cyrillic_U* = 0x000006F5 + XKc_Cyrillic_ZHE* = 0x000006F6 + XKc_Cyrillic_VE* = 0x000006F7 + XKc_Cyrillic_SOFTSIGN* = 0x000006F8 + XKc_Cyrillic_YERU* = 0x000006F9 + XKc_Cyrillic_ZE* = 0x000006FA + XKc_Cyrillic_SHA* = 0x000006FB + XKc_Cyrillic_E* = 0x000006FC + XKc_Cyrillic_SHCHA* = 0x000006FD + XKc_Cyrillic_CHE* = 0x000006FE + XKc_Cyrillic_HARDSIGN* = 0x000006FF +# XK_CYRILLIC +#* +# * Greek +# * Byte 3 = 7 +# * + +when defined(XK_GREEK) or true: + const + XKc_Greek_ALPHAaccent* = 0x000007A1 + XKc_Greek_EPSILONaccent* = 0x000007A2 + XKc_Greek_ETAaccent* = 0x000007A3 + XKc_Greek_IOTAaccent* = 0x000007A4 + XKc_Greek_IOTAdieresis* = 0x000007A5 + XKc_Greek_IOTAdiaeresis* = XKc_Greek_IOTAdieresis # old typo + XKc_Greek_OMICRONaccent* = 0x000007A7 + XKc_Greek_UPSILONaccent* = 0x000007A8 + XKc_Greek_UPSILONdieresis* = 0x000007A9 + XKc_Greek_OMEGAaccent* = 0x000007AB + XK_Greek_accentdieresis* = 0x000007AE + XK_Greek_horizbar* = 0x000007AF + XK_Greek_alphaaccent* = 0x000007B1 + XK_Greek_epsilonaccent* = 0x000007B2 + XK_Greek_etaaccent* = 0x000007B3 + XK_Greek_iotaaccent* = 0x000007B4 + XK_Greek_iotadieresis* = 0x000007B5 + XK_Greek_iotaaccentdieresis* = 0x000007B6 + XK_Greek_omicronaccent* = 0x000007B7 + XK_Greek_upsilonaccent* = 0x000007B8 + XK_Greek_upsilondieresis* = 0x000007B9 + XK_Greek_upsilonaccentdieresis* = 0x000007BA + XK_Greek_omegaaccent* = 0x000007BB + XKc_Greek_ALPHA* = 0x000007C1 + XKc_Greek_BETA* = 0x000007C2 + XKc_Greek_GAMMA* = 0x000007C3 + XKc_Greek_DELTA* = 0x000007C4 + XKc_Greek_EPSILON* = 0x000007C5 + XKc_Greek_ZETA* = 0x000007C6 + XKc_Greek_ETA* = 0x000007C7 + XKc_Greek_THETA* = 0x000007C8 + XKc_Greek_IOTA* = 0x000007C9 + XKc_Greek_KAPPA* = 0x000007CA + XKc_Greek_LAMDA* = 0x000007CB + XKc_Greek_LAMBDA* = 0x000007CB + XKc_Greek_MU* = 0x000007CC + XKc_Greek_NU* = 0x000007CD + XKc_Greek_XI* = 0x000007CE + XKc_Greek_OMICRON* = 0x000007CF + XKc_Greek_PI* = 0x000007D0 + XKc_Greek_RHO* = 0x000007D1 + XKc_Greek_SIGMA* = 0x000007D2 + XKc_Greek_TAU* = 0x000007D4 + XKc_Greek_UPSILON* = 0x000007D5 + XKc_Greek_PHI* = 0x000007D6 + XKc_Greek_CHI* = 0x000007D7 + XKc_Greek_PSI* = 0x000007D8 + XKc_Greek_OMEGA* = 0x000007D9 + XK_Greek_alpha* = 0x000007E1 + XK_Greek_beta* = 0x000007E2 + XK_Greek_gamma* = 0x000007E3 + XK_Greek_delta* = 0x000007E4 + XK_Greek_epsilon* = 0x000007E5 + XK_Greek_zeta* = 0x000007E6 + XK_Greek_eta* = 0x000007E7 + XK_Greek_theta* = 0x000007E8 + XK_Greek_iota* = 0x000007E9 + XK_Greek_kappa* = 0x000007EA + XK_Greek_lamda* = 0x000007EB + XK_Greek_lambda* = 0x000007EB + XK_Greek_mu* = 0x000007EC + XK_Greek_nu* = 0x000007ED + XK_Greek_xi* = 0x000007EE + XK_Greek_omicron* = 0x000007EF + XK_Greek_pi* = 0x000007F0 + XK_Greek_rho* = 0x000007F1 + XK_Greek_sigma* = 0x000007F2 + XK_Greek_finalsmallsigma* = 0x000007F3 + XK_Greek_tau* = 0x000007F4 + XK_Greek_upsilon* = 0x000007F5 + XK_Greek_phi* = 0x000007F6 + XK_Greek_chi* = 0x000007F7 + XK_Greek_psi* = 0x000007F8 + XK_Greek_omega* = 0x000007F9 + XK_Greek_switch* = 0x0000FF7E # Alias for mode_switch +# XK_GREEK +#* +# * Technical +# * Byte 3 = 8 +# * + +when defined(XK_TECHNICAL) or true: + const + XK_leftradical* = 0x000008A1 + XK_topleftradical* = 0x000008A2 + XK_horizconnector* = 0x000008A3 + XK_topintegral* = 0x000008A4 + XK_botintegral* = 0x000008A5 + XK_vertconnector* = 0x000008A6 + XK_topleftsqbracket* = 0x000008A7 + XK_botleftsqbracket* = 0x000008A8 + XK_toprightsqbracket* = 0x000008A9 + XK_botrightsqbracket* = 0x000008AA + XK_topleftparens* = 0x000008AB + XK_botleftparens* = 0x000008AC + XK_toprightparens* = 0x000008AD + XK_botrightparens* = 0x000008AE + XK_leftmiddlecurlybrace* = 0x000008AF + XK_rightmiddlecurlybrace* = 0x000008B0 + XK_topleftsummation* = 0x000008B1 + XK_botleftsummation* = 0x000008B2 + XK_topvertsummationconnector* = 0x000008B3 + XK_botvertsummationconnector* = 0x000008B4 + XK_toprightsummation* = 0x000008B5 + XK_botrightsummation* = 0x000008B6 + XK_rightmiddlesummation* = 0x000008B7 + XK_lessthanequal* = 0x000008BC + XK_notequal* = 0x000008BD + XK_greaterthanequal* = 0x000008BE + XK_integral* = 0x000008BF + XK_therefore* = 0x000008C0 + XK_variation* = 0x000008C1 + XK_infinity* = 0x000008C2 + XK_nabla* = 0x000008C5 + XK_approximate* = 0x000008C8 + XK_similarequal* = 0x000008C9 + XK_ifonlyif* = 0x000008CD + XK_implies* = 0x000008CE + XK_identical* = 0x000008CF + XK_radical* = 0x000008D6 + XK_includedin* = 0x000008DA + XK_includes* = 0x000008DB + XK_intersection* = 0x000008DC + XK_union* = 0x000008DD + XK_logicaland* = 0x000008DE + XK_logicalor* = 0x000008DF + XK_partialderivative* = 0x000008EF + XK_function* = 0x000008F6 + XK_leftarrow* = 0x000008FB + XK_uparrow* = 0x000008FC + XK_rightarrow* = 0x000008FD + XK_downarrow* = 0x000008FE +# XK_TECHNICAL +#* +# * Special +# * Byte 3 = 9 +# * + +when defined(XK_SPECIAL): + const + XK_blank* = 0x000009DF + XK_soliddiamond* = 0x000009E0 + XK_checkerboard* = 0x000009E1 + XK_ht* = 0x000009E2 + XK_ff* = 0x000009E3 + XK_cr* = 0x000009E4 + XK_lf* = 0x000009E5 + XK_nl* = 0x000009E8 + XK_vt* = 0x000009E9 + XK_lowrightcorner* = 0x000009EA + XK_uprightcorner* = 0x000009EB + XK_upleftcorner* = 0x000009EC + XK_lowleftcorner* = 0x000009ED + XK_crossinglines* = 0x000009EE + XK_horizlinescan1* = 0x000009EF + XK_horizlinescan3* = 0x000009F0 + XK_horizlinescan5* = 0x000009F1 + XK_horizlinescan7* = 0x000009F2 + XK_horizlinescan9* = 0x000009F3 + XK_leftt* = 0x000009F4 + XK_rightt* = 0x000009F5 + XK_bott* = 0x000009F6 + XK_topt* = 0x000009F7 + XK_vertbar* = 0x000009F8 +# XK_SPECIAL +#* +# * Publishing +# * Byte 3 = a +# * + +when defined(XK_PUBLISHING) or true: + const + XK_emspace* = 0x00000AA1 + XK_enspace* = 0x00000AA2 + XK_em3space* = 0x00000AA3 + XK_em4space* = 0x00000AA4 + XK_digitspace* = 0x00000AA5 + XK_punctspace* = 0x00000AA6 + XK_thinspace* = 0x00000AA7 + XK_hairspace* = 0x00000AA8 + XK_emdash* = 0x00000AA9 + XK_endash* = 0x00000AAA + XK_signifblank* = 0x00000AAC + XK_ellipsis* = 0x00000AAE + XK_doubbaselinedot* = 0x00000AAF + XK_onethird* = 0x00000AB0 + XK_twothirds* = 0x00000AB1 + XK_onefifth* = 0x00000AB2 + XK_twofifths* = 0x00000AB3 + XK_threefifths* = 0x00000AB4 + XK_fourfifths* = 0x00000AB5 + XK_onesixth* = 0x00000AB6 + XK_fivesixths* = 0x00000AB7 + XK_careof* = 0x00000AB8 + XK_figdash* = 0x00000ABB + XK_leftanglebracket* = 0x00000ABC + XK_decimalpoint* = 0x00000ABD + XK_rightanglebracket* = 0x00000ABE + XK_marker* = 0x00000ABF + XK_oneeighth* = 0x00000AC3 + XK_threeeighths* = 0x00000AC4 + XK_fiveeighths* = 0x00000AC5 + XK_seveneighths* = 0x00000AC6 + XK_trademark* = 0x00000AC9 + XK_signaturemark* = 0x00000ACA + XK_trademarkincircle* = 0x00000ACB + XK_leftopentriangle* = 0x00000ACC + XK_rightopentriangle* = 0x00000ACD + XK_emopencircle* = 0x00000ACE + XK_emopenrectangle* = 0x00000ACF + XK_leftsinglequotemark* = 0x00000AD0 + XK_rightsinglequotemark* = 0x00000AD1 + XK_leftdoublequotemark* = 0x00000AD2 + XK_rightdoublequotemark* = 0x00000AD3 + XK_prescription* = 0x00000AD4 + XK_minutes* = 0x00000AD6 + XK_seconds* = 0x00000AD7 + XK_latincross* = 0x00000AD9 + XK_hexagram* = 0x00000ADA + XK_filledrectbullet* = 0x00000ADB + XK_filledlefttribullet* = 0x00000ADC + XK_filledrighttribullet* = 0x00000ADD + XK_emfilledcircle* = 0x00000ADE + XK_emfilledrect* = 0x00000ADF + XK_enopencircbullet* = 0x00000AE0 + XK_enopensquarebullet* = 0x00000AE1 + XK_openrectbullet* = 0x00000AE2 + XK_opentribulletup* = 0x00000AE3 + XK_opentribulletdown* = 0x00000AE4 + XK_openstar* = 0x00000AE5 + XK_enfilledcircbullet* = 0x00000AE6 + XK_enfilledsqbullet* = 0x00000AE7 + XK_filledtribulletup* = 0x00000AE8 + XK_filledtribulletdown* = 0x00000AE9 + XK_leftpointer* = 0x00000AEA + XK_rightpointer* = 0x00000AEB + XK_club* = 0x00000AEC + XK_diamond* = 0x00000AED + XK_heart* = 0x00000AEE + XK_maltesecross* = 0x00000AF0 + XK_dagger* = 0x00000AF1 + XK_doubledagger* = 0x00000AF2 + XK_checkmark* = 0x00000AF3 + XK_ballotcross* = 0x00000AF4 + XK_musicalsharp* = 0x00000AF5 + XK_musicalflat* = 0x00000AF6 + XK_malesymbol* = 0x00000AF7 + XK_femalesymbol* = 0x00000AF8 + XK_telephone* = 0x00000AF9 + XK_telephonerecorder* = 0x00000AFA + XK_phonographcopyright* = 0x00000AFB + XK_caret* = 0x00000AFC + XK_singlelowquotemark* = 0x00000AFD + XK_doublelowquotemark* = 0x00000AFE + XK_cursor* = 0x00000AFF +# XK_PUBLISHING +#* +# * APL +# * Byte 3 = b +# * + +when defined(XK_APL) or true: + const + XK_leftcaret* = 0x00000BA3 + XK_rightcaret* = 0x00000BA6 + XK_downcaret* = 0x00000BA8 + XK_upcaret* = 0x00000BA9 + XK_overbar* = 0x00000BC0 + XK_downtack* = 0x00000BC2 + XK_upshoe* = 0x00000BC3 + XK_downstile* = 0x00000BC4 + XK_underbar* = 0x00000BC6 + XK_jot* = 0x00000BCA + XK_quad* = 0x00000BCC + XK_uptack* = 0x00000BCE + XK_circle* = 0x00000BCF + XK_upstile* = 0x00000BD3 + XK_downshoe* = 0x00000BD6 + XK_rightshoe* = 0x00000BD8 + XK_leftshoe* = 0x00000BDA + XK_lefttack* = 0x00000BDC + XK_righttack* = 0x00000BFC +# XK_APL +#* +# * Hebrew +# * Byte 3 = c +# * + +when defined(XK_HEBREW) or true: + const + XK_hebrew_doublelowline* = 0x00000CDF + XK_hebrew_aleph* = 0x00000CE0 + XK_hebrew_bet* = 0x00000CE1 + XK_hebrew_beth* = 0x00000CE1 # deprecated + XK_hebrew_gimel* = 0x00000CE2 + XK_hebrew_gimmel* = 0x00000CE2 # deprecated + XK_hebrew_dalet* = 0x00000CE3 + XK_hebrew_daleth* = 0x00000CE3 # deprecated + XK_hebrew_he* = 0x00000CE4 + XK_hebrew_waw* = 0x00000CE5 + XK_hebrew_zain* = 0x00000CE6 + XK_hebrew_zayin* = 0x00000CE6 # deprecated + XK_hebrew_chet* = 0x00000CE7 + XK_hebrew_het* = 0x00000CE7 # deprecated + XK_hebrew_tet* = 0x00000CE8 + XK_hebrew_teth* = 0x00000CE8 # deprecated + XK_hebrew_yod* = 0x00000CE9 + XK_hebrew_finalkaph* = 0x00000CEA + XK_hebrew_kaph* = 0x00000CEB + XK_hebrew_lamed* = 0x00000CEC + XK_hebrew_finalmem* = 0x00000CED + XK_hebrew_mem* = 0x00000CEE + XK_hebrew_finalnun* = 0x00000CEF + XK_hebrew_nun* = 0x00000CF0 + XK_hebrew_samech* = 0x00000CF1 + XK_hebrew_samekh* = 0x00000CF1 # deprecated + XK_hebrew_ayin* = 0x00000CF2 + XK_hebrew_finalpe* = 0x00000CF3 + XK_hebrew_pe* = 0x00000CF4 + XK_hebrew_finalzade* = 0x00000CF5 + XK_hebrew_finalzadi* = 0x00000CF5 # deprecated + XK_hebrew_zade* = 0x00000CF6 + XK_hebrew_zadi* = 0x00000CF6 # deprecated + XK_hebrew_qoph* = 0x00000CF7 + XK_hebrew_kuf* = 0x00000CF7 # deprecated + XK_hebrew_resh* = 0x00000CF8 + XK_hebrew_shin* = 0x00000CF9 + XK_hebrew_taw* = 0x00000CFA + XK_hebrew_taf* = 0x00000CFA # deprecated + XK_Hebrew_switch* = 0x0000FF7E # Alias for mode_switch +# XK_HEBREW +#* +# * Thai +# * Byte 3 = d +# * + +when defined(XK_THAI) or true: + const + XK_Thai_kokai* = 0x00000DA1 + XK_Thai_khokhai* = 0x00000DA2 + XK_Thai_khokhuat* = 0x00000DA3 + XK_Thai_khokhwai* = 0x00000DA4 + XK_Thai_khokhon* = 0x00000DA5 + XK_Thai_khorakhang* = 0x00000DA6 + XK_Thai_ngongu* = 0x00000DA7 + XK_Thai_chochan* = 0x00000DA8 + XK_Thai_choching* = 0x00000DA9 + XK_Thai_chochang* = 0x00000DAA + XK_Thai_soso* = 0x00000DAB + XK_Thai_chochoe* = 0x00000DAC + XK_Thai_yoying* = 0x00000DAD + XK_Thai_dochada* = 0x00000DAE + XK_Thai_topatak* = 0x00000DAF + XK_Thai_thothan* = 0x00000DB0 + XK_Thai_thonangmontho* = 0x00000DB1 + XK_Thai_thophuthao* = 0x00000DB2 + XK_Thai_nonen* = 0x00000DB3 + XK_Thai_dodek* = 0x00000DB4 + XK_Thai_totao* = 0x00000DB5 + XK_Thai_thothung* = 0x00000DB6 + XK_Thai_thothahan* = 0x00000DB7 + XK_Thai_thothong* = 0x00000DB8 + XK_Thai_nonu* = 0x00000DB9 + XK_Thai_bobaimai* = 0x00000DBA + XK_Thai_popla* = 0x00000DBB + XK_Thai_phophung* = 0x00000DBC + XK_Thai_fofa* = 0x00000DBD + XK_Thai_phophan* = 0x00000DBE + XK_Thai_fofan* = 0x00000DBF + XK_Thai_phosamphao* = 0x00000DC0 + XK_Thai_moma* = 0x00000DC1 + XK_Thai_yoyak* = 0x00000DC2 + XK_Thai_rorua* = 0x00000DC3 + XK_Thai_ru* = 0x00000DC4 + XK_Thai_loling* = 0x00000DC5 + XK_Thai_lu* = 0x00000DC6 + XK_Thai_wowaen* = 0x00000DC7 + XK_Thai_sosala* = 0x00000DC8 + XK_Thai_sorusi* = 0x00000DC9 + XK_Thai_sosua* = 0x00000DCA + XK_Thai_hohip* = 0x00000DCB + XK_Thai_lochula* = 0x00000DCC + XK_Thai_oang* = 0x00000DCD + XK_Thai_honokhuk* = 0x00000DCE + XK_Thai_paiyannoi* = 0x00000DCF + XK_Thai_saraa* = 0x00000DD0 + XK_Thai_maihanakat* = 0x00000DD1 + XK_Thai_saraaa* = 0x00000DD2 + XK_Thai_saraam* = 0x00000DD3 + XK_Thai_sarai* = 0x00000DD4 + XK_Thai_saraii* = 0x00000DD5 + XK_Thai_saraue* = 0x00000DD6 + XK_Thai_sarauee* = 0x00000DD7 + XK_Thai_sarau* = 0x00000DD8 + XK_Thai_sarauu* = 0x00000DD9 + XK_Thai_phinthu* = 0x00000DDA + XK_Thai_maihanakat_maitho* = 0x00000DDE + XK_Thai_baht* = 0x00000DDF + XK_Thai_sarae* = 0x00000DE0 + XK_Thai_saraae* = 0x00000DE1 + XK_Thai_sarao* = 0x00000DE2 + XK_Thai_saraaimaimuan* = 0x00000DE3 + XK_Thai_saraaimaimalai* = 0x00000DE4 + XK_Thai_lakkhangyao* = 0x00000DE5 + XK_Thai_maiyamok* = 0x00000DE6 + XK_Thai_maitaikhu* = 0x00000DE7 + XK_Thai_maiek* = 0x00000DE8 + XK_Thai_maitho* = 0x00000DE9 + XK_Thai_maitri* = 0x00000DEA + XK_Thai_maichattawa* = 0x00000DEB + XK_Thai_thanthakhat* = 0x00000DEC + XK_Thai_nikhahit* = 0x00000DED + XK_Thai_leksun* = 0x00000DF0 + XK_Thai_leknung* = 0x00000DF1 + XK_Thai_leksong* = 0x00000DF2 + XK_Thai_leksam* = 0x00000DF3 + XK_Thai_leksi* = 0x00000DF4 + XK_Thai_lekha* = 0x00000DF5 + XK_Thai_lekhok* = 0x00000DF6 + XK_Thai_lekchet* = 0x00000DF7 + XK_Thai_lekpaet* = 0x00000DF8 + XK_Thai_lekkao* = 0x00000DF9 +# XK_THAI +#* +# * Korean +# * Byte 3 = e +# * + +when defined(XK_KOREAN) or true: + const + XK_Hangul* = 0x0000FF31 # Hangul start/stop(toggle) + XK_Hangul_Start* = 0x0000FF32 # Hangul start + XK_Hangul_End* = 0x0000FF33 # Hangul end, English start + XK_Hangul_Hanja* = 0x0000FF34 # Start Hangul->Hanja Conversion + XK_Hangul_Jamo* = 0x0000FF35 # Hangul Jamo mode + XK_Hangul_Romaja* = 0x0000FF36 # Hangul Romaja mode + XK_Hangul_Codeinput* = 0x0000FF37 # Hangul code input mode + XK_Hangul_Jeonja* = 0x0000FF38 # Jeonja mode + XK_Hangul_Banja* = 0x0000FF39 # Banja mode + XK_Hangul_PreHanja* = 0x0000FF3A # Pre Hanja conversion + XK_Hangul_PostHanja* = 0x0000FF3B # Post Hanja conversion + XK_Hangul_SingleCandidate* = 0x0000FF3C # Single candidate + XK_Hangul_MultipleCandidate* = 0x0000FF3D # Multiple candidate + XK_Hangul_PreviousCandidate* = 0x0000FF3E # Previous candidate + XK_Hangul_Special* = 0x0000FF3F # Special symbols + XK_Hangul_switch* = 0x0000FF7E # Alias for mode_switch + # Hangul Consonant Characters + XK_Hangul_Kiyeog* = 0x00000EA1 + XK_Hangul_SsangKiyeog* = 0x00000EA2 + XK_Hangul_KiyeogSios* = 0x00000EA3 + XK_Hangul_Nieun* = 0x00000EA4 + XK_Hangul_NieunJieuj* = 0x00000EA5 + XK_Hangul_NieunHieuh* = 0x00000EA6 + XK_Hangul_Dikeud* = 0x00000EA7 + XK_Hangul_SsangDikeud* = 0x00000EA8 + XK_Hangul_Rieul* = 0x00000EA9 + XK_Hangul_RieulKiyeog* = 0x00000EAA + XK_Hangul_RieulMieum* = 0x00000EAB + XK_Hangul_RieulPieub* = 0x00000EAC + XK_Hangul_RieulSios* = 0x00000EAD + XK_Hangul_RieulTieut* = 0x00000EAE + XK_Hangul_RieulPhieuf* = 0x00000EAF + XK_Hangul_RieulHieuh* = 0x00000EB0 + XK_Hangul_Mieum* = 0x00000EB1 + XK_Hangul_Pieub* = 0x00000EB2 + XK_Hangul_SsangPieub* = 0x00000EB3 + XK_Hangul_PieubSios* = 0x00000EB4 + XK_Hangul_Sios* = 0x00000EB5 + XK_Hangul_SsangSios* = 0x00000EB6 + XK_Hangul_Ieung* = 0x00000EB7 + XK_Hangul_Jieuj* = 0x00000EB8 + XK_Hangul_SsangJieuj* = 0x00000EB9 + XK_Hangul_Cieuc* = 0x00000EBA + XK_Hangul_Khieuq* = 0x00000EBB + XK_Hangul_Tieut* = 0x00000EBC + XK_Hangul_Phieuf* = 0x00000EBD + XK_Hangul_Hieuh* = 0x00000EBE # Hangul Vowel Characters + XK_Hangul_A* = 0x00000EBF + XK_Hangul_AE* = 0x00000EC0 + XK_Hangul_YA* = 0x00000EC1 + XK_Hangul_YAE* = 0x00000EC2 + XK_Hangul_EO* = 0x00000EC3 + XK_Hangul_E* = 0x00000EC4 + XK_Hangul_YEO* = 0x00000EC5 + XK_Hangul_YE* = 0x00000EC6 + XK_Hangul_O* = 0x00000EC7 + XK_Hangul_WA* = 0x00000EC8 + XK_Hangul_WAE* = 0x00000EC9 + XK_Hangul_OE* = 0x00000ECA + XK_Hangul_YO* = 0x00000ECB + XK_Hangul_U* = 0x00000ECC + XK_Hangul_WEO* = 0x00000ECD + XK_Hangul_WE* = 0x00000ECE + XK_Hangul_WI* = 0x00000ECF + XK_Hangul_YU* = 0x00000ED0 + XK_Hangul_EU* = 0x00000ED1 + XK_Hangul_YI* = 0x00000ED2 + XK_Hangul_I* = 0x00000ED3 # Hangul syllable-final (JongSeong) Characters + XK_Hangul_J_Kiyeog* = 0x00000ED4 + XK_Hangul_J_SsangKiyeog* = 0x00000ED5 + XK_Hangul_J_KiyeogSios* = 0x00000ED6 + XK_Hangul_J_Nieun* = 0x00000ED7 + XK_Hangul_J_NieunJieuj* = 0x00000ED8 + XK_Hangul_J_NieunHieuh* = 0x00000ED9 + XK_Hangul_J_Dikeud* = 0x00000EDA + XK_Hangul_J_Rieul* = 0x00000EDB + XK_Hangul_J_RieulKiyeog* = 0x00000EDC + XK_Hangul_J_RieulMieum* = 0x00000EDD + XK_Hangul_J_RieulPieub* = 0x00000EDE + XK_Hangul_J_RieulSios* = 0x00000EDF + XK_Hangul_J_RieulTieut* = 0x00000EE0 + XK_Hangul_J_RieulPhieuf* = 0x00000EE1 + XK_Hangul_J_RieulHieuh* = 0x00000EE2 + XK_Hangul_J_Mieum* = 0x00000EE3 + XK_Hangul_J_Pieub* = 0x00000EE4 + XK_Hangul_J_PieubSios* = 0x00000EE5 + XK_Hangul_J_Sios* = 0x00000EE6 + XK_Hangul_J_SsangSios* = 0x00000EE7 + XK_Hangul_J_Ieung* = 0x00000EE8 + XK_Hangul_J_Jieuj* = 0x00000EE9 + XK_Hangul_J_Cieuc* = 0x00000EEA + XK_Hangul_J_Khieuq* = 0x00000EEB + XK_Hangul_J_Tieut* = 0x00000EEC + XK_Hangul_J_Phieuf* = 0x00000EED + XK_Hangul_J_Hieuh* = 0x00000EEE # Ancient Hangul Consonant Characters + XK_Hangul_RieulYeorinHieuh* = 0x00000EEF + XK_Hangul_SunkyeongeumMieum* = 0x00000EF0 + XK_Hangul_SunkyeongeumPieub* = 0x00000EF1 + XK_Hangul_PanSios* = 0x00000EF2 + XK_Hangul_KkogjiDalrinIeung* = 0x00000EF3 + XK_Hangul_SunkyeongeumPhieuf* = 0x00000EF4 + XK_Hangul_YeorinHieuh* = 0x00000EF5 # Ancient Hangul Vowel Characters + XK_Hangul_AraeA* = 0x00000EF6 + XK_Hangul_AraeAE* = 0x00000EF7 # Ancient Hangul syllable-final (JongSeong) Characters + XK_Hangul_J_PanSios* = 0x00000EF8 + XK_Hangul_J_KkogjiDalrinIeung* = 0x00000EF9 + XK_Hangul_J_YeorinHieuh* = 0x00000EFA # Korean currency symbol + XK_Korean_Won* = 0x00000EFF +# XK_KOREAN +#* +# * Armenian +# * Byte 3 = = $14 +# * + +when defined(XK_ARMENIAN) or true: + const + XK_Armenian_eternity* = 0x000014A1 + XK_Armenian_ligature_ew* = 0x000014A2 + XK_Armenian_full_stop* = 0x000014A3 + XK_Armenian_verjaket* = 0x000014A3 + XK_Armenian_parenright* = 0x000014A4 + XK_Armenian_parenleft* = 0x000014A5 + XK_Armenian_guillemotright* = 0x000014A6 + XK_Armenian_guillemotleft* = 0x000014A7 + XK_Armenian_em_dash* = 0x000014A8 + XK_Armenian_dot* = 0x000014A9 + XK_Armenian_mijaket* = 0x000014A9 + XK_Armenian_separation_mark* = 0x000014AA + XK_Armenian_but* = 0x000014AA + XK_Armenian_comma* = 0x000014AB + XK_Armenian_en_dash* = 0x000014AC + XK_Armenian_hyphen* = 0x000014AD + XK_Armenian_yentamna* = 0x000014AD + XK_Armenian_ellipsis* = 0x000014AE + XK_Armenian_exclam* = 0x000014AF + XK_Armenian_amanak* = 0x000014AF + XK_Armenian_accent* = 0x000014B0 + XK_Armenian_shesht* = 0x000014B0 + XK_Armenian_question* = 0x000014B1 + XK_Armenian_paruyk* = 0x000014B1 + XKc_Armenian_AYB* = 0x000014B2 + XK_Armenian_ayb* = 0x000014B3 + XKc_Armenian_BEN* = 0x000014B4 + XK_Armenian_ben* = 0x000014B5 + XKc_Armenian_GIM* = 0x000014B6 + XK_Armenian_gim* = 0x000014B7 + XKc_Armenian_DA* = 0x000014B8 + XK_Armenian_da* = 0x000014B9 + XKc_Armenian_YECH* = 0x000014BA + XK_Armenian_yech* = 0x000014BB + XKc_Armenian_ZA* = 0x000014BC + XK_Armenian_za* = 0x000014BD + XKc_Armenian_E* = 0x000014BE + XK_Armenian_e* = 0x000014BF + XKc_Armenian_AT* = 0x000014C0 + XK_Armenian_at* = 0x000014C1 + XKc_Armenian_TO* = 0x000014C2 + XK_Armenian_to* = 0x000014C3 + XKc_Armenian_ZHE* = 0x000014C4 + XK_Armenian_zhe* = 0x000014C5 + XKc_Armenian_INI* = 0x000014C6 + XK_Armenian_ini* = 0x000014C7 + XKc_Armenian_LYUN* = 0x000014C8 + XK_Armenian_lyun* = 0x000014C9 + XKc_Armenian_KHE* = 0x000014CA + XK_Armenian_khe* = 0x000014CB + XKc_Armenian_TSA* = 0x000014CC + XK_Armenian_tsa* = 0x000014CD + XKc_Armenian_KEN* = 0x000014CE + XK_Armenian_ken* = 0x000014CF + XKc_Armenian_HO* = 0x000014D0 + XK_Armenian_ho* = 0x000014D1 + XKc_Armenian_DZA* = 0x000014D2 + XK_Armenian_dza* = 0x000014D3 + XKc_Armenian_GHAT* = 0x000014D4 + XK_Armenian_ghat* = 0x000014D5 + XKc_Armenian_TCHE* = 0x000014D6 + XK_Armenian_tche* = 0x000014D7 + XKc_Armenian_MEN* = 0x000014D8 + XK_Armenian_men* = 0x000014D9 + XKc_Armenian_HI* = 0x000014DA + XK_Armenian_hi* = 0x000014DB + XKc_Armenian_NU* = 0x000014DC + XK_Armenian_nu* = 0x000014DD + XKc_Armenian_SHA* = 0x000014DE + XK_Armenian_sha* = 0x000014DF + XKc_Armenian_VO* = 0x000014E0 + XK_Armenian_vo* = 0x000014E1 + XKc_Armenian_CHA* = 0x000014E2 + XK_Armenian_cha* = 0x000014E3 + XKc_Armenian_PE* = 0x000014E4 + XK_Armenian_pe* = 0x000014E5 + XKc_Armenian_JE* = 0x000014E6 + XK_Armenian_je* = 0x000014E7 + XKc_Armenian_RA* = 0x000014E8 + XK_Armenian_ra* = 0x000014E9 + XKc_Armenian_SE* = 0x000014EA + XK_Armenian_se* = 0x000014EB + XKc_Armenian_VEV* = 0x000014EC + XK_Armenian_vev* = 0x000014ED + XKc_Armenian_TYUN* = 0x000014EE + XK_Armenian_tyun* = 0x000014EF + XKc_Armenian_RE* = 0x000014F0 + XK_Armenian_re* = 0x000014F1 + XKc_Armenian_TSO* = 0x000014F2 + XK_Armenian_tso* = 0x000014F3 + XKc_Armenian_VYUN* = 0x000014F4 + XK_Armenian_vyun* = 0x000014F5 + XKc_Armenian_PYUR* = 0x000014F6 + XK_Armenian_pyur* = 0x000014F7 + XKc_Armenian_KE* = 0x000014F8 + XK_Armenian_ke* = 0x000014F9 + XKc_Armenian_O* = 0x000014FA + XK_Armenian_o* = 0x000014FB + XKc_Armenian_FE* = 0x000014FC + XK_Armenian_fe* = 0x000014FD + XK_Armenian_apostrophe* = 0x000014FE + XK_Armenian_section_sign* = 0x000014FF +# XK_ARMENIAN +#* +# * Georgian +# * Byte 3 = = $15 +# * + +when defined(XK_GEORGIAN) or true: + const + XK_Georgian_an* = 0x000015D0 + XK_Georgian_ban* = 0x000015D1 + XK_Georgian_gan* = 0x000015D2 + XK_Georgian_don* = 0x000015D3 + XK_Georgian_en* = 0x000015D4 + XK_Georgian_vin* = 0x000015D5 + XK_Georgian_zen* = 0x000015D6 + XK_Georgian_tan* = 0x000015D7 + XK_Georgian_in* = 0x000015D8 + XK_Georgian_kan* = 0x000015D9 + XK_Georgian_las* = 0x000015DA + XK_Georgian_man* = 0x000015DB + XK_Georgian_nar* = 0x000015DC + XK_Georgian_on* = 0x000015DD + XK_Georgian_par* = 0x000015DE + XK_Georgian_zhar* = 0x000015DF + XK_Georgian_rae* = 0x000015E0 + XK_Georgian_san* = 0x000015E1 + XK_Georgian_tar* = 0x000015E2 + XK_Georgian_un* = 0x000015E3 + XK_Georgian_phar* = 0x000015E4 + XK_Georgian_khar* = 0x000015E5 + XK_Georgian_ghan* = 0x000015E6 + XK_Georgian_qar* = 0x000015E7 + XK_Georgian_shin* = 0x000015E8 + XK_Georgian_chin* = 0x000015E9 + XK_Georgian_can* = 0x000015EA + XK_Georgian_jil* = 0x000015EB + XK_Georgian_cil* = 0x000015EC + XK_Georgian_char* = 0x000015ED + XK_Georgian_xan* = 0x000015EE + XK_Georgian_jhan* = 0x000015EF + XK_Georgian_hae* = 0x000015F0 + XK_Georgian_he* = 0x000015F1 + XK_Georgian_hie* = 0x000015F2 + XK_Georgian_we* = 0x000015F3 + XK_Georgian_har* = 0x000015F4 + XK_Georgian_hoe* = 0x000015F5 + XK_Georgian_fi* = 0x000015F6 +# XK_GEORGIAN +#* +# * Azeri (and other Turkic or Caucasian languages of ex-USSR) +# * Byte 3 = = $16 +# * + +when defined(XK_CAUCASUS) or true: + # latin + const + XKc_Ccedillaabovedot* = 0x000016A2 + XKc_Xabovedot* = 0x000016A3 + XKc_Qabovedot* = 0x000016A5 + XKc_Ibreve* = 0x000016A6 + XKc_IE* = 0x000016A7 + XKc_UO* = 0x000016A8 + XKc_Zstroke* = 0x000016A9 + XKc_Gcaron* = 0x000016AA + XKc_Obarred* = 0x000016AF + XK_ccedillaabovedot* = 0x000016B2 + XK_xabovedot* = 0x000016B3 + XKc_Ocaron* = 0x000016B4 + XK_qabovedot* = 0x000016B5 + XK_ibreve* = 0x000016B6 + XK_ie* = 0x000016B7 + XK_uo* = 0x000016B8 + XK_zstroke* = 0x000016B9 + XK_gcaron* = 0x000016BA + XK_ocaron* = 0x000016BD + XK_obarred* = 0x000016BF + XKc_SCHWA* = 0x000016C6 + XK_schwa* = 0x000016F6 # those are not really Caucasus, but I put them here for now + # For Inupiak + XKc_Lbelowdot* = 0x000016D1 + XKc_Lstrokebelowdot* = 0x000016D2 + XK_lbelowdot* = 0x000016E1 + XK_lstrokebelowdot* = 0x000016E2 # For Guarani + XKc_Gtilde* = 0x000016D3 + XK_gtilde* = 0x000016E3 +# XK_CAUCASUS +#* +# * Vietnamese +# * Byte 3 = = $1e +# * + +when defined(XK_VIETNAMESE) or true: + const + XKc_Abelowdot* = 0x00001EA0 + XK_abelowdot* = 0x00001EA1 + XKc_Ahook* = 0x00001EA2 + XK_ahook* = 0x00001EA3 + XKc_Acircumflexacute* = 0x00001EA4 + XK_acircumflexacute* = 0x00001EA5 + XKc_Acircumflexgrave* = 0x00001EA6 + XK_acircumflexgrave* = 0x00001EA7 + XKc_Acircumflexhook* = 0x00001EA8 + XK_acircumflexhook* = 0x00001EA9 + XKc_Acircumflextilde* = 0x00001EAA + XK_acircumflextilde* = 0x00001EAB + XKc_Acircumflexbelowdot* = 0x00001EAC + XK_acircumflexbelowdot* = 0x00001EAD + XKc_Abreveacute* = 0x00001EAE + XK_abreveacute* = 0x00001EAF + XKc_Abrevegrave* = 0x00001EB0 + XK_abrevegrave* = 0x00001EB1 + XKc_Abrevehook* = 0x00001EB2 + XK_abrevehook* = 0x00001EB3 + XKc_Abrevetilde* = 0x00001EB4 + XK_abrevetilde* = 0x00001EB5 + XKc_Abrevebelowdot* = 0x00001EB6 + XK_abrevebelowdot* = 0x00001EB7 + XKc_Ebelowdot* = 0x00001EB8 + XK_ebelowdot* = 0x00001EB9 + XKc_Ehook* = 0x00001EBA + XK_ehook* = 0x00001EBB + XKc_Etilde* = 0x00001EBC + XK_etilde* = 0x00001EBD + XKc_Ecircumflexacute* = 0x00001EBE + XK_ecircumflexacute* = 0x00001EBF + XKc_Ecircumflexgrave* = 0x00001EC0 + XK_ecircumflexgrave* = 0x00001EC1 + XKc_Ecircumflexhook* = 0x00001EC2 + XK_ecircumflexhook* = 0x00001EC3 + XKc_Ecircumflextilde* = 0x00001EC4 + XK_ecircumflextilde* = 0x00001EC5 + XKc_Ecircumflexbelowdot* = 0x00001EC6 + XK_ecircumflexbelowdot* = 0x00001EC7 + XKc_Ihook* = 0x00001EC8 + XK_ihook* = 0x00001EC9 + XKc_Ibelowdot* = 0x00001ECA + XK_ibelowdot* = 0x00001ECB + XKc_Obelowdot* = 0x00001ECC + XK_obelowdot* = 0x00001ECD + XKc_Ohook* = 0x00001ECE + XK_ohook* = 0x00001ECF + XKc_Ocircumflexacute* = 0x00001ED0 + XK_ocircumflexacute* = 0x00001ED1 + XKc_Ocircumflexgrave* = 0x00001ED2 + XK_ocircumflexgrave* = 0x00001ED3 + XKc_Ocircumflexhook* = 0x00001ED4 + XK_ocircumflexhook* = 0x00001ED5 + XKc_Ocircumflextilde* = 0x00001ED6 + XK_ocircumflextilde* = 0x00001ED7 + XKc_Ocircumflexbelowdot* = 0x00001ED8 + XK_ocircumflexbelowdot* = 0x00001ED9 + XKc_Ohornacute* = 0x00001EDA + XK_ohornacute* = 0x00001EDB + XKc_Ohorngrave* = 0x00001EDC + XK_ohorngrave* = 0x00001EDD + XKc_Ohornhook* = 0x00001EDE + XK_ohornhook* = 0x00001EDF + XKc_Ohorntilde* = 0x00001EE0 + XK_ohorntilde* = 0x00001EE1 + XKc_Ohornbelowdot* = 0x00001EE2 + XK_ohornbelowdot* = 0x00001EE3 + XKc_Ubelowdot* = 0x00001EE4 + XK_ubelowdot* = 0x00001EE5 + XKc_Uhook* = 0x00001EE6 + XK_uhook* = 0x00001EE7 + XKc_Uhornacute* = 0x00001EE8 + XK_uhornacute* = 0x00001EE9 + XKc_Uhorngrave* = 0x00001EEA + XK_uhorngrave* = 0x00001EEB + XKc_Uhornhook* = 0x00001EEC + XK_uhornhook* = 0x00001EED + XKc_Uhorntilde* = 0x00001EEE + XK_uhorntilde* = 0x00001EEF + XKc_Uhornbelowdot* = 0x00001EF0 + XK_uhornbelowdot* = 0x00001EF1 + XKc_Ybelowdot* = 0x00001EF4 + XK_ybelowdot* = 0x00001EF5 + XKc_Yhook* = 0x00001EF6 + XK_yhook* = 0x00001EF7 + XKc_Ytilde* = 0x00001EF8 + XK_ytilde* = 0x00001EF9 + XKc_Ohorn* = 0x00001EFA # U+01a0 + XK_ohorn* = 0x00001EFB # U+01a1 + XKc_Uhorn* = 0x00001EFC # U+01af + XK_uhorn* = 0x00001EFD # U+01b0 + XK_combining_tilde* = 0x00001E9F # U+0303 + XK_combining_grave* = 0x00001EF2 # U+0300 + XK_combining_acute* = 0x00001EF3 # U+0301 + XK_combining_hook* = 0x00001EFE # U+0309 + XK_combining_belowdot* = 0x00001EFF # U+0323 +# XK_VIETNAMESE + +when defined(XK_CURRENCY) or true: + const + XK_EcuSign* = 0x000020A0 + XK_ColonSign* = 0x000020A1 + XK_CruzeiroSign* = 0x000020A2 + XK_FFrancSign* = 0x000020A3 + XK_LiraSign* = 0x000020A4 + XK_MillSign* = 0x000020A5 + XK_NairaSign* = 0x000020A6 + XK_PesetaSign* = 0x000020A7 + XK_RupeeSign* = 0x000020A8 + XK_WonSign* = 0x000020A9 + XK_NewSheqelSign* = 0x000020AA + XK_DongSign* = 0x000020AB + XK_EuroSign* = 0x000020AC +# implementation diff --git a/lib/oldwrappers/x11/x.nim b/lib/oldwrappers/x11/x.nim new file mode 100644 index 000000000..aa6e7f821 --- /dev/null +++ b/lib/oldwrappers/x11/x.nim @@ -0,0 +1,399 @@ + +# +# Automatically converted by H2Pas 0.99.15 from x.h +# The following command line parameters were used: +# -p +# -T +# -S +# -d +# -c +# x.h +# +# Pointers to basic pascal types, inserted by h2pas conversion program. + +const + X_PROTOCOL* = 11 + X_PROTOCOL_REVISION* = 0 + +type + culong* = int + cuchar* = char + PXID* = ptr TXID + TXID* = culong + PMask* = ptr TMask + TMask* = culong + PPAtom* = ptr PAtom + PAtom* = ptr TAtom + TAtom* = culong + PVisualID* = ptr TVisualID + TVisualID* = culong + PTime* = ptr TTime + TTime* = culong + PPWindow* = ptr PWindow + PWindow* = ptr TWindow + TWindow* = TXID + PDrawable* = ptr TDrawable + TDrawable* = TXID + PFont* = ptr TFont + TFont* = TXID + PPixmap* = ptr TPixmap + TPixmap* = TXID + PCursor* = ptr TCursor + TCursor* = TXID + PColormap* = ptr TColormap + TColormap* = TXID + PGContext* = ptr TGContext + TGContext* = TXID + PKeySym* = ptr TKeySym + TKeySym* = TXID + PKeyCode* = ptr TKeyCode + TKeyCode* = cuchar + +const + None* = 0 + ParentRelative* = 1 + CopyFromParent* = 0 + PointerWindow* = 0 + InputFocus* = 1 + PointerRoot* = 1 + AnyPropertyType* = 0 + AnyKey* = 0 + AnyButton* = 0 + AllTemporary* = 0 + CurrentTime* = 0 + NoSymbol* = 0 + NoEventMask* = 0 + KeyPressMask* = 1 shl 0 + KeyReleaseMask* = 1 shl 1 + ButtonPressMask* = 1 shl 2 + ButtonReleaseMask* = 1 shl 3 + EnterWindowMask* = 1 shl 4 + LeaveWindowMask* = 1 shl 5 + PointerMotionMask* = 1 shl 6 + PointerMotionHintMask* = 1 shl 7 + Button1MotionMask* = 1 shl 8 + Button2MotionMask* = 1 shl 9 + Button3MotionMask* = 1 shl 10 + Button4MotionMask* = 1 shl 11 + Button5MotionMask* = 1 shl 12 + ButtonMotionMask* = 1 shl 13 + KeymapStateMask* = 1 shl 14 + ExposureMask* = 1 shl 15 + VisibilityChangeMask* = 1 shl 16 + StructureNotifyMask* = 1 shl 17 + ResizeRedirectMask* = 1 shl 18 + SubstructureNotifyMask* = 1 shl 19 + SubstructureRedirectMask* = 1 shl 20 + FocusChangeMask* = 1 shl 21 + PropertyChangeMask* = 1 shl 22 + ColormapChangeMask* = 1 shl 23 + OwnerGrabButtonMask* = 1 shl 24 + KeyPress* = 2 + KeyRelease* = 3 + ButtonPress* = 4 + ButtonRelease* = 5 + MotionNotify* = 6 + EnterNotify* = 7 + LeaveNotify* = 8 + FocusIn* = 9 + FocusOut* = 10 + KeymapNotify* = 11 + Expose* = 12 + GraphicsExpose* = 13 + NoExpose* = 14 + VisibilityNotify* = 15 + CreateNotify* = 16 + DestroyNotify* = 17 + UnmapNotify* = 18 + MapNotify* = 19 + MapRequest* = 20 + ReparentNotify* = 21 + ConfigureNotify* = 22 + ConfigureRequest* = 23 + GravityNotify* = 24 + ResizeRequest* = 25 + CirculateNotify* = 26 + CirculateRequest* = 27 + PropertyNotify* = 28 + SelectionClear* = 29 + SelectionRequest* = 30 + SelectionNotify* = 31 + ColormapNotify* = 32 + ClientMessage* = 33 + MappingNotify* = 34 + LASTEvent* = 35 + ShiftMask* = 1 shl 0 + LockMask* = 1 shl 1 + ControlMask* = 1 shl 2 + Mod1Mask* = 1 shl 3 + Mod2Mask* = 1 shl 4 + Mod3Mask* = 1 shl 5 + Mod4Mask* = 1 shl 6 + Mod5Mask* = 1 shl 7 + ShiftMapIndex* = 0 + LockMapIndex* = 1 + ControlMapIndex* = 2 + Mod1MapIndex* = 3 + Mod2MapIndex* = 4 + Mod3MapIndex* = 5 + Mod4MapIndex* = 6 + Mod5MapIndex* = 7 + Button1Mask* = 1 shl 8 + Button2Mask* = 1 shl 9 + Button3Mask* = 1 shl 10 + Button4Mask* = 1 shl 11 + Button5Mask* = 1 shl 12 + AnyModifier* = 1 shl 15 + Button1* = 1 + Button2* = 2 + Button3* = 3 + Button4* = 4 + Button5* = 5 + NotifyNormal* = 0 + NotifyGrab* = 1 + NotifyUngrab* = 2 + NotifyWhileGrabbed* = 3 + NotifyHint* = 1 + NotifyAncestor* = 0 + NotifyVirtual* = 1 + NotifyInferior* = 2 + NotifyNonlinear* = 3 + NotifyNonlinearVirtual* = 4 + NotifyPointer* = 5 + NotifyPointerRoot* = 6 + NotifyDetailNone* = 7 + VisibilityUnobscured* = 0 + VisibilityPartiallyObscured* = 1 + VisibilityFullyObscured* = 2 + PlaceOnTop* = 0 + PlaceOnBottom* = 1 + FamilyInternet* = 0 + FamilyDECnet* = 1 + FamilyChaos* = 2 + FamilyInternet6* = 6 + FamilyServerInterpreted* = 5 + PropertyNewValue* = 0 + PropertyDelete* = 1 + ColormapUninstalled* = 0 + ColormapInstalled* = 1 + GrabModeSync* = 0 + GrabModeAsync* = 1 + GrabSuccess* = 0 + AlreadyGrabbed* = 1 + GrabInvalidTime* = 2 + GrabNotViewable* = 3 + GrabFrozen* = 4 + AsyncPointer* = 0 + SyncPointer* = 1 + ReplayPointer* = 2 + AsyncKeyboard* = 3 + SyncKeyboard* = 4 + ReplayKeyboard* = 5 + AsyncBoth* = 6 + SyncBoth* = 7 + RevertToNone* = None + RevertToPointerRoot* = PointerRoot + RevertToParent* = 2 + Success* = 0 + BadRequest* = 1 + BadValue* = 2 + BadWindow* = 3 + BadPixmap* = 4 + BadAtom* = 5 + BadCursor* = 6 + BadFont* = 7 + BadMatch* = 8 + BadDrawable* = 9 + BadAccess* = 10 + BadAlloc* = 11 + BadColor* = 12 + BadGC* = 13 + BadIDChoice* = 14 + BadName* = 15 + BadLength* = 16 + BadImplementation* = 17 + FirstExtensionError* = 128 + LastExtensionError* = 255 + InputOutput* = 1 + InputOnly* = 2 + CWBackPixmap* = 1 shl 0 + CWBackPixel* = 1 shl 1 + CWBorderPixmap* = 1 shl 2 + CWBorderPixel* = 1 shl 3 + CWBitGravity* = 1 shl 4 + CWWinGravity* = 1 shl 5 + CWBackingStore* = 1 shl 6 + CWBackingPlanes* = 1 shl 7 + CWBackingPixel* = 1 shl 8 + CWOverrideRedirect* = 1 shl 9 + CWSaveUnder* = 1 shl 10 + CWEventMask* = 1 shl 11 + CWDontPropagate* = 1 shl 12 + CWColormap* = 1 shl 13 + CWCursor* = 1 shl 14 + CWX* = 1 shl 0 + CWY* = 1 shl 1 + CWWidth* = 1 shl 2 + CWHeight* = 1 shl 3 + CWBorderWidth* = 1 shl 4 + CWSibling* = 1 shl 5 + CWStackMode* = 1 shl 6 + ForgetGravity* = 0 + NorthWestGravity* = 1 + NorthGravity* = 2 + NorthEastGravity* = 3 + WestGravity* = 4 + CenterGravity* = 5 + EastGravity* = 6 + SouthWestGravity* = 7 + SouthGravity* = 8 + SouthEastGravity* = 9 + StaticGravity* = 10 + UnmapGravity* = 0 + NotUseful* = 0 + WhenMapped* = 1 + Always* = 2 + IsUnmapped* = 0 + IsUnviewable* = 1 + IsViewable* = 2 + SetModeInsert* = 0 + SetModeDelete* = 1 + DestroyAll* = 0 + RetainPermanent* = 1 + RetainTemporary* = 2 + Above* = 0 + Below* = 1 + TopIf* = 2 + BottomIf* = 3 + Opposite* = 4 + RaiseLowest* = 0 + LowerHighest* = 1 + PropModeReplace* = 0 + PropModePrepend* = 1 + PropModeAppend* = 2 + GXclear* = 0x00000000 + GXand* = 0x00000001 + GXandReverse* = 0x00000002 + GXcopy* = 0x00000003 + GXandInverted* = 0x00000004 + GXnoop* = 0x00000005 + GXxor* = 0x00000006 + GXor* = 0x00000007 + GXnor* = 0x00000008 + GXequiv* = 0x00000009 + GXinvert* = 0x0000000A + GXorReverse* = 0x0000000B + GXcopyInverted* = 0x0000000C + GXorInverted* = 0x0000000D + GXnand* = 0x0000000E + GXset* = 0x0000000F + LineSolid* = 0 + LineOnOffDash* = 1 + LineDoubleDash* = 2 + CapNotLast* = 0 + CapButt* = 1 + CapRound* = 2 + CapProjecting* = 3 + JoinMiter* = 0 + JoinRound* = 1 + JoinBevel* = 2 + FillSolid* = 0 + FillTiled* = 1 + FillStippled* = 2 + FillOpaqueStippled* = 3 + EvenOddRule* = 0 + WindingRule* = 1 + ClipByChildren* = 0 + IncludeInferiors* = 1 + Unsorted* = 0 + YSorted* = 1 + YXSorted* = 2 + YXBanded* = 3 + CoordModeOrigin* = 0 + CoordModePrevious* = 1 + Complex* = 0 + Nonconvex* = 1 + Convex* = 2 + ArcChord* = 0 + ArcPieSlice* = 1 + GCFunction* = 1 shl 0 + GCPlaneMask* = 1 shl 1 + GCForeground* = 1 shl 2 + GCBackground* = 1 shl 3 + GCLineWidth* = 1 shl 4 + GCLineStyle* = 1 shl 5 + GCCapStyle* = 1 shl 6 + GCJoinStyle* = 1 shl 7 + GCFillStyle* = 1 shl 8 + GCFillRule* = 1 shl 9 + GCTile* = 1 shl 10 + GCStipple* = 1 shl 11 + GCTileStipXOrigin* = 1 shl 12 + GCTileStipYOrigin* = 1 shl 13 + GCFont* = 1 shl 14 + GCSubwindowMode* = 1 shl 15 + GCGraphicsExposures* = 1 shl 16 + GCClipXOrigin* = 1 shl 17 + GCClipYOrigin* = 1 shl 18 + GCClipMask* = 1 shl 19 + GCDashOffset* = 1 shl 20 + GCDashList* = 1 shl 21 + GCArcMode* = 1 shl 22 + GCLastBit* = 22 + FontLeftToRight* = 0 + FontRightToLeft* = 1 + FontChange* = 255 + XYBitmap* = 0 + XYPixmap* = 1 + ZPixmap* = 2 + AllocNone* = 0 + AllocAll* = 1 + DoRed* = 1 shl 0 + DoGreen* = 1 shl 1 + DoBlue* = 1 shl 2 + CursorShape* = 0 + TileShape* = 1 + StippleShape* = 2 + AutoRepeatModeOff* = 0 + AutoRepeatModeOn* = 1 + AutoRepeatModeDefault* = 2 + LedModeOff* = 0 + LedModeOn* = 1 + KBKeyClickPercent* = 1 shl 0 + KBBellPercent* = 1 shl 1 + KBBellPitch* = 1 shl 2 + KBBellDuration* = 1 shl 3 + KBLed* = 1 shl 4 + KBLedMode* = 1 shl 5 + KBKey* = 1 shl 6 + KBAutoRepeatMode* = 1 shl 7 + MappingSuccess* = 0 + MappingBusy* = 1 + MappingFailed* = 2 + MappingModifier* = 0 + MappingKeyboard* = 1 + MappingPointer* = 2 + DontPreferBlanking* = 0 + PreferBlanking* = 1 + DefaultBlanking* = 2 + DisableScreenSaver* = 0 + DisableScreenInterval* = 0 + DontAllowExposures* = 0 + AllowExposures* = 1 + DefaultExposures* = 2 + ScreenSaverReset* = 0 + ScreenSaverActive* = 1 + HostInsert* = 0 + HostDelete* = 1 + EnableAccess* = 1 + DisableAccess* = 0 + StaticGray* = 0 + GrayScale* = 1 + StaticColor* = 2 + PseudoColor* = 3 + TrueColor* = 4 + DirectColor* = 5 + LSBFirst* = 0 + MSBFirst* = 1 + +# implementation diff --git a/lib/oldwrappers/x11/xatom.nim b/lib/oldwrappers/x11/xatom.nim new file mode 100644 index 000000000..b2e1dca91 --- /dev/null +++ b/lib/oldwrappers/x11/xatom.nim @@ -0,0 +1,81 @@ +# +# THIS IS A GENERATED FILE +# +# Do not change! Changing this file implies a protocol change! +# + +import + X + +const + XA_PRIMARY* = TAtom(1) + XA_SECONDARY* = TAtom(2) + XA_ARC* = TAtom(3) + XA_ATOM* = TAtom(4) + XA_BITMAP* = TAtom(5) + XA_CARDINAL* = TAtom(6) + XA_COLORMAP* = TAtom(7) + XA_CURSOR* = TAtom(8) + XA_CUT_BUFFER0* = TAtom(9) + XA_CUT_BUFFER1* = TAtom(10) + XA_CUT_BUFFER2* = TAtom(11) + XA_CUT_BUFFER3* = TAtom(12) + XA_CUT_BUFFER4* = TAtom(13) + XA_CUT_BUFFER5* = TAtom(14) + XA_CUT_BUFFER6* = TAtom(15) + XA_CUT_BUFFER7* = TAtom(16) + XA_DRAWABLE* = TAtom(17) + XA_FONT* = TAtom(18) + XA_INTEGER* = TAtom(19) + XA_PIXMAP* = TAtom(20) + XA_POINT* = TAtom(21) + XA_RECTANGLE* = TAtom(22) + XA_RESOURCE_MANAGER* = TAtom(23) + XA_RGB_COLOR_MAP* = TAtom(24) + XA_RGB_BEST_MAP* = TAtom(25) + XA_RGB_BLUE_MAP* = TAtom(26) + XA_RGB_DEFAULT_MAP* = TAtom(27) + XA_RGB_GRAY_MAP* = TAtom(28) + XA_RGB_GREEN_MAP* = TAtom(29) + XA_RGB_RED_MAP* = TAtom(30) + XA_STRING* = TAtom(31) + XA_VISUALID* = TAtom(32) + XA_WINDOW* = TAtom(33) + XA_WM_COMMAND* = TAtom(34) + XA_WM_HINTS* = TAtom(35) + XA_WM_CLIENT_MACHINE* = TAtom(36) + XA_WM_ICON_NAME* = TAtom(37) + XA_WM_ICON_SIZE* = TAtom(38) + XA_WM_NAME* = TAtom(39) + XA_WM_NORMAL_HINTS* = TAtom(40) + XA_WM_SIZE_HINTS* = TAtom(41) + XA_WM_ZOOM_HINTS* = TAtom(42) + XA_MIN_SPACE* = TAtom(43) + XA_NORM_SPACE* = TAtom(44) + XA_MAX_SPACE* = TAtom(45) + XA_END_SPACE* = TAtom(46) + XA_SUPERSCRIPT_X* = TAtom(47) + XA_SUPERSCRIPT_Y* = TAtom(48) + XA_SUBSCRIPT_X* = TAtom(49) + XA_SUBSCRIPT_Y* = TAtom(50) + XA_UNDERLINE_POSITION* = TAtom(51) + XA_UNDERLINE_THICKNESS* = TAtom(52) + XA_STRIKEOUT_ASCENT* = TAtom(53) + XA_STRIKEOUT_DESCENT* = TAtom(54) + XA_ITALIC_ANGLE* = TAtom(55) + XA_X_HEIGHT* = TAtom(56) + XA_QUAD_WIDTH* = TAtom(57) + XA_WEIGHT* = TAtom(58) + XA_POINT_SIZE* = TAtom(59) + XA_RESOLUTION* = TAtom(60) + XA_COPYRIGHT* = TAtom(61) + XA_NOTICE* = TAtom(62) + XA_FONT_NAME* = TAtom(63) + XA_FAMILY_NAME* = TAtom(64) + XA_FULL_NAME* = TAtom(65) + XA_CAP_HEIGHT* = TAtom(66) + XA_WM_CLASS* = TAtom(67) + XA_WM_TRANSIENT_FOR* = TAtom(68) + XA_LAST_PREDEFINED* = TAtom(68) + +# implementation diff --git a/lib/oldwrappers/x11/xcms.nim b/lib/oldwrappers/x11/xcms.nim new file mode 100644 index 000000000..57aad6ae0 --- /dev/null +++ b/lib/oldwrappers/x11/xcms.nim @@ -0,0 +1,396 @@ + +import + x, xlib + +#const +# libX11* = "X11" + +# +# Automatically converted by H2Pas 0.99.15 from xcms.h +# The following command line parameters were used: +# -p +# -T +# -S +# -d +# -c +# xcms.h +# + +const + XcmsFailure* = 0 + XcmsSuccess* = 1 + XcmsSuccessWithCompression* = 2 + +type + PXcmsColorFormat* = ptr TXcmsColorFormat + TXcmsColorFormat* = int32 + +proc XcmsUndefinedFormat*(): TXcmsColorFormat +proc XcmsCIEXYZFormat*(): TXcmsColorFormat +proc XcmsCIEuvYFormat*(): TXcmsColorFormat +proc XcmsCIExyYFormat*(): TXcmsColorFormat +proc XcmsCIELabFormat*(): TXcmsColorFormat +proc XcmsCIELuvFormat*(): TXcmsColorFormat +proc XcmsTekHVCFormat*(): TXcmsColorFormat +proc XcmsRGBFormat*(): TXcmsColorFormat +proc XcmsRGBiFormat*(): TXcmsColorFormat +const + XcmsInitNone* = 0x00000000 + XcmsInitSuccess* = 0x00000001 + XcmsInitFailure* = 0x000000FF + +when defined(MACROS): + proc DisplayOfCCC*(ccc: int32): int32 + proc ScreenNumberOfCCC*(ccc: int32): int32 + proc VisualOfCCC*(ccc: int32): int32 + proc ClientWhitePointOfCCC*(ccc: int32): int32 + proc ScreenWhitePointOfCCC*(ccc: int32): int32 + proc FunctionSetOfCCC*(ccc: int32): int32 +type + PXcmsFloat* = ptr TXcmsFloat + TXcmsFloat* = float64 + PXcmsRGB* = ptr TXcmsRGB + TXcmsRGB*{.final.} = object + red*: int16 + green*: int16 + blue*: int16 + + PXcmsRGBi* = ptr TXcmsRGBi + TXcmsRGBi*{.final.} = object + red*: TXcmsFloat + green*: TXcmsFloat + blue*: TXcmsFloat + + PXcmsCIEXYZ* = ptr TXcmsCIEXYZ + TXcmsCIEXYZ*{.final.} = object + X*: TXcmsFloat + Y*: TXcmsFloat + Z*: TXcmsFloat + + PXcmsCIEuvY* = ptr TXcmsCIEuvY + TXcmsCIEuvY*{.final.} = object + u_prime*: TXcmsFloat + v_prime*: TXcmsFloat + Y*: TXcmsFloat + + PXcmsCIExyY* = ptr TXcmsCIExyY + TXcmsCIExyY*{.final.} = object + x*: TXcmsFloat + y*: TXcmsFloat + theY*: TXcmsFloat + + PXcmsCIELab* = ptr TXcmsCIELab + TXcmsCIELab*{.final.} = object + L_star*: TXcmsFloat + a_star*: TXcmsFloat + b_star*: TXcmsFloat + + PXcmsCIELuv* = ptr TXcmsCIELuv + TXcmsCIELuv*{.final.} = object + L_star*: TXcmsFloat + u_star*: TXcmsFloat + v_star*: TXcmsFloat + + PXcmsTekHVC* = ptr TXcmsTekHVC + TXcmsTekHVC*{.final.} = object + H*: TXcmsFloat + V*: TXcmsFloat + C*: TXcmsFloat + + PXcmsPad* = ptr TXcmsPad + TXcmsPad*{.final.} = object + pad0*: TXcmsFloat + pad1*: TXcmsFloat + pad2*: TXcmsFloat + pad3*: TXcmsFloat + + PXcmsColor* = ptr TXcmsColor + TXcmsColor*{.final.} = object # spec : record + # case longint of + # 0 : ( RGB : TXcmsRGB ); + # 1 : ( RGBi : TXcmsRGBi ); + # 2 : ( CIEXYZ : TXcmsCIEXYZ ); + # 3 : ( CIEuvY : TXcmsCIEuvY ); + # 4 : ( CIExyY : TXcmsCIExyY ); + # 5 : ( CIELab : TXcmsCIELab ); + # 6 : ( CIELuv : TXcmsCIELuv ); + # 7 : ( TekHVC : TXcmsTekHVC ); + # 8 : ( Pad : TXcmsPad ); + # end; + pad*: TXcmsPad + pixel*: int32 + format*: TXcmsColorFormat + + PXcmsPerScrnInfo* = ptr TXcmsPerScrnInfo + TXcmsPerScrnInfo*{.final.} = object + screenWhitePt*: TXcmsColor + functionSet*: TXPointer + screenData*: TXPointer + state*: int8 + pad*: array[0..2, char] + + PXcmsCCC* = ptr TXcmsCCC + TXcmsCompressionProc* = proc (para1: PXcmsCCC, para2: PXcmsColor, + para3: int32, para4: int32, para5: PBool): TStatus{. + cdecl.} + TXcmsWhiteAdjustProc* = proc (para1: PXcmsCCC, para2: PXcmsColor, + para3: PXcmsColor, para4: TXcmsColorFormat, + para5: PXcmsColor, para6: int32, para7: PBool): TStatus{. + cdecl.} + TXcmsCCC*{.final.} = object + dpy*: PDisplay + screenNumber*: int32 + visual*: PVisual + clientWhitePt*: TXcmsColor + gamutCompProc*: TXcmsCompressionProc + gamutCompClientData*: TXPointer + whitePtAdjProc*: TXcmsWhiteAdjustProc + whitePtAdjClientData*: TXPointer + pPerScrnInfo*: PXcmsPerScrnInfo + + TXcmsCCCRec* = TXcmsCCC + PXcmsCCCRec* = ptr TXcmsCCCRec + TXcmsScreenInitProc* = proc (para1: PDisplay, para2: int32, + para3: PXcmsPerScrnInfo): TStatus{.cdecl.} + TXcmsScreenFreeProc* = proc (para1: TXPointer){.cdecl.} + TXcmsConversionProc* = proc (){.cdecl.} + PXcmsFuncListPtr* = ptr TXcmsFuncListPtr + TXcmsFuncListPtr* = TXcmsConversionProc + TXcmsParseStringProc* = proc (para1: cstring, para2: PXcmsColor): int32{.cdecl.} + PXcmsColorSpace* = ptr TXcmsColorSpace + TXcmsColorSpace*{.final.} = object + prefix*: cstring + id*: TXcmsColorFormat + parseString*: TXcmsParseStringProc + to_CIEXYZ*: TXcmsFuncListPtr + from_CIEXYZ*: TXcmsFuncListPtr + inverse_flag*: int32 + + PXcmsFunctionSet* = ptr TXcmsFunctionSet + TXcmsFunctionSet*{.final.} = object # error + #extern Status XcmsAddColorSpace ( + #in declaration at line 323 + DDColorSpaces*: ptr PXcmsColorSpace + screenInitProc*: TXcmsScreenInitProc + screenFreeProc*: TXcmsScreenFreeProc + + +proc XcmsAddFunctionSet*(para1: PXcmsFunctionSet): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XcmsAllocColor*(para1: PDisplay, para2: TColormap, para3: PXcmsColor, + para4: TXcmsColorFormat): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XcmsAllocNamedColor*(para1: PDisplay, para2: TColormap, para3: cstring, + para4: PXcmsColor, para5: PXcmsColor, + para6: TXcmsColorFormat): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XcmsCCCOfColormap*(para1: PDisplay, para2: TColormap): TXcmsCCC{.cdecl, + dynlib: libX11, importc.} +proc XcmsCIELabClipab*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, + para4: int32, para5: PBool): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XcmsCIELabClipL*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, + para4: int32, para5: PBool): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XcmsCIELabClipLab*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, + para4: int32, para5: PBool): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XcmsCIELabQueryMaxC*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, + para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XcmsCIELabQueryMaxL*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, + para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XcmsCIELabQueryMaxLC*(para1: TXcmsCCC, para2: TXcmsFloat, para3: PXcmsColor): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XcmsCIELabQueryMinL*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, + para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XcmsCIELabToCIEXYZ*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, + para4: int32): TStatus{.cdecl, dynlib: libX11, importc.} +proc XcmsCIELabWhiteShiftColors*(para1: TXcmsCCC, para2: PXcmsColor, + para3: PXcmsColor, para4: TXcmsColorFormat, + para5: PXcmsColor, para6: int32, para7: PBool): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XcmsCIELuvClipL*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, + para4: int32, para5: PBool): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XcmsCIELuvClipLuv*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, + para4: int32, para5: PBool): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XcmsCIELuvClipuv*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, + para4: int32, para5: PBool): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XcmsCIELuvQueryMaxC*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, + para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XcmsCIELuvQueryMaxL*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, + para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XcmsCIELuvQueryMaxLC*(para1: TXcmsCCC, para2: TXcmsFloat, para3: PXcmsColor): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XcmsCIELuvQueryMinL*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, + para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XcmsCIELuvToCIEuvY*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, + para4: int32): TStatus{.cdecl, dynlib: libX11, importc.} +proc XcmsCIELuvWhiteShiftColors*(para1: TXcmsCCC, para2: PXcmsColor, + para3: PXcmsColor, para4: TXcmsColorFormat, + para5: PXcmsColor, para6: int32, para7: PBool): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XcmsCIEXYZToCIELab*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, + para4: int32): TStatus{.cdecl, dynlib: libX11, importc.} +proc XcmsCIEXYZToCIEuvY*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, + para4: int32): TStatus{.cdecl, dynlib: libX11, importc.} +proc XcmsCIEXYZToCIExyY*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, + para4: int32): TStatus{.cdecl, dynlib: libX11, importc.} +proc XcmsCIEXYZToRGBi*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, + para4: PBool): TStatus{.cdecl, dynlib: libX11, importc.} +proc XcmsCIEuvYToCIELuv*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, + para4: int32): TStatus{.cdecl, dynlib: libX11, importc.} +proc XcmsCIEuvYToCIEXYZ*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, + para4: int32): TStatus{.cdecl, dynlib: libX11, importc.} +proc XcmsCIEuvYToTekHVC*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, + para4: int32): TStatus{.cdecl, dynlib: libX11, importc.} +proc XcmsCIExyYToCIEXYZ*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, + para4: int32): TStatus{.cdecl, dynlib: libX11, importc.} +proc XcmsClientWhitePointOfCCC*(para1: TXcmsCCC): PXcmsColor{.cdecl, + dynlib: libX11, importc.} +proc XcmsConvertColors*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, + para4: TXcmsColorFormat, para5: PBool): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XcmsCreateCCC*(para1: PDisplay, para2: int32, para3: PVisual, + para4: PXcmsColor, para5: TXcmsCompressionProc, + para6: TXPointer, para7: TXcmsWhiteAdjustProc, + para8: TXPointer): TXcmsCCC{.cdecl, dynlib: libX11, importc.} +proc XcmsDefaultCCC*(para1: PDisplay, para2: int32): TXcmsCCC{.cdecl, + dynlib: libX11, importc.} +proc XcmsDisplayOfCCC*(para1: TXcmsCCC): PDisplay{.cdecl, dynlib: libX11, + importc.} +proc XcmsFormatOfPrefix*(para1: cstring): TXcmsColorFormat{.cdecl, + dynlib: libX11, importc.} +proc XcmsFreeCCC*(para1: TXcmsCCC){.cdecl, dynlib: libX11, importc.} +proc XcmsLookupColor*(para1: PDisplay, para2: TColormap, para3: cstring, + para4: PXcmsColor, para5: PXcmsColor, + para6: TXcmsColorFormat): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XcmsPrefixOfFormat*(para1: TXcmsColorFormat): cstring{.cdecl, + dynlib: libX11, importc.} +proc XcmsQueryBlack*(para1: TXcmsCCC, para2: TXcmsColorFormat, para3: PXcmsColor): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XcmsQueryBlue*(para1: TXcmsCCC, para2: TXcmsColorFormat, para3: PXcmsColor): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XcmsQueryColor*(para1: PDisplay, para2: TColormap, para3: PXcmsColor, + para4: TXcmsColorFormat): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XcmsQueryColors*(para1: PDisplay, para2: TColormap, para3: PXcmsColor, + para4: int32, para5: TXcmsColorFormat): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XcmsQueryGreen*(para1: TXcmsCCC, para2: TXcmsColorFormat, para3: PXcmsColor): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XcmsQueryRed*(para1: TXcmsCCC, para2: TXcmsColorFormat, para3: PXcmsColor): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XcmsQueryWhite*(para1: TXcmsCCC, para2: TXcmsColorFormat, para3: PXcmsColor): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XcmsRGBiToCIEXYZ*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, + para4: PBool): TStatus{.cdecl, dynlib: libX11, importc.} +proc XcmsRGBiToRGB*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, + para4: PBool): TStatus{.cdecl, dynlib: libX11, importc.} +proc XcmsRGBToRGBi*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, + para4: PBool): TStatus{.cdecl, dynlib: libX11, importc.} +proc XcmsScreenNumberOfCCC*(para1: TXcmsCCC): int32{.cdecl, dynlib: libX11, + importc.} +proc XcmsScreenWhitePointOfCCC*(para1: TXcmsCCC): PXcmsColor{.cdecl, + dynlib: libX11, importc.} +proc XcmsSetCCCOfColormap*(para1: PDisplay, para2: TColormap, para3: TXcmsCCC): TXcmsCCC{. + cdecl, dynlib: libX11, importc.} +proc XcmsSetCompressionProc*(para1: TXcmsCCC, para2: TXcmsCompressionProc, + para3: TXPointer): TXcmsCompressionProc{.cdecl, + dynlib: libX11, importc.} +proc XcmsSetWhiteAdjustProc*(para1: TXcmsCCC, para2: TXcmsWhiteAdjustProc, + para3: TXPointer): TXcmsWhiteAdjustProc{.cdecl, + dynlib: libX11, importc.} +proc XcmsSetWhitePoint*(para1: TXcmsCCC, para2: PXcmsColor): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XcmsStoreColor*(para1: PDisplay, para2: TColormap, para3: PXcmsColor): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XcmsStoreColors*(para1: PDisplay, para2: TColormap, para3: PXcmsColor, + para4: int32, para5: PBool): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XcmsTekHVCClipC*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, + para4: int32, para5: PBool): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XcmsTekHVCClipV*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, + para4: int32, para5: PBool): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XcmsTekHVCClipVC*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, + para4: int32, para5: PBool): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XcmsTekHVCQueryMaxC*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, + para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XcmsTekHVCQueryMaxV*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, + para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XcmsTekHVCQueryMaxVC*(para1: TXcmsCCC, para2: TXcmsFloat, para3: PXcmsColor): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XcmsTekHVCQueryMaxVSamples*(para1: TXcmsCCC, para2: TXcmsFloat, + para3: PXcmsColor, para4: int32): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XcmsTekHVCQueryMinV*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, + para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XcmsTekHVCToCIEuvY*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, + para4: int32): TStatus{.cdecl, dynlib: libX11, importc.} +proc XcmsTekHVCWhiteShiftColors*(para1: TXcmsCCC, para2: PXcmsColor, + para3: PXcmsColor, para4: TXcmsColorFormat, + para5: PXcmsColor, para6: int32, para7: PBool): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XcmsVisualOfCCC*(para1: TXcmsCCC): PVisual{.cdecl, dynlib: libX11, importc.} +# implementation + +proc XcmsUndefinedFormat(): TXcmsColorFormat = + result = 0x00000000'i32 + +proc XcmsCIEXYZFormat(): TXcmsColorFormat = + result = 0x00000001'i32 + +proc XcmsCIEuvYFormat(): TXcmsColorFormat = + result = 0x00000002'i32 + +proc XcmsCIExyYFormat(): TXcmsColorFormat = + result = 0x00000003'i32 + +proc XcmsCIELabFormat(): TXcmsColorFormat = + result = 0x00000004'i32 + +proc XcmsCIELuvFormat(): TXcmsColorFormat = + result = 0x00000005'i32 + +proc XcmsTekHVCFormat(): TXcmsColorFormat = + result = 0x00000006'i32 + +proc XcmsRGBFormat(): TXcmsColorFormat = + result = 0x80000000'i32 + +proc XcmsRGBiFormat(): TXcmsColorFormat = + result = 0x80000001'i32 + +when defined(MACROS): + proc DisplayOfCCC(ccc: int32): int32 = + result = ccc.dpy + + proc ScreenNumberOfCCC(ccc: int32): int32 = + result = ccc.screenNumber + + proc VisualOfCCC(ccc: int32): int32 = + result = ccc.visual + + proc ClientWhitePointOfCCC(ccc: int32): int32 = + result = addr(ccc.clientWhitePt) + + proc ScreenWhitePointOfCCC(ccc: int32): int32 = + result = addr(ccc.pPerScrnInfo.screenWhitePt) + + proc FunctionSetOfCCC(ccc: int32): int32 = + result = ccc.pPerScrnInfo.functionSet diff --git a/lib/oldwrappers/x11/xf86dga.nim b/lib/oldwrappers/x11/xf86dga.nim new file mode 100644 index 000000000..376f11861 --- /dev/null +++ b/lib/oldwrappers/x11/xf86dga.nim @@ -0,0 +1,235 @@ +# +# Copyright (c) 1999 XFree86 Inc +# +# $XFree86: xc/include/extensions/xf86dga.h,v 3.20 1999/10/13 04:20:48 dawes Exp $ + +import + x, xlib + +const + libXxf86dga* = "libXxf86dga.so" + +#type +# cfloat* = float32 + +# $XFree86: xc/include/extensions/xf86dga1.h,v 1.2 1999/04/17 07:05:41 dawes Exp $ +# +# +#Copyright (c) 1995 Jon Tombs +#Copyright (c) 1995 XFree86 Inc +# +# +#************************************************************************ +# +# THIS IS THE OLD DGA API AND IS OBSOLETE. PLEASE DO NOT USE IT ANYMORE +# +#************************************************************************ + +type + PPcchar* = ptr ptr cstring + +const + X_XF86DGAQueryVersion* = 0 + X_XF86DGAGetVideoLL* = 1 + X_XF86DGADirectVideo* = 2 + X_XF86DGAGetViewPortSize* = 3 + X_XF86DGASetViewPort* = 4 + X_XF86DGAGetVidPage* = 5 + X_XF86DGASetVidPage* = 6 + X_XF86DGAInstallColormap* = 7 + X_XF86DGAQueryDirectVideo* = 8 + X_XF86DGAViewPortChanged* = 9 + XF86DGADirectPresent* = 0x00000001 + XF86DGADirectGraphics* = 0x00000002 + XF86DGADirectMouse* = 0x00000004 + XF86DGADirectKeyb* = 0x00000008 + XF86DGAHasColormap* = 0x00000100 + XF86DGADirectColormap* = 0x00000200 + +proc XF86DGAQueryVersion*(dpy: PDisplay, majorVersion: Pcint, + minorVersion: Pcint): TBool{.CDecl, + dynlib: libXxf86dga, importc.} +proc XF86DGAQueryExtension*(dpy: PDisplay, event_base: Pcint, error_base: Pcint): TBool{. + CDecl, dynlib: libXxf86dga, importc.} +proc XF86DGAGetVideoLL*(dpy: PDisplay, screen: cint, base_addr: Pcint, + width: Pcint, bank_size: Pcint, ram_size: Pcint): TStatus{. + CDecl, dynlib: libXxf86dga, importc.} +proc XF86DGAGetVideo*(dpy: PDisplay, screen: cint, base_addr: PPcchar, + width: Pcint, bank_size: Pcint, ram_size: Pcint): TStatus{. + CDecl, dynlib: libXxf86dga, importc.} +proc XF86DGADirectVideo*(dpy: PDisplay, screen: cint, enable: cint): TStatus{. + CDecl, dynlib: libXxf86dga, importc.} +proc XF86DGADirectVideoLL*(dpy: PDisplay, screen: cint, enable: cint): TStatus{. + CDecl, dynlib: libXxf86dga, importc.} +proc XF86DGAGetViewPortSize*(dpy: PDisplay, screen: cint, width: Pcint, + height: Pcint): TStatus{.CDecl, + dynlib: libXxf86dga, importc.} +proc XF86DGASetViewPort*(dpy: PDisplay, screen: cint, x: cint, y: cint): TStatus{. + CDecl, dynlib: libXxf86dga, importc.} +proc XF86DGAGetVidPage*(dpy: PDisplay, screen: cint, vid_page: Pcint): TStatus{. + CDecl, dynlib: libXxf86dga, importc.} +proc XF86DGASetVidPage*(dpy: PDisplay, screen: cint, vid_page: cint): TStatus{. + CDecl, dynlib: libXxf86dga, importc.} +proc XF86DGAInstallColormap*(dpy: PDisplay, screen: cint, Colormap: TColormap): TStatus{. + CDecl, dynlib: libXxf86dga, importc.} +proc XF86DGAForkApp*(screen: cint): cint{.CDecl, dynlib: libXxf86dga, importc.} +proc XF86DGAQueryDirectVideo*(dpy: PDisplay, screen: cint, flags: Pcint): TStatus{. + CDecl, dynlib: libXxf86dga, importc.} +proc XF86DGAViewPortChanged*(dpy: PDisplay, screen: cint, n: cint): TBool{. + CDecl, dynlib: libXxf86dga, importc.} +const + X_XDGAQueryVersion* = 0 # 1 through 9 are in xf86dga1.pp + # 10 and 11 are reserved to avoid conflicts with rogue DGA extensions + X_XDGAQueryModes* = 12 + X_XDGASetMode* = 13 + X_XDGASetViewport* = 14 + X_XDGAInstallColormap* = 15 + X_XDGASelectInput* = 16 + X_XDGAFillRectangle* = 17 + X_XDGACopyArea* = 18 + X_XDGACopyTransparentArea* = 19 + X_XDGAGetViewportStatus* = 20 + X_XDGASync* = 21 + X_XDGAOpenFramebuffer* = 22 + X_XDGACloseFramebuffer* = 23 + X_XDGASetClientVersion* = 24 + X_XDGAChangePixmapMode* = 25 + X_XDGACreateColormap* = 26 + XDGAConcurrentAccess* = 0x00000001 + XDGASolidFillRect* = 0x00000002 + XDGABlitRect* = 0x00000004 + XDGABlitTransRect* = 0x00000008 + XDGAPixmap* = 0x00000010 + XDGAInterlaced* = 0x00010000 + XDGADoublescan* = 0x00020000 + XDGAFlipImmediate* = 0x00000001 + XDGAFlipRetrace* = 0x00000002 + XDGANeedRoot* = 0x00000001 + XF86DGANumberEvents* = 7 + XDGAPixmapModeLarge* = 0 + XDGAPixmapModeSmall* = 1 + XF86DGAClientNotLocal* = 0 + XF86DGANoDirectVideoMode* = 1 + XF86DGAScreenNotActive* = 2 + XF86DGADirectNotActivated* = 3 + XF86DGAOperationNotSupported* = 4 + XF86DGANumberErrors* = (XF86DGAOperationNotSupported + 1) + +type + PXDGAMode* = ptr TXDGAMode + TXDGAMode*{.final.} = object + num*: cint # A unique identifier for the mode (num > 0) + name*: cstring # name of mode given in the XF86Config + verticalRefresh*: cfloat + flags*: cint # DGA_CONCURRENT_ACCESS, etc... + imageWidth*: cint # linear accessible portion (pixels) + imageHeight*: cint + pixmapWidth*: cint # Xlib accessible portion (pixels) + pixmapHeight*: cint # both fields ignored if no concurrent access + bytesPerScanline*: cint + byteOrder*: cint # MSBFirst, LSBFirst + depth*: cint + bitsPerPixel*: cint + redMask*: culong + greenMask*: culong + blueMask*: culong + visualClass*: cshort + viewportWidth*: cint + viewportHeight*: cint + xViewportStep*: cint # viewport position granularity + yViewportStep*: cint + maxViewportX*: cint # max viewport origin + maxViewportY*: cint + viewportFlags*: cint # types of page flipping possible + reserved1*: cint + reserved2*: cint + + PXDGADevice* = ptr TXDGADevice + TXDGADevice*{.final.} = object + mode*: TXDGAMode + data*: Pcuchar + pixmap*: TPixmap + + PXDGAButtonEvent* = ptr TXDGAButtonEvent + TXDGAButtonEvent*{.final.} = object + theType*: cint + serial*: culong + display*: PDisplay + screen*: cint + time*: TTime + state*: cuint + button*: cuint + + PXDGAKeyEvent* = ptr TXDGAKeyEvent + TXDGAKeyEvent*{.final.} = object + theType*: cint + serial*: culong + display*: PDisplay + screen*: cint + time*: TTime + state*: cuint + keycode*: cuint + + PXDGAMotionEvent* = ptr TXDGAMotionEvent + TXDGAMotionEvent*{.final.} = object + theType*: cint + serial*: culong + display*: PDisplay + screen*: cint + time*: TTime + state*: cuint + dx*: cint + dy*: cint + + PXDGAEvent* = ptr TXDGAEvent + TXDGAEvent*{.final.} = object + pad*: array[0..23, clong] # sorry you have to cast if you want access + #Case LongInt Of + # 0 : (_type : cint); + # 1 : (xbutton : TXDGAButtonEvent); + # 2 : (xkey : TXDGAKeyEvent); + # 3 : (xmotion : TXDGAMotionEvent); + # 4 : (pad : Array[0..23] Of clong); + + +proc XDGAQueryExtension*(dpy: PDisplay, eventBase: Pcint, erroBase: Pcint): TBool{. + CDecl, dynlib: libXxf86dga, importc.} +proc XDGAQueryVersion*(dpy: PDisplay, majorVersion: Pcint, minorVersion: Pcint): TBool{. + CDecl, dynlib: libXxf86dga, importc.} +proc XDGAQueryModes*(dpy: PDisplay, screen: cint, num: Pcint): PXDGAMode{.CDecl, + dynlib: libXxf86dga, importc.} +proc XDGASetMode*(dpy: PDisplay, screen: cint, mode: cint): PXDGADevice{.CDecl, + dynlib: libXxf86dga, importc.} +proc XDGAOpenFramebuffer*(dpy: PDisplay, screen: cint): TBool{.CDecl, + dynlib: libXxf86dga, importc.} +proc XDGACloseFramebuffer*(dpy: PDisplay, screen: cint){.CDecl, + dynlib: libXxf86dga, importc.} +proc XDGASetViewport*(dpy: PDisplay, screen: cint, x: cint, y: cint, flags: cint){. + CDecl, dynlib: libXxf86dga, importc.} +proc XDGAInstallColormap*(dpy: PDisplay, screen: cint, cmap: TColormap){.CDecl, + dynlib: libXxf86dga, importc.} +proc XDGACreateColormap*(dpy: PDisplay, screen: cint, device: PXDGADevice, + alloc: cint): TColormap{.CDecl, dynlib: libXxf86dga, + importc.} +proc XDGASelectInput*(dpy: PDisplay, screen: cint, event_mask: clong){.CDecl, + dynlib: libXxf86dga, importc.} +proc XDGAFillRectangle*(dpy: PDisplay, screen: cint, x: cint, y: cint, + width: cuint, height: cuint, color: culong){.CDecl, + dynlib: libXxf86dga, importc.} +proc XDGACopyArea*(dpy: PDisplay, screen: cint, srcx: cint, srcy: cint, + width: cuint, height: cuint, dstx: cint, dsty: cint){.CDecl, + dynlib: libXxf86dga, importc.} +proc XDGACopyTransparentArea*(dpy: PDisplay, screen: cint, srcx: cint, + srcy: cint, width: cuint, height: cuint, + dstx: cint, dsty: cint, key: culong){.CDecl, + dynlib: libXxf86dga, importc.} +proc XDGAGetViewportStatus*(dpy: PDisplay, screen: cint): cint{.CDecl, + dynlib: libXxf86dga, importc.} +proc XDGASync*(dpy: PDisplay, screen: cint){.CDecl, dynlib: libXxf86dga, importc.} +proc XDGASetClientVersion*(dpy: PDisplay): TBool{.CDecl, dynlib: libXxf86dga, + importc.} +proc XDGAChangePixmapMode*(dpy: PDisplay, screen: cint, x: Pcint, y: Pcint, + mode: cint){.CDecl, dynlib: libXxf86dga, importc.} +proc XDGAKeyEventToXKeyEvent*(dk: PXDGAKeyEvent, xk: PXKeyEvent){.CDecl, + dynlib: libXxf86dga, importc.} +# implementation diff --git a/lib/oldwrappers/x11/xf86vmode.nim b/lib/oldwrappers/x11/xf86vmode.nim new file mode 100644 index 000000000..18a922cab --- /dev/null +++ b/lib/oldwrappers/x11/xf86vmode.nim @@ -0,0 +1,229 @@ +# $XFree86: xc/include/extensions/xf86vmode.h,v 3.30 2001/05/07 20:09:50 mvojkovi Exp $ +# +# +#Copyright 1995 Kaleb S. KEITHLEY +# +#Permission is hereby granted, free of charge, to any person obtaining +#a copy of this software and associated documentation files (the +#"Software"), to deal in the Software without restriction, including +#without limitation the rights to use, copy, modify, merge, publish, +#distribute, sublicense, and/or sell copies of the Software, and to +#permit persons to whom the Software is furnished to do so, subject to +#the following conditions: +# +#The above copyright notice and this permission notice shall be +#included in all copies or substantial portions of the Software. +# +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +#EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +#MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +#IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES +#OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +#ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +#OTHER DEALINGS IN THE SOFTWARE. +# +#Except as contained in this notice, the name of Kaleb S. KEITHLEY +#shall not be used in advertising or otherwise to promote the sale, use +#or other dealings in this Software without prior written authorization +#from Kaleb S. KEITHLEY +# +# +# $Xorg: xf86vmode.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ +# THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION + +import + x, xlib + +const + libXxf86vm* = "libXxf86vm.so" + +type + PINT32* = ptr int32 + +const + X_XF86VidModeQueryVersion* = 0 + X_XF86VidModeGetModeLine* = 1 + X_XF86VidModeModModeLine* = 2 + X_XF86VidModeSwitchMode* = 3 + X_XF86VidModeGetMonitor* = 4 + X_XF86VidModeLockModeSwitch* = 5 + X_XF86VidModeGetAllModeLines* = 6 + X_XF86VidModeAddModeLine* = 7 + X_XF86VidModeDeleteModeLine* = 8 + X_XF86VidModeValidateModeLine* = 9 + X_XF86VidModeSwitchToMode* = 10 + X_XF86VidModeGetViewPort* = 11 + X_XF86VidModeSetViewPort* = 12 # new for version 2.x of this extension + X_XF86VidModeGetDotClocks* = 13 + X_XF86VidModeSetClientVersion* = 14 + X_XF86VidModeSetGamma* = 15 + X_XF86VidModeGetGamma* = 16 + X_XF86VidModeGetGammaRamp* = 17 + X_XF86VidModeSetGammaRamp* = 18 + X_XF86VidModeGetGammaRampSize* = 19 + X_XF86VidModeGetPermissions* = 20 + CLKFLAG_PROGRAMABLE* = 1 + +when defined(XF86VIDMODE_EVENTS): + const + XF86VidModeNotify* = 0 + XF86VidModeNumberEvents* = (XF86VidModeNotify + 1) + XF86VidModeNotifyMask* = 0x00000001 + XF86VidModeNonEvent* = 0 + XF86VidModeModeChange* = 1 +else: + const + XF86VidModeNumberEvents* = 0 +const + XF86VidModeBadClock* = 0 + XF86VidModeBadHTimings* = 1 + XF86VidModeBadVTimings* = 2 + XF86VidModeModeUnsuitable* = 3 + XF86VidModeExtensionDisabled* = 4 + XF86VidModeClientNotLocal* = 5 + XF86VidModeZoomLocked* = 6 + XF86VidModeNumberErrors* = (XF86VidModeZoomLocked + 1) + XF86VM_READ_PERMISSION* = 1 + XF86VM_WRITE_PERMISSION* = 2 + +type + PXF86VidModeModeLine* = ptr TXF86VidModeModeLine + TXF86VidModeModeLine*{.final.} = object + hdisplay*: cushort + hsyncstart*: cushort + hsyncend*: cushort + htotal*: cushort + hskew*: cushort + vdisplay*: cushort + vsyncstart*: cushort + vsyncend*: cushort + vtotal*: cushort + flags*: cuint + privsize*: cint + c_private*: PINT32 + + PPPXF86VidModeModeInfo* = ptr PPXF86VidModeModeInfo + PPXF86VidModeModeInfo* = ptr PXF86VidModeModeInfo + PXF86VidModeModeInfo* = ptr TXF86VidModeModeInfo + TXF86VidModeModeInfo*{.final.} = object + dotclock*: cuint + hdisplay*: cushort + hsyncstart*: cushort + hsyncend*: cushort + htotal*: cushort + hskew*: cushort + vdisplay*: cushort + vsyncstart*: cushort + vsyncend*: cushort + vtotal*: cushort + flags*: cuint + privsize*: cint + c_private*: PINT32 + + PXF86VidModeSyncRange* = ptr TXF86VidModeSyncRange + TXF86VidModeSyncRange*{.final.} = object + hi*: cfloat + lo*: cfloat + + PXF86VidModeMonitor* = ptr TXF86VidModeMonitor + TXF86VidModeMonitor*{.final.} = object + vendor*: cstring + model*: cstring + EMPTY*: cfloat + nhsync*: cuchar + hsync*: PXF86VidModeSyncRange + nvsync*: cuchar + vsync*: PXF86VidModeSyncRange + + PXF86VidModeNotifyEvent* = ptr TXF86VidModeNotifyEvent + TXF86VidModeNotifyEvent*{.final.} = object + theType*: cint # of event + serial*: culong # # of last request processed by server + send_event*: TBool # true if this came from a SendEvent req + display*: PDisplay # Display the event was read from + root*: TWindow # root window of event screen + state*: cint # What happened + kind*: cint # What happened + forced*: TBool # extents of new region + time*: TTime # event timestamp + + PXF86VidModeGamma* = ptr TXF86VidModeGamma + TXF86VidModeGamma*{.final.} = object + red*: cfloat # Red Gamma value + green*: cfloat # Green Gamma value + blue*: cfloat # Blue Gamma value + + +when defined(MACROS): + proc XF86VidModeSelectNextMode*(disp: PDisplay, scr: cint): TBool + proc XF86VidModeSelectPrevMode*(disp: PDisplay, scr: cint): TBool +proc XF86VidModeQueryVersion*(dpy: PDisplay, majorVersion: Pcint, + minorVersion: Pcint): TBool{.CDecl, + dynlib: libXxf86vm, importc.} +proc XF86VidModeQueryExtension*(dpy: PDisplay, event_base: Pcint, + error_base: Pcint): TBool{.CDecl, + dynlib: libXxf86vm, importc.} +proc XF86VidModeSetClientVersion*(dpy: PDisplay): TBool{.CDecl, + dynlib: libXxf86vm, importc.} +proc XF86VidModeGetModeLine*(dpy: PDisplay, screen: cint, dotclock: Pcint, + modeline: PXF86VidModeModeLine): TBool{.CDecl, + dynlib: libXxf86vm, importc.} +proc XF86VidModeGetAllModeLines*(dpy: PDisplay, screen: cint, modecount: Pcint, + modelinesPtr: PPPXF86VidModeModeInfo): TBool{. + CDecl, dynlib: libXxf86vm, importc.} +proc XF86VidModeAddModeLine*(dpy: PDisplay, screen: cint, + new_modeline: PXF86VidModeModeInfo, + after_modeline: PXF86VidModeModeInfo): TBool{. + CDecl, dynlib: libXxf86vm, importc.} +proc XF86VidModeDeleteModeLine*(dpy: PDisplay, screen: cint, + modeline: PXF86VidModeModeInfo): TBool{.CDecl, + dynlib: libXxf86vm, importc.} +proc XF86VidModeModModeLine*(dpy: PDisplay, screen: cint, + modeline: PXF86VidModeModeLine): TBool{.CDecl, + dynlib: libXxf86vm, importc.} +proc XF86VidModeValidateModeLine*(dpy: PDisplay, screen: cint, + modeline: PXF86VidModeModeInfo): TStatus{. + CDecl, dynlib: libXxf86vm, importc.} +proc XF86VidModeSwitchMode*(dpy: PDisplay, screen: cint, zoom: cint): TBool{. + CDecl, dynlib: libXxf86vm, importc.} +proc XF86VidModeSwitchToMode*(dpy: PDisplay, screen: cint, + modeline: PXF86VidModeModeInfo): TBool{.CDecl, + dynlib: libXxf86vm, importc.} +proc XF86VidModeLockModeSwitch*(dpy: PDisplay, screen: cint, lock: cint): TBool{. + CDecl, dynlib: libXxf86vm, importc.} +proc XF86VidModeGetMonitor*(dpy: PDisplay, screen: cint, + monitor: PXF86VidModeMonitor): TBool{.CDecl, + dynlib: libXxf86vm, importc.} +proc XF86VidModeGetViewPort*(dpy: PDisplay, screen: cint, x_return: Pcint, + y_return: Pcint): TBool{.CDecl, dynlib: libXxf86vm, + importc.} +proc XF86VidModeSetViewPort*(dpy: PDisplay, screen: cint, x: cint, y: cint): TBool{. + CDecl, dynlib: libXxf86vm, importc.} +proc XF86VidModeGetDotClocks*(dpy: PDisplay, screen: cint, flags_return: Pcint, + number_of_clocks_return: Pcint, + max_dot_clock_return: Pcint, clocks_return: PPcint): TBool{. + CDecl, dynlib: libXxf86vm, importc.} +proc XF86VidModeGetGamma*(dpy: PDisplay, screen: cint, Gamma: PXF86VidModeGamma): TBool{. + CDecl, dynlib: libXxf86vm, importc.} +proc XF86VidModeSetGamma*(dpy: PDisplay, screen: cint, Gamma: PXF86VidModeGamma): TBool{. + CDecl, dynlib: libXxf86vm, importc.} +proc XF86VidModeSetGammaRamp*(dpy: PDisplay, screen: cint, size: cint, + red_array: Pcushort, green_array: Pcushort, + blue_array: Pcushort): TBool{.CDecl, + dynlib: libXxf86vm, importc.} +proc XF86VidModeGetGammaRamp*(dpy: PDisplay, screen: cint, size: cint, + red_array: Pcushort, green_array: Pcushort, + blue_array: Pcushort): TBool{.CDecl, + dynlib: libXxf86vm, importc.} +proc XF86VidModeGetGammaRampSize*(dpy: PDisplay, screen: cint, size: Pcint): TBool{. + CDecl, dynlib: libXxf86vm, importc.} +proc XF86VidModeGetPermissions*(dpy: PDisplay, screen: cint, permissions: Pcint): TBool{. + CDecl, dynlib: libXxf86vm, importc.} +# implementation + +when defined(MACROS): + proc XF86VidModeSelectNextMode(disp: PDisplay, scr: cint): TBool = + XF86VidModeSelectNextMode = XF86VidModeSwitchMode(disp, scr, 1) + + proc XF86VidModeSelectPrevMode(disp: PDisplay, scr: cint): TBool = + XF86VidModeSelectPrevMode = XF86VidModeSwitchMode(disp, scr, - 1) diff --git a/lib/oldwrappers/x11/xi.nim b/lib/oldwrappers/x11/xi.nim new file mode 100644 index 000000000..d1b9f7846 --- /dev/null +++ b/lib/oldwrappers/x11/xi.nim @@ -0,0 +1,307 @@ +# +# $Xorg: XI.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ +# +#************************************************************ +# +#Copyright 1989, 1998 The Open Group +# +#Permission to use, copy, modify, distribute, and sell this software and its +#documentation for any purpose is hereby granted without fee, provided that +#the above copyright notice appear in all copies and that both that +#copyright notice and this permission notice appear in supporting +#documentation. +# +#The above copyright notice and this permission notice shall be included in +#all copies or substantial portions of the Software. +# +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +#OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +#AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +#CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +#Except as contained in this notice, the name of The Open Group shall not be +#used in advertising or otherwise to promote the sale, use or other dealings +#in this Software without prior written authorization from The Open Group. +# +#Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. +# +# All Rights Reserved +# +#Permission to use, copy, modify, and distribute this software and its +#documentation for any purpose and without fee is hereby granted, +#provided that the above copyright notice appear in all copies and that +#both that copyright notice and this permission notice appear in +#supporting documentation, and that the name of Hewlett-Packard not be +#used in advertising or publicity pertaining to distribution of the +#software without specific, written prior permission. +# +#HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +#ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +#HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +#ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +#WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +#ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# +#********************************************************/ +# $XFree86: xc/include/extensions/XI.h,v 1.5 2001/12/14 19:53:28 dawes Exp $ +# +# Definitions used by the server, library and client +# +# Pascal Convertion was made by Ido Kannner - kanerido@actcom.net.il +# +#Histroy: +# 2004/10/15 - Fixed a bug of accessing second based records by removing "paced record" and chnaged it to +# "reocrd" only. +# 2004/10/07 - Removed the "uses X;" line. The unit does not need it. +# 2004/10/03 - Conversion from C header to Pascal unit. +# + +const + sz_xGetExtensionVersionReq* = 8 + sz_xGetExtensionVersionReply* = 32 + sz_xListInputDevicesReq* = 4 + sz_xListInputDevicesReply* = 32 + sz_xOpenDeviceReq* = 8 + sz_xOpenDeviceReply* = 32 + sz_xCloseDeviceReq* = 8 + sz_xSetDeviceModeReq* = 8 + sz_xSetDeviceModeReply* = 32 + sz_xSelectExtensionEventReq* = 12 + sz_xGetSelectedExtensionEventsReq* = 8 + sz_xGetSelectedExtensionEventsReply* = 32 + sz_xChangeDeviceDontPropagateListReq* = 12 + sz_xGetDeviceDontPropagateListReq* = 8 + sz_xGetDeviceDontPropagateListReply* = 32 + sz_xGetDeviceMotionEventsReq* = 16 + sz_xGetDeviceMotionEventsReply* = 32 + sz_xChangeKeyboardDeviceReq* = 8 + sz_xChangeKeyboardDeviceReply* = 32 + sz_xChangePointerDeviceReq* = 8 + sz_xChangePointerDeviceReply* = 32 + sz_xGrabDeviceReq* = 20 + sz_xGrabDeviceReply* = 32 + sz_xUngrabDeviceReq* = 12 + sz_xGrabDeviceKeyReq* = 20 + sz_xGrabDeviceKeyReply* = 32 + sz_xUngrabDeviceKeyReq* = 16 + sz_xGrabDeviceButtonReq* = 20 + sz_xGrabDeviceButtonReply* = 32 + sz_xUngrabDeviceButtonReq* = 16 + sz_xAllowDeviceEventsReq* = 12 + sz_xGetDeviceFocusReq* = 8 + sz_xGetDeviceFocusReply* = 32 + sz_xSetDeviceFocusReq* = 16 + sz_xGetFeedbackControlReq* = 8 + sz_xGetFeedbackControlReply* = 32 + sz_xChangeFeedbackControlReq* = 12 + sz_xGetDeviceKeyMappingReq* = 8 + sz_xGetDeviceKeyMappingReply* = 32 + sz_xChangeDeviceKeyMappingReq* = 8 + sz_xGetDeviceModifierMappingReq* = 8 + sz_xSetDeviceModifierMappingReq* = 8 + sz_xSetDeviceModifierMappingReply* = 32 + sz_xGetDeviceButtonMappingReq* = 8 + sz_xGetDeviceButtonMappingReply* = 32 + sz_xSetDeviceButtonMappingReq* = 8 + sz_xSetDeviceButtonMappingReply* = 32 + sz_xQueryDeviceStateReq* = 8 + sz_xQueryDeviceStateReply* = 32 + sz_xSendExtensionEventReq* = 16 + sz_xDeviceBellReq* = 8 + sz_xSetDeviceValuatorsReq* = 8 + sz_xSetDeviceValuatorsReply* = 32 + sz_xGetDeviceControlReq* = 8 + sz_xGetDeviceControlReply* = 32 + sz_xChangeDeviceControlReq* = 8 + sz_xChangeDeviceControlReply* = 32 + +const + INAME* = "XInputExtension" + +const + XI_KEYBOARD* = "KEYBOARD" + XI_MOUSE* = "MOUSE" + XI_TABLET* = "TABLET" + XI_TOUCHSCREEN* = "TOUCHSCREEN" + XI_TOUCHPAD* = "TOUCHPAD" + XI_BARCODE* = "BARCODE" + XI_BUTTONBOX* = "BUTTONBOX" + XI_KNOB_BOX* = "KNOB_BOX" + XI_ONE_KNOB* = "ONE_KNOB" + XI_NINE_KNOB* = "NINE_KNOB" + XI_TRACKBALL* = "TRACKBALL" + XI_QUADRATURE* = "QUADRATURE" + XI_ID_MODULE* = "ID_MODULE" + XI_SPACEBALL* = "SPACEBALL" + XI_DATAGLOVE* = "DATAGLOVE" + XI_EYETRACKER* = "EYETRACKER" + XI_CURSORKEYS* = "CURSORKEYS" + XI_FOOTMOUSE* = "FOOTMOUSE" + +const + Dont_Check* = 0 + XInput_Initial_Release* = 1 + XInput_Add_XDeviceBell* = 2 + XInput_Add_XSetDeviceValuators* = 3 + XInput_Add_XChangeDeviceControl* = 4 + +const + XI_Absent* = 0 + XI_Present* = 1 + +const + XI_Initial_Release_Major* = 1 + XI_Initial_Release_Minor* = 0 + +const + XI_Add_XDeviceBell_Major* = 1 + XI_Add_XDeviceBell_Minor* = 1 + +const + XI_Add_XSetDeviceValuators_Major* = 1 + XI_Add_XSetDeviceValuators_Minor* = 2 + +const + XI_Add_XChangeDeviceControl_Major* = 1 + XI_Add_XChangeDeviceControl_Minor* = 3 + +const + DEVICE_RESOLUTION* = 1 + +const + NoSuchExtension* = 1 + +const + COUNT* = 0 + CREATE* = 1 + +const + NewPointer* = 0 + NewKeyboard* = 1 + +const + XPOINTER* = 0 + XKEYBOARD* = 1 + +const + UseXKeyboard* = 0x000000FF + +const + IsXPointer* = 0 + IsXKeyboard* = 1 + IsXExtensionDevice* = 2 + +const + AsyncThisDevice* = 0 + SyncThisDevice* = 1 + ReplayThisDevice* = 2 + AsyncOtherDevices* = 3 + AsyncAll* = 4 + SyncAll* = 5 + +const + FollowKeyboard* = 3 + RevertToFollowKeyboard* = 3 + +const + DvAccelNum* = int(1) shl 0 + DvAccelDenom* = int(1) shl 1 + DvThreshold* = int(1) shl 2 + +const + DvKeyClickPercent* = int(1) shl 0 + DvPercent* = int(1) shl 1 + DvPitch* = int(1) shl 2 + DvDuration* = int(1) shl 3 + DvLed* = int(1) shl 4 + DvLedMode* = int(1) shl 5 + DvKey* = int(1) shl 6 + DvAutoRepeatMode* = 1 shl 7 + +const + DvString* = int(1) shl 0 + +const + DvInteger* = int(1) shl 0 + +const + DeviceMode* = int(1) shl 0 + Relative* = 0 + Absolute* = 1 # Merged from Metrolink tree for XINPUT stuff + TS_Raw* = 57 + TS_Scaled* = 58 + SendCoreEvents* = 59 + DontSendCoreEvents* = 60 # End of merged section + +const + ProximityState* = int(1) shl 1 + InProximity* = int(0) shl 1 + OutOfProximity* = int(1) shl 1 + +const + AddToList* = 0 + DeleteFromList* = 1 + +const + KeyClass* = 0 + ButtonClass* = 1 + ValuatorClass* = 2 + FeedbackClass* = 3 + ProximityClass* = 4 + FocusClass* = 5 + OtherClass* = 6 + +const + KbdFeedbackClass* = 0 + PtrFeedbackClass* = 1 + StringFeedbackClass* = 2 + IntegerFeedbackClass* = 3 + LedFeedbackClass* = 4 + BellFeedbackClass* = 5 + +const + devicePointerMotionHint* = 0 + deviceButton1Motion* = 1 + deviceButton2Motion* = 2 + deviceButton3Motion* = 3 + deviceButton4Motion* = 4 + deviceButton5Motion* = 5 + deviceButtonMotion* = 6 + deviceButtonGrab* = 7 + deviceOwnerGrabButton* = 8 + noExtensionEvent* = 9 + +const + XI_BadDevice* = 0 + XI_BadEvent* = 1 + XI_BadMode* = 2 + XI_DeviceBusy* = 3 + XI_BadClass* = 4 # Make XEventClass be a CARD32 for 64 bit servers. Don't affect client + # definition of XEventClass since that would be a library interface change. + # See the top of X.h for more _XSERVER64 magic. + # + +when defined(XSERVER64): + type + XEventClass* = CARD32 +else: + type + XEventClass* = int32 +#****************************************************************** +# * +# * Extension version structure. +# * +# + +type + PXExtensionVersion* = ptr TXExtensionVersion + TXExtensionVersion*{.final.} = object + present*: int16 + major_version*: int16 + minor_version*: int16 + + +# implementation diff --git a/lib/oldwrappers/x11/xinerama.nim b/lib/oldwrappers/x11/xinerama.nim new file mode 100644 index 000000000..96f5d7da3 --- /dev/null +++ b/lib/oldwrappers/x11/xinerama.nim @@ -0,0 +1,25 @@ +# Converted from X11/Xinerama.h +import + xlib + +const + xineramaLib = "libXinerama.so" + +type + PXineramaScreenInfo* = ptr TXineramaScreenInfo + TXineramaScreenInfo*{.final.} = object + screen_number*: cint + x_org*: int16 + y_org*: int16 + width*: int16 + height*: int16 + + +proc XineramaQueryExtension*(dpy: PDisplay, event_base: Pcint, error_base: Pcint): TBool{. + cdecl, dynlib: xineramaLib, importc.} +proc XineramaQueryVersion*(dpy: PDisplay, major: Pcint, minor: Pcint): TStatus{. + cdecl, dynlib: xineramaLib, importc.} +proc XineramaIsActive*(dpy: PDisplay): TBool{.cdecl, dynlib: xineramaLib, importc.} +proc XineramaQueryScreens*(dpy: PDisplay, number: Pcint): PXineramaScreenInfo{. + cdecl, dynlib: xineramaLib, importc.} + diff --git a/lib/oldwrappers/x11/xkb.nim b/lib/oldwrappers/x11/xkb.nim new file mode 100644 index 000000000..f1b0448a8 --- /dev/null +++ b/lib/oldwrappers/x11/xkb.nim @@ -0,0 +1,2409 @@ +# +# $Xorg: XKB.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ +#************************************************************ +# $Xorg: XKBstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ +#************************************************************ +# $Xorg: XKBgeom.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ +#************************************************************ +# +#Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. +# +#Permission to use, copy, modify, and distribute this +#software and its documentation for any purpose and without +#fee is hereby granted, provided that the above copyright +#notice appear in all copies and that both that copyright +#notice and this permission notice appear in supporting +#documentation, and that the name of Silicon Graphics not be +#used in advertising or publicity pertaining to distribution +#of the software without specific prior written permission. +#Silicon Graphics makes no representation about the suitability +#of this software for any purpose. It is provided "as is" +#without any express or implied warranty. +# +#SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +#SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +#AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +#GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL +#DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +#OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +#THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +#******************************************************** +# $XFree86: xc/include/extensions/XKB.h,v 1.5 2002/11/20 04:49:01 dawes Exp $ +# $XFree86: xc/include/extensions/XKBgeom.h,v 3.9 2002/09/18 17:11:40 tsi Exp $ +# +# Pascal Convertion was made by Ido Kannner - kanerido@actcom.net.il +# +#Thanks: +# I want to thanks to oliebol for putting up with all of the problems that was found +# while translating this code. ;) +# +# I want to thanks #fpc channel in freenode irc, for helping me, and to put up with my +# wierd questions ;) +# +# Thanks for mmc in #xlib on freenode irc And so for the channel itself for the helping me to +# understanding some of the problems I had converting this headers and pointing me to resources +# that helped translating this headers. +# +# Ido +# +#History: +# 2004/10/15 - Fixed a bug of accessing second based records by removing "paced record" and +# chnaged it to "reocrd" only. +# 2004/10/04 - 06 - Convertion from the c header of XKBgeom.h. +# 2004/10/03 - Removed the XKBstr_UNIT compiler decleration. Afther the joined files, +# There is no need for it anymore. +# - There is a need to define (for now) XKBgeom (compiler define) in order +# to use the code of it. At this moment, I did not yet converted it to Pascal. +# +# 2004/09/17 - 10/04 - Convertion from the c header of XKBstr. +# +# 2004/10/03 - Joined xkbstr.pas into xkb.pas because of the circular calls problems. +# - Added the history of xkbstr.pas above this addition. +# +# 2004/09/17 - Fixed a wrong convertion number of XkbPerKeyBitArraySize, insted +# of float, it's now converted into integer (as it should have been). +# +# 2004/09/15 - 16 - Convertion from the c header of XKB.h. +# + +import + X, Xlib + +proc XkbCharToInt*(v: int8): int16 +proc XkbIntTo2Chars*(i: int16, h, L: var int8) +proc Xkb2CharsToInt*(h, L: int8): int16 + # + # Common data structures and access macros + # +type + PWord* = ptr array[0..64_000, int16] + PByte* = ptr byte + PXkbStatePtr* = ptr TXkbStateRec + TXkbStateRec*{.final.} = object + group*: int8 + locked_group*: int8 + base_group*: int16 + latched_group*: int16 + mods*: int8 + base_mods*: int8 + latched_mods*: int8 + locked_mods*: int8 + compat_state*: int8 + grab_mods*: int8 + compat_grab_mods*: int8 + lookup_mods*: int8 + compat_lookup_mods*: int8 + ptr_buttons*: int16 + + +proc XkbModLocks*(s: PXkbStatePtr): int8 +proc XkbStateMods*(s: PXkbStatePtr): int16 +proc XkbGroupLock*(s: PXkbStatePtr): int8 +proc XkbStateGroup*(s: PXkbStatePtr): int16 +proc XkbStateFieldFromRec*(s: PXkbStatePtr): int +proc XkbGrabStateFromRec*(s: PXkbStatePtr): int +type + PXkbModsPtr* = ptr TXkbModsRec + TXkbModsRec*{.final.} = object + mask*: int8 # effective mods + real_mods*: int8 + vmods*: int16 + + +type + PXkbKTMapEntryPtr* = ptr TXkbKTMapEntryRec + TXkbKTMapEntryRec*{.final.} = object + active*: bool + level*: int8 + mods*: TXkbModsRec + + +type + PXkbKeyTypePtr* = ptr TXkbKeyTypeRec + TXkbKeyTypeRec*{.final.} = object + mods*: TXkbModsRec + num_levels*: int8 + map_count*: int8 + map*: PXkbKTMapEntryPtr + preserve*: PXkbModsPtr + name*: TAtom + level_names*: TAtom + + +proc XkbNumGroups*(g: int16): int16 +proc XkbOutOfRangeGroupInfo*(g: int16): int16 +proc XkbOutOfRangeGroupAction*(g: int16): int16 +proc XkbOutOfRangeGroupNumber*(g: int16): int16 +proc XkbSetGroupInfo*(g, w, n: int16): int16 +proc XkbSetNumGroups*(g, n: int16): int16 + # + # Structures and access macros used primarily by the server + # +type + PXkbBehavior* = ptr TXkbBehavior + TXkbBehavior*{.final.} = object + theType*: int8 + data*: int8 + + +type + PXkbModAction* = ptr TXkbModAction + TXkbModAction*{.final.} = object + theType*: int8 + flags*: int8 + mask*: int8 + real_mods*: int8 + vmods1*: int8 + vmods2*: int8 + + +proc XkbModActionVMods*(a: PXkbModAction): int16 +proc XkbSetModActionVMods*(a: PXkbModAction, v: int8) +type + PXkbGroupAction* = ptr TXkbGroupAction + TXkbGroupAction*{.final.} = object + theType*: int8 + flags*: int8 + group_XXX*: int8 + + +proc XkbSAGroup*(a: PXkbGroupAction): int8 +proc XkbSASetGroupProc*(a: PXkbGroupAction, g: int8) +type + PXkbISOAction* = ptr TXkbISOAction + TXkbISOAction*{.final.} = object + theType*: int8 + flags*: int8 + mask*: int8 + real_mods*: int8 + group_XXX*: int8 + affect*: int8 + vmods1*: int8 + vmods2*: int8 + + +type + PXkbPtrAction* = ptr TXkbPtrAction + TXkbPtrAction*{.final.} = object + theType*: int8 + flags*: int8 + high_XXX*: int8 + low_XXX*: int8 + high_YYY*: int8 + low_YYY*: int8 + + +proc XkbPtrActionX*(a: PXkbPtrAction): int16 +proc XkbPtrActionY*(a: PXkbPtrAction): int16 +proc XkbSetPtrActionX*(a: PXkbPtrAction, x: int8) +proc XkbSetPtrActionY*(a: PXkbPtrAction, y: int8) +type + PXkbPtrBtnAction* = ptr TXkbPtrBtnAction + TXkbPtrBtnAction*{.final.} = object + theType*: int8 + flags*: int8 + count*: int8 + button*: int8 + + +type + PXkbPtrDfltAction* = ptr TXkbPtrDfltAction + TXkbPtrDfltAction*{.final.} = object + theType*: int8 + flags*: int8 + affect*: int8 + valueXXX*: int8 + + +proc XkbSAPtrDfltValue*(a: PXkbPtrDfltAction): int8 +proc XkbSASetPtrDfltValue*(a: PXkbPtrDfltAction, c: pointer) +type + PXkbSwitchScreenAction* = ptr TXkbSwitchScreenAction + TXkbSwitchScreenAction*{.final.} = object + theType*: int8 + flags*: int8 + screenXXX*: int8 + + +proc XkbSAScreen*(a: PXkbSwitchScreenAction): int8 +proc XkbSASetScreen*(a: PXkbSwitchScreenAction, s: pointer) +type + PXkbCtrlsAction* = ptr TXkbCtrlsAction + TXkbCtrlsAction*{.final.} = object + theType*: int8 + flags*: int8 + ctrls3*: int8 + ctrls2*: int8 + ctrls1*: int8 + ctrls0*: int8 + + +proc XkbActionSetCtrls*(a: PXkbCtrlsAction, c: int8) +proc XkbActionCtrls*(a: PXkbCtrlsAction): int16 +type + PXkbMessageAction* = ptr TXkbMessageAction + TXkbMessageAction*{.final.} = object + theType*: int8 + flags*: int8 + message*: array[0..5, char] + + +type + PXkbRedirectKeyAction* = ptr TXkbRedirectKeyAction + TXkbRedirectKeyAction*{.final.} = object + theType*: int8 + new_key*: int8 + mods_mask*: int8 + mods*: int8 + vmods_mask0*: int8 + vmods_mask1*: int8 + vmods0*: int8 + vmods1*: int8 + + +proc XkbSARedirectVMods*(a: PXkbRedirectKeyAction): int16 +proc XkbSARedirectSetVMods*(a: PXkbRedirectKeyAction, m: int8) +proc XkbSARedirectVModsMask*(a: PXkbRedirectKeyAction): int16 +proc XkbSARedirectSetVModsMask*(a: PXkbRedirectKeyAction, m: int8) +type + PXkbDeviceBtnAction* = ptr TXkbDeviceBtnAction + TXkbDeviceBtnAction*{.final.} = object + theType*: int8 + flags*: int8 + count*: int8 + button*: int8 + device*: int8 + + +type + PXkbDeviceValuatorAction* = ptr TXkbDeviceValuatorAction + TXkbDeviceValuatorAction*{.final.} = object # + # Macros to classify key actions + # + theType*: int8 + device*: int8 + v1_what*: int8 + v1_ndx*: int8 + v1_value*: int8 + v2_what*: int8 + v2_ndx*: int8 + v2_value*: int8 + + +const + XkbAnyActionDataSize* = 7 + +type + PXkbAnyAction* = ptr TXkbAnyAction + TXkbAnyAction*{.final.} = object + theType*: int8 + data*: array[0..XkbAnyActionDataSize - 1, int8] + + +proc XkbIsModAction*(a: PXkbAnyAction): bool +proc XkbIsGroupAction*(a: PXkbAnyAction): bool +proc XkbIsPtrAction*(a: PXkbAnyAction): bool +type + PXkbAction* = ptr TXkbAction + TXkbAction*{.final.} = object # + # XKB request codes, used in: + # - xkbReqType field of all requests + # - requestMinor field of some events + # + any*: TXkbAnyAction + mods*: TXkbModAction + group*: TXkbGroupAction + iso*: TXkbISOAction + thePtr*: TXkbPtrAction + btn*: TXkbPtrBtnAction + dflt*: TXkbPtrDfltAction + screen*: TXkbSwitchScreenAction + ctrls*: TXkbCtrlsAction + msg*: TXkbMessageAction + redirect*: TXkbRedirectKeyAction + devbtn*: TXkbDeviceBtnAction + devval*: TXkbDeviceValuatorAction + theType*: int8 + + +const + X_kbUseExtension* = 0 + X_kbSelectEvents* = 1 + X_kbBell* = 3 + X_kbGetState* = 4 + X_kbLatchLockState* = 5 + X_kbGetControls* = 6 + X_kbSetControls* = 7 + X_kbGetMap* = 8 + X_kbSetMap* = 9 + X_kbGetCompatMap* = 10 + X_kbSetCompatMap* = 11 + X_kbGetIndicatorState* = 12 + X_kbGetIndicatorMap* = 13 + X_kbSetIndicatorMap* = 14 + X_kbGetNamedIndicator* = 15 + X_kbSetNamedIndicator* = 16 + X_kbGetNames* = 17 + X_kbSetNames* = 18 + X_kbGetGeometry* = 19 + X_kbSetGeometry* = 20 + X_kbPerClientFlags* = 21 + X_kbListComponents* = 22 + X_kbGetKbdByName* = 23 + X_kbGetDeviceInfo* = 24 + X_kbSetDeviceInfo* = 25 + X_kbSetDebuggingFlags* = 101 # + # In the X sense, XKB reports only one event. + # The type field of all XKB events is XkbEventCode + # + +const + XkbEventCode* = 0 + XkbNumberEvents* = XkbEventCode + 1 # + # XKB has a minor event code so it can use one X event code for + # multiple purposes. + # - reported in the xkbType field of all XKB events. + # - XkbSelectEventDetails: Indicates the event for which event details + # are being changed + # + +const + XkbNewKeyboardNotify* = 0 + XkbMapNotify* = 1 + XkbStateNotify* = 2 + XkbControlsNotify* = 3 + XkbIndicatorStateNotify* = 4 + XkbIndicatorMapNotify* = 5 + XkbNamesNotify* = 6 + XkbCompatMapNotify* = 7 + XkbBellNotify* = 8 + XkbActionMessage* = 9 + XkbAccessXNotify* = 10 + XkbExtensionDeviceNotify* = 11 # + # Event Mask: + # - XkbSelectEvents: Specifies event interest. + # + +const + XkbNewKeyboardNotifyMask* = int(1) shl 0 + XkbMapNotifyMask* = int(1) shl 1 + XkbStateNotifyMask* = int(1) shl 2 + XkbControlsNotifyMask* = int(1) shl 3 + XkbIndicatorStateNotifyMask* = int(1) shl 4 + XkbIndicatorMapNotifyMask* = int(1) shl 5 + XkbNamesNotifyMask* = int(1) shl 6 + XkbCompatMapNotifyMask* = int(1) shl 7 + XkbBellNotifyMask* = int(1) shl 8 + XkbActionMessageMask* = int(1) shl 9 + XkbAccessXNotifyMask* = int(1) shl 10 + XkbExtensionDeviceNotifyMask* = int(1) shl 11 + XkbAllEventsMask* = 0x00000FFF # + # NewKeyboardNotify event details: + # + +const + XkbNKN_KeycodesMask* = int(1) shl 0 + XkbNKN_GeometryMask* = int(1) shl 1 + XkbNKN_DeviceIDMask* = int(1) shl 2 + XkbAllNewKeyboardEventsMask* = 0x00000007 # + # AccessXNotify event types: + # - The 'what' field of AccessXNotify events reports the + # reason that the event was generated. + # + +const + XkbAXN_SKPress* = 0 + XkbAXN_SKAccept* = 1 + XkbAXN_SKReject* = 2 + XkbAXN_SKRelease* = 3 + XkbAXN_BKAccept* = 4 + XkbAXN_BKReject* = 5 + XkbAXN_AXKWarning* = 6 # + # AccessXNotify details: + # - Used as an event detail mask to limit the conditions under which + # AccessXNotify events are reported + # + +const + XkbAXN_SKPressMask* = int(1) shl 0 + XkbAXN_SKAcceptMask* = int(1) shl 1 + XkbAXN_SKRejectMask* = int(1) shl 2 + XkbAXN_SKReleaseMask* = int(1) shl 3 + XkbAXN_BKAcceptMask* = int(1) shl 4 + XkbAXN_BKRejectMask* = int(1) shl 5 + XkbAXN_AXKWarningMask* = int(1) shl 6 + XkbAllAccessXEventsMask* = 0x0000000F # + # State detail mask: + # - The 'changed' field of StateNotify events reports which of + # the keyboard state components have changed. + # - Used as an event detail mask to limit the conditions under + # which StateNotify events are reported. + # + +const + XkbModifierStateMask* = int(1) shl 0 + XkbModifierBaseMask* = int(1) shl 1 + XkbModifierLatchMask* = int(1) shl 2 + XkbModifierLockMask* = int(1) shl 3 + XkbGroupStateMask* = int(1) shl 4 + XkbGroupBaseMask* = int(1) shl 5 + XkbGroupLatchMask* = int(1) shl 6 + XkbGroupLockMask* = int(1) shl 7 + XkbCompatStateMask* = int(1) shl 8 + XkbGrabModsMask* = int(1) shl 9 + XkbCompatGrabModsMask* = int(1) shl 10 + XkbLookupModsMask* = int(1) shl 11 + XkbCompatLookupModsMask* = int(1) shl 12 + XkbPointerButtonMask* = int(1) shl 13 + XkbAllStateComponentsMask* = 0x00003FFF # + # Controls detail masks: + # The controls specified in XkbAllControlsMask: + # - The 'changed' field of ControlsNotify events reports which of + # the keyboard controls have changed. + # - The 'changeControls' field of the SetControls request specifies + # the controls for which values are to be changed. + # - Used as an event detail mask to limit the conditions under + # which ControlsNotify events are reported. + # + # The controls specified in the XkbAllBooleanCtrlsMask: + # - The 'enabledControls' field of ControlsNotify events reports the + # current status of the boolean controls. + # - The 'enabledControlsChanges' field of ControlsNotify events reports + # any boolean controls that have been turned on or off. + # - The 'affectEnabledControls' and 'enabledControls' fields of the + # kbSetControls request change the set of enabled controls. + # - The 'accessXTimeoutMask' and 'accessXTimeoutValues' fields of + # an XkbControlsRec specify the controls to be changed if the keyboard + # times out and the values to which they should be changed. + # - The 'autoCtrls' and 'autoCtrlsValues' fields of the PerClientFlags + # request specifies the specify the controls to be reset when the + # client exits and the values to which they should be reset. + # - The 'ctrls' field of an indicator map specifies the controls + # that drive the indicator. + # - Specifies the boolean controls affected by the SetControls and + # LockControls key actions. + # + +const + XkbRepeatKeysMask* = int(1) shl 0 + XkbSlowKeysMask* = int(1) shl 1 + XkbBounceKeysMask* = int(1) shl 2 + XkbStickyKeysMask* = int(1) shl 3 + XkbMouseKeysMask* = int(1) shl 4 + XkbMouseKeysAccelMask* = int(1) shl 5 + XkbAccessXKeysMask* = int(1) shl 6 + XkbAccessXTimeoutMask* = int(1) shl 7 + XkbAccessXFeedbackMask* = int(1) shl 8 + XkbAudibleBellMask* = int(1) shl 9 + XkbOverlay1Mask* = int(1) shl 10 + XkbOverlay2Mask* = int(1) shl 11 + XkbIgnoreGroupLockMask* = int(1) shl 12 + XkbGroupsWrapMask* = int(1) shl 27 + XkbInternalModsMask* = int(1) shl 28 + XkbIgnoreLockModsMask* = int(1) shl 29 + XkbPerKeyRepeatMask* = int(1) shl 30 + XkbControlsEnabledMask* = int(1) shl 31 + XkbAccessXOptionsMask* = XkbStickyKeysMask or XkbAccessXFeedbackMask + XkbAllBooleanCtrlsMask* = 0x00001FFF + XkbAllControlsMask* = 0xF8001FFF # + # Compatibility Map Compontents: + # - Specifies the components to be allocated in XkbAllocCompatMap. + # + +const + XkbSymInterpMask* = 1 shl 0 + XkbGroupCompatMask* = 1 shl 1 + XkbAllCompatMask* = 0x00000003 # + # Assorted constants and limits. + # + +const + XkbAllIndicatorsMask* = 0xFFFFFFFF # + # Map components masks: + # Those in AllMapComponentsMask: + # - Specifies the individual fields to be loaded or changed for the + # GetMap and SetMap requests. + # Those in ClientInfoMask: + # - Specifies the components to be allocated by XkbAllocClientMap. + # Those in ServerInfoMask: + # - Specifies the components to be allocated by XkbAllocServerMap. + # + +const + XkbKeyTypesMask* = 1 shl 0 + XkbKeySymsMask* = 1 shl 1 + XkbModifierMapMask* = 1 shl 2 + XkbExplicitComponentsMask* = 1 shl 3 + XkbKeyActionsMask* = 1 shl 4 + XkbKeyBehaviorsMask* = 1 shl 5 + XkbVirtualModsMask* = 1 shl 6 + XkbVirtualModMapMask* = 1 shl 7 + XkbAllClientInfoMask* = XkbKeyTypesMask or XkbKeySymsMask or + XkbModifierMapMask + XkbAllServerInfoMask* = XkbExplicitComponentsMask or XkbKeyActionsMask or + XkbKeyBehaviorsMask or XkbVirtualModsMask or XkbVirtualModMapMask + XkbAllMapComponentsMask* = XkbAllClientInfoMask or XkbAllServerInfoMask # + # Names component mask: + # - Specifies the names to be loaded or changed for the GetNames and + # SetNames requests. + # - Specifies the names that have changed in a NamesNotify event. + # - Specifies the names components to be allocated by XkbAllocNames. + # + +const + XkbKeycodesNameMask* = 1 shl 0 + XkbGeometryNameMask* = 1 shl 1 + XkbSymbolsNameMask* = 1 shl 2 + XkbPhysSymbolsNameMask* = 1 shl 3 + XkbTypesNameMask* = 1 shl 4 + XkbCompatNameMask* = 1 shl 5 + XkbKeyTypeNamesMask* = 1 shl 6 + XkbKTLevelNamesMask* = 1 shl 7 + XkbIndicatorNamesMask* = 1 shl 8 + XkbKeyNamesMask* = 1 shl 9 + XkbKeyAliasesMask* = 1 shl 10 + XkbVirtualModNamesMask* = 1 shl 11 + XkbGroupNamesMask* = 1 shl 12 + XkbRGNamesMask* = 1 shl 13 + XkbComponentNamesMask* = 0x0000003F + XkbAllNamesMask* = 0x00003FFF # + # Miscellaneous event details: + # - event detail masks for assorted events that don't reall + # have any details. + # + +const + XkbAllStateEventsMask* = XkbAllStateComponentsMask + XkbAllMapEventsMask* = XkbAllMapComponentsMask + XkbAllControlEventsMask* = XkbAllControlsMask + XkbAllIndicatorEventsMask* = XkbAllIndicatorsMask + XkbAllNameEventsMask* = XkbAllNamesMask + XkbAllCompatMapEventsMask* = XkbAllCompatMask + XkbAllBellEventsMask* = int(1) shl 0 + XkbAllActionMessagesMask* = int(1) shl 0 # + # XKB reports one error: BadKeyboard + # A further reason for the error is encoded into to most significant + # byte of the resourceID for the error: + # XkbErr_BadDevice - the device in question was not found + # XkbErr_BadClass - the device was found but it doesn't belong to + # the appropriate class. + # XkbErr_BadId - the device was found and belongs to the right + # class, but not feedback with a matching id was + # found. + # The low byte of the resourceID for this error contains the device + # id, class specifier or feedback id that failed. + # + +const + XkbKeyboard* = 0 + XkbNumberErrors* = 1 + XkbErr_BadDevice* = 0x000000FF + XkbErr_BadClass* = 0x000000FE + XkbErr_BadId* = 0x000000FD # + # Keyboard Components Mask: + # - Specifies the components that follow a GetKeyboardByNameReply + # + +const + XkbClientMapMask* = int(1) shl 0 + XkbServerMapMask* = int(1) shl 1 + XkbCompatMapMask* = int(1) shl 2 + XkbIndicatorMapMask* = int(1) shl 3 + XkbNamesMask* = int(1) shl 4 + XkbGeometryMask* = int(1) shl 5 + XkbControlsMask* = int(1) shl 6 + XkbAllComponentsMask* = 0x0000007F # + # AccessX Options Mask + # - The 'accessXOptions' field of an XkbControlsRec specifies the + # AccessX options that are currently in effect. + # - The 'accessXTimeoutOptionsMask' and 'accessXTimeoutOptionsValues' + # fields of an XkbControlsRec specify the Access X options to be + # changed if the keyboard times out and the values to which they + # should be changed. + # + +const + XkbAX_SKPressFBMask* = int(1) shl 0 + XkbAX_SKAcceptFBMask* = int(1) shl 1 + XkbAX_FeatureFBMask* = int(1) shl 2 + XkbAX_SlowWarnFBMask* = int(1) shl 3 + XkbAX_IndicatorFBMask* = int(1) shl 4 + XkbAX_StickyKeysFBMask* = int(1) shl 5 + XkbAX_TwoKeysMask* = int(1) shl 6 + XkbAX_LatchToLockMask* = int(1) shl 7 + XkbAX_SKReleaseFBMask* = int(1) shl 8 + XkbAX_SKRejectFBMask* = int(1) shl 9 + XkbAX_BKRejectFBMask* = int(1) shl 10 + XkbAX_DumbBellFBMask* = int(1) shl 11 + XkbAX_FBOptionsMask* = 0x00000F3F + XkbAX_SKOptionsMask* = 0x000000C0 + XkbAX_AllOptionsMask* = 0x00000FFF # + # XkbUseCoreKbd is used to specify the core keyboard without having + # to look up its X input extension identifier. + # XkbUseCorePtr is used to specify the core pointer without having + # to look up its X input extension identifier. + # XkbDfltXIClass is used to specify "don't care" any place that the + # XKB protocol is looking for an X Input Extension + # device class. + # XkbDfltXIId is used to specify "don't care" any place that the + # XKB protocol is looking for an X Input Extension + # feedback identifier. + # XkbAllXIClasses is used to get information about all device indicators, + # whether they're part of the indicator feedback class + # or the keyboard feedback class. + # XkbAllXIIds is used to get information about all device indicator + # feedbacks without having to list them. + # XkbXINone is used to indicate that no class or id has been specified. + # XkbLegalXILedClass(c) True if 'c' specifies a legal class with LEDs + # XkbLegalXIBellClass(c) True if 'c' specifies a legal class with bells + # XkbExplicitXIDevice(d) True if 'd' explicitly specifies a device + # XkbExplicitXIClass(c) True if 'c' explicitly specifies a device class + # XkbExplicitXIId(c) True if 'i' explicitly specifies a device id + # XkbSingleXIClass(c) True if 'c' specifies exactly one device class, + # including the default. + # XkbSingleXIId(i) True if 'i' specifies exactly one device + # identifier, including the default. + # + +const + XkbUseCoreKbd* = 0x00000100 + XkbUseCorePtr* = 0x00000200 + XkbDfltXIClass* = 0x00000300 + XkbDfltXIId* = 0x00000400 + XkbAllXIClasses* = 0x00000500 + XkbAllXIIds* = 0x00000600 + XkbXINone* = 0x0000FF00 + +proc XkbLegalXILedClass*(c: int): bool +proc XkbLegalXIBellClass*(c: int): bool +proc XkbExplicitXIDevice*(c: int): bool +proc XkbExplicitXIClass*(c: int): bool +proc XkbExplicitXIId*(c: int): bool +proc XkbSingleXIClass*(c: int): bool +proc XkbSingleXIId*(c: int): bool +const + XkbNoModifier* = 0x000000FF + XkbNoShiftLevel* = 0x000000FF + XkbNoShape* = 0x000000FF + XkbNoIndicator* = 0x000000FF + XkbNoModifierMask* = 0 + XkbAllModifiersMask* = 0x000000FF + XkbAllVirtualModsMask* = 0x0000FFFF + XkbNumKbdGroups* = 4 + XkbMaxKbdGroup* = XkbNumKbdGroups - 1 + XkbMaxMouseKeysBtn* = 4 # + # Group Index and Mask: + # - Indices into the kt_index array of a key type. + # - Mask specifies types to be changed for XkbChangeTypesOfKey + # + +const + XkbGroup1Index* = 0 + XkbGroup2Index* = 1 + XkbGroup3Index* = 2 + XkbGroup4Index* = 3 + XkbAnyGroup* = 254 + XkbAllGroups* = 255 + XkbGroup1Mask* = 1 shl 0 + XkbGroup2Mask* = 1 shl 1 + XkbGroup3Mask* = 1 shl 2 + XkbGroup4Mask* = 1 shl 3 + XkbAnyGroupMask* = 1 shl 7 + XkbAllGroupsMask* = 0x0000000F # + # BuildCoreState: Given a keyboard group and a modifier state, + # construct the value to be reported an event. + # GroupForCoreState: Given the state reported in an event, + # determine the keyboard group. + # IsLegalGroup: Returns TRUE if 'g' is a valid group index. + # + +proc XkbBuildCoreState*(m, g: int): int +proc XkbGroupForCoreState*(s: int): int +proc XkbIsLegalGroup*(g: int): bool + # + # GroupsWrap values: + # - The 'groupsWrap' field of an XkbControlsRec specifies the + # treatment of out of range groups. + # - Bits 6 and 7 of the group info field of a key symbol map + # specify the interpretation of out of range groups for the + # corresponding key. + # +const + XkbWrapIntoRange* = 0x00000000 + XkbClampIntoRange* = 0x00000040 + XkbRedirectIntoRange* = 0x00000080 # + # Action flags: Reported in the 'flags' field of most key actions. + # Interpretation depends on the type of the action; not all actions + # accept all flags. + # + # Option Used for Actions + # ------ ---------------- + # ClearLocks SetMods, LatchMods, SetGroup, LatchGroup + # LatchToLock SetMods, LatchMods, SetGroup, LatchGroup + # LockNoLock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn + # LockNoUnlock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn + # UseModMapMods SetMods, LatchMods, LockMods, ISOLock + # GroupAbsolute SetGroup, LatchGroup, LockGroup, ISOLock + # UseDfltButton PtrBtn, LockPtrBtn + # NoAcceleration MovePtr + # MoveAbsoluteX MovePtr + # MoveAbsoluteY MovePtr + # ISODfltIsGroup ISOLock + # ISONoAffectMods ISOLock + # ISONoAffectGroup ISOLock + # ISONoAffectPtr ISOLock + # ISONoAffectCtrls ISOLock + # MessageOnPress ActionMessage + # MessageOnRelease ActionMessage + # MessageGenKeyEvent ActionMessage + # AffectDfltBtn SetPtrDflt + # DfltBtnAbsolute SetPtrDflt + # SwitchApplication SwitchScreen + # SwitchAbsolute SwitchScreen + # + +const + XkbSA_ClearLocks* = int(1) shl 0 + XkbSA_LatchToLock* = int(1) shl 1 + XkbSA_LockNoLock* = int(1) shl 0 + XkbSA_LockNoUnlock* = int(1) shl 1 + XkbSA_UseModMapMods* = int(1) shl 2 + XkbSA_GroupAbsolute* = int(1) shl 2 + XkbSA_UseDfltButton* = 0 + XkbSA_NoAcceleration* = int(1) shl 0 + XkbSA_MoveAbsoluteX* = int(1) shl 1 + XkbSA_MoveAbsoluteY* = int(1) shl 2 + XkbSA_ISODfltIsGroup* = int(1) shl 7 + XkbSA_ISONoAffectMods* = int(1) shl 6 + XkbSA_ISONoAffectGroup* = int(1) shl 5 + XkbSA_ISONoAffectPtr* = int(1) shl 4 + XkbSA_ISONoAffectCtrls* = int(1) shl 3 + XkbSA_ISOAffectMask* = 0x00000078 + XkbSA_MessageOnPress* = int(1) shl 0 + XkbSA_MessageOnRelease* = int(1) shl 1 + XkbSA_MessageGenKeyEvent* = int(1) shl 2 + XkbSA_AffectDfltBtn* = 1 + XkbSA_DfltBtnAbsolute* = int(1) shl 2 + XkbSA_SwitchApplication* = int(1) shl 0 + XkbSA_SwitchAbsolute* = int(1) shl 2 # + # The following values apply to the SA_DeviceValuator + # action only. Valuator operations specify the action + # to be taken. Values specified in the action are + # multiplied by 2^scale before they are applied. + # + +const + XkbSA_IgnoreVal* = 0x00000000 + XkbSA_SetValMin* = 0x00000010 + XkbSA_SetValCenter* = 0x00000020 + XkbSA_SetValMax* = 0x00000030 + XkbSA_SetValRelative* = 0x00000040 + XkbSA_SetValAbsolute* = 0x00000050 + XkbSA_ValOpMask* = 0x00000070 + XkbSA_ValScaleMask* = 0x00000007 + +proc XkbSA_ValOp*(a: int): int +proc XkbSA_ValScale*(a: int): int + # + # Action types: specifies the type of a key action. Reported in the + # type field of all key actions. + # +const + XkbSA_NoAction* = 0x00000000 + XkbSA_SetMods* = 0x00000001 + XkbSA_LatchMods* = 0x00000002 + XkbSA_LockMods* = 0x00000003 + XkbSA_SetGroup* = 0x00000004 + XkbSA_LatchGroup* = 0x00000005 + XkbSA_LockGroup* = 0x00000006 + XkbSA_MovePtr* = 0x00000007 + XkbSA_PtrBtn* = 0x00000008 + XkbSA_LockPtrBtn* = 0x00000009 + XkbSA_SetPtrDflt* = 0x0000000A + XkbSA_ISOLock* = 0x0000000B + XkbSA_Terminate* = 0x0000000C + XkbSA_SwitchScreen* = 0x0000000D + XkbSA_SetControls* = 0x0000000E + XkbSA_LockControls* = 0x0000000F + XkbSA_ActionMessage* = 0x00000010 + XkbSA_RedirectKey* = 0x00000011 + XkbSA_DeviceBtn* = 0x00000012 + XkbSA_LockDeviceBtn* = 0x00000013 + XkbSA_DeviceValuator* = 0x00000014 + XkbSA_LastAction* = XkbSA_DeviceValuator + XkbSA_NumActions* = XkbSA_LastAction + 1 + +const + XkbSA_XFree86Private* = 0x00000086 +# +# Specifies the key actions that clear latched groups or modifiers. +# + +const ##define XkbSA_BreakLatch \ + # ((1<<XkbSA_NoAction)|(1<<XkbSA_PtrBtn)|(1<<XkbSA_LockPtrBtn)|\ + # (1<<XkbSA_Terminate)|(1<<XkbSA_SwitchScreen)|(1<<XkbSA_SetControls)|\ + # (1<<XkbSA_LockControls)|(1<<XkbSA_ActionMessage)|\ + # (1<<XkbSA_RedirectKey)|(1<<XkbSA_DeviceBtn)|(1<<XkbSA_LockDeviceBtn)) + # + XkbSA_BreakLatch* = (1 shl XkbSA_PtrBtn) or (1 shl XkbSA_LockPtrBtn) or + (1 shl XkbSA_Terminate) or (1 shl XkbSA_SwitchScreen) or + (1 shl XkbSA_SetControls) or (1 shl XkbSA_LockControls) or + (1 shl XkbSA_ActionMessage) or (1 shl XkbSA_RedirectKey) or + (1 shl XkbSA_DeviceBtn) or (1 shl XkbSA_LockDeviceBtn) # + # Key Behavior Qualifier: + # KB_Permanent indicates that the behavior describes an unalterable + # characteristic of the keyboard, not an XKB software-simulation of + # the listed behavior. + # Key Behavior Types: + # Specifies the behavior of the underlying key. + # + +const + XkbKB_Permanent* = 0x00000080 + XkbKB_OpMask* = 0x0000007F + XkbKB_Default* = 0x00000000 + XkbKB_Lock* = 0x00000001 + XkbKB_RadioGroup* = 0x00000002 + XkbKB_Overlay1* = 0x00000003 + XkbKB_Overlay2* = 0x00000004 + XkbKB_RGAllowNone* = 0x00000080 # + # Various macros which describe the range of legal keycodes. + # + +const + XkbMinLegalKeyCode* = 8 + XkbMaxLegalKeyCode* = 255 + XkbMaxKeyCount* = XkbMaxLegalKeyCode - XkbMinLegalKeyCode + 1 + XkbPerKeyBitArraySize* = (XkbMaxLegalKeyCode + 1) div 8 + +proc XkbIsLegalKeycode*(k: int): bool +type + PXkbControlsPtr* = ptr TXkbControlsRec + TXkbControlsRec*{.final.} = object + mk_dflt_btn*: int8 + num_groups*: int8 + groups_wrap*: int8 + internal*: TXkbModsRec + ignore_lock*: TXkbModsRec + enabled_ctrls*: int16 + repeat_delay*: int16 + repeat_interval*: int16 + slow_keys_delay*: int16 + debounce_delay*: int16 + mk_delay*: int16 + mk_interval*: int16 + mk_time_to_max*: int16 + mk_max_speed*: int16 + mk_curve*: int16 + ax_options*: int16 + ax_timeout*: int16 + axt_opts_mask*: int16 + axt_opts_values*: int16 + axt_ctrls_mask*: int16 + axt_ctrls_values*: int16 + per_key_repeat*: array[0..XkbPerKeyBitArraySize - 1, int8] + + +proc XkbAX_AnyFeedback*(c: PXkbControlsPtr): int16 +proc XkbAX_NeedOption*(c: PXkbControlsPtr, w: int16): int16 +proc XkbAX_NeedFeedback*(c: PXkbControlsPtr, w: int16): bool + # + # Assorted constants and limits. + # +const + XkbNumModifiers* = 8 + XkbNumVirtualMods* = 16 + XkbNumIndicators* = 32 + XkbMaxRadioGroups* = 32 + XkbAllRadioGroupsMask* = 0xFFFFFFFF + XkbMaxShiftLevel* = 63 + XkbMaxSymsPerKey* = XkbMaxShiftLevel * XkbNumKbdGroups + XkbRGMaxMembers* = 12 + XkbActionMessageLength* = 6 + XkbKeyNameLength* = 4 + XkbMaxRedirectCount* = 8 + XkbGeomPtsPerMM* = 10 + XkbGeomMaxColors* = 32 + XkbGeomMaxLabelColors* = 3 + XkbGeomMaxPriority* = 255 + +type + PXkbServerMapPtr* = ptr TXkbServerMapRec + TXkbServerMapRec*{.final.} = object + num_acts*: int16 + size_acts*: int16 + acts*: ptr array[0..0xfff, TXkbAction] + behaviors*: PXkbBehavior + key_acts*: PWord + explicit*: PByte + vmods*: array[0..XkbNumVirtualMods - 1, int8] + vmodmap*: PWord + + +proc XkbSMKeyActionsPtr*(m: PXkbServerMapPtr, k: int16): PXkbAction + # + # Structures and access macros used primarily by clients + # +type + PXkbSymMapPtr* = ptr TXkbSymMapRec + TXkbSymMapRec*{.final.} = object + kt_index*: array[0..XkbNumKbdGroups - 1, int8] + group_info*: int8 + width*: int8 + offset*: int8 + + +type + PXkbClientMapPtr* = ptr TXkbClientMapRec + TXkbClientMapRec*{.final.} = object + size_types*: int8 + num_types*: int8 + types*: ptr array[0..0xffff, TXkbKeyTypeRec] + size_syms*: int16 + num_syms*: int16 + syms*: ptr array[0..0xffff, TKeySym] + key_sym_map*: ptr array[0..0xffff, TXkbSymMapRec] + modmap*: PByte + + +proc XkbCMKeyGroupInfo*(m: PXkbClientMapPtr, k: int16): int8 +proc XkbCMKeyNumGroups*(m: PXkbClientMapPtr, k: int16): int8 +proc XkbCMKeyGroupWidth*(m: PXkbClientMapPtr, k: int16, g: int8): int8 +proc XkbCMKeyGroupsWidth*(m: PXkbClientMapPtr, k: int16): int8 +proc XkbCMKeyTypeIndex*(m: PXkbClientMapPtr, k: int16, g: int8): int8 +proc XkbCMKeyType*(m: PXkbClientMapPtr, k: int16, g: int8): PXkbKeyTypePtr +proc XkbCMKeyNumSyms*(m: PXkbClientMapPtr, k: int16): int16 +proc XkbCMKeySymsOffset*(m: PXkbClientMapPtr, k: int16): int8 + # + # Compatibility structures and access macros + # +type + PXkbSymInterpretPtr* = ptr TXkbSymInterpretRec + TXkbSymInterpretRec*{.final.} = object + sym*: TKeySym + flags*: int8 + match*: int8 + mods*: int8 + virtual_mod*: int8 + act*: TXkbAnyAction + + +type + PXkbCompatMapPtr* = ptr TXkbCompatMapRec + TXkbCompatMapRec*{.final.} = object + sym_interpret*: PXkbSymInterpretPtr + groups*: array[0..XkbNumKbdGroups - 1, TXkbModsRec] + num_si*: int16 + size_si*: int16 + + +type + PXkbIndicatorMapPtr* = ptr TXkbIndicatorMapRec + TXkbIndicatorMapRec*{.final.} = object + flags*: int8 + which_groups*: int8 + groups*: int8 + which_mods*: int8 + mods*: TXkbModsRec + ctrls*: int16 + + +proc XkbIM_IsAuto*(i: PXkbIndicatorMapPtr): bool +proc XkbIM_InUse*(i: PXkbIndicatorMapPtr): bool +type + PXkbIndicatorPtr* = ptr TXkbIndicatorRec + TXkbIndicatorRec*{.final.} = object + phys_indicators*: int32 + maps*: array[0..XkbNumIndicators - 1, TXkbIndicatorMapRec] + + +type + PXkbKeyNamePtr* = ptr TXkbKeyNameRec + TXkbKeyNameRec*{.final.} = object + name*: array[0..XkbKeyNameLength - 1, Char] + + +type + PXkbKeyAliasPtr* = ptr TXkbKeyAliasRec + TXkbKeyAliasRec*{.final.} = object # + # Names for everything + # + float*: array[0..XkbKeyNameLength - 1, Char] + alias*: array[0..XkbKeyNameLength - 1, Char] + + +type + PXkbNamesPtr* = ptr TXkbNamesRec + TXkbNamesRec*{.final.} = object # + # Key Type index and mask for the four standard key types. + # + keycodes*: TAtom + geometry*: TAtom + symbols*: TAtom + types*: TAtom + compat*: TAtom + vmods*: array[0..XkbNumVirtualMods - 1, TAtom] + indicators*: array[0..XkbNumIndicators - 1, TAtom] + groups*: array[0..XkbNumKbdGroups - 1, TAtom] + keys*: PXkbKeyNamePtr + key_aliases*: PXkbKeyAliasPtr + radio_groups*: PAtom + phys_symbols*: TAtom + num_keys*: int8 + num_key_aliases*: int8 + num_rg*: int16 + + +const + XkbOneLevelIndex* = 0 + XkbTwoLevelIndex* = 1 + XkbAlphabeticIndex* = 2 + XkbKeypadIndex* = 3 + XkbLastRequiredType* = XkbKeypadIndex + XkbNumRequiredTypes* = XkbLastRequiredType + 1 + XkbMaxKeyTypes* = 255 + XkbOneLevelMask* = 1 shl 0 + XkbTwoLevelMask* = 1 shl 1 + XkbAlphabeticMask* = 1 shl 2 + XkbKeypadMask* = 1 shl 3 + XkbAllRequiredTypes* = 0x0000000F + +proc XkbShiftLevel*(n: int8): int8 +proc XkbShiftLevelMask*(n: int8): int8 + # + # Extension name and version information + # +const + XkbName* = "XKEYBOARD" + XkbMajorVersion* = 1 + XkbMinorVersion* = 0 # + # Explicit map components: + # - Used in the 'explicit' field of an XkbServerMap. Specifies + # the keyboard components that should _not_ be updated automatically + # in response to core protocol keyboard mapping requests. + # + +const + XkbExplicitKeyTypesMask* = 0x0000000F + XkbExplicitKeyType1Mask* = 1 shl 0 + XkbExplicitKeyType2Mask* = 1 shl 1 + XkbExplicitKeyType3Mask* = 1 shl 2 + XkbExplicitKeyType4Mask* = 1 shl 3 + XkbExplicitInterpretMask* = 1 shl 4 + XkbExplicitAutoRepeatMask* = 1 shl 5 + XkbExplicitBehaviorMask* = 1 shl 6 + XkbExplicitVModMapMask* = 1 shl 7 + XkbAllExplicitMask* = 0x000000FF # + # Symbol interpretations flags: + # - Used in the flags field of a symbol interpretation + # + +const + XkbSI_AutoRepeat* = 1 shl 0 + XkbSI_LockingKey* = 1 shl 1 # + # Symbol interpretations match specification: + # - Used in the match field of a symbol interpretation to specify + # the conditions under which an interpretation is used. + # + +const + XkbSI_LevelOneOnly* = 0x00000080 + XkbSI_OpMask* = 0x0000007F + XkbSI_NoneOf* = 0 + XkbSI_AnyOfOrNone* = 1 + XkbSI_AnyOf* = 2 + XkbSI_AllOf* = 3 + XkbSI_Exactly* = 4 # + # Indicator map flags: + # - Used in the flags field of an indicator map to indicate the + # conditions under which and indicator can be changed and the + # effects of changing the indicator. + # + +const + XkbIM_NoExplicit* = int(1) shl 7 + XkbIM_NoAutomatic* = int(1) shl 6 + XkbIM_LEDDrivesKB* = int(1) shl 5 # + # Indicator map component specifications: + # - Used by the 'which_groups' and 'which_mods' fields of an indicator + # map to specify which keyboard components should be used to drive + # the indicator. + # + +const + XkbIM_UseBase* = int(1) shl 0 + XkbIM_UseLatched* = int(1) shl 1 + XkbIM_UseLocked* = int(1) shl 2 + XkbIM_UseEffective* = int(1) shl 3 + XkbIM_UseCompat* = int(1) shl 4 + XkbIM_UseNone* = 0 + XkbIM_UseAnyGroup* = XkbIM_UseBase or XkbIM_UseLatched or XkbIM_UseLocked or + XkbIM_UseEffective + XkbIM_UseAnyMods* = XkbIM_UseAnyGroup or XkbIM_UseCompat # + # GetByName components: + # - Specifies desired or necessary components to GetKbdByName request. + # - Reports the components that were found in a GetKbdByNameReply + # + +const + XkbGBN_TypesMask* = int(1) shl 0 + XkbGBN_CompatMapMask* = int(1) shl 1 + XkbGBN_ClientSymbolsMask* = int(1) shl 2 + XkbGBN_ServerSymbolsMask* = int(1) shl 3 + XkbGBN_SymbolsMask* = XkbGBN_ClientSymbolsMask or XkbGBN_ServerSymbolsMask + XkbGBN_IndicatorMapMask* = int(1) shl 4 + XkbGBN_KeyNamesMask* = int(1) shl 5 + XkbGBN_GeometryMask* = int(1) shl 6 + XkbGBN_OtherNamesMask* = int(1) shl 7 + XkbGBN_AllComponentsMask* = 0x000000FF # + # ListComponents flags + # + +const + XkbLC_Hidden* = int(1) shl 0 + XkbLC_Default* = int(1) shl 1 + XkbLC_Partial* = int(1) shl 2 + XkbLC_AlphanumericKeys* = int(1) shl 8 + XkbLC_ModifierKeys* = int(1) shl 9 + XkbLC_KeypadKeys* = int(1) shl 10 + XkbLC_FunctionKeys* = int(1) shl 11 + XkbLC_AlternateGroup* = int(1) shl 12 # + # X Input Extension Interactions + # - Specifies the possible interactions between XKB and the X input + # extension + # - Used to request (XkbGetDeviceInfo) or change (XKbSetDeviceInfo) + # XKB information about an extension device. + # - Reports the list of supported optional features in the reply to + # XkbGetDeviceInfo or in an XkbExtensionDeviceNotify event. + # XkbXI_UnsupportedFeature is reported in XkbExtensionDeviceNotify + # events to indicate an attempt to use an unsupported feature. + # + +const + XkbXI_KeyboardsMask* = int(1) shl 0 + XkbXI_ButtonActionsMask* = int(1) shl 1 + XkbXI_IndicatorNamesMask* = int(1) shl 2 + XkbXI_IndicatorMapsMask* = int(1) shl 3 + XkbXI_IndicatorStateMask* = int(1) shl 4 + XkbXI_UnsupportedFeatureMask* = int(1) shl 15 + XkbXI_AllFeaturesMask* = 0x0000001F + XkbXI_AllDeviceFeaturesMask* = 0x0000001E + XkbXI_IndicatorsMask* = 0x0000001C + XkbAllExtensionDeviceEventsMask* = 0x0000801F # + # Per-Client Flags: + # - Specifies flags to be changed by the PerClientFlags request. + # + +const + XkbPCF_DetectableAutoRepeatMask* = int(1) shl 0 + XkbPCF_GrabsUseXKBStateMask* = int(1) shl 1 + XkbPCF_AutoResetControlsMask* = int(1) shl 2 + XkbPCF_LookupStateWhenGrabbed* = int(1) shl 3 + XkbPCF_SendEventUsesXKBState* = int(1) shl 4 + XkbPCF_AllFlagsMask* = 0x0000001F # + # Debugging flags and controls + # + +const + XkbDF_DisableLocks* = 1 shl 0 + +type + PXkbPropertyPtr* = ptr TXkbPropertyRec + TXkbPropertyRec*{.final.} = object + name*: cstring + value*: cstring + + +type + PXkbColorPtr* = ptr TXkbColorRec + TXkbColorRec*{.final.} = object + pixel*: int16 + spec*: cstring + + +type + PXkbPointPtr* = ptr TXkbPointRec + TXkbPointRec*{.final.} = object + x*: int16 + y*: int16 + + +type + PXkbBoundsPtr* = ptr TXkbBoundsRec + TXkbBoundsRec*{.final.} = object + x1*: int16 + y1*: int16 + x2*: int16 + y2*: int16 + + +proc XkbBoundsWidth*(b: PXkbBoundsPtr): int16 +proc XkbBoundsHeight*(b: PXkbBoundsPtr): int16 +type + PXkbOutlinePtr* = ptr TXkbOutlineRec + TXkbOutlineRec*{.final.} = object + num_points*: int16 + sz_points*: int16 + corner_radius*: int16 + points*: PXkbPointPtr + + +type + PXkbShapePtr* = ptr TXkbShapeRec + TXkbShapeRec*{.final.} = object + name*: TAtom + num_outlines*: int16 + sz_outlines*: int16 + outlines*: ptr array [0..0xffff, TXkbOutlineRec] + approx*: ptr array[0..0xffff, TXkbOutlineRec] + primary*: ptr array[0..0xffff, TXkbOutlineRec] + bounds*: TXkbBoundsRec + + +proc XkbOutlineIndex*(s: PXkbShapePtr, o: PXkbOutlinePtr): int32 +type + PXkbShapeDoodadPtr* = ptr TXkbShapeDoodadRec + TXkbShapeDoodadRec*{.final.} = object + name*: TAtom + theType*: int8 + priority*: int8 + top*: int16 + left*: int16 + angle*: int16 + color_ndx*: int16 + shape_ndx*: int16 + + +type + PXkbTextDoodadPtr* = ptr TXkbTextDoodadRec + TXkbTextDoodadRec*{.final.} = object + name*: TAtom + theType*: int8 + priority*: int8 + top*: int16 + left*: int16 + angle*: int16 + width*: int16 + height*: int16 + color_ndx*: int16 + text*: cstring + font*: cstring + + +type + PXkbIndicatorDoodadPtr* = ptr TXkbIndicatorDoodadRec + TXkbIndicatorDoodadRec*{.final.} = object + name*: TAtom + theType*: int8 + priority*: int8 + top*: int16 + left*: int16 + angle*: int16 + shape_ndx*: int16 + on_color_ndx*: int16 + off_color_ndx*: int16 + + +type + PXkbLogoDoodadPtr* = ptr TXkbLogoDoodadRec + TXkbLogoDoodadRec*{.final.} = object + name*: TAtom + theType*: int8 + priority*: int8 + top*: int16 + left*: int16 + angle*: int16 + color_ndx*: int16 + shape_ndx*: int16 + logo_name*: cstring + + +type + PXkbAnyDoodadPtr* = ptr TXkbAnyDoodadRec + TXkbAnyDoodadRec*{.final.} = object + name*: TAtom + theType*: int8 + priority*: int8 + top*: int16 + left*: int16 + angle*: int16 + + +type + PXkbDoodadPtr* = ptr TXkbDoodadRec + TXkbDoodadRec*{.final.} = object + any*: TXkbAnyDoodadRec + shape*: TXkbShapeDoodadRec + text*: TXkbTextDoodadRec + indicator*: TXkbIndicatorDoodadRec + logo*: TXkbLogoDoodadRec + + +const + XkbUnknownDoodad* = 0 + XkbOutlineDoodad* = 1 + XkbSolidDoodad* = 2 + XkbTextDoodad* = 3 + XkbIndicatorDoodad* = 4 + XkbLogoDoodad* = 5 + +type + PXkbKeyPtr* = ptr TXkbKeyRec + TXkbKeyRec*{.final.} = object + name*: TXkbKeyNameRec + gap*: int16 + shape_ndx*: int8 + color_ndx*: int8 + + +type + PXkbRowPtr* = ptr TXkbRowRec + TXkbRowRec*{.final.} = object + top*: int16 + left*: int16 + num_keys*: int16 + sz_keys*: int16 + vertical*: int16 + Keys*: PXkbKeyPtr + bounds*: TXkbBoundsRec + + +type + PXkbOverlayPtr* = ptr TXkbOverlayRec #forward for TXkbSectionRec use. + #Do not add more "type" + PXkbSectionPtr* = ptr TXkbSectionRec + TXkbSectionRec*{.final.} = object #Do not add more "type" + name*: TAtom + priority*: int8 + top*: int16 + left*: int16 + width*: int16 + height*: int16 + angle*: int16 + num_rows*: int16 + num_doodads*: int16 + num_overlays*: int16 + rows*: PXkbRowPtr + doodads*: PXkbDoodadPtr + bounds*: TXkbBoundsRec + overlays*: PXkbOverlayPtr + + PXkbOverlayKeyPtr* = ptr TXkbOverlayKeyRec + TXkbOverlayKeyRec*{.final.} = object #Do not add more "type" + over*: TXkbKeyNameRec + under*: TXkbKeyNameRec + + PXkbOverlayRowPtr* = ptr TXkbOverlayRowRec + TXkbOverlayRowRec*{.final.} = object #Do not add more "type" + row_under*: int16 + num_keys*: int16 + sz_keys*: int16 + keys*: PXkbOverlayKeyPtr + + TXkbOverlayRec*{.final.} = object + name*: TAtom + section_under*: PXkbSectionPtr + num_rows*: int16 + sz_rows*: int16 + rows*: PXkbOverlayRowPtr + bounds*: PXkbBoundsPtr + + +type + PXkbGeometryRec* = ptr TXkbGeometryRec + PXkbGeometryPtr* = PXkbGeometryRec + TXkbGeometryRec*{.final.} = object + name*: TAtom + width_mm*: int16 + height_mm*: int16 + label_font*: cstring + label_color*: PXkbColorPtr + base_color*: PXkbColorPtr + sz_properties*: int16 + sz_colors*: int16 + sz_shapes*: int16 + sz_sections*: int16 + sz_doodads*: int16 + sz_key_aliases*: int16 + num_properties*: int16 + num_colors*: int16 + num_shapes*: int16 + num_sections*: int16 + num_doodads*: int16 + num_key_aliases*: int16 + properties*: ptr array[0..0xffff, TXkbPropertyRec] + colors*: ptr array[0..0xffff, TXkbColorRec] + shapes*: ptr array[0..0xffff, TXkbShapeRec] + sections*: ptr array[0..0xffff, TXkbSectionRec] + key_aliases*: ptr array[0..0xffff, TXkbKeyAliasRec] + + +const + XkbGeomPropertiesMask* = 1 shl 0 + XkbGeomColorsMask* = 1 shl 1 + XkbGeomShapesMask* = 1 shl 2 + XkbGeomSectionsMask* = 1 shl 3 + XkbGeomDoodadsMask* = 1 shl 4 + XkbGeomKeyAliasesMask* = 1 shl 5 + XkbGeomAllMask* = 0x0000003F + +type + PXkbGeometrySizesPtr* = ptr TXkbGeometrySizesRec + TXkbGeometrySizesRec*{.final.} = object # + # Tie it all together into one big keyboard description + # + which*: int16 + num_properties*: int16 + num_colors*: int16 + num_shapes*: int16 + num_sections*: int16 + num_doodads*: int16 + num_key_aliases*: int16 + + +type + PXkbDescPtr* = ptr TXkbDescRec + TXkbDescRec*{.final.} = object + dpy*: PDisplay + flags*: int16 + device_spec*: int16 + min_key_code*: TKeyCode + max_key_code*: TKeyCode + ctrls*: PXkbControlsPtr + server*: PXkbServerMapPtr + map*: PXkbClientMapPtr + indicators*: PXkbIndicatorPtr + names*: PXkbNamesPtr + compat*: PXkbCompatMapPtr + geom*: PXkbGeometryPtr + + +proc XkbKeyKeyTypeIndex*(d: PXkbDescPtr, k: int16, g: int8): int8 +proc XkbKeyKeyType*(d: PXkbDescPtr, k: int16, g: int8): PXkbKeyTypePtr +proc XkbKeyGroupWidth*(d: PXkbDescPtr, k: int16, g: int8): int8 +proc XkbKeyGroupsWidth*(d: PXkbDescPtr, k: int16): int8 +proc XkbKeyGroupInfo*(d: PXkbDescPtr, k: int16): int8 +proc XkbKeyNumGroups*(d: PXkbDescPtr, k: int16): int8 +proc XkbKeyNumSyms*(d: PXkbDescPtr, k: int16): int16 +proc XkbKeySym*(d: PXkbDescPtr, k: int16, n: int16): TKeySym +proc XkbKeySymEntry*(d: PXkbDescPtr, k: int16, sl: int16, g: int8): TKeySym +proc XkbKeyAction*(d: PXkbDescPtr, k: int16, n: int16): PXkbAction +proc XkbKeyActionEntry*(d: PXkbDescPtr, k: int16, sl: int16, g: int8): int8 +proc XkbKeyHasActions*(d: PXkbDescPtr, k: int16): bool +proc XkbKeyNumActions*(d: PXkbDescPtr, k: int16): int16 +proc XkbKeyActionsPtr*(d: PXkbDescPtr, k: int16): PXkbAction +proc XkbKeycodeInRange*(d: PXkbDescPtr, k: int16): bool +proc XkbNumKeys*(d: PXkbDescPtr): int8 + # + # The following structures can be used to track changes + # to a keyboard device + # +type + PXkbMapChangesPtr* = ptr TXkbMapChangesRec + TXkbMapChangesRec*{.final.} = object + changed*: int16 + min_key_code*: TKeyCode + max_key_code*: TKeyCode + first_type*: int8 + num_types*: int8 + first_key_sym*: TKeyCode + num_key_syms*: int8 + first_key_act*: TKeyCode + num_key_acts*: int8 + first_key_behavior*: TKeyCode + num_key_behaviors*: int8 + first_key_explicit*: TKeyCode + num_key_explicit*: int8 + first_modmap_key*: TKeyCode + num_modmap_keys*: int8 + first_vmodmap_key*: TKeyCode + num_vmodmap_keys*: int8 + pad*: int8 + vmods*: int16 + + +type + PXkbControlsChangesPtr* = ptr TXkbControlsChangesRec + TXkbControlsChangesRec*{.final.} = object + changed_ctrls*: int16 + enabled_ctrls_changes*: int16 + num_groups_changed*: bool + + +type + PXkbIndicatorChangesPtr* = ptr TXkbIndicatorChangesRec + TXkbIndicatorChangesRec*{.final.} = object + state_changes*: int16 + map_changes*: int16 + + +type + PXkbNameChangesPtr* = ptr TXkbNameChangesRec + TXkbNameChangesRec*{.final.} = object + changed*: int16 + first_type*: int8 + num_types*: int8 + first_lvl*: int8 + num_lvls*: int8 + num_aliases*: int8 + num_rg*: int8 + first_key*: int8 + num_keys*: int8 + changed_vmods*: int16 + changed_indicators*: int32 + changed_groups*: int8 + + +type + PXkbCompatChangesPtr* = ptr TXkbCompatChangesRec + TXkbCompatChangesRec*{.final.} = object + changed_groups*: int8 + first_si*: int16 + num_si*: int16 + + +type + PXkbChangesPtr* = ptr TXkbChangesRec + TXkbChangesRec*{.final.} = object # + # These data structures are used to construct a keymap from + # a set of components or to list components in the server + # database. + # + device_spec*: int16 + state_changes*: int16 + map*: TXkbMapChangesRec + ctrls*: TXkbControlsChangesRec + indicators*: TXkbIndicatorChangesRec + names*: TXkbNameChangesRec + compat*: TXkbCompatChangesRec + + +type + PXkbComponentNamesPtr* = ptr TXkbComponentNamesRec + TXkbComponentNamesRec*{.final.} = object + keymap*: ptr int16 + keycodes*: ptr int16 + types*: ptr int16 + compat*: ptr int16 + symbols*: ptr int16 + geometry*: ptr int16 + + +type + PXkbComponentNamePtr* = ptr TXkbComponentNameRec + TXkbComponentNameRec*{.final.} = object + flags*: int16 + name*: cstring + + +type + PXkbComponentListPtr* = ptr TXkbComponentListRec + TXkbComponentListRec*{.final.} = object # + # The following data structures describe and track changes to a + # non-keyboard extension device + # + num_keymaps*: int16 + num_keycodes*: int16 + num_types*: int16 + num_compat*: int16 + num_symbols*: int16 + num_geometry*: int16 + keymaps*: PXkbComponentNamePtr + keycodes*: PXkbComponentNamePtr + types*: PXkbComponentNamePtr + compat*: PXkbComponentNamePtr + symbols*: PXkbComponentNamePtr + geometry*: PXkbComponentNamePtr + + +type + PXkbDeviceLedInfoPtr* = ptr TXkbDeviceLedInfoRec + TXkbDeviceLedInfoRec*{.final.} = object + led_class*: int16 + led_id*: int16 + phys_indicators*: int16 + maps_present*: int16 + names_present*: int16 + state*: int16 + names*: array[0..XkbNumIndicators - 1, TAtom] + maps*: array[0..XkbNumIndicators - 1, TXkbIndicatorMapRec] + + +type + PXkbDeviceInfoPtr* = ptr TXkbDeviceInfoRec + TXkbDeviceInfoRec*{.final.} = object + name*: cstring + theType*: TAtom + device_spec*: int16 + has_own_state*: bool + supported*: int16 + unsupported*: int16 + num_btns*: int16 + btn_acts*: PXkbAction + sz_leds*: int16 + num_leds*: int16 + dflt_kbd_fb*: int16 + dflt_led_fb*: int16 + leds*: PXkbDeviceLedInfoPtr + + +proc XkbXI_DevHasBtnActs*(d: PXkbDeviceInfoPtr): bool +proc XkbXI_LegalDevBtn*(d: PXkbDeviceInfoPtr, b: int16): bool +proc XkbXI_DevHasLeds*(d: PXkbDeviceInfoPtr): bool +type + PXkbDeviceLedChangesPtr* = ptr TXkbDeviceLedChangesRec + TXkbDeviceLedChangesRec*{.final.} = object + led_class*: int16 + led_id*: int16 + defined*: int16 #names or maps changed + next*: PXkbDeviceLedChangesPtr + + +type + PXkbDeviceChangesPtr* = ptr TXkbDeviceChangesRec + TXkbDeviceChangesRec*{.final.} = object + changed*: int16 + first_btn*: int16 + num_btns*: int16 + leds*: TXkbDeviceLedChangesRec + + +proc XkbShapeDoodadColor*(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr): PXkbColorPtr +proc XkbShapeDoodadShape*(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr): PXkbShapePtr +proc XkbSetShapeDoodadColor*(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr, + c: PXkbColorPtr) +proc XkbSetShapeDoodadShape*(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr, + s: PXkbShapePtr) +proc XkbTextDoodadColor*(g: PXkbGeometryPtr, d: PXkbTextDoodadPtr): PXkbColorPtr +proc XkbSetTextDoodadColor*(g: PXkbGeometryPtr, d: PXkbTextDoodadPtr, + c: PXkbColorPtr) +proc XkbIndicatorDoodadShape*(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbShapeDoodadPtr +proc XkbIndicatorDoodadOnColor*(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbColorPtr +proc XkbIndicatorDoodadOffColor*(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbColorPtr +proc XkbSetIndicatorDoodadOnColor*(g: PXkbGeometryPtr, + d: PXkbIndicatorDoodadPtr, c: PXkbColorPtr) +proc XkbSetIndicatorDoodadOffColor*(g: PXkbGeometryPtr, + d: PXkbIndicatorDoodadPtr, c: PXkbColorPtr) +proc XkbSetIndicatorDoodadShape*(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr, + s: PXkbShapeDoodadPtr) +proc XkbLogoDoodadColor*(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr): PXkbColorPtr +proc XkbLogoDoodadShape*(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr): PXkbShapeDoodadPtr +proc XkbSetLogoDoodadColor*(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr, + c: PXkbColorPtr) +proc XkbSetLogoDoodadShape*(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr, + s: PXkbShapeDoodadPtr) +proc XkbKeyShape*(g: PXkbGeometryPtr, k: PXkbKeyPtr): PXkbShapeDoodadPtr +proc XkbKeyColor*(g: PXkbGeometryPtr, k: PXkbKeyPtr): PXkbColorPtr +proc XkbSetKeyShape*(g: PXkbGeometryPtr, k: PXkbKeyPtr, s: PXkbShapeDoodadPtr) +proc XkbSetKeyColor*(g: PXkbGeometryPtr, k: PXkbKeyPtr, c: PXkbColorPtr) +proc XkbGeomColorIndex*(g: PXkbGeometryPtr, c: PXkbColorPtr): int32 +proc XkbAddGeomProperty*(geom: PXkbGeometryPtr, name: cstring, value: cstring): PXkbPropertyPtr{. + cdecl, dynlib: libX11, importc: "XkbAddGeomProperty".} +proc XkbAddGeomKeyAlias*(geom: PXkbGeometryPtr, alias: cstring, float: cstring): PXkbKeyAliasPtr{. + cdecl, dynlib: libX11, importc: "XkbAddGeomKeyAlias".} +proc XkbAddGeomColor*(geom: PXkbGeometryPtr, spec: cstring, pixel: int16): PXkbColorPtr{. + cdecl, dynlib: libX11, importc: "XkbAddGeomColor".} +proc XkbAddGeomOutline*(shape: PXkbShapePtr, sz_points: int16): PXkbOutlinePtr{. + cdecl, dynlib: libX11, importc: "XkbAddGeomOutline".} +proc XkbAddGeomShape*(geom: PXkbGeometryPtr, name: TAtom, sz_outlines: int16): PXkbShapePtr{. + cdecl, dynlib: libX11, importc: "XkbAddGeomShape".} +proc XkbAddGeomKey*(row: PXkbRowPtr): PXkbKeyPtr{.cdecl, dynlib: libX11, + importc: "XkbAddGeomKey".} +proc XkbAddGeomRow*(section: PXkbSectionPtr, sz_keys: int16): PXkbRowPtr{.cdecl, + dynlib: libX11, importc: "XkbAddGeomRow".} +proc XkbAddGeomSection*(geom: PXkbGeometryPtr, name: TAtom, sz_rows: int16, + sz_doodads: int16, sz_overlays: int16): PXkbSectionPtr{. + cdecl, dynlib: libX11, importc: "XkbAddGeomSection".} +proc XkbAddGeomOverlay*(section: PXkbSectionPtr, name: TAtom, sz_rows: int16): PXkbOverlayPtr{. + cdecl, dynlib: libX11, importc: "XkbAddGeomOverlay".} +proc XkbAddGeomOverlayRow*(overlay: PXkbOverlayPtr, row_under: int16, + sz_keys: int16): PXkbOverlayRowPtr{.cdecl, + dynlib: libX11, importc: "XkbAddGeomOverlayRow".} +proc XkbAddGeomOverlayKey*(overlay: PXkbOverlayPtr, row: PXkbOverlayRowPtr, + over: cstring, under: cstring): PXkbOverlayKeyPtr{. + cdecl, dynlib: libX11, importc: "XkbAddGeomOverlayKey".} +proc XkbAddGeomDoodad*(geom: PXkbGeometryPtr, section: PXkbSectionPtr, + name: TAtom): PXkbDoodadPtr{.cdecl, dynlib: libX11, + importc: "XkbAddGeomDoodad".} +proc XkbFreeGeomKeyAliases*(geom: PXkbGeometryPtr, first: int16, count: int16, + freeAll: bool){.cdecl, dynlib: libX11, + importc: "XkbFreeGeomKeyAliases".} +proc XkbFreeGeomColors*(geom: PXkbGeometryPtr, first: int16, count: int16, + freeAll: bool){.cdecl, dynlib: libX11, + importc: "XkbFreeGeomColors".} +proc XkbFreeGeomDoodads*(doodads: PXkbDoodadPtr, nDoodads: int16, freeAll: bool){. + cdecl, dynlib: libX11, importc: "XkbFreeGeomDoodads".} +proc XkbFreeGeomProperties*(geom: PXkbGeometryPtr, first: int16, count: int16, + freeAll: bool){.cdecl, dynlib: libX11, + importc: "XkbFreeGeomProperties".} +proc XkbFreeGeomOverlayKeys*(row: PXkbOverlayRowPtr, first: int16, count: int16, + freeAll: bool){.cdecl, dynlib: libX11, + importc: "XkbFreeGeomOverlayKeys".} +proc XkbFreeGeomOverlayRows*(overlay: PXkbOverlayPtr, first: int16, + count: int16, freeAll: bool){.cdecl, + dynlib: libX11, importc: "XkbFreeGeomOverlayRows".} +proc XkbFreeGeomOverlays*(section: PXkbSectionPtr, first: int16, count: int16, + freeAll: bool){.cdecl, dynlib: libX11, + importc: "XkbFreeGeomOverlays".} +proc XkbFreeGeomKeys*(row: PXkbRowPtr, first: int16, count: int16, freeAll: bool){. + cdecl, dynlib: libX11, importc: "XkbFreeGeomKeys".} +proc XkbFreeGeomRows*(section: PXkbSectionPtr, first: int16, count: int16, + freeAll: bool){.cdecl, dynlib: libX11, + importc: "XkbFreeGeomRows".} +proc XkbFreeGeomSections*(geom: PXkbGeometryPtr, first: int16, count: int16, + freeAll: bool){.cdecl, dynlib: libX11, + importc: "XkbFreeGeomSections".} +proc XkbFreeGeomPoints*(outline: PXkbOutlinePtr, first: int16, count: int16, + freeAll: bool){.cdecl, dynlib: libX11, + importc: "XkbFreeGeomPoints".} +proc XkbFreeGeomOutlines*(shape: PXkbShapePtr, first: int16, count: int16, + freeAll: bool){.cdecl, dynlib: libX11, + importc: "XkbFreeGeomOutlines".} +proc XkbFreeGeomShapes*(geom: PXkbGeometryPtr, first: int16, count: int16, + freeAll: bool){.cdecl, dynlib: libX11, + importc: "XkbFreeGeomShapes".} +proc XkbFreeGeometry*(geom: PXkbGeometryPtr, which: int16, freeMap: bool){. + cdecl, dynlib: libX11, importc: "XkbFreeGeometry".} +proc XkbAllocGeomProps*(geom: PXkbGeometryPtr, nProps: int16): TStatus{.cdecl, + dynlib: libX11, importc: "XkbAllocGeomProps".} +proc XkbAllocGeomKeyAliases*(geom: PXkbGeometryPtr, nAliases: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomKeyAliases".} +proc XkbAllocGeomColors*(geom: PXkbGeometryPtr, nColors: int16): TStatus{.cdecl, + dynlib: libX11, importc: "XkbAllocGeomColors".} +proc XkbAllocGeomShapes*(geom: PXkbGeometryPtr, nShapes: int16): TStatus{.cdecl, + dynlib: libX11, importc: "XkbAllocGeomShapes".} +proc XkbAllocGeomSections*(geom: PXkbGeometryPtr, nSections: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomSections".} +proc XkbAllocGeomOverlays*(section: PXkbSectionPtr, num_needed: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomOverlays".} +proc XkbAllocGeomOverlayRows*(overlay: PXkbOverlayPtr, num_needed: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomOverlayRows".} +proc XkbAllocGeomOverlayKeys*(row: PXkbOverlayRowPtr, num_needed: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomOverlayKeys".} +proc XkbAllocGeomDoodads*(geom: PXkbGeometryPtr, nDoodads: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomDoodads".} +proc XkbAllocGeomSectionDoodads*(section: PXkbSectionPtr, nDoodads: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomSectionDoodads".} +proc XkbAllocGeomOutlines*(shape: PXkbShapePtr, nOL: int16): TStatus{.cdecl, + dynlib: libX11, importc: "XkbAllocGeomOutlines".} +proc XkbAllocGeomRows*(section: PXkbSectionPtr, nRows: int16): TStatus{.cdecl, + dynlib: libX11, importc: "XkbAllocGeomRows".} +proc XkbAllocGeomPoints*(ol: PXkbOutlinePtr, nPts: int16): TStatus{.cdecl, + dynlib: libX11, importc: "XkbAllocGeomPoints".} +proc XkbAllocGeomKeys*(row: PXkbRowPtr, nKeys: int16): TStatus{.cdecl, + dynlib: libX11, importc: "XkbAllocGeomKeys".} +proc XkbAllocGeometry*(xkb: PXkbDescPtr, sizes: PXkbGeometrySizesPtr): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeometry".} +proc XkbSetGeometryProc*(dpy: PDisplay, deviceSpec: int16, geom: PXkbGeometryPtr): TStatus{. + cdecl, dynlib: libX11, importc: "XkbSetGeometry".} +proc XkbComputeShapeTop*(shape: PXkbShapePtr, bounds: PXkbBoundsPtr): bool{. + cdecl, dynlib: libX11, importc: "XkbComputeShapeTop".} +proc XkbComputeShapeBounds*(shape: PXkbShapePtr): bool{.cdecl, dynlib: libX11, + importc: "XkbComputeShapeBounds".} +proc XkbComputeRowBounds*(geom: PXkbGeometryPtr, section: PXkbSectionPtr, + row: PXkbRowPtr): bool{.cdecl, dynlib: libX11, + importc: "XkbComputeRowBounds".} +proc XkbComputeSectionBounds*(geom: PXkbGeometryPtr, section: PXkbSectionPtr): bool{. + cdecl, dynlib: libX11, importc: "XkbComputeSectionBounds".} +proc XkbFindOverlayForKey*(geom: PXkbGeometryPtr, wanted: PXkbSectionPtr, + under: cstring): cstring{.cdecl, dynlib: libX11, + importc: "XkbFindOverlayForKey".} +proc XkbGetGeometryProc*(dpy: PDisplay, xkb: PXkbDescPtr): TStatus{.cdecl, + dynlib: libX11, importc: "XkbGetGeometry".} +proc XkbGetNamedGeometry*(dpy: PDisplay, xkb: PXkbDescPtr, name: TAtom): TStatus{. + cdecl, dynlib: libX11, importc: "XkbGetNamedGeometry".} +when defined(XKB_IN_SERVER): + proc SrvXkbAddGeomKeyAlias*(geom: PXkbGeometryPtr, alias: cstring, + float: cstring): PXkbKeyAliasPtr{.cdecl, + dynlib: libX11, importc: "XkbAddGeomKeyAlias".} + proc SrvXkbAddGeomColor*(geom: PXkbGeometryPtr, spec: cstring, pixel: int16): PXkbColorPtr{. + cdecl, dynlib: libX11, importc: "XkbAddGeomColor".} + proc SrvXkbAddGeomDoodad*(geom: PXkbGeometryPtr, section: PXkbSectionPtr, + name: TAtom): PXkbDoodadPtr{.cdecl, dynlib: libX11, + importc: "XkbAddGeomDoodad".} + proc SrvXkbAddGeomKey*(geom: PXkbGeometryPtr, alias: cstring, float: cstring): PXkbKeyAliasPtr{. + cdecl, dynlib: libX11, importc: "XkbAddGeomKeyAlias".} + proc SrvXkbAddGeomOutline*(shape: PXkbShapePtr, sz_points: int16): PXkbOutlinePtr{. + cdecl, dynlib: libX11, importc: "XkbAddGeomOutline".} + proc SrvXkbAddGeomOverlay*(overlay: PXkbOverlayPtr, row: PXkbOverlayRowPtr, + over: cstring, under: cstring): PXkbOverlayKeyPtr{. + cdecl, dynlib: libX11, importc: "XkbAddGeomOverlayKey".} + proc SrvXkbAddGeomOverlayRow*(overlay: PXkbOverlayPtr, row_under: int16, + sz_keys: int16): PXkbOverlayRowPtr{.cdecl, + dynlib: libX11, importc: "XkbAddGeomOverlayRow".} + proc SrvXkbAddGeomOverlayKey*(overlay: PXkbOverlayPtr, row: PXkbOverlayRowPtr, + over: cstring, under: cstring): PXkbOverlayKeyPtr{. + cdecl, dynlib: libX11, importc: "XkbAddGeomOverlayKey".} + proc SrvXkbAddGeomProperty*(geom: PXkbGeometryPtr, name: cstring, + value: cstring): PXkbPropertyPtr{.cdecl, + dynlib: libX11, importc: "XkbAddGeomProperty".} + proc SrvXkbAddGeomRow*(section: PXkbSectionPtr, sz_keys: int16): PXkbRowPtr{. + cdecl, dynlib: libX11, importc: "XkbAddGeomRow".} + proc SrvXkbAddGeomSection*(geom: PXkbGeometryPtr, name: TAtom, sz_rows: int16, + sz_doodads: int16, sz_overlays: int16): PXkbSectionPtr{. + cdecl, dynlib: libX11, importc: "XkbAddGeomSection".} + proc SrvXkbAddGeomShape*(geom: PXkbGeometryPtr, name: TAtom, + sz_outlines: int16): PXkbShapePtr{.cdecl, + dynlib: libX11, importc: "XkbAddGeomShape".} + proc SrvXkbAllocGeomKeyAliases*(geom: PXkbGeometryPtr, nAliases: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomKeyAliases".} + proc SrvXkbAllocGeomColors*(geom: PXkbGeometryPtr, nColors: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomColors".} + proc SrvXkbAllocGeomDoodads*(geom: PXkbGeometryPtr, nDoodads: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomDoodads".} + proc SrvXkbAllocGeomKeys*(row: PXkbRowPtr, nKeys: int16): TStatus{.cdecl, + dynlib: libX11, importc: "XkbAllocGeomKeys".} + proc SrvXkbAllocGeomOutlines*(shape: PXkbShapePtr, nOL: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomOutlines".} + proc SrvXkbAllocGeomPoints*(ol: PXkbOutlinePtr, nPts: int16): TStatus{.cdecl, + dynlib: libX11, importc: "XkbAllocGeomPoints".} + proc SrvXkbAllocGeomProps*(geom: PXkbGeometryPtr, nProps: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomProps".} + proc SrvXkbAllocGeomRows*(section: PXkbSectionPtr, nRows: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomRows".} + proc SrvXkbAllocGeomSectionDoodads*(section: PXkbSectionPtr, nDoodads: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomSectionDoodads".} + proc SrvXkbAllocGeomSections*(geom: PXkbGeometryPtr, nSections: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomSections".} + proc SrvXkbAllocGeomOverlays*(section: PXkbSectionPtr, num_needed: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomOverlays".} + proc SrvXkbAllocGeomOverlayRows*(overlay: PXkbOverlayPtr, num_needed: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomOverlayRows".} + proc SrvXkbAllocGeomOverlayKeys*(row: PXkbOverlayRowPtr, num_needed: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomOverlayKeys".} + proc SrvXkbAllocGeomShapes*(geom: PXkbGeometryPtr, nShapes: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeomShapes".} + proc SrvXkbAllocGeometry*(xkb: PXkbDescPtr, sizes: PXkbGeometrySizesPtr): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocGeometry".} + proc SrvXkbFreeGeomKeyAliases*(geom: PXkbGeometryPtr, first: int16, + count: int16, freeAll: bool){.cdecl, + dynlib: libX11, importc: "XkbFreeGeomKeyAliases".} + proc SrvXkbFreeGeomColors*(geom: PXkbGeometryPtr, first: int16, count: int16, + freeAll: bool){.cdecl, dynlib: libX11, + importc: "XkbFreeGeomColors".} + proc SrvXkbFreeGeomDoodads*(doodads: PXkbDoodadPtr, nDoodads: int16, + freeAll: bool){.cdecl, dynlib: libX11, + importc: "XkbFreeGeomDoodads".} + proc SrvXkbFreeGeomProperties*(geom: PXkbGeometryPtr, first: int16, + count: int16, freeAll: bool){.cdecl, + dynlib: libX11, importc: "XkbFreeGeomProperties".} + proc SrvXkbFreeGeomOverlayKeys*(row: PXkbOverlayRowPtr, first: int16, + count: int16, freeAll: bool){.cdecl, + dynlib: libX11, importc: "XkbFreeGeomOverlayKeys".} + proc SrvXkbFreeGeomOverlayRows*(overlay: PXkbOverlayPtr, first: int16, + count: int16, freeAll: bool){.cdecl, + dynlib: libX11, importc: "XkbFreeGeomOverlayRows".} + proc SrvXkbFreeGeomOverlays*(section: PXkbSectionPtr, first: int16, + count: int16, freeAll: bool){.cdecl, + dynlib: libX11, importc: "XkbFreeGeomOverlays".} + proc SrvXkbFreeGeomKeys*(row: PXkbRowPtr, first: int16, count: int16, + freeAll: bool){.cdecl, dynlib: libX11, + importc: "XkbFreeGeomKeys".} + proc SrvXkbFreeGeomRows*(section: PXkbSectionPtr, first: int16, count: int16, + freeAll: bool){.cdecl, dynlib: libX11, + importc: "XkbFreeGeomRows".} + proc SrvXkbFreeGeomSections*(geom: PXkbGeometryPtr, first: int16, + count: int16, freeAll: bool){.cdecl, + dynlib: libX11, importc: "XkbFreeGeomSections".} + proc SrvXkbFreeGeomPoints*(outline: PXkbOutlinePtr, first: int16, + count: int16, freeAll: bool){.cdecl, + dynlib: libX11, importc: "XkbFreeGeomPoints".} + proc SrvXkbFreeGeomOutlines*(shape: PXkbShapePtr, first: int16, count: int16, + freeAll: bool){.cdecl, dynlib: libX11, + importc: "XkbFreeGeomOutlines".} + proc SrvXkbFreeGeomShapes*(geom: PXkbGeometryPtr, first: int16, count: int16, + freeAll: bool){.cdecl, dynlib: libX11, + importc: "XkbFreeGeomShapes".} + proc SrvXkbFreeGeometry*(geom: PXkbGeometryPtr, which: int16, freeMap: bool){. + cdecl, dynlib: libX11, importc: "XkbFreeGeometry".} +# implementation + +import #************************************ xkb ************************************ + xi + +proc XkbLegalXILedClass(c: int): bool = + ##define XkbLegalXILedClass(c) (((c)==KbdFeedbackClass)||((c)==LedFeedbackClass)|| + # ((c)==XkbDfltXIClass)||((c)==XkbAllXIClasses)) + Result = (c == KbdFeedbackClass) or (c == LedFeedbackClass) or + (c == XkbDfltXIClass) or (c == XkbAllXIClasses) + +proc XkbLegalXIBellClass(c: int): bool = + ##define XkbLegalXIBellClass(c) (((c)==KbdFeedbackClass)||((c)==BellFeedbackClass)|| + # ((c)==XkbDfltXIClass)||((c)==XkbAllXIClasses)) + Result = (c == KbdFeedbackClass) or (c == BellFeedbackClass) or + (c == XkbDfltXIClass) or (c == XkbAllXIClasses) + +proc XkbExplicitXIDevice(c: int): bool = + ##define XkbExplicitXIDevice(c) (((c)&(~0xff))==0) + Result = (c and (not 0x000000FF)) == 0 + +proc XkbExplicitXIClass(c: int): bool = + ##define XkbExplicitXIClass(c) (((c)&(~0xff))==0) + Result = (c and (not 0x000000FF)) == 0 + +proc XkbExplicitXIId(c: int): bool = + ##define XkbExplicitXIId(c) (((c)&(~0xff))==0) + Result = (c and (not 0x000000FF)) == 0 + +proc XkbSingleXIClass(c: int): bool = + ##define XkbSingleXIClass(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIClass)) + Result = ((c and (not 0x000000FF)) == 0) or (c == XkbDfltXIClass) + +proc XkbSingleXIId(c: int): bool = + ##define XkbSingleXIId(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIId)) + Result = ((c and (not 0x000000FF)) == 0) or (c == XkbDfltXIId) + +proc XkbBuildCoreState(m, g: int): int = + ##define XkbBuildCoreState(m,g) ((((g)&0x3)<<13)|((m)&0xff)) + Result = ((g and 0x00000003) shl 13) or (m and 0x000000FF) + +proc XkbGroupForCoreState(s: int): int = + ##define XkbGroupForCoreState(s) (((s)>>13)&0x3) + Result = (s shr 13) and 0x00000003 + +proc XkbIsLegalGroup(g: int): bool = + ##define XkbIsLegalGroup(g) (((g)>=0)&&((g)<XkbNumKbdGroups)) + Result = (g >= 0) and (g < XkbNumKbdGroups) + +proc XkbSA_ValOp(a: int): int = + ##define XkbSA_ValOp(a) ((a)&XkbSA_ValOpMask) + Result = a and XkbSA_ValOpMask + +proc XkbSA_ValScale(a: int): int = + ##define XkbSA_ValScale(a) ((a)&XkbSA_ValScaleMask) + Result = a and XkbSA_ValScaleMask + +proc XkbIsModAction(a: PXkbAnyAction): bool = + ##define XkbIsModAction(a) (((a)->type>=Xkb_SASetMods)&&((a)->type<=XkbSA_LockMods)) + Result = (ze(a.theType) >= XkbSA_SetMods) and (ze(a.theType) <= XkbSA_LockMods) + +proc XkbIsGroupAction(a: PXkbAnyAction): bool = + ##define XkbIsGroupAction(a) (((a)->type>=XkbSA_SetGroup)&&((a)->type<=XkbSA_LockGroup)) + Result = (ze(a.theType) >= XkbSA_SetGroup) or (ze(a.theType) <= XkbSA_LockGroup) + +proc XkbIsPtrAction(a: PXkbAnyAction): bool = + ##define XkbIsPtrAction(a) (((a)->type>=XkbSA_MovePtr)&&((a)->type<=XkbSA_SetPtrDflt)) + Result = (ze(a.theType) >= XkbSA_MovePtr) and + (ze(a.theType) <= XkbSA_SetPtrDflt) + +proc XkbIsLegalKeycode(k: int): bool = + ##define XkbIsLegalKeycode(k) (((k)>=XkbMinLegalKeyCode)&&((k)<=XkbMaxLegalKeyCode)) + Result = (k >= XkbMinLegalKeyCode) and (k <= XkbMaxLegalKeyCode) + +proc XkbShiftLevel(n: int8): int8 = + ##define XkbShiftLevel(n) ((n)-1) + Result = n - 1'i8 + +proc XkbShiftLevelMask(n: int8): int8 = + ##define XkbShiftLevelMask(n) (1<<((n)-1)) + Result = 1'i8 shl (n - 1'i8) + +proc XkbCharToInt(v: int8): int16 = + ##define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f)) + if ((v and 0x80'i8) != 0'i8): Result = v or (not 0xFF'i16) + else: Result = int16(v and 0x7F'i8) + +proc XkbIntTo2Chars(i: int16, h, L: var int8) = + ##define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff))) + h = toU8((i shr 8'i16) and 0x00FF'i16) + L = toU8(i and 0xFF'i16) + +proc Xkb2CharsToInt(h, L: int8): int16 = + when defined(cpu64): + ##define Xkb2CharsToInt(h,l) ((h)&0x80?(int)(((h)<<8)|(l)|(~0xffff)): (int)(((h)<<8)|(l)&0x7fff)) + if (h and 0x80'i8) != 0'i8: + Result = toU16((ze(h) shl 8) or ze(L) or not 0x0000FFFF) + else: + Result = toU16((ze(h) shl 8) or ze(L) and 0x00007FFF) + else: + ##define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l))) + Result = toU16(ze(h) shl 8 or ze(L)) + +proc XkbModLocks(s: PXkbStatePtr): int8 = + ##define XkbModLocks(s) ((s)->locked_mods) + Result = s.locked_mods + +proc XkbStateMods(s: PXkbStatePtr): int16 = + ##define XkbStateMods(s) ((s)->base_mods|(s)->latched_mods|XkbModLocks(s)) + Result = s.base_mods or s.latched_mods or XkbModLocks(s) + +proc XkbGroupLock(s: PXkbStatePtr): int8 = + ##define XkbGroupLock(s) ((s)->locked_group) + Result = s.locked_group + +proc XkbStateGroup(s: PXkbStatePtr): int16 = + ##define XkbStateGroup(s) ((s)->base_group+(s)->latched_group+XkbGroupLock(s)) + Result = S.base_group + (s.latched_group) + XkbGroupLock(s) + +proc XkbStateFieldFromRec(s: PXkbStatePtr): int = + ##define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group) + Result = XkbBuildCoreState(s.lookup_mods, s.group) + +proc XkbGrabStateFromRec(s: PXkbStatePtr): int = + ##define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group) + Result = XkbBuildCoreState(s.grab_mods, s.group) + +proc XkbNumGroups(g: int16): int16 = + ##define XkbNumGroups(g) ((g)&0x0f) + Result = g and 0x0000000F'i16 + +proc XkbOutOfRangeGroupInfo(g: int16): int16 = + ##define XkbOutOfRangeGroupInfo(g) ((g)&0xf0) + Result = g and 0x000000F0'i16 + +proc XkbOutOfRangeGroupAction(g: int16): int16 = + ##define XkbOutOfRangeGroupAction(g) ((g)&0xc0) + Result = g and 0x000000C0'i16 + +proc XkbOutOfRangeGroupNumber(g: int16): int16 = + ##define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4) + Result = (g and 0x00000030'i16) shr 4'i16 + +proc XkbSetGroupInfo(g, w, n: int16): int16 = + ##define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f)) + Result = (w and 0x000000C0'i16) or + ((n and 3'i16) shl 4'i16) or (g and 0x0000000F'i16) + +proc XkbSetNumGroups(g, n: int16): int16 = + ##define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f)) + Result = (g and 0x000000F0'i16) or (n and 0x0000000F'i16) + +proc XkbModActionVMods(a: PXkbModAction): int16 = + ##define XkbModActionVMods(a) ((short)(((a)->vmods1<<8)|((a)->vmods2))) + Result = toU16((ze(a.vmods1) shl 8) or ze(a.vmods2)) + +proc XkbSetModActionVMods(a: PXkbModAction, v: int8) = + ##define XkbSetModActionVMods(a,v) (((a)->vmods1=(((v)>>8)&0xff)),(a)->vmods2=((v)&0xff)) + a.vmods1 = toU8((ze(v) shr 8) and 0x000000FF) + a.vmods2 = toU8(ze(v) and 0x000000FF) + +proc XkbSAGroup(a: PXkbGroupAction): int8 = + ##define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX)) + Result = int8(XkbCharToInt(a.group_XXX)) + +proc XkbSASetGroupProc(a: PXkbGroupAction, g: int8) = + ##define XkbSASetGroup(a,g) ((a)->group_XXX=(g)) + a.group_XXX = g + +proc XkbPtrActionX(a: PXkbPtrAction): int16 = + ##define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX)) + Result = int16(Xkb2CharsToInt(a.high_XXX, a.low_XXX)) + +proc XkbPtrActionY(a: PXkbPtrAction): int16 = + ##define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY)) + Result = int16(Xkb2CharsToInt(a.high_YYY, a.low_YYY)) + +proc XkbSetPtrActionX(a: PXkbPtrAction, x: int8) = + ##define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX)) + XkbIntTo2Chars(x, a.high_XXX, a.low_XXX) + +proc XkbSetPtrActionY(a: PXkbPtrAction, y: int8) = + ##define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY)) + XkbIntTo2Chars(y, a.high_YYY, a.low_YYY) + +proc XkbSAPtrDfltValue(a: PXkbPtrDfltAction): int8 = + ##define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX)) + Result = int8(XkbCharToInt(a.valueXXX)) + +proc XkbSASetPtrDfltValue(a: PXkbPtrDfltAction, c: pointer) = + ##define XkbSASetPtrDfltValue(a,c) ((a)->valueXXX= ((c)&0xff)) + a.valueXXX = toU8(cast[int](c)) + +proc XkbSAScreen(a: PXkbSwitchScreenAction): int8 = + ##define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX)) + Result = toU8(XkbCharToInt(a.screenXXX)) + +proc XkbSASetScreen(a: PXkbSwitchScreenAction, s: pointer) = + ##define XkbSASetScreen(a,s) ((a)->screenXXX= ((s)&0xff)) + a.screenXXX = toU8(cast[int](s)) + +proc XkbActionSetCtrls(a: PXkbCtrlsAction, c: int8) = + ##define XkbActionSetCtrls(a,c) (((a)->ctrls3=(((c)>>24)&0xff)),((a)->ctrls2=(((c)>>16)&0xff)), + # ((a)->ctrls1=(((c)>>8)&0xff)),((a)->ctrls0=((c)&0xff))) + a.ctrls3 = toU8((ze(c) shr 24) and 0x000000FF) + a.ctrls2 = toU8((ze(c) shr 16) and 0x000000FF) + a.ctrls1 = toU8((ze(c) shr 8) and 0x000000FF) + a.ctrls0 = toU8(ze(c) and 0x000000FF) + +proc XkbActionCtrls(a: PXkbCtrlsAction): int16 = + ##define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|(((unsigned int)(a)->ctrls2)<<16)| + # (((unsigned int)(a)->ctrls1)<<8)|((unsigned int)((a)->ctrls0))) + Result = toU16((ze(a.ctrls3) shl 24) or (ze(a.ctrls2) shl 16) or + (ze(a.ctrls1) shl 8) or ze(a.ctrls0)) + +proc XkbSARedirectVMods(a: PXkbRedirectKeyAction): int16 = + ##define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|((unsigned int)(a)->vmods0)) + Result = toU16((ze(a.vmods1) shl 8) or ze(a.vmods0)) + +proc XkbSARedirectSetVMods(a: PXkbRedirectKeyAction, m: int8) = + ##define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),((a)->vmods_mask0=((m)&0xff))) + a.vmods_mask1 = toU8((ze(m) shr 8) and 0x000000FF) + a.vmods_mask0 = toU8(ze(m) or 0x000000FF) + +proc XkbSARedirectVModsMask(a: PXkbRedirectKeyAction): int16 = + ##define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)| + # ((unsigned int)(a)->vmods_mask0)) + Result = toU16((ze(a.vmods_mask1) shl 8) or ze(a.vmods_mask0)) + +proc XkbSARedirectSetVModsMask(a: PXkbRedirectKeyAction, m: int8) = + ##define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),((a)->vmods_mask0=((m)&0xff))) + a.vmods_mask1 = toU8(ze(m) shr 8 and 0x000000FF) + a.vmods_mask0 = toU8(ze(m) and 0x000000FF) + +proc XkbAX_AnyFeedback(c: PXkbControlsPtr): int16 = + ##define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask) + Result = toU16(ze(c.enabled_ctrls) and XkbAccessXFeedbackMask) + +proc XkbAX_NeedOption(c: PXkbControlsPtr, w: int16): int16 = + ##define XkbAX_NeedOption(c,w) ((c)->ax_options&(w)) + Result = toU16(ze(c.ax_options) and ze(w)) + +proc XkbAX_NeedFeedback(c: PXkbControlsPtr, w: int16): bool = + ##define XkbAX_NeedFeedback(c,w) (XkbAX_AnyFeedback(c)&&XkbAX_NeedOption(c,w)) + Result = (XkbAX_AnyFeedback(c) > 0'i16) and (XkbAX_NeedOption(c, w) > 0'i16) + +proc XkbSMKeyActionsPtr(m: PXkbServerMapPtr, k: int16): PXkbAction = + ##define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]]) + Result = addr(m.acts[ze(m.key_acts[ze(k)])]) + +proc XkbCMKeyGroupInfo(m: PXkbClientMapPtr, k: int16): int8 = + ##define XkbCMKeyGroupInfo(m,k) ((m)->key_sym_map[k].group_info) + Result = m.key_sym_map[ze(k)].group_info + +proc XkbCMKeyNumGroups(m: PXkbClientMapPtr, k: int16): int8 = + ##define XkbCMKeyNumGroups(m,k) (XkbNumGroups((m)->key_sym_map[k].group_info)) + Result = toU8(XkbNumGroups(m.key_sym_map[ze(k)].group_info)) + +proc XkbCMKeyGroupWidth(m: PXkbClientMapPtr, k: int16, g: int8): int8 = + ##define XkbCMKeyGroupWidth(m,k,g) (XkbCMKeyType(m,k,g)->num_levels) + Result = XkbCMKeyType(m, k, g).num_levels + +proc XkbCMKeyGroupsWidth(m: PXkbClientMapPtr, K: int16): int8 = + ##define XkbCMKeyGroupsWidth(m,k) ((m)->key_sym_map[k].width) + Result = m.key_sym_map[ze(k)].width + +proc XkbCMKeyTypeIndex(m: PXkbClientMapPtr, k: int16, g: int8): int8 = + ##define XkbCMKeyTypeIndex(m,k,g) ((m)->key_sym_map[k].kt_index[g&0x3]) + Result = m.key_sym_map[ze(k)].kt_index[ze(g) and 0x00000003] + +proc XkbCMKeyType(m: PXkbClientMapPtr, k: int16, g: int8): PXkbKeyTypePtr = + ##define XkbCMKeyType(m,k,g) (&(m)->types[XkbCMKeyTypeIndex(m,k,g)]) + Result = addr(m.types[ze(XkbCMKeyTypeIndex(m, k, g))]) + +proc XkbCMKeyNumSyms(m: PXkbClientMapPtr, k: int16): int16 = + ##define XkbCMKeyNumSyms(m,k) (XkbCMKeyGroupsWidth(m,k)*XkbCMKeyNumGroups(m,k)) + Result = toU16(ze(XkbCMKeyGroupsWidth(m, k)) or ze(XkbCMKeyNumGroups(m, k))) + +proc XkbCMKeySymsOffset(m: PXkbClientMapPtr, k: int16): int8 = + ##define XkbCMKeySymsOffset(m,k) ((m)->key_sym_map[k].offset) + Result = m.key_sym_map[ze(k)].offset + +proc XkbCMKeySymsPtr*(m: PXkbClientMapPtr, k: int16): PKeySym = + ##define XkbCMKeySymsPtr(m,k) (&(m)->syms[XkbCMKeySymsOffset(m,k)]) + Result = addr(m.syms[ze(XkbCMKeySymsOffset(m, k))]) + +proc XkbIM_IsAuto(i: PXkbIndicatorMapPtr): bool = + ##define XkbIM_IsAuto(i) ((((i)->flags&XkbIM_NoAutomatic)==0)&&(((i)->which_groups&&(i)->groups)|| + # ((i)->which_mods&&(i)->mods.mask)|| ((i)->ctrls))) + Result = ((ze(i.flags) and XkbIM_NoAutomatic) == 0) and + (((i.which_groups > 0'i8) and (i.groups > 0'i8)) or + ((i.which_mods > 0'i8) and (i.mods.mask > 0'i8)) or (i.ctrls > 0'i8)) + +proc XkbIM_InUse(i: PXkbIndicatorMapPtr): bool = + ##define XkbIM_InUse(i) (((i)->flags)||((i)->which_groups)||((i)->which_mods)||((i)->ctrls)) + Result = (i.flags > 0'i8) or (i.which_groups > 0'i8) or (i.which_mods > 0'i8) or + (i.ctrls > 0'i8) + +proc XkbKeyKeyTypeIndex(d: PXkbDescPtr, k: int16, g: int8): int8 = + ##define XkbKeyKeyTypeIndex(d,k,g) (XkbCMKeyTypeIndex((d)->map,k,g)) + Result = XkbCMKeyTypeIndex(d.map, k, g) + +proc XkbKeyKeyType(d: PXkbDescPtr, k: int16, g: int8): PXkbKeyTypePtr = + ##define XkbKeyKeyType(d,k,g) (XkbCMKeyType((d)->map,k,g)) + Result = XkbCMKeyType(d.map, k, g) + +proc XkbKeyGroupWidth(d: PXkbDescPtr, k: int16, g: int8): int8 = + ##define XkbKeyGroupWidth(d,k,g) (XkbCMKeyGroupWidth((d)->map,k,g)) + Result = XkbCMKeyGroupWidth(d.map, k, g) + +proc XkbKeyGroupsWidth(d: PXkbDescPtr, k: int16): int8 = + ##define XkbKeyGroupsWidth(d,k) (XkbCMKeyGroupsWidth((d)->map,k)) + Result = XkbCMKeyGroupsWidth(d.map, k) + +proc XkbKeyGroupInfo(d: PXkbDescPtr, k: int16): int8 = + ##define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k))) + Result = XkbCMKeyGroupInfo(d.map, k) + +proc XkbKeyNumGroups(d: PXkbDescPtr, k: int16): int8 = + ##define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k))) + Result = XkbCMKeyNumGroups(d.map, k) + +proc XkbKeyNumSyms(d: PXkbDescPtr, k: int16): int16 = + ##define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k))) + Result = XkbCMKeyNumSyms(d.map, k) + +proc XkbKeySymsPtr*(d: PXkbDescPtr, k: int16): PKeySym = + ##define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k))) + Result = XkbCMKeySymsPtr(d.map, k) + +proc XkbKeySym(d: PXkbDescPtr, k: int16, n: int16): TKeySym = + ##define XkbKeySym(d,k,n) (XkbKeySymsPtr(d,k)[n]) + Result = cast[ptr array[0..0xffff, TKeySym]](XkbKeySymsPtr(d, k))[ze(n)] # XXX: this seems strange! + +proc XkbKeySymEntry(d: PXkbDescPtr, k: int16, sl: int16, g: int8): TKeySym = + ##define XkbKeySymEntry(d,k,sl,g) (XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl)))) + Result = XkbKeySym(d, k, toU16(ze(XkbKeyGroupsWidth(d, k)) * ze(g) + ze(sl))) + +proc XkbKeyAction(d: PXkbDescPtr, k: int16, n: int16): PXkbAction = + ##define XkbKeyAction(d,k,n) (XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL) + #if (XkbKeyHasActions(d, k)): + # Result = XkbKeyActionsPtr(d, k)[ze(n)] #Buggy !!! + assert(false) + result = nil + +proc XkbKeyActionEntry(d: PXkbDescPtr, k: int16, sl: int16, g: int8): int8 = + ##define XkbKeyActionEntry(d,k,sl,g) (XkbKeyHasActions(d,k) ? + # XkbKeyAction(d, k, ((XkbKeyGroupsWidth(d, k) * (g))+(sl))):NULL) + if XkbKeyHasActions(d, k): + Result = XkbKeyGroupsWidth(d, k) *% g +% toU8(sl) + else: + Result = 0'i8 + +proc XkbKeyHasActions(d: PXkbDescPtr, k: int16): bool = + ##define XkbKeyHasActions(d,k) ((d)->server->key_acts[k]!=0) + Result = d.server.key_acts[ze(k)] != 0'i16 + +proc XkbKeyNumActions(d: PXkbDescPtr, k: int16): int16 = + ##define XkbKeyNumActions(d,k) (XkbKeyHasActions(d,k)?XkbKeyNumSyms(d,k):1) + if (XkbKeyHasActions(d, k)): Result = XkbKeyNumSyms(d, k) + else: Result = 1'i16 + +proc XkbKeyActionsPtr(d: PXkbDescPtr, k: int16): PXkbAction = + ##define XkbKeyActionsPtr(d,k) (XkbSMKeyActionsPtr((d)->server,k)) + Result = XkbSMKeyActionsPtr(d.server, k) + +proc XkbKeycodeInRange(d: PXkbDescPtr, k: int16): bool = + ##define XkbKeycodeInRange(d,k) (((k)>=(d)->min_key_code)&& ((k)<=(d)->max_key_code)) + Result = (char(toU8(k)) >= d.min_key_code) and (char(toU8(k)) <= d.max_key_code) + +proc XkbNumKeys(d: PXkbDescPtr): int8 = + ##define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1) + Result = toU8(ord(d.max_key_code) - ord(d.min_key_code) + 1) + +proc XkbXI_DevHasBtnActs(d: PXkbDeviceInfoPtr): bool = + ##define XkbXI_DevHasBtnActs(d) (((d)->num_btns>0)&&((d)->btn_acts!=NULL)) + Result = (d.num_btns > 0'i16) and (not (d.btn_acts == nil)) + +proc XkbXI_LegalDevBtn(d: PXkbDeviceInfoPtr, b: int16): bool = + ##define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d)&&((b)<(d)->num_btns)) + Result = XkbXI_DevHasBtnActs(d) and (b <% d.num_btns) + +proc XkbXI_DevHasLeds(d: PXkbDeviceInfoPtr): bool = + ##define XkbXI_DevHasLeds(d) (((d)->num_leds>0)&&((d)->leds!=NULL)) + Result = (d.num_leds > 0'i16) and (not (d.leds == nil)) + +proc XkbBoundsWidth(b: PXkbBoundsPtr): int16 = + ##define XkbBoundsWidth(b) (((b)->x2)-((b)->x1)) + Result = (b.x2) - b.x1 + +proc XkbBoundsHeight(b: PXkbBoundsPtr): int16 = + ##define XkbBoundsHeight(b) (((b)->y2)-((b)->y1)) + Result = (b.y2) - b.y1 + +proc XkbOutlineIndex(s: PXkbShapePtr, o: PXkbOutlinePtr): int32 = + ##define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0])) + Result = int32((cast[TAddress](o) - cast[TAddress](addr(s.outlines[0]))) div sizeof(PXkbOutlinePtr)) + +proc XkbShapeDoodadColor(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr): PXkbColorPtr = + ##define XkbShapeDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) + Result = addr((g.colors[ze(d.color_ndx)])) + +proc XkbShapeDoodadShape(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr): PXkbShapePtr = + ##define XkbShapeDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) + Result = addr(g.shapes[ze(d.shape_ndx)]) + +proc XkbSetShapeDoodadColor(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr, + c: PXkbColorPtr) = + ##define XkbSetShapeDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) + d.color_ndx = toU16((cast[TAddress](c) - cast[TAddress](addr(g.colors[0]))) div sizeof(TXkbColorRec)) + +proc XkbSetShapeDoodadShape(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr, + s: PXkbShapePtr) = + ##define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0]) + d.shape_ndx = toU16((cast[TAddress](s) - cast[TAddress](addr(g.shapes[0]))) div sizeof(TXkbShapeRec)) + +proc XkbTextDoodadColor(g: PXkbGeometryPtr, d: PXkbTextDoodadPtr): PXkbColorPtr = + ##define XkbTextDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) + Result = addr(g.colors[ze(d.color_ndx)]) + +proc XkbSetTextDoodadColor(g: PXkbGeometryPtr, d: PXkbTextDoodadPtr, + c: PXkbColorPtr) = + ##define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) + d.color_ndx = toU16((cast[TAddress](c) - cast[TAddress](addr(g.colors[0]))) div sizeof(TXkbColorRec)) + +proc XkbIndicatorDoodadShape(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbShapeDoodadPtr = + ##define XkbIndicatorDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) + Result = cast[PXkbShapeDoodadPtr](addr(g.shapes[ze(d.shape_ndx)])) + +proc XkbIndicatorDoodadOnColor(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbColorPtr = + ##define XkbIndicatorDoodadOnColor(g,d) (&(g)->colors[(d)->on_color_ndx]) + Result = addr(g.colors[ze(d.on_color_ndx)]) + +proc XkbIndicatorDoodadOffColor(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbColorPtr = + ##define XkbIndicatorDoodadOffColor(g,d) (&(g)->colors[(d)->off_color_ndx]) + Result = addr(g.colors[ze(d.off_color_ndx)]) + +proc XkbSetIndicatorDoodadOnColor(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr, + c: PXkbColorPtr) = + ##define XkbSetIndicatorDoodadOnColor(g,d,c) ((d)->on_color_ndx= (c)-&(g)->colors[0]) + d.on_color_ndx = toU16((cast[TAddress](c) - cast[TAddress](addr(g.colors[0]))) div sizeof(TXkbColorRec)) + +proc XkbSetIndicatorDoodadOffColor(g: PXkbGeometryPtr, + d: PXkbIndicatorDoodadPtr, c: PXkbColorPtr) = + ##define XkbSetIndicatorDoodadOffColor(g,d,c) ((d)->off_color_ndx= (c)-&(g)->colors[0]) + d.off_color_ndx = toU16((cast[TAddress](c) - cast[TAddress](addr(g.colors[0]))) div sizeof(TxkbColorRec)) + +proc XkbSetIndicatorDoodadShape(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr, + s: PXkbShapeDoodadPtr) = + ##define XkbSetIndicatorDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0]) + d.shape_ndx = toU16((cast[TAddress](s) - (cast[TAddress](addr(g.shapes[0])))) div sizeof(TXkbShapeRec)) + +proc XkbLogoDoodadColor(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr): PXkbColorPtr = + ##define XkbLogoDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) + Result = addr(g.colors[ze(d.color_ndx)]) + +proc XkbLogoDoodadShape(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr): PXkbShapeDoodadPtr = + ##define XkbLogoDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) + Result = cast[PXkbShapeDoodadPtr](addr(g.shapes[ze(d.shape_ndx)])) + +proc XkbSetLogoDoodadColor(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr, + c: PXkbColorPtr) = + ##define XkbSetLogoDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) + d.color_ndx = toU16((cast[TAddress](c) - cast[TAddress](addr(g.colors[0]))) div sizeof(TXkbColorRec)) + +proc XkbSetLogoDoodadShape(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr, + s: PXkbShapeDoodadPtr) = + ##define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0]) + d.shape_ndx = toU16((cast[TAddress](s) - cast[TAddress](addr(g.shapes[0]))) div sizeof(TXkbShapeRec)) + +proc XkbKeyShape(g: PXkbGeometryPtr, k: PXkbKeyPtr): PXkbShapeDoodadPtr = + ##define XkbKeyShape(g,k) (&(g)->shapes[(k)->shape_ndx]) + Result = cast[PXkbShapeDoodadPtr](addr(g.shapes[ze(k.shape_ndx)])) + +proc XkbKeyColor(g: PXkbGeometryPtr, k: PXkbKeyPtr): PXkbColorPtr = + ##define XkbKeyColor(g,k) (&(g)->colors[(k)->color_ndx]) + Result = addr(g.colors[ze(k.color_ndx)]) + +proc XkbSetKeyShape(g: PXkbGeometryPtr, k: PXkbKeyPtr, s: PXkbShapeDoodadPtr) = + ##define XkbSetKeyShape(g,k,s) ((k)->shape_ndx= (s)-&(g)->shapes[0]) + k.shape_ndx = toU8((cast[TAddress](s) - cast[TAddress](addr(g.shapes[0]))) div sizeof(TXkbShapeRec)) + +proc XkbSetKeyColor(g: PXkbGeometryPtr, k: PXkbKeyPtr, c: PXkbColorPtr) = + ##define XkbSetKeyColor(g,k,c) ((k)->color_ndx= (c)-&(g)->colors[0]) + k.color_ndx = toU8((cast[TAddress](c) - cast[TAddress](addr(g.colors[0]))) div sizeof(TxkbColorRec)) + +proc XkbGeomColorIndex(g: PXkbGeometryPtr, c: PXkbColorPtr): int32 = + ##define XkbGeomColorIndex(g,c) ((int)((c)-&(g)->colors[0])) + Result = toU16((cast[TAddress](c) - (cast[TAddress](addr(g.colors[0])))) div sizeof(TxkbColorRec)) diff --git a/lib/oldwrappers/x11/xkblib.nim b/lib/oldwrappers/x11/xkblib.nim new file mode 100644 index 000000000..92d438a60 --- /dev/null +++ b/lib/oldwrappers/x11/xkblib.nim @@ -0,0 +1,699 @@ +# $Xorg: XKBlib.h,v 1.6 2000/08/17 19:45:03 cpqbld Exp $ +#************************************************************ +#Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. +# +#Permission to use, copy, modify, and distribute this +#software and its documentation for any purpose and without +#fee is hereby granted, provided that the above copyright +#notice appear in all copies and that both that copyright +#notice and this permission notice appear in supporting +#documentation, and that the name of Silicon Graphics not be +#used in advertising or publicity pertaining to distribution +#of the software without specific prior written permission. +#Silicon Graphics makes no representation about the suitability +#of this software for any purpose. It is provided "as is" +#without any express or implied warranty. +# +#SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +#SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +#AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +#GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL +#DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING `from` LOSS OF USE, +#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +#OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +#THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +#********************************************************/ +# $XFree86: xc/lib/X11/XKBlib.h,v 3.3 2001/08/01 00:44:38 tsi Exp $ +# +# Pascal Convertion was made by Ido Kannner - kanerido@actcom.net.il +# +#Thanks: +# I want to thanks to oliebol for putting up with all of the problems that was found +# while translating this code. ;) +# +# I want to thanks #fpc channel in freenode irc, for helping me, and to put up with my +# wierd questions ;) +# +# Thanks for mmc in #xlib on freenode irc And so for the channel itself for the helping me to +# understanding some of the problems I had converting this headers and pointing me to resources +# that helped translating this headers. +# +# Ido +# +#History: +# 2004/10/15 - Fixed a bug of accessing second based records by removing "paced record" and +# chnaged it to "reocrd" only. +# 2004/10/10 - Added to TXkbGetAtomNameFunc and TXkbInternAtomFunc the cdecl call. +# 2004/10/06 - 09 - Convertion `from` the c header of XKBlib.h +# +# + +import + X, Xlib, XKB + +type + PXkbAnyEvent* = ptr TXkbAnyEvent + TXkbAnyEvent*{.final.} = object + theType*: int16 # XkbAnyEvent + serial*: int32 # # of last req processed by server + send_event*: bool # is this `from` a SendEvent request? + display*: PDisplay # Display the event was read `from` + time*: TTime # milliseconds; + xkb_type*: int16 # XKB event minor code + device*: int16 # device ID + + +type + PXkbNewKeyboardNotifyEvent* = ptr TXkbNewKeyboardNotifyEvent + TXkbNewKeyboardNotifyEvent*{.final.} = object + theType*: int16 # XkbAnyEvent + serial*: int32 # of last req processed by server + send_event*: bool # is this `from` a SendEvent request? + display*: PDisplay # Display the event was read `from` + time*: TTime # milliseconds + xkb_type*: int16 # XkbNewKeyboardNotify + device*: int16 # device ID + old_device*: int16 # device ID of previous keyboard + min_key_code*: int16 # minimum key code + max_key_code*: int16 # maximum key code + old_min_key_code*: int16 # min key code of previous kbd + old_max_key_code*: int16 # max key code of previous kbd + changed*: int16 # changed aspects of the keyboard + req_major*: int8 # major and minor opcode of req + req_minor*: int8 # that caused change, if applicable + + +type + PXkbMapNotifyEvent* = ptr TXkbMapNotifyEvent + TXkbMapNotifyEvent*{.final.} = object + theType*: int16 # XkbAnyEvent + serial*: int32 # of last req processed by server + send_event*: bool # is this `from` a SendEvent request + display*: PDisplay # Display the event was read `from` + time*: TTime # milliseconds + xkb_type*: int16 # XkbMapNotify + device*: int16 # device ID + changed*: int16 # fields which have been changed + flags*: int16 # reserved + first_type*: int16 # first changed key type + num_types*: int16 # number of changed key types + min_key_code*: TKeyCode + max_key_code*: TKeyCode + first_key_sym*: TKeyCode + first_key_act*: TKeyCode + first_key_behavior*: TKeyCode + first_key_explicit*: TKeyCode + first_modmap_key*: TKeyCode + first_vmodmap_key*: TKeyCode + num_key_syms*: int16 + num_key_acts*: int16 + num_key_behaviors*: int16 + num_key_explicit*: int16 + num_modmap_keys*: int16 + num_vmodmap_keys*: int16 + vmods*: int16 # mask of changed virtual mods + + +type + PXkbStateNotifyEvent* = ptr TXkbStateNotifyEvent + TXkbStateNotifyEvent*{.final.} = object + theType*: int16 # XkbAnyEvent + serial*: int32 # # of last req processed by server + send_event*: bool # is this `from` a SendEvent request? + display*: PDisplay # Display the event was read `from` + time*: TTime # milliseconds + xkb_type*: int16 # XkbStateNotify + device*: int16 # device ID + changed*: int16 # mask of changed state components + group*: int16 # keyboard group + base_group*: int16 # base keyboard group + latched_group*: int16 # latched keyboard group + locked_group*: int16 # locked keyboard group + mods*: int16 # modifier state + base_mods*: int16 # base modifier state + latched_mods*: int16 # latched modifiers + locked_mods*: int16 # locked modifiers + compat_state*: int16 # compatibility state + grab_mods*: int8 # mods used for grabs + compat_grab_mods*: int8 # grab mods for non-XKB clients + lookup_mods*: int8 # mods sent to clients + compat_lookup_mods*: int8 # mods sent to non-XKB clients + ptr_buttons*: int16 # pointer button state + keycode*: TKeyCode # keycode that caused the change + event_type*: int8 # KeyPress or KeyRelease + req_major*: int8 # Major opcode of request + req_minor*: int8 # Minor opcode of request + + +type + PXkbControlsNotifyEvent* = ptr TXkbControlsNotifyEvent + TXkbControlsNotifyEvent*{.final.} = object + theType*: int16 # XkbAnyEvent + serial*: int32 # of last req processed by server + send_event*: bool # is this `from` a SendEvent request? + display*: PDisplay # Display the event was read `from` + time*: TTime # milliseconds + xkb_type*: int16 # XkbControlsNotify + device*: int16 # device ID + changed_ctrls*: int16 # controls with changed sub-values + enabled_ctrls*: int16 # controls currently enabled + enabled_ctrl_changes*: int16 # controls just {en,dis}abled + num_groups*: int16 # total groups on keyboard + keycode*: TKeyCode # key that caused change or 0 + event_type*: int8 # type of event that caused change + req_major*: int8 # if keycode==0, major and minor + req_minor*: int8 # opcode of req that caused change + + +type + PXkbIndicatorNotifyEvent* = ptr TXkbIndicatorNotifyEvent + TXkbIndicatorNotifyEvent*{.final.} = object + theType*: int16 # XkbAnyEvent + serial*: int32 # of last req processed by server + send_event*: bool # is this `from` a SendEvent request? + display*: PDisplay # Display the event was read `from` + time*: TTime # milliseconds + xkb_type*: int16 # XkbIndicatorNotify + device*: int16 # device + changed*: int16 # indicators with new state or map + state*: int16 # current state of all indicators + + +type + PXkbNamesNotifyEvent* = ptr TXkbNamesNotifyEvent + TXkbNamesNotifyEvent*{.final.} = object + theType*: int16 # XkbAnyEvent + serial*: int32 # of last req processed by server + send_event*: bool # is this `from` a SendEvent request? + display*: PDisplay # Display the event was read `from` + time*: TTime # milliseconds + xkb_type*: int16 # XkbNamesNotify + device*: int16 # device ID + changed*: int32 # names that have changed + first_type*: int16 # first key type with new name + num_types*: int16 # number of key types with new names + first_lvl*: int16 # first key type new new level names + num_lvls*: int16 # # of key types w/new level names + num_aliases*: int16 # total number of key aliases + num_radio_groups*: int16 # total number of radio groups + changed_vmods*: int16 # virtual modifiers with new names + changed_groups*: int16 # groups with new names + changed_indicators*: int16 # indicators with new names + first_key*: int16 # first key with new name + num_keys*: int16 # number of keys with new names + + +type + PXkbCompatMapNotifyEvent* = ptr TXkbCompatMapNotifyEvent + TXkbCompatMapNotifyEvent*{.final.} = object + theType*: int16 # XkbAnyEvent + serial*: int32 # of last req processed by server + send_event*: bool # is this `from` a SendEvent request? + display*: PDisplay # Display the event was read `from` + time*: TTime # milliseconds + xkb_type*: int16 # XkbCompatMapNotify + device*: int16 # device ID + changed_groups*: int16 # groups with new compat maps + first_si*: int16 # first new symbol interp + num_si*: int16 # number of new symbol interps + num_total_si*: int16 # total # of symbol interps + + +type + PXkbBellNotifyEvent* = ptr TXkbBellNotifyEvent + TXkbBellNotifyEvent*{.final.} = object + theType*: int16 # XkbAnyEvent + serial*: int32 # of last req processed by server + send_event*: bool # is this `from` a SendEvent request? + display*: PDisplay # Display the event was read `from` + time*: TTime # milliseconds + xkb_type*: int16 # XkbBellNotify + device*: int16 # device ID + percent*: int16 # requested volume as a % of maximum + pitch*: int16 # requested pitch in Hz + duration*: int16 # requested duration in useconds + bell_class*: int16 # (input extension) feedback class + bell_id*: int16 # (input extension) ID of feedback + name*: TAtom # "name" of requested bell + window*: TWindow # window associated with event + event_only*: bool # "event only" requested + + +type + PXkbActionMessageEvent* = ptr TXkbActionMessageEvent + TXkbActionMessageEvent*{.final.} = object + theType*: int16 # XkbAnyEvent + serial*: int32 # of last req processed by server + send_event*: bool # is this `from` a SendEvent request? + display*: PDisplay # Display the event was read `from` + time*: TTime # milliseconds + xkb_type*: int16 # XkbActionMessage + device*: int16 # device ID + keycode*: TKeyCode # key that generated the event + press*: bool # true if act caused by key press + key_event_follows*: bool # true if key event also generated + group*: int16 # effective group + mods*: int16 # effective mods + message*: array[0..XkbActionMessageLength, Char] # message -- leave space for NUL + + +type + PXkbAccessXNotifyEvent* = ptr TXkbAccessXNotifyEvent + TXkbAccessXNotifyEvent*{.final.} = object + theType*: int16 # XkbAnyEvent + serial*: int32 # of last req processed by server + send_event*: bool # is this `from` a SendEvent request? + display*: PDisplay # Display the event was read `from` + time*: TTime # milliseconds + xkb_type*: int16 # XkbAccessXNotify + device*: int16 # device ID + detail*: int16 # XkbAXN_* + keycode*: int16 # key of event + sk_delay*: int16 # current slow keys delay + debounce_delay*: int16 # current debounce delay + + +type + PXkbExtensionDeviceNotifyEvent* = ptr TXkbExtensionDeviceNotifyEvent + TXkbExtensionDeviceNotifyEvent*{.final.} = object + theType*: int16 # XkbAnyEvent + serial*: int32 # of last req processed by server + send_event*: bool # is this `from` a SendEvent request? + display*: PDisplay # Display the event was read `from` + time*: TTime # milliseconds + xkb_type*: int16 # XkbExtensionDeviceNotify + device*: int16 # device ID + reason*: int16 # reason for the event + supported*: int16 # mask of supported features + unsupported*: int16 # mask of unsupported features + # that some app tried to use + first_btn*: int16 # first button that changed + num_btns*: int16 # range of buttons changed + leds_defined*: int16 # indicators with names or maps + led_state*: int16 # current state of the indicators + led_class*: int16 # feedback class for led changes + led_id*: int16 # feedback id for led changes + + +type + PXkbEvent* = ptr TXkbEvent + TXkbEvent*{.final.} = object + theType*: int16 + any*: TXkbAnyEvent + new_kbd*: TXkbNewKeyboardNotifyEvent + map*: TXkbMapNotifyEvent + state*: TXkbStateNotifyEvent + ctrls*: TXkbControlsNotifyEvent + indicators*: TXkbIndicatorNotifyEvent + names*: TXkbNamesNotifyEvent + compat*: TXkbCompatMapNotifyEvent + bell*: TXkbBellNotifyEvent + message*: TXkbActionMessageEvent + accessx*: TXkbAccessXNotifyEvent + device*: TXkbExtensionDeviceNotifyEvent + core*: TXEvent + + +type + PXkbKbdDpyStatePtr* = ptr TXkbKbdDpyStateRec + TXkbKbdDpyStateRec*{.final.} = object # XkbOpenDisplay error codes + +const + XkbOD_Success* = 0 + XkbOD_BadLibraryVersion* = 1 + XkbOD_ConnectionRefused* = 2 + XkbOD_NonXkbServer* = 3 + XkbOD_BadServerVersion* = 4 # Values for XlibFlags + +const + XkbLC_ForceLatin1Lookup* = 1 shl 0 + XkbLC_ConsumeLookupMods* = 1 shl 1 + XkbLC_AlwaysConsumeShiftAndLock* = 1 shl 2 + XkbLC_IgnoreNewKeyboards* = 1 shl 3 + XkbLC_ControlFallback* = 1 shl 4 + XkbLC_ConsumeKeysOnComposeFail* = 1 shl 29 + XkbLC_ComposeLED* = 1 shl 30 + XkbLC_BeepOnComposeFail* = 1 shl 31 + XkbLC_AllComposeControls* = 0xC0000000 + XkbLC_AllControls* = 0xC000001F + +proc XkbIgnoreExtension*(ignore: bool): bool{.cdecl, dynlib: libX11, + importc: "XkbIgnoreExtension".} +proc XkbOpenDisplay*(name: cstring, ev_rtrn, err_rtrn, major_rtrn, minor_rtrn, + reason: ptr int16): PDisplay{.cdecl, + dynlib: libX11, importc: "XkbOpenDisplay".} +proc XkbQueryExtension*(dpy: PDisplay, opcodeReturn, eventBaseReturn, + errorBaseReturn, majorRtrn, minorRtrn: ptr int16): bool{. + cdecl, dynlib: libX11, importc: "XkbQueryExtension".} +proc XkbUseExtension*(dpy: PDisplay, major_rtrn, minor_rtrn: ptr int16): bool{. + cdecl, dynlib: libX11, importc: "XkbUseExtension".} +proc XkbLibraryVersion*(libMajorRtrn, libMinorRtrn: ptr int16): bool{.cdecl, + dynlib: libX11, importc: "XkbLibraryVersion".} +proc XkbSetXlibControls*(dpy: PDisplay, affect, values: int16): int16{.cdecl, + dynlib: libX11, importc: "XkbSetXlibControls".} +proc XkbGetXlibControls*(dpy: PDisplay): int16{.cdecl, dynlib: libX11, + importc: "XkbGetXlibControls".} +type + TXkbInternAtomFunc* = proc (dpy: PDisplay, name: cstring, only_if_exists: bool): TAtom{. + cdecl.} + +type + TXkbGetAtomNameFunc* = proc (dpy: PDisplay, atom: TAtom): cstring{.cdecl.} + +proc XkbSetAtomFuncs*(getAtom: TXkbInternAtomFunc, getName: TXkbGetAtomNameFunc){. + cdecl, dynlib: libX11, importc: "XkbSetAtomFuncs".} +proc XkbKeycodeToKeysym*(dpy: PDisplay, kc: TKeyCode, group, level: int16): TKeySym{. + cdecl, dynlib: libX11, importc: "XkbKeycodeToKeysym".} +proc XkbKeysymToModifiers*(dpy: PDisplay, ks: TKeySym): int16{.cdecl, + dynlib: libX11, importc: "XkbKeysymToModifiers".} +proc XkbLookupKeySym*(dpy: PDisplay, keycode: TKeyCode, + modifiers, modifiers_return: int16, keysym_return: PKeySym): bool{. + cdecl, dynlib: libX11, importc: "XkbLookupKeySym".} +proc XkbLookupKeyBinding*(dpy: PDisplay, sym_rtrn: TKeySym, mods: int16, + buffer: cstring, nbytes: int16, extra_rtrn: ptr int16): int16{. + cdecl, dynlib: libX11, importc: "XkbLookupKeyBinding".} +proc XkbTranslateKeyCode*(xkb: PXkbDescPtr, keycode: TKeyCode, + modifiers, modifiers_return: int16, + keysym_return: PKeySym): bool{.cdecl, dynlib: libX11, + importc: "XkbTranslateKeyCode".} +proc XkbTranslateKeySym*(dpy: PDisplay, sym_return: TKeySym, modifiers: int16, + buffer: cstring, nbytes: int16, extra_rtrn: ptr int16): int16{. + cdecl, dynlib: libX11, importc: "XkbTranslateKeySym".} +proc XkbSetAutoRepeatRate*(dpy: PDisplay, deviceSpec, delay, interval: int16): bool{. + cdecl, dynlib: libX11, importc: "XkbSetAutoRepeatRate".} +proc XkbGetAutoRepeatRate*(dpy: PDisplay, deviceSpec: int16, + delayRtrn, intervalRtrn: PWord): bool{.cdecl, + dynlib: libX11, importc: "XkbGetAutoRepeatRate".} +proc XkbChangeEnabledControls*(dpy: PDisplay, deviceSpec, affect, values: int16): bool{. + cdecl, dynlib: libX11, importc: "XkbChangeEnabledControls".} +proc XkbDeviceBell*(dpy: PDisplay, win: TWindow, + deviceSpec, bellClass, bellID, percent: int16, name: TAtom): bool{. + cdecl, dynlib: libX11, importc: "XkbDeviceBell".} +proc XkbForceDeviceBell*(dpy: PDisplay, + deviceSpec, bellClass, bellID, percent: int16): bool{. + cdecl, dynlib: libX11, importc: "XkbForceDeviceBell".} +proc XkbDeviceBellEvent*(dpy: PDisplay, win: TWindow, + deviceSpec, bellClass, bellID, percent: int16, + name: TAtom): bool{.cdecl, dynlib: libX11, + importc: "XkbDeviceBellEvent".} +proc XkbBell*(dpy: PDisplay, win: TWindow, percent: int16, name: TAtom): bool{. + cdecl, dynlib: libX11, importc: "XkbBell".} +proc XkbForceBell*(dpy: PDisplay, percent: int16): bool{.cdecl, dynlib: libX11, + importc: "XkbForceBell".} +proc XkbBellEvent*(dpy: PDisplay, win: TWindow, percent: int16, name: TAtom): bool{. + cdecl, dynlib: libX11, importc: "XkbBellEvent".} +proc XkbSelectEvents*(dpy: PDisplay, deviceID, affect, values: int16): bool{. + cdecl, dynlib: libX11, importc: "XkbSelectEvents".} +proc XkbSelectEventDetails*(dpy: PDisplay, deviceID, eventType: int16, + affect, details: int32): bool{.cdecl, + dynlib: libX11, importc: "XkbSelectEventDetails".} +proc XkbNoteMapChanges*(old: PXkbMapChangesPtr, new: PXkbMapNotifyEvent, + wanted: int16){.cdecl, dynlib: libX11, + importc: "XkbNoteMapChanges".} +proc XkbNoteNameChanges*(old: PXkbNameChangesPtr, new: PXkbNamesNotifyEvent, + wanted: int16){.cdecl, dynlib: libX11, + importc: "XkbNoteNameChanges".} +proc XkbGetIndicatorState*(dpy: PDisplay, deviceSpec: int16, pStateRtrn: PWord): TStatus{. + cdecl, dynlib: libX11, importc: "XkbGetIndicatorState".} +proc XkbGetDeviceIndicatorState*(dpy: PDisplay, + deviceSpec, ledClass, ledID: int16, + pStateRtrn: PWord): TStatus{.cdecl, + dynlib: libX11, importc: "XkbGetDeviceIndicatorState".} +proc XkbGetIndicatorMap*(dpy: PDisplay, which: int32, desc: PXkbDescPtr): TStatus{. + cdecl, dynlib: libX11, importc: "XkbGetIndicatorMap".} +proc XkbSetIndicatorMap*(dpy: PDisplay, which: int32, desc: PXkbDescPtr): bool{. + cdecl, dynlib: libX11, importc: "XkbSetIndicatorMap".} +proc XkbNoteIndicatorMapChanges*(o, n: PXkbIndicatorChangesPtr, w: int16) +proc XkbNoteIndicatorStateChanges*(o, n: PXkbIndicatorChangesPtr, w: int16) +proc XkbGetIndicatorMapChanges*(d: PDisplay, x: PXkbDescPtr, + c: PXkbIndicatorChangesPtr): TStatus +proc XkbChangeIndicatorMaps*(d: PDisplay, x: PXkbDescPtr, + c: PXkbIndicatorChangesPtr): bool +proc XkbGetNamedIndicator*(dpy: PDisplay, name: TAtom, pNdxRtrn: ptr int16, + pStateRtrn: ptr bool, pMapRtrn: PXkbIndicatorMapPtr, + pRealRtrn: ptr bool): bool{.cdecl, dynlib: libX11, + importc: "XkbGetNamedIndicator".} +proc XkbGetNamedDeviceIndicator*(dpy: PDisplay, + deviceSpec, ledClass, ledID: int16, + name: TAtom, pNdxRtrn: ptr int16, + pStateRtrn: ptr bool, + pMapRtrn: PXkbIndicatorMapPtr, + pRealRtrn: ptr bool): bool{.cdecl, + dynlib: libX11, importc: "XkbGetNamedDeviceIndicator".} +proc XkbSetNamedIndicator*(dpy: PDisplay, name: TAtom, + changeState, state, createNewMap: bool, + pMap: PXkbIndicatorMapPtr): bool{.cdecl, + dynlib: libX11, importc: "XkbSetNamedIndicator".} +proc XkbSetNamedDeviceIndicator*(dpy: PDisplay, + deviceSpec, ledClass, ledID: int16, + name: TAtom, + changeState, state, createNewMap: bool, + pMap: PXkbIndicatorMapPtr): bool{.cdecl, + dynlib: libX11, importc: "XkbSetNamedDeviceIndicator".} +proc XkbLockModifiers*(dpy: PDisplay, deviceSpec, affect, values: int16): bool{. + cdecl, dynlib: libX11, importc: "XkbLockModifiers".} +proc XkbLatchModifiers*(dpy: PDisplay, deviceSpec, affect, values: int16): bool{. + cdecl, dynlib: libX11, importc: "XkbLatchModifiers".} +proc XkbLockGroup*(dpy: PDisplay, deviceSpec, group: int16): bool{.cdecl, + dynlib: libX11, importc: "XkbLockGroup".} +proc XkbLatchGroup*(dpy: PDisplay, deviceSpec, group: int16): bool{.cdecl, + dynlib: libX11, importc: "XkbLatchGroup".} +proc XkbSetServerInternalMods*(dpy: PDisplay, deviceSpec, affectReal, + realValues, affectVirtual, virtualValues: int16): bool{.cdecl, + dynlib: libX11, importc: "XkbSetServerInternalMods".} +proc XkbSetIgnoreLockMods*(dpy: PDisplay, deviceSpec, affectReal, realValues, + affectVirtual, virtualValues: int16): bool{.cdecl, dynlib: libX11, + importc: "XkbSetIgnoreLockMods".} +proc XkbVirtualModsToReal*(dpy: PDisplay, virtual_mask: int16, mask_rtrn: PWord): bool{. + cdecl, dynlib: libX11, importc: "XkbVirtualModsToReal".} +proc XkbComputeEffectiveMap*(xkb: PXkbDescPtr, theType: PXkbKeyTypePtr, + map_rtrn: PByte): bool{.cdecl, dynlib: libX11, + importc: "XkbComputeEffectiveMap".} +proc XkbInitCanonicalKeyTypes*(xkb: PXkbDescPtr, which: int16, keypadVMod: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbInitCanonicalKeyTypes".} +proc XkbAllocKeyboard*(): PXkbDescPtr{.cdecl, dynlib: libX11, + importc: "XkbAllocKeyboard".} +proc XkbFreeKeyboard*(xkb: PXkbDescPtr, which: int16, freeDesc: bool){.cdecl, + dynlib: libX11, importc: "XkbFreeKeyboard".} +proc XkbAllocClientMap*(xkb: PXkbDescPtr, which, nTypes: int16): TStatus{.cdecl, + dynlib: libX11, importc: "XkbAllocClientMap".} +proc XkbAllocServerMap*(xkb: PXkbDescPtr, which, nActions: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocServerMap".} +proc XkbFreeClientMap*(xkb: PXkbDescPtr, what: int16, freeMap: bool){.cdecl, + dynlib: libX11, importc: "XkbFreeClientMap".} +proc XkbFreeServerMap*(xkb: PXkbDescPtr, what: int16, freeMap: bool){.cdecl, + dynlib: libX11, importc: "XkbFreeServerMap".} +proc XkbAddKeyType*(xkb: PXkbDescPtr, name: TAtom, map_count: int16, + want_preserve: bool, num_lvls: int16): PXkbKeyTypePtr{. + cdecl, dynlib: libX11, importc: "XkbAddKeyType".} +proc XkbAllocIndicatorMaps*(xkb: PXkbDescPtr): TStatus{.cdecl, dynlib: libX11, + importc: "XkbAllocIndicatorMaps".} +proc XkbFreeIndicatorMaps*(xkb: PXkbDescPtr){.cdecl, dynlib: libX11, + importc: "XkbFreeIndicatorMaps".} +proc XkbGetMap*(dpy: PDisplay, which, deviceSpec: int16): PXkbDescPtr{.cdecl, + dynlib: libX11, importc: "XkbGetMap".} +proc XkbGetUpdatedMap*(dpy: PDisplay, which: int16, desc: PXkbDescPtr): TStatus{. + cdecl, dynlib: libX11, importc: "XkbGetUpdatedMap".} +proc XkbGetMapChanges*(dpy: PDisplay, xkb: PXkbDescPtr, + changes: PXkbMapChangesPtr): TStatus{.cdecl, + dynlib: libX11, importc: "XkbGetMapChanges".} +proc XkbRefreshKeyboardMapping*(event: PXkbMapNotifyEvent): TStatus{.cdecl, + dynlib: libX11, importc: "XkbRefreshKeyboardMapping".} +proc XkbGetKeyTypes*(dpy: PDisplay, first, num: int16, xkb: PXkbDescPtr): TStatus{. + cdecl, dynlib: libX11, importc: "XkbGetKeyTypes".} +proc XkbGetKeySyms*(dpy: PDisplay, first, num: int16, xkb: PXkbDescPtr): TStatus{. + cdecl, dynlib: libX11, importc: "XkbGetKeySyms".} +proc XkbGetKeyActions*(dpy: PDisplay, first, num: int16, xkb: PXkbDescPtr): TStatus{. + cdecl, dynlib: libX11, importc: "XkbGetKeyActions".} +proc XkbGetKeyBehaviors*(dpy: PDisplay, firstKey, nKeys: int16, + desc: PXkbDescPtr): TStatus{.cdecl, dynlib: libX11, + importc: "XkbGetKeyBehaviors".} +proc XkbGetVirtualMods*(dpy: PDisplay, which: int16, desc: PXkbDescPtr): TStatus{. + cdecl, dynlib: libX11, importc: "XkbGetVirtualMods".} +proc XkbGetKeyExplicitComponents*(dpy: PDisplay, firstKey, nKeys: int16, + desc: PXkbDescPtr): TStatus{.cdecl, + dynlib: libX11, importc: "XkbGetKeyExplicitComponents".} +proc XkbGetKeyModifierMap*(dpy: PDisplay, firstKey, nKeys: int16, + desc: PXkbDescPtr): TStatus{.cdecl, dynlib: libX11, + importc: "XkbGetKeyModifierMap".} +proc XkbAllocControls*(xkb: PXkbDescPtr, which: int16): TStatus{.cdecl, + dynlib: libX11, importc: "XkbAllocControls".} +proc XkbFreeControls*(xkb: PXkbDescPtr, which: int16, freeMap: bool){.cdecl, + dynlib: libX11, importc: "XkbFreeControls".} +proc XkbGetControls*(dpy: PDisplay, which: int32, desc: PXkbDescPtr): TStatus{. + cdecl, dynlib: libX11, importc: "XkbGetControls".} +proc XkbSetControls*(dpy: PDisplay, which: int32, desc: PXkbDescPtr): bool{. + cdecl, dynlib: libX11, importc: "XkbSetControls".} +proc XkbNoteControlsChanges*(old: PXkbControlsChangesPtr, + new: PXkbControlsNotifyEvent, wanted: int16){. + cdecl, dynlib: libX11, importc: "XkbNoteControlsChanges".} +proc XkbGetControlsChanges*(d: PDisplay, x: PXkbDescPtr, + c: PXkbControlsChangesPtr): TStatus +proc XkbChangeControls*(d: PDisplay, x: PXkbDescPtr, c: PXkbControlsChangesPtr): bool +proc XkbAllocCompatMap*(xkb: PXkbDescPtr, which, nInterpret: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbAllocCompatMap".} +proc XkbFreeCompatMap*(xkib: PXkbDescPtr, which: int16, freeMap: bool){.cdecl, + dynlib: libX11, importc: "XkbFreeCompatMap".} +proc XkbGetCompatMap*(dpy: PDisplay, which: int16, xkb: PXkbDescPtr): TStatus{. + cdecl, dynlib: libX11, importc: "XkbGetCompatMap".} +proc XkbSetCompatMap*(dpy: PDisplay, which: int16, xkb: PXkbDescPtr, + updateActions: bool): bool{.cdecl, dynlib: libX11, + importc: "XkbSetCompatMap".} +proc XkbAddSymInterpret*(xkb: PXkbDescPtr, si: PXkbSymInterpretPtr, + updateMap: bool, changes: PXkbChangesPtr): PXkbSymInterpretPtr{. + cdecl, dynlib: libX11, importc: "XkbAddSymInterpret".} +proc XkbAllocNames*(xkb: PXkbDescPtr, which: int16, + nTotalRG, nTotalAliases: int16): TStatus{.cdecl, + dynlib: libX11, importc: "XkbAllocNames".} +proc XkbGetNames*(dpy: PDisplay, which: int16, desc: PXkbDescPtr): TStatus{. + cdecl, dynlib: libX11, importc: "XkbGetNames".} +proc XkbSetNames*(dpy: PDisplay, which, firstType, nTypes: int16, + desc: PXkbDescPtr): bool{.cdecl, dynlib: libX11, + importc: "XkbSetNames".} +proc XkbChangeNames*(dpy: PDisplay, xkb: PXkbDescPtr, + changes: PXkbNameChangesPtr): bool{.cdecl, dynlib: libX11, + importc: "XkbChangeNames".} +proc XkbFreeNames*(xkb: PXkbDescPtr, which: int16, freeMap: bool){.cdecl, + dynlib: libX11, importc: "XkbFreeNames".} +proc XkbGetState*(dpy: PDisplay, deviceSpec: int16, rtrnState: PXkbStatePtr): TStatus{. + cdecl, dynlib: libX11, importc: "XkbGetState".} +proc XkbSetMap*(dpy: PDisplay, which: int16, desc: PXkbDescPtr): bool{.cdecl, + dynlib: libX11, importc: "XkbSetMap".} +proc XkbChangeMap*(dpy: PDisplay, desc: PXkbDescPtr, changes: PXkbMapChangesPtr): bool{. + cdecl, dynlib: libX11, importc: "XkbChangeMap".} +proc XkbSetDetectableAutoRepeat*(dpy: PDisplay, detectable: bool, + supported: ptr bool): bool{.cdecl, + dynlib: libX11, importc: "XkbSetDetectableAutoRepeat".} +proc XkbGetDetectableAutoRepeat*(dpy: PDisplay, supported: ptr bool): bool{. + cdecl, dynlib: libX11, importc: "XkbGetDetectableAutoRepeat".} +proc XkbSetAutoResetControls*(dpy: PDisplay, changes: int16, + auto_ctrls, auto_values: PWord): bool{.cdecl, + dynlib: libX11, importc: "XkbSetAutoResetControls".} +proc XkbGetAutoResetControls*(dpy: PDisplay, auto_ctrls, auto_ctrl_values: PWord): bool{. + cdecl, dynlib: libX11, importc: "XkbGetAutoResetControls".} +proc XkbSetPerClientControls*(dpy: PDisplay, change: int16, values: PWord): bool{. + cdecl, dynlib: libX11, importc: "XkbSetPerClientControls".} +proc XkbGetPerClientControls*(dpy: PDisplay, ctrls: PWord): bool{.cdecl, + dynlib: libX11, importc: "XkbGetPerClientControls".} +proc XkbCopyKeyType*(`from`, into: PXkbKeyTypePtr): TStatus{.cdecl, + dynlib: libX11, importc: "XkbCopyKeyType".} +proc XkbCopyKeyTypes*(`from`, into: PXkbKeyTypePtr, num_types: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbCopyKeyTypes".} +proc XkbResizeKeyType*(xkb: PXkbDescPtr, type_ndx, map_count: int16, + want_preserve: bool, new_num_lvls: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbResizeKeyType".} +proc XkbResizeKeySyms*(desc: PXkbDescPtr, forKey, symsNeeded: int16): PKeySym{. + cdecl, dynlib: libX11, importc: "XkbResizeKeySyms".} +proc XkbResizeKeyActions*(desc: PXkbDescPtr, forKey, actsNeeded: int16): PXkbAction{. + cdecl, dynlib: libX11, importc: "XkbResizeKeyActions".} +proc XkbChangeTypesOfKey*(xkb: PXkbDescPtr, key, num_groups: int16, + groups: int16, newTypes: ptr int16, + pChanges: PXkbMapChangesPtr): TStatus{.cdecl, + dynlib: libX11, importc: "XkbChangeTypesOfKey".} + +proc XkbListComponents*(dpy: PDisplay, deviceSpec: int16, + ptrns: PXkbComponentNamesPtr, max_inout: ptr int16): PXkbComponentListPtr{. + cdecl, dynlib: libX11, importc: "XkbListComponents".} +proc XkbFreeComponentList*(list: PXkbComponentListPtr){.cdecl, dynlib: libX11, + importc: "XkbFreeComponentList".} +proc XkbGetKeyboard*(dpy: PDisplay, which, deviceSpec: int16): PXkbDescPtr{. + cdecl, dynlib: libX11, importc: "XkbGetKeyboard".} +proc XkbGetKeyboardByName*(dpy: PDisplay, deviceSpec: int16, + names: PXkbComponentNamesPtr, want, need: int16, + load: bool): PXkbDescPtr{.cdecl, dynlib: libX11, + importc: "XkbGetKeyboardByName".} + +proc XkbKeyTypesForCoreSymbols*(xkb: PXkbDescPtr, + map_width: int16, # keyboard device + core_syms: PKeySym, # always mapWidth symbols + protected: int16, # explicit key types + types_inout: ptr int16, # always four type indices + xkb_syms_rtrn: PKeySym): int16{.cdecl, + dynlib: libX11, importc: "XkbKeyTypesForCoreSymbols".} + # must have enough space +proc XkbApplyCompatMapToKey*(xkb: PXkbDescPtr, + key: TKeyCode, # key to be updated + changes: PXkbChangesPtr): bool{.cdecl, + dynlib: libX11, importc: "XkbApplyCompatMapToKey".} + # resulting changes to map +proc XkbUpdateMapFromCore*(xkb: PXkbDescPtr, + first_key: TKeyCode, # first changed key + num_keys, + map_width: int16, + core_keysyms: PKeySym, # symbols `from` core keymap + changes: PXkbChangesPtr): bool{.cdecl, + dynlib: libX11, importc: "XkbUpdateMapFromCore".} + +proc XkbAddDeviceLedInfo*(devi: PXkbDeviceInfoPtr, ledClass, ledId: int16): PXkbDeviceLedInfoPtr{. + cdecl, dynlib: libX11, importc: "XkbAddDeviceLedInfo".} +proc XkbResizeDeviceButtonActions*(devi: PXkbDeviceInfoPtr, newTotal: int16): TStatus{. + cdecl, dynlib: libX11, importc: "XkbResizeDeviceButtonActions".} +proc XkbAllocDeviceInfo*(deviceSpec, nButtons, szLeds: int16): PXkbDeviceInfoPtr{. + cdecl, dynlib: libX11, importc: "XkbAllocDeviceInfo".} +proc XkbFreeDeviceInfo*(devi: PXkbDeviceInfoPtr, which: int16, freeDevI: bool){. + cdecl, dynlib: libX11, importc: "XkbFreeDeviceInfo".} +proc XkbNoteDeviceChanges*(old: PXkbDeviceChangesPtr, + new: PXkbExtensionDeviceNotifyEvent, wanted: int16){. + cdecl, dynlib: libX11, importc: "XkbNoteDeviceChanges".} +proc XkbGetDeviceInfo*(dpy: PDisplay, which, deviceSpec, ledClass, ledID: int16): PXkbDeviceInfoPtr{. + cdecl, dynlib: libX11, importc: "XkbGetDeviceInfo".} +proc XkbGetDeviceInfoChanges*(dpy: PDisplay, devi: PXkbDeviceInfoPtr, + changes: PXkbDeviceChangesPtr): TStatus{.cdecl, + dynlib: libX11, importc: "XkbGetDeviceInfoChanges".} +proc XkbGetDeviceButtonActions*(dpy: PDisplay, devi: PXkbDeviceInfoPtr, + all: bool, first, nBtns: int16): TStatus{.cdecl, + dynlib: libX11, importc: "XkbGetDeviceButtonActions".} +proc XkbGetDeviceLedInfo*(dpy: PDisplay, devi: PXkbDeviceInfoPtr, + ledClass, ledId, which: int16): TStatus{.cdecl, + dynlib: libX11, importc: "XkbGetDeviceLedInfo".} +proc XkbSetDeviceInfo*(dpy: PDisplay, which: int16, devi: PXkbDeviceInfoPtr): bool{. + cdecl, dynlib: libX11, importc: "XkbSetDeviceInfo".} +proc XkbChangeDeviceInfo*(dpy: PDisplay, desc: PXkbDeviceInfoPtr, + changes: PXkbDeviceChangesPtr): bool{.cdecl, + dynlib: libX11, importc: "XkbChangeDeviceInfo".} +proc XkbSetDeviceLedInfo*(dpy: PDisplay, devi: PXkbDeviceInfoPtr, + ledClass, ledID, which: int16): bool{.cdecl, + dynlib: libX11, importc: "XkbSetDeviceLedInfo".} +proc XkbSetDeviceButtonActions*(dpy: PDisplay, devi: PXkbDeviceInfoPtr, + first, nBtns: int16): bool{.cdecl, + dynlib: libX11, importc: "XkbSetDeviceButtonActions".} + +proc XkbToControl*(c: int8): int8{.cdecl, dynlib: libX11, + importc: "XkbToControl".} + +proc XkbSetDebuggingFlags*(dpy: PDisplay, mask, flags: int16, msg: cstring, + ctrls_mask, ctrls, rtrn_flags, rtrn_ctrls: int16): bool{. + cdecl, dynlib: libX11, importc: "XkbSetDebuggingFlags".} +proc XkbApplyVirtualModChanges*(xkb: PXkbDescPtr, changed: int16, + changes: PXkbChangesPtr): bool{.cdecl, + dynlib: libX11, importc: "XkbApplyVirtualModChanges".} + +# implementation + +proc XkbNoteIndicatorMapChanges(o, n: PXkbIndicatorChangesPtr, w: int16) = + ##define XkbNoteIndicatorMapChanges(o,n,w) ((o)->map_changes|=((n)->map_changes&(w))) + o.map_changes = o.map_changes or (n.map_changes and w) + +proc XkbNoteIndicatorStateChanges(o, n: PXkbIndicatorChangesPtr, w: int16) = + ##define XkbNoteIndicatorStateChanges(o,n,w) ((o)->state_changes|=((n)->state_changes&(w))) + o.state_changes = o.state_changes or (n.state_changes and (w)) + +proc XkbGetIndicatorMapChanges(d: PDisplay, x: PXkbDescPtr, + c: PXkbIndicatorChangesPtr): TStatus = + ##define XkbGetIndicatorMapChanges(d,x,c) (XkbGetIndicatorMap((d),(c)->map_changes,x) + Result = XkbGetIndicatorMap(d, c.map_changes, x) + +proc XkbChangeIndicatorMaps(d: PDisplay, x: PXkbDescPtr, + c: PXkbIndicatorChangesPtr): bool = + ##define XkbChangeIndicatorMaps(d,x,c) (XkbSetIndicatorMap((d),(c)->map_changes,x)) + Result = XkbSetIndicatorMap(d, c.map_changes, x) + +proc XkbGetControlsChanges(d: PDisplay, x: PXkbDescPtr, + c: PXkbControlsChangesPtr): TStatus = + ##define XkbGetControlsChanges(d,x,c) XkbGetControls(d,(c)->changed_ctrls,x) + Result = XkbGetControls(d, c.changed_ctrls, x) + +proc XkbChangeControls(d: PDisplay, x: PXkbDescPtr, c: PXkbControlsChangesPtr): bool = + ##define XkbChangeControls(d,x,c) XkbSetControls(d,(c)->changed_ctrls,x) + Result = XkbSetControls(d, c.changed_ctrls, x) diff --git a/lib/oldwrappers/x11/xlib.nim b/lib/oldwrappers/x11/xlib.nim new file mode 100644 index 000000000..19ebda9e0 --- /dev/null +++ b/lib/oldwrappers/x11/xlib.nim @@ -0,0 +1,2218 @@ + +import + x + +const + libX11* = "libX11.so" + +type + cuint* = cint + cunsigned* = cint + cushort* = int16 + Pcint* = ptr cint + PPcint* = ptr Pcint + PPcuchar* = ptr ptr cuchar + PWideChar* = ptr int16 + PPChar* = ptr cstring + PPPChar* = ptr ptr cstring + Pculong* = ptr int + Pcuchar* = cstring + Pcuint* = ptr cint + Pcushort* = ptr int16 +# Automatically converted by H2Pas 0.99.15 from xlib.h +# The following command line parameters were used: +# -p +# -T +# -S +# -d +# -c +# xlib.h + +const + XlibSpecificationRelease* = 6 + +type + PXPointer* = ptr TXPointer + TXPointer* = ptr char + PBool* = ptr TBool + TBool* = int #cint? + PStatus* = ptr TStatus + TStatus* = cint + +const + QueuedAlready* = 0 + QueuedAfterReading* = 1 + QueuedAfterFlush* = 2 + +type + PPXExtData* = ptr PXExtData + PXExtData* = ptr TXExtData + TXExtData*{.final.} = object + number*: cint + next*: PXExtData + free_private*: proc (extension: PXExtData): cint{.cdecl.} + private_data*: TXPointer + + PXExtCodes* = ptr TXExtCodes + TXExtCodes*{.final.} = object + extension*: cint + major_opcode*: cint + first_event*: cint + first_error*: cint + + PXPixmapFormatValues* = ptr TXPixmapFormatValues + TXPixmapFormatValues*{.final.} = object + depth*: cint + bits_per_pixel*: cint + scanline_pad*: cint + + PXGCValues* = ptr TXGCValues + TXGCValues*{.final.} = object + function*: cint + plane_mask*: culong + foreground*: culong + background*: culong + line_width*: cint + line_style*: cint + cap_style*: cint + join_style*: cint + fill_style*: cint + fill_rule*: cint + arc_mode*: cint + tile*: TPixmap + stipple*: TPixmap + ts_x_origin*: cint + ts_y_origin*: cint + font*: TFont + subwindow_mode*: cint + graphics_exposures*: TBool + clip_x_origin*: cint + clip_y_origin*: cint + clip_mask*: TPixmap + dash_offset*: cint + dashes*: cchar + + PXGC* = ptr TXGC + TXGC*{.final.} = object + TGC* = PXGC + PGC* = ptr TGC + PVisual* = ptr TVisual + TVisual*{.final.} = object + ext_data*: PXExtData + visualid*: TVisualID + c_class*: cint + red_mask*, green_mask*, blue_mask*: culong + bits_per_rgb*: cint + map_entries*: cint + + PDepth* = ptr TDepth + TDepth*{.final.} = object + depth*: cint + nvisuals*: cint + visuals*: PVisual + + PXDisplay* = ptr TXDisplay + TXDisplay*{.final.} = object + PScreen* = ptr TScreen + TScreen*{.final.} = object + ext_data*: PXExtData + display*: PXDisplay + root*: TWindow + width*, height*: cint + mwidth*, mheight*: cint + ndepths*: cint + depths*: PDepth + root_depth*: cint + root_visual*: PVisual + default_gc*: TGC + cmap*: TColormap + white_pixel*: culong + black_pixel*: culong + max_maps*, min_maps*: cint + backing_store*: cint + save_unders*: TBool + root_input_mask*: clong + + PScreenFormat* = ptr TScreenFormat + TScreenFormat*{.final.} = object + ext_data*: PXExtData + depth*: cint + bits_per_pixel*: cint + scanline_pad*: cint + + PXSetWindowAttributes* = ptr TXSetWindowAttributes + TXSetWindowAttributes*{.final.} = object + background_pixmap*: TPixmap + background_pixel*: culong + border_pixmap*: TPixmap + border_pixel*: culong + bit_gravity*: cint + win_gravity*: cint + backing_store*: cint + backing_planes*: culong + backing_pixel*: culong + save_under*: TBool + event_mask*: clong + do_not_propagate_mask*: clong + override_redirect*: TBool + colormap*: TColormap + cursor*: TCursor + + PXWindowAttributes* = ptr TXWindowAttributes + TXWindowAttributes*{.final.} = object + x*, y*: cint + width*, height*: cint + border_width*: cint + depth*: cint + visual*: PVisual + root*: TWindow + c_class*: cint + bit_gravity*: cint + win_gravity*: cint + backing_store*: cint + backing_planes*: culong + backing_pixel*: culong + save_under*: TBool + colormap*: TColormap + map_installed*: TBool + map_state*: cint + all_event_masks*: clong + your_event_mask*: clong + do_not_propagate_mask*: clong + override_redirect*: TBool + screen*: PScreen + + PXHostAddress* = ptr TXHostAddress + TXHostAddress*{.final.} = object + family*: cint + len*: cint + address*: cstring + + PXServerInterpretedAddress* = ptr TXServerInterpretedAddress + TXServerInterpretedAddress*{.final.} = object + typelength*: cint + valuelength*: cint + theType*: cstring + value*: cstring + + PXImage* = ptr TXImage + TF*{.final.} = object + create_image*: proc (para1: PXDisplay, para2: PVisual, para3: cuint, + para4: cint, para5: cint, para6: cstring, para7: cuint, + para8: cuint, para9: cint, para10: cint): PXImage{. + cdecl.} + destroy_image*: proc (para1: PXImage): cint{.cdecl.} + get_pixel*: proc (para1: PXImage, para2: cint, para3: cint): culong{.cdecl.} + put_pixel*: proc (para1: PXImage, para2: cint, para3: cint, para4: culong): cint{. + cdecl.} + sub_image*: proc (para1: PXImage, para2: cint, para3: cint, para4: cuint, + para5: cuint): PXImage{.cdecl.} + add_pixel*: proc (para1: PXImage, para2: clong): cint{.cdecl.} + + TXImage*{.final.} = object + width*, height*: cint + xoffset*: cint + format*: cint + data*: cstring + byte_order*: cint + bitmap_unit*: cint + bitmap_bit_order*: cint + bitmap_pad*: cint + depth*: cint + bytes_per_line*: cint + bits_per_pixel*: cint + red_mask*: culong + green_mask*: culong + blue_mask*: culong + obdata*: TXPointer + f*: TF + + PXWindowChanges* = ptr TXWindowChanges + TXWindowChanges*{.final.} = object + x*, y*: cint + width*, height*: cint + border_width*: cint + sibling*: TWindow + stack_mode*: cint + + PXColor* = ptr TXColor + TXColor*{.final.} = object + pixel*: culong + red*, green*, blue*: cushort + flags*: cchar + pad*: cchar + + PXSegment* = ptr TXSegment + TXSegment*{.final.} = object + x1*, y1*, x2*, y2*: cshort + + PXPoint* = ptr TXPoint + TXPoint*{.final.} = object + x*, y*: cshort + + PXRectangle* = ptr TXRectangle + TXRectangle*{.final.} = object + x*, y*: cshort + width*, height*: cushort + + PXArc* = ptr TXArc + TXArc*{.final.} = object + x*, y*: cshort + width*, height*: cushort + angle1*, angle2*: cshort + + PXKeyboardControl* = ptr TXKeyboardControl + TXKeyboardControl*{.final.} = object + key_click_percent*: cint + bell_percent*: cint + bell_pitch*: cint + bell_duration*: cint + led*: cint + led_mode*: cint + key*: cint + auto_repeat_mode*: cint + + PXKeyboardState* = ptr TXKeyboardState + TXKeyboardState*{.final.} = object + key_click_percent*: cint + bell_percent*: cint + bell_pitch*, bell_duration*: cuint + led_mask*: culong + global_auto_repeat*: cint + auto_repeats*: array[0..31, cchar] + + PXTimeCoord* = ptr TXTimeCoord + TXTimeCoord*{.final.} = object + time*: TTime + x*, y*: cshort + + PXModifierKeymap* = ptr TXModifierKeymap + TXModifierKeymap*{.final.} = object + max_keypermod*: cint + modifiermap*: PKeyCode + + PDisplay* = ptr TDisplay + TDisplay* = TXDisplay + PXPrivate* = ptr TXPrivate + TXPrivate*{.final.} = object + PXrmHashBucketRec* = ptr TXrmHashBucketRec + TXrmHashBucketRec*{.final.} = object + PXPrivDisplay* = ptr TXPrivDisplay + TXPrivDisplay*{.final.} = object + ext_data*: PXExtData + private1*: PXPrivate + fd*: cint + private2*: cint + proto_major_version*: cint + proto_minor_version*: cint + vendor*: cstring + private3*: TXID + private4*: TXID + private5*: TXID + private6*: cint + resource_alloc*: proc (para1: PXDisplay): TXID{.cdecl.} + byte_order*: cint + bitmap_unit*: cint + bitmap_pad*: cint + bitmap_bit_order*: cint + nformats*: cint + pixmap_format*: PScreenFormat + private8*: cint + release*: cint + private9*, private10*: PXPrivate + qlen*: cint + last_request_read*: culong + request*: culong + private11*: TXPointer + private12*: TXPointer + private13*: TXPointer + private14*: TXPointer + max_request_size*: cunsigned + db*: PXrmHashBucketRec + private15*: proc (para1: PXDisplay): cint{.cdecl.} + display_name*: cstring + default_screen*: cint + nscreens*: cint + screens*: PScreen + motion_buffer*: culong + private16*: culong + min_keycode*: cint + max_keycode*: cint + private17*: TXPointer + private18*: TXPointer + private19*: cint + xdefaults*: cstring + + PXKeyEvent* = ptr TXKeyEvent + TXKeyEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + window*: TWindow + root*: TWindow + subwindow*: TWindow + time*: TTime + x*, y*: cint + x_root*, y_root*: cint + state*: cuint + keycode*: cuint + same_screen*: TBool + + PXKeyPressedEvent* = ptr TXKeyPressedEvent + TXKeyPressedEvent* = TXKeyEvent + PXKeyReleasedEvent* = ptr TXKeyReleasedEvent + TXKeyReleasedEvent* = TXKeyEvent + PXButtonEvent* = ptr TXButtonEvent + TXButtonEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + window*: TWindow + root*: TWindow + subwindow*: TWindow + time*: TTime + x*, y*: cint + x_root*, y_root*: cint + state*: cuint + button*: cuint + same_screen*: TBool + + PXButtonPressedEvent* = ptr TXButtonPressedEvent + TXButtonPressedEvent* = TXButtonEvent + PXButtonReleasedEvent* = ptr TXButtonReleasedEvent + TXButtonReleasedEvent* = TXButtonEvent + PXMotionEvent* = ptr TXMotionEvent + TXMotionEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + window*: TWindow + root*: TWindow + subwindow*: TWindow + time*: TTime + x*, y*: cint + x_root*, y_root*: cint + state*: cuint + is_hint*: cchar + same_screen*: TBool + + PXPointerMovedEvent* = ptr TXPointerMovedEvent + TXPointerMovedEvent* = TXMotionEvent + PXCrossingEvent* = ptr TXCrossingEvent + TXCrossingEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + window*: TWindow + root*: TWindow + subwindow*: TWindow + time*: TTime + x*, y*: cint + x_root*, y_root*: cint + mode*: cint + detail*: cint + same_screen*: TBool + focus*: TBool + state*: cuint + + PXEnterWindowEvent* = ptr TXEnterWindowEvent + TXEnterWindowEvent* = TXCrossingEvent + PXLeaveWindowEvent* = ptr TXLeaveWindowEvent + TXLeaveWindowEvent* = TXCrossingEvent + PXFocusChangeEvent* = ptr TXFocusChangeEvent + TXFocusChangeEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + window*: TWindow + mode*: cint + detail*: cint + + PXFocusInEvent* = ptr TXFocusInEvent + TXFocusInEvent* = TXFocusChangeEvent + PXFocusOutEvent* = ptr TXFocusOutEvent + TXFocusOutEvent* = TXFocusChangeEvent + PXKeymapEvent* = ptr TXKeymapEvent + TXKeymapEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + window*: TWindow + key_vector*: array[0..31, cchar] + + PXExposeEvent* = ptr TXExposeEvent + TXExposeEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + window*: TWindow + x*, y*: cint + width*, height*: cint + count*: cint + + PXGraphicsExposeEvent* = ptr TXGraphicsExposeEvent + TXGraphicsExposeEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + drawable*: TDrawable + x*, y*: cint + width*, height*: cint + count*: cint + major_code*: cint + minor_code*: cint + + PXNoExposeEvent* = ptr TXNoExposeEvent + TXNoExposeEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + drawable*: TDrawable + major_code*: cint + minor_code*: cint + + PXVisibilityEvent* = ptr TXVisibilityEvent + TXVisibilityEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + window*: TWindow + state*: cint + + PXCreateWindowEvent* = ptr TXCreateWindowEvent + TXCreateWindowEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + parent*: TWindow + window*: TWindow + x*, y*: cint + width*, height*: cint + border_width*: cint + override_redirect*: TBool + + PXDestroyWindowEvent* = ptr TXDestroyWindowEvent + TXDestroyWindowEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + event*: TWindow + window*: TWindow + + PXUnmapEvent* = ptr TXUnmapEvent + TXUnmapEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + event*: TWindow + window*: TWindow + from_configure*: TBool + + PXMapEvent* = ptr TXMapEvent + TXMapEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + event*: TWindow + window*: TWindow + override_redirect*: TBool + + PXMapRequestEvent* = ptr TXMapRequestEvent + TXMapRequestEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + parent*: TWindow + window*: TWindow + + PXReparentEvent* = ptr TXReparentEvent + TXReparentEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + event*: TWindow + window*: TWindow + parent*: TWindow + x*, y*: cint + override_redirect*: TBool + + PXConfigureEvent* = ptr TXConfigureEvent + TXConfigureEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + event*: TWindow + window*: TWindow + x*, y*: cint + width*, height*: cint + border_width*: cint + above*: TWindow + override_redirect*: TBool + + PXGravityEvent* = ptr TXGravityEvent + TXGravityEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + event*: TWindow + window*: TWindow + x*, y*: cint + + PXResizeRequestEvent* = ptr TXResizeRequestEvent + TXResizeRequestEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + window*: TWindow + width*, height*: cint + + PXConfigureRequestEvent* = ptr TXConfigureRequestEvent + TXConfigureRequestEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + parent*: TWindow + window*: TWindow + x*, y*: cint + width*, height*: cint + border_width*: cint + above*: TWindow + detail*: cint + value_mask*: culong + + PXCirculateEvent* = ptr TXCirculateEvent + TXCirculateEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + event*: TWindow + window*: TWindow + place*: cint + + PXCirculateRequestEvent* = ptr TXCirculateRequestEvent + TXCirculateRequestEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + parent*: TWindow + window*: TWindow + place*: cint + + PXPropertyEvent* = ptr TXPropertyEvent + TXPropertyEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + window*: TWindow + atom*: TAtom + time*: TTime + state*: cint + + PXSelectionClearEvent* = ptr TXSelectionClearEvent + TXSelectionClearEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + window*: TWindow + selection*: TAtom + time*: TTime + + PXSelectionRequestEvent* = ptr TXSelectionRequestEvent + TXSelectionRequestEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + owner*: TWindow + requestor*: TWindow + selection*: TAtom + target*: TAtom + property*: TAtom + time*: TTime + + PXSelectionEvent* = ptr TXSelectionEvent + TXSelectionEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + requestor*: TWindow + selection*: TAtom + target*: TAtom + property*: TAtom + time*: TTime + + PXColormapEvent* = ptr TXColormapEvent + TXColormapEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + window*: TWindow + colormap*: TColormap + c_new*: TBool + state*: cint + + PXClientMessageEvent* = ptr TXClientMessageEvent + TXClientMessageEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + window*: TWindow + message_type*: TAtom + format*: cint + data*: array[0..19, char] + + PXMappingEvent* = ptr TXMappingEvent + TXMappingEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + window*: TWindow + request*: cint + first_keycode*: cint + count*: cint + + PXErrorEvent* = ptr TXErrorEvent + TXErrorEvent*{.final.} = object + theType*: cint + display*: PDisplay + resourceid*: TXID + serial*: culong + error_code*: cuchar + request_code*: cuchar + minor_code*: cuchar + + PXAnyEvent* = ptr TXAnyEvent + TXAnyEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + window*: TWindow + + PXEvent* = ptr TXEvent + TXEvent*{.final.} = object + theType*: cint + pad*: array[0..22, clong] # + # case longint of + # 0 : ( theType : cint ); + # 1 : ( xany : TXAnyEvent ); + # 2 : ( xkey : TXKeyEvent ); + # 3 : ( xbutton : TXButtonEvent ); + # 4 : ( xmotion : TXMotionEvent ); + # 5 : ( xcrossing : TXCrossingEvent ); + # 6 : ( xfocus : TXFocusChangeEvent ); + # 7 : ( xexpose : TXExposeEvent ); + # 8 : ( xgraphicsexpose : TXGraphicsExposeEvent ); + # 9 : ( xnoexpose : TXNoExposeEvent ); + # 10 : ( xvisibility : TXVisibilityEvent ); + # 11 : ( xcreatewindow : TXCreateWindowEvent ); + # 12 : ( xdestroywindow : TXDestroyWindowEvent ); + # 13 : ( xunmap : TXUnmapEvent ); + # 14 : ( xmap : TXMapEvent ); + # 15 : ( xmaprequest : TXMapRequestEvent ); + # 16 : ( xreparent : TXReparentEvent ); + # 17 : ( xconfigure : TXConfigureEvent ); + # 18 : ( xgravity : TXGravityEvent ); + # 19 : ( xresizerequest : TXResizeRequestEvent ); + # 20 : ( xconfigurerequest : TXConfigureRequestEvent ); + # 21 : ( xcirculate : TXCirculateEvent ); + # 22 : ( xcirculaterequest : TXCirculateRequestEvent ); + # 23 : ( xproperty : TXPropertyEvent ); + # 24 : ( xselectionclear : TXSelectionClearEvent ); + # 25 : ( xselectionrequest : TXSelectionRequestEvent ); + # 26 : ( xselection : TXSelectionEvent ); + # 27 : ( xcolormap : TXColormapEvent ); + # 28 : ( xclient : TXClientMessageEvent ); + # 29 : ( xmapping : TXMappingEvent ); + # 30 : ( xerror : TXErrorEvent ); + # 31 : ( xkeymap : TXKeymapEvent ); + # 32 : ( pad : array[0..23] of clong ); + # + + +type + PXCharStruct* = ptr TXCharStruct + TXCharStruct*{.final.} = object + lbearing*: cshort + rbearing*: cshort + width*: cshort + ascent*: cshort + descent*: cshort + attributes*: cushort + + PXFontProp* = ptr TXFontProp + TXFontProp*{.final.} = object + name*: TAtom + card32*: culong + + PPPXFontStruct* = ptr PPXFontStruct + PPXFontStruct* = ptr PXFontStruct + PXFontStruct* = ptr TXFontStruct + TXFontStruct*{.final.} = object + ext_data*: PXExtData + fid*: TFont + direction*: cunsigned + min_char_or_byte2*: cunsigned + max_char_or_byte2*: cunsigned + min_byte1*: cunsigned + max_byte1*: cunsigned + all_chars_exist*: TBool + default_char*: cunsigned + n_properties*: cint + properties*: PXFontProp + min_bounds*: TXCharStruct + max_bounds*: TXCharStruct + per_char*: PXCharStruct + ascent*: cint + descent*: cint + + PXTextItem* = ptr TXTextItem + TXTextItem*{.final.} = object + chars*: cstring + nchars*: cint + delta*: cint + font*: TFont + + PXChar2b* = ptr TXChar2b + TXChar2b*{.final.} = object + byte1*: cuchar + byte2*: cuchar + + PXTextItem16* = ptr TXTextItem16 + TXTextItem16*{.final.} = object + chars*: PXChar2b + nchars*: cint + delta*: cint + font*: TFont + + PXEDataObject* = ptr TXEDataObject + TXEDataObject*{.final.} = object + display*: PDisplay #case longint of + # 0 : ( display : PDisplay ); + # 1 : ( gc : TGC ); + # 2 : ( visual : PVisual ); + # 3 : ( screen : PScreen ); + # 4 : ( pixmap_format : PScreenFormat ); + # 5 : ( font : PXFontStruct ); + + PXFontSetExtents* = ptr TXFontSetExtents + TXFontSetExtents*{.final.} = object + max_ink_extent*: TXRectangle + max_logical_extent*: TXRectangle + + PXOM* = ptr TXOM + TXOM*{.final.} = object + PXOC* = ptr TXOC + TXOC*{.final.} = object + TXFontSet* = PXOC + PXFontSet* = ptr TXFontSet + PXmbTextItem* = ptr TXmbTextItem + TXmbTextItem*{.final.} = object + chars*: cstring + nchars*: cint + delta*: cint + font_set*: TXFontSet + + PXwcTextItem* = ptr TXwcTextItem + TXwcTextItem*{.final.} = object + chars*: PWideChar #wchar_t* + nchars*: cint + delta*: cint + font_set*: TXFontSet + + +const + XNRequiredCharSet* = "requiredCharSet" + XNQueryOrientation* = "queryOrientation" + XNBaseFontName* = "baseFontName" + XNOMAutomatic* = "omAutomatic" + XNMissingCharSet* = "missingCharSet" + XNDefaultString* = "defaultString" + XNOrientation* = "orientation" + XNDirectionalDependentDrawing* = "directionalDependentDrawing" + XNContextualDrawing* = "contextualDrawing" + XNFontInfo* = "fontInfo" + +type + PXOMCharSetList* = ptr TXOMCharSetList + TXOMCharSetList*{.final.} = object + charset_count*: cint + charset_list*: PPChar + + PXOrientation* = ptr TXOrientation + TXOrientation* = enum + XOMOrientation_LTR_TTB, XOMOrientation_RTL_TTB, XOMOrientation_TTB_LTR, + XOMOrientation_TTB_RTL, XOMOrientation_Context + PXOMOrientation* = ptr TXOMOrientation + TXOMOrientation*{.final.} = object + num_orientation*: cint + orientation*: PXOrientation + + PXOMFontInfo* = ptr TXOMFontInfo + TXOMFontInfo*{.final.} = object + num_font*: cint + font_struct_list*: ptr PXFontStruct + font_name_list*: PPChar + + PXIM* = ptr TXIM + TXIM*{.final.} = object + PXIC* = ptr TXIC + TXIC*{.final.} = object + TXIMProc* = proc (para1: TXIM, para2: TXPointer, para3: TXPointer){.cdecl.} + TXICProc* = proc (para1: TXIC, para2: TXPointer, para3: TXPointer): TBool{. + cdecl.} + TXIDProc* = proc (para1: PDisplay, para2: TXPointer, para3: TXPointer){.cdecl.} + PXIMStyle* = ptr TXIMStyle + TXIMStyle* = culong + PXIMStyles* = ptr TXIMStyles + TXIMStyles*{.final.} = object + count_styles*: cushort + supported_styles*: PXIMStyle + + +const + XIMPreeditArea* = 0x00000001 + XIMPreeditCallbacks* = 0x00000002 + XIMPreeditPosition* = 0x00000004 + XIMPreeditNothing* = 0x00000008 + XIMPreeditNone* = 0x00000010 + XIMStatusArea* = 0x00000100 + XIMStatusCallbacks* = 0x00000200 + XIMStatusNothing* = 0x00000400 + XIMStatusNone* = 0x00000800 + XNVaNestedList* = "XNVaNestedList" + XNQueryInputStyle* = "queryInputStyle" + XNClientWindow* = "clientWindow" + XNInputStyle* = "inputStyle" + XNFocusWindow* = "focusWindow" + XNResourceName* = "resourceName" + XNResourceClass* = "resourceClass" + XNGeometryCallback* = "geometryCallback" + XNDestroyCallback* = "destroyCallback" + XNFilterEvents* = "filterEvents" + XNPreeditStartCallback* = "preeditStartCallback" + XNPreeditDoneCallback* = "preeditDoneCallback" + XNPreeditDrawCallback* = "preeditDrawCallback" + XNPreeditCaretCallback* = "preeditCaretCallback" + XNPreeditStateNotifyCallback* = "preeditStateNotifyCallback" + XNPreeditAttributes* = "preeditAttributes" + XNStatusStartCallback* = "statusStartCallback" + XNStatusDoneCallback* = "statusDoneCallback" + XNStatusDrawCallback* = "statusDrawCallback" + XNStatusAttributes* = "statusAttributes" + XNArea* = "area" + XNAreaNeeded* = "areaNeeded" + XNSpotLocation* = "spotLocation" + XNColormap* = "colorMap" + XNStdColormap* = "stdColorMap" + XNForeground* = "foreground" + XNBackground* = "background" + XNBackgroundPixmap* = "backgroundPixmap" + XNFontSet* = "fontSet" + XNLineSpace* = "lineSpace" + XNCursor* = "cursor" + XNQueryIMValuesList* = "queryIMValuesList" + XNQueryICValuesList* = "queryICValuesList" + XNVisiblePosition* = "visiblePosition" + XNR6PreeditCallback* = "r6PreeditCallback" + XNStringConversionCallback* = "stringConversionCallback" + XNStringConversion* = "stringConversion" + XNResetState* = "resetState" + XNHotKey* = "hotKey" + XNHotKeyState* = "hotKeyState" + XNPreeditState* = "preeditState" + XNSeparatorofNestedList* = "separatorofNestedList" + XBufferOverflow* = - (1) + XLookupNone* = 1 + XLookupChars* = 2 + XLookupKeySymVal* = 3 + XLookupBoth* = 4 + +type + PXVaNestedList* = ptr TXVaNestedList + TXVaNestedList* = pointer + PXIMCallback* = ptr TXIMCallback + TXIMCallback*{.final.} = object + client_data*: TXPointer + callback*: TXIMProc + + PXICCallback* = ptr TXICCallback + TXICCallback*{.final.} = object + client_data*: TXPointer + callback*: TXICProc + + PXIMFeedback* = ptr TXIMFeedback + TXIMFeedback* = culong + +const + XIMReverse* = 1 + XIMUnderline* = 1 shl 1 + XIMHighlight* = 1 shl 2 + XIMPrimary* = 1 shl 5 + XIMSecondary* = 1 shl 6 + XIMTertiary* = 1 shl 7 + XIMVisibleToForward* = 1 shl 8 + XIMVisibleToBackword* = 1 shl 9 + XIMVisibleToCenter* = 1 shl 10 + +type + PXIMText* = ptr TXIMText + TXIMText*{.final.} = object + len*: cushort + feedback*: PXIMFeedback + encoding_is_wchar*: TBool + multi_byte*: cstring + + PXIMPreeditState* = ptr TXIMPreeditState + TXIMPreeditState* = culong + +const + XIMPreeditUnKnown* = 0 + XIMPreeditEnable* = 1 + XIMPreeditDisable* = 1 shl 1 + +type + PXIMPreeditStateNotifyCallbackStruct* = ptr TXIMPreeditStateNotifyCallbackStruct + TXIMPreeditStateNotifyCallbackStruct*{.final.} = object + state*: TXIMPreeditState + + PXIMResetState* = ptr TXIMResetState + TXIMResetState* = culong + +const + XIMInitialState* = 1 + XIMPreserveState* = 1 shl 1 + +type + PXIMStringConversionFeedback* = ptr TXIMStringConversionFeedback + TXIMStringConversionFeedback* = culong + +const + XIMStringConversionLeftEdge* = 0x00000001 + XIMStringConversionRightEdge* = 0x00000002 + XIMStringConversionTopEdge* = 0x00000004 + XIMStringConversionBottomEdge* = 0x00000008 + XIMStringConversionConcealed* = 0x00000010 + XIMStringConversionWrapped* = 0x00000020 + +type + PXIMStringConversionText* = ptr TXIMStringConversionText + TXIMStringConversionText*{.final.} = object + len*: cushort + feedback*: PXIMStringConversionFeedback + encoding_is_wchar*: TBool + mbs*: cstring + + PXIMStringConversionPosition* = ptr TXIMStringConversionPosition + TXIMStringConversionPosition* = cushort + PXIMStringConversionType* = ptr TXIMStringConversionType + TXIMStringConversionType* = cushort + +const + XIMStringConversionBuffer* = 0x00000001 + XIMStringConversionLine* = 0x00000002 + XIMStringConversionWord* = 0x00000003 + XIMStringConversionChar* = 0x00000004 + +type + PXIMStringConversionOperation* = ptr TXIMStringConversionOperation + TXIMStringConversionOperation* = cushort + +const + XIMStringConversionSubstitution* = 0x00000001 + XIMStringConversionRetrieval* = 0x00000002 + +type + PXIMCaretDirection* = ptr TXIMCaretDirection + TXIMCaretDirection* = enum + XIMForwardChar, XIMBackwardChar, XIMForwardWord, XIMBackwardWord, + XIMCaretUp, XIMCaretDown, XIMNextLine, XIMPreviousLine, XIMLineStart, + XIMLineEnd, XIMAbsolutePosition, XIMDontChange + PXIMStringConversionCallbackStruct* = ptr TXIMStringConversionCallbackStruct + TXIMStringConversionCallbackStruct*{.final.} = object + position*: TXIMStringConversionPosition + direction*: TXIMCaretDirection + operation*: TXIMStringConversionOperation + factor*: cushort + text*: PXIMStringConversionText + + PXIMPreeditDrawCallbackStruct* = ptr TXIMPreeditDrawCallbackStruct + TXIMPreeditDrawCallbackStruct*{.final.} = object + caret*: cint + chg_first*: cint + chg_length*: cint + text*: PXIMText + + PXIMCaretStyle* = ptr TXIMCaretStyle + TXIMCaretStyle* = enum + XIMIsInvisible, XIMIsPrimary, XIMIsSecondary + PXIMPreeditCaretCallbackStruct* = ptr TXIMPreeditCaretCallbackStruct + TXIMPreeditCaretCallbackStruct*{.final.} = object + position*: cint + direction*: TXIMCaretDirection + style*: TXIMCaretStyle + + PXIMStatusDataType* = ptr TXIMStatusDataType + TXIMStatusDataType* = enum + XIMTextType, XIMBitmapType + PXIMStatusDrawCallbackStruct* = ptr TXIMStatusDrawCallbackStruct + TXIMStatusDrawCallbackStruct*{.final.} = object + theType*: TXIMStatusDataType + bitmap*: TPixmap + + PXIMHotKeyTrigger* = ptr TXIMHotKeyTrigger + TXIMHotKeyTrigger*{.final.} = object + keysym*: TKeySym + modifier*: cint + modifier_mask*: cint + + PXIMHotKeyTriggers* = ptr TXIMHotKeyTriggers + TXIMHotKeyTriggers*{.final.} = object + num_hot_key*: cint + key*: PXIMHotKeyTrigger + + PXIMHotKeyState* = ptr TXIMHotKeyState + TXIMHotKeyState* = culong + +const + XIMHotKeyStateON* = 0x00000001 + XIMHotKeyStateOFF* = 0x00000002 + +type + PXIMValuesList* = ptr TXIMValuesList + TXIMValuesList*{.final.} = object + count_values*: cushort + supported_values*: PPChar + + +type + funcdisp* = proc (display: PDisplay): cint{.cdecl.} + funcifevent* = proc (display: PDisplay, event: PXEvent, p: TXPointer): TBool{. + cdecl.} + chararr32* = array[0..31, char] + +const + AllPlanes*: culong = culong(not 0) + +proc XLoadQueryFont*(para1: PDisplay, para2: cstring): PXFontStruct{.cdecl, + dynlib: libX11, importc.} +proc XQueryFont*(para1: PDisplay, para2: TXID): PXFontStruct{.cdecl, + dynlib: libX11, importc.} +proc XGetMotionEvents*(para1: PDisplay, para2: TWindow, para3: TTime, + para4: TTime, para5: Pcint): PXTimeCoord{.cdecl, + dynlib: libX11, importc.} +proc XDeleteModifiermapEntry*(para1: PXModifierKeymap, para2: TKeyCode, + para3: cint): PXModifierKeymap{.cdecl, + dynlib: libX11, importc.} +proc XGetModifierMapping*(para1: PDisplay): PXModifierKeymap{.cdecl, + dynlib: libX11, importc.} +proc XInsertModifiermapEntry*(para1: PXModifierKeymap, para2: TKeyCode, + para3: cint): PXModifierKeymap{.cdecl, + dynlib: libX11, importc.} +proc XNewModifiermap*(para1: cint): PXModifierKeymap{.cdecl, dynlib: libX11, + importc.} +proc XCreateImage*(para1: PDisplay, para2: PVisual, para3: cuint, para4: cint, + para5: cint, para6: cstring, para7: cuint, para8: cuint, + para9: cint, para10: cint): PXImage{.cdecl, dynlib: libX11, + importc.} +proc XInitImage*(para1: PXImage): TStatus{.cdecl, dynlib: libX11, importc.} +proc XGetImage*(para1: PDisplay, para2: TDrawable, para3: cint, para4: cint, + para5: cuint, para6: cuint, para7: culong, para8: cint): PXImage{. + cdecl, dynlib: libX11, importc.} +proc XGetSubImage*(para1: PDisplay, para2: TDrawable, para3: cint, para4: cint, + para5: cuint, para6: cuint, para7: culong, para8: cint, + para9: PXImage, para10: cint, para11: cint): PXImage{.cdecl, + dynlib: libX11, importc.} +proc XOpenDisplay*(para1: cstring): PDisplay{.cdecl, dynlib: libX11, importc.} +proc XrmInitialize*(){.cdecl, dynlib: libX11, importc.} +proc XFetchBytes*(para1: PDisplay, para2: Pcint): cstring{.cdecl, + dynlib: libX11, importc.} +proc XFetchBuffer*(para1: PDisplay, para2: Pcint, para3: cint): cstring{.cdecl, + dynlib: libX11, importc.} +proc XGetAtomName*(para1: PDisplay, para2: TAtom): cstring{.cdecl, + dynlib: libX11, importc.} +proc XGetAtomNames*(para1: PDisplay, para2: PAtom, para3: cint, para4: PPchar): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XGetDefault*(para1: PDisplay, para2: cstring, para3: cstring): cstring{. + cdecl, dynlib: libX11, importc.} +proc XDisplayName*(para1: cstring): cstring{.cdecl, dynlib: libX11, importc.} +proc XKeysymToString*(para1: TKeySym): cstring{.cdecl, dynlib: libX11, importc.} +proc XSynchronize*(para1: PDisplay, para2: TBool): funcdisp{.cdecl, + dynlib: libX11, importc.} +proc XSetAfterFunction*(para1: PDisplay, para2: funcdisp): funcdisp{.cdecl, + dynlib: libX11, importc.} +proc XInternAtom*(para1: PDisplay, para2: cstring, para3: TBool): TAtom{.cdecl, + dynlib: libX11, importc.} +proc XInternAtoms*(para1: PDisplay, para2: PPchar, para3: cint, para4: TBool, + para5: PAtom): TStatus{.cdecl, dynlib: libX11, importc.} +proc XCopyColormapAndFree*(para1: PDisplay, para2: TColormap): TColormap{.cdecl, + dynlib: libX11, importc.} +proc XCreateColormap*(para1: PDisplay, para2: TWindow, para3: PVisual, + para4: cint): TColormap{.cdecl, dynlib: libX11, importc.} +proc XCreatePixmapCursor*(para1: PDisplay, para2: TPixmap, para3: TPixmap, + para4: PXColor, para5: PXColor, para6: cuint, + para7: cuint): TCursor{.cdecl, dynlib: libX11, importc.} +proc XCreateGlyphCursor*(para1: PDisplay, para2: TFont, para3: TFont, + para4: cuint, para5: cuint, para6: PXColor, + para7: PXColor): TCursor{.cdecl, dynlib: libX11, + importc.} +proc XCreateFontCursor*(para1: PDisplay, para2: cuint): TCursor{.cdecl, + dynlib: libX11, importc.} +proc XLoadFont*(para1: PDisplay, para2: cstring): TFont{.cdecl, dynlib: libX11, + importc.} +proc XCreateGC*(para1: PDisplay, para2: TDrawable, para3: culong, + para4: PXGCValues): TGC{.cdecl, dynlib: libX11, importc.} +proc XGContextFromGC*(para1: TGC): TGContext{.cdecl, dynlib: libX11, importc.} +proc XFlushGC*(para1: PDisplay, para2: TGC){.cdecl, dynlib: libX11, importc.} +proc XCreatePixmap*(para1: PDisplay, para2: TDrawable, para3: cuint, + para4: cuint, para5: cuint): TPixmap{.cdecl, dynlib: libX11, + importc.} +proc XCreateBitmapFromData*(para1: PDisplay, para2: TDrawable, para3: cstring, + para4: cuint, para5: cuint): TPixmap{.cdecl, + dynlib: libX11, importc.} +proc XCreatePixmapFromBitmapData*(para1: PDisplay, para2: TDrawable, + para3: cstring, para4: cuint, para5: cuint, + para6: culong, para7: culong, para8: cuint): TPixmap{. + cdecl, dynlib: libX11, importc.} +proc XCreateSimpleWindow*(para1: PDisplay, para2: TWindow, para3: cint, + para4: cint, para5: cuint, para6: cuint, para7: cuint, + para8: culong, para9: culong): TWindow{.cdecl, + dynlib: libX11, importc.} +proc XGetSelectionOwner*(para1: PDisplay, para2: TAtom): TWindow{.cdecl, + dynlib: libX11, importc.} +proc XCreateWindow*(para1: PDisplay, para2: TWindow, para3: cint, para4: cint, + para5: cuint, para6: cuint, para7: cuint, para8: cint, + para9: cuint, para10: PVisual, para11: culong, + para12: PXSetWindowAttributes): TWindow{.cdecl, + dynlib: libX11, importc.} +proc XListInstalledColormaps*(para1: PDisplay, para2: TWindow, para3: Pcint): PColormap{. + cdecl, dynlib: libX11, importc.} +proc XListFonts*(para1: PDisplay, para2: cstring, para3: cint, para4: Pcint): PPChar{. + cdecl, dynlib: libX11, importc.} +proc XListFontsWithInfo*(para1: PDisplay, para2: cstring, para3: cint, + para4: Pcint, para5: PPXFontStruct): PPChar{.cdecl, + dynlib: libX11, importc.} +proc XGetFontPath*(para1: PDisplay, para2: Pcint): PPChar{.cdecl, + dynlib: libX11, importc.} +proc XListExtensions*(para1: PDisplay, para2: Pcint): PPChar{.cdecl, + dynlib: libX11, importc.} +proc XListProperties*(para1: PDisplay, para2: TWindow, para3: Pcint): PAtom{. + cdecl, dynlib: libX11, importc.} +proc XListHosts*(para1: PDisplay, para2: Pcint, para3: PBool): PXHostAddress{. + cdecl, dynlib: libX11, importc.} +proc XKeycodeToKeysym*(para1: PDisplay, para2: TKeyCode, para3: cint): TKeySym{. + cdecl, dynlib: libX11, importc.} +proc XLookupKeysym*(para1: PXKeyEvent, para2: cint): TKeySym{.cdecl, + dynlib: libX11, importc.} +proc XGetKeyboardMapping*(para1: PDisplay, para2: TKeyCode, para3: cint, + para4: Pcint): PKeySym{.cdecl, dynlib: libX11, importc.} +proc XStringToKeysym*(para1: cstring): TKeySym{.cdecl, dynlib: libX11, importc.} +proc XMaxRequestSize*(para1: PDisplay): clong{.cdecl, dynlib: libX11, importc.} +proc XExtendedMaxRequestSize*(para1: PDisplay): clong{.cdecl, dynlib: libX11, + importc.} +proc XResourceManagerString*(para1: PDisplay): cstring{.cdecl, dynlib: libX11, + importc.} +proc XScreenResourceString*(para1: PScreen): cstring{.cdecl, dynlib: libX11, + importc.} +proc XDisplayMotionBufferSize*(para1: PDisplay): culong{.cdecl, dynlib: libX11, + importc.} +proc XVisualIDFromVisual*(para1: PVisual): TVisualID{.cdecl, dynlib: libX11, + importc.} +proc XInitThreads*(): TStatus{.cdecl, dynlib: libX11, importc.} +proc XLockDisplay*(para1: PDisplay){.cdecl, dynlib: libX11, importc.} +proc XUnlockDisplay*(para1: PDisplay){.cdecl, dynlib: libX11, importc.} +proc XInitExtension*(para1: PDisplay, para2: cstring): PXExtCodes{.cdecl, + dynlib: libX11, importc.} +proc XAddExtension*(para1: PDisplay): PXExtCodes{.cdecl, dynlib: libX11, importc.} +proc XFindOnExtensionList*(para1: PPXExtData, para2: cint): PXExtData{.cdecl, + dynlib: libX11, importc.} +proc XEHeadOfExtensionList*(para1: TXEDataObject): PPXExtData{.cdecl, + dynlib: libX11, importc.} +proc XRootWindow*(para1: PDisplay, para2: cint): TWindow{.cdecl, dynlib: libX11, + importc.} +proc XDefaultRootWindow*(para1: PDisplay): TWindow{.cdecl, dynlib: libX11, + importc.} +proc XRootWindowOfScreen*(para1: PScreen): TWindow{.cdecl, dynlib: libX11, + importc.} +proc XDefaultVisual*(para1: PDisplay, para2: cint): PVisual{.cdecl, + dynlib: libX11, importc.} +proc XDefaultVisualOfScreen*(para1: PScreen): PVisual{.cdecl, dynlib: libX11, + importc.} +proc XDefaultGC*(para1: PDisplay, para2: cint): TGC{.cdecl, dynlib: libX11, + importc.} +proc XDefaultGCOfScreen*(para1: PScreen): TGC{.cdecl, dynlib: libX11, importc.} +proc XBlackPixel*(para1: PDisplay, para2: cint): culong{.cdecl, dynlib: libX11, + importc.} +proc XWhitePixel*(para1: PDisplay, para2: cint): culong{.cdecl, dynlib: libX11, + importc.} +proc XAllPlanes*(): culong{.cdecl, dynlib: libX11, importc.} +proc XBlackPixelOfScreen*(para1: PScreen): culong{.cdecl, dynlib: libX11, + importc.} +proc XWhitePixelOfScreen*(para1: PScreen): culong{.cdecl, dynlib: libX11, + importc.} +proc XNextRequest*(para1: PDisplay): culong{.cdecl, dynlib: libX11, importc.} +proc XLastKnownRequestProcessed*(para1: PDisplay): culong{.cdecl, + dynlib: libX11, importc.} +proc XServerVendor*(para1: PDisplay): cstring{.cdecl, dynlib: libX11, importc.} +proc XDisplayString*(para1: PDisplay): cstring{.cdecl, dynlib: libX11, importc.} +proc XDefaultColormap*(para1: PDisplay, para2: cint): TColormap{.cdecl, + dynlib: libX11, importc.} +proc XDefaultColormapOfScreen*(para1: PScreen): TColormap{.cdecl, + dynlib: libX11, importc.} +proc XDisplayOfScreen*(para1: PScreen): PDisplay{.cdecl, dynlib: libX11, importc.} +proc XScreenOfDisplay*(para1: PDisplay, para2: cint): PScreen{.cdecl, + dynlib: libX11, importc.} +proc XDefaultScreenOfDisplay*(para1: PDisplay): PScreen{.cdecl, dynlib: libX11, + importc.} +proc XEventMaskOfScreen*(para1: PScreen): clong{.cdecl, dynlib: libX11, importc.} +proc XScreenNumberOfScreen*(para1: PScreen): cint{.cdecl, dynlib: libX11, + importc.} +type + TXErrorHandler* = proc (para1: PDisplay, para2: PXErrorEvent): cint{.cdecl.} + +proc XSetErrorHandler*(para1: TXErrorHandler): TXErrorHandler{.cdecl, + dynlib: libX11, importc.} +type + TXIOErrorHandler* = proc (para1: PDisplay): cint{.cdecl.} + +proc XSetIOErrorHandler*(para1: TXIOErrorHandler): TXIOErrorHandler{.cdecl, + dynlib: libX11, importc.} +proc XListPixmapFormats*(para1: PDisplay, para2: Pcint): PXPixmapFormatValues{. + cdecl, dynlib: libX11, importc.} +proc XListDepths*(para1: PDisplay, para2: cint, para3: Pcint): Pcint{.cdecl, + dynlib: libX11, importc.} +proc XReconfigureWMWindow*(para1: PDisplay, para2: TWindow, para3: cint, + para4: cuint, para5: PXWindowChanges): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XGetWMProtocols*(para1: PDisplay, para2: TWindow, para3: PPAtom, + para4: Pcint): TStatus{.cdecl, dynlib: libX11, importc.} +proc XSetWMProtocols*(para1: PDisplay, para2: TWindow, para3: PAtom, para4: cint): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XIconifyWindow*(para1: PDisplay, para2: TWindow, para3: cint): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XWithdrawWindow*(para1: PDisplay, para2: TWindow, para3: cint): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XGetCommand*(para1: PDisplay, para2: TWindow, para3: PPPchar, para4: Pcint): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XGetWMColormapWindows*(para1: PDisplay, para2: TWindow, para3: PPWindow, + para4: Pcint): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XSetWMColormapWindows*(para1: PDisplay, para2: TWindow, para3: PWindow, + para4: cint): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XFreeStringList*(para1: PPchar){.cdecl, dynlib: libX11, importc.} +proc XSetTransientForHint*(para1: PDisplay, para2: TWindow, para3: TWindow): cint{. + cdecl, dynlib: libX11, importc.} +proc XActivateScreenSaver*(para1: PDisplay): cint{.cdecl, dynlib: libX11, + importc.} +proc XAddHost*(para1: PDisplay, para2: PXHostAddress): cint{.cdecl, + dynlib: libX11, importc.} +proc XAddHosts*(para1: PDisplay, para2: PXHostAddress, para3: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XAddToExtensionList*(para1: PPXExtData, para2: PXExtData): cint{.cdecl, + dynlib: libX11, importc.} +proc XAddToSaveSet*(para1: PDisplay, para2: TWindow): cint{.cdecl, + dynlib: libX11, importc.} +proc XAllocColor*(para1: PDisplay, para2: TColormap, para3: PXColor): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XAllocColorCells*(para1: PDisplay, para2: TColormap, para3: TBool, + para4: Pculong, para5: cuint, para6: Pculong, + para7: cuint): TStatus{.cdecl, dynlib: libX11, importc.} +proc XAllocColorPlanes*(para1: PDisplay, para2: TColormap, para3: TBool, + para4: Pculong, para5: cint, para6: cint, para7: cint, + para8: cint, para9: Pculong, para10: Pculong, + para11: Pculong): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XAllocNamedColor*(para1: PDisplay, para2: TColormap, para3: cstring, + para4: PXColor, para5: PXColor): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XAllowEvents*(para1: PDisplay, para2: cint, para3: TTime): cint{.cdecl, + dynlib: libX11, importc.} +proc XAutoRepeatOff*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XAutoRepeatOn*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XBell*(para1: PDisplay, para2: cint): cint{.cdecl, dynlib: libX11, importc.} +proc XBitmapBitOrder*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XBitmapPad*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XBitmapUnit*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XCellsOfScreen*(para1: PScreen): cint{.cdecl, dynlib: libX11, importc.} +proc XChangeActivePointerGrab*(para1: PDisplay, para2: cuint, para3: TCursor, + para4: TTime): cint{.cdecl, dynlib: libX11, + importc.} +proc XChangeGC*(para1: PDisplay, para2: TGC, para3: culong, para4: PXGCValues): cint{. + cdecl, dynlib: libX11, importc.} +proc XChangeKeyboardControl*(para1: PDisplay, para2: culong, + para3: PXKeyboardControl): cint{.cdecl, + dynlib: libX11, importc.} +proc XChangeKeyboardMapping*(para1: PDisplay, para2: cint, para3: cint, + para4: PKeySym, para5: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XChangePointerControl*(para1: PDisplay, para2: TBool, para3: TBool, + para4: cint, para5: cint, para6: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XChangeProperty*(para1: PDisplay, para2: TWindow, para3: TAtom, + para4: TAtom, para5: cint, para6: cint, para7: Pcuchar, + para8: cint): cint{.cdecl, dynlib: libX11, importc.} +proc XChangeSaveSet*(para1: PDisplay, para2: TWindow, para3: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XChangeWindowAttributes*(para1: PDisplay, para2: TWindow, para3: culong, + para4: PXSetWindowAttributes): cint{.cdecl, + dynlib: libX11, importc.} +proc XCheckIfEvent*(para1: PDisplay, para2: PXEvent, para3: funcifevent, + para4: TXPointer): TBool{.cdecl, dynlib: libX11, importc.} +proc XCheckMaskEvent*(para1: PDisplay, para2: clong, para3: PXEvent): TBool{. + cdecl, dynlib: libX11, importc.} +proc XCheckTypedEvent*(para1: PDisplay, para2: cint, para3: PXEvent): TBool{. + cdecl, dynlib: libX11, importc.} +proc XCheckTypedWindowEvent*(para1: PDisplay, para2: TWindow, para3: cint, + para4: PXEvent): TBool{.cdecl, dynlib: libX11, + importc.} +proc XCheckWindowEvent*(para1: PDisplay, para2: TWindow, para3: clong, + para4: PXEvent): TBool{.cdecl, dynlib: libX11, importc.} +proc XCirculateSubwindows*(para1: PDisplay, para2: TWindow, para3: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XCirculateSubwindowsDown*(para1: PDisplay, para2: TWindow): cint{.cdecl, + dynlib: libX11, importc.} +proc XCirculateSubwindowsUp*(para1: PDisplay, para2: TWindow): cint{.cdecl, + dynlib: libX11, importc.} +proc XClearArea*(para1: PDisplay, para2: TWindow, para3: cint, para4: cint, + para5: cuint, para6: cuint, para7: TBool): cint{.cdecl, + dynlib: libX11, importc.} +proc XClearWindow*(para1: PDisplay, para2: TWindow): cint{.cdecl, + dynlib: libX11, importc.} +proc XCloseDisplay*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XConfigureWindow*(para1: PDisplay, para2: TWindow, para3: cuint, + para4: PXWindowChanges): cint{.cdecl, dynlib: libX11, + importc.} +proc XConnectionNumber*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XConvertSelection*(para1: PDisplay, para2: TAtom, para3: TAtom, + para4: TAtom, para5: TWindow, para6: TTime): cint{. + cdecl, dynlib: libX11, importc.} +proc XCopyArea*(para1: PDisplay, para2: TDrawable, para3: TDrawable, para4: TGC, + para5: cint, para6: cint, para7: cuint, para8: cuint, + para9: cint, para10: cint): cint{.cdecl, dynlib: libX11, importc.} +proc XCopyGC*(para1: PDisplay, para2: TGC, para3: culong, para4: TGC): cint{. + cdecl, dynlib: libX11, importc.} +proc XCopyPlane*(para1: PDisplay, para2: TDrawable, para3: TDrawable, + para4: TGC, para5: cint, para6: cint, para7: cuint, + para8: cuint, para9: cint, para10: cint, para11: culong): cint{. + cdecl, dynlib: libX11, importc.} +proc XDefaultDepth*(para1: PDisplay, para2: cint): cint{.cdecl, dynlib: libX11, + importc.} +proc XDefaultDepthOfScreen*(para1: PScreen): cint{.cdecl, dynlib: libX11, + importc.} +proc XDefaultScreen*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XDefineCursor*(para1: PDisplay, para2: TWindow, para3: TCursor): cint{. + cdecl, dynlib: libX11, importc.} +proc XDeleteProperty*(para1: PDisplay, para2: TWindow, para3: TAtom): cint{. + cdecl, dynlib: libX11, importc.} +proc XDestroyWindow*(para1: PDisplay, para2: TWindow): cint{.cdecl, + dynlib: libX11, importc.} +proc XDestroySubwindows*(para1: PDisplay, para2: TWindow): cint{.cdecl, + dynlib: libX11, importc.} +proc XDoesBackingStore*(para1: PScreen): cint{.cdecl, dynlib: libX11, importc.} +proc XDoesSaveUnders*(para1: PScreen): TBool{.cdecl, dynlib: libX11, importc.} +proc XDisableAccessControl*(para1: PDisplay): cint{.cdecl, dynlib: libX11, + importc.} +proc XDisplayCells*(para1: PDisplay, para2: cint): cint{.cdecl, dynlib: libX11, + importc.} +proc XDisplayHeight*(para1: PDisplay, para2: cint): cint{.cdecl, dynlib: libX11, + importc.} +proc XDisplayHeightMM*(para1: PDisplay, para2: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XDisplayKeycodes*(para1: PDisplay, para2: Pcint, para3: Pcint): cint{. + cdecl, dynlib: libX11, importc.} +proc XDisplayPlanes*(para1: PDisplay, para2: cint): cint{.cdecl, dynlib: libX11, + importc.} +proc XDisplayWidth*(para1: PDisplay, para2: cint): cint{.cdecl, dynlib: libX11, + importc.} +proc XDisplayWidthMM*(para1: PDisplay, para2: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XDrawArc*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, + para5: cint, para6: cuint, para7: cuint, para8: cint, para9: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XDrawArcs*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: PXArc, + para5: cint): cint{.cdecl, dynlib: libX11, importc.} +proc XDrawImageString*(para1: PDisplay, para2: TDrawable, para3: TGC, + para4: cint, para5: cint, para6: cstring, para7: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XDrawImageString16*(para1: PDisplay, para2: TDrawable, para3: TGC, + para4: cint, para5: cint, para6: PXChar2b, para7: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XDrawLine*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, + para5: cint, para6: cint, para7: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XDrawLines*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: PXPoint, + para5: cint, para6: cint): cint{.cdecl, dynlib: libX11, importc.} +proc XDrawPoint*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, + para5: cint): cint{.cdecl, dynlib: libX11, importc.} +proc XDrawPoints*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: PXPoint, + para5: cint, para6: cint): cint{.cdecl, dynlib: libX11, + importc.} +proc XDrawRectangle*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, + para5: cint, para6: cuint, para7: cuint): cint{.cdecl, + dynlib: libX11, importc.} +proc XDrawRectangles*(para1: PDisplay, para2: TDrawable, para3: TGC, + para4: PXRectangle, para5: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XDrawSegments*(para1: PDisplay, para2: TDrawable, para3: TGC, + para4: PXSegment, para5: cint): cint{.cdecl, dynlib: libX11, + importc.} +proc XDrawString*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, + para5: cint, para6: cstring, para7: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XDrawString16*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, + para5: cint, para6: PXChar2b, para7: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XDrawText*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, + para5: cint, para6: PXTextItem, para7: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XDrawText16*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, + para5: cint, para6: PXTextItem16, para7: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XEnableAccessControl*(para1: PDisplay): cint{.cdecl, dynlib: libX11, + importc.} +proc XEventsQueued*(para1: PDisplay, para2: cint): cint{.cdecl, dynlib: libX11, + importc.} +proc XFetchName*(para1: PDisplay, para2: TWindow, para3: PPchar): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XFillArc*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, + para5: cint, para6: cuint, para7: cuint, para8: cint, para9: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XFillArcs*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: PXArc, + para5: cint): cint{.cdecl, dynlib: libX11, importc.} +proc XFillPolygon*(para1: PDisplay, para2: TDrawable, para3: TGC, + para4: PXPoint, para5: cint, para6: cint, para7: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XFillRectangle*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, + para5: cint, para6: cuint, para7: cuint): cint{.cdecl, + dynlib: libX11, importc.} +proc XFillRectangles*(para1: PDisplay, para2: TDrawable, para3: TGC, + para4: PXRectangle, para5: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XFlush*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XForceScreenSaver*(para1: PDisplay, para2: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XFree*(para1: pointer): cint{.cdecl, dynlib: libX11, importc.} +proc XFreeColormap*(para1: PDisplay, para2: TColormap): cint{.cdecl, + dynlib: libX11, importc.} +proc XFreeColors*(para1: PDisplay, para2: TColormap, para3: Pculong, + para4: cint, para5: culong): cint{.cdecl, dynlib: libX11, + importc.} +proc XFreeCursor*(para1: PDisplay, para2: TCursor): cint{.cdecl, dynlib: libX11, + importc.} +proc XFreeExtensionList*(para1: PPchar): cint{.cdecl, dynlib: libX11, importc.} +proc XFreeFont*(para1: PDisplay, para2: PXFontStruct): cint{.cdecl, + dynlib: libX11, importc.} +proc XFreeFontInfo*(para1: PPchar, para2: PXFontStruct, para3: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XFreeFontNames*(para1: PPchar): cint{.cdecl, dynlib: libX11, importc.} +proc XFreeFontPath*(para1: PPchar): cint{.cdecl, dynlib: libX11, importc.} +proc XFreeGC*(para1: PDisplay, para2: TGC): cint{.cdecl, dynlib: libX11, importc.} +proc XFreeModifiermap*(para1: PXModifierKeymap): cint{.cdecl, dynlib: libX11, + importc.} +proc XFreePixmap*(para1: PDisplay, para2: TPixmap): cint{.cdecl, dynlib: libX11, + importc.} +proc XGeometry*(para1: PDisplay, para2: cint, para3: cstring, para4: cstring, + para5: cuint, para6: cuint, para7: cuint, para8: cint, + para9: cint, para10: Pcint, para11: Pcint, para12: Pcint, + para13: Pcint): cint{.cdecl, dynlib: libX11, importc.} +proc XGetErrorDatabaseText*(para1: PDisplay, para2: cstring, para3: cstring, + para4: cstring, para5: cstring, para6: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XGetErrorText*(para1: PDisplay, para2: cint, para3: cstring, para4: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XGetFontProperty*(para1: PXFontStruct, para2: TAtom, para3: Pculong): TBool{. + cdecl, dynlib: libX11, importc.} +proc XGetGCValues*(para1: PDisplay, para2: TGC, para3: culong, para4: PXGCValues): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XGetGeometry*(para1: PDisplay, para2: TDrawable, para3: PWindow, + para4: Pcint, para5: Pcint, para6: Pcuint, para7: Pcuint, + para8: Pcuint, para9: Pcuint): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XGetIconName*(para1: PDisplay, para2: TWindow, para3: PPchar): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XGetInputFocus*(para1: PDisplay, para2: PWindow, para3: Pcint): cint{. + cdecl, dynlib: libX11, importc.} +proc XGetKeyboardControl*(para1: PDisplay, para2: PXKeyboardState): cint{.cdecl, + dynlib: libX11, importc.} +proc XGetPointerControl*(para1: PDisplay, para2: Pcint, para3: Pcint, + para4: Pcint): cint{.cdecl, dynlib: libX11, importc.} +proc XGetPointerMapping*(para1: PDisplay, para2: Pcuchar, para3: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XGetScreenSaver*(para1: PDisplay, para2: Pcint, para3: Pcint, para4: Pcint, + para5: Pcint): cint{.cdecl, dynlib: libX11, importc.} +proc XGetTransientForHint*(para1: PDisplay, para2: TWindow, para3: PWindow): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XGetWindowProperty*(para1: PDisplay, para2: TWindow, para3: TAtom, + para4: clong, para5: clong, para6: TBool, para7: TAtom, + para8: PAtom, para9: Pcint, para10: Pculong, + para11: Pculong, para12: PPcuchar): cint{.cdecl, + dynlib: libX11, importc.} +proc XGetWindowAttributes*(para1: PDisplay, para2: TWindow, + para3: PXWindowAttributes): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XGrabButton*(para1: PDisplay, para2: cuint, para3: cuint, para4: TWindow, + para5: TBool, para6: cuint, para7: cint, para8: cint, + para9: TWindow, para10: TCursor): cint{.cdecl, dynlib: libX11, + importc.} +proc XGrabKey*(para1: PDisplay, para2: cint, para3: cuint, para4: TWindow, + para5: TBool, para6: cint, para7: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XGrabKeyboard*(para1: PDisplay, para2: TWindow, para3: TBool, para4: cint, + para5: cint, para6: TTime): cint{.cdecl, dynlib: libX11, + importc.} +proc XGrabPointer*(para1: PDisplay, para2: TWindow, para3: TBool, para4: cuint, + para5: cint, para6: cint, para7: TWindow, para8: TCursor, + para9: TTime): cint{.cdecl, dynlib: libX11, importc.} +proc XGrabServer*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XHeightMMOfScreen*(para1: PScreen): cint{.cdecl, dynlib: libX11, importc.} +proc XHeightOfScreen*(para1: PScreen): cint{.cdecl, dynlib: libX11, importc.} +proc XIfEvent*(para1: PDisplay, para2: PXEvent, para3: funcifevent, + para4: TXPointer): cint{.cdecl, dynlib: libX11, importc.} +proc XImageByteOrder*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XInstallColormap*(para1: PDisplay, para2: TColormap): cint{.cdecl, + dynlib: libX11, importc.} +proc XKeysymToKeycode*(para1: PDisplay, para2: TKeySym): TKeyCode{.cdecl, + dynlib: libX11, importc.} +proc XKillClient*(para1: PDisplay, para2: TXID): cint{.cdecl, dynlib: libX11, + importc.} +proc XLookupColor*(para1: PDisplay, para2: TColormap, para3: cstring, + para4: PXColor, para5: PXColor): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XLowerWindow*(para1: PDisplay, para2: TWindow): cint{.cdecl, + dynlib: libX11, importc.} +proc XMapRaised*(para1: PDisplay, para2: TWindow): cint{.cdecl, dynlib: libX11, + importc.} +proc XMapSubwindows*(para1: PDisplay, para2: TWindow): cint{.cdecl, + dynlib: libX11, importc.} +proc XMapWindow*(para1: PDisplay, para2: TWindow): cint{.cdecl, dynlib: libX11, + importc.} +proc XMaskEvent*(para1: PDisplay, para2: clong, para3: PXEvent): cint{.cdecl, + dynlib: libX11, importc.} +proc XMaxCmapsOfScreen*(para1: PScreen): cint{.cdecl, dynlib: libX11, importc.} +proc XMinCmapsOfScreen*(para1: PScreen): cint{.cdecl, dynlib: libX11, importc.} +proc XMoveResizeWindow*(para1: PDisplay, para2: TWindow, para3: cint, + para4: cint, para5: cuint, para6: cuint): cint{.cdecl, + dynlib: libX11, importc.} +proc XMoveWindow*(para1: PDisplay, para2: TWindow, para3: cint, para4: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XNextEvent*(para1: PDisplay, para2: PXEvent): cint{.cdecl, dynlib: libX11, + importc.} +proc XNoOp*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XParseColor*(para1: PDisplay, para2: TColormap, para3: cstring, + para4: PXColor): TStatus{.cdecl, dynlib: libX11, importc.} +proc XParseGeometry*(para1: cstring, para2: Pcint, para3: Pcint, para4: Pcuint, + para5: Pcuint): cint{.cdecl, dynlib: libX11, importc.} +proc XPeekEvent*(para1: PDisplay, para2: PXEvent): cint{.cdecl, dynlib: libX11, + importc.} +proc XPeekIfEvent*(para1: PDisplay, para2: PXEvent, para3: funcifevent, + para4: TXPointer): cint{.cdecl, dynlib: libX11, importc.} +proc XPending*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XPlanesOfScreen*(para1: PScreen): cint{.cdecl, dynlib: libX11, importc.} +proc XProtocolRevision*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XProtocolVersion*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XPutBackEvent*(para1: PDisplay, para2: PXEvent): cint{.cdecl, + dynlib: libX11, importc.} +proc XPutImage*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: PXImage, + para5: cint, para6: cint, para7: cint, para8: cint, + para9: cuint, para10: cuint): cint{.cdecl, dynlib: libX11, + importc.} +proc XQLength*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XQueryBestCursor*(para1: PDisplay, para2: TDrawable, para3: cuint, + para4: cuint, para5: Pcuint, para6: Pcuint): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XQueryBestSize*(para1: PDisplay, para2: cint, para3: TDrawable, + para4: cuint, para5: cuint, para6: Pcuint, para7: Pcuint): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XQueryBestStipple*(para1: PDisplay, para2: TDrawable, para3: cuint, + para4: cuint, para5: Pcuint, para6: Pcuint): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XQueryBestTile*(para1: PDisplay, para2: TDrawable, para3: cuint, + para4: cuint, para5: Pcuint, para6: Pcuint): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XQueryColor*(para1: PDisplay, para2: TColormap, para3: PXColor): cint{. + cdecl, dynlib: libX11, importc.} +proc XQueryColors*(para1: PDisplay, para2: TColormap, para3: PXColor, + para4: cint): cint{.cdecl, dynlib: libX11, importc.} +proc XQueryExtension*(para1: PDisplay, para2: cstring, para3: Pcint, + para4: Pcint, para5: Pcint): TBool{.cdecl, dynlib: libX11, + importc.} + #? +proc XQueryKeymap*(para1: PDisplay, para2: chararr32): cint{.cdecl, + dynlib: libX11, importc.} +proc XQueryPointer*(para1: PDisplay, para2: TWindow, para3: PWindow, + para4: PWindow, para5: Pcint, para6: Pcint, para7: Pcint, + para8: Pcint, para9: Pcuint): TBool{.cdecl, dynlib: libX11, + importc.} +proc XQueryTextExtents*(para1: PDisplay, para2: TXID, para3: cstring, + para4: cint, para5: Pcint, para6: Pcint, para7: Pcint, + para8: PXCharStruct): cint{.cdecl, dynlib: libX11, + importc.} +proc XQueryTextExtents16*(para1: PDisplay, para2: TXID, para3: PXChar2b, + para4: cint, para5: Pcint, para6: Pcint, para7: Pcint, + para8: PXCharStruct): cint{.cdecl, dynlib: libX11, + importc.} +proc XQueryTree*(para1: PDisplay, para2: TWindow, para3: PWindow, + para4: PWindow, para5: PPWindow, para6: Pcuint): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XRaiseWindow*(para1: PDisplay, para2: TWindow): cint{.cdecl, + dynlib: libX11, importc.} +proc XReadBitmapFile*(para1: PDisplay, para2: TDrawable, para3: cstring, + para4: Pcuint, para5: Pcuint, para6: PPixmap, + para7: Pcint, para8: Pcint): cint{.cdecl, dynlib: libX11, + importc.} +proc XReadBitmapFileData*(para1: cstring, para2: Pcuint, para3: Pcuint, + para4: PPcuchar, para5: Pcint, para6: Pcint): cint{. + cdecl, dynlib: libX11, importc.} +proc XRebindKeysym*(para1: PDisplay, para2: TKeySym, para3: PKeySym, + para4: cint, para5: Pcuchar, para6: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XRecolorCursor*(para1: PDisplay, para2: TCursor, para3: PXColor, + para4: PXColor): cint{.cdecl, dynlib: libX11, importc.} +proc XRefreshKeyboardMapping*(para1: PXMappingEvent): cint{.cdecl, + dynlib: libX11, importc.} +proc XRemoveFromSaveSet*(para1: PDisplay, para2: TWindow): cint{.cdecl, + dynlib: libX11, importc.} +proc XRemoveHost*(para1: PDisplay, para2: PXHostAddress): cint{.cdecl, + dynlib: libX11, importc.} +proc XRemoveHosts*(para1: PDisplay, para2: PXHostAddress, para3: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XReparentWindow*(para1: PDisplay, para2: TWindow, para3: TWindow, + para4: cint, para5: cint): cint{.cdecl, dynlib: libX11, + importc.} +proc XResetScreenSaver*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XResizeWindow*(para1: PDisplay, para2: TWindow, para3: cuint, para4: cuint): cint{. + cdecl, dynlib: libX11, importc.} +proc XRestackWindows*(para1: PDisplay, para2: PWindow, para3: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XRotateBuffers*(para1: PDisplay, para2: cint): cint{.cdecl, dynlib: libX11, + importc.} +proc XRotateWindowProperties*(para1: PDisplay, para2: TWindow, para3: PAtom, + para4: cint, para5: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XScreenCount*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XSelectInput*(para1: PDisplay, para2: TWindow, para3: clong): cint{.cdecl, + dynlib: libX11, importc.} +proc XSendEvent*(para1: PDisplay, para2: TWindow, para3: TBool, para4: clong, + para5: PXEvent): TStatus{.cdecl, dynlib: libX11, importc.} +proc XSetAccessControl*(para1: PDisplay, para2: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XSetArcMode*(para1: PDisplay, para2: TGC, para3: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XSetBackground*(para1: PDisplay, para2: TGC, para3: culong): cint{.cdecl, + dynlib: libX11, importc.} +proc XSetClipMask*(para1: PDisplay, para2: TGC, para3: TPixmap): cint{.cdecl, + dynlib: libX11, importc.} +proc XSetClipOrigin*(para1: PDisplay, para2: TGC, para3: cint, para4: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XSetClipRectangles*(para1: PDisplay, para2: TGC, para3: cint, para4: cint, + para5: PXRectangle, para6: cint, para7: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XSetCloseDownMode*(para1: PDisplay, para2: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XSetCommand*(para1: PDisplay, para2: TWindow, para3: PPchar, para4: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XSetDashes*(para1: PDisplay, para2: TGC, para3: cint, para4: cstring, + para5: cint): cint{.cdecl, dynlib: libX11, importc.} +proc XSetFillRule*(para1: PDisplay, para2: TGC, para3: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XSetFillStyle*(para1: PDisplay, para2: TGC, para3: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XSetFont*(para1: PDisplay, para2: TGC, para3: TFont): cint{.cdecl, + dynlib: libX11, importc.} +proc XSetFontPath*(para1: PDisplay, para2: PPchar, para3: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XSetForeground*(para1: PDisplay, para2: TGC, para3: culong): cint{.cdecl, + dynlib: libX11, importc.} +proc XSetFunction*(para1: PDisplay, para2: TGC, para3: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XSetGraphicsExposures*(para1: PDisplay, para2: TGC, para3: TBool): cint{. + cdecl, dynlib: libX11, importc.} +proc XSetIconName*(para1: PDisplay, para2: TWindow, para3: cstring): cint{. + cdecl, dynlib: libX11, importc.} +proc XSetInputFocus*(para1: PDisplay, para2: TWindow, para3: cint, para4: TTime): cint{. + cdecl, dynlib: libX11, importc.} +proc XSetLineAttributes*(para1: PDisplay, para2: TGC, para3: cuint, para4: cint, + para5: cint, para6: cint): cint{.cdecl, dynlib: libX11, + importc.} +proc XSetModifierMapping*(para1: PDisplay, para2: PXModifierKeymap): cint{. + cdecl, dynlib: libX11, importc.} +proc XSetPlaneMask*(para1: PDisplay, para2: TGC, para3: culong): cint{.cdecl, + dynlib: libX11, importc.} +proc XSetPointerMapping*(para1: PDisplay, para2: Pcuchar, para3: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XSetScreenSaver*(para1: PDisplay, para2: cint, para3: cint, para4: cint, + para5: cint): cint{.cdecl, dynlib: libX11, importc.} +proc XSetSelectionOwner*(para1: PDisplay, para2: TAtom, para3: TWindow, + para4: TTime): cint{.cdecl, dynlib: libX11, importc.} +proc XSetState*(para1: PDisplay, para2: TGC, para3: culong, para4: culong, + para5: cint, para6: culong): cint{.cdecl, dynlib: libX11, + importc.} +proc XSetStipple*(para1: PDisplay, para2: TGC, para3: TPixmap): cint{.cdecl, + dynlib: libX11, importc.} +proc XSetSubwindowMode*(para1: PDisplay, para2: TGC, para3: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XSetTSOrigin*(para1: PDisplay, para2: TGC, para3: cint, para4: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XSetTile*(para1: PDisplay, para2: TGC, para3: TPixmap): cint{.cdecl, + dynlib: libX11, importc.} +proc XSetWindowBackground*(para1: PDisplay, para2: TWindow, para3: culong): cint{. + cdecl, dynlib: libX11, importc.} +proc XSetWindowBackgroundPixmap*(para1: PDisplay, para2: TWindow, para3: TPixmap): cint{. + cdecl, dynlib: libX11, importc.} +proc XSetWindowBorder*(para1: PDisplay, para2: TWindow, para3: culong): cint{. + cdecl, dynlib: libX11, importc.} +proc XSetWindowBorderPixmap*(para1: PDisplay, para2: TWindow, para3: TPixmap): cint{. + cdecl, dynlib: libX11, importc.} +proc XSetWindowBorderWidth*(para1: PDisplay, para2: TWindow, para3: cuint): cint{. + cdecl, dynlib: libX11, importc.} +proc XSetWindowColormap*(para1: PDisplay, para2: TWindow, para3: TColormap): cint{. + cdecl, dynlib: libX11, importc.} +proc XStoreBuffer*(para1: PDisplay, para2: cstring, para3: cint, para4: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XStoreBytes*(para1: PDisplay, para2: cstring, para3: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XStoreColor*(para1: PDisplay, para2: TColormap, para3: PXColor): cint{. + cdecl, dynlib: libX11, importc.} +proc XStoreColors*(para1: PDisplay, para2: TColormap, para3: PXColor, + para4: cint): cint{.cdecl, dynlib: libX11, importc.} +proc XStoreName*(para1: PDisplay, para2: TWindow, para3: cstring): cint{.cdecl, + dynlib: libX11, importc.} +proc XStoreNamedColor*(para1: PDisplay, para2: TColormap, para3: cstring, + para4: culong, para5: cint): cint{.cdecl, dynlib: libX11, + importc.} +proc XSync*(para1: PDisplay, para2: TBool): cint{.cdecl, dynlib: libX11, importc.} +proc XTextExtents*(para1: PXFontStruct, para2: cstring, para3: cint, + para4: Pcint, para5: Pcint, para6: Pcint, para7: PXCharStruct): cint{. + cdecl, dynlib: libX11, importc.} +proc XTextExtents16*(para1: PXFontStruct, para2: PXChar2b, para3: cint, + para4: Pcint, para5: Pcint, para6: Pcint, + para7: PXCharStruct): cint{.cdecl, dynlib: libX11, importc.} +proc XTextWidth*(para1: PXFontStruct, para2: cstring, para3: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XTextWidth16*(para1: PXFontStruct, para2: PXChar2b, para3: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XTranslateCoordinates*(para1: PDisplay, para2: TWindow, para3: TWindow, + para4: cint, para5: cint, para6: Pcint, + para7: Pcint, para8: PWindow): TBool{.cdecl, + dynlib: libX11, importc.} +proc XUndefineCursor*(para1: PDisplay, para2: TWindow): cint{.cdecl, + dynlib: libX11, importc.} +proc XUngrabButton*(para1: PDisplay, para2: cuint, para3: cuint, para4: TWindow): cint{. + cdecl, dynlib: libX11, importc.} +proc XUngrabKey*(para1: PDisplay, para2: cint, para3: cuint, para4: TWindow): cint{. + cdecl, dynlib: libX11, importc.} +proc XUngrabKeyboard*(para1: PDisplay, para2: TTime): cint{.cdecl, + dynlib: libX11, importc.} +proc XUngrabPointer*(para1: PDisplay, para2: TTime): cint{.cdecl, + dynlib: libX11, importc.} +proc XUngrabServer*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XUninstallColormap*(para1: PDisplay, para2: TColormap): cint{.cdecl, + dynlib: libX11, importc.} +proc XUnloadFont*(para1: PDisplay, para2: TFont): cint{.cdecl, dynlib: libX11, + importc.} +proc XUnmapSubwindows*(para1: PDisplay, para2: TWindow): cint{.cdecl, + dynlib: libX11, importc.} +proc XUnmapWindow*(para1: PDisplay, para2: TWindow): cint{.cdecl, + dynlib: libX11, importc.} +proc XVendorRelease*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XWarpPointer*(para1: PDisplay, para2: TWindow, para3: TWindow, para4: cint, + para5: cint, para6: cuint, para7: cuint, para8: cint, + para9: cint): cint{.cdecl, dynlib: libX11, importc.} +proc XWidthMMOfScreen*(para1: PScreen): cint{.cdecl, dynlib: libX11, importc.} +proc XWidthOfScreen*(para1: PScreen): cint{.cdecl, dynlib: libX11, importc.} +proc XWindowEvent*(para1: PDisplay, para2: TWindow, para3: clong, para4: PXEvent): cint{. + cdecl, dynlib: libX11, importc.} +proc XWriteBitmapFile*(para1: PDisplay, para2: cstring, para3: TPixmap, + para4: cuint, para5: cuint, para6: cint, para7: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XSupportsLocale*(): TBool{.cdecl, dynlib: libX11, importc.} +proc XSetLocaleModifiers*(para1: cstring): cstring{.cdecl, dynlib: libX11, + importc.} +proc XOpenOM*(para1: PDisplay, para2: PXrmHashBucketRec, para3: cstring, + para4: cstring): TXOM{.cdecl, dynlib: libX11, importc.} +proc XCloseOM*(para1: TXOM): TStatus{.cdecl, dynlib: libX11, importc.} +proc XSetOMValues*(para1: TXOM): cstring{.varargs, cdecl, dynlib: libX11, + importc.} +proc XGetOMValues*(para1: TXOM): cstring{.varargs, cdecl, dynlib: libX11, + importc.} +proc XDisplayOfOM*(para1: TXOM): PDisplay{.cdecl, dynlib: libX11, importc.} +proc XLocaleOfOM*(para1: TXOM): cstring{.cdecl, dynlib: libX11, importc.} +proc XCreateOC*(para1: TXOM): TXOC{.varargs, cdecl, dynlib: libX11, importc.} +proc XDestroyOC*(para1: TXOC){.cdecl, dynlib: libX11, importc.} +proc XOMOfOC*(para1: TXOC): TXOM{.cdecl, dynlib: libX11, importc.} +proc XSetOCValues*(para1: TXOC): cstring{.varargs, cdecl, dynlib: libX11, + importc.} +proc XGetOCValues*(para1: TXOC): cstring{.varargs, cdecl, dynlib: libX11, + importc.} +proc XCreateFontSet*(para1: PDisplay, para2: cstring, para3: PPPchar, + para4: Pcint, para5: PPchar): TXFontSet{.cdecl, + dynlib: libX11, importc.} +proc XFreeFontSet*(para1: PDisplay, para2: TXFontSet){.cdecl, dynlib: libX11, + importc.} +proc XFontsOfFontSet*(para1: TXFontSet, para2: PPPXFontStruct, para3: PPPchar): cint{. + cdecl, dynlib: libX11, importc.} +proc XBaseFontNameListOfFontSet*(para1: TXFontSet): cstring{.cdecl, + dynlib: libX11, importc.} +proc XLocaleOfFontSet*(para1: TXFontSet): cstring{.cdecl, dynlib: libX11, + importc.} +proc XContextDependentDrawing*(para1: TXFontSet): TBool{.cdecl, dynlib: libX11, + importc.} +proc XDirectionalDependentDrawing*(para1: TXFontSet): TBool{.cdecl, + dynlib: libX11, importc.} +proc XContextualDrawing*(para1: TXFontSet): TBool{.cdecl, dynlib: libX11, + importc.} +proc XExtentsOfFontSet*(para1: TXFontSet): PXFontSetExtents{.cdecl, + dynlib: libX11, importc.} +proc XmbTextEscapement*(para1: TXFontSet, para2: cstring, para3: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XwcTextEscapement*(para1: TXFontSet, para2: PWideChar, para3: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc Xutf8TextEscapement*(para1: TXFontSet, para2: cstring, para3: cint): cint{. + cdecl, dynlib: libX11, importc.} +proc XmbTextExtents*(para1: TXFontSet, para2: cstring, para3: cint, + para4: PXRectangle, para5: PXRectangle): cint{.cdecl, + dynlib: libX11, importc.} +proc XwcTextExtents*(para1: TXFontSet, para2: PWideChar, para3: cint, + para4: PXRectangle, para5: PXRectangle): cint{.cdecl, + dynlib: libX11, importc.} +proc Xutf8TextExtents*(para1: TXFontSet, para2: cstring, para3: cint, + para4: PXRectangle, para5: PXRectangle): cint{.cdecl, + dynlib: libX11, importc.} +proc XmbTextPerCharExtents*(para1: TXFontSet, para2: cstring, para3: cint, + para4: PXRectangle, para5: PXRectangle, para6: cint, + para7: Pcint, para8: PXRectangle, para9: PXRectangle): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XwcTextPerCharExtents*(para1: TXFontSet, para2: PWideChar, para3: cint, + para4: PXRectangle, para5: PXRectangle, para6: cint, + para7: Pcint, para8: PXRectangle, para9: PXRectangle): TStatus{. + cdecl, dynlib: libX11, importc.} +proc Xutf8TextPerCharExtents*(para1: TXFontSet, para2: cstring, para3: cint, + para4: PXRectangle, para5: PXRectangle, + para6: cint, para7: Pcint, para8: PXRectangle, + para9: PXRectangle): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XmbDrawText*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, + para5: cint, para6: PXmbTextItem, para7: cint){.cdecl, + dynlib: libX11, importc.} +proc XwcDrawText*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, + para5: cint, para6: PXwcTextItem, para7: cint){.cdecl, + dynlib: libX11, importc.} +proc Xutf8DrawText*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, + para5: cint, para6: PXmbTextItem, para7: cint){.cdecl, + dynlib: libX11, importc.} +proc XmbDrawString*(para1: PDisplay, para2: TDrawable, para3: TXFontSet, + para4: TGC, para5: cint, para6: cint, para7: cstring, + para8: cint){.cdecl, dynlib: libX11, importc.} +proc XwcDrawString*(para1: PDisplay, para2: TDrawable, para3: TXFontSet, + para4: TGC, para5: cint, para6: cint, para7: PWideChar, + para8: cint){.cdecl, dynlib: libX11, importc.} +proc Xutf8DrawString*(para1: PDisplay, para2: TDrawable, para3: TXFontSet, + para4: TGC, para5: cint, para6: cint, para7: cstring, + para8: cint){.cdecl, dynlib: libX11, importc.} +proc XmbDrawImageString*(para1: PDisplay, para2: TDrawable, para3: TXFontSet, + para4: TGC, para5: cint, para6: cint, para7: cstring, + para8: cint){.cdecl, dynlib: libX11, importc.} +proc XwcDrawImageString*(para1: PDisplay, para2: TDrawable, para3: TXFontSet, + para4: TGC, para5: cint, para6: cint, para7: PWideChar, + para8: cint){.cdecl, dynlib: libX11, importc.} +proc Xutf8DrawImageString*(para1: PDisplay, para2: TDrawable, para3: TXFontSet, + para4: TGC, para5: cint, para6: cint, para7: cstring, + para8: cint){.cdecl, dynlib: libX11, importc.} +proc XOpenIM*(para1: PDisplay, para2: PXrmHashBucketRec, para3: cstring, + para4: cstring): TXIM{.cdecl, dynlib: libX11, importc.} +proc XCloseIM*(para1: TXIM): TStatus{.cdecl, dynlib: libX11, importc.} +proc XGetIMValues*(para1: TXIM): cstring{.varargs, cdecl, dynlib: libX11, + importc.} +proc XSetIMValues*(para1: TXIM): cstring{.varargs, cdecl, dynlib: libX11, + importc.} +proc XDisplayOfIM*(para1: TXIM): PDisplay{.cdecl, dynlib: libX11, importc.} +proc XLocaleOfIM*(para1: TXIM): cstring{.cdecl, dynlib: libX11, importc.} +proc XCreateIC*(para1: TXIM): TXIC{.varargs, cdecl, dynlib: libX11, importc.} +proc XDestroyIC*(para1: TXIC){.cdecl, dynlib: libX11, importc.} +proc XSetICFocus*(para1: TXIC){.cdecl, dynlib: libX11, importc.} +proc XUnsetICFocus*(para1: TXIC){.cdecl, dynlib: libX11, importc.} +proc XwcResetIC*(para1: TXIC): PWideChar{.cdecl, dynlib: libX11, importc.} +proc XmbResetIC*(para1: TXIC): cstring{.cdecl, dynlib: libX11, importc.} +proc Xutf8ResetIC*(para1: TXIC): cstring{.cdecl, dynlib: libX11, importc.} +proc XSetICValues*(para1: TXIC): cstring{.varargs, cdecl, dynlib: libX11, + importc.} +proc XGetICValues*(para1: TXIC): cstring{.varargs, cdecl, dynlib: libX11, + importc.} +proc XIMOfIC*(para1: TXIC): TXIM{.cdecl, dynlib: libX11, importc.} +proc XFilterEvent*(para1: PXEvent, para2: TWindow): TBool{.cdecl, + dynlib: libX11, importc.} +proc XmbLookupString*(para1: TXIC, para2: PXKeyPressedEvent, para3: cstring, + para4: cint, para5: PKeySym, para6: PStatus): cint{.cdecl, + dynlib: libX11, importc.} +proc XwcLookupString*(para1: TXIC, para2: PXKeyPressedEvent, para3: PWideChar, + para4: cint, para5: PKeySym, para6: PStatus): cint{.cdecl, + dynlib: libX11, importc.} +proc Xutf8LookupString*(para1: TXIC, para2: PXKeyPressedEvent, para3: cstring, + para4: cint, para5: PKeySym, para6: PStatus): cint{. + cdecl, dynlib: libX11, importc.} +proc XVaCreateNestedList*(unused: cint): TXVaNestedList{.varargs, cdecl, + dynlib: libX11, importc.} +proc XRegisterIMInstantiateCallback*(para1: PDisplay, para2: PXrmHashBucketRec, + para3: cstring, para4: cstring, + para5: TXIDProc, para6: TXPointer): TBool{. + cdecl, dynlib: libX11, importc.} +proc XUnregisterIMInstantiateCallback*(para1: PDisplay, + para2: PXrmHashBucketRec, para3: cstring, + para4: cstring, para5: TXIDProc, + para6: TXPointer): TBool{.cdecl, + dynlib: libX11, importc.} +type + TXConnectionWatchProc* = proc (para1: PDisplay, para2: TXPointer, para3: cint, + para4: TBool, para5: PXPointer){.cdecl.} + +proc XInternalConnectionNumbers*(para1: PDisplay, para2: PPcint, para3: Pcint): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XProcessInternalConnection*(para1: PDisplay, para2: cint){.cdecl, + dynlib: libX11, importc.} +proc XAddConnectionWatch*(para1: PDisplay, para2: TXConnectionWatchProc, + para3: TXPointer): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XRemoveConnectionWatch*(para1: PDisplay, para2: TXConnectionWatchProc, + para3: TXPointer){.cdecl, dynlib: libX11, importc.} +proc XSetAuthorization*(para1: cstring, para2: cint, para3: cstring, para4: cint){. + cdecl, dynlib: libX11, importc.} + # + # _Xmbtowc? + # _Xwctomb? + # +when defined(MACROS): + proc ConnectionNumber*(dpy: PDisplay): cint + proc RootWindow*(dpy: PDisplay, scr: cint): TWindow + proc DefaultScreen*(dpy: PDisplay): cint + proc DefaultRootWindow*(dpy: PDisplay): TWindow + proc DefaultVisual*(dpy: PDisplay, scr: cint): PVisual + proc DefaultGC*(dpy: PDisplay, scr: cint): TGC + proc BlackPixel*(dpy: PDisplay, scr: cint): culong + proc WhitePixel*(dpy: PDisplay, scr: cint): culong + proc QLength*(dpy: PDisplay): cint + proc DisplayWidth*(dpy: PDisplay, scr: cint): cint + proc DisplayHeight*(dpy: PDisplay, scr: cint): cint + proc DisplayWidthMM*(dpy: PDisplay, scr: cint): cint + proc DisplayHeightMM*(dpy: PDisplay, scr: cint): cint + proc DisplayPlanes*(dpy: PDisplay, scr: cint): cint + proc DisplayCells*(dpy: PDisplay, scr: cint): cint + proc ScreenCount*(dpy: PDisplay): cint + proc ServerVendor*(dpy: PDisplay): cstring + proc ProtocolVersion*(dpy: PDisplay): cint + proc ProtocolRevision*(dpy: PDisplay): cint + proc VendorRelease*(dpy: PDisplay): cint + proc DisplayString*(dpy: PDisplay): cstring + proc DefaultDepth*(dpy: PDisplay, scr: cint): cint + proc DefaultColormap*(dpy: PDisplay, scr: cint): TColormap + proc BitmapUnit*(dpy: PDisplay): cint + proc BitmapBitOrder*(dpy: PDisplay): cint + proc BitmapPad*(dpy: PDisplay): cint + proc ImageByteOrder*(dpy: PDisplay): cint + proc NextRequest*(dpy: PDisplay): culong + proc LastKnownRequestProcessed*(dpy: PDisplay): culong + proc ScreenOfDisplay*(dpy: PDisplay, scr: cint): PScreen + proc DefaultScreenOfDisplay*(dpy: PDisplay): PScreen + proc DisplayOfScreen*(s: PScreen): PDisplay + proc RootWindowOfScreen*(s: PScreen): TWindow + proc BlackPixelOfScreen*(s: PScreen): culong + proc WhitePixelOfScreen*(s: PScreen): culong + proc DefaultColormapOfScreen*(s: PScreen): TColormap + proc DefaultDepthOfScreen*(s: PScreen): cint + proc DefaultGCOfScreen*(s: PScreen): TGC + proc DefaultVisualOfScreen*(s: PScreen): PVisual + proc WidthOfScreen*(s: PScreen): cint + proc HeightOfScreen*(s: PScreen): cint + proc WidthMMOfScreen*(s: PScreen): cint + proc HeightMMOfScreen*(s: PScreen): cint + proc PlanesOfScreen*(s: PScreen): cint + proc CellsOfScreen*(s: PScreen): cint + proc MinCmapsOfScreen*(s: PScreen): cint + proc MaxCmapsOfScreen*(s: PScreen): cint + proc DoesSaveUnders*(s: PScreen): TBool + proc DoesBackingStore*(s: PScreen): cint + proc EventMaskOfScreen*(s: PScreen): clong + proc XAllocID*(dpy: PDisplay): TXID +# implementation + +when defined(MACROS): + proc ConnectionNumber(dpy: PDisplay): cint = + ConnectionNumber = (PXPrivDisplay(dpy))^ .fd + + proc RootWindow(dpy: PDisplay, scr: cint): TWindow = + RootWindow = (ScreenOfDisplay(dpy, scr))^ .root + + proc DefaultScreen(dpy: PDisplay): cint = + DefaultScreen = (PXPrivDisplay(dpy))^ .default_screen + + proc DefaultRootWindow(dpy: PDisplay): TWindow = + DefaultRootWindow = (ScreenOfDisplay(dpy, DefaultScreen(dpy)))^ .root + + proc DefaultVisual(dpy: PDisplay, scr: cint): PVisual = + DefaultVisual = (ScreenOfDisplay(dpy, scr))^ .root_visual + + proc DefaultGC(dpy: PDisplay, scr: cint): TGC = + DefaultGC = (ScreenOfDisplay(dpy, scr))^ .default_gc + + proc BlackPixel(dpy: PDisplay, scr: cint): culong = + BlackPixel = (ScreenOfDisplay(dpy, scr))^ .black_pixel + + proc WhitePixel(dpy: PDisplay, scr: cint): culong = + WhitePixel = (ScreenOfDisplay(dpy, scr))^ .white_pixel + + proc QLength(dpy: PDisplay): cint = + QLength = (PXPrivDisplay(dpy))^ .qlen + + proc DisplayWidth(dpy: PDisplay, scr: cint): cint = + DisplayWidth = (ScreenOfDisplay(dpy, scr))^ .width + + proc DisplayHeight(dpy: PDisplay, scr: cint): cint = + DisplayHeight = (ScreenOfDisplay(dpy, scr))^ .height + + proc DisplayWidthMM(dpy: PDisplay, scr: cint): cint = + DisplayWidthMM = (ScreenOfDisplay(dpy, scr))^ .mwidth + + proc DisplayHeightMM(dpy: PDisplay, scr: cint): cint = + DisplayHeightMM = (ScreenOfDisplay(dpy, scr))^ .mheight + + proc DisplayPlanes(dpy: PDisplay, scr: cint): cint = + DisplayPlanes = (ScreenOfDisplay(dpy, scr))^ .root_depth + + proc DisplayCells(dpy: PDisplay, scr: cint): cint = + DisplayCells = (DefaultVisual(dpy, scr))^ .map_entries + + proc ScreenCount(dpy: PDisplay): cint = + ScreenCount = (PXPrivDisplay(dpy))^ .nscreens + + proc ServerVendor(dpy: PDisplay): cstring = + ServerVendor = (PXPrivDisplay(dpy))^ .vendor + + proc ProtocolVersion(dpy: PDisplay): cint = + ProtocolVersion = (PXPrivDisplay(dpy))^ .proto_major_version + + proc ProtocolRevision(dpy: PDisplay): cint = + ProtocolRevision = (PXPrivDisplay(dpy))^ .proto_minor_version + + proc VendorRelease(dpy: PDisplay): cint = + VendorRelease = (PXPrivDisplay(dpy))^ .release + + proc DisplayString(dpy: PDisplay): cstring = + DisplayString = (PXPrivDisplay(dpy))^ .display_name + + proc DefaultDepth(dpy: PDisplay, scr: cint): cint = + DefaultDepth = (ScreenOfDisplay(dpy, scr))^ .root_depth + + proc DefaultColormap(dpy: PDisplay, scr: cint): TColormap = + DefaultColormap = (ScreenOfDisplay(dpy, scr))^ .cmap + + proc BitmapUnit(dpy: PDisplay): cint = + BitmapUnit = (PXPrivDisplay(dpy))^ .bitmap_unit + + proc BitmapBitOrder(dpy: PDisplay): cint = + BitmapBitOrder = (PXPrivDisplay(dpy))^ .bitmap_bit_order + + proc BitmapPad(dpy: PDisplay): cint = + BitmapPad = (PXPrivDisplay(dpy))^ .bitmap_pad + + proc ImageByteOrder(dpy: PDisplay): cint = + ImageByteOrder = (PXPrivDisplay(dpy))^ .byte_order + + proc NextRequest(dpy: PDisplay): culong = + NextRequest = ((PXPrivDisplay(dpy))^ .request) + 1 + + proc LastKnownRequestProcessed(dpy: PDisplay): culong = + LastKnownRequestProcessed = (PXPrivDisplay(dpy))^ .last_request_read + + proc ScreenOfDisplay(dpy: PDisplay, scr: cint): PScreen = + ScreenOfDisplay = addr((((PXPrivDisplay(dpy))^ .screens)[scr])) + + proc DefaultScreenOfDisplay(dpy: PDisplay): PScreen = + DefaultScreenOfDisplay = ScreenOfDisplay(dpy, DefaultScreen(dpy)) + + proc DisplayOfScreen(s: PScreen): PDisplay = + DisplayOfScreen = s^ .display + + proc RootWindowOfScreen(s: PScreen): TWindow = + RootWindowOfScreen = s^ .root + + proc BlackPixelOfScreen(s: PScreen): culong = + BlackPixelOfScreen = s^ .black_pixel + + proc WhitePixelOfScreen(s: PScreen): culong = + WhitePixelOfScreen = s^ .white_pixel + + proc DefaultColormapOfScreen(s: PScreen): TColormap = + DefaultColormapOfScreen = s^ .cmap + + proc DefaultDepthOfScreen(s: PScreen): cint = + DefaultDepthOfScreen = s^ .root_depth + + proc DefaultGCOfScreen(s: PScreen): TGC = + DefaultGCOfScreen = s^ .default_gc + + proc DefaultVisualOfScreen(s: PScreen): PVisual = + DefaultVisualOfScreen = s^ .root_visual + + proc WidthOfScreen(s: PScreen): cint = + WidthOfScreen = s^ .width + + proc HeightOfScreen(s: PScreen): cint = + HeightOfScreen = s^ .height + + proc WidthMMOfScreen(s: PScreen): cint = + WidthMMOfScreen = s^ .mwidth + + proc HeightMMOfScreen(s: PScreen): cint = + HeightMMOfScreen = s^ .mheight + + proc PlanesOfScreen(s: PScreen): cint = + PlanesOfScreen = s^ .root_depth + + proc CellsOfScreen(s: PScreen): cint = + CellsOfScreen = (DefaultVisualOfScreen(s))^ .map_entries + + proc MinCmapsOfScreen(s: PScreen): cint = + MinCmapsOfScreen = s^ .min_maps + + proc MaxCmapsOfScreen(s: PScreen): cint = + MaxCmapsOfScreen = s^ .max_maps + + proc DoesSaveUnders(s: PScreen): TBool = + DoesSaveUnders = s^ .save_unders + + proc DoesBackingStore(s: PScreen): cint = + DoesBackingStore = s^ .backing_store + + proc EventMaskOfScreen(s: PScreen): clong = + EventMaskOfScreen = s^ .root_input_mask + + proc XAllocID(dpy: PDisplay): TXID = + XAllocID = (PXPrivDisplay(dpy))^ .resource_alloc(dpy) diff --git a/lib/oldwrappers/x11/xrandr.nim b/lib/oldwrappers/x11/xrandr.nim new file mode 100644 index 000000000..ee6f1705b --- /dev/null +++ b/lib/oldwrappers/x11/xrandr.nim @@ -0,0 +1,194 @@ +# +# $XFree86: xc/lib/Xrandr/Xrandr.h,v 1.9 2002/09/29 23:39:44 keithp Exp $ +# +# Copyright (C) 2000 Compaq Computer Corporation, Inc. +# Copyright (C) 2002 Hewlett-Packard Company, Inc. +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of Compaq not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. HP makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ +# BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +# OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +# Author: Jim Gettys, HP Labs, HP. +# + +import + x, xlib + +const + libXrandr* = "libXrandr.so" + +# * $XFree86: xc/include/extensions/randr.h,v 1.4 2001/11/24 07:24:58 keithp Exp $ +# * +# * Copyright (C) 2000, Compaq Computer Corporation, +# * Copyright (C) 2002, Hewlett Packard, Inc. +# * +# * Permission to use, copy, modify, distribute, and sell this software and its +# * documentation for any purpose is hereby granted without fee, provided that +# * the above copyright notice appear in all copies and that both that +# * copyright notice and this permission notice appear in supporting +# * documentation, and that the name of Compaq or HP not be used in advertising +# * or publicity pertaining to distribution of the software without specific, +# * written prior permission. HP makes no representations about the +# * suitability of this software for any purpose. It is provided "as is" +# * without express or implied warranty. +# * +# * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL +# * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HP +# * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +# * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +# * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# * +# * Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc. +# * + +type + PRotation* = ptr TRotation + TRotation* = cushort + PSizeID* = ptr TSizeID + TSizeID* = cushort + PSubpixelOrder* = ptr TSubpixelOrder + TSubpixelOrder* = cushort + +const + RANDR_NAME* = "RANDR" + RANDR_MAJOR* = 1 + RANDR_MINOR* = 1 + RRNumberErrors* = 0 + RRNumberEvents* = 1 + constX_RRQueryVersion* = 0 # we skip 1 to make old clients fail pretty immediately + X_RROldGetScreenInfo* = 1 + X_RR1_0SetScreenConfig* = 2 # V1.0 apps share the same set screen config request id + constX_RRSetScreenConfig* = 2 + X_RROldScreenChangeSelectInput* = 3 # 3 used to be ScreenChangeSelectInput; deprecated + constX_RRSelectInput* = 4 + constX_RRGetScreenInfo* = 5 # used in XRRSelectInput + RRScreenChangeNotifyMask* = 1 shl 0 + RRScreenChangeNotify* = 0 # used in the rotation field; rotation and reflection in 0.1 proto. + RR_Rotate_0* = 1 + RR_Rotate_90* = 2 + RR_Rotate_180* = 4 + RR_Rotate_270* = 8 # new in 1.0 protocol, to allow reflection of screen + RR_Reflect_X* = 16 + RR_Reflect_Y* = 32 + RRSetConfigSuccess* = 0 + RRSetConfigInvalidConfigTime* = 1 + RRSetConfigInvalidTime* = 2 + RRSetConfigFailed* = 3 + +type + PXRRScreenSize* = ptr TXRRScreenSize + TXRRScreenSize*{.final.} = object # + # Events. + # + width*, height*: cint + mwidth*, mheight*: cint + + TXRRScreenChangeNotifyEvent*{.final.} = object # internal representation is private to the library + typ*: cint # event base + serial*: culong # # of last request processed by server + send_event*: TBool # true if this came from a SendEvent request + display*: PDisplay # Display the event was read from + window*: TWindow # window which selected for this event + root*: TWindow # Root window for changed screen + timestamp*: TTime # when the screen change occurred + config_timestamp*: TTime # when the last configuration change + size_index*: TSizeID + subpixel_order*: TSubpixelOrder + rotation*: TRotation + width*: cint + height*: cint + mwidth*: cint + mheight*: cint + + PXRRScreenConfiguration* = ptr TXRRScreenConfiguration + TXRRScreenConfiguration*{.final.} = object + +proc XRRQueryExtension*(dpy: PDisplay, event_basep, error_basep: Pcint): TBool{. + cdecl, dynlib: libXrandr, importc.} +proc XRRQueryVersion*(dpy: PDisplay, major_versionp: Pcint, + minor_versionp: Pcint): TStatus{.cdecl, dynlib: libXrandr, + importc.} +proc XRRGetScreenInfo*(dpy: PDisplay, draw: TDrawable): PXRRScreenConfiguration{. + cdecl, dynlib: libXrandr, importc.} +proc XRRFreeScreenConfigInfo*(config: PXRRScreenConfiguration){.cdecl, + dynlib: libXrandr, importc.} + # + # Note that screen configuration changes are only permitted if the client can + # prove it has up to date configuration information. We are trying to + # insist that it become possible for screens to change dynamically, so + # we want to ensure the client knows what it is talking about when requesting + # changes. + # +proc XRRSetScreenConfig*(dpy: PDisplay, config: PXRRScreenConfiguration, + draw: TDrawable, size_index: cint, rotation: TRotation, + timestamp: TTime): TStatus{.cdecl, dynlib: libXrandr, + importc.} + # added in v1.1, sorry for the lame name +proc XRRSetScreenConfigAndRate*(dpy: PDisplay, config: PXRRScreenConfiguration, + draw: TDrawable, size_index: cint, + rotation: TRotation, rate: cshort, + timestamp: TTime): TStatus{.cdecl, + dynlib: libXrandr, importc.} +proc XRRConfigRotations*(config: PXRRScreenConfiguration, + current_rotation: PRotation): TRotation{.cdecl, + dynlib: libXrandr, importc.} +proc XRRConfigTimes*(config: PXRRScreenConfiguration, config_timestamp: PTime): TTime{. + cdecl, dynlib: libXrandr, importc.} +proc XRRConfigSizes*(config: PXRRScreenConfiguration, nsizes: Pcint): PXRRScreenSize{. + cdecl, dynlib: libXrandr, importc.} +proc XRRConfigRates*(config: PXRRScreenConfiguration, sizeID: cint, + nrates: Pcint): ptr int16{.cdecl, dynlib: libXrandr, importc.} +proc XRRConfigCurrentConfiguration*(config: PXRRScreenConfiguration, + rotation: PRotation): TSizeID{.cdecl, + dynlib: libXrandr, importc.} +proc XRRConfigCurrentRate*(config: PXRRScreenConfiguration): cshort{.cdecl, + dynlib: libXrandr, importc.} +proc XRRRootToScreen*(dpy: PDisplay, root: TWindow): cint{.cdecl, + dynlib: libXrandr, importc.} + # + # returns the screen configuration for the specified screen; does a lazy + # evalution to delay getting the information, and caches the result. + # These routines should be used in preference to XRRGetScreenInfo + # to avoid unneeded round trips to the X server. These are new + # in protocol version 0.1. + # +proc XRRScreenConfig*(dpy: PDisplay, screen: cint): PXRRScreenConfiguration{. + cdecl, dynlib: libXrandr, importc.} +proc XRRConfig*(screen: PScreen): PXRRScreenConfiguration{.cdecl, + dynlib: libXrandr, importc.} +proc XRRSelectInput*(dpy: PDisplay, window: TWindow, mask: cint){.cdecl, + dynlib: libXrandr, importc.} + # + # the following are always safe to call, even if RandR is not implemented + # on a screen + # +proc XRRRotations*(dpy: PDisplay, screen: cint, current_rotation: PRotation): TRotation{. + cdecl, dynlib: libXrandr, importc.} +proc XRRSizes*(dpy: PDisplay, screen: cint, nsizes: Pcint): PXRRScreenSize{. + cdecl, dynlib: libXrandr, importc.} +proc XRRRates*(dpy: PDisplay, screen: cint, sizeID: cint, nrates: Pcint): ptr int16{. + cdecl, dynlib: libXrandr, importc.} +proc XRRTimes*(dpy: PDisplay, screen: cint, config_timestamp: PTime): TTime{. + cdecl, dynlib: libXrandr, importc.} + # + # intended to take RRScreenChangeNotify, or + # ConfigureNotify (on the root window) + # returns 1 if it is an event type it understands, 0 if not + # +proc XRRUpdateConfiguration*(event: PXEvent): cint{.cdecl, dynlib: libXrandr, + importc.} +# implementation diff --git a/lib/oldwrappers/x11/xrender.nim b/lib/oldwrappers/x11/xrender.nim new file mode 100644 index 000000000..7b85fc9a7 --- /dev/null +++ b/lib/oldwrappers/x11/xrender.nim @@ -0,0 +1,231 @@ + +import + x, xlib + +#const +# libX11* = "libX11.so" + +# +# Automatically converted by H2Pas 0.99.15 from xrender.h +# The following command line parameters were used: +# -p +# -T +# -S +# -d +# -c +# xrender.h +# + +type + PGlyph* = ptr TGlyph + TGlyph* = int32 + PGlyphSet* = ptr TGlyphSet + TGlyphSet* = int32 + PPicture* = ptr TPicture + TPicture* = int32 + PPictFormat* = ptr TPictFormat + TPictFormat* = int32 + +const + RENDER_NAME* = "RENDER" + RENDER_MAJOR* = 0 + RENDER_MINOR* = 0 + constX_RenderQueryVersion* = 0 + X_RenderQueryPictFormats* = 1 + X_RenderQueryPictIndexValues* = 2 + X_RenderQueryDithers* = 3 + constX_RenderCreatePicture* = 4 + constX_RenderChangePicture* = 5 + X_RenderSetPictureClipRectangles* = 6 + constX_RenderFreePicture* = 7 + constX_RenderComposite* = 8 + X_RenderScale* = 9 + X_RenderTrapezoids* = 10 + X_RenderTriangles* = 11 + X_RenderTriStrip* = 12 + X_RenderTriFan* = 13 + X_RenderColorTrapezoids* = 14 + X_RenderColorTriangles* = 15 + X_RenderTransform* = 16 + constX_RenderCreateGlyphSet* = 17 + constX_RenderReferenceGlyphSet* = 18 + constX_RenderFreeGlyphSet* = 19 + constX_RenderAddGlyphs* = 20 + constX_RenderAddGlyphsFromPicture* = 21 + constX_RenderFreeGlyphs* = 22 + constX_RenderCompositeGlyphs8* = 23 + constX_RenderCompositeGlyphs16* = 24 + constX_RenderCompositeGlyphs32* = 25 + BadPictFormat* = 0 + BadPicture* = 1 + BadPictOp* = 2 + BadGlyphSet* = 3 + BadGlyph* = 4 + RenderNumberErrors* = BadGlyph + 1 + PictTypeIndexed* = 0 + PictTypeDirect* = 1 + PictOpClear* = 0 + PictOpSrc* = 1 + PictOpDst* = 2 + PictOpOver* = 3 + PictOpOverReverse* = 4 + PictOpIn* = 5 + PictOpInReverse* = 6 + PictOpOut* = 7 + PictOpOutReverse* = 8 + PictOpAtop* = 9 + PictOpAtopReverse* = 10 + PictOpXor* = 11 + PictOpAdd* = 12 + PictOpSaturate* = 13 + PictOpMaximum* = 13 + PolyEdgeSharp* = 0 + PolyEdgeSmooth* = 1 + PolyModePrecise* = 0 + PolyModeImprecise* = 1 + CPRepeat* = 1 shl 0 + CPAlphaMap* = 1 shl 1 + CPAlphaXOrigin* = 1 shl 2 + CPAlphaYOrigin* = 1 shl 3 + CPClipXOrigin* = 1 shl 4 + CPClipYOrigin* = 1 shl 5 + CPClipMask* = 1 shl 6 + CPGraphicsExposure* = 1 shl 7 + CPSubwindowMode* = 1 shl 8 + CPPolyEdge* = 1 shl 9 + CPPolyMode* = 1 shl 10 + CPDither* = 1 shl 11 + CPLastBit* = 11 + +type + PXRenderDirectFormat* = ptr TXRenderDirectFormat + TXRenderDirectFormat*{.final.} = object + red*: int16 + redMask*: int16 + green*: int16 + greenMask*: int16 + blue*: int16 + blueMask*: int16 + alpha*: int16 + alphaMask*: int16 + + PXRenderPictFormat* = ptr TXRenderPictFormat + TXRenderPictFormat*{.final.} = object + id*: TPictFormat + thetype*: int32 + depth*: int32 + direct*: TXRenderDirectFormat + colormap*: TColormap + + +const + PictFormatID* = 1 shl 0 + PictFormatType* = 1 shl 1 + PictFormatDepth* = 1 shl 2 + PictFormatRed* = 1 shl 3 + PictFormatRedMask* = 1 shl 4 + PictFormatGreen* = 1 shl 5 + PictFormatGreenMask* = 1 shl 6 + PictFormatBlue* = 1 shl 7 + PictFormatBlueMask* = 1 shl 8 + PictFormatAlpha* = 1 shl 9 + PictFormatAlphaMask* = 1 shl 10 + PictFormatColormap* = 1 shl 11 + +type + PXRenderVisual* = ptr TXRenderVisual + TXRenderVisual*{.final.} = object + visual*: PVisual + format*: PXRenderPictFormat + + PXRenderDepth* = ptr TXRenderDepth + TXRenderDepth*{.final.} = object + depth*: int32 + nvisuals*: int32 + visuals*: PXRenderVisual + + PXRenderScreen* = ptr TXRenderScreen + TXRenderScreen*{.final.} = object + depths*: PXRenderDepth + ndepths*: int32 + fallback*: PXRenderPictFormat + + PXRenderInfo* = ptr TXRenderInfo + TXRenderInfo*{.final.} = object + format*: PXRenderPictFormat + nformat*: int32 + screen*: PXRenderScreen + nscreen*: int32 + depth*: PXRenderDepth + ndepth*: int32 + visual*: PXRenderVisual + nvisual*: int32 + + PXRenderPictureAttributes* = ptr TXRenderPictureAttributes + TXRenderPictureAttributes*{.final.} = object + repeat*: TBool + alpha_map*: TPicture + alpha_x_origin*: int32 + alpha_y_origin*: int32 + clip_x_origin*: int32 + clip_y_origin*: int32 + clip_mask*: TPixmap + graphics_exposures*: TBool + subwindow_mode*: int32 + poly_edge*: int32 + poly_mode*: int32 + dither*: TAtom + + PXGlyphInfo* = ptr TXGlyphInfo + TXGlyphInfo*{.final.} = object + width*: int16 + height*: int16 + x*: int16 + y*: int16 + xOff*: int16 + yOff*: int16 + + +proc XRenderQueryExtension*(dpy: PDisplay, event_basep: ptr int32, + error_basep: ptr int32): TBool{.cdecl, + dynlib: libX11, importc.} +proc XRenderQueryVersion*(dpy: PDisplay, major_versionp: ptr int32, + minor_versionp: ptr int32): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XRenderQueryFormats*(dpy: PDisplay): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XRenderFindVisualFormat*(dpy: PDisplay, visual: PVisual): PXRenderPictFormat{. + cdecl, dynlib: libX11, importc.} +proc XRenderFindFormat*(dpy: PDisplay, mask: int32, + `template`: PXRenderPictFormat, count: int32): PXRenderPictFormat{. + cdecl, dynlib: libX11, importc.} +proc XRenderCreatePicture*(dpy: PDisplay, drawable: TDrawable, + format: PXRenderPictFormat, valuemask: int32, + attributes: PXRenderPictureAttributes): TPicture{. + cdecl, dynlib: libX11, importc.} +proc XRenderChangePicture*(dpy: PDisplay, picture: TPicture, valuemask: int32, + attributes: PXRenderPictureAttributes){.cdecl, + dynlib: libX11, importc.} +proc XRenderFreePicture*(dpy: PDisplay, picture: TPicture){.cdecl, + dynlib: libX11, importc.} +proc XRenderComposite*(dpy: PDisplay, op: int32, src: TPicture, mask: TPicture, + dst: TPicture, src_x: int32, src_y: int32, mask_x: int32, + mask_y: int32, dst_x: int32, dst_y: int32, width: int32, + height: int32){.cdecl, dynlib: libX11, importc.} +proc XRenderCreateGlyphSet*(dpy: PDisplay, format: PXRenderPictFormat): TGlyphSet{. + cdecl, dynlib: libX11, importc.} +proc XRenderReferenceGlyphSet*(dpy: PDisplay, existing: TGlyphSet): TGlyphSet{. + cdecl, dynlib: libX11, importc.} +proc XRenderFreeGlyphSet*(dpy: PDisplay, glyphset: TGlyphSet){.cdecl, + dynlib: libX11, importc.} +proc XRenderAddGlyphs*(dpy: PDisplay, glyphset: TGlyphSet, gids: PGlyph, + glyphs: PXGlyphInfo, nglyphs: int32, images: cstring, + nbyte_images: int32){.cdecl, dynlib: libX11, importc.} +proc XRenderFreeGlyphs*(dpy: PDisplay, glyphset: TGlyphSet, gids: PGlyph, + nglyphs: int32){.cdecl, dynlib: libX11, importc.} +proc XRenderCompositeString8*(dpy: PDisplay, op: int32, src: TPicture, + dst: TPicture, maskFormat: PXRenderPictFormat, + glyphset: TGlyphSet, xSrc: int32, ySrc: int32, + xDst: int32, yDst: int32, str: cstring, + nchar: int32){.cdecl, dynlib: libX11, importc.} +# implementation diff --git a/lib/oldwrappers/x11/xresource.nim b/lib/oldwrappers/x11/xresource.nim new file mode 100644 index 000000000..ddb2a89c2 --- /dev/null +++ b/lib/oldwrappers/x11/xresource.nim @@ -0,0 +1,200 @@ + +import + x, xlib + +#const +# libX11* = "libX11.so" + +# +# Automatically converted by H2Pas 0.99.15 from xresource.h +# The following command line parameters were used: +# -p +# -T +# -S +# -d +# -c +# xresource.h +# + +proc Xpermalloc*(para1: int32): cstring{.cdecl, dynlib: libX11, importc.} +type + PXrmQuark* = ptr TXrmQuark + TXrmQuark* = int32 + TXrmQuarkList* = PXrmQuark + PXrmQuarkList* = ptr TXrmQuarkList + +proc NULLQUARK*(): TXrmQuark +type + PXrmString* = ptr TXrmString + TXrmString* = ptr char + +proc NULLSTRING*(): TXrmString +proc XrmStringToQuark*(para1: cstring): TXrmQuark{.cdecl, dynlib: libX11, + importc.} +proc XrmPermStringToQuark*(para1: cstring): TXrmQuark{.cdecl, dynlib: libX11, + importc.} +proc XrmQuarkToString*(para1: TXrmQuark): TXrmString{.cdecl, dynlib: libX11, + importc.} +proc XrmUniqueQuark*(): TXrmQuark{.cdecl, dynlib: libX11, importc.} +when defined(MACROS): + proc XrmStringsEqual*(a1, a2: cstring): bool +type + PXrmBinding* = ptr TXrmBinding + TXrmBinding* = enum + XrmBindTightly, XrmBindLoosely + TXrmBindingList* = PXrmBinding + PXrmBindingList* = ptr TXrmBindingList + +proc XrmStringToQuarkList*(para1: cstring, para2: TXrmQuarkList){.cdecl, + dynlib: libX11, importc.} +proc XrmStringToBindingQuarkList*(para1: cstring, para2: TXrmBindingList, + para3: TXrmQuarkList){.cdecl, dynlib: libX11, + importc.} +type + PXrmName* = ptr TXrmName + TXrmName* = TXrmQuark + PXrmNameList* = ptr TXrmNameList + TXrmNameList* = TXrmQuarkList + +when defined(MACROS): + proc XrmNameToString*(name: int32): TXrmString + proc XrmStringToName*(str: cstring): int32 + proc XrmStringToNameList*(str: cstring, name: PXrmQuark) +type + PXrmClass* = ptr TXrmClass + TXrmClass* = TXrmQuark + PXrmClassList* = ptr TXrmClassList + TXrmClassList* = TXrmQuarkList + +when defined(MACROS): + proc XrmClassToString*(c_class: int32): TXrmString + proc XrmStringToClass*(c_class: cstring): int32 + proc XrmStringToClassList*(str: cstring, c_class: PXrmQuark) +type + PXrmRepresentation* = ptr TXrmRepresentation + TXrmRepresentation* = TXrmQuark + +when defined(MACROS): + proc XrmStringToRepresentation*(str: cstring): int32 + proc XrmRepresentationToString*(thetype: int32): TXrmString +type + PXrmValue* = ptr TXrmValue + TXrmValue*{.final.} = object + size*: int32 + address*: TXPointer + + TXrmValuePtr* = PXrmValue + PXrmValuePtr* = ptr TXrmValuePtr + PXrmHashBucketRec* = ptr TXrmHashBucketRec + TXrmHashBucketRec*{.final.} = object + TXrmHashBucket* = PXrmHashBucketRec + PXrmHashBucket* = ptr TXrmHashBucket + PXrmHashTable* = ptr TXrmHashTable + TXrmHashTable* = ptr TXrmHashBucket + TXrmDatabase* = PXrmHashBucketRec + PXrmDatabase* = ptr TXrmDatabase + +proc XrmDestroyDatabase*(para1: TXrmDatabase){.cdecl, dynlib: libX11, importc.} +proc XrmQPutResource*(para1: PXrmDatabase, para2: TXrmBindingList, + para3: TXrmQuarkList, para4: TXrmRepresentation, + para5: PXrmValue){.cdecl, dynlib: libX11, importc.} +proc XrmPutResource*(para1: PXrmDatabase, para2: cstring, para3: cstring, + para4: PXrmValue){.cdecl, dynlib: libX11, importc.} +proc XrmQPutStringResource*(para1: PXrmDatabase, para2: TXrmBindingList, + para3: TXrmQuarkList, para4: cstring){.cdecl, + dynlib: libX11, importc.} +proc XrmPutStringResource*(para1: PXrmDatabase, para2: cstring, para3: cstring){. + cdecl, dynlib: libX11, importc.} +proc XrmPutLineResource*(para1: PXrmDatabase, para2: cstring){.cdecl, + dynlib: libX11, importc.} +proc XrmQGetResource*(para1: TXrmDatabase, para2: TXrmNameList, + para3: TXrmClassList, para4: PXrmRepresentation, + para5: PXrmValue): TBool{.cdecl, dynlib: libX11, importc.} +proc XrmGetResource*(para1: TXrmDatabase, para2: cstring, para3: cstring, + para4: PPchar, para5: PXrmValue): TBool{.cdecl, + dynlib: libX11, importc.} + # There is no definition of TXrmSearchList + #function XrmQGetSearchList(para1:TXrmDatabase; para2:TXrmNameList; para3:TXrmClassList; para4:TXrmSearchList; para5:longint):TBool;cdecl;external libX11; + #function XrmQGetSearchResource(para1:TXrmSearchList; para2:TXrmName; para3:TXrmClass; para4:PXrmRepresentation; para5:PXrmValue):TBool;cdecl;external libX11; +proc XrmSetDatabase*(para1: PDisplay, para2: TXrmDatabase){.cdecl, + dynlib: libX11, importc.} +proc XrmGetDatabase*(para1: PDisplay): TXrmDatabase{.cdecl, dynlib: libX11, + importc.} +proc XrmGetFileDatabase*(para1: cstring): TXrmDatabase{.cdecl, dynlib: libX11, + importc.} +proc XrmCombineFileDatabase*(para1: cstring, para2: PXrmDatabase, para3: TBool): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XrmGetStringDatabase*(para1: cstring): TXrmDatabase{.cdecl, dynlib: libX11, + importc.} +proc XrmPutFileDatabase*(para1: TXrmDatabase, para2: cstring){.cdecl, + dynlib: libX11, importc.} +proc XrmMergeDatabases*(para1: TXrmDatabase, para2: PXrmDatabase){.cdecl, + dynlib: libX11, importc.} +proc XrmCombineDatabase*(para1: TXrmDatabase, para2: PXrmDatabase, para3: TBool){. + cdecl, dynlib: libX11, importc.} +const + XrmEnumAllLevels* = 0 + XrmEnumOneLevel* = 1 + +type + funcbool* = proc (): TBool + +proc XrmEnumerateDatabase*(para1: TXrmDatabase, para2: TXrmNameList, + para3: TXrmClassList, para4: int32, para5: funcbool, + para6: TXPointer): TBool{.cdecl, dynlib: libX11, + importc.} +proc XrmLocaleOfDatabase*(para1: TXrmDatabase): cstring{.cdecl, dynlib: libX11, + importc.} +type + PXrmOptionKind* = ptr TXrmOptionKind + TXrmOptionKind* = enum + XrmoptionNoArg, XrmoptionIsArg, XrmoptionStickyArg, XrmoptionSepArg, + XrmoptionResArg, XrmoptionSkipArg, XrmoptionSkipLine, XrmoptionSkipNArgs + PXrmOptionDescRec* = ptr TXrmOptionDescRec + TXrmOptionDescRec*{.final.} = object + option*: cstring + specifier*: cstring + argKind*: TXrmOptionKind + value*: TXPointer + + TXrmOptionDescList* = PXrmOptionDescRec + PXrmOptionDescList* = ptr TXrmOptionDescList + +proc XrmParseCommand*(para1: PXrmDatabase, para2: TXrmOptionDescList, + para3: int32, para4: cstring, para5: ptr int32, + para6: PPchar){.cdecl, dynlib: libX11, importc.} +# implementation + +proc NULLQUARK(): TXrmQuark = + result = TXrmQuark(0) + +proc NULLSTRING(): TXrmString = + result = nil + +when defined(MACROS): + proc XrmStringsEqual(a1, a2: cstring): bool = + result = (strcomp(a1, a2)) == 0 + + proc XrmNameToString(name: int32): TXrmString = + result = XrmQuarkToString(name) + + proc XrmStringToName(str: cstring): int32 = + result = XrmStringToQuark(str) + + proc XrmStringToNameList(str: cstring, name: PXrmQuark) = + XrmStringToQuarkList(str, name) + + proc XrmClassToString(c_class: int32): TXrmString = + result = XrmQuarkToString(c_class) + + proc XrmStringToClass(c_class: cstring): int32 = + result = XrmStringToQuark(c_class) + + proc XrmStringToClassList(str: cstring, c_class: PXrmQuark) = + XrmStringToQuarkList(str, c_class) + + proc XrmStringToRepresentation(str: cstring): int32 = + result = XrmStringToQuark(str) + + proc XrmRepresentationToString(thetype: int32): TXrmString = + result = XrmQuarkToString(thetype) diff --git a/lib/oldwrappers/x11/xshm.nim b/lib/oldwrappers/x11/xshm.nim new file mode 100644 index 000000000..e56bd87b1 --- /dev/null +++ b/lib/oldwrappers/x11/xshm.nim @@ -0,0 +1,77 @@ + +import + x, xlib + +#const +# libX11* = "libX11.so" + +# +# Automatically converted by H2Pas 0.99.15 from xshm.h +# The following command line parameters were used: +# -p +# -T +# -S +# -d +# -c +# xshm.h +# + +const + constX_ShmQueryVersion* = 0 + constX_ShmAttach* = 1 + constX_ShmDetach* = 2 + constX_ShmPutImage* = 3 + constX_ShmGetImage* = 4 + constX_ShmCreatePixmap* = 5 + ShmCompletion* = 0 + ShmNumberEvents* = ShmCompletion + 1 + BadShmSeg* = 0 + ShmNumberErrors* = BadShmSeg + 1 + +type + PShmSeg* = ptr TShmSeg + TShmSeg* = culong + PXShmCompletionEvent* = ptr TXShmCompletionEvent + TXShmCompletionEvent*{.final.} = object + theType*: cint + serial*: culong + send_event*: TBool + display*: PDisplay + drawable*: TDrawable + major_code*: cint + minor_code*: cint + shmseg*: TShmSeg + offset*: culong + + PXShmSegmentInfo* = ptr TXShmSegmentInfo + TXShmSegmentInfo*{.final.} = object + shmseg*: TShmSeg + shmid*: cint + shmaddr*: cstring + readOnly*: TBool + + +proc XShmQueryExtension*(para1: PDisplay): TBool{.cdecl, dynlib: libX11, importc.} +proc XShmGetEventBase*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XShmQueryVersion*(para1: PDisplay, para2: Pcint, para3: Pcint, para4: PBool): TBool{. + cdecl, dynlib: libX11, importc.} +proc XShmPixmapFormat*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.} +proc XShmAttach*(para1: PDisplay, para2: PXShmSegmentInfo): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XShmDetach*(para1: PDisplay, para2: PXShmSegmentInfo): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XShmPutImage*(para1: PDisplay, para2: TDrawable, para3: TGC, + para4: PXImage, para5: cint, para6: cint, para7: cint, + para8: cint, para9: cuint, para10: cuint, para11: TBool): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XShmGetImage*(para1: PDisplay, para2: TDrawable, para3: PXImage, + para4: cint, para5: cint, para6: culong): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XShmCreateImage*(para1: PDisplay, para2: PVisual, para3: cuint, + para4: cint, para5: cstring, para6: PXShmSegmentInfo, + para7: cuint, para8: cuint): PXImage{.cdecl, + dynlib: libX11, importc.} +proc XShmCreatePixmap*(para1: PDisplay, para2: TDrawable, para3: cstring, + para4: PXShmSegmentInfo, para5: cuint, para6: cuint, + para7: cuint): TPixmap{.cdecl, dynlib: libX11, importc.} +# implementation diff --git a/lib/oldwrappers/x11/xutil.nim b/lib/oldwrappers/x11/xutil.nim new file mode 100644 index 000000000..563702123 --- /dev/null +++ b/lib/oldwrappers/x11/xutil.nim @@ -0,0 +1,412 @@ + +import + x, xlib, keysym + +#const +# libX11* = "libX11.so" + +# +# Automatically converted by H2Pas 0.99.15 from xutil.h +# The following command line parameters were used: +# -p +# -T +# -S +# -d +# -c +# xutil.h +# + +const + NoValue* = 0x00000000 + XValue* = 0x00000001 + YValue* = 0x00000002 + WidthValue* = 0x00000004 + HeightValue* = 0x00000008 + AllValues* = 0x0000000F + XNegative* = 0x00000010 + YNegative* = 0x00000020 + +type + TCPoint*{.final.} = object + x*: cint + y*: cint + + PXSizeHints* = ptr TXSizeHints + TXSizeHints*{.final.} = object + flags*: clong + x*, y*: cint + width*, height*: cint + min_width*, min_height*: cint + max_width*, max_height*: cint + width_inc*, height_inc*: cint + min_aspect*, max_aspect*: TCPoint + base_width*, base_height*: cint + win_gravity*: cint + + +const + USPosition* = 1 shl 0 + USSize* = 1 shl 1 + PPosition* = 1 shl 2 + PSize* = 1 shl 3 + PMinSize* = 1 shl 4 + PMaxSize* = 1 shl 5 + PResizeInc* = 1 shl 6 + PAspect* = 1 shl 7 + PBaseSize* = 1 shl 8 + PWinGravity* = 1 shl 9 + PAllHints* = PPosition or PSize or PMinSize or PMaxSize or PResizeInc or + PAspect + +type + PXWMHints* = ptr TXWMHints + TXWMHints*{.final.} = object + flags*: clong + input*: TBool + initial_state*: cint + icon_pixmap*: TPixmap + icon_window*: TWindow + icon_x*, icon_y*: cint + icon_mask*: TPixmap + window_group*: TXID + + +const + InputHint* = 1 shl 0 + StateHint* = 1 shl 1 + IconPixmapHint* = 1 shl 2 + IconWindowHint* = 1 shl 3 + IconPositionHint* = 1 shl 4 + IconMaskHint* = 1 shl 5 + WindowGroupHint* = 1 shl 6 + AllHints* = InputHint or StateHint or IconPixmapHint or IconWindowHint or + IconPositionHint or IconMaskHint or WindowGroupHint + XUrgencyHint* = 1 shl 8 + WithdrawnState* = 0 + NormalState* = 1 + IconicState* = 3 + DontCareState* = 0 + ZoomState* = 2 + InactiveState* = 4 + +type + PXTextProperty* = ptr TXTextProperty + TXTextProperty*{.final.} = object + value*: pcuchar + encoding*: TAtom + format*: cint + nitems*: culong + + +const + XNoMemory* = - 1 + XLocaleNotSupported* = - 2 + XConverterNotFound* = - 3 + +type + PXICCEncodingStyle* = ptr TXICCEncodingStyle + TXICCEncodingStyle* = enum + XStringStyle, XCompoundTextStyle, XTextStyle, XStdICCTextStyle, + XUTF8StringStyle + PPXIconSize* = ptr PXIconSize + PXIconSize* = ptr TXIconSize + TXIconSize*{.final.} = object + min_width*, min_height*: cint + max_width*, max_height*: cint + width_inc*, height_inc*: cint + + PXClassHint* = ptr TXClassHint + TXClassHint*{.final.} = object + res_name*: cstring + res_class*: cstring + + +type + PXComposeStatus* = ptr TXComposeStatus + TXComposeStatus*{.final.} = object + compose_ptr*: TXPointer + chars_matched*: cint + + +type + PXRegion* = ptr TXRegion + TXRegion*{.final.} = object + TRegion* = PXRegion + PRegion* = ptr TRegion + +const + RectangleOut* = 0 + RectangleIn* = 1 + RectanglePart* = 2 + +type + PXVisualInfo* = ptr TXVisualInfo + TXVisualInfo*{.final.} = object + visual*: PVisual + visualid*: TVisualID + screen*: cint + depth*: cint + class*: cint + red_mask*: culong + green_mask*: culong + blue_mask*: culong + colormap_size*: cint + bits_per_rgb*: cint + + +const + VisualNoMask* = 0x00000000 + VisualIDMask* = 0x00000001 + VisualScreenMask* = 0x00000002 + VisualDepthMask* = 0x00000004 + VisualClassMask* = 0x00000008 + VisualRedMaskMask* = 0x00000010 + VisualGreenMaskMask* = 0x00000020 + VisualBlueMaskMask* = 0x00000040 + VisualColormapSizeMask* = 0x00000080 + VisualBitsPerRGBMask* = 0x00000100 + VisualAllMask* = 0x000001FF + +type + PPXStandardColormap* = ptr PXStandardColormap + PXStandardColormap* = ptr TXStandardColormap + TXStandardColormap*{.final.} = object + colormap*: TColormap + red_max*: culong + red_mult*: culong + green_max*: culong + green_mult*: culong + blue_max*: culong + blue_mult*: culong + base_pixel*: culong + visualid*: TVisualID + killid*: TXID + + +const + BitmapSuccess* = 0 + BitmapOpenFailed* = 1 + BitmapFileInvalid* = 2 + BitmapNoMemory* = 3 + XCSUCCESS* = 0 + XCNOMEM* = 1 + XCNOENT* = 2 + ReleaseByFreeingColormap*: TXID = TXID(1) + +type + PXContext* = ptr TXContext + TXContext* = cint + +proc XAllocClassHint*(): PXClassHint{.cdecl, dynlib: libX11, importc.} +proc XAllocIconSize*(): PXIconSize{.cdecl, dynlib: libX11, importc.} +proc XAllocSizeHints*(): PXSizeHints{.cdecl, dynlib: libX11, importc.} +proc XAllocStandardColormap*(): PXStandardColormap{.cdecl, dynlib: libX11, + importc.} +proc XAllocWMHints*(): PXWMHints{.cdecl, dynlib: libX11, importc.} +proc XClipBox*(para1: TRegion, para2: PXRectangle): cint{.cdecl, dynlib: libX11, + importc.} +proc XCreateRegion*(): TRegion{.cdecl, dynlib: libX11, importc.} +proc XDefaultString*(): cstring{.cdecl, dynlib: libX11, importc.} +proc XDeleteContext*(para1: PDisplay, para2: TXID, para3: TXContext): cint{. + cdecl, dynlib: libX11, importc.} +proc XDestroyRegion*(para1: TRegion): cint{.cdecl, dynlib: libX11, importc.} +proc XEmptyRegion*(para1: TRegion): cint{.cdecl, dynlib: libX11, importc.} +proc XEqualRegion*(para1: TRegion, para2: TRegion): cint{.cdecl, dynlib: libX11, + importc.} +proc XFindContext*(para1: PDisplay, para2: TXID, para3: TXContext, + para4: PXPointer): cint{.cdecl, dynlib: libX11, importc.} +proc XGetClassHint*(para1: PDisplay, para2: TWindow, para3: PXClassHint): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XGetIconSizes*(para1: PDisplay, para2: TWindow, para3: PPXIconSize, + para4: Pcint): TStatus{.cdecl, dynlib: libX11, importc.} +proc XGetNormalHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XGetRGBColormaps*(para1: PDisplay, para2: TWindow, + para3: PPXStandardColormap, para4: Pcint, para5: TAtom): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XGetSizeHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints, + para4: TAtom): TStatus{.cdecl, dynlib: libX11, importc.} +proc XGetStandardColormap*(para1: PDisplay, para2: TWindow, + para3: PXStandardColormap, para4: TAtom): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XGetTextProperty*(para1: PDisplay, para2: TWindow, para3: PXTextProperty, + para4: TAtom): TStatus{.cdecl, dynlib: libX11, importc.} +proc XGetVisualInfo*(para1: PDisplay, para2: clong, para3: PXVisualInfo, + para4: Pcint): PXVisualInfo{.cdecl, dynlib: libX11, importc.} +proc XGetWMClientMachine*(para1: PDisplay, para2: TWindow, para3: PXTextProperty): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XGetWMHints*(para1: PDisplay, para2: TWindow): PXWMHints{.cdecl, + dynlib: libX11, importc.} +proc XGetWMIconName*(para1: PDisplay, para2: TWindow, para3: PXTextProperty): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XGetWMName*(para1: PDisplay, para2: TWindow, para3: PXTextProperty): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XGetWMNormalHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints, + para4: ptr int): TStatus{.cdecl, dynlib: libX11, importc.} +proc XGetWMSizeHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints, + para4: ptr int, para5: TAtom): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XGetZoomHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints): TStatus{. + cdecl, dynlib: libX11, importc.} +proc XIntersectRegion*(para1: TRegion, para2: TRegion, para3: TRegion): cint{. + cdecl, dynlib: libX11, importc.} +proc XConvertCase*(para1: TKeySym, para2: PKeySym, para3: PKeySym){.cdecl, + dynlib: libX11, importc.} +proc XLookupString*(para1: PXKeyEvent, para2: cstring, para3: cint, + para4: PKeySym, para5: PXComposeStatus): cint{.cdecl, + dynlib: libX11, importc.} +proc XMatchVisualInfo*(para1: PDisplay, para2: cint, para3: cint, para4: cint, + para5: PXVisualInfo): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XOffsetRegion*(para1: TRegion, para2: cint, para3: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XPointInRegion*(para1: TRegion, para2: cint, para3: cint): TBool{.cdecl, + dynlib: libX11, importc.} +proc XPolygonRegion*(para1: PXPoint, para2: cint, para3: cint): TRegion{.cdecl, + dynlib: libX11, importc.} +proc XRectInRegion*(para1: TRegion, para2: cint, para3: cint, para4: cuint, + para5: cuint): cint{.cdecl, dynlib: libX11, importc.} +proc XSaveContext*(para1: PDisplay, para2: TXID, para3: TXContext, + para4: cstring): cint{.cdecl, dynlib: libX11, importc.} +proc XSetClassHint*(para1: PDisplay, para2: TWindow, para3: PXClassHint): cint{. + cdecl, dynlib: libX11, importc.} +proc XSetIconSizes*(para1: PDisplay, para2: TWindow, para3: PXIconSize, + para4: cint): cint{.cdecl, dynlib: libX11, importc.} +proc XSetNormalHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints): cint{. + cdecl, dynlib: libX11, importc.} +proc XSetRGBColormaps*(para1: PDisplay, para2: TWindow, + para3: PXStandardColormap, para4: cint, para5: TAtom){. + cdecl, dynlib: libX11, importc.} +proc XSetSizeHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints, + para4: TAtom): cint{.cdecl, dynlib: libX11, importc.} +proc XSetStandardProperties*(para1: PDisplay, para2: TWindow, para3: cstring, + para4: cstring, para5: TPixmap, para6: PPchar, + para7: cint, para8: PXSizeHints): cint{.cdecl, + dynlib: libX11, importc.} +proc XSetTextProperty*(para1: PDisplay, para2: TWindow, para3: PXTextProperty, + para4: TAtom){.cdecl, dynlib: libX11, importc.} +proc XSetWMClientMachine*(para1: PDisplay, para2: TWindow, para3: PXTextProperty){. + cdecl, dynlib: libX11, importc.} +proc XSetWMHints*(para1: PDisplay, para2: TWindow, para3: PXWMHints): cint{. + cdecl, dynlib: libX11, importc.} +proc XSetWMIconName*(para1: PDisplay, para2: TWindow, para3: PXTextProperty){. + cdecl, dynlib: libX11, importc.} +proc XSetWMName*(para1: PDisplay, para2: TWindow, para3: PXTextProperty){.cdecl, + dynlib: libX11, importc.} +proc XSetWMNormalHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints){. + cdecl, dynlib: libX11, importc.} +proc XSetWMProperties*(para1: PDisplay, para2: TWindow, para3: PXTextProperty, + para4: PXTextProperty, para5: PPchar, para6: cint, + para7: PXSizeHints, para8: PXWMHints, para9: PXClassHint){. + cdecl, dynlib: libX11, importc.} +proc XmbSetWMProperties*(para1: PDisplay, para2: TWindow, para3: cstring, + para4: cstring, para5: PPchar, para6: cint, + para7: PXSizeHints, para8: PXWMHints, + para9: PXClassHint){.cdecl, dynlib: libX11, importc.} +proc Xutf8SetWMProperties*(para1: PDisplay, para2: TWindow, para3: cstring, + para4: cstring, para5: PPchar, para6: cint, + para7: PXSizeHints, para8: PXWMHints, + para9: PXClassHint){.cdecl, dynlib: libX11, importc.} +proc XSetWMSizeHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints, + para4: TAtom){.cdecl, dynlib: libX11, importc.} +proc XSetRegion*(para1: PDisplay, para2: TGC, para3: TRegion): cint{.cdecl, + dynlib: libX11, importc.} +proc XSetStandardColormap*(para1: PDisplay, para2: TWindow, + para3: PXStandardColormap, para4: TAtom){.cdecl, + dynlib: libX11, importc.} +proc XSetZoomHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints): cint{. + cdecl, dynlib: libX11, importc.} +proc XShrinkRegion*(para1: TRegion, para2: cint, para3: cint): cint{.cdecl, + dynlib: libX11, importc.} +proc XStringListToTextProperty*(para1: PPchar, para2: cint, + para3: PXTextProperty): TStatus{.cdecl, + dynlib: libX11, importc.} +proc XSubtractRegion*(para1: TRegion, para2: TRegion, para3: TRegion): cint{. + cdecl, dynlib: libX11, importc.} +proc XmbTextListToTextProperty*(para1: PDisplay, para2: PPchar, para3: cint, + para4: TXICCEncodingStyle, para5: PXTextProperty): cint{. + cdecl, dynlib: libX11, importc.} +proc XwcTextListToTextProperty*(para1: PDisplay, para2: ptr ptr int16, para3: cint, + para4: TXICCEncodingStyle, para5: PXTextProperty): cint{. + cdecl, dynlib: libX11, importc.} +proc Xutf8TextListToTextProperty*(para1: PDisplay, para2: PPchar, para3: cint, + para4: TXICCEncodingStyle, + para5: PXTextProperty): cint{.cdecl, + dynlib: libX11, importc.} +proc XwcFreeStringList*(para1: ptr ptr int16){.cdecl, dynlib: libX11, importc.} +proc XTextPropertyToStringList*(para1: PXTextProperty, para2: PPPchar, + para3: Pcint): TStatus{.cdecl, dynlib: libX11, + importc.} +proc XmbTextPropertyToTextList*(para1: PDisplay, para2: PXTextProperty, + para3: PPPchar, para4: Pcint): cint{.cdecl, + dynlib: libX11, importc.} +proc XwcTextPropertyToTextList*(para1: PDisplay, para2: PXTextProperty, + para3: ptr ptr ptr int16, para4: Pcint): cint{.cdecl, + dynlib: libX11, importc.} +proc Xutf8TextPropertyToTextList*(para1: PDisplay, para2: PXTextProperty, + para3: PPPchar, para4: Pcint): cint{.cdecl, + dynlib: libX11, importc.} +proc XUnionRectWithRegion*(para1: PXRectangle, para2: TRegion, para3: TRegion): cint{. + cdecl, dynlib: libX11, importc.} +proc XUnionRegion*(para1: TRegion, para2: TRegion, para3: TRegion): cint{.cdecl, + dynlib: libX11, importc.} +proc XWMGeometry*(para1: PDisplay, para2: cint, para3: cstring, para4: cstring, + para5: cuint, para6: PXSizeHints, para7: Pcint, para8: Pcint, + para9: Pcint, para10: Pcint, para11: Pcint): cint{.cdecl, + dynlib: libX11, importc.} +proc XXorRegion*(para1: TRegion, para2: TRegion, para3: TRegion): cint{.cdecl, + dynlib: libX11, importc.} +when defined(MACROS): + proc XDestroyImage*(ximage: PXImage): cint + proc XGetPixel*(ximage: PXImage, x, y: cint): culong + proc XPutPixel*(ximage: PXImage, x, y: cint, pixel: culong): cint + proc XSubImage*(ximage: PXImage, x, y: cint, width, height: cuint): PXImage + proc XAddPixel*(ximage: PXImage, value: clong): cint + proc IsKeypadKey*(keysym: TKeySym): bool + proc IsPrivateKeypadKey*(keysym: TKeySym): bool + proc IsCursorKey*(keysym: TKeySym): bool + proc IsPFKey*(keysym: TKeySym): bool + proc IsFunctionKey*(keysym: TKeySym): bool + proc IsMiscFunctionKey*(keysym: TKeySym): bool + proc IsModifierKey*(keysym: TKeySym): bool + #function XUniqueContext : TXContext; + #function XStringToContext(_string : Pchar) : TXContext; +# implementation + +when defined(MACROS): + proc XDestroyImage(ximage: PXImage): cint = + XDestroyImage = ximage^ .f.destroy_image(ximage) + + proc XGetPixel(ximage: PXImage, x, y: cint): culong = + XGetPixel = ximage^ .f.get_pixel(ximage, x, y) + + proc XPutPixel(ximage: PXImage, x, y: cint, pixel: culong): cint = + XPutPixel = ximage^ .f.put_pixel(ximage, x, y, pixel) + + proc XSubImage(ximage: PXImage, x, y: cint, width, height: cuint): PXImage = + XSubImage = ximage^ .f.sub_image(ximage, x, y, width, height) + + proc XAddPixel(ximage: PXImage, value: clong): cint = + XAddPixel = ximage^ .f.add_pixel(ximage, value) + + proc IsKeypadKey(keysym: TKeySym): bool = + IsKeypadKey = (keysym >= XK_KP_Space) and (keysym <= XK_KP_Equal) + + proc IsPrivateKeypadKey(keysym: TKeySym): bool = + IsPrivateKeypadKey = (keysym >= 0x11000000) and (keysym <= 0x1100FFFF) + + proc IsCursorKey(keysym: TKeySym): bool = + IsCursorKey = (keysym >= XK_Home) and (keysym < XK_Select) + + proc IsPFKey(keysym: TKeySym): bool = + IsPFKey = (keysym >= XK_KP_F1) and (keysym <= XK_KP_F4) + + proc IsFunctionKey(keysym: TKeySym): bool = + IsFunctionKey = (keysym >= XK_F1) and (keysym <= XK_F35) + + proc IsMiscFunctionKey(keysym: TKeySym): bool = + IsMiscFunctionKey = (keysym >= XK_Select) and (keysym <= XK_Break) + + proc IsModifierKey(keysym: TKeySym): bool = + IsModifierKey = ((keysym >= XK_Shift_L) And (keysym <= XK_Hyper_R)) Or + (keysym == XK_Mode_switch) Or (keysym == XK_Num_Lock) diff --git a/lib/oldwrappers/x11/xv.nim b/lib/oldwrappers/x11/xv.nim new file mode 100644 index 000000000..45ab61418 --- /dev/null +++ b/lib/oldwrappers/x11/xv.nim @@ -0,0 +1,84 @@ +#*********************************************************** +#Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, +#and the Massachusetts Institute of Technology, Cambridge, Massachusetts. +# +# All Rights Reserved +# +#Permission to use, copy, modify, and distribute this software and its +#documentation for any purpose and without fee is hereby granted, +#provided that the above copyright notice appear in all copies and that +#both that copyright notice and this permission notice appear in +#supporting documentation, and that the names of Digital or MIT not be +#used in advertising or publicity pertaining to distribution of the +#software without specific, written prior permission. +# +#DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +#ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +#DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +#ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +#WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +#ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# +#****************************************************************** +# $XFree86: xc/include/extensions/Xv.h,v 1.3 1999/05/23 06:33:22 dawes Exp $ + +import + x + +const + XvName* = "libXVideo.so" + XvVersion* = 2 + XvRevision* = 2 # Symbols + +type + TXvPortID* = TXID + TXvEncodingID* = TXID + +const + XvNone* = 0 + XvInput* = 0 + XvOutput* = 1 + XvInputMask* = 1 shl XvInput + XvOutputMask* = 1 shl XvOutput + XvVideoMask* = 0x00000004 + XvStillMask* = 0x00000008 + XvImageMask* = 0x00000010 # These two are not client viewable + XvPixmapMask* = 0x00010000 + XvWindowMask* = 0x00020000 + XvGettable* = 0x00000001 + XvSettable* = 0x00000002 + XvRGB* = 0 + XvYUV* = 1 + XvPacked* = 0 + XvPlanar* = 1 + XvTopToBottom* = 0 + XvBottomToTop* = 1 # Events + XvVideoNotify* = 0 + XvPortNotify* = 1 + XvNumEvents* = 2 # Video Notify Reasons + XvStarted* = 0 + XvStopped* = 1 + XvBusy* = 2 + XvPreempted* = 3 + XvHardError* = 4 + XvLastReason* = 4 + XvNumReasons* = XvLastReason + 1 + XvStartedMask* = 1 shl XvStarted + XvStoppedMask* = 1 shl XvStopped + XvBusyMask* = 1 shl XvBusy + XvPreemptedMask* = 1 shl XvPreempted + XvHardErrorMask* = 1 shl XvHardError + XvAnyReasonMask* = (1 shl XvNumReasons) - 1 + XvNoReasonMask* = 0 # Errors + XvBadPort* = 0 + XvBadEncoding* = 1 + XvBadControl* = 2 + XvNumErrors* = 3 # Status + XvBadExtension* = 1 + XvAlreadyGrabbed* = 2 + XvInvalidTime* = 3 + XvBadReply* = 4 + XvBadAlloc* = 5 + +# implementation diff --git a/lib/oldwrappers/x11/xvlib.nim b/lib/oldwrappers/x11/xvlib.nim new file mode 100644 index 000000000..19fd0d000 --- /dev/null +++ b/lib/oldwrappers/x11/xvlib.nim @@ -0,0 +1,234 @@ +#*********************************************************** +#Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, +#and the Massachusetts Institute of Technology, Cambridge, Massachusetts. +# +# All Rights Reserved +# +#Permission to use, copy, modify, and distribute this software and its +#documentation for any purpose and without fee is hereby granted, +#provided that the above copyright notice appear in all copies and that +#both that copyright notice and this permission notice appear in +#supporting documentation, and that the names of Digital or MIT not be +#used in advertising or publicity pertaining to distribution of the +#software without specific, written prior permission. +# +#DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +#ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +#DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +#ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +#WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +#ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +#SOFTWARE. +# +#****************************************************************** +# $XFree86: xc/include/extensions/Xvlib.h,v 1.3 1999/12/11 19:28:48 mvojkovi Exp $ +#* +#** File: +#** +#** Xvlib.h --- Xv library public header file +#** +#** Author: +#** +#** David Carver (Digital Workstation Engineering/Project Athena) +#** +#** Revisions: +#** +#** 26.06.91 Carver +#** - changed XvFreeAdaptors to XvFreeAdaptorInfo +#** - changed XvFreeEncodings to XvFreeEncodingInfo +#** +#** 11.06.91 Carver +#** - changed SetPortControl to SetPortAttribute +#** - changed GetPortControl to GetPortAttribute +#** - changed QueryBestSize +#** +#** 05.15.91 Carver +#** - version 2.0 upgrade +#** +#** 01.24.91 Carver +#** - version 1.4 upgrade +#** +#* + +import + x, xlib, xshm, xv + +const + libXv* = "libXv.so" + +type + PXvRational* = ptr TXvRational + TXvRational*{.final.} = object + numerator*: cint + denominator*: cint + + PXvAttribute* = ptr TXvAttribute + TXvAttribute*{.final.} = object + flags*: cint # XvGettable, XvSettable + min_value*: cint + max_value*: cint + name*: cstring + + PPXvEncodingInfo* = ptr PXvEncodingInfo + PXvEncodingInfo* = ptr TXvEncodingInfo + TXvEncodingInfo*{.final.} = object + encoding_id*: TXvEncodingID + name*: cstring + width*: culong + height*: culong + rate*: TXvRational + num_encodings*: culong + + PXvFormat* = ptr TXvFormat + TXvFormat*{.final.} = object + depth*: cchar + visual_id*: culong + + PPXvAdaptorInfo* = ptr PXvAdaptorInfo + PXvAdaptorInfo* = ptr TXvAdaptorInfo + TXvAdaptorInfo*{.final.} = object + base_id*: TXvPortID + num_ports*: culong + thetype*: cchar + name*: cstring + num_formats*: culong + formats*: PXvFormat + num_adaptors*: culong + + PXvVideoNotifyEvent* = ptr TXvVideoNotifyEvent + TXvVideoNotifyEvent*{.final.} = object + theType*: cint + serial*: culong # # of last request processed by server + send_event*: TBool # true if this came from a SendEvent request + display*: PDisplay # Display the event was read from + drawable*: TDrawable # drawable + reason*: culong # what generated this event + port_id*: TXvPortID # what port + time*: TTime # milliseconds + + PXvPortNotifyEvent* = ptr TXvPortNotifyEvent + TXvPortNotifyEvent*{.final.} = object + theType*: cint + serial*: culong # # of last request processed by server + send_event*: TBool # true if this came from a SendEvent request + display*: PDisplay # Display the event was read from + port_id*: TXvPortID # what port + time*: TTime # milliseconds + attribute*: TAtom # atom that identifies attribute + value*: clong # value of attribute + + PXvEvent* = ptr TXvEvent + TXvEvent*{.final.} = object + pad*: array[0..23, clong] #case longint of + # 0 : ( + # theType : cint; + # ); + # 1 : ( + # xvvideo : TXvVideoNotifyEvent; + # ); + # 2 : ( + # xvport : TXvPortNotifyEvent; + # ); + # 3 : ( + # + # ); + + PXvImageFormatValues* = ptr TXvImageFormatValues + TXvImageFormatValues*{.final.} = object + id*: cint # Unique descriptor for the format + theType*: cint # XvRGB, XvYUV + byte_order*: cint # LSBFirst, MSBFirst + guid*: array[0..15, cchar] # Globally Unique IDentifier + bits_per_pixel*: cint + format*: cint # XvPacked, XvPlanar + num_planes*: cint # for RGB formats only + depth*: cint + red_mask*: cuint + green_mask*: cuint + blue_mask*: cuint # for YUV formats only + y_sample_bits*: cuint + u_sample_bits*: cuint + v_sample_bits*: cuint + horz_y_period*: cuint + horz_u_period*: cuint + horz_v_period*: cuint + vert_y_period*: cuint + vert_u_period*: cuint + vert_v_period*: cuint + component_order*: array[0..31, char] # eg. UYVY + scanline_order*: cint # XvTopToBottom, XvBottomToTop + + PXvImage* = ptr TXvImage + TXvImage*{.final.} = object + id*: cint + width*, height*: cint + data_size*: cint # bytes + num_planes*: cint + pitches*: pcint # bytes + offsets*: pcint # bytes + data*: pointer + obdata*: TXPointer + + +proc XvQueryExtension*(display: PDisplay, p_version, p_revision, p_requestBase, + p_eventBase, p_errorBase: pcuint): cint{.cdecl, dynlib: libXv, importc.} +proc XvQueryAdaptors*(display: PDisplay, window: TWindow, p_nAdaptors: pcuint, + p_pAdaptors: PPXvAdaptorInfo): cint{.cdecl, dynlib: libXv, + importc.} +proc XvQueryEncodings*(display: PDisplay, port: TXvPortID, p_nEncoding: pcuint, + p_pEncoding: PPXvEncodingInfo): cint{.cdecl, + dynlib: libXv, importc.} +proc XvPutVideo*(display: PDisplay, port: TXvPortID, d: TDrawable, gc: TGC, + vx, vy: cint, vw, vh: cuint, dx, dy: cint, dw, dh: cuint): cint{. + cdecl, dynlib: libXv, importc.} +proc XvPutStill*(display: PDisplay, port: TXvPortID, d: TDrawable, gc: TGC, + vx, vy: cint, vw, vh: cuint, dx, dy: cint, dw, dh: cuint): cint{. + cdecl, dynlib: libXv, importc.} +proc XvGetVideo*(display: PDisplay, port: TXvPortID, d: TDrawable, gc: TGC, + vx, vy: cint, vw, vh: cuint, dx, dy: cint, dw, dh: cuint): cint{. + cdecl, dynlib: libXv, importc.} +proc XvGetStill*(display: PDisplay, port: TXvPortID, d: TDrawable, gc: TGC, + vx, vy: cint, vw, vh: cuint, dx, dy: cint, dw, dh: cuint): cint{. + cdecl, dynlib: libXv, importc.} +proc XvStopVideo*(display: PDisplay, port: TXvPortID, drawable: TDrawable): cint{. + cdecl, dynlib: libXv, importc.} +proc XvGrabPort*(display: PDisplay, port: TXvPortID, time: TTime): cint{.cdecl, + dynlib: libXv, importc.} +proc XvUngrabPort*(display: PDisplay, port: TXvPortID, time: TTime): cint{. + cdecl, dynlib: libXv, importc.} +proc XvSelectVideoNotify*(display: PDisplay, drawable: TDrawable, onoff: TBool): cint{. + cdecl, dynlib: libXv, importc.} +proc XvSelectPortNotify*(display: PDisplay, port: TXvPortID, onoff: TBool): cint{. + cdecl, dynlib: libXv, importc.} +proc XvSetPortAttribute*(display: PDisplay, port: TXvPortID, attribute: TAtom, + value: cint): cint{.cdecl, dynlib: libXv, importc.} +proc XvGetPortAttribute*(display: PDisplay, port: TXvPortID, attribute: TAtom, + p_value: pcint): cint{.cdecl, dynlib: libXv, importc.} +proc XvQueryBestSize*(display: PDisplay, port: TXvPortID, motion: TBool, + vid_w, vid_h, drw_w, drw_h: cuint, + p_actual_width, p_actual_height: pcuint): cint{.cdecl, + dynlib: libXv, importc.} +proc XvQueryPortAttributes*(display: PDisplay, port: TXvPortID, number: pcint): PXvAttribute{. + cdecl, dynlib: libXv, importc.} +proc XvFreeAdaptorInfo*(adaptors: PXvAdaptorInfo){.cdecl, dynlib: libXv, importc.} +proc XvFreeEncodingInfo*(encodings: PXvEncodingInfo){.cdecl, dynlib: libXv, + importc.} +proc XvListImageFormats*(display: PDisplay, port_id: TXvPortID, + count_return: pcint): PXvImageFormatValues{.cdecl, + dynlib: libXv, importc.} +proc XvCreateImage*(display: PDisplay, port: TXvPortID, id: cint, data: pointer, + width, height: cint): PXvImage{.cdecl, dynlib: libXv, + importc.} +proc XvPutImage*(display: PDisplay, id: TXvPortID, d: TDrawable, gc: TGC, + image: PXvImage, src_x, src_y: cint, src_w, src_h: cuint, + dest_x, dest_y: cint, dest_w, dest_h: cuint): cint{.cdecl, + dynlib: libXv, importc.} +proc XvShmPutImage*(display: PDisplay, id: TXvPortID, d: TDrawable, gc: TGC, + image: PXvImage, src_x, src_y: cint, src_w, src_h: cuint, + dest_x, dest_y: cint, dest_w, dest_h: cuint, + send_event: TBool): cint{.cdecl, dynlib: libXv, importc.} +proc XvShmCreateImage*(display: PDisplay, port: TXvPortID, id: cint, + data: pointer, width, height: cint, + shminfo: PXShmSegmentInfo): PXvImage{.cdecl, + dynlib: libXv, importc.} +# implementation diff --git a/lib/oldwrappers/zip/libzip.nim b/lib/oldwrappers/zip/libzip.nim new file mode 100644 index 000000000..2f8abc46c --- /dev/null +++ b/lib/oldwrappers/zip/libzip.nim @@ -0,0 +1,241 @@ +# +# +# Nimrod's Runtime Library +# (c) Copyright 2008 Andreas Rumpf +# +# See the file "copying.txt", included in this +# distribution, for details about the copyright. +# + +## Interface to the `libzip <http://www.nih.at/libzip/index.html>`_ library by +## Dieter Baron and Thomas Klausner. However, this does not need any external +## library (DLL, lib*.so), as the source for this library is included and +## compiled with this interface. + +# +# zip.h -- exported declarations. +# Copyright (C) 1999-2008 Dieter Baron and Thomas Klausner +# +# This file is part of libzip, a library to manipulate ZIP archives. +# The authors can be contacted at <libzip@nih.at> +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. The names of the authors may not be used to endorse or promote +# products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS +# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +import times + +{.compile: "libzip_all.c".} +when defined(unix): + {.passl: "-lz".} + +type + Tzip_source_cmd* = int32 + + Tzip_source_callback* = proc (state: pointer, data: pointer, length: int, + cmd: Tzip_source_cmd): int {.cdecl.} + Pzip_stat* = ptr Tzip_stat + Tzip_stat* {.final, pure.} = object + name*: cstring ## name of the file + index*: int32 ## index within archive + crc*: int32 ## crc of file data + mtime*: TTime ## modification time + size*: int ## size of file (uncompressed) + comp_size*: int ## size of file (compressed) + comp_method*: int16 ## compression method used + encryption_method*: int16 ## encryption method used + + Tzip {.final, pure.} = object + Tzip_source {.final, pure.} = object + Tzip_file {.final, pure.} = object + + Pzip* = ptr Tzip ## represents a zip archive + Pzip_file* = ptr Tzip_file ## represents a file within an archive + Pzip_source* = ptr Tzip_source ## represents a source for an archive + + +# flags for zip_name_locate, zip_fopen, zip_stat, ... +const + ZIP_CREATE* = 1'i32 + ZIP_EXCL* = 2'i32 + ZIP_CHECKCONS* = 4'i32 + ZIP_FL_NOCASE* = 1'i32 ## ignore case on name lookup + ZIP_FL_NODIR* = 2'i32 ## ignore directory component + ZIP_FL_COMPRESSED* = 4'i32 ## read compressed data + ZIP_FL_UNCHANGED* = 8'i32 ## use original data, ignoring changes + ZIP_FL_RECOMPRESS* = 16'i32 ## force recompression of data + +const # archive global flags flags + ZIP_AFL_TORRENT* = 1'i32 ## torrent zipped + +const # libzip error codes + ZIP_ER_OK* = 0'i32 ## N No error + ZIP_ER_MULTIDISK* = 1'i32 ## N Multi-disk zip archives not supported + ZIP_ER_RENAME* = 2'i32 ## S Renaming temporary file failed + ZIP_ER_CLOSE* = 3'i32 ## S Closing zip archive failed + ZIP_ER_SEEK* = 4'i32 ## S Seek error + ZIP_ER_READ* = 5'i32 ## S Read error + ZIP_ER_WRITE* = 6'i32 ## S Write error + ZIP_ER_CRC* = 7'i32 ## N CRC error + ZIP_ER_ZIPCLOSED* = 8'i32 ## N Containing zip archive was closed + ZIP_ER_NOENT* = 9'i32 ## N No such file + ZIP_ER_EXISTS* = 10'i32 ## N File already exists + ZIP_ER_OPEN* = 11'i32 ## S Can't open file + ZIP_ER_TMPOPEN* = 12'i32 ## S Failure to create temporary file + ZIP_ER_ZLIB* = 13'i32 ## Z Zlib error + ZIP_ER_MEMORY* = 14'i32 ## N Malloc failure + ZIP_ER_CHANGED* = 15'i32 ## N Entry has been changed + ZIP_ER_COMPNOTSUPP* = 16'i32 ## N Compression method not supported + ZIP_ER_EOF* = 17'i32 ## N Premature EOF + ZIP_ER_INVAL* = 18'i32 ## N Invalid argument + ZIP_ER_NOZIP* = 19'i32 ## N Not a zip archive + ZIP_ER_INTERNAL* = 20'i32 ## N Internal error + ZIP_ER_INCONS* = 21'i32 ## N Zip archive inconsistent + ZIP_ER_REMOVE* = 22'i32 ## S Can't remove file + ZIP_ER_DELETED* = 23'i32 ## N Entry has been deleted + +const # type of system error value + ZIP_ET_NONE* = 0'i32 ## sys_err unused + ZIP_ET_SYS* = 1'i32 ## sys_err is errno + ZIP_ET_ZLIB* = 2'i32 ## sys_err is zlib error code + +const # compression methods + ZIP_CM_DEFAULT* = -1'i32 ## better of deflate or store + ZIP_CM_STORE* = 0'i32 ## stored (uncompressed) + ZIP_CM_SHRINK* = 1'i32 ## shrunk + ZIP_CM_REDUCE_1* = 2'i32 ## reduced with factor 1 + ZIP_CM_REDUCE_2* = 3'i32 ## reduced with factor 2 + ZIP_CM_REDUCE_3* = 4'i32 ## reduced with factor 3 + ZIP_CM_REDUCE_4* = 5'i32 ## reduced with factor 4 + ZIP_CM_IMPLODE* = 6'i32 ## imploded + ## 7 - Reserved for Tokenizing compression algorithm + ZIP_CM_DEFLATE* = 8'i32 ## deflated + ZIP_CM_DEFLATE64* = 9'i32 ## deflate64 + ZIP_CM_PKWARE_IMPLODE* = 10'i32 ## PKWARE imploding + ## 11 - Reserved by PKWARE + ZIP_CM_BZIP2* = 12'i32 ## compressed using BZIP2 algorithm + ## 13 - Reserved by PKWARE + ZIP_CM_LZMA* = 14'i32 ## LZMA (EFS) + ## 15-17 - Reserved by PKWARE + ZIP_CM_TERSE* = 18'i32 ## compressed using IBM TERSE (new) + ZIP_CM_LZ77* = 19'i32 ## IBM LZ77 z Architecture (PFS) + ZIP_CM_WAVPACK* = 97'i32 ## WavPack compressed data + ZIP_CM_PPMD* = 98'i32 ## PPMd version I, Rev 1 + +const # encryption methods + ZIP_EM_NONE* = 0'i32 ## not encrypted + ZIP_EM_TRAD_PKWARE* = 1'i32 ## traditional PKWARE encryption + +const + ZIP_EM_UNKNOWN* = 0x0000FFFF'i32 ## unknown algorithm + +const + ZIP_SOURCE_OPEN* = 0'i32 ## prepare for reading + ZIP_SOURCE_READ* = 1'i32 ## read data + ZIP_SOURCE_CLOSE* = 2'i32 ## reading is done + ZIP_SOURCE_STAT* = 3'i32 ## get meta information + ZIP_SOURCE_ERROR* = 4'i32 ## get error information + constZIP_SOURCE_FREE* = 5'i32 ## cleanup and free resources + +proc zip_add*(para1: Pzip, para2: cstring, para3: Pzip_source): int32 {.cdecl, + importc: "zip_add".} +proc zip_add_dir*(para1: Pzip, para2: cstring): int32 {.cdecl, + importc: "zip_add_dir".} +proc zip_close*(para1: Pzip) {.cdecl, importc: "zip_close".} +proc zip_delete*(para1: Pzip, para2: int32): int32 {.cdecl, + importc: "zip_delete".} +proc zip_error_clear*(para1: Pzip) {.cdecl, importc: "zip_error_clear".} +proc zip_error_get*(para1: Pzip, para2: ptr int32, para3: ptr int32) {.cdecl, + importc: "zip_error_get".} +proc zip_error_get_sys_type*(para1: int32): int32 {.cdecl, + importc: "zip_error_get_sys_type".} +proc zip_error_to_str*(para1: cstring, para2: int, para3: int32, + para4: int32): int32 {.cdecl, + importc: "zip_error_to_str".} +proc zip_fclose*(para1: Pzip_file) {.cdecl, + importc: "zip_fclose".} +proc zip_file_error_clear*(para1: Pzip_file) {.cdecl, + importc: "zip_file_error_clear".} +proc zip_file_error_get*(para1: Pzip_file, para2: ptr int32, para3: ptr int32) {. + cdecl, importc: "zip_file_error_get".} +proc zip_file_strerror*(para1: Pzip_file): cstring {.cdecl, + importc: "zip_file_strerror".} +proc zip_fopen*(para1: Pzip, para2: cstring, para3: int32): Pzip_file {.cdecl, + importc: "zip_fopen".} +proc zip_fopen_index*(para1: Pzip, para2: int32, para3: int32): Pzip_file {. + cdecl, importc: "zip_fopen_index".} +proc zip_fread*(para1: Pzip_file, para2: pointer, para3: int): int {. + cdecl, importc: "zip_fread".} +proc zip_get_archive_comment*(para1: Pzip, para2: ptr int32, para3: int32): cstring {. + cdecl, importc: "zip_get_archive_comment".} +proc zip_get_archive_flag*(para1: Pzip, para2: int32, para3: int32): int32 {. + cdecl, importc: "zip_get_archive_flag".} +proc zip_get_file_comment*(para1: Pzip, para2: int32, para3: ptr int32, + para4: int32): cstring {.cdecl, + importc: "zip_get_file_comment".} +proc zip_get_name*(para1: Pzip, para2: int32, para3: int32): cstring {.cdecl, + importc: "zip_get_name".} +proc zip_get_num_files*(para1: Pzip): int32 {.cdecl, + importc: "zip_get_num_files".} +proc zip_name_locate*(para1: Pzip, para2: cstring, para3: int32): int32 {.cdecl, + importc: "zip_name_locate".} +proc zip_open*(para1: cstring, para2: int32, para3: ptr int32): Pzip {.cdecl, + importc: "zip_open".} +proc zip_rename*(para1: Pzip, para2: int32, para3: cstring): int32 {.cdecl, + importc: "zip_rename".} +proc zip_replace*(para1: Pzip, para2: int32, para3: Pzip_source): int32 {.cdecl, + importc: "zip_replace".} +proc zip_set_archive_comment*(para1: Pzip, para2: cstring, para3: int32): int32 {. + cdecl, importc: "zip_set_archive_comment".} +proc zip_set_archive_flag*(para1: Pzip, para2: int32, para3: int32): int32 {. + cdecl, importc: "zip_set_archive_flag".} +proc zip_set_file_comment*(para1: Pzip, para2: int32, para3: cstring, + para4: int32): int32 {.cdecl, + importc: "zip_set_file_comment".} +proc zip_source_buffer*(para1: Pzip, para2: pointer, para3: int, para4: int32): Pzip_source {. + cdecl, importc: "zip_source_buffer".} +proc zip_source_file*(para1: Pzip, para2: cstring, para3: int, para4: int): Pzip_source {. + cdecl, importc: "zip_source_file".} +proc zip_source_filep*(para1: Pzip, para2: TFile, para3: int, para4: int): Pzip_source {. + cdecl, importc: "zip_source_filep".} +proc zip_source_free*(para1: Pzip_source) {.cdecl, + importc: "zip_source_free".} +proc zip_source_function*(para1: Pzip, para2: Tzip_source_callback, + para3: pointer): Pzip_source {.cdecl, + importc: "zip_source_function".} +proc zip_source_zip*(para1: Pzip, para2: Pzip, para3: int32, para4: int32, + para5: int, para6: int): Pzip_source {.cdecl, + importc: "zip_source_zip".} +proc zip_stat*(para1: Pzip, para2: cstring, para3: int32, para4: Pzip_stat): int32 {. + cdecl, importc: "zip_stat".} +proc zip_stat_index*(para1: Pzip, para2: int32, para3: int32, para4: Pzip_stat): int32 {. + cdecl, importc: "zip_stat_index".} +proc zip_stat_init*(para1: Pzip_stat) {.cdecl, importc: "zip_stat_init".} +proc zip_strerror*(para1: Pzip): cstring {.cdecl, importc: "zip_strerror".} +proc zip_unchange*(para1: Pzip, para2: int32): int32 {.cdecl, + importc: "zip_unchange".} +proc zip_unchange_all*(para1: Pzip): int32 {.cdecl, importc: "zip_unchange_all".} +proc zip_unchange_archive*(para1: Pzip): int32 {.cdecl, + importc: "zip_unchange_archive".} diff --git a/lib/oldwrappers/zip/zlib.nim b/lib/oldwrappers/zip/zlib.nim new file mode 100644 index 000000000..9b49b9663 --- /dev/null +++ b/lib/oldwrappers/zip/zlib.nim @@ -0,0 +1,181 @@ +# Converted from Pascal + +## Interface to the zlib http://www.zlib.net/ compression library. + +when defined(windows): + const libz = "zlib1.dll" +elif defined(macosx): + const libz = "libz.dylib" +else: + const libz = "libz.so" + +type + Uint* = int32 + Ulong* = int + Ulongf* = int + Pulongf* = ptr Ulongf + z_off_t* = int32 + pbyte* = cstring + pbytef* = cstring + TAllocfunc* = proc (p: pointer, items: uInt, size: uInt): pointer{.cdecl.} + TFreeFunc* = proc (p: pointer, address: pointer){.cdecl.} + TInternalState*{.final, pure.} = object + PInternalState* = ptr TInternalstate + TZStream*{.final, pure.} = object + next_in*: pbytef + avail_in*: uInt + total_in*: uLong + next_out*: pbytef + avail_out*: uInt + total_out*: uLong + msg*: pbytef + state*: PInternalState + zalloc*: TAllocFunc + zfree*: TFreeFunc + opaque*: pointer + data_type*: int32 + adler*: uLong + reserved*: uLong + + TZStreamRec* = TZStream + PZstream* = ptr TZStream + gzFile* = pointer + +const + Z_NO_FLUSH* = 0 + Z_PARTIAL_FLUSH* = 1 + Z_SYNC_FLUSH* = 2 + Z_FULL_FLUSH* = 3 + Z_FINISH* = 4 + Z_OK* = 0 + Z_STREAM_END* = 1 + Z_NEED_DICT* = 2 + Z_ERRNO* = -1 + Z_STREAM_ERROR* = -2 + Z_DATA_ERROR* = -3 + Z_MEM_ERROR* = -4 + Z_BUF_ERROR* = -5 + Z_VERSION_ERROR* = -6 + Z_NO_COMPRESSION* = 0 + Z_BEST_SPEED* = 1 + Z_BEST_COMPRESSION* = 9 + Z_DEFAULT_COMPRESSION* = -1 + Z_FILTERED* = 1 + Z_HUFFMAN_ONLY* = 2 + Z_DEFAULT_STRATEGY* = 0 + Z_BINARY* = 0 + Z_ASCII* = 1 + Z_UNKNOWN* = 2 + Z_DEFLATED* = 8 + Z_NULL* = 0 + +proc zlibVersion*(): cstring{.cdecl, dynlib: libz, importc: "zlibVersion".} +proc deflate*(strm: var TZStream, flush: int32): int32{.cdecl, dynlib: libz, + importc: "deflate".} +proc deflateEnd*(strm: var TZStream): int32{.cdecl, dynlib: libz, + importc: "deflateEnd".} +proc inflate*(strm: var TZStream, flush: int32): int32{.cdecl, dynlib: libz, + importc: "inflate".} +proc inflateEnd*(strm: var TZStream): int32{.cdecl, dynlib: libz, + importc: "inflateEnd".} +proc deflateSetDictionary*(strm: var TZStream, dictionary: pbytef, + dictLength: uInt): int32{.cdecl, dynlib: libz, + importc: "deflateSetDictionary".} +proc deflateCopy*(dest, source: var TZstream): int32{.cdecl, dynlib: libz, + importc: "deflateCopy".} +proc deflateReset*(strm: var TZStream): int32{.cdecl, dynlib: libz, + importc: "deflateReset".} +proc deflateParams*(strm: var TZStream, level: int32, strategy: int32): int32{. + cdecl, dynlib: libz, importc: "deflateParams".} +proc inflateSetDictionary*(strm: var TZStream, dictionary: pbytef, + dictLength: uInt): int32{.cdecl, dynlib: libz, + importc: "inflateSetDictionary".} +proc inflateSync*(strm: var TZStream): int32{.cdecl, dynlib: libz, + importc: "inflateSync".} +proc inflateReset*(strm: var TZStream): int32{.cdecl, dynlib: libz, + importc: "inflateReset".} +proc compress*(dest: pbytef, destLen: puLongf, source: pbytef, sourceLen: uLong): cint{. + cdecl, dynlib: libz, importc: "compress".} +proc compress2*(dest: pbytef, destLen: puLongf, source: pbytef, + sourceLen: uLong, level: cint): cint{.cdecl, dynlib: libz, + importc: "compress2".} +proc uncompress*(dest: pbytef, destLen: puLongf, source: pbytef, + sourceLen: uLong): cint{.cdecl, dynlib: libz, + importc: "uncompress".} +proc gzopen*(path: cstring, mode: cstring): gzFile{.cdecl, dynlib: libz, + importc: "gzopen".} +proc gzdopen*(fd: int32, mode: cstring): gzFile{.cdecl, dynlib: libz, + importc: "gzdopen".} +proc gzsetparams*(thefile: gzFile, level: int32, strategy: int32): int32{.cdecl, + dynlib: libz, importc: "gzsetparams".} +proc gzread*(thefile: gzFile, buf: pointer, length: int): int32{.cdecl, + dynlib: libz, importc: "gzread".} +proc gzwrite*(thefile: gzFile, buf: pointer, length: int): int32{.cdecl, + dynlib: libz, importc: "gzwrite".} +proc gzprintf*(thefile: gzFile, format: pbytef): int32{.varargs, cdecl, + dynlib: libz, importc: "gzprintf".} +proc gzputs*(thefile: gzFile, s: pbytef): int32{.cdecl, dynlib: libz, + importc: "gzputs".} +proc gzgets*(thefile: gzFile, buf: pbytef, length: int32): pbytef{.cdecl, + dynlib: libz, importc: "gzgets".} +proc gzputc*(thefile: gzFile, c: char): char{.cdecl, dynlib: libz, + importc: "gzputc".} +proc gzgetc*(thefile: gzFile): char{.cdecl, dynlib: libz, importc: "gzgetc".} +proc gzflush*(thefile: gzFile, flush: int32): int32{.cdecl, dynlib: libz, + importc: "gzflush".} +proc gzseek*(thefile: gzFile, offset: z_off_t, whence: int32): z_off_t{.cdecl, + dynlib: libz, importc: "gzseek".} +proc gzrewind*(thefile: gzFile): int32{.cdecl, dynlib: libz, importc: "gzrewind".} +proc gztell*(thefile: gzFile): z_off_t{.cdecl, dynlib: libz, importc: "gztell".} +proc gzeof*(thefile: gzFile): int {.cdecl, dynlib: libz, importc: "gzeof".} +proc gzclose*(thefile: gzFile): int32{.cdecl, dynlib: libz, importc: "gzclose".} +proc gzerror*(thefile: gzFile, errnum: var int32): pbytef{.cdecl, dynlib: libz, + importc: "gzerror".} +proc adler32*(adler: uLong, buf: pbytef, length: uInt): uLong{.cdecl, + dynlib: libz, importc: "adler32".} +proc crc32*(crc: uLong, buf: pbytef, length: uInt): uLong{.cdecl, dynlib: libz, + importc: "crc32".} +proc deflateInitu*(strm: var TZStream, level: int32, version: cstring, + stream_size: int32): int32{.cdecl, dynlib: libz, + importc: "deflateInit_".} +proc inflateInitu*(strm: var TZStream, version: cstring, + stream_size: int32): int32 {. + cdecl, dynlib: libz, importc: "inflateInit_".} +proc deflateInit*(strm: var TZStream, level: int32): int32 +proc inflateInit*(strm: var TZStream): int32 +proc deflateInit2u*(strm: var TZStream, level: int32, `method`: int32, + windowBits: int32, memLevel: int32, strategy: int32, + version: cstring, stream_size: int32): int32 {.cdecl, + dynlib: libz, importc: "deflateInit2_".} +proc inflateInit2u*(strm: var TZStream, windowBits: int32, version: cstring, + stream_size: int32): int32{.cdecl, dynlib: libz, + importc: "inflateInit2_".} +proc deflateInit2*(strm: var TZStream, + level, `method`, windowBits, memLevel, + strategy: int32): int32 +proc inflateInit2*(strm: var TZStream, windowBits: int32): int32 +proc zError*(err: int32): cstring{.cdecl, dynlib: libz, importc: "zError".} +proc inflateSyncPoint*(z: PZstream): int32{.cdecl, dynlib: libz, + importc: "inflateSyncPoint".} +proc get_crc_table*(): pointer{.cdecl, dynlib: libz, importc: "get_crc_table".} + +proc deflateInit(strm: var TZStream, level: int32): int32 = + result = deflateInitu(strm, level, ZLIB_VERSION(), sizeof(TZStream)) + +proc inflateInit(strm: var TZStream): int32 = + result = inflateInitu(strm, ZLIB_VERSION(), sizeof(TZStream)) + +proc deflateInit2(strm: var TZStream, + level, `method`, windowBits, memLevel, + strategy: int32): int32 = + result = deflateInit2u(strm, level, `method`, windowBits, memLevel, + strategy, ZLIB_VERSION(), sizeof(TZStream)) + +proc inflateInit2(strm: var TZStream, windowBits: int32): int32 = + result = inflateInit2u(strm, windowBits, ZLIB_VERSION(), sizeof(TZStream)) + +proc zlibAllocMem*(AppData: Pointer, Items, Size: int): Pointer {.cdecl.} = + result = Alloc(Items * Size) + +proc zlibFreeMem*(AppData, `Block`: Pointer) {.cdecl.} = + dealloc(`Block`) diff --git a/lib/oldwrappers/zip/zzip.nim b/lib/oldwrappers/zip/zzip.nim new file mode 100644 index 000000000..a656322ee --- /dev/null +++ b/lib/oldwrappers/zip/zzip.nim @@ -0,0 +1,172 @@ +# +# +# Nimrod's Runtime Library +# (c) Copyright 2008 Andreas Rumpf +# +# See the file "copying.txt", included in this +# distribution, for details about the copyright. +# + +## This module is an interface to the zzip library. + +# Author: +# Guido Draheim <guidod@gmx.de> +# Tomi Ollila <Tomi.Ollila@iki.fi> +# Copyright (c) 1999,2000,2001,2002,2003,2004 Guido Draheim +# All rights reserved, +# usage allowed under the restrictions of the +# Lesser GNU General Public License +# or alternatively the restrictions +# of the Mozilla Public License 1.1 + +when defined(windows): + const + dllname = "zzip.dll" +else: + const + dllname = "libzzip.so" + +type + TZZipError* = int32 +const + ZZIP_ERROR* = -4096'i32 + ZZIP_NO_ERROR* = 0'i32 # no error, may be used if user sets it. + ZZIP_OUTOFMEM* = ZZIP_ERROR - 20'i32 # out of memory + ZZIP_DIR_OPEN* = ZZIP_ERROR - 21'i32 # failed to open zipfile, see errno for details + ZZIP_DIR_STAT* = ZZIP_ERROR - 22'i32 # failed to fstat zipfile, see errno for details + ZZIP_DIR_SEEK* = ZZIP_ERROR - 23'i32 # failed to lseek zipfile, see errno for details + ZZIP_DIR_READ* = ZZIP_ERROR - 24'i32 # failed to read zipfile, see errno for details + ZZIP_DIR_TOO_SHORT* = ZZIP_ERROR - 25'i32 + ZZIP_DIR_EDH_MISSING* = ZZIP_ERROR - 26'i32 + ZZIP_DIRSIZE* = ZZIP_ERROR - 27'i32 + ZZIP_ENOENT* = ZZIP_ERROR - 28'i32 + ZZIP_UNSUPP_COMPR* = ZZIP_ERROR - 29'i32 + ZZIP_CORRUPTED* = ZZIP_ERROR - 31'i32 + ZZIP_UNDEF* = ZZIP_ERROR - 32'i32 + ZZIP_DIR_LARGEFILE* = ZZIP_ERROR - 33'i32 + + ZZIP_CASELESS* = 1'i32 shl 12'i32 + ZZIP_NOPATHS* = 1'i32 shl 13'i32 + ZZIP_PREFERZIP* = 1'i32 shl 14'i32 + ZZIP_ONLYZIP* = 1'i32 shl 16'i32 + ZZIP_FACTORY* = 1'i32 shl 17'i32 + ZZIP_ALLOWREAL* = 1'i32 shl 18'i32 + ZZIP_THREADED* = 1'i32 shl 19'i32 + +type + TZZipDir* {.final, pure.} = object + TZZipFile* {.final, pure.} = object + TZZipPluginIO* {.final, pure.} = object + + TZZipDirent* {.final, pure.} = object + d_compr*: int32 ## compression method + d_csize*: int32 ## compressed size + st_size*: int32 ## file size / decompressed size + d_name*: cstring ## file name / strdupped name + + TZZipStat* = TZZipDirent + +proc zzip_strerror*(errcode: int32): cstring {.cdecl, dynlib: dllname, + importc: "zzip_strerror".} +proc zzip_strerror_of*(dir: ptr TZZipDir): cstring {.cdecl, dynlib: dllname, + importc: "zzip_strerror_of".} +proc zzip_errno*(errcode: int32): int32 {.cdecl, dynlib: dllname, + importc: "zzip_errno".} + +proc zzip_geterror*(dir: ptr TZZipDir): int32 {.cdecl, dynlib: dllname, + importc: "zzip_error".} +proc zzip_seterror*(dir: ptr TZZipDir, errcode: int32) {.cdecl, dynlib: dllname, + importc: "zzip_seterror".} +proc zzip_compr_str*(compr: int32): cstring {.cdecl, dynlib: dllname, + importc: "zzip_compr_str".} +proc zzip_dirhandle*(fp: ptr TZZipFile): ptr TZZipDir {.cdecl, dynlib: dllname, + importc: "zzip_dirhandle".} +proc zzip_dirfd*(dir: ptr TZZipDir): int32 {.cdecl, dynlib: dllname, + importc: "zzip_dirfd".} +proc zzip_dir_real*(dir: ptr TZZipDir): int32 {.cdecl, dynlib: dllname, + importc: "zzip_dir_real".} +proc zzip_file_real*(fp: ptr TZZipFile): int32 {.cdecl, dynlib: dllname, + importc: "zzip_file_real".} +proc zzip_realdir*(dir: ptr TZZipDir): pointer {.cdecl, dynlib: dllname, + importc: "zzip_realdir".} +proc zzip_realfd*(fp: ptr TZZipFile): int32 {.cdecl, dynlib: dllname, + importc: "zzip_realfd".} + +proc zzip_dir_alloc*(fileext: cstringArray): ptr TZZipDir {.cdecl, + dynlib: dllname, importc: "zzip_dir_alloc".} +proc zzip_dir_free*(para1: ptr TZZipDir): int32 {.cdecl, dynlib: dllname, + importc: "zzip_dir_free".} + +proc zzip_dir_fdopen*(fd: int32, errcode_p: ptr TZZipError): ptr TZZipDir {.cdecl, + dynlib: dllname, importc: "zzip_dir_fdopen".} +proc zzip_dir_open*(filename: cstring, errcode_p: ptr TZZipError): ptr TZZipDir {. + cdecl, dynlib: dllname, importc: "zzip_dir_open".} +proc zzip_dir_close*(dir: ptr TZZipDir) {.cdecl, dynlib: dllname, + importc: "zzip_dir_close".} +proc zzip_dir_read*(dir: ptr TZZipDir, dirent: ptr TZZipDirent): int32 {.cdecl, + dynlib: dllname, importc: "zzip_dir_read".} + +proc zzip_opendir*(filename: cstring): ptr TZZipDir {.cdecl, dynlib: dllname, + importc: "zzip_opendir".} +proc zzip_closedir*(dir: ptr TZZipDir) {.cdecl, dynlib: dllname, + importc: "zzip_closedir".} +proc zzip_readdir*(dir: ptr TZZipDir): ptr TZZipDirent {.cdecl, dynlib: dllname, + importc: "zzip_readdir".} +proc zzip_rewinddir*(dir: ptr TZZipDir) {.cdecl, dynlib: dllname, + importc: "zzip_rewinddir".} +proc zzip_telldir*(dir: ptr TZZipDir): int {.cdecl, dynlib: dllname, + importc: "zzip_telldir".} +proc zzip_seekdir*(dir: ptr TZZipDir, offset: int) {.cdecl, dynlib: dllname, + importc: "zzip_seekdir".} + +proc zzip_file_open*(dir: ptr TZZipDir, name: cstring, flags: int32): ptr TZZipFile {. + cdecl, dynlib: dllname, importc: "zzip_file_open".} +proc zzip_file_close*(fp: ptr TZZipFile) {.cdecl, dynlib: dllname, + importc: "zzip_file_close".} +proc zzip_file_read*(fp: ptr TZZipFile, buf: pointer, length: int): int {. + cdecl, dynlib: dllname, importc: "zzip_file_read".} +proc zzip_open*(name: cstring, flags: int32): ptr TZZipFile {.cdecl, + dynlib: dllname, importc: "zzip_open".} +proc zzip_close*(fp: ptr TZZipFile) {.cdecl, dynlib: dllname, + importc: "zzip_close".} +proc zzip_read*(fp: ptr TZZipFile, buf: pointer, length: int): int {. + cdecl, dynlib: dllname, importc: "zzip_read".} + +proc zzip_freopen*(name: cstring, mode: cstring, para3: ptr TZZipFile): ptr TZZipFile {. + cdecl, dynlib: dllname, importc: "zzip_freopen".} +proc zzip_fopen*(name: cstring, mode: cstring): ptr TZZipFile {.cdecl, + dynlib: dllname, importc: "zzip_fopen".} +proc zzip_fread*(p: pointer, size: int, nmemb: int, + file: ptr TZZipFile): int {.cdecl, dynlib: dllname, + importc: "zzip_fread".} +proc zzip_fclose*(fp: ptr TZZipFile) {.cdecl, dynlib: dllname, + importc: "zzip_fclose".} + +proc zzip_rewind*(fp: ptr TZZipFile): int32 {.cdecl, dynlib: dllname, + importc: "zzip_rewind".} +proc zzip_seek*(fp: ptr TZZipFile, offset: int, whence: int32): int {. + cdecl, dynlib: dllname, importc: "zzip_seek".} +proc zzip_tell*(fp: ptr TZZipFile): int {.cdecl, dynlib: dllname, + importc: "zzip_tell".} + +proc zzip_dir_stat*(dir: ptr TZZipDir, name: cstring, zs: ptr TZZipStat, + flags: int32): int32 {.cdecl, dynlib: dllname, + importc: "zzip_dir_stat".} +proc zzip_file_stat*(fp: ptr TZZipFile, zs: ptr TZZipStat): int32 {.cdecl, + dynlib: dllname, importc: "zzip_file_stat".} +proc zzip_fstat*(fp: ptr TZZipFile, zs: ptr TZZipStat): int32 {.cdecl, dynlib: dllname, + importc: "zzip_fstat".} + +proc zzip_open_shared_io*(stream: ptr TZZipFile, name: cstring, + o_flags: int32, o_modes: int32, ext: cstringArray, + io: ptr TZZipPluginIO): ptr TZZipFile {.cdecl, + dynlib: dllname, importc: "zzip_open_shared_io".} +proc zzip_open_ext_io*(name: cstring, o_flags: int32, o_modes: int32, + ext: cstringArray, io: ptr TZZipPluginIO): ptr TZZipFile {. + cdecl, dynlib: dllname, importc: "zzip_open_ext_io".} +proc zzip_opendir_ext_io*(name: cstring, o_modes: int32, + ext: cstringArray, io: ptr TZZipPluginIO): ptr TZZipDir {. + cdecl, dynlib: dllname, importc: "zzip_opendir_ext_io".} +proc zzip_dir_open_ext_io*(filename: cstring, errcode_p: ptr TZZipError, + ext: cstringArray, io: ptr TZZipPluginIO): ptr TZZipDir {. + cdecl, dynlib: dllname, importc: "zzip_dir_open_ext_io".} |