summary refs log tree commit diff stats
path: root/lib/base/gtk
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2008-08-23 11:16:44 +0200
committerAndreas Rumpf <rumpf_a@web.de>2008-08-23 11:16:44 +0200
commit07d5a8085bbcc21a1d9d06a2976ecc00e9c8d55b (patch)
treeb07a53afeb56f4bba917c1a3a843f48dd25b62be /lib/base/gtk
parent916c25f9a70b68eb7a5e2c45d7cc2e10c6e3a525 (diff)
downloadNim-07d5a8085bbcc21a1d9d06a2976ecc00e9c8d55b.tar.gz
too many changes to list
Diffstat (limited to 'lib/base/gtk')
-rw-r--r--lib/base/gtk/atk.nim6
-rw-r--r--lib/base/gtk/gdk2.nim80
-rw-r--r--lib/base/gtk/gdk2pixbuf.nim4
-rw-r--r--lib/base/gtk/glib2.nim98
-rw-r--r--lib/base/gtk/gtk2.nim173
-rw-r--r--lib/base/gtk/gtkhtml.nim4
-rw-r--r--lib/base/gtk/pango.nim54
7 files changed, 225 insertions, 194 deletions
diff --git a/lib/base/gtk/atk.nim b/lib/base/gtk/atk.nim
index 69eb7c7cc..96fde8af6 100644
--- a/lib/base/gtk/atk.nim
+++ b/lib/base/gtk/atk.nim
@@ -56,7 +56,7 @@ type
     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* = record
+  TAtkPropertyValues* {.final.} = object
     property_name*: cstring
     old_value*: TGValue
     new_value*: TGValue
@@ -379,7 +379,7 @@ type
 
   TAtkAttributeSet* = TGSList
   PAtkAttribute* = ptr TAtkAttribute
-  TAtkAttribute* = record
+  TAtkAttribute* {.final.} = object
     name*: cstring
     value*: cstring
 
@@ -453,7 +453,7 @@ type
   TAtkEventListenerInitProc* = proc ()
   TAtkEventListenerInit* = proc (para1: TAtkEventListenerInitProc){.cdecl.}
   PAtkKeyEventStruct* = ptr TAtkKeyEventStruct
-  TAtkKeyEventStruct* = record
+  TAtkKeyEventStruct* {.final.} = object
     `type`*: gint
     state*: guint
     keyval*: guint
diff --git a/lib/base/gtk/gdk2.nim b/lib/base/gtk/gdk2.nim
index 11179525a..621a64bca 100644
--- a/lib/base/gtk/gdk2.nim
+++ b/lib/base/gtk/gdk2.nim
@@ -32,7 +32,7 @@ type
   TGdkVisualClass* = object of TGObjectClass
 
   PGdkColor* = ptr TGdkColor
-  TGdkColor* = record 
+  TGdkColor* {.final.} = object 
     pixel*: guint32
     red*: guint16
     green*: guint16
@@ -52,7 +52,7 @@ type
   TGdkFontType* = enum 
     GDK_FONT_FONT, GDK_FONT_FONTSET
   PGdkFont* = ptr TGdkFont
-  TGdkFont* = record 
+  TGdkFont* {.final.} = object 
     `type`*: TGdkFontType
     ascent*: gint
     descent*: gint
@@ -79,7 +79,7 @@ type
   PGdkGCValuesMask* = ptr TGdkGCValuesMask
   TGdkGCValuesMask* = int32
   PGdkGCValues* = ptr TGdkGCValues
-  TGdkGCValues* = record 
+  TGdkGCValues* {.final.} = object 
     foreground*: TGdkColor
     background*: TGdkColor
     font*: PGdkFont
@@ -125,7 +125,7 @@ type
   TGdkInputCondition* = int32
   PGdkStatus* = ptr TGdkStatus
   TGdkStatus* = int32
-  TGdkPoint* = record 
+  TGdkPoint* {.final.} = object 
     x*: gint
     y*: gint
 
@@ -135,14 +135,14 @@ type
   PGdkWChar* = ptr TGdkWChar
   TGdkWChar* = guint32
   PGdkSegment* = ptr TGdkSegment
-  TGdkSegment* = record 
+  TGdkSegment* {.final.} = object 
     x1*: gint
     y1*: gint
     x2*: gint
     y2*: gint
 
   PGdkRectangle* = ptr TGdkRectangle
-  TGdkRectangle* = record 
+  TGdkRectangle* {.final.} = object 
     x*: gint
     y*: gint
     width*: gint
@@ -190,7 +190,7 @@ type
   PGdkCursorType* = ptr TGdkCursorType
   TGdkCursorType* = gint
   PGdkCursor* = ptr TGdkCursor
-  TGdkCursor* = record 
+  TGdkCursor* {.final.} = object 
     `type`*: TGdkCursorType
     ref_count*: guint
 
@@ -220,14 +220,14 @@ type
   PGdkRegionBox* = ptr TGdkRegionBox
   TGdkRegionBox* = TGdkSegment
   PGdkRegion* = ptr TGdkRegion
-  TGdkRegion* = record 
+  TGdkRegion* {.final.} = object 
     size*: int32
     numRects*: int32
     rects*: PGdkRegionBox
     extents*: TGdkRegionBox
 
   PPOINTBLOCK* = ptr TPOINTBLOCK
-  TPOINTBLOCK* = record 
+  TPOINTBLOCK* {.final.} = object 
     pts*: array[0..(NUMPTSTOBUFFER) - 1, TGdkPoint]
     next*: PPOINTBLOCK
 
@@ -336,13 +336,13 @@ type
     GDK_SETTING_ACTION_NEW, GDK_SETTING_ACTION_CHANGED, 
     GDK_SETTING_ACTION_DELETED
   PGdkEventAny* = ptr TGdkEventAny
-  TGdkEventAny* = record 
+  TGdkEventAny* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
 
   PGdkEventExpose* = ptr TGdkEventExpose
-  TGdkEventExpose* = record 
+  TGdkEventExpose* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
@@ -351,20 +351,20 @@ type
     count*: gint
 
   PGdkEventNoExpose* = ptr TGdkEventNoExpose
-  TGdkEventNoExpose* = record 
+  TGdkEventNoExpose* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
 
   PGdkEventVisibility* = ptr TGdkEventVisibility
-  TGdkEventVisibility* = record 
+  TGdkEventVisibility* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
     state*: TGdkVisibilityState
 
   PGdkEventMotion* = ptr TGdkEventMotion
-  TGdkEventMotion* = record 
+  TGdkEventMotion* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
@@ -379,7 +379,7 @@ type
     y_root*: gdouble
 
   PGdkEventButton* = ptr TGdkEventButton
-  TGdkEventButton* = record 
+  TGdkEventButton* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
@@ -394,7 +394,7 @@ type
     y_root*: gdouble
 
   PGdkEventScroll* = ptr TGdkEventScroll
-  TGdkEventScroll* = record 
+  TGdkEventScroll* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
@@ -408,7 +408,7 @@ type
     y_root*: gdouble
 
   PGdkEventKey* = ptr TGdkEventKey
-  TGdkEventKey* = record 
+  TGdkEventKey* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
@@ -421,7 +421,7 @@ type
     group*: guint8
 
   PGdkEventCrossing* = ptr TGdkEventCrossing
-  TGdkEventCrossing* = record 
+  TGdkEventCrossing* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
@@ -437,14 +437,14 @@ type
     state*: guint
 
   PGdkEventFocus* = ptr TGdkEventFocus
-  TGdkEventFocus* = record 
+  TGdkEventFocus* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
     `in`*: gint16
 
   PGdkEventConfigure* = ptr TGdkEventConfigure
-  TGdkEventConfigure* = record 
+  TGdkEventConfigure* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
@@ -454,7 +454,7 @@ type
     height*: gint
 
   PGdkEventProperty* = ptr TGdkEventProperty
-  TGdkEventProperty* = record 
+  TGdkEventProperty* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
@@ -464,7 +464,7 @@ type
 
   TGdkNativeWindow* = pointer
   PGdkEventSelection* = ptr TGdkEventSelection
-  TGdkEventSelection* = record 
+  TGdkEventSelection* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
@@ -475,7 +475,7 @@ type
     requestor*: TGdkNativeWindow
 
   PGdkEventProximity* = ptr TGdkEventProximity
-  TGdkEventProximity* = record 
+  TGdkEventProximity* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
@@ -483,11 +483,11 @@ type
     device*: PGdkDevice
 
   PmatDUMMY* = ptr TmatDUMMY
-  TmatDUMMY* = record 
+  TmatDUMMY* {.final.} = object 
     b*: array[0..19, char]
 
   PGdkEventClient* = ptr TGdkEventClient
-  TGdkEventClient* = record 
+  TGdkEventClient* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
@@ -496,7 +496,7 @@ type
     b*: array[0..19, char]
 
   PGdkEventSetting* = ptr TGdkEventSetting
-  TGdkEventSetting* = record 
+  TGdkEventSetting* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
@@ -504,7 +504,7 @@ type
     name*: cstring
 
   PGdkEventWindowState* = ptr TGdkEventWindowState
-  TGdkEventWindowState* = record 
+  TGdkEventWindowState* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
@@ -512,7 +512,7 @@ type
     new_window_state*: TGdkWindowState
 
   PGdkEventDND* = ptr TGdkEventDND
-  TGdkEventDND* = record 
+  TGdkEventDND* {.final.} = object 
     `type`*: TGdkEventType
     window*: PGdkWindow
     send_event*: gint8
@@ -521,7 +521,7 @@ type
     x_root*: gshort
     y_root*: gshort
 
-  TGdkEvent* = record 
+  TGdkEvent* {.final.} = object 
     data*: array[0..255, char] # union of
                                # `type`: TGdkEventType
                                #  any: TGdkEventAny
@@ -585,12 +585,12 @@ type
   PGdkAxisUse* = ptr TGdkAxisUse
   TGdkAxisUse* = int32
   PGdkDeviceKey* = ptr TGdkDeviceKey
-  TGdkDeviceKey* = record 
+  TGdkDeviceKey* {.final.} = object 
     keyval*: guint
     modifiers*: TGdkModifierType
 
   PGdkDeviceAxis* = ptr TGdkDeviceAxis
-  TGdkDeviceAxis* = record 
+  TGdkDeviceAxis* {.final.} = object 
     use*: TGdkAxisUse
     min*: gdouble
     max*: gdouble
@@ -605,12 +605,12 @@ type
     num_keys*: gint
     keys*: PGdkDeviceKey
 
-  TGdkTimeCoord* = record 
+  TGdkTimeCoord* {.final.} = object 
     time*: guint32
     axes*: array[0..(GDK_MAX_TIMECOORD_AXES) - 1, gdouble]
 
   PGdkKeymapKey* = ptr TGdkKeymapKey
-  TGdkKeymapKey* = record 
+  TGdkKeymapKey* {.final.} = object 
     keycode*: guint
     group*: gint
     level*: gint
@@ -624,12 +624,12 @@ type
     direction_changed*: proc (keymap: PGdkKeymap){.cdecl.}
 
   PGdkPangoAttrStipple* = ptr TGdkPangoAttrStipple
-  TGdkPangoAttrStipple* = record 
+  TGdkPangoAttrStipple* {.final.} = object 
     attr*: TPangoAttribute
     stipple*: PGdkBitmap
 
   PGdkPangoAttrEmbossed* = ptr TGdkPangoAttrEmbossed
-  TGdkPangoAttrEmbossed* = record 
+  TGdkPangoAttrEmbossed* {.final.} = object 
     attr*: TPangoAttribute
     embossed*: gboolean
 
@@ -653,7 +653,7 @@ type
     GDK_OVERLAP_RECTANGLE_PART
   TGdkSpanFunc* = proc (span: PGdkSpan, data: gpointer){.cdecl.}
   PGdkRgbCmap* = ptr TGdkRgbCmap
-  TGdkRgbCmap* = record 
+  TGdkRgbCmap* {.final.} = object 
     colors*: array[0..255, guint32]
     n_colors*: gint
     info_list*: PGSList
@@ -698,7 +698,7 @@ type
   TGdkInputFunction* = proc (data: gpointer, source: gint, 
                              condition: TGdkInputCondition){.cdecl.}
   TGdkDestroyNotify* = proc (data: gpointer){.cdecl.}
-  TGdkSpan* = record 
+  TGdkSpan* {.final.} = object 
     x*: gint
     y*: gint
     width*: gint
@@ -731,7 +731,7 @@ type
     GDK_WINDOW_EDGE_SOUTH_WEST, GDK_WINDOW_EDGE_SOUTH, 
     GDK_WINDOW_EDGE_SOUTH_EAST
   PGdkWindowAttr* = ptr TGdkWindowAttr
-  TGdkWindowAttr* = record 
+  TGdkWindowAttr* {.final.} = object 
     title*: cstring
     event_mask*: gint
     x*: gint
@@ -748,7 +748,7 @@ type
     override_redirect*: gboolean
 
   PGdkGeometry* = ptr TGdkGeometry
-  TGdkGeometry* = record 
+  TGdkGeometry* {.final.} = object 
     min_width*: gint
     min_height*: gint
     max_width*: gint
@@ -762,7 +762,7 @@ type
     win_gravity*: TGdkGravity
 
   PGdkPointerHooks* = ptr TGdkPointerHooks
-  TGdkPointerHooks* = record 
+  TGdkPointerHooks* {.final.} = 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{.
diff --git a/lib/base/gtk/gdk2pixbuf.nim b/lib/base/gtk/gdk2pixbuf.nim
index 1dcc020d1..b9ab472c2 100644
--- a/lib/base/gtk/gdk2pixbuf.nim
+++ b/lib/base/gtk/gdk2pixbuf.nim
@@ -191,12 +191,12 @@ proc gdk_pixbuf_get_option*(pixbuf: PGdkPixbuf, key: cstring): cstring{.cdecl,
     dynlib: gdkpixbuflib, importc: "gdk_pixbuf_get_option".}
 type 
   PGdkPixbufLoader* = ptr TGdkPixbufLoader
-  TGdkPixbufLoader* = record 
+  TGdkPixbufLoader* {.final.} = object 
     parent_instance*: TGObject
     priv*: gpointer
 
   PGdkPixbufLoaderClass* = ptr TGdkPixbufLoaderClass
-  TGdkPixbufLoaderClass* = record 
+  TGdkPixbufLoaderClass* {.final.} = object 
     parent_class*: TGObjectClass
     area_prepared*: proc (loader: PGdkPixbufLoader){.cdecl.}
     area_updated*: proc (loader: PGdkPixbufLoader, x: int32, y: int32, 
diff --git a/lib/base/gtk/glib2.nim b/lib/base/gtk/glib2.nim
index 4b4724c70..c84bc26eb 100644
--- a/lib/base/gtk/glib2.nim
+++ b/lib/base/gtk/glib2.nim
@@ -61,7 +61,7 @@ type
   TGHFunc* = proc (key, value, user_data: gpointer){.cdecl.}
   PGFreeFunc* = proc (data: gpointer){.cdecl.}
   PGTimeVal* = ptr TGTimeVal
-  TGTimeVal* = record
+  TGTimeVal* {.final.} = object
     tv_sec*: glong
     tv_usec*: glong
 
@@ -88,17 +88,17 @@ type
   TGQuark* = guint32
   PGQuark* = ptr TGQuark
   PGTypeCValue* = ptr TGTypeCValue
-  TGTypeCValue* = record
+  TGTypeCValue* {.final.} = object
     v_double*: gdouble
 
   GType* = gulong
   PGType* = ptr GType
   PGTypeClass* = ptr TGTypeClass
-  TGTypeClass* = record
+  TGTypeClass* {.final.} = object
     g_type*: GType
 
   PGTypeInstance* = ptr TGTypeInstance
-  TGTypeInstance* = record
+  TGTypeInstance* {.final.} = object
     g_class*: PGTypeClass
 
   PGTypeInterface* = ptr TGTypeInterface
@@ -107,14 +107,14 @@ type
     g_instance_type*: GType
 
   PGTypeQuery* = ptr TGTypeQuery
-  TGTypeQuery* = record
+  TGTypeQuery* {.final.} = object
     theType*: GType
     type_name*: cstring
     class_size*: guint
     instance_size*: guint
 
   PGValue* = ptr TGValue
-  TGValue* = record
+  TGValue* {.final.} = object
     g_type*: GType
     data*: array[0..1, gdouble]
 
@@ -122,12 +122,12 @@ type
   PGData* = pointer
   PGSList* = ptr TGSList
   PPGSList* = ptr PGSList
-  TGSList* = record
+  TGSList* {.final.} = object
     data*: gpointer
     next*: PGSList
 
   PGList* = ptr TGList
-  TGList* = record
+  TGList* {.final.} = object
     data*: gpointer
     next*: PGList
     prev*: PGList
@@ -136,7 +136,7 @@ type
   TGParamFlags* = int32
   PGParamSpec* = ptr TGParamSpec
   PPGParamSpec* = ptr PGParamSpec
-  TGParamSpec* = record
+  TGParamSpec* {.final.} = object
     g_type_instance*: TGTypeInstance
     name*: cstring
     flags*: TGParamFlags
@@ -149,7 +149,7 @@ type
     param_id*: guint
 
   PGParamSpecClass* = ptr TGParamSpecClass
-  TGParamSpecClass* = record
+  TGParamSpecClass* {.final.} = object
     g_type_class*: TGTypeClass
     value_type*: GType
     finalize*: proc (pspec: PGParamSpec){.cdecl.}
@@ -160,7 +160,7 @@ type
     dummy*: array[0..3, gpointer]
 
   PGParameter* = ptr TGParameter
-  TGParameter* = record
+  TGParameter* {.final.} = object
     name*: cstring
     value*: TGValue
 
@@ -305,7 +305,7 @@ const
 
 type
   PGTypeValueTable* = ptr TGTypeValueTable
-  TGTypeValueTable* = record
+  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.}
@@ -320,7 +320,7 @@ type
         cdecl.}
 
   PGTypeInfo* = ptr TGTypeInfo
-  TGTypeInfo* = record
+  TGTypeInfo* {.final.} = object
     class_size*: guint16
     base_init*: TGBaseInitFunc
     base_finalize*: TGBaseFinalizeFunc
@@ -333,11 +333,11 @@ type
     value_table*: PGTypeValueTable
 
   PGTypeFundamentalInfo* = ptr TGTypeFundamentalInfo
-  TGTypeFundamentalInfo* = record
+  TGTypeFundamentalInfo* {.final.} = object
     type_flags*: TGTypeFundamentalFlags
 
   PGInterfaceInfo* = ptr TGInterfaceInfo
-  TGInterfaceInfo* = record
+  TGInterfaceInfo* {.final.} = object
     interface_init*: TGInterfaceInitFunc
     interface_finalize*: TGInterfaceFinalizeFunc
     interface_data*: gpointer
@@ -449,7 +449,7 @@ const
 
 type
   PGValueArray* = ptr TGValueArray
-  TGValueArray* = record
+  TGValueArray* {.final.} = object
     n_values*: guint
     values*: PGValue
     n_prealloced*: guint
@@ -628,7 +628,7 @@ 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* = record
+  TGParamSpecTypeInfo* {.final.} = object
     instance_size*: guint16
     n_preallocs*: guint16
     instance_init*: proc (pspec: PGParamSpec){.cdecl.}
@@ -668,7 +668,7 @@ type
   PGClosure* = ptr TGClosure
   PGClosureNotifyData* = ptr TGClosureNotifyData
   TGClosureNotify* = proc (data: gpointer, closure: PGClosure){.cdecl.}
-  TGClosure* = record
+  TGClosure* {.final.} = object
     flag0*: int32
     marshal*: proc (closure: PGClosure, return_value: PGValue,
                     n_param_values: guint, param_values: PGValue,
@@ -682,7 +682,7 @@ type
                             n_param_values: guint, param_values: PGValue,
                             invocation_hint: gpointer, marshal_data: gpointer){.
       cdecl.}
-  TGClosureNotifyData* = record
+  TGClosureNotifyData* {.final.} = object
     data*: gpointer
     notify*: TGClosureNotify
 
@@ -734,7 +734,7 @@ proc is_invalid*(a: var TGClosure): guint
 proc set_is_invalid*(a: var TGClosure, is_invalid: guint)
 type
   PGCClosure* = ptr TGCClosure
-  TGCClosure* = record
+  TGCClosure* {.final.} = object
     closure*: TGClosure
     callback*: gpointer
 
@@ -797,13 +797,13 @@ type
                                data: gpointer): gboolean{.cdecl.}
   PGSignalFlags* = ptr TGSignalFlags
   TGSignalFlags* = int32
-  TGSignalInvocationHint* = record
+  TGSignalInvocationHint* {.final.} = object
     signal_id*: guint
     detail*: TGQuark
     run_type*: TGSignalFlags
 
   PGSignalQuery* = ptr TGSignalQuery
-  TGSignalQuery* = record
+  TGSignalQuery* {.final.} = object
     signal_id*: guint
     signal_name*: cstring
     itype*: GType
@@ -952,7 +952,7 @@ type
   TGTypePluginCompleteInterfaceInfo* = proc (plugin: PGTypePlugin,
       instance_type: GType, interface_type: GType, info: PGInterfaceInfo){.cdecl.}
   PGTypePluginClass* = ptr TGTypePluginClass
-  TGTypePluginClass* = record
+  TGTypePluginClass* {.final.} = object
     base_iface*: TGTypeInterface
     use_plugin*: TGTypePluginUse
     unuse_plugin*: TGTypePluginUnuse
@@ -1011,7 +1011,7 @@ type
     notify*: proc (anObject: PGObject, pspec: PGParamSpec){.cdecl.}
     pdummy*: array[0..7, gpointer]
 
-  TGObjectConstructParam* = record
+  TGObjectConstructParam* {.final.} = object
     pspec*: PGParamSpec
     value*: PGValue
 
@@ -1125,27 +1125,27 @@ proc GUINT32_SWAP_LE_BE_CONSTANT*(val: guint32): guint32
 type
   PGEnumClass* = ptr TGEnumClass
   PGEnumValue* = ptr TGEnumValue
-  TGEnumClass* = record
+  TGEnumClass* {.final.} = object
     g_type_class*: TGTypeClass
     minimum*: gint
     maximum*: gint
     n_values*: guint
     values*: PGEnumValue
 
-  TGEnumValue* = record
+  TGEnumValue* {.final.} = object
     value*: gint
     value_name*: cstring
     value_nick*: cstring
 
   PGFlagsClass* = ptr TGFlagsClass
   PGFlagsValue* = ptr TGFlagsValue
-  TGFlagsClass* = record
+  TGFlagsClass* {.final.} = object
     g_type_class*: TGTypeClass
     mask*: guint
     n_values*: guint
     values*: PGFlagsValue
 
-  TGFlagsValue* = record
+  TGFlagsValue* {.final.} = object
     value*: guint
     value_name*: cstring
     value_nick*: cstring
@@ -1203,7 +1203,7 @@ const
   G_MAXUSHORT* = 2 * G_MAXSHORT + 1
   G_MAXINT* = 2147483647
   G_MININT* = - G_MAXINT - 1
-  G_MAXUINT* = 4294967295
+  G_MAXUINT* = -1
   G_MINLONG* = G_MININT
   G_MAXLONG* = G_MAXINT
   G_MAXULONG* = G_MAXUINT
@@ -1224,7 +1224,7 @@ const
 
 type
   PGSystemThread* = ptr TGSystemThread
-  TGSystemThread* = record
+  TGSystemThread* {.final.} = object
     data*: array[0..3, char]
     dummy_double*: float64
     dummy_pointer*: pointer
@@ -1350,7 +1350,7 @@ proc g_set_prgname*(prgname: cstring){.cdecl, dynlib: gliblib,
                                        importc: "g_set_prgname".}
 type
   PGDebugKey* = ptr TGDebugKey
-  TGDebugKey* = record
+  TGDebugKey* {.final.} = object
     key*: cstring
     value*: guint
 
@@ -1390,7 +1390,7 @@ proc g_bit_storage*(number: gulong): guint{.cdecl, dynlib: gliblib,
 type
   PPGTrashStack* = ptr PGTrashStack
   PGTrashStack* = ptr TGTrashStack
-  TGTrashStack* = record
+  TGTrashStack* {.final.} = object
     next*: PGTrashStack
 
 
@@ -1466,7 +1466,7 @@ const
 
 type
   PGMemVTable* = ptr TGMemVTable
-  TGMemVTable* = record
+  TGMemVTable* {.final.} = object
     malloc*: proc (n_bytes: gsize): gpointer{.cdecl.}
     realloc*: proc (mem: gpointer, n_bytes: gsize): gpointer{.cdecl.}
     free*: proc (mem: gpointer){.cdecl.}
@@ -1679,7 +1679,7 @@ type
   TGCompletionStrncmpFunc* = proc (s1: cstring, s2: cstring, n: gsize): gint{.
       cdecl.}
   PGCompletion* = ptr TGCompletion
-  TGCompletion* = record
+  TGCompletion* {.final.} = object
     items*: PGList
     func*: TGCompletionFunc
     prefix*: cstring
@@ -1809,7 +1809,7 @@ type
   PGDateDay* = ptr TGDateDay
   TGDateDay* = guint8
   Ptm* = ptr Ttm
-  Ttm* = record
+  Ttm* {.final.} = object
     tm_sec*: gint
     tm_min*: gint
     tm_hour*: gint
@@ -1872,7 +1872,7 @@ const
 
 type
   PGDate* = ptr TGDate
-  TGDate* = record
+  TGDate* {.final.} = object
     flag0*: int32
     flag1*: int32
 
@@ -2028,7 +2028,7 @@ 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* = record
+  TGHook* {.final.} = object
     data*: gpointer
     next*: PGHook
     prev*: PGHook
@@ -2047,7 +2047,7 @@ type
   TGHookFunc* = proc (data: gpointer){.cdecl.}
   TGHookCheckFunc* = proc (data: gpointer): gboolean{.cdecl.}
   TGHookFinalizeFunc* = proc (hook_list: PGHookList, hook: PGHook){.cdecl.}
-  TGHookList* = record
+  TGHookList* {.final.} = object
     seq_id*: gulong
     flag0*: int32
     hooks*: PGHook
@@ -2138,7 +2138,7 @@ proc g_hook_list_marshal_check*(hook_list: PGHookList, may_recurse: gboolean,
     importc: "g_hook_list_marshal_check".}
 type
   PGThreadPool* = ptr TGThreadPool
-  TGThreadPool* = record
+  TGThreadPool* {.final.} = object
     func*: TGFunc
     user_data*: gpointer
     exclusive*: gboolean
@@ -2352,7 +2352,7 @@ proc g_utf8_collate_key*(str: cstring, len: gssize): cstring{.cdecl,
     dynlib: gliblib, importc: "g_utf8_collate_key".}
 type
   PGString* = ptr TGString
-  TGString* = record
+  TGString* {.final.} = object
     str*: cstring
     len*: gsize
     allocated_len*: gsize
@@ -2468,7 +2468,7 @@ type
   TGIOFunc* = proc (source: PGIOChannel, condition: TGIOCondition,
                     data: gpointer): gboolean{.cdecl.}
   PGIOFuncs* = ptr TGIOFuncs
-  TGIOFuncs* = record
+  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,
@@ -2483,7 +2483,7 @@ type
         cdecl.}
     io_get_flags*: proc (channel: PGIOChannel): TGIOFlags{.cdecl.}
 
-  TGIOChannel* = record
+  TGIOChannel* {.final.} = object
     ref_count*: guint
     funcs*: PGIOFuncs
     encoding*: cstring
@@ -2699,7 +2699,7 @@ type
   PGMarkupParseContext* = ptr TGMarkupParseContext
   TGMarkupParseContext* = pointer
   PGMarkupParser* = ptr TGMarkupParser
-  TGMarkupParser* = record
+  TGMarkupParser* {.final.} = object
     start_element*: proc (context: PGMarkupParseContext, element_name: cstring,
                           attribute_names: PPgchar, attribute_values: PPgchar,
                           user_data: gpointer, error: pointer){.cdecl.}
@@ -2733,7 +2733,7 @@ proc g_markup_escape_text*(text: cstring, length: gssize): cstring{.cdecl,
     dynlib: gliblib, importc: "g_markup_escape_text".}
 type
   PGNode* = ptr TGNode
-  TGNode* = record
+  TGNode* {.final.} = object
     data*: gpointer
     next*: PGNode
     prev*: PGNode
@@ -2886,7 +2886,7 @@ proc g_qsort_with_data*(pbase: gconstpointer, total_elems: gint, size: gsize,
     cdecl, dynlib: gliblib, importc: "g_qsort_with_data".}
 type
   PGQueue* = ptr TGQueue
-  TGQueue* = record
+  TGQueue* {.final.} = object
     head*: PGList
     tail*: PGList
     length*: guint
@@ -2947,7 +2947,7 @@ proc g_random_double_range*(`begin`: gdouble, `end`: gdouble): gdouble{.cdecl,
     dynlib: gliblib, importc: "g_random_double_range".}
 type
   PGTuples* = ptr TGTuples
-  TGTuples* = record
+  TGTuples* {.final.} = object
     len*: guint
 
   PGRelation* = pointer
@@ -3003,12 +3003,12 @@ type
   PGScanner* = ptr TGScanner
   PGScannerConfig* = ptr TGScannerConfig
   PGTokenValue* = ptr TGTokenValue
-  TGTokenValue* = record
+  TGTokenValue* {.final.} = object
     v_float*: gdouble
 
   TGScannerMsgFunc* = proc (scanner: PGScanner, message: cstring,
                             error: gboolean){.cdecl.}
-  TGScanner* = record
+  TGScanner* {.final.} = object
     user_data*: gpointer
     max_parse_errors*: guint
     parse_errors*: guint
@@ -3031,7 +3031,7 @@ type
     scope_id*: guint
     msg_handler*: TGScannerMsgFunc
 
-  TGScannerConfig* = record
+  TGScannerConfig* {.final.} = object
     cset_skip_characters*: cstring
     cset_identifier_first*: cstring
     cset_identifier_nth*: cstring
diff --git a/lib/base/gtk/gtk2.nim b/lib/base/gtk/gtk2.nim
index 6c7a2ce9f..b7cf6e64f 100644
--- a/lib/base/gtk/gtk2.nim
+++ b/lib/base/gtk/gtk2.nim
@@ -155,17 +155,17 @@ type
   TGtkSignalFunc* = proc (para1: TGtkSignalFuncProc){.cdecl.}
   PGtkSignalMarshaller* = ptr TGtkSignalMarshaller
   TGtkSignalMarshaller* = TGSignalCMarshaller
-  TGtkArgSignalData* = record
+  TGtkArgSignalData* {.final.} = object
     f*: TGtkSignalFunc
     d*: gpointer
 
-  TGtkArg* = record
+  TGtkArg* {.final.} = object
     `type`*: TGtkType
     name*: cstring
     d*: gdouble               # was a union type
 
   PGtkTypeInfo* = ptr TGtkTypeInfo
-  TGtkTypeInfo* = record
+  TGtkTypeInfo* {.final.} = object
     type_name*: cstring
     object_size*: guint
     class_size*: guint
@@ -188,7 +188,7 @@ type
   TGtkAllocation* = TGdkRectangle
   TGtkCallback* = proc (widget: PGtkWidget, data: gpointer){.cdecl.}
   PGtkRequisition* = ptr TGtkRequisition
-  TGtkRequisition* = record
+  TGtkRequisition* {.final.} = object
     width*: gint
     height*: gint
 
@@ -323,7 +323,7 @@ type
     gtk_reserved8*: proc (){.cdecl.}
 
   PGtkWidgetAuxInfo* = ptr TGtkWidgetAuxInfo
-  TGtkWidgetAuxInfo* = record
+  TGtkWidgetAuxInfo* {.final.} = object
     x*: gint
     y*: gint
     width*: gint
@@ -331,7 +331,7 @@ type
     flag0*: guint16
 
   PGtkWidgetShapeInfo* = ptr TGtkWidgetShapeInfo
-  TGtkWidgetShapeInfo* = record
+  TGtkWidgetShapeInfo* {.final.} = object
     offset_x*: gint16
     offset_y*: gint16
     shape_mask*: PGdkBitmap
@@ -370,12 +370,12 @@ type
     gtk_reserved4: proc (){.cdecl.}
 
   PGtkAccelKey* = ptr TGtkAccelKey
-  TGtkAccelKey* = record
+  TGtkAccelKey* {.final.} = object
     accel_key*: guint
     accel_mods*: TGdkModifierType
     flag0*: guint16
 
-  TGtkAccelGroupEntry* = record
+  TGtkAccelGroupEntry* {.final.} = object
     key*: TGtkAccelKey
     closure*: PGClosure
     accel_path_quark*: TGQuark
@@ -595,7 +595,7 @@ type
   PGtkBindingSignal* = ptr TGtkBindingSignal
   PGtkBindingArg* = ptr TGtkBindingArg
   PGtkBindingSet* = ptr TGtkBindingSet
-  TGtkBindingSet* = record
+  TGtkBindingSet* {.final.} = object
     set_name*: cstring
     priority*: gint
     widget_path_pspecs*: PGSList
@@ -605,7 +605,7 @@ type
     current*: PGtkBindingEntry
     flag0*: guint16
 
-  TGtkBindingEntry* = record
+  TGtkBindingEntry* {.final.} = object
     keyval*: guint
     modifiers*: TGdkModifierType
     binding_set*: PGtkBindingSet
@@ -614,13 +614,13 @@ type
     hash_next*: PGtkBindingEntry
     signals*: PGtkBindingSignal
 
-  TGtkBindingSignal* = record
+  TGtkBindingSignal* {.final.} = object
     next*: PGtkBindingSignal
     signal_name*: cstring
     n_args*: guint
     args*: PGtkBindingArg
 
-  TGtkBindingArg* = record
+  TGtkBindingArg* {.final.} = object
     arg_type*: TGtkType
     d*: gdouble
 
@@ -634,7 +634,7 @@ type
   TGtkBoxClass* = object of TGtkContainerClass
 
   PGtkBoxChild* = ptr TGtkBoxChild
-  TGtkBoxChild* = record
+  TGtkBoxChild* {.final.} = object
     widget*: PGtkWidget
     padding*: guint16
     flag0*: guint16
@@ -906,12 +906,12 @@ type
   TGtkCListCompareFunc* = proc (clist: PGtkCList, ptr1: gconstpointer,
                                 ptr2: gconstpointer): gint{.cdecl.}
   PGtkCListCellInfo* = ptr TGtkCListCellInfo
-  TGtkCListCellInfo* = record
+  TGtkCListCellInfo* {.final.} = object
     row*: gint
     column*: gint
 
   PGtkCListDestInfo* = ptr TGtkCListDestInfo
-  TGtkCListDestInfo* = record
+  TGtkCListDestInfo* {.final.} = object
     cell*: TGtkCListCellInfo
     insert_pos*: TGtkCListDragPos
 
@@ -1014,7 +1014,7 @@ type
 
   PGPtrArray = pointer
   PGArray = pointer
-  TGtkCListColumn* = record
+  TGtkCListColumn* {.final.} = object
     title*: cstring
     area*: TGdkRectangle
     button*: PGtkWidget
@@ -1025,7 +1025,7 @@ type
     justification*: TGtkJustification
     flag0*: guint16
 
-  TGtkCListRow* = record
+  TGtkCListRow* {.final.} = object
     cell*: PGtkCell
     state*: TGtkStateType
     foreground*: TGdkColor
@@ -1036,7 +1036,7 @@ type
     flag0*: guint16
 
   PGtkCellText* = ptr TGtkCellText
-  TGtkCellText* = record
+  TGtkCellText* {.final.} = object
     `type`*: TGtkCellType
     vertical*: gint16
     horizontal*: gint16
@@ -1044,7 +1044,7 @@ type
     text*: cstring
 
   PGtkCellPixmap* = ptr TGtkCellPixmap
-  TGtkCellPixmap* = record
+  TGtkCellPixmap* {.final.} = object
     `type`*: TGtkCellType
     vertical*: gint16
     horizontal*: gint16
@@ -1053,7 +1053,7 @@ type
     mask*: PGdkBitmap
 
   PGtkCellPixText* = ptr TGtkCellPixText
-  TGtkCellPixText* = record
+  TGtkCellPixText* {.final.} = object
     `type`*: TGtkCellType
     vertical*: gint16
     horizontal*: gint16
@@ -1064,14 +1064,14 @@ type
     mask*: PGdkBitmap
 
   PGtkCellWidget* = ptr TGtkCellWidget
-  TGtkCellWidget* = record
+  TGtkCellWidget* {.final.} = object
     `type`*: TGtkCellType
     vertical*: gint16
     horizontal*: gint16
     style*: PGtkStyle
     widget*: PGtkWidget
 
-  TGtkCell* = record
+  TGtkCell* {.final.} = object
     `type`*: TGtkCellType
     vertical*: gint16
     horizontal*: gint16
@@ -1212,7 +1212,7 @@ type
                                        action: TGtkCTreeExpansionType){.cdecl.}
 
   PGtkCTreeRow* = ptr TGtkCTreeRow
-  TGtkCTreeRow* = record
+  TGtkCTreeRow* {.final.} = object
     row*: TGtkCListRow
     parent*: PGtkCTreeNode
     sibling*: PGtkCTreeNode
@@ -1224,7 +1224,7 @@ type
     level*: guint16
     GtkCTreeRow_flag0*: guint16
 
-  TGtkCTreeNode* = record
+  TGtkCTreeNode* {.final.} = object
     list*: TGList
 
   PGtkDrawingArea* = ptr TGtkDrawingArea
@@ -1479,7 +1479,7 @@ type
   TGtkFixedClass* = object of TGtkContainerClass
 
   PGtkFixedChild* = ptr TGtkFixedChild
-  TGtkFixedChild* = record
+  TGtkFixedChild* {.final.} = object
     widget*: PGtkWidget
     x*: gint
     y*: gint
@@ -1632,7 +1632,7 @@ type
     gtk_reserved363: proc (){.cdecl.}
     gtk_reserved364: proc (){.cdecl.}
 
-  TGtkRulerMetric* = record
+  TGtkRulerMetric* {.final.} = object
     metric_name*: cstring
     abbrev*: cstring
     pixels_per_unit*: gdouble
@@ -1657,7 +1657,7 @@ type
   TGtkSettingsClass* = object of TGObjectClass
 
   PGtkSettingsValue* = ptr TGtkSettingsValue
-  TGtkSettingsValue* = record
+  TGtkSettingsValue* {.final.} = object
     origin*: cstring
     value*: TGValue
 
@@ -1708,7 +1708,7 @@ type
     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* = record
+  TGtkRcProperty* {.final.} = object
     type_name*: TGQuark
     property_name*: TGQuark
     origin*: cstring
@@ -1877,7 +1877,7 @@ type
     gtk_reserved3812: proc (){.cdecl.}
 
   PGtkBorder* = ptr TGtkBorder
-  TGtkBorder* = record
+  TGtkBorder* {.final.} = object
     left*: gint
     right*: gint
     top*: gint
@@ -1978,27 +1978,27 @@ type
 
   PGtkIconSet* = pointer
   PGtkImagePixmapData* = ptr TGtkImagePixmapData
-  TGtkImagePixmapData* = record
+  TGtkImagePixmapData* {.final.} = object
     pixmap*: PGdkPixmap
 
   PGtkImageImageData* = ptr TGtkImageImageData
-  TGtkImageImageData* = record
+  TGtkImageImageData* {.final.} = object
     image*: PGdkImage
 
   PGtkImagePixbufData* = ptr TGtkImagePixbufData
-  TGtkImagePixbufData* = record
+  TGtkImagePixbufData* {.final.} = object
     pixbuf*: PGdkPixbuf
 
   PGtkImageStockData* = ptr TGtkImageStockData
-  TGtkImageStockData* = record
+  TGtkImageStockData* {.final.} = object
     stock_id*: cstring
 
   PGtkImageIconSetData* = ptr TGtkImageIconSetData
-  TGtkImageIconSetData* = record
+  TGtkImageIconSetData* {.final.} = object
     icon_set*: PGtkIconSet
 
   PGtkImageAnimationData* = ptr TGtkImageAnimationData
-  TGtkImageAnimationData* = record
+  TGtkImageAnimationData* {.final.} = object
     anim*: PGdkPixbufAnimation
     iter*: PGdkPixbufAnimationIter
     frame_timeout*: guint
@@ -2111,7 +2111,7 @@ type
     gtk_reserved474: proc (){.cdecl.}
 
   PGtkItemFactoryEntry* = ptr TGtkItemFactoryEntry
-  TGtkItemFactoryEntry* = record
+  TGtkItemFactoryEntry* {.final.} = object
     path*: cstring
     accelerator*: cstring
     callback*: TGtkItemFactoryCallback
@@ -2120,7 +2120,7 @@ type
     extra_data*: gconstpointer
 
   PGtkItemFactoryItem* = ptr TGtkItemFactoryItem
-  TGtkItemFactoryItem* = record
+  TGtkItemFactoryItem* {.final.} = object
     path*: cstring
     widgets*: PGSList
 
@@ -2173,7 +2173,7 @@ type
       cdecl.}
   PGtkTreeModelFlags* = ptr TGtkTreeModelFlags
   TGtkTreeModelFlags* = int32
-  TGtkTreeIter* = record
+  TGtkTreeIter* {.final.} = object
     stamp*: gint
     user_data*: gpointer
     user_data2*: gpointer
@@ -2435,12 +2435,12 @@ type
     GtkPreview_flag0*: guint16
 
   PGtkPreviewInfo* = ptr TGtkPreviewInfo
-  TGtkPreviewInfo* = record
+  TGtkPreviewInfo* {.final.} = object
     lookup*: Pguchar
     gamma*: gdouble
 
   PGtkDitherInfo* = ptr TGtkDitherInfo
-  TGtkDitherInfo* = record
+  TGtkDitherInfo* {.final.} = object
     c*: array[0..3, guchar]
 
   PGtkPreviewClass* = ptr TGtkPreviewClass
@@ -2533,7 +2533,7 @@ type
     gtk_reserved603: proc (){.cdecl.}
     gtk_reserved604: proc (){.cdecl.}
 
-  TGtkSelectionData* = record
+  TGtkSelectionData* {.final.} = object
     selection*: TGdkAtom
     target*: TGdkAtom
     thetype*: TGdkAtom
@@ -2543,18 +2543,18 @@ type
     display*: PGdkDisplay
 
   PGtkTargetEntry* = ptr TGtkTargetEntry
-  TGtkTargetEntry* = record
+  TGtkTargetEntry* {.final.} = object
     target*: cstring
     flags*: guint
     info*: guint
 
   PGtkTargetList* = ptr TGtkTargetList
-  TGtkTargetList* = record
+  TGtkTargetList* {.final.} = object
     list*: PGList
     ref_count*: guint
 
   PGtkTargetPair* = ptr TGtkTargetPair
-  TGtkTargetPair* = record
+  TGtkTargetPair* {.final.} = object
     target*: TGdkAtom
     flags*: guint
     info*: guint
@@ -2635,7 +2635,7 @@ type
     gtk_reserved634: proc (){.cdecl.}
 
   PGtkStockItem* = ptr TGtkStockItem
-  TGtkStockItem* = record
+  TGtkStockItem* {.final.} = object
     stock_id*: cstring
     label*: cstring
     modifier*: TGdkModifierType
@@ -2681,7 +2681,7 @@ type
   TGtkTableClass* = object of TGtkContainerClass
 
   PGtkTableChild* = ptr TGtkTableChild
-  TGtkTableChild* = record
+  TGtkTableChild* {.final.} = object
     widget*: PGtkWidget
     left_attach*: guint16
     right_attach*: guint16
@@ -2691,7 +2691,7 @@ type
     ypadding*: guint16
     GtkTableChild_flag0*: guint16
 
-  TGtkTableRowCol* = record
+  TGtkTableRowCol* {.final.} = object
     requisition*: guint16
     allocation*: guint16
     spacing*: guint16
@@ -2710,7 +2710,7 @@ type
 
   PGtkTextFont* = pointer
   PGtkPropertyMark* = ptr TGtkPropertyMark
-  TGtkPropertyMark* = record
+  TGtkPropertyMark* {.final.} = object
     `property`*: PGList
     offset*: guint
     index*: guint
@@ -2764,7 +2764,7 @@ type
   PGtkTextSearchFlags* = ptr TGtkTextSearchFlags
   TGtkTextSearchFlags* = int32
   PGtkTextIter* = ptr TGtkTextIter
-  TGtkTextIter* = record
+  TGtkTextIter* {.final.} = object
     dummy1*: gpointer
     dummy2*: gpointer
     dummy3*: gint
@@ -2802,7 +2802,7 @@ type
     gtk_reserved664: proc (){.cdecl.}
 
   PGtkTextAppearance* = ptr TGtkTextAppearance
-  TGtkTextAppearance* = record
+  TGtkTextAppearance* {.final.} = object
     bg_color*: TGdkColor
     fg_color*: TGdkColor
     bg_stipple*: PGdkBitmap
@@ -2811,7 +2811,7 @@ type
     padding1*: gpointer
     flag0*: guint16
 
-  TGtkTextAttributes* = record
+  TGtkTextAttributes* {.final.} = object
     refcount*: guint
     appearance*: TGtkTextAppearance
     justification*: TGtkJustification
@@ -2860,7 +2860,7 @@ type
     gtk_reserved4: proc (){.cdecl.}
 
   PGtkTextMarkBody* = ptr TGtkTextMarkBody
-  TGtkTextMarkBody* = record
+  TGtkTextMarkBody* {.final.} = object
     obj*: PGtkTextMark
     name*: cstring
     tree*: PGtkTextBTree
@@ -2879,11 +2879,11 @@ type
     gtk_reserved4: proc (){.cdecl.}
 
   PGtkTextPixbuf* = ptr TGtkTextPixbuf
-  TGtkTextPixbuf* = record
+  TGtkTextPixbuf* {.final.} = object
     pixbuf*: PGdkPixbuf
 
   PGtkTextChildBody* = ptr TGtkTextChildBody
-  TGtkTextChildBody* = record
+  TGtkTextChildBody* {.final.} = object
     obj*: PGtkTextChildAnchor
     widgets*: PGSList
     tree*: PGtkTextBTree
@@ -2892,17 +2892,17 @@ type
   PGtkTextLineSegment* = ptr TGtkTextLineSegment
   PGtkTextLineSegmentClass* = ptr TGtkTextLineSegmentClass
   PGtkTextTagInfo* = ptr TGtkTextTagInfo
-  TGtkTextTagInfo* = record
+  TGtkTextTagInfo* {.final.} = object
     tag*: PGtkTextTag
     tag_root*: PGtkTextBTreeNode
     toggle_count*: gint
 
   PGtkTextToggleBody* = ptr TGtkTextToggleBody
-  TGtkTextToggleBody* = record
+  TGtkTextToggleBody* {.final.} = object
     info*: PGtkTextTagInfo
     inNodeCounts*: gboolean
 
-  TGtkTextLineSegment* = record
+  TGtkTextLineSegment* {.final.} = object
     `type`*: PGtkTextLineSegmentClass
     next*: PGtkTextLineSegment
     char_count*: int32
@@ -2919,7 +2919,7 @@ type
                                      line: PGtkTextLine){.cdecl.}
   TGtkTextSegCheckFunc* = proc (seg: PGtkTextLineSegment, line: PGtkTextLine){.
       cdecl.}
-  TGtkTextLineSegmentClass* = record
+  TGtkTextLineSegmentClass* {.final.} = object
     name*: cstring
     leftGravity*: gboolean
     splitFunc*: TGtkTextSegSplitFunc
@@ -2929,13 +2929,13 @@ type
     checkFunc*: TGtkTextSegCheckFunc
 
   PGtkTextLineData* = ptr TGtkTextLineData
-  TGtkTextLineData* = record
+  TGtkTextLineData* {.final.} = object
     view_id*: gpointer
     next*: PGtkTextLineData
     height*: gint
     flag0*: int32
 
-  TGtkTextLine* = record
+  TGtkTextLine* {.final.} = object
     parent*: PGtkTextBTreeNode
     next*: PGtkTextLine
     segments*: PGtkTextLineSegment
@@ -3020,18 +3020,18 @@ type
     gtk_reserved4: proc (){.cdecl.}
 
   PGtkTextAttrAppearance* = ptr TGtkTextAttrAppearance
-  TGtkTextAttrAppearance* = record
+  TGtkTextAttrAppearance* {.final.} = object
     attr*: TPangoAttribute
     appearance*: TGtkTextAppearance
 
   PGtkTextCursorDisplay* = ptr TGtkTextCursorDisplay
-  TGtkTextCursorDisplay* = record
+  TGtkTextCursorDisplay* {.final.} = object
     x*: gint
     y*: gint
     height*: gint
     flag0*: guint16
 
-  TGtkTextLineDisplay* = record
+  TGtkTextLineDisplay* {.final.} = object
     layout*: PPangoLayout
     cursors*: PGSList
     shaped_objects*: PGSList
@@ -3152,7 +3152,7 @@ type
 
   PGtkTooltips* = ptr TGtkTooltips
   PGtkTooltipsData* = ptr TGtkTooltipsData
-  TGtkTooltipsData* = record
+  TGtkTooltipsData* {.final.} = object
     tooltips*: PGtkTooltips
     widget*: PGtkWidget
     tip_text*: cstring
@@ -3184,7 +3184,7 @@ type
   TGtkToolbarSpaceStyle* = enum
     GTK_TOOLBAR_SPACE_EMPTY, GTK_TOOLBAR_SPACE_LINE
   PGtkToolbarChild* = ptr TGtkToolbarChild
-  TGtkToolbarChild* = record
+  TGtkToolbarChild* {.final.} = object
     `type`*: TGtkToolbarChildType
     widget*: PGtkWidget
     icon*: PGtkWidget
@@ -3365,13 +3365,13 @@ type
   PGtkRBNode* = ptr TGtkRBNode
   TGtkRBTreeTraverseFunc* = proc (tree: PGtkRBTree, node: PGtkRBNode,
                                   data: gpointer){.cdecl.}
-  TGtkRBTree* = record
+  TGtkRBTree* {.final.} = object
     root*: PGtkRBNode
     `nil`*: PGtkRBNode
     parent_tree*: PGtkRBTree
     parent_node*: PGtkRBNode
 
-  TGtkRBNode* = record
+  TGtkRBNode* {.final.} = object
     flag0*: guint16
     left*: PGtkRBNode
     right*: PGtkRBNode
@@ -3386,14 +3386,14 @@ type
   TGtkTreeViewSearchDialogPositionFunc* = proc (tree_view: PGtkTreeView,
       search_dialog: PGtkWidget){.cdecl.}
   PGtkTreeViewColumnReorder* = ptr TGtkTreeViewColumnReorder
-  TGtkTreeViewColumnReorder* = record
+  TGtkTreeViewColumnReorder* {.final.} = object
     left_align*: gint
     right_align*: gint
     left_column*: PGtkTreeViewColumn
     right_column*: PGtkTreeViewColumn
 
   PGtkTreeViewPrivate* = ptr TGtkTreeViewPrivate
-  TGtkTreeViewPrivate* = record
+  TGtkTreeViewPrivate* {.final.} = object
     model*: PGtkTreeModel
     flags*: guint
     tree*: PGtkRBTree
@@ -11304,96 +11304,127 @@ 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 =
@@ -15108,7 +15139,7 @@ proc gtk_signal_handler_pending_by_func*(anObject: PGtkObject, signal_id: guint,
       G_SIGNAL_MATCH_DATA)
   if not may_be_blocked:
     t = t or cast[int](G_SIGNAL_MATCH_UNBLOCKED)
-  Result = g_signal_handler_find(anObject, t, signal_id, 0, nil, addr(func_),
+  Result = g_signal_handler_find(anObject, t, signal_id, 0, nil, func_,
                                  data) != 0
 
 proc GTK_TYPE_SIZE_GROUP*(): GType =
@@ -17045,7 +17076,7 @@ type
     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* = record 
+  TGtkFileFilterInfo* {.final.} = object 
     contains*: TGtkFileFilterFlags
     filename*: cstring
     uri*: cstring
diff --git a/lib/base/gtk/gtkhtml.nim b/lib/base/gtk/gtkhtml.nim
index 5599eec2b..ca1ce883d 100644
--- a/lib/base/gtk/gtkhtml.nim
+++ b/lib/base/gtk/gtkhtml.nim
@@ -68,12 +68,12 @@ type
                             exc: PDomException): PDomString{.cdecl.}
 
   PDomDocument* = ptr TDomDocument
-  TDomDocument* = record 
+  TDomDocument* {.final.} = object 
     parent*: PDomNode
     iterators*: PGSList
 
   PDomDocumentClass* = ptr TDomDocumentClass
-  TDomDocumentClass* = record 
+  TDomDocumentClass* {.final.} = object 
     parent_class*: PDomNodeClass
 
   PHtmlFocusIterator* = ptr THtmlFocusIterator
diff --git a/lib/base/gtk/pango.nim b/lib/base/gtk/pango.nim
index 4c6c48bf8..142ab4aa2 100644
--- a/lib/base/gtk/pango.nim
+++ b/lib/base/gtk/pango.nim
@@ -50,7 +50,7 @@ type
   PPangoGlyph* = ptr TPangoGlyph
   TPangoGlyph* = guint32
   PPangoRectangle* = ptr TPangoRectangle
-  TPangoRectangle* = record 
+  TPangoRectangle* {.final.} = object 
     x*: int32
     y*: int32
     width*: int32
@@ -61,7 +61,7 @@ type
     PANGO_DIRECTION_LTR, PANGO_DIRECTION_RTL, PANGO_DIRECTION_TTB_LTR, 
     PANGO_DIRECTION_TTB_RTL
   PPangoColor* = ptr TPangoColor
-  TPangoColor* = record 
+  TPangoColor* {.final.} = object 
     red*: guint16
     green*: guint16
     blue*: guint16
@@ -72,12 +72,12 @@ type
   TPangoUnderline* = int32
   PPangoAttribute* = ptr TPangoAttribute
   PPangoAttrClass* = ptr TPangoAttrClass
-  TPangoAttribute* = record 
+  TPangoAttribute* {.final.} = object 
     klass*: PPangoAttrClass
     start_index*: int
     end_index*: int
 
-  TPangoAttrClass* = record 
+  TPangoAttrClass* {.final.} = object 
     `type`*: TPangoAttrType
     copy*: proc (attr: PPangoAttribute): PPangoAttribute{.cdecl.}
     destroy*: proc (attr: PPangoAttribute){.cdecl.}
@@ -85,43 +85,43 @@ type
         cdecl.}
 
   PPangoAttrString* = ptr TPangoAttrString
-  TPangoAttrString* = record 
+  TPangoAttrString* {.final.} = object 
     attr*: TPangoAttribute
     value*: cstring
 
   PPangoAttrLanguage* = ptr TPangoAttrLanguage
-  TPangoAttrLanguage* = record 
+  TPangoAttrLanguage* {.final.} = object 
     attr*: TPangoAttribute
     value*: PPangoLanguage
 
   PPangoAttrInt* = ptr TPangoAttrInt
-  TPangoAttrInt* = record 
+  TPangoAttrInt* {.final.} = object 
     attr*: TPangoAttribute
     value*: int32
 
   PPangoAttrFloat* = ptr TPangoAttrFloat
-  TPangoAttrFloat* = record 
+  TPangoAttrFloat* {.final.} = object 
     attr*: TPangoAttribute
     value*: gdouble
 
   PPangoAttrColor* = ptr TPangoAttrColor
-  TPangoAttrColor* = record 
+  TPangoAttrColor* {.final.} = object 
     attr*: TPangoAttribute
     color*: TPangoColor
 
   PPangoAttrShape* = ptr TPangoAttrShape
-  TPangoAttrShape* = record 
+  TPangoAttrShape* {.final.} = object 
     attr*: TPangoAttribute
     ink_rect*: TPangoRectangle
     logical_rect*: TPangoRectangle
 
   PPangoAttrFontDesc* = ptr TPangoAttrFontDesc
-  TPangoAttrFontDesc* = record 
+  TPangoAttrFontDesc* {.final.} = object 
     attr*: TPangoAttribute
     desc*: PPangoFontDescription
 
   PPangoLogAttr* = ptr TPangoLogAttr
-  TPangoLogAttr* = record 
+  TPangoLogAttr* {.final.} = object 
     flag0*: guint16
 
   PPangoCoverageLevel* = ptr TPangoCoverageLevel
@@ -129,25 +129,25 @@ type
     PANGO_COVERAGE_NONE, PANGO_COVERAGE_FALLBACK, PANGO_COVERAGE_APPROXIMATE, 
     PANGO_COVERAGE_EXACT
   PPangoBlockInfo* = ptr TPangoBlockInfo
-  TPangoBlockInfo* = record 
+  TPangoBlockInfo* {.final.} = object 
     data*: Pguchar
     level*: TPangoCoverageLevel
 
   PPangoCoverage* = ptr TPangoCoverage
-  TPangoCoverage* = record 
+  TPangoCoverage* {.final.} = object 
     ref_count*: int
     n_blocks*: int32
     data_size*: int32
     blocks*: PPangoBlockInfo
 
   PPangoEngineRange* = ptr TPangoEngineRange
-  TPangoEngineRange* = record 
+  TPangoEngineRange* {.final.} = object 
     start*: int32
     theEnd*: int32
     langs*: cstring
 
   PPangoEngineInfo* = ptr TPangoEngineInfo
-  TPangoEngineInfo* = record 
+  TPangoEngineInfo* {.final.} = object 
     id*: cstring
     engine_type*: cstring
     render_type*: cstring
@@ -155,7 +155,7 @@ type
     n_ranges*: gint
 
   PPangoEngine* = ptr TPangoEngine
-  TPangoEngine* = record 
+  TPangoEngine* {.final.} = object 
     id*: cstring
     `type`*: cstring
     length*: gint
@@ -165,7 +165,7 @@ type
                                        attrs: PPangoLogAttr, attrs_len: int32){.
       cdecl.}
   PPangoEngineLang* = ptr TPangoEngineLang
-  TPangoEngineLang* = record 
+  TPangoEngineLang* {.final.} = object 
     engine*: TPangoEngine
     script_break*: TPangoEngineLangScriptBreak
 
@@ -176,7 +176,7 @@ type
                                         language: PPangoLanguage): PPangoCoverage{.
       cdecl.}
   PPangoEngineShape* = ptr TPangoEngineShape
-  TPangoEngineShape* = record 
+  TPangoEngineShape* {.final.} = object 
     engine*: TPangoEngine
     script_shape*: TPangoEngineShapeScript
     get_coverage*: TPangoEngineShapeGetCoverage
@@ -194,28 +194,28 @@ type
   PPangoGlyphUnit* = ptr TPangoGlyphUnit
   TPangoGlyphUnit* = gint32
   PPangoGlyphGeometry* = ptr TPangoGlyphGeometry
-  TPangoGlyphGeometry* = record 
+  TPangoGlyphGeometry* {.final.} = object 
     width*: TPangoGlyphUnit
     x_offset*: TPangoGlyphUnit
     y_offset*: TPangoGlyphUnit
 
   PPangoGlyphVisAttr* = ptr TPangoGlyphVisAttr
-  TPangoGlyphVisAttr* = record 
+  TPangoGlyphVisAttr* {.final.} = object 
     flag0*: int16
 
   PPangoGlyphInfo* = ptr TPangoGlyphInfo
-  TPangoGlyphInfo* = record 
+  TPangoGlyphInfo* {.final.} = object 
     glyph*: TPangoGlyph
     geometry*: TPangoGlyphGeometry
     attr*: TPangoGlyphVisAttr
 
-  TPangoGlyphString* = record 
+  TPangoGlyphString* {.final.} = object 
     num_glyphs*: gint
     glyphs*: PPangoGlyphInfo
     log_clusters*: Pgint
     space*: gint
 
-  TPangoAnalysis* = record 
+  TPangoAnalysis* {.final.} = object 
     shape_engine*: PPangoEngineShape
     lang_engine*: PPangoEngineLang
     font*: PPangoFont
@@ -223,7 +223,7 @@ type
     language*: PPangoLanguage
     extra_attrs*: PGSList
 
-  TPangoItem* = record 
+  TPangoItem* {.final.} = object 
     offset*: gint
     length*: gint
     num_chars*: gint
@@ -236,14 +236,14 @@ type
   TPangoWrapMode* = enum 
     PANGO_WRAP_WORD, PANGO_WRAP_CHAR
   PPangoLayoutLine* = ptr TPangoLayoutLine
-  TPangoLayoutLine* = record 
+  TPangoLayoutLine* {.final.} = object 
     layout*: PPangoLayout
     start_index*: gint
     length*: gint
     runs*: PGSList
 
   PPangoLayoutRun* = ptr TPangoLayoutRun
-  TPangoLayoutRun* = record 
+  TPangoLayoutRun* {.final.} = object 
     item*: PPangoItem
     glyphs*: PPangoGlyphString