G-Golf offers a series of customization interfaces for the following
domains: (•) Name Transformation - how things are being
named as they are being imported;(•) Strip Boolean Result
- should G-Golf elude (some) function and method call returned value
when it is #t
and raise an exception if the returned value is
#f
; (•) Method Short Name - should G-Golf create
them or not; (•) Syntax Name Protect - how G-Golf should
address syntax name ‘clash’ against method short name.
_ Name Transformation
When G-Golf imports a GNOME library, its classes, properties, methods, functions, types and constants are renamed (See Naming Conventions), mainly to (a) avoid ‘Camel Case’, (b) surround class names by ‘<’ ‘>’ and (c) replace ‘_’ (underscore) occurrences using the ‘-’ (hyphen) character instead.
G-Golf offers - through a series of interfaces to get, check, add, remove and reset two (distinct) associative lists - a way to either ignore or partially customize the renaming process.
See Customization Square - GI Name Transformation.
_ Strip Boolean Result
Some GI typelib functions and methods that (1) have at least one
'inout
or 'out
argument(s) and (2) return either #t
or #f
, solely to indicate that the function or method call was
successful or not.
G-Golf offers - through a series of interfaces to get, check, add,
remove and reset a list of such function or methods names - to instead
elude the function or method returned value when it is #t
and
raise an exception if the returned value is #f
.
See Customization Square - GI Strip Boolean Result.
_ Method Short Name
By default, as it imports a GI typelib, G-Golf creates a method short name for each imported method, obtained by dropping the container name (and its trailing hyphen) from the GI typelib method full/long name.
Users may change this default and skip the method short name creation step, either individually or for all GI imported methods.
See Customization Square - GI Method Short Name Skip.
_ Syntax Name Protect
When G-Golf creates a method short name, obtained by dropping the container name (and its trailing hyphen) from the GI typelib method full/long name, it may lead to a ‘name clash’, with an already defined procedure or syntax.
Both type of ‘name clash’ need to be addressed, which G-Golf does, automatically, but special care must be taken when that happens against a syntax name, a process that you may custom to your own taste.
See Customization Square - GI Syntax Name Protect.