@c -*-texinfo-*-
@c This is part of the GNU G-Golf Reference Manual.
@c Copyright (C) 2020 - 2022 Free Software Foundation, Inc.
@c See the file g-golf.texi for copying conditions.


@node Customizing G-Golf
@subsection Customizing G-Golf

G-Golf offers a series of customization interfaces for the following
domains: (@bullet{}) @emph{Name Transformation} - how things are being
named as they are being imported;(@bullet{}) @emph{Strip Boolean Result}
- should G-Golf elude (some) function and method call returned value
when it is @code{#t} and raise an exception if the returned value is
@code{#f}; (@bullet{}) @emph{Method Short Name} - should G-Golf create
them or not; (@bullet{}) @emph{Syntax Name Protect} - how G-Golf should
address syntax name @samp{clash} against method short name.


@c Variables listed in this subsection of the manual are somewhat briefly
@c introduced, make sure to follow each cross-reference to also read their
@c reference documentation entry.


@ @ @sup{_} @strong{Name Transformation}

@c As stated previously (@xref{Naming Conventions}),

When G-Golf imports a GNOME library, its classes, properties, methods,
functions, types and constants are renamed (@xref{Naming Conventions}),
mainly to (a) avoid @samp{@uref{@value{UWIKI-CAMELCASE}, Camel Case}},
(b) surround class names by @samp{<} @samp{>} and (c) replace @samp{_}
(underscore) occurrences using the @samp{-} (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.

@xref{Customization Square} - @emph{GI Name Transformation}.


@ @ @sup{_} @strong{Strip Boolean Result}

Some GI typelib functions and methods that (1) have at least one
@code{'inout} or @code{'out} argument(s) and (2) return either @code{#t}
or @code{#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 @code{#t} and
raise an exception if the returned value is @code{#f}.

@xref{Customization Square} - @emph{GI Strip Boolean Result}.


@ @ @sup{_} @strong{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.

@xref{Customization Square} - @emph{GI Method Short Name Skip}.


@ @ @sup{_} @strong{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 @samp{name clash}, with an already
defined procedure or syntax.

Both type of @samp{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.

@xref{Customization Square} - @emph{GI Syntax Name Protect}.
