{"action":"created","comment":{"url":"https://api.github.com/repos/parro-it/libui-node/pulls/comments/177221735","pull_request_review_id":107058291,"id":177221735,"diff_hunk":"@@ -0,0 +1,69 @@\n+#include \"../../ui.h\"\n+#include \"../ui-node.h\"\n+#include \"nbind/nbind.h\"\n+\n+UiOpenTypeFeatures::UiOpenTypeFeatures(uiOpenTypeFeatures *feat) {\n+\tf = feat;\n+}\n+\n+UiOpenTypeFeatures::UiOpenTypeFeatures() {\n+\tf = uiNewOpenTypeFeatures();\n+}\n+\n+void UiOpenTypeFeatures::free() {\n+\tuiFreeOpenTypeFeatures(f);\n+}\n+\n+uiOpenTypeFeatures *UiOpenTypeFeatures::getHandle() {\n+\treturn f;\n+}\n+\n+UiOpenTypeFeatures *UiOpenTypeFeatures::clone(UiOpenTypeFeatures *f2) {\n+\treturn new UiOpenTypeFeatures(uiOpenTypeFeaturesClone(f2->f));\n+}\n+\n+void UiOpenTypeFeatures::add(const char *c, uint32_t value) {\n+\tuiOpenTypeFeaturesAdd(f, c[0], c[1], c[2], c[3], value);\n+}\n+\n+void UiOpenTypeFeatures::remove(const char *c) {\n+\tuiOpenTypeFeaturesRemove(f, c[0], c[1], c[2], c[3]);\n+}\n+\n+// uiOpenTypeFeaturesGet() determines whether the given feature\n+// tag is present in otf. If it is, *value is set to the tag's value and\n+// nonzero is returned. Otherwise, zero is returned.\n+//\n+// Note that if uiOpenTypeFeaturesGet() returns zero, value isn't\n+// changed. This is important: if a feature is not present in a\n+// uiOpenTypeFeatures, the feature is NOT treated as if its\n+// value was zero anyway. Script-specific font shaping rules and\n+// font-specific feature settings may use a different default value\n+// for a feature. You should likewise not treat a missing feature as\n+// having a value of zero either. Instead, a missing feature should\n+// be treated as having some unspecified default value.\n+int UiOpenTypeFeatures::get(const char *c, uint32_t *value) {\n+\treturn uiOpenTypeFeaturesGet(f, c[0], c[1], c[2], c[3], value);\n+}\n+\n+static unsigned int UiOpenTypeFeatures__forEach(const uiOpenTypeFeatures *otf, char a, char b, char c, char d, uint32_t value, void *data) {\n+\tconst char str[5] = {a, b, c, d, '\\0'};","path":"src/Font/UiOpenTypeFeatures.cc","position":50,"original_position":50,"commit_id":"4eba3ff01823867f99b645b5a740eafe84db6220","original_commit_id":"54fe2bd4cfcfc7d40047d75174402414001f1e5b","user":{"login":"parro-it","id":11197111,"avatar_url":"https://avatars2.githubusercontent.com/u/11197111?v=4","gravatar_id":"","url":"https://api.github.com/users/parro-it","html_url":"https://github.com/parro-it","followers_url":"https://api.github.com/users/parro-it/followers","following_url":"https://api.github.com/users/parro-it/following{/other_user}","gists_url":"https://api.github.com/users/parro-it/gists{/gist_id}","starred_url":"https://api.github.com/users/parro-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parro-it/subscriptions","organizations_url":"https://api.github.com/users/parro-it/orgs","repos_url":"https://api.github.com/users/parro-it/repos","events_url":"https://api.github.com/users/parro-it/events{/privacy}","received_events_url":"https://api.github.com/users/parro-it/received_events","type":"User","site_admin":false},"body":"> I didn't mean to insult you.\r\n\r\nNo worries, no offense. And it wasn't an insult anyway, just an emoji 😆\r\n\r\n> 👍 works\r\n\r\nI saw. Maybe we can open an issue on nbind repos, seems a weird hack ","created_at":"2018-03-26T20:22:06Z","updated_at":"2018-03-26T20:22:06Z","html_url":"https://github.com/parro-it/libui-node/pull/74#discussion_r177221735","pull_request_url":"https://api.github.com/repos/parro-it/libui-node/pulls/74","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/parro-it/libui-node/pulls/comments/177221735"},"html":{"href":"https://github.com/parro-it/libui-node/pull/74#discussion_r177221735"},"pull_request":{"href":"https://api.github.com/repos/parro-it/libui-node/pulls/74"}},"in_reply_to_id":177217655},"pull_request":{"url":"https://api.github.com/repos/parro-it/libui-node/pulls/74","id":177402353,"html_url":"https://github.com/parro-it/libui-node/pull/74","diff_url":"https://github.com/parro-it/libui-node/pull/74.diff","patch_url":"https://github.com/parro-it/libui-node/pull/74.patch","issue_url":"https://api.github.com/repos/parro-it/libui-node/issues/74","number":74,"state":"open","locked":false,"title":"[WIP] Attributed String","user":{"login":"mischnic","id":4586894,"avatar_url":"https://avatars1.githubusercontent.com/u/4586894?v=4","gravatar_id":"","url":"https://api.github.com/users/mischnic","html_url":"https://github.com/mischnic","followers_url":"https://api.github.com/users/mischnic/followers","following_url":"https://api.github.com/users/mischnic/following{/other_user}","gists_url":"https://api.github.com/users/mischnic/gists{/gist_id}","starred_url":"https://api.github.com/users/mischnic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mischnic/subscriptions","organizations_url":"https://api.github.com/users/mischnic/orgs","repos_url":"https://api.github.com/users/mischnic/repos","events_url":"https://api.github.com/users/mischnic/events{/privacy}","received_events_url":"https://api.github.com/users/mischnic/received_events","type":"User","site_admin":false},"body":"*For a more centralized discussion*\r\n\r\nTodo:\r\n- [x] implement libui api\r\n- [x] update example\r\n- [x] the forEach methods in OpenType and AttributedString\r\n- [ ] overloading `UiAttributedString.appendAttributed[2]` - using js or nbind ?\r\n- [ ] is the API naming okay?\r\n- [ ] memory leaks\r\n- [ ] documentation\r\n\r\nCloses #70","created_at":"2018-03-26T10:23:56Z","updated_at":"2018-03-26T20:22:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f79cddf5982938d1e4572324f7b3cb9909ddaef","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/parro-it/libui-node/pulls/74/commits","review_comments_url":"https://api.github.com/repos/parro-it/libui-node/pulls/74/comments","review_comment_url":"https://api.github.com/repos/parro-it/libui-node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/parro-it/libui-node/issues/74/comments","statuses_url":"https://api.github.com/repos/parro-it/libui-node/statuses/4eba3ff01823867f99b645b5a740eafe84db6220","head":{"label":"parro-it:font","ref":"font","sha":"4eba3ff01823867f99b645b5a740eafe84db6220","user":{"login":"parro-it","id":11197111,"avatar_url":"https://avatars2.githubusercontent.com/u/11197111?v=4","gravatar_id":"","url":"https://api.github.com/users/parro-it","html_url":"https://github.com/parro-it","followers_url":"https://api.github.com/users/parro-it/followers","following_url":"https://api.github.com/users/parro-it/following{/other_user}","gists_url":"https://api.github.com/users/parro-it/gists{/gist_id}","starred_url":"https://api.github.com/users/parro-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parro-it/subscriptions","organizations_url":"https://api.github.com/users/parro-it/orgs","repos_url":"https://api.github.com/users/parro-it/repos","events_url":"https://api.github.com/users/parro-it/events{/privacy}","received_events_url":"https://api.github.com/users/parro-it/received_events","type":"User","site_admin":false},"repo":{"id":59367691,"name":"libui-node","full_name":"parro-it/libui-node","owner":{"login":"parro-it","id":11197111,"avatar_url":"https://avatars2.githubusercontent.com/u/11197111?v=4","gravatar_id":"","url":"https://api.github.com/users/parro-it","html_url":"https://github.com/parro-it","followers_url":"https://api.github.com/users/parro-it/followers","following_url":"https://api.github.com/users/parro-it/following{/other_user}","gists_url":"https://api.github.com/users/parro-it/gists{/gist_id}","starred_url":"https://api.github.com/users/parro-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parro-it/subscriptions","organizations_url":"https://api.github.com/users/parro-it/orgs","repos_url":"https://api.github.com/users/parro-it/repos","events_url":"https://api.github.com/users/parro-it/events{/privacy}","received_events_url":"https://api.github.com/users/parro-it/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/parro-it/libui-node","description":"Node bindings for libui, an awesome native UI library for Unix, OSX and Windows","fork":false,"url":"https://api.github.com/repos/parro-it/libui-node","forks_url":"https://api.github.com/repos/parro-it/libui-node/forks","keys_url":"https://api.github.com/repos/parro-it/libui-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/parro-it/libui-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/parro-it/libui-node/teams","hooks_url":"https://api.github.com/repos/parro-it/libui-node/hooks","issue_events_url":"https://api.github.com/repos/parro-it/libui-node/issues/events{/number}","events_url":"https://api.github.com/repos/parro-it/libui-node/events","assignees_url":"https://api.github.com/repos/parro-it/libui-node/assignees{/user}","branches_url":"https://api.github.com/repos/parro-it/libui-node/branches{/branch}","tags_url":"https://api.github.com/repos/parro-it/libui-node/tags","blobs_url":"https://api.github.com/repos/parro-it/libui-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/parro-it/libui-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/parro-it/libui-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/parro-it/libui-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/parro-it/libui-node/statuses/{sha}","languages_url":"https://api.github.com/repos/parro-it/libui-node/languages","stargazers_url":"https://api.github.com/repos/parro-it/libui-node/stargazers","contributors_url":"https://api.github.com/repos/parro-it/libui-node/contributors","subscribers_url":"https://api.github.com/repos/parro-it/libui-node/subscribers","subscription_url":"https://api.github.com/repos/parro-it/libui-node/subscription","commits_url":"https://api.github.com/repos/parro-it/libui-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/parro-it/libui-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/parro-it/libui-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/parro-it/libui-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/parro-it/libui-node/contents/{+path}","compare_url":"https://api.github.com/repos/parro-it/libui-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/parro-it/libui-node/merges","archive_url":"https://api.github.com/repos/parro-it/libui-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/parro-it/libui-node/downloads","issues_url":"https://api.github.com/repos/parro-it/libui-node/issues{/number}","pulls_url":"https://api.github.com/repos/parro-it/libui-node/pulls{/number}","milestones_url":"https://api.github.com/repos/parro-it/libui-node/milestones{/number}","notifications_url":"https://api.github.com/repos/parro-it/libui-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/parro-it/libui-node/labels{/name}","releases_url":"https://api.github.com/repos/parro-it/libui-node/releases{/id}","deployments_url":"https://api.github.com/repos/parro-it/libui-node/deployments","created_at":"2016-05-21T15:38:05Z","updated_at":"2018-03-26T13:42:12Z","pushed_at":"2018-03-26T20:09:56Z","git_url":"git://github.com/parro-it/libui-node.git","ssh_url":"git@github.com:parro-it/libui-node.git","clone_url":"https://github.com/parro-it/libui-node.git","svn_url":"https://github.com/parro-it/libui-node","homepage":"","size":900,"stargazers_count":793,"watchers_count":793,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":33,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":33,"open_issues":11,"watchers":793,"default_branch":"master"}},"base":{"label":"parro-it:master","ref":"master","sha":"ae067f5c79f1ac85e593dfc1e1684275ee27d96a","user":{"login":"parro-it","id":11197111,"avatar_url":"https://avatars2.githubusercontent.com/u/11197111?v=4","gravatar_id":"","url":"https://api.github.com/users/parro-it","html_url":"https://github.com/parro-it","followers_url":"https://api.github.com/users/parro-it/followers","following_url":"https://api.github.com/users/parro-it/following{/other_user}","gists_url":"https://api.github.com/users/parro-it/gists{/gist_id}","starred_url":"https://api.github.com/users/parro-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parro-it/subscriptions","organizations_url":"https://api.github.com/users/parro-it/orgs","repos_url":"https://api.github.com/users/parro-it/repos","events_url":"https://api.github.com/users/parro-it/events{/privacy}","received_events_url":"https://api.github.com/users/parro-it/received_events","type":"User","site_admin":false},"repo":{"id":59367691,"name":"libui-node","full_name":"parro-it/libui-node","owner":{"login":"parro-it","id":11197111,"avatar_url":"https://avatars2.githubusercontent.com/u/11197111?v=4","gravatar_id":"","url":"https://api.github.com/users/parro-it","html_url":"https://github.com/parro-it","followers_url":"https://api.github.com/users/parro-it/followers","following_url":"https://api.github.com/users/parro-it/following{/other_user}","gists_url":"https://api.github.com/users/parro-it/gists{/gist_id}","starred_url":"https://api.github.com/users/parro-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parro-it/subscriptions","organizations_url":"https://api.github.com/users/parro-it/orgs","repos_url":"https://api.github.com/users/parro-it/repos","events_url":"https://api.github.com/users/parro-it/events{/privacy}","received_events_url":"https://api.github.com/users/parro-it/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/parro-it/libui-node","description":"Node bindings for libui, an awesome native UI library for Unix, OSX and Windows","fork":false,"url":"https://api.github.com/repos/parro-it/libui-node","forks_url":"https://api.github.com/repos/parro-it/libui-node/forks","keys_url":"https://api.github.com/repos/parro-it/libui-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/parro-it/libui-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/parro-it/libui-node/teams","hooks_url":"https://api.github.com/repos/parro-it/libui-node/hooks","issue_events_url":"https://api.github.com/repos/parro-it/libui-node/issues/events{/number}","events_url":"https://api.github.com/repos/parro-it/libui-node/events","assignees_url":"https://api.github.com/repos/parro-it/libui-node/assignees{/user}","branches_url":"https://api.github.com/repos/parro-it/libui-node/branches{/branch}","tags_url":"https://api.github.com/repos/parro-it/libui-node/tags","blobs_url":"https://api.github.com/repos/parro-it/libui-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/parro-it/libui-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/parro-it/libui-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/parro-it/libui-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/parro-it/libui-node/statuses/{sha}","languages_url":"https://api.github.com/repos/parro-it/libui-node/languages","stargazers_url":"https://api.github.com/repos/parro-it/libui-node/stargazers","contributors_url":"https://api.github.com/repos/parro-it/libui-node/contributors","subscribers_url":"https://api.github.com/repos/parro-it/libui-node/subscribers","subscription_url":"https://api.github.com/repos/parro-it/libui-node/subscription","commits_url":"https://api.github.com/repos/parro-it/libui-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/parro-it/libui-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/parro-it/libui-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/parro-it/libui-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/parro-it/libui-node/contents/{+path}","compare_url":"https://api.github.com/repos/parro-it/libui-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/parro-it/libui-node/merges","archive_url":"https://api.github.com/repos/parro-it/libui-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/parro-it/libui-node/downloads","issues_url":"https://api.github.com/repos/parro-it/libui-node/issues{/number}","pulls_url":"https://api.github.com/repos/parro-it/libui-node/pulls{/number}","milestones_url":"https://api.github.com/repos/parro-it/libui-node/milestones{/number}","notifications_url":"https://api.github.com/repos/parro-it/libui-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/parro-it/libui-node/labels{/name}","releases_url":"https://api.github.com/repos/parro-it/libui-node/releases{/id}","deployments_url":"https://api.github.com/repos/parro-it/libui-node/deployments","created_at":"2016-05-21T15:38:05Z","updated_at":"2018-03-26T13:42:12Z","pushed_at":"2018-03-26T20:09:56Z","git_url":"git://github.com/parro-it/libui-node.git","ssh_url":"git@github.com:parro-it/libui-node.git","clone_url":"https://github.com/parro-it/libui-node.git","svn_url":"https://github.com/parro-it/libui-node","homepage":"","size":900,"stargazers_count":793,"watchers_count":793,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":33,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":33,"open_issues":11,"watchers":793,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/parro-it/libui-node/pulls/74"},"html":{"href":"https://github.com/parro-it/libui-node/pull/74"},"issue":{"href":"https://api.github.com/repos/parro-it/libui-node/issues/74"},"comments":{"href":"https://api.github.com/repos/parro-it/libui-node/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/parro-it/libui-node/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/parro-it/libui-node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/parro-it/libui-node/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/parro-it/libui-node/statuses/4eba3ff01823867f99b645b5a740eafe84db6220"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"parro-it"}}