diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7147ff4e..94bd199b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,9 +30,11 @@ In the event you are unsure of something, refer to existing libui code for examp libui uses camel-case for naming, with a handful of very specific exceptions (namely GObject method names, where GObject itself enforces the naming convention). -All public API names should begin with `ui` and followed by a capital letter. All public struct names should begin with a capital letter. This is identical to the visibiilty rules of Go, assuming a package name of `ui`. +All public API names should begin with `ui` and followed by a capital letter. All public struct field names should begin with a capital letter. This is identical to the visibiilty rules of Go, assuming a package name of `ui`. -No private API name should begin with `ui` followed by a capital letter; in fact, I would ideally like to be able to get away with lax naming for private functions. I may have to change that if it becomes technically difficult to do in the case of static linking later on down the road. (`uiMalloc()`, `uiRealloc()`, and `uiFree()` are grandfathered-in exceptions.) +Private API names — specifcally those used by more than one source file — should begin with `uipriv` and be followed by a capital letter. This avoids namespace collisions in static libraries. + +Static functions and static objects do not have naming restrictions. Acronyms should **NOT** be mixed-case. `http` for the first word in a camel-case name, `HTTP` for all else, but **NEVER** `Http`. This is possibly the only aspect of the controversial nature of code style that I consider indefensibly stupid. diff --git a/darwin/_appkit_drawtext.m b/darwin/OLD__appkit_drawtext.m similarity index 100% rename from darwin/_appkit_drawtext.m rename to darwin/OLD__appkit_drawtext.m diff --git a/darwin/_appkit_fontmatch.m b/darwin/OLD__appkit_fontmatch.m similarity index 100% rename from darwin/_appkit_fontmatch.m rename to darwin/OLD__appkit_fontmatch.m diff --git a/darwin/_old_drawtext.m b/darwin/OLD__old_drawtext.m similarity index 100% rename from darwin/_old_drawtext.m rename to darwin/OLD__old_drawtext.m diff --git a/darwin/aat.m b/darwin/OLD_aat.m similarity index 100% rename from darwin/aat.m rename to darwin/OLD_aat.m diff --git a/darwin/attrstr.m b/darwin/OLD_attrstr.m similarity index 100% rename from darwin/attrstr.m rename to darwin/OLD_attrstr.m diff --git a/darwin/drawtext.m b/darwin/OLD_drawtext.m similarity index 100% rename from darwin/drawtext.m rename to darwin/OLD_drawtext.m diff --git a/darwin/fontbutton.m b/darwin/OLD_fontbutton.m similarity index 100% rename from darwin/fontbutton.m rename to darwin/OLD_fontbutton.m diff --git a/darwin/fontmatch.m b/darwin/OLD_fontmatch.m similarity index 100% rename from darwin/fontmatch.m rename to darwin/OLD_fontmatch.m diff --git a/darwin/fontstyle.h b/darwin/OLD_fontstyle.h similarity index 100% rename from darwin/fontstyle.h rename to darwin/OLD_fontstyle.h diff --git a/darwin/fonttraits.m b/darwin/OLD_fonttraits.m similarity index 100% rename from darwin/fonttraits.m rename to darwin/OLD_fonttraits.m diff --git a/darwin/fontvariation.m b/darwin/OLD_fontvariation.m similarity index 100% rename from darwin/fontvariation.m rename to darwin/OLD_fontvariation.m diff --git a/darwin/graphemes.m b/darwin/OLD_graphemes.m similarity index 100% rename from darwin/graphemes.m rename to darwin/OLD_graphemes.m diff --git a/darwin/opentype.m b/darwin/OLD_opentype.m similarity index 100% rename from darwin/opentype.m rename to darwin/OLD_opentype.m