1<?php
2/*************************************************************************************
3 * qml.php
4 * --------------
5 * Author: J-P Nurmi <jpnurmi@gmail.com>
6 * Copyright: (c) 2012-2014 J-P Nurmi <jpnurmi@gmail.com>
7 * Release Version: 1.0.9.1
8 * Date Started: 2012/08/19
9 *
10 * QML language file for GeSHi.
11 *
12 * CHANGES
13 * -------
14 * 2014/06/29 (1.0.8.13)
15 *  - Synced QML types from Qt 5.3:
16 *    http://qt-project.org/doc/qt-5/modules-qml.html
17 * 2012/08/19
18 *  - First version based on Qt 4
19 *
20 * TODO (updated 2014/06/29)
21 * -------------------------
22 *
23 *************************************************************************************
24 *
25 *     This file is part of GeSHi.
26 *
27 *   GeSHi is free software; you can redistribute it and/or modify
28 *   it under the terms of the GNU General Public License as published by
29 *   the Free Software Foundation; either version 2 of the License, or
30 *   (at your option) any later version.
31 *
32 *   GeSHi is distributed in the hope that it will be useful,
33 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
34 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
35 *   GNU General Public License for more details.
36 *
37 *   You should have received a copy of the GNU General Public License
38 *   along with GeSHi; if not, write to the Free Software
39 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
40 *
41 ************************************************************************************/
42
43$language_data = array (
44    'LANG_NAME' => 'QML',
45    'COMMENT_SINGLE' => array(1 => '//'),
46    'COMMENT_MULTI' => array('/*' => '*/'),
47    'COMMENT_REGEXP' => array(
48        // comments
49        2 => "/(?<=[\\s^])(s|tr|y)\\/(?!\*)(?!\s)(?:\\\\.|(?!\n)[^\\/\\\\])+(?<!\s)\\/(?!\s)(?:\\\\.|(?!\n)[^\\/\\\\])*(?<!\s)\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?!\*)(?!\s)(?:\\\\.|(?!\n)[^\\/\\\\])+(?<!\s)\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU",
50        // property binding
51        3 => "/([a-z][\\w\\.]*)(?=:)/",
52        // TODO: property name (fixed length lookbehind assertion?)
53        4 => "/(?<=property\\s+\\w+\\s+)(\\w+)/"
54        ),
55    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
56    'QUOTEMARKS' => array("'", '"'),
57    'ESCAPE_CHAR' => '\\',
58    'KEYWORDS' => array(
59        1 => array(
60            'as','alias','break','case','catch','continue','const','debugger',
61            'default','delete','do','else','finally','for','function',
62            'if','import','in','instanceof','new','on','public','property',
63            'readonly','return','signal','switch','this','throw','try',
64            'typeof','while','with'
65            ),
66        2 => array(
67            'action','bool','color','date','double','enumeration','font',
68            'int','list','matrix4x4','point','quaternion','real','rect',
69            'size','string','time','url','var','variant','vector2d',
70            'vector3d','vector4d','void'
71            ),
72        // http://qt-project.org/doc/qt-5/qtbluetooth-qmlmodule.html
73        3 => array(
74            'BluetoothDiscoveryModel','BluetoothService','BluetoothSocket'
75            ),
76        // http://qt-project.org/doc/qt-5/qtgraphicaleffects-qmlmodule.html
77        4 => array(
78            'Blend','BrightnessContrast','ColorOverlay','Colorize',
79            'ConicalGradient','Desaturate','DirectionalBlur','Displace',
80            'DropShadow','FastBlur','GammaAdjust','GaussianBlur','Glow',
81            'HueSaturation','InnerShadow','LevelAdjust','LinearGradient',
82            'MaskedBlur','OpacityMask','RadialBlur','RadialGradient',
83            'RectangularGlow','RecursiveBlur','ThresholdMask','ZoomBlur'
84            ),
85        // http://qt-project.org/doc/qt-5/qtaudioengine-qmlmodule.html
86        5 => array(
87            'AttenuationModelLinear','AttenuationModelInverse','AudioCategory',
88            'AudioEngine','AudioListener','AudioSample','PlayVariation',
89            'Sound','SoundInstance'
90            ),
91        // http://qt-project.org/doc/qt-5/qtmultimedia-qmlmodule.html
92        6 => array(
93            'Video','Audio','MediaPlayer','Camera','CameraCapture',
94            'CameraExposure','CameraFlash','CameraFocus','CameraImageProcessing',
95            'CameraRecorder','Radio','RadioData','Torch','SoundEffect','VideoOutput'
96            ),
97        // http://qt-project.org/doc/qt-5/qtnfc-qmlmodule.html
98        7 => array(
99            'NdefFilter','NdefMimeRecord','NdefTextRecord','NdefUriRecord',
100            'NearField','NdefRecord'
101            ),
102        // http://qt-project.org/doc/qt-5/qtpositioning-qmlmodule.html
103        8 => array(
104            'QtPositioning','CoordinateAnimation','Position','PositionSource',
105            'Address','Location'
106            ),
107        // http://qt-project.org/doc/qt-5/qtqml-models-qmlmodule.html
108        9 => array(
109            'DelegateModel','DelegateModelGroup','ListModel','ListElement','ObjectModel'
110            ),
111        // http://qt-project.org/doc/qt-5/qtqml-qmlmodule.html
112        10 => array(
113            'Binding','Component','Connections','Date','Instantiator',
114            'Locale','Number','Qt','QtObject','String','Timer'
115            ),
116        // http://qt-project.org/doc/qt-5/qt-labs-folderlistmodel-qmlmodule.html
117        11 => array(
118            'FolderListModel'
119            ),
120        // http://qt-project.org/doc/qt-5/qtquick-localstorage-qmlmodule.html
121        12 => array(
122            'openDatabaseSync'
123            ),
124        // http://qt-project.org/doc/qt-5/qt-labs-settings-qmlmodule.html
125        13 => array(
126            'Settings'
127            ),
128        // http://qt-project.org/doc/qt-5/qtquick-window-qmlmodule.html
129        14 => array(
130            'Screen','Window','CloseEvent'
131            ),
132        // http://qt-project.org/doc/qt-5/qtquick-xmllistmodel-qmlmodule.html
133        15 => array(
134            'XmlRole','XmlListModel'
135            ),
136        // http://qt-project.org/doc/qt-5/qtquick-particles-qmlmodule.html
137        16 => array(
138            'Age','AngleDirection','CumulativeDirection','CustomParticle',
139            'Direction','EllipseShape','Friction','Gravity','GroupGoal',
140            'ImageParticle','ItemParticle','LineShape','MaskShape','Affector',
141            'Emitter','Shape','ParticleGroup','ParticlePainter','ParticleSystem',
142            'Attractor','PointDirection','RectangleShape','SpriteGoal',
143            'TargetDirection','TrailEmitter','Turbulence','Particle','Wander'
144            ),
145        // http://qt-project.org/doc/qt-5/qttest-qmlmodule.html
146        17 => array(
147            'SignalSpy','TestCase'
148            ),
149        // http://qt-project.org/doc/qt-5/qtquick-qmltypereference.html
150        18 => array(
151            'Item','Rectangle','Image','BorderImage','AnimatedImage','AnimatedSprite',
152            'SpriteSequence','Text','Accessible','Gradient','GradientStop','SystemPalette',
153            'Sprite','FontLoader','Repeater','Loader','Visual Item Transformations','Transform',
154            'Scale','Rotation','Translate','MouseArea','Keys','KeyNavigation','FocusScope',
155            'Flickable','PinchArea','MultiPointTouchArea','Drag','DropArea','TextInput',
156            'TextEdit','IntValidator','DoubleValidator','RegExpValidator','TouchPoint',
157            'PinchEvent','WheelEvent','MouseEvent','KeyEvent','DragEvent','Positioner',
158            'Column','Row','Grid','Flow','LayoutMirroring','State','PropertyChanges',
159            'StateGroup','StateChangeScript','ParentChange','AnchorChanges','Transition',
160            'ViewTransition','SequentialAnimation','ParallelAnimation','Behavior','PropertyAction',
161            'PauseAnimation','SmoothedAnimation','SpringAnimation','ScriptAction','PropertyAnimation',
162            'NumberAnimation','Vector3dAnimation','ColorAnimation','RotationAnimation','ParentAnimation',
163            'AnchorAnimation','PathAnimation','XAnimator','YAnimator','ScaleAnimator','RotationAnimator',
164            'OpacityAnimator','UniformAnimator','Lower-level Animation Types','PathInterpolator',
165            'AnimationController','Path','PathLine','PathQuad','PathCubic','PathArc','PathCurve',
166            'PathSvg','PathAttribute','PathPercent','VisualItemModel','VisualDataModel','VisualDataGroup',
167            'ListView','GridView','PathView','Package','Flipable','ShaderEffect','ShaderEffectSource',
168            'GridMesh','WorkerScript','Canvas','Context2D','CanvasGradient','CanvasPixelArray',
169            'CanvasImageData','TextMetrics',
170            ),
171        // http://qt-project.org/doc/qt-5/qtquick-controls-qmlmodule.html
172        19 => array(
173            'ApplicationWindow','BusyIndicator','Button','Calendar',
174            'CheckBox','ComboBox','GroupBox','Label','Menu','MenuBar',
175            'ProgressBar','RadioButton','ScrollView','Slider','SpinBox',
176            'SplitView','StackView','StackViewDelegate','StatusBar',
177            'Switch','Tab','TabView','TableView','TableViewColumn',
178            'TextArea','TextField','ToolBar','ToolButton','Action',
179            'ExclusiveGroup','MenuSeparator','MenuItem','Stack'
180            ),
181        // http://qt-project.org/doc/qt-5/qtquick-dialogs-qmlmodule.html
182        20 => array(
183            'Dialog','ColorDialog','FileDialog','FontDialog','MessageDialog'
184            ),
185        // http://qt-project.org/doc/qt-5/qtquick-layouts-qmlmodule.html
186        21 => array(
187            'Layout','RowLayout','ColumnLayout','GridLayout'
188            ),
189        // http://qt-project.org/doc/qt-5/qtsensors-qmlmodule.html
190        22 => array(
191            'Accelerometer','AccelerometerReading','Altimeter','AltimeterReading',
192            'AmbientLightReading','AmbientLightSensor','AmbientTemperatureReading',
193            'AmbientTemperatureSensor','Compass','CompassReading','Gyroscope',
194            'GyroscopeReading','HolsterReading','HolsterSensor','IRProximityReading',
195            'IRProximitySensor','LightReading','LightSensor','Magnetometer',
196            'MagnetometerReading','OrientationReading','OrientationSensor',
197            'PressureReading','PressureSensor','ProximityReading','ProximitySensor',
198            'RotationReading','RotationSensor','SensorGesture','SensorGlobal',
199            'SensorReading','TapReading','TapSensor','TiltReading','TiltSensor'
200            ),
201        // http://qt-project.org/doc/qt-5/qtwinextras-qmlmodule.html
202        23 => array(
203            'JumpListDestination','JumpListLink','JumpListSeparator','DwmFeatures',
204            'JumpList','JumpListCategory','TaskbarButton','ThumbnailToolBar','ThumbnailToolButton'
205            ),
206        // http://qt-project.org/doc/qt-5/qtwebkit-qmlmodule.html
207        24 => array(
208            'WebView','WebLoadRequest'
209            )
210        ),
211    'SYMBOLS' => array(
212        '(', ')', '[', ']', '{', '}',
213        '+', '-', '*', '/', '%',
214        '!', '@', '&', '|', '^',
215        '<', '>', '=',
216        ',', ';', '?', ':'
217        ),
218    'CASE_SENSITIVE' => array(
219        GESHI_COMMENTS => false,
220        1 => true,
221        2 => true,
222        3 => true,
223        4 => true,
224        5 => true,
225        6 => true,
226        7 => true,
227        8 => true,
228        9 => true,
229        10 => true,
230        11 => true,
231        12 => true,
232        13 => true,
233        14 => true,
234        15 => true,
235        16 => true,
236        17 => true,
237        18 => true,
238        19 => true,
239        20 => true,
240        21 => true,
241        22 => true,
242        23 => true,
243        24 => true
244        ),
245    'STYLES' => array(
246        'KEYWORDS' => array(
247            1 => 'color: #808041;',
248            2 => 'color: #808041;',
249            3 => 'color: #800780;',
250            4 => 'color: #800780;',
251            5 => 'color: #800780;',
252            6 => 'color: #800780;',
253            7 => 'color: #800780;',
254            8 => 'color: #800780;',
255            9 => 'color: #800780;',
256            10 => 'color: #800780;',
257            11 => 'color: #800780;',
258            12 => 'color: #800780;',
259            13 => 'color: #800780;',
260            14 => 'color: #800780;',
261            15 => 'color: #800780;',
262            16 => 'color: #800780;',
263            17 => 'color: #800780;',
264            18 => 'color: #800780;',
265            19 => 'color: #800780;',
266            20 => 'color: #800780;',
267            21 => 'color: #800780;',
268            22 => 'color: #800780;',
269            23 => 'color: #800780;',
270            24 => 'color: #800780;'
271            ),
272        'COMMENTS' => array(
273            1 => 'color: #008025;',
274            2 => 'color: #008025;',
275            3 => 'color: #970009;',
276            4 => 'color: #970009;',
277            'MULTI' => 'color: #008025;'
278            ),
279        'ESCAPE_CHAR' => array(
280            0 => 'color: #000099; font-weight: bold;'
281            ),
282        'BRACKETS' => array(
283            0 => 'color: #000000;'
284            ),
285        'STRINGS' => array(
286            0 => 'color: #008025;'
287            ),
288        'NUMBERS' => array(
289            0 => 'color: #000000;'
290            ),
291        'METHODS' => array(
292            1 => 'color: #000000;'
293            ),
294        'SYMBOLS' => array(
295            0 => 'color: #000000;'
296            ),
297        'REGEXPS' => array(
298            ),
299        'SCRIPT' => array(
300            0 => '',
301            1 => '',
302            2 => '',
303            3 => ''
304            )
305        ),
306    'URLS' => array(
307        1 => '',
308        2 => '',
309        3 => 'http://qt-project.org/doc/qt-5/qml-qtbluetooth-{FNAMEL}.html',
310        4 => 'http://qt-project.org/doc/qt-5/qml-qtgraphicaleffects-{FNAMEL}.html',
311        5 => 'http://qt-project.org/doc/qt-5/qml-qtaudioengine-{FNAMEL}.html',
312        6 => 'http://qt-project.org/doc/qt-5/qml-qtmultimedia-{FNAMEL}.html',
313        7 => 'http://qt-project.org/doc/qt-5/qml-qtnfc-{FNAMEL}.html',
314        8 => 'http://qt-project.org/doc/qt-5/qml-qtpositioning-{FNAMEL}.html',
315        9 => 'http://qt-project.org/doc/qt-5/qml-qtqml-models-{FNAMEL}.html',
316        10 => 'http://qt-project.org/doc/qt-5/qml-qtqml-{FNAMEL}.html',
317        11 => 'http://qt-project.org/doc/qt-5/qml-qt-labs-folderlistmodel-{FNAMEL}.html',
318        12 => 'http://qt-project.org/doc/qt-5/qtquick-localstorage-qmlmodule.html',
319        13 => 'http://qt-project.org/doc/qt-5/qml-qt-labs-settings-{FNAMEL}.html',
320        14 => 'http://qt-project.org/doc/qt-5/qml-qtquick-window-{FNAMEL}.html',
321        15 => 'http://qt-project.org/doc/qt-5/qml-qtquick-xmllistmodel-{FNAMEL}.html',
322        16 => 'http://qt-project.org/doc/qt-5/qml-qtquick-particles-{FNAMEL}.html',
323        17 => 'http://qt-project.org/doc/qt-5/qml-qttest-{FNAMEL}.html',
324        18 => 'http://qt-project.org/doc/qt-5/qml-qtquick-{FNAMEL}.html',
325        19 => 'http://qt-project.org/doc/qt-5/qml-qtquick-controls-{FNAMEL}.html',
326        20 => 'http://qt-project.org/doc/qt-5/qml-qtquick-dialogs-{FNAMEL}.html',
327        21 => 'http://qt-project.org/doc/qt-5/qml-qtquick-layouts-{FNAMEL}.html',
328        22 => 'http://qt-project.org/doc/qt-5/qml-qtsensors-{FNAMEL}.html',
329        23 => 'http://qt-project.org/doc/qt-5/qml-qtwinextras-{FNAMEL}.html',
330        24 => 'http://qt-project.org/doc/qt-5/qml-qtwebkit-{FNAMEL}.html'
331        ),
332    'OOLANG' => true,
333    'OBJECT_SPLITTERS' => array(
334        1 => '.'
335        ),
336    'REGEXPS' => array(
337        ),
338    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
339    'SCRIPT_DELIMITERS' => array(
340        0 => array(
341            '<script type="text/javascript">' => '</script>'
342            ),
343        1 => array(
344            '<script language="javascript">' => '</script>'
345            )
346        ),
347    'HIGHLIGHT_STRICT_BLOCK' => array(
348        0 => true,
349        1 => true
350        )
351);
352