- Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathqinputmethod.go
565 lines (452 loc) · 17 KB
/
qinputmethod.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
package qtgui
// /usr/include/qt/QtGui/qinputmethod.h
// #include <qinputmethod.h>
// #include <QtGui>
// header block end
// main block begin
// main block end
// use block begin
// use block end
// ext block begin
/*
#include <stdlib.h>
// extern C begin: 2
*/
// import "C"
import"unsafe"
import"reflect"
import"fmt"
import"log"
import"github.com/kitech/qt.go/qtrt"
import"github.com/kitech/qt.go/qtcore"
// ext block end
// body block begin
/*
*/
typeQInputMethodstruct {
*qtcore.QObject
}
typeQInputMethod_ITFinterface {
qtcore.QObject_ITF
QInputMethod_PTR() *QInputMethod
}
func (ptr*QInputMethod) QInputMethod_PTR() *QInputMethod { returnptr }
func (this*QInputMethod) GetCthis() unsafe.Pointer {
ifthis==nil {
returnnil
} else {
returnthis.QObject.GetCthis()
}
}
func (this*QInputMethod) SetCthis(cthis unsafe.Pointer) {
this.QObject=qtcore.NewQObjectFromPointer(cthis)
}
funcNewQInputMethodFromPointer(cthis unsafe.Pointer) *QInputMethod {
bcthis0:=qtcore.NewQObjectFromPointer(cthis)
return&QInputMethod{bcthis0}
}
func (*QInputMethod) NewFromPointer(cthis unsafe.Pointer) *QInputMethod {
returnNewQInputMethodFromPointer(cthis)
}
// /usr/include/qt/QtGui/qinputmethod.h:56
// index:0
// Public virtual Visibility=Default Availability=Available
// [8] const QMetaObject * metaObject() const
/*
*/
func (this*QInputMethod) MetaObject() *qtcore.QMetaObject/*777 const QMetaObject **/ {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QInputMethod10metaObjectEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
returnqtcore.NewQMetaObjectFromPointer(unsafe.Pointer(uintptr(rv))) // 444
}
// /usr/include/qt/QtGui/qinputmethod.h:68
// index:0
// Public Visibility=Default Availability=Available
// [88] QTransform inputItemTransform() const
/*
Returns the transformation from input item coordinates to the window coordinates.
See also setInputItemTransform().
*/
func (this*QInputMethod) InputItemTransform() *QTransform/*123*/ {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QInputMethod18inputItemTransformEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2:=/*==*/NewQTransformFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2/*==*/, DeleteQTransform)
returnrv2
}
// /usr/include/qt/QtGui/qinputmethod.h:69
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setInputItemTransform(const QTransform &)
/*
Sets the transformation from input item coordinates to window coordinates to be transform. Item transform needs to be updated by the focused window like QQuickCanvas whenever item is moved inside the scene.
See also inputItemTransform().
*/
func (this*QInputMethod) SetInputItemTransform(transformQTransform_ITF) {
varconvArg0 unsafe.Pointer
iftransform!=nil&&transform.QTransform_PTR() !=nil {
convArg0=transform.QTransform_PTR().GetCthis()
}
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod21setInputItemTransformERK10QTransform", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qinputmethod.h:71
// index:0
// Public Visibility=Default Availability=Available
// [32] QRectF inputItemRectangle() const
/*
Returns the input item's geometry in input item coordinates.
This function was introduced in Qt 5.1.
See also setInputItemRectangle().
*/
func (this*QInputMethod) InputItemRectangle() *qtcore.QRectF/*123*/ {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QInputMethod18inputItemRectangleEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQRectFFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQRectF)
returnrv2
}
// /usr/include/qt/QtGui/qinputmethod.h:72
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setInputItemRectangle(const QRectF &)
/*
Sets the input item's geometry to be rect, in input item coordinates. This needs to be updated by the focused window like QQuickCanvas whenever item is moved inside the scene, or focus is changed.
This function was introduced in Qt 5.1.
See also inputItemRectangle().
*/
func (this*QInputMethod) SetInputItemRectangle(rect qtcore.QRectF_ITF) {
varconvArg0 unsafe.Pointer
ifrect!=nil&&rect.QRectF_PTR() !=nil {
convArg0=rect.QRectF_PTR().GetCthis()
}
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod21setInputItemRectangleERK6QRectF", qtrt.FFI_TYPE_POINTER, this.GetCthis(), convArg0)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qinputmethod.h:75
// index:0
// Public Visibility=Default Availability=Available
// [32] QRectF cursorRectangle() const
/*
*/
func (this*QInputMethod) CursorRectangle() *qtcore.QRectF/*123*/ {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QInputMethod15cursorRectangleEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQRectFFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQRectF)
returnrv2
}
// /usr/include/qt/QtGui/qinputmethod.h:76
// index:0
// Public Visibility=Default Availability=Available
// [32] QRectF anchorRectangle() const
/*
*/
func (this*QInputMethod) AnchorRectangle() *qtcore.QRectF/*123*/ {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QInputMethod15anchorRectangleEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQRectFFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQRectF)
returnrv2
}
// /usr/include/qt/QtGui/qinputmethod.h:79
// index:0
// Public Visibility=Default Availability=Available
// [32] QRectF keyboardRectangle() const
/*
*/
func (this*QInputMethod) KeyboardRectangle() *qtcore.QRectF/*123*/ {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QInputMethod17keyboardRectangleEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQRectFFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQRectF)
returnrv2
}
// /usr/include/qt/QtGui/qinputmethod.h:81
// index:0
// Public Visibility=Default Availability=Available
// [32] QRectF inputItemClipRectangle() const
/*
*/
func (this*QInputMethod) InputItemClipRectangle() *qtcore.QRectF/*123*/ {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QInputMethod22inputItemClipRectangleEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQRectFFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQRectF)
returnrv2
}
// /usr/include/qt/QtGui/qinputmethod.h:89
// index:0
// Public Visibility=Default Availability=Available
// [1] bool isVisible() const
/*
*/
func (this*QInputMethod) IsVisible() bool {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QInputMethod9isVisibleEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
returnrv!=0
}
// /usr/include/qt/QtGui/qinputmethod.h:90
// index:0
// Public Visibility=Default Availability=Available
// [-2] void setVisible(bool)
/*
Controls the keyboard visibility. Equivalent to calling show() (if visible is true) or hide() (if visible is false).
See also isVisible(), show(), and hide().
*/
func (this*QInputMethod) SetVisible(visiblebool) {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod10setVisibleEb", qtrt.FFI_TYPE_POINTER, this.GetCthis(), visible)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qinputmethod.h:92
// index:0
// Public Visibility=Default Availability=Available
// [1] bool isAnimating() const
/*
*/
func (this*QInputMethod) IsAnimating() bool {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QInputMethod11isAnimatingEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
returnrv!=0
}
// /usr/include/qt/QtGui/qinputmethod.h:94
// index:0
// Public Visibility=Default Availability=Available
// [8] QLocale locale() const
/*
*/
func (this*QInputMethod) Locale() *qtcore.QLocale/*123*/ {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QInputMethod6localeEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQLocaleFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQLocale)
returnrv2
}
// /usr/include/qt/QtGui/qinputmethod.h:95
// index:0
// Public Visibility=Default Availability=Available
// [4] Qt::LayoutDirection inputDirection() const
/*
*/
func (this*QInputMethod) InputDirection() int {
rv, err:=qtrt.InvokeQtFunc6("_ZNK12QInputMethod14inputDirectionEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
returnint(rv)
}
// /usr/include/qt/QtGui/qinputmethod.h:97
// index:0
// Public static Visibility=Default Availability=Available
// [16] QVariant queryFocusObject(Qt::InputMethodQuery, QVariant)
/*
Send query to the current focus object with parameters argument and return the result.
*/
func (this*QInputMethod) QueryFocusObject(queryint, argument qtcore.QVariant_ITF/*123*/) *qtcore.QVariant/*123*/ {
varconvArg1 unsafe.Pointer
ifargument!=nil&&argument.QVariant_PTR() !=nil {
convArg1=argument.QVariant_PTR().GetCthis()
}
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod16queryFocusObjectEN2Qt16InputMethodQueryE8QVariant", qtrt.FFI_TYPE_POINTER, query, convArg1)
qtrt.ErrPrint(err, rv)
rv2:=qtcore.NewQVariantFromPointer(unsafe.Pointer(uintptr(rv))) // 333
qtrt.SetFinalizer(rv2, qtcore.DeleteQVariant)
returnrv2
}
funcQInputMethod_QueryFocusObject(queryint, argument qtcore.QVariant_ITF/*123*/) *qtcore.QVariant/*123*/ {
varnilthis*QInputMethod
rv:=nilthis.QueryFocusObject(query, argument)
returnrv
}
// /usr/include/qt/QtGui/qinputmethod.h:100
// index:0
// Public Visibility=Default Availability=Available
// [-2] void show()
/*
Requests virtual keyboard to open. If the platform doesn't provide virtual keyboard the visibility remains false.
Normally applications should not need to call this function, keyboard should automatically open when the text editor gains focus.
*/
func (this*QInputMethod) Show() {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod4showEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qinputmethod.h:101
// index:0
// Public Visibility=Default Availability=Available
// [-2] void hide()
/*
Requests virtual keyboard to close.
Normally applications should not need to call this function, keyboard should automatically close when the text editor loses focus, for example when the parent view is closed.
*/
func (this*QInputMethod) Hide() {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod4hideEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qinputmethod.h:103
// index:0
// Public Visibility=Default Availability=Available
// [-2] void update(Qt::InputMethodQueries)
/*
Called by the input item to inform the platform input methods when there has been state changes in editor's input method query attributes. When calling the function queries parameter has to be used to tell what has changes, which input method can use to make queries for attributes it's interested with QInputMethodQueryEvent.
In particular calling update whenever the cursor position changes is important as that often causes other query attributes like surrounding text and text selection to change as well. The attributes that often change together with cursor position have been grouped in Qt::ImQueryInput value for convenience.
*/
func (this*QInputMethod) Update(queriesint) {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod6updateE6QFlagsIN2Qt16InputMethodQueryEE", qtrt.FFI_TYPE_POINTER, this.GetCthis(), queries)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qinputmethod.h:104
// index:0
// Public Visibility=Default Availability=Available
// [-2] void reset()
/*
Resets the input method state. For example, a text editor normally calls this method before inserting a text to make widget ready to accept a text.
Input method resets automatically when the focused editor changes.
*/
func (this*QInputMethod) Reset() {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod5resetEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qinputmethod.h:105
// index:0
// Public Visibility=Default Availability=Available
// [-2] void commit()
/*
Commits the word user is currently composing to the editor. The function is mostly needed by the input methods with text prediction features and by the methods where the script used for typing characters is different from the script that actually gets appended to the editor. Any kind of action that interrupts the text composing needs to flush the composing state by calling the commit() function, for example when the cursor is moved elsewhere.
*/
func (this*QInputMethod) Commit() {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod6commitEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qinputmethod.h:107
// index:0
// Public Visibility=Default Availability=Available
// [-2] void invokeAction(QInputMethod::Action, int)
/*
Called by the input item when the word currently being composed is tapped by the user, as indicated by the action a and the given cursorPosition. Input methods often use this information to offer more word suggestions to the user.
*/
func (this*QInputMethod) InvokeAction(aint, cursorPositionint) {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod12invokeActionENS_6ActionEi", qtrt.FFI_TYPE_POINTER, this.GetCthis(), a, cursorPosition)
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qinputmethod.h:110
// index:0
// Public Visibility=Default Availability=Available
// [-2] void cursorRectangleChanged()
/*
*/
func (this*QInputMethod) CursorRectangleChanged() {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod22cursorRectangleChangedEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qinputmethod.h:111
// index:0
// Public Visibility=Default Availability=Available
// [-2] void anchorRectangleChanged()
/*
*/
func (this*QInputMethod) AnchorRectangleChanged() {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod22anchorRectangleChangedEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qinputmethod.h:112
// index:0
// Public Visibility=Default Availability=Available
// [-2] void keyboardRectangleChanged()
/*
*/
func (this*QInputMethod) KeyboardRectangleChanged() {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod24keyboardRectangleChangedEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qinputmethod.h:113
// index:0
// Public Visibility=Default Availability=Available
// [-2] void inputItemClipRectangleChanged()
/*
*/
func (this*QInputMethod) InputItemClipRectangleChanged() {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod29inputItemClipRectangleChangedEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qinputmethod.h:114
// index:0
// Public Visibility=Default Availability=Available
// [-2] void visibleChanged()
/*
*/
func (this*QInputMethod) VisibleChanged() {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod14visibleChangedEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qinputmethod.h:115
// index:0
// Public Visibility=Default Availability=Available
// [-2] void animatingChanged()
/*
*/
func (this*QInputMethod) AnimatingChanged() {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod16animatingChangedEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qinputmethod.h:116
// index:0
// Public Visibility=Default Availability=Available
// [-2] void localeChanged()
/*
*/
func (this*QInputMethod) LocaleChanged() {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod13localeChangedEv", qtrt.FFI_TYPE_POINTER, this.GetCthis())
qtrt.ErrPrint(err, rv)
}
// /usr/include/qt/QtGui/qinputmethod.h:117
// index:0
// Public Visibility=Default Availability=Available
// [-2] void inputDirectionChanged(Qt::LayoutDirection)
/*
*/
func (this*QInputMethod) InputDirectionChanged(newDirectionint) {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethod21inputDirectionChangedEN2Qt15LayoutDirectionE", qtrt.FFI_TYPE_POINTER, this.GetCthis(), newDirection)
qtrt.ErrPrint(err, rv)
}
funcDeleteQInputMethod(this*QInputMethod) {
rv, err:=qtrt.InvokeQtFunc6("_ZN12QInputMethodD2Ev", qtrt.FFI_TYPE_VOID, this.GetCthis())
qtrt.ErrPrint(err, rv)
this.SetCthis(nil)
}
/*
Indicates the kind of action performed by the user.
See also invokeAction().
*/
typeQInputMethod__Action=int
// A normal click/tap
constQInputMethod__ClickQInputMethod__Action=0
// A context menu click/tap (e.g. right-button or tap-and-hold)
constQInputMethod__ContextMenuQInputMethod__Action=1
func (this*QInputMethod) ActionItemName(valint) string {
returnqtrt.GetClassEnumItemName(this, val)
}
funcQInputMethod_ActionItemName(valint) string {
varnilthis*QInputMethod
returnnilthis.ActionItemName(val)
}
// body block end
// keep block begin
funcinit_unused_10873() {
iffalse {
reflect.TypeOf(123)
}
iffalse {
reflect.TypeOf(unsafe.Sizeof(0))
}
iffalse {
fmt.Println(123)
}
iffalse {
log.Println(123)
}
iffalse {
qtrt.KeepMe()
}
iffalse {
qtcore.KeepMe()
}
}
// keep block end