Full Code of andlabs/libui for AI

master fea45b2d5b75 cached
393 files
1.7 MB
591.9k tokens
2087 symbols
1 requests
Download .txt
Showing preview only (1,890K chars total). Download the full file or copy to clipboard to get everything.
Repository: andlabs/libui
Branch: master
Commit: fea45b2d5b75
Files: 393
Total size: 1.7 MB

Directory structure:
gitextract_7ti2ssbi/

├── .appveyor.yml
├── CONTRIBUTING.md
├── Compatibility.md
├── LICENSE
├── NEWS.md
├── README.md
├── TODO.md
├── _abort/
│   ├── oldhaiku.tgz
│   └── windowevents/
│       ├── darwin_window.m
│       ├── page15.c
│       ├── ui.h
│       ├── unix_window.c
│       └── windows_window.cpp
├── _doc/
│   ├── area.md
│   ├── areahandler
│   ├── draw.md
│   ├── drawtext
│   ├── export/
│   │   ├── coretext
│   │   ├── ctweights
│   │   ├── ctweightsannotated
│   │   ├── ctweightscombined
│   │   ├── ctweightsprocessed
│   │   ├── ctweightsraw
│   │   ├── ctweightvalues
│   │   ├── ctwidths
│   │   ├── ctwidthscombined
│   │   ├── ctwidthsprocessed
│   │   ├── ctwidthvalues
│   │   ├── fvar.swift
│   │   ├── ttfixedtest.go
│   │   ├── weightlist1.sh
│   │   ├── weightlist2.sh
│   │   ├── weightlist3.sh
│   │   ├── writewidths.c
│   │   ├── writewidths.out
│   │   ├── writewidths.processed
│   │   └── writewidths.s
│   ├── form
│   ├── main
│   ├── mainsteps
│   ├── misctests/
│   │   ├── gtkprogresstable.c
│   │   ├── winbuttonexplorertheme.cpp
│   │   └── winrebarexplorertheme.cpp
│   ├── names.md
│   ├── slider
│   ├── spinbox
│   ├── static
│   ├── windowmovesize
│   └── winstatic
├── _future/
│   ├── otherattributes/
│   │   └── ui.h
│   ├── textlanguageattr/
│   │   ├── README
│   │   ├── attrstr_darwin.m
│   │   ├── attrstr_unix.c
│   │   ├── attrstr_windows.cpp
│   │   ├── common_attrlist.c
│   │   ├── drawtext_example.c
│   │   ├── fontmatch_darwin.m
│   │   └── ui.h
│   ├── unittest/
│   │   ├── checklist_attrstr
│   │   ├── opentype_test.c
│   │   ├── testing.h
│   │   └── testing_testing.c
│   └── verticaltext/
│       ├── README
│       ├── attrstr_darwin.m
│       ├── attrstr_unix.c
│       ├── attrstr_windows.cpp
│       ├── common_attrlist.c
│       ├── drawtext_example.c
│       └── ui.h
├── _notes/
│   ├── OS2
│   ├── azure-pipelines
│   ├── caretWidths
│   ├── cplusplus
│   ├── darwinAutoLayout
│   ├── darwinNSAlertIcons
│   ├── dialogs
│   ├── highDPI
│   ├── i18n
│   ├── macosAlternateHiDPI
│   ├── misc
│   ├── rebarstuff
│   ├── tableNotes
│   ├── textSelections
│   ├── winARM64
│   ├── windowsHighDPI
│   ├── windowsPrinting
│   ├── windowsUWPGlass
│   └── winflags
├── _wip/
│   ├── attrstr_metrics/
│   │   ├── common_OLD_drawtext.c
│   │   ├── common_OLD_uipriv_attrstr.h
│   │   ├── darwin_OLD__appkit_drawtext.m
│   │   ├── darwin_OLD__appkit_fontmatch.m
│   │   ├── darwin_OLD__old_drawtext.m
│   │   ├── darwin_OLD_drawtext.m
│   │   ├── numlinesbyterange
│   │   ├── old_ui_attrstr.h
│   │   ├── textDarwinEmptyLayout.diff
│   │   ├── unix_OLD__old_drawtext.c
│   │   ├── unix_OLD_drawtext.c
│   │   ├── windows_OLD__old_drawtext.cpp
│   │   └── windows_OLD_drawtext.cpp
│   ├── examples_drawtext/
│   │   ├── attributes.c
│   │   ├── basic.c
│   │   ├── drawtext.h
│   │   ├── emptystr_hittest.c
│   │   ├── hittest.c
│   │   └── main.c
│   ├── examples_drawtext_CMakeLists.txt
│   ├── examples_opentype/
│   │   └── main.c
│   ├── rules.darwin
│   ├── rules.unix
│   ├── sv/
│   │   ├── normal
│   │   ├── normal.nots
│   │   ├── outlineview
│   │   ├── outlineview.nots
│   │   ├── sourcelist
│   │   ├── sourcelist.nots
│   │   ├── tableview
│   │   ├── tableview.nots
│   │   ├── textview
│   │   └── textview.nots
│   └── table/
│       ├── test_page9.c
│       ├── ui.h
│       ├── unix_table.c
│       └── unix_tablemodel.c
├── azure-pipelines/
│   ├── TODOMatrix
│   ├── artifacts.yml
│   ├── build.yml
│   ├── collapse.awk
│   ├── collapsed
│   ├── configure.yml
│   ├── darwin-install-ninja.yml
│   ├── install-latest-meson-ninja.yml
│   ├── linux-386-install-gtk-dev.yml
│   ├── linux-install-gtk-dev.yml
│   ├── setup-python3.yml
│   ├── vs2015-install-python3.yml
│   ├── windows-artifacts.yml
│   └── windows-install-ninja.yml
├── azure-pipelines.yml
├── common/
│   ├── OLD_table.c
│   ├── areaevents.c
│   ├── attribute.c
│   ├── attrlist.c
│   ├── attrstr.c
│   ├── attrstr.h
│   ├── control.c
│   ├── controlsigs.h
│   ├── debug.c
│   ├── matrix.c
│   ├── meson.build
│   ├── opentype.c
│   ├── shouldquit.c
│   ├── table.h
│   ├── tablemodel.c
│   ├── tablevalue.c
│   ├── uipriv.h
│   ├── userbugs.c
│   ├── utf.c
│   └── utf.h
├── darwin/
│   ├── OLD_table.m
│   ├── aat.m
│   ├── alloc.m
│   ├── area.m
│   ├── areaevents.m
│   ├── attrstr.h
│   ├── attrstr.m
│   ├── autolayout.m
│   ├── box.m
│   ├── button.m
│   ├── checkbox.m
│   ├── colorbutton.m
│   ├── combobox.m
│   ├── control.m
│   ├── datetimepicker.m
│   ├── debug.m
│   ├── draw.h
│   ├── draw.m
│   ├── drawtext.m
│   ├── editablecombo.m
│   ├── entry.m
│   ├── fontbutton.m
│   ├── fontmatch.m
│   ├── fonttraits.m
│   ├── fontvariation.m
│   ├── form.m
│   ├── future.m
│   ├── graphemes.m
│   ├── grid.m
│   ├── group.m
│   ├── image.m
│   ├── label.m
│   ├── main.m
│   ├── map.m
│   ├── menu.m
│   ├── meson.build
│   ├── multilineentry.m
│   ├── opentype.m
│   ├── progressbar.m
│   ├── radiobuttons.m
│   ├── scrollview.m
│   ├── separator.m
│   ├── sierra.h
│   ├── slider.m
│   ├── spinbox.m
│   ├── stddialogs.m
│   ├── tab.m
│   ├── table.h
│   ├── table.m
│   ├── tablecolumn.m
│   ├── text.m
│   ├── uipriv_darwin.h
│   ├── undocumented.m
│   ├── util.m
│   ├── window.m
│   └── winmoveresize.m
├── examples/
│   ├── controlgallery/
│   │   └── main.c
│   ├── cpp-multithread/
│   │   └── main.cpp
│   ├── datetime/
│   │   └── main.c
│   ├── drawtext/
│   │   └── main.c
│   ├── example.manifest
│   ├── example.static.manifest
│   ├── histogram/
│   │   └── main.c
│   ├── meson.build
│   ├── resources.rc
│   └── timer/
│       └── main.c
├── meson.build
├── stats.osxdrawtext
├── test/
│   ├── OLD_page16.c
│   ├── drawtests.c
│   ├── images/
│   │   └── gen.go
│   ├── images.c
│   ├── main.c
│   ├── menus.c
│   ├── meson.build
│   ├── page1.c
│   ├── page10.c
│   ├── page11.c
│   ├── page12.c
│   ├── page13.c
│   ├── page14.c
│   ├── page15.c
│   ├── page16.c
│   ├── page2.c
│   ├── page3.c
│   ├── page4.c
│   ├── page5.c
│   ├── page6.c
│   ├── page7.c
│   ├── page7a.c
│   ├── page7b.c
│   ├── page7c.c
│   ├── page8.c
│   ├── page9.c
│   ├── resources.rc
│   ├── spaced.c
│   ├── test.h
│   ├── test.manifest
│   └── test.static.manifest
├── ui.h
├── ui_darwin.h
├── ui_unix.h
├── ui_windows.h
├── unix/
│   ├── OLD_table.c
│   ├── alloc.c
│   ├── area.c
│   ├── attrstr.c
│   ├── attrstr.h
│   ├── box.c
│   ├── button.c
│   ├── cellrendererbutton.c
│   ├── checkbox.c
│   ├── child.c
│   ├── colorbutton.c
│   ├── combobox.c
│   ├── control.c
│   ├── datetimepicker.c
│   ├── debug.c
│   ├── draw.c
│   ├── draw.h
│   ├── drawmatrix.c
│   ├── drawpath.c
│   ├── drawtext.c
│   ├── editablecombo.c
│   ├── entry.c
│   ├── fontbutton.c
│   ├── fontmatch.c
│   ├── form.c
│   ├── future.c
│   ├── graphemes.c
│   ├── grid.c
│   ├── group.c
│   ├── image.c
│   ├── label.c
│   ├── main.c
│   ├── menu.c
│   ├── meson.build
│   ├── multilineentry.c
│   ├── opentype.c
│   ├── progressbar.c
│   ├── radiobuttons.c
│   ├── separator.c
│   ├── slider.c
│   ├── spinbox.c
│   ├── stddialogs.c
│   ├── tab.c
│   ├── table.c
│   ├── table.h
│   ├── tablemodel.c
│   ├── text.c
│   ├── uipriv_unix.h
│   ├── util.c
│   └── window.c
└── windows/
    ├── _rc2bin/
    │   ├── build.bat
    │   ├── libui.manifest
    │   ├── main.cpp
    │   ├── resources.hpp
    │   ├── resources.rc
    │   └── winapi.hpp
    ├── _uipriv_migrate.hpp
    ├── alloc.cpp
    ├── area.cpp
    ├── area.hpp
    ├── areadraw.cpp
    ├── areaevents.cpp
    ├── areascroll.cpp
    ├── areautil.cpp
    ├── attrstr.cpp
    ├── attrstr.hpp
    ├── box.cpp
    ├── button.cpp
    ├── checkbox.cpp
    ├── colorbutton.cpp
    ├── colordialog.cpp
    ├── combobox.cpp
    ├── compilerver.hpp
    ├── container.cpp
    ├── control.cpp
    ├── d2dscratch.cpp
    ├── datetimepicker.cpp
    ├── debug.cpp
    ├── draw.cpp
    ├── draw.hpp
    ├── drawmatrix.cpp
    ├── drawpath.cpp
    ├── drawtext.cpp
    ├── dwrite.cpp
    ├── editablecombo.cpp
    ├── entry.cpp
    ├── events.cpp
    ├── fontbutton.cpp
    ├── fontdialog.cpp
    ├── fontmatch.cpp
    ├── form.cpp
    ├── graphemes.cpp
    ├── grid.cpp
    ├── group.cpp
    ├── image.cpp
    ├── init.cpp
    ├── label.cpp
    ├── libui.manifest
    ├── main.cpp
    ├── menu.cpp
    ├── meson.build
    ├── multilineentry.cpp
    ├── notes
    ├── opentype.cpp
    ├── parent.cpp
    ├── progressbar.cpp
    ├── radiobuttons.cpp
    ├── resources.hpp
    ├── resources.rc
    ├── separator.cpp
    ├── sizing.cpp
    ├── slider.cpp
    ├── spinbox.cpp
    ├── stddialogs.cpp
    ├── tab.cpp
    ├── table.cpp
    ├── table.hpp
    ├── tabledispinfo.cpp
    ├── tabledraw.cpp
    ├── tableediting.cpp
    ├── tablemetrics.cpp
    ├── tabpage.cpp
    ├── text.cpp
    ├── uipriv_windows.hpp
    ├── utf16.cpp
    ├── utilwin.cpp
    ├── winapi.hpp
    ├── window.cpp
    ├── winpublic.cpp
    └── winutil.cpp

================================================
FILE CONTENTS
================================================

================================================
FILE: .appveyor.yml
================================================
version: 'build #{build}'

environment:
  matrix:
    - arch: 386
      libtype: shared
      libfiles: libui.dll libui.lib
      compiler: msvc2013
      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
    - arch: 386
      libtype: static
      libfiles: libui.lib
      compiler: msvc2013
      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
    - arch: amd64
      libtype: shared
      libfiles: libui.dll libui.lib
      compiler: msvc2013
      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
    - arch: amd64
      libtype: static
      libfiles: libui.lib
      compiler: msvc2013
      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
    - arch: 386
      libtype: static
      libfiles: libui.lib
      compiler: mingw
      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
    - arch: amd64
      libtype: static
      libfiles: libui.lib
      compiler: mingw
      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015

platform:
  - x64

# Note: AppVeyor tries to be "helpful" and splits cmd.exe scripts into their constitutent lines to check their error codes. There is no way to switch this off; for true multi-line scripts we have to use PowerShell. But we need to use vcvarsall.bat, so that's out of the question.
install:
  # Set Python Version
  - set "PYTHON_ROOT=C:\python37-x64"
  - if %arch%==386 ( set "PYTHON_ROOT=C:\python37" )
  - set "PATH=%PYTHON_ROOT%;%PYTHON_ROOT%\Scripts;%PATH%"
  # Install Latest Meson
  - pip install meson
  # Install Ninja
  - powershell -Command "Invoke-WebRequest https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-win.zip -OutFile C:\ninja-win.zip"
  - mkdir C:\ninja
  - powershell -Command "Expand-Archive -LiteralPath C:\ninja-win.zip -DestinationPath C:\ninja"
  - set "PATH=C:\ninja;%PATH%"
  # Parameters for the build_script phase, to reduce their noise.
  - set "mingwPath=C:\msys64\mingw64\bin"
  - set vcvarsallArch=x86
  - if %arch%==386 ( set "mingwPath=C:\msys64\mingw32\bin" )
  - if %arch%==386 ( set vcvarsallArch=amd64 )

build_script:
  - if %compiler%==mingw ( set "PATH=%mingwPath%;%PATH%" )
  - if not %compiler%==mingw ( call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %vcvarsallArch% )
  - meson setup build --buildtype=release --default-library=%libtype%
  - ninja -C build

after_build:
  - set "version=%APPVEYOR_REPO_BRANCH%"
  - if %APPVEYOR_REPO_TAG%==true ( set "version=%APPVEYOR_REPO_TAG_NAME%" )
  - set "artifact=%version%-windows-%arch%-%compiler%-%libtype%"
  - cd build\meson-out
  # TODO msvc only?
  - if %libtype%==static ( ren libui.a libui.lib )
  - copy ..\..\ui.h .
  - copy ..\..\ui_windows.h .
  # remove unnecessary files
  # TODO should we do this on Azure too?
  - del libui.exp
  - 7z a "%APPVEYOR_BUILD_FOLDER%\libui-%artifact%.zip" %libfiles% ui.h ui_windows.h
  - 7z a "%APPVEYOR_BUILD_FOLDER%\examples-%artifact%.zip" controlgallery.exe cpp-multithread.exe datetime.exe drawtext.exe histogram.exe tester.exe timer.exe
  - del ui.h ui_windows.h

artifacts:
  - path: libui-*.zip
    name: libui
  - path: examples-*.zip
    name: examples

deploy:
  provider: GitHub
  artifact: libui, examples
  auth_token:
    secure: li92W7mFAC8HbAVeZN6Ugmo5H1GzKSjr6DXlMniLcCRspKmi2Nz1nlslSa+9sLfo
  on:
    appveyor_repo_tag: true # deploy on tag push only


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to libui

libui is an open source project that openly accepts contributions. I appreciate your help!

## Rules for contributing code

While libui is open to contributions, a number of recent, significantly large contributions and uncontributed forks have recently surfaced that do not present themselves in a form that makes it easy for libui to accept them. In order to give your contribution a high chance of being accepted into libui, please keep the following in mind as you prepare your contribution.

### Commit messages and pull request description

libui does not enforce rules about the length or detail that a commit message. I'm not looking for an essay. However, single-word descriptions of nontrivial changes are *not* acceptable. I should be able to get a glimpse of what a commit does from the commit message, even if it's just one sentence to describe a trivial change. (Yes, I know I haven't followed this rule strictly myself, but I try not to break it too.) And a commit message should encompass everything; typically, I make a number of incremental commits toward a feature, so the commit messages don't have to be too long to explain everything.

Your pull request description, on the other hand, must be a summary of the sum total of all the changes made to libui. Don't just drop a pull request on me with a one-line-long elevator pitch of what you added. Describe your proposed API changes, implementation requirements, and any important consequences of your work.

### Code formatting

libui uses K&R C formatting rules for overall code structure: spaces after keywords like `if`, `{` on the same line as a statement with a space, `{` on its own line after a function or method signature (even those inside the class body), no space after the name of a function, etc.

Use hard tabs, NOT spaces, for indentation. I use a proportional-width font and my text editor doesn't set tabs to a multiple of the space width, so I *will* be able to tell. If you use a fixed-width font, I suggest setting a tab width of 4 spaces per tab, but don't put diagrams in comments with hard tabs, because not everyone does this.

Expressions should have a space around binary operators, and use parentheses where it would help humans gather the meaning of an expression, regardless of whether a computer could tell what is correct.

When breaking expressions into multiple lines, always break *after* an operator, such as `,` or `&&`.

There should be a newline between a function's variables and a function's code. After that, you can place newlines to delimit different parts of a function, but don't go crazy.

In the event you are unsure of something, refer to existing libui code for examples. I may wind up fixing minor details later anyway, so don't fret about getting minor details right the first time.

### Naming

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 field names should begin with a capital letter. This is identical to the visibiilty rules of Go, assuming a package name of `ui`.

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.

### API documentation

(TODO I am writing an API documentation tool; once that becomes stable enough I can talk about documenting libui properly. You'll see vestiges of it throughout ui.h, though.)

### Other commenting

(TODO write this part)

### Compatibility

libui takes backward compatibility seriously. Your code should not break the current compatibility requirements. All platforms provide a series of macros, defined in the various `uipriv_*.h` files (or `winapi.hpp` on Windows), that specify the minimum required version. If you find yourself needing to remove these or ignore resultant warnings or errors, you're probably breaking compatibility.

Choosing to drop older versions of Windows, GTK+, and OS X that I could have easily continued to support was not done lightly. If you want to discuss dropping support for an older version of any of these for the benefit of libui, file an issue pleading your case (see below).

GTK+ versions are harder to drop because I am limited by Linux distribution packaging. In general, I will consider bumping GTK+ versions on a new Ubuntu LTS release, choosing the earliest version available on the major distributions at the time of the *previous* Ubuntu LTS release. As of writing, the next milestone will be *after* April 2018, and the target GTK+ version appears to be 3.18, judging by Ubuntu 16.04 LTS alone. This may be bumped back depending on other distros (or it may not be bumped at all), but you may wish to keep this in mind as you write.

(TODO talk about future.c/.cpp/.m files)

As for language compatibility, libui is written in C99. I have no intention of changing this.

As for build system compatibility, libui uses CMake 3.1.0. If you wish to bump the version, file an issue pleading your case (but see below).

**If you do plead your case**, keep in mind that "it's old" is not a sufficient reason to drop things. If you can prove that **virtually no one** uses the minimum version anymore, then that is stronger evidence. The best evidence, however, is that not upgrading will hold libui back in some significant way — but beware that there are some things I won't add to libui itself.

### Windows-specific notes

The Windows backend of libui is written in C++ using C++11.

Despite using C++, please refrain from using the following:

- using C++ in ui_windows.h (this file should still be C compatible)
- smart pointers
- namespaces
- `using namespace`
- ATL, MFC, WTL

The following are not recommended, for consistency with the rest of libui:

- variable declarations anywhere in a function (keep them all at the top)
- `for (int x...` (C++11 foreach syntax is fine, though)
- omitting the `struct` on type names for ordinary structs

The format of a class should be

```c++
class name : public ancestor {
	int privateVariable;
	// etc.
public:
	// public stuff here
};
```

### GTK+-specific notes

Avoid GNU-specific language features. I build with strict C99 conformance.

### OS X-specific notes

Avoid GNU-specific/clang-specific language features. I build with strict C99 conformance.

libui is presently **not** ARC-compliant. Features that require ARC should be avoided for now. I may consider changing this in the future, but it will be a significant change.

To ensure maximum compiler output in the event of a coding error, there should not be any implicit method calls in Objective-C code. For instance, don't do

```objective-c
[[array objectAtIndex:i] method]
```

Instead, cast the result of `objectAtIndex:` to the appropriate type, and then call the method. (TODO learn about, then decide a policy on, soft-generics on things other than `id`)

The format of a class should be

```objective-c
@interface name : parent<protocols> {
	// ivars
}
// properties
- (ret)method:(int)arg;
// more methods
@end

@implementation name

- (ret)method:(int)arg
{
	// note the lack of semicolon
}

@end
```


================================================
FILE: Compatibility.md
================================================
# Useful things in newer versions

## Windows
### Windows 7
http://channel9.msdn.com/blogs/pdc2008/pc43

TODO look up PDC 2008 talk "new shell user interface"

- new animation and text engine
- ribbon control (didn't this have some additional license?)
- LVITEM.piColFmt

### Windows 8

### Windows 8.1

### Windows 10

## GTK+
TODO what ships with Ubuntu Quantal (12.10)?

### GTK+ 3.6
ships with: Ubuntu Raring (13.04)

- GtkEntry and GtkTextView have input purposes and input hints for external input methods but do not change input themselves
	- according to Company, we connect to insert-text for that
- GtkLevelBar
- GtkMenuButton
- **GtkSearchEntry**

### GTK+ 3.8
ships with: Ubuntu Saucy (13.10)

Not many interesting new things to us here, unless you count widget-internal tickers and single-click instead of double-click to select list items (a la KDE)... and oh yeah, also widget opacity.

### GTK+ 3.10
ships with: **Ubuntu Trusty (14.04 LTS)**
<br>GLib version: 2.40

- tab character stops in GtkEntry
- GtkHeaderBar
	- intended for titlebar overrides; GtkInfoBar is what I keep thinking GtkHeaderBar is
- **GtkListBox**
- GtkRevealer for smooth animations of disclosure triangles
- GtkSearchBar for custom search popups
- **GtkStack and GtkStackSwitcher**
- titlebar overrides (seems to be the hot new thing)

### GTK+ 3.12
ships with: Ubuntu Utopic (14.10)
<br>GLib version: 2.42

- GtkActionBar (basically like the bottom-of-the-window toolbars in Mac programs)
- gtk_get_locale_direction(), for internationalization
- more control over GtkHeaderBar
- **GtkPopover**
	- GtkPopovers on GtkMenuButtons
- GtkStack signaling
- **gtk_tree_path_new_from_indicesv()** (for when we add Table if we have trees too)

### GTK+ 3.14
ships with: **Debian Jessie**, Ubuntu Vivid (15.04)
<br>GLib version: Debian: 2.42, Ubuntu: 2.44

- gestures
- better GtkListbox selection handling
- more style classes (TODO also prior?)
- delayed switch changes on GtkSwitch

### GTK+ 3.16
ships with: Ubuntu Wily (15.10)
<br>GLib version: 2.46

- gtk_clipboard_get_default() (???)
- **GtkGLArea**
- proper xalign and yalign for GtkLabel; should get rid of runtime deprecation warnings
- better control of GtkListBox model-based creation (probably not relevant but)
- GtkModelButton (for GActions; probably not relevant?)
- wide handles on GtkPaned
- GtkPopoverMenu
- IPP paper names in GtkPaperSize (TODO will this be important for printing?)
- multiple matches in GtkSearchEntry (TODO evaluate priority)
- **GtkStackSidebar**
-  GTK_STYLE_CLASS_LABEL, GTK_STYLE_CLASS_MONOSPACE, GTK_STYLE_CLASS_STATUSBAR, GTK_STYLE_CLASS_TOUCH_SELECTION, GTK_STYLE_CLASS_WIDE (TODO figure out which of these are useful)
- GtkTextView: extend-selection
- GtkTextView: font fallbacks

### GTK+ 3.18

### GTK+ 3.20

## Cocoa
### Mac OS X 10.8

- Foundation ([full details](https://developer.apple.com/library/mac/releasenotes/Foundation/RN-FoundationOlderNotes/#//apple_ref/doc/uid/TP40008080-TRANSLATED_CHAPTER_965-TRANSLATED_DEST_999B))
	- NSDateComponents supports leap months
	- NSNumberFormatter and NSDateFormatter default to 10.4 behavior by default (need to explicitly do this on 10.7)
	- **NSUserNotification and NSUserNotificationCenter for Growl-style notifications**
	- better linguistic triggers for Spanish and Italian
	- NSByteCountFormatter
- AppKit ([full details](https://developer.apple.com/library/mac/releasenotes/AppKit/RN-AppKitOlderNotes/#X10_8Notes))
	- view-based NSTableView/NSOutlineView have expansion tooltips
	- NSScrollView magnification
	- Quick Look events; TODO see if they conflict with keyboard handling in Area
	- NSPageController (maybe useful?)
	- not useful for package UI, but may be useful for a new library (probably not by me): NSSharingService
	- NSOpenPanel and NSSavePanel are now longer NSPanels or NSWindows in sandboxed applications; this may be an issue should anyone dare to enable sandboxing on a program that uses package ui
	- NSTextAlternatives
	- -[NSOpenGLContext setFullScreen] now ineffective
	- +[NSColor underPageBackgroundColor]

### Mac OS X 10.9

- Foundation ([full details](https://developer.apple.com/library/mac/releasenotes/Foundation/RN-Foundation/))
	- system-provided progress reporting/cancellation support
	- NSURLComponents
	- **NSCalendar, NSDateFormatter, and NSNumberFormatter are now thread-safe**
	- various NSCalendar and NSDateComponents improvements
- AppKit ([full details](https://developer.apple.com/library/mac/releasenotes/AppKit/RN-AppKit/))
	- sheet handling is now block-based, queued, and in NSWindow; the delegate-based NSApplication API will still exist, except without the queue
	- similar changes to NSAlert
	- **return value changes to NSAlert**
	- window visibility APIs (occlusion)
	- NSApplicationActivationPolicyAccessory
	- fullscreen toolbar behavior changes
	- status items for multiple menu bars
	- better NSSharingService support
	- a special accelerated scrolling mode, Responsive Scrolling; won't matter for us since I plan to support the scroll wheel and it won't
	- NSScrollView live scrolling notifications
	- NSScrollView floating (anchored/non-scrolling) subviews
	- better multimonitor support
	- better key-value observing for NSOpenPanel/NSSavePanel (might want to look this up to see if we can override some other juicy details... TODO)
	- better accessory view key-view handling in NSOpenPanel/NSSavePanel
	- NSAppearance
	- **-[NSTableView moveRowAtIndex:toIndex:] bug regarding first responders fixed**
	- view-specific RTL overrides

### Mac OS X 10.10

### Mac OS X 10.11
* **NSLayoutGuide**


================================================
FILE: LICENSE
================================================
Copyright (c) 2014 Pietro Gagliardi

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.

(this is called the MIT License or Expat License; see http://www.opensource.org/licenses/MIT)


================================================
FILE: NEWS.md
================================================
# Old News

* **27 November 2016**
	* Decided to split the table stuff into its own branch. It will be developed independently of everything else, along with a few other features.

* **2 November 2016**
	* Added two new functions to replace the deleted `uiWindowPosition()` and friends: `uiAreaBeginUserWindowMove()` and `uiAreaBeginUserWindowResize()`. When used in a `uiAreaHandler.Mouse()` event handler, these let you initiate a user-driven mouse move or mouse resize of the window at any point in a uiArea.

* **31 October 2016**
	* @krakjoe noticed that I accidentally used thread-unsafe code in uiQueueMain() on Unix. Fixed.

* **24 October 2016**
	* `uiWindowSetContentSize()` on Unix no longer needs to call up the GTK+ main loop. As a result, bugs related to strange behavior using that function (and the now-deleted `uiWindowSetPosition()` and `uiWindowCenter()`) should go away. I'll need to go through the bugs to verify as much, though.

* **22 October 2016**
	* Due to being unable to guarantee they will work (especially as we move toward capability-driven window systems like Wayland), or being unable to work without hacking that breaks other things, the following functions have been removed: `uiWindowPosition()`, `uiWindowSetPosition()`, `uiWindowCenter()`, and `uiWindowOnPositionChanged()`. Centering may come back at some point in the future, albeit in a possibly restricted form. A function to initiate a user move when a part of a uiArea is clicked will be provided soon.

* **21 October 2016**
	* `uiDrawTextWeightUltraBold` is now spelled correctly. Thanks to @krakjoe.

* **18 June 2016**
	* Help decide [the design of tables and trees in libui](https://github.com/andlabs/libui/issues/159); the implementation starts within the next few days, if not tomorrow!

* **17 June 2016**
	* **CMake 3.1.0 is now required.** This is due to CMake's rapid development pace in the past few years adding things libui needs to build on as many systems as possible. If your OS is supported by libui but its repositories ship with an older version of CMake, you will need to find an updated one somewhere.
	* Please help [plan out a better menu API](https://github.com/andlabs/libui/issues/152).
	* `uiMainSteps()` no longer takes any arguments and no longer needs to invoke a function to do the work. You still need to call it, but once you do, it will return immediately and you can then get right to your main loop.
	* **CMake 3.1.0 is now required.** This is due to CMake's rapid development pace in the past few years adding things libui needs to build on as many systems as possible. If your OS is supported by libui but its repositories ship with an older version of CMake, you will need to find an updated one somewhere.
	* Added `uiNewVerticalSeparator()` to complement `uiNewHorizontalSeparator()`.

* **16 June 2016**
	* Added `uiWindowContentSize()`, `uiWindowSetContentSize()`, and `uiWindowOnContentSizeChanged()` methods for manipulating uiWindow content sizes. Note the use of "content size"; the size you work with does NOT include window decorations (titlebars, menus, etc.).
	* Added `uiWindowFullscreen()` and `uiWindowSetFullscreen()` to allow making fullscreen uiWindows, taking advantage of OS facilities for fullscreen and without changing the screen resolution (!).
	* Added `uiWindowBorderless()` and `uiWindowSetBorderless()` for allowing borderless uiWindows.
	* Added `uiMainSteps()`. You call this instead of `uiMain()` if you want to run the main loop yourself. You pass in a function that will be called; within that function, you call `uiMainStep()` repeatedly until it returns 0, doing whatever you need to do in the meantime. (This was needed because just having `uiMainStep()` by itself only worked on some systems.)
	* Added `uiProgressBarValue()` and allowed passing -1 to `uiProgressBarSetValue()` to make an indeterminate progress bar. Thanks to @emersion.

* **15 June 2016**
	* Added `uiFormDelete()`; thanks to @emersion.
	* Added `uiWindowPosition()`, `uiWindowSetPosition()`, `uiWindowCenter()`, and `uiWindowOnPositionChanged()`, methods for manipulating uiWindow position.

* **14 June 2016**
	* uiDarwinControl now has a `ChildVisibilityChanged()` method and a corresponding `NotifyVisibilityChanged()` function that is called by the default show/hide handlers. This is used to make visibility changes work on OS X; uiBox, uiForm, and uiGrid all respect these now.
	* The same has been done on the Windows side as well.
	* Hiding and showing controls and padding calculations are now correct on Windows at long last.
	* Hiding a control in a uiForm now hides its label on all platforms.

* **13 June 2016**
	* `intmax_t` and `uintmax_t` are no longer used for libui API functions; now we use `int`. This should make things much easier for bindings. `int` should be at least 32 bits wide; this should be sufficient for all but the most extreme cases.

* **12 June 2016**
	* Added `uiGrid`, a new container control that arranges controls in rows and columns, with stretchy ("expanding") rows, stretchy ("expanding") columns, cells that span rows and columns, and cells whose content is aligned in either direction rather than just filling. It's quite powerful, is it? =P

* **8 June 2016**
	* Added `uiForm`, a new container control that arranges controls vertically, with properly aligned labels on each. Have fun!

* **6 June 2016**
	* Added `uiRadioButtonsSelected()`, `uiRadioButtonsSetSelected()`, and `uiRadioButtonsOnSelected()` to control selection of a radio button and catch an event when such a thing happens.

* **5 June 2016**
	* **Alpha 3.1 is here.** This was a much-needed update to Alpha 3 that changes a few things:
		* **The build system is now cmake.** cmake 2.8.11 or higher is needed.
		* Static linking is now fully possible.
		* MinGW linking is back, but static only.
	* Added `uiNewPasswordEntry()`, which creates a new `uiEntry` suitable for entering passwords.
	* Added `uiNewSearchEntry()`, which creates a new `uiEntry` suitable for searching. On some systems, the `OnChanged()` event will be slightly delayed and/or combined, to produce a more natural feel when searching.

* **29 May 2016**
	* **Alpha 3 is here!** Get it [here](https://github.com/andlabs/libui/releases/tag/alpha3).
	* The next packaged release will introduce:
		* uiGrid, another way to lay out controls, a la GtkGrid
		* uiOpenGLArea, a way to render OpenGL content in a libui uiArea
		* uiTable, a data grid control that may or may not have tree facilities (if it does, it will be called uiTree instead)
		* a complete, possibly rewritten, drawing and text rendering infrastructure
	* Thanks to @pcwalton, we can now statically link libui! Simply do `make STATIC=1` instead of just `make`.
		* On Windows you must link both `libui.lib` and `libui.res` AND provide a Common Controls 6 manifest for output static binaries to work properly.

* **28 May 2016**
	* As promised, **the minimum system requirements are now OS X 10.8 and GTK+ 3.10 for OS X and Unix, respectively**.

* **26 May 2016**
	* Two OS X-specific functions have been added: `uiDarwinMarginAmount()` and `uiDarwinPaddingAmount()`. These return the amount of margins and padding, respectively, to give to a control, and are intended for container implementations. These are suitable for the constant of a NSLayoutConstraint. They both take a pointer parameter that is reserved for future use and should be `NULL`.

* **25 May 2016**
	* uiDrawTextLayout attributes are now specified in units of *graphemes* on all platforms. This means characters as seen from a user's perspective, not Unicode codepoints or UTF-8 bytes. So a long string of combining marker codepoints after one codepoint would still count as one grapheme.

* **24 May 2016**
	* You can now help choose [a potential new build system for libui](https://github.com/andlabs/libui/issues/62).
	* Tomorrow I will decide if OS X 10.7 will also be dropped alongside GTK+ 3.4-3.8 this Saturday. Stay tuned.
	* As promised, `uiCombobox` is now split into `uiCombobox` for non-editable comboboxes and `uiEditableCombobox` for editable comboboxes. Mind the function changes as well :)
	* There is a new function `uiMainStep()`, which runs one iteration of the main loop. It takes a single boolean argument, indicating whether to wait for an event to occur or not. It returns true if an event was processed (or if no event is available if you don't want to wait) and false if the event loop was told to stop (for instance, `uiQuit()` was called).

* **23 May 2016**
	* Fixed surrogate pair drawing on OS X.

* **22 May 2016**
	* Two more open questions I'd like your feedback on are available [here](https://github.com/andlabs/libui/issues/48) and [here](https://github.com/andlabs/libui/issues/25).
	* Sometime in the next 48 hours (before 23:59 EDT on 24 May 2016) I will split `uiCombobox` into two separate controls, `uiCombobox` and `uiEditableCombobox`, each with slightly different events and "selected item" mechanics. Prepare your existing code.
	* Removed `uiControlVerifyDestroy()`; that is now part of `uiFreeControl()` itself.
	* Added `uiPi`, a constant for π. This is provided for C and C++ programmers, where there is no standard named constant for π; bindings authors shouldn't need to worry about this.
	* Fixed uiMultilineEntry not properly having line breaks on Windows.
	* Added `uiNewNonWrappingMultilineEntry()`, which creates a uiMultilineEntry that scrolls horizontally instead of wrapping lines. (This is not documented as being changeable after the fact on Windows, hence it's a creation-time choice.)
	* uiAreas on Windows and some internal Direct2D areas now respond to `WM_PRINTCLIENT` properly, which should hopefully increase the quality of screenshots.
	* uiDateTimePicker on GTK+ works properly on RTL layouts and no longer disappears off the bottom of the screen if not enough room is available. It will also no longer be marked for localization of the time format (what the separator should be and whether to use 24-hour time), as that information is not provided by the locale system. :(
	* Added `uiUserBugCannotSetParentOnToplevel()`, which should be used by implementations of toplevel controls in their `SetParent()` implementations. This will also be the beginning of consolidating common user bug messages into a single place, though this will be one of the only few exported user bug functions.
	* uiSpinbox and uiSlider now merely swap their min and max if min ≥ max. They will no longer panic and do nothing, respectively.
	* Matrix scaling will no longer leave the matrix in an invalid state on OS X and GTK+.
	* `uiMultilineEntrySetText()` and `uiMutlilineEntryAppend()` on GTK+ no longer fire `OnChanged()` events.

* **21 May 2016**
	* I will now post announcements and updates here.
	* Now that Ubuntu 16.04 LTS is here, no earlier than next Saturday, 28 May 2016 at noon EDT, **I will bump the minimum GTK+ version from 3.4 to 3.10**. This will add a lot of new features that I can now add to libui, such as search-oriented uiEntries, lists of arbitrary control layouts, and more. If you are still running a Linux distribution that doesn't come with 3.10, you will either need to upgrade or use jhbuild to set up a newer version of GTK+ in a private environment.
	* You can decide if I should also drop OS X 10.7 [here](https://github.com/andlabs/libui/issues/46).


================================================
FILE: README.md
================================================
# libui: a portable GUI library for C

This README is being written.<br>
[![Build Status, Azure Pipelines](https://dev.azure.com/andlabs/libui/_apis/build/status/andlabs.libui?branchName=master)](https://dev.azure.com/andlabs/libui/_build/latest?definitionId=1&branchName=master)<br>
[![Build Status, AppVeyor](https://ci.appveyor.com/api/projects/status/ouyk78c52mmisa31/branch/master?svg=true)](https://ci.appveyor.com/project/andlabs/libui/branch/master)

## Status

It has come to my attention that I have not been particularly clear about how usable or feature-complete libui is, and that this has fooled many people into expecting more from libui right this moment than I have explicitly promised to make available. I apologize for not doing this sooner.

libui is currently **mid-alpha** software. Much of what is currently present runs stabily enough for the examples and perhaps some small programs to work, but the stability is still a work-in-progress, much of what is already there is not feature-complete, some of it will be buggy on certain platforms, and there's a lot of stuff missing. In short, here's a list of features that I would like to add to libui, but that aren't in yet:

- trees
- clipboard support, including drag and drop
- more and better dialogs
- printing
- accessibility for uiArea and custom controls
- document-based programs
- tighter OS integration (especially for document-based programs), to allow programs to fully feel native, rather than merely look and act native
- better support for standard dialogs and features (search bars, etc.)
- OpenGL support

In addition, [here](https://github.com/andlabs/libui/issues?utf8=%E2%9C%93&q=master+in%3Atitle+is%3Aissue+is%3Aopen) is a list of issues generalizing existing problems.

Furthermore, libui is not properly fully documented yet. This is mainly due to the fact that the API was initially unstable enough so as to result in rewriting documentation multiple times, in addition to me not being happy with really any existing C code documentation tool. That being said, I have started to pin down my ideal code documentation style in parts of `ui.h`, most notably in the uiAttributedString APIs. Over time, I plan on extending this to the rest of the headers. You can also use [the documentation for libui's Go bindings](https://godoc.org/github.com/andlabs/ui) as a reference, though it is somewhat stale and not optimally written.

But libui is not dead; I am working on it whenever I can, and I hope to get it to a point of real quality soon!

## News

*Note that today's entry (Eastern Time) may be updated later today.*

* **7 April 2019**
	* **The build system has been switched to Meson.** See below for instructions. This change was made because the previous build system, CMake, caused countless headaches over trivial issues. Meson was chosen due to how unproblematic setting up libui's build just right was, as well as having design goals that are by coincidence closely aligned with what libui wants.
	* Travis CI has been replaced with Azure Pipelines and much of the AppVeyor CI configuration was integrated into the Azure Pipelines configuration. This shouldn't affect most developers.

* **1 September 2018**
	* **Alpha 4.1 is here.** This is an emergency fix to Alpha 4 to fix `uiImageAppend()` not working as documented. It now works properly, with one important difference you'll need to care about: **it now requires image data to be alpha-premultiplied**. In addition, `uiImage` also is implemented slightly more nicely now, and `ui.h` has minor documentation typo fixes.
	* Alpha 4.1 also tries to make everything properly PIC-enabled.

* **10 August 2018**
	* **Alpha 4 is finally here.** Everything from Alpha 3.5 and what's listed below is in this release; the two biggest changes are still the new text drawing API and new uiTable control. In between all that is a whole bunch of bugfixes, and hopefully more stability too. Thanks to everybody who helped contribute!
	* Alpha 4 should hopefully also include automated binary releases via CI. Thanks to those who helped set that up!

* **8 August 2018**
	* Finally introduced an API for loading images, `uiImage`, and a new control, `uiTable`, for displaying tabular data. These provide enough basic functionality for now, but will be improved over time. You can read the documentation for the new features as they are [here](https://github.com/andlabs/libui/blob/f47e1423cf95ad7b1001663f3381b5a819fc67b9/uitable.h). Thanks to everyone who helped get to this point, in particular @bcampbell for the initial Windows code, and to everyone else for their patience!

* **30 May 2018**
	* Merged the previous Announcements and Updates section of this README into a single News section, and merged the respective archive files into a single NEWS.md file.

* **16 May 2018**
	* Thanks to @parro-it and @msink, libui now has better CI, including AppVeyor for Windows CI, and automated creation of binary releases when I make a tagged release.

* **13 May 2018**
	* Added new functions to work with uiDateTimePickers: `uiDateTimePickerTime()`, `uiDateTimePickerSetTime()`, and `uiDateTimePickerOnChanged()`. These operate on standard `<time.h>` `struct tm`s. Thanks @cody271!
	* Release builds on Windows with MSVC should be fixed now; thanks @l0calh05t, @slahn, @mischnic, and @zentner-kyle.

* **12 May 2018**
	* GTK+ and OS X now have a cleaner build process for static libraries which no longer has intermediate files and differing configurations. As a result, certain issues should no longer be present. New naming rules for internal symbols of libui have also started being drafted; runtime symbols and edge cases still need to be handled (and the rules applied to Windows) before this can become a regular thing.

* **2 May 2018**
	* On Windows, you no longer need to carry around a `libui.res` file with static builds. You do need to link in the appropriate manifest file, such as the one in the `windows/` folder (I still need to figure out exactly what is needed apart from the Common Controls v6 dependency, or at least to create a complete-ish template), or at least include it alongside your executables. This also means you should no longer see random cmake errors when building the static libraries.

* **18 April 2018**
	* Introduced a new `uiTimer()` function for running code on a timer on the main thread. (Thanks to @cody271.)
	* Migrated all code in the `common/` directory to use `uipriv` prefixes for everything that isn't `static`. This is the first step toward fixing static library oddities within libui, allowing libui to truly be safely used as either a static library or a shared library.

* **18 March 2018**
	* Introduced an all-new formatted text API that allows you to process formatted text in ways that the old API wouldn't allow. You can read on the whole API [here](https://github.com/andlabs/libui/blob/8944a3fc5528445b9027b1294b6c86bae03eeb89/ui_attrstr.h). There is also a new examples for it: `drawtext`, which shows the whole API at a glance. It doesn't yet support measuring or manipulating text, nor does it currently support functions that would be necessary for things like text editors; all of this will be added back later.
	* libui also now uses my [utf library](https://github.com/andlabs/utf) for UTF-8 and UTF-16 processing, to allow consistent behavior across platforms. This usage is not completely propagated throughout libui, but the Windows port uses it in most places now, and eventually this will become what libui will use throughout.
	* Also introduced a formal set of contribution guidelines, see `CONTRIBUTING.md` for details. They are still WIP.

* **17 February 2018**
	* The longstanding Enter+Escape crashes on Windows have finally been fixed (thanks to @lxn).
	* **Alpha 3.5 is now here.** This is a quickie release primiarly intended to deploy the above fix to package ui itself. **It is a partial binary release; sorry!** More new things will come in the next release, which will also introduce semver (so it will be called v0.4.0 instead).
	* Alpha 3.5 also includes a new control gallery example. The screenshots below have not been updated yet.

*Old announcements can be found in the NEWS.md file.*

## Runtime Requirements

* Windows: Windows Vista SP2 with Platform Update or newer
* Unix: GTK+ 3.10 or newer
* Mac OS X: OS X 10.8 or newer

## Build Requirements

* All platforms:
	* [Meson](https://mesonbuild.com/) 0.48.0 or newer
	* Any of Meson's backends; this section assumes you are using [Ninja](https://ninja-build.org/), but there is no reason the other backends shouldn't work.
* Windows: either
	* Microsoft Visual Studio 2013 or newer (2013 is needed for `va_copy()`) — you can build either a static or a shared library
	* MinGW-w64 (other flavors of MinGW may not work) — **you can only build a static library**; shared library support will be re-added once the following features come in:
		* [Isolation awareness](https://msdn.microsoft.com/en-us/library/aa375197%28v=vs.85%29.aspx), which is how you get themed controls from a DLL without needing a manifest
* Unix: nothing else specific
* Mac OS X: nothing else specific, so long as you can build Cocoa programs

## Building

libui uses only [the standard Meson build options](https://mesonbuild.com/Builtin-options.html), so a libui build can be set up just like any other:

```
$ # you must be in the top-level libui directory, otherwise this won't work
$ meson setup build [options]
$ ninja -C build
```

Once this completes, everything will be under `build/meson-out/`. (Note that unlike the previous build processes, everything is built by default, including tests and examples.)

The most important options are:

* `--buildtype=(debug|release|...)` controls the type of build made; the default is `debug`. For a full list of valid values, consult [the Meson documentation](https://mesonbuild.com/Running-Meson.html).
* `--default-library=(shared|static)` controls whether libui is built as a shared library or a static library; the default is `shared`. You currently cannot specify `both`, as the build process changes depending on the target type (though I am willing to look into changing things if at all possible).
* `-Db_sanitize=which` allows enabling the chosen [sanitizer](https://github.com/google/sanitizers) on a system that supports sanitizers. The list of supported values is in [the Meson documentation](https://mesonbuild.com/Builtin-options.html#base-options).
* `--backend=backend` allows using the specified `backend` for builds instead of `ninja` (the default). A list of supported values is in [the Meson documentation](https://mesonbuild.com/Builtin-options.html#universal-options).

Most other built-in options will work, though keep in mind there are a handful of options that cannot be overridden because libui depends on them holding a specific value; if you do override these, though, libui will warn you when you run `meson`.

The Meson website and documentation has more in-depth usage instructions.

For the sake of completeness, I should note that the default value of `--layout` is `flat`, not the usual `mirror`. This is done both to make creating the release archives easier as well as to reduce the chance that shared library builds will fail to start on Windows because the DLL is in another directory. You can always specify this manually if you want.

Backends other than `ninja` should work, but are untested by me.

## Installation

Meson also supports installing from source; if you use Ninja, just do

```
$ ninja -C build install
```

When running `meson`, the `--prefix` option will set the installation prefix. [The Meson documentation](https://mesonbuild.com/Builtin-options.html#universal-options) has more information, and even lists more fine-grained options that you can use to control the installation.

#### Arch Linux

Can be built from AUR: https://aur.archlinux.org/packages/libui-git/

## Documentation

Needs to be written. Consult `ui.h` and the examples for details for now.

## Language Bindings

libui was originally written as part of my [package ui for Go](https://github.com/andlabs/ui). Now that libui is separate, package ui has become a binding to libui. As such, package ui is the only official binding.

Other people have made bindings to other languages:

Language | Bindings
--- | ---
C++ | [libui-cpp](https://github.com/billyquith/libui-cpp), [cpp-libui-qtlike](https://github.com/aoloe/cpp-libui-qtlike)
C# / .NET Framework | [LibUI.Binding](https://github.com/NattyNarwhal/LibUI.Binding)
C# / .NET Core | [DevZH.UI](https://github.com/noliar/DevZH.UI), [SharpUI](https://github.com/benpye/sharpui/), [TCD.UI](https://github.com/tacdevel/tcdfx)
CHICKEN Scheme | [wasamasa/libui](https://github.com/wasamasa/libui)
Common Lisp | [jinwoo/cl-ui](https://github.com/jinwoo/cl-ui)
Crystal | [libui.cr](https://github.com/Fusion/libui.cr), [hedron](https://github.com/Qwerp-Derp/hedron)
D | [DerelictLibui (flat API)](https://github.com/Extrawurst/DerelictLibui), [libuid (object-oriented)](https://github.com/mogud/libuid)
Euphoria | [libui-euphoria](https://github.com/ghaberek/libui-euphoria)
Harbour | [hbui](https://github.com/rjopek/hbui)
Haskell | [haskell-libui](https://github.com/beijaflor-io/haskell-libui)
JavaScript/Node.js | [libui-node](https://github.com/parro-it/libui-node), [libui.js (merged into libui-node?)](https://github.com/mavenave/libui.js), [proton-native](https://github.com/kusti8/proton-native), [vuido](https://github.com/mimecorg/vuido)
Julia | [Libui.jl](https://github.com/joa-quim/Libui.jl)
Kotlin | [kotlin-libui](https://github.com/msink/kotlin-libui)
Lua | [libuilua](https://github.com/zevv/libuilua), [libui-lua](https://github.com/mdombroski/libui-lua), [lui](http://tset.de/lui/index.html), [lui](https://github.com/zhaozg/lui)
Nim | [ui](https://github.com/nim-lang/ui)
Perl6 | [perl6-libui](https://github.com/Garland-g/perl6-libui)
PHP | [ui](https://github.com/krakjoe/ui)
Python | [pylibui](https://github.com/joaoventura/pylibui)
Ruby | [libui-ruby](https://github.com/jamescook/libui-ruby), [libui](https://github.com/kojix2/libui)
Rust | [libui-rs](https://github.com/rust-native-ui/libui-rs)
Scala | [scalaui](https://github.com/lolgab/scalaui)
Swift | [libui-swift](https://github.com/sclukey/libui-swift)

## Frequently Asked Questions

### Why does my program start in the background on OS X if I run from the command line?
OS X normally does not start program executables directly; instead, it uses [Launch Services](https://developer.apple.com/reference/coreservices/1658613-launch_services?language=objc) to coordinate the launching of the program between the various parts of the system and the loading of info from an .app bundle. One of these coordination tasks is responsible for bringing a newly launched app into the foreground. This is called "activation".

When you run a binary directly from the Terminal, however, you are running it directly, not through Launch Services. Therefore, the program starts in the background, because no one told it to activate! Now, it turns out [there is an API](https://developer.apple.com/reference/appkit/nsapplication/1428468-activateignoringotherapps) that we can use to force our app to be activated. But if we use it, then we'd be trampling over Launch Services, which already knows whether it should activate or not. Therefore, libui does not step over Launch Services, at the cost of requiring an extra user step if running directly from the command line.

See also [this](https://github.com/andlabs/libui/pull/20#issuecomment-211381971) and [this](http://stackoverflow.com/questions/25318524/what-exactly-should-i-pass-to-nsapp-activateignoringotherapps-to-get-my-appl).

## Contributing

See `CONTRIBUTING.md`.

## Screenshots

From examples/controlgallery:

![Windows](examples/controlgallery/windows.png)

![Unix](examples/controlgallery/unix.png)

![OS X](examples/controlgallery/darwin.png)


================================================
FILE: TODO.md
================================================
- make sure the last line of text layouts include leading

- documentation notes:
	- static binaries do not link system libraries, meaning apps still depend on shared GTK+, etc.
	- ui*Buttons are NOT compatible with uiButton functions

- more robust layout handling
	- uiFormTie() for ensuring multiple uiForms have the same label area widths
	- uiSizeGroup for size groups (GtkSizeGroup on GTK+, auto layout constraints on OS X; consider adding after 10.8 is gone)

- windows: should the initial hwndInsertAfter be HWND_BOTTOM for what we want?

- windows: document the rules for controls and containers

- windows: document the minimum size change propagation system

- provisions for controls that cannot be grown? especiailly for windows

- LC_VERSION_MIN_MACOSX has the 10.11 SDK; see if we can knock it down to 10.8 too; OS version is fine
	- apply the OS version stuff to the test program and examples too
	- what about micro versions (10.8.x)? force 10.8.0?

- go through ALL the objective-c objects we create and make sure we are using the proper ownership (alloc/init and new are owned by us, all class method constructors are autoreleased - thanks mikeash)

- on OS X, edit shortcuts like command-C working require that the menu entries be defined, or so it seems, even for NSAlert
	- other platforms?

- make sure all OS X event handlers that use target-action set the action to NULL when the target is unset

- provide a way to get the currently selected uiTab page? set?

- make it so that the windows cntrols only register a resize if their new minimum size is larger than their current size to easen the effect of flicker
	- it won't remove that outright, but it'll help

- add an option to the test program to run page7b as an independent test in its own window
	- same for page7c

- http://blogs.msdn.com/b/oldnewthing/archive/2004/01/12/57833.aspx provide a DEF file on Windows

- all ports: update state when adding a control to a parent
- should uiWindowsSizing be computed against the window handle, not the parent?

- DPI awareness on windows

- http://stackoverflow.com/questions/4543087/applicationwillterminate-and-the-dock-but-wanting-to-cancel-this-action

ultimately:
- MAYBE readd lifetime handling/destruction blocking
- related? [12:25] <ZeroOne> And the blue outline on those buttons [ALL clicked buttons on Windows 7] won't go away
	- I get this too
		- not anymore
- SWP_NOCOPYBITS to avoid button redraw issues on Windows when not in tab, but only when making resize faster
- secondary side alignment control in uiBox
- Windows: don't abort if a cleanup function fails?

- 32-bit Mac OS X support (requires lots of code changes)
	- change the build system to be more receptive to arch changes

notes to self
- explicitly document label position at top-left corner
- explicitly document that if number of radio buttons >= 1 there will always be a selection
- mark that uiControlShow() on a uiWindow() will bring to front and give keyboard focus because of OS X
	- make sure ShowWindow() is sufficient for zorder on Windows
- document that you CAN use InsertAt functions to insert at the first invalid index, even if the array is empty
- note that uiTabInsertAt() does NOT change the current tab page (it may change its index if inserting before the current page)
- note that the default action for uiWindowOnClosing() is to return 0 (keep the window open)
- note that uiInitOptions should be initialized to zero
- explicitly document that uiCheckboxSetChecked() and uiEntrySetText() do not fire uiCheckboxOnToggled() and uiEntryOnChanged(), respectively
- note that if a menu is requested on systems with menubars on windows but no menus are defined, the result is a blank menubar, with whatever that means left up to the OS to decide
- note that handling of multiple consecutive separators in menus, leading separators in menus, and trailing separators in menus are all OS-defined
- note that uiDrawMatrixInvert() does not change the matrix if it fails
- note that the use of strings that are not strictly valid UTF-8 results in undefined behavior

- test RTL
	- automate RTL
- now that stock items are deprecated, I have to maintain translations of the Cancel, Open, and Save buttons on GTK+ myself (thanks baedert in irc.gimp.net/#gtk+)
	- either that or keep using stock items

- http://blogs.msdn.com/b/oldnewthing/archive/2014/02/26/10503148.aspx

- build optimizations

- use http://www.appveyor.com/ to do Windows build CI since people want CI






- consider just having the windows backend in C++
	- consider having it all in C++



don't forget LONGTERMs as well

notes
- http://blogs.msdn.com/b/oldnewthing/archive/2004/03/29/101121.aspx on accelerators

- group and tab should act as if they have no child if the child is hidden
on windows



- a way to do recursive main loops
	- how do we handle 0 returns from non-recursive uiMainStep() calls that aren't the main loop? (event handlers, for instance)
- should repeated calls to uiMainStep() after uiQuit() return 0 reliably? this will be needed for non-recursive loops

http://stackoverflow.com/questions/38338426/meaning-of-ampersand-in-rc-files/38338841?noredirect=1#comment64093084_38338841

label shortcut keys

- remove whining from source code

[01:41:47]  <vrishab>	Hi. does pango support "fgalpha". I see that foreground="112233xx" works ( alpha=xx ), but fgalpha is a no-op
[01:52:29]  <vrishab>	pango_attr_foreground_alpha_new (32767) seems to be called in either case, but only the "foreground" attr works
[01:56:09] 	lolek (lolek@ip-91-244-230-76.simant.pl) joined the channel
[01:57:48]  <vrishab>	ok. seems like "foreground" is mandatory attr, 1. "foreground-without-alpha" + "alpha" works 2. "foreground-with-alpha" works. 3. "alpha" alone doesn
[01:57:52]  <vrishab>	't work
[01:58:29]  <vrishab>	Is there a way to just specify alpha on the current foreground color ?
[02:00:23] 	lolek (lolek@ip-91-244-230-76.simant.pl) left the channel
[02:07:41] 	mjog (mjog@uniwide-pat-pool-129-94-8-98.gw.unsw.edu.au) left IRC (Quit: mjog)
[02:08:10] 	seb128 (seb128@53542B83.cm-6-5a.dynamic.ziggo.nl) joined the channel
[02:12:37]  <andlabs>	huh
[02:12:41]  <andlabs>	what version of pango?
[02:13:05]  <vrishab>	the latest .
[02:15:00]  <vrishab>	1.40.3
[02:20:46]  <andlabs>	I'll ahve to keep this in mind then, thanks
[02:20:59]  <andlabs>	if only there was a cairo-specific attribute for alpha...

FONT LOADING

[00:10:08]  <hergertme>	andlabs: is there API yet to load from memory? last i checked i only found from file (which we use in builder). https://git.gnome.org/browse/gnome-builder/tree/libide/editor/ide-editor-map-bin.c#n115
[00:13:12] 	mrmcq2u_ (mrmcq2u@109.79.53.90) joined the channel
[00:14:59] 	mrmcq2u (mrmcq2u@109.79.73.102) left IRC (Ping timeout: 181 seconds)
[00:15:19]  <andlabs>	hergertme: no, which is why I was asking =P
[00:15:30]  <andlabs>	I would have dug down if I could ensure at least something about the backends a GTK+ 3 program uses
[00:15:39]  <andlabs>	on all platforms except windows and os x
[00:16:11]  <hergertme>	to the best of my (partially outdated, given pace of foss) knowledge there isn't an api to load from memory
[00:16:28]  <hergertme>	you can possibly make a tmpdir and put a temp file in there
[00:16:52]  <hergertme>	and load that as your font dir in your FcConfig, so any PangoFontDescription would point to that one font, no matter what
[00:17:18]  <hergertme>	(using the API layed out in that link)
[00:18:18] 	dsr1014__ (dsr1014@c-73-72-102-18.hsd1.il.comcast.net) joined the channel
[00:35:18] 	simukis_ (simukis@78-60-58-6.static.zebra.lt) left IRC (Quit: simukis_)
[00:35:48] 	dreamon_ (dreamon@ppp-188-174-49-41.dynamic.mnet-online.de) joined the channel
[00:40:09] 	samtoday_ (samtoday@114-198-116-132.dyn.iinet.net.au) joined the channel
[00:40:32] 	mjog (mjog@120.18.225.46) joined the channel
[00:40:38]  <andlabs>	hergertme: not necessarily fontconfig
[00:40:45]  <andlabs>	it can be with ft2 or xft I guess
[00:40:55]  <andlabs>	especially since I want the API NOT to make the font part of the font panel
[00:42:07]  <hergertme>	what sort of deprecated code are you trying to support?
[00:42:35]  <hergertme>	both of those are deprecated in pango fwiw
[00:43:06]  <hergertme>	on Linux im pretty sure we use FC everywhere these days
[00:44:46]  <hergertme>	(and gtk_widget_set_font_map() is how you get your custom font into a widget without affecting the global font lists, as layed out in that link)
[00:49:14] 	vasaikar (vasaikar@125.16.97.121) joined the channel
[00:50:14] 	karlt (karl@2400:e780:801:224:f121:e611:d139:e70e) left IRC (Client exited)
[00:50:49] 	karlt (karl@2400:e780:801:224:f121:e611:d139:e70e) joined the channel
[00:51:43] 	PioneerAxon (PioneerAxo@122.171.61.146) left IRC (Ping timeout: 180 seconds)
[00:57:47] 	PioneerAxon (PioneerAxo@106.201.37.181) joined the channel
[01:03:01] 	karlt (karl@2400:e780:801:224:f121:e611:d139:e70e) left IRC (Ping timeout: 181 seconds)
[01:05:49] 	muhannad (muhannad@95.218.26.152) left IRC (Quit: muhannad)
[01:07:51]  <andlabs>	hergertme: hm
[01:07:54]  <andlabs>	all right, thanks
[01:08:05]  <andlabs>	hergertme: fwiw right now my requirement is 3.10
[01:10:47]  <hergertme>	ah, well you'll probably be missing the neccesary font API on gtk_widget
[01:11:04]  <hergertme>	but pango should be fine even back as far as https://developer.gnome.org/pango/1.28/PangoFcFontMap.html
[01:11:56]  <andlabs>	good
[01:12:04]  <andlabs>	because this is for custom drawing into a DrawingArea
[01:14:12]  <hergertme>	presumably just create your PangoContext as normal, but call pango_context_set_font_map() with the map you've setup. now, the load a font from a file i dont think was added to FontConfig until later though (not sure what release)
[01:15:53]  <hergertme>	FcConfigAppFontAddFile() <-- that API
[01:16:30]  <hergertme>	great, and they don't say what version the API was added in teh docs
function: ide_editor_map_bin_add()

- Mouse ClickLock: do we need to do anything special? *should* we? https://msdn.microsoft.com/en-us/library/windows/desktop/ms724947(v=vs.85).aspx
- consider a uiAnticipateDoubleClick() or uiDoubleClickTime() (for a uiQueueTimer()) or something: https://blogs.msdn.microsoft.com/oldnewthing/20041015-00/?p=37553

- determine whether MSGF_USER is for and if it's correct for our uiArea message filter (if we have one)

- source file encoding and MSVC compiler itself? https://stackoverflow.com/questions/20518040/how-can-i-get-the-directwrite-padwrite-sample-to-work
	- also need to worry about object file and output encoding...
	- this also names the author of the padwrite sample

- OpenType features TODOs
	- https://stackoverflow.com/questions/32545675/what-are-the-default-typography-settings-used-by-idwritetextlayout
	- feature/shaping interaction rules for arabic: https://www.microsoft.com/typography/OpenTypeDev/arabic/intro.htm
	- other stuff, mostly about UIs and what users expect to be able to set
		- https://klim.co.nz/blog/towards-an-ideal-opentype-user-interface/
		- https://libregraphicsmeeting.org/2016/designing-for-many-applications-opentype-features-ui/
			- https://www.youtube.com/watch?v=wEyDhsH076Y
			- https://twitter.com/peter_works
		- http://ilovetypography.com/2014/10/22/better-ui-for-better-typography-adobe-petition/
		- http://silgraphite.sourceforge.net/ui/studynote.html

- add NXCOMPAT (DEP awareness) to the Windows builds
	- and ASLR too? or is that not a linker setting

OS X: embedding an Info.plist into a binary directly
https://www.objc.io/issues/6-build-tools/mach-o-executables/
TODO will this let Dictation work?
TODO investigate ad-hoc codesigning

https://blogs.msdn.microsoft.com/oldnewthing/20040112-00/?p=41083 def files for decoration (I forget if I said this earlier)

TODO ClipCursor() stuff; probably not useful for libui but still
https://blogs.msdn.microsoft.com/oldnewthing/20140102-00/?p=2183
https://blogs.msdn.microsoft.com/oldnewthing/20061117-03/?p=28973
https://msdn.microsoft.com/en-us/library/windows/desktop/ms648383(v=vs.85).aspx

https://cmake.org/Wiki/CMake_Useful_Variables
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
On Unix systems, this will make linker report any unresolved symbols from object files (which is quite typical when you compile many targets in CMake projects, but do not bother with linking target dependencies in proper order). 
(I used to have something like this back when I used makefiles; did it convert in? I forget)

look into these for the os x port
https://developer.apple.com/documentation/appkit/view_management/nseditor?language=objc
https://developer.apple.com/documentation/appkit/view_management/nseditorregistration?language=objc

for future versions of the os x port
https://developer.apple.com/documentation/appkit/nslayoutguide?language=objc and anchors
https://developer.apple.com/documentation/appkit/nsuserinterfacecompression?language=objc https://developer.apple.com/documentation/appkit/nsuserinterfacecompressionoptions?language=objc
though at some point we'll be able to use NSStackView and NSGridView directly, so...

Cocoa PDFs
https://developer.apple.com/documentation/appkit/nspdfimagerep?language=objc
https://developer.apple.com/documentation/coregraphics?language=objc
https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Printing/osxp_pagination/osxp_pagination.html#//apple_ref/doc/uid/20001051-119037
https://developer.apple.com/documentation/appkit/nsprintoperation/1529269-pdfoperationwithview?language=objc
https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Printing/osxp_printapps/osxp_printapps.html#//apple_ref/doc/uid/20000861-BAJBFGED
https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Printing/osxp_printingapi/osxp_printingapi.html#//apple_ref/doc/uid/10000083i-CH2-SW2
https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Printing/osxp_printinfo/osxp_printinfo.html#//apple_ref/doc/uid/20000864-BAJBFGED
https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Printing/osxp_printlayoutpanel/osxp_printlayoutpanel.html#//apple_ref/doc/uid/20000863-BAJBFGED
https://developer.apple.com/documentation/appkit/nspagelayout?language=objc
https://developer.apple.com/documentation/appkit/nsprintinfo?language=objc
https://developer.apple.com/documentation/applicationservices/core_printing?language=objc
https://developer.apple.com/documentation/applicationservices/1463247-pmcreatesession?language=objc
https://developer.apple.com/documentation/applicationservices/pmprintsession?language=objc
https://developer.apple.com/documentation/applicationservices/1460101-pmsessionbegincgdocumentnodialog?language=objc
https://developer.apple.com/documentation/applicationservices/1463416-pmsessionbeginpagenodialog?language=objc
https://developer.apple.com/documentation/applicationservices/1506831-anonymous/kpmdestinationprocesspdf?language=objc
https://developer.apple.com/documentation/applicationservices/1461960-pmcreategenericprinter?language=objc
https://developer.apple.com/documentation/applicationservices/1460101-pmsessionbegincgdocumentnodialog?language=objc
https://developer.apple.com/documentation/applicationservices/1464527-pmsessionenddocumentnodialog?language=objc
https://developer.apple.com/documentation/applicationservices/1461952-pmsessiongetcggraphicscontext?language=objc
https://developer.apple.com/library/content/technotes/tn2248/_index.html
https://developer.apple.com/library/content/samplecode/PMPrinterPrintWithFile/Introduction/Intro.html
https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Printing/osxp_aboutprinting/osxp_aboutprt.html

- run os x code with `OBJC_DEBUG_MISSING_POOLS=YES` and other `OBJC_HELP=YES` options
	- turn off the autorelease pool to make sure we're not autoreleasing improperly

TODO investigate -Weverything in clang alongside -Wall in MSVC (and in gcc too maybe...)

mac os x accessibility
- https://developer.apple.com/documentation/appkit/nsworkspace/1524656-accessibilitydisplayshoulddiffer?language=objc
- https://developer.apple.com/documentation/appkit/nsworkspace/1526290-accessibilitydisplayshouldincrea?language=objc
- https://developer.apple.com/documentation/appkit/nsworkspace/1533006-accessibilitydisplayshouldreduce?language=objc

uiEntry disabling bugs http://www.cocoabuilder.com/archive/cocoa/215525-nstextfield-bug-can-be.html
uiMultilineEntry disabling https://developer.apple.com/library/content/qa/qa1461/_index.html

more TODOs:
- make no guarantee about buildability of feature branches


================================================
FILE: _abort/windowevents/darwin_window.m
================================================
struct uiWindow {
	// constraints
	void (*onPositionChanged)(uiWindow *, void *);
	void *onPositionChangedData;
	BOOL suppressPositionChanged;
	// onContentSizeChanged
};

@interface windowDelegateClass : NSObject<NSWindowDelegate> {
// windowShouldClose:
- (void)windowDidMove:(NSNotification *)note;
// windowDidResize:
@end

@implementation windowDelegateClass

// - (BOOL)windowShouldClose:(id)sender

// TODO doesn't happen live
- (void)windowDidMove:(NSNotification *)note
{
	uiWindow *w;

	w = [self lookupWindow:((NSWindow *) [note object])];
	if (!w->suppressPositionChanged)
		(*(w->onPositionChanged))(w, w->onPositionChangedData);
}

// - (void)windowDidResize:(NSNotification *)note

// void uiWindowSetTitle(uiWindow *w, const char *title)

void uiWindowPosition(uiWindow *w, int *x, int *y)
{
	NSScreen *screen;
	NSRect r;

	r = [w->window frame];
	*x = r.origin.x;
	// this is the right screen to use; thanks mikeash in irc.freenode.net/#macdev
	// -mainScreen is useless for positioning (it's just the key window's screen)
	// and we use -frame, not -visibleFrame, for dealing with absolute positions
	screen = (NSScreen *) [[NSScreen screens] objectAtIndex:0];
	*y = ([screen frame].size.height - r.origin.y) - r.size.height;
}

void uiWindowSetPosition(uiWindow *w, int x, int y)
{
	// -[NSWindow setFrameTopLeftPoint:] is acting weird so...
	NSRect r;
	NSScreen *screen;

	// this fires windowDidMove:
	w->suppressPositionChanged = YES;
	r = [w->window frame];
	r.origin.x = x;
	screen = (NSScreen *) [[NSScreen screens] objectAtIndex:0];
	r.origin.y = [screen frame].size.height - (y + r.size.height);
	[w->window setFrameOrigin:r.origin];
	w->suppressPositionChanged = NO;
}

void uiWindowCenter(uiWindow *w)
{
	w->suppressPositionChanged = YES;
	[w->window center];
	w->suppressPositionChanged = NO;
}

void uiWindowOnPositionChanged(uiWindow *w, void (*f)(uiWindow *, void *), void *data)
{
	w->onPositionChanged = f;
	w->onPositionChangedData = data;
}

// void uiWindowContentSize(uiWindow *w, int *width, int *height)

// static int defaultOnClosing(uiWindow *w, void *data)

static void defaultOnPositionContentSizeChanged(uiWindow *w, void *data)
{
	// do nothing
}

uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar)
{
//	uiWindowOnClosing(w, defaultOnClosing, NULL);
	uiWindowOnPositionChanged(w, defaultOnPositionContentSizeChanged, NULL);
//	uiWindowOnContentSizeChanged(w, defaultOnPositionContentSizeChanged, NULL);
}


================================================
FILE: _abort/windowevents/page15.c
================================================
static uiSpinbox *x, *y;

static void moveX(uiSpinbox *s, void *data)
{
	uiWindow *w = uiWindow(data);
	int xp, yp;

	uiWindowPosition(w, &xp, &yp);
	xp = uiSpinboxValue(x);
	uiWindowSetPosition(w, xp, yp);
}

static void moveY(uiSpinbox *s, void *data)
{
	uiWindow *w = uiWindow(data);
	int xp, yp;

	uiWindowPosition(w, &xp, &yp);
	yp = uiSpinboxValue(y);
	uiWindowSetPosition(w, xp, yp);
}

static void updatepos(uiWindow *w)
{
	int xp, yp;

	uiWindowPosition(w, &xp, &yp);
	uiSpinboxSetValue(x, xp);
	uiSpinboxSetValue(y, yp);
}

static void center(uiButton *b, void *data)
{
	uiWindow *w = uiWindow(data);

	uiWindowCenter(w);
	updatepos(w);
}

void onMove(uiWindow *w, void *data)
{
	printf("move\n");
	updatepos(w);
}

uiBox *makePage15(uiWindow *w)
{
	hbox = newHorizontalBox();
	// TODO if I make this 1 and not add anything else AND not call uiWindowOnPositionChanged(), on OS X the box won't be able to grow vertically
	uiBoxAppend(page15, uiControl(hbox), 0);

	uiBoxAppend(hbox, uiControl(uiNewLabel("Position")), 0);
	x = uiNewSpinbox(INT_MIN, INT_MAX);
	uiBoxAppend(hbox, uiControl(x), 1);
	y = uiNewSpinbox(INT_MIN, INT_MAX);
	uiBoxAppend(hbox, uiControl(y), 1);
	button = uiNewButton("Center");
	uiBoxAppend(hbox, uiControl(button), 0);

	uiSpinboxOnChanged(x, moveX, w);
	uiSpinboxOnChanged(y, moveY, w);
	uiButtonOnClicked(button, center, w);
	uiWindowOnPositionChanged(w, onMove, NULL);
	updatepos(w);
}


================================================
FILE: _abort/windowevents/ui.h
================================================
// uiWindowSetTitle
_UI_EXTERN void uiWindowPosition(uiWindow *w, int *x, int *y);
_UI_EXTERN void uiWindowSetPosition(uiWindow *w, int x, int y);
_UI_EXTERN void uiWindowCenter(uiWindow *w);
_UI_EXTERN void uiWindowOnPositionChanged(uiWindow *w, void (*f)(uiWindow *, void *), void *data);
// uiWindowContentSize


================================================
FILE: _abort/windowevents/unix_window.c
================================================
struct uiWindow {
//	void *onClosingData;
	void (*onPositionChanged)(uiWindow *, void *);
	void *onPositionChangedData;
	gboolean changingPosition;
//	void (*onContentSizeChanged)(uiWindow *, void *);
};

// static gboolean onClosing(GtkWidget *win, GdkEvent *e, gpointer data)

static gboolean onConfigure(GtkWidget *win, GdkEvent *e, gpointer data)
{
	uiWindow *w = uiWindow(data);

	// there doesn't seem to be a way to determine if only moving or only resizing is happening :/
	if (w->changingPosition)
		w->changingPosition = FALSE;
	else
		(*(w->onPositionChanged))(w, w->onPositionChangedData);
	// always continue handling
	return FALSE;
}

// static void onSizeAllocate(GtkWidget *widget, GdkRectangle *allocation, gpointer data)

// static int defaultOnClosing(uiWindow *w, void *data)

static void defaultOnPositionContentSizeChanged(uiWindow *w, void *data)
{
	// do nothing
}

// static void uiWindowDestroy(uiControl *c)

// void uiWindowSetTitle(uiWindow *w, const char *title)

// TODO allow specifying either as NULL on all platforms
void uiWindowPosition(uiWindow *w, int *x, int *y)
{
	gint rx, ry;

	gtk_window_get_position(w->window, &rx, &ry);
	*x = rx;
	*y = ry;
}

void uiWindowSetPosition(uiWindow *w, int x, int y)
{
	w->changingPosition = TRUE;
	gtk_window_move(w->window, x, y);
	// gtk_window_move() is asynchronous
	// we need to wait for a configure-event
	// thanks to hergertme in irc.gimp.net/#gtk+
	while (w->changingPosition)
		if (!uiMainStep(1))
			break;		// stop early if uiQuit() called
}

void uiWindowCenter(uiWindow *w)
{
	gint x, y;
	GtkAllocation winalloc;
	GdkWindow *gdkwin;
	GdkScreen *screen;
	GdkRectangle workarea;

	gtk_widget_get_allocation(w->widget, &winalloc);
	gdkwin = gtk_widget_get_window(w->widget);
	screen = gdk_window_get_screen(gdkwin);
	gdk_screen_get_monitor_workarea(screen,
		gdk_screen_get_monitor_at_window(screen, gdkwin),
		&workarea);

	x = (workarea.width - winalloc.width) / 2;
	y = (workarea.height - winalloc.height) / 2;
	// TODO move up slightly? see what Mutter or GNOME Shell or GNOME Terminal do(es)?
	uiWindowSetPosition(w, x, y);
}

// TODO this and size changed get set during uiWindowDestroy
void uiWindowOnPositionChanged(uiWindow *w, void (*f)(uiWindow *, void *), void *data)
{
	w->onPositionChanged = f;
	w->onPositionChangedData = data;
}

// void uiWindowContentSize(uiWindow *w, int *width, int *height)

uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar)
{
//	g_signal_connect(w->widget, "delete-event", G_CALLBACK(onClosing), w);
	g_signal_connect(w->widget, "configure-event", G_CALLBACK(onConfigure), w);
//	g_signal_connect(w->childHolderWidget, "size-allocate", G_CALLBACK(onSizeAllocate), w);
//	uiWindowOnClosing(w, defaultOnClosing, NULL);
	uiWindowOnPositionChanged(w, defaultOnPositionContentSizeChanged, NULL);
//	uiWindowOnContentSizeChanged(w, defaultOnPositionContentSizeChanged, NULL);
}


================================================
FILE: _abort/windowevents/windows_window.cpp
================================================
struct uiWindow {
//	BOOL hasMenubar;
	void (*onPositionChanged)(uiWindow *, void *);
	void *onPositionChangedData;
	BOOL changingPosition;		// to avoid triggering the above when programmatically doing this
//	void (*onContentSizeChanged)(uiWindow *, void *);
};

static LRESULT CALLBACK windowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	case WM_WINDOWPOSCHANGED:
		if ((wp->flags & SWP_NOMOVE) == 0)
			if (!w->changingPosition)
				(*(w->onPositionChanged))(w, w->onPositionChangedData);
			// and continue anyway
//		if ((wp->flags & SWP_NOSIZE) != 0)
}

// static int defaultOnClosing(uiWindow *w, void *data)

static void defaultOnPositionContentSizeChanged(uiWindow *w, void *data)
{
	// do nothing
}

// static std::map<uiWindow *, bool> windows;

// void uiWindowSetTitle(uiWindow *w, const char *title)

void uiWindowPosition(uiWindow *w, int *x, int *y)
{
	RECT r;

	uiWindowsEnsureGetWindowRect(w->hwnd, &r);
	*x = r.left;
	*y = r.top;
}

void uiWindowSetPosition(uiWindow *w, int x, int y)
{
	w->changingPosition = TRUE;
	if (SetWindowPos(w->hwnd, NULL, x, y, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER) == 0)
		logLastError(L"error moving window");
	w->changingPosition = FALSE;
}

// static void windowMonitorRect(HWND hwnd, RECT *r)

// TODO use the work rect instead?
void uiWindowCenter(uiWindow *w)
{
	RECT wr, mr;
	int x, y;
	LONG wwid, mwid;
	LONG wht, mht;

	uiWindowsEnsureGetWindowRect(w->hwnd, &wr);
	windowMonitorRect(w->hwnd, &mr);
	wwid = wr.right - wr.left;
	mwid = mr.right - mr.left;
	x = (mwid - wwid) / 2;
	wht = wr.bottom - wr.top;
	mht = mr.bottom - mr.top;
	y = (mht - wht) / 2;
	// y is now evenly divided, however https://msdn.microsoft.com/en-us/library/windows/desktop/dn742502(v=vs.85).aspx says that 45% should go above and 55% should go below
	// so just move 5% of the way up
	// TODO should this be on the work area?
	// TODO is this calculation correct?
	y -= y / 20;
	uiWindowSetPosition(w, x, y);
}

void uiWindowOnPositionChanged(uiWindow *w, void (*f)(uiWindow *, void *), void *data)
{
	w->onPositionChanged = f;
	w->onPositionChangedData = data;
}

// void uiWindowContentSize(uiWindow *w, int *width, int *height)

uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar)
{
//	uiWindowOnClosing(w, defaultOnClosing, NULL);
	uiWindowOnPositionChanged(w, defaultOnPositionContentSizeChanged, NULL);
//	uiWindowOnContentSizeChanged(w, defaultOnPositionContentSizeChanged, NULL);
}


================================================
FILE: _doc/area.md
================================================
# uiArea

uiArea is a uiControl that provides a canvas you can draw on. It receives keyboard and mouse events, supports scrolling, is DPI aware, and has several other useful features. A uiArea consists of the drawing area itself and horizontal and vertical scrollbars.

## The Area Handler

A uiArea is driven by an *area handler*. An area handler is an object with several methods that uiArea calls to do certain tasks. To create an area handler, simply have a structure whose first member is of type `uiAreaHandler`:

```c
struct uiAreaHandler {
	void (*Draw)(uiAreaHandler *h, uiArea *a, uiAreaDrawParams *p);
	void (*HScrollConfig)(uiAreaHandler *h, uiArea *a, uiAreaScrollConfig *c);
	void (*VScrollConfig)(uiAreaHandler *h, uiArea *a, uiAreaScrollConfig *c);
}
```

## Drawing

Unlike drawing canvas controls in other toolkits, uiArea does **not** have a fixed size. The coordinate (0, 0) is always the top-left corner of the drawing area, regardless of how big the uiArea is in the current window or where the scrollbars presently are. Instead, you simulate a size by setting the scrollbar bounds, and you are given the current scrolling positions to base your drawing with.

The visible drawing area is called the *content area* by the drawing machinery.

TODO have a diagram.

When a part of the uiArea needs to be redrawn, the area handler's `Draw()` method is called. It receives the area handler, the uiArea, and a structure of parameters necessary for drawing.

```c
struct uiAreaDrawParams {
	uiDrawContext *context;

	intmax_t contentWidth;
	intmax_t contentHeight;

	intmax_t hscrollpos;
	intmax_t vscrollpos;

	intmax_t clipX;
	intmax_t cilpY;
	intmax_t clipWidth;
	intmax_t clipHeight;

	TODO dpiX;
	TODO dpiY;
};
```

`context` is the drawing context; see drawing.md for details.

`contentWidth` and `contentHeight` is the current width and height of the content area. `hscrollpos` and `vscrollpos` are the current horizontal and vertical positions of the scrollbars, in units defined by the scrollbar configurations; see below.

`clipX`, `clipY`, `clipWidth`, and `clipHeight` define a rectangle, in content area coordinates, that the OS has requested to be redrawn. You can use this to optimize your drawing by only drawing where drawing is needed; the OS may choose to drop any drawing done outside the clip rectangle.

`dpiX` and `dpiY` are the uiArea's current DPI in the X and Y directions, respectively. Do not save these values; they are not guaranteed to stay the same once `Draw()` returns.


================================================
FILE: _doc/areahandler
================================================
Yes, you keep ownership of the uiAreaHandler. libui only cares about the address you give uiNewArea(); it doesn't copy anything. You can even use the same uiAreaHandler on multiple uiAreas, which is why you get the uiArea as a parameter in each function.


================================================
FILE: _doc/draw.md
================================================
# The Drawing Model

> Note: This model is not exclusive to libui; it is also applicable to many 2D graphics libraries, such as Direct2D, cairo, and Core Graphics.

## The Coordinate System and Points

In the traditional way we think of drawing, we think of rendering onto a plane of pixels. The pixels have a fixed size, and coordinates refer to the entire space that a pixel occupies.

For instance, in the traditional model, the coordinate system looks like

TODO image

and when we say "draw a line from (0, 0) to (5, 5) exclusive", we mean "fill the spaces that are occupied by the pixels at (0, 0), (1, 1), (2, 2), (3, 3), and (4, 4)":

TODO image

Ugh. With pixels as big as the ones TODO.

But now let's pretend we're working in a coordinate system where the point at (x, y) corresponds strictly to the top-left corner of the area that a pixel occupies.

TODO image

In this model, when we say "draw a line from (0, 0) to (5, 5)", we mean "draw a straight line filling every pixel that we cross if we traced a line from the top-left corner of what we used to call the pixel at (0, 0 to the top-left corner of what we used to call the pixel at (5, 5)":

TODO image

TODO.

There are both technical and non-technical reasons for following this model. The technical reason is that implementing certain drawing operations, such as filling shapes, is much easier if we do things this way. The [cairo FAQ](http://www.cairographics.org/FAQ/#sharp_lines) explains in more detail. The non-technical reason has to do with DPI independence.

## DPI Independence vs. DPI Awareness

An upcoming trend in computing is the high-resolution display. These displays fit more dots in the same area that older screens could. The conventional term for the number of dots that fit in a given area is the "dots per inch", or DPI, measure.

A naive approach to writing programs for these new displays is to think "well, if I just take the DPI and only use it in calculations where I need to deal with real-world measurements such as inches, rendering pure pixels as I always have, I should be fine". This kind of design is centered around *DPI awareness*. I know, I used to believe this too. But here's a little secret: this is wrong! A common myth about high-resolution monitors among non-technical people is that it makes the stuff on screen smaller. The mindset I just described causes this: TODO

Instead, what we want out of a high-resolution display is *to show a more detailed view of the same image in the same space*. [The first image on Apple''s discussion of the topic](https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Art/backing_store_2x.png) is the perfect example. On the left, you see a low-resolution monitor. Notice how big chunks of the shapes go into the boxes. When the code that maps points to pixels runs, it can't have two colors in one square, so it has to decide what color to use. TODO

TODO
- talk about how this relates to the OpenGL unit cube
- talk about the various names (point, user space coordinate, device-independent pixel)
- talk about "scaling"


================================================
FILE: _doc/drawtext
================================================
on some unix systems, alpha blending fonts may not be available; this depends on your installed version of pango and is determined at runtime by libui

uiDrawTextLayoutExtents: document that the extent width can be greater than the requested width if the requested width is small enough that only one character can fit


font matching is closest match but the search method is OS defined


weight names in libui do not necessarily line up with their OS names


uiDrawFontHandle() may not return a unique handle per instance



================================================
FILE: _doc/export/coretext
================================================
font features are not provided by the collection and have to be added when asking for a font
it does preserve when going from CTFont to CTFontDescriptor
feature 17 has no flags in the header but can also hold small caps info
if a feature is present, it is ignored; other features will still show up
	at least in the case of kLetterCaseTrait and kLowerCaseTrait


================================================
FILE: _doc/export/ctweights
================================================
// pseudo-go

func (f *CTFont) IsRegistered() bool {
	n := f.Attribute(kCTFontRegistrationScopeAttribute)
	if n == nil {
		return false
	}
	return n.(*CFNumber).Uint32Value() == kCTFontManagerScopeNone
}

// this type is in libFontRegistry.dylib; functions like x_list.Prepend() are called things like x_list_prepend() there
type x_list struct {
	Data		interface{}
	Next		*x_list
}

func (x *x_list) Prepend(data interface{}) *x_list {
	y := malloc(sizeof (x_list))
	if y != nil {
		y.data = data
		y.next = x
		return y
	}
	return x
}

func (x *x_list) Reverse() *x_list {
	if x == nil {
		return nil
	}

	var old, next *x_list

	next = nil
	for {
		old = x
		x = old.next
		old.next = next
		next = old
		if x == nil {
			break
		}
	}
	return old
}

func (x *x_list) Concat(y *x_list) *x_list {
	if x == nil {
		return y
	}
	start := x
	z := x
	for {
		x = z
		z = z.next
		if z == nil {
			break
		}
	}
	x.next = y
	return start
}

// based on CoreGraphics dylib's _CGFontCopyName
// note that this is different from the public API function CGFontCopyPostScriptName() (which is font type-independent)
// also note that in reality these keys are strings but the implementation of the function turns them into ints and only uses them as such
const (
	kCGFontNameKeyPostScriptName = 0x6
	kCGFontNameKeyPreferredSubfamily = 0x11
	kCGFontNameKeyFontSubfamily = 0x2
	kCGFontNameKeyFullName = 0x4
	kCGFontNameKeyPreferredFamily = 0x10
	kCGFontNameKeyFontFamily = 0x1
)
func (f *CGFont) CopyName(key int) (string, bool) {
	table := f.TableForTag('name')
	b := table.Bytes()
	n := table.Len()

	// this code looks weird, but we're imitating the assembly, or the effective effects thereof
	offCount := uint16(0)
	offStringOffset := uint16(2)
	if n > 1 {
		offCount = 2
		offStringOffset = 4
	}

	count := uint16(0)
	if int(offCount) <= n {
		count = uint16be(b[offCount:offCount + 2])
	}

	offNameRecord := offStringOffset + 2
	stringOffset := uint16(0)
	if int(offNameRecord) <= n {
		stringOffset = uint16be(b[offStringOffset:offStringOffset + 2])
	}

	type NameRecord struct {
		PlatformID		uint16
		PlatformSpecificID	uint16
		LanguageID		uint16
		NameID			uint16
		Length			uint16
		Offset			uint16
	}

	var nameList *x_list

	addrStrings := offNameRecords + (12 * count)
	if addrStrings != stringOffset {
		goto hasLanguageTags
	}
	pos := offNameRecords
	if count == 0 {
		// TODO note assembly logic here
	} else {
		for {
			var nr NameRecord

			nr.PlatformID = 0
			next := pos + 2
			if int(next) <= n {
				nr.PlatformID = uint16be(b[pos:pos + 2])
				pos = next
			}

			nr.PlatformSpecificID = 0
			next = pos + 2
			if int(next) <= n {
				nr.PlatformSpecificID = uint16be(b[pos:pos + 2])
				pos = next
			}

			nr.LanguageID = 0
			next = pos + 2
			if int(next) <= n {
				nr.LanguageID = uint16be(b[pos:pos + 2])
				pos = next
			}

			nr.NameID = 0
			next = pos + 2
			if int(next) <= n {
				nr.NameID = uint16be(b[pos:pos + 2])
				pos = next
			}

			nr.Length = 0
			next = pos + 2
			if int(next) <= n {
				nr.Length = uint16be(b[pos:pos + 2])
				pos = next
			}

			nr.Offset = 0
			next = pos + 2
			if int(next) <= n {
				nr.Offset = uint16be(b[pos:pos + 2])
				pos = next
			}

			strpos := stringOffset + nr.Offset
			if strpos >= n {
				// TODO put comment about imitating the assembly comparisons here
			} else {
				realLen := nr.Length
				strend = strpos + nr.Length
				if strend > n {
					realLen = nr.Length - strpos
					strend = strpos + realLen
				}
				b := malloc(12 + realLen + 1)
				if b != nil {
					name := (*sfnt_name_t)(b)
					name.PlatformID = nr.PlatformID
					name.PlatformSpecificID = nr.PlatformSpecificID
					name.LanguageID = nr.LanguageID
					name.NameID = nr.NameID
					name.Length = realLen
					memcpy(&(name.Name), b[strpos:strend], realLen)
					name.Name[realLen] = 0
					nameList = nameList.Prepend(name)
				}
			}
			count--
			if count == 0 {
				break
			}
		}
	}
	nameList = nameList.Reverse()

hasLanguageTags:
	add_localized_names := func(platformID uint16, platformSpecificID uint16, to *x_list) *x_list {
		out := (*x_list)(nil)
		if nameList == nil {
			xx TODO logic verbatim etc.
		} else {
			x := nameList
			for {
				name := (*sfnt_name_t)(x.data)
				if name.PlatformID != platformID {
					xx TODO
				} else {
					if platformSpecificID == 0xFFFF || name.PlatformSpecificID == platformSpecificID {
						out = out.Prepend(name)
					}
				}
				x = x.next
				if x == nil {
					break
				}
			}
		}
		out = out.Reverse()
		return to.Concat(out)
	}
	localized := (*x_list)(nil)
	localized = add_localized_names(0x1, 0xFFFF, localized)
	localized = add_localized_names(0, 0xFFFF, localized)
	localized = add_localized_names(0x3, 0xFFFF, localized)
	localized = add_localized_names(0x1, 0, localized)
	localized = add_localized_names(0x3, 0x9, localized)
	localized = add_localized_names(0x3, 0x409, localized)

	sysLocale := CFLocaleGetSystem()
	
}

// based on libFontRegistry.dylib's __ZNK8OS2Table15DetermineWeightERf — OS2Table::DetermineWeight(float&) const
func RegistryDetermineOS2Weight(table *CFData) (float32, bool) {
	if table == nil {
		return 0, false
	}
	if table.Len() < 78 {
		return 0, false
	}

	b := table.Bytes()
	usWeightClass := uint16be(b[4:6])
	if usWeightClass >= 10 {
		// do nothing; we are preserving the original asm comparisons
	} else {
		usWeightClass *= 100
	}
	/* TODO:
000000000000b37e         mov        dx, word [rax+4]
000000000000b382         mov        cx, dx
000000000000b385         rol        cx, 0x8
000000000000b389         movzx      esi, cx
000000000000b38c         imul       ecx, ecx, 100
000000000000b38f         cmp        esi, 10
000000000000b392         cmovae     cx, si
000000000000b396         test       dx, dx
000000000000b399         cmove      cx, si
	what's the function of the last two instructions? */

	// note that this is an unsigned comparison, so underflow will result in a number > 998
	// the effect is the same as (usWeightClass == 0) || (usWeightClass >= 1000)
	if (usWeightClass - 1) > 998 {
		// note the - 2 here; the switch cases below reflect that!
		// also note that b[0x22] and panose will be unsigned, so underflow will result in a number > 9
		panose := b[0x22] - 2
		if panose > 9 {
			return 0, false
		}
		switch panose {
		case 0:
			return float32as(-0.500000, 0xbf000000), true
		case 1:
			return float32as(-0.400000, 0xbecccccd), true
		case 2:
			// yes, this returns false; I don't know why
			return float32as(-0.300000, 0xbe99999a), false
		case 3:
			return float32as(-0.230000, 0xbe6b851f), true
		case 4:
			return float32as(0.230000, 0x3e6b851f), true
		case 5:
			return float32as(0.250000, 0x3e800000), true
		case 6:
			return float32as(0.400000, 0x3ecccccd), true
		case 7:
			return float32as(0.560000, 0x3f0f5c29), true
		case 8:
			return float32as(0.620000, 0x3f1eb852), true
		case 9:
			return float32as(0.800000, 0x3f4ccccd), true
		}
		// should not reach here
	}

	// let's mimic the assembly here too
	// the gotos avoid the massive if nesting
	// also note I'm using Go idioms and not saying "else return", imagine those if you must
	if usWeightClass > 100 {
		if usWeightClass > 200 {
			goto do201AndUp
		}
		return float32as(-0.500000, 0xbf000000), true
	}
	return float32as(-0.800000, 0xbf4ccccd), true

do201AndUp:
	if usWeightClass > 300 {
		if usWeightClass > 400 {
			goto do401AndUp
		}
		return float32as(0.000000, 0x0), true
	}
	return float32as(-0.400000, 0xbecccccd), true

do401AndUp:
	if usWeightClass > 500 {
		if usWeightClass > 600 {
			goto do601AndUp
		}
		return float32as(0.250000, 0x3e800000), true
	}
	return float32as(0.230000, 0x3e6b851f), true

do601AndUp:
	if usWeightClass > 700 {
		if usWeightClass > 800 {
			goto do801AndUp
		}
		return float32as(0.500000, 0x3f000000), true
	}
	return float32as(0.400000, 0x3ecccccd), true

do801AndUp:
	if usWeightClass > 900 {
		if usWeightClass > 950 {
			return float32(0.800000, 0x3f4ccccd), true
		}
		return float32(0.750000, 0x3f400000), true
	}
	return float32as(0.620000, 0x3f1eb852), true
}

// based on libFontRegistry.dylib's __ZN11TFontTraitsC2EP6CGFontRK13TFontMetadata — TFontTraits::TFontTraits(CGFont*, TFontMetadata const&)
func (f *Font) WeightFromFontRegistry32() float32 {
	var weight float32
	var hasWeight bool = false

	cgfont := f.CGFont()
	if f.RegistryHasMetadata() {
		wv := f.RegistryMetadataValueForKey("MTD_Typeface_Weight_VisualDescriptor")
		if wv != nil {
			if wn, ok := wv.(string); ok {
				// note: uses CFStringCompare(0)
				switch wn {
				case "reg":
					weight = float32as(0.000000, 0x0)
					hasWeight = true
				case "semi":
					weight = float32as(0.300000, 0x3e99999a)
					hasWeight = true
				case "bold":
					weight = float32as(0.400000, 0x3ecccccd)
					hasWeight = true
				case "light":
					weight = float32as(-0.400000, 0xbecccccd)
					hasWeight = true
				case "med":
					weight = float32as(0.230000, 0x3e6b851f)
					hasWeight = true
				case "heavy":
					weight = float32as(0.560000, 0x3f0f5c29)
					hasWeight = true
				case "black":
					weight = float32as(0.620000, 0x3f1eb852)
					hasWeight = true
				case "thin":
					weight = float32as(-0.600000, 0xbf19999a)
					hasWeight = true
				case "ulight":
					weight = float32as(-0.800000, 0xbf4ccccd)
					hasWeight = true
				}
			}
		}
	}

	cgpsname, ok := cgfont.CopyName(kCGFontNameKeyPostScriptName)
	if ok {
		// note: uses CFStringCompare(0)
		switch cgpsname {
		case "LucidaGrande",
			".LucidaGrandeUI",
			".Keyboard":
			weight = float32as(0.000000, 0x0)
			hasWeight = true
		case "STHeiti":
			weight = float32as(0.240000, 0x3e75c28f)
			hasWeight = true
		case "STXihei":
			weight = float32as(-0.100000, 0xbdcccccd)
			hasWeight = true
		case "TimesNewRomanPSMT":
			weight = float32as(0.000000, 0x0)
			hasWeight = true
		}
	}

	styleGlossaryStrings := []int{
		kCGFontNameKeyPreferredSubfamily,
		kCGFontNameKeyFontSubfamily,
		kCGFontNameKeyFullName,
		kCGFontNameKeyPreferredFamily,
		kCGFontNameKeyFontFamily,
	}
	weightNameMap := []struct {
		key		string
		val		float32
	}{
		{ "Ultra Light", float32as(-0.800000f, 0xbf4ccccd) },
		{ "Ultra Black", float32as(0.750000f, 0x3f400000) },
		{ "Extra Light", float32as(-0.500000f, 0xbf000000) },
		{ "UltraBlack", float32as(0.750000f, 0x3f400000) },
		{ "ExtraBlack", float32as(0.800000f, 0x3f4ccccd) },
		{ "UltraLight", float32as(-0.800000f, 0xbf4ccccd) },
		{ "ExtraLight", float32as(-0.500000f, 0xbf000000) },
		{ "Ultra Thin", float32as(-0.800000f, 0xbf4ccccd) },
		{ "Extra Thin", float32as(-0.800000f, 0xbf4ccccd) },
		{ "Heavy Face", float32as(0.560000f, 0x3f0f5c29) },
		{ "Semi Light", float32as(-0.200000f, 0xbe4ccccd) },
		{ "Extra Bold", float32as(0.500000f, 0x3f000000) },
		{ "Ultra Bold", float32as(0.700000f, 0x3f333333) },
		{ "HeavyFace", float32as(0.560000f, 0x3f0f5c29) },
		{ "ExtraBold", float32as(0.500000f, 0x3f000000) },
		{ "UltraBold", float32as(0.700000f, 0x3f333333) },
		{ "Ext Black", float32as(0.800000f, 0x3f4ccccd) },
		{ "SemiLight", float32as(-0.200000f, 0xbe4ccccd) },
		{ "Demi Bold", float32as(0.250000f, 0x3e800000) },
		{ "Semi Bold", float32as(0.300000f, 0x3e99999a) },
		{ "Ext Light", float32as(-0.500000f, 0xbf000000) },
		{ "Ext Bold", float32as(0.500000f, 0x3f000000) },
		{ "DemiBold", float32as(0.250000f, 0x3e800000) },
		{ "SemiBold", float32as(0.300000f, 0x3e99999a) },
		{ "HairLine", float32as(-0.800000f, 0xbf4ccccd) },
		{ "Ext Thin", float32as(-0.800000f, 0xbf4ccccd) },
		{ "Medium", float32as(0.230000f, 0x3e6b851f) },
		{ "Poster", float32as(0.800000f, 0x3f4ccccd) },
		{ "Light", float32as(-0.400000f, 0xbecccccd) },
		{ "Ultra", float32as(0.500000f, 0x3f000000) },
		{ "Heavy", float32as(0.560000f, 0x3f0f5c29) },
		{ "Extra", float32as(0.500000f, 0x3f000000) },
		{ "Black", float32as(0.620000f, 0x3f1eb852) },
		{ "Super", float32as(0.620000f, 0x3f1eb852) },
		{ "Obese", float32as(0.850000f, 0x3f59999a) },
		{ "Lite", float32as(-0.400000f, 0xbecccccd) },
		{ "Book", float32as(-0.230000f, 0xbe6b851f) },
		{ "Demi", float32as(0.250000f, 0x3e800000) },
		{ "Semi", float32as(0.300000f, 0x3e99999a) },
		{ "Thin", float32as(-0.500000f, 0xbf000000) },
		{ "Bold", float32as(0.400000f, 0x3ecccccd) },
		{ "Nord", float32as(0.800000f, 0x3f4ccccd) },
		{ "Fat", float32as(0.750000f, 0x3f400000) },
		{ "W1", float32as(-0.230000f, 0xbe6b851f) },
		{ "W2", float32as(-0.500000f, 0xbf000000) },
		{ "W3", float32as(-0.230000f, 0xbe6b851f) },
		{ "W4", float32as(0.000000f, 0x0) },
		{ "W5", float32as(0.230000f, 0x3e6b851f) },
		{ "W6", float32as(0.300000f, 0x3e99999a) },
		{ "W7", float32as(0.440000f, 0x3ee147ae) },
		{ "W8", float32as(0.540000f, 0x3f0a3d71) },
		{ "W9", float32as(0.620000f, 0x3f1eb852) },
	}
	for _, key := range styleGlossaryStrings {
		if hasWeight {
			break
		}
		str, ok := cgfont.CopyName(key)
		if !ok {
			continue
		}
		for _, m := range weightNameMap {
			if str.FindWithOptions(m.key, CFRangeMake(0, str.CFStringLength()), kCFCompareCaseInsensitive | kCFCompareBackwards | kCFCompareNonliteral, nil) {
				weight = m.val
				hasWeight = true
				break
			}
		}
	}

	if !hasWeight {
		os2table := cgfont.TableForTag('OS/2')
		weight, hasWeight = RegistryDetermineOS2Weight(os2table)
	}

	if !hasWeight {
		headtable := cgfont.TableForTag('head')
		if headtable != nil {
			if headtable.Len() >= 54 {
				b := headtable.Bytes()
				if (b[0x2d] & 1) != 0 {
					weight = float32as(0.400000, 0x3ecccccd)
					hasWeight = true
				}
			}
		}
	}

	styleGlossaryAbbreviationKeys := []int{
		kCGFontNameKeyPreferredSubfamily,
		kCGFontNameKeyFontSubfamily,
	}
	abbreviatedWeightNameMap := []struct {
		key		string
		val		float32
	}{
		{ "EL", float32as(-0.200000, 0xbe4ccccd) },
		{ "EB", float32as(0.500000, 0x3f000000) },
		{ "SB", float32as(0.300000, 0x3e99999a) },
		{ "UH", float32as(0.800000, 0x3f4ccccd) },
		{ "U", float32as(0.700000, 0x3f333333) },
		{ "L", float32as(-0.400000, 0xbecccccd) },
		{ "H", float32as(0.560000, 0x3f0f5c29) },
		{ "B", float32as(0.400000, 0x3ecccccd) },
		{ "M", float32as(0.230000, 0x3e6b851f) },
		{ "R", float32as(0.000000, 0x0) },
	}
	if !hasWeight {
		for _, key := range styleGlossaryAbbreviationStrings {
			str, ok := cgfont.CopyName(key)
			if !ok {
				continue
			}
			for _, m := range abbreviatedWeightNameMap {
				if str.Compare(m.key, kCFCompareCaseInsensitive) == kCFCompareEqualTo {
					weight = m.val
					hasWeight = true
					break
				}
			}
			if hasWeight {
				break
			}
		}
	}

	if !hasWeight {
		return float32as(0.000000, 0x0)
	}
	return weight
}

// because Core Text gets registry traits as a CFDictionary, convert the float to a double with CFNumber as that is what actually would be done
func (f *Font) WeightFromFontRegistry() float64 {
	return CFNumberWithFloat32(f.WeightFromFontRegistry32()).Float64Value()
}

// based on CoreText dylib's __Z13WeightOfClasst — WeightOfClass(unsigned short)
func CoreText_WeightOfClass(usWeightClass uint16) float64 {
	if usWeightClass >= 11 {
		// do nothing; we are preserving the original asm comparisons
		// and yes, this one is 11, but the one above is 10
	} else {
		usWeightClass *= 100
	}

	// figure out what two floats our weight will be between
	i := usWeightClass / 100
	j := i + 1
	if j > 10 {
		j = 10
	}
	b := float64(i * 100)
	c := float64(j * 100)

	a := float64(0)
	if b != c {
		a = float64(usWeightClass)
		a -= b
		c -= b
		a /= c
	}
	scales := []float32{
		float32as(-1.000000, 0xbf800000),
		float32as(-0.700000, 0xbf333333),
		float32as(-0.500000, 0xbf000000),
		float32as(-0.230000, 0xbe6b851f),
		float32as(0.000000, 0x0),
		float32as(0.200000, 0x3e4ccccd),
		float32as(0.300000, 0x3e99999a),
		float32as(0.400000, 0x3ecccccd),
		float32as(0.600000, 0x3f19999a),
		float32as(0.800000, 0x3f4ccccd),
		float32as(1.000000, 0x3f800000),
	}
	c = float64(scale[i])
	b = float64[scale[j])
	return fma(a, b, c)
}

// based on CoreText dylib's __ZL33CreateTraitsByStyleGlossaryStringPK10__CFString — CreateTraitsByStyleGlossaryString(__CFString const*)
func CoreText_WeightByStyleGlossaryString(str string) (weight float64, ok bool) {
	str.Fold(kCFCompareCaseInsensitive, nil)
	weightNameMap := []struct {
		key		string
		val		float32
	}{
		{ "ultra light", float32as(-0.800000, 0xbf4ccccd) },
		{ "ultra black", float32as(0.750000, 0x3f400000) },
		{ "extra light", float32as(-0.500000, 0xbf000000) },
		{ "ultralight", float32as(-0.800000, 0xbf4ccccd) },
		{ "ultrablack", float32as(0.750000, 0x3f400000) },
		{ "extrablack", float32as(0.800000, 0x3f4ccccd) },
		{ "extralight", float32as(-0.500000, 0xbf000000) }
		{ "heavy face", float32as(0.560000, 0x3f0f5c29) },
		{ "semi light", float32as(-0.200000, 0xbe4ccccd) },
		{ "extra bold", float32as(0.500000, 0x3f000000) },
		{ "ultra bold", float32as(0.700000, 0x3f333333) },
		{ "heavyface", float32as(0.560000, 0x3f0f5c29) },
		{ "extrabold", float32as(0.500000, 0x3f000000) },
		{ "ultrabold", float32as(0.700000, 0x3f333333) },
		{ "semilight", float32as(-0.200000, 0xbe4ccccd) },
		{ "demi bold", float32as(0.250000, 0x3e800000) },
		{ "semi bold", float32as(0.300000, 0x3e99999a) },
		{ "demibold", float32as(0.250000, 0x3e800000) },
		{ "semibold", float32as(0.300000, 0x3e99999a) },
		{ "hairline", float32as(-0.700000, 0xbf333333) },
		{ "medium", float32as(0.230000, 0x3e6b851f) },
		{ "poster", float32as(0.800000, 0x3f4ccccd) },
		{ "light", float32as(-0.400000, 0xbecccccd) },
		{ "heavy", float32as(0.560000, 0x3f0f5c29) },
		{ "extra", float32as(0.500000, 0x3f000000) },
		{ "black", float32as(0.620000, 0x3f1eb852) },
		{ "super", float32as(0.620000, 0x3f1eb852) },
		{ "obese", float32as(0.850000, 0x3f59999a) },
		{ "lite", float32as(-0.400000, 0xbecccccd) },
		{ "book", float32as(-0.230000, 0xbe6b851f) },
		{ "demi", float32as(0.250000, 0x3e800000) },
		{ "semi", float32as(0.300000, 0x3e99999a) },
		{ "thin", float32as(-0.500000, 0xbf000000) },
		{ "bold", float32as(0.400000, 0x3ecccccd) },
		{ "nord", float32as(0.800000, 0x3f4ccccd) },
		{ "fat", float32as(0.750000, 0x3f400000) },
		{ "w1", float32as(-0.700000, 0xbf333333) },
		{ "w2", float32as(-0.500000, 0xbf000000) },
		{ "w3", float32as(-0.230000, 0xbe6b851f) },
		{ "w4", float32as(0.000000, 0x0) },
		{ "w5", float32as(0.230000, 0x3e6b851f) },
		{ "w6", float32as(0.300000, 0x3e99999a) },
		{ "w7", float32as(0.440000, 0x3ee147ae) },
		{ "w8", float32as(0.540000, 0x3f0a3d71) },
		{ "w9", float32as(0.620000, 0x3f1eb852) },
	}
	for _, m := range weightNameMap {
		if strstr(str, m.key) != nil {
			val := CFNumberWithFloat32(m.val)
			return val.Float64Value(), true
		}
	}
	return 0, false
}

// based on CoreText dylib's __ZNK9TBaseFont29CreateTraitsValuesPerFontInfoEP12MetadataFlag — TBaseFont::CreateTraitsValuesPerFontInfo(MetadataFlag*) const
func (f *CTFont) Weight() float64 {
	if f.IsRegistered() {
		return f.WeightFromFontRegistry()
	}

	weight := float64as(2.0, 0x4000000000000000)
	ebx := -1
	hasWeight := false

	name := f.Name(kCTFontPostScriptNameKey)
	if name != nil {
		switch *name {
		case "LucidaGrande":
			weight = float64as(0.000000, 0x0)
			hasWeight = true
		case ".LucidaGrandeUI":
			weight = float64as(0.000000, 0x0)
			hasWeight = true
		case "STHeiti":
			weight = float64as(0.240000, 0x3fceb851eb851eb8)
			hasWeight = true
		case "STXihei":
			weight = float64as(-0.100000, 0xbfb999999999999a)
			hasWeight = true
		case "TimesNewRomanPSMT":
			weight = float64as(0.000000, 0x0)
			hasWeight = true
		// there is one more hardcoded case, for "Times-Roman", but that will only set the class style, not the weight
		}
	}

	os2table := f.Table('OS/2')
	if os2table != nil {
		if !hasWeight {
			var usWeightClass uint16

			valid := false
			if os2table.Len() > 77 {
				b := os2table.Bytes()
				usWeightClass = uint16be(b[4:6])
				if usWeightClass > 1000 {
					weight = 0
					hasWeight = false
				} else {
					valid = true
				}
			} else {
				usWeightClass = 0
				valid = true
			}
			if valid {
				weight = CoreText_WeightOfClass(usWeightClass)
				hasWeight = true
			}
		}
	}

	styleGlossaryNames := []string{
		kCTFontSubFamilyNameKey,
		kCTFontFullNameKey,
		kCTFontFamilyNameKey,
	}
	for _, key := range styleGlossaryNames {
		name := f.Name(key)
		if name == nil {
			continue
		}
		candidate, ok := CoreText_WeightByStyleGlossaryString(*name)
		if !ok {
			continue
		}
		if !hasWeight {
			weight = candidate
			hasWeight = true
		}
	}

	if hasWeight {
		return weight
	}
	return 0
}

func (f *Font) ShouldEnableBoldSymbolicTrait() bool {
	if f.IsRegistered() {
		return f.ShouldEnableBoldSymbolicTraitFromRegistry()
	}
	no := f.Weight() <= float64as(0.239000, 0x3fce978d4fdf3b64)
	return !no
}


================================================
FILE: _doc/export/ctweightsannotated
================================================
-0.100000  0xbdcccccd          registered postscript name "STXihei"
-0.100000  0xbfb999999999999a  unregistered postscript name "STXihei"
-0.200000  0xbe4ccccd          registered subfamily abbr "EL"
-0.200000  0xbe4ccccd          "Semi Light"
-0.200000  0xbe4ccccd          "SemiLight"
-0.200000  0xbe4ccccd          "semi light"
-0.200000  0xbe4ccccd          "semilight"
-0.230000  0xbe6b851f          "Book"
-0.230000  0xbe6b851f          "W1"
-0.230000  0xbe6b851f          "W3"
-0.230000  0xbe6b851f          "book"
-0.230000  0xbe6b851f          "w3"
-0.230000  0xbe6b851f          panose 5
-0.400000  0xbecccccd          registered subfamily abbr "L"
-0.400000  0xbecccccd          "Light"
-0.400000  0xbecccccd          "Lite"
-0.400000  0xbecccccd          "light"
-0.400000  0xbecccccd          "light"
-0.400000  0xbecccccd          "lite"
-0.400000  0xbecccccd          registered OS2 weights 3, 201 - 300
-0.400000  0xbecccccd          panose 3
-0.500000  0xbf000000          "Ext Light"
-0.500000  0xbf000000          "Extra Light"
-0.500000  0xbf000000          "ExtraLight"
-0.500000  0xbf000000          "Thin"
-0.500000  0xbf000000          "W2"
-0.500000  0xbf000000          "extra light"
-0.500000  0xbf000000          "extralight"
-0.500000  0xbf000000          "thin"
-0.500000  0xbf000000          "w2"
-0.500000  0xbf000000          registered OS2 weights 2, 101 - 200
-0.500000  0xbf000000          panose 2
-0.600000  0xbf19999a          "thin"
-0.700000  0xbf333333          "hairline"
-0.700000  0xbf333333          "w1"
-0.800000  0xbf4ccccd          "Ext Thin"
-0.800000  0xbf4ccccd          "Extra Thin"
-0.800000  0xbf4ccccd          "HairLine"
-0.800000  0xbf4ccccd          "Ultra Light"
-0.800000  0xbf4ccccd          "Ultra Thin"
-0.800000  0xbf4ccccd          "UltraLight"
-0.800000  0xbf4ccccd          "ulight"
-0.800000  0xbf4ccccd          "ultra light"
-0.800000  0xbf4ccccd          "ultralight"
-0.800000  0xbf4ccccd          registered OS2 weights 1, 10 - 100
0.000000   0x0                 registered postscript name ".Keyboard"
0.000000   0x0                 registered postscript name ".LucidaGrandeUI"
0.000000   0x0                 unregistered postscript name ".LucidaGrandeUI"
0.000000   0x0                 registered postscript name "LucidaGrande"
0.000000   0x0                 unregistered postscript name "LucidaGrande"
0.000000   0x0                 registered subfamily abbr "R"
0.000000   0x0                 registered postscript name "TimesNewRomanPSMT"
0.000000   0x0                 unregistered postscript name "TimesNewRomanPSMT"
0.000000   0x0                 "W4"
0.000000   0x0                 "reg"
0.000000   0x0                 "w4"
0.000000   0x0                 registered OS2 weights 4, 301 - 400
0.000000   0x0                 default
0.230000   0x3e6b851f          registered OS2 weights 5, 401 - 500
0.230000   0x3e6b851f          registered subfamily abbr "M"
0.230000   0x3e6b851f          "Medium"
0.230000   0x3e6b851f          "W5"
0.230000   0x3e6b851f          "med"
0.230000   0x3e6b851f          "medium"
0.230000   0x3e6b851f          "w5"
0.230000   0x3e6b851f          panose 6
0.240000   0x3e75c28f          registered postscript name "STHeiti"
0.240000   0x3fceb851eb851eb8  unregistered postscript name "STHeiti"
0.250000   0x3e800000          "Demi Bold"
0.250000   0x3e800000          "Demi"
0.250000   0x3e800000          "DemiBold"
0.250000   0x3e800000          "demi bold"
0.250000   0x3e800000          "demi"
0.250000   0x3e800000          "demibold"
0.250000   0x3e800000          registered OS2 weights 6, 501 - 600
0.250000   0x3e800000          panose 7
0.300000   0x3e99999a          registered subfamily abbr "SB"
0.300000   0x3e99999a          "Semi Bold"
0.300000   0x3e99999a          "Semi"
0.300000   0x3e99999a          "SemiBold"
0.300000   0x3e99999a          "W6"
0.300000   0x3e99999a          "semi bold"
0.300000   0x3e99999a          "semi"
0.300000   0x3e99999a          "semi"
0.300000   0x3e99999a          "semibold"
0.300000   0x3e99999a          "w6"
0.400000   0x3ecccccd          registered subfamily abbr "B"
0.400000   0x3ecccccd          "Bold"
0.400000   0x3ecccccd          "bold"
0.400000   0x3ecccccd          "bold"
0.400000   0x3ecccccd          'head'[0x2D] & 1
0.400000   0x3ecccccd          registered OS2 weights 7, 601 - 700
0.400000   0x3ecccccd          panose 8
0.440000   0x3ee147ae          "W7"
0.440000   0x3ee147ae          "w7"
0.500000   0x3f000000          registered subfamily abbr "EB"
0.500000   0x3f000000          "Ext Bold"
0.500000   0x3f000000          "Extra Bold"
0.500000   0x3f000000          "Extra"
0.500000   0x3f000000          "ExtraBold"
0.500000   0x3f000000          "Ultra"
0.500000   0x3f000000          "extra bold"
0.500000   0x3f000000          "extra"
0.500000   0x3f000000          "extrabold"
0.500000   0x3f000000          registered OS2 weights 8, 701 - 800
0.540000   0x3f0a3d71          "W8"
0.540000   0x3f0a3d71          "w8"
0.560000   0x3f0f5c29          registered subfamily abbr "H"
0.560000   0x3f0f5c29          "Heavy Face"
0.560000   0x3f0f5c29          "Heavy"
0.560000   0x3f0f5c29          "HeavyFace"
0.560000   0x3f0f5c29          "heavy face"
0.560000   0x3f0f5c29          "heavy"
0.560000   0x3f0f5c29          "heavy"
0.560000   0x3f0f5c29          "heavyface"
0.560000   0x3f0f5c29          panose 9
0.620000   0x3f1eb852          "Black"
0.620000   0x3f1eb852          "Super"
0.620000   0x3f1eb852          "W9"
0.620000   0x3f1eb852          "black"
0.620000   0x3f1eb852          "black"
0.620000   0x3f1eb852          "super"
0.620000   0x3f1eb852          "w9"
0.620000   0x3f1eb852          registered OS2 weights 9, 801 - 900
0.620000   0x3f1eb852          panose 10
0.700000   0x3f333333          registered subfamily abbr "U"
0.700000   0x3f333333          "Ultra Bold"
0.700000   0x3f333333          "UltraBold"
0.700000   0x3f333333          "ultra bold"
0.700000   0x3f333333          "ultrabold"
0.750000   0x3f400000          "Fat"
0.750000   0x3f400000          "Ultra Black"
0.750000   0x3f400000          "UltraBlack"
0.750000   0x3f400000          "fat"
0.750000   0x3f400000          "ultra black"
0.750000   0x3f400000          "ultrablack"
0.750000   0x3f400000          registered OS2 weights 901 - 950
0.800000   0x3f4ccccd          "Ext Black"
0.800000   0x3f4ccccd          "ExtraBlack"
0.800000   0x3f4ccccd          "Nord"
0.800000   0x3f4ccccd          "Poster"
0.800000   0x3f4ccccd          registered subfamily abbr "UH"
0.800000   0x3f4ccccd          "extrablack"
0.800000   0x3f4ccccd          "nord"
0.800000   0x3f4ccccd          "poster"
0.800000   0x3f4ccccd          registered OS2 weights 951 - 999
0.800000   0x3f4ccccd          panose 11
0.850000   0x3f59999a          "Obese"
0.850000   0x3f59999a          "obese"


================================================
FILE: _doc/export/ctweightscombined
================================================
-0.100000
	postscript name "STXihei" (which, according to http://www.typophile.com/node/93813, means "ST Hei Light", and so we can assume it's the Light version of STHeiti, which I think is Medium though is given Regular status below because meh)

-0.200000
	subfamily abbreviation "EL" (???????????)
	style string contains "Semi Light"
	style string contains "SemiLight"

-0.230000
	style string contains "Book"
	style string contains "W1" (registered fonts only; probably a typo and -0.7 was expected instead)
	style string contains "W3"
	panose 5

-0.400000
	subfamily abbreviation "L"
	style string contains "Light"
	style string contains "Lite"
	ATSD style "light"
	OS2 weights 3, 201 - 300
	panose 3

-0.500000
	style string contains "Ext Light"
	style string contains "Extra Light"
	style string contains "ExtraLight"
	style string contains "Thin"
	style string contains "W2"
	OS2 weights 2, 101 - 200
	panose 2

-0.600000
	ATSD style "thin"

-0.700000
	style string contains "hairline"
	style string contains "w1"

-0.800000
	style string contains "Ext Thin"
	style string contains "Extra Thin"
	style string contains "HairLine"
	style string contains "Ultra Light"
	style string contains "Ultra Thin"
	style string contains "UltraLight"
	ATSD style "ulight"
	OS2 weights 1, 10 - 100

0.000000
	ostscript name ".Keyboard"
	postscript name ".LucidaGrandeUI"
	postscript name "LucidaGrande"
	subfamily abbreviation "R"
	postscript name "TimesNewRomanPSMT"
	style string contains "W4"
	ATSD style "reg"
	OS2 weights 4, 301 - 400
	default

0.230000
	OS2 weights 5, 401 - 500
	subfamily abbreviation "M"
	style string contains "Medium"
	style string contains "W5"
	ATSD style "med"
	panose 6

0.240000
	postscript name "STHeiti"

0.250000
	style string contains "Demi Bold"
	style string contains "Demi"
	style string contains "DemiBold"
	OS2 weights 6, 501 - 600
	panose 7

0.300000
	subfamily abbreviation "SB"
	style string contains "Semi Bold"
	style string contains "Semi"
	style string contains "SemiBold"
	style string contains "W6"
	ATSD style "semi"

0.400000
	subfamily abbreviation "B"
	style string contains "Bold"
	ATSD style "bold"
	('head' table byte 0x2D) & 1 != 0
	OS2 weights 7, 601 - 700
	panose 8

0.440000
	style string contains "W7"

0.500000
	subfamily abbreviation "EB"
	style string contains "Ext Bold"
	style string contains "Extra Bold"
	style string contains "Extra"
	style string contains "ExtraBold"
	style string contains "Ultra"
	OS2 weights 8, 701 - 800

0.540000
	style string contains "W8"

0.560000
	subfamily abbreviation "H"
	style string contains "Heavy Face"
	style string contains "Heavy"
	style string contains "HeavyFace"
	ATSD style "heavy"
	panose 9

0.620000
	style string contains "Black"
	style string contains "Super"
	style string contains "W9"
	ATSD style "black"
	OS2 weights 9, 801 - 900
	panose 10

0.700000
	subfamily abbreviation "U"
	style string contains "Ultra Bold"
	style string contains "UltraBold"

0.750000
	style string contains "Fat"
	style string contains "Ultra Black"
	style string contains "UltraBlack"
	OS2 weights 901 - 950

0.800000
	style string contains "Ext Black"
	style string contains "ExtraBlack"
	style string contains "Nord"
	style string contains "Poster"
	subfamily abbreviation "UH"
	OS2 weights 951 - 999
	panose 11

0.850000
	style string contains "Obese"


================================================
FILE: _doc/export/ctweightsprocessed
================================================
-0.100000  0xbdcccccd          "STXihei"
-0.100000  0xbfb999999999999a  "STXihei"
-0.200000  0xbe4ccccd          "EL"
-0.200000  0xbe4ccccd          "Semi Light"
-0.200000  0xbe4ccccd          "SemiLight"
-0.200000  0xbe4ccccd          "semi light"
-0.200000  0xbe4ccccd          "semilight"
-0.230000  0xbe6b851f          "Book"
-0.230000  0xbe6b851f          "W1"
-0.230000  0xbe6b851f          "W3"
-0.230000  0xbe6b851f          "book"
-0.230000  0xbe6b851f          "w3"
-0.230000  0xbe6b851f          panose 5
-0.400000  0xbecccccd          "L"
-0.400000  0xbecccccd          "Light"
-0.400000  0xbecccccd          "Lite"
-0.400000  0xbecccccd          "light"
-0.400000  0xbecccccd          "light"
-0.400000  0xbecccccd          "lite"
-0.400000  0xbecccccd          3, 201 - 300
-0.400000  0xbecccccd          panose 3
-0.500000  0xbf000000          "Ext Light"
-0.500000  0xbf000000          "Extra Light"
-0.500000  0xbf000000          "ExtraLight"
-0.500000  0xbf000000          "Thin"
-0.500000  0xbf000000          "W2"
-0.500000  0xbf000000          "extra light"
-0.500000  0xbf000000          "extralight"
-0.500000  0xbf000000          "thin"
-0.500000  0xbf000000          "w2"
-0.500000  0xbf000000          2, 101 - 200
-0.500000  0xbf000000          panose 2
-0.600000  0xbf19999a          "thin"
-0.700000  0xbf333333          "hairline"
-0.700000  0xbf333333          "w1"
-0.800000  0xbf4ccccd          "Ext Thin"
-0.800000  0xbf4ccccd          "Extra Thin"
-0.800000  0xbf4ccccd          "HairLine"
-0.800000  0xbf4ccccd          "Ultra Light"
-0.800000  0xbf4ccccd          "Ultra Thin"
-0.800000  0xbf4ccccd          "UltraLight"
-0.800000  0xbf4ccccd          "ulight"
-0.800000  0xbf4ccccd          "ultra light"
-0.800000  0xbf4ccccd          "ultralight"
-0.800000  0xbf4ccccd          1, 10 - 100
0.000000   0x0                 ".Keyboard"
0.000000   0x0                 ".LucidaGrandeUI"
0.000000   0x0                 ".LucidaGrandeUI"
0.000000   0x0                 "LucidaGrande"
0.000000   0x0                 "LucidaGrande"
0.000000   0x0                 "R"
0.000000   0x0                 "TimesNewRomanPSMT"
0.000000   0x0                 "TimesNewRomanPSMT"
0.000000   0x0                 "W4"
0.000000   0x0                 "reg"
0.000000   0x0                 "w4"
0.000000   0x0                 4, 301 - 400
0.000000   0x0                 default
0.230000   0x3e6b851f          5, 401 - 500
0.230000   0x3e6b851f          "M"
0.230000   0x3e6b851f          "Medium"
0.230000   0x3e6b851f          "W5"
0.230000   0x3e6b851f          "med"
0.230000   0x3e6b851f          "medium"
0.230000   0x3e6b851f          "w5"
0.230000   0x3e6b851f          panose 6
0.240000   0x3e75c28f          "STHeiti"
0.240000   0x3fceb851eb851eb8  "STHeiti"
0.250000   0x3e800000          "Demi Bold"
0.250000   0x3e800000          "Demi"
0.250000   0x3e800000          "DemiBold"
0.250000   0x3e800000          "demi bold"
0.250000   0x3e800000          "demi"
0.250000   0x3e800000          "demibold"
0.250000   0x3e800000          6, 501 - 600
0.250000   0x3e800000          panose 7
0.300000   0x3e99999a          "SB"
0.300000   0x3e99999a          "Semi Bold"
0.300000   0x3e99999a          "Semi"
0.300000   0x3e99999a          "SemiBold"
0.300000   0x3e99999a          "W6"
0.300000   0x3e99999a          "semi bold"
0.300000   0x3e99999a          "semi"
0.300000   0x3e99999a          "semi"
0.300000   0x3e99999a          "semibold"
0.300000   0x3e99999a          "w6"
0.400000   0x3ecccccd          "B"
0.400000   0x3ecccccd          "Bold"
0.400000   0x3ecccccd          "bold"
0.400000   0x3ecccccd          "bold"
0.400000   0x3ecccccd          'head'[0x2D] & 1
0.400000   0x3ecccccd          7, 601 - 700
0.400000   0x3ecccccd          panose 8
0.440000   0x3ee147ae          "W7"
0.440000   0x3ee147ae          "w7"
0.500000   0x3f000000          "EB"
0.500000   0x3f000000          "Ext Bold"
0.500000   0x3f000000          "Extra Bold"
0.500000   0x3f000000          "Extra"
0.500000   0x3f000000          "ExtraBold"
0.500000   0x3f000000          "Ultra"
0.500000   0x3f000000          "extra bold"
0.500000   0x3f000000          "extra"
0.500000   0x3f000000          "extrabold"
0.500000   0x3f000000          8, 701 - 800
0.540000   0x3f0a3d71          "W8"
0.540000   0x3f0a3d71          "w8"
0.560000   0x3f0f5c29          "H"
0.560000   0x3f0f5c29          "Heavy Face"
0.560000   0x3f0f5c29          "Heavy"
0.560000   0x3f0f5c29          "HeavyFace"
0.560000   0x3f0f5c29          "heavy face"
0.560000   0x3f0f5c29          "heavy"
0.560000   0x3f0f5c29          "heavy"
0.560000   0x3f0f5c29          "heavyface"
0.560000   0x3f0f5c29          panose 9
0.620000   0x3f1eb852          "Black"
0.620000   0x3f1eb852          "Super"
0.620000   0x3f1eb852          "W9"
0.620000   0x3f1eb852          "black"
0.620000   0x3f1eb852          "black"
0.620000   0x3f1eb852          "super"
0.620000   0x3f1eb852          "w9"
0.620000   0x3f1eb852          9, 801 - 900
0.620000   0x3f1eb852          panose 10
0.700000   0x3f333333          "U"
0.700000   0x3f333333          "Ultra Bold"
0.700000   0x3f333333          "UltraBold"
0.700000   0x3f333333          "ultra bold"
0.700000   0x3f333333          "ultrabold"
0.750000   0x3f400000          "Fat"
0.750000   0x3f400000          "Ultra Black"
0.750000   0x3f400000          "UltraBlack"
0.750000   0x3f400000          "fat"
0.750000   0x3f400000          "ultra black"
0.750000   0x3f400000          "ultrablack"
0.750000   0x3f400000          901 - 950
0.800000   0x3f4ccccd          "Ext Black"
0.800000   0x3f4ccccd          "ExtraBlack"
0.800000   0x3f4ccccd          "Nord"
0.800000   0x3f4ccccd          "Poster"
0.800000   0x3f4ccccd          "UH"
0.800000   0x3f4ccccd          "extrablack"
0.800000   0x3f4ccccd          "nord"
0.800000   0x3f4ccccd          "poster"
0.800000   0x3f4ccccd          951 - 999
0.800000   0x3f4ccccd          panose 11
0.850000   0x3f59999a          "Obese"
0.850000   0x3f59999a          "obese"


================================================
FILE: _doc/export/ctweightsraw
================================================
0.000000	0x0	"reg"
0.300000	0x3e99999a	"semi"
0.400000	0x3ecccccd	"bold"
-0.400000	0xbecccccd	"light"
0.230000	0x3e6b851f	"med"
0.560000	0x3f0f5c29	"heavy"
0.620000	0x3f1eb852	"black"
-0.600000	0xbf19999a	"thin"
-0.800000	0xbf4ccccd	"ulight"
0.000000	0x0	"LucidaGrande"
0.000000	0x0	".LucidaGrandeUI"
0.000000	0x0	".Keyboard"
0.240000	0x3e75c28f	"STHeiti"
-0.100000	0xbdcccccd	"STXihei"
0.000000	0x0	"TimesNewRomanPSMT"
-0.800000	0xbf4ccccd	"Ultra Light"
0.750000	0x3f400000	"Ultra Black"
-0.500000	0xbf000000	"Extra Light"
0.750000	0x3f400000	"UltraBlack"
0.800000	0x3f4ccccd	"ExtraBlack"
-0.800000	0xbf4ccccd	"UltraLight"
-0.500000	0xbf000000	"ExtraLight"
-0.800000	0xbf4ccccd	"Ultra Thin"
-0.800000	0xbf4ccccd	"Extra Thin"
0.560000	0x3f0f5c29	"Heavy Face"
-0.200000	0xbe4ccccd	"Semi Light"
0.500000	0x3f000000	"Extra Bold"
0.700000	0x3f333333	"Ultra Bold"
0.560000	0x3f0f5c29	"HeavyFace"
0.500000	0x3f000000	"ExtraBold"
0.700000	0x3f333333	"UltraBold"
0.800000	0x3f4ccccd	"Ext Black"
-0.200000	0xbe4ccccd	"SemiLight"
0.250000	0x3e800000	"Demi Bold"
0.300000	0x3e99999a	"Semi Bold"
-0.500000	0xbf000000	"Ext Light"
0.500000	0x3f000000	"Ext Bold"
0.250000	0x3e800000	"DemiBold"
0.300000	0x3e99999a	"SemiBold"
-0.800000	0xbf4ccccd	"HairLine"
-0.800000	0xbf4ccccd	"Ext Thin"
0.230000	0x3e6b851f	"Medium"
0.800000	0x3f4ccccd	"Poster"
-0.400000	0xbecccccd	"Light"
0.500000	0x3f000000	"Ultra"
0.560000	0x3f0f5c29	"Heavy"
0.500000	0x3f000000	"Extra"
0.620000	0x3f1eb852	"Black"
0.620000	0x3f1eb852	"Super"
0.850000	0x3f59999a	"Obese"
-0.400000	0xbecccccd	"Lite"
-0.230000	0xbe6b851f	"Book"
0.250000	0x3e800000	"Demi"
0.300000	0x3e99999a	"Semi"
-0.500000	0xbf000000	"Thin"
0.400000	0x3ecccccd	"Bold"
0.800000	0x3f4ccccd	"Nord"
0.750000	0x3f400000	"Fat"
-0.230000	0xbe6b851f	"W1"
-0.500000	0xbf000000	"W2"
-0.230000	0xbe6b851f	"W3"
0.000000	0x0	"W4"
0.230000	0x3e6b851f	"W5"
0.300000	0x3e99999a	"W6"
0.440000	0x3ee147ae	"W7"
0.540000	0x3f0a3d71	"W8"
0.620000	0x3f1eb852	"W9"
-0.800000	0xbf4ccccd	1, 10 - 100
-0.500000	0xbf000000	2, 101 - 200
-0.400000	0xbecccccd	3, 201 - 300
0.000000	0x0	4, 301 - 400
0.230000	0x3e6b851f	5, 401 - 500
0.250000	0x3e800000	6, 501 - 600
0.400000	0x3ecccccd	7, 601 - 700
0.500000	0x3f000000	8, 701 - 800
0.620000	0x3f1eb852	9, 801 - 900
0.750000	0x3f400000	901 - 950
0.800000	0x3f4ccccd	951 - 999
-0.500000	0xbf000000	panose 2
-0.400000	0xbecccccd	panose 3
-0.230000	0xbe6b851f	panose 5
0.230000	0x3e6b851f	panose 6
0.250000	0x3e800000	panose 7
0.400000	0x3ecccccd	panose 8
0.560000	0x3f0f5c29	panose 9
0.620000	0x3f1eb852	panose 10
0.800000	0x3f4ccccd	panose 11
0.400000	0x3ecccccd	'head'[0x2D] & 1
-0.200000	0xbe4ccccd	"EL"
0.500000	0x3f000000	"EB"
0.300000	0x3e99999a	"SB"
0.800000	0x3f4ccccd	"UH"
0.700000	0x3f333333	"U"
-0.400000	0xbecccccd	"L"
0.560000	0x3f0f5c29	"H"
0.400000	0x3ecccccd	"B"
0.230000	0x3e6b851f	"M"
0.000000	0x0	"R"
0.000000	0x0	default
0.000000	0x0	"LucidaGrande"
0.000000	0x0	".LucidaGrandeUI"
0.240000	0x3fceb851eb851eb8	"STHeiti"
-0.100000	0xbfb999999999999a	"STXihei"
0.000000	0x0	"TimesNewRomanPSMT"
-0.800000	0xbf4ccccd	"ultra light"
0.750000	0x3f400000	"ultra black"
-0.500000	0xbf000000	"extra light"
-0.800000	0xbf4ccccd	"ultralight"
0.750000	0x3f400000	"ultrablack"
0.800000	0x3f4ccccd	"extrablack"
-0.500000	0xbf000000	"extralight"
0.560000	0x3f0f5c29	"heavy face"
-0.200000	0xbe4ccccd	"semi light"
0.500000	0x3f000000	"extra bold"
0.700000	0x3f333333	"ultra bold"
0.560000	0x3f0f5c29	"heavyface"
0.500000	0x3f000000	"extrabold"
0.700000	0x3f333333	"ultrabold"
-0.200000	0xbe4ccccd	"semilight"
0.250000	0x3e800000	"demi bold"
0.300000	0x3e99999a	"semi bold"
0.250000	0x3e800000	"demibold"
0.300000	0x3e99999a	"semibold"
-0.700000	0xbf333333	"hairline"
0.230000	0x3e6b851f	"medium"
0.800000	0x3f4ccccd	"poster"
-0.400000	0xbecccccd	"light"
0.560000	0x3f0f5c29	"heavy"
0.500000	0x3f000000	"extra"
0.620000	0x3f1eb852	"black"
0.620000	0x3f1eb852	"super"
0.850000	0x3f59999a	"obese"
-0.400000	0xbecccccd	"lite"
-0.230000	0xbe6b851f	"book"
0.250000	0x3e800000	"demi"
0.300000	0x3e99999a	"semi"
-0.500000	0xbf000000	"thin"
0.400000	0x3ecccccd	"bold"
0.800000	0x3f4ccccd	"nord"
0.750000	0x3f400000	"fat"
-0.700000	0xbf333333	"w1"
-0.500000	0xbf000000	"w2"
-0.230000	0xbe6b851f	"w3"
0.000000	0x0	"w4"
0.230000	0x3e6b851f	"w5"
0.300000	0x3e99999a	"w6"
0.440000	0x3ee147ae	"w7"
0.540000	0x3f0a3d71	"w8"
0.620000	0x3f1eb852	"w9"


================================================
FILE: _doc/export/ctweightvalues
================================================
registered font, preexisting metadata weight
"reg":	float32as(0.000000, 0x0)
"semi":	float32as(0.300000, 0x3e99999a)
"bold":	float32as(0.400000, 0x3ecccccd)
"light":	float32as(-0.400000, 0xbecccccd)
"med":	float32as(0.230000, 0x3e6b851f)
"heavy":	float32as(0.560000, 0x3f0f5c29)
"black":	float32as(0.620000, 0x3f1eb852)
"thin":	float32as(-0.600000, 0xbf19999a)
"ulight":	float32as(-0.800000, 0xbf4ccccd)

registered font, postscript name (probably only for TrueType and OpenType) special cases, overrides the above
"LucidaGrande":			float32as(0.000000, 0x0)
".LucidaGrandeUI":			float32as(0.000000, 0x0)
".Keyboard":				float32as(0.000000, 0x0)
"STHeiti":					float32as(0.240000, 0x3e75c28f)
"STXihei":					float32as(-0.100000, 0xbdcccccd)
"TimesNewRomanPSMT":		float32as(0.000000, 0x0)

registered font, style glossary strings, tried in this order (possibly TrueType and OpenType only): preferred subfamily, subfamily, full name, preferred family, family; case-insensitive search, reverse search, "nonliteral" (kCFCompareNonliteral)
"Ultra Light":	float32as(-0.800000, 0xbf4ccccd)
"Ultra Black":	float32as(0.750000, 0x3f400000)
"Extra Light":	float32as(-0.500000, 0xbf000000)
"UltraBlack":	float32as(0.750000, 0x3f400000)
"ExtraBlack":	float32as(0.800000, 0x3f4ccccd)
"UltraLight":	float32as(-0.800000, 0xbf4ccccd)
"ExtraLight":	float32as(-0.500000, 0xbf000000)
"Ultra Thin":	float32as(-0.800000, 0xbf4ccccd)
"Extra Thin":	float32as(-0.800000, 0xbf4ccccd)
"Heavy Face":	float32as(0.560000, 0x3f0f5c29)
"Semi Light":	float32as(-0.200000, 0xbe4ccccd)
"Extra Bold":	float32as(0.500000, 0x3f000000)
"Ultra Bold":	float32as(0.700000, 0x3f333333)
"HeavyFace":	float32as(0.560000, 0x3f0f5c29)
"ExtraBold":	float32as(0.500000, 0x3f000000)
"UltraBold":	float32as(0.700000, 0x3f333333)
"Ext Black":	float32as(0.800000, 0x3f4ccccd)
"SemiLight":	float32as(-0.200000, 0xbe4ccccd)
"Demi Bold":	float32as(0.250000, 0x3e800000)
"Semi Bold":	float32as(0.300000, 0x3e99999a)
"Ext Light":	float32as(-0.500000, 0xbf000000)
"Ext Bold":	float32as(0.500000, 0x3f000000)
"DemiBold":	float32as(0.250000, 0x3e800000)
"SemiBold":	float32as(0.300000, 0x3e99999a)
"HairLine":	float32as(-0.800000, 0xbf4ccccd)
"Ext Thin":	float32as(-0.800000, 0xbf4ccccd)
"Medium":	float32as(0.230000, 0x3e6b851f)
"Poster":		float32as(0.800000, 0x3f4ccccd)
"Light":		float32as(-0.400000, 0xbecccccd)
"Ultra":		float32as(0.500000, 0x3f000000)
"Heavy":		float32as(0.560000, 0x3f0f5c29)
"Extra":		float32as(0.500000, 0x3f000000)
"Black":		float32as(0.620000, 0x3f1eb852)
"Super":		float32as(0.620000, 0x3f1eb852)
"Obese":		float32as(0.850000, 0x3f59999a)
"Lite":		float32as(-0.400000, 0xbecccccd)
"Book":		float32as(-0.230000, 0xbe6b851f)
"Demi":		float32as(0.250000, 0x3e800000)
"Semi":		float32as(0.300000, 0x3e99999a)
"Thin":		float32as(-0.500000, 0xbf000000)
"Bold":		float32as(0.400000, 0x3ecccccd)
"Nord":		float32as(0.800000, 0x3f4ccccd)
"Fat":		float32as(0.750000, 0x3f400000)
"W1":		float32as(-0.230000, 0xbe6b851f)
"W2":		float32as(-0.500000, 0xbf000000)
"W3":		float32as(-0.230000, 0xbe6b851f)
"W4":		float32as(0.000000, 0x0)
"W5":		float32as(0.230000, 0x3e6b851f)
"W6":		float32as(0.300000, 0x3e99999a)
"W7":		float32as(0.440000, 0x3ee147ae)
"W8":		float32as(0.540000, 0x3f0a3d71)
"W9":		float32as(0.620000, 0x3f1eb852)

registered font, OS2 weights; table length >= 78
1, 10 - 100:	float32as(-0.800000, 0xbf4ccccd)
2, 101 - 200:	float32as(-0.500000, 0xbf000000)
3, 201 - 300:	float32as(-0.400000, 0xbecccccd)
4, 301 - 400:	float32as(0.000000, 0x0)
5, 401 - 500:	float32as(0.230000, 0x3e6b851f)
6, 501 - 600:	float32as(0.250000, 0x3e800000)
7, 601 - 700:	float32as(0.400000, 0x3ecccccd)
8, 701 - 800:	float32as(0.500000, 0x3f000000)
9, 801 - 900:	float32as(0.620000, 0x3f1eb852)
901 - 950:	float32as(0.750000, 0x3f400000)
951 - 999:	float32as(0.800000, 0x3f4ccccd)
0, 1000:		panose
panose 2:		float32as(-0.500000, 0xbf000000)
panose 3:		float32as(-0.400000, 0xbecccccd)
panose 4:		!!!! see note	should be float32as(-0.300000, 0xbe99999a) but is treated as invalid instead due to returning false instead of true
panose 5:		float32as(-0.230000, 0xbe6b851f)
panose 6:		float32as(0.230000, 0x3e6b851f)
panose 7:		float32as(0.250000, 0x3e800000)
panose 8:		float32as(0.400000, 0x3ecccccd)
panose 9:		float32as(0.560000, 0x3f0f5c29)
panose 10:	float32as(0.620000, 0x3f1eb852)
panose 11:	float32as(0.800000, 0x3f4ccccd)

registered font, head table, low bit of byte 0x2D
'head'[0x2D] & 1:		float32as(0.400000, 0x3ecccccd)

registered font, abbreviated weight glossary, checks for (possibly in TrueType and OpenType only) in order: preferred subfamily, family; case-insensitive strict comparison
"EL":		float32as(-0.200000, 0xbe4ccccd)
"EB":		float32as(0.500000, 0x3f000000)
"SB":		float32as(0.300000, 0x3e99999a)
"UH":	float32as(0.800000, 0x3f4ccccd)
"U":		float32as(0.700000, 0x3f333333)
"L":		float32as(-0.400000, 0xbecccccd)
"H":		float32as(0.560000, 0x3f0f5c29)
"B":		float32as(0.400000, 0x3ecccccd)
"M":		float32as(0.230000, 0x3e6b851f)
"R":		float32as(0.000000, 0x0)

registered font
default:	float32as(0.000000, 0x0)

// based on CoreText dylib's __Z13WeightOfClasst — WeightOfClass(unsigned short)
func CoreText_WeightOfClass(usWeightClass uint16) float64 {
	if usWeightClass >= 11 {
		// do nothing; we are preserving the original asm comparisons
		// and yes, this one is 11, but the one above is 10
	} else {
		usWeightClass *= 100
	}

	// figure out what two floats our weight will be between
	i := usWeightClass / 100
	j := i + 1
	if j > 10 {
		j = 10
	}
	b := float64(i * 100)
	c := float64(j * 100)

	a := float64(0)
	if b != c {
		a = float64(usWeightClass)
		a -= b
		c -= b
		a /= c
	}
	scales := []float32{
		float32as(-1.000000, 0xbf800000),
		float32as(-0.700000, 0xbf333333),
		float32as(-0.500000, 0xbf000000),
		float32as(-0.230000, 0xbe6b851f),
		float32as(0.000000, 0x0),
		float32as(0.200000, 0x3e4ccccd),
		float32as(0.300000, 0x3e99999a),
		float32as(0.400000, 0x3ecccccd),
		float32as(0.600000, 0x3f19999a),
		float32as(0.800000, 0x3f4ccccd),
		float32as(1.000000, 0x3f800000),
	}
	c = float64(scale[i])
	b = float64[scale[j])
	return fma(a, b, c)
}

unregistered font: kCTFontPostScriptNameKey defaults
"LucidaGrande":			float64as(0.000000, 0x0)
".LucidaGrandeUI":			float64as(0.000000, 0x0)
"STHeiti":					float64as(0.240000, 0x3fceb851eb851eb8)
"STXihei":					float64as(-0.100000, 0xbfb999999999999a)
"TimesNewRomanPSMT":		float64as(0.000000, 0x0)


	os2table := f.Table('OS/2')
	if os2table != nil {
		if !hasWeight {
			var usWeightClass uint16

			valid := false
			if os2table.Len() > 77 {
				b := os2table.Bytes()
				usWeightClass = uint16be(b[4:6])
				if usWeightClass > 1000 {
					weight = 0
					hasWeight = false
				} else {
					valid = true
				}
			} else {
				usWeightClass = 0
				valid = true
			}
			if valid {
				weight = CoreText_WeightOfClass(usWeightClass)
				hasWeight = true
			}
		}
	}


unregistered font, style glossary, checks against kCTFontSubFamilyNameKey, kCTFontFullNameKey, kCTFontFamilyNameKey; case-insensitive (folded by Unicode rules) strstr()
"ultra light":	float32as(-0.800000, 0xbf4ccccd)
"ultra black":	float32as(0.750000, 0x3f400000)
"extra light":	float32as(-0.500000, 0xbf000000)
"ultralight":	float32as(-0.800000, 0xbf4ccccd)
"ultrablack":	float32as(0.750000, 0x3f400000)
"extrablack":	float32as(0.800000, 0x3f4ccccd)
"extralight":	float32as(-0.500000, 0xbf000000)
"heavy face":	float32as(0.560000, 0x3f0f5c29)
"semi light":	float32as(-0.200000, 0xbe4ccccd)
"extra bold":	float32as(0.500000, 0x3f000000)
"ultra bold":	float32as(0.700000, 0x3f333333)
"heavyface":	float32as(0.560000, 0x3f0f5c29)
"extrabold":	float32as(0.500000, 0x3f000000)
"ultrabold":	float32as(0.700000, 0x3f333333)
"semilight":	float32as(-0.200000, 0xbe4ccccd)
"demi bold":	float32as(0.250000, 0x3e800000)
"semi bold":	float32as(0.300000, 0x3e99999a)
"demibold":	float32as(0.250000, 0x3e800000)
"semibold":	float32as(0.300000, 0x3e99999a)
"hairline":		float32as(-0.700000, 0xbf333333)
"medium":	float32as(0.230000, 0x3e6b851f)
"poster":		float32as(0.800000, 0x3f4ccccd)
"light":		float32as(-0.400000, 0xbecccccd)
"heavy":		float32as(0.560000, 0x3f0f5c29)
"extra":		float32as(0.500000, 0x3f000000)
"black":		float32as(0.620000, 0x3f1eb852)
"super":		float32as(0.620000, 0x3f1eb852)
"obese":		float32as(0.850000, 0x3f59999a)
"lite":		float32as(-0.400000, 0xbecccccd)
"book":		float32as(-0.230000, 0xbe6b851f)
"demi":		float32as(0.250000, 0x3e800000)
"semi":		float32as(0.300000, 0x3e99999a)
"thin":		float32as(-0.500000, 0xbf000000)
"bold":		float32as(0.400000, 0x3ecccccd)
"nord":		float32as(0.800000, 0x3f4ccccd)
"fat":			float32as(0.750000, 0x3f400000)
"w1":		float32as(-0.700000, 0xbf333333)
"w2":		float32as(-0.500000, 0xbf000000)
"w3":		float32as(-0.230000, 0xbe6b851f)
"w4":		float32as(0.000000, 0x0)
"w5":		float32as(0.230000, 0x3e6b851f)
"w6":		float32as(0.300000, 0x3e99999a)
"w7":		float32as(0.440000, 0x3ee147ae)
"w8":		float32as(0.540000, 0x3f0a3d71)
"w9":		float32as(0.620000, 0x3f1eb852)

func (f *Font) ShouldEnableBoldSymbolicTrait() bool {
	if f.IsRegistered() {
		return f.ShouldEnableBoldSymbolicTraitFromRegistry()
	}
	no := f.Weight() <= float64as(0.239000, 0x3fce978d4fdf3b64)
	return !no
}


================================================
FILE: _doc/export/ctwidths
================================================
xx pseudo-go

func (f *CTFont) RegistryWidth32() float32 {
	metadata visual descriptors
	{ "med", float32as(0.000000, 0x0) },
	{ "cond", float32as(-0.200000, 0xbe4ccccd) },
	{ "ext", float32as(0.200000, 0x3e4ccccd) },

	style dictionary
	{ "Extra Compressed", float32as(-0.700000, 0xbf333333) },
	{ "Ultra Compressed", float32as(-0.700000, 0xbf333333) },
	{ "Ultra Condensed", float32as(-0.700000, 0xbf333333) },
	{ "Extra Condensed", float32as(-0.500000, 0xbf000000) },
	{ "Extra Extended", float32as(0.400000, 0x3ecccccd) },
	{ "Ext Compressed", float32as(-0.700000, 0xbf333333) },
	{ "Ultra Expanded", float32as(0.800000, 0x3f4ccccd) },
	{ "Ultra Extended", float32as(0.800000, 0x3f4ccccd) },
	{ "Extra Expanded", float32as(0.400000, 0x3ecccccd) },
	xx TODO this is weird, but correct...
	{ "Semi Condensed", float32as(-0.700000, 0xbf333333) },
	{ "Semi Condensed", float32as(-0.100000, 0xbdcccccd) },
	xx end TODO
	{ "Ext Condensed", float32as(-0.500000, 0xbf000000) },
	{ "SemiCondensed", float32as(-0.100000, 0xbdcccccd) },
	{ "ExtraExpanded", float32as(0.400000, 0x3ecccccd) },
	{ "Semi Expanded", float32as(0.100000, 0x3dcccccd) },
	{ "Semi Extended", float32as(0.100000, 0x3dcccccd) },
	{ "Ext Expanded", float32as(0.400000, 0x3ecccccd) },
	{ "Ext Extended", float32as(0.400000, 0x3ecccccd) },
	{ "SemiExpanded", float32as(0.100000, 0x3dcccccd) },
	{ "Extra Narrow", float32as(-0.500000, 0xbf000000) },
	{ "ExtraNarrow", float32as(-0.500000, 0xbf000000) },
	{ "Extra Wide", float32as(0.800000, 0x3f4ccccd) },
	{ "Ultra Cond", float32as(-0.700000, 0xbf333333) },
	{ "Compressed", float32as(-0.500000, 0xbf000000) },
	{ "Extra Cond", float32as(-0.500000, 0xbf000000) },
	{ "Semi Cond", float32as(-0.100000, 0xbdcccccd) },
	{ "Condensed", float32as(-0.200000, 0xbe4ccccd) },
	{ "ExtraWide", float32as(0.800000, 0x3f4ccccd) },
	{ "Extended", float32as(0.200000, 0x3e4ccccd) },
	{ "Expanded", float32as(0.200000, 0x3e4ccccd) },
	{ "Ext Cond", float32as(-0.500000, 0xbf000000) },
	{ "Narrow", float32as(-0.400000 , 0xbecccccd) },
	{ "Compact", float32as(-0.400000, 0xbecccccd) },
	{ "Cond", float32as(-0.200000, 0xbe4ccccd) },
	{ "Wide", float32as(0.600000, 0x3f19999a) },
	{ "Thin", float32as(-0.700000, 0xbf333333) },

	get os2 table
	if os2table.Len() >= 78 {
		usWidthClass := uint16be(b[6:8]) - 1
		xx this handles the case where the original usWidthClass == 0
		if usWidthClass > 8 {
			panose := b[0x23] - 2
			if panose > 6 {
				xx TODO
			} else {
				switch panose {
				case 0, 1, 2:
					width = float32as(0.000000, 0x0)
				case 3:
					width = float32as(0.200000, 0x3e4ccccd)
				case 4:
					width = float32as(-0.200000, 0xbe4ccccd)
				case 5:
					width = float32as(0.400000, 0x3ecccccd)
				case 6:
					width = float32as(-0.400000, 0xbecccccd)
				}
			}
		}
		switch usWidthClass {
		case 0:
			width = float32as(-0.700000, 0xbf333333)
		case 1:
			width = float32as(-0.500000, 0xbf000000)
		case 2:
			width = float32as(-0.200000, 0xbe4ccccd)
		case 3:
			width = float32as(-0.100000, 0xbdcccccd)
		case 4:
			width = float32as(0.000000, 0x0)
		case 5:
			width = float32as(0.100000, 0x3dcccccd)
		case 6:
			width = float32as(0.400000, 0x3ecccccd)
		case 7:
			width = float32as(0.600000, 0x3f19999a)
		case 8:
			width = float32as(0.800000, 0x3f4ccccd)
		}
	}

	headtable := f.CopyTable('head')
	if headtable != nil {
		if headtable.Len() >= 54 {
			x := b[0x2d]
			if (x & 0x20) != 0 {
				width = float32as(-0.200000, 0xbe4ccccd)
			} else if (x & 0x40) != 0 {
				width = float32as(0.200000, 0x3e4ccccd)
			}
		}
	}

	xx and if all else fails
	return float32as(0.000000, 0x0)
}

func (f *CTFont) Width() float64 {
	if f.IsRegistered() {
		return f.RegistryWidth()
	}

	width := 0.0
	hasWidth := false

	if there is an OS2 table {
		var usWidthClass uint16

		valid := false
		if it's 78 bytes or more {
			usWidthClass = uint16be(table[6:8])
			if usWeightClass <= 10 {
				valid = true
			} else {
				valid = false
			}
		} else {
			usWidthClass = 0
			valid = true
		}
		if valid {
			ten := float64as(10.000000, 0x4024000000000000)
			negPointFive := float64as(-0.500000, 0xbfe0000000000000)
			width = (float64(usWidthClass) div ten) + negPointFive
			hasWidth = true
		}
	}

	then there's the style glossary strings comparison:
	{ "semi condensed", float32as(-0.100000, 0xbdcccccd) },
	{ "extra expanded", float32as(0.400000, 0x3ecccccd) },
	{ "semicondensed", float32as(-0.100000, 0xbdcccccd) },
	{ "extraexpanded", float32as(0.400000, 0x3ecccccd) },
	{ "semi expanded", float32as(0.100000, 0x3dcccccd) },
	{ "semiexpanded", float32as(0.100000, 0x3dcccccd) },
	{ "extra narrow", float32as(-0.500000, 0xbf000000) },
	{ "extranarrow", float32as(-0.500000, 0xbf000000) },
	{ "extra wide", float32as(0.800000, 0x3f4ccccd) },
	{ "condensed", float32as(-0.200000, 0xbe4ccccd) },
	{ "extrawide", float32as(0.800000, 0x3f4ccccd) },
	{ "extended", float32as(0.200000, 0x3e4ccccd) },
	{ "expanded", float32as(0.200000, 0x3e4ccccd) },
	{ "narrow", float32as(-0.400000, 0xbecccccd) },
	{ "wide", float32as(0.600000, 0x3f19999a) },
	{ "thin", float32as(-0.700000, 0xbf333333) },

	otherwise just return float64as(0.000000, 0x0)
}


================================================
FILE: _doc/export/ctwidthscombined
================================================
-0.100000
	style string contains "Semi Cond"
	style string contains "Semi Condensed"; unregistered fonts only (see below)
	style string contains "SemiCondensed"
	OS2 width 4

-0.200000
	('head' table byte 0x2d) & 0x20 != 0
	ATSD style "cond"
	panose 6
	style string contains "Cond"
	style string contains "Condensed"
	OS2 width 3

-0.400000
	panose 8
	style string contains "Compact"
	style string contains "Narrow"

-0.500000
	style string contains "Compressed"
	style string contains "Ext Cond"
	style string contains "Ext Condensed"
	style string contains "Extra Cond"
	style string contains "Extra Condensed"
	style string contains "Extra Narrow"
	style string contains "ExtraNarrow"
	OS2 width 2

-0.700000
	style string contains "Ext Compressed"
	style string contains "Extra Compressed"
	style string contains "Semi Condensed" (this is probably a typo, since another "Semi Condensed" with a value of -0.1 follows this in the table it comes from); registered fonts only
	style string contains "Thin"
	style string contains "Ultra Compressed"
	style string contains "Ultra Cond"
	style string contains "Ultra Condensed"
	OS2 width 1

0.000000
	default
	ATSD style "med"
	panose 2, 3, 4
	OS2 width 5

0.100000
	style string contains "Semi Expanded"
	style string contains "Semi Extended"
	style string contains "SemiExpanded"
	OS2 width 6

0.200000
	('head' table byte 0x2d) & 0x40 != 0
	ATSD style "ext"
	panose 5
	style string contains "Expanded"
	style string contains "Extended"

0.400000
	panose 7
	style string contains "Ext Expanded"
	style string contains "Ext Extended"
	style string contains "Extra Expanded"
	style string contains "Extra Extended"
	style string contains "ExtraExpanded"
	OS2 width 7

0.600000
	style string contains "Wide"
	OS2 width 8

0.800000
	style string contains "Extra Wide"
	style string contains "ExtraWide"
	style string contains "Ultra Expanded"
	style string contains "Ultra Extended"
	OS2 width 9


================================================
FILE: _doc/export/ctwidthsprocessed
================================================
-0.100000  0xbdcccccd  registered "Semi Cond"
-0.100000  0xbdcccccd  registered "Semi Condensed"
-0.100000  0xbdcccccd  registered "SemiCondensed"
-0.100000  0xbdcccccd  registered OS2 4
-0.100000  0xbdcccccd  unregistered "semi condensed"
-0.100000  0xbdcccccd  unregistered "semicondensed"
-0.200000  0xbe4ccccd  head[0x2d] & 0x20
-0.200000  0xbe4ccccd  metadata "cond"
-0.200000  0xbe4ccccd  panose 6
-0.200000  0xbe4ccccd  registered "Cond"
-0.200000  0xbe4ccccd  registered "Condensed"
-0.200000  0xbe4ccccd  registered OS2 3
-0.200000  0xbe4ccccd  unregistered "condensed"
-0.400000  0xbecccccd  panose 8
-0.400000  0xbecccccd  registered "Compact"
-0.400000  0xbecccccd  registered "Narrow"
-0.400000  0xbecccccd  unregistered "narrow"
-0.500000  0xbf000000  registered "Compressed"
-0.500000  0xbf000000  registered "Ext Cond"
-0.500000  0xbf000000  registered "Ext Condensed"
-0.500000  0xbf000000  registered "Extra Cond"
-0.500000  0xbf000000  registered "Extra Condensed"
-0.500000  0xbf000000  registered "Extra Narrow"
-0.500000  0xbf000000  registered "ExtraNarrow"
-0.500000  0xbf000000  registered OS2 2
-0.500000  0xbf000000  unregistered "extra narrow"
-0.500000  0xbf000000  unregistered "extranarrow"
-0.700000  0xbf333333  registered "Ext Compressed"
-0.700000  0xbf333333  registered "Extra Compressed"
-0.700000  0xbf333333  registered "Semi Condensed"
-0.700000  0xbf333333  registered "Thin"
-0.700000  0xbf333333  registered "Ultra Compressed"
-0.700000  0xbf333333  registered "Ultra Cond"
-0.700000  0xbf333333  registered "Ultra Condensed"
-0.700000  0xbf333333  registered OS2 1
-0.700000  0xbf333333  unregistered "thin"
0.000000   0x0         default
0.000000   0x0         metadata "med"
0.000000   0x0         panose 2, 3, 4
0.000000   0x0         registered OS2 5
0.000000   0x0         registered default
0.100000   0x3dcccccd  registered "Semi Expanded"
0.100000   0x3dcccccd  registered "Semi Extended"
0.100000   0x3dcccccd  registered "SemiExpanded"
0.100000   0x3dcccccd  registered OS2 6
0.100000   0x3dcccccd  unregistered "semi expanded"
0.100000   0x3dcccccd  unregistered "semiexpanded"
0.200000   0x3e4ccccd  head[0x2d] & 0x40
0.200000   0x3e4ccccd  metadata "ext"
0.200000   0x3e4ccccd  panose 5
0.200000   0x3e4ccccd  registered "Expanded"
0.200000   0x3e4ccccd  registered "Extended"
0.200000   0x3e4ccccd  unregistered "expanded"
0.200000   0x3e4ccccd  unregistered "extended"
0.400000   0x3ecccccd  panose 7
0.400000   0x3ecccccd  registered "Ext Expanded"
0.400000   0x3ecccccd  registered "Ext Extended"
0.400000   0x3ecccccd  registered "Extra Expanded"
0.400000   0x3ecccccd  registered "Extra Extended"
0.400000   0x3ecccccd  registered "ExtraExpanded"
0.400000   0x3ecccccd  registered OS2 7
0.400000   0x3ecccccd  unregistered "extra expanded"
0.400000   0x3ecccccd  unregistered "extraexpanded"
0.600000   0x3f19999a  registered "Wide"
0.600000   0x3f19999a  registered OS2 8
0.600000   0x3f19999a  unregistered "wide"
0.800000   0x3f4ccccd  registered "Extra Wide"
0.800000   0x3f4ccccd  registered "ExtraWide"
0.800000   0x3f4ccccd  registered "Ultra Expanded"
0.800000   0x3f4ccccd  registered "Ultra Extended"
0.800000   0x3f4ccccd  registered OS2 9
0.800000   0x3f4ccccd  unregistered "extra wide"
0.800000   0x3f4ccccd  unregistered "extrawide"


================================================
FILE: _doc/export/ctwidthvalues
================================================
metadata "med":	float32as(0.000000, 0x0)
metadata "cond":	float32as(-0.200000, 0xbe4ccccd)
metadata "ext":		float32as(0.200000, 0x3e4ccccd)

registered "Extra Compressed":		float32as(-0.700000, 0xbf333333)
registered "Ultra Compressed":		float32as(-0.700000, 0xbf333333)
registered "Ultra Condensed":		float32as(-0.700000, 0xbf333333)
registered "Extra Condensed":		float32as(-0.500000, 0xbf000000)
registered "Extra Extended":		float32as(0.400000, 0x3ecccccd)
registered "Ext Compressed":		float32as(-0.700000, 0xbf333333)
registered "Ultra Expanded":		float32as(0.800000, 0x3f4ccccd)
registered "Ultra Extended":		float32as(0.800000, 0x3f4ccccd)
registered "Extra Expanded":		float32as(0.400000, 0x3ecccccd)
registered "Semi Condensed":		float32as(-0.700000, 0xbf333333)
registered "Semi Condensed":		float32as(-0.100000, 0xbdcccccd)
registered "Ext Condensed":		float32as(-0.500000, 0xbf000000)
registered "SemiCondensed":		float32as(-0.100000, 0xbdcccccd)
registered "ExtraExpanded":		float32as(0.400000, 0x3ecccccd)
registered "Semi Expanded":		float32as(0.100000, 0x3dcccccd)
registered "Semi Extended":		float32as(0.100000, 0x3dcccccd)
registered "Ext Expanded":		float32as(0.400000, 0x3ecccccd)
registered "Ext Extended":		float32as(0.400000, 0x3ecccccd)
registered "SemiExpanded":		float32as(0.100000, 0x3dcccccd)
registered "Extra Narrow":		float32as(-0.500000, 0xbf000000)
registered "ExtraNarrow":		float32as(-0.500000, 0xbf000000)
registered "Extra Wide":		float32as(0.800000, 0x3f4ccccd)
registered "Ultra Cond":		float32as(-0.700000, 0xbf333333)
registered "Compressed":		float32as(-0.500000, 0xbf000000)
registered "Extra Cond":		float32as(-0.500000, 0xbf000000)
registered "Semi Cond":		float32as(-0.100000, 0xbdcccccd)
registered "Condensed":		float32as(-0.200000, 0xbe4ccccd)
registered "ExtraWide":		float32as(0.800000, 0x3f4ccccd)
registered "Extended":		float32as(0.200000, 0x3e4ccccd)
registered "Expanded":		float32as(0.200000, 0x3e4ccccd)
registered "Ext Cond":		float32as(-0.500000, 0xbf000000)
registered "Narrow":			float32as(-0.400000 , 0xbecccccd)
registered "Compact":		float32as(-0.400000, 0xbecccccd)
registered "Cond":			float32as(-0.200000, 0xbe4ccccd)
registered "Wide":			float32as(0.600000, 0x3f19999a)
registered "Thin":			float32as(-0.700000, 0xbf333333)

panose 2, 3, 4:		float32as(0.000000, 0x0)
panose 5:			float32as(0.200000, 0x3e4ccccd)
panose 6:			float32as(-0.200000, 0xbe4ccccd)
panose 7:			float32as(0.400000, 0x3ecccccd)
panose 8:			float32as(-0.400000, 0xbecccccd)

registered OS2 1:	float32as(-0.700000, 0xbf333333)
registered OS2 2:	float32as(-0.500000, 0xbf000000)
registered OS2 3:	float32as(-0.200000, 0xbe4ccccd)
registered OS2 4:	float32as(-0.100000, 0xbdcccccd)
registered OS2 5:	float32as(0.000000, 0x0)
registered OS2 6:	float32as(0.100000, 0x3dcccccd)
registered OS2 7:	float32as(0.400000, 0x3ecccccd)
registered OS2 8:	float32as(0.600000, 0x3f19999a)
registered OS2 9:	float32as(0.800000, 0x3f4ccccd)

head[0x2d] & 0x20:		float32as(-0.200000, 0xbe4ccccd)
head[0x2d] & 0x40:		float32as(0.200000, 0x3e4ccccd)

registered default:		float32as(0.000000, 0x0)

func (f *CTFont) Width() float64 {
	if f.IsRegistered() {
		return f.RegistryWidth()
	}

	width := 0.0
	hasWidth := false

	if there is an OS2 table {
		var usWidthClass uint16

		valid := false
		if it's 78 bytes or more {
			usWidthClass = uint16be(table[6:8])
			if usWeightClass <= 10 {
				valid = true
			} else {
				valid = false
			}
		} else {
			usWidthClass = 0
			valid = true
		}
		if valid {
			ten := float64as(10.000000, 0x4024000000000000)
			negPointFive := float64as(-0.500000, 0xbfe0000000000000)
			width = (float64(usWidthClass) div ten) + negPointFive
			hasWidth = true
		}
	}

	then there's the style glossary strings comparison:
unregistered "semi condensed":	float32as(-0.100000, 0xbdcccccd)
unregistered "extra expanded":	float32as(0.400000, 0x3ecccccd)
unregistered "semicondensed":	float32as(-0.100000, 0xbdcccccd)
unregistered "extraexpanded":		float32as(0.400000, 0x3ecccccd)
unregistered "semi expanded":		float32as(0.100000, 0x3dcccccd)
unregistered "semiexpanded":		float32as(0.100000, 0x3dcccccd)
unregistered "extra narrow":		float32as(-0.500000, 0xbf000000)
unregistered "extranarrow":	float32as(-0.500000, 0xbf000000)
unregistered "extra wide":	float32as(0.800000, 0x3f4ccccd)
unregistered "condensed":	float32as(-0.200000, 0xbe4ccccd)
unregistered "extrawide":		float32as(0.800000, 0x3f4ccccd)
unregistered "extended":		float32as(0.200000, 0x3e4ccccd)
unregistered "expanded":		float32as(0.200000, 0x3e4ccccd)
unregistered "narrow":		float32as(-0.400000, 0xbecccccd)
unregistered "wide":			float32as(0.600000, 0x3f19999a)
unregistered "thin":			float32as(-0.700000, 0xbf333333)

default:	float64as(0.000000, 0x0)


================================================
FILE: _doc/export/fvar.swift
================================================
// 2 november 2017
import Cocoa
import CoreText

func fourccString(_ k: FourCharCode) -> String {
	var c: [UInt8] = [0, 0, 0, 0]
	c[0] = UInt8((k >> 24) & 0xFF)
	c[1] = UInt8((k >> 16) & 0xFF)
	c[2] = UInt8((k >> 8) & 0xFF)
	c[3] = UInt8(k & 0xFF)
	return String(bytes: c, encoding: .utf8)!
}

var weightMin: Double = 0
var weightMax: Double = 0
var weightDef: Double = 0
var weightVals: [String: Double] = [:]

let attrs: [String: String] = [
	kCTFontFamilyNameAttribute as String:		"Skia",
]
let bd = CTFontDescriptorCreateWithAttributes(attrs as CFDictionary)
let matches = CTFontDescriptorCreateMatchingFontDescriptors(bd, nil) as! [CTFontDescriptor]
let mfont = CTFontCreateWithFontDescriptor(matches[0], 0.0, nil)
let master = CTFontCopyVariationAxes(mfont) as! [NSDictionary]
master.forEach { d in
	print("axis {")
	d.forEach { k, v in
		if (k as! String) == (kCTFontVariationAxisIdentifierKey as String) {
			let c = v as! FourCharCode
			print("\t\(k) \(fourccString(c))")
		} else {
			print("\t\(k) \(v)")
		}
	}
	print("}")
	if (d[kCTFontVariationAxisNameKey] as! String) == "Weight" {
		weightMin = d[kCTFontVariationAxisMinimumValueKey] as! Double
		weightMax = d[kCTFontVariationAxisMaximumValueKey] as! Double
		weightDef = d[kCTFontVariationAxisDefaultValueKey] as! Double
	}
}
print("")
matches.forEach { d in
	let f = CTFontDescriptorCopyAttribute(d, kCTFontVariationAttribute) as! [FourCharCode: Double]
	let n = CTFontDescriptorCopyAttribute(d, kCTFontStyleNameAttribute) as! String
	print("\(n) {")
	f.forEach { k, v in
		print("\t\(fourccString(k)) \(v)")
	}
	print("}")
	weightVals[n] = weightDef
	if let v = f[2003265652] {
		weightVals[n] = v
	}
}
print("")
weightVals.forEach { k, v in
	let basicScaled = (v - weightMin) / (weightMax - weightMin)
	print("\(k) basic scaled = \(basicScaled) (OS2 \(UInt16(basicScaled * 1000)))")
	// https://www.microsoft.com/typography/otspec/otvaroverview.htm#CSN
	var opentypeScaled: Double = 0
	if v < weightDef {
		opentypeScaled = -((weightDef - v) / (weightDef - weightMin))
	} else if v > weightDef {
		opentypeScaled = (v - weightDef) / (weightMax - weightDef)
	}
	print("\(k) opentype scaled = \(opentypeScaled)")
}
print("")
print("\(String(describing: CTFontDescriptorCreateMatchingFontDescriptors(CTFontDescriptorCreateCopyWithVariation(matches[0], FourCharCode(2003265652) as CFNumber, CGFloat(weightMax)), Set([kCTFontVariationAttribute as String]) as CFSet)))")
print("")
print("\(CTFontCopyTable(mfont, CTFontTableTag(kCTFontTableAvar), []) != nil)")


================================================
FILE: _doc/export/ttfixedtest.go
================================================
// 2 november 2017
package main

import (
	"fmt"
)

type fixed1616 uint32
type fixed214 uint16

func fixed1616To214(f fixed1616) fixed214 {
	f += 0x00000002
	g := int32(f) >> 2
	return fixed214(uint32(g) & 0xFFFF)
}

func (f fixed1616) In214Range() bool {
	base := int16((f >> 16) & 0xFFFF)
	return base >= -2 && base < 2
}

func (f fixed1616) String() string {
	base := int16((f >> 16) & 0xFFFF)
	frac := float64(f & 0xFFFF) / 65536
	res := float64(base) + frac
	return fmt.Sprintf("%f 0x%08X", res, uint32(f))
}

func (f fixed214) String() string {
	base := []int16{
		0,
		1,
		-2,
		-1,
	}[(f & 0xC000) >> 14]
	frac := float64(f & 0x3FFF) / 16384
	res := float64(base) + frac
	return fmt.Sprintf("%f 0x%04X", res, uint16(f))
}

func main() {
	fmt.Println(fixed214(0x7fff))
	fmt.Println(fixed214(0x8000))
	fmt.Println(fixed214(0x4000))
	fmt.Println(fixed214(0xc000))
	fmt.Println(fixed214(0x7000))
	fmt.Println(fixed214(0x0000))
	fmt.Println(fixed214(0x0001))
	fmt.Println(fixed214(0xffff))

	fmt.Println()

	for i := uint64(0x00000000); i <= 0xFFFFFFFF; i++ {
		j := fixed1616(i)
		if !j.In214Range() { continue }
		fmt.Println(j, "->", fixed1616To214(j))
	}
}


================================================
FILE: _doc/export/weightlist1.sh
================================================
# 21 october 2017
gawk '
BEGIN { FS = "\t+" }
!/float..as/ { next }
{ i = 0; if ($1 == "") i++ }
(NF-i) != 2 { next }
{ print }
' "$@"


================================================
FILE: _doc/export/weightlist2.sh
================================================
# 21 october 2017
gawk '
{
	gsub(/float..as\(/, "")
	gsub(/,/, "", $(NF - 1))
	gsub(/\)$/, "")
	split($0, parts, /:/)
	print $(NF - 1) "\t" $NF "\t" parts[1]
}
' "$@"


================================================
FILE: _doc/export/weightlist3.sh
================================================
# 21 october 2017
sort -t$'\t' -k1,1 -k2,2 "$@" |
	column -t -s$'\t'


================================================
FILE: _doc/export/writewidths.c
================================================
// 22 october 2017
extern int realMain(void);
int main(void) { return realMain(); }


================================================
FILE: _doc/export/writewidths.out
================================================
unregistered OS2 0:	float64as(-0.5, 0xbfe0000000000000)
unregistered OS2 1:	float64as(-0.4, 0xbfd999999999999a)
unregistered OS2 2:	float64as(-0.3, 0xbfd3333333333333)
unregistered OS2 3:	float64as(-0.2, 0xbfc999999999999a)
unregistered OS2 4:	float64as(-0.1, 0xbfb9999999999998)
unregistered OS2 5:	float64as(0, 0x0000000000000000)
unregistered OS2 6:	float64as(0.1, 0x3fb9999999999998)
unregistered OS2 7:	float64as(0.2, 0x3fc9999999999998)
unregistered OS2 8:	float64as(0.3, 0x3fd3333333333334)
unregistered OS2 9:	float64as(0.4, 0x3fd999999999999a)
unregistered OS2 10:	float64as(0.5, 0x3fe0000000000000)


================================================
FILE: _doc/export/writewidths.processed
================================================
-0.1  0xbfb9999999999998  unregistered OS2 4
-0.2  0xbfc999999999999a  unregistered OS2 3
-0.3  0xbfd3333333333333  unregistered OS2 2
-0.4  0xbfd999999999999a  unregistered OS2 1
-0.5  0xbfe0000000000000  unregistered OS2 0
0     0x0000000000000000  unregistered OS2 5
0.1   0x3fb9999999999998  unregistered OS2 6
0.2   0x3fc9999999999998  unregistered OS2 7
0.3   0x3fd3333333333334  unregistered OS2 8
0.4   0x3fd999999999999a  unregistered OS2 9
0.5   0x3fe0000000000000  unregistered OS2 10


================================================
FILE: _doc/export/writewidths.s
================================================
# 22 october 2017
# clang -o writewidths writewidths.c writewidths.s -g -Wall -Wextra -pedantic -g
# thanks to:
# - http://www.idryman.org/blog/2014/12/02/writing-64-bit-assembly-on-mac-os-x/
# - https://developer.apple.com/library/content/documentation/DeveloperTools/Reference/Assembler/060-i386_Addressing_Modes_and_Assembler_Instructions/i386_intructions.html#//apple_ref/doc/uid/TP30000825-TPXREF101
# - https://stackoverflow.com/questions/46309041/trivial-macos-assembly-64-bit-program-has-incorrect-stack-alignment
# - https://www.google.com/search?q=macos+implement+main+in+assembly+-nasm&oq=macos+implement+main+in+assembly+-nasm&gs_l=psy-ab.3...12877.13839.0.13988.6.6.0.0.0.0.117.407.4j1.5.0....0...1.1.64.psy-ab..1.0.0....0.et6MkokjvwA
# - https://stackoverflow.com/questions/2529185/what-are-cfi-directives-in-gnu-assembler-gas-used-for

.section __DATA,__data

double10:
	.quad	0x4024000000000000
doubleNeg05:
	.quad	0xbfe0000000000000

fmt:
	.asciz	"unregistered OS2 %ld:\tfloat64as(%g, 0x%016lx)\n"

.section __TEXT,__text
.globl _realMain
_realMain:
	pushq		%rbp
	movq		%rsp, %rbp
	addq			$8, %rsp

	xorq			%rcx, %rcx
loop:
	pushq		%rcx
	# the code from core text
	movzwl		%cx, %ecx
	xorps		%xmm0, %xmm0
	cvtsi2sdl		%ecx, %xmm0
	divsd		double10(%rip), %xmm0
	addsd		doubleNeg05(%rip), %xmm0
	# end core text code
	popq		%rcx
	pushq		%rcx
	movd		%xmm0, %rdx
	movzwq		%cx, %rsi
	leaq			fmt(%rip), %rdi
	callq			_printf
	popq		%rcx
	incw			%cx
	cmpw		$10, %cx
	jbe			loop

	xorq			%rax, %rax
	subq			$8, %rsp
	popq		%rbp
	ret


================================================
FILE: _doc/form
================================================
hiding a control also hides its label


================================================
FILE: _doc/main
================================================
after uiQuit or if uiShouldQuit returns nonzero, uiQueueMain's effect is undefined


================================================
FILE: _doc/mainsteps
================================================
the function passed to mainsteps must not return until uiQuit itself has been called; otherwise the results are undefined


================================================
FILE: _doc/misctests/gtkprogresstable.c
================================================
// 25 june 2018
#include <gtk/gtk.h>

GtkWidget *mainwin;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *startProgress;
GtkWidget *startTable;
GtkWidget *progressbar;
GtkWidget *scrolledWindow;
GtkListStore *model;
GtkWidget *treeview;
GtkWidget *hbox2;

static gboolean pulseProgress(gpointer data)
{
	gtk_progress_bar_pulse(GTK_PROGRESS_BAR(progressbar));
	return TRUE;
}

static void onStartProgressClicked(GtkButton *button, gpointer data)
{
	gtk_widget_set_sensitive(startProgress, FALSE);
	g_timeout_add(100, pulseProgress, NULL);
}

gboolean pbarStarted = FALSE;
gint pbarValue;

static void pbarDataFunc(GtkTreeViewColumn *col, GtkCellRenderer *r, GtkTreeModel *m, GtkTreeIter *iter, gpointer data)
{
	if (!pbarStarted) {
		g_object_set(r,
			"pulse", -1,
			"value", 0,
			NULL);
		return;
	}
	pbarValue++;
	if (pbarValue == G_MAXINT)
		pbarValue = 1;
	g_object_set(r, "pulse", pbarValue, NULL);
}

static gboolean pulseTable(gpointer data)
{
	GtkTreePath *path;
	GtkTreeIter iter;

	path = gtk_tree_path_new_from_indices(0, -1);
	gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, path);
	gtk_tree_model_row_changed(GTK_TREE_MODEL(model), path, &iter);
	gtk_tree_path_free(path);
	return TRUE;
}

static void onStartTableClicked(GtkButton *button, gpointer data)
{
	pbarStarted = TRUE;
	pbarValue = 0;

	gtk_widget_set_sensitive(startTable, FALSE);
	g_timeout_add(100, pulseTable, NULL);
}

static gboolean onClosing(GtkWidget *win, GdkEvent *e, gpointer data)
{
	gtk_main_quit();
	return FALSE;
}

int main(void)
{
	GtkTreeIter iter;
	GtkTreeViewColumn *col;
	GtkCellRenderer *r;

	gtk_init(NULL, NULL);

	mainwin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	g_signal_connect(mainwin, "delete-event", G_CALLBACK(onClosing), NULL);

	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12);
	gtk_container_set_border_width(GTK_CONTAINER(vbox), 12);
	gtk_container_add(GTK_CONTAINER(mainwin), vbox);

	hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_halign(hbox, GTK_ALIGN_CENTER);
	gtk_container_add(GTK_CONTAINER(vbox), hbox);

	startProgress = gtk_button_new_with_label("Start Progress Bar");
	g_signal_connect(startProgress, "clicked", G_CALLBACK(onStartProgressClicked), NULL);
	gtk_container_add(GTK_CONTAINER(hbox), startProgress);

	startTable = gtk_button_new_with_label("Start Table Cell Renderer");
	g_signal_connect(startTable, "clicked", G_CALLBACK(onStartTableClicked), NULL);
	gtk_container_add(GTK_CONTAINER(hbox), startTable);

	progressbar = gtk_progress_bar_new();
	gtk_container_add(GTK_CONTAINER(vbox), progressbar);

	scrolledWindow = gtk_scrolled_window_new(NULL, NULL);
	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_SHADOW_IN);
	gtk_widget_set_vexpand(scrolledWindow, TRUE);
	gtk_container_add(GTK_CONTAINER(vbox), scrolledWindow);

	model = gtk_list_store_new(1, G_TYPE_INT);
	gtk_list_store_append(model, &iter);
	gtk_list_store_set(model, &iter,
		0, 0,
		-1);

	treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(model));
	gtk_container_add(GTK_CONTAINER(scrolledWindow), treeview);

	col = gtk_tree_view_column_new();
	gtk_tree_view_column_set_resizable(col, TRUE);
	gtk_tree_view_column_set_title(col, "Column");
	gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), col);

	r = gtk_cell_renderer_progress_new();
	gtk_tree_view_column_pack_start(col, r, TRUE);
	gtk_tree_view_column_set_cell_data_func(col, r, pbarDataFunc, NULL, NULL);

	hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_halign(hbox2, GTK_ALIGN_CENTER);
	gtk_container_add(GTK_CONTAINER(vbox), hbox2);

	gtk_container_add(GTK_CONTAINER(hbox2), gtk_button_new_with_label("These buttons"));
	gtk_container_add(GTK_CONTAINER(hbox2), gtk_button_new_with_label("do nothing"));
	gtk_container_add(GTK_CONTAINER(hbox2), gtk_button_new_with_label("when clicked"));

	gtk_widget_show_all(mainwin);
	gtk_main();
	return 0;
}


================================================
FILE: _doc/misctests/winbuttonexplorertheme.cpp
================================================
// 9 october 2018
#define UNICODE
#define _UNICODE
#define STRICT
#define STRICT_TYPED_ITEMIDS
#define WINVER			0x0600	/* from Microsoft's winnls.h */
#define _WIN32_WINNT		0x0600
#define _WIN32_WINDOWS	0x0600	/* from Microsoft's pdh.h */
#define _WIN32_IE			0x0700
#define NTDDI_VERSION		0x06000000
#include <windows.h>
#include <commctrl.h>
#include <uxtheme.h>
#include <vsstyle.h>
#include <vssym32.h>
#include <windowsx.h>
#include <stdio.h>
#include <stdlib.h>

// cl winbuttonexplorertheme.cpp -MT -link user32.lib kernel32.lib gdi32.lib comctl32.lib uxtheme.lib msimg32.lib windows.res

void diele(const char *func)
{
	DWORD le;

	le = GetLastError();
	fprintf(stderr, "%s: %I32u\n", func, le);
	exit(EXIT_FAILURE);
}

void diehr(const char *func, HRESULT hr)
{
	fprintf(stderr, "%s: 0x%08I32X\n", func, hr);
	exit(EXIT_FAILURE);
}

// TODO if we merge this into libui proper, this will need to be deduplicated
static inline HRESULT lastErrorToHRESULT(DWORD lastError)
{
	if (lastError == 0)
		return E_FAIL;
	return HRESULT_FROM_WIN32(lastError);
}

HINSTANCE hInstance;
HWND leftButtons[5];
HWND rightButtons[3];

class commandModuleStyleParams {
public:
	virtual int partID_CMOD_MODULEBACKGROUND(void) const = 0;
	virtual int partID_CMOD_TASKBUTTON(void) const = 0;
	virtual int partID_CMOD_SPLITBUTTONLEFT(void) const = 0;
	virtual int partID_CMOD_SPLITBUTTONRIGHT(void) const = 0;
	virtual int partID_CMOD_MENUGLYPH(void) const = 0;
	virtual int partID_CMOD_OVERFLOWGLYPH(void) const = 0;

	virtual int stateID_CMODS_NORMAL(void) const = 0;
	virtual int stateID_CMODS_HOT(void) const = 0;
	virtual int stateID_CMODS_PRESSED(void) const = 0;
	virtual int stateID_CMODS_KEYFOCUSED(void) const = 0;
	virtual int stateID_CMODS_NEARHOT(void) const = 0;

	virtual HRESULT backgroundGradientColors(HTHEME theme, COLORREF *colors) const = 0;
	virtual HRESULT buttonTextColor(HTHEME theme, UINT uItemState, COLORREF *color) const = 0;
	virtual BOOL buttonTextShadowed(UINT uItemState) const = 0;

	virtual int folderBarMarginsLeftDIP(void) const = 0;
	virtual int folderBarMarginsTopDIP(void) const = 0;
	virtual int folderBarMarginsRightDIP(void) const = 0;
	virtual int folderBarMarginsBottomDIP(void) const = 0;

	virtual int buttonMarginsXDIP(void) const = 0;
	virtual int buttonMarginsYDIP(void) const = 0;
	virtual int buttonTextArrowSeparationXDIP(void) const = 0;
};

class commandModuleStyleParamsVista : public commandModuleStyleParams {
public:
	virtual int partID_CMOD_MODULEBACKGROUND(void) const { return 1; }
	virtual int partID_CMOD_TASKBUTTON(void) const { return 2; }
	virtual int partID_CMOD_SPLITBUTTONLEFT(void) const { return 3; }
	virtual int partID_CMOD_SPLITBUTTONRIGHT(void) const { return 4; }
	virtual int partID_CMOD_MENUGLYPH(void) const { return 5; }
	virtual int partID_CMOD_OVERFLOWGLYPH(void) const { return 6; }

	virtual int stateID_CMODS_NORMAL(void) const { return 1; }
	virtual int stateID_CMODS_HOT(void) const { return 2; }
	virtual int stateID_CMODS_PRESSED(void) const { return 3; }
	virtual int stateID_CMODS_KEYFOCUSED(void) const { return 4; }
	virtual int stateID_CMODS_NEARHOT(void) const { return 5; }

	virtual HRESULT backgroundGradientColors(HTHEME theme, COLORREF *colors) const
	{
		if (colors == NULL)
			return E_POINTER;
#define argb(a, r, g, b) ((((COLORREF) ((BYTE) (a))) << 24) | RGB(r, g, b))
		colors[0] = argb(255, 4, 80, 130);
		colors[1] = argb(255, 17, 101, 132);
		colors[2] = argb(255, 29, 121, 134);
		return S_OK;
	}

	virtual HRESULT buttonTextColor(HTHEME theme, UINT uItemState, COLORREF *color) const
	{
		if (color == NULL)
			return E_POINTER;
		*color = GetSysColor(COLOR_WINDOW);
		if ((uItemState & CDIS_DISABLED) != 0)
			*color = argb(255, 161, 204, 210);
#undef argb
		return S_OK;
	}

	virtual BOOL buttonTextShadowed(UINT uItemState) const
	{
		return (uItemState & CDIS_DISABLED) == 0;
	}

	virtual int folderBarMarginsLeftDIP(void) const { return 3; }
	virtual int folderBarMarginsTopDIP(void) const { return 2; }
	virtual int folderBarMarginsRightDIP(void) const { return 3; }
	virtual int folderBarMarginsBottomDIP(void) const { return 3; }

	virtual int buttonMarginsXDIP(void) const { return 6; }
	virtual int buttonMarginsYDIP(void) const { return 5; }
	virtual int buttonTextArrowSeparationXDIP(void) const { return 3; }
};

class commandModuleStyleParams7 : public commandModuleStyleParams {
	virtual int partID_CMOD_MODULEBACKGROUND(void) const { return 1; }
	virtual int partID_CMOD_TASKBUTTON(void) const { return 3; }
	virtual int partID_CMOD_SPLITBUTTONLEFT(void) const { return 4; }
	virtual int partID_CMOD_SPLITBUTTONRIGHT(void) const { return 5; }
	virtual int partID_CMOD_MENUGLYPH(void) const { return 6; }
	virtual int partID_CMOD_OVERFLOWGLYPH(void) const { return 7; }

	virtual int stateID_CMODS_NORMAL(void) const { return 1; }
	virtual int stateID_CMODS_HOT(void) const { return 2; }
	virtual int stateID_CMODS_PRESSED(void) const { return 3; }
	virtual int stateID_CMODS_KEYFOCUSED(void) const { return 4; }
	/*TODO verify this*/virtual int stateID_CMODS_NEARHOT(void) const { return 5; }

	virtual HRESULT backgroundGradientColors(HTHEME theme, COLORREF *colors) const
	{
		HRESULT hr;

		if (colors == NULL)
			return E_POINTER;
		hr = GetThemeColor(theme,
			2, 0,
			TMT_GRADIENTCOLOR1, colors + 0);
		if (hr != S_OK)
			return hr;
		hr = GetThemeColor(theme,
			2, 0,
			TMT_GRADIENTCOLOR2, colors + 1);
		if (hr != S_OK)
			return hr;
		return GetThemeColor(theme,
			2, 0,
			TMT_GRADIENTCOLOR3, colors + 2);
	}

	virtual HRESULT buttonTextColor(HTHEME theme, UINT uItemState, COLORREF *color) const
	{
		int state;

		if (color == NULL)
			return E_POINTER;
		state = 1;
		if ((uItemState & CDIS_DISABLED) != 0)
			state = 6;
		// TODO check if 3 is the correct part ID for all button types
		return GetThemeColor(theme,
			3, state,
			TMT_TEXTCOLOR, color);
	}

	virtual BOOL buttonTextShadowed(UINT uItemState) const
	{
		return FALSE;
	}

	virtual int folderBarMarginsLeftDIP(void) const { return 3; }
	virtual int folderBarMarginsTopDIP(void) const { return 2; }
	virtual int folderBarMarginsRightDIP(void) const { return 9; }
	virtual int folderBarMarginsBottomDIP(void) const { return 3; }

	virtual int buttonMarginsXDIP(void) const { return 13; }
	virtual int buttonMarginsYDIP(void) const { return 5; }
	virtual int buttonTextArrowSeparationXDIP(void) const { return 1; }
};

// all coordinates are in client space
struct buttonMetrics {
	SIZE fittingSize;
	int baseX;
	int baseY;
	int dpiX;
	int dpiY;
	BOOL hasText;
	SIZE textSize;
	BOOL hasArrow;
	SIZE arrowSize;
};

struct buttonRects {
	RECT clientRect;
	RECT textRect;
	RECT arrowRect;
};

class commandModuleStyle {
public:
	virtual HRESULT drawFolderBar(commandModuleStyleParams *p, HDC dc, RECT *rcWindow, RECT *rcPaint) const = 0;
	virtual HRESULT buttonMetrics(commandModuleStyleParams *p, HWND button, HDC dc, struct buttonMetrics *m) const = 0;
	virtual HRESULT buttonRects(commandModuleStyleParams *p, HWND button, struct buttonMetrics *m, struct buttonRects *r) const = 0;
	virtual HRESULT drawButton(commandModuleStyleParams *p, HWND button, HDC dc, UINT uItemState, RECT *rcPaint) const = 0;
};

class commandModuleStyleThemed : public commandModuleStyle {
	HTHEME theme;
	HTHEME textstyleTheme;
public:
	commandModuleStyleThemed(HTHEME theme, HTHEME textstyleTheme)
	{
		this->theme = theme;
		this->textstyleTheme = textstyleTheme;
	}

	virtual HRESULT drawFolderBar(commandModuleStyleParams *p, HDC dc, RECT *rcWindow, RECT *rcPaint) const
	{
		COLORREF colors[3];
		TRIVERTEX vertices[4];
		static GRADIENT_RECT gr[2] = {
			{ 0, 1 },
			{ 2, 3 },
		};
		HRESULT hr;

		hr = p->backgroundGradientColors(this->theme, colors);
		if (hr != S_OK)
			return hr;

		vertices[0].x = rcWindow->left;
		vertices[0].y = rcWindow->top;
		vertices[0].Red = ((COLOR16) GetRValue(colors[0])) << 8;
		vertices[0].Green = ((COLOR16) GetGValue(colors[0])) << 8;
		vertices[0].Blue = ((COLOR16) GetBValue(colors[0])) << 8;
		vertices[0].Alpha = ((COLOR16) LOBYTE(colors[0] >> 24)) << 8;

		vertices[1].x = (rcWindow->right - rcWindow->left) / 2;
		vertices[1].y = rcWindow->bottom;
		vertices[1].Red = ((COLOR16) GetRValue(colors[1])) << 8;
		vertices[1].Green = ((COLOR16) GetGValue(colors[1])) << 8;
		vertices[1].Blue = ((COLOR16) GetBValue(colors[1])) << 8;
		vertices[1].Alpha = ((COLOR16) LOBYTE(colors[1] >> 24)) << 8;

		vertices[2] = vertices[1];
		vertices[2].y = rcWindow->top;

		vertices[3].x = rcWindow->right;
		vertices[3].y = rcWindow->bottom;
		vertices[3].Red = ((COLOR16) GetRValue(colors[2])) << 8;
		vertices[3].Green = ((COLOR16) GetGValue(colors[2])) << 8;
		vertices[3].Blue = ((COLOR16) GetBValue(colors[2])) << 8;
		vertices[3].Alpha = ((COLOR16) LOBYTE(colors[2] >> 24)) << 8;

		if (GradientFill(dc, vertices, 4, (PVOID) gr, 2, GRADIENT_FILL_RECT_H) == FALSE)
			return lastErrorToHRESULT(GetLastError());
		return DrawThemeBackground(this->theme, dc,
			p->partID_CMOD_MODULEBACKGROUND(), 0,
			rcWindow, rcPaint);
	}

#define hasNonsplitArrow(button) ((button) == leftButtons[0] || (button) == leftButtons[1] || (button) == leftButtons[2])

#define dlgUnitsToX(dlg, baseX) MulDiv((dlg), (baseX), 4)
#define dlgUnitsToY(dlg, baseY) MulDiv((dlg), (baseY), 8)
// TODO verify the parameter order
#define dipsToX(dip, dpiX) MulDiv((dip), (dpiX), 96)
#define dipsToY(dip, dpiY) MulDiv((dip), (dpiY), 96)

	// TODO for win7: the sizes are correct (according to UI Automation) but they don't visually match?
	virtual HRESULT buttonMetrics(commandModuleStyleParams *p, HWND button, HDC dc, struct buttonMetrics *m) const
	{
		BOOL releaseDC;
		TEXTMETRICW tm;
		RECT r;
		int minStdButtonHeight;
		HRESULT hr;

		if (m == NULL)
			return E_POINTER;

		releaseDC = FALSE;
		if (dc == NULL) {
			dc = GetDC(button);
			if (dc == NULL)
				return lastErrorToHRESULT(GetLastError());
			releaseDC = TRUE;
		}

		ZeroMemory(&tm, sizeof (TEXTMETRICW));
		hr = GetThemeTextMetrics(this->textstyleTheme, dc,
			TEXT_BODYTEXT, 0,
			&tm);
		if (hr != S_OK)
			goto fail;
		hr = GetThemeTextExtent(this->textstyleTheme, dc,
			TEXT_BODYTEXT, 0,
			L"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", 52, 0,
			NULL, &r);
		if (hr != S_OK)
			goto fail;
		m->baseX = (int) (((r.right - r.left) / 26 + 1) / 2);
		m->baseY = (int) tm.tmHeight;
		m->dpiX = GetDeviceCaps(dc, LOGPIXELSX);
		m->dpiY = GetDeviceCaps(dc, LOGPIXELSY);

		m->fittingSize.cx = 0;
		m->fittingSize.cy = 0;

		m->hasText = TRUE;
		if (m->hasText) {
			LRESULT n;
			WCHAR *buf;
			LOGFONTW lf;

			n = SendMessageW(button, WM_GETTEXTLENGTH, 0, 0);
			buf = new WCHAR[n + 1];
			GetWindowTextW(button, buf, n + 1);
			hr = GetThemeTextExtent(this->textstyleTheme, dc,
				TEXT_BODYTEXT, 0,
				buf, n, DT_CENTER,
				NULL, &r);
			delete[] buf;
			if (hr != S_OK)
				goto fail;
			m->textSize.cx = r.right - r.left;
			m->textSize.cy = r.bottom - r.top;
			m->fittingSize.cx += m->textSize.cx;
			m->fittingSize.cy += m->textSize.cy;

			// dui70.dll adds this to the width when "overhang" is enabled, and it seems to be enabled for our cases, but I can't tell what conditions it's enabled for...
			// and yes, it seems to be using the raw lfHeight value here :/
			// TODO find the right TMT constant
			hr = GetThemeFont(this->textstyleTheme, dc,
				4, 0,
				TMT_FONT, &lf);
			if (hr != S_OK)
				goto fail;
			m->fittingSize.cx += 2 * (abs(lf.lfHeight) / 6);
		}

		m->hasArrow = hasNonsplitArrow(button);
		if (m->hasArrow) {
			// TS_MIN returns 1x1 and TS_DRAW returns 0x0, so...
			hr = GetThemePartSize(theme, dc,
				p->partID_CMOD_MENUGLYPH(), 0,
				NULL, TS_TRUE, &(m->arrowSize));
			if (hr != S_OK)
				goto fail;
			m->fittingSize.cx += m->arrowSize.cx;
			// TODO I don't think dui70.dll takes this into consideration...
			if (m->fittingSize.cy < m->arrowSize.cy)
				m->fittingSize.cy = m->arrowSize.cy;
			m->fittingSize.cx += dipsToX(p->buttonTextArrowSeparationXDIP(), m->dpiX);
		}

		m->fittingSize.cx += dipsToX(p->buttonMarginsXDIP(), m->dpiX) * 2;
		m->fittingSize.cy += dipsToY(p->buttonMarginsYDIP(), m->dpiY) * 2;

		// and dui70.dll seems to do a variant of this but for text buttons only...
		minStdButtonHeight = dlgUnitsToY(14, m->baseY);
		if (m->fittingSize.cy < minStdButtonHeight)
			m->fittingSize.cy = minStdButtonHeight;

		hr = S_OK;
	fail:
		if (releaseDC)
			// TODO when migrating this to libui, this will need to be renamed to indicate we are intentionally ignoring errors
			ReleaseDC(button, dc);
		return hr;
	};

	// TODO check errors
	virtual HRESULT buttonRects(commandModuleStyleParams *p, HWND button, struct buttonMetrics *m, struct buttonRects *r) const
	{
		if (r == NULL)
			return E_POINTER;

		GetClientRect(button, &(r->clientRect));

		if (m->hasText)
			r->textRect = r->clientRect;

		if (m->hasArrow) {
			r->arrowRect = r->clientRect;
			r->arrowRect.left = r->arrowRect.right;
			r->arrowRect.left -= dipsToX(p->buttonMarginsXDIP(), m->dpiX);
			r->arrowRect.right = r->arrowRect.left;
			r->arrowRect.left -= m->arrowSize.cx;
			r->arrowRect.top += ((r->arrowRect.bottom - r->arrowRect.top) - m->arrowSize.cy) / 2;
			r->arrowRect.bottom = r->arrowRect.top + m->arrowSize.cy;

			if (m->hasText) {
				r->textRect.right = r->arrowRect.left - dipsToX(p->buttonTextArrowSeparationXDIP(), m->dpiX);
				r->textRect.right += dipsToX(p->buttonMarginsXDIP(), m->dpiX);
			}
		}

		return S_OK;
	}

	// TODO check errors fully
	virtual HRESULT drawButton(commandModuleStyleParams *p, HWND button, HDC dc, UINT uItemState, RECT *rcPaint) const
	{
		struct buttonMetrics m;
		struct buttonRects r;
		int part, state;
		HRESULT hr;

		hr = this->buttonMetrics(p, button, dc, &m);
		if (hr != S_OK)
			return hr;
		hr = this->buttonRects(p, button, &m, &r);
		if (hr != S_OK)
			return hr;

		part = p->partID_CMOD_TASKBUTTON();
		state = p->stateID_CMODS_NORMAL();
		if ((uItemState & CDIS_FOCUS) != 0)
			state = p->stateID_CMODS_KEYFOCUSED();
		if ((uItemState & CDIS_HOT) != 0)
			state = p->stateID_CMODS_HOT();
		if ((uItemState & CDIS_SELECTED) != 0)
			state = p->stateID_CMODS_PRESSED();
		hr = DrawThemeParentBackground(button, dc, rcPaint);
		if (hr != S_OK)
			return hr;
		hr = DrawThemeBackground(this->theme, dc,
			part, state,
			&(r.clientRect), rcPaint);
		if (hr != S_OK)
			return hr;

		if (m.hasText) {
			int textState;
			COLORREF textColor;
			LRESULT n;
			WCHAR *buf;
			DTTOPTS dttopts;

			hr = p->buttonTextColor(this->theme, uItemState, &textColor);
			if (hr != S_OK)
				return hr;
			n = SendMessageW(button, WM_GETTEXTLENGTH, 0, 0);
			buf = new WCHAR[n + 1];
			GetWindowTextW(button, buf, n + 1);
			ZeroMemory(&dttopts, sizeof (DTTOPTS));
			dttopts.dwSize = sizeof (DTTOPTS);
			dttopts.dwFlags = DTT_TEXTCOLOR;
			dttopts.crText = textColor;
			hr = DrawThemeTextEx(this->textstyleTheme, dc,
				TEXT_BODYTEXT, 0,
				buf, n, DT_CENTER | DT_VCENTER | DT_SINGLELINE,
				&(r.textRect), &dttopts);
			delete[] buf;
			if (hr != S_OK)
				return hr;
		}

		if (m.hasArrow) {
			// TODO verify the state ID on all platforms
			hr = DrawThemeBackground(this->theme, dc,
				p->partID_CMOD_MENUGLYPH(), 0,
				&(r.arrowRect), rcPaint);
			if (hr != S_OK)
				return hr;
		}

		return S_OK;
	}
};

#if 0
// TODO check errors
void drawExplorerChevron(HTHEME theme, HDC dc, HWND rebar, WPARAM band, RECT *rcPaint)
{
	REBARBANDINFOW rbi;
	RECT r;
	int state;

	ZeroMemory(&rbi, sizeof (REBARBANDINFOW));
	rbi.cbSize = sizeof (REBARBANDINFOW);
	rbi.fMask = RBBIM_CHILD | RBBIM_CHEVRONLOCATION | RBBIM_CHEVRONSTATE;
	SendMessageW(rebar, RB_GETBANDINFOW, band, (LPARAM) (&rbi));
	if ((rbi.uChevronState & STATE_SYSTEM_INVISIBLE) != 0)
		return;
	state = 1;
	// TODO check if this is correct
	if ((rbi.uChevronState & STATE_SYSTEM_FOCUSED) != 0)
		state = 4;
	if ((rbi.uChevronState & STATE_SYSTEM_HOTTRACKED) != 0)
		state = 2;
	if ((rbi.uChevronState & STATE_SYSTEM_PRESSED) != 0)
		state = 3;
	r = rbi.rcChevronLocation;
	// TODO commctrl.h says this should be correct for the chevron rect, but it's not?
//	MapWindowRect(rbi.hwndChild, rebar, &r);
	DrawThemeBackground(theme, dc,
		3, state,
		&r, rcPaint);
	DrawThemeBackground(theme, dc,
		7, 1,
		&r, rcPaint);
}
#endif

HICON shieldIcon;
HICON applicationIcon;
HICON helpIcon;
HIMAGELIST rightList;

HTHEME theme = NULL;
HTHEME textstyleTheme = NULL;
const char *which = "7";
commandModuleStyle *cms = NULL;
commandModuleStyleParams *cmsp = NULL;
HIMAGELIST dropdownArrowList = NULL;

static struct {
	const WCHAR *text;
	BOOL dropdown;
} leftbarButtons[] = {
	{ L"Organize", TRUE },
	{ L"Include in library", TRUE },
	{ L"Share with", TRUE },
	{ L"Burn", FALSE },
	{ L"New folder", FALSE },
};

// TODO check errors
LRESULT drawExplorerButton(NMCUSTOMDRAW *nm)
{
	HRESULT hr;

	if (nm->dwDrawStage != CDDS_PREPAINT)
		return CDRF_DODEFAULT;
	hr = cms->drawButton(cmsp, nm->hdr.hwndFrom,
		nm->hdc, nm->uItemState, &(nm->rc));
	if (hr != S_OK)
		return CDRF_DODEFAULT;
	return CDRF_SKIPDEFAULT;
}

void onWM_CREATE(HWND hwnd)
{
	int buttonx, buttony;
	int i;

	buttonx = 5;
	buttony = 5;
	for (i = 0; i < 5; i++) {
		// TODO split buttons don't support arrow navigation?
		leftButtons[i] = CreateWindowExW(0,
			L"BUTTON", leftbarButtons[i].text,
			WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON,
			buttonx, buttony,
			150, 30,
			hwnd, (HMENU) (100 + i), hInstance, NULL);
		if (leftButtons[i] == NULL)
			diele("CreateWindowExW(L\"BUTTON\")");
		buttonx += 150;
	}
}

// TODO check errors
void updateTheme(HWND hwnd)
{
	if (cmsp != NULL) {
		delete cmsp;
		cmsp = NULL;
	}
	if (cms != NULL) {
		delete cms;
		cms = NULL;
	}
	if (textstyleTheme != NULL) {
		CloseThemeData(textstyleTheme);
		textstyleTheme = NULL;
	}
	if (theme != NULL) {
		CloseThemeData(theme);
		theme = NULL;
	}

	theme = OpenThemeData(hwnd, L"CommandModule");
	textstyleTheme = OpenThemeData(hwnd, L"TEXTSTYLE");
	cms = new commandModuleStyleThemed(theme, textstyleTheme);
	if (strcmp(which, "vista") == 0)
		cmsp = new commandModuleStyleParamsVista;
	else
		cmsp = new commandModuleStyleParams7;
}

void repositionButtons(HWND hwnd)
{
	HDWP dwp;
	int buttonx, buttony;
	HDC dc;
	int dpiX;
	int dpiY;
	struct buttonMetrics m;
	int i;

	dc = GetDC(hwnd);
	if (dc == NULL)
		diele("GetDC()");
	dpiX = GetDeviceCaps(dc, LOGPIXELSX);
	dpiY = GetDeviceCaps(dc, LOGPIXELSY);
	// TODO check error
	ReleaseDC(hwnd, dc);

	dwp = BeginDeferWindowPos(5);
	if (dwp == NULL)
		diele("BeginDeferWindowPos()");
	buttonx = dipsToX(cmsp->folderBarMarginsLeftDIP(), dpiX);
	buttony = dipsToY(cmsp->folderBarMarginsTopDIP(), dpiY);
	for (i = 0; i < 5; i++) {
		cms->buttonMetrics(cmsp, leftButtons[i], NULL, &m);
		dwp = DeferWindowPos(dwp, leftButtons[i], NULL,
			buttonx, buttony, m.fittingSize.cx, m.fittingSize.cy,
			SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER);
		if (dwp == NULL)
			diele("DeferWindowPos()");
		buttonx += m.fittingSize.cx;
	}
	if (EndDeferWindowPos(dwp) == 0)
		diele("EndDeferWindowPos()");
}

// TODO check errors
void folderBarRect(HWND hwnd, HDC dc, RECT *r)
{
	int dpiX;
	int dpiY;
	RECT child;
	int i;

	dpiX = GetDeviceCaps(dc, LOGPIXELSX);
	dpiY = GetDeviceCaps(dc, LOGPIXELSY);

	GetClientRect(hwnd, r);
	r->right -= r->left;
	r->left = 0;
	r->top = 0;
	r->bottom = 0;

	for (i = 0; i < 5; i++) {
		GetWindowRect(leftButtons[i], &child);
		if (r->bottom < (child.bottom - child.top))
			r->bottom = (child.bottom - child.top);
	}

	r->bottom += dipsToY(cmsp->folderBarMarginsTopDIP(), dpiY);
	r->bottom += dipsToY(cmsp->folderBarMarginsBottomDIP(), dpiY);
}

#if 0
// TODO check errors
void handleEvents(HWND hwnd, WPARAM wParam)
{
	LRESULT n;
	const WCHAR *selRebar = NULL, *selToolbar = NULL;
	WCHAR *bufRebar = NULL, *bufToolbar = NULL;
	BOOL changeRebar = FALSE, changeToolbar = FALSE;
	BOOL invalidate = FALSE;
	WPARAM check;

	switch (wParam) {
	case MAKEWPARAM(300, CBN_SELCHANGE):
		n = SendMessageW(rebarCombo, CB_GETCURSEL, 0, 0);
		selRebar = rebarThemes[n];
		changeRebar = TRUE;
		break;
	case MAKEWPARAM(301, CBN_SELCHANGE):
		n = SendMessageW(toolbarCombo, CB_GETCURSEL, 0, 0);
		selToolbar = toolbarThemes[n];
		changeToolbar = TRUE;
		break;
	case MAKEWPARAM(200, BN_CLICKED):
		drawmode = 0;
		n = SendMessageW(rebarCombo, WM_GETTEXTLENGTH, 0, 0);
		bufRebar = new WCHAR[n + 1];
		GetWindowTextW(rebarCombo, bufRebar, n + 1);
		n = SendMessageW(toolbarCombo, WM_GETTEXTLENGTH, 0, 0);
		bufToolbar = new WCHAR[n + 1];
		GetWindowTextW(toolbarCombo, bufToolbar, n + 1);
		selRebar = bufRebar;
		selToolbar = bufToolbar;
		changeRebar = TRUE;
		changeToolbar = TRUE;
		break;
	case MAKEWPARAM(201, BN_CLICKED):
		drawmode = 1;
		invalidate = TRUE;
		break;
	case MAKEWPARAM(302, BN_CLICKED):
		ShowWindow(leftbar, SW_HIDE);
		check = BST_CHECKED;
		if (SendMessage(toolbarTransparentCheckbox, BM_GETCHECK, 0, 0) == BST_CHECKED)
			check = BST_UNCHECKED;
		SendMessage(toolbarTransparentCheckbox, BM_SETCHECK, check, 0);
		if (check == BST_CHECKED)
			SendMessageW(leftbar, TB_SETSTYLE, 0, toolbarStyles | TBSTYLE_LIST | TBSTYLE_TRANSPARENT);
		else
			SendMessageW(leftbar, TB_SETSTYLE, 0, toolbarStyles | TBSTYLE_LIST);
		ShowWindow(leftbar, SW_SHOW);
		break;
	case MAKEWPARAM(202, BN_CLICKED):
		SetFocus(leftbar);
		break;
	}
	if (changeRebar) {
		if (selRebar != NULL && wcscmp(selRebar, L"NULL") == 0)
			selRebar = NULL;
		if (selRebar != NULL && *selRebar != L'\0')
			SendMessageW(rebar, RB_SETWINDOWTHEME, 0, (LPARAM) selRebar);
		else
			SetWindowTheme(rebar, selRebar, selRebar);
		invalidate = TRUE;
	}
	if (changeToolbar) {
		if (selToolbar != NULL && wcscmp(selToolbar, L"NULL") == 0)
			selToolbar = NULL;
		if (selToolbar != NULL && *selToolbar != L'\0') {
			SendMessageW(leftbar, TB_SETWINDOWTHEME, 0, (LPARAM) selToolbar);
			SendMessageW(rightbar, TB_SETWINDOWTHEME, 0, (LPARAM) selToolbar);
		} else {
			SetWindowTheme(leftbar, selToolbar, selToolbar);
			SetWindowTheme(rightbar, selToolbar, selToolbar);
		}
		invalidate = TRUE;
	}
	if (invalidate)
		InvalidateRect(hwnd, NULL, TRUE);
	if (bufRebar != NULL)
		delete[] bufRebar;
	if (bufToolbar != NULL)
		delete[] bufToolbar;
}
#endif

LRESULT CALLBACK wndproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	HDC dc;
	PAINTSTRUCT ps;
	NMHDR *nm = (NMHDR *) lParam;
	int i;

	switch (uMsg) {
	case WM_CREATE:
		onWM_CREATE(hwnd);
		updateTheme(hwnd);
		repositionButtons(hwnd);
		break;
	case WM_CLOSE:
		PostQuitMessage(0);
		break;
	case WM_SIZE:
		repositionButtons(hwnd);
		// TODO check errors
		InvalidateRect(hwnd, NULL, TRUE);
		break;
	case WM_THEMECHANGED:
		updateTheme(hwnd);
		repositionButtons(hwnd);
		break;
	case WM_PAINT:
		// TODO check errors
		dc = BeginPaint(hwnd, &ps);
		{RECT w;
		folderBarRect(hwnd, dc, &w);
		cms->drawFolderBar(cmsp, dc, &w, &(ps.rcPaint));}
		EndPaint(hwnd, &ps);
		return 0;
	case WM_PRINTCLIENT:
		{RECT w, paint;
		folderBarRect(hwnd, (HDC) wParam, &w);
		GetClientRect(hwnd,&paint);
		cms->drawFolderBar(cmsp, (HDC) wParam, &w, &w);}
		return 0;
#if 0
	case WM_COMMAND:
		handleEvents(hwnd, wParam);
		break;
#endif
	case WM_NOTIFY:
		switch (nm->code) {
		case NM_CUSTOMDRAW:
			for (i = 0; i < 5; i++)
				if (nm->hwndFrom == leftButtons[i])
					return drawExplorerButton((NMCUSTOMDRAW *) nm);
			break;
		}
		break;
	}
	return DefWindowProcW(hwnd, uMsg, wParam, lParam);
}

EXTERN_C IMAGE_DOS_HEADER __ImageBase;

int main(int argc, char *argv[])
{
	STARTUPINFOW si;
	int nCmdShow;
	INITCOMMONCONTROLSEX icc;
	HICON hDefaultIcon;
	HCURSOR hDefaultCursor;
	WNDCLASSW wc;
	HWND mainwin;
	MSG msg;
	HRESULT hr;

	if (argc > 1)
		which = argv[1];

	hInstance = (HINSTANCE) (&__ImageBase);
	nCmdShow = SW_SHOWDEFAULT;
	GetStartupInfoW(&si);
	if ((si.dwFlags & STARTF_USESHOWWINDOW) != 0)
		nCmdShow = si.wShowWindow;

	ZeroMemory(&icc, sizeof (INITCOMMONCONTROLSEX));
	icc.dwSize = sizeof (INITCOMMONCONTROLSEX);
	icc.dwICC = ICC_STANDARD_CLASSES | ICC_BAR_CLASSES | ICC_COOL_CLASSES;
	if (InitCommonControlsEx(&icc) == 0)
		diele("InitCommonControlsEx()");

	hDefaultIcon = LoadIconW(NULL, IDI_APPLICATION);
	if (hDefaultIcon == NULL)
		diele("LoadIconW(IDI_APPLICATION)");
	hDefaultCursor = LoadCursorW(NULL, IDC_ARROW);
	if (hDefaultCursor == NULL)
		diele("LoadCursorW(IDC_ARROW)");

	hr = LoadIconMetric(NULL, IDI_SHIELD, LIM_SMALL, &shieldIcon);
	if (hr != S_OK)
		diehr("LoadIconMetric(IDI_SHIELD)", hr);
	hr = LoadIconMetric(NULL, IDI_APPLICATION, LIM_SMALL, &applicationIcon);
	if (hr != S_OK)
		diehr("LoadIconMetric(IDI_APPLICATION)", hr);
	hr = LoadIconMetric(NULL, IDI_QUESTION, LIM_SMALL, &helpIcon);
	if (hr != S_OK)
		diehr("LoadIconMetric(IDI_QUESTION)", hr);
	rightList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
		ILC_COLOR32, 0, 3);
	if (rightList == NULL)
		diele("ImageList_Create()");
	if (ImageList_ReplaceIcon(rightList, -1, shieldIcon) == -1)
		diele("ImageList_ReplaceIcon(IDI_SHIELD)");
	if (ImageList_ReplaceIcon(rightList, -1, applicationIcon) == -1)
		diele("ImageList_ReplaceIcon(IDI_APPLICATION)");
	if (ImageList_ReplaceIcon(rightList, -1, helpIcon) == -1)
		diele("ImageList_ReplaceIcon(IDI_QUESTION)");

	ZeroMemory(&wc, sizeof (WNDCLASSW));
	wc.lpszClassName = L"mainwin";
	wc.lpfnWndProc = wndproc;
	wc.hInstance = hInstance;
	wc.hIcon = hDefaultIcon;
	wc.hCursor = hDefaultCursor;
	wc.hbrBackground = (HBRUSH) (COLOR_BTNFACE + 1);
	if (RegisterClassW(&wc) == 0)
		diele("RegisterClassW()");

	mainwin = CreateWindowExW(0,
		L"mainwin", L"Main Window",
		WS_OVERLAPPEDWINDOW,
		CW_USEDEFAULT, CW_USEDEFAULT,
		CW_USEDEFAULT, CW_USEDEFAULT,
		NULL, NULL, hInstance, NULL);
	if (mainwin == NULL)
		diele("CreateWindowExW(L\"mainwin\")");

	ShowWindow(mainwin, nCmdShow);
	if (UpdateWindow(mainwin) == 0)
		diele("UpdateWindow()");

	for (;;) {
		int res;

		res = GetMessageW(&msg, NULL, 0, 0);
		if (res < 0)
			diele("GetMessageW()");
		if (res == 0)
			break;
		if (IsDialogMessageW(mainwin, &msg) == 0) {
			TranslateMessage(&msg);
			DispatchMessageW(&msg);
		}
	}
	return 0;
}


================================================
FILE: _doc/misctests/winrebarexplorertheme.cpp
================================================
// 9 october 2018
#define UNICODE
#define _UNICODE
#define STRICT
#define STRICT_TYPED_ITEMIDS
#define WINVER			0x0600	/* from Microsoft's winnls.h */
#define _WIN32_WINNT		0x0600
#define _WIN32_WINDOWS	0x0600	/* from Microsoft's pdh.h */
#define _WIN32_IE			0x0700
#define NTDDI_VERSION		0x06000000
#include <windows.h>
#include <commctrl.h>
#include <uxtheme.h>
#include <vsstyle.h>
#include <vssym32.h>
#include <windowsx.h>
#include <stdio.h>
#include <stdlib.h>

// cl winrebarexplorertheme.cpp -MT -link user32.lib kernel32.lib gdi32.lib comctl32.lib uxtheme.lib msimg32.lib windows.res

void diele(const char *func)
{
	DWORD le;

	le = GetLastError();
	fprintf(stderr, "%s: %I32u\n", func, le);
	exit(EXIT_FAILURE);
}

void diehr(const char *func, HRESULT hr)
{
	fprintf(stderr, "%s: 0x%08I32X\n", func, hr);
	exit(EXIT_FAILURE);
}

HINSTANCE hInstance;
HWND rebar;
HWND leftbar;
HWND rightbar;
HWND rebarCombo;
HWND toolbarCombo;
HWND toolbarTransparentCheckbox;

HICON shieldIcon;
HICON applicationIcon;
HICON helpIcon;
HIMAGELIST rightList;

#define toolbarStyles (WS_CHILD | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NORESIZE | TBSTYLE_FLAT)

static struct {
	const WCHAR *text;
	BOOL dropdown;
} leftbarButtons[] = {
	{ L"Organize", TRUE },
	{ L"Include in library", TRUE },
	{ L"Share with", TRUE },
	{ L"Burn", FALSE },
	{ L"New folder", FALSE },
};

// TODO check errors
// TODO extract colors from the theme
void drawExplorerBackground(HTHEME theme, HDC dc, RECT *rcWindow, RECT *rcPaint)
{
	static TRIVERTEX vertices[] = {
		{ 0, 0, 4 << 8, 80 << 8, 130 << 8, 255 << 8 },
		{ 0, 0, 17 << 8, 101 << 8, 132 << 8, 255 << 8 },
		{ 0, 0, 17 << 8, 101 << 8, 132 << 8, 255 << 8 },
		{ 0, 0, 29 << 8, 121 << 8, 134 << 8, 255 << 8 },
	};
	static GRADIENT_RECT gr[2] = {
		{ 0, 1 },
		{ 2, 3 },
	};

	vertices[0].x = rcPaint->left;
	vertices[0].y = 0;
	vertices[1].x = rcPaint->right;
	vertices[1].y = (rcWindow->bottom - rcWindow->top) / 2;
	vertices[2].x = rcPaint->left;
	vertices[2].y = (rcWindow->bottom - rcWindow->top) / 2;
	vertices[3].x = rcPaint->right;
	vertices[3].y = rcWindow->bottom - rcWindow->top;
	GradientFill(dc, vertices, 4, (PVOID) gr, 2, GRADIENT_FILL_RECT_V);
	DrawThemeBackground(theme, dc,
		1, 0,
		rcWindow, rcPaint);
}

// TODO check errors
void drawExplorerChevron(HTHEME theme, HDC dc, HWND rebar, WPARAM band, RECT *rcPaint)
{
	REBARBANDINFOW rbi;
	RECT r;
	int state;

	ZeroMemory(&rbi, sizeof (REBARBANDINFOW));
	rbi.cbSize = sizeof (REBARBANDINFOW);
	rbi.fMask = RBBIM_CHILD | RBBIM_CHEVRONLOCATION | RBBIM_CHEVRONSTATE;
	SendMessageW(rebar, RB_GETBANDINFOW, band, (LPARAM) (&rbi));
	if ((rbi.uChevronState & STATE_SYSTEM_INVISIBLE) != 0)
		return;
	state = 1;
	// TODO check if this is correct
	if ((rbi.uChevronState & STATE_SYSTEM_FOCUSED) != 0)
		state = 4;
	if ((rbi.uChevronState & STATE_SYSTEM_HOTTRACKED) != 0)
		state = 2;
	if ((rbi.uChevronState & STATE_SYSTEM_PRESSED) != 0)
		state = 3;
	r = rbi.rcChevronLocation;
	// TODO commctrl.h says this should be correct for the chevron rect, but it's not?
//	MapWindowRect(rbi.hwndChild, rebar, &r);
	DrawThemeBackground(theme, dc,
		3, state,
		&r, rcPaint);
	DrawThemeBackground(theme, dc,
		7, 1,
		&r, rcPaint);
}

// TODO check errors
LRESULT customDrawExplorerRebar(NMCUSTOMDRAW *nm)
{
	HTHEME theme;
	RECT r;

	if (nm->dwDrawStage != CDDS_PREPAINT)
		return CDRF_DODEFAULT;
	theme = OpenThemeData(nm->hdr.hwndFrom, L"CommandModule");
	GetClientRect(nm->hdr.hwndFrom, &r);
	drawExplorerBackground(theme, nm->hdc, &r, &(nm->rc));
	// TODO dwItemSpec is often invalid?!
	drawExplorerChevron(theme, nm->hdc, nm->hdr.hwndFrom, 0, &(nm->rc));
	CloseThemeData(theme);
	return CDRF_SKIPDEFAULT;
}

// TODO check errors
LRESULT customDrawExplorerToolbar(NMTBCUSTOMDRAW *nm)
{
	HWND toolbar, rebar;
	WPARAM itemIndex;
	TBBUTTON tbb;
	HTHEME theme;
	RECT r;
	int part, state;

	toolbar = nm->nmcd.hdr.hwndFrom;
	switch (nm->nmcd.dwDrawStage) {
	case CDDS_PREPAINT:
		theme = OpenThemeData(toolbar, L"CommandModule");
		rebar = GetParent(toolbar);
		GetWindowRect(rebar, &r);
		MapWindowRect(NULL, toolbar, &r);
		drawExplorerBackground(theme, nm->nmcd.hdc, &r, &(nm->nmcd.rc));
		CloseThemeData(theme);
		return CDRF_NOTIFYITEMDRAW;
	case CDDS_ITEMPREPAINT:
		itemIndex = (WPARAM) SendMessageW(toolbar, TB_COMMANDTOINDEX, nm->nmcd.dwItemSpec, 0);
		ZeroMemory(&tbb, sizeof (TBBUTTON));
		SendMessageW(toolbar, TB_GETBUTTON, itemIndex, (LPARAM) (&tbb));
		theme = OpenThemeData(toolbar, L"CommandModule");
		part = 3;
		if ((tbb.fsStyle & BTNS_DROPDOWN) != 0)
			part = 4;
		state = 1;
		// TODO this doesn't work; both keyboard and mouse are listed as HOT
		if ((nm->nmcd.uItemState & CDIS_FOCUS) != 0)
			state = 4;
		if ((nm->nmcd.uItemState & CDIS_HOT) != 0)
			state = 2;
		if ((nm->nmcd.uItemState & CDIS_SELECTED) != 0)
			state = 3;
		SendMessageW(toolbar, TB_GETITEMRECT, itemIndex, (LPARAM) (&r));
		DrawThemeBackground(theme, nm->nmcd.hdc,
			3, state,
			&r, &(nm->nmcd.rc));
		CloseThemeData(theme);
		return TBCDRF_NOBACKGROUND;
	}
	return CDRF_DODEFAULT;
}

static struct {
	const WCHAR *text;
	LRESULT (*handleRebar)(NMCUSTOMDRAW *nm);
	LRESULT (*handleToolbar)(NMTBCUSTOMDRAW *nm);
} drawmodes[] = {
	{ L"SetWindowTheme()", NULL, NULL },
	{ L"Custom Draw Explorer", customDrawExplorerRebar, customDrawExplorerToolbar },
	{ NULL, NULL },
};

int drawmode = 0;

static const WCHAR *rebarThemes[] = {
	L"NULL",
	L"",
	L"AlternateRebar",
	L"BrowserTabBar",
	L"Communications",
	L"Default",
	L"ExplorerBar",
	L"Help",
	L"InactiveNavbar",
	L"InactiveNavbarComposited",
	L"ITBarBase",
	L"MaxInactiveNavbar",
	L"MaxInactiveNavbarComposited",
	L"MaxNavbar",
	L"MaxNavbarComposited",
	L"Media",
	L"Navbar",
	L"NavbarBase",
	L"NavbarComposited",
	L"NavbarNonTopmost",
	L"Rebar",
	L"RebarStyle",
	L"TaskBar",
	L"TaskBarComposited",
	NULL,
};

static WCHAR *toolbarThemes[] = {
	L"NULL",
	L"",
	L"Alternate",
	L"BB",
	L"BBComposited",
	L"Communications",
	L"ExplorerMenu",
	L"Go",
	L"GoComposited",
	L"InactiveBB",
	L"InactiveBBComposited",
	L"InactiveGo",
	L"InactiveGoComposited",
	L"InfoPaneToolbar",
	L"LVPopup",
	L"LVPopupBottom",
	L"MaxBB",
	L"MaxBBComposited",
	L"MaxGo",
	L"MaxGoComposited",
	L"MaxInactiveBB",
	L"MaxInactiveBBComposited",
	L"MaxInactiveGo",
	L"MaxInactiveGoComposited",
	L"Media",
	L"Placesbar",
	L"SearchButton",
	L"SearchButtonComposited",
	L"StartMenu",
	L"TaskBar",
	L"TaskBarComposited",
	L"TaskBarVert",
	L"TaskBarVertComposited",
	L"Toolbar",
	L"ToolbarStyle",
	L"TrayNotify",
	L"TrayNotifyComposited",
	NULL,
};

// TODO toolbarThemes

void onWM_CREATE(HWND hwnd)
{
	TBBUTTON tbb[5];
	RECT btnrect;
	DWORD tbbtnsize;
	LONG tbsizex, tbsizey;
	REBARBANDINFOW rbi;
	HWND button;
	LONG buttonx, buttony;
	LONG combox, comboy;
	int i;

	rebar = CreateWindowExW(0,
		REBARCLASSNAMEW, NULL,
		WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CCS_NODIVIDER | CCS_TOP | RBS_FIXEDORDER,
		0, 0, 0, 0,
		hwnd, (HMENU) 100, hInstance, NULL);
	if (rebar == NULL)
		diele("CreateWindowExW(REBARCLASSNAMEW)");

	leftbar = CreateWindowExW(0,
		TOOLBARCLASSNAMEW, NULL,
		toolbarStyles | TBSTYLE_LIST | TBSTYLE_TRANSPARENT,
		0, 0, 0, 0,
		hwnd, (HMENU) 101, hInstance, NULL);
	if (leftbar == NULL)
		diele("CreateWindowExW(TOOLBARCLASSNAMEW) leftbar");
	SendMessageW(leftbar, TB_BUTTONSTRUCTSIZE, sizeof (TBBUTTON), 0);
	// I_IMAGENONE causes the button text to be left-aligned; don't use it
//	if (SendMessageW(leftbar, TB_SETBITMAPSIZE, 0, 0) == FALSE)
//		diele("TB_SETBITMAPSIZE");
	SendMessageW(leftbar, TB_SETEXTENDEDSTYLE, 0, TBSTYLE_EX_DRAWDDARROWS | TBSTYLE_EX_HIDECLIPPEDBUTTONS | TBSTYLE_EX_MIXEDBUTTONS);
	// TODO this *should* be DIPs...
	// TODO figure out where the *2 is documented
//	SendMessageW(leftbar, TB_SETPADDING, 0, MAKELPARAM(6 * 2, 5 * 2));
	ZeroMemory(tbb, 5 * sizeof (TBBUTTON));
	for (i = 0; i < 5; i++) {
		tbb[i].iBitmap = 0;
		tbb[i].idCommand = i;
		tbb[i].fsState = TBSTATE_ENABLED;
		tbb[i].fsStyle = BTNS_AUTOSIZE | BTNS_BUTTON | BTNS_NOPREFIX | BTNS_SHOWTEXT;
		if (leftbarButtons[i].dropdown)
			tbb[i].fsStyle |= BTNS_DROPDOWN | BTNS_WHOLEDROPDOWN;
		tbb[i].iString = (INT_PTR) (leftbarButtons[i].text);
	}
	if (SendMessageW(leftbar, TB_ADDBUTTONSW, 5, (LPARAM) tbb) == FALSE)
		diele("TB_ADDBUTTONSW");

	tbsizex = 0;
	for (i = 0; i < 5; i++) {
		if (SendMessageW(leftbar, TB_GETITEMRECT, (WPARAM) i, (LPARAM) (&btnrect)) == FALSE)
			diele("TB_GETITEMRECT");
		tbsizex += btnrect.right - btnrect.left;
	}
	tbbtnsize = (DWORD) SendMessageW(leftbar, TB_GETBUTTONSIZE, 0, 0);
	tbsizey = HIWORD(tbbtnsize);

	ZeroMemory(&rbi, sizeof (REBARBANDINFOW));
	rbi.cbSize = sizeof (REBARBANDINFOW);
	rbi.fMask = RBBIM_CHILD | RBBIM_STYLE | RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_IDEALSIZE | RBBIM_ID;
	rbi.fStyle = RBBS_NOGRIPPER | RBBS_CHILDEDGE | RBBS_USECHEVRON | RBBS_HIDETITLE;
	rbi.hwndChild = leftbar;
	rbi.cx = tbsizex;
	rbi.cyChild = tbsizey;
	rbi.cxMinChild = 0;
	rbi.cyMinChild = tbsizey;
	rbi.cxIdeal = tbsizex;
	rbi.wID = 0;
	if (SendMessageW(rebar, RB_INSERTBANDW, (WPARAM) (-1), (LPARAM) (&rbi)) == 0)
		diele("RB_INSERTBANDW leftbar");

	rightbar = CreateWindowExW(0,
		TOOLBARCLASSNAMEW, NULL,
		toolbarStyles | TBSTYLE_TRANSPARENT,
		0, 0, 0, 0,
		hwnd, (HMENU) 102, hInstance, NULL);
	if (rightbar == NULL)
		diele("CreateWindowExW(TOOLBARCLASSNAMEW) rightbar");
	SendMessageW(rightbar, TB_BUTTONSTRUCTSIZE, sizeof (TBBUTTON), 0);
	SendMessageW(rightbar, TB_SETIMAGELIST, 0, (LPARAM) rightList);
	SendMessageW(rightbar, TB_SETEXTENDEDSTYLE, 0, TBSTYLE_EX_DRAWDDARROWS);
	// TODO this *should* be DIPs...
	// TODO figure out where the *2 is documented
//	SendMessageW(rightbar, TB_SETPADDING, 0, MAKELPARAM(6 * 2, 5 * 2));
	ZeroMemory(tbb, 5 * sizeof (TBBUTTON));
	tbb[0].iBitmap = 0;
	tbb[0].idCommand = 0;
	tbb[0].fsState = TBSTATE_ENABLED;
	tbb[0].fsStyle = BTNS_AUTOSIZE | BTNS_BUTTON | BTNS_DROPDOWN;
	tbb[1].iBitmap = 1;
	tbb[1].idCommand = 1;
	tbb[1].fsState = TBSTATE_ENABLED;
	tbb[1].fsStyle = BTNS_AUTOSIZE | BTNS_BUTTON;
	tbb[2].iBitmap = 2;
	tbb[2].idCommand = 2;
	tbb[2].fsState = TBSTATE_ENABLED;
	tbb[2].fsStyle = BTNS_AUTOSIZE | BTNS_BUTTON;
	if (SendMessageW(rightbar, TB_ADDBUTTONSW, 3, (LPARAM) tbb) == FALSE)
		diele("TB_ADDBUTTONSW");
	// TODO check error
	// TODO figure out why this works here but not elsewhere
//	SendMessageW(rightbar, TB_SETBUTTONSIZE, 0, 0);

	tbsizex = 0;
	for (i = 0; i < 3; i++) {
		if (SendMessageW(rightbar, TB_GETITEMRECT, (WPARAM) i, (LPARAM) (&btnrect)) == FALSE)
			diele("TB_GETITEMRECT");
		tbsizex += btnrect.right - btnrect.left;
	}
	tbbtnsize = (DWORD) SendMessageW(rightbar, TB_GETBUTTONSIZE, 0, 0);
	tbsizey = HIWORD(tbbtnsize);

	ZeroMemory(&rbi, sizeof (REBARBANDINFOW));
	rbi.cbSize = sizeof (REBARBANDINFOW);
	rbi.fMask = RBBIM_CHILD | RBBIM_STYLE | RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_ID;
	rbi.fStyle = RBBS_NOGRIPPER | RBBS_HIDETITLE;
	rbi.hwndChild = rightbar;
	rbi.cx = tbsizex;
	rbi.cyChild = tbsizey;
	rbi.cxMinChild = tbsizex;
	rbi.cyMinChild = tbsizey;
	rbi.wID = 1;
	if (SendMessageW(rebar, RB_INSERTBANDW, (WPARAM) (-1), (LPARAM) (&rbi)) == 0)
		diele("RB_INSERTBANDW rightbar");

	buttonx = 10;
	buttony = 40;
#define buttonwid 200
#define buttonht 25
	for (i = 0; drawmodes[i].text != NULL; i++) {
		button = CreateWindowExW(0,
			L"BUTTON", drawmodes[i].text,
			WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
			buttonx, buttony,
			buttonwid, buttonht,
			hwnd, (HMENU) (200 + i), hInstance, NULL);
		if (button == NULL)
			diele("CreateWIndowExW(L\"BUTTON\")");
		if (i == 0) {
			combox = buttonx + buttonwid + 5;
			comboy = buttony;
		}
		buttony += buttonht + 5;
	}
	button = CreateWindowExW(0,
		L"BUTTON", L"Give Toolbar Focus",
		WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
		buttonx, buttony,
		buttonwid, buttonht,
		hwnd, (HMENU) (200 + i), hInstance, NULL);
	if (button == NULL)
		diele("CreateWIndowExW(L\"BUTTON\")");
	rebarCombo = CreateWindowExW(WS_EX_CLIENTEDGE,
		L"COMBOBOX", L"",
		WS_CHILD | WS_VISIBLE | CBS_DROPDOWN,
		combox, comboy,
		buttonwid, buttonht,
		hwnd, (HMENU) 300, hInstance, NULL);
	if (rebarCombo == NULL)
		diele("CreateWindowExW(L\"COMBOBOX\")");
	for (i = 0; rebarThemes[i] != NULL; i++)
		// TODO check error
		SendMessageW(rebarCombo, CB_ADDSTRING, 0, (LPARAM) (rebarThemes[i]));
	comboy += buttonht + 5;
	toolbarCombo = CreateWindowExW(WS_EX_CLIENTEDGE,
		L"COMBOBOX", L"",
		WS_CHILD | WS_VISIBLE | CBS_DROPDOWN,
		combox, comboy,
		buttonwid, buttonht,
		hwnd, (HMENU) 301, hInstance, NULL);
	if (toolbarCombo == NULL)
		diele("CreateWindowExW(L\"COMBOBOX\")");
	for (i = 0; toolbarThemes[i] != NULL; i++)
		// TODO check error
		SendMessageW(toolbarCombo, CB_ADDSTRING, 0, (LPARAM) (toolbarThemes[i]));
	comboy += buttonht + 5;
	toolbarTransparentCheckbox = CreateWindowExW(0,
		L"BUTTON", L"Transparent toolbar",
		WS_CHILD | WS_VISIBLE | BS_CHECKBOX,
		combox, comboy,
		buttonwid, buttonht,
		hwnd, (HMENU) 302, hInstance, NULL);
	if (toolbarTransparentCheckbox == NULL)
		diele("CreateWindowExW(L\"BUTTON\")");
	SendMessage(toolbarTransparentCheckbox, BM_SETCHECK, BST_CHECKED, 0);
}

// TODO it seems like I shouldn't have to do this?
void repositionRebar(HWND hwnd)
{
	RECT win, rb;

	if (GetClientRect(hwnd, &win) == 0)
		diele("GetClientRect()");
	if (GetWindowRect(rebar, &rb) == 0)
		diele("GetWindowRect()");
	if (SetWindowPos(rebar, NULL,
		0, 0, win.right - win.left, rb.bottom - rb.top,
		SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOZORDER) == 0)
		diele("SetWindowPos()");
}

// TODO check errors
void handleEvents(HWND hwnd, WPARAM wParam)
{
	LRESULT n;
	const WCHAR *selRebar = NULL, *selToolbar = NULL;
	WCHAR *bufRebar = NULL, *bufToolbar = NULL;
	BOOL changeRebar = FALSE, changeToolbar = FALSE;
	BOOL invalidate = FALSE;
	WPARAM check;

	switch (wParam) {
	case MAKEWPARAM(300, CBN_SELCHANGE):
		n = SendMessageW(rebarCombo, CB
Download .txt
gitextract_7ti2ssbi/

├── .appveyor.yml
├── CONTRIBUTING.md
├── Compatibility.md
├── LICENSE
├── NEWS.md
├── README.md
├── TODO.md
├── _abort/
│   ├── oldhaiku.tgz
│   └── windowevents/
│       ├── darwin_window.m
│       ├── page15.c
│       ├── ui.h
│       ├── unix_window.c
│       └── windows_window.cpp
├── _doc/
│   ├── area.md
│   ├── areahandler
│   ├── draw.md
│   ├── drawtext
│   ├── export/
│   │   ├── coretext
│   │   ├── ctweights
│   │   ├── ctweightsannotated
│   │   ├── ctweightscombined
│   │   ├── ctweightsprocessed
│   │   ├── ctweightsraw
│   │   ├── ctweightvalues
│   │   ├── ctwidths
│   │   ├── ctwidthscombined
│   │   ├── ctwidthsprocessed
│   │   ├── ctwidthvalues
│   │   ├── fvar.swift
│   │   ├── ttfixedtest.go
│   │   ├── weightlist1.sh
│   │   ├── weightlist2.sh
│   │   ├── weightlist3.sh
│   │   ├── writewidths.c
│   │   ├── writewidths.out
│   │   ├── writewidths.processed
│   │   └── writewidths.s
│   ├── form
│   ├── main
│   ├── mainsteps
│   ├── misctests/
│   │   ├── gtkprogresstable.c
│   │   ├── winbuttonexplorertheme.cpp
│   │   └── winrebarexplorertheme.cpp
│   ├── names.md
│   ├── slider
│   ├── spinbox
│   ├── static
│   ├── windowmovesize
│   └── winstatic
├── _future/
│   ├── otherattributes/
│   │   └── ui.h
│   ├── textlanguageattr/
│   │   ├── README
│   │   ├── attrstr_darwin.m
│   │   ├── attrstr_unix.c
│   │   ├── attrstr_windows.cpp
│   │   ├── common_attrlist.c
│   │   ├── drawtext_example.c
│   │   ├── fontmatch_darwin.m
│   │   └── ui.h
│   ├── unittest/
│   │   ├── checklist_attrstr
│   │   ├── opentype_test.c
│   │   ├── testing.h
│   │   └── testing_testing.c
│   └── verticaltext/
│       ├── README
│       ├── attrstr_darwin.m
│       ├── attrstr_unix.c
│       ├── attrstr_windows.cpp
│       ├── common_attrlist.c
│       ├── drawtext_example.c
│       └── ui.h
├── _notes/
│   ├── OS2
│   ├── azure-pipelines
│   ├── caretWidths
│   ├── cplusplus
│   ├── darwinAutoLayout
│   ├── darwinNSAlertIcons
│   ├── dialogs
│   ├── highDPI
│   ├── i18n
│   ├── macosAlternateHiDPI
│   ├── misc
│   ├── rebarstuff
│   ├── tableNotes
│   ├── textSelections
│   ├── winARM64
│   ├── windowsHighDPI
│   ├── windowsPrinting
│   ├── windowsUWPGlass
│   └── winflags
├── _wip/
│   ├── attrstr_metrics/
│   │   ├── common_OLD_drawtext.c
│   │   ├── common_OLD_uipriv_attrstr.h
│   │   ├── darwin_OLD__appkit_drawtext.m
│   │   ├── darwin_OLD__appkit_fontmatch.m
│   │   ├── darwin_OLD__old_drawtext.m
│   │   ├── darwin_OLD_drawtext.m
│   │   ├── numlinesbyterange
│   │   ├── old_ui_attrstr.h
│   │   ├── textDarwinEmptyLayout.diff
│   │   ├── unix_OLD__old_drawtext.c
│   │   ├── unix_OLD_drawtext.c
│   │   ├── windows_OLD__old_drawtext.cpp
│   │   └── windows_OLD_drawtext.cpp
│   ├── examples_drawtext/
│   │   ├── attributes.c
│   │   ├── basic.c
│   │   ├── drawtext.h
│   │   ├── emptystr_hittest.c
│   │   ├── hittest.c
│   │   └── main.c
│   ├── examples_drawtext_CMakeLists.txt
│   ├── examples_opentype/
│   │   └── main.c
│   ├── rules.darwin
│   ├── rules.unix
│   ├── sv/
│   │   ├── normal
│   │   ├── normal.nots
│   │   ├── outlineview
│   │   ├── outlineview.nots
│   │   ├── sourcelist
│   │   ├── sourcelist.nots
│   │   ├── tableview
│   │   ├── tableview.nots
│   │   ├── textview
│   │   └── textview.nots
│   └── table/
│       ├── test_page9.c
│       ├── ui.h
│       ├── unix_table.c
│       └── unix_tablemodel.c
├── azure-pipelines/
│   ├── TODOMatrix
│   ├── artifacts.yml
│   ├── build.yml
│   ├── collapse.awk
│   ├── collapsed
│   ├── configure.yml
│   ├── darwin-install-ninja.yml
│   ├── install-latest-meson-ninja.yml
│   ├── linux-386-install-gtk-dev.yml
│   ├── linux-install-gtk-dev.yml
│   ├── setup-python3.yml
│   ├── vs2015-install-python3.yml
│   ├── windows-artifacts.yml
│   └── windows-install-ninja.yml
├── azure-pipelines.yml
├── common/
│   ├── OLD_table.c
│   ├── areaevents.c
│   ├── attribute.c
│   ├── attrlist.c
│   ├── attrstr.c
│   ├── attrstr.h
│   ├── control.c
│   ├── controlsigs.h
│   ├── debug.c
│   ├── matrix.c
│   ├── meson.build
│   ├── opentype.c
│   ├── shouldquit.c
│   ├── table.h
│   ├── tablemodel.c
│   ├── tablevalue.c
│   ├── uipriv.h
│   ├── userbugs.c
│   ├── utf.c
│   └── utf.h
├── darwin/
│   ├── OLD_table.m
│   ├── aat.m
│   ├── alloc.m
│   ├── area.m
│   ├── areaevents.m
│   ├── attrstr.h
│   ├── attrstr.m
│   ├── autolayout.m
│   ├── box.m
│   ├── button.m
│   ├── checkbox.m
│   ├── colorbutton.m
│   ├── combobox.m
│   ├── control.m
│   ├── datetimepicker.m
│   ├── debug.m
│   ├── draw.h
│   ├── draw.m
│   ├── drawtext.m
│   ├── editablecombo.m
│   ├── entry.m
│   ├── fontbutton.m
│   ├── fontmatch.m
│   ├── fonttraits.m
│   ├── fontvariation.m
│   ├── form.m
│   ├── future.m
│   ├── graphemes.m
│   ├── grid.m
│   ├── group.m
│   ├── image.m
│   ├── label.m
│   ├── main.m
│   ├── map.m
│   ├── menu.m
│   ├── meson.build
│   ├── multilineentry.m
│   ├── opentype.m
│   ├── progressbar.m
│   ├── radiobuttons.m
│   ├── scrollview.m
│   ├── separator.m
│   ├── sierra.h
│   ├── slider.m
│   ├── spinbox.m
│   ├── stddialogs.m
│   ├── tab.m
│   ├── table.h
│   ├── table.m
│   ├── tablecolumn.m
│   ├── text.m
│   ├── uipriv_darwin.h
│   ├── undocumented.m
│   ├── util.m
│   ├── window.m
│   └── winmoveresize.m
├── examples/
│   ├── controlgallery/
│   │   └── main.c
│   ├── cpp-multithread/
│   │   └── main.cpp
│   ├── datetime/
│   │   └── main.c
│   ├── drawtext/
│   │   └── main.c
│   ├── example.manifest
│   ├── example.static.manifest
│   ├── histogram/
│   │   └── main.c
│   ├── meson.build
│   ├── resources.rc
│   └── timer/
│       └── main.c
├── meson.build
├── stats.osxdrawtext
├── test/
│   ├── OLD_page16.c
│   ├── drawtests.c
│   ├── images/
│   │   └── gen.go
│   ├── images.c
│   ├── main.c
│   ├── menus.c
│   ├── meson.build
│   ├── page1.c
│   ├── page10.c
│   ├── page11.c
│   ├── page12.c
│   ├── page13.c
│   ├── page14.c
│   ├── page15.c
│   ├── page16.c
│   ├── page2.c
│   ├── page3.c
│   ├── page4.c
│   ├── page5.c
│   ├── page6.c
│   ├── page7.c
│   ├── page7a.c
│   ├── page7b.c
│   ├── page7c.c
│   ├── page8.c
│   ├── page9.c
│   ├── resources.rc
│   ├── spaced.c
│   ├── test.h
│   ├── test.manifest
│   └── test.static.manifest
├── ui.h
├── ui_darwin.h
├── ui_unix.h
├── ui_windows.h
├── unix/
│   ├── OLD_table.c
│   ├── alloc.c
│   ├── area.c
│   ├── attrstr.c
│   ├── attrstr.h
│   ├── box.c
│   ├── button.c
│   ├── cellrendererbutton.c
│   ├── checkbox.c
│   ├── child.c
│   ├── colorbutton.c
│   ├── combobox.c
│   ├── control.c
│   ├── datetimepicker.c
│   ├── debug.c
│   ├── draw.c
│   ├── draw.h
│   ├── drawmatrix.c
│   ├── drawpath.c
│   ├── drawtext.c
│   ├── editablecombo.c
│   ├── entry.c
│   ├── fontbutton.c
│   ├── fontmatch.c
│   ├── form.c
│   ├── future.c
│   ├── graphemes.c
│   ├── grid.c
│   ├── group.c
│   ├── image.c
│   ├── label.c
│   ├── main.c
│   ├── menu.c
│   ├── meson.build
│   ├── multilineentry.c
│   ├── opentype.c
│   ├── progressbar.c
│   ├── radiobuttons.c
│   ├── separator.c
│   ├── slider.c
│   ├── spinbox.c
│   ├── stddialogs.c
│   ├── tab.c
│   ├── table.c
│   ├── table.h
│   ├── tablemodel.c
│   ├── text.c
│   ├── uipriv_unix.h
│   ├── util.c
│   └── window.c
└── windows/
    ├── _rc2bin/
    │   ├── build.bat
    │   ├── libui.manifest
    │   ├── main.cpp
    │   ├── resources.hpp
    │   ├── resources.rc
    │   └── winapi.hpp
    ├── _uipriv_migrate.hpp
    ├── alloc.cpp
    ├── area.cpp
    ├── area.hpp
    ├── areadraw.cpp
    ├── areaevents.cpp
    ├── areascroll.cpp
    ├── areautil.cpp
    ├── attrstr.cpp
    ├── attrstr.hpp
    ├── box.cpp
    ├── button.cpp
    ├── checkbox.cpp
    ├── colorbutton.cpp
    ├── colordialog.cpp
    ├── combobox.cpp
    ├── compilerver.hpp
    ├── container.cpp
    ├── control.cpp
    ├── d2dscratch.cpp
    ├── datetimepicker.cpp
    ├── debug.cpp
    ├── draw.cpp
    ├── draw.hpp
    ├── drawmatrix.cpp
    ├── drawpath.cpp
    ├── drawtext.cpp
    ├── dwrite.cpp
    ├── editablecombo.cpp
    ├── entry.cpp
    ├── events.cpp
    ├── fontbutton.cpp
    ├── fontdialog.cpp
    ├── fontmatch.cpp
    ├── form.cpp
    ├── graphemes.cpp
    ├── grid.cpp
    ├── group.cpp
    ├── image.cpp
    ├── init.cpp
    ├── label.cpp
    ├── libui.manifest
    ├── main.cpp
    ├── menu.cpp
    ├── meson.build
    ├── multilineentry.cpp
    ├── notes
    ├── opentype.cpp
    ├── parent.cpp
    ├── progressbar.cpp
    ├── radiobuttons.cpp
    ├── resources.hpp
    ├── resources.rc
    ├── separator.cpp
    ├── sizing.cpp
    ├── slider.cpp
    ├── spinbox.cpp
    ├── stddialogs.cpp
    ├── tab.cpp
    ├── table.cpp
    ├── table.hpp
    ├── tabledispinfo.cpp
    ├── tabledraw.cpp
    ├── tableediting.cpp
    ├── tablemetrics.cpp
    ├── tabpage.cpp
    ├── text.cpp
    ├── uipriv_windows.hpp
    ├── utf16.cpp
    ├── utilwin.cpp
    ├── winapi.hpp
    ├── window.cpp
    ├── winpublic.cpp
    └── winutil.cpp
Download .txt
SYMBOL INDEX (2087 symbols across 202 files)

FILE: _abort/windowevents/page15.c
  function moveX (line 3) | static void moveX(uiSpinbox *s, void *data)
  function moveY (line 13) | static void moveY(uiSpinbox *s, void *data)
  function updatepos (line 23) | static void updatepos(uiWindow *w)
  function center (line 32) | static void center(uiButton *b, void *data)
  function onMove (line 40) | void onMove(uiWindow *w, void *data)
  function uiBox (line 46) | uiBox *makePage15(uiWindow *w)

FILE: _abort/windowevents/unix_window.c
  type uiWindow (line 1) | struct uiWindow {
  function gboolean (line 11) | static gboolean onConfigure(GtkWidget *win, GdkEvent *e, gpointer data)
  function defaultOnPositionContentSizeChanged (line 28) | static void defaultOnPositionContentSizeChanged(uiWindow *w, void *data)
  function uiWindowPosition (line 38) | void uiWindowPosition(uiWindow *w, int *x, int *y)
  function uiWindowSetPosition (line 47) | void uiWindowSetPosition(uiWindow *w, int x, int y)
  function uiWindowCenter (line 59) | void uiWindowCenter(uiWindow *w)
  function uiWindowOnPositionChanged (line 81) | void uiWindowOnPositionChanged(uiWindow *w, void (*f)(uiWindow *, void *...
  function uiWindow (line 89) | uiWindow *uiNewWindow(const char *title, int width, int height, int hasM...

FILE: _abort/windowevents/windows_window.cpp
  type uiWindow (line 1) | struct uiWindow {
  function LRESULT (line 9) | static LRESULT CALLBACK windowWndProc(HWND hwnd, UINT uMsg, WPARAM wPara...
  function defaultOnPositionContentSizeChanged (line 21) | static void defaultOnPositionContentSizeChanged(uiWindow *w, void *data)
  function uiWindowPosition (line 30) | void uiWindowPosition(uiWindow *w, int *x, int *y)
  function uiWindowSetPosition (line 39) | void uiWindowSetPosition(uiWindow *w, int x, int y)
  function uiWindowCenter (line 50) | void uiWindowCenter(uiWindow *w)
  function uiWindowOnPositionChanged (line 73) | void uiWindowOnPositionChanged(uiWindow *w, void (*f)(uiWindow *, void *...
  function uiWindow (line 81) | uiWindow *uiNewWindow(const char *title, int width, int height, int hasM...

FILE: _doc/export/ttfixedtest.go
  type fixed1616 (line 8) | type fixed1616
    method In214Range (line 17) | func (f fixed1616) In214Range() bool {
    method String (line 22) | func (f fixed1616) String() string {
  type fixed214 (line 9) | type fixed214
    method String (line 29) | func (f fixed214) String() string {
  function fixed1616To214 (line 11) | func fixed1616To214(f fixed1616) fixed214 {
  function main (line 41) | func main() {

FILE: _doc/export/writewidths.c
  function main (line 3) | int main(void) { return realMain(); }

FILE: _doc/misctests/gtkprogresstable.c
  function gboolean (line 15) | static gboolean pulseProgress(gpointer data)
  function onStartProgressClicked (line 21) | static void onStartProgressClicked(GtkButton *button, gpointer data)
  function pbarDataFunc (line 30) | static void pbarDataFunc(GtkTreeViewColumn *col, GtkCellRenderer *r, Gtk...
  function gboolean (line 45) | static gboolean pulseTable(gpointer data)
  function onStartTableClicked (line 57) | static void onStartTableClicked(GtkButton *button, gpointer data)
  function gboolean (line 66) | static gboolean onClosing(GtkWidget *win, GdkEvent *e, gpointer data)
  function main (line 72) | int main(void)

FILE: _doc/misctests/winbuttonexplorertheme.cpp
  function diele (line 22) | void diele(const char *func)
  function diehr (line 31) | void diehr(const char *func, HRESULT hr)
  function HRESULT (line 38) | static inline HRESULT lastErrorToHRESULT(DWORD lastError)
  class commandModuleStyleParams (line 49) | class commandModuleStyleParams {
  class commandModuleStyleParamsVista (line 78) | class commandModuleStyleParamsVista : public commandModuleStyleParams {
    method partID_CMOD_MODULEBACKGROUND (line 80) | virtual int partID_CMOD_MODULEBACKGROUND(void) const { return 1; }
    method partID_CMOD_TASKBUTTON (line 81) | virtual int partID_CMOD_TASKBUTTON(void) const { return 2; }
    method partID_CMOD_SPLITBUTTONLEFT (line 82) | virtual int partID_CMOD_SPLITBUTTONLEFT(void) const { return 3; }
    method partID_CMOD_SPLITBUTTONRIGHT (line 83) | virtual int partID_CMOD_SPLITBUTTONRIGHT(void) const { return 4; }
    method partID_CMOD_MENUGLYPH (line 84) | virtual int partID_CMOD_MENUGLYPH(void) const { return 5; }
    method partID_CMOD_OVERFLOWGLYPH (line 85) | virtual int partID_CMOD_OVERFLOWGLYPH(void) const { return 6; }
    method stateID_CMODS_NORMAL (line 87) | virtual int stateID_CMODS_NORMAL(void) const { return 1; }
    method stateID_CMODS_HOT (line 88) | virtual int stateID_CMODS_HOT(void) const { return 2; }
    method stateID_CMODS_PRESSED (line 89) | virtual int stateID_CMODS_PRESSED(void) const { return 3; }
    method stateID_CMODS_KEYFOCUSED (line 90) | virtual int stateID_CMODS_KEYFOCUSED(void) const { return 4; }
    method stateID_CMODS_NEARHOT (line 91) | virtual int stateID_CMODS_NEARHOT(void) const { return 5; }
    method HRESULT (line 93) | virtual HRESULT backgroundGradientColors(HTHEME theme, COLORREF *color...
    method HRESULT (line 104) | virtual HRESULT buttonTextColor(HTHEME theme, UINT uItemState, COLORRE...
    method BOOL (line 115) | virtual BOOL buttonTextShadowed(UINT uItemState) const
    method folderBarMarginsLeftDIP (line 120) | virtual int folderBarMarginsLeftDIP(void) const { return 3; }
    method folderBarMarginsTopDIP (line 121) | virtual int folderBarMarginsTopDIP(void) const { return 2; }
    method folderBarMarginsRightDIP (line 122) | virtual int folderBarMarginsRightDIP(void) const { return 3; }
    method folderBarMarginsBottomDIP (line 123) | virtual int folderBarMarginsBottomDIP(void) const { return 3; }
    method buttonMarginsXDIP (line 125) | virtual int buttonMarginsXDIP(void) const { return 6; }
    method buttonMarginsYDIP (line 126) | virtual int buttonMarginsYDIP(void) const { return 5; }
    method buttonTextArrowSeparationXDIP (line 127) | virtual int buttonTextArrowSeparationXDIP(void) const { return 3; }
  class commandModuleStyleParams7 (line 130) | class commandModuleStyleParams7 : public commandModuleStyleParams {
    method partID_CMOD_MODULEBACKGROUND (line 131) | virtual int partID_CMOD_MODULEBACKGROUND(void) const { return 1; }
    method partID_CMOD_TASKBUTTON (line 132) | virtual int partID_CMOD_TASKBUTTON(void) const { return 3; }
    method partID_CMOD_SPLITBUTTONLEFT (line 133) | virtual int partID_CMOD_SPLITBUTTONLEFT(void) const { return 4; }
    method partID_CMOD_SPLITBUTTONRIGHT (line 134) | virtual int partID_CMOD_SPLITBUTTONRIGHT(void) const { return 5; }
    method partID_CMOD_MENUGLYPH (line 135) | virtual int partID_CMOD_MENUGLYPH(void) const { return 6; }
    method partID_CMOD_OVERFLOWGLYPH (line 136) | virtual int partID_CMOD_OVERFLOWGLYPH(void) const { return 7; }
    method stateID_CMODS_NORMAL (line 138) | virtual int stateID_CMODS_NORMAL(void) const { return 1; }
    method stateID_CMODS_HOT (line 139) | virtual int stateID_CMODS_HOT(void) const { return 2; }
    method stateID_CMODS_PRESSED (line 140) | virtual int stateID_CMODS_PRESSED(void) const { return 3; }
    method stateID_CMODS_KEYFOCUSED (line 141) | virtual int stateID_CMODS_KEYFOCUSED(void) const { return 4; }
    method stateID_CMODS_NEARHOT (line 142) | virtual int stateID_CMODS_NEARHOT(void) const { return 5; }
    method HRESULT (line 144) | virtual HRESULT backgroundGradientColors(HTHEME theme, COLORREF *color...
    method HRESULT (line 165) | virtual HRESULT buttonTextColor(HTHEME theme, UINT uItemState, COLORRE...
    method BOOL (line 180) | virtual BOOL buttonTextShadowed(UINT uItemState) const
    method folderBarMarginsLeftDIP (line 185) | virtual int folderBarMarginsLeftDIP(void) const { return 3; }
    method folderBarMarginsTopDIP (line 186) | virtual int folderBarMarginsTopDIP(void) const { return 2; }
    method folderBarMarginsRightDIP (line 187) | virtual int folderBarMarginsRightDIP(void) const { return 9; }
    method folderBarMarginsBottomDIP (line 188) | virtual int folderBarMarginsBottomDIP(void) const { return 3; }
    method buttonMarginsXDIP (line 190) | virtual int buttonMarginsXDIP(void) const { return 13; }
    method buttonMarginsYDIP (line 191) | virtual int buttonMarginsYDIP(void) const { return 5; }
    method buttonTextArrowSeparationXDIP (line 192) | virtual int buttonTextArrowSeparationXDIP(void) const { return 1; }
  type buttonMetrics (line 196) | struct buttonMetrics {
  type buttonRects (line 208) | struct buttonRects {
  class commandModuleStyle (line 214) | class commandModuleStyle {
    type buttonMetrics (line 217) | struct buttonMetrics
    type buttonMetrics (line 218) | struct buttonMetrics
    type buttonRects (line 218) | struct buttonRects
  class commandModuleStyleThemed (line 222) | class commandModuleStyleThemed : public commandModuleStyle {
    method commandModuleStyleThemed (line 226) | commandModuleStyleThemed(HTHEME theme, HTHEME textstyleTheme)
    method HRESULT (line 232) | virtual HRESULT drawFolderBar(commandModuleStyleParams *p, HDC dc, REC...
    method HRESULT (line 286) | virtual HRESULT buttonMetrics(commandModuleStyleParams *p, HWND button...
    method HRESULT (line 389) | virtual HRESULT buttonRects(commandModuleStyleParams *p, HWND button, ...
    method HRESULT (line 418) | virtual HRESULT drawButton(commandModuleStyleParams *p, HWND button, H...
  function drawExplorerChevron (line 490) | void drawExplorerChevron(HTHEME theme, HDC dc, HWND rebar, WPARAM band, ...
  function LRESULT (line 546) | LRESULT drawExplorerButton(NMCUSTOMDRAW *nm)
  function onWM_CREATE (line 559) | void onWM_CREATE(HWND hwnd)
  function updateTheme (line 581) | void updateTheme(HWND hwnd)
  function repositionButtons (line 609) | void repositionButtons(HWND hwnd)
  function folderBarRect (line 646) | void folderBarRect(HWND hwnd, HDC dc, RECT *r)
  function handleEvents (line 674) | void handleEvents(HWND hwnd, WPARAM wParam)
  function LRESULT (line 757) | LRESULT CALLBACK wndproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa...
  function main (line 816) | int main(int argc, char *argv[])

FILE: _doc/misctests/winrebarexplorertheme.cpp
  function diele (line 22) | void diele(const char *func)
  function diehr (line 31) | void diehr(const char *func, HRESULT hr)
  function drawExplorerBackground (line 65) | void drawExplorerBackground(HTHEME theme, HDC dc, RECT *rcWindow, RECT *...
  function drawExplorerChevron (line 93) | void drawExplorerChevron(HTHEME theme, HDC dc, HWND rebar, WPARAM band, ...
  function LRESULT (line 125) | LRESULT customDrawExplorerRebar(NMCUSTOMDRAW *nm)
  function LRESULT (line 142) | LRESULT customDrawExplorerToolbar(NMTBCUSTOMDRAW *nm)
  function onWM_CREATE (line 270) | void onWM_CREATE(HWND hwnd)
  function repositionRebar (line 458) | void repositionRebar(HWND hwnd)
  function handleEvents (line 473) | void handleEvents(HWND hwnd, WPARAM wParam)
  function LRESULT (line 555) | LRESULT CALLBACK wndproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa...
  function main (line 590) | int main(void)

FILE: _future/otherattributes/ui.h
  function _UI_ENUM (line 1) | _UI_ENUM(uiAttribute) {

FILE: _future/unittest/opentype_test.c
  type uiOpenTypeFeatures (line 12) | typedef struct uiOpenTypeFeatures uiOpenTypeFeatures;
  type uiForEach (line 13) | typedef int uiForEach;
  type uiForEach (line 15) | typedef uiForEach (*uiOpenTypeFeaturesForEachFunc)(const uiOpenTypeFeatu...
  function freeOpenType (line 22) | static void freeOpenType(void *otf)
  function testingTest (line 27) | testingTest(OpenTypeFeaturesAddGet)
  function testingTest (line 44) | testingTest(OpenTypeFeaturesRemove)
  function testingTest (line 58) | testingTest(OpenTypeFeaturesCloneAdd)
  function testingTest (line 74) | testingTest(OpenTypeFeaturesCloneModify)
  function testingTest (line 94) | testingTest(OpenTypeFeaturesCloneRemove)
  function main (line 112) | int main(void)

FILE: _future/unittest/testing.h
  type testingT (line 80) | typedef struct testingT testingT;
  function class (line 128) | class testingprivFailNowException {}
  function class (line 129) | class testingprivSkipNowException {}
  function class (line 130) | class testingprivRegisterTestClass {

FILE: _future/unittest/testing_testing.c
  type defer (line 9) | struct defer {
  type testingT (line 15) | struct testingT {
  function testingprivRegisterTest (line 28) | void testingprivRegisterTest(const char *name, void (*f)(testingT *))
  function runDefers (line 44) | static void runDefers(testingT *t)
  function testingMain (line 55) | int testingMain(void)
  function testingprivTLogfFull (line 92) | void testingprivTLogfFull(testingT *t, const char *file, int line, const...
  function testingprivTLogvfFull (line 101) | void testingprivTLogvfFull(testingT *t, const char *file, int line, cons...
  function testingTFail (line 110) | void testingTFail(testingT *t)
  function returnNow (line 115) | static void returnNow(testingT *t)
  function testingprivTDoFailNow (line 122) | void testingprivTDoFailNow(testingT *t)
  function testingprivTDoSkipNow (line 128) | void testingprivTDoSkipNow(testingT *t)
  function testingTDefer (line 134) | void testingTDefer(testingT *t, void (*f)(void *data), void *data)

FILE: _wip/attrstr_metrics/common_OLD_drawtext.c
  function uiDrawCaret (line 8) | void uiDrawCaret(uiDrawContext *c, double x, double y, uiDrawTextLayout ...
  function drawTextBackground (line 55) | void drawTextBackground(uiDrawContext *c, double x, double y, uiDrawText...

FILE: _wip/attrstr_metrics/common_OLD_uipriv_attrstr.h
  type caretDrawParams (line 6) | struct caretDrawParams {
  type caretDrawParams (line 14) | struct caretDrawParams

FILE: _wip/attrstr_metrics/old_ui_attrstr.h
  type uiDrawTextLayoutLineMetrics (line 2) | typedef struct uiDrawTextLayoutLineMetrics uiDrawTextLayoutLineMetrics;
  type uiDrawTextLayoutLineMetrics (line 11) | struct uiDrawTextLayoutLineMetrics {

FILE: _wip/attrstr_metrics/unix_OLD__old_drawtext.c
  type uiDrawFontFamilies (line 5) | struct uiDrawFontFamilies {
  function uiDrawFontFamilies (line 10) | uiDrawFontFamilies *uiDrawListFontFamilies(void)
  function uiDrawFontFamiliesNumFamilies (line 22) | int uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff)
  function uiDrawFreeFontFamilies (line 35) | void uiDrawFreeFontFamilies(uiDrawFontFamilies *ff)
  type uiDrawTextFont (line 41) | struct uiDrawTextFont {
  function uiDrawTextFont (line 45) | uiDrawTextFont *mkTextFont(PangoFont *f, gboolean ref)
  function PangoFont (line 58) | PangoFont *pangoDescToPangoFont(PangoFontDescription *pdesc)
  function uiDrawTextFont (line 74) | uiDrawTextFont *uiDrawLoadClosestFont(const uiDrawTextFontDescriptor *desc)
  function uiDrawFreeTextFont (line 95) | void uiDrawFreeTextFont(uiDrawTextFont *font)
  function uiDrawTextFontHandle (line 101) | uintptr_t uiDrawTextFontHandle(uiDrawTextFont *font)
  function uiDrawTextFontDescribe (line 106) | void uiDrawTextFontDescribe(uiDrawTextFont *font, uiDrawTextFontDescript...
  function uiDrawTextFontGetMetrics (line 123) | void uiDrawTextFontGetMetrics(uiDrawTextFont *font, uiDrawTextFontMetric...
  type uiDrawTextLayout (line 138) | struct uiDrawTextLayout {
  function uiDrawTextLayout (line 146) | uiDrawTextLayout *uiDrawNewTextLayout(const char *text, uiDrawTextFont *...
  function uiDrawFreeTextLayout (line 163) | void uiDrawFreeTextLayout(uiDrawTextLayout *layout)
  function uiDrawTextLayoutSetWidth (line 172) | void uiDrawTextLayoutSetWidth(uiDrawTextLayout *layout, double width)
  function prepareLayout (line 177) | static void prepareLayout(uiDrawTextLayout *layout, PangoLayout *pl)
  function uiDrawText (line 185) | void uiDrawText(uiDrawContext *c, double x, double y, uiDrawTextLayout *...
  function addAttr (line 192) | static void addAttr(uiDrawTextLayout *layout, PangoAttribute *attr, int ...
  function uiDrawTextLayoutSetColor (line 200) | void uiDrawTextLayoutSetColor(uiDrawTextLayout *layout, int startChar, i...

FILE: _wip/attrstr_metrics/unix_OLD_drawtext.c
  type uiDrawTextLayout (line 10) | struct uiDrawTextLayout {
  function computeLineMetrics (line 19) | static void computeLineMetrics(uiDrawTextLayout *tl)
  function uiDrawTextLayout (line 68) | uiDrawTextLayout *uiDrawNewTextLayout(uiDrawTextLayoutParams *p)
  function uiDrawTextLayoutLineGetMetrics (line 120) | void uiDrawTextLayoutLineGetMetrics(uiDrawTextLayout *tl, int line, uiDr...
  function uiDrawTextLayoutHitTest (line 137) | void uiDrawTextLayoutHitTest(uiDrawTextLayout *tl, double x, double y, s...
  function uiDrawTextLayoutByteLocationInLine (line 166) | double uiDrawTextLayoutByteLocationInLine(uiDrawTextLayout *tl, size_t p...
  function caretDrawParams (line 195) | void caretDrawParams(uiDrawContext *c, double height, struct caretDrawPa...

FILE: _wip/attrstr_metrics/windows_OLD__old_drawtext.cpp
  type uiDrawFontFamilies (line 13) | struct uiDrawFontFamilies {
  function uiDrawFontFamilies (line 17) | uiDrawFontFamilies *uiDrawListFontFamilies(void)
  function uiDrawFontFamiliesNumFamilies (line 26) | int uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff)
  function uiDrawFreeFontFamilies (line 48) | void uiDrawFreeFontFamilies(uiDrawFontFamilies *ff)
  type uiDrawTextFont (line 54) | struct uiDrawTextFont {
  function uiDrawTextFont (line 60) | uiDrawTextFont *mkTextFont(IDWriteFont *df, BOOL addRef, WCHAR *family, ...
  function uiDrawTextFont (line 83) | uiDrawTextFont *uiDrawLoadClosestFont(const uiDrawTextFontDescriptor *desc)
  function uiDrawFreeTextFont (line 133) | void uiDrawFreeTextFont(uiDrawTextFont *font)
  function uiDrawTextFontHandle (line 140) | uintptr_t uiDrawTextFontHandle(uiDrawTextFont *font)
  function uiDrawTextFontDescribe (line 145) | void uiDrawTextFontDescribe(uiDrawTextFont *font, uiDrawTextFontDescript...
  function scaleUnits (line 163) | static double scaleUnits(double what, double designUnitsPerEm, double size)
  function uiDrawTextFontGetMetrics (line 168) | void uiDrawTextFontGetMetrics(uiDrawTextFont *font, uiDrawTextFontMetric...
  type layoutAttrType (line 184) | enum layoutAttrType {
  type layoutAttr (line 188) | struct layoutAttr {
    type layoutAttrType (line 189) | enum layoutAttrType
  type uiDrawTextLayout (line 195) | struct uiDrawTextLayout {
    type layoutAttr (line 201) | struct layoutAttr
  function uiDrawTextLayout (line 204) | uiDrawTextLayout *uiDrawNewTextLayout(const char *text, uiDrawTextFont *...
    type layoutAttr (line 201) | struct layoutAttr
  function uiDrawFreeTextLayout (line 231) | void uiDrawFreeTextLayout(uiDrawTextLayout *layout)
  function IDWriteTextLayout (line 241) | IDWriteTextLayout *prepareLayout(uiDrawTextLayout *layout, ID2D1RenderTa...
  function uiDrawText (line 277) | void uiDrawText(uiDrawContext *c, double x, double y, uiDrawTextLayout *...
  function uiDrawTextLayoutSetColor (line 299) | void uiDrawTextLayoutSetColor(uiDrawTextLayout *layout, int startChar, i...

FILE: _wip/attrstr_metrics/windows_OLD_drawtext.cpp
  type uiDrawTextLayout (line 14) | struct uiDrawTextLayout {
    type lineInfo (line 19) | struct lineInfo
  type lineInfo (line 33) | struct lineInfo {
  function computeLineInfo (line 45) | static void computeLineInfo(uiDrawTextLayout *tl)
  function uiDrawTextLayout (line 124) | uiDrawTextLayout *uiDrawNewTextLayout(uiDrawTextLayoutParams *p)
    type lineInfo (line 19) | struct lineInfo
  function uiDrawFreeTextLayout (line 190) | void uiDrawFreeTextLayout(uiDrawTextLayout *tl)
  function HRESULT (line 201) | static HRESULT mkSolidBrush(ID2D1RenderTarget *rt, double r, double g, d...
  function ID2D1SolidColorBrush (line 221) | static ID2D1SolidColorBrush *mustMakeSolidBrush(ID2D1RenderTarget *rt, d...
  class textRenderer (line 234) | class textRenderer : public IDWriteTextRenderer {
    method textRenderer (line 240) | textRenderer(ID2D1RenderTarget *rt, BOOL snap, ID2D1SolidColorBrush *b...
    method QueryInterface (line 249) | QueryInterface(REFIID riid, void **ppvObject)
    method AddRef (line 264) | AddRef(void)
    method Release (line 270) | Release(void)
    method GetCurrentTransform (line 281) | GetCurrentTransform(void *clientDrawingContext, DWRITE_MATRIX *transform)
    method GetPixelsPerDip (line 297) | GetPixelsPerDip(void *clientDrawingContext, FLOAT *pixelsPerDip)
    method IsPixelSnappingDisabled (line 308) | IsPixelSnappingDisabled(void *clientDrawingContext, BOOL *isDisabled)
    method DrawGlyphRun (line 317) | DrawGlyphRun(void *clientDrawingContext, FLOAT baselineOriginX, FLOAT ...
    method DrawInlineObject (line 343) | DrawInlineObject(void *clientDrawingContext, FLOAT originX, FLOAT orig...
    method DrawStrikethrough (line 353) | DrawStrikethrough(void *clientDrawingContext, FLOAT baselineOriginX, F...
    method DrawUnderline (line 359) | DrawUnderline(void *clientDrawingContext, FLOAT baselineOriginX, FLOAT...
  function uiDrawText (line 472) | void uiDrawText(uiDrawContext *c, uiDrawTextLayout *tl, double x, double y)
  function uiDrawTextLayoutExtents (line 520) | void uiDrawTextLayoutExtents(uiDrawTextLayout *tl, double *width, double...
  function uiDrawTextLayoutNumLines (line 533) | int uiDrawTextLayoutNumLines(uiDrawTextLayout *tl)
  function uiDrawTextLayoutLineByteRange (line 540) | void uiDrawTextLayoutLineByteRange(uiDrawTextLayout *tl, int line, size_...
  function uiDrawTextLayoutLineGetMetrics (line 548) | void uiDrawTextLayoutLineGetMetrics(uiDrawTextLayout *tl, int line, uiDr...
  function uiDrawTextLayoutHitTest (line 570) | void uiDrawTextLayoutHitTest(uiDrawTextLayout *tl, double x, double y, s...
  function uiDrawTextLayoutByteLocationInLine (line 611) | double uiDrawTextLayoutByteLocationInLine(uiDrawTextLayout *tl, size_t p...
  function caretDrawParams (line 639) | void caretDrawParams(uiDrawContext *c, double height, struct caretDrawPa...

FILE: _wip/examples_drawtext/attributes.c
  function uiOpenTypeFeatures (line 10) | static uiOpenTypeFeatures *addFeature(const char tag[4], uint32_t value)
  function setupAttributedString (line 26) | static void setupAttributedString(void)
  function draw (line 817) | static void draw(uiAreaDrawParams *p)
  type example (line 864) | struct example
  function changeFont (line 866) | static void changeFont(uiFontButton *b, void *data)
  function checkboxChecked (line 876) | static void checkboxChecked(uiCheckbox *c, void *data)
  function uiCheckbox (line 881) | static uiCheckbox *newCheckbox(const char *text)
  type example (line 891) | struct example

FILE: _wip/examples_drawtext/basic.c
  function draw (line 111) | static void draw(uiAreaDrawParams *p)
  type example (line 228) | struct example
  function checkboxChecked (line 231) | static void checkboxChecked(uiCheckbox *c, void *data)
  function uiCheckbox (line 236) | static uiCheckbox *newCheckbox(const char *text)
  type example (line 246) | struct example

FILE: _wip/examples_drawtext/drawtext.h
  type example (line 7) | struct example {
  type example (line 20) | struct example
  type example (line 23) | struct example
  type example (line 26) | struct example
  type example (line 29) | struct example

FILE: _wip/examples_drawtext/emptystr_hittest.c
  function draw (line 68) | static void draw(uiAreaDrawParams *p)
  function mouse (line 118) | static void mouse(uiAreaMouseEvent *e)
  function key (line 143) | static int key(uiAreaKeyEvent *e)
  type example (line 178) | struct example
  function checkboxChecked (line 181) | static void checkboxChecked(uiCheckbox *c, void *data)
  function changeFont (line 186) | static void changeFont(uiFontButton *b, void *data)
  function changeTextAlign (line 201) | static void changeTextAlign(uiCombobox *c, void *data)
  function uiCheckbox (line 209) | static uiCheckbox *newCheckbox(uiBox *box, const char *text)
  type example (line 219) | struct example

FILE: _wip/examples_drawtext/hittest.c
  function draw (line 76) | static void draw(uiAreaDrawParams *p)
  function mouse (line 126) | static void mouse(uiAreaMouseEvent *e)
  function key (line 151) | static int key(uiAreaKeyEvent *e)
  type example (line 186) | struct example
  function checkboxChecked (line 189) | static void checkboxChecked(uiCheckbox *c, void *data)
  function changeFont (line 194) | static void changeFont(uiFontButton *b, void *data)
  function changeTextAlign (line 209) | static void changeTextAlign(uiCombobox *c, void *data)
  function uiCheckbox (line 217) | static uiCheckbox *newCheckbox(uiBox *box, const char *text)
  type example (line 227) | struct example

FILE: _wip/examples_drawtext/main.c
  type example (line 11) | struct example
  function onExampleChanged (line 14) | static void onExampleChanged(uiCombobox *c, void *data)
  function redraw (line 22) | void redraw(void)
  function handlerDraw (line 27) | static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams...
  function handlerMouseEvent (line 32) | static void handlerMouseEvent(uiAreaHandler *a, uiArea *area, uiAreaMous...
  function handlerMouseCrossed (line 38) | static void handlerMouseCrossed(uiAreaHandler *ah, uiArea *a, int left)
  function handlerDragBroken (line 43) | static void handlerDragBroken(uiAreaHandler *ah, uiArea *a)
  function handlerKeyEvent (line 48) | static int handlerKeyEvent(uiAreaHandler *ah, uiArea *a, uiAreaKeyEvent *e)
  function onClosing (line 55) | static int onClosing(uiWindow *w, void *data)
  function shouldQuit (line 62) | static int shouldQuit(void *data)
  function main (line 68) | int main(void)

FILE: _wip/examples_opentype/main.c
  function remakeAttrStr (line 18) | static void remakeAttrStr(void)
  function handlerDraw (line 48) | static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams...
  function handlerMouseEvent (line 65) | static void handlerMouseEvent(uiAreaHandler *a, uiArea *area, uiAreaMous...
  function handlerMouseCrossed (line 70) | static void handlerMouseCrossed(uiAreaHandler *ah, uiArea *a, int left)
  function handlerDragBroken (line 75) | static void handlerDragBroken(uiAreaHandler *ah, uiArea *a)
  function handlerKeyEvent (line 80) | static int handlerKeyEvent(uiAreaHandler *ah, uiArea *a, uiAreaKeyEvent *e)
  function onFontChanged (line 86) | static void onFontChanged(uiFontButton *b, void *data)
  function onTextChanged (line 91) | static void onTextChanged(uiEntry *e, void *data)
  function onNULLToggled (line 96) | static void onNULLToggled(uiCheckbox *c, void *data)
  function onClosing (line 101) | static int onClosing(uiWindow *w, void *data)
  function shouldQuit (line 110) | static int shouldQuit(void *data)
  function main (line 116) | int main(void)

FILE: _wip/table/test_page9.c
  function intmax_t (line 16) | static intmax_t modelNumRows(uiTableModel *m, void *mData)
  function modelSetCellValue (line 47) | void modelSetCellValue(uiTableModel *m, void *mData, intmax_t row, intma...
  function uiBox (line 52) | uiBox *makePage9(void)

FILE: _wip/table/ui.h
  type uiTable (line 1) | typedef struct uiTable uiTable;
  type uiTableModel (line 2) | typedef struct uiTableModel uiTableModel;
  type uiTableModelSpec (line 3) | typedef struct uiTableModelSpec uiTableModelSpec;
  type uiTableColumnParams (line 4) | typedef struct uiTableColumnParams uiTableColumnParams;
  type uiTableColumnType (line 5) | typedef enum uiTableColumnType uiTableColumnType;
  type uiTableNotification (line 6) | typedef enum uiTableNotification uiTableNotification;
  type uiTableColumnType (line 14) | enum uiTableColumnType {
  type uiTableModelSpec (line 20) | struct uiTableModelSpec {
  type uiTableNotification (line 26) | enum uiTableNotification {
  type uiTableColumnParams (line 39) | struct uiTableColumnParams {

FILE: _wip/table/unix_table.c
  type uiTable (line 4) | struct uiTable {
  function uiTableSetModel (line 15) | uiUnixDefineControl(
  function uiTableAppendColumn (line 25) | void uiTableAppendColumn(uiTable *t, uiTableColumnParams *p)
  function uiTable (line 63) | uiTable *uiNewTable(void)

FILE: _wip/table/unix_tablemodel.c
  type uiTableModel (line 13) | typedef struct uiTableModel uiTableModel;
  type uiTableModelClass (line 14) | typedef struct uiTableModelClass uiTableModelClass;
  type uiTableModel (line 16) | struct uiTableModel {
  type uiTableModelClass (line 24) | struct uiTableModelClass {
  function uiTableModel_init (line 33) | static void uiTableModel_init(uiTableModel *m)
  function uiTableModel_dispose (line 38) | static void uiTableModel_dispose(GObject *obj)
  function uiTableModel_finalize (line 43) | static void uiTableModel_finalize(GObject *obj)
  function GtkTreeModelFlags (line 51) | static GtkTreeModelFlags uiTableModel_get_flags(GtkTreeModel *mb)
  function gint (line 56) | static gint uiTableModel_get_n_columns(GtkTreeModel *mb)
  function GType (line 63) | static GType uiTableModel_get_column_type(GtkTreeModel *mb, gint index)
  function gboolean (line 85) | static gboolean uiTableModel_get_iter(GtkTreeModel *mb, GtkTreeIter *ite...
  function GtkTreePath (line 105) | static GtkTreePath *uiTableModel_get_path(GtkTreeModel *mb, GtkTreeIter ...
  function uiTableModel_get_value (line 121) | static void uiTableModel_get_value(GtkTreeModel *mb, GtkTreeIter *iter, ...
  function gboolean (line 142) | static gboolean uiTableModel_iter_next(GtkTreeModel *mb, GtkTreeIter *iter)
  function gboolean (line 159) | static gboolean uiTableModel_iter_previous(GtkTreeModel *mb, GtkTreeIter...
  function gboolean (line 176) | static gboolean uiTableModel_iter_children(GtkTreeModel *mb, GtkTreeIter...
  function gboolean (line 189) | static gboolean uiTableModel_iter_has_child(GtkTreeModel *mb, GtkTreeIte...
  function gint (line 194) | static gint uiTableModel_iter_n_children(GtkTreeModel *mb, GtkTreeIter *...
  function gboolean (line 203) | static gboolean uiTableModel_iter_nth_child(GtkTreeModel *mb, GtkTreeIte...
  function gboolean (line 216) | static gboolean uiTableModel_iter_parent(GtkTreeModel *mb, GtkTreeIter *...
  function uiTableModel_class_init (line 222) | static void uiTableModel_class_init(uiTableModelClass *class)
  function uiTableModel_treeModel_init (line 228) | static void uiTableModel_treeModel_init(GtkTreeModelIface *iface)
  function uiTableModel (line 246) | uiTableModel *uiNewTableModel(uintmax_t nCols, uiTableColumnType *types,...
  function uiFreeTableModel (line 273) | void uiFreeTableModel(uiTableModel *m)
  function uiTableModelNotify (line 278) | void uiTableModelNotify(uiTableModel *m, uiTableNotification notificatio...

FILE: common/OLD_table.c
  function uiTableModelTakeInt (line 10) | int uiTableModelTakeInt(void *v)
  function uiTableColumn (line 15) | uiTableColumn *uiTableAppendTextColumn(uiTable *t, const char *name, int...

FILE: common/areaevents.c
  function uiprivClickCounterClick (line 19) | int uiprivClickCounterClick(uiprivClickCounter *c, int button, int x, in...
  function uiprivClickCounterReset (line 53) | void uiprivClickCounterReset(uiprivClickCounter *c)
  function uiprivFromScancode (line 154) | int uiprivFromScancode(uintptr_t scancode, uiAreaKeyEvent *ke)

FILE: common/attribute.c
  type uiAttribute (line 6) | struct uiAttribute {
  function uiAttribute (line 29) | static uiAttribute *newAttribute(uiAttributeType type)
  function uiAttribute (line 42) | uiAttribute *uiprivAttributeRetain(uiAttribute *a)
  function destroy (line 49) | static void destroy(uiAttribute *a)
  function uiprivAttributeRelease (line 62) | void uiprivAttributeRelease(uiAttribute *a)
  function uiFreeAttribute (line 71) | void uiFreeAttribute(uiAttribute *a)
  function uiAttributeType (line 78) | uiAttributeType uiAttributeGetType(const uiAttribute *a)
  function uiAttribute (line 83) | uiAttribute *uiNewFamilyAttribute(const char *family)
  function uiAttribute (line 98) | uiAttribute *uiNewSizeAttribute(double size)
  function uiAttributeSize (line 107) | double uiAttributeSize(const uiAttribute *a)
  function uiAttribute (line 112) | uiAttribute *uiNewWeightAttribute(uiTextWeight weight)
  function uiTextWeight (line 121) | uiTextWeight uiAttributeWeight(const uiAttribute *a)
  function uiAttribute (line 126) | uiAttribute *uiNewItalicAttribute(uiTextItalic italic)
  function uiTextItalic (line 135) | uiTextItalic uiAttributeItalic(const uiAttribute *a)
  function uiAttribute (line 140) | uiAttribute *uiNewStretchAttribute(uiTextStretch stretch)
  function uiTextStretch (line 149) | uiTextStretch uiAttributeStretch(const uiAttribute *a)
  function uiAttribute (line 154) | uiAttribute *uiNewColorAttribute(double r, double g, double b, double a)
  function uiAttributeColor (line 166) | void uiAttributeColor(const uiAttribute *a, double *r, double *g, double...
  function uiAttribute (line 174) | uiAttribute *uiNewBackgroundAttribute(double r, double g, double b, doub...
  function uiAttribute (line 186) | uiAttribute *uiNewUnderlineAttribute(uiUnderline u)
  function uiUnderline (line 195) | uiUnderline uiAttributeUnderline(const uiAttribute *a)
  function uiAttribute (line 200) | uiAttribute *uiNewUnderlineColorAttribute(uiUnderlineColor u, double r, ...
  function uiAttributeUnderlineColor (line 210) | void uiAttributeUnderlineColor(const uiAttribute *a, uiUnderlineColor *u...
  function uiAttribute (line 216) | uiAttribute *uiNewFeaturesAttribute(const uiOpenTypeFeatures *otf)
  function uiOpenTypeFeatures (line 225) | const uiOpenTypeFeatures *uiAttributeFeatures(const uiAttribute *a)
  function uiprivAttributeEqual (line 230) | int uiprivAttributeEqual(const uiAttribute *a, const uiAttribute *b)

FILE: common/attrlist.c
  type attr (line 16) | struct attr {
  type uiprivAttrList (line 24) | struct uiprivAttrList {
  function attrInsertBefore (line 30) | static void attrInsertBefore(uiprivAttrList *alist, struct attr *a, stru...
  function attrHasPos (line 68) | static int attrHasPos(struct attr *a, size_t pos)
  function attrRangeIntersect (line 76) | static int attrRangeIntersect(struct attr *a, size_t *start, size_t *end)
  type attr (line 94) | struct attr
  type attr (line 94) | struct attr
  type attr (line 96) | struct attr
  type attr (line 128) | struct attr
  type attr (line 128) | struct attr
  type attr (line 130) | struct attr
  type attr (line 151) | struct attr
  type attr (line 151) | struct attr
  type attr (line 151) | struct attr
  type attr (line 153) | struct attr
  function attrGrow (line 192) | static void attrGrow(uiprivAttrList *alist, struct attr *a, size_t start...
  type attr (line 214) | struct attr
  type attr (line 214) | struct attr
  type attr (line 216) | struct attr
  type attr (line 245) | struct attr
  type attr (line 245) | struct attr
  function uiprivAttrList (line 290) | uiprivAttrList *uiprivNewAttrList(void)
  function uiprivFreeAttrList (line 295) | void uiprivFreeAttrList(uiprivAttrList *alist)
  function uiprivAttrListInsertAttribute (line 309) | void uiprivAttrListInsertAttribute(uiprivAttrList *alist, uiAttribute *v...
  function uiprivAttrListInsertCharactersUnattributed (line 372) | void uiprivAttrListInsertCharactersUnattributed(uiprivAttrList *alist, s...
  function uiprivAttrListInsertCharactersExtendingAttributes (line 485) | void uiprivAttrListInsertCharactersExtendingAttributes(uiprivAttrList *a...
  function uiprivAttrListRemoveAttribute (line 501) | void uiprivAttrListRemoveAttribute(uiprivAttrList *alist, uiAttributeTyp...
  function uiprivAttrListRemoveAttributes (line 548) | void uiprivAttrListRemoveAttributes(uiprivAttrList *alist, size_t start,...
  function uiprivAttrListRemoveCharacters (line 592) | void uiprivAttrListRemoveCharacters(uiprivAttrList *alist, size_t start,...
  function uiprivAttrListForEach (line 601) | void uiprivAttrListForEach(const uiprivAttrList *alist, const uiAttribut...

FILE: common/attrstr.c
  type uiAttributedString (line 6) | struct uiAttributedString {
  function resize (line 24) | static void resize(uiAttributedString *s, size_t u8, size_t u16)
  function uiAttributedString (line 34) | uiAttributedString *uiNewAttributedString(const char *initialString)
  function recomputeGraphemes (line 45) | static void recomputeGraphemes(uiAttributedString *s)
  function invalidateGraphemes (line 56) | static void invalidateGraphemes(uiAttributedString *s)
  function uiFreeAttributedString (line 66) | void uiFreeAttributedString(uiAttributedString *s)
  function uiAttributedStringLen (line 82) | size_t uiAttributedStringLen(const uiAttributedString *s)
  function u8u16len (line 87) | static void u8u16len(const char *str, size_t *n8, size_t *n16)
  function uiAttributedStringAppendUnattributed (line 104) | void uiAttributedStringAppendUnattributed(uiAttributedString *s, const c...
  function onCodepointBoundary (line 110) | static int onCodepointBoundary(uiAttributedString *s, size_t at)
  function uiAttributedStringInsertAtUnattributed (line 122) | void uiAttributedStringInsertAtUnattributed(uiAttributedString *s, const...
  function uiAttributedStringDelete (line 225) | void uiAttributedStringDelete(uiAttributedString *s, size_t start, size_...
  function uiAttributedStringSetAttribute (line 282) | void uiAttributedStringSetAttribute(uiAttributedString *s, uiAttribute *...
  function uiAttributedStringForEachAttribute (line 288) | void uiAttributedStringForEachAttribute(const uiAttributedString *s, uiA...
  function uiAttributedStringNumGraphemes (line 294) | size_t uiAttributedStringNumGraphemes(uiAttributedString *s)
  function uiAttributedStringByteIndexToGrapheme (line 300) | size_t uiAttributedStringByteIndexToGrapheme(uiAttributedString *s, size...
  function uiAttributedStringGraphemeToByteIndex (line 308) | size_t uiAttributedStringGraphemeToByteIndex(uiAttributedString *s, size...
  function uiprivAttributedStringUTF16Len (line 324) | size_t uiprivAttributedStringUTF16Len(const uiAttributedString *s)
  function uiprivAttributedStringUTF8ToUTF16 (line 330) | size_t uiprivAttributedStringUTF8ToUTF16(const uiAttributedString *s, si...

FILE: common/attrstr.h
  type uiprivAttrList (line 16) | typedef struct uiprivAttrList uiprivAttrList;
  type uiprivGraphemes (line 35) | typedef struct uiprivGraphemes uiprivGraphemes;
  type uiprivGraphemes (line 36) | struct uiprivGraphemes {

FILE: common/control.c
  function uiControlDestroy (line 5) | void uiControlDestroy(uiControl *c)
  function uiControlHandle (line 10) | uintptr_t uiControlHandle(uiControl *c)
  function uiControl (line 15) | uiControl *uiControlParent(uiControl *c)
  function uiControlSetParent (line 20) | void uiControlSetParent(uiControl *c, uiControl *parent)
  function uiControlToplevel (line 25) | int uiControlToplevel(uiControl *c)
  function uiControlVisible (line 30) | int uiControlVisible(uiControl *c)
  function uiControlShow (line 35) | void uiControlShow(uiControl *c)
  function uiControlHide (line 40) | void uiControlHide(uiControl *c)
  function uiControlEnabled (line 45) | int uiControlEnabled(uiControl *c)
  function uiControlEnable (line 50) | void uiControlEnable(uiControl *c)
  function uiControlDisable (line 55) | void uiControlDisable(uiControl *c)
  function uiControl (line 62) | uiControl *uiAllocControl(size_t size, uint32_t OSsig, uint32_t typesig,...
  function uiFreeControl (line 73) | void uiFreeControl(uiControl *c)
  function uiControlVerifySetParent (line 80) | void uiControlVerifySetParent(uiControl *c, uiControl *parent)
  function uiControlEnabledToUser (line 93) | int uiControlEnabledToUser(uiControl *c)

FILE: common/debug.c
  function uiprivDoImplBug (line 5) | void uiprivDoImplBug(const char *file, const char *line, const char *fun...
  function uiprivDoUserBug (line 14) | void uiprivDoUserBug(const char *file, const char *line, const char *fun...

FILE: common/matrix.c
  function uiDrawMatrixSetIdentity (line 6) | void uiDrawMatrixSetIdentity(uiDrawMatrix *m)
  function uiprivFallbackSkew (line 21) | void uiprivFallbackSkew(uiDrawMatrix *m, double x, double y, double xamo...
  function uiprivScaleCenter (line 34) | void uiprivScaleCenter(double xCenter, double yCenter, double *x, double...
  function uiprivFallbackTransformSize (line 42) | void uiprivFallbackTransformSize(uiDrawMatrix *m, double *x, double *y)

FILE: common/opentype.c
  type feature (line 7) | struct feature {
  type uiOpenTypeFeatures (line 15) | struct uiOpenTypeFeatures {
  function uiOpenTypeFeatures (line 23) | uiOpenTypeFeatures *uiNewOpenTypeFeatures(void)
  function uiFreeOpenTypeFeatures (line 34) | void uiFreeOpenTypeFeatures(uiOpenTypeFeatures *otf)
  function uiOpenTypeFeatures (line 40) | uiOpenTypeFeatures *uiOpenTypeFeaturesClone(const uiOpenTypeFeatures *otf)
  function featurecmp (line 55) | static int featurecmp(const void *a, const void *b)
  function mkkey (line 69) | static struct feature mkkey(char a, char b, char c, char d)
  function uiOpenTypeFeaturesAdd (line 82) | void uiOpenTypeFeaturesAdd(uiOpenTypeFeatures *otf, char a, char b, char...
  function uiOpenTypeFeaturesRemove (line 111) | void uiOpenTypeFeaturesRemove(uiOpenTypeFeatures *otf, char a, char b, c...
  function uiOpenTypeFeaturesGet (line 129) | int uiOpenTypeFeaturesGet(const uiOpenTypeFeatures *otf, char a, char b,...
  function uiOpenTypeFeaturesForEach (line 142) | void uiOpenTypeFeaturesForEach(const uiOpenTypeFeatures *otf, uiOpenType...
  function uiprivOpenTypeFeaturesEqual (line 158) | int uiprivOpenTypeFeaturesEqual(const uiOpenTypeFeatures *a, const uiOpe...

FILE: common/shouldquit.c
  function defaultOnShouldQuit (line 5) | static int defaultOnShouldQuit(void *data)
  function uiOnShouldQuit (line 13) | void uiOnShouldQuit(int (*f)(void *), void *data)
  function uiprivShouldQuit (line 19) | int uiprivShouldQuit(void)

FILE: common/tablemodel.c
  function uiprivTableModelNumColumns (line 6) | int uiprivTableModelNumColumns(uiTableModel *m)
  function uiTableValueType (line 14) | uiTableValueType uiprivTableModelColumnType(uiTableModel *m, int column)
  function uiprivTableModelNumRows (line 22) | int uiprivTableModelNumRows(uiTableModel *m)
  function uiTableValue (line 30) | uiTableValue *uiprivTableModelCellValue(uiTableModel *m, int row, int co...
  function uiprivTableModelSetCellValue (line 38) | void uiprivTableModelSetCellValue(uiTableModel *m, int row, int column, ...
  function uiprivTableModelCellEditable (line 50) | int uiprivTableModelCellEditable(uiTableModel *m, int row, int column)
  function uiprivTableModelColorIfProvided (line 67) | int uiprivTableModelColorIfProvided(uiTableModel *m, int row, int column...

FILE: common/tablevalue.c
  type uiTableValue (line 6) | struct uiTableValue {
  function uiTableValue (line 21) | static uiTableValue *newTableValue(uiTableValueType type)
  function uiFreeTableValue (line 30) | void uiFreeTableValue(uiTableValue *v)
  function uiTableValueType (line 40) | uiTableValueType uiTableValueGetType(const uiTableValue *v)
  function uiTableValue (line 45) | uiTableValue *uiNewTableValueString(const char *str)
  function uiTableValue (line 60) | uiTableValue *uiNewTableValueImage(uiImage *img)
  function uiImage (line 69) | uiImage *uiTableValueImage(const uiTableValue *v)
  function uiTableValue (line 74) | uiTableValue *uiNewTableValueInt(int i)
  function uiTableValueInt (line 83) | int uiTableValueInt(const uiTableValue *v)
  function uiTableValue (line 88) | uiTableValue *uiNewTableValueColor(double r, double g, double b, double a)
  function uiTableValueColor (line 100) | void uiTableValueColor(const uiTableValue *v, double *r, double *g, doub...

FILE: common/uipriv.h
  type uiprivClickCounter (line 41) | typedef struct uiprivClickCounter uiprivClickCounter;
  type uiprivClickCounter (line 44) | struct uiprivClickCounter {

FILE: common/userbugs.c
  function uiUserBugCannotSetParentOnToplevel (line 5) | void uiUserBugCannotSetParentOnToplevel(const char *type)

FILE: common/utf.c
  function uiprivUTF8EncodeRune (line 13) | size_t uiprivUTF8EncodeRune(uint32_t rune, char *encoded)
  function uiprivUTF16EncodeRune (line 176) | size_t uiprivUTF16EncodeRune(uint32_t rune, uint16_t *encoded)
  function uiprivUTF8RuneCount (line 244) | size_t uiprivUTF8RuneCount(const char *s, size_t nElem)
  function uiprivUTF8UTF16Count (line 270) | size_t uiprivUTF8UTF16Count(const char *s, size_t nElem)
  function uiprivUTF16RuneCount (line 297) | size_t uiprivUTF16RuneCount(const uint16_t *s, size_t nElem)
  function uiprivUTF16UTF8Count (line 323) | size_t uiprivUTF16UTF8Count(const uint16_t *s, size_t nElem)

FILE: common/utf.h
  function uiprivUTF16EncodeRune (line 43) | inline size_t uiprivUTF16EncodeRune(uint32_t rune, wchar_t *encoded)
  function wchar_t (line 48) | inline const wchar_t *uiprivUTF16DecodeRune(const wchar_t *s, size_t nEl...
  function uiprivUTF16RuneCount (line 56) | inline size_t uiprivUTF16RuneCount(const wchar_t *s, size_t nElem)
  function uiprivUTF16UTF8Count (line 61) | inline size_t uiprivUTF16UTF8Count(const wchar_t *s, size_t nElem)
  function uiprivUTF16EncodeRune (line 80) | inline size_t uiprivUTF16EncodeRune(uint32_t rune, __wchar_t *encoded)
  function __wchar_t (line 85) | inline const __wchar_t *uiprivUTF16DecodeRune(const __wchar_t *s, size_t...
  function uiprivUTF16RuneCount (line 93) | inline size_t uiprivUTF16RuneCount(const __wchar_t *s, size_t nElem)
  function uiprivUTF16UTF8Count (line 98) | inline size_t uiprivUTF16UTF8Count(const __wchar_t *s, size_t nElem)

FILE: darwin/attrstr.h
  function interface (line 12) | interface uiprivFontStyleData : NSObject {
  function interface (line 81) | interface uiprivDrawTextBackgroundParams : NSObject {

FILE: darwin/draw.h
  type uiDrawContext (line 5) | struct uiDrawContext {

FILE: darwin/table.h
  type uiTableModel (line 7) | struct uiTableModel {
  type uiTable (line 12) | struct uiTable {

FILE: darwin/uipriv_darwin.h
  type uiprivMap (line 27) | typedef struct uiprivMap uiprivMap;
  function interface (line 37) | interface uiprivMenuManager : NSObject {
  type uiprivNextEventArgs (line 62) | typedef struct uiprivNextEventArgs uiprivNextEventArgs;
  type uiprivNextEventArgs (line 63) | struct uiprivNextEventArgs {
  type uiprivSingleChildConstraints (line 94) | typedef struct uiprivSingleChildConstraints uiprivSingleChildConstraints;
  type uiprivSingleChildConstraints (line 95) | struct uiprivSingleChildConstraints {
  type uiprivScrollViewCreateParams (line 127) | typedef struct uiprivScrollViewCreateParams uiprivScrollViewCreateParams;
  type uiprivScrollViewCreateParams (line 128) | struct uiprivScrollViewCreateParams {
  type uiprivScrollViewData (line 137) | typedef struct uiprivScrollViewData uiprivScrollViewData;

FILE: examples/controlgallery/main.c
  function onClosing (line 6) | static int onClosing(uiWindow *w, void *data)
  function onShouldQuit (line 12) | static int onShouldQuit(void *data)
  function uiControl (line 20) | static uiControl *makeBasicControlsPage(void)
  function onSpinboxChanged (line 86) | static void onSpinboxChanged(uiSpinbox *s, void *data)
  function onSliderChanged (line 92) | static void onSliderChanged(uiSlider *s, void *data)
  function uiControl (line 98) | static uiControl *makeNumbersPage()
  function onOpenFileClicked (line 164) | static void onOpenFileClicked(uiButton *b, void *data)
  function onSaveFileClicked (line 178) | static void onSaveFileClicked(uiButton *b, void *data)
  function onMsgBoxClicked (line 192) | static void onMsgBoxClicked(uiButton *b, void *data)
  function onMsgBoxErrorClicked (line 199) | static void onMsgBoxErrorClicked(uiButton *b, void *data)
  function uiControl (line 206) | static uiControl *makeDataChoosersPage(void)
  function main (line 293) | int main(void)
  function openClicked (line 331) | static void openClicked(uiMenuItem *item, uiWindow *w, void *data)
  function saveClicked (line 344) | static void saveClicked(uiMenuItem *item, uiWindow *w, void *data)
  function update (line 361) | static void update(int value)
  function onSpinboxChanged (line 368) | static void onSpinboxChanged(uiSpinbox *s, void *data)
  function onSliderChanged (line 373) | static void onSliderChanged(uiSlider *s, void *data)
  function main (line 378) | int main(void)

FILE: examples/cpp-multithread/main.cpp
  function sayTime (line 18) | void sayTime(void *data)
  function threadproc (line 26) | void threadproc(void)
  function onClosing (line 42) | int onClosing(uiWindow *w, void *data)
  function saySomething (line 52) | void saySomething(uiButton *b, void *data)
  function main (line 57) | int main(void)

FILE: examples/datetime/main.c
  function onChanged (line 24) | void onChanged(uiDateTimePicker *d, void *data)
  function onClicked (line 34) | void onClicked(uiButton *b, void *data)
  function onClosing (line 53) | int onClosing(uiWindow *w, void *data)
  function main (line 59) | int main(void)

FILE: examples/drawtext/main.c
  function appendWithAttribute (line 14) | static void appendWithAttribute(const char *what, uiAttribute *attr, uiA...
  function makeAttributedString (line 26) | static void makeAttributedString(void)
  function handlerDraw (line 95) | static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams...
  function handlerMouseEvent (line 112) | static void handlerMouseEvent(uiAreaHandler *a, uiArea *area, uiAreaMous...
  function handlerMouseCrossed (line 117) | static void handlerMouseCrossed(uiAreaHandler *ah, uiArea *a, int left)
  function handlerDragBroken (line 122) | static void handlerDragBroken(uiAreaHandler *ah, uiArea *a)
  function handlerKeyEvent (line 127) | static int handlerKeyEvent(uiAreaHandler *ah, uiArea *a, uiAreaKeyEvent *e)
  function onFontChanged (line 133) | static void onFontChanged(uiFontButton *b, void *data)
  function onComboboxSelected (line 138) | static void onComboboxSelected(uiCombobox *b, void *data)
  function onClosing (line 143) | static int onClosing(uiWindow *w, void *data)
  function shouldQuit (line 150) | static int shouldQuit(void *data)
  function main (line 156) | int main(void)

FILE: examples/histogram/main.c
  function setSolidBrush (line 23) | static void setSolidBrush(uiDrawBrush *brush, uint32_t color, double alpha)
  function pointLocations (line 43) | static void pointLocations(double width, double height, double *xs, doub...
  function uiDrawPath (line 61) | static uiDrawPath *constructGraph(double width, double height, int extend)
  function graphSize (line 85) | static void graphSize(double clientWidth, double clientHeight, double *g...
  function handlerDraw (line 91) | static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams...
  function inPoint (line 177) | static int inPoint(double x, double y, double xtest, double ytest)
  function handlerMouseEvent (line 188) | static void handlerMouseEvent(uiAreaHandler *a, uiArea *area, uiAreaMous...
  function handlerMouseCrossed (line 208) | static void handlerMouseCrossed(uiAreaHandler *ah, uiArea *a, int left)
  function handlerDragBroken (line 213) | static void handlerDragBroken(uiAreaHandler *ah, uiArea *a)
  function handlerKeyEvent (line 218) | static int handlerKeyEvent(uiAreaHandler *ah, uiArea *a, uiAreaKeyEvent *e)
  function onDatapointChanged (line 224) | static void onDatapointChanged(uiSpinbox *s, void *data)
  function onColorChanged (line 229) | static void onColorChanged(uiColorButton *b, void *data)
  function onClosing (line 234) | static int onClosing(uiWindow *w, void *data)
  function shouldQuit (line 241) | static int shouldQuit(void *data)
  function main (line 247) | int main(void)

FILE: examples/timer/main.c
  function sayTime (line 8) | int sayTime(void *data)
  function onClosing (line 20) | int onClosing(uiWindow *w, void *data)
  function saySomething (line 26) | void saySomething(uiButton *b, void *data)
  function main (line 31) | int main(void)

FILE: test/OLD_page16.c
  function modelNumColumns (line 6) | static int modelNumColumns(uiTableModelHandler *mh, uiTableModel *m)
  function uiTableModelColumnType (line 11) | static uiTableModelColumnType modelColumnType(uiTableModelHandler *mh, u...
  function modelNumRows (line 22) | static int modelNumRows(uiTableModelHandler *mh, uiTableModel *m)
  function modelSetCellValue (line 84) | static void modelSetCellValue(uiTableModelHandler *mh, uiTableModel *m, ...
  function uiBox (line 94) | uiBox *makePage16(void)

FILE: test/drawtests.c
  type drawtest (line 9) | struct drawtest {
  function drawOriginal (line 15) | static void drawOriginal(uiAreaDrawParams *p)
  function drawArcs (line 145) | static void drawArcs(uiAreaDrawParams *p)
  function d2dColorToRGB (line 265) | static void d2dColorToRGB(uint32_t color, double *r, double *g, double *b)
  function d2dSolidBrush (line 286) | static void d2dSolidBrush(uiDrawBrush *brush, uint32_t color, double alpha)
  function d2dClear (line 293) | static void d2dClear(uiAreaDrawParams *p, uint32_t color, double alpha)
  function drawD2DW8QS (line 308) | static void drawD2DW8QS(uiAreaDrawParams *p)
  function drawD2DSimpleApp (line 326) | static void drawD2DSimpleApp(uiAreaDrawParams *p)
  function drawD2DSolidBrush (line 399) | static void drawD2DSolidBrush(uiAreaDrawParams *p)
  function drawD2DLinearBrush (line 430) | static void drawD2DLinearBrush(uiAreaDrawParams *p)
  function drawD2DRadialBrush (line 481) | static void drawD2DRadialBrush(uiAreaDrawParams *p)
  function drawD2DPathGeometries (line 542) | static void drawD2DPathGeometries(uiAreaDrawParams *p)
  function drawD2DGeometryGroup (line 717) | static void drawD2DGeometryGroup(uiAreaDrawParams *p)
  function drawD2DRotate (line 811) | static void drawD2DRotate(uiAreaDrawParams *p)
  function drawD2DScale (line 882) | static void drawD2DScale(uiAreaDrawParams *p)
  function drawD2DSkew (line 954) | void drawD2DSkew(uiAreaDrawParams *p)
  function drawD2DTranslate (line 1025) | static void drawD2DTranslate(uiAreaDrawParams *p)
  function drawD2DMultiTransforms (line 1074) | static void drawD2DMultiTransforms(uiAreaDrawParams *p)
  function drawD2DComplexShape (line 1162) | static void drawD2DComplexShape(uiAreaDrawParams *p)
  function crsourcergba (line 1245) | static void crsourcergba(uiDrawBrush *brush, double r, double g, double ...
  function drawCSArc (line 1255) | static void drawCSArc(uiAreaDrawParams *p)
  function drawCSArcNegative (line 1318) | static void drawCSArcNegative(uiAreaDrawParams *p)
  function drawCSClip (line 1381) | static void drawCSClip(uiAreaDrawParams *p)
  function drawCSCurveRectangle (line 1427) | static void drawCSCurveRectangle(uiAreaDrawParams *p)
  function drawCSCurveTo (line 1503) | static void drawCSCurveTo(uiAreaDrawParams *p)
  function drawCSDash (line 1543) | static void drawCSDash(uiAreaDrawParams *p)
  function drawCSFillAndStroke2 (line 1582) | static void drawCSFillAndStroke2(uiAreaDrawParams *p)
  function drawCSFillStyle (line 1621) | static void drawCSFillStyle(uiAreaDrawParams *p)
  function drawCSMultiCaps (line 1690) | static void drawCSMultiCaps(uiAreaDrawParams *p)
  function drawCSRoundRect (line 1722) | static void drawCSRoundRect(uiAreaDrawParams *p)
  function drawCSSetLineCap (line 1784) | static void drawCSSetLineCap(uiAreaDrawParams *p)
  function drawCSSetLineJoin (line 1841) | static void drawCSSetLineJoin(uiAreaDrawParams *p)
  function cgaddrect (line 1892) | static void cgaddrect(uiDrawPath *path, uiAreaDrawParams *p, double x, d...
  function drawQ2DCreateWindowGC (line 1900) | static void drawQ2DCreateWindowGC(uiAreaDrawParams *p)
  type drawtest (line 1936) | struct drawtest
  function runDrawTest (line 1968) | void runDrawTest(int n, uiAreaDrawParams *p)
  function populateComboboxWithTests (line 1973) | void populateComboboxWithTests(uiCombobox *c)

FILE: test/images.c
  function appendImageNamed (line 669) | void appendImageNamed(uiImage *img, const char *name)

FILE: test/images/gen.go
  type img (line 12) | type img struct
  function main (line 20) | func main() {

FILE: test/main.c
  function die (line 7) | void die(const char *fmt, ...)
  function onClosing (line 19) | int onClosing(uiWindow *w, void *data)
  function onShouldQuit (line 26) | int onShouldQuit(void *data)
  function main (line 42) | int main(int argc, char *argv[])

FILE: test/menus.c
  function enableItemTest (line 30) | static void enableItemTest(uiMenuItem *item, uiWindow *w, void *data)
  function forceOn (line 38) | static void forceOn(uiMenuItem *item, uiWindow *w, void *data)
  function forceOff (line 43) | static void forceOff(uiMenuItem *item, uiWindow *w, void *data)
  function whatWindow (line 48) | static void whatWindow(uiMenuItem *item, uiWindow *w, void *data)
  function initMenus (line 53) | void initMenus(void)

FILE: test/page1.c
  function onChanged (line 28) | static void onChanged(uiEntry *e, void *data)
  function toggleSpaced (line 33) | static void toggleSpaced(uiCheckbox *c, void *data)
  function forceSpaced (line 38) | static void forceSpaced(uiButton *b, void *data)
  function showSpaced (line 43) | static void showSpaced(uiButton *b, void *data)
  function makePage1 (line 63) | void makePage1(uiWindow *w)

FILE: test/page10.c
  function entryDouble (line 13) | static double entryDouble(uiEntry *e)
  function handlerDraw (line 24) | static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams...
  function handlerMouseEvent (line 95) | static void handlerMouseEvent(uiAreaHandler *a, uiArea *area, uiAreaMous...
  function handlerMouseCrossed (line 100) | static void handlerMouseCrossed(uiAreaHandler *ah, uiArea *a, int left)
  function handlerDragBroken (line 105) | static void handlerDragBroken(uiAreaHandler *ah, uiArea *a)
  function handlerKeyEvent (line 110) | static int handlerKeyEvent(uiAreaHandler *ah, uiArea *a, uiAreaKeyEvent *e)
  function onFontChanged (line 116) | static void onFontChanged(uiFontButton *b, void *data)
  function onColorChanged (line 121) | static void onColorChanged(uiColorButton *b, void *data)
  function onNoZ (line 126) | static void onNoZ(uiCheckbox *b, void *data)
  function uiBox (line 131) | uiBox *makePage10(void)

FILE: test/page11.c
  function uiGroup (line 7) | static uiGroup *newg(const char *n, int s)
  function uiTab (line 17) | static uiTab *newt(int tt)
  function uiBox (line 27) | uiBox *makePage11(void)

FILE: test/page12.c
  function meChanged (line 6) | static void meChanged(uiMultilineEntry *e, void *data)
  function setClicked (line 11) | static void setClicked(uiButton *b, void *data)
  function appendClicked (line 16) | static void appendClicked(uiButton *b, void *data)
  function uiBox (line 21) | static uiBox *half(uiMultilineEntry *(*mk)(void), const char *which)
  function uiBox (line 47) | uiBox *makePage12(void)

FILE: test/page13.c
  function winClose (line 4) | static int winClose(uiWindow *w, void *data)
  function openTestWindow (line 9) | static void openTestWindow(uiBox *(*mkf)(void))
  function buttonClicked (line 55) | static void buttonClicked(uiButton *b, void *data)
  function entryChanged (line 60) | static void entryChanged(uiEntry *e, void *data)
  function showHide (line 69) | static void showHide(uiButton *b, void *data)
  function setIndeterminate (line 79) | static void setIndeterminate(uiButton *b, void *data)
  function deleteFirst (line 92) | static void deleteFirst(uiButton *b, void *data)
  function uiBox (line 99) | uiBox *makePage13(void)

FILE: test/page14.c
  function uiControl (line 35) | static uiControl *testControl(const char *label, int color)
  function uiControl (line 44) | static uiControl *simpleGrid(void)
  function uiControl (line 72) | static uiControl *boxComparison(void)
  function uiControl (line 115) | static uiControl *emptyLine(void)
  function uiControl (line 135) | static uiControl *emptyGrid(void)
  function uiControl (line 151) | static uiControl *spanningGrid(void)
  function onHideOne (line 186) | static void onHideOne(uiButton *b, void *data)
  function onShowOne (line 191) | static void onShowOne(uiButton *b, void *data)
  function onHideAll (line 196) | static void onHideAll(uiButton *b, void *data)
  function onShowAll (line 203) | static void onShowAll(uiButton *b, void *data)
  function AT (line 217) | AT(Leading)
  function uiTab (line 337) | uiTab *makePage14(void)

FILE: test/page15.c
  type trect (line 8) | struct trect {
  type tareas (line 18) | struct tareas {
  function filltareas (line 32) | static void filltareas(double awid, double aht, struct tareas *ta)
  function drawtrect (line 47) | static void drawtrect(uiDrawContext *c, struct trect tr, double r, doubl...
  function handlerDraw (line 74) | static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams...
  function handlerMouseEvent (line 94) | static void handlerMouseEvent(uiAreaHandler *a, uiArea *area, uiAreaMous...
  function handlerMouseCrossed (line 124) | static void handlerMouseCrossed(uiAreaHandler *ah, uiArea *a, int left)
  function handlerDragBroken (line 128) | static void handlerDragBroken(uiAreaHandler *ah, uiArea *a)
  function handlerKeyEvent (line 132) | static int handlerKeyEvent(uiAreaHandler *ah, uiArea *a, uiAreaKeyEvent *e)
  function borderWindowOpen (line 137) | static void borderWindowOpen(uiButton *b, void *data)
  function sizeWidth (line 168) | static void sizeWidth(uiSpinbox *s, void *data)
  function sizeHeight (line 178) | static void sizeHeight(uiSpinbox *s, void *data)
  function updatesize (line 188) | static void updatesize(uiWindow *w)
  function onSize (line 199) | void onSize(uiWindow *w, void *data)
  function setFullscreen (line 205) | void setFullscreen(uiCheckbox *cb, void *data)
  function borderless (line 213) | static void borderless(uiCheckbox *c, void *data)
  function uiBox (line 220) | uiBox *makePage15(uiWindow *w)

FILE: test/page16.c
  function modelNumColumns (line 6) | static int modelNumColumns(uiTableModelHandler *mh, uiTableModel *m)
  function uiTableValueType (line 11) | static uiTableValueType modelColumnType(uiTableModelHandler *mh, uiTable...
  function modelNumRows (line 22) | static int modelNumRows(uiTableModelHandler *mh, uiTableModel *m)
  function uiTableValue (line 32) | static uiTableValue *modelCellValue(uiTableModelHandler *mh, uiTableMode...
  function modelSetCellValue (line 84) | static void modelSetCellValue(uiTableModelHandler *mh, uiTableModel *m, ...
  function uiBox (line 103) | uiBox *makePage16(void)
  function freePage16 (line 158) | void freePage16(void)

FILE: test/page2.c
  function moveLabel (line 10) | static void moveLabel(uiButton *b, void *data)
  function movePage1 (line 27) | static void movePage1(uiButton *b, void *data)
  function openAnotherWindow (line 42) | static void openAnotherWindow(uiButton *bb, void *data)
  function openAnotherDisabledWindow (line 60) | static void openAnotherDisabledWindow(uiButton *b, void *data)
  function echoReadOnlyText (line 78) | static void echoReadOnlyText(uiEntry *e, void *data)
  function uiBox (line 87) | uiBox *makePage2(void)

FILE: test/page3.c
  function uiBox (line 4) | static uiBox *makeSet(int omit, int hidden, int stretch)
  function uiBox (line 34) | uiBox *makePage3(void)

FILE: test/page4.c
  function appendCBRB (line 35) | static void appendCBRB(uiButton *b, void *data)
  function onCBChanged (line 42) | static void onCBChanged(uiCombobox *c, void *data)
  function onECBChanged (line 50) | static void onECBChanged(uiEditableCombobox *c, void *data)
  function onRBSelected (line 61) | static void onRBSelected(uiRadioButtons *r, void *data)
  function selectSecond (line 66) | static void selectSecond(uiButton *b, void *data)
  function selectNone (line 72) | static void selectNone(uiButton *b, void *data)
  function uiBox (line 78) | uiBox *makePage4(void)

FILE: test/page5.c
  function openFile (line 6) | static void openFile(uiButton *b, void *data)
  function saveFile (line 19) | static void saveFile(uiButton *b, void *data)
  function msgBox (line 34) | static void msgBox(uiButton *b, void *data)
  function msgBoxError (line 45) | static void msgBoxError(uiButton *b, void *data)
  function uiBox (line 56) | uiBox *makePage5(uiWindow *pw)

FILE: test/page6.c
  type handler (line 9) | struct handler {
  type handler (line 13) | struct handler
  function handlerDraw (line 15) | static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams...
  function handlerMouseEvent (line 20) | static void handlerMouseEvent(uiAreaHandler *a, uiArea *area, uiAreaMous...
  function handlerMouseCrossed (line 34) | static void handlerMouseCrossed(uiAreaHandler *ah, uiArea *a, int left)
  function handlerDragBroken (line 39) | static void handlerDragBroken(uiAreaHandler *ah, uiArea *a)
  function handlerKeyEvent (line 44) | static int handlerKeyEvent(uiAreaHandler *ah, uiArea *a, uiAreaKeyEvent *e)
  function shouldntHappen (line 65) | static void shouldntHappen(uiCombobox *c, void *data)
  function redraw (line 70) | static void redraw(uiCombobox *c, void *data)
  function enableArea (line 75) | static void enableArea(uiButton *b, void *data)
  function uiBox (line 83) | uiBox *makePage6(void)

FILE: test/page7.c
  function uiBox (line 4) | uiBox *makePage7(void)

FILE: test/page7a.c
  type handler (line 10) | struct handler {
  type handler (line 14) | struct handler
  function handlerDraw (line 17) | static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams...
  function handlerMouseEvent (line 65) | static void handlerMouseEvent(uiAreaHandler *a, uiArea *area, uiAreaMous...
  function handlerMouseCrossed (line 70) | static void handlerMouseCrossed(uiAreaHandler *ah, uiArea *a, int left)
  function handlerDragBroken (line 75) | static void handlerDragBroken(uiAreaHandler *ah, uiArea *a)
  function handlerKeyEvent (line 80) | static int handlerKeyEvent(uiAreaHandler *ah, uiArea *a, uiAreaKeyEvent *e)
  function entryChanged (line 85) | static void entryChanged(uiEntry *e, void *data)
  function checkboxToggled (line 90) | static void checkboxToggled(uiCheckbox *c, void *data)
  function uiGroup (line 95) | uiGroup *makePage7a(void)

FILE: test/page7b.c
  type handler (line 7) | struct handler {
  type handler (line 11) | struct handler
  function handlerDraw (line 13) | static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams...
  function handlerMouseEvent (line 18) | static void handlerMouseEvent(uiAreaHandler *a, uiArea *area, uiAreaMous...
  function handlerMouseCrossed (line 28) | static void handlerMouseCrossed(uiAreaHandler *ah, uiArea *a, int left)
  function handlerDragBroken (line 34) | static void handlerDragBroken(uiAreaHandler *ah, uiArea *a)
  function handlerKeyEvent (line 39) | static int handlerKeyEvent(uiAreaHandler *ah, uiArea *a, uiAreaKeyEvent *e)
  function uiGroup (line 48) | uiGroup *makePage7b(void)

FILE: test/page7c.c
  type handler (line 6) | struct handler {
  type handler (line 10) | struct handler
  function handlerDraw (line 17) | static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams...
  function handlerMouseEvent (line 92) | static void handlerMouseEvent(uiAreaHandler *a, uiArea *area, uiAreaMous...
  function handlerMouseCrossed (line 97) | static void handlerMouseCrossed(uiAreaHandler *ah, uiArea *a, int left)
  function handlerDragBroken (line 102) | static void handlerDragBroken(uiAreaHandler *ah, uiArea *a)
  function handlerKeyEvent (line 107) | static int handlerKeyEvent(uiAreaHandler *ah, uiArea *a, uiAreaKeyEvent *e)
  function uiGroup (line 116) | uiGroup *makePage7c(void)

FILE: test/page8.c
  function onListFonts (line 4) | static void onListFonts(uiButton *b, void *data)
  function uiBox (line 22) | uiBox *makePage8(void)

FILE: test/page9.c
  function entryDouble (line 17) | static double entryDouble(uiEntry *e)
  function drawGuides (line 28) | static void drawGuides(uiDrawContext *c, uiDrawTextFontMetrics *m)
  function handlerDraw (line 116) | static void handlerDraw(uiAreaHandler *a, uiArea *area, uiAreaDrawParams...
  function handlerMouseEvent (line 170) | static void handlerMouseEvent(uiAreaHandler *a, uiArea *area, uiAreaMous...
  function handlerMouseCrossed (line 175) | static void handlerMouseCrossed(uiAreaHandler *ah, uiArea *a, int left)
  function handlerDragBroken (line 180) | static void handlerDragBroken(uiAreaHandler *ah, uiArea *a)
  function handlerKeyEvent (line 185) | static int handlerKeyEvent(uiAreaHandler *ah, uiArea *a, uiAreaKeyEvent *e)
  function onTextApply (line 191) | static void onTextApply(uiButton *b, void *data)
  function uiBox (line 196) | uiBox *makePage9(void)

FILE: test/spaced.c
  type thing (line 4) | struct thing {
  type thing (line 9) | struct thing
  type thing (line 19) | struct thing
  type thing (line 19) | struct thing
  type types (line 29) | enum types {
  function setSpaced (line 38) | void setSpaced(int spaced)
  function querySpaced (line 71) | void querySpaced(char out[12])		// more than enough
  function uiWindow (line 116) | uiWindow *newWindow(const char *title, int width, int height, int hasMen...
  function uiBox (line 125) | uiBox *newHorizontalBox(void)
  function uiBox (line 134) | uiBox *newVerticalBox(void)
  function uiTab (line 143) | uiTab *newTab(void)
  function uiGroup (line 152) | uiGroup *newGroup(const char *text)
  function uiForm (line 161) | uiForm *newForm(void)
  function uiGrid (line 170) | uiGrid *newGrid(void)

FILE: ui.h
  type uiInitOptions (line 48) | typedef struct uiInitOptions uiInitOptions;
  type uiInitOptions (line 50) | struct uiInitOptions {
  type uiControl (line 77) | typedef struct uiControl uiControl;
  type uiControl (line 79) | struct uiControl {
  type uiWindow (line 118) | typedef struct uiWindow uiWindow;
  type uiButton (line 135) | typedef struct uiButton uiButton;
  type uiBox (line 142) | typedef struct uiBox uiBox;
  type uiCheckbox (line 151) | typedef struct uiCheckbox uiCheckbox;
  type uiEntry (line 160) | typedef struct uiEntry uiEntry;
  type uiLabel (line 171) | typedef struct uiLabel uiLabel;
  type uiTab (line 177) | typedef struct uiTab uiTab;
  type uiGroup (line 187) | typedef struct uiGroup uiGroup;
  type uiSpinbox (line 201) | typedef struct uiSpinbox uiSpinbox;
  type uiSlider (line 208) | typedef struct uiSlider uiSlider;
  type uiProgressBar (line 215) | typedef struct uiProgressBar uiProgressBar;
  type uiSeparator (line 221) | typedef struct uiSeparator uiSeparator;
  type uiCombobox (line 226) | typedef struct uiCombobox uiCombobox;
  type uiEditableCombobox (line 234) | typedef struct uiEditableCombobox uiEditableCombobox;
  type uiRadioButtons (line 243) | typedef struct uiRadioButtons uiRadioButtons;
  type tm (line 251) | struct tm
  type uiDateTimePicker (line 252) | typedef struct uiDateTimePicker uiDateTimePicker;
  type tm (line 258) | struct tm
  type tm (line 259) | struct tm
  type uiMultilineEntry (line 266) | typedef struct uiMultilineEntry uiMultilineEntry;
  type uiMenuItem (line 277) | typedef struct uiMenuItem uiMenuItem;
  type uiMenu (line 285) | typedef struct uiMenu uiMenu;
  type uiArea (line 300) | typedef struct uiArea uiArea;
  type uiAreaHandler (line 301) | typedef struct uiAreaHandler uiAreaHandler;
  type uiAreaDrawParams (line 302) | typedef struct uiAreaDrawParams uiAreaDrawParams;
  type uiAreaMouseEvent (line 303) | typedef struct uiAreaMouseEvent uiAreaMouseEvent;
  type uiAreaKeyEvent (line 304) | typedef struct uiAreaKeyEvent uiAreaKeyEvent;
  type uiDrawContext (line 306) | typedef struct uiDrawContext uiDrawContext;
  type uiAreaHandler (line 308) | struct uiAreaHandler {
  type uiAreaDrawParams (line 352) | struct uiAreaDrawParams {
  type uiDrawPath (line 365) | typedef struct uiDrawPath uiDrawPath;
  type uiDrawBrush (line 366) | typedef struct uiDrawBrush uiDrawBrush;
  type uiDrawStrokeParams (line 367) | typedef struct uiDrawStrokeParams uiDrawStrokeParams;
  type uiDrawMatrix (line 368) | typedef struct uiDrawMatrix uiDrawMatrix;
  type uiDrawBrushGradientStop (line 370) | typedef struct uiDrawBrushGradientStop uiDrawBrushGradientStop;
  type uiDrawMatrix (line 401) | struct uiDrawMatrix {
  type uiDrawBrush (line 410) | struct uiDrawBrush {
  type uiDrawBrushGradientStop (line 438) | struct uiDrawBrushGradientStop {
  type uiDrawStrokeParams (line 446) | struct uiDrawStrokeParams {
  type uiAttribute (line 516) | typedef struct uiAttribute uiAttribute;
  type uiOpenTypeFeatures (line 742) | typedef struct uiOpenTypeFeatures uiOpenTypeFeatures;
  type uiForEach (line 748) | typedef uiForEach (*uiOpenTypeFeaturesForEachFunc)(const uiOpenTypeFeatu...
  type uiAttributedString (line 841) | typedef struct uiAttributedString uiAttributedString;
  type uiForEach (line 847) | typedef uiForEach (*uiAttributedStringForEachAttributeFunc)(const uiAttr...
  type uiFontDescriptor (line 915) | typedef struct uiFontDescriptor uiFontDescriptor;
  type uiFontDescriptor (line 917) | struct uiFontDescriptor {
  type uiDrawTextLayout (line 937) | typedef struct uiDrawTextLayout uiDrawTextLayout;
  type uiDrawTextLayoutParams (line 952) | typedef struct uiDrawTextLayoutParams uiDrawTextLayoutParams;
  type uiDrawTextLayoutParams (line 955) | struct uiDrawTextLayoutParams {
  type uiFontButton (line 997) | typedef struct uiFontButton uiFontButton;
  type uiAreaMouseEvent (line 1022) | struct uiAreaMouseEvent {
  type uiAreaKeyEvent (line 1083) | struct uiAreaKeyEvent {
  type uiColorButton (line 1093) | typedef struct uiColorButton uiColorButton;
  type uiForm (line 1100) | typedef struct uiForm uiForm;
  type uiGrid (line 1122) | typedef struct uiGrid uiGrid;
  type uiImage (line 1150) | typedef struct uiImage uiImage;
  type uiTableValue (line 1183) | typedef struct uiTableValue uiTableValue;
  type uiTableModel (line 1274) | typedef struct uiTableModel uiTableModel;
  type uiTableModelHandler (line 1279) | typedef struct uiTableModelHandler uiTableModelHandler;
  type uiTableModelHandler (line 1282) | struct uiTableModelHandler {
  type uiTableTextColumnOptionalParams (line 1359) | typedef struct uiTableTextColumnOptionalParams uiTableTextColumnOptional...
  type uiTableParams (line 1362) | typedef struct uiTableParams uiTableParams;
  type uiTableTextColumnOptionalParams (line 1364) | struct uiTableTextColumnOptionalParams {
  type uiTableParams (line 1374) | struct uiTableParams {
  type uiTable (line 1390) | typedef struct uiTable uiTable;

FILE: ui_darwin.h
  type uiDarwinControl (line 14) | typedef struct uiDarwinControl uiDarwinControl;
  type uiDarwinControl (line 15) | struct uiDarwinControl {

FILE: ui_unix.h
  type uiUnixControl (line 14) | typedef struct uiUnixControl uiUnixControl;
  type uiUnixControl (line 15) | struct uiUnixControl {

FILE: ui_windows.h
  type uiWindowsSizing (line 14) | typedef struct uiWindowsSizing uiWindowsSizing;
  type uiWindowsControl (line 16) | typedef struct uiWindowsControl uiWindowsControl;
  type uiWindowsControl (line 17) | struct uiWindowsControl {
  type uiWindowsSizing (line 237) | typedef struct uiWindowsSizing uiWindowsSizing;
  type uiWindowsSizing (line 238) | struct uiWindowsSizing {

FILE: unix/OLD_table.c
  function uiTableModel (line 20) | uiTableModel *uiNewTableModel(uiTableModelHandler *mh)
  function uiFreeTableModel (line 29) | void uiFreeTableModel(uiTableModel *m)
  function uiTableModelRowInserted (line 34) | void uiTableModelRowInserted(uiTableModel *m, int newIndex)
  function uiTableModelRowChanged (line 46) | void uiTableModelRowChanged(uiTableModel *m, int index)
  function uiTableModelRowDeleted (line 58) | void uiTableModelRowDeleted(uiTableModel *m, int oldIndex)
  type tablePart (line 75) | struct tablePart {
  type uiTableColumn (line 85) | struct uiTableColumn {
  type uiTable (line 91) | struct uiTable {
  function setImageSize (line 107) | static void setImageSize(GtkCellRenderer *r)
  function applyColor (line 122) | static void applyColor(GtkTreeModel *mm, GtkTreeIter *iter, int modelCol...
  function dataFunc (line 136) | static void dataFunc(GtkTreeViewColumn *c, GtkCellRenderer *r, GtkTreeMo...
  function onEdited (line 191) | static void onEdited(struct tablePart *part, int column, const char *pat...
  function appendPart (line 206) | static void appendPart(uiTableColumn *c, struct tablePart *part, GtkCell...
  function textEdited (line 214) | static void textEdited(GtkCellRendererText *renderer, gchar *path, gchar...
  function uiTableColumnAppendTextPart (line 221) | void uiTableColumnAppendTextPart(uiTableColumn *c, int modelColumn, int ...
  function uiTableColumnAppendImagePart (line 239) | void uiTableColumnAppendImagePart(uiTableColumn *c, int modelColumn, int...
  function buttonClicked (line 253) | static void buttonClicked(GtkCellRenderer *r, gchar *pathstr, gpointer d...
  function uiTableColumnAppendButtonPart (line 260) | void uiTableColumnAppendButtonPart(uiTableColumn *c, int modelColumn, in...
  function checkboxToggled (line 278) | static void checkboxToggled(GtkCellRendererToggle *r, gchar *pathstr, gp...
  function uiTableColumnAppendCheckboxPart (line 296) | void uiTableColumnAppendCheckboxPart(uiTableColumn *c, int modelColumn, ...
  function uiTableColumnAppendProgressBarPart (line 313) | void uiTableColumnAppendProgressBarPart(uiTableColumn *c, int modelColum...
  function uiTableColumnPartSetEditable (line 326) | void uiTableColumnPartSetEditable(uiTableColumn *c, int part, int editable)
  function uiTableColumnPartSetTextColor (line 343) | void uiTableColumnPartSetTextColor(uiTableColumn *c, int part, int model...
  function uiTableDestroy (line 352) | uiUnixControlAllDefaultsExceptDestroy(uiTable)
  function uiTableColumn (line 363) | uiTableColumn *uiTableAppendColumn(uiTable *t, const char *name)
  function uiTableSetRowBackgroundColorModelColumn (line 377) | void uiTableSetRowBackgroundColorModelColumn(uiTable *t, int modelColumn)
  function uiTable (line 383) | uiTable *uiNewTable(uiTableModel *model)

FILE: unix/alloc.c
  function uiprivInitAlloc (line 16) | void uiprivInitAlloc(void)
  function uninitComplain (line 21) | static void uninitComplain(gpointer ptr, gpointer data)
  function uiprivUninitAlloc (line 33) | void uiprivUninitAlloc(void)
  function uiprivFree (line 76) | void uiprivFree(void *p)

FILE: unix/area.c
  type areaWidget (line 13) | typedef struct areaWidget areaWidget;
  type areaWidgetClass (line 14) | typedef struct areaWidgetClass areaWidgetClass;
  type areaWidget (line 16) | struct areaWidget {
  type areaWidgetClass (line 25) | struct areaWidgetClass {
  type uiArea (line 29) | struct uiArea {
  function areaWidget_init (line 56) | static void areaWidget_init(areaWidget *aw)
  function areaWidget_dispose (line 74) | static void areaWidget_dispose(GObject *obj)
  function areaWidget_finalize (line 79) | static void areaWidget_finalize(GObject *obj)
  function areaWidget_size_allocate (line 84) | static void areaWidget_size_allocate(GtkWidget *w, GtkAllocation *alloca...
  function loadAreaSize (line 101) | static void loadAreaSize(uiArea *a, double *width, double *height)
  function gboolean (line 118) | static gboolean areaWidget_draw(GtkWidget *w, cairo_t *cr)
  function areaWidget_get_preferred_height (line 147) | static void areaWidget_get_preferred_height(GtkWidget *w, gint *min, gin...
  function areaWidget_get_preferred_width (line 160) | static void areaWidget_get_preferred_width(GtkWidget *w, gint *min, gint...
  function guint (line 173) | static guint translateModifiers(guint state, GdkWindow *window)
  function uiModifiers (line 185) | static uiModifiers toModifiers(guint state)
  function finishMouseEvent (line 204) | static void finishMouseEvent(uiArea *a, uiAreaMouseEvent *me, guint mb, ...
  function gboolean (line 240) | static gboolean areaWidget_button_press_event(GtkWidget *w, GdkEventButt...
  function gboolean (line 279) | static gboolean areaWidget_button_release_event(GtkWidget *w, GdkEventBu...
  function gboolean (line 292) | static gboolean areaWidget_motion_notify_event(GtkWidget *w, GdkEventMot...
  function gboolean (line 307) | static gboolean onCrossing(areaWidget *aw, int left)
  function gboolean (line 316) | static gboolean areaWidget_enter_notify_event(GtkWidget *w, GdkEventCros...
  function gboolean (line 321) | static gboolean areaWidget_leave_notify_event(GtkWidget *w, GdkEventCros...
  function areaKeyEvent (line 385) | static int areaKeyEvent(uiArea *a, int up, GdkEventKey *e)
  function gboolean (line 424) | static gboolean areaWidget_key_press_event(GtkWidget *w, GdkEventKey *e)
  function gboolean (line 434) | static gboolean areaWidget_key_release_event(GtkWidget *w, GdkEventKey *e)
  function areaWidget_set_property (line 451) | static void areaWidget_set_property(GObject *obj, guint prop, const GVal...
  function areaWidget_get_property (line 464) | static void areaWidget_get_property(GObject *obj, guint prop, GValue *va...
  function areaWidget_class_init (line 469) | static void areaWidget_class_init(areaWidgetClass *class)
  function uiAreaSetSize (line 497) | uiUnixControlAllDefaults(uiArea)
  function uiAreaQueueRedrawAll (line 508) | void uiAreaQueueRedrawAll(uiArea *a)
  function uiAreaScrollTo (line 513) | void uiAreaScrollTo(uiArea *a, double x, double y, double width, double ...
  function uiAreaBeginUserWindowMove (line 519) | void uiAreaBeginUserWindowMove(uiArea *a)
  function uiAreaBeginUserWindowResize (line 559) | void uiAreaBeginUserWindowResize(uiArea *a, uiWindowResizeEdge edge)
  function uiArea (line 589) | uiArea *uiNewArea(uiAreaHandler *ah)
  function uiArea (line 609) | uiArea *uiNewScrollingArea(uiAreaHandler *ah, int width, int height)

FILE: unix/attrstr.c
  type foreachParams (line 8) | struct foreachParams {
  function addattr (line 12) | static void addattr(struct foreachParams *p, size_t start, size_t end, P...
  function uiForEach (line 21) | static uiForEach processAttribute(const uiAttributedString *s, const uiA...
  function PangoAttrList (line 138) | PangoAttrList *uiprivAttributedStringToPangoAttrList(uiDrawTextLayoutPar...

FILE: unix/box.c
  type boxChild (line 4) | struct boxChild {
  type uiBox (line 13) | struct uiBox {
  function uiBoxDestroy (line 28) | static void uiBoxDestroy(uiControl *c)
  function uiBoxAppend (line 50) | void uiBoxAppend(uiBox *b, uiControl *c, int stretchy)
  function uiBoxDelete (line 91) | void uiBoxDelete(uiBox *b, int index)
  function uiBoxPadded (line 112) | int uiBoxPadded(uiBox *b)
  function uiBoxSetPadded (line 117) | void uiBoxSetPadded(uiBox *b, int padded)
  function uiBox (line 129) | static uiBox *finishNewBox(GtkOrientation orientation)
  function uiBox (line 151) | uiBox *uiNewHorizontalBox(void)
  function uiBox (line 156) | uiBox *uiNewVerticalBox(void)

FILE: unix/button.c
  type uiButton (line 4) | struct uiButton {
  function onClicked (line 12) | uiUnixControlAllDefaults(uiButton)
  function defaultOnClicked (line 21) | static void defaultOnClicked(uiButton *b, void *data)
  function uiButtonSetText (line 31) | void uiButtonSetText(uiButton *b, const char *text)
  function uiButtonOnClicked (line 36) | void uiButtonOnClicked(uiButton *b, void (*f)(uiButton *, void *), void ...
  function uiButton (line 42) | uiButton *uiNewButton(const char *text)

FILE: unix/cellrendererbutton.c
  type cellRendererButton (line 17) | typedef struct cellRendererButton cellRendererButton;
  type cellRendererButtonClass (line 18) | typedef struct cellRendererButtonClass cellRendererButtonClass;
  type cellRendererButton (line 20) | struct cellRendererButton {
  type cellRendererButtonClass (line 25) | struct cellRendererButtonClass {
  function cellRendererButton_init (line 31) | static void cellRendererButton_init(cellRendererButton *c)
  function cellRendererButton_dispose (line 38) | static void cellRendererButton_dispose(GObject *obj)
  function cellRendererButton_finalize (line 43) | static void cellRendererButton_finalize(GObject *obj)
  function GtkSizeRequestMode (line 54) | static GtkSizeRequestMode cellRendererButton_get_request_mode(GtkCellRen...
  function GtkStyleContext (line 61) | static GtkStyleContext *setButtonStyle(GtkWidget *widget)
  function unsetButtonStyle (line 88) | void unsetButtonStyle(GtkStyleContext *context)
  function PangoLayout (line 95) | static PangoLayout *cellRendererButtonPangoLayout(cellRendererButton *c,...
  function cellRendererButtonSize (line 109) | static void cellRendererButtonSize(cellRendererButton *c, GtkWidget *wid...
  function cellRendererButton_get_preferred_width (line 143) | static void cellRendererButton_get_preferred_width(GtkCellRenderer *r, G...
  function cellRendererButton_get_preferred_height_for_width (line 168) | static void cellRendererButton_get_preferred_height_for_width(GtkCellRen...
  function cellRendererButton_get_preferred_height (line 192) | static void cellRendererButton_get_preferred_height(GtkCellRenderer *r, ...
  function cellRendererButton_get_aligned_area (line 202) | static void cellRendererButton_get_aligned_area(GtkCellRenderer *r, GtkW...
  function cellRendererButton_render (line 222) | static void cellRendererButton_render(GtkCellRenderer *r, cairo_t *cr, G...
  function gboolean (line 263) | static gboolean cellRendererButton_activate(GtkCellRenderer *r, GdkEvent...
  function cellRendererButton_set_property (line 271) | static void cellRendererButton_set_property(GObject *object, guint prop,...
  function cellRendererButton_get_property (line 285) | static void cellRendererButton_get_property(GObject *object, guint prop,...
  function cellRendererButton_class_init (line 296) | static void cellRendererButton_class_init(cellRendererButtonClass *class)
  function GtkCellRenderer (line 329) | GtkCellRenderer *uiprivNewCellRendererButton(void)

FILE: unix/checkbox.c
  type uiCheckbox (line 4) | struct uiCheckbox {
  function onToggled (line 15) | uiUnixControlAllDefaults(uiCheckbox)
  function defaultOnToggled (line 24) | static void defaultOnToggled(uiCheckbox *c, void *data)
  function uiCheckboxSetText (line 34) | void uiCheckboxSetText(uiCheckbox *c, const char *text)
  function uiCheckboxOnToggled (line 39) | void uiCheckboxOnToggled(uiCheckbox *c, void (*f)(uiCheckbox *, void *),...
  function uiCheckboxChecked (line 45) | int uiCheckboxChecked(uiCheckbox *c)
  function uiCheckboxSetChecked (line 50) | void uiCheckboxSetChecked(uiCheckbox *c, int checked)
  function uiCheckbox (line 63) | uiCheckbox *uiNewCheckbox(const char *text)

FILE: unix/child.c
  type uiprivChild (line 6) | struct uiprivChild {
  function uiprivChild (line 29) | uiprivChild *uiprivNewChild(uiControl *child, uiControl *parent, GtkCont...
  function uiprivChild (line 52) | uiprivChild *uiprivNewChildWithBox(uiControl *child, uiControl *parent, ...
  function uiprivChildRemove (line 72) | void uiprivChildRemove(uiprivChild *c)
  function uiprivChildDestroy (line 88) | void uiprivChildDestroy(uiprivChild *c)
  function GtkWidget (line 97) | GtkWidget *uiprivChildWidget(uiprivChild *c)
  function uiprivChildFlag (line 102) | int uiprivChildFlag(uiprivChild *c)
  function uiprivChildSetFlag (line 107) | void uiprivChildSetFlag(uiprivChild *c, int flag)
  function GtkWidget (line 112) | GtkWidget *uiprivChildBox(uiprivChild *c)
  function uiprivChildSetMargined (line 117) | void uiprivChildSetMargined(uiprivChild *c, int margined)

FILE: unix/colorbutton.c
  type uiColorButton (line 4) | struct uiColorButton {
  function onColorSet (line 14) | uiUnixControlAllDefaults(uiColorButton)
  function defaultOnChanged (line 23) | static void defaultOnChanged(uiColorButton *b, void *data)
  function uiColorButtonColor (line 28) | void uiColorButtonColor(uiColorButton *b, double *r, double *g, double *...
  function uiColorButtonSetColor (line 39) | void uiColorButtonSetColor(uiColorButton *b, double r, double g, double ...
  function uiColorButtonOnChanged (line 51) | void uiColorButtonOnChanged(uiColorButton *b, void (*f)(uiColorButton *,...
  function uiColorButton (line 57) | uiColorButton *uiNewColorButton(void)

FILE: unix/combobox.c
  type uiCombobox (line 4) | struct uiCombobox {
  function onChanged (line 14) | uiUnixControlAllDefaults(uiCombobox)
  function defaultOnSelected (line 23) | static void defaultOnSelected(uiCombobox *c, void *data)
  function uiComboboxAppend (line 28) | void uiComboboxAppend(uiCombobox *c, const char *text)
  function uiComboboxSelected (line 33) | int uiComboboxSelected(uiCombobox *c)
  function uiComboboxSetSelected (line 38) | void uiComboboxSetSelected(uiCombobox *c, int n)
  function uiComboboxOnSelected (line 46) | void uiComboboxOnSelected(uiCombobox *c, void (*f)(uiCombobox *c, void *...
  function uiCombobox (line 52) | uiCombobox *uiNewCombobox(void)

FILE: unix/control.c
  function uiUnixControlSetContainer (line 4) | void uiUnixControlSetContainer(uiUnixControl *c, GtkContainer *container...
  function uiUnixControl (line 11) | uiUnixControl *uiUnixAllocControl(size_t n, uint32_t typesig, const char...

FILE: unix/datetimepicker.c
  type uiprivDateTimePickerWidget (line 14) | typedef struct uiprivDateTimePickerWidget uiprivDateTimePickerWidget;
  type uiprivDateTimePickerWidgetClass (line 15) | typedef struct uiprivDateTimePickerWidgetClass uiprivDateTimePickerWidge...
  type uiprivDateTimePickerWidget (line 17) | struct uiprivDateTimePickerWidget {
  type uiprivDateTimePickerWidgetClass (line 44) | struct uiprivDateTimePickerWidgetClass {
  function realSpinValue (line 50) | static int realSpinValue(GtkSpinButton *spinButton)
  function setRealSpinValue (line 58) | static void setRealSpinValue(GtkSpinButton *spinButton, int value, gulon...
  function GDateTime (line 68) | static GDateTime *selected(uiprivDateTimePickerWidget *d)
  function setLabel (line 88) | static void setLabel(uiprivDateTimePickerWidget *d)
  function dateTimeChanged (line 115) | static void dateTimeChanged(uiprivDateTimePickerWidget *d)
  function setActive (line 123) | static void setActive(uiprivDateTimePickerWidget *d, gboolean active)
  function endGrab (line 131) | static void endGrab(uiprivDateTimePickerWidget *d)
  function hidePopup (line 141) | static void hidePopup(uiprivDateTimePickerWidget *d)
  function gboolean (line 149) | static gboolean startGrab(uiprivDateTimePickerWidget *d)
  function allocationToScreen (line 204) | static void allocationToScreen(uiprivDateTimePickerWidget *d, gint *x, g...
  function showPopup (line 244) | static void showPopup(uiprivDateTimePickerWidget *d)
  function onToggled (line 264) | static void onToggled(GtkToggleButton *b, gpointer data)
  function gboolean (line 274) | static gboolean grabBroken(GtkWidget *w, GdkEventGrabBroken *e, gpointer...
  function gboolean (line 282) | static gboolean buttonReleased(GtkWidget *w, GdkEventButton *e, gpointer...
  function gint (line 311) | static gint hoursSpinboxInput(GtkSpinButton *sb, gpointer ptr, gpointer ...
  function gboolean (line 327) | static gboolean hoursSpinboxOutput(GtkSpinButton *sb, gpointer data)
  function gboolean (line 341) | static gboolean zeroPadSpinbox(GtkSpinButton *sb, gpointer data)
  function gint (line 354) | static gint ampmSpinboxInput(GtkSpinButton *sb, gpointer ptr, gpointer d...
  function gboolean (line 375) | static gboolean ampmSpinboxOutput(GtkSpinButton *sb, gpointer data)
  function spinboxChanged (line 387) | static void spinboxChanged(GtkSpinButton *sb, gpointer data)
  function GtkWidget (line 394) | static GtkWidget *newSpinbox(uiprivDateTimePickerWidget *d, int min, int...
  function dateChanged (line 410) | static void dateChanged(GtkCalendar *c, gpointer data)
  function setDateOnly (line 417) | static void setDateOnly(uiprivDateTimePickerWidget *d)
  function setTimeOnly (line 423) | static void setTimeOnly(uiprivDateTimePickerWidget *d)
  function uiprivDateTimePickerWidget_setTime (line 429) | static void uiprivDateTimePickerWidget_setTime(uiprivDateTimePickerWidge...
  function uiprivDateTimePickerWidget_init (line 456) | static void uiprivDateTimePickerWidget_init(uiprivDateTimePickerWidget *d)
  function uiprivDateTimePickerWidget_dispose (line 525) | static void uiprivDateTimePickerWidget_dispose(GObject *obj)
  function uiprivDateTimePickerWidget_finalize (line 536) | static void uiprivDateTimePickerWidget_finalize(GObject *obj)
  function uiprivDateTimePickerWidget_class_init (line 541) | static void uiprivDateTimePickerWidget_class_init(uiprivDateTimePickerWi...
  type uiDateTimePicker (line 555) | struct uiDateTimePicker {
  function defaultOnChanged (line 564) | uiUnixControlAllDefaults(uiDateTimePicker)
  function uiDateTimePickerTime (line 571) | void uiDateTimePickerTime(uiDateTimePicker *d, struct tm *time)
  function uiDateTimePickerSetTime (line 587) | void uiDateTimePickerSetTime(uiDateTimePicker *d, const struct tm *time)
  function uiDateTimePickerOnChanged (line 605) | void uiDateTimePickerOnChanged(uiDateTimePicker *d, void (*f)(uiDateTime...
  function onChanged (line 611) | static void onChanged(uiprivDateTimePickerWidget *d, gpointer data)
  function GtkWidget (line 619) | static GtkWidget *newDTP(void)
  function GtkWidget (line 628) | static GtkWidget *newDP(void)
  function GtkWidget (line 638) | static GtkWidget *newTP(void)
  function uiDateTimePicker (line 648) | uiDateTimePicker *finishNewDateTimePicker(GtkWidget *(*fn)(void))
  function uiDateTimePicker (line 662) | uiDateTimePicker *uiNewDateTimePicker(void)
  function uiDateTimePicker (line 667) | uiDateTimePicker *uiNewDatePicker(void)
  function uiDateTimePicker (line 672) | uiDateTimePicker *uiNewTimePicker(void)

FILE: unix/debug.c
  function uiprivRealBug (line 6) | void uiprivRealBug(const char *file, const char *line, const char *func,...

FILE: unix/draw.c
  function uiDrawContext (line 5) | uiDrawContext *uiprivNewContext(cairo_t *cr, GtkStyleContext *style)
  function uiprivFreeContext (line 15) | void uiprivFreeContext(uiDrawContext *c)
  function cairo_pattern_t (line 21) | static cairo_pattern_t *mkbrush(uiDrawBrush *b)
  function uiDrawStroke (line 58) | void uiDrawStroke(uiDrawContext *c, uiDrawPath *path, uiDrawBrush *b, ui...
  function uiDrawFill (line 94) | void uiDrawFill(uiDrawContext *c, uiDrawPath *path, uiDrawBrush *b)
  function uiDrawTransform (line 113) | void uiDrawTransform(uiDrawContext *c, uiDrawMatrix *m)
  function uiDrawClip (line 121) | void uiDrawClip(uiDrawContext *c, uiDrawPath *path)
  function uiDrawSave (line 135) | void uiDrawSave(uiDrawContext *c)
  function uiDrawRestore (line 140) | void uiDrawRestore(uiDrawContext *c)

FILE: unix/draw.h
  type uiDrawContext (line 4) | struct uiDrawContext {

FILE: unix/drawmatrix.c
  function m2c (line 5) | static void m2c(uiDrawMatrix *m, cairo_matrix_t *c)
  function uiprivM2C (line 16) | void uiprivM2C(uiDrawMatrix *m, cairo_matrix_t *c)
  function c2m (line 21) | static void c2m(cairo_matrix_t *c, uiDrawMatrix *m)
  function uiDrawMatrixTranslate (line 31) | void uiDrawMatrixTranslate(uiDrawMatrix *m, double x, double y)
  function uiDrawMatrixScale (line 40) | void uiDrawMatrixScale(uiDrawMatrix *m, double xCenter, double yCenter, ...
  function uiDrawMatrixRotate (line 55) | void uiDrawMatrixRotate(uiDrawMatrix *m, double x, double y, double amount)
  function uiDrawMatrixSkew (line 66) | void uiDrawMatrixSkew(uiDrawMatrix *m, double x, double y, double xamoun...
  function uiDrawMatrixMultiply (line 71) | void uiDrawMatrixMultiply(uiDrawMatrix *dest, uiDrawMatrix *src)
  function uiDrawMatrixInvertible (line 82) | int uiDrawMatrixInvertible(uiDrawMatrix *m)
  function uiDrawMatrixInvert (line 90) | int uiDrawMatrixInvert(uiDrawMatrix *m)
  function uiDrawMatrixTransformPoint (line 101) | void uiDrawMatrixTransformPoint(uiDrawMatrix *m, double *x, double *y)
  function uiDrawMatrixTransformSize (line 109) | void uiDrawMatrixTransformSize(uiDrawMatrix *m, double *x, double *y)

FILE: unix/drawpath.c
  type uiDrawPath (line 5) | struct uiDrawPath {
  type piece (line 11) | struct piece {
  function uiDrawPath (line 27) | uiDrawPath *uiDrawNewPath(uiDrawFillMode mode)
  function uiDrawFreePath (line 37) | void uiDrawFreePath(uiDrawPath *p)
  function add (line 43) | static void add(uiDrawPath *p, struct piece *piece)
  function uiDrawPathNewFigure (line 50) | void uiDrawPathNewFigure(uiDrawPath *p, double x, double y)
  function uiDrawPathNewFigureWithArc (line 60) | void uiDrawPathNewFigureWithArc(uiDrawPath *p, double xCenter, double yC...
  function uiDrawPathLineTo (line 76) | void uiDrawPathLineTo(uiDrawPath *p, double x, double y)
  function uiDrawPathArcTo (line 86) | void uiDrawPathArcTo(uiDrawPath *p, double xCenter, double yCenter, doub...
  function uiDrawPathBezierTo (line 102) | void uiDrawPathBezierTo(uiDrawPath *p, double c1x, double c1y, double c2...
  function uiDrawPathCloseFigure (line 116) | void uiDrawPathCloseFigure(uiDrawPath *p)
  function uiDrawPathAddRectangle (line 124) | void uiDrawPathAddRectangle(uiDrawPath *p, double x, double y, double wi...
  function uiDrawPathEnd (line 136) | void uiDrawPathEnd(uiDrawPath *p)
  function uiprivRunPath (line 141) | void uiprivRunPath(uiDrawPath *p, cairo_t *cr)
  function uiDrawFillMode (line 196) | uiDrawFillMode uiprivPathFillMode(uiDrawPath *path)

FILE: unix/drawtext.c
  type uiDrawTextLayout (line 6) | struct uiDrawTextLayout {
  function uiDrawTextLayout (line 22) | uiDrawTextLayout *uiDrawNewTextLayout(uiDrawTextLayoutParams *p)
  function uiDrawFreeTextLayout (line 60) | void uiDrawFreeTextLayout(uiDrawTextLayout *tl)
  function uiDrawText (line 66) | void uiDrawText(uiDrawContext *c, uiDrawTextLayout *tl, double x, double y)
  function uiDrawTextLayoutExtents (line 74) | void uiDrawTextLayoutExtents(uiDrawTextLayout *tl, double *width, double...

FILE: unix/editablecombo.c
  type uiEditableCombobox (line 4) | struct uiEditableCombobox {
  function onChanged (line 15) | uiUnixControlAllDefaults(uiEditableCombobox)
  function defaultOnChanged (line 24) | static void defaultOnChanged(uiEditableCombobox *c, void *data)
  function uiEditableComboboxAppend (line 29) | void uiEditableComboboxAppend(uiEditableCombobox *c, const char *text)
  function uiEditableComboboxSetText (line 46) | void uiEditableComboboxSetText(uiEditableCombobox *c, const char *text)
  function uiEditableComboboxOnChanged (line 58) | void uiEditableComboboxOnChanged(uiEditableCombobox *c, void (*f)(uiEdit...
  function uiEditableCombobox (line 64) | uiEditableCombobox *uiNewEditableCombobox(void)

FILE: unix/entry.c
  type uiEntry (line 4) | struct uiEntry {
  function onChanged (line 14) | uiUnixControlAllDefaults(uiEntry)
  function defaultOnChanged (line 23) | static void defaultOnChanged(uiEntry *e, void *data)
  function uiEntrySetText (line 33) | void uiEntrySetText(uiEntry *e, const char *text)
  function uiEntryOnChanged (line 42) | void uiEntryOnChanged(uiEntry *e, void (*f)(uiEntry *, void *), void *data)
  function uiEntryReadOnly (line 48) | int uiEntryReadOnly(uiEntry *e)
  function uiEntrySetReadOnly (line 53) | void uiEntrySetReadOnly(uiEntry *e, int readonly)
  function uiEntry (line 63) | static uiEntry *finishNewEntry(GtkWidget *w, const gchar *signal)
  function uiEntry (line 79) | uiEntry *uiNewEntry(void)
  function uiEntry (line 84) | uiEntry *uiNewPasswordEntry(void)
  function uiEntry (line 94) | uiEntry *uiNewSearchEntry(void)

FILE: unix/fontbutton.c
  type uiFontButton (line 5) | struct uiFontButton {
  function onFontSet (line 15) | uiUnixControlAllDefaults(uiFontButton)
  function defaultOnChanged (line 25) | static void defaultOnChanged(uiFontButton *b, void *data)
  function uiFontButtonFont (line 30) | void uiFontButtonFont(uiFontButton *b, uiFontDescriptor *desc)
  function uiFontButtonOnChanged (line 40) | void uiFontButtonOnChanged(uiFontButton *b, void (*f)(uiFontButton *, vo...
  function uiFontButton (line 46) | uiFontButton *uiNewFontButton(void)
  function uiFreeFontButtonFont (line 71) | void uiFreeFontButtonFont(uiFontDescriptor *desc)

FILE: unix/fontmatch.c
  function PangoWeight (line 28) | PangoWeight uiprivWeightToPangoWeight(uiTextWeight w)
  function PangoStyle (line 33) | PangoStyle uiprivItalicToPangoStyle(uiTextItalic i)
  function PangoStretch (line 38) | PangoStretch uiprivStretchToPangoStretch(uiTextStretch s)
  function PangoFontDescription (line 43) | PangoFontDescription *uiprivFontDescriptorToPangoFontDescription(const u...
  function uiprivFontDescriptorFromPangoFontDescription (line 57) | void uiprivFontDescriptorFromPangoFontDescription(PangoFontDescription *...

FILE: unix/form.c
  type formChild (line 4) | struct formChild {
  type uiForm (line 15) | struct uiForm {
  function uiFormDestroy (line 29) | static void uiFormDestroy(uiControl *c)
  function uiFormAppend (line 51) | void uiFormAppend(uiForm *f, const char *label, uiControl *c, int stretchy)
  function uiFormDelete (line 104) | void uiFormDelete(uiForm *f, int index)
  function uiFormPadded (line 127) | int uiFormPadded(uiForm *f)
  function uiFormSetPadded (line 132) | void uiFormSetPadded(uiForm *f, int padded)
  function uiForm (line 144) | uiForm *uiNewForm(void)

FILE: unix/future.c
  function uiprivLoadFutures (line 17) | void uiprivLoadFutures(void)
  function PangoAttribute (line 33) | PangoAttribute *uiprivFUTURE_pango_attr_font_features_new(const gchar *f...
  function PangoAttribute (line 40) | PangoAttribute *uiprivFUTURE_pango_attr_foreground_alpha_new(guint16 alpha)
  function PangoAttribute (line 47) | PangoAttribute *uiprivFUTURE_pango_attr_background_alpha_new(guint16 alpha)
  function gboolean (line 54) | gboolean uiprivFUTURE_gtk_widget_path_iter_set_object_name(GtkWidgetPath...

FILE: unix/graphemes.c
  function uiprivGraphemesTakesUTF16 (line 5) | int uiprivGraphemesTakesUTF16(void)
  function uiprivGraphemes (line 10) | uiprivGraphemes *uiprivNewGraphemes(void *s, size_t len)

FILE: unix/grid.c
  type gridChild (line 4) | struct gridChild {
  type uiGrid (line 13) | struct uiGrid {
  function uiGridDestroy (line 26) | static void uiGridDestroy(uiControl *c)
  function GtkWidget (line 66) | static GtkWidget *prepare(struct gridChild *gc, uiControl *c, int hexpan...
  function uiGridAppend (line 83) | void uiGridAppend(uiGrid *g, uiControl *c, int left, int top, int xspan,...
  function uiGridInsertAt (line 97) | void uiGridInsertAt(uiGrid *g, uiControl *c, uiControl *existing, uiAt a...
  function uiGridPadded (line 111) | int uiGridPadded(uiGrid *g)
  function uiGridSetPadded (line 116) | void uiGridSetPadded(uiGrid *g, int padded)
  function uiGrid (line 128) | uiGrid *uiNewGrid(void)

FILE: unix/group.c
  type uiGroup (line 4) | struct uiGroup {
  function uiGroupDestroy (line 17) | uiUnixControlAllDefaultsExceptDestroy(uiGroup)
  function uiGroupSetTitle (line 34) | void uiGroupSetTitle(uiGroup *g, const char *text)
  function uiGroupSetChild (line 39) | void uiGroupSetChild(uiGroup *g, uiControl *child)
  function uiGroupMargined (line 46) | int uiGroupMargined(uiGroup *g)
  function uiGroupSetMargined (line 51) | void uiGroupSetMargined(uiGroup *g, int margined)
  function uiGroup (line 58) | uiGroup *uiNewGroup(const char *text)

FILE: unix/image.c
  type uiImage (line 4) | struct uiImage {
  function freeImageRep (line 10) | static void freeImageRep(gpointer item)
  function uiImage (line 17) | uiImage *uiNewImage(double width, double height)
  function uiFreeImage (line 28) | void uiFreeImage(uiImage *i)
  function uiImageAppend (line 34) | void uiImageAppend(uiImage *i, void *pixels, int pixelWidth, int pixelHe...
  type matcher (line 75) | struct matcher {
  function match (line 85) | static void match(gpointer surface, gpointer data)
  function cairo_surface_t (line 122) | cairo_surface_t *uiprivImageAppropriateSurface(uiImage *i, GtkWidget *w)

FILE: unix/label.c
  type uiLabel (line 4) | struct uiLabel {
  function uiLabelSetText (line 18) | void uiLabelSetText(uiLabel *l, const char *text)
  function uiLabel (line 23) | uiLabel *uiNewLabel(const char *text)

FILE: unix/main.c
  type timer (line 25) | struct timer
  function uninitTimer (line 27) | static void uninitTimer(gpointer key, gpointer value, gpointer data)
  function uiUninit (line 32) | void uiUninit(void)
  function uiFreeInitError (line 40) | void uiFreeInitError(const char *err)
  function uiMain (line 47) | void uiMain(void)
  function gboolean (line 57) | static gboolean stepsIteration(gboolean block)
  function uiMainSteps (line 63) | void uiMainSteps(void)
  function uiMainStep (line 68) | int uiMainStep(int wait)
  function gboolean (line 81) | static gboolean quit(gpointer data)
  function uiQuit (line 91) | void uiQuit(void)
  type queued (line 96) | struct queued {
  function gboolean (line 101) | static gboolean doqueued(gpointer data)
  function uiQueueMain (line 110) | void uiQueueMain(void (*f)(void *data), void *data)
  type timer (line 122) | struct timer {
  function gboolean (line 127) | static gboolean doTimer(gpointer data)
  function uiTimer (line 139) | void uiTimer(int milliseconds, int (*f)(void *data), void *data)

FILE: unix/menu.c
  type uiMenu (line 10) | struct uiMenu {
  type uiMenuItem (line 15) | struct uiMenuItem {
  type menuItemWindow (line 26) | struct menuItemWindow {
  function singleSetChecked (line 41) | static void singleSetChecked(GtkCheckMenuItem *menuitem, gboolean checke...
  function setChecked (line 48) | static void setChecked(uiMenuItem *item, gboolean checked)
  function onClicked (line 63) | static void onClicked(GtkMenuItem *menuitem, gpointer data)
  function defaultOnClicked (line 77) | static void defaultOnClicked(uiMenuItem *item, uiWindow *w, void *data)
  function onQuitClicked (line 82) | static void onQuitClicked(uiMenuItem *item, uiWindow *w, void *data)
  function menuItemEnableDisable (line 88) | static void menuItemEnableDisable(uiMenuItem *item, gboolean enabled)
  function uiMenuItemEnable (line 99) | void uiMenuItemEnable(uiMenuItem *item)
  function uiMenuItemDisable (line 104) | void uiMenuItemDisable(uiMenuItem *item)
  function uiMenuItemOnClicked (line 109) | void uiMenuItemOnClicked(uiMenuItem *item, void (*f)(uiMenuItem *, uiWin...
  function uiMenuItemChecked (line 117) | int uiMenuItemChecked(uiMenuItem *item)
  function uiMenuItemSetChecked (line 122) | void uiMenuItemSetChecked(uiMenuItem *item, int checked)
  function uiMenuItem (line 133) | static uiMenuItem *newItem(uiMenu *m, int type, const char *name)
  function uiMenuItem (line 186) | uiMenuItem *uiMenuAppendItem(uiMenu *m, const char *name)
  function uiMenuItem (line 191) | uiMenuItem *uiMenuAppendCheckItem(uiMenu *m, const char *name)
  function uiMenuItem (line 196) | uiMenuItem *uiMenuAppendQuitItem(uiMenu *m)
  function uiMenuItem (line 205) | uiMenuItem *uiMenuAppendPreferencesItem(uiMenu *m)
  function uiMenuItem (line 214) | uiMenuItem *uiMenuAppendAboutItem(uiMenu *m)
  function uiMenuAppendSeparator (line 223) | void uiMenuAppendSeparator(uiMenu *m)
  function uiMenu (line 228) | uiMenu *uiNewMenu(const char *name)
  function appendMenuItem (line 247) | static void appendMenuItem(GtkMenuShell *submenu, uiMenuItem *item, uiWi...
  function GtkWidget (line 269) | GtkWidget *uiprivMakeMenubar(uiWindow *w)
  type freeMenuItemData (line 297) | struct freeMenuItemData {
  function freeMenuItem (line 302) | static void freeMenuItem(GtkWidget *widget, gpointer data)
  function freeMenu (line 316) | static void freeMenu(GtkWidget *widget, gpointer data)
  function uiprivFreeMenubar (line 333) | void uiprivFreeMenubar(GtkWidget *mb)
  function uiprivUninitMenus (line 342) | void uiprivUninitMenus(void)

FILE: unix/multilineentry.c
  type uiMultilineEntry (line 6) | struct uiMultilineEntry {
  function onChanged (line 19) | uiUnixControlAllDefaults(uiMultilineEntry)
  function defaultOnChanged (line 28) | static void defaultOnChanged(uiMultilineEntry *e, void *data)
  function uiMultilineEntrySetText (line 47) | void uiMultilineEntrySetText(uiMultilineEntry *e, const char *text)
  function uiMultilineEntryAppend (line 56) | void uiMultilineEntryAppend(uiMultilineEntry *e, const char *text)
  function uiMultilineEntryOnChanged (line 67) | void uiMultilineEntryOnChanged(uiMultilineEntry *e, void (*f)(uiMultilin...
  function uiMultilineEntryReadOnly (line 73) | int uiMultilineEntryReadOnly(uiMultilineEntry *e)
  function uiMultilineEntrySetReadOnly (line 78) | void uiMultilineEntrySetReadOnly(uiMultilineEntry *e, int readonly)
  function uiMultilineEntry (line 88) | static uiMultilineEntry *finishMultilineEntry(GtkPolicyType hpolicy, Gtk...
  function uiMultilineEntry (line 118) | uiMultilineEntry *uiNewMultilineEntry(void)
  function uiMultilineEntry (line 123) | uiMultilineEntry *uiNewNonWrappingMultilineEntry(void)

FILE: unix/opentype.c
  function uiForEach (line 6) | static uiForEach toCSS(const uiOpenTypeFeatures *otf, char a, char b, ch...
  function GString (line 16) | GString *uiprivOpenTypeFeaturesToPangoCSSFeaturesString(const uiOpenType...

FILE: unix/progressbar.c
  type uiProgressBar (line 7) | struct uiProgressBar {
  function uiProgressBarDestroy (line 15) | uiUnixControlAllDefaultsExceptDestroy(uiProgressBar)
  function uiProgressBarValue (line 28) | int uiProgressBarValue(uiProgressBar *p)
  function gboolean (line 35) | static gboolean pulse(void* data)
  function uiProgressBarSetValue (line 43) | void uiProgressBarSetValue(uiProgressBar *p, int value)
  function uiProgressBar (line 64) | uiProgressBar *uiNewProgressBar(void)

FILE: unix/radiobuttons.c
  type uiRadioButtons (line 6) | struct uiRadioButtons {
  function defaultOnSelected (line 17) | uiUnixControlAllDefaultsExceptDestroy(uiRadioButtons)
  function onToggled (line 24) | static void onToggled(GtkToggleButton *tb, gpointer data)
  function uiRadioButtonsDestroy (line 37) | static void uiRadioButtonsDestroy(uiControl *c)
  function uiRadioButtonsAppend (line 52) | void uiRadioButtonsAppend(uiRadioButtons *r, const char *text)
  function uiRadioButtonsSelected (line 67) | int uiRadioButtonsSelected(uiRadioButtons *r)
  function uiRadioButtonsSetSelected (line 80) | void uiRadioButtonsSetSelected(uiRadioButtons *r, int n)
  function uiRadioButtonsOnSelected (line 100) | void uiRadioButtonsOnSelected(uiRadioButtons *r, void (*f)(uiRadioButton...
  function uiRadioButtons (line 106) | uiRadioButtons *uiNewRadioButtons(void)

FILE: unix/separator.c
  type uiSeparator (line 4) | struct uiSeparator {
  function uiSeparator (line 24) | uiSeparator *uiNewVerticalSeparator(void)

FILE: unix/slider.c
  type uiSlider (line 4) | struct uiSlider {
  function onChanged (line 14) | uiUnixControlAllDefaults(uiSlider)
  function defaultOnChanged (line 23) | static void defaultOnChanged(uiSlider *s, void *data)
  function uiSliderValue (line 28) | int uiSliderValue(uiSlider *s)
  function uiSliderSetValue (line 33) | void uiSliderSetValue(uiSlider *s, int value)
  function uiSliderOnChanged (line 41) | void uiSliderOnChanged(uiSlider *s, void (*f)(uiSlider *, void *), void ...
  function uiSlider (line 47) | uiSlider *uiNewSlider(int min, int max)

FILE: unix/spinbox.c
  type uiSpinbox (line 4) | struct uiSpinbox {
  function onChanged (line 14) | uiUnixControlAllDefaults(uiSpinbox)
  function defaultOnChanged (line 23) | static void defaultOnChanged(uiSpinbox *s, void *data)
  function uiSpinboxValue (line 28) | int uiSpinboxValue(uiSpinbox *s)
  function uiSpinboxSetValue (line 33) | void uiSpinboxSetValue(uiSpinbox *s, int value)
  function uiSpinboxOnChanged (line 42) | void uiSpinboxOnChanged(uiSpinbox *s, void (*f)(uiSpinbox *, void *), vo...
  function uiSpinbox (line 48) | uiSpinbox *uiNewSpinbox(int min, int max)

FILE: unix/stddialogs.c
  function msgbox (line 46) | static void msgbox(GtkWindow *parent, const char *title, const char *des...
  function uiMsgBox (line 58) | void uiMsgBox(uiWindow *parent, const char *title, const char *description)
  function uiMsgBoxError (line 63) | void uiMsgBoxError(uiWindow *parent, const char *title, const char *desc...

FILE: unix/tab.c
  type uiTab (line 4) | struct uiTab {
  function uiTabDestroy (line 14) | uiUnixControlAllDefaultsExceptDestroy(uiTab)
  function uiTabAppend (line 32) | void uiTabAppend(uiTab *t, const char *name, uiControl *child)
  function uiTabInsertAt (line 37) | void uiTabInsertAt(uiTab *t, const char *name, int n, uiControl *child)
  function uiTabDelete (line 50) | void uiTabDelete(uiTab *t, int n)
  function uiTabNumPages (line 60) | int uiTabNumPages(uiTab *t)
  function uiTabMargined (line 65) | int uiTabMargined(uiTab *t, int n)
  function uiTabSetMargined (line 73) | void uiTabSetMargined(uiTab *t, int n, int margined)
  function uiTab (line 82) | uiTab *uiNewTab(void)

FILE: unix/table.c
  type uiTable (line 7) | struct uiTable {
  function setImageSize (line 27) | static void setImageSize(GtkCellRenderer *r)
  function applyColor (line 42) | static void applyColor(GtkTreeModel *m, GtkTreeIter *iter, int modelColu...
  function setEditable (line 56) | static void setEditable(uiTableModel *m, GtkTreeIter *iter, int modelCol...
  function applyBackgroundColor (line 70) | static void applyBackgroundColor(uiTable *t, GtkTreeModel *m, GtkTreeIte...
  function onEdited (line 77) | static void onEdited(uiTableModel *m, int column, const char *pathstr, c...
  type textColumnParams (line 90) | struct textColumnParams {
  function textColumnDataFunc (line 98) | static void textColumnDataFunc(GtkTreeViewColumn *c, GtkCellRenderer *r,...
  function textColumnEdited (line 118) | static void textColumnEdited(GtkCellRendererText *r, gchar *path, gchar ...
  type imageColumnParams (line 131) | struct imageColumnParams {
  function imageColumnDataFunc (line 136) | static void imageColumnDataFunc(GtkTreeViewColumn *c, GtkCellRenderer *r...
  type checkboxColumnParams (line 153) | struct checkboxColumnParams {
  function checkboxColumnDataFunc (line 160) | static void checkboxColumnDataFunc(GtkTreeViewColumn *c, GtkCellRenderer...
  function checkboxColumnToggled (line 176) | static void checkboxColumnToggled(GtkCellRendererToggle *r, gchar *paths...
  type progressBarColumnParams (line 199) | struct progressBarColumnParams {
  type rowcol (line 204) | struct rowcol {
  function guint (line 209) | static guint rowcolHash(gconstpointer key)
  function gboolean (line 219) | static gboolean rowcolEqual(gconstpointer a, gconstpointer b)
  function pulseOne (line 227) | static void pulseOne(gpointer key, gpointer value, gpointer data)
  function gboolean (line 237) | static gboolean indeterminatePulse(gpointer data)
  function progressBarColumnDataFunc (line 245) | static void progressBarColumnDataFunc(GtkTreeViewColumn *c, GtkCellRende...
  type buttonColumnParams (line 299) | struct buttonColumnParams {
  function buttonColumnDataFunc (line 306) | static void buttonColumnDataFunc(GtkTreeViewColumn *c, GtkCellRenderer *...
  function buttonColumnClicked (line 323) | static void buttonColumnClicked(GtkCellRenderer *r, gchar *pathstr, gpoi...
  function GtkTreeViewColumn (line 330) | static GtkTreeViewColumn *addColumn(uiTable *t, const char *name)
  function addTextColumn (line 341) | static void addTextColumn(uiTable *t, GtkTreeViewColumn *c, int textMode...
  function uiTableAppendTextColumn (line 365) | void uiTableAppendTextColumn(uiTable *t, const char *name, int textModel...
  function addImageColumn (line 373) | static void addImageColumn(uiTable *t, GtkTreeViewColumn *c, int imageMo...
  function uiTableAppendImageColumn (line 388) | void uiTableAppendImageColumn(uiTable *t, const char *name, int imageMod...
  function uiTableAppendImageTextColumn (line 396) | void uiTableAppendImageTextColumn(uiTable *t, const char *name, int imag...
  function addCheckboxColumn (line 405) | static void addCheckboxColumn(uiTable *t, GtkTreeViewColumn *c, int chec...
  function uiTableAppendCheckboxColumn (line 423) | void uiTableAppendCheckboxColumn(uiTable *t, const char *name, int check...
  function uiTableAppendCheckboxTextColumn (line 431) | void uiTableAppendCheckboxTextColumn(uiTable *t, const char *name, int c...
  function uiTableAppendProgressBarColumn (line 440) | void uiTableAppendProgressBarColumn(uiTable *t, const char *name, int pr...
  function uiTableAppendButtonColumn (line 459) | void uiTableAppendButtonColumn(uiTable *t, const char *name, int buttonM...
  function uiTableDestroy (line 480) | uiUnixControlAllDefaultsExceptDestroy(uiTable)
  function uiTable (line 497) | uiTable *uiNewTable(uiTableParams *p)

FILE: unix/table.h
  type uiTableModelClass (line 11) | typedef struct uiTableModelClass uiTableModelClass;
  type uiTableModel (line 12) | struct uiTableModel {
  type uiTableModelClass (line 16) | struct uiTableModelClass {

FILE: unix/tablemodel.c
  function uiTableModel_init (line 10) | static void uiTableModel_init(uiTableModel *m)
  function uiTableModel_dispose (line 15) | static void uiTableModel_dispose(GObject *obj)
  function uiTableModel_finalize (line 20) | static void uiTableModel_finalize(GObject *obj)
  function GtkTreeModelFlags (line 25) | static GtkTreeModelFlags uiTableModel_get_flags(GtkTreeModel *mm)
  function gint (line 30) | static gint uiTableModel_get_n_columns(GtkTreeModel *mm)
  function GType (line 37) | static GType uiTableModel_get_column_type(GtkTreeModel *mm, gint index)
  function gboolean (line 58) | static gboolean uiTableModel_get_iter(GtkTreeModel *mm, GtkTreeIter *ite...
  function GtkTreePath (line 79) | static GtkTreePath *uiTableModel_get_path(GtkTreeModel *mm, GtkTreeIter ...
  function uiTableModel_get_value (line 90) | static void uiTableModel_get_value(GtkTreeModel *mm, GtkTreeIter *iter, ...
  function gboolean (line 136) | static gboolean uiTableModel_iter_next(GtkTreeModel *mm, GtkTreeIter *iter)
  function gboolean (line 153) | static gboolean uiTableModel_iter_previous(GtkTreeModel *mm, GtkTreeIter...
  function gboolean (line 169) | static gboolean uiTableModel_iter_children(GtkTreeModel *mm, GtkTreeIter...
  function gboolean (line 174) | static gboolean uiTableModel_iter_has_child(GtkTreeModel *mm, GtkTreeIte...
  function gint (line 179) | static gint uiTableModel_iter_n_children(GtkTreeModel *mm, GtkTreeIter *...
  function gboolean (line 188) | static gboolean uiTableModel_iter_nth_child(GtkTreeModel *mm, GtkTreeIte...
  function gboolean (line 208) | gboolean uiTableModel_iter_parent(GtkTreeModel *mm, GtkTreeIter *iter, G...
  function uiTableModel_class_init (line 214) | static void uiTableModel_class_init(uiTableModelClass *class)
  function uiTableModel_gtk_tree_model_interface_init (line 220) | static void uiTableModel_gtk_tree_model_interface_init(GtkTreeModelIface...
  function uiTableModel (line 238) | uiTableModel *uiNewTableModel(uiTableModelHandler *mh)
  function uiFreeTableModel (line 247) | void uiFreeTableModel(uiTableModel *m)
  function uiTableModelRowInserted (line 252) | void uiTableModelRowInserted(uiTableModel *m, int newIndex)
  function uiTableModelRowChanged (line 264) | void uiTableModelRowChanged(uiTableModel *m, int index)
  function uiTableModelRowDeleted (line 276) | void uiTableModelRowDeleted(uiTableModel *m, int oldIndex)
  function uiTableModelHandler (line 285) | uiTableModelHandler *uiprivTableModelHandler(uiTableModel *m)

FILE: unix/text.c
  function uiFreeText (line 9) | void uiFreeText(char *t)
  function uiprivStricmp (line 14) | int uiprivStricmp(const char *a, const char *b)

FILE: unix/uipriv_unix.h
  type uiprivChild (line 35) | typedef struct uiprivChild uiprivChild;

FILE: unix/util.c
  function uiprivSetMargined (line 4) | void uiprivSetMargined(GtkContainer *c, int margined)

FILE: unix/window.c
  type uiWindow (line 4) | struct uiWindow {
  function gboolean (line 30) | static gboolean onClosing(GtkWidget *win, GdkEvent *e, gpointer data)
  function onSizeAllocate (line 41) | static void onSizeAllocate(GtkWidget *widget, GdkRectangle *allocation, ...
  function defaultOnClosing (line 49) | static int defaultOnClosing(uiWindow *w, void *data)
  function defaultOnPositionContentSizeChanged (line 54) | static void defaultOnPositionContentSizeChanged(uiWindow *w, void *data)
  function uiWindowDestroy (line 59) | static void uiWindowDestroy(uiControl *c)
  function uiWindowSetParent (line 89) | void uiWindowSetParent(uiControl *c, uiControl *parent)
  function uiWindowToplevel (line 94) | static int uiWindowToplevel(uiControl *c)
  function uiWindowShow (line 99) | uiUnixControlDefaultVisible(uiWindow)
  function uiUnixControlDefaultEnabled (line 111) | uiUnixControlDefaultHide(uiWindow)
  function uiWindowSetTitle (line 123) | void uiWindowSetTitle(uiWindow *w, const char *title)
  function uiWindowContentSize (line 128) | void uiWindowContentSize(uiWindow *w, int *width, int *height)
  function uiWindowSetContentSize (line 137) | void uiWindowSetContentSize(uiWindow *w, int width, int height)
  function uiWindowFullscreen (line 168) | int uiWindowFullscreen(uiWindow *w)
  function uiWindowSetFullscreen (line 176) | void uiWindowSetFullscreen(uiWindow *w, int fullscreen)
  function uiWindowOnContentSizeChanged (line 185) | void uiWindowOnContentSizeChanged(uiWindow *w, void (*f)(uiWindow *, voi...
  function uiWindowOnClosing (line 191) | void uiWindowOnClosing(uiWindow *w, int (*f)(uiWindow *, void *), void *...
  function uiWindowBorderless (line 197) | int uiWindowBorderless(uiWindow *w)
  function uiWindowSetBorderless (line 202) | void uiWindowSetBorderless(uiWindow *w, int borderless)
  function uiWindowSetChild (line 208) | void uiWindowSetChild(uiWindow *w, uiControl *child)
  function uiWindowMargined (line 221) | int uiWindowMargined(uiWindow *w)
  function uiWindowSetMargined (line 226) | void uiWindowSetMargined(uiWindow *w, int margined)
  function uiWindow (line 232) | uiWindow *uiNewWindow(const char *title, int width, int height, int hasM...

FILE: windows/_rc2bin/main.cpp
  function die (line 9) | void die(const char *f, const char *constname)
  function dumpResource (line 18) | void dumpResource(const char *constname, const WCHAR *name, const WCHAR ...
  function main (line 62) | int main(void)

FILE: windows/alloc.cpp
  function initAlloc (line 9) | void initAlloc(void)
  function uninitAlloc (line 14) | void uninitAlloc(void)
  function uiprivFree (line 55) | void uiprivFree(void *_p)

FILE: windows/area.cpp
  function LRESULT (line 7) | static LRESULT CALLBACK areaWndProc(HWND hwnd, UINT uMsg, WPARAM wParam,...
  function uiAreaMinimumSize (line 56) | static void uiAreaMinimumSize(uiWindowsControl *c, int *width, int *height)
  function ATOM (line 63) | ATOM registerAreaClass(HICON hDefaultIcon, HCURSOR hDefaultCursor)
  function unregisterArea (line 79) | void unregisterArea(void)
  function uiAreaSetSize (line 85) | void uiAreaSetSize(uiArea *a, int width, int height)
  function uiAreaQueueRedrawAll (line 92) | void uiAreaQueueRedrawAll(uiArea *a)
  function uiAreaScrollTo (line 98) | void uiAreaScrollTo(uiArea *a, double x, double y, double width, double ...
  function uiAreaBeginUserWindowMove (line 103) | void uiAreaBeginUserWindowMove(uiArea *a)
  function uiAreaBeginUserWindowResize (line 119) | void uiAreaBeginUserWindowResize(uiArea *a, uiWindowResizeEdge edge)
  function uiArea (line 163) | uiArea *uiNewArea(uiAreaHandler *ah)
  function uiArea (line 183) | uiArea *uiNewScrollingArea(uiAreaHandler *ah, int width, int height)

FILE: windows/area.hpp
  type uiArea (line 8) | struct uiArea {

FILE: windows/areadraw.cpp
  function HRESULT (line 5) | static HRESULT doPaint(uiArea *a, ID2D1RenderTarget *rt, RECT *clip)
  function onWM_PAINT (line 62) | static void onWM_PAINT(uiArea *a)
  function onWM_PRINTCLIENT (line 94) | static void onWM_PRINTCLIENT(uiArea *a, HDC dc)
  function BOOL (line 108) | BOOL areaDoDraw(uiArea *a, UINT uMsg, WPARAM wParam, LPARAM lParam, LRES...
  function areaDrawOnResize (line 124) | void areaDrawOnResize(uiArea *a, RECT *newClient)

FILE: windows/areaevents.cpp
  function uiModifiers (line 7) | static uiModifiers getModifiers(void)
  function track (line 39) | static void track(uiArea *a, BOOL tracking)
  function capture (line 60) | static void capture(uiArea *a, BOOL capturing)
  function areaMouseEvent (line 78) | static void areaMouseEvent(uiArea *a, int down, int  up, WPARAM wParam, ...
  function onMouseEntered (line 158) | static void onMouseEntered(uiArea *a)
  function onMouseLeft (line 171) | static void onMouseLeft(uiArea *a)
  type extkeymap (line 181) | struct extkeymap {
  type extkeymap (line 187) | struct extkeymap
  type extkeymap (line 202) | struct extkeymap
  function areaKeyEvent (line 255) | static int areaKeyEvent(uiArea *a, int up, WPARAM wParam, LPARAM lParam)
  function BOOL (line 323) | BOOL areaDoEvents(uiArea *a, UINT uMsg, WPARAM wParam, LPARAM lParam, LR...
  function BOOL (line 400) | BOOL areaFilter(MSG *msg)

FILE: windows/areascroll.cpp
  type scrollParams (line 14) | struct scrollParams {
  function scrollto (line 22) | static void scrollto(uiArea *a, int which, struct scrollParams *p, int pos)
  function scrollby (line 51) | static void scrollby(uiArea *a, int which, struct scrollParams *p, int d...
  function scroll (line 56) | static void scroll(uiArea *a, int which, struct scrollParams *p, WPARAM ...
  function wheelscroll (line 101) | static void wheelscroll(uiArea *a, int which, struct scrollParams *p, WP...
  function hscrollParams (line 123) | static void hscrollParams(uiArea *a, struct scrollParams *p)
  function hscrollto (line 137) | static void hscrollto(uiArea *a, int pos)
  function hscrollby (line 145) | static void hscrollby(uiArea *a, int delta)
  function hscroll (line 153) | static void hscroll(uiArea *a, WPARAM wParam, LPARAM lParam)
  function hwheelscroll (line 161) | static void hwheelscroll(uiArea *a, WPARAM wParam, LPARAM lParam)
  function vscrollParams (line 169) | static void vscrollParams(uiArea *a, struct scrollParams *p)
  function vscrollto (line 182) | static void vscrollto(uiArea *a, int pos)
  function vscrollby (line 190) | static void vscrollby(uiArea *a, int delta)
  function vscroll (line 198) | static void vscroll(uiArea *a, WPARAM wParam, LPARAM lParam)
  function vwheelscroll (line 206) | static void vwheelscroll(uiArea *a, WPARAM wParam, LPARAM lParam)
  function BOOL (line 214) | BOOL areaDoScroll(uiArea *a, UINT uMsg, WPARAM wParam, LPARAM lParam, LR...
  function areaScrollOnResize (line 237) | void areaScrollOnResize(uiArea *a, RECT *client)
  function areaUpdateScroll (line 242) | void areaUpdateScroll(uiArea *a)

FILE: windows/areautil.cpp
  function loadAreaSize (line 5) | void loadAreaSize(uiArea *a, ID2D1RenderTarget *rt, double *width, doubl...
  function pixelsToDIP (line 20) | void pixelsToDIP(uiArea *a, double *x, double *y)
  function dipToPixels (line 30) | void dipToPixels(uiArea *a, double *x, double *y)

FILE: windows/attrstr.cpp
  type foreachParams (line 19) | struct foreachParams {
    type drawTextBackgroundParams (line 23) | struct drawTextBackgroundParams
  class combinedEffectsAttr (line 33) | class combinedEffectsAttr : public IUnknown {
    method setAttribute (line 39) | void setAttribute(uiAttribute *a)
    method attrEqual (line 64) | static bool attrEqual(uiAttribute *a, uiAttribute *b)
    method combinedEffectsAttr (line 73) | combinedEffectsAttr(uiAttribute *a)
    method QueryInterface (line 93) | QueryInterface(REFIID riid, void **ppvObject)
    method AddRef (line 106) | AddRef(void)
    method Release (line 112) | Release(void)
    method combinedEffectsAttr (line 122) | combinedEffectsAttr *cloneWith(uiAttribute *a)
    method hash (line 134) | size_t hash(void) const noexcept
    method equals (line 160) | bool equals(const combinedEffectsAttr *b) const
    method drawingEffectsAttr (line 169) | drawingEffectsAttr *toDrawingEffectsAttr(void)
  class applyEffectsHash (line 214) | class applyEffectsHash {
  class applyEffectsEqualTo (line 223) | class applyEffectsEqualTo {
  function HRESULT (line 232) | static HRESULT addEffectAttributeToRange(struct foreachParams *p, size_t...
  function addBackgroundParams (line 268) | static void addBackgroundParams(struct foreachParams *p, size_t start, s...
  function uiForEach (line 279) | static uiForEach processAttribute(const uiAttributedString *s, const uiA...
  function HRESULT (line 364) | static HRESULT applyEffectsAttributes(struct foreachParams *p)
  function uiprivAttributedStringApplyAttributesToDWriteTextLayout (line 413) | void uiprivAttributedStringApplyAttributesToDWriteTextLayout(uiDrawTextL...

FILE: windows/attrstr.hpp
  type fontCollection (line 8) | struct fontCollection {
  type drawTextBackgroundParams (line 29) | struct drawTextBackgroundParams
  type drawTextBackgroundParams (line 30) | struct drawTextBackgroundParams
  class drawingEffectsAttr (line 33) | class drawingEffectsAttr : public IUnknown {
  type drawTextBackgroundParams (line 66) | struct drawTextBackgroundParams {
  type fontDialogParams (line 76) | struct fontDialogParams {
  type fontDialogParams (line 82) | struct fontDialogParams
  type fontDialogParams (line 83) | struct fontDialogParams
  type fontDialogParams (line 84) | struct fontDialogParams
  type fontDialogParams (line 85) | struct fontDialogParams

FILE: windows/box.cpp
  type boxChild (line 4) | struct boxChild {
  type uiBox (line 11) | struct uiBox {
    type boxChild (line 14) | struct boxChild
  function boxPadding (line 19) | static void boxPadding(uiBox *b, int *xpadding, int *ypadding)
  function boxRelayout (line 31) | static void boxRelayout(uiBox *b)
  function uiBoxDestroy (line 123) | static void uiBoxDestroy(uiControl *c)
  function uiBoxSyncEnableState (line 147) | static void uiBoxSyncEnableState(uiWindowsControl *c, int enabled)
  function uiBoxMinimumSize (line 159) | static void uiBoxMinimumSize(uiWindowsControl *c, int *width, int *height)
  function uiBoxMinimumSizeChanged (line 226) | static void uiBoxMinimumSizeChanged(uiWindowsControl *c)
  function uiBoxChildVisibilityChanged (line 240) | static void uiBoxChildVisibilityChanged(uiWindowsControl *c)
  function boxArrangeChildren (line 246) | static void boxArrangeChildren(uiBox *b)
  function uiBoxAppend (line 257) | void uiBoxAppend(uiBox *b, uiControl *c, int stretchy)
  function uiBoxDelete (line 270) | void uiBoxDelete(uiBox *b, int index)
  function uiBoxPadded (line 282) | int uiBoxPadded(uiBox *b)
  function uiBoxSetPadded (line 287) | void uiBoxSetPadded(uiBox *b, int padded)
  function onResize (line 293) | static void onResize(uiWindowsControl *c)
  function uiBox (line 298) | static uiBox *finishNewBox(int vertical)
    type boxChild (line 14) | struct boxChild
  function uiBox (line 312) | uiBox *uiNewHorizontalBox(void)
    type boxChild (line 14) | struct boxChild
  function uiBox (line 317) | uiBox *uiNewVerticalBox(void)
    type boxChild (line 14) | struct boxChild

FILE: windows/button.cpp
  type uiButton (line 4) | struct uiButton {
  function BOOL (line 11) | static BOOL onWM_COMMAND(uiControl *c, HWND hwnd, WORD code, LRESULT *lR...
  function uiButtonDestroy (line 22) | static void uiButtonDestroy(uiControl *c)
  function uiButtonMinimumSize (line 36) | static void uiButtonMinimumSize(uiWindowsControl *c, int *width, int *he...
  function defaultOnClicked (line 62) | static void defaultOnClicked(uiButton *b, void *data)
  function uiButtonSetText (line 72) | void uiButtonSetText(uiButton *b, const char *text)
  function uiButtonOnClicked (line 79) | void uiButtonOnClicked(uiButton *b, void (*f)(uiButton *, void *), void ...
  function uiButton (line 85) | uiButton *uiNewButton(const char *text)

FILE: windows/checkbox.cpp
  type uiCheckbox (line 4) | struct uiCheckbox {
  function BOOL (line 11) | static BOOL onWM_COMMAND(uiControl *cc, HWND hwnd, WORD code, LRESULT *l...
  function uiCheckboxDestroy (line 30) | static void uiCheckboxDestroy(uiControl *cc)
  function uiCheckboxMinimumSize (line 46) | static void uiCheckboxMinimumSize(uiWindowsControl *cc, int *width, int ...
  function defaultOnToggled (line 60) | static void defaultOnToggled(uiCheckbox *c, void *data)
  function uiCheckboxSetText (line 70) | void uiCheckboxSetText(uiCheckbox *c, const char *text)
  function uiCheckboxOnToggled (line 77) | void uiCheckboxOnToggled(uiCheckbox *c, void (*f)(uiCheckbox *, void *),...
  function uiCheckboxChecked (line 83) | int uiCheckboxChecked(uiCheckbox *c)
  function uiCheckboxSetChecked (line 88) | void uiCheckboxSetChecked(uiCheckbox *c, int checked)
  function uiCheckbox (line 98) | uiCheckbox *uiNewCheckbox(const char *text)

FILE: windows/colorbutton.cpp
  type uiColorButton (line 4) | struct uiColorButton {
  function uiColorButtonDestroy (line 15) | static void uiColorButtonDestroy(uiControl *c)
  function BOOL (line 25) | static BOOL onWM_COMMAND(uiControl *c, HWND hwnd, WORD code, LRESULT *lR...
  function BOOL (line 52) | static BOOL onWM_NOTIFY(uiControl *c, HWND hwnd, NMHDR *nmhdr, LRESULT *...
  function uiColorButtonMinimumSize (line 115) | static void uiColorButtonMinimumSize(uiWindowsControl *c, int *width, in...
  function defaultOnChanged (line 141) | static void defaultOnChanged(uiColorButton *b, void *data)
  function uiColorButtonColor (line 146) | void uiColorButtonColor(uiColorButton *b, double *r, double *g, double *...
  function uiColorButtonSetColor (line 154) | void uiColorButtonSetColor(uiColorButton *b, double r, double g, double ...
  function uiColorButtonOnChanged (line 163) | void uiColorButtonOnChanged(uiColorButton *b, void (*f)(uiColorButton *,...
  function uiColorButton (line 169) | uiColorButton *uiNewColorButton(void)

FILE: windows/colordialog.cpp
  type colorDialog (line 6) | struct colorDialog {
    type colorDialogRGBA (line 26) | struct colorDialogRGBA
  function rgb2HSV (line 33) | static void rgb2HSV(double r, double g, double b, double *h, double *s, ...
  function hsv2RGB (line 83) | static void hsv2RGB(double h, double s, double v, double *r, double *g, ...
  function rgba2Hex (line 134) | static void rgba2Hex(uint8_t r, uint8_t g, uint8_t b, uint8_t a, WCHAR *...
  function convHexDigit (line 148) | static int convHexDigit(WCHAR c)
  function BOOL (line 160) | static BOOL hex2RGBA(WCHAR *buf, double *r, double *g, double *b, double...
  function updateDouble (line 223) | static void updateDouble(HWND hwnd, double d, HWND whichChanged)
  function updateDialog (line 234) | static void updateDialog(struct colorDialog *c, HWND whichChanged)
  function drawGrid (line 295) | static void drawGrid(ID2D1RenderTarget *rt, D2D1_RECT_F *fillRect)
  function drawSVChooser (line 379) | static void drawSVChooser(struct colorDialog *c, ID2D1RenderTarget *rt)
  function LRESULT (line 544) | static LRESULT CALLBACK svChooserSubProc(HWND hwnd, UINT uMsg, WPARAM wP...
  function drawArrow (line 572) | static void drawArrow(ID2D1RenderTarget *rt, D2D1_POINT_2F center, doubl...
  function drawHSlider (line 623) | static void drawHSlider(struct colorDialog *c, ID2D1RenderTarget *rt)
  function LRESULT (line 689) | static LRESULT CALLBACK hSliderSubProc(HWND hwnd, UINT uMsg, WPARAM wPar...
  function drawPreview (line 716) | static void drawPreview(struct colorDialog *c, ID2D1RenderTarget *rt)
  function LRESULT (line 750) | static LRESULT CALLBACK previewSubProc(HWND hwnd, UINT uMsg, WPARAM wPar...
  function drawOpacitySlider (line 770) | static void drawOpacitySlider(struct colorDialog *c, ID2D1RenderTarget *rt)
  function LRESULT (line 831) | static LRESULT CALLBACK opacitySliderSubProc(HWND hwnd, UINT uMsg, WPARA...
  function HWND (line 859) | HWND replaceWithD2DScratch(HWND parent, int id, SUBCLASSPROC subproc, vo...
  function LONG (line 877) | static LONG offsetTo(HWND a, HWND b)
  function moveWindowsUp (line 886) | static void moveWindowsUp(struct colorDialog *c, LONG by, ...)
  function fixupControlPositions (line 909) | static void fixupControlPositions(struct colorDialog *c)
  type colorDialog (line 955) | struct colorDialog
    type colorDialogRGBA (line 26) | struct colorDialogRGBA
  type colorDialog (line 957) | struct colorDialog
    type colorDialogRGBA (line 26) | struct colorDialogRGBA
  type colorDialogRGBA (line 961) | struct colorDialogRGBA
  function endColorDialog (line 994) | static void endColorDialog(struct colorDialog *c, INT_PTR code)
  function tryFinishDialog (line 1002) | static void tryFinishDialog(struct colorDialog *c, WPARAM wParam)
  function editDouble (line 1016) | static double editDouble(HWND hwnd)
  function hChanged (line 1027) | static void hChanged(struct colorDialog *c)
  function sChanged (line 1038) | static void sChanged(struct colorDialog *c)
  function vChanged (line 1049) | static void vChanged(struct colorDialog *c)
  function rDoubleChanged (line 1060) | static void rDoubleChanged(struct colorDialog *c)
  function gDoubleChanged (line 1072) | static void gDoubleChanged(struct colorDialog *c)
  function bDoubleChanged (line 1084) | static void bDoubleChanged(struct colorDialog *c)
  function aDoubleChanged (line 1096) | static void aDoubleChanged(struct colorDialog *c)
  function editInt (line 1107) | static int editInt(HWND hwnd)
  function rIntChanged (line 1118) | static void rIntChanged(struct colorDialog *c)
  function gIntChanged (line 1132) | static void gIntChanged(struct colorDialog *c)
  function bIntChanged (line 1146) | static void bIntChanged(struct colorDialog *c)
  function aIntChanged (line 1160) | static void aIntChanged(struct colorDialog *c)
  function hexChanged (line 1171) | static void hexChanged(struct colorDialog *c)
  type colorDialog (line 1189) | struct colorDialog
    type colorDialogRGBA (line 26) | struct colorDialogRGBA
  function INT_PTR (line 1204) | static INT_PTR CALLBACK colorDialogDlgProc(HWND hwnd, UINT uMsg, WPARAM ...
  function BOOL (line 1445) | BOOL showColorDialog(HWND parent, struct colorDialogRGBA *c)

FILE: windows/combobox.cpp
  type uiCombobox (line 6) | struct uiCombobox {
  function BOOL (line 13) | static BOOL onWM_COMMAND(uiControl *cc, HWND hwnd, WORD code, LRESULT *l...
  function uiComboboxDestroy (line 24) | void uiComboboxDestroy(uiControl *cc)
  function uiComboboxMinimumSize (line 39) | static void uiComboboxMinimumSize(uiWindowsControl *cc, int *width, int ...
  function defaultOnSelected (line 53) | static void defaultOnSelected(uiCombobox *c, void *data)
  function uiComboboxAppend (line 58) | void uiComboboxAppend(uiCombobox *c, const char *text)
  function uiComboboxSelected (line 72) | int uiComboboxSelected(uiCombobox *c)
  function uiComboboxSetSelected (line 82) | void uiComboboxSetSelected(uiCombobox *c, int n)
  function uiComboboxOnSelected (line 88) | void uiComboboxOnSelected(uiCombobox *c, void (*f)(uiCombobox *c, void *...
  function uiCombobox (line 94) | uiCombobox *uiNewCombobox(void)

FILE: windows/container.cpp
  type containerInit (line 12) | struct containerInit {
  function LRESULT (line 17) | static LRESULT CALLBACK containerWndProc(HWND hwnd, UINT uMsg, WPARAM wP...
  function ATOM (line 77) | ATOM initContainer(HICON hDefaultIcon, HCURSOR hDefaultCursor)
  function uninitContainer (line 92) | void uninitContainer(void)
  function HWND (line 98) | HWND uiWindowsMakeContainer(uiWindowsControl *c, void (*onResize)(uiWind...

FILE: windows/control.cpp
  function uiWindowsControlSyncEnableState (line 4) | void uiWindowsControlSyncEnableState(uiWindowsControl *c, int enabled)
  function uiWindowsControlSetParentHWND (line 9) | void uiWindowsControlSetParentHWND(uiWindowsControl *c, HWND parent)
  function uiWindowsControlMinimumSize (line 14) | void uiWindowsControlMinimumSize(uiWindowsControl *c, int *width, int *h...
  function uiWindowsControlMinimumSizeChanged (line 19) | void uiWindowsControlMinimumSizeChanged(uiWindowsControl *c)
  function uiWindowsControlLayoutRect (line 25) | void uiWindowsControlLayoutRect(uiWindowsControl *c, RECT *r)
  function uiWindowsControlAssignControlIDZOrder (line 30) | void uiWindowsControlAssignControlIDZOrder(uiWindowsControl *c, LONG_PTR...
  function uiWindowsControlChildVisibilityChanged (line 35) | void uiWindowsControlChildVisibilityChanged(uiWindowsControl *c)
  function HWND (line 40) | HWND uiWindowsEnsureCreateControlHWND(DWORD dwExStyle, LPCWSTR lpClassNa...
  function uiWindowsControl (line 66) | uiWindowsControl *uiWindowsAllocControl(size_t n, uint32_t typesig, cons...
  function BOOL (line 71) | BOOL uiWindowsShouldStopSyncEnableState(uiWindowsControl *c, BOOL enabled)
  function uiWindowsControlAssignSoleControlIDZOrder (line 83) | void uiWindowsControlAssignSoleControlIDZOrder(uiWindowsControl *c)
  function BOOL (line 93) | BOOL uiWindowsControlTooSmall(uiWindowsControl *c)
  function uiWindowsControlContinueMinimumSizeChanged (line 107) | void uiWindowsControlContinueMinimumSizeChanged(uiWindowsControl *c)
  function uiWindowsControlNotifyVisibilityChanged (line 117) | void uiWindowsControlNotifyVisibilityChanged(uiWindowsControl *c)

FILE: windows/d2dscratch.cpp
  function HRESULT (line 20) | static HRESULT d2dScratchDoPaint(HWND hwnd, ID2D1RenderTarget *rt)
  function d2dScratchDoLButtonDown (line 44) | static void d2dScratchDoLButtonDown(HWND hwnd, ID2D1RenderTarget *rt, LP...
  function LRESULT (line 64) | static LRESULT CALLBACK d2dScratchWndProc(HWND hwnd, UINT uMsg, WPARAM w...
  function ATOM (line 129) | ATOM registerD2DScratchClass(HICON hDefaultIcon, HCURSOR hDefaultCursor)
  function unregisterD2DScratchClass (line 144) | void unregisterD2DScratchClass(void)
  function HWND (line 150) | HWND newD2DScratch(HWND parent, RECT *rect, HMENU controlID, SUBCLASSPRO...

FILE: windows/datetimepicker.cpp
  type uiDateTimePicker (line 4) | struct uiDateTimePicker {
  function WCHAR (line 17) | static WCHAR *expandYear(WCHAR *dts, int n)
  function setDateTimeFormat (line 68) | static void setDateTimeFormat(HWND hwnd)
  function uiDateTimePickerDestroy (line 103) | static void uiDateTimePickerDestroy(uiControl *c)
  function uiDateTimePickerMinimumSize (line 119) | static void uiDateTimePickerMinimumSize(uiWindowsControl *c, int *width,...
  function BOOL (line 137) | static BOOL onWM_NOTIFY(uiControl *c, HWND hwnd, NMHDR *nmhdr, LRESULT *...
  function fromSystemTime (line 148) | static void fromSystemTime(SYSTEMTIME *systime, struct tm *time)
  function toSystemTime (line 161) | static void toSystemTime(const struct tm *time, SYSTEMTIME *systime)
  function defaultOnChanged (line 173) | static void defaultOnChanged(uiDateTimePicker *d, void *data)
  function uiDateTimePickerTime (line 178) | void uiDateTimePickerTime(uiDateTimePicker *d, struct tm *time)
  function uiDateTimePickerSetTime (line 187) | void uiDateTimePickerSetTime(uiDateTimePicker *d, const struct tm *time)
  function uiDateTimePickerOnChanged (line 196) | void uiDateTimePickerOnChanged(uiDateTimePicker *d, void (*f)(uiDateTime...
  function uiDateTimePicker (line 202) | static uiDateTimePicker *finishNewDateTimePicker(DWORD style)
  function LRESULT (line 224) | static LRESULT CALLBACK datetimepickerSubProc(HWND hwnd, UINT uMsg, WPAR...
  function uiDateTimePicker (line 241) | uiDateTimePicker *uiNewDateTimePicker(void)
  function uiDateTimePicker (line 253) | uiDateTimePicker *uiNewDatePicker(void)
  function uiDateTimePicker (line 258) | uiDateTimePicker *uiNewTimePicker(void)

FILE: windows/debug.cpp
  function printDebug (line 6) | static void printDebug(const WCHAR *msg)
  function HRESULT (line 11) | HRESULT _logLastError(debugargs, const WCHAR *s)
  function HRESULT (line 41) | HRESULT _logHRESULT(debugargs, const WCHAR *s, HRESULT hr)
  function uiprivRealBug (line 62) | void uiprivRealBug(const char *file, const char *line, const char *func,...

FILE: windows/draw.cpp
  function HRESULT (line 7) | HRESULT initDraw(void)
  function uninitDraw (line 20) | void uninitDraw(void)
  function ID2D1HwndRenderTarget (line 25) | ID2D1HwndRenderTarget *makeHWNDRenderTarget(HWND hwnd)
  function ID2D1DCRenderTarget (line 70) | ID2D1DCRenderTarget *makeHDCRenderTarget(HDC dc, RECT *r)
  function resetTarget (line 94) | static void resetTarget(ID2D1RenderTarget *rt)
  function uiDrawContext (line 106) | uiDrawContext *newContext(ID2D1RenderTarget *rt)
  function freeContext (line 117) | void freeContext(uiDrawContext *c)
  function ID2D1Brush (line 128) | static ID2D1Brush *makeSolidBrush(uiDrawBrush *b, ID2D1RenderTarget *rt,...
  function ID2D1GradientStopCollection (line 148) | static ID2D1GradientStopCollection *mkstops(uiDrawBrush *b, ID2D1RenderT...
  function ID2D1Brush (line 177) | static ID2D1Brush *makeLinearBrush(uiDrawBrush *b, ID2D1RenderTarget *rt...
  function ID2D1Brush (line 205) | static ID2D1Brush *makeRadialBrush(uiDrawBrush *b, ID2D1RenderTarget *rt...
  function ID2D1Brush (line 234) | static ID2D1Brush *makeBrush(uiDrawBrush *b, ID2D1RenderTarget *rt)
  function ID2D1Layer (line 271) | static ID2D1Layer *applyClip(uiDrawContext *c)
  function unapplyClip (line 312) | static void unapplyClip(uiDrawContext *c, ID2D1Layer *layer)
  function uiDrawStroke (line 320) | void uiDrawStroke(uiDrawContext *c, uiDrawPath *p, uiDrawBrush *b, uiDra...
  function uiDrawFill (line 395) | void uiDrawFill(uiDrawContext *c, uiDrawPath *p, uiDrawBrush *b)
  function uiDrawTransform (line 410) | void uiDrawTransform(uiDrawContext *c, uiDrawMatrix *m)
  function uiDrawClip (line 427) | void uiDrawClip(uiDrawContext *c, uiDrawPath *path)
  type drawState (line 469) | struct drawState {
  function uiDrawSave (line 474) | void uiDrawSave(uiDrawContext *c)
  function uiDrawRestore (line 496) | void uiDrawRestore(uiDrawContext *c)

FILE: windows/draw.hpp
  type uiDrawContext (line 7) | struct uiDrawContext {
    type drawState (line 10) | struct drawState

FILE: windows/drawmatrix.cpp
  function m2d (line 5) | void m2d(uiDrawMatrix *m, D2D1_MATRIX_3X2_F *d)
  function d2m (line 15) | static void d2m(D2D1_MATRIX_3X2_F *d, uiDrawMatrix *m)
  function uiDrawMatrixTranslate (line 25) | void uiDrawMatrixTranslate(uiDrawMatrix *m, double x, double y)
  function uiDrawMatrixScale (line 34) | void uiDrawMatrixScale(uiDrawMatrix *m, double xCenter, double yCenter, ...
  function uiDrawMatrixRotate (line 48) | void uiDrawMatrixRotate(uiDrawMatrix *m, double x, double y, double amount)
  function uiDrawMatrixSkew (line 60) | void uiDrawMatrixSkew(uiDrawMatrix *m, double x, double y, double xamoun...
  function uiDrawMatrixMultiply (line 72) | void uiDrawMatrixMultiply(uiDrawMatrix *dest, uiDrawMatrix *src)
  function uiDrawMatrixInvertible (line 82) | int uiDrawMatrixInvertible(uiDrawMatrix *m)
  function uiDrawMatrixInvert (line 90) | int uiDrawMatrixInvert(uiDrawMatrix *m)
  function uiDrawMatrixTransformPoint (line 101) | void uiDrawMatrixTransformPoint(uiDrawMatrix *m, double *x, double *y)
  function uiDrawMatrixTransformSize (line 114) | void uiDrawMatrixTransformSize(uiDrawMatrix *m, double *x, double *y)

FILE: windows/drawpath.cpp
  type uiDrawPath (line 9) | struct uiDrawPath {
  function uiDrawPath (line 15) | uiDrawPath *uiDrawNewPath(uiDrawFillMode fillmode)
  function uiDrawFreePath (line 38) | void uiDrawFreePath(uiDrawPath *p)
  function uiDrawPathNewFigure (line 49) | void uiDrawPathNewFigure(uiDrawPath *p, double x, double y)
  type arc (line 71) | struct arc {
  function drawArc (line 84) | static void drawArc(uiDrawPath *p, struct arc *a, void (*startFunction)(...
  function uiDrawPathNewFigureWithArc (line 161) | void uiDrawPathNewFigureWithArc(uiDrawPath *p, double xCenter, double yC...
  function uiDrawPathLineTo (line 174) | void uiDrawPathLineTo(uiDrawPath *p, double x, double y)
  function uiDrawPathArcTo (line 183) | void uiDrawPathArcTo(uiDrawPath *p, double xCenter, double yCenter, doub...
  function uiDrawPathBezierTo (line 196) | void uiDrawPathBezierTo(uiDrawPath *p, double c1x, double c1y, double c2...
  function uiDrawPathCloseFigure (line 209) | void uiDrawPathCloseFigure(uiDrawPath *p)
  function uiDrawPathAddRectangle (line 215) | void uiDrawPathAddRectangle(uiDrawPath *p, double x, double y, double wi...
  function uiDrawPathEnd (line 225) | void uiDrawPathEnd(uiDrawPath *p)
  function ID2D1PathGeometry (line 242) | ID2D1PathGeometry *pathGeometry(uiDrawPath *p)

FILE: windows/drawtext.cpp
  type uiDrawTextLayout (line 8) | struct uiDrawTextLayout {
    type drawTextBackgroundParams (line 11) | struct drawTextBackgroundParams
  function uiDrawTextLayout (line 33) | uiDrawTextLayout *uiDrawNewTextLayout(uiDrawTextLayoutParams *p)
    type drawTextBackgroundParams (line 11) | struct drawTextBackgroundParams
  function uiDrawFreeTextLayout (line 96) | void uiDrawFreeTextLayout(uiDrawTextLayout *tl)
  function HRESULT (line 109) | static HRESULT mkSolidBrush(ID2D1RenderTarget *rt, double r, double g, d...
  function ID2D1SolidColorBrush (line 129) | static ID2D1SolidColorBrush *mustMakeSolidBrush(ID2D1RenderTarget *rt, d...
  function HRESULT (line 150) | HRESULT STDMETHODCALLTYPE drawingEffectsAttr::QueryInterface(REFIID riid...
  function ULONG (line 163) | ULONG STDMETHODCALLTYPE drawingEffectsAttr::AddRef(void)
  function ULONG (line 169) | ULONG STDMETHODCALLTYPE drawingEffectsAttr::Release(void)
  function HRESULT (line 203) | HRESULT drawingEffectsAttr::mkColorBrush(ID2D1RenderTarget *rt, ID2D1Sol...
  function HRESULT (line 212) | HRESULT drawingEffectsAttr::underline(uiUnderline *u)
  function HRESULT (line 222) | HRESULT drawingEffectsAttr::mkUnderlineBrush(ID2D1RenderTarget *rt, ID2D...
  class textRenderer (line 232) | class textRenderer : public IDWriteTextRenderer {
    method textRenderer (line 238) | textRenderer(ID2D1RenderTarget *rt, BOOL snap, ID2D1SolidColorBrush *b...
    method QueryInterface (line 247) | QueryInterface(REFIID riid, void **ppvObject)
    method AddRef (line 262) | AddRef(void)
    method Release (line 268) | Release(void)
    method GetCurrentTransform (line 279) | GetCurrentTransform(void *clientDrawingContext, DWRITE_MATRIX *transform)
    method GetPixelsPerDip (line 295) | GetPixelsPerDip(void *clientDrawingContext, FLOAT *pixelsPerDip)
    method IsPixelSnappingDisabled (line 306) | IsPixelSnappingDisabled(void *clientDrawingContext, BOOL *isDisabled)
    method DrawGlyphRun (line 315) | DrawGlyphRun(void *clientDrawingContext, FLOAT baselineOriginX, FLOAT ...
    method DrawInlineObject (line 344) | DrawInlineObject(void *clientDrawingContext, FLOAT originX, FLOAT orig...
    method DrawStrikethrough (line 354) | DrawStrikethrough(void *clientDrawingContext, FLOAT baselineOriginX, F...
    method DrawUnderline (line 361) | DrawUnderline(void *clientDrawingContext, FLOAT baselineOriginX, FLOAT...
  function uiDrawText (line 476) | void uiDrawText(uiDrawContext *c, uiDrawTextLayout *tl, double x, double y)
  function uiDrawTextLayoutExtents (line 525) | void uiDrawTextLayoutExtents(uiDrawTextLayout *tl, double *width, double...

FILE: windows/dwrite.cpp
  function HRESULT (line 8) | HRESULT uiprivInitDrawText(void)
  function uiprivUninitDrawText (line 16) | void uiprivUninitDrawText(void)
  function fontCollection (line 21) | fontCollection *uiprivLoadFontCollection(void)
  function uiprivFontCollectionFree (line 35) | void uiprivFontCollectionFree(fontCollection *fc)
  function WCHAR (line 41) | WCHAR *uiprivFontCollectionFamilyName(fontCollection *fc, IDWriteFontFam...
  function WCHAR (line 55) | WCHAR *uiprivFontCollectionCorrectString(fontCollection *fc, IDWriteLoca...

FILE: windows/editablecombo.cpp
  type uiEditableCombobox (line 8) | struct uiEditableCombobox {
  function BOOL (line 15) | static BOOL onWM_COMMAND(uiControl *cc, HWND hwnd, WORD code, LRESULT *l...
  function uiEditableComboboxDestroy (line 36) | void uiEditableComboboxDestroy(uiControl *cc)
  function uiEditableComboboxMinimumSize (line 51) | static void uiEditableComboboxMinimumSize(uiWindowsControl *cc, int *wid...
  function defaultOnChanged (line 65) | static void defaultOnChanged(uiEditableCombobox *c, void *data)
  function uiEditableComboboxAppend (line 70) | void uiEditableComboboxAppend(uiEditableCombobox *c, const char *text)
  function uiEditableComboboxSetText (line 89) | void uiEditableComboboxSetText(uiEditableCombobox *c, const char *text)
  function uiEditableComboboxOnChanged (line 95) | void uiEditableComboboxOnChanged(uiEditableCombobox *c, void (*f)(uiEdit...
  function uiEditableCombobox (line 101) | uiEditableCombobox *uiNewEditableCombobox(void)

FILE: windows/entry.cpp
  type uiEntry (line 4) | struct uiEntry {
  function BOOL (line 12) | static BOOL onWM_COMMAND(uiControl *c, HWND hwnd, WORD code, LRESULT *lR...
  function uiEntryDestroy (line 25) | static void uiEntryDestroy(uiControl *c)
  function uiEntryMinimumSize (line 40) | static void uiEntryMinimumSize(uiWindowsControl *c, int *width, int *hei...
  function defaultOnChanged (line 54) | static void defaultOnChanged(uiEntry *e, void *data)
  function uiEntrySetText (line 64) | void uiEntrySetText(uiEntry *e, const char *text)
  function uiEntryOnChanged (line 73) | void uiEntryOnChanged(uiEntry *e, void (*f)(uiEntry *, void *), void *data)
  function uiEntryReadOnly (line 79) | int uiEntryReadOnly(uiEntry *e)
  function uiEntrySetReadOnly (line 84) | void uiEntrySetReadOnly(uiEntry *e, int readonly)
  function uiEntry (line 95) | static uiEntry *finishNewEntry(DWORD style)
  function uiEntry (line 113) | uiEntry *uiNewEntry(void)
  function uiEntry (line 118) | uiEntry *uiNewPasswordEntry(void)
  function uiEntry (line 123) | uiEntry *uiNewSearchEntry(void)

FILE: windows/events.cpp
  type handler (line 4) | struct handler {
    method handler (line 12) | handler()
  type handler (line 21) | struct handler
    method handler (line 12) | handler()
  function uiWindowsRegisterWM_COMMANDHandler (line 23) | void uiWindowsRegisterWM_COMMANDHandler(HWND hwnd, BOOL (*handler)(uiCon...
  function uiWindowsRegisterWM_NOTIFYHandler (line 31) | void uiWindowsRegisterWM_NOTIFYHandler(HWND hwnd, BOOL (*handler)(uiCont...
  function uiWindowsRegisterWM_HSCROLLHandler (line 39) | void uiWindowsRegisterWM_HSCROLLHandler(HWND hwnd, BOOL (*handler)(uiCon...
  function uiWindowsUnregisterWM_COMMANDHandler (line 47) | void uiWindowsUnregisterWM_COMMANDHandler(HWND hwnd)
  function uiWindowsUnregisterWM_NOTIFYHandler (line 54) | void uiWindowsUnregisterWM_NOTIFYHandler(HWND hwnd)
  function uiWindowsUnregisterWM_HSCROLLHandler (line 61) | void uiWindowsUnregisterWM_HSCROLLHandler(HWND hwnd)
  function BOOL (line 69) | static BOOL shouldRun(HWND hwnd, T method)
  function BOOL (line 81) | BOOL runWM_COMMAND(WPARAM wParam, LPARAM lParam, LRESULT *lResult)
  function BOOL (line 97) | BOOL runWM_NOTIFY(WPARAM wParam, LPARAM lParam, LRESULT *lResult)
  function BOOL (line 113) | BOOL runWM_HSCROLL(WPARAM wParam, LPARAM lParam, LRESULT *lResult)
  function uiWindowsRegisterReceiveWM_WININICHANGE (line 131) | void uiWindowsRegisterReceiveWM_WININICHANGE(HWND hwnd)
  function uiWindowsUnregisterReceiveWM_WININICHANGE (line 138) | void uiWindowsUnregisterReceiveWM_WININICHANGE(HWND hwnd)
  function issueWM_WININICHANGE (line 145) | void issueWM_WININICHANGE(WPARAM wParam, LPARAM lParam)

FILE: windows/fontbutton.cpp
  type uiFontButton (line 5) | struct uiFontButton {
    type fontDialogParams (line 8) | struct fontDialogParams
  function uiFontButtonDestroy (line 14) | static void uiFontButtonDestroy(uiControl *c)
  function updateFontButtonLabel (line 24) | static void updateFontButtonLabel(uiFontButton *b)
  function BOOL (line 36) | static BOOL onWM_COMMAND(uiControl *c, HWND hwnd, WORD code, LRESULT *lR...
  function uiFontButtonMinimumSize (line 59) | static void uiFontButtonMinimumSize(uiWindowsControl *c, int *width, int...
  function defaultOnChanged (line 85) | static void defaultOnChanged(uiFontButton *b, void *data)
  function uiFontButtonFont (line 90) | void uiFontButtonFont(uiFontButton *b, uiFontDescriptor *desc)
  function uiFontButtonOnChanged (line 97) | void uiFontButtonOnChanged(uiFontButton *b, void (*f)(uiFontButton *, vo...
  function uiFontButton (line 103) | uiFontButton *uiNewFontButton(void)
    type fontDialogParams (line 8) | struct fontDialogParams
  function uiFreeFontButtonFont (line 125) | void uiFreeFontButtonFont(uiFontDescriptor *desc)

FILE: windows/fontdialog.cpp
  type fontDialog (line 13) | struct fontDialog {
    type fontDialogParams (line 19) | struct fontDialogParams
    type fontCollection (line 21) | struct fontCollection
  function LRESULT (line 38) | static LRESULT cbAddString(HWND cb, const WCHAR *str)
  function LRESULT (line 48) | static LRESULT cbInsertString(HWND cb, const WCHAR *str, WPARAM pos)
  function LRESULT (line 58) | static LRESULT cbGetItemData(HWND cb, WPARAM item)
  function cbSetItemData (line 68) | static void cbSetItemData(HWND cb, WPARAM item, LPARAM data)
  function BOOL (line 74) | static BOOL cbGetCurSel(HWND cb, LRESULT *sel)
  function cbSetCurSel (line 86) | static void cbSetCurSel(HWND cb, WPARAM item)
  function LRESULT (line 92) | static LRESULT cbGetCount(HWND cb)
  function cbWipeAndReleaseData (line 102) | static void cbWipeAndReleaseData(HWND cb)
  function WCHAR (line 115) | static WCHAR *cbGetItemText(HWND cb, WPARAM item)
  function BOOL (line 130) | static BOOL cbTypeToSelect(HWND cb, LRESULT *posOut, BOOL restoreAfter)
  function wipeStylesBox (line 158) | static void wipeStylesBox(struct fontDialog *f)
  function WCHAR (line 163) | static WCHAR *fontStyleName(struct fontCollection *fc, IDWriteFont *font)
  function queueRedrawSampleText (line 177) | static void queueRedrawSampleText(struct fontDialog *f)
  function styleChanged (line 183) | static void styleChanged(struct fontDialog *f)
  function styleEdited (line 203) | static void styleEdited(struct fontDialog *f)
  function familyChanged (line 209) | static void familyChanged(struct fontDialog *f)
  function familyEdited (line 271) | static void familyEdited(struct fontDialog *f)
  function sizeChanged (line 300) | static void sizeChanged(struct fontDialog *f)
  function sizeEdited (line 312) | static void sizeEdited(struct fontDialog *f)
  function fontDialogDrawSampleText (line 333) | static void fontDialogDrawSampleText(struct fontDialog *f, ID2D1RenderTa...
  function LRESULT (line 409) | static LRESULT CALLBACK fontDialogSampleSubProc(HWND hwnd, UINT uMsg, WP...
  function setupInitialFontDialogState (line 428) | static void setupInitialFontDialogState(struct fontDialog *f)
  type fontDialog (line 459) | struct fontDialog
    type fontDialogParams (line 19) | struct fontDialogParams
    type fontCollection (line 21) | struct fontCollection
  type fontDialog (line 461) | struct fontDialog
    type fontDialogParams (line 19) | struct fontDialogParams
    type fontCollection (line 21) | struct fontCollection
  type fontDialogParams (line 471) | struct fontDialogParams
  function endFontDialog (line 502) | static void endFontDialog(struct fontDialog *f, INT_PTR code)
  function INT_PTR (line 512) | static INT_PTR tryFinishDialog(struct fontDialog *f, WPARAM wParam)
  function INT_PTR (line 535) | static INT_PTR CALLBACK fontDialogDlgProc(HWND hwnd, UINT uMsg, WPARAM w...
  function BOOL (line 691) | BOOL uiprivShowFontDialog(HWND parent, struct fontDialogParams *params)
  function IDWriteFontFamily (line 705) | static IDWriteFontFamily *tryFindFamily(IDWriteFontCollection *fc, const...
  function uiprivLoadInitialFontDialogParams (line 723) | void uiprivLoadInitialFontDialogParams(struct fontDialogParams *params)
  function uiprivDestroyFontDialogParams (line 769) | void uiprivDestroyFontDialogParams(struct fontDialogParams *params)
  function WCHAR (line 776) | WCHAR *uiprivFontDialogParamsToString(struct fontDialogParams *params)

FILE: windows/fontmatch.cpp
  function DWRITE_FONT_WEIGHT (line 30) | DWRITE_FONT_WEIGHT uiprivWeightToDWriteWeight(uiTextWeight w)
  function DWRITE_FONT_STYLE (line 35) | DWRITE_FONT_STYLE uiprivItalicToDWriteStyle(uiTextItalic i)
  function DWRITE_FONT_STRETCH (line 40) | DWRITE_FONT_STRETCH uiprivStretchToDWriteStretch(uiTextStretch s)
  function uiprivFontDescriptorFromIDWriteFont (line 45) | void uiprivFontDescriptorFromIDWriteFont(IDWriteFont *font, uiFontDescri...

FILE: windows/form.cpp
  type formChild (line 4) | struct formChild {
  type uiForm (line 11) | struct uiForm {
    type formChild (line 14) | struct formChild
  function formPadding (line 18) | static void formPadding(uiForm *f, int *xpadding, int *ypadding)
  function formRelayout (line 34) | static void formRelayout(uiForm *f)
  function uiFormDestroy (line 126) | static void uiFormDestroy(uiControl *c)
  function uiFormSyncEnableState (line 151) | static void uiFormSyncEnableState(uiWindowsControl *c, int enabled)
  function uiFormMinimumSize (line 163) | static void uiFormMinimumSize(uiWindowsControl *c, int *width, int *height)
  function uiFormMinimumSizeChanged (line 223) | static void uiFormMinimumSizeChanged(uiWindowsControl *c)
  function uiFormChildVisibilityChanged (line 237) | static void uiFormChildVisibilityChanged(uiWindowsControl *c)
  function formArrangeChildren (line 243) | static void formArrangeChildren(uiForm *f)
  function uiFormAppend (line 257) | void uiFormAppend(uiForm *f, const char *label, uiControl *c, int stretchy)
  function uiFormDelete (line 279) | void uiFormDelete(uiForm *f, int index)
  function uiFormPadded (line 292) | int uiFormPadded(uiForm *f)
  function uiFormSetPadded (line 297) | void uiFormSetPadded(uiForm *f, int padded)
  function onResize (line 303) | static void onResize(uiWindowsControl *c)
  function uiForm (line 308) | uiForm *uiNewForm(void)
    type formChild (line 14) | struct formChild

FILE: windows/graphemes.cpp
  function uiprivGraphemesTakesUTF16 (line 9) | int uiprivGraphemesTakesUTF16(void)
  function uiprivGraphemes (line 14) | uiprivGraphemes *uiprivNewGraphemes(void *s, size_t len)

FILE: windows/grid.cpp
  type gridChild (line 11) | struct gridChild {
  type uiGrid (line 28) | struct uiGrid {
    type gridChild (line 31) | struct gridChild
  function gridRecomputeMinMax (line 39) | static bool gridRecomputeMinMax(uiGrid *g)
  class gridLayoutData (line 72) | class gridLayoutData {
    method gridLayoutData (line 85) | gridLayoutData(uiGrid *g)
    method visibleRow (line 148) | bool visibleRow(uiGrid *g, int y)
    method visibleColumn (line 162) | bool visibleColumn(uiGrid *g, int x)
  function gridPadding (line 177) | static void gridPadding(uiGrid *g, int *xpadding, int *ypadding)
  function gridRelayout (line 189) | static void gridRelayout(uiGrid *g)
  function uiGridDestroy (line 414) | static void uiGridDestroy(uiControl *c)
  function uiGridSyncEnableState (line 440) | static void uiGridSyncEnableState(uiWindowsControl *c, int enabled)
  function uiGridMinimumSize (line 452) | static void uiGridMinimumSize(uiWindowsControl *c, int *width, int *height)
  function uiGridMinimumSizeChanged (line 507) | static void uiGridMinimumSizeChanged(uiWindowsControl *c)
  function uiGridChildVisibilityChanged (line 521) | static void uiGridChildVisibilityChanged(uiWindowsControl *c)
  function gridArrangeChildren (line 528) | static void gridArrangeChildren(uiGrid *g)
  type gridChild (line 560) | struct gridChild
  type gridChild (line 562) | struct gridChild
  function add (line 579) | static void add(uiGrid *g, struct gridChild *gc)
  function uiGridAppend (line 590) | void uiGridAppend(uiGrid *g, uiControl *c, int left, int top, int xspan,...
  function uiGridInsertAt (line 601) | void uiGridInsertAt(uiGrid *g, uiControl *c, uiControl *existing, uiAt a...
  function uiGridPadded (line 630) | int uiGridPadded(uiGrid *g)
  function uiGridSetPadded (line 635) | void uiGridSetPadded(uiGrid *g, int padded)
  function onResize (line 641) | static void onResize(uiWindowsControl *c)
  function uiGrid (line 646) | uiGrid *uiNewGrid(void)
    type gridChild (line 31) | struct gridChild

FILE: windows/group.cpp
  type uiGroup (line 4) | struct uiGroup {
    type uiControl (line 7) | struct uiControl
  function groupMargins (line 23) | static void groupMargins(uiGroup *g, int *mx, int *mtop, int *mbottom)
  function groupRelayout (line 40) | static void groupRelayout(uiGroup *g)
  function uiGroupDestroy (line 56) | static void uiGroupDestroy(uiControl *c)
  function uiGroupSyncEnableState (line 79) | static void uiGroupSyncEnableState(uiWindowsControl *c, int enabled)
  function uiGroupMinimumSize (line 92) | static void uiGroupMinimumSize(uiWindowsControl *c, int *width, int *hei...
  function uiGroupMinimumSizeChanged (line 110) | static void uiGroupMinimumSizeChanged(uiWindowsControl *c)
  function uiGroupChildVisibilityChanged (line 124) | static void uiGroupChildVisibilityChanged(uiWindowsControl *c)
  function uiGroupSetTitle (line 135) | void uiGroupSetTitle(uiGroup *g, const char *text)
  function uiGroupSetChild (line 142) | void uiGroupSetChild(uiGroup *g, uiControl *child)
  function uiGroupMargined (line 157) | int uiGroupMargined(uiGroup *g)
  function uiGroupSetMargined (line 162) | void uiGroupSetMargined(uiGroup *g, int margined)
  function LRESULT (line 168) | static LRESULT CALLBACK groupSubProc(HWND hwnd, UINT uMsg, WPARAM wParam...
  function uiGroup (line 198) | uiGroup *uiNewGroup(const char *text)
    type uiControl (line 7) | struct uiControl

FILE: windows/image.cpp
  function HRESULT (line 8) | HRESULT uiprivInitImage(void)
  function uiprivUninitImage (line 14) | void uiprivUninitImage(void)
  type uiImage (line 20) | struct uiImage {
  function uiImage (line 26) | uiImage *uiNewImage(double width, double height)
  function uiFreeImage (line 37) | void uiFreeImage(uiImage *i)
  function uiImageAppend (line 52) | void uiImageAppend(uiImage *i, void *pixels, int pixelWidth, int pixelHe...
  type matcher (line 111) | struct matcher {
  function match (line 121) | static void match(IWICBitmap *b, struct matcher *m)
  function IWICBitmap (line 163) | IWICBitmap *uiprivImageAppropriateForDC(uiImage *i, HDC dc)
  function HRESULT (line 180) | HRESULT uiprivWICToGDI(IWICBitmap *b, HDC dc, int width, int height, HBI...

FILE: windows/init.cpp
  function uiUninit (line 141) | void uiUninit(void)
  function uiFreeInitError (line 163) | void uiFreeInitError(const char *err)
  function BOOL (line 169) | BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReser...

FILE: windows/label.cpp
  type uiLabel (line 4) | struct uiLabel {
  function uiLabelMinimumSize (line 14) | static void uiLabelMinimumSize(uiWindowsControl *c, int *width, int *hei...
  function uiLabelSetText (line 32) | void uiLabelSetText(uiLabel *l, const char *text)
  function uiLabel (line 39) | uiLabel *uiNewLabel(const char *text)

FILE: windows/main.cpp
  function LRESULT (line 6) | static LRESULT CALLBACK filterProc(int code, WPARAM wParam, LPARAM lParam)
  function registerMessageFilter (line 29) | int registerMessageFilter(void)
  function unregisterMessageFilter (line 38) | void unregisterMessageFilter(void)
  function processMessage (line 46) | static void processMessage(MSG *msg)
  function waitMessage (line 62) | static int waitMessage(MSG *msg)
  function uiMain (line 74) | void uiMain(void)
  function uiMainSteps (line 80) | void uiMainSteps(void)
  function peekMessage (line 85) | static int peekMessage(MSG *msg)
  function uiMainStep (line 97) | int uiMainStep(int wait)
  function uiQuit (line 120) | void uiQuit(void)
  function uiQueueMain (line 125) | void uiQueueMain(void (*f)(void *data), void *data)
  function uiTimer (line 134) | void uiTimer(int milliseconds, int (*f)(void *data), void *data)
  function uiprivFreeTimer (line 147) | void uiprivFreeTimer(uiprivTimer *t)
  function uiprivUninitTimers (line 154) | void uiprivUninitTimers(void)

FILE: windows/menu.cpp
  type uiMenu (line 15) | struct uiMenu {
  type uiMenuItem (line 22) | struct uiMenuItem {
  function sync (line 46) | static void sync(uiMenuItem *item)
  function defaultOnClicked (line 64) | static void defaultOnClicked(uiMenuItem *item, uiWindow *w, void *data)
  function onQuitClicked (line 69) | static void onQuitClicked(uiMenuItem *item, uiWindow *w, void *data)
  function uiMenuItemEnable (line 75) | void uiMenuItemEnable(uiMenuItem *i)
  function uiMenuItemDisable (line 81) | void uiMenuItemDisable(uiMenuItem *i)
  function uiMenuItemOnClicked (line 87) | void uiMenuItemOnClicked(uiMenuItem *i, void (*f)(uiMenuItem *, uiWindow...
  function uiMenuItemChecked (line 95) | int uiMenuItemChecked(uiMenuItem *i)
  function uiMenuItemSetChecked (line 100) | void uiMenuItemSetChecked(uiMenuItem *i, int checked)
  function uiMenuItem (line 109) | static uiMenuItem *newItem(uiMenu *m, int type, const char *name)
  function uiMenuItem (line 159) | uiMenuItem *uiMenuAppendItem(uiMenu *m, const char *name)
  function uiMenuItem (line 164) | uiMenuItem *uiMenuAppendCheckItem(uiMenu *m, const char *name)
  function uiMenuItem (line 169) | uiMenuItem *uiMenuAppendQuitItem(uiMenu *m)
  function uiMenuItem (line 178) | uiMenuItem *uiMenuAppendPreferencesItem(uiMenu *m)
  function uiMenuItem (line 187) | uiMenuItem *uiMenuAppendAboutItem(uiMenu *m)
  function uiMenuAppendSeparator (line 197) | void uiMenuAppendSeparator(uiMenu *m)
  function uiMenu (line 202) | uiMenu *uiNewMenu(const char *name)
  function appendMenuItem (line 223) | static void appendMenuItem(HMENU menu, uiMenuItem *item)
  function HMENU (line 246) | static HMENU makeMenu(uiMenu *m)
  function HMENU (line 259) | HMENU makeMenubar(void)
  function runMenuEvent (line 280) | void runMenuEvent(WORD id, uiWindow *w)
  function freeMenu (line 307) | static void freeMenu(uiMenu *m, HMENU submenu)
  function freeMenubar (line 327) | void freeMenubar(HMENU menubar)
  function uninitMenus (line 343) | void uninitMenus(void)

FILE: windows/multilineentry.cpp
  type uiMultilineEntry (line 6) | struct uiMultilineEntry {
  function BOOL (line 14) | static BOOL onWM_COMMAND(uiControl *c, HWND hwnd, WORD code, LRESULT *lR...
  function uiMultilineEntryDestroy (line 27) | static void uiMultilineEntryDestroy(uiControl *c)
  function uiMultilineEntryMinimumSize (line 43) | static void uiMultilineEntryMinimumSize(uiWindowsControl *c, int *width,...
  function defaultOnChanged (line 57) | static void defaultOnChanged(uiMultilineEntry *e, void *data)
  function uiMultilineEntrySetText (line 71) | void uiMultilineEntrySetText(uiMultilineEntry *e, const char *text)
  function uiMultilineEntryAppend (line 84) | void uiMultilineEntryAppend(uiMultilineEntry *e, const char *text)
  function uiMultilineEntryOnChanged (line 104) | void uiMultilineEntryOnChanged(uiMultilineEntry *e, void (*f)(uiMultilin...
  function uiMultilineEntryReadOnly (line 110) | int uiMultilineEntryReadOnly(uiMultilineEntry *e)
  function uiMultilineEntrySetReadOnly (line 115) | void uiMultilineEntrySetReadOnly(uiMultilineEntry *e, int readonly)
  function uiMultilineEntry (line 126) | static uiMultilineEntry *finishMultilineEntry(DWORD style)
  function uiMultilineEntry (line 144) | uiMultilineEntry *uiNewMultilineEntry(void)
  function uiMultilineEntry (line 149) | uiMultilineEntry *uiNewNonWrappingMultilineEntry(void)

FILE: windows/opentype.cpp
  function uiForEach (line 7) | static uiForEach addToTypography(const uiOpenTypeFeatures *otf, char a, ...
  function IDWriteTypography (line 23) | IDWriteTypography *uiprivOpenTypeFeaturesToIDWriteTypography(const uiOpe...

FILE: windows/parent.cpp
  function HWND (line 9) | static HWND parentWithBackground(HWND hwnd)
  type parentDraw (line 26) | struct parentDraw {
  function HRESULT (line 32) | static HRESULT parentDraw(HDC dc, HWND parent, struct parentDraw *pd)
  function endParentDraw (line 50) | static void endParentDraw(struct parentDraw *pd)
  function HBRUSH (line 65) | static HBRUSH getControlBackgroundBrush(HWND hwnd, HDC dc)
  function paintContainerBackground (line 97) | void paintContainerBackground(HWND hwnd, HDC dc, RECT *paintRect)
  function BOOL (line 121) | BOOL handleParentMessages(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP...

FILE: windows/progressbar.cpp
  type uiProgressBar (line 4) | struct uiProgressBar {
  function uiProgressBarMinimumSize (line 15) | static void uiProgressBarMinimumSize(uiWindowsControl *c, int *width, in...
  function uiProgressBarValue (line 31) | int uiProgressBarValue(uiProgressBar *p)
  function uiProgressBarSetValue (line 42) | void uiProgressBarSetValue(uiProgressBar *p, int value)
  function uiProgressBar (line 70) | uiProgressBar *uiNewProgressBar(void)

FILE: windows/radiobuttons.cpp
  type uiRadioButtons (line 11) | struct uiRadioButtons {
  function BOOL (line 19) | static BOOL onWM_COMMAND(uiControl *c, HWND clicked, WORD code, LRESULT ...
  function defaultOnSelected (line 37) | static void defaultOnSelected(uiRadioButtons *r, void *data)
  function uiRadioButtonsDestroy (line 42) | static void uiRadioButtonsDestroy(uiControl *c)
  function uiRadioButtonsMinimumSize (line 63) | static void uiRadioButtonsMinimumSize(uiWindowsControl *c, int *width, i...
  function radiobuttonsRelayout (line 91) | static void radiobuttonsRelayout(uiRadioButtons *r)
  function radiobuttonsArrangeChildren (line 114) | static void radiobuttonsArrangeChildren(uiRadioButtons *r)
  function uiRadioButtonsAppend (line 125) | void uiRadioButtonsAppend(uiRadioButtons *r, const char *text)
  function uiRadioButtonsSelected (line 151) | int uiRadioButtonsSelected(uiRadioButtons *r)
  function uiRadioButtonsSetSelected (line 161) | void uiRadioButtonsSetSelected(uiRadioButtons *r, int n)
  function uiRadioButtonsOnSelected (line 172) | void uiRadioButtonsOnSelected(uiRadioButtons *r, void (*f)(uiRadioButton...
  function onResize (line 178) | static void onResize(uiWindowsControl *c)
  function uiRadioButtons (line 183) | uiRadioButtons *uiNewRadioButtons(void)

FILE: windows/separator.cpp
  type uiSeparator (line 12) | struct uiSeparator {
  function uiSeparatorMinimumSize (line 26) | static void uiSeparatorMinimumSize(uiWindowsControl *c, int *width, int ...
  function uiSeparator (line 44) | uiSeparator *uiNewHorizontalSeparator(void)
  function uiSeparator (line 59) | uiSeparator *uiNewVerticalSeparator(void)

FILE: windows/sizing.cpp
  function getSizing (line 5) | void getSizing(HWND hwnd, uiWindowsSizing *sizing, HFONT font)
  function uiWindowsGetSizing (line 35) | void uiWindowsGetSizing(HWND hwnd, uiWindowsSizing *sizing)
  function uiWindowsSizingDlgUnitsToPixels (line 43) | void uiWindowsSizingDlgUnitsToPixels(uiWindowsSizing *sizing, int *x, in...
  function uiWindowsSizingStandardPadding (line 57) | void uiWindowsSizingStandardPadding(uiWindowsSizing *sizing, int *x, int...

FILE: windows/slider.cpp
  type uiSlider (line 4) | struct uiSlider {
  function BOOL (line 11) | static BOOL onWM_HSCROLL(uiControl *c, HWND hwnd, WORD code, LRESULT *lR...
  function uiSliderDestroy (line 20) | static void uiSliderDestroy(uiControl *c)
  function uiSliderMinimumSize (line 35) | static void uiSliderMinimumSize(uiWindowsControl *c, int *width, int *he...
  function defaultOnChanged (line 49) | static void defaultOnChanged(uiSlider *s, void *data)
  function uiSliderValue (line 54) | int uiSliderValue(uiSlider *s)
  function uiSliderSetValue (line 59) | void uiSliderSetValue(uiSlider *s, int value)
  function uiSliderOnChanged (line 65) | void uiSliderOnChanged(uiSlider *s, void (*f)(uiSlider *, void *), void ...
  function uiSlider (line 71) | uiSlider *uiNewSlider(int min, int max)

FILE: windows/spinbox.cpp
  type uiSpinbox (line 4) | struct uiSpinbox {
  function value (line 16) | static int value(uiSpinbox *s)
  function BOOL (line 36) | static BOOL onWM_COMMAND(uiControl *c, HWND hwnd, WORD code, LRESULT *lR...
  function uiSpinboxDestroy (line 61) | static void uiSpinboxDestroy(uiControl *c)
  function uiSpinboxMinimumSize (line 80) | static void uiSpinboxMinimumSize(uiWindowsControl *c, int *width, int *h...
  function spinboxArrangeChildren (line 95) | static void spinboxArrangeChildren(uiSpinbox *s)
  function recreateUpDown (line 109) | static void recreateUpDown(uiSpinbox *s)
  function spinboxRelayout (line 145) | static void spinboxRelayout(uiSpinbox *s)
  function defaultOnChanged (line 155) | static void defaultOnChanged(uiSpinbox *s, void *data)
  function uiSpinboxValue (line 160) | int uiSpinboxValue(uiSpinbox *s)
  function uiSpinboxSetValue (line 165) | void uiSpinboxSetValue(uiSpinbox *s, int value)
  function uiSpinboxOnChanged (line 172) | void uiSpinboxOnChanged(uiSpinbox *s, void (*f)(uiSpinbox *, void *), vo...
  function onResize (line 178) | static void onResize(uiWindowsControl *c)
  function uiSpinbox (line 183) | uiSpinbox *uiNewSpinbox(int min, int max)

FILE: windows/stddialogs.cpp
  function msgbox (line 105) | static void msgbox(HWND parent, const char *title, const char *descripti...
  function uiMsgBox (line 121) | void uiMsgBox(uiWindow *parent, const char *title, const char *description)
  function uiMsgBoxError (line 128) | void uiMsgBoxError(uiWindow *parent, const char *title, const char *desc...

FILE: windows/tab.cpp
  type uiTab (line 7) | struct uiTab {
    type tabPage (line 11) | struct tabPage
  function LRESULT (line 17) | static LRESULT curpage(uiTab *t)
  type tabPage (line 22) | struct tabPage
  function tabPageRect (line 27) | static void tabPageRect(uiTab *t, RECT *r)
  function tabRelayout (line 37) | static void tabRelayout(uiTab *t)
  function showHidePage (line 54) | static void showHidePage(uiTab *t, LRESULT which, int hide)
  function BOOL (line 72) | static BOOL onWM_NOTIFY(uiControl *c, HWND hwnd, NMHDR *nm, LRESULT *lRe...
  function uiTabDestroy (line 85) | static void uiTabDestroy(uiControl *c)
  function uiTabSyncEnableState (line 116) | static void uiTabSyncEnableState(uiWindowsControl *c, int enabled)
  function uiTabMinimumSize (line 130) | static void uiTabMinimumSize(uiWindowsControl *c, int *width, int *height)
  function uiTabMinimumSizeChanged (line 155) | static void uiTabMinimumSizeChanged(uiWindowsControl *c)
  function uiTabChildVisibilityChanged (line 169) | static void uiTabChildVisibilityChanged(uiWindowsControl *c)
  function tabArrangePages (line 175) | static void tabArrangePages(uiTab *t)
  function uiTabAppend (line 186) | void uiTabAppend(uiTab *t, const char *name, uiControl *child)
  function uiTabInsertAt (line 191) | void uiTabInsertAt(uiTab *t, const char *name, int n, uiControl *child)
  function uiTabDelete (line 225) | void uiTabDelete(uiTab *t, int n)
  function uiTabNumPages (line 242) | int uiTabNumPages(uiTab *t)
  function uiTabMargined (line 247) | int uiTabMargined(uiTab *t, int n)
  function uiTabSetMargined (line 252) | void uiTabSetMargined(uiTab *t, int n, int margined)
  function onResize (line 262) | static void onResize(uiWindowsControl *c)
  function uiTab (line 267) | uiTab *uiNewTab(void)
    type tabPage (line 11) | struct tabPage

FILE: windows/table.cpp
  function uiTableModel (line 11) | uiTableModel *uiNewTableModel(uiTableModelHandler *mh)
  function uiFreeTableModel (line 21) | void uiFreeTableModel(uiTableModel *m)
  function uiTableModelRowInserted (line 28) | void uiTableModelRowInserted(uiTableModel *m, int newIndex)
  function uiTableModelRowChanged (line 53) | void uiTableModelRowChanged(uiTableModel *m, int index)
  function uiTableModelRowDeleted (line 62) | void uiTableModelRowDeleted(uiTableModel *m, int oldIndex)
  function uiTableModelHandler (line 82) | uiTableModelHandler *uiprivTableModelHandler(uiTableModel *m)
  function LRESULT (line 88) | static LRESULT CALLBACK tableSubProc(HWND hwnd, UINT uMsg, WPARAM wParam...
  function uiprivTableProgress (line 191) | int uiprivTableProgress(uiTable *t, int item, int subitem, int modelColu...
  function BOOL (line 234) | static BOOL onWM_NOTIFY(uiControl *c, HWND hwnd, NMHDR *nmhdr, LRESULT *...
  function uiTableDestroy (line 327) | static void uiTableDestroy(uiControl *c)
  function uiTableMinimumSize (line 367) | static void uiTableMinimumSize(uiWindowsControl *c, int *width, int *hei...
  function uiprivTableColumnParams (line 381) | static uiprivTableColumnParams *appendColumn(uiTable *t, const char *nam...
  function uiTableAppendTextColumn (line 411) | void uiTableAppendTextColumn(uiTable *t, const char *name, int textModel...
  function uiTableAppendImageColumn (line 422) | void uiTableAppendImageColumn(uiTable *t, const char *name, int imageMod...
  function uiTableAppendImageTextColumn (line 430) | void uiTableAppendImageTextColumn(uiTable *t, const char *name, int imag...
  function uiTableAppendCheckboxColumn (line 442) | void uiTableAppendCheckboxColumn(uiTable *t, const char *name, int check...
  function uiTableAppendCheckboxTextColumn (line 451) | void uiTableAppendCheckboxTextColumn(uiTable *t, const char *name, int c...
  function uiTableAppendProgressBarColumn (line 464) | void uiTableAppendProgressBarColumn(uiTable *t, const char *name, int pr...
  function uiTableAppendButtonColumn (line 472) | void uiTableAppendButtonColumn(uiTable *t, const char *name, int buttonM...
  function uiTable (line 482) | uiTable *uiNewTable(uiTableParams *p)

FILE: windows/table.hpp
  type uiTableModel (line 6) | struct uiTableModel {
  type uiprivTableColumnParams (line 10) | struct uiprivTableColumnParams
  type uiprivTableColumnParams (line 11) | struct uiprivTableColumnParams {
  type uiTable (line 26) | struct uiTable {
  type uiprivTableMetrics (line 60) | struct uiprivTableMetrics
  type uiprivTableMetrics (line 61) | struct uiprivTableMetrics {

FILE: windows/tabledispinfo.cpp
  function HRESULT (line 8) | static HRESULT handleLVIF_TEXT(uiTable *t, NMLVDISPINFOW *nm, uiprivTabl...
  function HRESULT (line 60) | static HRESULT handleLVIF_IMAGE(uiTable *t, NMLVDISPINFOW *nm, uiprivTab...
  function HRESULT (line 85) | HRESULT uiprivTableHandleLVN_GETDISPINFO(uiTable *t, NMLVDISPINFOW *nm, ...

FILE: windows/tabledraw.cpp
  type drawState (line 9) | struct drawState {
  function HRESULT (line 28) | static HRESULT drawBackgrounds(HRESULT hr, struct drawState *s)
  function centerImageRect (line 44) | static void centerImageRect(RECT *image, RECT *space)
  function HRESULT (line 65) | static HRESULT drawImagePart(HRESULT hr, struct drawState *s)
  function HRESULT (line 119) | static HRESULT drawUnthemedCheckbox(struct drawState *s, int checked, in...
  function HRESULT (line 149) | static HRESULT drawThemedCheckbox(struct drawState *s, HTHEME theme, int...
  function HRESULT (line 186) | static HRESULT drawCheckboxPart(HRESULT hr, struct drawState *s)
  function HRESULT (line 220) | static HRESULT drawTextPart(HRESULT hr, struct drawState *s)
  function HRESULT (line 276) | static HRESULT drawProgressBarPart(HRESULT hr, struct drawState *s)
  function HRESULT (line 389) | static HRESULT drawButtonPart(HRESULT hr, struct drawState *s)
  function HRESULT (line 483) | static HRESULT freeDrawState(struct drawState *s)
  function COLORREF (line 511) | static COLORREF blend(COLORREF base, double r, double g, double b, doubl...
  function HRESULT (line 527) | static HRESULT fillDrawState(struct drawState *s, uiTable *t, NMLVCUSTOM...
  function HRESULT (line 587) | static HRESULT updateAndDrawFocusRects(HRESULT hr, uiTable *t, HDC dc, i...
  function HRESULT (line 624) | HRESULT uiprivTableHandleNM_CUSTOMDRAW(uiTable *t, NMLVCUSTOMDRAW *nm, L...
  function HRESULT (line 683) | HRESULT uiprivUpdateImageListSize(uiTable *t)

FILE: windows/tableediting.cpp
  function HRESULT (line 9) | static HRESULT resizeEdit(uiTable *t, WCHAR *wstr, int iItem, int iSubItem)
  function LRESULT (line 62) | static LRESULT CALLBACK editSubProc(HWND hwnd, UINT uMsg, WPARAM wParam,...
  function HRESULT (line 96) | static HRESULT openEditControl(uiTable *t, int iItem, int iSubItem, uipr...
  function HRESULT (line 144) | HRESULT uiprivTableResizeWhileEditing(uiTable *t)
  function HRESULT (line 157) | HRESULT uiprivTableFinishEditingText(uiTable *t)
  function HRESULT (line 179) | HRESULT uiprivTableAbortEditingText(uiTable *t)
  function HRESULT (line 196) | HRESULT uiprivTableHandleNM_CLICK(uiTable *t, NMITEMACTIVATE *nm, LRESUL...

FILE: windows/tablemetrics.cpp
  function HRESULT (line 5) | static HRESULT itemRect(HRESULT hr, uiTable *t, UINT uMsg, WPARAM wParam...
  function HRESULT (line 19) | HRESULT uiprivTableGetMetrics(uiTable *t, int iItem, int iSubItem, uipri...

FILE: windows/tabpage.cpp
  function tabPageMargins (line 9) | static void tabPageMargins(struct tabPage *tp, int *mx, int *my)
  function tabPageRelayout (line 23) | static void tabPageRelayout(struct tabPage *tp)
  function INT_PTR (line 45) | static INT_PTR CALLBACK dlgproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPA...
  type tabPage (line 99) | struct tabPage
  type tabPage (line 101) | struct tabPage
  function tabPageDestroy (line 128) | void tabPageDestroy(struct tabPage *tp)
  function tabPageMinimumSize (line 138) | void tabPageMinimumSize(struct tabPage *tp, int *width, int *height)

FILE: windows/text.cpp
  function WCHAR (line 4) | WCHAR *windowTextAndLen(HWND hwnd, LRESULT *len)
  function WCHAR (line 25) | WCHAR *windowText(HWND hwnd)
  function setWindowText (line 30) | void setWindowText(HWND hwnd, WCHAR *wtext)
  function uiFreeText (line 36) | void uiFreeText(char *text)
  function uiWindowsWindowTextWidth (line 41) | int uiWindowsWindowTextWidth(HWND hwnd)
  function uiWindowsSetWindowText (line 100) | void uiWindowsSetWindowText(HWND hwnd, const char *text)
  function uiprivStricmp (line 109) | int uiprivStricmp(const char *a, const char *b)

FILE: windows/uipriv_windows.hpp
  type uiprivTimer (line 99) | struct uiprivTimer
  type uiprivTimer (line 100) | struct uiprivTimer {
  type tabPage (line 139) | struct tabPage {
  type tabPage (line 144) | struct tabPage
  type tabPage (line 145) | struct tabPage
  type tabPage (line 146) | struct tabPage
  type colorDialogRGBA (line 149) | struct colorDialogRGBA {
  type colorDialogRGBA (line 155) | struct colorDialogRGBA

FILE: windows/utf16.cpp
  function WCHAR (line 6) | WCHAR *toUTF16(const char *str)
  function WCHAR (line 46) | WCHAR *utf16dup(const WCHAR *orig)
  function WCHAR (line 57) | WCHAR *strf(const WCHAR *format, ...)
  function WCHAR (line 68) | WCHAR *vstrf(const WCHAR *format, va_list ap)
  function CRLFtoLF (line 112) | void CRLFtoLF(char *s)
  function WCHAR (line 130) | WCHAR *ftoutf16(double d)
  function WCHAR (line 141) | WCHAR *itoutf16(int i)

FILE: windows/utilwin.cpp
  function LRESULT (line 17) | static LRESULT CALLBACK utilWindowWndProc(HWND hwnd, UINT uMsg, WPARAM w...
  function uninitUtilWindow (line 80) | void uninitUtilWindow(void)

FILE: windows/window.cpp
  type uiWindow (line 6) | struct uiWindow {
  function windowMargins (line 28) | static void windowMargins(uiWindow *w, int *mx, int *my)
  function windowRelayout (line 42) | static void windowRelayout(uiWindow *w)
  function LRESULT (line 65) | static LRESULT CALLBACK windowWndProc(HWND hwnd, UINT uMsg, WPARAM wPara...
  function ATOM (line 127) | ATOM registerWindowClass(HICON hDefaultIcon, HCURSOR hDefaultCursor)
  function unregisterWindowClass (line 141) | void unregisterWindowClass(void)
  function defaultOnClosing (line 147) | static int defaultOnClosing(uiWindow *w, void *data)
  function defaultOnPositionContentSizeChanged (line 152) | static void defaultOnPositionContentSizeChanged(uiWindow *w, void *data)
  function uiWindowDestroy (line 159) | static void uiWindowDestroy(uiControl *c)
  function uiControl (line 181) | uiControl *uiWindowParent(uiControl *c)
  function uiWindowSetParent (line 186) | void uiWindowSetParent(uiControl *c, uiControl *parent)
  function uiWindowToplevel (line 191) | static int uiWindowToplevel(uiControl *c)
  function uiWindowVisible (line 197) | static int uiWindowVisible(uiControl *c)
  function uiWindowShow (line 204) | static void uiWindowShow(uiControl *c)
  function uiWindowHide (line 223) | static void uiWindowHide(uiControl *c)
  function uiWindowMinimumSize (line 240) | static void uiWindowMinimumSize(uiWindowsControl *c, int *width, int *he...
  function uiWindowMinimumSizeChanged (line 254) | static void uiWindowMinimumSizeChanged(uiWindowsControl *c)
  function uiWindowLayoutRect (line 268) | static void uiWindowLayoutRect(uiWindowsControl *c, RECT *r)
  function uiWindowChildVisibilityChanged (line 278) | static void uiWindowChildVisibilityChanged(uiWindowsControl *c)
  function uiWindowSetTitle (line 289) | void uiWindowSetTitle(uiWindow *w, const char *title)
  function windowMonitorRect (line 297) | static void windowMonitorRect(HWND hwnd, RECT *r)
  function uiWindowContentSize (line 317) | void uiWindowContentSize(uiWindow *w, int *width, int *height)
  function uiWindowSetContentSize (line 327) | void uiWindowSetContentSize(uiWindow *w, int width, int height)
  function uiWindowFullscreen (line 336) | int uiWindowFullscreen(uiWindow *w)
  function uiWindowSetFullscreen (line 341) | void uiWindowSetFullscreen(uiWindow *w, int fullscreen)
  function uiWindowOnContentSizeChanged (line 376) | void uiWindowOnContentSizeChanged(uiWindow *w, void (*f)(uiWindow *, voi...
  function uiWindowOnClosing (line 382) | void uiWindowOnClosing(uiWindow *w, int (*f)(uiWindow *, void *), void *...
  function uiWindowBorderless (line 388) | int uiWindowBorderless(uiWindow *w)
  function uiWindowSetBorderless (line 395) | void uiWindowSetBorderless(uiWindow *w, int borderless)
  function uiWindowSetChild (line 405) | void uiWindowSetChild(uiWindow *w, uiControl *child)
  function uiWindowMargined (line 420) | int uiWindowMargined(uiWindow *w)
  function uiWindowSetMargined (line 425) | void uiWindowSetMargined(uiWindow *w, int margined)
  function setClientSize (line 433) | static void setClientSize(uiWindow *w, int width, int height, BOOL hasMe...
  function uiWindow (line 455) | uiWindow *uiNewWindow(const char *title, int width, int height, int hasM...
  function ensureMinimumWindowSize (line 502) | void ensureMinimumWindowSize(uiWindow *w)
  function disableAllWindowsExcept (line 518) | void disableAllWindowsExcept(uiWindow *which)
  function enableAllWindowsExcept (line 527) | void enableAllWindowsExcept(uiWindow *which)

FILE: windows/winpublic.cpp
  function uiWindowsEnsureDestroyWindow (line 4) | void uiWindowsEnsureDestroyWindow(HWND hwnd)
  function uiWindowsEnsureSetParentHWND (line 10) | void uiWindowsEnsureSetParentHWND(HWND hwnd, HWND parent)
  function uiWindowsEnsureAssignControlIDZOrder (line 18) | void uiWindowsEnsureAssignControlIDZOrder(HWND hwnd, LONG_PTR *controlID...
  function uiWindowsEnsureMoveWindowDuringResize (line 26) | void uiWindowsEnsureMoveWindowDuringResize(HWND hwnd, int x, int y, int ...
  function uiWindowsEnsureGetClientRect (line 39) | void uiWindowsEnsureGetClientRect(HWND hwnd, RECT *r)
  function uiWindowsEnsureGetWindowRect (line 51) | void uiWindowsEnsureGetWindowRect(HWND hwnd, RECT *r)

FILE: windows/winutil.cpp
  function windowClassOf (line 9) | int windowClassOf(HWND hwnd, ...)
  function mapWindowRect (line 41) | void mapWindowRect(HWND from, HWND to, RECT *r)
  function DWORD (line 59) | DWORD getStyle(HWND hwnd)
  function setStyle (line 64) | void setStyle(HWND hwnd, DWORD style)
  function DWORD (line 69) | DWORD getExStyle(HWND hwnd)
  function setExStyle (line 74) | void setExStyle(HWND hwnd, DWORD exstyle)
  function clientSizeToWindowSize (line 80) | void clientSizeToWindowSize(HWND hwnd, int *width, int *height, BOOL has...
  function HWND (line 108) | HWND parentOf(HWND child)
  function HWND (line 113) | HWND parentToplevel(HWND child)
  function setWindowInsertAfter (line 118) | void setWindowInsertAfter(HWND hwnd, HWND insertAfter)
  function HWND (line 124) | HWND getDlgItem(HWND hwnd, int id)
  function invalidateRect (line 134) | void invalidateRect(HWND hwnd, RECT *r, BOOL erase)
  function D2D1_SIZE_F (line 141) | D2D1_SIZE_F realGetSize(ID2D1RenderTarget *rt)
Condensed preview — 393 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,971K chars).
[
  {
    "path": ".appveyor.yml",
    "chars": 3298,
    "preview": "version: 'build #{build}'\n\nenvironment:\n  matrix:\n    - arch: 386\n      libtype: shared\n      libfiles: libui.dll libui."
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 7627,
    "preview": "# Contributing to libui\n\nlibui is an open source project that openly accepts contributions. I appreciate your help!\n\n## "
  },
  {
    "path": "Compatibility.md",
    "chars": 5588,
    "preview": "# Useful things in newer versions\n\n## Windows\n### Windows 7\nhttp://channel9.msdn.com/blogs/pdc2008/pc43\n\nTODO look up PD"
  },
  {
    "path": "LICENSE",
    "chars": 1155,
    "preview": "Copyright (c) 2014 Pietro Gagliardi\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of thi"
  },
  {
    "path": "NEWS.md",
    "chars": 11399,
    "preview": "# Old News\n\n* **27 November 2016**\n\t* Decided to split the table stuff into its own branch. It will be developed indepen"
  },
  {
    "path": "README.md",
    "chars": 15976,
    "preview": "# libui: a portable GUI library for C\n\nThis README is being written.<br>\n[![Build Status, Azure Pipelines](https://dev.a"
  },
  {
    "path": "TODO.md",
    "chars": 16613,
    "preview": "- make sure the last line of text layouts include leading\n\n- documentation notes:\n\t- static binaries do not link system "
  },
  {
    "path": "_abort/windowevents/darwin_window.m",
    "chars": 2482,
    "preview": "struct uiWindow {\n\t// constraints\n\tvoid (*onPositionChanged)(uiWindow *, void *);\n\tvoid *onPositionChangedData;\n\tBOOL su"
  },
  {
    "path": "_abort/windowevents/page15.c",
    "chars": 1424,
    "preview": "static uiSpinbox *x, *y;\n\nstatic void moveX(uiSpinbox *s, void *data)\n{\n\tuiWindow *w = uiWindow(data);\n\tint xp, yp;\n\n\tui"
  },
  {
    "path": "_abort/windowevents/ui.h",
    "chars": 314,
    "preview": "// uiWindowSetTitle\n_UI_EXTERN void uiWindowPosition(uiWindow *w, int *x, int *y);\n_UI_EXTERN void uiWindowSetPosition(u"
  },
  {
    "path": "_abort/windowevents/unix_window.c",
    "chars": 2928,
    "preview": "struct uiWindow {\n//\tvoid *onClosingData;\n\tvoid (*onPositionChanged)(uiWindow *, void *);\n\tvoid *onPositionChangedData;\n"
  },
  {
    "path": "_abort/windowevents/windows_window.cpp",
    "chars": 2498,
    "preview": "struct uiWindow {\n//\tBOOL hasMenubar;\n\tvoid (*onPositionChanged)(uiWindow *, void *);\n\tvoid *onPositionChangedData;\n\tBOO"
  },
  {
    "path": "_doc/area.md",
    "chars": 2520,
    "preview": "# uiArea\n\nuiArea is a uiControl that provides a canvas you can draw on. It receives keyboard and mouse events, supports "
  },
  {
    "path": "_doc/areahandler",
    "chars": 255,
    "preview": "Yes, you keep ownership of the uiAreaHandler. libui only cares about the address you give uiNewArea(); it doesn't copy a"
  },
  {
    "path": "_doc/draw.md",
    "chars": 3120,
    "preview": "# The Drawing Model\n\n> Note: This model is not exclusive to libui; it is also applicable to many 2D graphics libraries, "
  },
  {
    "path": "_doc/drawtext",
    "chars": 525,
    "preview": "on some unix systems, alpha blending fonts may not be available; this depends on your installed version of pango and is "
  },
  {
    "path": "_doc/export/coretext",
    "chars": 361,
    "preview": "font features are not provided by the collection and have to be added when asking for a font\nit does preserve when going"
  },
  {
    "path": "_doc/export/ctweights",
    "chars": 20651,
    "preview": "// pseudo-go\n\nfunc (f *CTFont) IsRegistered() bool {\n\tn := f.Attribute(kCTFontRegistrationScopeAttribute)\n\tif n == nil {"
  },
  {
    "path": "_doc/export/ctweightsannotated",
    "chars": 6865,
    "preview": "-0.100000  0xbdcccccd          registered postscript name \"STXihei\"\n-0.100000  0xbfb999999999999a  unregistered postscri"
  },
  {
    "path": "_doc/export/ctweightscombined",
    "chars": 3346,
    "preview": "-0.100000\n\tpostscript name \"STXihei\" (which, according to http://www.typophile.com/node/93813, means \"ST Hei Light\", and"
  },
  {
    "path": "_doc/export/ctweightsprocessed",
    "chars": 6045,
    "preview": "-0.100000  0xbdcccccd          \"STXihei\"\n-0.100000  0xbfb999999999999a  \"STXihei\"\n-0.200000  0xbe4ccccd          \"EL\"\n-0"
  },
  {
    "path": "_doc/export/ctweightsraw",
    "chars": 4376,
    "preview": "0.000000\t0x0\t\"reg\"\n0.300000\t0x3e99999a\t\"semi\"\n0.400000\t0x3ecccccd\t\"bold\"\n-0.400000\t0xbecccccd\t\"light\"\n0.230000\t0x3e6b851"
  },
  {
    "path": "_doc/export/ctweightvalues",
    "chars": 9223,
    "preview": "registered font, preexisting metadata weight\n\"reg\":\tfloat32as(0.000000, 0x0)\n\"semi\":\tfloat32as(0.300000, 0x3e99999a)\n\"bo"
  },
  {
    "path": "_doc/export/ctwidths",
    "chars": 5155,
    "preview": "xx pseudo-go\n\nfunc (f *CTFont) RegistryWidth32() float32 {\n\tmetadata visual descriptors\n\t{ \"med\", float32as(0.000000, 0x"
  },
  {
    "path": "_doc/export/ctwidthscombined",
    "chars": 1942,
    "preview": "-0.100000\n\tstyle string contains \"Semi Cond\"\n\tstyle string contains \"Semi Condensed\"; unregistered fonts only (see below"
  },
  {
    "path": "_doc/export/ctwidthsprocessed",
    "chars": 3312,
    "preview": "-0.100000  0xbdcccccd  registered \"Semi Cond\"\n-0.100000  0xbdcccccd  registered \"Semi Condensed\"\n-0.100000  0xbdcccccd  "
  },
  {
    "path": "_doc/export/ctwidthvalues",
    "chars": 4772,
    "preview": "metadata \"med\":\tfloat32as(0.000000, 0x0)\nmetadata \"cond\":\tfloat32as(-0.200000, 0xbe4ccccd)\nmetadata \"ext\":\t\tfloat32as(0."
  },
  {
    "path": "_doc/export/fvar.swift",
    "chars": 2527,
    "preview": "// 2 november 2017\nimport Cocoa\nimport CoreText\n\nfunc fourccString(_ k: FourCharCode) -> String {\n\tvar c: [UInt8] = [0, "
  },
  {
    "path": "_doc/export/ttfixedtest.go",
    "chars": 1165,
    "preview": "// 2 november 2017\npackage main\n\nimport (\n\t\"fmt\"\n)\n\ntype fixed1616 uint32\ntype fixed214 uint16\n\nfunc fixed1616To214(f fi"
  },
  {
    "path": "_doc/export/weightlist1.sh",
    "chars": 135,
    "preview": "# 21 october 2017\ngawk '\nBEGIN { FS = \"\\t+\" }\n!/float..as/ { next }\n{ i = 0; if ($1 == \"\") i++ }\n(NF-i) != 2 { next }\n{ "
  },
  {
    "path": "_doc/export/weightlist2.sh",
    "chars": 167,
    "preview": "# 21 october 2017\ngawk '\n{\n\tgsub(/float..as\\(/, \"\")\n\tgsub(/,/, \"\", $(NF - 1))\n\tgsub(/\\)$/, \"\")\n\tsplit($0, parts, /:/)\n\tp"
  },
  {
    "path": "_doc/export/weightlist3.sh",
    "chars": 69,
    "preview": "# 21 october 2017\nsort -t$'\\t' -k1,1 -k2,2 \"$@\" |\n\tcolumn -t -s$'\\t'\n"
  },
  {
    "path": "_doc/export/writewidths.c",
    "chars": 84,
    "preview": "// 22 october 2017\nextern int realMain(void);\nint main(void) { return realMain(); }\n"
  },
  {
    "path": "_doc/export/writewidths.out",
    "chars": 609,
    "preview": "unregistered OS2 0:\tfloat64as(-0.5, 0xbfe0000000000000)\nunregistered OS2 1:\tfloat64as(-0.4, 0xbfd999999999999a)\nunregist"
  },
  {
    "path": "_doc/export/writewidths.processed",
    "chars": 496,
    "preview": "-0.1  0xbfb9999999999998  unregistered OS2 4\n-0.2  0xbfc999999999999a  unregistered OS2 3\n-0.3  0xbfd3333333333333  unre"
  },
  {
    "path": "_doc/export/writewidths.s",
    "chars": 1540,
    "preview": "# 22 october 2017\n# clang -o writewidths writewidths.c writewidths.s -g -Wall -Wextra -pedantic -g\n# thanks to:\n# - http"
  },
  {
    "path": "_doc/form",
    "chars": 38,
    "preview": "hiding a control also hides its label\n"
  },
  {
    "path": "_doc/main",
    "chars": 83,
    "preview": "after uiQuit or if uiShouldQuit returns nonzero, uiQueueMain's effect is undefined\n"
  },
  {
    "path": "_doc/mainsteps",
    "chars": 122,
    "preview": "the function passed to mainsteps must not return until uiQuit itself has been called; otherwise the results are undefine"
  },
  {
    "path": "_doc/misctests/gtkprogresstable.c",
    "chars": 3884,
    "preview": "// 25 june 2018\n#include <gtk/gtk.h>\n\nGtkWidget *mainwin;\nGtkWidget *vbox;\nGtkWidget *hbox;\nGtkWidget *startProgress;\nGt"
  },
  {
    "path": "_doc/misctests/winbuttonexplorertheme.cpp",
    "chars": 26026,
    "preview": "// 9 october 2018\n#define UNICODE\n#define _UNICODE\n#define STRICT\n#define STRICT_TYPED_ITEMIDS\n#define WINVER\t\t\t0x0600\t/"
  },
  {
    "path": "_doc/misctests/winrebarexplorertheme.cpp",
    "chars": 19357,
    "preview": "// 9 october 2018\n#define UNICODE\n#define _UNICODE\n#define STRICT\n#define STRICT_TYPED_ITEMIDS\n#define WINVER\t\t\t0x0600\t/"
  },
  {
    "path": "_doc/names.md",
    "chars": 1598,
    "preview": "TODO clean this up\n\nTODO note that you -fvisibility=hidden means nothing in static libraries, hence this (confirmed on O"
  },
  {
    "path": "_doc/slider",
    "chars": 36,
    "preview": "if min >= max then they are swapped\n"
  },
  {
    "path": "_doc/spinbox",
    "chars": 36,
    "preview": "if min >= max then they are swapped\n"
  },
  {
    "path": "_doc/static",
    "chars": 18,
    "preview": "comctl6\nlibui.res\n"
  },
  {
    "path": "_doc/windowmovesize",
    "chars": 261,
    "preview": "you should never need to use these functions\nthey are provided only for the cases when ABSOLUTELY NECESSARY\nthe operatin"
  },
  {
    "path": "_doc/winstatic",
    "chars": 39,
    "preview": "libui uses resources starting at 29000\n"
  },
  {
    "path": "_future/otherattributes/ui.h",
    "chars": 7026,
    "preview": "_UI_ENUM(uiAttribute) {\n\tuiAttributeFamily,\n\tuiAttributeSize,\t\t\t\t// use Double\n\tuiAttributeWeight,\n\tuiAttributeItalic,\n\t"
  },
  {
    "path": "_future/textlanguageattr/README",
    "chars": 345,
    "preview": "Removed because proper support on OS X doesn't come until 10.9 unless we use a font with an ltag table; none of the font"
  },
  {
    "path": "_future/textlanguageattr/attrstr_darwin.m",
    "chars": 677,
    "preview": "struct fontParams {\n\tuiDrawFontDescriptor desc;\n\tuint16_t featureTypes[maxFeatures];\n\tuint16_t featureSelectors[maxFeatu"
  },
  {
    "path": "_future/textlanguageattr/attrstr_unix.c",
    "chars": 396,
    "preview": "\tPangoLanguage *lang;\n\n\t// language strings are specified as BCP 47: https://developer.gnome.org/pango/1.30/pango-Script"
  },
  {
    "path": "_future/textlanguageattr/attrstr_windows.cpp",
    "chars": 415,
    "preview": "\tWCHAR *localeName;\n\n\t// locale names are specified as BCP 47: https://msdn.microsoft.com/en-us/library/windows/desktop/"
  },
  {
    "path": "_future/textlanguageattr/common_attrlist.c",
    "chars": 116,
    "preview": "\tcase uiAttributeLanguage:\n\t\treturn asciiStringsEqualCaseFold((char *) (attr->spec.Value), (char *) (spec->Value));\n"
  },
  {
    "path": "_future/textlanguageattr/drawtext_example.c",
    "chars": 1215,
    "preview": "before \"or any combination of the above\"\n\n\t// thanks to https://twitter.com/codeman38/status/831924064012886017\n\tnext = "
  },
  {
    "path": "_future/textlanguageattr/fontmatch_darwin.m",
    "chars": 3380,
    "preview": "// note: this doesn't work for languages; we have to parse the ltag table\n\n// fortunately features that aren't supported"
  },
  {
    "path": "_future/textlanguageattr/ui.h",
    "chars": 293,
    "preview": "after UnderlineColor, before feature tags\n\n\t// TODO document that this will also enable language-specific font features "
  },
  {
    "path": "_future/unittest/checklist_attrstr",
    "chars": 1570,
    "preview": "= attributed strings\nattribute lengths are rounded to complete unicode codepoints\nzero-length attributes are elided\ncons"
  },
  {
    "path": "_future/unittest/opentype_test.c",
    "chars": 3645,
    "preview": "// 27 february 2018\n#ifndef TODO_TEST\n#error TODO this is where libui itself goes\n#endif\n#include <inttypes.h>\n#include "
  },
  {
    "path": "_future/unittest/testing.h",
    "chars": 5947,
    "preview": "// 27 february 2018\n\n// TODO\n// - https://blogs.msdn.microsoft.com/oldnewthing/20181107-00/?p=100155 https://blogs.msdn."
  },
  {
    "path": "_future/unittest/testing_testing.c",
    "chars": 2741,
    "preview": "// 27 february 2018\n#include <stdio.h>\n#include <stdlib.h>\n#include <setjmp.h>\n#include \"testing.h\"\n\n#define testingpriv"
  },
  {
    "path": "_future/verticaltext/README",
    "chars": 1398,
    "preview": "Proper vertical text support in uiDrawTextLayout was removed because DirectWrite doesn't add this until Windows 8.1 (unl"
  },
  {
    "path": "_future/verticaltext/attrstr_darwin.m",
    "chars": 1617,
    "preview": "\tcase uiAttributeVerticalForms:\n\t\tif (spec->Value != 0) {\n\t\t\tCFAttributedStringSetAttribute(p->mas, range, kCTVerticalFo"
  },
  {
    "path": "_future/verticaltext/attrstr_unix.c",
    "chars": 217,
    "preview": "\tPangoGravity gravity;\n\n\tcase uiAttributeVerticalForms:\n\t\tgravity = PANGO_GRAVITY_SOUTH;\n\t\tif (spec->Value != 0)\n\t\t\tgrav"
  },
  {
    "path": "_future/verticaltext/attrstr_windows.cpp",
    "chars": 371,
    "preview": "\tuint32_t vertval;\n\n\tcase uiAttributeVerticalForms:\n\t\t// LONGTERM 8 and/or 8.1 add other methods for vertical text\n\t\top."
  },
  {
    "path": "_future/verticaltext/common_attrlist.c",
    "chars": 65,
    "preview": "\tcase uiAttributeVerticalForms:\n\t\treturn boolsEqual(attr, spec);\n"
  },
  {
    "path": "_future/verticaltext/drawtext_example.c",
    "chars": 815,
    "preview": "\tnext = \"vertical glyph forms\";\n\tstart = uiAttributedStringLen(attrstr);\n\tend = start + strlen(next);\n\tuiAttributedStrin"
  },
  {
    "path": "_future/verticaltext/ui.h",
    "chars": 87,
    "preview": "\t// TODO rename to uiAttributeVertical?\n\tuiAttributeVerticalForms,\t\t// 0 = off, 1 = on\n"
  },
  {
    "path": "_notes/OS2",
    "chars": 2165,
    "preview": "https://twitter.com/OS2World/status/983822011389620224\n\tHi. I recommend you today to start with OS/2 Warp 4.52 or ArcaOS"
  },
  {
    "path": "_notes/azure-pipelines",
    "chars": 3786,
    "preview": "multi-platform {\nhttps://docs.microsoft.com/en-us/azure/devops/pipelines/get-started-multiplatform?view=azure-devops\n}\n\n"
  },
  {
    "path": "_notes/caretWidths",
    "chars": 197,
    "preview": "UWP has this (TODO check its implementation to see if it matches ours) https://docs.microsoft.com/en-us/uwp/api/windows."
  },
  {
    "path": "_notes/cplusplus",
    "chars": 67,
    "preview": "https://blogs.msdn.microsoft.com/oldnewthing/20181226-00/?p=100565\n"
  },
  {
    "path": "_notes/darwinAutoLayout",
    "chars": 931,
    "preview": "https://developer.apple.com/library/mac/documentation/AppKit/Reference/NSLayoutConstraint_Class/\n\thttps://developer.appl"
  },
  {
    "path": "_notes/darwinNSAlertIcons",
    "chars": 723,
    "preview": "https://www.google.com/search?q=nsalert+error+icon&client=firefox-b&tbm=isch&source=iu&ictx=1&fir=2iRctS5fJByN0M%253A%25"
  },
  {
    "path": "_notes/dialogs",
    "chars": 164,
    "preview": "https://github.com/kusti8/proton-native/issues/47#issuecomment-373068947\nhttps://blogs.kde.org/2009/03/26/how-crash-almo"
  },
  {
    "path": "_notes/highDPI",
    "chars": 80,
    "preview": "High DPI Displays | Qt 5.5 http://doc.qt.io/qt-5/highdpi.html bottom of page(?)\n"
  },
  {
    "path": "_notes/i18n",
    "chars": 1154,
    "preview": "https://msdn.microsoft.com/en-us/library/windows/desktop/dd319079(v=vs.85).aspx\nhttps://msdn.microsoft.com/en-us/library"
  },
  {
    "path": "_notes/macosAlternateHiDPI",
    "chars": 1798,
    "preview": "https://developer.apple.com/documentation/corefoundation/1542764-cfurlcopyresourcepropertyforkey?language=objc\nhttps://d"
  },
  {
    "path": "_notes/misc",
    "chars": 15525,
    "preview": "windows data types, \"open specifications\" on msdn https://msdn.microsoft.com/en-us/library/cc230321.aspx\n\t(I usually use"
  },
  {
    "path": "_notes/rebarstuff",
    "chars": 746,
    "preview": "https://docs.microsoft.com/en-us/windows/desktop/uxguide/cmd-toolbars\nhttps://docs.microsoft.com/en-us/windows/desktop/c"
  },
  {
    "path": "_notes/tableNotes",
    "chars": 596,
    "preview": "https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSOutlineViewDataSource_P"
  },
  {
    "path": "_notes/textSelections",
    "chars": 169,
    "preview": "http://www.catch22.net/tuts/transparent-text\nhttps://msdn.microsoft.com/en-us/library/windows/desktop/ms724371(v=vs.85)."
  },
  {
    "path": "_notes/winARM64",
    "chars": 192,
    "preview": "http://www.os2museum.com/wp/windows-10-arm64-on-qemu/\nhttps://docs.microsoft.com/en-us/windows/uwp/porting/apps-on-arm\nh"
  },
  {
    "path": "_notes/windowsHighDPI",
    "chars": 1980,
    "preview": "https://msdn.microsoft.com/en-us/library/windows/desktop/dn469266(v=vs.85).aspx\nhttps://msdn.microsoft.com/en-us/library"
  },
  {
    "path": "_notes/windowsPrinting",
    "chars": 560,
    "preview": "https://msdn.microsoft.com/en-us/library/windows/desktop/ff686805(v=vs.85).aspx\nhttps://msdn.microsoft.com/en-us/library"
  },
  {
    "path": "_notes/windowsUWPGlass",
    "chars": 3209,
    "preview": "https://twitter.com/omgubuntu/status/962765197109841922\nhttps://github.com/DominicMaas/SoundByte/blob/master/SoundByte.U"
  },
  {
    "path": "_notes/winflags",
    "chars": 633,
    "preview": "\t# TODO is there a -Wno-switch equivalent?\n\t# TODO /sdl turns C4996 into an ERROR\n\t# don't use /analyze; that requires u"
  },
  {
    "path": "_wip/attrstr_metrics/common_OLD_drawtext.c",
    "chars": 2608,
    "preview": "// 10 february 2017\n#include \"../ui.h\"\n#include \"uipriv.h\"\n\n// TODO this doesn't handle the case where nLines == 0\n// TO"
  },
  {
    "path": "_wip/attrstr_metrics/common_OLD_uipriv_attrstr.h",
    "chars": 415,
    "preview": "\n\n// TODO split these into a separate header file?\n\n// drawtext.c\nstruct caretDrawParams {\n\tdouble r;\n\tdouble g;\n\tdouble"
  },
  {
    "path": "_wip/attrstr_metrics/darwin_OLD__appkit_drawtext.m",
    "chars": 11455,
    "preview": "// 2 january 2017\n#import \"uipriv_darwin.h\"\n#import \"draw.h\"\n\n@interface lineInfo : NSObject\n@property NSRange glyphRang"
  },
  {
    "path": "_wip/attrstr_metrics/darwin_OLD__appkit_fontmatch.m",
    "chars": 9296,
    "preview": "// 3 january 2017\n#import \"uipriv_darwin.h\"\n\n// Stupidity: Core Text requires an **exact match for the entire traits dic"
  },
  {
    "path": "_wip/attrstr_metrics/darwin_OLD__old_drawtext.m",
    "chars": 8892,
    "preview": "// 6 september 2015\n#import \"uipriv_darwin.h\"\n\n// TODO double-check that we are properly handling allocation failures (o"
  },
  {
    "path": "_wip/attrstr_metrics/darwin_OLD_drawtext.m",
    "chars": 10565,
    "preview": "// 2 january 2017\n#import \"uipriv_darwin.h\"\n#import \"draw.h\"\n\n// TODO on an empty string nLines == 0\n// we must prevent "
  },
  {
    "path": "_wip/attrstr_metrics/numlinesbyterange",
    "chars": 1424,
    "preview": "darwin\nint uiDrawTextLayoutNumLines(uiDrawTextLayout *tl)\n{\n\treturn CFArrayGetCount([tl->forLines lines]);\n}\n\nvoid uiDra"
  },
  {
    "path": "_wip/attrstr_metrics/old_ui_attrstr.h",
    "chars": 3376,
    "preview": "\ntypedef struct uiDrawTextLayoutLineMetrics uiDrawTextLayoutLineMetrics;\n\n// Height will equal ParagraphSpacingBefore + "
  },
  {
    "path": "_wip/attrstr_metrics/textDarwinEmptyLayout.diff",
    "chars": 6686,
    "preview": "diff --git a/darwin/attrstr.m b/darwin/attrstr.m\nindex fd45ec25..86039fad 100644\n--- a/darwin/attrstr.m\n+++ b/darwin/att"
  },
  {
    "path": "_wip/attrstr_metrics/unix_OLD__old_drawtext.c",
    "chars": 5693,
    "preview": "// 6 september 2015\n#include \"uipriv_unix.h\"\n#include \"draw.h\"\n\nstruct uiDrawFontFamilies {\n\tPangoFontFamily **f;\n\tint n"
  },
  {
    "path": "_wip/attrstr_metrics/unix_OLD_drawtext.c",
    "chars": 7776,
    "preview": "// 17 january 2017\n#include \"uipriv_unix.h\"\n#include \"draw.h\"\n\n// TODO\n// - if the RTL override is at the beginning of a"
  },
  {
    "path": "_wip/attrstr_metrics/windows_OLD__old_drawtext.cpp",
    "chars": 8583,
    "preview": "// 22 december 2015\n#include \"uipriv_windows.hpp\"\n#include \"draw.hpp\"\n// TODO really migrate\n\n// notes:\n// only availabl"
  },
  {
    "path": "_wip/attrstr_metrics/windows_OLD_drawtext.cpp",
    "chars": 22245,
    "preview": "// 17 january 2017\n#include \"uipriv_windows.hpp\"\n#include \"draw.hpp\"\n\n// TODO\n// - consider the warnings about antialias"
  },
  {
    "path": "_wip/examples_drawtext/attributes.c",
    "chars": 33533,
    "preview": "// 11 february 2017\n#include \"drawtext.h\"\n\nstatic uiAttributedString *attrstr;\n\n#define nFeatures 256\nstatic uiOpenTypeF"
  },
  {
    "path": "_wip/examples_drawtext/basic.c",
    "chars": 6717,
    "preview": "// 17 january 2017\n#include \"drawtext.h\"\n\nstatic const char *text =\n\t\"It is with a kind of fear that I begin to write th"
  },
  {
    "path": "_wip/examples_drawtext/drawtext.h",
    "chars": 574,
    "preview": "// 20 january 2017\n#include <stdio.h>\n#include <string.h>\n#include <stdlib.h>\n#include \"../../ui.h\"\n\nstruct example {\n\tc"
  },
  {
    "path": "_wip/examples_drawtext/emptystr_hittest.c",
    "chars": 6471,
    "preview": "// 20 january 2017\n#include \"drawtext.h\"\n\n// TODO FOR THIS FILE\n// get rid of it once we rewrite this example (which req"
  },
  {
    "path": "_wip/examples_drawtext/hittest.c",
    "chars": 7183,
    "preview": "// 20 january 2017\n#include \"drawtext.h\"\n\n// TODO double-check ligatures on all platforms to make sure we can place the "
  },
  {
    "path": "_wip/examples_drawtext/main.c",
    "chars": 3143,
    "preview": "// 17 january 2017\n#include \"drawtext.h\"\n\nstatic uiWindow *mainwin;\nstatic uiBox *box;\nstatic uiCombobox *exampleList;\ns"
  },
  {
    "path": "_wip/examples_drawtext_CMakeLists.txt",
    "chars": 350,
    "preview": "# 3 june 2016\n\n_add_example(drawtext\n\tdrawtext/attributes.c\n\tdrawtext/basic.c\n\tdrawtext/emptystr_hittest.c\n\tdrawtext/hit"
  },
  {
    "path": "_wip/examples_opentype/main.c",
    "chars": 4563,
    "preview": "// 10 june 2017\n#include <stdio.h>\n#include <string.h>\n#include <stdlib.h>\n#include <time.h>\n#include \"../../ui.h\"\n\n// T"
  },
  {
    "path": "_wip/rules.darwin",
    "chars": 337,
    "preview": "every rule in ui_darwin.h\nSetParent must be followed by SetSuperview and SyncEnableState\n\tTODO can child cache it?\naddin"
  },
  {
    "path": "_wip/rules.unix",
    "chars": 93,
    "preview": "every rule in ui_unix.h\nSetParent must be followed by SetContainer\n\tTODO can child cache it?\n"
  },
  {
    "path": "_wip/sv/normal",
    "chars": 1923,
    "preview": "2016-05-26 22:38:12.877 svtest[81790:544681]       backgroundColor       NSNamedColorSpace System controlColor\n2016-05-2"
  },
  {
    "path": "_wip/sv/normal.nots",
    "chars": 873,
    "preview": "         backgroundColor       NSNamedColorSpace System controlColor\n         drawsBackground       1\n         borderTyp"
  },
  {
    "path": "_wip/sv/outlineview",
    "chars": 1933,
    "preview": "2016-05-26 22:42:16.208 svtest[82103:547159]       backgroundColor       NSNamedColorSpace System controlBackgroundColor"
  },
  {
    "path": "_wip/sv/outlineview.nots",
    "chars": 883,
    "preview": "         backgroundColor       NSNamedColorSpace System controlBackgroundColor\n         drawsBackground       1\n        "
  },
  {
    "path": "_wip/sv/sourcelist",
    "chars": 1892,
    "preview": "2016-05-26 22:43:58.600 svtest[82237:548359]       backgroundColor       (null)\n2016-05-26 22:43:58.600 svtest[82237:548"
  },
  {
    "path": "_wip/sv/sourcelist.nots",
    "chars": 842,
    "preview": "         backgroundColor       (null)\n         drawsBackground       0\n         borderType            2\n         documen"
  },
  {
    "path": "_wip/sv/tableview",
    "chars": 1933,
    "preview": "2016-05-26 22:41:26.514 svtest[82032:546554]       backgroundColor       NSNamedColorSpace System controlBackgroundColor"
  },
  {
    "path": "_wip/sv/tableview.nots",
    "chars": 883,
    "preview": "         backgroundColor       NSNamedColorSpace System controlBackgroundColor\n         drawsBackground       1\n        "
  },
  {
    "path": "_wip/sv/textview",
    "chars": 1937,
    "preview": "2016-05-26 22:40:02.050 svtest[81927:545793]       backgroundColor       NSCalibratedWhiteColorSpace 1 1\n2016-05-26 22:4"
  },
  {
    "path": "_wip/sv/textview.nots",
    "chars": 887,
    "preview": "         backgroundColor       NSCalibratedWhiteColorSpace 1 1\n         drawsBackground       1\n         borderType     "
  },
  {
    "path": "_wip/table/test_page9.c",
    "chars": 1534,
    "preview": "// 18 october 2015\n#include \"test.h\"\n\n// TODO manage the memory of the uiTableModel\n\nstatic intmax_t nColumns = 4;\nstati"
  },
  {
    "path": "_wip/table/ui.h",
    "chars": 1631,
    "preview": "typedef struct uiTable uiTable;\ntypedef struct uiTableModel uiTableModel;\ntypedef struct uiTableModelSpec uiTableModelSp"
  },
  {
    "path": "_wip/table/unix_table.c",
    "chars": 2049,
    "preview": "// 18 october 2015\n#include \"uipriv_unix.h\"\n\nstruct uiTable {\n\tuiUnixControl c;\n\tGtkWidget *widget;\n\tGtkContainer *scont"
  },
  {
    "path": "_wip/table/unix_tablemodel.c",
    "chars": 8354,
    "preview": "// 18 october 2015\n#include \"uipriv_unix.h\"\n\n// On GTK+, uiTableModel is a GtkTreeModel.\n\n#define uiTableModelType (uiTa"
  },
  {
    "path": "azure-pipelines/TODOMatrix",
    "chars": 12918,
    "preview": "# 31 march 2019\n\nvariables:\n  releaseExamples: 'controlgallery cpp-multithread datetime drawtext histogram tester timer'"
  },
  {
    "path": "azure-pipelines/artifacts.yml",
    "chars": 961,
    "preview": "# 6 april 2019\n\nparameters:\n  os: ''\n  arch: ''\n  libtype: ''\n  libfiles: ''\n  osHeader: ''\n\nsteps:\n- script: |\n    set "
  },
  {
    "path": "azure-pipelines/build.yml",
    "chars": 195,
    "preview": "# 5 april 2019\n\nparameters:\n  beforeBuild: ''\n  afterBuild: ''\n\nsteps:\n- script: |\n    ${{ parameters.beforeBuild }}\n   "
  },
  {
    "path": "azure-pipelines/collapse.awk",
    "chars": 672,
    "preview": "# 7 april 2019\n\nBEGIN {\n\tRS = \"\"\n\tFS = \"\\n +- \"\n}\n\n/^- job:/ {\n\tfor (i = 1; i <= NF; i++) {\n\t\tif (!(i in nextindex)) {\n\t"
  },
  {
    "path": "azure-pipelines/collapsed",
    "chars": 9007,
    "preview": "{\n- - job: linux_386_shared\n  displayName: 'Linux 386 Shared'\n  pool:\n    vmImage: 'ubuntu-16.04'\n  workspace:\n    clean"
  },
  {
    "path": "azure-pipelines/configure.yml",
    "chars": 260,
    "preview": "# 5 april 2019\n\nparameters:\n  beforeConfigure: ''\n  defaultLibrary: 'must-be-set'\n\nsteps:\n- script: |\n    ${{ parameters"
  },
  {
    "path": "azure-pipelines/darwin-install-ninja.yml",
    "chars": 382,
    "preview": "# 5 april 2019\n# because brew install is also slow (it runs an update task first)\n\nsteps:\n- script: |\n    sudo mkdir -p "
  },
  {
    "path": "azure-pipelines/install-latest-meson-ninja.yml",
    "chars": 283,
    "preview": "# 4 april 2019\n\n# TODO remove ninja installation from non-Linux OSs and make the same ninja via pip change in the AppVey"
  },
  {
    "path": "azure-pipelines/linux-386-install-gtk-dev.yml",
    "chars": 891,
    "preview": "# 7 april 2019\n\n# TODO figure out how to get meson to recognize the compiler is producing 32-bit output\n\nsteps:\n- script"
  },
  {
    "path": "azure-pipelines/linux-install-gtk-dev.yml",
    "chars": 113,
    "preview": "# 7 april 2019\n\nsteps:\n- script: |\n    sudo apt-get install libgtk-3-dev\n  displayName: 'Install GTK+ Dev Files'\n"
  },
  {
    "path": "azure-pipelines/setup-python3.yml",
    "chars": 107,
    "preview": "# 4 april 2019\n\nsteps:\n- task: UsePythonVersion@0\n  inputs:\n    versionSpec: '3.6'\n    architecture: 'x64'\n"
  },
  {
    "path": "azure-pipelines/vs2015-install-python3.yml",
    "chars": 615,
    "preview": "# 4 april 2019\n# see https://github.com/Microsoft/azure-pipelines-image-generation/issues/374 for context and source\n\nst"
  },
  {
    "path": "azure-pipelines/windows-artifacts.yml",
    "chars": 1156,
    "preview": "# 6 april 2019\n\nparameters:\n  os: ''\n  arch: ''\n  toolchain: ''\n  libtype: ''\n  libfiles: ''\n  osHeader: ''\n\nsteps:\n- po"
  },
  {
    "path": "azure-pipelines/windows-install-ninja.yml",
    "chars": 528,
    "preview": "# 4 april 2019\n# why this? because choco isn't available on the VS2015 image and is extremely slow on the VS2017 one (it"
  },
  {
    "path": "azure-pipelines.yml",
    "chars": 11772,
    "preview": "# 31 march 2019\n\ntrigger:\n  branches:\n    include:\n    - '*'\n  tags:\n    include:\n    - '*'\n\nvariables:\n  releaseExample"
  },
  {
    "path": "common/OLD_table.c",
    "chars": 404,
    "preview": "// 21 june 2016\n#include \"../ui.h\"\n#include \"uipriv.h\"\n\nvoid *uiTableModelGiveInt(int i)\n{\n\treturn (void *) ((intptr_t) "
  },
  {
    "path": "common/areaevents.c",
    "chars": 5085,
    "preview": "// 29 march 2014\n#include \"../ui.h\"\n#include \"uipriv.h\"\n\n/*\nWindows and GTK+ have a limit of 2 and 3 clicks, respectivel"
  },
  {
    "path": "common/attribute.c",
    "chars": 5620,
    "preview": "// 19 february 2018\n#include \"../ui.h\"\n#include \"uipriv.h\"\n#include \"attrstr.h\"\n\nstruct uiAttribute {\n\tint ownedByUser;\n"
  },
  {
    "path": "common/attrlist.c",
    "chars": 17056,
    "preview": "// 16 december 2016\n#include \"../ui.h\"\n#include \"uipriv.h\"\n#include \"attrstr.h\"\n\n/*\nAn attribute list is a doubly linked"
  },
  {
    "path": "common/attrstr.c",
    "chars": 9289,
    "preview": "// 3 december 2016\n#include \"../ui.h\"\n#include \"uipriv.h\"\n#include \"attrstr.h\"\n\nstruct uiAttributedString {\n\tchar *s;\n\ts"
  },
  {
    "path": "common/attrstr.h",
    "chars": 2118,
    "preview": "// 19 february 2018\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// attribute.c\nextern uiAttribute *uiprivAttributeRetain(ui"
  },
  {
    "path": "common/control.c",
    "chars": 1982,
    "preview": "// 26 may 2015\n#include \"../ui.h\"\n#include \"uipriv.h\"\n\nvoid uiControlDestroy(uiControl *c)\n{\n\t(*(c->Destroy))(c);\n}\n\nuin"
  },
  {
    "path": "common/controlsigs.h",
    "chars": 1045,
    "preview": "// 24 april 2016\n\n// LONGTERM if I don't decide to remove these outright, should they be renamed uiprivTypeNameSignature"
  },
  {
    "path": "common/debug.c",
    "chars": 527,
    "preview": "// 13 may 2016\n#include \"../ui.h\"\n#include \"uipriv.h\"\n\nvoid uiprivDoImplBug(const char *file, const char *line, const ch"
  },
  {
    "path": "common/matrix.c",
    "chars": 1363,
    "preview": "// 11 october 2015\n#include <math.h>\n#include \"../ui.h\"\n#include \"uipriv.h\"\n\nvoid uiDrawMatrixSetIdentity(uiDrawMatrix *"
  },
  {
    "path": "common/meson.build",
    "chars": 321,
    "preview": "# 23 march 2019\n\nlibui_sources += [\n\t'common/attribute.c',\n\t'common/attrlist.c',\n\t'common/attrstr.c',\n\t'common/areaevent"
  },
  {
    "path": "common/opentype.c",
    "chars": 3594,
    "preview": "// 25 february 2018\n#include <stdlib.h>\n#include \"../ui.h\"\n#include \"uipriv.h\"\n#include \"attrstr.h\"\n\nstruct feature {\n\tc"
  },
  {
    "path": "common/shouldquit.c",
    "chars": 384,
    "preview": "// 9 may 2015\n#include \"../ui.h\"\n#include \"uipriv.h\"\n\nstatic int defaultOnShouldQuit(void *data)\n{\n\treturn 0;\n}\n\nstatic "
  },
  {
    "path": "common/table.h",
    "chars": 844,
    "preview": "// 23 june 2018\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// tablemodel.c\nextern uiTableModelHandler *uiprivTableModelHan"
  },
  {
    "path": "common/tablemodel.c",
    "chars": 1776,
    "preview": "// 23 june 2018\n#include \"../ui.h\"\n#include \"uipriv.h\"\n#include \"table.h\"\n\nint uiprivTableModelNumColumns(uiTableModel *"
  },
  {
    "path": "common/tablevalue.c",
    "chars": 1759,
    "preview": "// 3 june 2018\n#include \"../ui.h\"\n#include \"uipriv.h\"\n#include \"table.h\"\n\nstruct uiTableValue {\n\tuiTableValueType type;\n"
  },
  {
    "path": "common/uipriv.h",
    "chars": 2598,
    "preview": "// 6 april 2015\n// note: this file should not include ui.h, as the OS-specific ui_*.h files are included between that on"
  },
  {
    "path": "common/userbugs.c",
    "chars": 193,
    "preview": "// 22 may 2016\n#include \"../ui.h\"\n#include \"uipriv.h\"\n\nvoid uiUserBugCannotSetParentOnToplevel(const char *type)\n{\n\tuipr"
  },
  {
    "path": "common/utf.c",
    "chars": 6838,
    "preview": "// utf by pietro gagliardi (andlabs) — https://github.com/andlabs/utf/\n// 10 november 2016\n// function names have been a"
  },
  {
    "path": "common/utf.h",
    "chars": 3888,
    "preview": "// utf by pietro gagliardi (andlabs) — https://github.com/andlabs/utf/\n// 10 november 2016\n\n// note the overridden names"
  },
  {
    "path": "darwin/OLD_table.m",
    "chars": 1304,
    "preview": "// 21 june 2016\n#import \"uipriv_darwin.h\"\n\n// TODOs\n// - header cell seems off\n// - background color shows up for a line"
  },
  {
    "path": "darwin/aat.m",
    "chars": 11683,
    "preview": "// 14 february 2017\n#import \"uipriv_darwin.h\"\n#import \"attrstr.h\"\n\n// TODO explain the purpose of this file\n\nstatic void"
  },
  {
    "path": "darwin/alloc.m",
    "chars": 2097,
    "preview": "// 4 december 2014\n#import <stdlib.h>\n#import \"uipriv_darwin.h\"\n\nstatic NSMutableArray *allocations;\nNSMutableArray *uip"
  },
  {
    "path": "darwin/area.m",
    "chars": 10696,
    "preview": "// 9 september 2015\n#import \"uipriv_darwin.h\"\n\n// 10.8 fixups\n#define NSEventModifierFlags NSUInteger\n\n@interface areaVi"
  },
  {
    "path": "darwin/areaevents.m",
    "chars": 4038,
    "preview": "// 30 march 2014\n#import \"uipriv_darwin.h\"\n\n/*\nMac OS X uses its own set of hardware key codes that are different from P"
  },
  {
    "path": "darwin/attrstr.h",
    "chars": 3061,
    "preview": "// 4 march 2018\n#import \"../common/attrstr.h\"\n\n// opentype.m\nextern CFArrayRef uiprivOpenTypeFeaturesToCTFeatures(const "
  },
  {
    "path": "darwin/attrstr.m",
    "chars": 16233,
    "preview": "// 12 february 2017\n#import \"uipriv_darwin.h\"\n#import \"attrstr.h\"\n\n// this is what AppKit does internally\n// WebKit does"
  },
  {
    "path": "darwin/autolayout.m",
    "chars": 5536,
    "preview": "// 15 august 2015\n#import \"uipriv_darwin.h\"\n\nNSLayoutConstraint *uiprivMkConstraint(id view1, NSLayoutAttribute attr1, N"
  },
  {
    "path": "darwin/box.m",
    "chars": 11464,
    "preview": "// 15 august 2015\n#import \"uipriv_darwin.h\"\n\n// TODO hiding all stretchy controls still hugs trailing edge\n\n@interface b"
  },
  {
    "path": "darwin/button.m",
    "chars": 2283,
    "preview": "// 13 august 2015\n#import \"uipriv_darwin.h\"\n\nstruct uiButton {\n\tuiDarwinControl c;\n\tNSButton *button;\n\tvoid (*onClicked)"
  },
  {
    "path": "darwin/checkbox.m",
    "chars": 2638,
    "preview": "// 14 august 2015\n#import \"uipriv_darwin.h\"\n\nstruct uiCheckbox {\n\tuiDarwinControl c;\n\tNSButton *button;\n\tvoid (*onToggle"
  },
  {
    "path": "darwin/colorbutton.m",
    "chars": 4173,
    "preview": "// 15 may 2016\n#import \"uipriv_darwin.h\"\n\n// TODO no intrinsic height?\n\n@interface colorButton : NSColorWell {\n\tuiColorB"
  },
  {
    "path": "darwin/combobox.m",
    "chars": 3388,
    "preview": "// 14 august 2015\n#import \"uipriv_darwin.h\"\n\n// NSComboBoxes have no intrinsic width; we'll use the default Interface Bu"
  },
  {
    "path": "darwin/control.m",
    "chars": 2225,
    "preview": "// 16 august 2015\n#import \"uipriv_darwin.h\"\n\nvoid uiDarwinControlSyncEnableState(uiDarwinControl *c, int state)\n{\n\t(*(c-"
  },
  {
    "path": "darwin/datetimepicker.m",
    "chars": 4525,
    "preview": "// 14 august 2015\n#import \"uipriv_darwin.h\"\n\nstruct uiDateTimePicker {\n\tuiDarwinControl c;\n\tNSDatePicker *dp;\n\tvoid (*on"
  },
  {
    "path": "darwin/debug.m",
    "chars": 597,
    "preview": "// 13 may 2016\n#import \"uipriv_darwin.h\"\n\n// LONGTERM don't halt on release builds\n\nvoid uiprivRealBug(const char *file,"
  },
  {
    "path": "darwin/draw.h",
    "chars": 188,
    "preview": "// 6 january 2017\n\n// TODO why do we still have this file; should we just split draw.m or not\n\nstruct uiDrawContext {\n\tC"
  },
  {
    "path": "darwin/draw.m",
    "chars": 11328,
    "preview": "// 6 september 2015\n#import \"uipriv_darwin.h\"\n#import \"draw.h\"\n\nstruct uiDrawPath {\n\tCGMutablePathRef path;\n\tuiDrawFillM"
  },
  {
    "path": "darwin/drawtext.m",
    "chars": 6369,
    "preview": "// 7 march 2018\n#import \"uipriv_darwin.h\"\n#import \"draw.h\"\n#import \"attrstr.h\"\n\n// problem: for a CTFrame made from an e"
  },
  {
    "path": "darwin/editablecombo.m",
    "chars": 5090,
    "preview": "// 14 august 2015\n#import \"uipriv_darwin.h\"\n\n// So why did I split uiCombobox into uiCombobox and uiEditableCombobox? He"
  },
  {
    "path": "darwin/entry.m",
    "chars": 5355,
    "preview": "// 14 august 2015\n#import \"uipriv_darwin.h\"\n\n// Text fields for entering text have no intrinsic width; we'll use the def"
  },
  {
    "path": "darwin/fontbutton.m",
    "chars": 5842,
    "preview": "// 14 april 2016\n#import \"uipriv_darwin.h\"\n#import \"attrstr.h\"\n\n@interface uiprivFontButton : NSButton {\n\tuiFontButton *"
  },
  {
    "path": "darwin/fontmatch.m",
    "chars": 15422,
    "preview": "// 3 january 2017\n#import \"uipriv_darwin.h\"\n#import \"attrstr.h\"\n\n// TODOs:\n// - switching from Skia to a non-fvar-based "
  },
  {
    "path": "darwin/fonttraits.m",
    "chars": 6397,
    "preview": "// 1 november 2017\n#import \"uipriv_darwin.h\"\n#import \"attrstr.h\"\n\n// This is the part of the font style matching and nor"
  },
  {
    "path": "darwin/fontvariation.m",
    "chars": 9280,
    "preview": "// 2 november 2017\n#import \"uipriv_darwin.h\"\n#import \"attrstr.h\"\n\n// This is the part of the font style matching and nor"
  },
  {
    "path": "darwin/form.m",
    "chars": 14763,
    "preview": "// 7 june 2016\n#import \"uipriv_darwin.h\"\n\n// TODO in the test program, sometimes one of the radio buttons can disappear "
  },
  {
    "path": "darwin/future.m",
    "chars": 1887,
    "preview": "// 19 may 2017\n#import \"uipriv_darwin.h\"\n\n// functions and constants FROM THE FUTURE!\n// note: for constants, dlsym() re"
  },
  {
    "path": "darwin/graphemes.m",
    "chars": 1761,
    "preview": "// 3 december 2016\n#import \"uipriv_darwin.h\"\n#import \"attrstr.h\"\n\n// CFStringGetRangeOfComposedCharactersAtIndex() is th"
  },
  {
    "path": "darwin/grid.m",
    "chars": 20426,
    "preview": "// 11 june 2016\n#import \"uipriv_darwin.h\"\n\n// TODO the assorted test doesn't work right at all\n\n@interface gridChild : N"
  },
  {
    "path": "darwin/group.m",
    "chars": 5770,
    "preview": "// 14 august 2015\n#import \"uipriv_darwin.h\"\n\nstruct uiGroup {\n\tuiDarwinControl c;\n\tNSBox *box;\n\tuiControl *child;\n\tNSLay"
  },
  {
    "path": "darwin/image.m",
    "chars": 2235,
    "preview": "// 25 june 2016\n#import \"uipriv_darwin.h\"\n\nstruct uiImage {\n\tNSImage *i;\n\tNSSize size;\n};\n\nuiImage *uiNewImage(double wi"
  },
  {
    "path": "darwin/label.m",
    "chars": 791,
    "preview": "// 14 august 2015\n#import \"uipriv_darwin.h\"\n\nstruct uiLabel {\n\tuiDarwinControl c;\n\tNSTextField *textfield;\n};\n\nuiDarwinC"
  },
  {
    "path": "darwin/main.m",
    "chars": 8037,
    "preview": "// 6 april 2015\n#import \"uipriv_darwin.h\"\n#import \"attrstr.h\"\n\nstatic BOOL canQuit = NO;\nstatic NSAutoreleasePool *globa"
  },
  {
    "path": "darwin/map.m",
    "chars": 1383,
    "preview": "// 17 august 2015\n#import \"uipriv_darwin.h\"\n\n// unfortunately NSMutableDictionary copies its keys, meaning we can't use "
  },
  {
    "path": "darwin/menu.m",
    "chars": 9755,
    "preview": "// 28 april 2015\n#import \"uipriv_darwin.h\"\n\nstatic NSMutableArray *menus = nil;\nstatic BOOL menusFinalized = NO;\n\nstruct"
  },
  {
    "path": "darwin/meson.build",
    "chars": 1372,
    "preview": "# 23 march 2019\n\nlibui_sources += [\n\t'darwin/aat.m',\n\t'darwin/alloc.m',\n\t'darwin/area.m',\n\t'darwin/areaevents.m',\n\t'darw"
  },
  {
    "path": "darwin/multilineentry.m",
    "chars": 7315,
    "preview": "// 8 december 2015\n#import \"uipriv_darwin.h\"\n\n// NSTextView has no intrinsic content size by default, which wreaks havoc"
  },
  {
    "path": "darwin/opentype.m",
    "chars": 2980,
    "preview": "// 11 may 2017\n#import \"uipriv_darwin.h\"\n#import \"attrstr.h\"\n\nstruct addCTFeatureEntryParams {\n\tCFMutableArrayRef array;"
  },
  {
    "path": "darwin/progressbar.m",
    "chars": 1703,
    "preview": "// 14 august 2015\n#import \"uipriv_darwin.h\"\n\n// NSProgressIndicator has no intrinsic width by default; use the default w"
  },
  {
    "path": "darwin/radiobuttons.m",
    "chars": 5290,
    "preview": "// 14 august 2015\n#import \"uipriv_darwin.h\"\n\n// TODO resizing the controlgallery vertically causes the third button to s"
  },
  {
    "path": "darwin/scrollview.m",
    "chars": 2080,
    "preview": "// 27 may 2016\n#include \"uipriv_darwin.h\"\n\n// see http://stackoverflow.com/questions/37979445/how-do-i-properly-set-up-a"
  }
]

// ... and 193 more files (download for full content)

About this extraction

This page contains the full source code of the andlabs/libui GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 393 files (1.7 MB), approximately 591.9k tokens, and a symbol index with 2087 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!