Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Branch for 0.2.0 #84

Merged
merged 211 commits into from
May 2, 2018
Merged
Show file tree
Hide file tree
Changes from 203 commits
Commits
Show all changes
211 commits
Select commit Hold shift + click to select a range
3f79cd1
Attempt to improve (fix) Windows event loop
parro-it Mar 20, 2018
0c9006d
core api example: add interval and http server to test node event loo…
parro-it Mar 21, 2018
a5253e4
Fixed main GUI loop wake up
parro-it Mar 21, 2018
4d86348
logs & tweaks
parro-it Mar 21, 2018
a669c4f
fix & some comments
parro-it Mar 21, 2018
73dd891
loop improvements on linux
parro-it Mar 21, 2018
4eed63c
Merge branch 'macos_event_loop' into windows_event_loop
parro-it Mar 21, 2018
531149d
basic timer support
parro-it Mar 21, 2018
30aff63
Reduce timeout in background event thread to a max of 100ms
parro-it Mar 24, 2018
cbf3fdb
Extracted event loop includes for commmon & linux
parro-it Mar 24, 2018
c87b9fb
DEBUG macro for logging
parro-it Mar 24, 2018
398d55b
external include for darwin
parro-it Mar 24, 2018
aa8c782
lint
parro-it Mar 24, 2018
55fbf09
Add usleep implementation for windows
parro-it Mar 24, 2018
cd0a93a
moved check for stopping non running loop
parro-it Mar 24, 2018
72acc7c
typo
parro-it Mar 24, 2018
5572a78
merge windows loop improvements
parro-it Mar 24, 2018
3534ede
Fix stopLoop
parro-it Mar 24, 2018
888803b
moved uv struct to header
parro-it Mar 24, 2018
40064a2
Fix loop on unix
parro-it Mar 24, 2018
73b4997
Fix loop_t redeclaration on windows
parro-it Mar 24, 2018
c12a913
Fix loop on windows
parro-it Mar 24, 2018
a1a70e8
Reverted event loop stop change
parro-it Mar 24, 2018
d69d0a0
merged master
parro-it Mar 24, 2018
e88d1c1
Font header
mischnic Mar 25, 2018
d8e3db8
Work
mischnic Mar 26, 2018
df26d26
Fixup
mischnic Mar 26, 2018
957a61d
Compile errors
mischnic Mar 26, 2018
c5c0534
Attribute, AttributedString, fixes
mischnic Mar 26, 2018
8e29ebe
Update examples, fix almost everything
mischnic Mar 26, 2018
e58ee78
Added foreach
mischnic Mar 26, 2018
e7b6b15
bump libui version [UNSTABLE VERSION ON MASTER]
parro-it Mar 26, 2018
a774801
Removed `void* data` parameter from public forEach methods.
parro-it Mar 26, 2018
2baefd3
Fix `Designated Initializers` not qorking on Windows
parro-it Mar 26, 2018
54fe2bd
Lint JS, add string null terminator
mischnic Mar 26, 2018
4eba3ff
Try to cast the char[] arg to char*
parro-it Mar 26, 2018
1643edd
Cleanup callback parameters (and silence warning)
mischnic Mar 26, 2018
faa4b9d
Cleaner overload (no API change)
mischnic Mar 26, 2018
b7f279d
Add event-loop example
parro-it Mar 27, 2018
b459fb7
Fixed double onClosing in core-api example
parro-it Mar 27, 2018
2576fc8
Add http server
parro-it Mar 27, 2018
e003984
Restored limited lines
parro-it Mar 27, 2018
aabd7f2
Overview for documentation
mischnic Mar 27, 2018
afa4c6b
Fix FontDescriptor crash, add example
mischnic Mar 28, 2018
a4f0fc5
Whoops
mischnic Mar 29, 2018
145293a
Properly overload AttributedString.appendAttributed
mischnic Mar 29, 2018
f7e7201
Expose UiFontDescriptor.free
mischnic Mar 29, 2018
c20e9c4
Guard UiFontAttribute::free
mischnic Mar 29, 2018
26148b1
Move nbind header inclusion to ui-node.h
parro-it Apr 4, 2018
4fbe1b8
Add include for vector header
parro-it Apr 4, 2018
cdd8cf7
std::string --> UiRadioButtons::append
parro-it Apr 4, 2018
da2e199
Moved most class declarations from headers to their on cc file
parro-it Apr 4, 2018
8c0e6ef
Moved UiWindow class declaration to its own cc file. Move dialogs the…
parro-it Apr 4, 2018
359ff6b
Moved UiColorButton class declarations from header to its own cc file
parro-it Apr 4, 2018
f6e3ec3
Overload UiFontAttribute.newUnderlineColor
mischnic Apr 6, 2018
b07c7b7
strlen doesn't include the null terminator
mischnic Apr 6, 2018
fa9487c
fix comment
parro-it Apr 7, 2018
05c29a2
std::string --> UiButton
parro-it Apr 7, 2018
86fff15
std::string --> UiCheckbox
parro-it Apr 7, 2018
8aad4ab
std::string --> UiCombobox
parro-it Apr 7, 2018
0fea662
std::string --> UiEditableCombobox
parro-it Apr 7, 2018
9838836
std::string --> UiEntry
parro-it Apr 7, 2018
b2c9aa8
std::string --> UiForm
parro-it Apr 7, 2018
9b3a2d9
std::string --> UiGroup
parro-it Apr 7, 2018
b3e0415
std::string --> UiLabel
parro-it Apr 7, 2018
57e1ba9
std::string --> UiMenu
parro-it Apr 7, 2018
a2a7597
std::string --> UiMultilineEntry
parro-it Apr 7, 2018
371ac45
std::string --> UiWindow
parro-it Apr 7, 2018
392a1ac
Completed headers refactoring
parro-it Apr 7, 2018
ea9fbed
Remove paths from #include-s
parro-it Apr 7, 2018
899f7ba
Ignore only libui headers, keep others
parro-it Apr 8, 2018
bc8c772
headers
parro-it Apr 8, 2018
dbb5a30
Freeing event callbacks on close to allow JS to garbage collect UiWindow
parro-it Apr 8, 2018
9eee914
onDestroy event implemented with map
parro-it Apr 8, 2018
e429e23
merged 0_2_0 branch
parro-it Apr 8, 2018
46460af
Merge branch '0_2_0' into string-memory-fix
parro-it Apr 8, 2018
1fdd749
ignored uitable.h. It shouldn't be here anyway, I'm not sure where it…
parro-it Apr 9, 2018
195b39e
back merged 0_2_0 to include UiArea fixes
parro-it Apr 9, 2018
2360a28
ported changed area class declaration from ui-node.h -> area.h
parro-it Apr 9, 2018
6958148
Rename Font classes
mischnic Apr 9, 2018
2b3a958
Fix memory leaks
mischnic Apr 9, 2018
70d6be0
Merge pull request #83 from parro-it/binding
parro-it Apr 10, 2018
e14efb0
merged 0_2_0 branch
parro-it Apr 10, 2018
8e21f34
[WIP] fixing leaks within container widgets
parro-it Apr 10, 2018
7c06f92
new example to check destroing of controls
parro-it Apr 10, 2018
e4b1f05
[WIP] working on callbacks
parro-it Apr 11, 2018
6b8cadc
Fixed events leak
parro-it Apr 13, 2018
7dfa8a7
UiSpinbox
parro-it Apr 13, 2018
a3713f1
Fixed events leak -> UiBox & UiButton
parro-it Apr 13, 2018
975bf7c
Fixed events leak -> UiButton
parro-it Apr 13, 2018
077fb17
Fixed events leak -> UiCheckbox
parro-it Apr 13, 2018
af9650a
Fixed events leak -> UiCheckbox
parro-it Apr 13, 2018
e6c54cd
USe macro to free events
parro-it Apr 13, 2018
4ed663c
Fixed events leak -> UiColorButton
parro-it Apr 13, 2018
85384c5
Fixed events leak -> UiCombobox
parro-it Apr 13, 2018
3e9d2df
Fixed events leak -> UiEditableCombobox
parro-it Apr 13, 2018
2788d2f
[TEST] removed macro to inherit UiControl, they are not needed anymore
parro-it Apr 13, 2018
d43c468
Fixed events leak -> UiEntry & friends
parro-it Apr 13, 2018
8749429
Fixed events leak -> UiFontButton
parro-it Apr 13, 2018
394957a
Fixed events leak -> UiMultilineEntry
parro-it Apr 13, 2018
1acfb8c
[WIP] other containers
parro-it Apr 13, 2018
d544dd3
[WIP] other containers
parro-it Apr 13, 2018
1d1f754
[WIP] valgrind
parro-it Apr 13, 2018
9c262e6
Comment log lines
parro-it Apr 14, 2018
4fb7dbc
Merged string_memory_fix
parro-it Apr 14, 2018
1945042
removed macro -> UiEditableCombobox
parro-it Apr 14, 2018
1ecb48e
removed macro -> UiBox
parro-it Apr 14, 2018
5c77126
removed macro -> UiButton
parro-it Apr 14, 2018
88c7ccd
removed macro -> UiCheckbox
parro-it Apr 14, 2018
27b93a9
removed macro -> UiColorButton
parro-it Apr 14, 2018
c112bea
removed macro -> UiCombobox
parro-it Apr 14, 2018
21e2597
removed macro -> UiDateTimePicker
parro-it Apr 14, 2018
d52a9a3
removed macro -> UiEntry & friends
parro-it Apr 14, 2018
5f51f22
removed macro -> UiFontButton
parro-it Apr 14, 2018
c98f38e
removed macro -> UiForm
parro-it Apr 14, 2018
0a6b144
removed macro -> UiGrid
parro-it Apr 14, 2018
4e1e8b8
removed macro -> UiGroup
parro-it Apr 14, 2018
47428ef
removed macro -> UiLabel
parro-it Apr 14, 2018
022931e
removed macro -> UiMultilineEntry
parro-it Apr 14, 2018
05fbd15
removed macro -> UiProgressBar
parro-it Apr 14, 2018
15e500d
removed macro -> UiRadioButtons
parro-it Apr 14, 2018
edf724b
removed macro -> UiSeparator
parro-it Apr 14, 2018
c79e5ea
removed macro -> UiSlider
parro-it Apr 14, 2018
eaf72a3
removed macro -> UiSpinbox
parro-it Apr 14, 2018
f5bddd6
removed macro -> UiTab
parro-it Apr 14, 2018
f8943ad
removed macro -> UiArea
parro-it Apr 14, 2018
39a44c6
Removed macro from header
parro-it Apr 14, 2018
ae1d262
UiBox
parro-it Apr 14, 2018
a196d64
UiEntry
parro-it Apr 14, 2018
4061cff
Merge branch '0_2_0' into remove-macro
parro-it Apr 14, 2018
f3d1dd7
Merge pull request #87 from parro-it/string-memory-fix
parro-it Apr 14, 2018
d87970f
Merge pull request #88 from parro-it/remove-macro
parro-it Apr 14, 2018
eb61e12
Replaces areasMap and removed now unneeded <int> constructor from UiArea
parro-it Apr 14, 2018
014a04f
Emoji example
mischnic Apr 14, 2018
c5a3a49
Removed high limit on node timeout
parro-it Apr 14, 2018
7d23249
Merge branch '0_2_0' into next-loop
parro-it Apr 14, 2018
4e19dd6
AttributedString: destructor
mischnic Apr 14, 2018
9a357e4
timer with basic syntax [unix]
parro-it Apr 14, 2018
4434e42
use new timer
parro-it Apr 14, 2018
b230e28
OpenTypeFeatures: destructor and fix get
mischnic Apr 14, 2018
e12a1a6
FontDescriptor: destructor
mischnic Apr 14, 2018
7b2df26
FontAttribute: destructor
mischnic Apr 14, 2018
ee7ee3c
Lint
mischnic Apr 14, 2018
4cc3e02
Fixup
mischnic Apr 14, 2018
08f248d
Merge pull request #89 from parro-it/more-area-fixes
parro-it Apr 14, 2018
f721e34
Merge branch '0_2_0' into next-loop
parro-it Apr 14, 2018
e89b573
setTimeout and setInterval for macos
mischnic Apr 14, 2018
034de54
Resync docs.js with readme, add FontButton
mischnic Apr 14, 2018
e7ec52e
DrawTextLayout: destructor
mischnic Apr 14, 2018
519f4ce
Refactors timer - unix
parro-it Apr 15, 2018
cc3eaaa
Refactors timer - macOS
parro-it Apr 15, 2018
5dbd532
Fix timer header
parro-it Apr 15, 2018
bcbe5c1
cocoa headers
parro-it Apr 15, 2018
8bdb3e0
moved includes to header
parro-it Apr 15, 2018
a2abf88
Switched to voi* on macOS
parro-it Apr 15, 2018
e10094b
timer with basic syntax [win32]
parro-it Apr 15, 2018
6dca74e
Read handler from map [win32]
parro-it Apr 15, 2018
196ab49
Fixed timers on Windows by renaming timer-common and using a NULL win…
parro-it Apr 15, 2018
e6387d8
Overwrite node's setTimeout
mischnic Apr 15, 2018
46f7907
Fix OpenTypeFeatures:clone, docs
mischnic Apr 15, 2018
396875d
onShouldQuit exposed directly, new init example, and docs
parro-it Apr 15, 2018
b063eca
Rewording
mischnic Apr 15, 2018
4da95ab
newBackground_Color_, docs
mischnic Apr 15, 2018
5448fea
Forgotten {}
parro-it Apr 15, 2018
d96e3f1
Fix global timers fn patching
parro-it Apr 15, 2018
7812613
Guard FontAttribute.get...
mischnic Apr 15, 2018
0a93c96
FontAttribute docs
mischnic Apr 15, 2018
27ec27f
Font docs, insertAttributed
mischnic Apr 15, 2018
62f0c71
use global patched setTimeout
parro-it Apr 15, 2018
513bac9
Removed test code
parro-it Apr 15, 2018
4d4df0a
Removed weird paths from includes
parro-it Apr 15, 2018
727f8be
Removed code to check for node timers, since we reimplemented them.
parro-it Apr 15, 2018
444b83c
[WIP] sync main & poller threads
parro-it Apr 16, 2018
cfec5e9
Merge branch '0_2_0' into font
mischnic Apr 17, 2018
a85cd92
Make the http buttons restart server on every click.
parro-it Apr 17, 2018
a3c3d7c
[WIP] more improvements syncing main & poller threads
parro-it Apr 17, 2018
1bc1b6b
Fix forEach methods
mischnic Apr 18, 2018
e313fb3
[WIP] again more improvements syncing main & poller threads
parro-it Apr 19, 2018
9a5f62e
Restore timers substitutions
parro-it Apr 19, 2018
7e2a60b
[WIP] fixing app closure
parro-it Apr 21, 2018
3c8d620
Bump libui version
parro-it Apr 21, 2018
920717b
[WIP] trying async hook
parro-it Apr 21, 2018
66c38cf
Merge pull request #74 from parro-it/font
parro-it Apr 21, 2018
8bff676
merged 0_2_0
parro-it Apr 21, 2018
5d84112
Enabled aync hook only on startLoop
parro-it Apr 21, 2018
d693108
tweaks
parro-it Apr 21, 2018
859d74c
More fixing for closing
parro-it Apr 21, 2018
bf155a4
Loop changes on windows & macOS
parro-it Apr 21, 2018
bd73bc8
Bump supported node version
parro-it Apr 21, 2018
fce4b06
Fixed example
parro-it Apr 21, 2018
5bd7d09
tweaks
parro-it Apr 21, 2018
e4ba55c
Other closing fixes
parro-it Apr 21, 2018
23ae788
No debug
parro-it Apr 21, 2018
c7c8645
Merge pull request #90 from parro-it/next-loop
parro-it Apr 21, 2018
93131cb
Merged master into 0_2_0
parro-it Apr 22, 2018
17f71ed
Fix event loop on Sierra (or is on latest clang release?)
parro-it Apr 22, 2018
435572a
Add async_hooks polyfill
mischnic Apr 22, 2018
11de8ac
async_hooks polyfill for node4+
mischnic Apr 22, 2018
06c2fcd
Restore tests for version 4 & 6 in CI
parro-it Apr 22, 2018
081770c
Fix examples on windows
mischnic Apr 24, 2018
232d9db
Install older npm version, since latest does not run anymore on node 4
parro-it Apr 24, 2018
80a2488
Merge branch '0_2_0' of https://github.com/parro-it/libui-node into 0…
parro-it Apr 24, 2018
6386588
Really fix eventloop example
mischnic Apr 25, 2018
f3dd4eb
Fix examples
mischnic Apr 28, 2018
443a22a
update pkg lock
parro-it Apr 29, 2018
c581aba
commented DISPOSE_EVENT macro
parro-it Apr 29, 2018
feaedf0
multiline comments with // cause warnings when compiling with gcc on …
parro-it Apr 29, 2018
46291ff
bump libui-download version to get rid of security issues
parro-it Apr 30, 2018
998adc4
Handle null with clearTimeout/Interval
mischnic Apr 30, 2018
ab47e03
Further mitigation for clear timers problem. Check if the timeout or …
parro-it Apr 30, 2018
e634711
Add node 10 to CI
parro-it Apr 30, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
BasedOnStyle: LLVM
IndentWidth: 4
TabWidth: 4
UseTab: Always
MaxEmptyLinesToKeep: 1
ColumnLimit: 80
AllowShortBlocksOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
---
Language: Cpp
AllowShortFunctionsOnASingleLine: Empty
PointerAlignment: Right
IncludeCategories:
- Regex: "^<"
Priority: 0
- Regex: '/ui.h"$'
Priority: 1
- Regex: 'ui-node.h"$'
Priority: 2
- Regex: '"nbind/.*"'
Priority: 3

---
Language: JavaScript
ColumnLimit: 0
AllowShortFunctionsOnASingleLine: Empty
JavaScriptQuotes: Single
IndentCaseLabels: true
SpacesInContainerLiterals: false
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ build
auto*.gypi
_libui

*.h
ui_*.h
ui.h
uitable.h

*.dylib
*.dll
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ node_js:
- '9'
- '8'
- '6'
- '5'
- '4'

sudo: required
Expand Down
3 changes: 1 addition & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ environment:
- nodejs_version: "9"
- nodejs_version: "8"
- nodejs_version: "6"
- nodejs_version: "5"
- nodejs_version: "4"

install:
- ps: Install-Product node $env:nodejs_version x64
- npm i npm@latest -g
- npm i npm@5.7 -g
- npm install


Expand Down
63 changes: 12 additions & 51 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,14 @@
"targets": [
{
"target_name": "nbind",
'include_dirs': ["<(module_root_dir)/src/includes", "<(module_root_dir)"],
"includes": [
"auto.gypi"
],
"sources": [
"src/EventLoop.cc",
"src/UiFontButton.cc",
"src/UiArea/DrawTextFont.cc",
"src/UiArea/DrawTextFontDescriptor.cc",
"src/UiArea/DrawTextFontMetrics.cc",
"src/UiArea/DrawTextLayout.cc",
"src/UiArea/UiArea.cc",
"src/UiArea/DrawStrokeParams.cc",
"src/UiArea/UiDrawContext.cc",
"src/UiArea/UiDrawPath.cc",
"src/UiArea/DrawBrush.cc",
"src/SizeDouble.cc",
"src/PointDouble.cc",
"src/UiArea/DrawMatrix.cc",
"src/UiArea/BrushGradientStop.cc",
"src/UiArea/UiAreaDrawParams.cc",
"src/UiArea/UiAreaKeyEvent.cc",
"src/UiArea/UiAreaMouseEvent.cc",
"src/UiArea/UiAreaHandler.cc",
"src/UiGrid.cc",
"src/UiForm.cc",
"src/Size.cc",
"src/Point.cc",
"src/Color.cc",
"src/UiColorButton.cc",
"src/UiDialogs.cc",
"src/UiMenu.cc",
"src/UiCombobox.cc",
"src/UiSlider.cc",
"src/UiSpinbox.cc",
"src/UiCheckbox.cc",
"src/UiWindow.cc",
"src/UiEntry.cc",
"src/UiMultilineEntry.cc",
"src/UiRadioButtons.cc",
"src/UiEditableCombobox.cc",
"src/UiGroup.cc",
"src/UiTab.cc",
"src/UiBox.cc",
"src/UiDateTimePicker.cc",
"src/UiSeparator.cc",
"src/UiProgressBar.cc",
"src/Ui.cc",
"src/UiControl.cc",
"src/UiLabel.cc",
"src/UiButton.cc",
],
"conditions": [
["OS=='win'", {
"sources": [
"src/arch/win32/libui_loop.cc"
'<!@(node list-sources.js)',
],
"libraries": [
"<(module_root_dir)/libui.lib"
Expand All @@ -72,8 +25,12 @@
}],
["OS=='linux'", {
"sources": [
"src/arch/unix/libui_loop.cc"
"<!@(ls -1 src/*.cc)",
"<!@(ls -1 src/Font/*.cc)",
"<!@(ls -1 src/UiArea/*.cc)",
"<!@(ls -1 src/arch/unix/*.cc)"
],
"cflags": ["-fvisibility=hidden"],
'ldflags': [
"-Wl,-rpath,'$$ORIGIN',-rpath,<(module_root_dir)",
],
Expand All @@ -86,10 +43,14 @@
}],
["OS=='mac'", {
"sources": [
"src/arch/darwin/libui_loop.mm"
"<!@(ls -1 src/*.cc)",
"<!@(ls -1 src/Font/*.cc)",
"<!@(ls -1 src/UiArea/*.cc)",
"<!@(ls -1 src/arch/darwin/*.mm)"
],
"xcode_settings": {
"OTHER_LDFLAGS": [
"-fvisibility=hidden",
"-L<(module_root_dir)",
"-lui",
"-rpath",
Expand Down
Loading