• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef INTPU_METHOD_FFI_STRUCTS_H
17 #define INTPU_METHOD_FFI_STRUCTS_H
18 
19 #include <cstdint>
20 
21 #include "cj_ffi/cj_common_ffi.h"
22 
23 extern "C" {
24     struct CInputMethodProperty {
25         char* name;
26         char* id;
27         char* label;
28         uint32_t labelId;
29         char* icon;
30         uint32_t iconId;
31     };
32 
33     struct CInputMethodSubtype {
34         char* name;
35         char* id;
36         char* locale;
37         char* language;
38         char* label;
39         uint32_t labelId;
40         char* icon;
41         uint32_t iconId;
42         char* mode;
43     };
44 
45     struct RetInputMethodSubtype {
46         int32_t code;
47         int64_t size;
48         CInputMethodSubtype *head;
49     };
50 
51     struct RetInputMethodProperty {
52         int32_t code;
53         int64_t size;
54         CInputMethodProperty *head;
55     };
56 
57     struct CElementName {
58         char* deviceId;
59         char* bundleName;
60         char* abilityName;
61         char* moduleName;
62     };
63 
64     struct CInputAttribute {
65         int8_t textInputType;
66         int8_t enterKeyType;
67     };
68 
69     struct CCursorInfo {
70         double left;
71         double top;
72         double width;
73         double height;
74     };
75 
76     struct CRange {
77         int32_t start;
78         int32_t end;
79     };
80 
81     struct CTextConfig {
82         CInputAttribute inputAttrbute;
83         CCursorInfo cursor;
84         CRange range;
85         uint32_t windowId;
86     };
87 }
88 
89 
90 #endif // INTPU_METHOD_FFI_STRUCTS_H