Skip to content

Instantly share code, notes, and snippets.

View shibukawa's full-sized avatar

Yoshiki Shibukawa shibukawa

View GitHub Profile
@shibukawa
shibukawa / error.txt
Created May 17, 2013 10:08
JSX build error
$ jsx --add-search-path jsx --mode compile test.jsx
/opt/local/lib/node_modules/jsx/bin/jsx:13260
throw $__jsx_catch_0;
^
Error: fatal error while analyzing class QAbstractScrollArea at file jsx/qt/qabstractscrollarea.jsx, line 16
logic flaw: QAbstractScrollArea#minimumSizeHint()
at Object.ClassDefinition._assertMemberFunctionIsDefinable$LAnalysisContext$LMemberFunctionDefinition$LClassDefinition$LToken$B (/opt/local/lib/node_modules/jsx/bin/jsx:13651:10)
at Object.ClassDefinition._assertMemberFunctionIsDefinable$LAnalysisContext$LMemberFunctionDefinition$LClassDefinition$LToken$B (/opt/local/lib/node_modules/jsx/bin/jsx:13672:68)
at Object.ClassDefinition._assertMemberIsDefinable$LAnalysisContext$LMemberDefinition$LClassDefinition$LToken$ (/opt/local/lib/node_modules/jsx/bin/jsx:13590:69)
@shibukawa
shibukawa / analog.jsx
Last active December 17, 2015 11:29
First sample of Qt/JSX application
/****************************************************************************
**
** Copyright (C) 2013 Yoshiki Shibukawa.
**
** Orignal Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** (original file is part of the Qt Script Generator project on Qt Labs)
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
# Qt 4
./configure -static -opensource -nomake examples -nomake tests -confirm-license -release -no-shared -prefix $PWD/static-qt4 -no-glib -qt-zlib -qt-libpng -qt-libjpeg;make -j 4;make install
# Qt 5
./configure -static -opensource -nomake examples -nomake tests -confirm-license -no-c++11 -release -no-shared -prefix $PWD/static-qt5 -no-glib -no-linuxfb -no-xcb -no-directfb -qt-zlib -qt-libpng -qt-libjpeg;make -j 4;make install
@shibukawa
shibukawa / Android.mk
Created July 18, 2013 21:41
Android make file for webp decoder library.
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
src/dec/alpha.c \
src/dec/buffer.c \
src/dec/frame.c \
src/dec/idec.c \
src/dec/io.c \
src/dec/layer.c \
@shibukawa
shibukawa / httprequest.js
Last active December 21, 2015 12:08
Microsoft Translate API usage by using Qt/JS
// HTTP access class by using Qt
var HTTPRequest = function (parent)
{
this.parent = parent;
};
HTTPRequest.prototype.get = function (url, params, headers, callback)
{
var manager = new QNetworkAccessManager(this.parent);

Qtで"プロ"グラミングする

チュートリアルをやって、ウィジェットを作れるようになったらスタート地点。Qtの流儀でプロっぽいGUIを創るためには、土台から作りこみが必要っぽいので、調査メモ。

エンティティオブジェクト

いわゆる値を格納するオブジェクト。QStringとか。Qtの中では、Implicit Sharingというパターンですべて統一されている。

@shibukawa
shibukawa / jsfl.jsx
Last active December 22, 2015 08:30
error data
/***
* Adobe JSFL binding for JSX (EXPERIMENTAL)
*
* @see http://help.adobe.com/en_US/flash/cs/extend/flash_cs5_extending.pdf
*/
/*
* Copyright (c) 2012-2013 Ysohiki Shibukawa.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@shibukawa
shibukawa / JSX_proposal.rst
Last active December 22, 2015 13:59
JSXに今後必要になると思われる、import文の拡張のプロポーザル

JSXのimport文の拡張のプロポーザル

ゴールデン・ゲート・ブリッジを渡りながら考えたことのまとめ。

JSXが非常に沢山の人に使われるようになった未来

JSXがたくさんの人に使われるようになりました。とてもすばらしいですね。

@shibukawa
shibukawa / bounds.jsx
Last active December 22, 2015 14:29
オブジェクト型を受け取る引数対策
class Bounds
{
var left : Nullable.<int>;
var top : Nullable.<int>;
var width : Nullable.<int>;
var height : Nullable.<int>;
function constructor(left : int, top : int, width : int, height : int)
{
this.left = left;
@shibukawa
shibukawa / make_web.jsx_error.txt
Created September 9, 2013 07:44
make web.jsxのエラー
$ make web.jsx
idl2jsx/build.pl
generate web.jsx from dom; http://www.w3.org/TR/dom/,DOM-Level-2-Views; http://www.w3.org/TR/DOM-Level-2-Views/idl/views.idl,DOM-Level-3-Events; http://www.w3.org/TR/DOM-Level-3-Events/,progress-events; http://www.w3.org/TR/progress-events/,dom-parsing; http://www.w3.org/TR/DOM-Parsing/,idl2jsx/extra/events.idl,XMLHTTPRequest; http://www.w3.org/TR/XMLHttpRequest/,cssom; http://dev.w3.org/csswg/cssom/,cssom-view; http://dev.w3.org/csswg/cssom-view/,idl2jsx/extra/chrome.idl,idl2jsx/extra/firefox.idl,url-whatwg; http://url.spec.whatwg.org/,html5; http://www.w3.org/TR/html5/single-page.html,FileAPI; http://www.w3.org/TR/2012/WD-FileAPI-20121025/,webaudio; http://www.w3.org/TR/2012/WD-webaudio-20121213/,touch-events; http://www.w3.org/TR/touch-events/,websockets; http://www.w3.org/TR/2012/CR-websockets-20120920/,geolocation; http://dev.w3.org/geo/api/spec-source.html,webstorage; http://dev.w3.org/html5/webstorage/,selectors-api; http://www.w3.org/TR/selectors-api/,webmessaging; http