/ src / frameworks / InputMethodKit / src / InputMethodKit.m
InputMethodKit.m
  1  /*
  2   This file is part of Darling.
  3  
  4   Copyright (C) 2021 Lubos Dolezel
  5  
  6   Darling is free software: you can redistribute it and/or modify
  7   it under the terms of the GNU General Public License as published by
  8   the Free Software Foundation, either version 3 of the License, or
  9   (at your option) any later version.
 10  
 11   Darling is distributed in the hope that it will be useful,
 12   but WITHOUT ANY WARRANTY; without even the implied warranty of
 13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 14   GNU General Public License for more details.
 15  
 16   You should have received a copy of the GNU General Public License
 17   along with Darling.  If not, see <http://www.gnu.org/licenses/>.
 18  */
 19  
 20  
 21  #include <InputMethodKit/InputMethodKit.h>
 22  #include <stdlib.h>
 23  #include <stdio.h>
 24  
 25  static int verbose = 0;
 26  
 27  __attribute__((constructor))
 28  static void initme(void) {
 29      verbose = getenv("STUB_VERBOSE") != NULL;
 30  }
 31  
 32  void* IMKCandidateControllerUITypeIsWindowBacked(void)
 33  {
 34      if (verbose) puts("STUB: IMKCandidateControllerUITypeIsWindowBacked called");
 35      return NULL;
 36  }
 37  
 38  void* IMKContainsShortcutModifier(void)
 39  {
 40      if (verbose) puts("STUB: IMKContainsShortcutModifier called");
 41      return NULL;
 42  }
 43  
 44  void* IMKIsHighSurrogate(void)
 45  {
 46      if (verbose) puts("STUB: IMKIsHighSurrogate called");
 47      return NULL;
 48  }
 49  
 50  void* IMKIsLowSurrogate(void)
 51  {
 52      if (verbose) puts("STUB: IMKIsLowSurrogate called");
 53      return NULL;
 54  }
 55  
 56  void* IMKIsNumber(void)
 57  {
 58      if (verbose) puts("STUB: IMKIsNumber called");
 59      return NULL;
 60  }
 61  
 62  void* IMKIsOnBigEndianSystem(void)
 63  {
 64      if (verbose) puts("STUB: IMKIsOnBigEndianSystem called");
 65      return NULL;
 66  }
 67  
 68  void* IMKIsSentenceEndingCharacter(void)
 69  {
 70      if (verbose) puts("STUB: IMKIsSentenceEndingCharacter called");
 71      return NULL;
 72  }
 73  
 74  void* IMKIsSurrogate(void)
 75  {
 76      if (verbose) puts("STUB: IMKIsSurrogate called");
 77      return NULL;
 78  }
 79  
 80  void* IMKKeyModifiersFromNSModifierFlags(void)
 81  {
 82      if (verbose) puts("STUB: IMKKeyModifiersFromNSModifierFlags called");
 83      return NULL;
 84  }
 85  
 86  void* IMKLayoutCandidatePositionIsValid(void)
 87  {
 88      if (verbose) puts("STUB: IMKLayoutCandidatePositionIsValid called");
 89      return NULL;
 90  }
 91  
 92  void* IMKSentenceEndingCharacterSet(void)
 93  {
 94      if (verbose) puts("STUB: IMKSentenceEndingCharacterSet called");
 95      return NULL;
 96  }
 97  
 98  void* IMKSimulatorCandidateProxies(void)
 99  {
100      if (verbose) puts("STUB: IMKSimulatorCandidateProxies called");
101      return NULL;
102  }
103  
104  void* IMKSimulatorCandidateSurfaces(void)
105  {
106      if (verbose) puts("STUB: IMKSimulatorCandidateSurfaces called");
107      return NULL;
108  }
109  
110  void* IMKSimulatorCandidateWindowIsVisible(void)
111  {
112      if (verbose) puts("STUB: IMKSimulatorCandidateWindowIsVisible called");
113      return NULL;
114  }
115  
116  void* IMKSimulatorCandidateWindowSelectedSurface(void)
117  {
118      if (verbose) puts("STUB: IMKSimulatorCandidateWindowSelectedSurface called");
119      return NULL;
120  }
121  
122  void* IMKSimulatorCandidateWindowTopVisibleLine(void)
123  {
124      if (verbose) puts("STUB: IMKSimulatorCandidateWindowTopVisibleLine called");
125      return NULL;
126  }
127  
128  void* IMKSimulatorCarbonModifiersForNSModifiers(void)
129  {
130      if (verbose) puts("STUB: IMKSimulatorCarbonModifiersForNSModifiers called");
131      return NULL;
132  }
133  
134  void* IMKSimulatorControlKeyModifiers(void)
135  {
136      if (verbose) puts("STUB: IMKSimulatorControlKeyModifiers called");
137      return NULL;
138  }
139  
140  void* IMKSimulatorDictionaryFromAccessibilityString(void)
141  {
142      if (verbose) puts("STUB: IMKSimulatorDictionaryFromAccessibilityString called");
143      return NULL;
144  }
145  
146  void* IMKSimulatorGroupedCandidateProxies(void)
147  {
148      if (verbose) puts("STUB: IMKSimulatorGroupedCandidateProxies called");
149      return NULL;
150  }
151  
152  void* IMKSimulatorGroupedCandidateSurfaces(void)
153  {
154      if (verbose) puts("STUB: IMKSimulatorGroupedCandidateSurfaces called");
155      return NULL;
156  }
157  
158  void* IMKSimulatorMainInit(void)
159  {
160      if (verbose) puts("STUB: IMKSimulatorMainInit called");
161      return NULL;
162  }
163  
164  void* IMKSimulatorMarkedRange(void)
165  {
166      if (verbose) puts("STUB: IMKSimulatorMarkedRange called");
167      return NULL;
168  }
169  
170  void* IMKSimulatorMarkedText(void)
171  {
172      if (verbose) puts("STUB: IMKSimulatorMarkedText called");
173      return NULL;
174  }
175  
176  void* IMKSimulatorPreferencesClear(void)
177  {
178      if (verbose) puts("STUB: IMKSimulatorPreferencesClear called");
179      return NULL;
180  }
181  
182  void* IMKSimulatorPreferencesSetValue(void)
183  {
184      if (verbose) puts("STUB: IMKSimulatorPreferencesSetValue called");
185      return NULL;
186  }
187  
188  void* IMKSimulatorSelectedRange(void)
189  {
190      if (verbose) puts("STUB: IMKSimulatorSelectedRange called");
191      return NULL;
192  }
193  
194  void* IMKSimulatorSelectedText(void)
195  {
196      if (verbose) puts("STUB: IMKSimulatorSelectedText called");
197      return NULL;
198  }
199  
200  void* IMKSimulatorStringValue(void)
201  {
202      if (verbose) puts("STUB: IMKSimulatorStringValue called");
203      return NULL;
204  }
205  
206  void* IMKSimulatorTouchBarCandidateSurfaces(void)
207  {
208      if (verbose) puts("STUB: IMKSimulatorTouchBarCandidateSurfaces called");
209      return NULL;
210  }
211  
212  void* IMKSimulatorTouchBarCandidateWindowSelectedSurface(void)
213  {
214      if (verbose) puts("STUB: IMKSimulatorTouchBarCandidateWindowSelectedSurface called");
215      return NULL;
216  }
217  
218  void* IMKUIBackingAwareCeil(void)
219  {
220      if (verbose) puts("STUB: IMKUIBackingAwareCeil called");
221      return NULL;
222  }
223  
224  void* IMKUIBackingAwareFloor(void)
225  {
226      if (verbose) puts("STUB: IMKUIBackingAwareFloor called");
227      return NULL;
228  }
229  
230  void* IMKUICandidatePanelTypeSupportsAlignment(void)
231  {
232      if (verbose) puts("STUB: IMKUICandidatePanelTypeSupportsAlignment called");
233      return NULL;
234  }
235  
236  void* IMKUILocationHintString(void)
237  {
238      if (verbose) puts("STUB: IMKUILocationHintString called");
239      return NULL;
240  }
241  
242  void* IMKUIOppositeLocationHint(void)
243  {
244      if (verbose) puts("STUB: IMKUIOppositeLocationHint called");
245      return NULL;
246  }
247  
248  void* IMKUIPanelTypeIsScrubber(void)
249  {
250      if (verbose) puts("STUB: IMKUIPanelTypeIsScrubber called");
251      return NULL;
252  }
253  
254  void* IMKUIPanelTypeIsTouchBar(void)
255  {
256      if (verbose) puts("STUB: IMKUIPanelTypeIsTouchBar called");
257      return NULL;
258  }
259  
260  void* IMKUIPanelTypeToString(void)
261  {
262      if (verbose) puts("STUB: IMKUIPanelTypeToString called");
263      return NULL;
264  }
265  
266  void* IMKUTF32StringEncoding(void)
267  {
268      if (verbose) puts("STUB: IMKUTF32StringEncoding called");
269      return NULL;
270  }
271  
272  void* IMKUnsignedSubtract(void)
273  {
274      if (verbose) puts("STUB: IMKUnsignedSubtract called");
275      return NULL;
276  }
277  
278  void* IMKWindowCategoryFromType(void)
279  {
280      if (verbose) puts("STUB: IMKWindowCategoryFromType called");
281      return NULL;
282  }
283  
284  void* NSModifierFlagsFromIMKKeyModifiers(void)
285  {
286      if (verbose) puts("STUB: NSModifierFlagsFromIMKKeyModifiers called");
287      return NULL;
288  }
289  
290  void* NSRectRoundedSize(void)
291  {
292      if (verbose) puts("STUB: NSRectRoundedSize called");
293      return NULL;
294  }
295  
296  void* NSSizeAddSize(void)
297  {
298      if (verbose) puts("STUB: NSSizeAddSize called");
299      return NULL;
300  }
301  
302  void* NSStringFromCandidateArray(void)
303  {
304      if (verbose) puts("STUB: NSStringFromCandidateArray called");
305      return NULL;
306  }
307  
308  void* NSStringFromIMKCandidateWindowType(void)
309  {
310      if (verbose) puts("STUB: NSStringFromIMKCandidateWindowType called");
311      return NULL;
312  }
313  
314  void* NSZeroOriginRect(void)
315  {
316      if (verbose) puts("STUB: NSZeroOriginRect called");
317      return NULL;
318  }
319  
320  void* NSZeroOriginRectFromSize(void)
321  {
322      if (verbose) puts("STUB: NSZeroOriginRectFromSize called");
323      return NULL;
324  }
325  
326  void* asl_init(void)
327  {
328      if (verbose) puts("STUB: asl_init called");
329      return NULL;
330  }
331  
332  void* asl_stop(void)
333  {
334      if (verbose) puts("STUB: asl_stop called");
335      return NULL;
336  }
337  
338  void* isEqualWithNil(void)
339  {
340      if (verbose) puts("STUB: isEqualWithNil called");
341      return NULL;
342  }
343  
344  void* nameFor(void)
345  {
346      if (verbose) puts("STUB: nameFor called");
347      return NULL;
348  }
349  
350  void* server_client_ipc_signpost_log(void)
351  {
352      if (verbose) puts("STUB: server_client_ipc_signpost_log called");
353      return NULL;
354  }
355  
356  void* server_perf_signpost_log(void)
357  {
358      if (verbose) puts("STUB: server_perf_signpost_log called");
359      return NULL;
360  }
361  
362  void* server_ui_signpost_log(void)
363  {
364      if (verbose) puts("STUB: server_ui_signpost_log called");
365      return NULL;
366  }