Compare commits

..

No commits in common. "witmaster" and "meson" have entirely different histories.

18 changed files with 83 additions and 118 deletions

View File

@ -1,7 +0,0 @@
all:
redomod:
rm -f go.*
GO111MODULE= go mod init
GO111MODULE= go mod tidy

View File

@ -2,7 +2,7 @@
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)
[![Build Status, AppVeyor](https://ci.appveyor.com/api/projects/status/ouyk78c52mmisa31?svg=true)](https://ci.appveyor.com/project/andlabs/libui)
## Status
@ -156,7 +156,7 @@ 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)
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)
@ -165,8 +165,8 @@ Lua | [libuilua](https://github.com/zevv/libuilua), [libui-lua](https://github.c
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)
Python | [pylibui](https://github.com/joaoventura/pylibui), [pylibui-cffi](https://github.com/Yardanico/pylibui-cffi)
Ruby | [libui-ruby](https://github.com/jamescook/libui-ruby)
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)

View File

@ -1,23 +0,0 @@
https://developer.apple.com/documentation/corefoundation/1542764-cfurlcopyresourcepropertyforkey?language=objc
https://developer.apple.com/documentation/foundation/nsargumentdomain?language=objc
https://developer.apple.com/documentation/appkit/1428499-nsapplicationmain
https://webkit.googlesource.com/WebKit/+/9ae3deefb7df48bd85f01edcf8382ee300eafbd4%5E!/
https://stackoverflow.com/questions/11181324/how-to-change-retina-display-system-preferences-in-osx
https://web.archive.org/web/20150828053709/http://garethjenkins.com/2012/07/01/investigating-a-high-resolution-retina-utility-for-macbook-pro-1x-and-2x-modes/
https://github.com/avibrazil/RDM
https://www.google.com/search?client=firefox-b-1-d&q=IOFramebuffer+subclass
https://developer.apple.com/documentation/kernel/ioframebuffer?language=objc
https://stackoverflow.com/questions/51846999/how-to-write-macos-display-driver
https://twitter.com/kenkeiter/status/3631378994298882
http://en.ennowelbers.info/node/33
https://www.insanelymac.com/forum/topic/114528-how-to-compile-a-driver-from-source/
https://github.com/mkernel/EWProxyFramebuffer
https://stackoverflow.com/questions/46904493/ioframebuffer-cant-access-vram-framebuffer-in-macos-10-13
https://www.google.com/search?client=firefox-b-1-d&q=IOFramebuffer+10.13
https://github.com/codykrieger/gfxCardStatus/issues/296
https://plugable.com/2018/03/30/macos-10-13-4-disables-displaylink-duet-display-devices/
https://www.tekrevue.com/tip/hidpi-mode-os-x/
https://medium.com/@ivan.ha/how-to-mimic-a-2k-monitor-as-retina-display-in-macos-sierra-using-hidpi-f53d87630c48
https://www.google.com/search?client=firefox-b-1-d&q=IOFramebuffer+10.13
https://www.quora.com/What-is-the-underlying-reason-if-DisplayLink-is-no-longer-working-properly-on-Mac-OS
https://github.com/Siguza/iokit-utils

View File

@ -23,8 +23,8 @@ jobs:
clean: all
steps:
- template: azure-pipelines/setup-python3.yml
- template: azure-pipelines/install-latest-meson-ninja.yml
- template: azure-pipelines/linux-386-install-gtk-dev.yml
- template: azure-pipelines/install-latest-meson.yml
- template: azure-pipelines/linux-386-install-gtk-dev-ninja.yml
- template: azure-pipelines/configure.yml
parameters:
beforeConfigure: export CFLAGS=-m32 CXXFLAGS=-m32 PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig
@ -46,8 +46,8 @@ jobs:
clean: all
steps:
- template: azure-pipelines/setup-python3.yml
- template: azure-pipelines/install-latest-meson-ninja.yml
- template: azure-pipelines/linux-386-install-gtk-dev.yml
- template: azure-pipelines/install-latest-meson.yml
- template: azure-pipelines/linux-386-install-gtk-dev-ninja.yml
- template: azure-pipelines/configure.yml
parameters:
beforeConfigure: export CFLAGS=-m32 CXXFLAGS=-m32 PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig
@ -69,8 +69,8 @@ jobs:
clean: all
steps:
- template: azure-pipelines/setup-python3.yml
- template: azure-pipelines/install-latest-meson-ninja.yml
- template: azure-pipelines/linux-install-gtk-dev.yml
- template: azure-pipelines/install-latest-meson.yml
- template: azure-pipelines/linux-install-gtk-dev-ninja.yml
- template: azure-pipelines/configure.yml
parameters:
defaultLibrary: shared
@ -91,8 +91,8 @@ jobs:
clean: all
steps:
- template: azure-pipelines/setup-python3.yml
- template: azure-pipelines/install-latest-meson-ninja.yml
- template: azure-pipelines/linux-install-gtk-dev.yml
- template: azure-pipelines/install-latest-meson.yml
- template: azure-pipelines/linux-install-gtk-dev-ninja.yml
- template: azure-pipelines/configure.yml
parameters:
defaultLibrary: static
@ -117,7 +117,7 @@ jobs:
clean: all
steps:
- template: azure-pipelines/vs2015-install-python3.yml
- template: azure-pipelines/install-latest-meson-ninja.yml
- template: azure-pipelines/install-latest-meson.yml
- template: azure-pipelines/windows-install-ninja.yml
- template: azure-pipelines/configure.yml
parameters:
@ -143,7 +143,7 @@ jobs:
clean: all
steps:
- template: azure-pipelines/vs2015-install-python3.yml
- template: azure-pipelines/install-latest-meson-ninja.yml
- template: azure-pipelines/install-latest-meson.yml
- template: azure-pipelines/windows-install-ninja.yml
- template: azure-pipelines/configure.yml
parameters:
@ -170,7 +170,7 @@ jobs:
clean: all
steps:
- template: azure-pipelines/vs2015-install-python3.yml
- template: azure-pipelines/install-latest-meson-ninja.yml
- template: azure-pipelines/install-latest-meson.yml
- template: azure-pipelines/windows-install-ninja.yml
- template: azure-pipelines/configure.yml
parameters:
@ -196,7 +196,7 @@ jobs:
clean: all
steps:
- template: azure-pipelines/vs2015-install-python3.yml
- template: azure-pipelines/install-latest-meson-ninja.yml
- template: azure-pipelines/install-latest-meson.yml
- template: azure-pipelines/windows-install-ninja.yml
- template: azure-pipelines/configure.yml
parameters:
@ -227,7 +227,7 @@ jobs:
clean: all
steps:
- template: azure-pipelines/setup-python3.yml
- template: azure-pipelines/install-latest-meson-ninja.yml
- template: azure-pipelines/install-latest-meson.yml
- template: azure-pipelines/windows-install-ninja.yml
- template: azure-pipelines/configure.yml
parameters:
@ -253,7 +253,7 @@ jobs:
clean: all
steps:
- template: azure-pipelines/setup-python3.yml
- template: azure-pipelines/install-latest-meson-ninja.yml
- template: azure-pipelines/install-latest-meson.yml
- template: azure-pipelines/windows-install-ninja.yml
- template: azure-pipelines/configure.yml
parameters:
@ -280,7 +280,7 @@ jobs:
clean: all
steps:
- template: azure-pipelines/setup-python3.yml
- template: azure-pipelines/install-latest-meson-ninja.yml
- template: azure-pipelines/install-latest-meson.yml
- template: azure-pipelines/windows-install-ninja.yml
- template: azure-pipelines/configure.yml
parameters:
@ -306,7 +306,7 @@ jobs:
clean: all
steps:
- template: azure-pipelines/setup-python3.yml
- template: azure-pipelines/install-latest-meson-ninja.yml
- template: azure-pipelines/install-latest-meson.yml
- template: azure-pipelines/windows-install-ninja.yml
- template: azure-pipelines/configure.yml
parameters:
@ -339,7 +339,7 @@ jobs:
clean: all
steps:
- template: azure-pipelines/setup-python3.yml
- template: azure-pipelines/install-latest-meson-ninja.yml
- template: azure-pipelines/install-latest-meson.yml
- template: azure-pipelines/darwin-install-ninja.yml
- template: azure-pipelines/configure.yml
parameters:
@ -361,7 +361,7 @@ jobs:
clean: all
steps:
- template: azure-pipelines/setup-python3.yml
- template: azure-pipelines/install-latest-meson-ninja.yml
- template: azure-pipelines/install-latest-meson.yml
- template: azure-pipelines/darwin-install-ninja.yml
- template: azure-pipelines/configure.yml
parameters:

View File

@ -25,7 +25,7 @@ strategy:
libtype: 'shared'
vmImage: 'ubuntu-16.04'
python3Template: 'azure-pipelines/setup-python3.yml'
depsAndNinjaTemplate: 'azure-pipelines/linux-386-install-gtk-dev.yml'
depsAndNinjaTemplate: 'azure-pipelines/linux-386-install-gtk-dev-ninja.yml'
beforeConfigure: 'export CFLAGS=-m32 CXXFLAGS=-m32 PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig'
artifactTemplate: 'azure-pipelines/artifacts.yml'
libfiles: 'libui.so.0'
@ -39,7 +39,7 @@ workspace:
steps:
- template: $(variables.python3Template)
- template: azure-pipelines/install-latest-meson-ninja.yml
- template: azure-pipelines/install-latest-meson.yml
- template: $(variables.depsAndNinjaTemplate)
- template: azure-pipelines/configure.yml
parameters:
@ -67,8 +67,8 @@ steps:
# clean: all
# steps:
# - template: azure-pipelines/setup-python3.yml
# - template: azure-pipelines/install-latest-meson-ninja.yml
# - template: azure-pipelines/linux-386-install-gtk-dev.yml
# - template: azure-pipelines/install-latest-meson.yml
# - template: azure-pipelines/linux-386-install-gtk-dev-ninja.yml
# - template: azure-pipelines/configure.yml
# parameters:
# beforeConfigure: export CFLAGS=-m32 CXXFLAGS=-m32 PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig
@ -90,8 +90,8 @@ steps:
# clean: all
# steps:
# - template: azure-pipelines/setup-python3.yml
# - template: azure-pipelines/install-latest-meson-ninja.yml
# - template: azure-pipelines/linux-install-gtk-dev.yml
# - template: azure-pipelines/install-latest-meson.yml
# - template: azure-pipelines/linux-install-gtk-dev-ninja.yml
# - template: azure-pipelines/configure.yml
# parameters:
# defaultLibrary: shared
@ -112,8 +112,8 @@ steps:
# clean: all
# steps:
# - template: azure-pipelines/setup-python3.yml
# - template: azure-pipelines/install-latest-meson-ninja.yml
# - template: azure-pipelines/linux-install-gtk-dev.yml
# - template: azure-pipelines/install-latest-meson.yml
# - template: azure-pipelines/linux-install-gtk-dev-ninja.yml
# - template: azure-pipelines/configure.yml
# parameters:
# defaultLibrary: static
@ -138,7 +138,7 @@ steps:
# clean: all
# steps:
# - template: azure-pipelines/vs2015-install-python3.yml
# - template: azure-pipelines/install-latest-meson-ninja.yml
# - template: azure-pipelines/install-latest-meson.yml
# - template: azure-pipelines/windows-install-ninja.yml
# - template: azure-pipelines/configure.yml
# parameters:
@ -164,7 +164,7 @@ steps:
# clean: all
# steps:
# - template: azure-pipelines/vs2015-install-python3.yml
# - template: azure-pipelines/install-latest-meson-ninja.yml
# - template: azure-pipelines/install-latest-meson.yml
# - template: azure-pipelines/windows-install-ninja.yml
# - template: azure-pipelines/configure.yml
# parameters:
@ -191,7 +191,7 @@ steps:
# clean: all
# steps:
# - template: azure-pipelines/vs2015-install-python3.yml
# - template: azure-pipelines/install-latest-meson-ninja.yml
# - template: azure-pipelines/install-latest-meson.yml
# - template: azure-pipelines/windows-install-ninja.yml
# - template: azure-pipelines/configure.yml
# parameters:
@ -217,7 +217,7 @@ steps:
# clean: all
# steps:
# - template: azure-pipelines/vs2015-install-python3.yml
# - template: azure-pipelines/install-latest-meson-ninja.yml
# - template: azure-pipelines/install-latest-meson.yml
# - template: azure-pipelines/windows-install-ninja.yml
# - template: azure-pipelines/configure.yml
# parameters:
@ -248,7 +248,7 @@ steps:
# clean: all
# steps:
# - template: azure-pipelines/setup-python3.yml
# - template: azure-pipelines/install-latest-meson-ninja.yml
# - template: azure-pipelines/install-latest-meson.yml
# - template: azure-pipelines/windows-install-ninja.yml
# - template: azure-pipelines/configure.yml
# parameters:
@ -274,7 +274,7 @@ steps:
# clean: all
# steps:
# - template: azure-pipelines/setup-python3.yml
# - template: azure-pipelines/install-latest-meson-ninja.yml
# - template: azure-pipelines/install-latest-meson.yml
# - template: azure-pipelines/windows-install-ninja.yml
# - template: azure-pipelines/configure.yml
# parameters:
@ -301,7 +301,7 @@ steps:
# clean: all
# steps:
# - template: azure-pipelines/setup-python3.yml
# - template: azure-pipelines/install-latest-meson-ninja.yml
# - template: azure-pipelines/install-latest-meson.yml
# - template: azure-pipelines/windows-install-ninja.yml
# - template: azure-pipelines/configure.yml
# parameters:
@ -327,7 +327,7 @@ steps:
# clean: all
# steps:
# - template: azure-pipelines/setup-python3.yml
# - template: azure-pipelines/install-latest-meson-ninja.yml
# - template: azure-pipelines/install-latest-meson.yml
# - template: azure-pipelines/windows-install-ninja.yml
# - template: azure-pipelines/configure.yml
# parameters:
@ -360,7 +360,7 @@ steps:
# clean: all
# steps:
# - template: azure-pipelines/setup-python3.yml
# - template: azure-pipelines/install-latest-meson-ninja.yml
# - template: azure-pipelines/install-latest-meson.yml
# - template: azure-pipelines/darwin-install-ninja.yml
# - template: azure-pipelines/configure.yml
# parameters:
@ -382,7 +382,7 @@ steps:
# clean: all
# steps:
# - template: azure-pipelines/setup-python3.yml
# - template: azure-pipelines/install-latest-meson-ninja.yml
# - template: azure-pipelines/install-latest-meson.yml
# - template: azure-pipelines/darwin-install-ninja.yml
# - template: azure-pipelines/configure.yml
# parameters:

View File

@ -1,5 +1,7 @@
# 6 april 2019
# TODO the github task requires authorization for the connection on non-master branches but I can't seem to figure out how to do that with a YAML pipeline
parameters:
os: ''
arch: ''
@ -17,12 +19,12 @@ steps:
rm ui.h ${{ parameters.osHeader }}
popd
displayName: 'Create Artifacts'
- task: GitHubRelease@0
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
inputs:
gitHubConnection: andlabs
repositoryName: andlabs/libui
action: 'edit'
addChangelog: false
assets: '$(Build.ArtifactStagingDirectory)/*'
assetUploadMode: 'replace'
- ${{ if eq(variables['Build.SourceBranchName'], 'master') }}:
- task: GitHubRelease@0
inputs:
gitHubConnection: andlabs
repositoryName: andlabs/libui
action: 'edit'
addChangelog: false
assets: '$(Build.ArtifactStagingDirectory)/*'
assetUploadMode: 'replace'

View File

@ -102,10 +102,10 @@
- template: azure-pipelines/setup-python3.yml
- template: azure-pipelines/vs2015-install-python3.yml
}
- template: azure-pipelines/install-latest-meson-ninja.yml
- template: azure-pipelines/install-latest-meson.yml
{
- template: azure-pipelines/linux-386-install-gtk-dev.yml
- template: azure-pipelines/linux-install-gtk-dev.yml
- template: azure-pipelines/linux-386-install-gtk-dev-ninja.yml
- template: azure-pipelines/linux-install-gtk-dev-ninja.yml
- template: azure-pipelines/windows-install-ninja.yml
- template: azure-pipelines/darwin-install-ninja.yml
}

View File

@ -1,9 +0,0 @@
# 4 april 2019
# TODO remove ninja installation from non-Linux OSs and make the same ninja via pip change in the AppVeyor script
steps:
- script: |
python -m pip install --upgrade pip setuptools wheel
pip install meson ninja
displayName: 'Install Latest Meson and Ninja'

View File

@ -0,0 +1,7 @@
# 4 april 2019
steps:
- script: |
python -m pip install --upgrade pip setuptools wheel
pip install meson
displayName: 'Install Latest Meson'

View File

@ -13,5 +13,5 @@ steps:
sudo apt-get install --allow-downgrades \
gcc-multilib g++-multilib \
$llvmPackages \
libgtk-3-dev:i386
displayName: 'Install GTK+ Dev Files'
libgtk-3-dev:i386 ninja-build
displayName: 'Install GTK+ Dev Files and Ninja'

View File

@ -0,0 +1,6 @@
# 7 april 2019
steps:
- script: |
sudo apt-get install libgtk-3-dev ninja-build
displayName: 'Install GTK+ Dev Files and Ninja'

View File

@ -1,6 +0,0 @@
# 7 april 2019
steps:
- script: |
sudo apt-get install libgtk-3-dev
displayName: 'Install GTK+ Dev Files'

View File

@ -17,12 +17,12 @@ steps:
Remove-Item @("ui.h","${{ parameters.osHeader }}")
popd
displayName: 'Create Artifacts'
- task: GitHubRelease@0
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
inputs:
gitHubConnection: andlabs
repositoryName: andlabs/libui
action: 'edit'
addChangelog: false
assets: '$(Build.ArtifactStagingDirectory)/*'
assetUploadMode: 'replace'
- ${{ if eq(variables['Build.SourceBranchName'], 'master') }}:
- task: GitHubRelease@0
inputs:
gitHubConnection: andlabs
repositoryName: andlabs/libui
action: 'edit'
addChangelog: false
assets: '$(Build.ArtifactStagingDirectory)/*'
assetUploadMode: 'replace'

3
go.mod
View File

@ -1,3 +0,0 @@
module go.wit.com/dev/andlabs/libui
go 1.21.4

View File

@ -248,9 +248,6 @@ static gboolean areaWidget_button_press_event(GtkWidget *w, GdkEventButton *e)
// clicking doesn't automatically transfer keyboard focus; we must do so manually (thanks tristan in irc.gimp.net/#gtk+)
gtk_widget_grab_focus(w);
me.Down = e->button;
me.Up = 0;
// we handle multiple clicks ourselves here, in the same way as we do on Windows
if (e->type != GDK_BUTTON_PRESS)
// ignore GDK's generated double-clicks and beyond
@ -269,6 +266,9 @@ static gboolean areaWidget_button_press_event(GtkWidget *w, GdkEventButton *e)
e->time, maxTime,
maxDistance, maxDistance);
me.Down = e->button;
me.Up = 0;
// and set things up for window drags
a->dragevent = e;
finishMouseEvent(a, &me, e->button, e->x, e->y, e->state, e->window);

View File

@ -62,7 +62,6 @@ static void setEditable(uiTableModel *m, GtkTreeIter *iter, int modelColumn, Gtk
// TODO avoid the need for this
path = gtk_tree_model_get_path(GTK_TREE_MODEL(m), iter);
row = gtk_tree_path_get_indices(path)[0];
gtk_tree_path_free(path);
editable = uiprivTableModelCellEditable(m, row, modelColumn) != 0;
g_object_set(r, prop, editable, NULL);
}
@ -257,7 +256,6 @@ static void progressBarColumnDataFunc(GtkTreeViewColumn *c, GtkCellRenderer *r,
// TODO avoid the need for this
path = gtk_tree_model_get_path(GTK_TREE_MODEL(m), iter);
rc->row = gtk_tree_path_get_indices(path)[0];
gtk_tree_path_free(path);
rc->col = p->modelColumn;
val = (gint *) g_hash_table_lookup(p->t->indeterminatePositions, rc);
if (pval == -1) {

View File

@ -16,7 +16,7 @@
// get Windows version right; right now Windows Vista
// unless otherwise stated, all values from Microsoft's sdkddkver.h
// TODO is all of this necessary? how is NTDDI_VERSION used?
// TODO platform update sp2
// TODO plaform update sp2
#define WINVER 0x0600 /* from Microsoft's winnls.h */
#define _WIN32_WINNT 0x0600
#define _WIN32_WINDOWS 0x0600 /* from Microsoft's pdh.h */

View File

@ -16,7 +16,7 @@
// get Windows version right; right now Windows Vista
// unless otherwise stated, all values from Microsoft's sdkddkver.h
// TODO is all of this necessary? how is NTDDI_VERSION used?
// TODO platform update sp2
// TODO plaform update sp2
#define WINVER 0x0600 /* from Microsoft's winnls.h */
#define _WIN32_WINNT 0x0600
#define _WIN32_WINDOWS 0x0600 /* from Microsoft's pdh.h */