1pub const BYTEDEF: u32 = 1;
4pub const MICRODEF: u32 = 1;
5pub const MISSING_DATA: i32 = -32768;
6pub const MISSING: i32 = -32768;
7pub const INaN: i32 = -32768;
8pub const LEFT_EYE: u32 = 0;
9pub const RIGHT_EYE: u32 = 1;
10pub const LEFTEYEI: u32 = 0;
11pub const RIGHTEYEI: u32 = 1;
12pub const LEFT: u32 = 0;
13pub const RIGHT: u32 = 1;
14pub const BINOCULAR: u32 = 2;
15pub const SAMPLE_LEFT: u32 = 32768;
16pub const SAMPLE_RIGHT: u32 = 16384;
17pub const SAMPLE_TIMESTAMP: u32 = 8192;
18pub const SAMPLE_PUPILXY: u32 = 4096;
19pub const SAMPLE_HREFXY: u32 = 2048;
20pub const SAMPLE_GAZEXY: u32 = 1024;
21pub const SAMPLE_GAZERES: u32 = 512;
22pub const SAMPLE_PUPILSIZE: u32 = 256;
23pub const SAMPLE_STATUS: u32 = 128;
24pub const SAMPLE_INPUTS: u32 = 64;
25pub const SAMPLE_BUTTONS: u32 = 32;
26pub const SAMPLE_HEADPOS: u32 = 16;
27pub const SAMPLE_TAGGED: u32 = 8;
28pub const SAMPLE_UTAGGED: u32 = 4;
29pub const SAMPLE_ADD_OFFSET: u32 = 2;
30pub const FSAMPLEDEF: u32 = 1;
31pub const DSAMPLEDEF: u32 = 1;
32pub const FSAMPLERAWDEF: u32 = 1;
33pub const FEVENTDEF: u32 = 1;
34pub const DEVENTDEF: u32 = 1;
35pub const SAMPLE_TYPE: u32 = 200;
36pub const STARTPARSE: u32 = 1;
37pub const ENDPARSE: u32 = 2;
38pub const BREAKPARSE: u32 = 10;
39pub const STARTBLINK: u32 = 3;
40pub const ENDBLINK: u32 = 4;
41pub const STARTSACC: u32 = 5;
42pub const ENDSACC: u32 = 6;
43pub const STARTFIX: u32 = 7;
44pub const ENDFIX: u32 = 8;
45pub const FIXUPDATE: u32 = 9;
46pub const STARTSAMPLES: u32 = 15;
47pub const ENDSAMPLES: u32 = 16;
48pub const STARTEVENTS: u32 = 17;
49pub const ENDEVENTS: u32 = 18;
50pub const MESSAGEEVENT: u32 = 24;
51pub const BUTTONEVENT: u32 = 25;
52pub const INPUTEVENT: u32 = 28;
53pub const LOST_DATA_EVENT: u32 = 63;
54pub const ISAMPLE_BUFFER: u32 = 200;
55pub const IEVENT_BUFFER: u32 = 66;
56pub const IOEVENT_BUFFER: u32 = 8;
57pub const IMESSAGE_BUFFER: u32 = 250;
58pub const CONTROL_BUFFER: u32 = 36;
59pub const ILINKDATA_BUFFER: u32 = 36;
60pub const READ_ENDTIME: u32 = 64;
61pub const READ_GRES: u32 = 512;
62pub const READ_SIZE: u32 = 128;
63pub const READ_VEL: u32 = 256;
64pub const READ_STATUS: u32 = 8192;
65pub const READ_BEG: u32 = 1;
66pub const READ_END: u32 = 2;
67pub const READ_AVG: u32 = 4;
68pub const READ_PUPILXY: u32 = 1024;
69pub const READ_HREFXY: u32 = 2048;
70pub const READ_GAZEXY: u32 = 4096;
71pub const READ_BEGPOS: u32 = 8;
72pub const READ_ENDPOS: u32 = 16;
73pub const READ_AVGPOS: u32 = 32;
74pub const FRIGHTEYE_EVENTS: u32 = 32768;
75pub const FLEFTEYE_EVENTS: u32 = 16384;
76pub const LEFTEYE_EVENTS: u32 = 32768;
77pub const RIGHTEYE_EVENTS: u32 = 16384;
78pub const BLINK_EVENTS: u32 = 8192;
79pub const FIXATION_EVENTS: u32 = 4096;
80pub const FIXUPDATE_EVENTS: u32 = 2048;
81pub const SACCADE_EVENTS: u32 = 1024;
82pub const MESSAGE_EVENTS: u32 = 512;
83pub const BUTTON_EVENTS: u32 = 64;
84pub const INPUT_EVENTS: u32 = 32;
85pub const EVENT_VELOCITY: u32 = 32768;
86pub const EVENT_PUPILSIZE: u32 = 16384;
87pub const EVENT_GAZERES: u32 = 8192;
88pub const EVENT_STATUS: u32 = 4096;
89pub const EVENT_GAZEXY: u32 = 1024;
90pub const EVENT_HREFXY: u32 = 512;
91pub const EVENT_PUPILXY: u32 = 256;
92pub const FIX_AVG_ONLY: u32 = 8;
93pub const START_TIME_ONLY: u32 = 4;
94pub const PARSEDBY_GAZE: u32 = 192;
95pub const PARSEDBY_HREF: u32 = 128;
96pub const PARSEDBY_PUPIL: u32 = 64;
97pub const ILINKDATAVERSION: u32 = 2;
98pub const ELNAMESIZE: u32 = 40;
99pub const ELREMBUFSIZE: u32 = 420;
100pub const ELINKADDRSIZE: u32 = 16;
101pub const PUPIL_DIA_FLAG: u32 = 1;
102pub const HAVE_SAMPLES_FLAG: u32 = 2;
103pub const HAVE_EVENTS_FLAG: u32 = 4;
104pub const HAVE_LEFT_FLAG: u32 = 32768;
105pub const HAVE_RIGHT_FLAG: u32 = 16384;
106pub const DROPPED_SAMPLE: u32 = 32768;
107pub const DROPPED_EVENT: u32 = 16384;
108pub const DROPPED_CONTROL: u32 = 8192;
109pub const DFILE_IS_OPEN: u32 = 128;
110pub const DFILE_EVENTS_ON: u32 = 64;
111pub const DFILE_SAMPLES_ON: u32 = 32;
112pub const DLINK_EVENTS_ON: u32 = 8;
113pub const DLINK_SAMPLES_ON: u32 = 4;
114pub const DRECORD_ACTIVE: u32 = 1;
115pub const COMMAND_FULL_WARN: u32 = 1;
116pub const MESSAGE_FULL_WARN: u32 = 2;
117pub const LINK_FULL_WARN: u32 = 4;
118pub const FULL_WARN: u32 = 15;
119pub const LINK_CONNECTED: u32 = 16;
120pub const LINK_BROADCAST: u32 = 32;
121pub const LINK_IS_TCPIP: u32 = 64;
122pub const LED_TOP_WARNING: u32 = 128;
123pub const LED_BOT_WARNING: u32 = 64;
124pub const LED_LEFT_WARNING: u32 = 32;
125pub const LED_RIGHT_WARNING: u32 = 16;
126pub const HEAD_POSITION_WARNING: u32 = 240;
127pub const LED_EXTRA_WARNING: u32 = 8;
128pub const LED_MISSING_WARNING: u32 = 4;
129pub const HEAD_VELOCITY_WARNING: u32 = 1;
130pub const CALIBRATION_AREA_WARNING: u32 = 2;
131pub const MATH_ERROR_WARNING: u32 = 8192;
132pub const INTERP_SAMPLE_WARNING: u32 = 4096;
133pub const INTERP_PUPIL_WARNING: u32 = 32768;
134pub const CR_WARNING: u32 = 3840;
135pub const CR_LEFT_WARNING: u32 = 1280;
136pub const CR_RIGHT_WARNING: u32 = 2560;
137pub const CR_LOST_WARNING: u32 = 768;
138pub const CR_LOST_LEFT_WARNING: u32 = 256;
139pub const CR_LOST_RIGHT_WARNING: u32 = 512;
140pub const CR_RECOV_WARNING: u32 = 3072;
141pub const CR_RECOV_LEFT_WARNING: u32 = 1024;
142pub const CR_RECOV_RIGHT_WARNING: u32 = 2048;
143pub const HPOS_TOP_WARNING: u32 = 128;
144pub const HPOS_BOT_WARNING: u32 = 64;
145pub const HPOS_LEFT_WARNING: u32 = 32;
146pub const HPOS_RIGHT_WARNING: u32 = 16;
147pub const HPOS_WARNING: u32 = 240;
148pub const HPOS_ANGLE_WARNING: u32 = 8;
149pub const HPOS_MISSING_WARNING: u32 = 4;
150pub const HPOS_DISTANCE_WARNING: u32 = 1;
151pub const TFLAG_MISSING: u32 = 16384;
152pub const TFLAG_ANGLE: u32 = 8192;
153pub const TFLAG_NEAREYE: u32 = 4096;
154pub const TFLAG_CLOSE: u32 = 2048;
155pub const TFLAG_FAR: u32 = 1024;
156pub const TFLAG_T_TSIDE: u32 = 128;
157pub const TFLAG_T_BSIDE: u32 = 64;
158pub const TFLAG_T_LSIDE: u32 = 32;
159pub const TFLAG_T_RSIDE: u32 = 16;
160pub const TFLAG_E_TSIDE: u32 = 8;
161pub const TFLAG_E_BSIDE: u32 = 4;
162pub const TFLAG_E_LSIDE: u32 = 2;
163pub const TFLAG_E_RSIDE: u32 = 1;
164pub const OK_RESULT: u32 = 0;
165pub const NO_REPLY: u32 = 1000;
166pub const LINK_TERMINATED_RESULT: i32 = -100;
167pub const ABORT_RESULT: u32 = 27;
168pub const UNEXPECTED_EOL_RESULT: i32 = -1;
169pub const SYNTAX_ERROR_RESULT: i32 = -2;
170pub const BAD_VALUE_RESULT: i32 = -3;
171pub const EXTRA_CHARACTERS_RESULT: i32 = -4;
172pub const LINK_SEND_MAX: u32 = 244;
173pub const LINK_INITIALIZE_FAILED: i32 = -200;
174pub const CONNECT_TIMEOUT_FAILED: i32 = -201;
175pub const WRONG_LINK_VERSION: i32 = -202;
176pub const TRACKER_BUSY: i32 = -203;
177pub const IN_DISCONNECT_MODE: u32 = 16384;
178pub const IN_UNKNOWN_MODE: u32 = 0;
179pub const IN_IDLE_MODE: u32 = 1;
180pub const IN_SETUP_MODE: u32 = 2;
181pub const IN_RECORD_MODE: u32 = 4;
182pub const IN_TARGET_MODE: u32 = 8;
183pub const IN_DRIFTCORR_MODE: u32 = 16;
184pub const IN_IMAGE_MODE: u32 = 32;
185pub const IN_USER_MENU: u32 = 64;
186pub const IN_PLAYBACK_MODE: u32 = 256;
187pub const EL_IDLE_MODE: u32 = 1;
188pub const EL_IMAGE_MODE: u32 = 2;
189pub const EL_SETUP_MENU_MODE: u32 = 3;
190pub const EL_USER_MENU_1: u32 = 5;
191pub const EL_USER_MENU_2: u32 = 6;
192pub const EL_USER_MENU_3: u32 = 7;
193pub const EL_OPTIONS_MENU_MODE: u32 = 8;
194pub const EL_OUTPUT_MENU_MODE: u32 = 9;
195pub const EL_DEMO_MENU_MODE: u32 = 10;
196pub const EL_CALIBRATE_MODE: u32 = 11;
197pub const EL_VALIDATE_MODE: u32 = 12;
198pub const EL_DRIFT_CORR_MODE: u32 = 13;
199pub const EL_RECORD_MODE: u32 = 14;
200pub const SCENECAM_ALIGN_MODE: u32 = 15;
201pub const SCENECAM_DEPTH_MODE: u32 = 16;
202pub const RECORD_FILE_SAMPLES: u32 = 1;
203pub const RECORD_FILE_EVENTS: u32 = 2;
204pub const RECORD_LINK_SAMPLES: u32 = 4;
205pub const RECORD_LINK_EVENTS: u32 = 8;
206pub const ELIMAGE_2: u32 = 0;
207pub const ELIMAGE_16: u32 = 1;
208pub const ELIMAGE_16P: u32 = 2;
209pub const ELIMAGE_256: u32 = 3;
210pub const ELIMAGE_128HV: u32 = 4;
211pub const ELIMAGE_128HVX: u32 = 5;
212pub const KB_PRESS: u32 = 10;
213pub const KB_RELEASE: i32 = -1;
214pub const KB_REPEAT: u32 = 1;
215pub const NUM_LOCK_ON: u32 = 32;
216pub const CAPS_LOCK_ON: u32 = 64;
217pub const ALT_KEY_DOWN: u32 = 8;
218pub const CTRL_KEY_DOWN: u32 = 4;
219pub const SHIFT_KEY_DOWN: u32 = 3;
220pub const KB_BUTTON: u32 = 65280;
221pub const F1_KEY: u32 = 15104;
222pub const F2_KEY: u32 = 15360;
223pub const F3_KEY: u32 = 15616;
224pub const F4_KEY: u32 = 15872;
225pub const F5_KEY: u32 = 16128;
226pub const F6_KEY: u32 = 16384;
227pub const F7_KEY: u32 = 16640;
228pub const F8_KEY: u32 = 16896;
229pub const F9_KEY: u32 = 17152;
230pub const F10_KEY: u32 = 17408;
231pub const PAGE_UP: u32 = 18688;
232pub const PAGE_DOWN: u32 = 20736;
233pub const CURS_UP: u32 = 18432;
234pub const CURS_DOWN: u32 = 20480;
235pub const CURS_LEFT: u32 = 19200;
236pub const CURS_RIGHT: u32 = 19712;
237pub const ESC_KEY: u32 = 27;
238pub const ENTER_KEY: u32 = 13;
239pub const FILE_XFER_ABORTED: i32 = -110;
240pub const FILE_CANT_OPEN: i32 = -111;
241pub const FILE_NO_REPLY: i32 = -112;
242pub const FILE_BAD_DATA: i32 = -113;
243pub const FILEDATA_SIZE_FLAG: u32 = 999;
244pub const FILE_BLOCK_SIZE: u32 = 512;
245pub const ABORT_BX: i32 = -32000;
246pub const PAUSE_BX: i32 = -32001;
247pub const DONE_BX: i32 = -32002;
248pub const JUNK_KEY: u32 = 1;
249pub const TERMINATE_KEY: u32 = 32767;
250pub const DONE_TRIAL: u32 = 0;
251pub const TRIAL_OK: u32 = 0;
252pub const REPEAT_TRIAL: u32 = 1;
253pub const SKIP_TRIAL: u32 = 2;
254pub const ABORT_EXPT: u32 = 3;
255pub const TRIAL_ERROR: i32 = -1;
256pub const BX_AVERAGE: u32 = 0;
257pub const BX_DARKEN: u32 = 1;
258pub const BX_LIGHTEN: u32 = 2;
259pub const BX_MAXCONTRAST: u32 = 4;
260pub const BX_NODITHER: u32 = 8;
261pub const BX_GRAYSCALE: u32 = 16;
262pub const BX_TXFILE: u32 = 32;
263pub const BX_DOTRANSFER: u32 = 256;
264pub const SV_NOREPLACE: u32 = 1;
265pub const SV_MAKEPATH: u32 = 2;
266pub const BAD_FILENAME: i32 = -2222;
267pub const BAD_ARGUMENT: i32 = -2223;
268pub const KEYINPUT_EVENT: u32 = 1;
269pub const MOUSE_INPUT_EVENT: u32 = 4;
270pub const MOUSE_MOTION_INPUT_EVENT: u32 = 5;
271pub const MOUSE_BUTTON_INPUT_EVENT: u32 = 6;
272pub const ELKMOD_NONE: u32 = 0;
273pub const ELKMOD_LSHIFT: u32 = 1;
274pub const ELKMOD_RSHIFT: u32 = 2;
275pub const ELKMOD_LCTRL: u32 = 64;
276pub const ELKMOD_RCTRL: u32 = 128;
277pub const ELKMOD_LALT: u32 = 256;
278pub const ELKMOD_RALT: u32 = 512;
279pub const ELKMOD_LMETA: u32 = 1024;
280pub const ELKMOD_RMETA: u32 = 2048;
281pub const ELKMOD_NUM: u32 = 4096;
282pub const ELKMOD_CAPS: u32 = 8192;
283pub const ELKMOD_MODE: u32 = 16384;
284pub const ELKEY_DOWN: u32 = 1;
285pub const ELKEY_UP: u32 = 0;
286pub const FIVE_SAMPLE_MODEL: u32 = 1;
287pub const NINE_SAMPLE_MODEL: u32 = 2;
288pub const SEVENTEEN_SAMPLE_MODEL: u32 = 3;
289pub const EL1000_TRACKER_MODEL: u32 = 4;
290pub const CR_HAIR_COLOR: u32 = 1;
291pub const PUPIL_HAIR_COLOR: u32 = 2;
292pub const PUPIL_BOX_COLOR: u32 = 3;
293pub const SEARCH_LIMIT_BOX_COLOR: u32 = 4;
294pub const MOUSE_CURSOR_COLOR: u32 = 5;
295pub type byte = ::std::os::raw::c_uchar;
296pub type INT16 = ::std::os::raw::c_short;
297pub type UINT16 = ::std::os::raw::c_ushort;
298pub type INT32 = ::std::os::raw::c_int;
299pub type UINT32 = ::std::os::raw::c_uint;
300#[doc = " @ingroup access_time_local"]
301#[doc = "Structure to hold msec and usec."]
302#[doc = "\\sa current_micro"]
303#[repr(C)]
304#[derive(Debug, Default, Copy, Clone)]
305pub struct MICRO {
306 pub msec: INT32,
307 pub usec: INT16,
308}
309#[test]
310fn bindgen_test_layout_MICRO() {
311 assert_eq!(
312 ::std::mem::size_of::<MICRO>(),
313 8usize,
314 concat!("Size of: ", stringify!(MICRO))
315 );
316 assert_eq!(
317 ::std::mem::align_of::<MICRO>(),
318 4usize,
319 concat!("Alignment of ", stringify!(MICRO))
320 );
321 assert_eq!(
322 unsafe { &(*(::std::ptr::null::<MICRO>())).msec as *const _ as usize },
323 0usize,
324 concat!(
325 "Offset of field: ",
326 stringify!(MICRO),
327 "::",
328 stringify!(msec)
329 )
330 );
331 assert_eq!(
332 unsafe { &(*(::std::ptr::null::<MICRO>())).usec as *const _ as usize },
333 4usize,
334 concat!(
335 "Offset of field: ",
336 stringify!(MICRO),
337 "::",
338 stringify!(usec)
339 )
340 );
341}
342#[doc = " @ingroup messaging"]
343#[doc = "\\brief Integer sample data"]
344#[repr(C)]
345#[derive(Debug, Default, Copy, Clone)]
346pub struct ISAMPLE {
347 #[doc = "< time of sample"]
348 pub time: UINT32,
349 #[doc = "< always SAMPLE_TYPE"]
350 pub type_: INT16,
351 #[doc = "< flags to indicate contents"]
352 pub flags: UINT16,
353 #[doc = "< pupil x"]
354 pub px: [INT16; 2usize],
355 #[doc = "< pupil y"]
356 pub py: [INT16; 2usize],
357 #[doc = "< headref x"]
358 pub hx: [INT16; 2usize],
359 #[doc = "< headref y"]
360 pub hy: [INT16; 2usize],
361 #[doc = "< pupil size or area"]
362 pub pa: [UINT16; 2usize],
363 #[doc = "< screen gaze x"]
364 pub gx: [INT16; 2usize],
365 #[doc = "< screen gaze y"]
366 pub gy: [INT16; 2usize],
367 #[doc = "< screen pixels per degree"]
368 pub rx: INT16,
369 #[doc = "< screen pixels per degree"]
370 pub ry: INT16,
371 #[doc = "< tracker status flags"]
372 pub status: UINT16,
373 #[doc = "< extra (input word)"]
374 pub input: UINT16,
375 #[doc = "< button state & changes"]
376 pub buttons: UINT16,
377 #[doc = "< head-tracker data type (0=none)"]
378 pub htype: INT16,
379 #[doc = "< head-tracker data"]
380 pub hdata: [INT16; 8usize],
381}
382#[test]
383fn bindgen_test_layout_ISAMPLE() {
384 assert_eq!(
385 ::std::mem::size_of::<ISAMPLE>(),
386 64usize,
387 concat!("Size of: ", stringify!(ISAMPLE))
388 );
389 assert_eq!(
390 ::std::mem::align_of::<ISAMPLE>(),
391 4usize,
392 concat!("Alignment of ", stringify!(ISAMPLE))
393 );
394 assert_eq!(
395 unsafe { &(*(::std::ptr::null::<ISAMPLE>())).time as *const _ as usize },
396 0usize,
397 concat!(
398 "Offset of field: ",
399 stringify!(ISAMPLE),
400 "::",
401 stringify!(time)
402 )
403 );
404 assert_eq!(
405 unsafe { &(*(::std::ptr::null::<ISAMPLE>())).type_ as *const _ as usize },
406 4usize,
407 concat!(
408 "Offset of field: ",
409 stringify!(ISAMPLE),
410 "::",
411 stringify!(type_)
412 )
413 );
414 assert_eq!(
415 unsafe { &(*(::std::ptr::null::<ISAMPLE>())).flags as *const _ as usize },
416 6usize,
417 concat!(
418 "Offset of field: ",
419 stringify!(ISAMPLE),
420 "::",
421 stringify!(flags)
422 )
423 );
424 assert_eq!(
425 unsafe { &(*(::std::ptr::null::<ISAMPLE>())).px as *const _ as usize },
426 8usize,
427 concat!(
428 "Offset of field: ",
429 stringify!(ISAMPLE),
430 "::",
431 stringify!(px)
432 )
433 );
434 assert_eq!(
435 unsafe { &(*(::std::ptr::null::<ISAMPLE>())).py as *const _ as usize },
436 12usize,
437 concat!(
438 "Offset of field: ",
439 stringify!(ISAMPLE),
440 "::",
441 stringify!(py)
442 )
443 );
444 assert_eq!(
445 unsafe { &(*(::std::ptr::null::<ISAMPLE>())).hx as *const _ as usize },
446 16usize,
447 concat!(
448 "Offset of field: ",
449 stringify!(ISAMPLE),
450 "::",
451 stringify!(hx)
452 )
453 );
454 assert_eq!(
455 unsafe { &(*(::std::ptr::null::<ISAMPLE>())).hy as *const _ as usize },
456 20usize,
457 concat!(
458 "Offset of field: ",
459 stringify!(ISAMPLE),
460 "::",
461 stringify!(hy)
462 )
463 );
464 assert_eq!(
465 unsafe { &(*(::std::ptr::null::<ISAMPLE>())).pa as *const _ as usize },
466 24usize,
467 concat!(
468 "Offset of field: ",
469 stringify!(ISAMPLE),
470 "::",
471 stringify!(pa)
472 )
473 );
474 assert_eq!(
475 unsafe { &(*(::std::ptr::null::<ISAMPLE>())).gx as *const _ as usize },
476 28usize,
477 concat!(
478 "Offset of field: ",
479 stringify!(ISAMPLE),
480 "::",
481 stringify!(gx)
482 )
483 );
484 assert_eq!(
485 unsafe { &(*(::std::ptr::null::<ISAMPLE>())).gy as *const _ as usize },
486 32usize,
487 concat!(
488 "Offset of field: ",
489 stringify!(ISAMPLE),
490 "::",
491 stringify!(gy)
492 )
493 );
494 assert_eq!(
495 unsafe { &(*(::std::ptr::null::<ISAMPLE>())).rx as *const _ as usize },
496 36usize,
497 concat!(
498 "Offset of field: ",
499 stringify!(ISAMPLE),
500 "::",
501 stringify!(rx)
502 )
503 );
504 assert_eq!(
505 unsafe { &(*(::std::ptr::null::<ISAMPLE>())).ry as *const _ as usize },
506 38usize,
507 concat!(
508 "Offset of field: ",
509 stringify!(ISAMPLE),
510 "::",
511 stringify!(ry)
512 )
513 );
514 assert_eq!(
515 unsafe { &(*(::std::ptr::null::<ISAMPLE>())).status as *const _ as usize },
516 40usize,
517 concat!(
518 "Offset of field: ",
519 stringify!(ISAMPLE),
520 "::",
521 stringify!(status)
522 )
523 );
524 assert_eq!(
525 unsafe { &(*(::std::ptr::null::<ISAMPLE>())).input as *const _ as usize },
526 42usize,
527 concat!(
528 "Offset of field: ",
529 stringify!(ISAMPLE),
530 "::",
531 stringify!(input)
532 )
533 );
534 assert_eq!(
535 unsafe { &(*(::std::ptr::null::<ISAMPLE>())).buttons as *const _ as usize },
536 44usize,
537 concat!(
538 "Offset of field: ",
539 stringify!(ISAMPLE),
540 "::",
541 stringify!(buttons)
542 )
543 );
544 assert_eq!(
545 unsafe { &(*(::std::ptr::null::<ISAMPLE>())).htype as *const _ as usize },
546 46usize,
547 concat!(
548 "Offset of field: ",
549 stringify!(ISAMPLE),
550 "::",
551 stringify!(htype)
552 )
553 );
554 assert_eq!(
555 unsafe { &(*(::std::ptr::null::<ISAMPLE>())).hdata as *const _ as usize },
556 48usize,
557 concat!(
558 "Offset of field: ",
559 stringify!(ISAMPLE),
560 "::",
561 stringify!(hdata)
562 )
563 );
564}
565#[doc = " @ingroup messaging"]
566#[doc = "\\brief Floating-point sample"]
567#[doc = ""]
568#[doc = "The EyeLink tracker measures eye position 250, 500, 1000 or 2000 times per second depending on"]
569#[doc = "the tracking mode you are working with, and computes true gaze position on the display"]
570#[doc = "using the head camera data. This data is stored in the EDF file, and made available"]
571#[doc = "through the link in as little as 3 milliseconds after a physical eye movement."]
572#[doc = "Samples can be read from the link by eyelink_get_float_data() or eyelink_newest_float_sample()."]
573#[doc = ""]
574#[doc = "If sample rate is 2000hz, two samples with same time stamp possible. If SAMPLE_ADD_OFFSET is set on the"]
575#[doc = "flags, add .5 ms to get the real time. Convenient FLOAT_TIME can also be used."]
576#[repr(C)]
577#[derive(Debug, Default, Copy, Clone)]
578pub struct FSAMPLE {
579 #[doc = "< time of sample"]
580 pub time: UINT32,
581 #[doc = "< always SAMPLE_TYPE"]
582 pub type_: INT16,
583 #[doc = "< flags to indicate contents"]
584 pub flags: UINT16,
585 #[doc = "< pupil x"]
586 pub px: [f32; 2usize],
587 #[doc = "< pupil y"]
588 pub py: [f32; 2usize],
589 #[doc = "< headref x"]
590 pub hx: [f32; 2usize],
591 #[doc = "< headref y"]
592 pub hy: [f32; 2usize],
593 #[doc = "< pupil size or area"]
594 pub pa: [f32; 2usize],
595 #[doc = "< screen gaze x"]
596 pub gx: [f32; 2usize],
597 #[doc = "< screen gaze y"]
598 pub gy: [f32; 2usize],
599 #[doc = "< screen pixels per degree"]
600 pub rx: f32,
601 #[doc = "< screen pixels per degree"]
602 pub ry: f32,
603 #[doc = "< tracker status flags"]
604 pub status: UINT16,
605 #[doc = "< extra (input word)"]
606 pub input: UINT16,
607 #[doc = "< button state & changes"]
608 pub buttons: UINT16,
609 #[doc = "< head-tracker data type (0=none)"]
610 pub htype: INT16,
611 #[doc = "< head-tracker data (not prescaled)"]
612 pub hdata: [INT16; 8usize],
613}
614#[test]
615fn bindgen_test_layout_FSAMPLE() {
616 assert_eq!(
617 ::std::mem::size_of::<FSAMPLE>(),
618 96usize,
619 concat!("Size of: ", stringify!(FSAMPLE))
620 );
621 assert_eq!(
622 ::std::mem::align_of::<FSAMPLE>(),
623 4usize,
624 concat!("Alignment of ", stringify!(FSAMPLE))
625 );
626 assert_eq!(
627 unsafe { &(*(::std::ptr::null::<FSAMPLE>())).time as *const _ as usize },
628 0usize,
629 concat!(
630 "Offset of field: ",
631 stringify!(FSAMPLE),
632 "::",
633 stringify!(time)
634 )
635 );
636 assert_eq!(
637 unsafe { &(*(::std::ptr::null::<FSAMPLE>())).type_ as *const _ as usize },
638 4usize,
639 concat!(
640 "Offset of field: ",
641 stringify!(FSAMPLE),
642 "::",
643 stringify!(type_)
644 )
645 );
646 assert_eq!(
647 unsafe { &(*(::std::ptr::null::<FSAMPLE>())).flags as *const _ as usize },
648 6usize,
649 concat!(
650 "Offset of field: ",
651 stringify!(FSAMPLE),
652 "::",
653 stringify!(flags)
654 )
655 );
656 assert_eq!(
657 unsafe { &(*(::std::ptr::null::<FSAMPLE>())).px as *const _ as usize },
658 8usize,
659 concat!(
660 "Offset of field: ",
661 stringify!(FSAMPLE),
662 "::",
663 stringify!(px)
664 )
665 );
666 assert_eq!(
667 unsafe { &(*(::std::ptr::null::<FSAMPLE>())).py as *const _ as usize },
668 16usize,
669 concat!(
670 "Offset of field: ",
671 stringify!(FSAMPLE),
672 "::",
673 stringify!(py)
674 )
675 );
676 assert_eq!(
677 unsafe { &(*(::std::ptr::null::<FSAMPLE>())).hx as *const _ as usize },
678 24usize,
679 concat!(
680 "Offset of field: ",
681 stringify!(FSAMPLE),
682 "::",
683 stringify!(hx)
684 )
685 );
686 assert_eq!(
687 unsafe { &(*(::std::ptr::null::<FSAMPLE>())).hy as *const _ as usize },
688 32usize,
689 concat!(
690 "Offset of field: ",
691 stringify!(FSAMPLE),
692 "::",
693 stringify!(hy)
694 )
695 );
696 assert_eq!(
697 unsafe { &(*(::std::ptr::null::<FSAMPLE>())).pa as *const _ as usize },
698 40usize,
699 concat!(
700 "Offset of field: ",
701 stringify!(FSAMPLE),
702 "::",
703 stringify!(pa)
704 )
705 );
706 assert_eq!(
707 unsafe { &(*(::std::ptr::null::<FSAMPLE>())).gx as *const _ as usize },
708 48usize,
709 concat!(
710 "Offset of field: ",
711 stringify!(FSAMPLE),
712 "::",
713 stringify!(gx)
714 )
715 );
716 assert_eq!(
717 unsafe { &(*(::std::ptr::null::<FSAMPLE>())).gy as *const _ as usize },
718 56usize,
719 concat!(
720 "Offset of field: ",
721 stringify!(FSAMPLE),
722 "::",
723 stringify!(gy)
724 )
725 );
726 assert_eq!(
727 unsafe { &(*(::std::ptr::null::<FSAMPLE>())).rx as *const _ as usize },
728 64usize,
729 concat!(
730 "Offset of field: ",
731 stringify!(FSAMPLE),
732 "::",
733 stringify!(rx)
734 )
735 );
736 assert_eq!(
737 unsafe { &(*(::std::ptr::null::<FSAMPLE>())).ry as *const _ as usize },
738 68usize,
739 concat!(
740 "Offset of field: ",
741 stringify!(FSAMPLE),
742 "::",
743 stringify!(ry)
744 )
745 );
746 assert_eq!(
747 unsafe { &(*(::std::ptr::null::<FSAMPLE>())).status as *const _ as usize },
748 72usize,
749 concat!(
750 "Offset of field: ",
751 stringify!(FSAMPLE),
752 "::",
753 stringify!(status)
754 )
755 );
756 assert_eq!(
757 unsafe { &(*(::std::ptr::null::<FSAMPLE>())).input as *const _ as usize },
758 74usize,
759 concat!(
760 "Offset of field: ",
761 stringify!(FSAMPLE),
762 "::",
763 stringify!(input)
764 )
765 );
766 assert_eq!(
767 unsafe { &(*(::std::ptr::null::<FSAMPLE>())).buttons as *const _ as usize },
768 76usize,
769 concat!(
770 "Offset of field: ",
771 stringify!(FSAMPLE),
772 "::",
773 stringify!(buttons)
774 )
775 );
776 assert_eq!(
777 unsafe { &(*(::std::ptr::null::<FSAMPLE>())).htype as *const _ as usize },
778 78usize,
779 concat!(
780 "Offset of field: ",
781 stringify!(FSAMPLE),
782 "::",
783 stringify!(htype)
784 )
785 );
786 assert_eq!(
787 unsafe { &(*(::std::ptr::null::<FSAMPLE>())).hdata as *const _ as usize },
788 80usize,
789 concat!(
790 "Offset of field: ",
791 stringify!(FSAMPLE),
792 "::",
793 stringify!(hdata)
794 )
795 );
796}
797#[doc = " @ingroup messaging"]
798#[doc = "\\brief Floating-point sample with floating point time"]
799#[doc = ""]
800#[doc = "The EyeLink tracker measures eye position 250, 500, 1000 or 2000 times per second depending on"]
801#[doc = "the tracking mode you are working with, and computes true gaze position on the display"]
802#[doc = "using the head camera data. This data is stored in the EDF file, and made available"]
803#[doc = "through the link in as little as 3 milliseconds after a physical eye movement."]
804#[doc = "Samples can be read from the link by eyelink_get_double_data() or eyelink_newest_double_sample()."]
805#[repr(C)]
806#[derive(Debug, Default, Copy, Clone)]
807pub struct DSAMPLE {
808 #[doc = "< time of sample"]
809 pub time: f64,
810 #[doc = "< always SAMPLE_TYPE"]
811 pub type_: INT16,
812 #[doc = "< flags to indicate contents"]
813 pub flags: UINT16,
814 #[doc = "< pupil x"]
815 pub px: [f32; 2usize],
816 #[doc = "< pupil y"]
817 pub py: [f32; 2usize],
818 #[doc = "< headref x"]
819 pub hx: [f32; 2usize],
820 #[doc = "< headref y"]
821 pub hy: [f32; 2usize],
822 #[doc = "< pupil size or area"]
823 pub pa: [f32; 2usize],
824 #[doc = "< screen gaze x"]
825 pub gx: [f32; 2usize],
826 #[doc = "< screen gaze y"]
827 pub gy: [f32; 2usize],
828 #[doc = "< screen pixels per degree"]
829 pub rx: f32,
830 #[doc = "< screen pixels per degree"]
831 pub ry: f32,
832 #[doc = "< tracker status flags"]
833 pub status: UINT16,
834 #[doc = "< extra (input word)"]
835 pub input: UINT16,
836 #[doc = "< button state & changes"]
837 pub buttons: UINT16,
838 #[doc = "< head-tracker data type (0=none)"]
839 pub htype: INT16,
840 #[doc = "< head-tracker data (not prescaled)"]
841 pub hdata: [INT16; 8usize],
842}
843#[test]
844fn bindgen_test_layout_DSAMPLE() {
845 assert_eq!(
846 ::std::mem::size_of::<DSAMPLE>(),
847 104usize,
848 concat!("Size of: ", stringify!(DSAMPLE))
849 );
850 assert_eq!(
851 ::std::mem::align_of::<DSAMPLE>(),
852 8usize,
853 concat!("Alignment of ", stringify!(DSAMPLE))
854 );
855 assert_eq!(
856 unsafe { &(*(::std::ptr::null::<DSAMPLE>())).time as *const _ as usize },
857 0usize,
858 concat!(
859 "Offset of field: ",
860 stringify!(DSAMPLE),
861 "::",
862 stringify!(time)
863 )
864 );
865 assert_eq!(
866 unsafe { &(*(::std::ptr::null::<DSAMPLE>())).type_ as *const _ as usize },
867 8usize,
868 concat!(
869 "Offset of field: ",
870 stringify!(DSAMPLE),
871 "::",
872 stringify!(type_)
873 )
874 );
875 assert_eq!(
876 unsafe { &(*(::std::ptr::null::<DSAMPLE>())).flags as *const _ as usize },
877 10usize,
878 concat!(
879 "Offset of field: ",
880 stringify!(DSAMPLE),
881 "::",
882 stringify!(flags)
883 )
884 );
885 assert_eq!(
886 unsafe { &(*(::std::ptr::null::<DSAMPLE>())).px as *const _ as usize },
887 12usize,
888 concat!(
889 "Offset of field: ",
890 stringify!(DSAMPLE),
891 "::",
892 stringify!(px)
893 )
894 );
895 assert_eq!(
896 unsafe { &(*(::std::ptr::null::<DSAMPLE>())).py as *const _ as usize },
897 20usize,
898 concat!(
899 "Offset of field: ",
900 stringify!(DSAMPLE),
901 "::",
902 stringify!(py)
903 )
904 );
905 assert_eq!(
906 unsafe { &(*(::std::ptr::null::<DSAMPLE>())).hx as *const _ as usize },
907 28usize,
908 concat!(
909 "Offset of field: ",
910 stringify!(DSAMPLE),
911 "::",
912 stringify!(hx)
913 )
914 );
915 assert_eq!(
916 unsafe { &(*(::std::ptr::null::<DSAMPLE>())).hy as *const _ as usize },
917 36usize,
918 concat!(
919 "Offset of field: ",
920 stringify!(DSAMPLE),
921 "::",
922 stringify!(hy)
923 )
924 );
925 assert_eq!(
926 unsafe { &(*(::std::ptr::null::<DSAMPLE>())).pa as *const _ as usize },
927 44usize,
928 concat!(
929 "Offset of field: ",
930 stringify!(DSAMPLE),
931 "::",
932 stringify!(pa)
933 )
934 );
935 assert_eq!(
936 unsafe { &(*(::std::ptr::null::<DSAMPLE>())).gx as *const _ as usize },
937 52usize,
938 concat!(
939 "Offset of field: ",
940 stringify!(DSAMPLE),
941 "::",
942 stringify!(gx)
943 )
944 );
945 assert_eq!(
946 unsafe { &(*(::std::ptr::null::<DSAMPLE>())).gy as *const _ as usize },
947 60usize,
948 concat!(
949 "Offset of field: ",
950 stringify!(DSAMPLE),
951 "::",
952 stringify!(gy)
953 )
954 );
955 assert_eq!(
956 unsafe { &(*(::std::ptr::null::<DSAMPLE>())).rx as *const _ as usize },
957 68usize,
958 concat!(
959 "Offset of field: ",
960 stringify!(DSAMPLE),
961 "::",
962 stringify!(rx)
963 )
964 );
965 assert_eq!(
966 unsafe { &(*(::std::ptr::null::<DSAMPLE>())).ry as *const _ as usize },
967 72usize,
968 concat!(
969 "Offset of field: ",
970 stringify!(DSAMPLE),
971 "::",
972 stringify!(ry)
973 )
974 );
975 assert_eq!(
976 unsafe { &(*(::std::ptr::null::<DSAMPLE>())).status as *const _ as usize },
977 76usize,
978 concat!(
979 "Offset of field: ",
980 stringify!(DSAMPLE),
981 "::",
982 stringify!(status)
983 )
984 );
985 assert_eq!(
986 unsafe { &(*(::std::ptr::null::<DSAMPLE>())).input as *const _ as usize },
987 78usize,
988 concat!(
989 "Offset of field: ",
990 stringify!(DSAMPLE),
991 "::",
992 stringify!(input)
993 )
994 );
995 assert_eq!(
996 unsafe { &(*(::std::ptr::null::<DSAMPLE>())).buttons as *const _ as usize },
997 80usize,
998 concat!(
999 "Offset of field: ",
1000 stringify!(DSAMPLE),
1001 "::",
1002 stringify!(buttons)
1003 )
1004 );
1005 assert_eq!(
1006 unsafe { &(*(::std::ptr::null::<DSAMPLE>())).htype as *const _ as usize },
1007 82usize,
1008 concat!(
1009 "Offset of field: ",
1010 stringify!(DSAMPLE),
1011 "::",
1012 stringify!(htype)
1013 )
1014 );
1015 assert_eq!(
1016 unsafe { &(*(::std::ptr::null::<DSAMPLE>())).hdata as *const _ as usize },
1017 84usize,
1018 concat!(
1019 "Offset of field: ",
1020 stringify!(DSAMPLE),
1021 "::",
1022 stringify!(hdata)
1023 )
1024 );
1025}
1026#[doc = "@internal"]
1027#[doc = "Used to access raw online data."]
1028#[repr(C)]
1029#[derive(Debug, Default, Copy, Clone)]
1030pub struct FSAMPLE_RAW {
1031 pub struct_size: UINT32,
1032 pub raw_pupil: [f32; 2usize],
1033 pub raw_cr: [f32; 2usize],
1034 pub pupil_area: UINT32,
1035 pub cr_area: UINT32,
1036 pub pupil_dimension: [UINT32; 2usize],
1037 pub cr_dimension: [UINT32; 2usize],
1038 pub window_position: [UINT32; 2usize],
1039 pub pupil_cr: [f32; 2usize],
1040 pub cr_area2: UINT32,
1041 pub raw_cr2: [f32; 2usize],
1042}
1043#[test]
1044fn bindgen_test_layout_FSAMPLE_RAW() {
1045 assert_eq!(
1046 ::std::mem::size_of::<FSAMPLE_RAW>(),
1047 72usize,
1048 concat!("Size of: ", stringify!(FSAMPLE_RAW))
1049 );
1050 assert_eq!(
1051 ::std::mem::align_of::<FSAMPLE_RAW>(),
1052 4usize,
1053 concat!("Alignment of ", stringify!(FSAMPLE_RAW))
1054 );
1055 assert_eq!(
1056 unsafe { &(*(::std::ptr::null::<FSAMPLE_RAW>())).struct_size as *const _ as usize },
1057 0usize,
1058 concat!(
1059 "Offset of field: ",
1060 stringify!(FSAMPLE_RAW),
1061 "::",
1062 stringify!(struct_size)
1063 )
1064 );
1065 assert_eq!(
1066 unsafe { &(*(::std::ptr::null::<FSAMPLE_RAW>())).raw_pupil as *const _ as usize },
1067 4usize,
1068 concat!(
1069 "Offset of field: ",
1070 stringify!(FSAMPLE_RAW),
1071 "::",
1072 stringify!(raw_pupil)
1073 )
1074 );
1075 assert_eq!(
1076 unsafe { &(*(::std::ptr::null::<FSAMPLE_RAW>())).raw_cr as *const _ as usize },
1077 12usize,
1078 concat!(
1079 "Offset of field: ",
1080 stringify!(FSAMPLE_RAW),
1081 "::",
1082 stringify!(raw_cr)
1083 )
1084 );
1085 assert_eq!(
1086 unsafe { &(*(::std::ptr::null::<FSAMPLE_RAW>())).pupil_area as *const _ as usize },
1087 20usize,
1088 concat!(
1089 "Offset of field: ",
1090 stringify!(FSAMPLE_RAW),
1091 "::",
1092 stringify!(pupil_area)
1093 )
1094 );
1095 assert_eq!(
1096 unsafe { &(*(::std::ptr::null::<FSAMPLE_RAW>())).cr_area as *const _ as usize },
1097 24usize,
1098 concat!(
1099 "Offset of field: ",
1100 stringify!(FSAMPLE_RAW),
1101 "::",
1102 stringify!(cr_area)
1103 )
1104 );
1105 assert_eq!(
1106 unsafe { &(*(::std::ptr::null::<FSAMPLE_RAW>())).pupil_dimension as *const _ as usize },
1107 28usize,
1108 concat!(
1109 "Offset of field: ",
1110 stringify!(FSAMPLE_RAW),
1111 "::",
1112 stringify!(pupil_dimension)
1113 )
1114 );
1115 assert_eq!(
1116 unsafe { &(*(::std::ptr::null::<FSAMPLE_RAW>())).cr_dimension as *const _ as usize },
1117 36usize,
1118 concat!(
1119 "Offset of field: ",
1120 stringify!(FSAMPLE_RAW),
1121 "::",
1122 stringify!(cr_dimension)
1123 )
1124 );
1125 assert_eq!(
1126 unsafe { &(*(::std::ptr::null::<FSAMPLE_RAW>())).window_position as *const _ as usize },
1127 44usize,
1128 concat!(
1129 "Offset of field: ",
1130 stringify!(FSAMPLE_RAW),
1131 "::",
1132 stringify!(window_position)
1133 )
1134 );
1135 assert_eq!(
1136 unsafe { &(*(::std::ptr::null::<FSAMPLE_RAW>())).pupil_cr as *const _ as usize },
1137 52usize,
1138 concat!(
1139 "Offset of field: ",
1140 stringify!(FSAMPLE_RAW),
1141 "::",
1142 stringify!(pupil_cr)
1143 )
1144 );
1145 assert_eq!(
1146 unsafe { &(*(::std::ptr::null::<FSAMPLE_RAW>())).cr_area2 as *const _ as usize },
1147 60usize,
1148 concat!(
1149 "Offset of field: ",
1150 stringify!(FSAMPLE_RAW),
1151 "::",
1152 stringify!(cr_area2)
1153 )
1154 );
1155 assert_eq!(
1156 unsafe { &(*(::std::ptr::null::<FSAMPLE_RAW>())).raw_cr2 as *const _ as usize },
1157 64usize,
1158 concat!(
1159 "Offset of field: ",
1160 stringify!(FSAMPLE_RAW),
1161 "::",
1162 stringify!(raw_cr2)
1163 )
1164 );
1165}
1166#[doc = " @ingroup messaging"]
1167#[doc = "\\brief Integer eye-movement events"]
1168#[repr(C)]
1169#[derive(Debug, Default, Copy, Clone)]
1170pub struct IEVENT {
1171 #[doc = "< effective time of event"]
1172 pub time: UINT32,
1173 #[doc = "< event type"]
1174 pub type_: INT16,
1175 #[doc = "< flags which items were included"]
1176 pub read: UINT16,
1177 #[doc = "< eye: 0=left,1=right"]
1178 pub eye: INT16,
1179 #[doc = "< start times"]
1180 pub sttime: UINT32,
1181 #[doc = "< end times"]
1182 pub entime: UINT32,
1183 #[doc = "< starting point x"]
1184 pub hstx: INT16,
1185 #[doc = "< starting point y"]
1186 pub hsty: INT16,
1187 #[doc = "< starting point x"]
1188 pub gstx: INT16,
1189 #[doc = "< starting point y"]
1190 pub gsty: INT16,
1191 pub sta: UINT16,
1192 #[doc = "< ending point x"]
1193 pub henx: INT16,
1194 #[doc = "< ending point y"]
1195 pub heny: INT16,
1196 #[doc = "< ending point x"]
1197 pub genx: INT16,
1198 #[doc = "< ending point y"]
1199 pub geny: INT16,
1200 pub ena: UINT16,
1201 #[doc = "< average x"]
1202 pub havx: INT16,
1203 #[doc = "< average y"]
1204 pub havy: INT16,
1205 #[doc = "< average x"]
1206 pub gavx: INT16,
1207 #[doc = "< average y"]
1208 pub gavy: INT16,
1209 #[doc = "< also used as accumulator"]
1210 pub ava: UINT16,
1211 #[doc = "< avg velocity accum"]
1212 pub avel: INT16,
1213 #[doc = "< peak velocity accum"]
1214 pub pvel: INT16,
1215 #[doc = "< start velocity"]
1216 pub svel: INT16,
1217 #[doc = "< end velocity"]
1218 pub evel: INT16,
1219 #[doc = "< start units-per-degree x"]
1220 pub supd_x: INT16,
1221 #[doc = "< end units-per-degree y"]
1222 pub eupd_x: INT16,
1223 #[doc = "< start units-per-degree y"]
1224 pub supd_y: INT16,
1225 #[doc = "< end units-per-degree y"]
1226 pub eupd_y: INT16,
1227 #[doc = "< error, warning flags"]
1228 pub status: UINT16,
1229}
1230#[test]
1231fn bindgen_test_layout_IEVENT() {
1232 assert_eq!(
1233 ::std::mem::size_of::<IEVENT>(),
1234 68usize,
1235 concat!("Size of: ", stringify!(IEVENT))
1236 );
1237 assert_eq!(
1238 ::std::mem::align_of::<IEVENT>(),
1239 4usize,
1240 concat!("Alignment of ", stringify!(IEVENT))
1241 );
1242 assert_eq!(
1243 unsafe { &(*(::std::ptr::null::<IEVENT>())).time as *const _ as usize },
1244 0usize,
1245 concat!(
1246 "Offset of field: ",
1247 stringify!(IEVENT),
1248 "::",
1249 stringify!(time)
1250 )
1251 );
1252 assert_eq!(
1253 unsafe { &(*(::std::ptr::null::<IEVENT>())).type_ as *const _ as usize },
1254 4usize,
1255 concat!(
1256 "Offset of field: ",
1257 stringify!(IEVENT),
1258 "::",
1259 stringify!(type_)
1260 )
1261 );
1262 assert_eq!(
1263 unsafe { &(*(::std::ptr::null::<IEVENT>())).read as *const _ as usize },
1264 6usize,
1265 concat!(
1266 "Offset of field: ",
1267 stringify!(IEVENT),
1268 "::",
1269 stringify!(read)
1270 )
1271 );
1272 assert_eq!(
1273 unsafe { &(*(::std::ptr::null::<IEVENT>())).eye as *const _ as usize },
1274 8usize,
1275 concat!(
1276 "Offset of field: ",
1277 stringify!(IEVENT),
1278 "::",
1279 stringify!(eye)
1280 )
1281 );
1282 assert_eq!(
1283 unsafe { &(*(::std::ptr::null::<IEVENT>())).sttime as *const _ as usize },
1284 12usize,
1285 concat!(
1286 "Offset of field: ",
1287 stringify!(IEVENT),
1288 "::",
1289 stringify!(sttime)
1290 )
1291 );
1292 assert_eq!(
1293 unsafe { &(*(::std::ptr::null::<IEVENT>())).entime as *const _ as usize },
1294 16usize,
1295 concat!(
1296 "Offset of field: ",
1297 stringify!(IEVENT),
1298 "::",
1299 stringify!(entime)
1300 )
1301 );
1302 assert_eq!(
1303 unsafe { &(*(::std::ptr::null::<IEVENT>())).hstx as *const _ as usize },
1304 20usize,
1305 concat!(
1306 "Offset of field: ",
1307 stringify!(IEVENT),
1308 "::",
1309 stringify!(hstx)
1310 )
1311 );
1312 assert_eq!(
1313 unsafe { &(*(::std::ptr::null::<IEVENT>())).hsty as *const _ as usize },
1314 22usize,
1315 concat!(
1316 "Offset of field: ",
1317 stringify!(IEVENT),
1318 "::",
1319 stringify!(hsty)
1320 )
1321 );
1322 assert_eq!(
1323 unsafe { &(*(::std::ptr::null::<IEVENT>())).gstx as *const _ as usize },
1324 24usize,
1325 concat!(
1326 "Offset of field: ",
1327 stringify!(IEVENT),
1328 "::",
1329 stringify!(gstx)
1330 )
1331 );
1332 assert_eq!(
1333 unsafe { &(*(::std::ptr::null::<IEVENT>())).gsty as *const _ as usize },
1334 26usize,
1335 concat!(
1336 "Offset of field: ",
1337 stringify!(IEVENT),
1338 "::",
1339 stringify!(gsty)
1340 )
1341 );
1342 assert_eq!(
1343 unsafe { &(*(::std::ptr::null::<IEVENT>())).sta as *const _ as usize },
1344 28usize,
1345 concat!(
1346 "Offset of field: ",
1347 stringify!(IEVENT),
1348 "::",
1349 stringify!(sta)
1350 )
1351 );
1352 assert_eq!(
1353 unsafe { &(*(::std::ptr::null::<IEVENT>())).henx as *const _ as usize },
1354 30usize,
1355 concat!(
1356 "Offset of field: ",
1357 stringify!(IEVENT),
1358 "::",
1359 stringify!(henx)
1360 )
1361 );
1362 assert_eq!(
1363 unsafe { &(*(::std::ptr::null::<IEVENT>())).heny as *const _ as usize },
1364 32usize,
1365 concat!(
1366 "Offset of field: ",
1367 stringify!(IEVENT),
1368 "::",
1369 stringify!(heny)
1370 )
1371 );
1372 assert_eq!(
1373 unsafe { &(*(::std::ptr::null::<IEVENT>())).genx as *const _ as usize },
1374 34usize,
1375 concat!(
1376 "Offset of field: ",
1377 stringify!(IEVENT),
1378 "::",
1379 stringify!(genx)
1380 )
1381 );
1382 assert_eq!(
1383 unsafe { &(*(::std::ptr::null::<IEVENT>())).geny as *const _ as usize },
1384 36usize,
1385 concat!(
1386 "Offset of field: ",
1387 stringify!(IEVENT),
1388 "::",
1389 stringify!(geny)
1390 )
1391 );
1392 assert_eq!(
1393 unsafe { &(*(::std::ptr::null::<IEVENT>())).ena as *const _ as usize },
1394 38usize,
1395 concat!(
1396 "Offset of field: ",
1397 stringify!(IEVENT),
1398 "::",
1399 stringify!(ena)
1400 )
1401 );
1402 assert_eq!(
1403 unsafe { &(*(::std::ptr::null::<IEVENT>())).havx as *const _ as usize },
1404 40usize,
1405 concat!(
1406 "Offset of field: ",
1407 stringify!(IEVENT),
1408 "::",
1409 stringify!(havx)
1410 )
1411 );
1412 assert_eq!(
1413 unsafe { &(*(::std::ptr::null::<IEVENT>())).havy as *const _ as usize },
1414 42usize,
1415 concat!(
1416 "Offset of field: ",
1417 stringify!(IEVENT),
1418 "::",
1419 stringify!(havy)
1420 )
1421 );
1422 assert_eq!(
1423 unsafe { &(*(::std::ptr::null::<IEVENT>())).gavx as *const _ as usize },
1424 44usize,
1425 concat!(
1426 "Offset of field: ",
1427 stringify!(IEVENT),
1428 "::",
1429 stringify!(gavx)
1430 )
1431 );
1432 assert_eq!(
1433 unsafe { &(*(::std::ptr::null::<IEVENT>())).gavy as *const _ as usize },
1434 46usize,
1435 concat!(
1436 "Offset of field: ",
1437 stringify!(IEVENT),
1438 "::",
1439 stringify!(gavy)
1440 )
1441 );
1442 assert_eq!(
1443 unsafe { &(*(::std::ptr::null::<IEVENT>())).ava as *const _ as usize },
1444 48usize,
1445 concat!(
1446 "Offset of field: ",
1447 stringify!(IEVENT),
1448 "::",
1449 stringify!(ava)
1450 )
1451 );
1452 assert_eq!(
1453 unsafe { &(*(::std::ptr::null::<IEVENT>())).avel as *const _ as usize },
1454 50usize,
1455 concat!(
1456 "Offset of field: ",
1457 stringify!(IEVENT),
1458 "::",
1459 stringify!(avel)
1460 )
1461 );
1462 assert_eq!(
1463 unsafe { &(*(::std::ptr::null::<IEVENT>())).pvel as *const _ as usize },
1464 52usize,
1465 concat!(
1466 "Offset of field: ",
1467 stringify!(IEVENT),
1468 "::",
1469 stringify!(pvel)
1470 )
1471 );
1472 assert_eq!(
1473 unsafe { &(*(::std::ptr::null::<IEVENT>())).svel as *const _ as usize },
1474 54usize,
1475 concat!(
1476 "Offset of field: ",
1477 stringify!(IEVENT),
1478 "::",
1479 stringify!(svel)
1480 )
1481 );
1482 assert_eq!(
1483 unsafe { &(*(::std::ptr::null::<IEVENT>())).evel as *const _ as usize },
1484 56usize,
1485 concat!(
1486 "Offset of field: ",
1487 stringify!(IEVENT),
1488 "::",
1489 stringify!(evel)
1490 )
1491 );
1492 assert_eq!(
1493 unsafe { &(*(::std::ptr::null::<IEVENT>())).supd_x as *const _ as usize },
1494 58usize,
1495 concat!(
1496 "Offset of field: ",
1497 stringify!(IEVENT),
1498 "::",
1499 stringify!(supd_x)
1500 )
1501 );
1502 assert_eq!(
1503 unsafe { &(*(::std::ptr::null::<IEVENT>())).eupd_x as *const _ as usize },
1504 60usize,
1505 concat!(
1506 "Offset of field: ",
1507 stringify!(IEVENT),
1508 "::",
1509 stringify!(eupd_x)
1510 )
1511 );
1512 assert_eq!(
1513 unsafe { &(*(::std::ptr::null::<IEVENT>())).supd_y as *const _ as usize },
1514 62usize,
1515 concat!(
1516 "Offset of field: ",
1517 stringify!(IEVENT),
1518 "::",
1519 stringify!(supd_y)
1520 )
1521 );
1522 assert_eq!(
1523 unsafe { &(*(::std::ptr::null::<IEVENT>())).eupd_y as *const _ as usize },
1524 64usize,
1525 concat!(
1526 "Offset of field: ",
1527 stringify!(IEVENT),
1528 "::",
1529 stringify!(eupd_y)
1530 )
1531 );
1532 assert_eq!(
1533 unsafe { &(*(::std::ptr::null::<IEVENT>())).status as *const _ as usize },
1534 66usize,
1535 concat!(
1536 "Offset of field: ",
1537 stringify!(IEVENT),
1538 "::",
1539 stringify!(status)
1540 )
1541 );
1542}
1543#[doc = "@ingroup messaging"]
1544#[doc = "\\brief Floating-point eye event"]
1545#[doc = ""]
1546#[doc = "The EyeLink tracker analyzes the eye-position samples during recording to"]
1547#[doc = "detect saccades, and accumulates data on saccades and fixations. Events"]
1548#[doc = "are produced to mark the start and end of saccades, fixations and blinks."]
1549#[doc = "When both eyes are being tracked, left and right eye events are produced,"]
1550#[doc = "as indicated in the eye field of the FEVENT structure."]
1551#[doc = ""]
1552#[doc = "Start events contain only the start time, and optionally the start eye"]
1553#[doc = "or gaze position. End events contain the start and end time, plus summary"]
1554#[doc = "data on saccades and fixations. This includes start and end and average"]
1555#[doc = "measures of position and pupil size, plus peak and average velocity in"]
1556#[doc = "degrees per second."]
1557#[doc = ""]
1558#[repr(C)]
1559#[derive(Debug, Default, Copy, Clone)]
1560pub struct FEVENT {
1561 #[doc = "< effective time of event"]
1562 pub time: UINT32,
1563 #[doc = "< event type"]
1564 pub type_: INT16,
1565 #[doc = "< flags which items were included"]
1566 pub read: UINT16,
1567 #[doc = "< eye: 0=left,1=right"]
1568 pub eye: INT16,
1569 #[doc = "< start times"]
1570 pub sttime: UINT32,
1571 #[doc = "< end times"]
1572 pub entime: UINT32,
1573 #[doc = "< starting point x"]
1574 pub hstx: f32,
1575 #[doc = "< starting point y"]
1576 pub hsty: f32,
1577 #[doc = "< starting point x"]
1578 pub gstx: f32,
1579 #[doc = "< starting point y"]
1580 pub gsty: f32,
1581 #[doc = "< starting area"]
1582 pub sta: f32,
1583 #[doc = "< ending point x"]
1584 pub henx: f32,
1585 #[doc = "< ending point y"]
1586 pub heny: f32,
1587 #[doc = "< ending point x"]
1588 pub genx: f32,
1589 #[doc = "< ending point y"]
1590 pub geny: f32,
1591 #[doc = "< ending area"]
1592 pub ena: f32,
1593 #[doc = "< average x"]
1594 pub havx: f32,
1595 #[doc = "< average y"]
1596 pub havy: f32,
1597 #[doc = "< average x"]
1598 pub gavx: f32,
1599 #[doc = "< average y"]
1600 pub gavy: f32,
1601 #[doc = "< average area"]
1602 pub ava: f32,
1603 #[doc = "< avg velocity accum"]
1604 pub avel: f32,
1605 #[doc = "< peak velocity accum"]
1606 pub pvel: f32,
1607 #[doc = "< start velocity"]
1608 pub svel: f32,
1609 #[doc = "< end velocity"]
1610 pub evel: f32,
1611 #[doc = "< start units-per-degree x"]
1612 pub supd_x: f32,
1613 #[doc = "< end units-per-degree x"]
1614 pub eupd_x: f32,
1615 #[doc = "< start units-per-degree y"]
1616 pub supd_y: f32,
1617 #[doc = "< end units-per-degree y"]
1618 pub eupd_y: f32,
1619 #[doc = "< error, warning flags"]
1620 pub status: UINT16,
1621}
1622#[test]
1623fn bindgen_test_layout_FEVENT() {
1624 assert_eq!(
1625 ::std::mem::size_of::<FEVENT>(),
1626 116usize,
1627 concat!("Size of: ", stringify!(FEVENT))
1628 );
1629 assert_eq!(
1630 ::std::mem::align_of::<FEVENT>(),
1631 4usize,
1632 concat!("Alignment of ", stringify!(FEVENT))
1633 );
1634 assert_eq!(
1635 unsafe { &(*(::std::ptr::null::<FEVENT>())).time as *const _ as usize },
1636 0usize,
1637 concat!(
1638 "Offset of field: ",
1639 stringify!(FEVENT),
1640 "::",
1641 stringify!(time)
1642 )
1643 );
1644 assert_eq!(
1645 unsafe { &(*(::std::ptr::null::<FEVENT>())).type_ as *const _ as usize },
1646 4usize,
1647 concat!(
1648 "Offset of field: ",
1649 stringify!(FEVENT),
1650 "::",
1651 stringify!(type_)
1652 )
1653 );
1654 assert_eq!(
1655 unsafe { &(*(::std::ptr::null::<FEVENT>())).read as *const _ as usize },
1656 6usize,
1657 concat!(
1658 "Offset of field: ",
1659 stringify!(FEVENT),
1660 "::",
1661 stringify!(read)
1662 )
1663 );
1664 assert_eq!(
1665 unsafe { &(*(::std::ptr::null::<FEVENT>())).eye as *const _ as usize },
1666 8usize,
1667 concat!(
1668 "Offset of field: ",
1669 stringify!(FEVENT),
1670 "::",
1671 stringify!(eye)
1672 )
1673 );
1674 assert_eq!(
1675 unsafe { &(*(::std::ptr::null::<FEVENT>())).sttime as *const _ as usize },
1676 12usize,
1677 concat!(
1678 "Offset of field: ",
1679 stringify!(FEVENT),
1680 "::",
1681 stringify!(sttime)
1682 )
1683 );
1684 assert_eq!(
1685 unsafe { &(*(::std::ptr::null::<FEVENT>())).entime as *const _ as usize },
1686 16usize,
1687 concat!(
1688 "Offset of field: ",
1689 stringify!(FEVENT),
1690 "::",
1691 stringify!(entime)
1692 )
1693 );
1694 assert_eq!(
1695 unsafe { &(*(::std::ptr::null::<FEVENT>())).hstx as *const _ as usize },
1696 20usize,
1697 concat!(
1698 "Offset of field: ",
1699 stringify!(FEVENT),
1700 "::",
1701 stringify!(hstx)
1702 )
1703 );
1704 assert_eq!(
1705 unsafe { &(*(::std::ptr::null::<FEVENT>())).hsty as *const _ as usize },
1706 24usize,
1707 concat!(
1708 "Offset of field: ",
1709 stringify!(FEVENT),
1710 "::",
1711 stringify!(hsty)
1712 )
1713 );
1714 assert_eq!(
1715 unsafe { &(*(::std::ptr::null::<FEVENT>())).gstx as *const _ as usize },
1716 28usize,
1717 concat!(
1718 "Offset of field: ",
1719 stringify!(FEVENT),
1720 "::",
1721 stringify!(gstx)
1722 )
1723 );
1724 assert_eq!(
1725 unsafe { &(*(::std::ptr::null::<FEVENT>())).gsty as *const _ as usize },
1726 32usize,
1727 concat!(
1728 "Offset of field: ",
1729 stringify!(FEVENT),
1730 "::",
1731 stringify!(gsty)
1732 )
1733 );
1734 assert_eq!(
1735 unsafe { &(*(::std::ptr::null::<FEVENT>())).sta as *const _ as usize },
1736 36usize,
1737 concat!(
1738 "Offset of field: ",
1739 stringify!(FEVENT),
1740 "::",
1741 stringify!(sta)
1742 )
1743 );
1744 assert_eq!(
1745 unsafe { &(*(::std::ptr::null::<FEVENT>())).henx as *const _ as usize },
1746 40usize,
1747 concat!(
1748 "Offset of field: ",
1749 stringify!(FEVENT),
1750 "::",
1751 stringify!(henx)
1752 )
1753 );
1754 assert_eq!(
1755 unsafe { &(*(::std::ptr::null::<FEVENT>())).heny as *const _ as usize },
1756 44usize,
1757 concat!(
1758 "Offset of field: ",
1759 stringify!(FEVENT),
1760 "::",
1761 stringify!(heny)
1762 )
1763 );
1764 assert_eq!(
1765 unsafe { &(*(::std::ptr::null::<FEVENT>())).genx as *const _ as usize },
1766 48usize,
1767 concat!(
1768 "Offset of field: ",
1769 stringify!(FEVENT),
1770 "::",
1771 stringify!(genx)
1772 )
1773 );
1774 assert_eq!(
1775 unsafe { &(*(::std::ptr::null::<FEVENT>())).geny as *const _ as usize },
1776 52usize,
1777 concat!(
1778 "Offset of field: ",
1779 stringify!(FEVENT),
1780 "::",
1781 stringify!(geny)
1782 )
1783 );
1784 assert_eq!(
1785 unsafe { &(*(::std::ptr::null::<FEVENT>())).ena as *const _ as usize },
1786 56usize,
1787 concat!(
1788 "Offset of field: ",
1789 stringify!(FEVENT),
1790 "::",
1791 stringify!(ena)
1792 )
1793 );
1794 assert_eq!(
1795 unsafe { &(*(::std::ptr::null::<FEVENT>())).havx as *const _ as usize },
1796 60usize,
1797 concat!(
1798 "Offset of field: ",
1799 stringify!(FEVENT),
1800 "::",
1801 stringify!(havx)
1802 )
1803 );
1804 assert_eq!(
1805 unsafe { &(*(::std::ptr::null::<FEVENT>())).havy as *const _ as usize },
1806 64usize,
1807 concat!(
1808 "Offset of field: ",
1809 stringify!(FEVENT),
1810 "::",
1811 stringify!(havy)
1812 )
1813 );
1814 assert_eq!(
1815 unsafe { &(*(::std::ptr::null::<FEVENT>())).gavx as *const _ as usize },
1816 68usize,
1817 concat!(
1818 "Offset of field: ",
1819 stringify!(FEVENT),
1820 "::",
1821 stringify!(gavx)
1822 )
1823 );
1824 assert_eq!(
1825 unsafe { &(*(::std::ptr::null::<FEVENT>())).gavy as *const _ as usize },
1826 72usize,
1827 concat!(
1828 "Offset of field: ",
1829 stringify!(FEVENT),
1830 "::",
1831 stringify!(gavy)
1832 )
1833 );
1834 assert_eq!(
1835 unsafe { &(*(::std::ptr::null::<FEVENT>())).ava as *const _ as usize },
1836 76usize,
1837 concat!(
1838 "Offset of field: ",
1839 stringify!(FEVENT),
1840 "::",
1841 stringify!(ava)
1842 )
1843 );
1844 assert_eq!(
1845 unsafe { &(*(::std::ptr::null::<FEVENT>())).avel as *const _ as usize },
1846 80usize,
1847 concat!(
1848 "Offset of field: ",
1849 stringify!(FEVENT),
1850 "::",
1851 stringify!(avel)
1852 )
1853 );
1854 assert_eq!(
1855 unsafe { &(*(::std::ptr::null::<FEVENT>())).pvel as *const _ as usize },
1856 84usize,
1857 concat!(
1858 "Offset of field: ",
1859 stringify!(FEVENT),
1860 "::",
1861 stringify!(pvel)
1862 )
1863 );
1864 assert_eq!(
1865 unsafe { &(*(::std::ptr::null::<FEVENT>())).svel as *const _ as usize },
1866 88usize,
1867 concat!(
1868 "Offset of field: ",
1869 stringify!(FEVENT),
1870 "::",
1871 stringify!(svel)
1872 )
1873 );
1874 assert_eq!(
1875 unsafe { &(*(::std::ptr::null::<FEVENT>())).evel as *const _ as usize },
1876 92usize,
1877 concat!(
1878 "Offset of field: ",
1879 stringify!(FEVENT),
1880 "::",
1881 stringify!(evel)
1882 )
1883 );
1884 assert_eq!(
1885 unsafe { &(*(::std::ptr::null::<FEVENT>())).supd_x as *const _ as usize },
1886 96usize,
1887 concat!(
1888 "Offset of field: ",
1889 stringify!(FEVENT),
1890 "::",
1891 stringify!(supd_x)
1892 )
1893 );
1894 assert_eq!(
1895 unsafe { &(*(::std::ptr::null::<FEVENT>())).eupd_x as *const _ as usize },
1896 100usize,
1897 concat!(
1898 "Offset of field: ",
1899 stringify!(FEVENT),
1900 "::",
1901 stringify!(eupd_x)
1902 )
1903 );
1904 assert_eq!(
1905 unsafe { &(*(::std::ptr::null::<FEVENT>())).supd_y as *const _ as usize },
1906 104usize,
1907 concat!(
1908 "Offset of field: ",
1909 stringify!(FEVENT),
1910 "::",
1911 stringify!(supd_y)
1912 )
1913 );
1914 assert_eq!(
1915 unsafe { &(*(::std::ptr::null::<FEVENT>())).eupd_y as *const _ as usize },
1916 108usize,
1917 concat!(
1918 "Offset of field: ",
1919 stringify!(FEVENT),
1920 "::",
1921 stringify!(eupd_y)
1922 )
1923 );
1924 assert_eq!(
1925 unsafe { &(*(::std::ptr::null::<FEVENT>())).status as *const _ as usize },
1926 112usize,
1927 concat!(
1928 "Offset of field: ",
1929 stringify!(FEVENT),
1930 "::",
1931 stringify!(status)
1932 )
1933 );
1934}
1935#[doc = "@ingroup messaging"]
1936#[doc = "\\brief Floating-point eye event with floating point time"]
1937#[doc = ""]
1938#[doc = "The EyeLink tracker analyzes the eye-position samples during recording to"]
1939#[doc = "detect saccades, and accumulates data on saccades and fixations. Events"]
1940#[doc = "are produced to mark the start and end of saccades, fixations and blinks."]
1941#[doc = "When both eyes are being tracked, left and right eye events are produced,"]
1942#[doc = "as indicated in the eye field of the FEVENT structure."]
1943#[doc = ""]
1944#[doc = "Start events contain only the start time, and optionally the start eye"]
1945#[doc = "or gaze position. End events contain the start and end time, plus summary"]
1946#[doc = "data on saccades and fixations. This includes start and end and average"]
1947#[doc = "measures of position and pupil size, plus peak and average velocity in"]
1948#[doc = "degrees per second."]
1949#[doc = ""]
1950#[repr(C)]
1951#[derive(Debug, Default, Copy, Clone)]
1952pub struct DEVENT {
1953 #[doc = "< effective time of event"]
1954 pub time: f64,
1955 #[doc = "< event type"]
1956 pub type_: INT16,
1957 #[doc = "< flags which items were included"]
1958 pub read: UINT16,
1959 #[doc = "< eye: 0=left,1=right"]
1960 pub eye: INT16,
1961 #[doc = "< start times"]
1962 pub sttime: f64,
1963 #[doc = "< end times"]
1964 pub entime: f64,
1965 #[doc = "< starting point x"]
1966 pub hstx: f32,
1967 #[doc = "< starting point y"]
1968 pub hsty: f32,
1969 #[doc = "< starting point x"]
1970 pub gstx: f32,
1971 #[doc = "< starting point y"]
1972 pub gsty: f32,
1973 #[doc = "< starting area"]
1974 pub sta: f32,
1975 #[doc = "< ending point x"]
1976 pub henx: f32,
1977 #[doc = "< ending point y"]
1978 pub heny: f32,
1979 #[doc = "< ending point x"]
1980 pub genx: f32,
1981 #[doc = "< ending point y"]
1982 pub geny: f32,
1983 #[doc = "< ending area"]
1984 pub ena: f32,
1985 #[doc = "< average x"]
1986 pub havx: f32,
1987 #[doc = "< average y"]
1988 pub havy: f32,
1989 #[doc = "< average x"]
1990 pub gavx: f32,
1991 #[doc = "< average y"]
1992 pub gavy: f32,
1993 #[doc = "< average area"]
1994 pub ava: f32,
1995 #[doc = "< avg velocity accum"]
1996 pub avel: f32,
1997 #[doc = "< peak velocity accum"]
1998 pub pvel: f32,
1999 #[doc = "< start velocity"]
2000 pub svel: f32,
2001 #[doc = "< end velocity"]
2002 pub evel: f32,
2003 #[doc = "< start units-per-degree x"]
2004 pub supd_x: f32,
2005 #[doc = "< end units-per-degree x"]
2006 pub eupd_x: f32,
2007 #[doc = "< start units-per-degree y"]
2008 pub supd_y: f32,
2009 #[doc = "< end units-per-degree y"]
2010 pub eupd_y: f32,
2011 #[doc = "< error, warning flags"]
2012 pub status: UINT16,
2013}
2014#[test]
2015fn bindgen_test_layout_DEVENT() {
2016 assert_eq!(
2017 ::std::mem::size_of::<DEVENT>(),
2018 128usize,
2019 concat!("Size of: ", stringify!(DEVENT))
2020 );
2021 assert_eq!(
2022 ::std::mem::align_of::<DEVENT>(),
2023 8usize,
2024 concat!("Alignment of ", stringify!(DEVENT))
2025 );
2026 assert_eq!(
2027 unsafe { &(*(::std::ptr::null::<DEVENT>())).time as *const _ as usize },
2028 0usize,
2029 concat!(
2030 "Offset of field: ",
2031 stringify!(DEVENT),
2032 "::",
2033 stringify!(time)
2034 )
2035 );
2036 assert_eq!(
2037 unsafe { &(*(::std::ptr::null::<DEVENT>())).type_ as *const _ as usize },
2038 8usize,
2039 concat!(
2040 "Offset of field: ",
2041 stringify!(DEVENT),
2042 "::",
2043 stringify!(type_)
2044 )
2045 );
2046 assert_eq!(
2047 unsafe { &(*(::std::ptr::null::<DEVENT>())).read as *const _ as usize },
2048 10usize,
2049 concat!(
2050 "Offset of field: ",
2051 stringify!(DEVENT),
2052 "::",
2053 stringify!(read)
2054 )
2055 );
2056 assert_eq!(
2057 unsafe { &(*(::std::ptr::null::<DEVENT>())).eye as *const _ as usize },
2058 12usize,
2059 concat!(
2060 "Offset of field: ",
2061 stringify!(DEVENT),
2062 "::",
2063 stringify!(eye)
2064 )
2065 );
2066 assert_eq!(
2067 unsafe { &(*(::std::ptr::null::<DEVENT>())).sttime as *const _ as usize },
2068 16usize,
2069 concat!(
2070 "Offset of field: ",
2071 stringify!(DEVENT),
2072 "::",
2073 stringify!(sttime)
2074 )
2075 );
2076 assert_eq!(
2077 unsafe { &(*(::std::ptr::null::<DEVENT>())).entime as *const _ as usize },
2078 24usize,
2079 concat!(
2080 "Offset of field: ",
2081 stringify!(DEVENT),
2082 "::",
2083 stringify!(entime)
2084 )
2085 );
2086 assert_eq!(
2087 unsafe { &(*(::std::ptr::null::<DEVENT>())).hstx as *const _ as usize },
2088 32usize,
2089 concat!(
2090 "Offset of field: ",
2091 stringify!(DEVENT),
2092 "::",
2093 stringify!(hstx)
2094 )
2095 );
2096 assert_eq!(
2097 unsafe { &(*(::std::ptr::null::<DEVENT>())).hsty as *const _ as usize },
2098 36usize,
2099 concat!(
2100 "Offset of field: ",
2101 stringify!(DEVENT),
2102 "::",
2103 stringify!(hsty)
2104 )
2105 );
2106 assert_eq!(
2107 unsafe { &(*(::std::ptr::null::<DEVENT>())).gstx as *const _ as usize },
2108 40usize,
2109 concat!(
2110 "Offset of field: ",
2111 stringify!(DEVENT),
2112 "::",
2113 stringify!(gstx)
2114 )
2115 );
2116 assert_eq!(
2117 unsafe { &(*(::std::ptr::null::<DEVENT>())).gsty as *const _ as usize },
2118 44usize,
2119 concat!(
2120 "Offset of field: ",
2121 stringify!(DEVENT),
2122 "::",
2123 stringify!(gsty)
2124 )
2125 );
2126 assert_eq!(
2127 unsafe { &(*(::std::ptr::null::<DEVENT>())).sta as *const _ as usize },
2128 48usize,
2129 concat!(
2130 "Offset of field: ",
2131 stringify!(DEVENT),
2132 "::",
2133 stringify!(sta)
2134 )
2135 );
2136 assert_eq!(
2137 unsafe { &(*(::std::ptr::null::<DEVENT>())).henx as *const _ as usize },
2138 52usize,
2139 concat!(
2140 "Offset of field: ",
2141 stringify!(DEVENT),
2142 "::",
2143 stringify!(henx)
2144 )
2145 );
2146 assert_eq!(
2147 unsafe { &(*(::std::ptr::null::<DEVENT>())).heny as *const _ as usize },
2148 56usize,
2149 concat!(
2150 "Offset of field: ",
2151 stringify!(DEVENT),
2152 "::",
2153 stringify!(heny)
2154 )
2155 );
2156 assert_eq!(
2157 unsafe { &(*(::std::ptr::null::<DEVENT>())).genx as *const _ as usize },
2158 60usize,
2159 concat!(
2160 "Offset of field: ",
2161 stringify!(DEVENT),
2162 "::",
2163 stringify!(genx)
2164 )
2165 );
2166 assert_eq!(
2167 unsafe { &(*(::std::ptr::null::<DEVENT>())).geny as *const _ as usize },
2168 64usize,
2169 concat!(
2170 "Offset of field: ",
2171 stringify!(DEVENT),
2172 "::",
2173 stringify!(geny)
2174 )
2175 );
2176 assert_eq!(
2177 unsafe { &(*(::std::ptr::null::<DEVENT>())).ena as *const _ as usize },
2178 68usize,
2179 concat!(
2180 "Offset of field: ",
2181 stringify!(DEVENT),
2182 "::",
2183 stringify!(ena)
2184 )
2185 );
2186 assert_eq!(
2187 unsafe { &(*(::std::ptr::null::<DEVENT>())).havx as *const _ as usize },
2188 72usize,
2189 concat!(
2190 "Offset of field: ",
2191 stringify!(DEVENT),
2192 "::",
2193 stringify!(havx)
2194 )
2195 );
2196 assert_eq!(
2197 unsafe { &(*(::std::ptr::null::<DEVENT>())).havy as *const _ as usize },
2198 76usize,
2199 concat!(
2200 "Offset of field: ",
2201 stringify!(DEVENT),
2202 "::",
2203 stringify!(havy)
2204 )
2205 );
2206 assert_eq!(
2207 unsafe { &(*(::std::ptr::null::<DEVENT>())).gavx as *const _ as usize },
2208 80usize,
2209 concat!(
2210 "Offset of field: ",
2211 stringify!(DEVENT),
2212 "::",
2213 stringify!(gavx)
2214 )
2215 );
2216 assert_eq!(
2217 unsafe { &(*(::std::ptr::null::<DEVENT>())).gavy as *const _ as usize },
2218 84usize,
2219 concat!(
2220 "Offset of field: ",
2221 stringify!(DEVENT),
2222 "::",
2223 stringify!(gavy)
2224 )
2225 );
2226 assert_eq!(
2227 unsafe { &(*(::std::ptr::null::<DEVENT>())).ava as *const _ as usize },
2228 88usize,
2229 concat!(
2230 "Offset of field: ",
2231 stringify!(DEVENT),
2232 "::",
2233 stringify!(ava)
2234 )
2235 );
2236 assert_eq!(
2237 unsafe { &(*(::std::ptr::null::<DEVENT>())).avel as *const _ as usize },
2238 92usize,
2239 concat!(
2240 "Offset of field: ",
2241 stringify!(DEVENT),
2242 "::",
2243 stringify!(avel)
2244 )
2245 );
2246 assert_eq!(
2247 unsafe { &(*(::std::ptr::null::<DEVENT>())).pvel as *const _ as usize },
2248 96usize,
2249 concat!(
2250 "Offset of field: ",
2251 stringify!(DEVENT),
2252 "::",
2253 stringify!(pvel)
2254 )
2255 );
2256 assert_eq!(
2257 unsafe { &(*(::std::ptr::null::<DEVENT>())).svel as *const _ as usize },
2258 100usize,
2259 concat!(
2260 "Offset of field: ",
2261 stringify!(DEVENT),
2262 "::",
2263 stringify!(svel)
2264 )
2265 );
2266 assert_eq!(
2267 unsafe { &(*(::std::ptr::null::<DEVENT>())).evel as *const _ as usize },
2268 104usize,
2269 concat!(
2270 "Offset of field: ",
2271 stringify!(DEVENT),
2272 "::",
2273 stringify!(evel)
2274 )
2275 );
2276 assert_eq!(
2277 unsafe { &(*(::std::ptr::null::<DEVENT>())).supd_x as *const _ as usize },
2278 108usize,
2279 concat!(
2280 "Offset of field: ",
2281 stringify!(DEVENT),
2282 "::",
2283 stringify!(supd_x)
2284 )
2285 );
2286 assert_eq!(
2287 unsafe { &(*(::std::ptr::null::<DEVENT>())).eupd_x as *const _ as usize },
2288 112usize,
2289 concat!(
2290 "Offset of field: ",
2291 stringify!(DEVENT),
2292 "::",
2293 stringify!(eupd_x)
2294 )
2295 );
2296 assert_eq!(
2297 unsafe { &(*(::std::ptr::null::<DEVENT>())).supd_y as *const _ as usize },
2298 116usize,
2299 concat!(
2300 "Offset of field: ",
2301 stringify!(DEVENT),
2302 "::",
2303 stringify!(supd_y)
2304 )
2305 );
2306 assert_eq!(
2307 unsafe { &(*(::std::ptr::null::<DEVENT>())).eupd_y as *const _ as usize },
2308 120usize,
2309 concat!(
2310 "Offset of field: ",
2311 stringify!(DEVENT),
2312 "::",
2313 stringify!(eupd_y)
2314 )
2315 );
2316 assert_eq!(
2317 unsafe { &(*(::std::ptr::null::<DEVENT>())).status as *const _ as usize },
2318 124usize,
2319 concat!(
2320 "Offset of field: ",
2321 stringify!(DEVENT),
2322 "::",
2323 stringify!(status)
2324 )
2325 );
2326}
2327#[doc = "@ingroup messaging"]
2328#[doc = "\\brief Message events: usually text but may contain binary data"]
2329#[doc = ""]
2330#[doc = "A message event is created by your experiment program, and placed in the EDF file."]
2331#[doc = "It is possible to enable the sending of these messages back through the link,"]
2332#[doc = "although there is rarely a reason to do this. Although this method might be"]
2333#[doc = "used to determine the tracker time (the time field of a message event will indicate"]
2334#[doc = "when the message was received by the tracker), the use of eyelink_request_time()"]
2335#[doc = "and eyelink_read_time() is more efficient for retrieving the current time from the"]
2336#[doc = "eye tracker's timestamp clock. The eye tracker time is rarely needed in any case,"]
2337#[doc = "and would only be useful to compute link transport delays."]
2338#[repr(C)]
2339#[derive(Copy, Clone)]
2340pub struct IMESSAGE {
2341 #[doc = "< time message logged"]
2342 pub time: UINT32,
2343 #[doc = "< event type: usually MESSAGEEVENT"]
2344 pub type_: INT16,
2345 #[doc = "< length of message"]
2346 pub length: UINT16,
2347 #[doc = "< message contents (max length 255)"]
2348 pub text: [byte; 260usize],
2349}
2350#[test]
2351fn bindgen_test_layout_IMESSAGE() {
2352 assert_eq!(
2353 ::std::mem::size_of::<IMESSAGE>(),
2354 268usize,
2355 concat!("Size of: ", stringify!(IMESSAGE))
2356 );
2357 assert_eq!(
2358 ::std::mem::align_of::<IMESSAGE>(),
2359 4usize,
2360 concat!("Alignment of ", stringify!(IMESSAGE))
2361 );
2362 assert_eq!(
2363 unsafe { &(*(::std::ptr::null::<IMESSAGE>())).time as *const _ as usize },
2364 0usize,
2365 concat!(
2366 "Offset of field: ",
2367 stringify!(IMESSAGE),
2368 "::",
2369 stringify!(time)
2370 )
2371 );
2372 assert_eq!(
2373 unsafe { &(*(::std::ptr::null::<IMESSAGE>())).type_ as *const _ as usize },
2374 4usize,
2375 concat!(
2376 "Offset of field: ",
2377 stringify!(IMESSAGE),
2378 "::",
2379 stringify!(type_)
2380 )
2381 );
2382 assert_eq!(
2383 unsafe { &(*(::std::ptr::null::<IMESSAGE>())).length as *const _ as usize },
2384 6usize,
2385 concat!(
2386 "Offset of field: ",
2387 stringify!(IMESSAGE),
2388 "::",
2389 stringify!(length)
2390 )
2391 );
2392 assert_eq!(
2393 unsafe { &(*(::std::ptr::null::<IMESSAGE>())).text as *const _ as usize },
2394 8usize,
2395 concat!(
2396 "Offset of field: ",
2397 stringify!(IMESSAGE),
2398 "::",
2399 stringify!(text)
2400 )
2401 );
2402}
2403impl Default for IMESSAGE {
2404 fn default() -> Self {
2405 unsafe { ::std::mem::zeroed() }
2406 }
2407}
2408#[doc = "@ingroup messaging"]
2409#[doc = "\\brief Message events: usually text but may contain binary data with floating point time."]
2410#[doc = ""]
2411#[doc = "A message event is created by your experiment program, and placed in the EDF file."]
2412#[doc = "It is possible to enable the sending of these messages back through the link,"]
2413#[doc = "although there is rarely a reason to do this. Although this method might be"]
2414#[doc = "used to determine the tracker time (the time field of a message event will indicate"]
2415#[doc = "when the message was received by the tracker), the use of eyelink_request_time()"]
2416#[doc = "and eyelink_read_time() is more efficient for retrieving the current time from the"]
2417#[doc = "eye tracker's timestamp clock. The eye tracker time is rarely needed in any case,"]
2418#[doc = "and would only be useful to compute link transport delays."]
2419#[repr(C)]
2420#[derive(Copy, Clone)]
2421pub struct DMESSAGE {
2422 #[doc = "< time message logged"]
2423 pub time: f64,
2424 #[doc = "< event type: usually MESSAGEEVENT"]
2425 pub type_: INT16,
2426 #[doc = "< length of message"]
2427 pub length: UINT16,
2428 #[doc = "< message contents (max length 255)"]
2429 pub text: [byte; 260usize],
2430}
2431#[test]
2432fn bindgen_test_layout_DMESSAGE() {
2433 assert_eq!(
2434 ::std::mem::size_of::<DMESSAGE>(),
2435 272usize,
2436 concat!("Size of: ", stringify!(DMESSAGE))
2437 );
2438 assert_eq!(
2439 ::std::mem::align_of::<DMESSAGE>(),
2440 8usize,
2441 concat!("Alignment of ", stringify!(DMESSAGE))
2442 );
2443 assert_eq!(
2444 unsafe { &(*(::std::ptr::null::<DMESSAGE>())).time as *const _ as usize },
2445 0usize,
2446 concat!(
2447 "Offset of field: ",
2448 stringify!(DMESSAGE),
2449 "::",
2450 stringify!(time)
2451 )
2452 );
2453 assert_eq!(
2454 unsafe { &(*(::std::ptr::null::<DMESSAGE>())).type_ as *const _ as usize },
2455 8usize,
2456 concat!(
2457 "Offset of field: ",
2458 stringify!(DMESSAGE),
2459 "::",
2460 stringify!(type_)
2461 )
2462 );
2463 assert_eq!(
2464 unsafe { &(*(::std::ptr::null::<DMESSAGE>())).length as *const _ as usize },
2465 10usize,
2466 concat!(
2467 "Offset of field: ",
2468 stringify!(DMESSAGE),
2469 "::",
2470 stringify!(length)
2471 )
2472 );
2473 assert_eq!(
2474 unsafe { &(*(::std::ptr::null::<DMESSAGE>())).text as *const _ as usize },
2475 12usize,
2476 concat!(
2477 "Offset of field: ",
2478 stringify!(DMESSAGE),
2479 "::",
2480 stringify!(text)
2481 )
2482 );
2483}
2484impl Default for DMESSAGE {
2485 fn default() -> Self {
2486 unsafe { ::std::mem::zeroed() }
2487 }
2488}
2489#[doc = " @ingroup messaging"]
2490#[doc = "\\brief Button, input, other simple events"]
2491#[doc = ""]
2492#[doc = "BUTTONEVENT and INPUTEVENT types are the simplest events, reporting"]
2493#[doc = "changes in button status or in the input port data. The time field"]
2494#[doc = "records the timestamp of the eye-data sample where the change occurred,"]
2495#[doc = "although the event itself is usually sent before that sample. The data"]
2496#[doc = "field contains the data after the change, in the same format as in the"]
2497#[doc = "FSAMPLE structure."]
2498#[doc = ""]
2499#[doc = "Button events from the link are rarely used; monitoring buttons with one"]
2500#[doc = "of eyelink_read_keybutton(), eyelink_last_button_press(), or"]
2501#[doc = "eyelink_button_states() is preferable, since these can report button"]
2502#[doc = "states at any time, not just during recording."]
2503#[repr(C)]
2504#[derive(Debug, Default, Copy, Clone)]
2505pub struct IOEVENT {
2506 #[doc = "< time logged"]
2507 pub time: UINT32,
2508 #[doc = "< event type:"]
2509 pub type_: INT16,
2510 #[doc = "< coded event data"]
2511 pub data: UINT16,
2512}
2513#[test]
2514fn bindgen_test_layout_IOEVENT() {
2515 assert_eq!(
2516 ::std::mem::size_of::<IOEVENT>(),
2517 8usize,
2518 concat!("Size of: ", stringify!(IOEVENT))
2519 );
2520 assert_eq!(
2521 ::std::mem::align_of::<IOEVENT>(),
2522 4usize,
2523 concat!("Alignment of ", stringify!(IOEVENT))
2524 );
2525 assert_eq!(
2526 unsafe { &(*(::std::ptr::null::<IOEVENT>())).time as *const _ as usize },
2527 0usize,
2528 concat!(
2529 "Offset of field: ",
2530 stringify!(IOEVENT),
2531 "::",
2532 stringify!(time)
2533 )
2534 );
2535 assert_eq!(
2536 unsafe { &(*(::std::ptr::null::<IOEVENT>())).type_ as *const _ as usize },
2537 4usize,
2538 concat!(
2539 "Offset of field: ",
2540 stringify!(IOEVENT),
2541 "::",
2542 stringify!(type_)
2543 )
2544 );
2545 assert_eq!(
2546 unsafe { &(*(::std::ptr::null::<IOEVENT>())).data as *const _ as usize },
2547 6usize,
2548 concat!(
2549 "Offset of field: ",
2550 stringify!(IOEVENT),
2551 "::",
2552 stringify!(data)
2553 )
2554 );
2555}
2556#[doc = " @ingroup messaging"]
2557#[doc = "\\brief Button, input, other simple events with floating point time."]
2558#[doc = ""]
2559#[doc = "BUTTONEVENT and INPUTEVENT types are the simplest events, reporting"]
2560#[doc = "changes in button status or in the input port data. The time field"]
2561#[doc = "records the timestamp of the eye-data sample where the change occurred,"]
2562#[doc = "although the event itself is usually sent before that sample. The data"]
2563#[doc = "field contains the data after the change, in the same format as in the"]
2564#[doc = "FSAMPLE structure."]
2565#[doc = ""]
2566#[doc = "Button events from the link are rarely used; monitoring buttons with one"]
2567#[doc = "of eyelink_read_keybutton(), eyelink_last_button_press(), or"]
2568#[doc = "eyelink_button_states() is preferable, since these can report button"]
2569#[doc = "states at any time, not just during recording."]
2570#[repr(C)]
2571#[derive(Debug, Default, Copy, Clone)]
2572pub struct DIOEVENT {
2573 #[doc = "< time logged"]
2574 pub time: f64,
2575 #[doc = "< event type:"]
2576 pub type_: INT16,
2577 #[doc = "< coded event data"]
2578 pub data: UINT16,
2579}
2580#[test]
2581fn bindgen_test_layout_DIOEVENT() {
2582 assert_eq!(
2583 ::std::mem::size_of::<DIOEVENT>(),
2584 16usize,
2585 concat!("Size of: ", stringify!(DIOEVENT))
2586 );
2587 assert_eq!(
2588 ::std::mem::align_of::<DIOEVENT>(),
2589 8usize,
2590 concat!("Alignment of ", stringify!(DIOEVENT))
2591 );
2592 assert_eq!(
2593 unsafe { &(*(::std::ptr::null::<DIOEVENT>())).time as *const _ as usize },
2594 0usize,
2595 concat!(
2596 "Offset of field: ",
2597 stringify!(DIOEVENT),
2598 "::",
2599 stringify!(time)
2600 )
2601 );
2602 assert_eq!(
2603 unsafe { &(*(::std::ptr::null::<DIOEVENT>())).type_ as *const _ as usize },
2604 8usize,
2605 concat!(
2606 "Offset of field: ",
2607 stringify!(DIOEVENT),
2608 "::",
2609 stringify!(type_)
2610 )
2611 );
2612 assert_eq!(
2613 unsafe { &(*(::std::ptr::null::<DIOEVENT>())).data as *const _ as usize },
2614 10usize,
2615 concat!(
2616 "Offset of field: ",
2617 stringify!(DIOEVENT),
2618 "::",
2619 stringify!(data)
2620 )
2621 );
2622}
2623#[repr(C)]
2624#[derive(Copy, Clone)]
2625pub union ALL_DATA {
2626 pub ie: IEVENT,
2627 pub im: IMESSAGE,
2628 pub io: IOEVENT,
2629 pub is: ISAMPLE,
2630 _bindgen_union_align: [u32; 67usize],
2631}
2632#[test]
2633fn bindgen_test_layout_ALL_DATA() {
2634 assert_eq!(
2635 ::std::mem::size_of::<ALL_DATA>(),
2636 268usize,
2637 concat!("Size of: ", stringify!(ALL_DATA))
2638 );
2639 assert_eq!(
2640 ::std::mem::align_of::<ALL_DATA>(),
2641 4usize,
2642 concat!("Alignment of ", stringify!(ALL_DATA))
2643 );
2644 assert_eq!(
2645 unsafe { &(*(::std::ptr::null::<ALL_DATA>())).ie as *const _ as usize },
2646 0usize,
2647 concat!(
2648 "Offset of field: ",
2649 stringify!(ALL_DATA),
2650 "::",
2651 stringify!(ie)
2652 )
2653 );
2654 assert_eq!(
2655 unsafe { &(*(::std::ptr::null::<ALL_DATA>())).im as *const _ as usize },
2656 0usize,
2657 concat!(
2658 "Offset of field: ",
2659 stringify!(ALL_DATA),
2660 "::",
2661 stringify!(im)
2662 )
2663 );
2664 assert_eq!(
2665 unsafe { &(*(::std::ptr::null::<ALL_DATA>())).io as *const _ as usize },
2666 0usize,
2667 concat!(
2668 "Offset of field: ",
2669 stringify!(ALL_DATA),
2670 "::",
2671 stringify!(io)
2672 )
2673 );
2674 assert_eq!(
2675 unsafe { &(*(::std::ptr::null::<ALL_DATA>())).is as *const _ as usize },
2676 0usize,
2677 concat!(
2678 "Offset of field: ",
2679 stringify!(ALL_DATA),
2680 "::",
2681 stringify!(is)
2682 )
2683 );
2684}
2685impl Default for ALL_DATA {
2686 fn default() -> Self {
2687 unsafe { ::std::mem::zeroed() }
2688 }
2689}
2690#[doc = " @ingroup messaging"]
2691#[doc = "\\brief Union of message, io event and float sample and float event."]
2692#[repr(C)]
2693#[derive(Copy, Clone)]
2694pub union ALLF_DATA {
2695 pub fe: FEVENT,
2696 pub im: IMESSAGE,
2697 pub io: IOEVENT,
2698 pub fs: FSAMPLE,
2699 _bindgen_union_align: [u32; 67usize],
2700}
2701#[test]
2702fn bindgen_test_layout_ALLF_DATA() {
2703 assert_eq!(
2704 ::std::mem::size_of::<ALLF_DATA>(),
2705 268usize,
2706 concat!("Size of: ", stringify!(ALLF_DATA))
2707 );
2708 assert_eq!(
2709 ::std::mem::align_of::<ALLF_DATA>(),
2710 4usize,
2711 concat!("Alignment of ", stringify!(ALLF_DATA))
2712 );
2713 assert_eq!(
2714 unsafe { &(*(::std::ptr::null::<ALLF_DATA>())).fe as *const _ as usize },
2715 0usize,
2716 concat!(
2717 "Offset of field: ",
2718 stringify!(ALLF_DATA),
2719 "::",
2720 stringify!(fe)
2721 )
2722 );
2723 assert_eq!(
2724 unsafe { &(*(::std::ptr::null::<ALLF_DATA>())).im as *const _ as usize },
2725 0usize,
2726 concat!(
2727 "Offset of field: ",
2728 stringify!(ALLF_DATA),
2729 "::",
2730 stringify!(im)
2731 )
2732 );
2733 assert_eq!(
2734 unsafe { &(*(::std::ptr::null::<ALLF_DATA>())).io as *const _ as usize },
2735 0usize,
2736 concat!(
2737 "Offset of field: ",
2738 stringify!(ALLF_DATA),
2739 "::",
2740 stringify!(io)
2741 )
2742 );
2743 assert_eq!(
2744 unsafe { &(*(::std::ptr::null::<ALLF_DATA>())).fs as *const _ as usize },
2745 0usize,
2746 concat!(
2747 "Offset of field: ",
2748 stringify!(ALLF_DATA),
2749 "::",
2750 stringify!(fs)
2751 )
2752 );
2753}
2754impl Default for ALLF_DATA {
2755 fn default() -> Self {
2756 unsafe { ::std::mem::zeroed() }
2757 }
2758}
2759#[doc = " @ingroup messaging"]
2760#[doc = "\\brief Union of message, io event and double sample and double event."]
2761#[repr(C)]
2762#[derive(Copy, Clone)]
2763pub union ALLD_DATA {
2764 pub fe: DEVENT,
2765 pub im: DMESSAGE,
2766 pub io: DIOEVENT,
2767 pub fs: DSAMPLE,
2768 _bindgen_union_align: [u64; 34usize],
2769}
2770#[test]
2771fn bindgen_test_layout_ALLD_DATA() {
2772 assert_eq!(
2773 ::std::mem::size_of::<ALLD_DATA>(),
2774 272usize,
2775 concat!("Size of: ", stringify!(ALLD_DATA))
2776 );
2777 assert_eq!(
2778 ::std::mem::align_of::<ALLD_DATA>(),
2779 8usize,
2780 concat!("Alignment of ", stringify!(ALLD_DATA))
2781 );
2782 assert_eq!(
2783 unsafe { &(*(::std::ptr::null::<ALLD_DATA>())).fe as *const _ as usize },
2784 0usize,
2785 concat!(
2786 "Offset of field: ",
2787 stringify!(ALLD_DATA),
2788 "::",
2789 stringify!(fe)
2790 )
2791 );
2792 assert_eq!(
2793 unsafe { &(*(::std::ptr::null::<ALLD_DATA>())).im as *const _ as usize },
2794 0usize,
2795 concat!(
2796 "Offset of field: ",
2797 stringify!(ALLD_DATA),
2798 "::",
2799 stringify!(im)
2800 )
2801 );
2802 assert_eq!(
2803 unsafe { &(*(::std::ptr::null::<ALLD_DATA>())).io as *const _ as usize },
2804 0usize,
2805 concat!(
2806 "Offset of field: ",
2807 stringify!(ALLD_DATA),
2808 "::",
2809 stringify!(io)
2810 )
2811 );
2812 assert_eq!(
2813 unsafe { &(*(::std::ptr::null::<ALLD_DATA>())).fs as *const _ as usize },
2814 0usize,
2815 concat!(
2816 "Offset of field: ",
2817 stringify!(ALLD_DATA),
2818 "::",
2819 stringify!(fs)
2820 )
2821 );
2822}
2823impl Default for ALLD_DATA {
2824 fn default() -> Self {
2825 unsafe { ::std::mem::zeroed() }
2826 }
2827}
2828pub type ELINKADDR = [byte; 16usize];
2829#[doc = " \\brief Name and address for connection."]
2830#[doc = ""]
2831#[doc = "Name and address for connection or ping"]
2832#[repr(C)]
2833#[derive(Copy, Clone)]
2834pub struct ELINKNODE {
2835 #[doc = "< address of the remote or local tracker"]
2836 pub addr: ELINKADDR,
2837 #[doc = "< name of the remote or local tracker"]
2838 pub name: [::std::os::raw::c_char; 40usize],
2839}
2840#[test]
2841fn bindgen_test_layout_ELINKNODE() {
2842 assert_eq!(
2843 ::std::mem::size_of::<ELINKNODE>(),
2844 56usize,
2845 concat!("Size of: ", stringify!(ELINKNODE))
2846 );
2847 assert_eq!(
2848 ::std::mem::align_of::<ELINKNODE>(),
2849 1usize,
2850 concat!("Alignment of ", stringify!(ELINKNODE))
2851 );
2852 assert_eq!(
2853 unsafe { &(*(::std::ptr::null::<ELINKNODE>())).addr as *const _ as usize },
2854 0usize,
2855 concat!(
2856 "Offset of field: ",
2857 stringify!(ELINKNODE),
2858 "::",
2859 stringify!(addr)
2860 )
2861 );
2862 assert_eq!(
2863 unsafe { &(*(::std::ptr::null::<ELINKNODE>())).name as *const _ as usize },
2864 16usize,
2865 concat!(
2866 "Offset of field: ",
2867 stringify!(ELINKNODE),
2868 "::",
2869 stringify!(name)
2870 )
2871 );
2872}
2873impl Default for ELINKNODE {
2874 fn default() -> Self {
2875 unsafe { ::std::mem::zeroed() }
2876 }
2877}
2878#[doc = " \\brief Class to represent tracker status."]
2879#[doc = ""]
2880#[doc = "Class to represent tracker status information such as time stamps, flags, tracker addresses and so on."]
2881#[repr(C)]
2882#[derive(Copy, Clone)]
2883pub struct ILINKDATA {
2884 #[doc = "< time of last control event"]
2885 pub time: UINT32,
2886 #[doc = "< structure version"]
2887 pub version: UINT32,
2888 #[doc = "< 10*sample rate (0 if no samples, 1 if nonconstant)"]
2889 pub samrate: UINT16,
2890 #[doc = "< sample \"divisor\" (min msec between samples)"]
2891 pub samdiv: UINT16,
2892 #[doc = "< amount to divide gaze x,y,res by"]
2893 pub prescaler: UINT16,
2894 #[doc = "< amount to divide velocity by"]
2895 pub vprescaler: UINT16,
2896 #[doc = "< pupil prescale (1 if area, greater if diameter)"]
2897 pub pprescaler: UINT16,
2898 #[doc = "< head-distance prescale (to mm)"]
2899 pub hprescaler: UINT16,
2900 #[doc = "< 0 if off, else all flags"]
2901 pub sample_data: UINT16,
2902 #[doc = "< 0 if off, else all flags"]
2903 pub event_data: UINT16,
2904 #[doc = "< 0 if off, else event-type flags"]
2905 pub event_types: UINT16,
2906 #[doc = "< set if in block with samples"]
2907 pub in_sample_block: byte,
2908 #[doc = "< set if in block with events"]
2909 pub in_event_block: byte,
2910 #[doc = "< set if any left-eye data expected"]
2911 pub have_left_eye: byte,
2912 #[doc = "< set if any right-eye data expected"]
2913 pub have_right_eye: byte,
2914 #[doc = "< flags what we lost before last item"]
2915 pub last_data_gap_types: UINT16,
2916 #[doc = "< buffer-type code"]
2917 pub last_data_buffer_type: UINT16,
2918 #[doc = "< buffer size of last item"]
2919 pub last_data_buffer_size: UINT16,
2920 #[doc = "< set if control event read with last data"]
2921 pub control_read: UINT16,
2922 #[doc = "< set if control event started new block"]
2923 pub first_in_block: UINT16,
2924 #[doc = "< time field of item"]
2925 pub last_data_item_time: UINT32,
2926 #[doc = "< type: 100=sample, 0=none, else event type"]
2927 pub last_data_item_type: UINT16,
2928 #[doc = "< content: <read> (IEVENT), <flags> (ISAMPLE)"]
2929 pub last_data_item_contents: UINT16,
2930 #[doc = "< buffer containing last item"]
2931 pub last_data_item: ALL_DATA,
2932 #[doc = "< block in file"]
2933 pub block_number: UINT32,
2934 #[doc = "< samples read in block so far"]
2935 pub block_sample: UINT32,
2936 #[doc = "< events (excl. control read in block"]
2937 pub block_event: UINT32,
2938 #[doc = "< updated by samples only"]
2939 pub last_resx: UINT16,
2940 #[doc = "< updated by samples only"]
2941 pub last_resy: UINT16,
2942 #[doc = "< updated by samples only"]
2943 pub last_pupil: [UINT16; 2usize],
2944 #[doc = "< updated by samples, events"]
2945 pub last_status: UINT16,
2946 #[doc = "< number of items in queue"]
2947 pub queued_samples: UINT16,
2948 #[doc = "< includes control events"]
2949 pub queued_events: UINT16,
2950 #[doc = "< total queue buffer size"]
2951 pub queue_size: UINT16,
2952 #[doc = "< unused bytes in queue"]
2953 pub queue_free: UINT16,
2954 #[doc = "< time tracker last sent packet"]
2955 pub last_rcve_time: UINT32,
2956 #[doc = "< data type rcve enable (switch)"]
2957 pub samples_on: byte,
2958 pub events_on: byte,
2959 #[doc = "< status flags from data packet"]
2960 pub packet_flags: UINT16,
2961 #[doc = "< status flags from link packet header"]
2962 pub link_flags: UINT16,
2963 #[doc = "< tracker error state flags"]
2964 pub state_flags: UINT16,
2965 #[doc = "< tracker data output state"]
2966 pub link_dstatus: byte,
2967 #[doc = "< tracker commands pending"]
2968 pub link_pendcmd: byte,
2969 #[doc = "< 0 for EyeLink I or original EyeLink API DLL."]
2970 #[doc = "EYELINK II ONLY: MSB set if read"]
2971 #[doc = "crmode<<8 + file_filter<<4 + link_filter"]
2972 #[doc = "crmode = 0 if pupil, else pupil-CR"]
2973 #[doc = "file_filter, link_filter: 0, 1, or 2"]
2974 #[doc = "for level of heuristic filter applied"]
2975 pub reserved: UINT16,
2976 #[doc = "< a name for our machine"]
2977 pub our_name: [::std::os::raw::c_char; 40usize],
2978 pub our_address: ELINKADDR,
2979 #[doc = "< name of tracker connected to"]
2980 pub eye_name: [::std::os::raw::c_char; 40usize],
2981 pub eye_address: ELINKADDR,
2982 #[doc = "< Broadcast address for eye trackers"]
2983 pub ebroadcast_address: ELINKADDR,
2984 #[doc = "< Broadcast address for remotes"]
2985 pub rbroadcast_address: ELINKADDR,
2986 #[doc = "< 1 if polling remotes, else polling trackers"]
2987 pub polling_remotes: UINT16,
2988 #[doc = "< total nodes responding to polling"]
2989 pub poll_responses: UINT16,
2990 #[doc = "< data on nodes"]
2991 pub nodes: [ELINKNODE; 4usize],
2992}
2993#[test]
2994fn bindgen_test_layout_ILINKDATA() {
2995 assert_eq!(
2996 ::std::mem::size_of::<ILINKDATA>(),
2997 736usize,
2998 concat!("Size of: ", stringify!(ILINKDATA))
2999 );
3000 assert_eq!(
3001 ::std::mem::align_of::<ILINKDATA>(),
3002 4usize,
3003 concat!("Alignment of ", stringify!(ILINKDATA))
3004 );
3005 assert_eq!(
3006 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).time as *const _ as usize },
3007 0usize,
3008 concat!(
3009 "Offset of field: ",
3010 stringify!(ILINKDATA),
3011 "::",
3012 stringify!(time)
3013 )
3014 );
3015 assert_eq!(
3016 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).version as *const _ as usize },
3017 4usize,
3018 concat!(
3019 "Offset of field: ",
3020 stringify!(ILINKDATA),
3021 "::",
3022 stringify!(version)
3023 )
3024 );
3025 assert_eq!(
3026 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).samrate as *const _ as usize },
3027 8usize,
3028 concat!(
3029 "Offset of field: ",
3030 stringify!(ILINKDATA),
3031 "::",
3032 stringify!(samrate)
3033 )
3034 );
3035 assert_eq!(
3036 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).samdiv as *const _ as usize },
3037 10usize,
3038 concat!(
3039 "Offset of field: ",
3040 stringify!(ILINKDATA),
3041 "::",
3042 stringify!(samdiv)
3043 )
3044 );
3045 assert_eq!(
3046 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).prescaler as *const _ as usize },
3047 12usize,
3048 concat!(
3049 "Offset of field: ",
3050 stringify!(ILINKDATA),
3051 "::",
3052 stringify!(prescaler)
3053 )
3054 );
3055 assert_eq!(
3056 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).vprescaler as *const _ as usize },
3057 14usize,
3058 concat!(
3059 "Offset of field: ",
3060 stringify!(ILINKDATA),
3061 "::",
3062 stringify!(vprescaler)
3063 )
3064 );
3065 assert_eq!(
3066 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).pprescaler as *const _ as usize },
3067 16usize,
3068 concat!(
3069 "Offset of field: ",
3070 stringify!(ILINKDATA),
3071 "::",
3072 stringify!(pprescaler)
3073 )
3074 );
3075 assert_eq!(
3076 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).hprescaler as *const _ as usize },
3077 18usize,
3078 concat!(
3079 "Offset of field: ",
3080 stringify!(ILINKDATA),
3081 "::",
3082 stringify!(hprescaler)
3083 )
3084 );
3085 assert_eq!(
3086 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).sample_data as *const _ as usize },
3087 20usize,
3088 concat!(
3089 "Offset of field: ",
3090 stringify!(ILINKDATA),
3091 "::",
3092 stringify!(sample_data)
3093 )
3094 );
3095 assert_eq!(
3096 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).event_data as *const _ as usize },
3097 22usize,
3098 concat!(
3099 "Offset of field: ",
3100 stringify!(ILINKDATA),
3101 "::",
3102 stringify!(event_data)
3103 )
3104 );
3105 assert_eq!(
3106 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).event_types as *const _ as usize },
3107 24usize,
3108 concat!(
3109 "Offset of field: ",
3110 stringify!(ILINKDATA),
3111 "::",
3112 stringify!(event_types)
3113 )
3114 );
3115 assert_eq!(
3116 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).in_sample_block as *const _ as usize },
3117 26usize,
3118 concat!(
3119 "Offset of field: ",
3120 stringify!(ILINKDATA),
3121 "::",
3122 stringify!(in_sample_block)
3123 )
3124 );
3125 assert_eq!(
3126 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).in_event_block as *const _ as usize },
3127 27usize,
3128 concat!(
3129 "Offset of field: ",
3130 stringify!(ILINKDATA),
3131 "::",
3132 stringify!(in_event_block)
3133 )
3134 );
3135 assert_eq!(
3136 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).have_left_eye as *const _ as usize },
3137 28usize,
3138 concat!(
3139 "Offset of field: ",
3140 stringify!(ILINKDATA),
3141 "::",
3142 stringify!(have_left_eye)
3143 )
3144 );
3145 assert_eq!(
3146 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).have_right_eye as *const _ as usize },
3147 29usize,
3148 concat!(
3149 "Offset of field: ",
3150 stringify!(ILINKDATA),
3151 "::",
3152 stringify!(have_right_eye)
3153 )
3154 );
3155 assert_eq!(
3156 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).last_data_gap_types as *const _ as usize },
3157 30usize,
3158 concat!(
3159 "Offset of field: ",
3160 stringify!(ILINKDATA),
3161 "::",
3162 stringify!(last_data_gap_types)
3163 )
3164 );
3165 assert_eq!(
3166 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).last_data_buffer_type as *const _ as usize },
3167 32usize,
3168 concat!(
3169 "Offset of field: ",
3170 stringify!(ILINKDATA),
3171 "::",
3172 stringify!(last_data_buffer_type)
3173 )
3174 );
3175 assert_eq!(
3176 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).last_data_buffer_size as *const _ as usize },
3177 34usize,
3178 concat!(
3179 "Offset of field: ",
3180 stringify!(ILINKDATA),
3181 "::",
3182 stringify!(last_data_buffer_size)
3183 )
3184 );
3185 assert_eq!(
3186 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).control_read as *const _ as usize },
3187 36usize,
3188 concat!(
3189 "Offset of field: ",
3190 stringify!(ILINKDATA),
3191 "::",
3192 stringify!(control_read)
3193 )
3194 );
3195 assert_eq!(
3196 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).first_in_block as *const _ as usize },
3197 38usize,
3198 concat!(
3199 "Offset of field: ",
3200 stringify!(ILINKDATA),
3201 "::",
3202 stringify!(first_in_block)
3203 )
3204 );
3205 assert_eq!(
3206 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).last_data_item_time as *const _ as usize },
3207 40usize,
3208 concat!(
3209 "Offset of field: ",
3210 stringify!(ILINKDATA),
3211 "::",
3212 stringify!(last_data_item_time)
3213 )
3214 );
3215 assert_eq!(
3216 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).last_data_item_type as *const _ as usize },
3217 44usize,
3218 concat!(
3219 "Offset of field: ",
3220 stringify!(ILINKDATA),
3221 "::",
3222 stringify!(last_data_item_type)
3223 )
3224 );
3225 assert_eq!(
3226 unsafe {
3227 &(*(::std::ptr::null::<ILINKDATA>())).last_data_item_contents as *const _ as usize
3228 },
3229 46usize,
3230 concat!(
3231 "Offset of field: ",
3232 stringify!(ILINKDATA),
3233 "::",
3234 stringify!(last_data_item_contents)
3235 )
3236 );
3237 assert_eq!(
3238 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).last_data_item as *const _ as usize },
3239 48usize,
3240 concat!(
3241 "Offset of field: ",
3242 stringify!(ILINKDATA),
3243 "::",
3244 stringify!(last_data_item)
3245 )
3246 );
3247 assert_eq!(
3248 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).block_number as *const _ as usize },
3249 316usize,
3250 concat!(
3251 "Offset of field: ",
3252 stringify!(ILINKDATA),
3253 "::",
3254 stringify!(block_number)
3255 )
3256 );
3257 assert_eq!(
3258 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).block_sample as *const _ as usize },
3259 320usize,
3260 concat!(
3261 "Offset of field: ",
3262 stringify!(ILINKDATA),
3263 "::",
3264 stringify!(block_sample)
3265 )
3266 );
3267 assert_eq!(
3268 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).block_event as *const _ as usize },
3269 324usize,
3270 concat!(
3271 "Offset of field: ",
3272 stringify!(ILINKDATA),
3273 "::",
3274 stringify!(block_event)
3275 )
3276 );
3277 assert_eq!(
3278 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).last_resx as *const _ as usize },
3279 328usize,
3280 concat!(
3281 "Offset of field: ",
3282 stringify!(ILINKDATA),
3283 "::",
3284 stringify!(last_resx)
3285 )
3286 );
3287 assert_eq!(
3288 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).last_resy as *const _ as usize },
3289 330usize,
3290 concat!(
3291 "Offset of field: ",
3292 stringify!(ILINKDATA),
3293 "::",
3294 stringify!(last_resy)
3295 )
3296 );
3297 assert_eq!(
3298 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).last_pupil as *const _ as usize },
3299 332usize,
3300 concat!(
3301 "Offset of field: ",
3302 stringify!(ILINKDATA),
3303 "::",
3304 stringify!(last_pupil)
3305 )
3306 );
3307 assert_eq!(
3308 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).last_status as *const _ as usize },
3309 336usize,
3310 concat!(
3311 "Offset of field: ",
3312 stringify!(ILINKDATA),
3313 "::",
3314 stringify!(last_status)
3315 )
3316 );
3317 assert_eq!(
3318 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).queued_samples as *const _ as usize },
3319 338usize,
3320 concat!(
3321 "Offset of field: ",
3322 stringify!(ILINKDATA),
3323 "::",
3324 stringify!(queued_samples)
3325 )
3326 );
3327 assert_eq!(
3328 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).queued_events as *const _ as usize },
3329 340usize,
3330 concat!(
3331 "Offset of field: ",
3332 stringify!(ILINKDATA),
3333 "::",
3334 stringify!(queued_events)
3335 )
3336 );
3337 assert_eq!(
3338 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).queue_size as *const _ as usize },
3339 342usize,
3340 concat!(
3341 "Offset of field: ",
3342 stringify!(ILINKDATA),
3343 "::",
3344 stringify!(queue_size)
3345 )
3346 );
3347 assert_eq!(
3348 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).queue_free as *const _ as usize },
3349 344usize,
3350 concat!(
3351 "Offset of field: ",
3352 stringify!(ILINKDATA),
3353 "::",
3354 stringify!(queue_free)
3355 )
3356 );
3357 assert_eq!(
3358 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).last_rcve_time as *const _ as usize },
3359 348usize,
3360 concat!(
3361 "Offset of field: ",
3362 stringify!(ILINKDATA),
3363 "::",
3364 stringify!(last_rcve_time)
3365 )
3366 );
3367 assert_eq!(
3368 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).samples_on as *const _ as usize },
3369 352usize,
3370 concat!(
3371 "Offset of field: ",
3372 stringify!(ILINKDATA),
3373 "::",
3374 stringify!(samples_on)
3375 )
3376 );
3377 assert_eq!(
3378 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).events_on as *const _ as usize },
3379 353usize,
3380 concat!(
3381 "Offset of field: ",
3382 stringify!(ILINKDATA),
3383 "::",
3384 stringify!(events_on)
3385 )
3386 );
3387 assert_eq!(
3388 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).packet_flags as *const _ as usize },
3389 354usize,
3390 concat!(
3391 "Offset of field: ",
3392 stringify!(ILINKDATA),
3393 "::",
3394 stringify!(packet_flags)
3395 )
3396 );
3397 assert_eq!(
3398 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).link_flags as *const _ as usize },
3399 356usize,
3400 concat!(
3401 "Offset of field: ",
3402 stringify!(ILINKDATA),
3403 "::",
3404 stringify!(link_flags)
3405 )
3406 );
3407 assert_eq!(
3408 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).state_flags as *const _ as usize },
3409 358usize,
3410 concat!(
3411 "Offset of field: ",
3412 stringify!(ILINKDATA),
3413 "::",
3414 stringify!(state_flags)
3415 )
3416 );
3417 assert_eq!(
3418 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).link_dstatus as *const _ as usize },
3419 360usize,
3420 concat!(
3421 "Offset of field: ",
3422 stringify!(ILINKDATA),
3423 "::",
3424 stringify!(link_dstatus)
3425 )
3426 );
3427 assert_eq!(
3428 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).link_pendcmd as *const _ as usize },
3429 361usize,
3430 concat!(
3431 "Offset of field: ",
3432 stringify!(ILINKDATA),
3433 "::",
3434 stringify!(link_pendcmd)
3435 )
3436 );
3437 assert_eq!(
3438 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).reserved as *const _ as usize },
3439 362usize,
3440 concat!(
3441 "Offset of field: ",
3442 stringify!(ILINKDATA),
3443 "::",
3444 stringify!(reserved)
3445 )
3446 );
3447 assert_eq!(
3448 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).our_name as *const _ as usize },
3449 364usize,
3450 concat!(
3451 "Offset of field: ",
3452 stringify!(ILINKDATA),
3453 "::",
3454 stringify!(our_name)
3455 )
3456 );
3457 assert_eq!(
3458 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).our_address as *const _ as usize },
3459 404usize,
3460 concat!(
3461 "Offset of field: ",
3462 stringify!(ILINKDATA),
3463 "::",
3464 stringify!(our_address)
3465 )
3466 );
3467 assert_eq!(
3468 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).eye_name as *const _ as usize },
3469 420usize,
3470 concat!(
3471 "Offset of field: ",
3472 stringify!(ILINKDATA),
3473 "::",
3474 stringify!(eye_name)
3475 )
3476 );
3477 assert_eq!(
3478 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).eye_address as *const _ as usize },
3479 460usize,
3480 concat!(
3481 "Offset of field: ",
3482 stringify!(ILINKDATA),
3483 "::",
3484 stringify!(eye_address)
3485 )
3486 );
3487 assert_eq!(
3488 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).ebroadcast_address as *const _ as usize },
3489 476usize,
3490 concat!(
3491 "Offset of field: ",
3492 stringify!(ILINKDATA),
3493 "::",
3494 stringify!(ebroadcast_address)
3495 )
3496 );
3497 assert_eq!(
3498 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).rbroadcast_address as *const _ as usize },
3499 492usize,
3500 concat!(
3501 "Offset of field: ",
3502 stringify!(ILINKDATA),
3503 "::",
3504 stringify!(rbroadcast_address)
3505 )
3506 );
3507 assert_eq!(
3508 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).polling_remotes as *const _ as usize },
3509 508usize,
3510 concat!(
3511 "Offset of field: ",
3512 stringify!(ILINKDATA),
3513 "::",
3514 stringify!(polling_remotes)
3515 )
3516 );
3517 assert_eq!(
3518 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).poll_responses as *const _ as usize },
3519 510usize,
3520 concat!(
3521 "Offset of field: ",
3522 stringify!(ILINKDATA),
3523 "::",
3524 stringify!(poll_responses)
3525 )
3526 );
3527 assert_eq!(
3528 unsafe { &(*(::std::ptr::null::<ILINKDATA>())).nodes as *const _ as usize },
3529 512usize,
3530 concat!(
3531 "Offset of field: ",
3532 stringify!(ILINKDATA),
3533 "::",
3534 stringify!(nodes)
3535 )
3536 );
3537}
3538impl Default for ILINKDATA {
3539 fn default() -> Self {
3540 unsafe { ::std::mem::zeroed() }
3541 }
3542}
3543extern "C" {
3544 #[doc = " @ingroup init_eyelink"]
3545 #[doc = "Use this function to initialize the EyeLink library. This will also start"]
3546 #[doc = "the millisecond clock. No connection is attempted to the eyetracker yet."]
3547 #[doc = "It is preferable to call open_eyelink_connection(\\c -1) instead, as this"]
3548 #[doc = "prepares other parts of the DLL for use."]
3549 #[doc = ""]
3550 #[doc = "@remarks MUST BE FIRST CALL TO LINK INTERFACE."]
3551 #[doc = "@param bufsize Size of sample buffer. \\c 60000 is the maximum allowed. (\\c 0 for default)"]
3552 #[doc = "@param options Text specifying initialization options. Currently no options are supported."]
3553 #[doc = "(\\c NULL or \"\" for defaults)"]
3554 #[doc = "@return \\c 0 if failed, nonzero (\\c -1 or TSR SWI number) if success."]
3555 #[doc = ""]
3556 #[doc = "\\b Example:"]
3557 #[doc = "<pre>"]
3558 #[doc = "\\code"]
3559 #[doc = ""]
3560 #[doc = "#include <eyelink.h>"]
3561 #[doc = "int dummy = 0; // Sets the connection type"]
3562 #[doc = ""]
3563 #[doc = "if(!open_eyelink_system(0, \"\"))"]
3564 #[doc = "{"]
3565 #[doc = "printf(\"\\nERROR: Cannot initialize eyelink library\\n\");"]
3566 #[doc = "return -1;"]
3567 #[doc = "}"]
3568 #[doc = ""]
3569 #[doc = "if(dummy)"]
3570 #[doc = "i = eyelink_dummy_open(); // Starts a dummy connection"]
3571 #[doc = "else"]
3572 #[doc = "i = eyelink_open(); // Connects to the tracker"]
3573 #[doc = ""]
3574 #[doc = "..."]
3575 #[doc = ""]
3576 #[doc = "if(eyelink_is_connected())"]
3577 #[doc = "{"]
3578 #[doc = "set_offline_mode();"]
3579 #[doc = "eyecmd_printf(\"close_data_file\"); // close data file"]
3580 #[doc = "eyelink_close(1); // disconnect from tracker"]
3581 #[doc = "}"]
3582 #[doc = ""]
3583 #[doc = "close_eyelink_system();"]
3584 #[doc = "\\endcode"]
3585 #[doc = "</pre>"]
3586 #[doc = "\\sa \\c close_eyelink_connection(), \\c close_eyelink_system(), \\c eyelink_close() and \\c eyelink_open()"]
3587 pub fn open_eyelink_system(bufsize: UINT16, options: *mut ::std::os::raw::c_char) -> UINT16;
3588}
3589extern "C" {
3590 #[doc = " @ingroup init_eyelink"]
3591 #[doc = "Sets the node name of this computer (up to 35 characters)."]
3592 #[doc = ""]
3593 #[doc = "@param name String to become new name."]
3594 #[doc = ""]
3595 #[doc = "\\b Example:"]
3596 #[doc = "<pre>"]
3597 #[doc = "\\code"]
3598 #[doc = "#include <eyelink.h>"]
3599 #[doc = ""]
3600 #[doc = "ELINKNODE node; // This will hold application name and address"]
3601 #[doc = ""]
3602 #[doc = "if (set_eyelink_address(\"100.1.1.7\"))"]
3603 #[doc = "return -1;"]
3604 #[doc = ""]
3605 #[doc = "if(open_eyelink_connection(0))"]
3606 #[doc = "return -1;"]
3607 #[doc = ""]
3608 #[doc = "eyelink_set_name(\"Newapplication\");"]
3609 #[doc = ""]
3610 #[doc = "if(eyelink_get_node(0, &node) == OK_RESULT)"]
3611 #[doc = "eyemsg_printf(\"%s\", node.name);"]
3612 #[doc = "\\endcode"]
3613 #[doc = "</pre>"]
3614 #[doc = "\\b Output:"]
3615 #[doc = "<pre>"]
3616 #[doc = "\\code"]
3617 #[doc = "MSG\t2248248 Newapplication"]
3618 #[doc = "\\endcode"]
3619 #[doc = "</pre>"]
3620 #[doc = ""]
3621 #[doc = "\\sa \\c eyelink_get_node(), \\c open_eyelink_connection() and \\c set_eyelink_address()"]
3622 pub fn eyelink_set_name(name: *mut ::std::os::raw::c_char);
3623}
3624extern "C" {
3625 #[doc = " @ingroup init_eyelink"]
3626 #[doc = "Resets the EyeLink library, releases the system resources used by the millisecond clock."]
3627 #[doc = ""]
3628 #[doc = "@remarks MUST DO BEFORE EXITING."]
3629 #[doc = ""]
3630 #[doc = "\\b Example: See \\c open_eyelink_system()"]
3631 #[doc = ""]
3632 #[doc = "\\sa \\c open_eyelink_system(), \\c eyelink_close() and \\c set_offline_mode()"]
3633 pub fn close_eyelink_system();
3634}
3635extern "C" {
3636 #[doc = " @ingroup access_time_local"]
3637 #[doc = "Returns the current millisecond since the initialization."]
3638 #[doc = ""]
3639 #[doc = "@remarks If the eyelink_exptkit library is not initialized, or initialized multiple times,"]
3640 #[doc = "the return value is invalid and the return value is unpredictable. So in order to avoid"]
3641 #[doc = "this, make sure that \\c close_eyelink_system() is called at the end."]
3642 #[doc = "The call to \\c current_msec() is always equivalent to \\c current_time()."]
3643 #[doc = "@return The current millisecond since the initialization of the library."]
3644 #[doc = ""]
3645 #[doc = "\\b Example:"]
3646 #[doc = "<pre>"]
3647 #[doc = "\\code"]
3648 #[doc = "#include <eyelink.h>"]
3649 #[doc = "#include <stdio.h>"]
3650 #[doc = ""]
3651 #[doc = "eyemsg_printf(\"Delay test starts: %ld\", current_msec());"]
3652 #[doc = "msec_delay(100);"]
3653 #[doc = "eyemsg_printf(\"Delay test ends: %ld\", current_time());"]
3654 #[doc = "\\endcode"]
3655 #[doc = "<pre>"]
3656 #[doc = "\\b Output:"]
3657 #[doc = "<pre>"]
3658 #[doc = "\\code"]
3659 #[doc = "MSG\t4532575 Delay test starts: 5236"]
3660 #[doc = "MSG\t4532671 Delay test ends: 5336"]
3661 #[doc = "\\endcode"]
3662 #[doc = "</pre>"]
3663 #[doc = ""]
3664 #[doc = "\\sa \\c current_msec(), \\c current_micro(), \\c current_usec(), \\c eyelink_tracker_time() and \\c msec_delay()"]
3665 pub fn current_time() -> UINT32;
3666}
3667extern "C" {
3668 #[doc = " @ingroup access_time_local"]
3669 #[doc = "Returns the current microsecond since the initialization."]
3670 #[doc = "Equivalent to \\c current_usec() and \\c current_double_usec()."]
3671 #[doc = ""]
3672 #[doc = "@param m Pointer to MICRO structure."]
3673 #[doc = "@return The current microsecond since the initialization of the library, modulo 2^32."]
3674 #[doc = "It can also fill in the \\c MICRO structure if the pointer is not \\c NULL."]
3675 #[doc = ""]
3676 #[doc = "\\b Example: See \\c current_usec()"]
3677 #[doc = ""]
3678 #[doc = "\\sa \\c current_usec(), \\c current_double_usec(), \\c current_msec(), \\c current_time() and \\c msec_delay()"]
3679 pub fn current_micro(m: *mut MICRO) -> UINT32;
3680}
3681extern "C" {
3682 #[doc = " @ingroup access_time_local"]
3683 #[doc = "Returns the current microsecond since the initialization."]
3684 #[doc = "Equivalent to \\c current_micro() and \\c current_double_usec()."]
3685 #[doc = ""]
3686 #[doc = "@remarks If the eyelink_exptkit library is not initialized, or initialized multiple times,"]
3687 #[doc = "the return value is invalid and unpredictable. The call to"]
3688 #[doc = "\\c current_usec() is equivalent to \\c current_micro(NULL). The function is very"]
3689 #[doc = "platform dependent. Platforms such as windows 95, 98, ME may not return usec"]
3690 #[doc = "properly. Ie. It may return <tt>current_time() * 1000</tt>."]
3691 #[doc = "@return The current microsecond since the initialization of the library, modulo 2^32."]
3692 #[doc = ""]
3693 #[doc = "\\b Example:"]
3694 #[doc = "<pre>"]
3695 #[doc = "\\code"]
3696 #[doc = ""]
3697 #[doc = "#include <eyelink.h>"]
3698 #[doc = "#include <stdio.h>"]
3699 #[doc = ""]
3700 #[doc = "MICRO m1, m2; // Special high-resolution time structure"]
3701 #[doc = ""]
3702 #[doc = "current_micro(&m1);"]
3703 #[doc = "eyemsg_printf(\"Delay test starts: %ld\", current_usec());"]
3704 #[doc = ""]
3705 #[doc = "msec_delay(100);"]
3706 #[doc = ""]
3707 #[doc = "current_micro(&m2);"]
3708 #[doc = "eyemsg_printf(\"Delay test ends: %ld\", current_usec());"]
3709 #[doc = ""]
3710 #[doc = "eyemsg_printf(\"Total Delay: %6.3f\","]
3711 #[doc = "m2.msec + m2.usec/1000.0 - m1.msec + m1.usec/1000.0);"]
3712 #[doc = "\\endcode"]
3713 #[doc = "</pre>"]
3714 #[doc = "\\b Output:"]
3715 #[doc = "<pre>"]
3716 #[doc = "\\code"]
3717 #[doc = "MSG\t5441107 Delay test starts: 4610094"]
3718 #[doc = "MSG\t5441206 Delay test ends: 4710005"]
3719 #[doc = "MSG\t5441206 Total Delay: 100.003"]
3720 #[doc = "\\endcode"]
3721 #[doc = "</pre>"]
3722 #[doc = "\\sa \\c current_micro(), \\c current_double_usec(), \\c current_msec(), \\c current_time() and \\c msec_delay()"]
3723 pub fn current_usec() -> UINT32;
3724}
3725extern "C" {
3726 #[doc = " @ingroup access_time_local"]
3727 #[doc = "Does a unblocked delay using \\c current_time()."]
3728 #[doc = ""]
3729 #[doc = "@param n n milliseconds to delay."]
3730 #[doc = ""]
3731 #[doc = "\\b Example:"]
3732 #[doc = "<pre>"]
3733 #[doc = "\\code"]
3734 #[doc = "#include <eyelink.h>"]
3735 #[doc = "#include <stdio.h>"]
3736 #[doc = ""]
3737 #[doc = "eyemsg_printf(\"Delay test starts: %ld\", current_msec());"]
3738 #[doc = "msec_delay(100);"]
3739 #[doc = "eyemsg_printf(\"Delay test ends: %ld\", current_time());"]
3740 #[doc = "\\endcode"]
3741 #[doc = "</pre>"]
3742 #[doc = "\\b Output:"]
3743 #[doc = "<pre>"]
3744 #[doc = "\\code"]
3745 #[doc = "MSG\t4346690 Delay test starts: 12768"]
3746 #[doc = "MSG\t4346791 Delay test ends: 12868"]
3747 #[doc = "\\endcode"]
3748 #[doc = "</pre>"]
3749 #[doc = "\\sa \\c current_msec() and \\c pump_delay()"]
3750 pub fn msec_delay(n: UINT32);
3751}
3752extern "C" {
3753 #[doc = " @ingroup access_time_local"]
3754 #[doc = "Returns the current microsecond as double (56 bits) since the initialization."]
3755 #[doc = "Equivalent to \\c current_micro() and \\c current_usec()."]
3756 #[doc = ""]
3757 #[doc = "@return The current microsecond as a double value since the initialization of the library, modulo 2^32."]
3758 #[doc = ""]
3759 #[doc = "\\b Example: See \\c current_usec()"]
3760 #[doc = ""]
3761 #[doc = ""]
3762 #[doc = "\\sa \\c current_micro(), \\c current_usec(), \\c current_msec(), \\c current_time() and \\c msec_delay()"]
3763 pub fn current_double_usec() -> f64;
3764}
3765extern "C" {
3766 pub static mut eye_broadcast_address: ELINKADDR;
3767}
3768extern "C" {
3769 pub static mut rem_broadcast_address: ELINKADDR;
3770}
3771extern "C" {
3772 pub static mut our_address: ELINKADDR;
3773}
3774extern "C" {
3775 #[doc = " @ingroup init_eyelink"]
3776 #[doc = "Allows the computer to connect to tracker, where the tracker is on the same network."]
3777 #[doc = ""]
3778 #[doc = "@param node Must be an address returned by \\c eyelink_poll_trackers() and"]
3779 #[doc = "\\c eyelink_poll_responses() to connect to any tracker."]
3780 #[doc = "@param busytest If non-zero the call to \\c eyelink_open_node() will not disconnect an existing connection."]
3781 #[doc = "@return \\c 0 if successful.\\n"]
3782 #[doc = "\\c LINK_INITIALIZE_FAILED if link could not be established.\\n"]
3783 #[doc = "\\c CONNECT_TIMEOUT_FAILED if tracker did not respond.\\n"]
3784 #[doc = "\\c WRONG_LINK_VERSION if the versions of the EyeLink library and tracker are incompatible.\\n"]
3785 #[doc = "\\c TRACKER_BUSY if \\c <busytest> is set, and tracker is connected to another computer.\\n"]
3786 #[doc = ""]
3787 #[doc = "\\b Example:"]
3788 #[doc = "<pre>"]
3789 #[doc = "\\code"]
3790 #[doc = ""]
3791 #[doc = "ELINKADDR node;\t\t\t\t// EyeLink address node"]
3792 #[doc = ""]
3793 #[doc = "if(open_eyelink_connection(-1))"]
3794 #[doc = "return -1;"]
3795 #[doc = ""]
3796 #[doc = "text_to_elinkaddr(\"100.1.1.1\", node, 0);"]
3797 #[doc = ""]
3798 #[doc = "if (eyelink_open_node(node, 1))"]
3799 #[doc = "return -1;"]
3800 #[doc = "\\endcode"]
3801 #[doc = "</pre>"]
3802 #[doc = "\\sa \\c eyelink_node_receive(), \\c eyelink_node_send(), \\c eyelink_node_send_message() and \\c eyelink_open()"]
3803 pub fn eyelink_open_node(node: *mut byte, busytest: INT16) -> INT16;
3804}
3805extern "C" {
3806 #[doc = " @ingroup init_eyelink"]
3807 #[doc = "Attempts to open a link connection to the EyeLink tracker. Simple connect to single Eyelink tracker."]
3808 #[doc = "Equivalent to \\c eyelink_open_node(broadcast_address, 0)."]
3809 #[doc = ""]
3810 #[doc = "@remarks The tracker address can be set by calling the function \\c set_eyelink_address(). If this"]
3811 #[doc = "address was \"255.255.255.255\" the call to \\c eyelink_open() will \"broadcast\" a request"]
3812 #[doc = "to any tracker, however this may fail if multiple Ethernet cards are installed."]
3813 #[doc = "For the broadcast option to work use EyeLink I v2.1 or higher, EyeLink II v1.1 or higher."]
3814 #[doc = "Before using this command, call either \\c open_eyelink_connection(-1) or"]
3815 #[doc = "\\c open_eyelink_system () to prepare the link for use."]
3816 #[doc = ""]
3817 #[doc = "@return \\c 0 if successful.\\n"]
3818 #[doc = "\\c LINK_INITIALIZE_FAILED if link could not be established.\\n"]
3819 #[doc = "\\c CONNECT_TIMEOUT_FAILED if tracker did not respond.\\n"]
3820 #[doc = "\\c WRONG_LINK_VERSION if the versions of the EyeLink library and tracker are incompatible.\\n"]
3821 #[doc = ""]
3822 #[doc = "\\b Example:"]
3823 #[doc = "<pre>"]
3824 #[doc = "\\code"]
3825 #[doc = ""]
3826 #[doc = "#include <eyelink.h>"]
3827 #[doc = ""]
3828 #[doc = "if(open_eyelink_connection(-1))"]
3829 #[doc = "return -1;"]
3830 #[doc = ""]
3831 #[doc = "set_eyelink_address(\"100.1.1.1\");"]
3832 #[doc = ""]
3833 #[doc = "if (eyelink_open())"]
3834 #[doc = "return -1;"]
3835 #[doc = "\\endcode"]
3836 #[doc = "</pre>"]
3837 #[doc = "\\sa \\c eyelink_broadcast_open(), \\c eyelink_close(), \\c eyelink_dummy_open(), \\c eyelink_open_node(),"]
3838 #[doc = "\\c open_eyelink_connection(), \\c open_eyelink_system() and \\c set_eyelink_address()"]
3839 pub fn eyelink_open() -> INT16;
3840}
3841extern "C" {
3842 #[doc = " @ingroup init_eyelink"]
3843 #[doc = "Allows a third computer to listen in on a session between the eye tracker and a controlling"]
3844 #[doc = "remote machine. This allows it to receive data during recording and playback, and to monitor"]
3845 #[doc = "the eye tracker mode. The local computer will not be able to send commands to the eye tracker,"]
3846 #[doc = "but may be able to send messages or request the tracker time."]
3847 #[doc = ""]
3848 #[doc = "@remarks May not function properly, if there are more than one Ethernet cards installed."]
3849 #[doc = "@return \\c 0 if successful.\\n"]
3850 #[doc = "\\c LINK_INITIALIZE_FAILED if link could not be established.\\n"]
3851 #[doc = "\\c CONNECT_TIMEOUT_FAILED if tracker did not respond.\\n"]
3852 #[doc = "\\c WRONG_LINK_VERSION if the versions of the EyeLink library and tracker are incompatible.\\n"]
3853 #[doc = ""]
3854 #[doc = "\\b Example:"]
3855 #[doc = "<pre>"]
3856 #[doc = "\\code"]
3857 #[doc = ""]
3858 #[doc = "#include <eyelink.h>"]
3859 #[doc = "#include <stdio.h>"]
3860 #[doc = ""]
3861 #[doc = "if(open_eyelink_connection(-1))"]
3862 #[doc = "return -1;"]
3863 #[doc = ""]
3864 #[doc = "eyelink_set_name(\"Broadcast\");"]
3865 #[doc = ""]
3866 #[doc = "..."]
3867 #[doc = ""]
3868 #[doc = "if(eyelink_broadcast_open())"]
3869 #[doc = "{"]
3870 #[doc = "printf(\"Cannot open broadcast connection to tracker\");"]
3871 #[doc = "return -1;"]
3872 #[doc = "}"]
3873 #[doc = ""]
3874 #[doc = "eyelink_reset_data(1);"]
3875 #[doc = "eyelink_data_switch(RECORD_LINK_SAMPLES | RECORD_LINK_EVENTS);"]
3876 #[doc = "\\endcode"]
3877 #[doc = "</pre>"]
3878 #[doc = "\\sa \\c eyelink_close(), \\c eyelink_dummy_open(), \\c eyelink_is_connected(), \\c eyelink_open() and"]
3879 #[doc = "\\c eyelink_open_node()"]
3880 pub fn eyelink_broadcast_open() -> INT16;
3881}
3882extern "C" {
3883 #[doc = " @ingroup init_eyelink"]
3884 #[doc = "Sets the EyeLink library to simulate an eyetracker connection. Functions will return"]
3885 #[doc = "plausible values, but no data."]
3886 #[doc = ""]
3887 #[doc = "@remarks The function \\c eyelink_is_connected() will return \\c -1 to indicate a simulated connection."]
3888 #[doc = "@return Always returns \\c 0."]
3889 #[doc = ""]
3890 #[doc = "\\b Example:"]
3891 #[doc = "<pre>"]
3892 #[doc = "\\code"]
3893 #[doc = ""]
3894 #[doc = "#include <eyelink.h>"]
3895 #[doc = ""]
3896 #[doc = "if(open_eyelink_connection(-1))"]
3897 #[doc = "return -1;"]
3898 #[doc = ""]
3899 #[doc = "eyelink_dummy_open();"]
3900 #[doc = "\\endcode"]
3901 #[doc = "</pre>"]
3902 #[doc = "\\sa \\c eyelink_broadcast_open(), \\c eyelink_open() and \\c eyelink_open_node()"]
3903 pub fn eyelink_dummy_open() -> INT16;
3904}
3905extern "C" {
3906 #[doc = " @ingroup init_eyelink"]
3907 #[doc = "Sends a disconnect message to the EyeLink tracker, resets the link data system."]
3908 #[doc = ""]
3909 #[doc = "@param send_msg Usually \\c <send_msg> is \\c 1. However, \\c 0 can be used to reset the eyelink system"]
3910 #[doc = "if it is listening on a broadcast session."]
3911 #[doc = "@return \\c 0 if successful, otherwise link error."]
3912 #[doc = ""]
3913 #[doc = "\\b Example:"]
3914 #[doc = "<pre>"]
3915 #[doc = "\\code"]
3916 #[doc = ""]
3917 #[doc = "#include <eyelink.h>"]
3918 #[doc = ""]
3919 #[doc = "if(eyelink_is_connected())"]
3920 #[doc = "{"]
3921 #[doc = "set_offline_mode(); \t// off-line mode"]
3922 #[doc = "eyecmd_printf(\"close_data_file\");"]
3923 #[doc = "eyelink_close(1); // disconnect from tracker"]
3924 #[doc = "}"]
3925 #[doc = "\\endcode"]
3926 #[doc = "</pre>"]
3927 #[doc = "\\sa \\c eyelink_broadcast_open(), \\c eyelink_open(), \\c eyelink_dummy_open() and \\c eyelink_open_node()"]
3928 pub fn eyelink_close(send_msg: INT16) -> INT16;
3929}
3930extern "C" {
3931 #[doc = " @ingroup access_time_local"]
3932 #[doc = "Initializes the high frequency clock."]
3933 #[doc = ""]
3934 #[doc = "With TSR interface under msdos, Start/stop timing resources."]
3935 #[doc = ""]
3936 #[doc = "@param enable Usually \\c <enable> is \\c 1. However, in MS-DOS passing \\c 0 will cleanup the timing resources."]
3937 #[doc = "In other platforms passing \\c 0 has no effect."]
3938 pub fn eyelink_reset_clock(enable: INT16) -> INT16;
3939}
3940extern "C" {
3941 #[doc = " @ingroup init_eyelink"]
3942 #[doc = "Checks whether the connection to the tracker is alive."]
3943 #[doc = ""]
3944 #[doc = "@remarks Call this routine during loops and wherever the experiment might lock up if"]
3945 #[doc = "the tracker is shut down. Exit the experiment (by terminating loops and"]
3946 #[doc = "returning from all calls) if this returns \\c 0."]
3947 #[doc = "@return \\c 0 if link closed.\\n"]
3948 #[doc = "\\c -1 if simulating connection.\\n"]
3949 #[doc = "\\c 1 for normal connection.\\n"]
3950 #[doc = "\\c 2 for broadcast connection (NEW for v2.1 and later).\\n"]
3951 #[doc = ""]
3952 #[doc = "\\b Example:"]
3953 #[doc = "<pre>"]
3954 #[doc = "\\code"]
3955 #[doc = ""]
3956 #[doc = "#include <eyelink.h>"]
3957 #[doc = ""]
3958 #[doc = "while(1)"]
3959 #[doc = "{"]
3960 #[doc = "if(!eyelink_is_connected())"]
3961 #[doc = "return ABORT_EXPT;"]
3962 #[doc = ""]
3963 #[doc = "error = do_drift_correct(SCRWIDTH/2, SCRHEIGHT/2, 1, 1);"]
3964 #[doc = ""]
3965 #[doc = "if(error!=27) break;"]
3966 #[doc = "}"]
3967 #[doc = "\\endcode"]
3968 #[doc = "</pre>"]
3969 #[doc = "\\sa \\c eyelink_close() and \\c eyelink_open()"]
3970 pub fn eyelink_is_connected() -> INT16;
3971}
3972extern "C" {
3973 #[doc = " @ingroup init_eyelink"]
3974 #[doc = "Controls the level of control an application has over the tracker."]
3975 #[doc = ""]
3976 #[doc = "@remarks This is used in combination with broadcast mode (multiple applications connected to one tracker)"]
3977 #[doc = "to ensure that \"listener\" applications do not inadvertently send commands, key presses, or"]
3978 #[doc = "messages to the tracker. This is mostly useful when quickly converting an existing"]
3979 #[doc = "application into a listener."]
3980 #[doc = "@param mode \\c 0 to allow all communication.\\n"]
3981 #[doc = "\\c 1 to block commands (allows only key presses, messages, and time or variable read requests).\\n"]
3982 #[doc = "\\c 2 to disable all commands, requests and messages.\\n"]
3983 #[doc = "\\c -1 to just return current setting.\\n"]
3984 #[doc = "@return The previous settings."]
3985 #[doc = ""]
3986 #[doc = "\\b Example:"]
3987 #[doc = "<pre>"]
3988 #[doc = "\\code"]
3989 #[doc = ""]
3990 #[doc = "#include <eyelink.h>"]
3991 #[doc = "#include <stdio.h>"]
3992 #[doc = ""]
3993 #[doc = "if(eyelink_broadcast_open())"]
3994 #[doc = "{"]
3995 #[doc = "printf(\"Cannot open broadcast connection to tracker\");"]
3996 #[doc = "return -1;"]
3997 #[doc = "}"]
3998 #[doc = ""]
3999 #[doc = "eyelink_reset_data(1);"]
4000 #[doc = "eyelink_data_switch(RECORD_LINK_SAMPLES | RECORD_LINK_EVENTS);"]
4001 #[doc = ""]
4002 #[doc = "eyelink_quiet_mode(0);\t// Allows for message sending"]
4003 #[doc = "eyelink_send_message(\"This should be recorded in the EDF file\");"]
4004 #[doc = "eyelink_quiet_mode(2); // Disables message sending"]
4005 #[doc = "eyelink_send_message(\"This should not appear in the EDF file\");"]
4006 #[doc = "eyelink_quiet_mode(0); // Allows for message sending again"]
4007 #[doc = "eyelink_send_message(\"This should appear in the EDF file\");"]
4008 #[doc = "\\endcode"]
4009 #[doc = "</pre>"]
4010 #[doc = "\\b Output:"]
4011 #[doc = "<pre>"]
4012 #[doc = "\\code"]
4013 #[doc = "MSG\t3304947 This message should be recorded in the EDF file"]
4014 #[doc = "MSG\t3304947 This message should appear in the EDF file"]
4015 #[doc = "\\endcode"]
4016 #[doc = "</pre>"]
4017 #[doc = "\\sa \\c eyelink_broadcast_open() and \\c eyelink_open()"]
4018 pub fn eyelink_quiet_mode(mode: INT16) -> INT16;
4019}
4020extern "C" {
4021 #[doc = " @ingroup init_eyelink"]
4022 #[doc = "Asks all trackers (with EyeLink software running) on the network to send their names and node address."]
4023 #[doc = ""]
4024 #[doc = "@return \\c OK_RESULT if successful, otherwise link error."]
4025 #[doc = "@return \\c LINK_TERMINATED_RESULT if link error."]
4026 #[doc = "@return \\c -1 if broadcast option is not available."]
4027 #[doc = ""]
4028 #[doc = "\\b Example: See \\c eyelink_poll_remotes()"]
4029 #[doc = ""]
4030 #[doc = "\\sa \\c eyelink_poll_remotes() and \\c eyelink_poll_responses()"]
4031 pub fn eyelink_poll_trackers() -> INT16;
4032}
4033extern "C" {
4034 #[doc = " @ingroup init_eyelink"]
4035 #[doc = "Asks all non-tracker computers (with EyeLink software running) on the network to send their names"]
4036 #[doc = "and node address."]
4037 #[doc = ""]
4038 #[doc = "@return \\c OK_RESULT if successful, otherwise link error."]
4039 #[doc = "@return \\c LINK_TERMINATED_RESULT if link error."]
4040 #[doc = "@return \\c -1 if broadcast option is not available."]
4041 #[doc = ""]
4042 #[doc = "\\b Example:"]
4043 #[doc = "<pre>"]
4044 #[doc = "\\code"]
4045 #[doc = ""]
4046 #[doc = "#include <eyelink.h>"]
4047 #[doc = ""]
4048 #[doc = "ELINKADDR listener_address; // Address of listener application"]
4049 #[doc = ""]
4050 #[doc = "int check_for_listener(void)"]
4051 #[doc = "{"]
4052 #[doc = "int i, n;"]
4053 #[doc = "ELINKNODE node; // This will hold application name and address"]
4054 #[doc = ""]
4055 #[doc = "eyelink_poll_remotes(); // Polls network for EyeLink applications"]
4056 #[doc = "pump_delay(500); // Gives applications time to respond"]
4057 #[doc = ""]
4058 #[doc = "n = eyelink_poll_responses(); // How many responses?"]
4059 #[doc = "for(i = 1; i<= n; i++)"]
4060 #[doc = "{"]
4061 #[doc = "if(eyelink_get_node(i, &node) < 0)"]
4062 #[doc = "return -1; // error: no such data"]
4063 #[doc = ""]
4064 #[doc = "if(!_stricmp(node.name, \"comm_listener\"))"]
4065 #[doc = "{"]
4066 #[doc = "memcpy(listener_address, node.addr, sizeof(ELINKADDR));"]
4067 #[doc = ""]
4068 #[doc = "eyelink_node_send(listener_address, \"NAME comm_simple\", 40);"]
4069 #[doc = ""]
4070 #[doc = "..."]
4071 #[doc = "..."]
4072 #[doc = ""]
4073 #[doc = "return 0; // all communication checks out"]
4074 #[doc = "}"]
4075 #[doc = "}"]
4076 #[doc = "return -1; // no listener node found"]
4077 #[doc = "}"]
4078 #[doc = "\\endcode"]
4079 #[doc = "</pre>"]
4080 #[doc = "\\sa \\c eyelink_poll_responses() and \\c eyelink_poll_trackers()"]
4081 pub fn eyelink_poll_remotes() -> INT16;
4082}
4083extern "C" {
4084 #[doc = " @ingroup init_eyelink"]
4085 #[doc = "Returns the count of node addresses received so far following the call of"]
4086 #[doc = "\\c eyelink_poll_remotes() or \\c eyelink_poll_trackers()."]
4087 #[doc = ""]
4088 #[doc = "@remarks You should allow about 100 milliseconds for all nodes to respond. Up to 4 node"]
4089 #[doc = "responses are saved."]
4090 #[doc = "@return Number of nodes responded. \\c 0 if no responses."]
4091 #[doc = ""]
4092 #[doc = "\\b Example: See \\c eyelink_poll_remotes()"]
4093 #[doc = ""]
4094 #[doc = "\\sa \\c eyelink_poll_remotes() and \\c eyelink_poll_trackers()"]
4095 pub fn eyelink_poll_responses() -> INT16;
4096}
4097extern "C" {
4098 #[doc = " @ingroup init_eyelink"]
4099 #[doc = "Reads the responses returned by other trackers or remotes in response to"]
4100 #[doc = "\\c eyelink_poll_trackers() or \\c eyelink_poll_remotes(). It can also read the tracker"]
4101 #[doc = "broadcast address and remote broadcast addresses."]
4102 #[doc = ""]
4103 #[doc = "@param resp Nmber of responses to read:\\c 0 gets our data, \\c 1 get first response, \\c 2 gets the"]
4104 #[doc = "second response, etc. \\c -1 to read the tracker broadcast address. \\c -2 to read"]
4105 #[doc = "remote broadcast addresses."]
4106 #[doc = "@param data Pointer to buffer of \\c ELINKNODE type, to hold name and \\c ELINKADDR of the respondent."]
4107 #[doc = "@return \\c 0 if OK, \\c -1 if node response number is too high."]
4108 #[doc = ""]
4109 #[doc = "\\b Example: See \\c eyelink_poll_remotes()"]
4110 #[doc = ""]
4111 #[doc = "\\sa \\c eyelink_node_receive(), \\c eyelink_node_send() and \\c eyelink_poll_remotes()"]
4112 pub fn eyelink_get_node(resp: INT16, data: *mut ::std::os::raw::c_void) -> INT16;
4113}
4114extern "C" {
4115 #[doc = " @ingroup messaging"]
4116 #[doc = "Sends a given data to the given node."]
4117 #[doc = ""]
4118 #[doc = "@param node \\c ELINKADDR node address."]
4119 #[doc = "@param data Pointer to buffer containing data to send."]
4120 #[doc = "@param dsize Number of bytes of data. Maximum \\c ELREMBUFSIZE bytes."]
4121 #[doc = "@return \\c 0 if successful, otherwise link error."]
4122 #[doc = ""]
4123 #[doc = "\\b Example:"]
4124 #[doc = "<pre>"]
4125 #[doc = "\\code"]
4126 #[doc = ""]
4127 #[doc = "#include <eyelink.h>"]
4128 #[doc = ""]
4129 #[doc = "ELINKADDR listener_address; // Address of the listener application"]
4130 #[doc = "char text_message[256], echo_message[256];"]
4131 #[doc = ""]
4132 #[doc = "..."]
4133 #[doc = "..."]
4134 #[doc = ""]
4135 #[doc = "sprintf(text_message, \"START_RECORD\");"]
4136 #[doc = "eyelink_node_send(listener_address, text_message, 40);"]
4137 #[doc = ""]
4138 #[doc = "while (1)"]
4139 #[doc = "{"]
4140 #[doc = "k = eyelink_node_receive(listener_address, echo_message);"]
4141 #[doc = "if (k > 0 && strstr(echo_message, text_message))"]
4142 #[doc = "break;"]
4143 #[doc = "..."]
4144 #[doc = "..."]
4145 #[doc = "}"]
4146 #[doc = "\\endcode"]
4147 #[doc = "</pre>"]
4148 #[doc = "<pre>"]
4149 #[doc = "\\code"]
4150 #[doc = ""]
4151 #[doc = "#include <eyelink.h>"]
4152 #[doc = ""]
4153 #[doc = "ELINKADDR sender_address; // Address of the sender application"]
4154 #[doc = "char text_message[256], echo_message[256];"]
4155 #[doc = ""]
4156 #[doc = "k = eyelink_node_receive(sender_address, text_message);"]
4157 #[doc = ""]
4158 #[doc = "if(k > 0 && !_strnicmp(text_message, \"START_RECORD\", 12))"]
4159 #[doc = "{"]
4160 #[doc = "eyemsg_printf(text_message);"]
4161 #[doc = "error = start_recording(1,1,1,1); // Starts recording"]
4162 #[doc = "if(error != 0)"]
4163 #[doc = "return error; // Return error code if failed"]
4164 #[doc = ""]
4165 #[doc = "sprintf(echo_message, \"ECHO %s\", text_message);"]
4166 #[doc = "eyelink_node_send(sender_address, echo_message, 60);"]
4167 #[doc = "}"]
4168 #[doc = "\\endcode"]
4169 #[doc = "</pre>"]
4170 #[doc = "\\sa \\c eyelink_get_node(), \\c eyelink_node_receive() and \\c eyelink_open_node()"]
4171 pub fn eyelink_node_send(
4172 node: *mut byte,
4173 data: *mut ::std::os::raw::c_void,
4174 dsize: UINT16,
4175 ) -> INT16;
4176}
4177extern "C" {
4178 #[doc = " @ingroup messaging"]
4179 #[doc = "Checks for and gets the last packet received, stores the data and the node address sent from."]
4180 #[doc = ""]
4181 #[doc = "@remarks Data can only be read once, and is overwritten if a new packet arrives before the"]
4182 #[doc = "last packet has been read."]
4183 #[doc = "@param node Address of the sender."]
4184 #[doc = "@param data Pointer to a buffer to hold the data."]
4185 #[doc = "@return \\c 0 if successful, otherwise link error."]
4186 #[doc = ""]
4187 #[doc = "\\b Example: See \\c eyelink_node_send()"]
4188 #[doc = ""]
4189 #[doc = "\\sa \\c eyelink_get_float_data(), \\c eyelink_open_node() and \\c eyelink_node_send()"]
4190 pub fn eyelink_node_receive(node: *mut byte, data: *mut ::std::os::raw::c_void) -> INT16;
4191}
4192extern "C" {
4193 #[doc = " @ingroup messaging"]
4194 #[doc = "Sends a command to the connected eye tracker."]
4195 #[doc = ""]
4196 #[doc = "@remarks If \\c eyelink_send_commnd() is used, the text command will be executed, and a"]
4197 #[doc = "result code returned that can be read with \\c eyelink_command_result()."]
4198 #[doc = "@param text String command to send."]
4199 #[doc = "@return \\c 0 if successful, otherwise link error."]
4200 #[doc = ""]
4201 #[doc = "\\b Example:"]
4202 #[doc = "<pre>"]
4203 #[doc = "\\code"]
4204 #[doc = ""]
4205 #[doc = "#include <eyelink.h>"]
4206 #[doc = ""]
4207 #[doc = "UINT32 t;"]
4208 #[doc = "int i, j;"]
4209 #[doc = "char buf[256];"]
4210 #[doc = ""]
4211 #[doc = "eyelink_send_command(\"button_function 1 'accept_target_fixation'\");"]
4212 #[doc = ""]
4213 #[doc = "t = current_msec();"]
4214 #[doc = "while(current_msec()-t < 1000)"]
4215 #[doc = "{"]
4216 #[doc = "i = eyelink_command_result();"]
4217 #[doc = "j = eyelink_last_message(buf);"]
4218 #[doc = ""]
4219 #[doc = "if (i == OK_RESULT)"]
4220 #[doc = "{"]
4221 #[doc = "eyemsg_printf(\"Command executed successfully: %s\", j?buf:\"\");"]
4222 #[doc = "break;"]
4223 #[doc = "}"]
4224 #[doc = "else if (i!=NO_REPLY)"]
4225 #[doc = "{"]
4226 #[doc = "eyemsg_printf(\"Error in executing command: %s\", j?buf:\"\");"]
4227 #[doc = "break;"]
4228 #[doc = "}"]
4229 #[doc = "}"]
4230 #[doc = "\\endcode"]
4231 #[doc = "</pre>"]
4232 #[doc = "\\b Output:"]
4233 #[doc = "<pre>"]
4234 #[doc = "\\code"]
4235 #[doc = "MSG\t4608038 Command executed successfully: OK"]
4236 #[doc = "\\endcode"]
4237 #[doc = "</pre>"]
4238 #[doc = "\\sa \\c eyelink_command_result() and \\c eyelink_timed_command()"]
4239 pub fn eyelink_send_command(text: *mut ::std::os::raw::c_char) -> INT16;
4240}
4241extern "C" {
4242 #[doc = " @ingroup messaging"]
4243 #[doc = "Check for and retrieves the numeric result code sent by the tracker from the last command."]
4244 #[doc = ""]
4245 #[doc = "@return \\c NO_REPLY if no reply to last command.\\n"]
4246 #[doc = "<tt>OK_RESULT (0)</tt> if OK.\\n"]
4247 #[doc = "Other error codes represent tracker execution error.\\n"]
4248 #[doc = ""]
4249 #[doc = "\\b Example: See \\c eyelink_send_command()"]
4250 #[doc = ""]
4251 #[doc = "\\sa \\c eyelink_last_message(), \\c eyelink_send_command() and \\c eyelink_timed_command()"]
4252 pub fn eyelink_command_result() -> INT16;
4253}
4254extern "C" {
4255 #[doc = " @ingroup messaging"]
4256 #[doc = "Sends a command to the connected eye tracker, wait for reply."]
4257 #[doc = ""]
4258 #[doc = "@remarks If \\c eyelink_send_command() is used, the text command will be executed, and a result"]
4259 #[doc = "code returned that can be read with \\c eyelink_command_result()."]
4260 #[doc = "@param text String command to send."]
4261 #[doc = "@param msec Maximum milliseconds to wait for reply."]
4262 #[doc = "@return <tt>OK_RESULT (0)</tt> if OK.\\n"]
4263 #[doc = "\\c NO_REPLY if timed out.\\n"]
4264 #[doc = "\\c LINK_TERMINATED_RESULT if cannot send.\\n"]
4265 #[doc = "other error codes represent tracker execution error.\\n"]
4266 #[doc = ""]
4267 #[doc = "\\b Example:"]
4268 #[doc = "<pre>"]
4269 #[doc = "\\code"]
4270 #[doc = ""]
4271 #[doc = "#include <eyelink.h>"]
4272 #[doc = ""]
4273 #[doc = "INT16 error;"]
4274 #[doc = "char buf[256];"]
4275 #[doc = ""]
4276 #[doc = "error = eyelink_timed_command(1000, \"button_function 5"]
4277 #[doc = "'accept_target_fixation'\");"]
4278 #[doc = ""]
4279 #[doc = "if (error)"]
4280 #[doc = "{"]
4281 #[doc = "eyelink_last_message(buf);"]
4282 #[doc = "eyemsg_printf(\"Error in excuting the command: %s\", buf);"]
4283 #[doc = "}"]
4284 #[doc = "\\endcode"]
4285 #[doc = "</pre>"]
4286 #[doc = "\\sa \\c eyelink_command_result() and \\c eyelink_send_command()"]
4287 pub fn eyelink_timed_command(msec: UINT32, text: *mut ::std::os::raw::c_char) -> INT16;
4288}
4289extern "C" {
4290 #[doc = " @ingroup messaging"]
4291 #[doc = "Checks for and gets the last packet received, stores the data and the node address sent from."]
4292 #[doc = ""]
4293 #[doc = "@param buf String buffer to return text message."]
4294 #[doc = "@return \\c 0 if no message since last command sent, otherwise length of string."]
4295 #[doc = ""]
4296 #[doc = "\\b Example: See \\c eyelink_timed_command()"]
4297 #[doc = ""]
4298 #[doc = "\\sa \\c eyelink_send_command() and \\c eyelink_timed_command()"]
4299 pub fn eyelink_last_message(buf: *mut ::std::os::raw::c_char) -> INT16;
4300}
4301extern "C" {
4302 #[doc = " @ingroup messaging"]
4303 #[doc = "Sends a text message the connected eye tracker. The text will be added to the EDF file."]
4304 #[doc = ""]
4305 #[doc = "@param msg Text to send to the tracker."]
4306 #[doc = "@return \\c 0 if no error, else link error code."]
4307 #[doc = ""]
4308 #[doc = "\\b Example: See \\c eyelink_quiet_mode()"]
4309 #[doc = ""]
4310 #[doc = "\\sa \\c eyelink_node_send_message(), \\c eyelink_quiet_mode() and \\c set_eyelink_address()"]
4311 pub fn eyelink_send_message(msg: *mut ::std::os::raw::c_char) -> INT16;
4312}
4313extern "C" {
4314 #[doc = " @ingroup messaging"]
4315 #[doc = "Sends a text message the connected eye tracker. The text will be added to the EDF file."]
4316 #[doc = ""]
4317 #[doc = "@remarks NEW (v2.1): If the link is initialized but not connected to a tracker, the"]
4318 #[doc = "message will be sent to the tracker set by \\c set_eyelink_address()."]
4319 #[doc = "@param msg Text to send to the tracker."]
4320 #[doc = "@param node Address of the tracker."]
4321 #[doc = "@return \\c 0 if no error, else link error code."]
4322 #[doc = ""]
4323 #[doc = "\\b Example: See \\c eyelink_quiet_mode()"]
4324 #[doc = ""]
4325 #[doc = "\\sa \\c eyelink_send_message(), \\c eyelink_quiet_mode() and \\c set_eyelink_address()"]
4326 pub fn eyelink_node_send_message(node: *mut byte, msg: *mut ::std::os::raw::c_char) -> INT16;
4327}
4328extern "C" {
4329 #[doc = " @ingroup messaging"]
4330 #[doc = "Send a data file message string to connected tracker with time offset."]
4331 #[doc = "@param exectime time offset. If the offset is 0, this function is the same as eyelink_send_message()"]
4332 #[doc = "@param msg Message to be sent"]
4333 #[doc = "@return \\c OK_RESULT or \\c LINK_TERMINATED_RESULT."]
4334 #[doc = "@sa eyemsg_printf_ex(), eyelink_send_message()"]
4335 pub fn eyelink_send_message_ex(exectime: UINT32, msg: *mut ::std::os::raw::c_char) -> INT16;
4336}
4337extern "C" {
4338 #[doc = " @ingroup messaging"]
4339 #[doc = "Send a data file message to any or all trackers with time offset."]
4340 #[doc = "@param exectime time offset. If the offset is 0, this function is the same as eyelink_node_send_message()"]
4341 #[doc = "@param node Node address"]
4342 #[doc = "@param msg Message to be sent"]
4343 #[doc = "@return \\c OK_RESULT or \\c LINK_TERMINATED_RESULT."]
4344 #[doc = "@sa eyelink_node_send_message()"]
4345 pub fn eyelink_node_send_message_ex(
4346 exectime: UINT32,
4347 node: *mut byte,
4348 msg: *mut ::std::os::raw::c_char,
4349 ) -> INT16;
4350}
4351extern "C" {
4352 #[doc = " @ingroup messaging"]
4353 #[doc = "Sends a text variable name whose value is to be read and returned by the tracker as a text string."]
4354 #[doc = ""]
4355 #[doc = "@remarks NEW (v2.1): If the link is initialized but not connected to a tracker, the message will"]
4356 #[doc = "be sent to the tracker set by \\c set_eyelink_address(). However, these requests will be"]
4357 #[doc = "ignored by tracker versions older than EyeLink I v2.1 and EyeLink II v1.1."]
4358 #[doc = "@param text String with message to send."]
4359 #[doc = "@return \\c 0 if success, otherwise link error code."]
4360 #[doc = ""]
4361 #[doc = "\\b Example:"]
4362 #[doc = "<pre>"]
4363 #[doc = "\\code"]
4364 #[doc = ""]
4365 #[doc = "int read_tracker_pixel_coords(void)"]
4366 #[doc = "{"]
4367 #[doc = "char buf[100] = \"\";"]
4368 #[doc = "UINT32 t;"]
4369 #[doc = ""]
4370 #[doc = "if(!eyelink_is_connected() || break_pressed())"]
4371 #[doc = "return 1;"]
4372 #[doc = ""]
4373 #[doc = "eyelink_read_request(\"screen_pixel_coords\");"]
4374 #[doc = ""]
4375 #[doc = "t = current_msec();"]
4376 #[doc = "while(current_msec()-t < 500)"]
4377 #[doc = "{"]
4378 #[doc = "if(eyelink_read_reply(buf) == OK_RESULT)"]
4379 #[doc = "{"]
4380 #[doc = "eyemsg_printf(\"%s\", buf);"]
4381 #[doc = "return 0;"]
4382 #[doc = "}"]
4383 #[doc = "message_pump(NULL); // Keeps Windows happy"]
4384 #[doc = "if(!eyelink_is_connected) return 1;"]
4385 #[doc = "if(break_pressed()) return 1;"]
4386 #[doc = "}"]
4387 #[doc = "return -1; // Timed out"]
4388 #[doc = "}"]
4389 #[doc = "\\endcode"]
4390 #[doc = "</pre>"]
4391 #[doc = "\\b Output:"]
4392 #[doc = "<pre>"]
4393 #[doc = "\\code"]
4394 #[doc = "MSG\t374986 0.000000,0.000000,1023.000000,767.000000"]
4395 #[doc = "\\endcode"]
4396 #[doc = "</pre>"]
4397 #[doc = "\\sa \\c eyelink_read_reply()"]
4398 pub fn eyelink_read_request(text: *mut ::std::os::raw::c_char) -> INT16;
4399}
4400extern "C" {
4401 #[doc = " @ingroup messaging"]
4402 #[doc = "Returns text with reply to last read request."]
4403 #[doc = ""]
4404 #[doc = "@param buf String to contain text."]
4405 #[doc = "@return <tt>OK_RESULT (0)</tt> if response received.\\n"]
4406 #[doc = "\\c NO_REPLY if no response yet."]
4407 #[doc = ""]
4408 #[doc = "\\b Example: See \\c eyelink_read_request()"]
4409 #[doc = ""]
4410 #[doc = "\\sa \\c eyelink_read_request()"]
4411 pub fn eyelink_read_reply(buf: *mut ::std::os::raw::c_char) -> INT16;
4412}
4413extern "C" {
4414 #[doc = " @ingroup access_time_tracker"]
4415 #[doc = "Sends a request the connected eye tracker to return its current time."]
4416 #[doc = ""]
4417 #[doc = "@remarks The time reply can be read with \\c eyelink_read_time()."]
4418 #[doc = "@return \\c 0 if no error, else link error code."]
4419 #[doc = ""]
4420 #[doc = "\\b Example:"]
4421 #[doc = "<pre>"]
4422 #[doc = "\\code"]
4423 #[doc = ""]
4424 #[doc = "#include <eyelink.h>"]
4425 #[doc = ""]
4426 #[doc = "UINT32 current_tracker_time()"]
4427 #[doc = "{"]
4428 #[doc = "UINT32 time_subject=0, time_tracker=0;"]
4429 #[doc = ""]
4430 #[doc = "eyelink_request_time(); // request the tracker PC time"]
4431 #[doc = "time_subject = current_msec();"]
4432 #[doc = "while(!time_tracker && current_msec() -time_subject < 50)"]
4433 #[doc = "time_tracker = eyelink_read_time(); // read tracker PC time"]
4434 #[doc = ""]
4435 #[doc = "return time_tracker;"]
4436 #[doc = "}"]
4437 #[doc = "\\endcode"]
4438 #[doc = "</pre>"]
4439 #[doc = "\\sa \\c eyelink_node_request_time() and \\c eyelink_read_time()"]
4440 #[doc = "@deprecated This function is depricated. It is left for compatibility reasons."]
4441 pub fn eyelink_request_time() -> UINT32;
4442}
4443extern "C" {
4444 #[doc = " @ingroup access_time_tracker"]
4445 #[doc = "Sends a request the connected eye tracker to return its current time."]
4446 #[doc = ""]
4447 #[doc = "@remarks The time reply can be read with \\c eyelink_read_time()."]
4448 #[doc = "@param node Address of a specific tracker."]
4449 #[doc = "@return \\c 0 if no error, else link error code."]
4450 #[doc = ""]
4451 #[doc = "\\b Example: See \\c eyelink_request_time()"]
4452 #[doc = ""]
4453 #[doc = "\\sa \\c eyelink_request_time() and \\c eyelink_read_time()"]
4454 pub fn eyelink_node_request_time(node: *mut byte) -> UINT32;
4455}
4456extern "C" {
4457 #[doc = " @ingroup access_time_tracker"]
4458 #[doc = "Returns the tracker time requested by \\c eyelink_request_time() or \\c eyelink_node_request_time()."]
4459 #[doc = ""]
4460 #[doc = "@return \\c 0 if no response yet, else timestamp in millisecond."]
4461 #[doc = ""]
4462 #[doc = "\\b Example: See \\c eyelink_request_time()"]
4463 #[doc = ""]
4464 #[doc = "\\sa \\c eyelink_node_request_time() and \\c eyelink_request_time()"]
4465 pub fn eyelink_read_time() -> UINT32;
4466}
4467extern "C" {
4468 #[doc = " @ingroup setup_eyelink"]
4469 #[doc = "Places EyeLink tracker in off-line (idle) mode."]
4470 #[doc = ""]
4471 #[doc = "@remarks Use before attempting to draw graphics on the tracker display,"]
4472 #[doc = "transferring files, or closing link. Always call \\c eyelink_wait_for_mode_ready()"]
4473 #[doc = "afterwards to ensure tracker has finished the mode transition. This function"]
4474 #[doc = "pair is implemented by the eyelink_exptkit library function \\c set_offline_mode()."]
4475 #[doc = "@return \\c 0 if mode switch begun, else link error."]
4476 #[doc = ""]
4477 #[doc = "\\b Example:"]
4478 #[doc = "<pre>"]
4479 #[doc = "\\code"]
4480 #[doc = ""]
4481 #[doc = "#include <eyelink.h>"]
4482 #[doc = ""]
4483 #[doc = "eyecmd_printf(\"heuristic_filter = ON\");"]
4484 #[doc = "eyelink_abort(); // stop data flow"]
4485 #[doc = "eyelink_wait_for_mode_ready(500); // wait till finished mode switch"]
4486 #[doc = "\\endcode"]
4487 #[doc = "</pre>"]
4488 #[doc = "\\sa \\c eyelink_wait_for_mode_ready() and \\c set_offline_mode()"]
4489 pub fn eyelink_abort() -> INT16;
4490}
4491extern "C" {
4492 #[doc = " @ingroup setup_eyelink"]
4493 #[doc = "Enters setup mode"]
4494 pub fn eyelink_start_setup() -> INT16;
4495}
4496extern "C" {
4497 #[doc = " @ingroup setup_eyelink"]
4498 #[doc = "Checks if tracker is still in a Setup menu activity (includes camera image view, calibration,"]
4499 #[doc = "and validation). Used to terminate the subject setup loop."]
4500 #[doc = ""]
4501 #[doc = "@return \\c 0 if no longer in setup mode."]
4502 #[doc = ""]
4503 #[doc = "\\b Example:"]
4504 #[doc = "<pre>"]
4505 #[doc = "\\code"]
4506 #[doc = ""]
4507 #[doc = "#include <eyelink.h>"]
4508 #[doc = ""]
4509 #[doc = "int current_mode;"]
4510 #[doc = "int prev_mode =0;"]
4511 #[doc = "UINT start_time = current_msec();"]
4512 #[doc = ""]
4513 #[doc = "while(current_msec() < start_time + 10000)"]
4514 #[doc = "{"]
4515 #[doc = "if(!eyelink_is_connected())"]
4516 #[doc = "return -1;"]
4517 #[doc = ""]
4518 #[doc = "current_mode =eyelink_in_setup();"]
4519 #[doc = "if (current_mode!=prev_mode)"]
4520 #[doc = "eyemsg_printf(\"%s\", current_mode?\"In setup\":\"Not in setup\");"]
4521 #[doc = ""]
4522 #[doc = "prev_mode = current_mode;"]
4523 #[doc = "}"]
4524 #[doc = "\\endcode"]
4525 #[doc = "</pre>"]
4526 #[doc = ""]
4527 #[doc = "\\b Output:"]
4528 #[doc = "<pre>"]
4529 #[doc = "\\code"]
4530 #[doc = "MSG\t905992 In setup"]
4531 #[doc = "MSG\t909596 Not in setup"]
4532 #[doc = "\\endcode"]
4533 #[doc = "</pre>"]
4534 #[doc = ""]
4535 #[doc = "\\sa \\c eyelink_current_mode()"]
4536 pub fn eyelink_in_setup() -> INT16;
4537}
4538extern "C" {
4539 #[doc = " @ingroup setup_eyelink"]
4540 #[doc = "Returns the current target position and state."]
4541 #[doc = ""]
4542 #[doc = "@param x Pointer to variable to hold target X position."]
4543 #[doc = "@param y Pointer to variable to hold target Y position."]
4544 #[doc = "@return \\c 1 if target is visible, 0 if not."]
4545 #[doc = ""]
4546 #[doc = "\\b Example:"]
4547 #[doc = "<pre>"]
4548 #[doc = "\\code"]
4549 #[doc = "INT16 target_mode_display(void)"]
4550 #[doc = "{"]
4551 #[doc = "int target_visible = 0;\t// target currently drawn"]
4552 #[doc = "INT16 tx;\t\t// new target position"]
4553 #[doc = "INT16 ty;"]
4554 #[doc = ""]
4555 #[doc = "INT16 otx=MISSING; // current target position"]
4556 #[doc = "INT16 oty=MISSING;"]
4557 #[doc = ""]
4558 #[doc = "unsigned key;\t\t// local key pressed"]
4559 #[doc = "int i;"]
4560 #[doc = "int result = NO_REPLY;"]
4561 #[doc = ""]
4562 #[doc = "while(eyelink_current_mode() & IN_TARGET_MODE)"]
4563 #[doc = "{"]
4564 #[doc = "if(!eyelink_is_connected()) return -1;"]
4565 #[doc = "key = getkey();"]
4566 #[doc = "if(key)"]
4567 #[doc = "{"]
4568 #[doc = "switch(key)"]
4569 #[doc = "{"]
4570 #[doc = "case TERMINATE_KEY: // breakout key code"]
4571 #[doc = "clear_cal_display();"]
4572 #[doc = "return TERMINATE_KEY;"]
4573 #[doc = "case 32:\t \t// Spacebar: accept fixation"]
4574 #[doc = "eyelink_accept_trigger();"]
4575 #[doc = "break;"]
4576 #[doc = "case 0: \t\t// No key"]
4577 #[doc = "case JUNK_KEY: \t// No key"]
4578 #[doc = "break;"]
4579 #[doc = "case ESC_KEY: if(eyelink_is_connected()==-1) goto exit;"]
4580 #[doc = "default: // Echo to tracker for remote control"]
4581 #[doc = "if(allow_local_control)"]
4582 #[doc = "eyelink_send_keybutton(key,0,KB_PRESS);"]
4583 #[doc = "break;"]
4584 #[doc = "}"]
4585 #[doc = "}"]
4586 #[doc = ""]
4587 #[doc = "result = eyelink_cal_result();"]
4588 #[doc = "if(result != NO_REPLY) break;"]
4589 #[doc = ""]
4590 #[doc = "i = eyelink_target_check(&tx, &ty);"]
4591 #[doc = "if( (target_visible && i==0) || tx!=otx || ty!=oty)"]
4592 #[doc = "{"]
4593 #[doc = "erase_cal_target();"]
4594 #[doc = "target_visible = 0;"]
4595 #[doc = "}"]
4596 #[doc = "if(!target_visible && i)"]
4597 #[doc = "{"]
4598 #[doc = "draw_cal_target(tx, ty);"]
4599 #[doc = ""]
4600 #[doc = "target_visible = 1;"]
4601 #[doc = "otx = tx;\t\t// record position for future tests"]
4602 #[doc = "oty = ty;"]
4603 #[doc = "}"]
4604 #[doc = "}"]
4605 #[doc = ""]
4606 #[doc = "exit:"]
4607 #[doc = ""]
4608 #[doc = "if(target_visible)"]
4609 #[doc = "erase_cal_target(); // erase target on exit"]
4610 #[doc = ""]
4611 #[doc = "clear_cal_display();"]
4612 #[doc = "return result;"]
4613 #[doc = "}"]
4614 #[doc = "\\endcode"]
4615 #[doc = "</pre>"]
4616 #[doc = "\\sa \\c eyelink_accept_trigger(), \\c eyelink_apply_driftcorr(), \\c eyelink_current_mode()"]
4617 #[doc = "and \\c eyelink_driftcorr_start()"]
4618 pub fn eyelink_target_check(x: *mut INT16, y: *mut INT16) -> INT16;
4619}
4620extern "C" {
4621 #[doc = " @ingroup setup_eyelink"]
4622 #[doc = "Returns the current target position and state. Same as eyelink_target_check() except this function returns data in floating point values."]
4623 #[doc = ""]
4624 #[doc = "@param x Pointer to variable to hold target X position."]
4625 #[doc = "@param y Pointer to variable to hold target Y position."]
4626 #[doc = "@return \\c 1 if target is visible, 0 if not."]
4627 pub fn eyelink_target_checkf(x: *mut f32, y: *mut f32) -> INT16;
4628}
4629extern "C" {
4630 #[doc = " @ingroup setup_eyelink"]
4631 #[doc = "Triggers the EyeLink tracker to accept a fixation on a target, similar to the 'Enter'"]
4632 #[doc = "key or spacebar on the tracker."]
4633 #[doc = ""]
4634 #[doc = "@return \\c NO_REPLY if drift correction not completed yet.\\n"]
4635 #[doc = "<tt>OK_RESULT (0)</tt> if success.\\n"]
4636 #[doc = "<tt>ABORT_REPLY (27)</tt> if 'ESC' key aborted operation.\\n"]
4637 #[doc = "\\c -1 if operation failed.\\n"]
4638 #[doc = "\\c 1 if poor calibration or excessive validation error."]
4639 #[doc = ""]
4640 #[doc = "\\b Example: See \\c eyelink_driftcorr_start()"]
4641 #[doc = ""]
4642 #[doc = "\\sa \\c eyelink_apply_driftcorr(), \\c eyelink_current_mode(), \\c eyelink_driftcorr_start()"]
4643 #[doc = "and \\c eyelink_target_check()"]
4644 pub fn eyelink_accept_trigger() -> INT16;
4645}
4646extern "C" {
4647 #[doc = " @ingroup setup_eyelink"]
4648 #[doc = "Sets the position of the drift correction target, and switches the tracker to"]
4649 #[doc = "drift-correction mode. Should be followed by a call to \\c eyelink_wait_for_mode_ready()."]
4650 #[doc = ""]
4651 #[doc = "@param x X position of the target."]
4652 #[doc = "@param y Y position of the target."]
4653 #[doc = "@return \\c 0 if command sent OK, else link error."]
4654 #[doc = ""]
4655 #[doc = "\\b Example:"]
4656 #[doc = "<pre>"]
4657 #[doc = "\\code"]
4658 #[doc = ""]
4659 #[doc = "#include <eyelink.h>"]
4660 #[doc = ""]
4661 #[doc = "unsigned key;"]
4662 #[doc = "int result = 0;"]
4663 #[doc = "int x, y; // position of the drift correction target"]
4664 #[doc = ""]
4665 #[doc = "if(eyelink_is_connected())"]
4666 #[doc = "{"]
4667 #[doc = "eyecmd_printf(\"heuristic_filter = ON\");"]
4668 #[doc = "..."]
4669 #[doc = "while(getkey()) {}; // dump the keys"]
4670 #[doc = ""]
4671 #[doc = "eyelink_driftcorr_start(x, y); // start the drift correction"]
4672 #[doc = "do {"]
4673 #[doc = "result = eyelink_cal_result();"]
4674 #[doc = ""]
4675 #[doc = "key = getkey();"]
4676 #[doc = "switch(key)"]
4677 #[doc = "{"]
4678 #[doc = "case TERMINATE_KEY: // breakout code"]
4679 #[doc = "return TERMINATE_KEY;"]
4680 #[doc = "case 0: \t\t// no key"]
4681 #[doc = "case JUNK_KEY: \t// no key"]
4682 #[doc = "break;"]
4683 #[doc = "case ESC_KEY: // ESC key: we flag abort from our end"]
4684 #[doc = "result = 27;"]
4685 #[doc = "break;"]
4686 #[doc = "case 32: \t\t// Spacebar: we trigger ourselves"]
4687 #[doc = "eyelink_accept_trigger();"]
4688 #[doc = "break;"]
4689 #[doc = "default:"]
4690 #[doc = "eyelink_send_keybutton(key,0,KB_PRESS);"]
4691 #[doc = "break;"]
4692 #[doc = "}"]
4693 #[doc = "} while(result == NO_REPLY);"]
4694 #[doc = ""]
4695 #[doc = "if (result != 27 && result != -1)"]
4696 #[doc = "eyelink_apply_driftcorr();"]
4697 #[doc = "else"]
4698 #[doc = "; // Other code for handling"]
4699 #[doc = ""]
4700 #[doc = "return result;"]
4701 #[doc = "}"]
4702 #[doc = "\\endcode"]
4703 #[doc = "</pre>"]
4704 #[doc = "\\sa \\c eyelink_accept_trigger() and \\c eyelink_send_keybutton()"]
4705 pub fn eyelink_driftcorr_start(x: INT16, y: INT16) -> INT16;
4706}
4707extern "C" {
4708 #[doc = " @ingroup setup_eyelink"]
4709 #[doc = "Sets the position of the drift correction target, and switches the tracker to"]
4710 #[doc = "drift-correction mode. Should be followed by a call to \\c eyelink_wait_for_mode_ready()."]
4711 #[doc = "Same as eyelink_driftcorr_start() except the x,y parameters take floating point values."]
4712 #[doc = ""]
4713 #[doc = "@param x X position of the target."]
4714 #[doc = "@param y Y position of the target."]
4715 #[doc = "@return \\c 0 if command sent OK, else link error."]
4716 #[doc = ""]
4717 #[doc = "\\b Example:"]
4718 #[doc = "<pre>"]
4719 #[doc = "\\code"]
4720 #[doc = ""]
4721 #[doc = "#include <eyelink.h>"]
4722 #[doc = ""]
4723 #[doc = "unsigned key;"]
4724 #[doc = "int result = 0;"]
4725 #[doc = "int x, y; // position of the drift correction target"]
4726 #[doc = ""]
4727 #[doc = "if(eyelink_is_connected())"]
4728 #[doc = "{"]
4729 #[doc = "eyecmd_printf(\"heuristic_filter = ON\");"]
4730 #[doc = "..."]
4731 #[doc = "while(getkey()) {}; // dump the keys"]
4732 #[doc = ""]
4733 #[doc = "eyelink_driftcorr_start(x, y); // start the drift correction"]
4734 #[doc = "do {"]
4735 #[doc = "result = eyelink_cal_result();"]
4736 #[doc = ""]
4737 #[doc = "key = getkey();"]
4738 #[doc = "switch(key)"]
4739 #[doc = "{"]
4740 #[doc = "case TERMINATE_KEY: // breakout code"]
4741 #[doc = "return TERMINATE_KEY;"]
4742 #[doc = "case 0: \t\t// no key"]
4743 #[doc = "case JUNK_KEY: \t// no key"]
4744 #[doc = "break;"]
4745 #[doc = "case ESC_KEY: // ESC key: we flag abort from our end"]
4746 #[doc = "result = 27;"]
4747 #[doc = "break;"]
4748 #[doc = "case 32: \t\t// Spacebar: we trigger ourselves"]
4749 #[doc = "eyelink_accept_trigger();"]
4750 #[doc = "break;"]
4751 #[doc = "default:"]
4752 #[doc = "eyelink_send_keybutton(key,0,KB_PRESS);"]
4753 #[doc = "break;"]
4754 #[doc = "}"]
4755 #[doc = "} while(result == NO_REPLY);"]
4756 #[doc = ""]
4757 #[doc = "if (result != 27 && result != -1)"]
4758 #[doc = "eyelink_apply_driftcorr();"]
4759 #[doc = "else"]
4760 #[doc = "; // Other code for handling"]
4761 #[doc = ""]
4762 #[doc = "return result;"]
4763 #[doc = "}"]
4764 #[doc = "\\endcode"]
4765 #[doc = "</pre>"]
4766 #[doc = "\\sa \\c eyelink_accept_trigger() and \\c eyelink_send_keybutton()"]
4767 pub fn eyelink_driftcorr_startf(x: f32, y: f32) -> INT16;
4768}
4769extern "C" {
4770 #[doc = " @ingroup setup_eyelink"]
4771 #[doc = "Checks for a numeric result code returned by calibration, validation, or drift correction."]
4772 #[doc = ""]
4773 #[doc = "@return \\c NO_REPLY if drift correction not completed yet.\\n"]
4774 #[doc = "<tt>OK_RESULT (0)</tt> if success.\\n"]
4775 #[doc = "<tt>ABORT_REPLY (27)</tt> if 'ESC' key aborted operation.\\n"]
4776 #[doc = "\\c -1 if operation failed.\\n"]
4777 #[doc = "\\c 1 if poor calibration or excessive validation error.\\n"]
4778 #[doc = ""]
4779 #[doc = "\\b Example: See \\c eyelink_driftcorr_start()"]
4780 #[doc = ""]
4781 #[doc = "\\sa \\c eyelink_accept_trigger(), \\c eyelink_apply_driftcorr(), \\c eyelink_cal_message() and"]
4782 #[doc = "\\c eyelink_driftcorr_start()"]
4783 pub fn eyelink_cal_result() -> INT16;
4784}
4785extern "C" {
4786 #[doc = " @ingroup setup_eyelink"]
4787 #[doc = "Applies the results of the last drift correction. This is not done automatically after a"]
4788 #[doc = "drift correction, allowing the message returned by \\c eyelink_cal_message() to be examined first."]
4789 #[doc = ""]
4790 #[doc = "@return \\c 0 if command sent OK, else link error."]
4791 #[doc = ""]
4792 #[doc = "\\b Example: See \\c eyelink_driftcorr_start()"]
4793 #[doc = ""]
4794 #[doc = "\\sa \\c eyelink_accept_trigger(), \\c eyelink_cal_result(), \\c eyelink_current_mode(), \\c eyelink_driftcorr_start()"]
4795 #[doc = "and \\c eyelink_target_check()"]
4796 pub fn eyelink_apply_driftcorr() -> INT16;
4797}
4798extern "C" {
4799 #[doc = " @ingroup setup_eyelink"]
4800 #[doc = "Returns text associated with result of last calibration, validation, or drift correction."]
4801 #[doc = "This usually specifies errors or other statistics."]
4802 #[doc = ""]
4803 #[doc = "@param msg Buffer to return back the message."]
4804 #[doc = "@return \\c 0 if no message since last command sent, else length of string."]
4805 #[doc = ""]
4806 #[doc = "\\b Example:"]
4807 #[doc = "<pre>"]
4808 #[doc = "\\code"]
4809 #[doc = "#include <eyelink.h>"]
4810 #[doc = "char message[256];"]
4811 #[doc = ""]
4812 #[doc = "while(1)"]
4813 #[doc = "{ // Check link often so we can exit if tracker stopped"]
4814 #[doc = "if(!eyelink_is_connected()) return ABORT_EXPT;"]
4815 #[doc = ""]
4816 #[doc = "error = do_drift_correct(SCRWIDTH/2, SCRHEIGHT/2, 1, 1);"]
4817 #[doc = ""]
4818 #[doc = "if(error!=27) break;"]
4819 #[doc = "}"]
4820 #[doc = "eyelink_cal_message(message);"]
4821 #[doc = "eyemsg_printf(message);"]
4822 #[doc = "\\endcode"]
4823 #[doc = "</pre>"]
4824 #[doc = "\\b Output:"]
4825 #[doc = "<pre>"]
4826 #[doc = "\\code"]
4827 #[doc = "MSG\t1896559 DRIFTCORRECT R RIGHT at 320,40 OFFSET 0.11 deg. -1.0,-4.0 pix."]
4828 #[doc = "MSG\t1896560 drift_correction: 0.11 -1.00 -4.00"]
4829 #[doc = "\\endcode"]
4830 #[doc = "</pre>"]
4831 #[doc = "\\sa \\c eyelink_accept_trigger(), \\c eyelink_apply_driftcorr() and \\c eyelink_cal_result()"]
4832 pub fn eyelink_cal_message(msg: *mut ::std::os::raw::c_char) -> INT16;
4833}
4834extern "C" {
4835 #[doc = " @ingroup eyelink_mode"]
4836 #[doc = "This function tests the current tracker mode, and returns a set of flags based of"]
4837 #[doc = "what the mode is doing. The most useful flag using the EXPTSPPT toolkit is \\c IN_USER_MENU"]
4838 #[doc = "to test if the EyeLink Abort menu has been activated."]
4839 #[doc = ""]
4840 #[doc = "@return Set of bitflags that mark mode function:"]
4841 #[doc = "\\c IN_DISCONNECT_MODE if disconnected."]
4842 #[doc = "\\c IN_IDLE_MODE if off-line (Idle mode)."]
4843 #[doc = "\\c IN_SETUP_MODE if in Setup-menu related mode."]
4844 #[doc = "\\c IN_RECORD_MODE if tracking is in progress."]
4845 #[doc = "\\c IN_PLAYBACK_MODE if currently playing back data."]
4846 #[doc = "\\c IN_TARGET_MODE if in mode that requires a fixation target."]
4847 #[doc = "\\c IN_DRIFTCORR_MODE if in drift-correction."]
4848 #[doc = "\\c IN_IMAGE_MODE if displaying grayscale camera image."]
4849 #[doc = "\\c IN_USER_MENU if displaying Abort or user-defined menu."]
4850 #[doc = ""]
4851 #[doc = ""]
4852 #[doc = "\\b Example: See \\c echo_key()"]
4853 #[doc = ""]
4854 #[doc = "\\sa \\c echo_key(), \\c eyelink_tracker_mode() and \\c eyelink_user_menu_selection()"]
4855 pub fn eyelink_current_mode() -> INT16;
4856}
4857extern "C" {
4858 #[doc = " @ingroup eyelink_mode"]
4859 #[doc = "Returns raw EyeLink mode numbers, defined in eyelink.h as EL_xxxx definitions."]
4860 #[doc = ""]
4861 #[doc = "@return Raw EyeLink mode, \\c -1 if link disconnected"]
4862 #[doc = ""]
4863 #[doc = "\\b Example:"]
4864 #[doc = "<pre>"]
4865 #[doc = "\\code"]
4866 #[doc = ""]
4867 #[doc = "#include <eyelink.h>"]
4868 #[doc = ""]
4869 #[doc = "void track_mode_loop(void)"]
4870 #[doc = "{"]
4871 #[doc = "int oldmode = -1;"]
4872 #[doc = ""]
4873 #[doc = "while(eyelink_is_connected())"]
4874 #[doc = "{"]
4875 #[doc = "int mode = eyelink_tracker_mode();"]
4876 #[doc = "unsigned key = getkey();"]
4877 #[doc = ""]
4878 #[doc = "if(key==27 || break_pressed() || !eyelink_is_connected())"]
4879 #[doc = "return;"]
4880 #[doc = "else if(key) // Echo to tracker"]
4881 #[doc = "eyelink_send_keybutton(key,0,KB_PRESS);"]
4882 #[doc = ""]
4883 #[doc = "if(mode == oldmode)"]
4884 #[doc = "continue;"]
4885 #[doc = "switch(mode)"]
4886 #[doc = "{"]
4887 #[doc = "case EL_RECORD_MODE: // Recording mode"]
4888 #[doc = "break;"]
4889 #[doc = "case EL_IMAGE_MODE: // Image mode"]
4890 #[doc = "break;"]
4891 #[doc = "case EL_SETUP_MENU_MODE: // Setup menu mode"]
4892 #[doc = "break;"]
4893 #[doc = "case EL_CALIBRATE_MODE: // Calibration, validation, DC mode"]
4894 #[doc = "case EL_VALIDATE_MODE:"]
4895 #[doc = "case EL_DRIFT_CORR_MODE:"]
4896 #[doc = "break;"]
4897 #[doc = "case EL_OPTIONS_MENU_MODE: // Option menu mode"]
4898 #[doc = "break;"]
4899 #[doc = "default:"]
4900 #[doc = "break;"]
4901 #[doc = "}"]
4902 #[doc = "oldmode = mode;"]
4903 #[doc = "}"]
4904 #[doc = "}"]
4905 #[doc = "\\endcode"]
4906 #[doc = "</pre>"]
4907 #[doc = ""]
4908 #[doc = "\\sa \\c eyelink_current_mode() and \\c eyelink_is_connected()"]
4909 pub fn eyelink_tracker_mode() -> INT16;
4910}
4911extern "C" {
4912 #[doc = " @ingroup eyelink_mode"]
4913 #[doc = "After a mode-change command is given to the EyeLink tracker, an additional"]
4914 #[doc = "5 to 30 milliseconds may be needed to complete mode setup. Call this function"]
4915 #[doc = "after mode change functions."]
4916 #[doc = ""]
4917 #[doc = "@remarks If it does not return \\c 0, assume a tracker error has occurred."]
4918 #[doc = "@param maxwait Maximum milliseconds to wait for the mode to change."]
4919 #[doc = "@return \\c 0 if mode switching is done, else still waiting."]
4920 #[doc = ""]
4921 #[doc = "\\b Example: See \\c eyelink_data_start()"]
4922 #[doc = ""]
4923 #[doc = "\\sa \\c eyelink_data_start() and \\c set_offline_mode()"]
4924 pub fn eyelink_wait_for_mode_ready(maxwait: UINT32) -> INT16;
4925}
4926extern "C" {
4927 #[doc = " @ingroup eyelink_mode"]
4928 #[doc = "Checks for a user-menu selection, clears response for next call."]
4929 #[doc = ""]
4930 #[doc = "@return \\c 0 if no selection made since last call, else code of selection."]
4931 #[doc = ""]
4932 #[doc = "\\b Example:"]
4933 #[doc = "<pre>"]
4934 #[doc = "\\code"]
4935 #[doc = ""]
4936 #[doc = "#include <eyelink.h>"]
4937 #[doc = "int i;"]
4938 #[doc = ""]
4939 #[doc = "i = eyelink_current_mode();"]
4940 #[doc = "if(i & IN_USER_MENU) // handle user menu selections"]
4941 #[doc = "{"]
4942 #[doc = "switch(eyelink_user_menu_selection()"]
4943 #[doc = "{"]
4944 #[doc = "case 1: // SETUP selected"]
4945 #[doc = "break;"]
4946 #[doc = "case 2: // REPEAT trial"]
4947 #[doc = "return REPEAT_TRIAL;"]
4948 #[doc = "case 3:\t// SKIP trial"]
4949 #[doc = "return SKIP_TRIAL;"]
4950 #[doc = "case 4:\t// Abort experiment"]
4951 #[doc = "eyelink_abort();// this cleans up by erasing menu"]
4952 #[doc = "return ABORT_EXPT;"]
4953 #[doc = "default:\t// no selection: continue"]
4954 #[doc = "break;"]
4955 #[doc = "}"]
4956 #[doc = "}"]
4957 #[doc = "\\endcode"]
4958 #[doc = "</pre>"]
4959 #[doc = "\\sa \\c eyelink_current_mode()"]
4960 pub fn eyelink_user_menu_selection() -> INT16;
4961}
4962extern "C" {
4963 #[doc = " @ingroup messaging"]
4964 #[doc = "Returns the divisor used to convert integer eye data to floating point data."]
4965 #[doc = ""]
4966 #[doc = "@return Divisor (usually 10)."]
4967 #[doc = ""]
4968 #[doc = "\\b Example:"]
4969 #[doc = "<pre>"]
4970 #[doc = "\\code"]
4971 #[doc = ""]
4972 #[doc = "#include <eyelink.h>"]
4973 #[doc = "UINT32 start_time;"]
4974 #[doc = ""]
4975 #[doc = "eyecmd_printf(\"screen_write_prescale = 10\");"]
4976 #[doc = ""]
4977 #[doc = "start_time = current_msec();"]
4978 #[doc = "while(current_msec() < start + 1000)"]
4979 #[doc = "if (eyelink_command_result() == OK_RESULT)"]
4980 #[doc = "{"]
4981 #[doc = "eyemsg_printf(\"Position scalar %d\","]
4982 #[doc = "eyelink_position_prescaler());"]
4983 #[doc = "break;"]
4984 #[doc = "}"]
4985 #[doc = "\\endcode"]
4986 #[doc = "</pre>"]
4987 pub fn eyelink_position_prescaler() -> INT16;
4988}
4989extern "C" {
4990 #[doc = " @ingroup messaging"]
4991 #[doc = "Prepares link buffers to receive new data. If \\c <clear> is nonzero, removes old data from buffer."]
4992 #[doc = ""]
4993 #[doc = "@param clear If clear is non-zero, any buffer data is discarded."]
4994 #[doc = "@return Always returns \\c 0."]
4995 #[doc = ""]
4996 #[doc = "\\b Example: See \\c eyelink_in_data_block()"]
4997 #[doc = ""]
4998 #[doc = "\\sa \\c eyelink_data_status() and \\c eyelink_in_data_block()"]
4999 pub fn eyelink_reset_data(clear: INT16) -> INT16;
5000}
5001extern "C" {
5002 pub fn eyelink_data_status() -> *mut ::std::os::raw::c_void;
5003}
5004extern "C" {
5005 #[doc = " @ingroup recording"]
5006 #[doc = "Checks to see if framing events read from queue indicate that the data"]
5007 #[doc = "is in a block containing samples, events, or both."]
5008 #[doc = ""]
5009 #[doc = "@remarks The first item in queue may not be a block start even, so this should"]
5010 #[doc = "be used in a loop while discarding items using \\c eyelink_get_next_data(NULL)."]
5011 #[doc = "NOTE: this function did not work reliably in versions of the SLL before"]
5012 #[doc = "v2.0 (did not detect end of blocks)."]
5013 #[doc = "@param samples If non-zero, check if in a block with samples."]
5014 #[doc = "@param events If non-zero, check if in a block with events."]
5015 #[doc = "@return \\c 0 if no data of either masked type is being sent."]
5016 #[doc = ""]
5017 #[doc = "\\b Example:"]
5018 #[doc = "<pre>"]
5019 #[doc = "\\code"]
5020 #[doc = ""]
5021 #[doc = "#include <eyelink.h>"]
5022 #[doc = "#include <stdio.h>"]
5023 #[doc = ""]
5024 #[doc = "if(open_eyelink_connection(-1))"]
5025 #[doc = "return -1;"]
5026 #[doc = ""]
5027 #[doc = "..."]
5028 #[doc = ""]
5029 #[doc = "if(eyelink_broadcast_open())"]
5030 #[doc = "{"]
5031 #[doc = "printf(\"Cannot open broadcast connection to tracker\");"]
5032 #[doc = "return -1;"]
5033 #[doc = "}"]
5034 #[doc = "eyelink_reset_data(1);"]
5035 #[doc = ""]
5036 #[doc = "eyelink_data_switch(RECORD_LINK_SAMPLES | RECORD_LINK_EVENTS);"]
5037 #[doc = ""]
5038 #[doc = "while(eyelink_is_connected())"]
5039 #[doc = "{"]
5040 #[doc = "if(escape_pressed() || break_pressed()) return;"]
5041 #[doc = ""]
5042 #[doc = "i = eyelink_get_next_data(NULL);"]
5043 #[doc = "if(i == 0) continue;"]
5044 #[doc = ""]
5045 #[doc = "if(eyelink_in_data_block(1, 1))"]
5046 #[doc = "{"]
5047 #[doc = "..."]
5048 #[doc = "}"]
5049 #[doc = "}"]
5050 #[doc = "\\endcode"]
5051 #[doc = "</pre>"]
5052 #[doc = ""]
5053 #[doc = "\\sa \\c eyelink_data_status() and \\c eyelink_wait_for_block_start()"]
5054 pub fn eyelink_in_data_block(samples: INT16, events: INT16) -> INT16;
5055}
5056extern "C" {
5057 #[doc = " @ingroup recording"]
5058 #[doc = "Reads and discards events in data queue until in a recording block. Waits for up to"]
5059 #[doc = "\\c <timeout> milliseconds for a block containing samples, events, or both to be"]
5060 #[doc = "opened. Items in the queue are discarded until the block start events are found and"]
5061 #[doc = "processed. This function will fail if both samples and events are selected but only"]
5062 #[doc = "one of link samples and events were enabled by \\c start_recording()."]
5063 #[doc = ""]
5064 #[doc = "@remarks This function did not work in versions previous to 2.0."]
5065 #[doc = "@param maxwait Time in milliseconds to wait."]
5066 #[doc = "@param samples If non-zero, check if in a block with samples."]
5067 #[doc = "@param events If non-zero, check if in a block with events."]
5068 #[doc = "@return \\c 0 if time expired without any data of masked types available."]
5069 #[doc = ""]
5070 #[doc = "\\b Example:"]
5071 #[doc = "<pre>"]
5072 #[doc = "\\code"]
5073 #[doc = ""]
5074 #[doc = "#include <eyelink.h>"]
5075 #[doc = "#include <stdio.h>"]
5076 #[doc = ""]
5077 #[doc = "if(start_recording(1,1,1,1)!= 0)"]
5078 #[doc = "return -1; // ERROR: couldn't start recording"]
5079 #[doc = ""]
5080 #[doc = "begin_realtime_mode(100);"]
5081 #[doc = ""]
5082 #[doc = "if(!eyelink_wait_for_block_start(100, 1, 0))"]
5083 #[doc = "{"]
5084 #[doc = "printf(\"ERROR: No link samples received!\");"]
5085 #[doc = "return TRIAL_ERROR;"]
5086 #[doc = "}"]
5087 #[doc = ""]
5088 #[doc = "eye_used = eyelink_eye_available();"]
5089 #[doc = "switch(eye_used) // select eye, add annotation to EDF file"]
5090 #[doc = "{"]
5091 #[doc = "case RIGHT_EYE:"]
5092 #[doc = "eyemsg_printf(\"EYE_USED 1 RIGHT\");"]
5093 #[doc = "break;"]
5094 #[doc = "case BINOCULAR: // both eye's data present: use left eye only"]
5095 #[doc = "eye_used = LEFT_EYE;"]
5096 #[doc = "case LEFT_EYE:"]
5097 #[doc = "eyemsg_printf(\"EYE_USED 0 LEFT\");"]
5098 #[doc = "break;"]
5099 #[doc = "}"]
5100 #[doc = "\\endcode"]
5101 #[doc = "</pre>"]
5102 pub fn eyelink_wait_for_block_start(maxwait: UINT32, samples: INT16, events: INT16) -> INT16;
5103}
5104extern "C" {
5105 #[doc = " @ingroup messaging"]
5106 #[doc = "Fetches next data item from link buffer. Usually called with \\c <buf> = \\c NULL,"]
5107 #[doc = "and returns the data item type. If the item is not wanted, simply ignore it."]
5108 #[doc = "Otherwise, call \\c eyelink_get_float_data() to read it into a buffer."]
5109 #[doc = ""]
5110 #[doc = "@param buf If \\c NULL, saves data, else copies integer data into buffer."]
5111 #[doc = "@return \\c 0 if no data, \\c SAMPLE_TYPE if sample, else event type."]
5112 #[doc = ""]
5113 #[doc = "\\b Example:"]
5114 #[doc = "<pre>"]
5115 #[doc = "\\code"]
5116 #[doc = ""]
5117 #[doc = "#include <eyelink.h>"]
5118 #[doc = ""]
5119 #[doc = "ALLF_DATA evt; // buffer to hold sample and event data"]
5120 #[doc = "int eye_used = -1; // indicates which eye's data to display"]
5121 #[doc = "int i;"]
5122 #[doc = ""]
5123 #[doc = "eye_used = eyelink_eye_available();"]
5124 #[doc = ""]
5125 #[doc = "switch(eye_used)"]
5126 #[doc = "{"]
5127 #[doc = "case RIGHT_EYE:"]
5128 #[doc = "eyemsg_printf(\"EYE_USED 1 RIGHT\");"]
5129 #[doc = "break;"]
5130 #[doc = "case BINOCULAR: // both eye's data present: use left eye only"]
5131 #[doc = "eye_used = LEFT_EYE;"]
5132 #[doc = "case LEFT_EYE:"]
5133 #[doc = "eyemsg_printf(\"EYE_USED 0 LEFT\");"]
5134 #[doc = "break;"]
5135 #[doc = "}"]
5136 #[doc = "while(1)"]
5137 #[doc = "{"]
5138 #[doc = "i = eyelink_get_next_data(NULL);"]
5139 #[doc = "if(i == FIXUPDATE)"]
5140 #[doc = "{"]
5141 #[doc = "eyelink_get_float_data(&evt);"]
5142 #[doc = "if(evt.fe.eye == eye_used)"]
5143 #[doc = "{"]
5144 #[doc = "eyemsg_printf(\"Fixupdate: avg_x %8.2f, y %8.2f, dur %d\","]
5145 #[doc = "evt.fe.gavx, evt.fe.gavy, evt.fe.entime-evt.fe.sttime);"]
5146 #[doc = "}"]
5147 #[doc = "}"]
5148 #[doc = "..."]
5149 #[doc = "}"]
5150 #[doc = "\\endcode"]
5151 #[doc = "</pre>"]
5152 #[doc = ""]
5153 #[doc = "\\b Output:"]
5154 #[doc = "<pre>"]
5155 #[doc = "\\code"]
5156 #[doc = "MSG\t30244970 Fixupdate: avg_x 863.10, y 244.10, dur 48"]
5157 #[doc = "MSG\t30245018 Fixupdate: avg_x 863.10, y 245.60, dur 48"]
5158 #[doc = "MSG\t30245070 Fixupdate: avg_x 863.10, y 247.30, dur 48"]
5159 #[doc = "\\endcode"]
5160 #[doc = "</pre>"]
5161 #[doc = ""]
5162 #[doc = "\\sa \\c eyelink_get_float_data(), \\c eyelink_get_last_data(), \\c eyelink_newest_float_sample()"]
5163 #[doc = "and \\c eyelink_newest_sample()"]
5164 pub fn eyelink_get_next_data(buf: *mut ::std::os::raw::c_void) -> INT16;
5165}
5166extern "C" {
5167 #[doc = " @ingroup messaging"]
5168 #[doc = "Gets an integer (unconverted) copy of the last/newest link data (sample or event)"]
5169 #[doc = "seen by \\c eyelink_get_next_data()."]
5170 #[doc = ""]
5171 #[doc = "@param buf Pointer to buffer (\\c ISAMPLE, \\c IEVENT, or \\c ALL_DATA type)."]
5172 #[doc = "@return \\c 0 if no data, \\c SAMPLE_TYPE if sample, else event type code."]
5173 #[doc = ""]
5174 #[doc = "\\b Example:"]
5175 #[doc = "<pre>"]
5176 #[doc = "\\code"]
5177 #[doc = "ALLF_DATA evt; // buffer to hold sample and event data"]
5178 #[doc = "int eye_used = -1; // indicates which eye's data to display"]
5179 #[doc = "int i;"]
5180 #[doc = "UINT32 prev_event_time = -1;"]
5181 #[doc = ""]
5182 #[doc = "i = eyelink_get_next_data(NULL); // Checks for data from link"]
5183 #[doc = "if(i == ENDFIX)\t // only process ENDFIX events"]
5184 #[doc = "{"]
5185 #[doc = "eyelink_get_float_data(&evt); // get a copy of the ENDFIX event"]
5186 #[doc = "if(evt.fe.eye == eye_used)\t// only process data from desired eye?"]
5187 #[doc = "eyemsg_printf(\"NEXT Event: %ld %ld\", evt.fe.sttime,"]
5188 #[doc = "evt.fe.entime);"]
5189 #[doc = "}"]
5190 #[doc = ""]
5191 #[doc = "i = eyelink_get_last_data(&evt);"]
5192 #[doc = "if (i == ENDFIX && evt.fe.eye == eye_used"]
5193 #[doc = "&& evt.fe.entime != prev_event_time)"]
5194 #[doc = "{"]
5195 #[doc = "eyemsg_printf(\"LAST Event: %ld %ld\", evt.fe.sttime, evt.fe.entime);"]
5196 #[doc = "prev_event_time = evt.fe.entime;"]
5197 #[doc = "}"]
5198 #[doc = "\\endcode"]
5199 #[doc = "</pre>"]
5200 #[doc = ""]
5201 #[doc = "\\b Output:"]
5202 #[doc = "<pre>"]
5203 #[doc = "\\code"]
5204 #[doc = "SFIX L 7812616"]
5205 #[doc = "SFIX R 7812616"]
5206 #[doc = "EFIX L 7812616\t7813232\t620\t 124.7\t 274.0\t 50"]
5207 #[doc = "EFIX R 7812616\t7813232\t620\t 118.2\t 262.4\t 50"]
5208 #[doc = "SSACC L 7813236"]
5209 #[doc = "SSACC R 7813236"]
5210 #[doc = "MSG\t7813254 NEXT Event: 7812616 7813232"]
5211 #[doc = "MSG\t7813254 LAST Event: 7812616 7813232"]
5212 #[doc = "\\endcode"]
5213 #[doc = "</pre>"]
5214 #[doc = "\\sa \\c eyelink_get_float_data(), \\c eyelink_get_next_data() and \\c eyelink_newest_float_sample()"]
5215 pub fn eyelink_get_last_data(buf: *mut ::std::os::raw::c_void) -> INT16;
5216}
5217extern "C" {
5218 #[doc = " @ingroup messaging"]
5219 #[doc = "Gets an integer (unconverted) copy of the last/newest link data (sample or event)"]
5220 #[doc = "seen by \\c eyelink_get_next_data()."]
5221 #[doc = ""]
5222 #[doc = "@param buf Pointer to buffer (\\c ISAMPLE, \\c ALL_DATA type)."]
5223 #[doc = "@return \\c 0 if no data, else \\c SAMPLE_TYPE."]
5224 #[doc = ""]
5225 #[doc = "\\b Example:"]
5226 #[doc = "<pre>"]
5227 #[doc = "\\code"]
5228 #[doc = "ISAMPLE isample;"]
5229 #[doc = "float x, y;\t\t // gaze position"]
5230 #[doc = ""]
5231 #[doc = "if(eyelink_newest_sample(NULL)>0) // check for new sample update"]
5232 #[doc = "{"]
5233 #[doc = "eyelink_newest_sample(&isample);"]
5234 #[doc = ""]
5235 #[doc = "if (x!=MISSING_DATA)"]
5236 #[doc = "x = ((float) isample.gx[eye_used])/((float) eyelink_position_prescaler()); // yes: get gaze position from sample"]
5237 #[doc = "else"]
5238 #[doc = "x = (float) MISSING_DATA;"]
5239 #[doc = ""]
5240 #[doc = "if (y!=MISSING_DATA)"]
5241 #[doc = "y = ((float) isample.gy[eye_used])/((float) eyelink_position_prescaler());"]
5242 #[doc = "else"]
5243 #[doc = "y = (float) MISSING_DATA;"]
5244 #[doc = ""]
5245 #[doc = "..."]
5246 #[doc = "..."]
5247 #[doc = "}"]
5248 #[doc = "\\endcode"]
5249 #[doc = "</pre>"]
5250 #[doc = ""]
5251 #[doc = "\\sa \\c eyelink_get_float_data(), \\c eyelink_get_last_data(), \\c eyelink_get_next_data(),"]
5252 #[doc = "\\c eyelink_get_sample() and \\c eyelink_newest_float_sample()"]
5253 pub fn eyelink_newest_sample(buf: *mut ::std::os::raw::c_void) -> INT16;
5254}
5255extern "C" {
5256 #[doc = " @ingroup messaging"]
5257 #[doc = "Reads the last item fetched by \\c eyelink_get_next_data() into a buffer. The event is"]
5258 #[doc = "converted to a floating-point format (\\c FSAMPLE or \\c FEVENT). This can handle both samples"]
5259 #[doc = "and events. The buffer type can be \\c ALLF_DATA for both samples and events, \\c FSAMPLE for"]
5260 #[doc = "a sample, or a specific event buffer."]
5261 #[doc = ""]
5262 #[doc = "@param buf Pointer to buffer for floating-point data: type is \\c ALLF_DATA or \\c FSAMPLE."]
5263 #[doc = "@return \\c 0 if no data, \\c SAMPLE_TYPE if sample, else event type code."]
5264 #[doc = ""]
5265 #[doc = "\\b Example: See \\c eyelink_get_next_data()"]
5266 #[doc = ""]
5267 #[doc = "\\sa \\c eyelink_get_last_data(), \\c eyelink_get_next_data(), \\c eyelink_newest_float_sample()"]
5268 #[doc = "\\c eyelink_newest_double_sample() \\c eyelink_get_double_data() and \\c eyelink_newest_sample()"]
5269 pub fn eyelink_get_float_data(buf: *mut ::std::os::raw::c_void) -> INT16;
5270}
5271extern "C" {
5272 #[doc = " @ingroup messaging"]
5273 #[doc = "Reads the last item fetched by \\c eyelink_get_next_data() into a buffer. The event is"]
5274 #[doc = "converted to a floating-point format with floating point time (\\c DSAMPLE or \\c DEVENT)."]
5275 #[doc = "This can handle both samples and events. The buffer type can be \\c ALLD_DATA for both"]
5276 #[doc = "samples and events, \\c DSAMPLE for a sample, or a specific event buffer."]
5277 #[doc = ""]
5278 #[doc = "@param buf Pointer to buffer for floating-point data: type is \\c ALLD_DATA or \\c DSAMPLE."]
5279 #[doc = "@return \\c 0 if no data, \\c SAMPLE_TYPE if sample, else event type code."]
5280 #[doc = ""]
5281 #[doc = "\\b Example: See \\c eyelink_get_next_data()"]
5282 #[doc = ""]
5283 #[doc = "\\sa \\c eyelink_get_last_data(), \\c eyelink_get_next_data(), \\c eyelink_newest_float_sample()"]
5284 #[doc = "\\c eyelink_newest_double_sample() \\c eyelink_get_float_data() and \\c eyelink_newest_sample()"]
5285 pub fn eyelink_get_double_data(buf: *mut ::std::os::raw::c_void) -> INT16;
5286}
5287extern "C" {
5288 #[doc = " @ingroup messaging"]
5289 #[doc = "Check if a new sample has arrived from the link. This is the latest sample, not the"]
5290 #[doc = "oldest sample that is read by \\c eyelink_get_next_data(), and is intended to drive gaze"]
5291 #[doc = "cursors and gaze-contingent displays."]
5292 #[doc = "Typically the function is called with a \\c NULL buffer pointer, to test if new data has"]
5293 #[doc = "arrived. If a value of \\c 1 is returned, the function is called with a \\c FSAMPLE buffer to"]
5294 #[doc = "get the new sample."]
5295 #[doc = ""]
5296 #[doc = "@param buf Pointer to sample buffer type \\c FSAMPLE. If \\c NULL, just checks new-sample status."]
5297 #[doc = "@return \\c -1 if no samples, \\c 0 if no new data, \\c 1 if new sample."]
5298 #[doc = ""]
5299 #[doc = "\\b Example:"]
5300 #[doc = "<pre>"]
5301 #[doc = "\\code"]
5302 #[doc = ""]
5303 #[doc = "Example 1:"]
5304 #[doc = "#include <eyelink.h>"]
5305 #[doc = ""]
5306 #[doc = "ALLF_DATA evt; // buffer to hold sample and event data"]
5307 #[doc = "int eye_used = 0; // indicates which eye's data to display"]
5308 #[doc = "float x, y;\t\t// gaze position"]
5309 #[doc = ""]
5310 #[doc = "error = start_recording(1,1,1,0);"]
5311 #[doc = "if(error != 0) return error; // ERROR: couldn't start recording"]
5312 #[doc = ""]
5313 #[doc = "eye_used = eyelink_eye_available();"]
5314 #[doc = ""]
5315 #[doc = "switch(eye_used)"]
5316 #[doc = "{"]
5317 #[doc = "case RIGHT_EYE:"]
5318 #[doc = "eyemsg_printf(\"EYE_USED 1 RIGHT\");"]
5319 #[doc = "break;"]
5320 #[doc = "case BINOCULAR: // both eye's data present: use left eye only"]
5321 #[doc = "eye_used = LEFT_EYE;"]
5322 #[doc = "case LEFT_EYE:"]
5323 #[doc = "eyemsg_printf(\"EYE_USED 0 LEFT\");"]
5324 #[doc = "break;"]
5325 #[doc = "}"]
5326 #[doc = "while (1)"]
5327 #[doc = "{"]
5328 #[doc = "if(eyelink_newest_float_sample(NULL)>0)"]
5329 #[doc = "{"]
5330 #[doc = "eyelink_newest_float_sample(&evt);"]
5331 #[doc = ""]
5332 #[doc = "x = evt.fs.gx[eye_used];"]
5333 #[doc = "y = evt.fs.gy[eye_used];"]
5334 #[doc = ""]
5335 #[doc = "if(x!=MISSING_DATA && y!=MISSING_DATA && evt.fs.pa[eye_used]>0)"]
5336 #[doc = "eyemsg_printf(\"Sample: %ld %8.2f %8.2f\","]
5337 #[doc = "evt.fs.time, x, y);"]
5338 #[doc = "}"]
5339 #[doc = "..."]
5340 #[doc = "}"]
5341 #[doc = "\\endcode"]
5342 #[doc = "<pre>"]
5343 #[doc = "\\b Output:"]
5344 #[doc = "<pre>"]
5345 #[doc = "\\code"]
5346 #[doc = "MSG\t23701980 EYE_USED 0 LEFT"]
5347 #[doc = "MSG\t23703426 Sample: 23703424 412.90 217.90"]
5348 #[doc = "MSG\t23703430 Sample: 23703426 433.20 216.20"]
5349 #[doc = "MSG\t23703430 Sample: 23703428 453.40 214.40"]
5350 #[doc = "MSG\t23703434 Sample: 23703430 473.60 212.60"]
5351 #[doc = "MSG\t23703434 Sample: 23703432 493.80 210.80"]
5352 #[doc = "MSG\t23703438 Sample: 23703434 514.00 209.00"]
5353 #[doc = "MSG\t23703438 Sample: 23703436 534.20 207.10"]
5354 #[doc = "MSG\t23703442 Sample: 23703438 554.30 205.20"]
5355 #[doc = "MSG\t23703442 Sample: 23703440 574.40 203.30"]
5356 #[doc = "MSG\t23703446 Sample: 23703442 594.50 201.30"]
5357 #[doc = "MSG\t23703446 Sample: 23703444 614.60 199.30"]
5358 #[doc = "MSG\t23703450 Sample: 23703446 634.70 197.20"]
5359 #[doc = "MSG\t23703450 Sample: 23703448 634.70 197.20"]
5360 #[doc = "\\endcode"]
5361 #[doc = "</pre>"]
5362 #[doc = ""]
5363 #[doc = "\\b"]
5364 #[doc = "<pre>"]
5365 #[doc = "\\code"]
5366 #[doc = "Example 2:"]
5367 #[doc = "eyecmd_printf(\"file_sample_data = LEFT,RIGHT,GAZE,AREA,HTARGET,GAZERES,STATUS,INPUT\");"]
5368 #[doc = "eyecmd_printf(\"link_sample_data = LEFT,RIGHT,GAZE,GAZERES,AREA,HTARGET,STATUS,INPUT\");"]
5369 #[doc = ""]
5370 #[doc = ""]
5371 #[doc = ""]
5372 #[doc = "if(eyelink_newest_float_sample(NULL)>0)"]
5373 #[doc = "{"]
5374 #[doc = "eyelink_newest_float_sample(&evt); // get the sample"]
5375 #[doc = ""]
5376 #[doc = "eyemsg_printf(\"remote data %d %d %d %x\", evt.fs.hdata[0], evt.fs.hdata[1], evt.fs.hdata[2], evt.fs.hdata[3]);"]
5377 #[doc = "}"]
5378 #[doc = ""]
5379 #[doc = "\\endcode"]
5380 #[doc = "</pre>"]
5381 #[doc = "\\sa \\c eyelink_get_float_data(), \\c eyelink_get_last_data(), \\c eyelink_get_next_data(),"]
5382 #[doc = "\\c eyelink_get_sample() \\c eyelink_newest_double_sample() and \\c eyelink_newest_sample()"]
5383 pub fn eyelink_newest_float_sample(buf: *mut ::std::os::raw::c_void) -> INT16;
5384}
5385extern "C" {
5386 #[doc = " @ingroup messaging"]
5387 #[doc = "Check if a new sample has arrived from the link. This is the latest sample, not the"]
5388 #[doc = "oldest sample that is read by \\c eyelink_get_next_data(), and is intended to drive gaze"]
5389 #[doc = "cursors and gaze-contingent displays."]
5390 #[doc = "Typically the function is called with a \\c NULL buffer pointer, to test if new data has"]
5391 #[doc = "arrived. If a value of \\c 1 is returned, the function is called with a \\c DSAMPLE buffer to"]
5392 #[doc = "get the new sample."]
5393 #[doc = ""]
5394 #[doc = "@param buf Pointer to sample buffer type \\c DSAMPLE. If \\c NULL, just checks new-sample status."]
5395 #[doc = "@return \\c -1 if no samples, \\c 0 if no new data, \\c 1 if new sample."]
5396 #[doc = ""]
5397 #[doc = "\\sa \\c eyelink_get_float_data(), \\c eyelink_get_last_data(), \\c eyelink_get_next_data(),"]
5398 #[doc = "\\c eyelink_get_sample() \\c eyelink_newest_float_sample() and \\c eyelink_newest_sample()"]
5399 pub fn eyelink_newest_double_sample(buf: *mut ::std::os::raw::c_void) -> INT16;
5400}
5401extern "C" {
5402 #[doc = " @ingroup messaging"]
5403 #[doc = "After calling \\c eyelink_wait_for_block_start(), or after at least one sample or"]
5404 #[doc = "eye event has been read, can be used to check which eyes data is available for."]
5405 #[doc = ""]
5406 #[doc = "@return One of these constants, defined in EYE_DATA.H:"]
5407 #[doc = "\\c LEFT_EYE if left eye data."]
5408 #[doc = "\\c RIGHT_EYE if right eye data."]
5409 #[doc = "\\c BINOCULAR if both left and right eye data."]
5410 #[doc = "\\c -1 if no eye data is available."]
5411 #[doc = ""]
5412 #[doc = "\\b Example:"]
5413 #[doc = "<pre>"]
5414 #[doc = "\\code"]
5415 #[doc = ""]
5416 #[doc = "#include <eyelink.h>"]
5417 #[doc = ""]
5418 #[doc = "int eye_used = 0; // indicates which eye's data to display"]
5419 #[doc = ""]
5420 #[doc = "eye_used = eyelink_eye_available();"]
5421 #[doc = ""]
5422 #[doc = "switch(eye_used)"]
5423 #[doc = "{"]
5424 #[doc = "case RIGHT_EYE:"]
5425 #[doc = "eyemsg_printf(\"EYE_USED 1 RIGHT\");"]
5426 #[doc = "break;"]
5427 #[doc = "case BINOCULAR: // both eye's data present: use left eye only"]
5428 #[doc = "eye_used = LEFT_EYE;"]
5429 #[doc = "case LEFT_EYE:"]
5430 #[doc = "eyemsg_printf(\"EYE_USED 0 LEFT\");"]
5431 #[doc = "break;"]
5432 #[doc = "}"]
5433 #[doc = "\\endcode"]
5434 #[doc = "</pre>"]
5435 #[doc = ""]
5436 #[doc = "\\b Output:"]
5437 #[doc = "<pre>"]
5438 #[doc = "\\code"]
5439 #[doc = "MSG\t22157314 EYE_USED 0 LEFT"]
5440 #[doc = "\\endcode"]
5441 #[doc = "</pre>"]
5442 #[doc = ""]
5443 #[doc = "\\sa \\c eyelink_wait_for_block_start()"]
5444 pub fn eyelink_eye_available() -> INT16;
5445}
5446extern "C" {
5447 #[doc = " @ingroup messaging"]
5448 #[doc = "Gets sample data content flag (\\c 0 if not in sample block)."]
5449 pub fn eyelink_sample_data_flags() -> UINT16;
5450}
5451extern "C" {
5452 #[doc = " @ingroup messaging"]
5453 #[doc = "Returns the event data content flags."]
5454 #[doc = ""]
5455 #[doc = "@remarks This will be \\c 0 if the data being read from queue is not in a block with events."]
5456 #[doc = "@return Event data content flags:"]
5457 #[doc = "\\c EVENT_VELOCITY if has velocity data."]
5458 #[doc = "\\c EVENT_PUPILSIZE if has pupil size data."]
5459 #[doc = "\\c EVENT_GAZERES if has gaze resolution."]
5460 #[doc = "\\c EVENT_STATUS if has status flags."]
5461 #[doc = "\\c EVENT_GAZEXY if has gaze xy position."]
5462 #[doc = "\\c EVENT_HREFXY if has head-ref xy position."]
5463 #[doc = "\\c EVENT_PUPILXY if has pupil xy position."]
5464 #[doc = "\\c FIX_AVG_ONLY if only avg. data to fixation events."]
5465 #[doc = "\\c START_TIME_ONLY if only start-time in start events."]
5466 #[doc = "\\c PARSEDBY_GAZE if how events were generated."]
5467 #[doc = "\\c PARSEDBY_HREF."]
5468 #[doc = "\\c PARSEDBY_PUPIL."]
5469 #[doc = ""]
5470 #[doc = "\\b Example:"]
5471 #[doc = "<pre>"]
5472 #[doc = "\\code"]
5473 #[doc = ""]
5474 #[doc = "#include <eyelink.h>"]
5475 #[doc = "#include <stdio.h>"]
5476 #[doc = "int error;"]
5477 #[doc = ""]
5478 #[doc = "error = start_recording(1,1,1,0);"]
5479 #[doc = "if(error != 0) return error; // ERROR: couldn't start recording"]
5480 #[doc = ""]
5481 #[doc = "if(!eyelink_wait_for_data(100, 1, 0))"]
5482 #[doc = "{"]
5483 #[doc = "printf(\"ERROR: No link samples received!\");"]
5484 #[doc = "return -1;"]
5485 #[doc = "}"]
5486 #[doc = ""]
5487 #[doc = "emsg_printf(\"Event data%d Event type %d\","]
5488 #[doc = "eyelink_event_data_flags(), eyelink_event_type_flags());"]
5489 #[doc = "\\endcode"]
5490 #[doc = "</pre>"]
5491 #[doc = "\\b Output:"]
5492 #[doc = "<pre>"]
5493 #[doc = "\\code"]
5494 #[doc = "MSG\t2689937 Event data 26316 Event type 29760"]
5495 #[doc = "\\endcode"]
5496 #[doc = "</pre>"]
5497 #[doc = ""]
5498 #[doc = "\\sa \\c eyelink_event_type_flags()"]
5499 pub fn eyelink_event_data_flags() -> UINT16;
5500}
5501extern "C" {
5502 #[doc = " @ingroup messaging"]
5503 #[doc = "After at least one button or eye event has been read, can be used to check what type of"]
5504 #[doc = "events will be available."]
5505 #[doc = ""]
5506 #[doc = "@return A set of bit flags:"]
5507 #[doc = "\\c LEFTEYE_EVENTS if has left eye events."]
5508 #[doc = "\\c RIGHTEYE_EVENTS if has right eye events."]
5509 #[doc = "\\c BLINK_EVENTS if has blink events."]
5510 #[doc = "\\c FIXATION_EVENTS if has fixation events."]
5511 #[doc = "\\c FIXUPDATE_EVENTS if has fixation updates."]
5512 #[doc = "\\c SACCADE_EVENTS if has saccade events."]
5513 #[doc = "\\c MESSAGE_EVENTS if has message events."]
5514 #[doc = "\\c BUTTON_EVENTS if has button events."]
5515 #[doc = "\\c INPUT_EVENTS if has input port events."]
5516 #[doc = ""]
5517 #[doc = "\\b Example: See \\c eyelink_event_data_flags()"]
5518 #[doc = ""]
5519 #[doc = "\\sa \\c eyelink_event_data_flags()"]
5520 pub fn eyelink_event_type_flags() -> UINT16;
5521}
5522extern "C" {
5523 #[doc = " @ingroup messaging"]
5524 #[doc = "Counts total items in queue: samples, events, or both."]
5525 #[doc = ""]
5526 #[doc = "@param samples If non-zero count the samples."]
5527 #[doc = "@param events If non-zero count the events."]
5528 #[doc = "@return Total number of samples and events is in the queue."]
5529 #[doc = ""]
5530 #[doc = "\\b Example:"]
5531 #[doc = "<pre>"]
5532 #[doc = "\\code"]
5533 #[doc = ""]
5534 #[doc = ""]
5535 #[doc = "int check_sample_event_status(int link_samples, int link_events)"]
5536 #[doc = "{"]
5537 #[doc = "UINT32 t = current_time();"]
5538 #[doc = "int i;"]
5539 #[doc = ""]
5540 #[doc = "while(current_time() < t + 300)"]
5541 #[doc = "{"]
5542 #[doc = "int arrived = 1;"]
5543 #[doc = "if((i=check_recording())!=0) return i;"]
5544 #[doc = ""]
5545 #[doc = "if(link_samples)"]
5546 #[doc = "if(eyelink_data_count(1,0)==0)"]
5547 #[doc = "arrived = 0;"]
5548 #[doc = ""]
5549 #[doc = "if(link_events)"]
5550 #[doc = "if(eyelink_data_count(0,1)==0)"]
5551 #[doc = "arrived = 0;"]
5552 #[doc = ""]
5553 #[doc = "if(arrived) return 0;"]
5554 #[doc = "}"]
5555 #[doc = ""]
5556 #[doc = "return -1;"]
5557 #[doc = "}"]
5558 #[doc = "\\endcode"]
5559 #[doc = "<pre>"]
5560 pub fn eyelink_data_count(samples: INT16, events: INT16) -> INT16;
5561}
5562extern "C" {
5563 #[doc = " @ingroup messaging"]
5564 #[doc = "Waits for data to be received from the eye tracker. Can wait for an event, a sample, or"]
5565 #[doc = "either. Typically used after record start to check if data is being sent."]
5566 #[doc = ""]
5567 #[doc = "@param maxwait Time in milliseconds to wait for data."]
5568 #[doc = "@param samples If \\c 1, return when first sample available."]
5569 #[doc = "@param events If \\c 1, return when first event available."]
5570 #[doc = "@return \\c 1 if data is available. \\c 0 if timed out."]
5571 #[doc = ""]
5572 #[doc = "\\b Example:"]
5573 #[doc = "<pre>"]
5574 #[doc = "\\code"]
5575 #[doc = ""]
5576 #[doc = "#include <eyelink.h>"]
5577 #[doc = "#include <stdio.h>"]
5578 #[doc = "int error;"]
5579 #[doc = ""]
5580 #[doc = "error = start_recording(1,1,1,0);"]
5581 #[doc = "if(error != 0) return error; // ERROR: couldn't start recording"]
5582 #[doc = ""]
5583 #[doc = "if(!eyelink_wait_for_data(100, 1, 0))"]
5584 #[doc = "{"]
5585 #[doc = "printf(\"ERROR: No link samples received!\");"]
5586 #[doc = "return -1;"]
5587 #[doc = "}"]
5588 #[doc = "\\endcode"]
5589 #[doc = "</pre>"]
5590 #[doc = ""]
5591 #[doc = "\\sa \\c eyelink_wait_for_block_start()"]
5592 pub fn eyelink_wait_for_data(maxwait: UINT32, samples: INT16, events: INT16) -> INT16;
5593}
5594extern "C" {
5595 #[doc = " @ingroup messaging"]
5596 #[doc = "Gets an integer (unconverted) sample from end of queue, discards any events encountered."]
5597 #[doc = ""]
5598 #[doc = "@param sample Pointer to buffer (\\c ISAMPLE or \\c ALL_DATA type)."]
5599 #[doc = "@return \\c 0 if no data. \\c 1 if data retrieved."]
5600 #[doc = ""]
5601 #[doc = "\\b Example:"]
5602 #[doc = "<pre>"]
5603 #[doc = "\\code"]
5604 #[doc = ""]
5605 #[doc = "#include <eyelink.h>"]
5606 #[doc = ""]
5607 #[doc = "ISAMPLE isample; // INTEGER SAMPLE DATA"]
5608 #[doc = "int eye_used = 0; // indicates which eye's data to display"]
5609 #[doc = "float x, y;\t\t // gaze position"]
5610 #[doc = "int i;"]
5611 #[doc = ""]
5612 #[doc = "if(!eyelink_wait_for_block_start(100, 1, 0))"]
5613 #[doc = "{"]
5614 #[doc = "end_trial();"]
5615 #[doc = "return TRIAL_ERROR;"]
5616 #[doc = "}"]
5617 #[doc = ""]
5618 #[doc = "eye_used = eyelink_eye_available();"]
5619 #[doc = "switch(eye_used) // select eye, add annotation to EDF file"]
5620 #[doc = "{"]
5621 #[doc = "case RIGHT_EYE:"]
5622 #[doc = "eyemsg_printf(\"EYE_USED 1 RIGHT\");"]
5623 #[doc = "break;"]
5624 #[doc = "case BINOCULAR: // both eye's data present: use left eye only"]
5625 #[doc = "eye_used = LEFT_EYE;"]
5626 #[doc = "case LEFT_EYE:"]
5627 #[doc = "eyemsg_printf(\"EYE_USED 0 LEFT\");"]
5628 #[doc = "break;"]
5629 #[doc = "}"]
5630 #[doc = ""]
5631 #[doc = "while(1)"]
5632 #[doc = "{"]
5633 #[doc = "i = eyelink_get_sample(&isample);"]
5634 #[doc = "if(i)"]
5635 #[doc = "{"]
5636 #[doc = "if (x!=MISSING_DATA)"]
5637 #[doc = "x = ((float) isample.gx[eye_used])/"]
5638 #[doc = "((float) eyelink_position_prescaler());"]
5639 #[doc = "else"]
5640 #[doc = "x = (float) MISSING_DATA;"]
5641 #[doc = ""]
5642 #[doc = "if (y!=MISSING_DATA)"]
5643 #[doc = "y = ((float) isample.gy[eye_used])/"]
5644 #[doc = "((float) eyelink_position_prescaler());"]
5645 #[doc = "else"]
5646 #[doc = "y = (float) MISSING_DATA;"]
5647 #[doc = ""]
5648 #[doc = "eyemsg_printf(\"Sample: %ld %6.2f %6.2f\", isample.time, x, y);"]
5649 #[doc = "}"]
5650 #[doc = ""]
5651 #[doc = "..."]
5652 #[doc = "}"]
5653 #[doc = "\\endcode"]
5654 #[doc = "</pre>"]
5655 #[doc = ""]
5656 #[doc = "\\b Output:"]
5657 #[doc = "<pre>"]
5658 #[doc = "\\code"]
5659 #[doc = "MSG\t14839670 Sample: 14839666 539.20 372.60"]
5660 #[doc = "MSG\t14839670 Sample: 14839668 539.20 372.60"]
5661 #[doc = "MSG\t14839674 Sample: 14839670 539.20 372.60"]
5662 #[doc = "MSG\t14839674 Sample: 14839672 539.20 372.60"]
5663 #[doc = "MSG\t14839678 Sample: 14839674 547.90 367.60"]
5664 #[doc = "MSG\t14839678 Sample: 14839676 556.60 362.50"]
5665 #[doc = "MSG\t14839682 Sample: 14839678 565.30 357.40"]
5666 #[doc = "MSG\t14839682 Sample: 14839680 574.10 352.30"]
5667 #[doc = "MSG\t14839686 Sample: 14839682 582.80 347.20"]
5668 #[doc = "MSG\t14839686 Sample: 14839684 591.50 342.00"]
5669 #[doc = "MSG\t14839690 Sample: 14839686 600.30 336.80"]
5670 #[doc = "MSG\t14839690 Sample: 14839688 609.00 331.60"]
5671 #[doc = "MSG\t14839694 Sample: 14839690 617.80 326.40"]
5672 #[doc = "MSG\t14839694 Sample: 14839692 626.60 321.20"]
5673 #[doc = "MSG\t14839698 Sample: 14839694 635.30 315.90"]
5674 #[doc = "MSG\t14839698 Sample: 14839696 644.10 310.70"]
5675 #[doc = "MSG\t14839702 Sample: 14839698 652.90 305.40"]
5676 #[doc = "MSG\t14839702 Sample: 14839700 661.70 300.00"]
5677 #[doc = "MSG\t14839706 Sample: 14839702 670.50 294.70"]
5678 #[doc = "MSG\t14839706 Sample: 14839704 679.30 289.40"]
5679 #[doc = "MSG\t14839710 Sample: 14839706 688.10 284.00"]
5680 #[doc = "MSG\t14839710 Sample: 14839708 696.90 278.60"]
5681 #[doc = "MSG\t14839714 Sample: 14839710 705.80 273.20"]
5682 #[doc = "MSG\t14839714 Sample: 14839712 714.60 267.70"]
5683 #[doc = "MSG\t14839718 Sample: 14839714 723.40 262.30"]
5684 #[doc = "MSG\t14839718 Sample: 14839716 732.30 256.80"]
5685 #[doc = "MSG\t14839722 Sample: 14839718 741.20 251.30"]
5686 #[doc = "MSG\t14839722 Sample: 14839720 750.00 245.80"]
5687 #[doc = "\\endcode"]
5688 #[doc = "</pre>"]
5689 #[doc = ""]
5690 #[doc = "\\sa \\c eyelink_get_float_data(), \\c eyelink_get_last_data(), \\c eyelink_get_next_data(),"]
5691 #[doc = "\\c eyelink_newest_float_sample() and \\c eyelink_newest_sample()"]
5692 pub fn eyelink_get_sample(sample: *mut ::std::os::raw::c_void) -> INT16;
5693}
5694extern "C" {
5695 #[doc = " @ingroup messaging"]
5696 #[doc = ""]
5697 #[doc = "Sets what data from tracker will be accepted and placed in queue."]
5698 #[doc = ""]
5699 #[doc = "@remarks This does not start the tracker recording, and so can be used with"]
5700 #[doc = "\\c eyelink_broadcast_open(). It also does not clear old data from the"]
5701 #[doc = "queue. The data is set with a bitwise OR of these flags:"]
5702 #[doc = "\\c RECORD_LINK_SAMPLES\t- send samples on link."]
5703 #[doc = "\\c RECORD_LINK_EVENTS\t- send events on link."]
5704 #[doc = "@param flags Bitwise OR flags."]
5705 #[doc = "@return \\c 0 if OK else link error."]
5706 #[doc = ""]
5707 #[doc = "\\b Example: See \\c eyelink_in_data_block()"]
5708 #[doc = ""]
5709 #[doc = "\\sa \\c eyelink_in_data_block()"]
5710 pub fn eyelink_data_switch(flags: UINT16) -> INT16;
5711}
5712extern "C" {
5713 #[doc = " @ingroup messaging"]
5714 #[doc = "Switches tracker to Record mode, enables data types for recording to EDF file or sending to"]
5715 #[doc = "link. These types are set with a bitwise OR of these flags:"]
5716 #[doc = "\\arg <tt>RECORD_FILE_SAMPLES (1)</tt> - only active if file open."]
5717 #[doc = "\\arg <tt>RECORD_FILE_EVENTS (2)</tt> - only active if file open."]
5718 #[doc = "\\arg <tt>RECORD_LINK_SAMPLES (4)</tt> - accept samples from link."]
5719 #[doc = "\\arg <tt>RECORD_LINK_EVENTS (8)</tt> - accept events from link."]
5720 #[doc = ""]
5721 #[doc = "@remarks If \\c <lock> is nonzero, the recording may only be terminated through"]
5722 #[doc = "\\c stop_recording() or \\c eyelink_data_stop(), or by the Abort menu"]
5723 #[doc = "(\\91Ctrl\\92 \\92Alt\\92 \\92A\\92 keys on the eye tracker). If zero, the tracker 'ESC'"]
5724 #[doc = "key may be used to halt recording."]
5725 #[doc = "@param flags Bitwise OR of flags to control what data is recorded. If \\c 0, recording will be stopped."]
5726 #[doc = "@param lock If nonzero, prevents 'ESC' key from ending recording."]
5727 #[doc = "@return \\c 0 if command sent OK, else link error."]
5728 #[doc = ""]
5729 #[doc = "\\b Example:"]
5730 #[doc = "<pre>"]
5731 #[doc = "\\code"]
5732 #[doc = ""]
5733 #[doc = "#include <eyelink.h>"]
5734 #[doc = ""]
5735 #[doc = "INT16 file_samples, file_events, link_samples, link_events;"]
5736 #[doc = ""]
5737 #[doc = "..."]
5738 #[doc = "..."]
5739 #[doc = ""]
5740 #[doc = "if(eyelink_is_connected()) \treturn ABORT_EXPT;"]
5741 #[doc = ""]
5742 #[doc = "i = eyelink_data_start((file_samples?RECORD_FILE_SAMPLES:0) |"]
5743 #[doc = "(file_events?RECORD_FILE_EVENTS:0) |"]
5744 #[doc = "(link_samples?RECORD_LINK_SAMPLES:0) |"]
5745 #[doc = "(link_events?RECORD_LINK_EVENTS:0) , 1);"]
5746 #[doc = ""]
5747 #[doc = "if(i) return i;"]
5748 #[doc = ""]
5749 #[doc = "i = eyelink_wait_for_mode_ready(500);"]
5750 #[doc = "if(i==0) return TRIAL_ERROR;"]
5751 #[doc = ""]
5752 #[doc = "if((i = check_recording())!=0)"]
5753 #[doc = "return i;"]
5754 #[doc = "..."]
5755 #[doc = "..."]
5756 #[doc = ""]
5757 #[doc = "eyelink_data_stop();"]
5758 #[doc = "eyelink_wait_for_mode_ready(500);"]
5759 #[doc = "\\endcode"]
5760 #[doc = "</pre>"]
5761 #[doc = ""]
5762 #[doc = "\\sa \\c eyelink_data_stop(), \\c start_recording() and \\c stop_recording()"]
5763 pub fn eyelink_data_start(flags: UINT16, lock: INT16) -> INT16;
5764}
5765extern "C" {
5766 #[doc = " @ingroup messaging"]
5767 #[doc = "Places tracker in idle (off-line) mode, does not flush data from queue."]
5768 #[doc = ""]
5769 #[doc = "@remarks Should be followed by a call to \\c eyelink_wait_for_mode_ready()."]
5770 #[doc = "@return \\c 0 if command sent OK, else link error."]
5771 #[doc = ""]
5772 #[doc = "\\b Example: See \\c eyelink_data_start()"]
5773 #[doc = ""]
5774 #[doc = "\\sa \\c eyelink_data_start() and \\c eyelink_wait_for_mode_ready()"]
5775 pub fn eyelink_data_stop() -> INT16;
5776}
5777extern "C" {
5778 #[doc = " @ingroup playback"]
5779 #[doc = "Flushes data from queue and starts data playback. An EDF file must be open and have at"]
5780 #[doc = "least one recorded trial. Use \\c eyelink_wait_for_data() to wait for data: this will time"]
5781 #[doc = "out if the playback failed. Playback begins from start of file or from just after the"]
5782 #[doc = "end of the next-but-last recording block. Link data is determined by file contents,"]
5783 #[doc = "not by link sample and event settings."]
5784 #[doc = ""]
5785 #[doc = "@return \\c 0 if command sent OK, else link error."]
5786 #[doc = ""]
5787 #[doc = "\\b Example:"]
5788 #[doc = "<pre>"]
5789 #[doc = "\\code"]
5790 #[doc = ""]
5791 #[doc = "#include <eyelink.h>"]
5792 #[doc = "#include <stdio.h>"]
5793 #[doc = ""]
5794 #[doc = "set_offline_mode(); // set up eye tracker for playback"]
5795 #[doc = "eyelink_playback_start(); // start data playback"]
5796 #[doc = ""]
5797 #[doc = "if(!eyelink_wait_for_block_start(2000, 1, 1))"]
5798 #[doc = "{"]
5799 #[doc = "printf(\"ERROR: playback data did not start!\");"]
5800 #[doc = "return -1;"]
5801 #[doc = "}"]
5802 #[doc = ""]
5803 #[doc = "while(1) // Loop while data available"]
5804 #[doc = "{"]
5805 #[doc = "if(escape_pressed() || break_pressed() ||"]
5806 #[doc = "eyelink_last_button_press(NULL))"]
5807 #[doc = "{"]
5808 #[doc = "eyelink_playback_stop(); // stop playback"]
5809 #[doc = "return 0;"]
5810 #[doc = "}"]
5811 #[doc = ""]
5812 #[doc = "i = eyelink_get_next_data(NULL); // check for new data item"]
5813 #[doc = "if(i==0)\t // 0: no new data"]
5814 #[doc = "{ // Checks if playback has completed"]
5815 #[doc = "if((eyelink_current_mode() & IN_PLAYBACK_MODE)==0) break;"]
5816 #[doc = "}"]
5817 #[doc = "..."]
5818 #[doc = "..."]
5819 #[doc = "}"]
5820 #[doc = ""]
5821 #[doc = "eyelink_playback_stop();"]
5822 #[doc = "\\endcode"]
5823 #[doc = "</pre>"]
5824 #[doc = ""]
5825 #[doc = "\\sa \\c eyelink_playback_stop() and \\c eyelink_wait_for_block_start()"]
5826 pub fn eyelink_playback_start() -> INT16;
5827}
5828extern "C" {
5829 #[doc = " @ingroup playback"]
5830 #[doc = "Stops playback if in progress. Flushes any data in queue."]
5831 #[doc = ""]
5832 #[doc = "@return \\c 0 if mode switched, else link error."]
5833 #[doc = ""]
5834 #[doc = "\\b Example: See \\c eyelink_playback_start()"]
5835 #[doc = ""]
5836 #[doc = "\\sa \\c eyelink_playback_start() and \\c eyelink_wait_for_block_start()"]
5837 pub fn eyelink_playback_stop() -> INT16;
5838}
5839extern "C" {
5840 #[doc = " @internal"]
5841 #[doc = ""]
5842 #[doc = "Request an image of \\c <type> with size less than or eqaul to \\c <xsize>"]
5843 #[doc = "and \\c <ysize>."]
5844 #[doc = ""]
5845 #[doc = "@return \\c 0 if sent OK, else send error code."]
5846 pub fn eyelink_request_image(type_: INT16, xsize: INT16, ysize: INT16) -> INT16;
5847}
5848extern "C" {
5849 #[doc = " @internal"]
5850 #[doc = ""]
5851 #[doc = "Test image-reception status."]
5852 #[doc = "@return \\c 0 if not receiving, \\c -1 if aborted, \\c 1 if receiving."]
5853 pub fn eyelink_image_status() -> INT16;
5854}
5855extern "C" {
5856 #[doc = " @internal"]
5857 #[doc = ""]
5858 #[doc = "Forces image transmissin to halt."]
5859 pub fn eyelink_abort_image();
5860}
5861extern "C" {
5862 #[doc = " @internal"]
5863 #[doc = "Get data at start of new image."]
5864 #[doc = "@return \\c -1 if aborted/not in receive, \\c 0 if old palette, \\c 1 if new palette."]
5865 #[doc = "ptrs to size: may be NULL"]
5866 pub fn eyelink_image_data(xsize: *mut INT16, ysize: *mut INT16, type_: *mut INT16) -> INT16;
5867}
5868extern "C" {
5869 #[doc = " @internal"]
5870 #[doc = "Gets unpacked line data."]
5871 #[doc = "@return \\c -1 if error/not rx, else line number."]
5872 pub fn eyelink_get_line(buf: *mut ::std::os::raw::c_void) -> INT16;
5873}
5874#[doc = " @internal"]
5875#[doc = ""]
5876#[doc = "image data and palette structure uses brightness ramp plus special colors"]
5877#[doc = "to compress and make remapping easier \tfits in old palette's 48-byte area"]
5878#[repr(C)]
5879#[derive(Debug, Default, Copy, Clone)]
5880pub struct IMAGE_PALDATA {
5881 pub palette_id: byte,
5882 pub ncolors: byte,
5883 pub camera: byte,
5884 pub threshold: byte,
5885 pub flags: UINT16,
5886 pub image_number: UINT16,
5887 pub extra: [byte; 10usize],
5888 pub rfirst_color: byte,
5889 pub rfirst_brite: byte,
5890 pub rlast_color: byte,
5891 pub rlast_brite: byte,
5892 pub nspecial: INT16,
5893 pub spcolors: [IMAGE_PALDATA__bindgen_ty_1; 6usize],
5894}
5895#[repr(C)]
5896#[derive(Debug, Default, Copy, Clone)]
5897pub struct IMAGE_PALDATA__bindgen_ty_1 {
5898 pub index: byte,
5899 pub r: byte,
5900 pub g: byte,
5901 pub b: byte,
5902}
5903#[test]
5904fn bindgen_test_layout_IMAGE_PALDATA__bindgen_ty_1() {
5905 assert_eq!(
5906 ::std::mem::size_of::<IMAGE_PALDATA__bindgen_ty_1>(),
5907 4usize,
5908 concat!("Size of: ", stringify!(IMAGE_PALDATA__bindgen_ty_1))
5909 );
5910 assert_eq!(
5911 ::std::mem::align_of::<IMAGE_PALDATA__bindgen_ty_1>(),
5912 1usize,
5913 concat!("Alignment of ", stringify!(IMAGE_PALDATA__bindgen_ty_1))
5914 );
5915 assert_eq!(
5916 unsafe {
5917 &(*(::std::ptr::null::<IMAGE_PALDATA__bindgen_ty_1>())).index as *const _ as usize
5918 },
5919 0usize,
5920 concat!(
5921 "Offset of field: ",
5922 stringify!(IMAGE_PALDATA__bindgen_ty_1),
5923 "::",
5924 stringify!(index)
5925 )
5926 );
5927 assert_eq!(
5928 unsafe { &(*(::std::ptr::null::<IMAGE_PALDATA__bindgen_ty_1>())).r as *const _ as usize },
5929 1usize,
5930 concat!(
5931 "Offset of field: ",
5932 stringify!(IMAGE_PALDATA__bindgen_ty_1),
5933 "::",
5934 stringify!(r)
5935 )
5936 );
5937 assert_eq!(
5938 unsafe { &(*(::std::ptr::null::<IMAGE_PALDATA__bindgen_ty_1>())).g as *const _ as usize },
5939 2usize,
5940 concat!(
5941 "Offset of field: ",
5942 stringify!(IMAGE_PALDATA__bindgen_ty_1),
5943 "::",
5944 stringify!(g)
5945 )
5946 );
5947 assert_eq!(
5948 unsafe { &(*(::std::ptr::null::<IMAGE_PALDATA__bindgen_ty_1>())).b as *const _ as usize },
5949 3usize,
5950 concat!(
5951 "Offset of field: ",
5952 stringify!(IMAGE_PALDATA__bindgen_ty_1),
5953 "::",
5954 stringify!(b)
5955 )
5956 );
5957}
5958#[test]
5959fn bindgen_test_layout_IMAGE_PALDATA() {
5960 assert_eq!(
5961 ::std::mem::size_of::<IMAGE_PALDATA>(),
5962 48usize,
5963 concat!("Size of: ", stringify!(IMAGE_PALDATA))
5964 );
5965 assert_eq!(
5966 ::std::mem::align_of::<IMAGE_PALDATA>(),
5967 2usize,
5968 concat!("Alignment of ", stringify!(IMAGE_PALDATA))
5969 );
5970 assert_eq!(
5971 unsafe { &(*(::std::ptr::null::<IMAGE_PALDATA>())).palette_id as *const _ as usize },
5972 0usize,
5973 concat!(
5974 "Offset of field: ",
5975 stringify!(IMAGE_PALDATA),
5976 "::",
5977 stringify!(palette_id)
5978 )
5979 );
5980 assert_eq!(
5981 unsafe { &(*(::std::ptr::null::<IMAGE_PALDATA>())).ncolors as *const _ as usize },
5982 1usize,
5983 concat!(
5984 "Offset of field: ",
5985 stringify!(IMAGE_PALDATA),
5986 "::",
5987 stringify!(ncolors)
5988 )
5989 );
5990 assert_eq!(
5991 unsafe { &(*(::std::ptr::null::<IMAGE_PALDATA>())).camera as *const _ as usize },
5992 2usize,
5993 concat!(
5994 "Offset of field: ",
5995 stringify!(IMAGE_PALDATA),
5996 "::",
5997 stringify!(camera)
5998 )
5999 );
6000 assert_eq!(
6001 unsafe { &(*(::std::ptr::null::<IMAGE_PALDATA>())).threshold as *const _ as usize },
6002 3usize,
6003 concat!(
6004 "Offset of field: ",
6005 stringify!(IMAGE_PALDATA),
6006 "::",
6007 stringify!(threshold)
6008 )
6009 );
6010 assert_eq!(
6011 unsafe { &(*(::std::ptr::null::<IMAGE_PALDATA>())).flags as *const _ as usize },
6012 4usize,
6013 concat!(
6014 "Offset of field: ",
6015 stringify!(IMAGE_PALDATA),
6016 "::",
6017 stringify!(flags)
6018 )
6019 );
6020 assert_eq!(
6021 unsafe { &(*(::std::ptr::null::<IMAGE_PALDATA>())).image_number as *const _ as usize },
6022 6usize,
6023 concat!(
6024 "Offset of field: ",
6025 stringify!(IMAGE_PALDATA),
6026 "::",
6027 stringify!(image_number)
6028 )
6029 );
6030 assert_eq!(
6031 unsafe { &(*(::std::ptr::null::<IMAGE_PALDATA>())).extra as *const _ as usize },
6032 8usize,
6033 concat!(
6034 "Offset of field: ",
6035 stringify!(IMAGE_PALDATA),
6036 "::",
6037 stringify!(extra)
6038 )
6039 );
6040 assert_eq!(
6041 unsafe { &(*(::std::ptr::null::<IMAGE_PALDATA>())).rfirst_color as *const _ as usize },
6042 18usize,
6043 concat!(
6044 "Offset of field: ",
6045 stringify!(IMAGE_PALDATA),
6046 "::",
6047 stringify!(rfirst_color)
6048 )
6049 );
6050 assert_eq!(
6051 unsafe { &(*(::std::ptr::null::<IMAGE_PALDATA>())).rfirst_brite as *const _ as usize },
6052 19usize,
6053 concat!(
6054 "Offset of field: ",
6055 stringify!(IMAGE_PALDATA),
6056 "::",
6057 stringify!(rfirst_brite)
6058 )
6059 );
6060 assert_eq!(
6061 unsafe { &(*(::std::ptr::null::<IMAGE_PALDATA>())).rlast_color as *const _ as usize },
6062 20usize,
6063 concat!(
6064 "Offset of field: ",
6065 stringify!(IMAGE_PALDATA),
6066 "::",
6067 stringify!(rlast_color)
6068 )
6069 );
6070 assert_eq!(
6071 unsafe { &(*(::std::ptr::null::<IMAGE_PALDATA>())).rlast_brite as *const _ as usize },
6072 21usize,
6073 concat!(
6074 "Offset of field: ",
6075 stringify!(IMAGE_PALDATA),
6076 "::",
6077 stringify!(rlast_brite)
6078 )
6079 );
6080 assert_eq!(
6081 unsafe { &(*(::std::ptr::null::<IMAGE_PALDATA>())).nspecial as *const _ as usize },
6082 22usize,
6083 concat!(
6084 "Offset of field: ",
6085 stringify!(IMAGE_PALDATA),
6086 "::",
6087 stringify!(nspecial)
6088 )
6089 );
6090 assert_eq!(
6091 unsafe { &(*(::std::ptr::null::<IMAGE_PALDATA>())).spcolors as *const _ as usize },
6092 24usize,
6093 concat!(
6094 "Offset of field: ",
6095 stringify!(IMAGE_PALDATA),
6096 "::",
6097 stringify!(spcolors)
6098 )
6099 );
6100}
6101extern "C" {
6102 #[doc = " @internal"]
6103 #[doc = ""]
6104 #[doc = "Get palette: always ramp definition."]
6105 #[doc = "@return \\c -1 if no image in progress, \\c 0 if old, \\c 1 if new palette."]
6106 #[doc = ""]
6107 #[doc = "non-palette data in *pal may change even if 0 returned."]
6108 pub fn eyelink_get_palette(pal: *mut ::std::os::raw::c_void) -> INT16;
6109}
6110extern "C" {
6111 #[doc = " @ingroup elbutton"]
6112 #[doc = "Reads any queued key or button events from tracker."]
6113 #[doc = ""]
6114 #[doc = "@remarks Any of the parameters(mods/state/kcode/time) can be null to ignore."]
6115 #[doc = "@param mods Pointer to variable to hold button number or key modifier (Shift, Alt and Ctrl key states)."]
6116 #[doc = "@param state Pointer to variable to hold key or button change (\\c KB_PRESS, \\c KB_RELEASE, or \\c KB_REPEAT)."]
6117 #[doc = "@param kcode Pointer to variable to hold key scan code."]
6118 #[doc = "@param time Pointer to a variable to hold tracker time of the key or button change."]
6119 #[doc = "@return Key character is key press/release/repeat, <tt>KB_BUTTON (0xFF00)</tt> if button press or release. \\c 0 if none."]
6120 #[doc = ""]
6121 #[doc = "\\b Example:"]
6122 #[doc = "<pre>"]
6123 #[doc = "\\code"]
6124 #[doc = ""]
6125 #[doc = "#include <eyelink.h>"]
6126 #[doc = ""]
6127 #[doc = "UINT16 \tkey;"]
6128 #[doc = "INT16 \tstate;"]
6129 #[doc = ""]
6130 #[doc = "key = eyelink_read_keybutton(NULL, &state, NULL, NULL);"]
6131 #[doc = ""]
6132 #[doc = "if (key && state == KB_PRESS && key != KB_BUTTON)"]
6133 #[doc = "{"]
6134 #[doc = "if(key < 256 && isprint(key))"]
6135 #[doc = "eyemsg_printf(\"KEY '%c'\", key);"]
6136 #[doc = "else"]
6137 #[doc = "eyemsg_printf(\"WAITKEY 0x%04X\", key);"]
6138 #[doc = "}"]
6139 #[doc = "\\endcode"]
6140 #[doc = "</pre>"]
6141 #[doc = ""]
6142 #[doc = "\\sa \\c eyelink_send_keybutton()"]
6143 pub fn eyelink_read_keybutton(
6144 mods: *mut INT16,
6145 state: *mut INT16,
6146 kcode: *mut UINT16,
6147 time: *mut UINT32,
6148 ) -> UINT16;
6149}
6150extern "C" {
6151 #[doc = " @ingroup elbutton"]
6152 #[doc = "Sends a key or button event to tracker. Only key events are handled for remote control."]
6153 #[doc = ""]
6154 #[doc = "@param code Key character, or <tt>KB_BUTTON (0xFF00)</tt> if sending button event."]
6155 #[doc = "@param mods Button number, or key modifier (Shift, Alt and Ctrl key states)."]
6156 #[doc = "@param state Key or button change (\\c KB_PRESS or \\c KB_RELEASE)."]
6157 #[doc = "@return \\c 0 if OK, else send link error."]
6158 #[doc = ""]
6159 #[doc = "\\b Example:"]
6160 #[doc = "<pre>"]
6161 #[doc = "\\code"]
6162 #[doc = ""]
6163 #[doc = "UINT16 echo_key(void)"]
6164 #[doc = "{"]
6165 #[doc = "UINT16 k = getkey();"]
6166 #[doc = ""]
6167 #[doc = "if(k!=0 && k!=1)"]
6168 #[doc = "eyelink_send_keybutton(k, 0, KB_PRESS);"]
6169 #[doc = "return k;"]
6170 #[doc = "}"]
6171 #[doc = "\\endcode"]
6172 #[doc = "</pre>"]
6173 #[doc = ""]
6174 #[doc = "\\sa \\c eyelink_read_keybutton()"]
6175 pub fn eyelink_send_keybutton(code: UINT16, mods: UINT16, state: INT16) -> INT16;
6176}
6177extern "C" {
6178 #[doc = " @ingroup elbutton"]
6179 #[doc = "Returns a flag word with bits set to indicate which tracker buttons are currently pressed."]
6180 #[doc = "This is button 1 for the LSB, up to button 16 for the MSB."]
6181 #[doc = ""]
6182 #[doc = "@remarks Buttons above 8 are not realized on the EyeLink tracker."]
6183 #[doc = "@return Flag bits for buttons currently pressed."]
6184 #[doc = ""]
6185 #[doc = "\\b Example:"]
6186 #[doc = "<pre>"]
6187 #[doc = "\\code"]
6188 #[doc = ""]
6189 #[doc = "#include <eyelink.h>"]
6190 #[doc = "int state =0;"]
6191 #[doc = "int \tprev_state = 0;"]
6192 #[doc = "UINT32 start_time = current_time();"]
6193 #[doc = ""]
6194 #[doc = "while(eyelink_is_connected()"]
6195 #[doc = "&& current_time() > start_time + 5000)"]
6196 #[doc = "{"]
6197 #[doc = "state = eyelink_button_states();"]
6198 #[doc = "if (state != prev_state)"]
6199 #[doc = "{"]
6200 #[doc = "eyemsg_printf(\"Button 1:%s 2:%s 3:%s 4:%s 5:%s\","]
6201 #[doc = "state & 0x01 ? \"Pressed\" : \"Released\","]
6202 #[doc = "(state & 0x02) >> 1 ? \"Pressed\" : \"Released\","]
6203 #[doc = "(state & 0x04) >> 2 ? \"Pressed\" : \"Released\","]
6204 #[doc = "(state & 0x08) >> 3 ? \"Pressed\" : \"Released\","]
6205 #[doc = "(state & 0x10) >> 4 ? \"Pressed\" : \"Released\");"]
6206 #[doc = ""]
6207 #[doc = "prev_state = state;"]
6208 #[doc = "}"]
6209 #[doc = "}"]
6210 #[doc = "\\endcode"]
6211 #[doc = "</pre>"]
6212 #[doc = ""]
6213 #[doc = "\\b Output:"]
6214 #[doc = "<pre>"]
6215 #[doc = "\\code"]
6216 #[doc = "BUTTON\t4144034\t1\t1"]
6217 #[doc = "MSG\t4144035 Button 1:Pressed 2:Released 3:Released 4:Released 5:Released"]
6218 #[doc = "BUTTON\t4144266\t1\t0"]
6219 #[doc = "MSG\t4144267 Button 1:Released 2:Released 3:Released 4:Released 5:Released"]
6220 #[doc = "BUTTON\t4144650\t2\t1"]
6221 #[doc = "MSG\t4144651 Button 1:Released 2:Pressed 3:Released 4:Released 5:Released"]
6222 #[doc = "BUTTON\t4144898\t2\t0"]
6223 #[doc = "MSG\t4144899 Button 1:Released 2:Released 3:Released 4:Released 5:Released"]
6224 #[doc = "BUTTON\t4145260\t3\t1"]
6225 #[doc = "MSG\t4145261 Button 1:Released 2:Released 3:Pressed 4:Released 5:Released"]
6226 #[doc = "BUTTON\t4145492\t3\t0"]
6227 #[doc = "MSG\t4145493 Button 1:Released 2:Released 3:Released 4:Released 5:Released"]
6228 #[doc = "BUTTON\t4145834\t4\t1"]
6229 #[doc = "MSG\t4145835 Button 1:Released 2:Released 3:Released 4:Pressed 5:Released"]
6230 #[doc = "BUTTON\t4146106\t4\t0"]
6231 #[doc = "MSG\t4146107 Button 1:Released 2:Released 3:Released 4:Released 5:Released"]
6232 #[doc = "BUTTON\t4146498\t5\t1"]
6233 #[doc = "MSG\t4146499 Button 1:Released 2:Released 3:Released 4:Released 5:Pressed"]
6234 #[doc = "BUTTON\t4146778\t5\t0"]
6235 #[doc = "MSG\t4146779 Button 1:Released 2:Released 3:Released 4:Released 5:Released"]
6236 #[doc = "\\endcode"]
6237 #[doc = "</pre>"]
6238 #[doc = ""]
6239 #[doc = "\\sa \\c eyelink_last_button_press()"]
6240 pub fn eyelink_button_states() -> UINT16;
6241}
6242extern "C" {
6243 #[doc = " @ingroup elbutton"]
6244 #[doc = "Returns a flag word with bits set to indicate which tracker buttons are currently pressed."]
6245 #[doc = "This is button 1 for the LSB, up to button 16 for the MSB. Same as eyelink_button_states()"]
6246 #[doc = "except, optionally time of the button states can be acquired."]
6247 #[doc = ""]
6248 #[doc = "@param[out] time pointer to return time of the button states."]
6249 #[doc = "@return Flag bits for buttons currently pressed."]
6250 #[doc = "\\sa \\c eyelink_send_keybutton()"]
6251 pub fn eyelink_last_button_states(time: *mut UINT32) -> UINT16;
6252}
6253extern "C" {
6254 #[doc = " @ingroup elbutton"]
6255 #[doc = "Reads the number of the last button detected by the EyeLink tracker. This is \\c 0"]
6256 #[doc = "if no buttons were pressed since the last call, or since the buttons were flushed."]
6257 #[doc = "If a pointer to a variable is supplied the eye-tracker timestamp of the button may"]
6258 #[doc = "be read. This could be used to see if a new button has been pressed since the last"]
6259 #[doc = "read. If multiple buttons were pressed since the last call, only the last button"]
6260 #[doc = "is reported."]
6261 #[doc = ""]
6262 #[doc = "@param time Far pointer to a variable to hold tracker time of last button press."]
6263 #[doc = "Usually left as \\c NULL to ignore time."]
6264 #[doc = "@return Button last pressed, \\c 0 if no button pressed since last read, or call to \\c eyelink_flush_keybuttons()."]
6265 #[doc = ""]
6266 #[doc = "\\b Example:"]
6267 #[doc = "<pre>"]
6268 #[doc = "\\code"]
6269 #[doc = ""]
6270 #[doc = "#include <eyelink.h>"]
6271 #[doc = "int button;"]
6272 #[doc = ""]
6273 #[doc = "eyelink_flush_keybuttons(0);"]
6274 #[doc = ""]
6275 #[doc = "while(1)"]
6276 #[doc = "{"]
6277 #[doc = "button = eyelink_last_button_press(NULL);"]
6278 #[doc = ""]
6279 #[doc = "if(button != 0 && button != 6 && button != 7)"]
6280 #[doc = "{"]
6281 #[doc = "if (button == 5)"]
6282 #[doc = "{"]
6283 #[doc = "eyemsg_printf(\"ENDBUTTON %d\", button);"]
6284 #[doc = "break;"]
6285 #[doc = "}"]
6286 #[doc = "else"]
6287 #[doc = "eyemsg_printf(\"BUTTON PRESSED %d\", button);"]
6288 #[doc = "}"]
6289 #[doc = "}"]
6290 #[doc = "\\endcode"]
6291 #[doc = "</pre>"]
6292 #[doc = ""]
6293 #[doc = "\\b Output:"]
6294 #[doc = "<pre>"]
6295 #[doc = "\\code"]
6296 #[doc = "BUTTON\t19753748\t2\t1"]
6297 #[doc = "MSG\t19753749 BUTTON PRESSED 2"]
6298 #[doc = "BUTTON\t19754018\t2\t0"]
6299 #[doc = "BUTTON\t19755595\t5\t1"]
6300 #[doc = "MSG\t19755595 ENDBUTTON 5"]
6301 #[doc = "BUTTON\t19755808\t5\t0"]
6302 #[doc = "\\endcode"]
6303 #[doc = "</pre>"]
6304 #[doc = ""]
6305 #[doc = "\\sa \\c eyelink_flush_keybuttons(), \\c eyelink_button_states(), \\c eyelink_read_keybutton()"]
6306 #[doc = "and \\c eyelink_send_keybutton()"]
6307 pub fn eyelink_last_button_press(time: *mut UINT32) -> UINT16;
6308}
6309extern "C" {
6310 #[doc = " @ingroup elbutton"]
6311 #[doc = "Causes the EyeLink tracker and the EyeLink library to flush any stored button or key"]
6312 #[doc = "events. This should be used before a trial to get rid of old button responses."]
6313 #[doc = "The \\c <enable_buttons> argument controls whether the EyeLink library will store"]
6314 #[doc = "button press and release events. It always stores tracker key events. Even if"]
6315 #[doc = "disabled, the last button pressed and button flag bits are updated."]
6316 #[doc = ""]
6317 #[doc = "@param enable_buttons Set to \\c 0 to monitor last button press only, \\c 1 to queue button events."]
6318 #[doc = "@return Always \\c 0."]
6319 #[doc = ""]
6320 #[doc = "\\b Example:"]
6321 #[doc = "<pre>"]
6322 #[doc = "\\code"]
6323 #[doc = ""]
6324 #[doc = "UINT32 wait_time = 5000;"]
6325 #[doc = "int i;"]
6326 #[doc = ""]
6327 #[doc = "eyelink_flush_keybuttons(0);"]
6328 #[doc = ""]
6329 #[doc = "wait_time += current_msec();"]
6330 #[doc = ""]
6331 #[doc = "while(eyelink_is_connected())"]
6332 #[doc = "{"]
6333 #[doc = "if(getkey()==27 || !eyelink_is_connected())"]
6334 #[doc = "break;"]
6335 #[doc = ""]
6336 #[doc = "i = eyelink_last_button_press(NULL);"]
6337 #[doc = "if(i)"]
6338 #[doc = "{"]
6339 #[doc = "eyemsg_printf(\"WAITBUTTON %d\", i);"]
6340 #[doc = "break;"]
6341 #[doc = "}"]
6342 #[doc = ""]
6343 #[doc = "if(current_time() > wait_time)"]
6344 #[doc = "{"]
6345 #[doc = "eyemsg_printf(\"WAITBUTTON TIMEOUT\");"]
6346 #[doc = "break;"]
6347 #[doc = "}"]
6348 #[doc = "}"]
6349 #[doc = "\\endcode"]
6350 #[doc = "</pre>"]
6351 #[doc = ""]
6352 #[doc = "\\b Output:"]
6353 #[doc = "<pre>"]
6354 #[doc = "\\code"]
6355 #[doc = "BUTTON\t19585661\t5\t1"]
6356 #[doc = "MSG\t19585662 WAITBUTTON 5"]
6357 #[doc = "BUTTON\t19586005\t5\t0"]
6358 #[doc = "\\endcode"]
6359 #[doc = "</pre>"]
6360 #[doc = ""]
6361 #[doc = "\\sa \\c eyelink_button_states(), \\c eyelink_last_button_press(), \\c eyelink_read_keybutton()"]
6362 #[doc = "and \\c eyelink_send_keybutton()"]
6363 pub fn eyelink_flush_keybuttons(enable_buttons: INT16) -> INT16;
6364}
6365extern "C" {
6366 #[doc = " @ingroup datafile"]
6367 #[doc = "Request send of file \"src\". If \"\", gets last data file."]
6368 #[doc = "@return \\c 0 if OK, else send error."]
6369 #[doc = "@remark Internal function. use receive_data_file()"]
6370 pub fn eyelink_request_file_read(src: *mut ::std::os::raw::c_char) -> INT16;
6371}
6372extern "C" {
6373 #[doc = " @ingroup datafile"]
6374 #[doc = "Get next block of file. If \\c <offset> is not \\c NULL, will be filled"]
6375 #[doc = "with block-start offset in file."]
6376 #[doc = ""]
6377 #[doc = "@return negative if error, \\c NO_REPLY if waiting for packet, else block size (0..512)."]
6378 #[doc = "size is < 512 (can be 0) if at EOF."]
6379 #[doc = ""]
6380 #[doc = "@remark Internal function. use receive_data_file()"]
6381 pub fn eyelink_get_file_block(buf: *mut ::std::os::raw::c_void, offset: *mut INT32) -> INT16;
6382}
6383extern "C" {
6384 #[doc = " @ingroup datafile"]
6385 #[doc = "Ask for next block of file, reads from \\c <offset>."]
6386 #[doc = "@remark Internal function. use receive_data_file()"]
6387 pub fn eyelink_request_file_block(offset: UINT32) -> INT16;
6388}
6389extern "C" {
6390 #[doc = " @ingroup datafile"]
6391 #[doc = "Aborts send of file."]
6392 #[doc = "@return \\c 0 if OK, else send error."]
6393 #[doc = "@remark Internal function. use receive_data_file()"]
6394 pub fn eyelink_end_file_transfer() -> INT16;
6395}
6396extern "C" {
6397 #[doc = " @ingroup init_eyelink"]
6398 #[doc = "After connection, determines if the connected tracker is an EyeLink I or II."]
6399 #[doc = ""]
6400 #[doc = "@remarks For the EyeLink II tracker, it can optionally retrieve the tracker software version."]
6401 #[doc = "@param c \\c NULL, or pointer to a string (at least 40 characters) to hold the version string."]
6402 #[doc = "This will be \"EYELINK I\" or \"EYELINK II x.xx\", where \"x.xx\" is the software version."]
6403 #[doc = "@return \\c 0 if not connected, \\c 1 for EyeLink I, \\c 2 for EyeLink II \\c 3 for EyeLink 1000."]
6404 #[doc = ""]
6405 #[doc = "\\b Example:"]
6406 #[doc = "<pre>"]
6407 #[doc = "\\code"]
6408 #[doc = ""]
6409 #[doc = "#include <eyelink.h>"]
6410 #[doc = ""]
6411 #[doc = "int i;"]
6412 #[doc = "char version_info[256];"]
6413 #[doc = ""]
6414 #[doc = "i = eyelink_get_tracker_version(version_info);"]
6415 #[doc = "eyemsg_printf(\"EyeLink %d version %s\", i, version_info);"]
6416 #[doc = "\\endcode"]
6417 #[doc = "</pre>"]
6418 #[doc = "\\b Output:"]
6419 #[doc = "<pre>"]
6420 #[doc = "\\code"]
6421 #[doc = "MSG\t500850 EyeLink 2 version EYELINK II 1.10"]
6422 #[doc = "\\endcode"]
6423 #[doc = "</pre>"]
6424 pub fn eyelink_get_tracker_version(c: *mut ::std::os::raw::c_char) -> INT16;
6425}
6426extern "C" {
6427 #[doc = " @ingroup recording"]
6428 #[doc = "\\deprecated Use \\c eyelink_mode_data() instead."]
6429 pub fn eyelink2_mode_data(
6430 sample_rate: *mut INT16,
6431 crmode: *mut INT16,
6432 file_filter: *mut INT16,
6433 link_filter: *mut INT16,
6434 ) -> INT16;
6435}
6436extern "C" {
6437 #[doc = " @ingroup recording"]
6438 #[doc = "After calling \\c eyelink_wait_for_block_start(), or after at least one sample or eye event has"]
6439 #[doc = "been read, returns EyeLink II extended mode data."]
6440 #[doc = ""]
6441 #[doc = "@param sample_rate \\c NULL, or pointer to variable to be filled with samples per second."]
6442 #[doc = "@param crmode \\c NULL, or pointer to variable to be filled with CR mode flag (\\c 0 if pupil-only mode,"]
6443 #[doc = "else pupil-CR mode)."]
6444 #[doc = "@param file_filter \\c NULL, or pointer to variable to be filled with filter level to be applied to"]
6445 #[doc = "file samples (\\c 0 = off, \\c 1 = std, \\c 2 = double filter)."]
6446 #[doc = "@param link_filter \\c NULL, or pointer to variable to be filled with filter level to be applied to"]
6447 #[doc = "link and analog output samples (\\c 0 = off, \\c 1 = std, \\c 2 = double filter)."]
6448 #[doc = "@return If no data available -1 else 0."]
6449 #[doc = ""]
6450 #[doc = "\\b Example:"]
6451 #[doc = "<pre>"]
6452 #[doc = "\\code"]
6453 #[doc = ""]
6454 #[doc = "#inlcude <eyelink.h>"]
6455 #[doc = "#include <stdio.h>"]
6456 #[doc = ""]
6457 #[doc = "int is_eyelink2;"]
6458 #[doc = ""]
6459 #[doc = "if(!eyelink_wait_for_block_start(2000, 1, 1))"]
6460 #[doc = "{"]
6461 #[doc = "printf(\"ERROR: No sample or event been detected!\");"]
6462 #[doc = "return -1;"]
6463 #[doc = "}"]
6464 #[doc = ""]
6465 #[doc = "is_eyelink2 = (2 == eyelink_get_tracker_version(NULL));"]
6466 #[doc = ""]
6467 #[doc = "if(is_eyelink2 && !eyelink2_mode_data(&sample_rate, &crmode, NULL, NULL))"]
6468 #[doc = "{"]
6469 #[doc = "eyemsg_printf(\"Sample rate: %d\", sample_rate);"]
6470 #[doc = "eyemsg_printf(\"Tracking mode: %s\", crmode?\"CR\":\"Pupil only\");"]
6471 #[doc = "}"]
6472 #[doc = "\\endcode"]
6473 #[doc = "</pre>"]
6474 #[doc = "\\b Output:"]
6475 #[doc = "<pre>"]
6476 #[doc = "\\code"]
6477 #[doc = "MSG\t1151024 Sample rate: 250"]
6478 #[doc = "MSG\t1151024 Tracking mode: CR"]
6479 #[doc = "\\endcode"]
6480 #[doc = "</pre>"]
6481 pub fn eyelink_mode_data(
6482 sample_rate: *mut INT16,
6483 crmode: *mut INT16,
6484 file_filter: *mut INT16,
6485 link_filter: *mut INT16,
6486 ) -> INT16;
6487}
6488extern "C" {
6489 #[doc = " @internal"]
6490 #[doc = "Send bitmap data packet to tracker."]
6491 #[doc = "@remark This function is strictly internal. If you need to send bitmap to the tracker,"]
6492 #[doc = "use el_bitmap_to_backdrop(), gdi_bitmap_to_backdrop() or sdl_bitmap_to_backdrop()."]
6493 #[doc = "@param data pointer of the data to be sent."]
6494 #[doc = "@param size size of the data to be sent."]
6495 #[doc = "@param seq \\c 1 for first packet, increases thereafter."]
6496 pub fn eyelink_bitmap_packet(
6497 data: *mut ::std::os::raw::c_void,
6498 size: UINT16,
6499 seq: UINT16,
6500 ) -> INT16;
6501}
6502extern "C" {
6503 #[doc = " @internal"]
6504 #[doc = "Get bitmap ack count."]
6505 #[doc = "Negative: special code or sequence number to restart at."]
6506 #[doc = "Reading resets count to 0."]
6507 #[doc = "@remark This function is strictly internal. If you need to send bitmap to the tracker,"]
6508 #[doc = "use el_bitmap_to_backdrop(), gdi_bitmap_to_backdrop() or sdl_bitmap_to_backdrop()."]
6509 pub fn eyelink_bitmap_ack_count() -> INT16;
6510}
6511extern "C" {
6512 #[doc = " @ingroup init_eyelink"]
6513 #[doc = ""]
6514 #[doc = "Address used for non-connected time requests and message sends. the \"proper\""]
6515 #[doc = "way to do this is with the \"node\" type of functions but we allow a \"back door\""]
6516 #[doc = "to simplify higher level support functions. This is also the address used"]
6517 #[doc = "under Windows for looking for tracker (an IP broadcast is used on all"]
6518 #[doc = "other platforms). There is a bug in the Windows networking, causing broadcasts"]
6519 #[doc = "sent on all cards to have the IP source addres of only the first card. This"]
6520 #[doc = "means the tracker sends its connection reply to the wrong address. So the exact"]
6521 #[doc = "address or a subnet broadcast address (i.e. 100.1.1.255 for a subnet mask of"]
6522 #[doc = "255.255.255.0) needs to be set to that of the tracker."]
6523 pub fn eyelink_set_tracker_node(node: *mut byte);
6524}
6525extern "C" {
6526 #[doc = " @ingroup access_time_tracker"]
6527 #[doc = "Returns the current tracker time (in micro seconds) since the tracker application started."]
6528 #[doc = ""]
6529 #[doc = "@return Each of these functions returns the current tracker time (in microseconds)"]
6530 #[doc = "since tracker initialization."]
6531 #[doc = ""]
6532 #[doc = "\\b Example:"]
6533 #[doc = "<pre>"]
6534 #[doc = "\\code"]
6535 #[doc = "#include <eyelink.h>"]
6536 #[doc = "#include <stdio.h>"]
6537 #[doc = ""]
6538 #[doc = "int i;"]
6539 #[doc = "ALLF_DATA evt;"]
6540 #[doc = ""]
6541 #[doc = "i = eyelink_get_next_data(NULL); // Checks for new data item"]
6542 #[doc = "switch(i)"]
6543 #[doc = "{"]
6544 #[doc = "case SAMPLE_TYPE:"]
6545 #[doc = "{"]
6546 #[doc = "eyelink_get_float_data(&evt);"]
6547 #[doc = "if(eyelink_tracker_double_usec()/1000000 >(evt.time +2) )"]
6548 #[doc = "printf(\"Oops it took longer than 2 milliseconds for the data to get"]
6549 #[doc = "here.\\n\");"]
6550 #[doc = "}"]
6551 #[doc = "break;"]
6552 #[doc = "}"]
6553 #[doc = "\\endcode"]
6554 #[doc = "</pre>"]
6555 #[doc = ""]
6556 #[doc = "\\sa \\c eyelink_tracker_msec(), \\c current_time(), \\c eyelink_msec_offset() and"]
6557 #[doc = "\\c eyelink_double_usec_offset()"]
6558 #[doc = ""]
6559 pub fn eyelink_tracker_double_usec() -> f64;
6560}
6561extern "C" {
6562 #[doc = " @ingroup access_time_tracker"]
6563 #[doc = "Returns the current tracker time (in milliseconds) since the tracker application started."]
6564 #[doc = ""]
6565 #[doc = "@return Each of these functions returns the current tracker time (in microseconds)"]
6566 #[doc = "since tracker initialization."]
6567 #[doc = ""]
6568 #[doc = "\\b Example:"]
6569 #[doc = "<pre>"]
6570 #[doc = "\\code"]
6571 #[doc = "#include <eyelink.h>"]
6572 #[doc = "#include <stdio.h>"]
6573 #[doc = ""]
6574 #[doc = "int i;"]
6575 #[doc = "ALLF_DATA evt;"]
6576 #[doc = ""]
6577 #[doc = "i = eyelink_get_next_data(NULL); // Checks for new data item"]
6578 #[doc = "switch(i)"]
6579 #[doc = "{"]
6580 #[doc = "case SAMPLE_TYPE:"]
6581 #[doc = "{"]
6582 #[doc = "eyelink_get_float_data(&evt);"]
6583 #[doc = "if(eyelink_tracker_msec()/1000 >(evt.time +2) )"]
6584 #[doc = "printf(\"Oops it took longer than 2 milliseconds for the data to get"]
6585 #[doc = "here.\\n\");"]
6586 #[doc = "}"]
6587 #[doc = "break;"]
6588 #[doc = "}"]
6589 #[doc = "\\endcode"]
6590 #[doc = "</pre>"]
6591 #[doc = ""]
6592 #[doc = "\\sa \\c current_time(), \\c eyelink_msec_offset(), \\c eyelink_double_usec_offset() and"]
6593 #[doc = "\\c eyelink_tracker_double_usec()"]
6594 pub fn eyelink_tracker_msec() -> UINT32;
6595}
6596extern "C" {
6597 #[doc = " @ingroup access_time_tracker"]
6598 #[doc = "Returns the time difference between the tracker time and display pc time."]
6599 #[doc = ""]
6600 #[doc = "@return Returns the time difference between the tracker time and display pc"]
6601 #[doc = "time in microseconds."]
6602 #[doc = ""]
6603 #[doc = "\\sa \\c current_time() and \\c eyelink_tracker_msec()"]
6604 pub fn eyelink_double_usec_offset() -> f64;
6605}
6606extern "C" {
6607 #[doc = " @ingroup access_time_tracker"]
6608 #[doc = "Returns the time difference between the tracker time and display pc time."]
6609 #[doc = ""]
6610 #[doc = "@return Returns the time difference between the tracker time and display pc time."]
6611 #[doc = ""]
6612 #[doc = "\\sa \\c current_time(), \\c eyelink_tracker_msec() and \\c eyelink_tracker_double_usec()"]
6613 pub fn eyelink_msec_offset() -> UINT32;
6614}
6615#[repr(C)]
6616#[derive(Debug, Default, Copy, Clone)]
6617pub struct DISPLAYINFO {
6618 #[doc = "< left of display"]
6619 pub left: INT32,
6620 #[doc = "< top of display"]
6621 pub top: INT32,
6622 #[doc = "< right of display"]
6623 pub right: INT32,
6624 #[doc = "< bottom of display"]
6625 pub bottom: INT32,
6626 #[doc = "< width of display"]
6627 pub width: INT32,
6628 #[doc = "< height of display"]
6629 pub height: INT32,
6630 #[doc = "< bits per pixel"]
6631 pub bits: INT32,
6632 #[doc = "< total entries in palette (\\c 0 if not indexed display mode)"]
6633 pub palsize: INT32,
6634 #[doc = "< number of static entries in palette"]
6635 #[doc = "( \\c 0 if not indexed display mode)"]
6636 pub palrsvd: INT32,
6637 #[doc = "< pages supported"]
6638 pub pages: INT32,
6639 #[doc = "< refresh rate in Hz"]
6640 pub refresh: f32,
6641 #[doc = "< \\c 0 if Windows 95, \\c 1 if Windows NT"]
6642 pub winnt: INT32,
6643}
6644#[test]
6645fn bindgen_test_layout_DISPLAYINFO() {
6646 assert_eq!(
6647 ::std::mem::size_of::<DISPLAYINFO>(),
6648 48usize,
6649 concat!("Size of: ", stringify!(DISPLAYINFO))
6650 );
6651 assert_eq!(
6652 ::std::mem::align_of::<DISPLAYINFO>(),
6653 4usize,
6654 concat!("Alignment of ", stringify!(DISPLAYINFO))
6655 );
6656 assert_eq!(
6657 unsafe { &(*(::std::ptr::null::<DISPLAYINFO>())).left as *const _ as usize },
6658 0usize,
6659 concat!(
6660 "Offset of field: ",
6661 stringify!(DISPLAYINFO),
6662 "::",
6663 stringify!(left)
6664 )
6665 );
6666 assert_eq!(
6667 unsafe { &(*(::std::ptr::null::<DISPLAYINFO>())).top as *const _ as usize },
6668 4usize,
6669 concat!(
6670 "Offset of field: ",
6671 stringify!(DISPLAYINFO),
6672 "::",
6673 stringify!(top)
6674 )
6675 );
6676 assert_eq!(
6677 unsafe { &(*(::std::ptr::null::<DISPLAYINFO>())).right as *const _ as usize },
6678 8usize,
6679 concat!(
6680 "Offset of field: ",
6681 stringify!(DISPLAYINFO),
6682 "::",
6683 stringify!(right)
6684 )
6685 );
6686 assert_eq!(
6687 unsafe { &(*(::std::ptr::null::<DISPLAYINFO>())).bottom as *const _ as usize },
6688 12usize,
6689 concat!(
6690 "Offset of field: ",
6691 stringify!(DISPLAYINFO),
6692 "::",
6693 stringify!(bottom)
6694 )
6695 );
6696 assert_eq!(
6697 unsafe { &(*(::std::ptr::null::<DISPLAYINFO>())).width as *const _ as usize },
6698 16usize,
6699 concat!(
6700 "Offset of field: ",
6701 stringify!(DISPLAYINFO),
6702 "::",
6703 stringify!(width)
6704 )
6705 );
6706 assert_eq!(
6707 unsafe { &(*(::std::ptr::null::<DISPLAYINFO>())).height as *const _ as usize },
6708 20usize,
6709 concat!(
6710 "Offset of field: ",
6711 stringify!(DISPLAYINFO),
6712 "::",
6713 stringify!(height)
6714 )
6715 );
6716 assert_eq!(
6717 unsafe { &(*(::std::ptr::null::<DISPLAYINFO>())).bits as *const _ as usize },
6718 24usize,
6719 concat!(
6720 "Offset of field: ",
6721 stringify!(DISPLAYINFO),
6722 "::",
6723 stringify!(bits)
6724 )
6725 );
6726 assert_eq!(
6727 unsafe { &(*(::std::ptr::null::<DISPLAYINFO>())).palsize as *const _ as usize },
6728 28usize,
6729 concat!(
6730 "Offset of field: ",
6731 stringify!(DISPLAYINFO),
6732 "::",
6733 stringify!(palsize)
6734 )
6735 );
6736 assert_eq!(
6737 unsafe { &(*(::std::ptr::null::<DISPLAYINFO>())).palrsvd as *const _ as usize },
6738 32usize,
6739 concat!(
6740 "Offset of field: ",
6741 stringify!(DISPLAYINFO),
6742 "::",
6743 stringify!(palrsvd)
6744 )
6745 );
6746 assert_eq!(
6747 unsafe { &(*(::std::ptr::null::<DISPLAYINFO>())).pages as *const _ as usize },
6748 36usize,
6749 concat!(
6750 "Offset of field: ",
6751 stringify!(DISPLAYINFO),
6752 "::",
6753 stringify!(pages)
6754 )
6755 );
6756 assert_eq!(
6757 unsafe { &(*(::std::ptr::null::<DISPLAYINFO>())).refresh as *const _ as usize },
6758 40usize,
6759 concat!(
6760 "Offset of field: ",
6761 stringify!(DISPLAYINFO),
6762 "::",
6763 stringify!(refresh)
6764 )
6765 );
6766 assert_eq!(
6767 unsafe { &(*(::std::ptr::null::<DISPLAYINFO>())).winnt as *const _ as usize },
6768 44usize,
6769 concat!(
6770 "Offset of field: ",
6771 stringify!(DISPLAYINFO),
6772 "::",
6773 stringify!(winnt)
6774 )
6775 );
6776}
6777extern "C" {
6778 #[doc = " @ingroup init_eyelink"]
6779 #[doc = "Initializes the EyeLink library, and opens a connection to the EyeLink tracker."]
6780 #[doc = ""]
6781 #[doc = "@remarks By setting \\c <mode> to be \\c 1, the connection can be simulated for debugging"]
6782 #[doc = "purposes. Only timing operations and simple tests should be done in simulation"]
6783 #[doc = "mode, and the Windows TCP/IP system must be installed. This function is"]
6784 #[doc = "intended for networks where a single tracker is connected to the network."]
6785 #[doc = "@param mode Mode of connection:"]
6786 #[doc = "\\arg \\c 0, opens a connection with the eye tracker;"]
6787 #[doc = "\\arg \\c 1, will create a dummy connection for simulation;"]
6788 #[doc = "\\arg \\c -1, initializes the DLL but does not open a connection."]
6789 #[doc = "@return \\c 0 if success, else error code"]
6790 #[doc = ""]
6791 #[doc = "\\b Example:"]
6792 #[doc = "<pre>"]
6793 #[doc = "\\code"]
6794 #[doc = ""]
6795 #[doc = "#include <eyelink.h>"]
6796 #[doc = ""]
6797 #[doc = "if (set_eyelink_address(\"100.1.1.7\"))"]
6798 #[doc = "return -1;"]
6799 #[doc = ""]
6800 #[doc = "if(open_eyelink_connection(0))"]
6801 #[doc = "return -1;"]
6802 #[doc = ""]
6803 #[doc = "..."]
6804 #[doc = "close_eyelink_connection(); // disconnect from tracker"]
6805 #[doc = "\\endcode"]
6806 #[doc = "</pre>"]
6807 #[doc = ""]
6808 #[doc = "\\sa \\c close_eyelink_connection(), \\c close_eyelink_system(), \\c eyelink_broadcast_open(),"]
6809 #[doc = "\\c eyelink_dummy_open(), \\c eyelink_open() and \\c eyelink_open_node()"]
6810 pub fn open_eyelink_connection(mode: INT16) -> INT16;
6811}
6812extern "C" {
6813 #[doc = " @ingroup init_eyelink"]
6814 #[doc = "Closes any connection to the eye tracker, and closes the link."]
6815 #[doc = ""]
6816 #[doc = "@remarks NEW (v2.1): Broadcast connections can be closed, but not to affect the eye tracker. If"]
6817 #[doc = "a non-broadcast (primary) connection is closed, all broadcast connections to the"]
6818 #[doc = "tracker are also closed."]
6819 #[doc = ""]
6820 #[doc = "\\b Example: See \\c open_eyelink_connection()"]
6821 #[doc = ""]
6822 #[doc = "\\sa \\c open_eyelink_connection() and \\c eyelink_close()"]
6823 pub fn close_eyelink_connection();
6824}
6825extern "C" {
6826 #[doc = " @ingroup init_eyelink"]
6827 #[doc = "Sets the IP address used for connection to the EyeLink tracker. This is set to \"100.1.1.1\" in the DLL,"]
6828 #[doc = "but may need to be changed for some network configurations. This must be set before attempting to open"]
6829 #[doc = "a connection to the tracker."]
6830 #[doc = ""]
6831 #[doc = "@remarks A \"broadcast\" address (\"255.255.255.255\") may be used if the tracker address is not known -"]
6832 #[doc = "this will work only if a single Ethernet card is installed, or if DLL version 2.1 or higher,"]
6833 #[doc = "and the latest tracker software versions (EyeLink I v2.1 or higher, and EyeLink II v1.1 or"]
6834 #[doc = "higher) are installed."]
6835 #[doc = "@param addr Pointer to a string containing a \"dotted\" 4-digit IP address."]
6836 #[doc = "@return \\c 0 if success, \\c -1 if could not parse address string."]
6837 #[doc = ""]
6838 #[doc = "\\b Example:"]
6839 #[doc = "<pre>"]
6840 #[doc = "\\code"]
6841 #[doc = ""]
6842 #[doc = "#include <eyelink.h>"]
6843 #[doc = ""]
6844 #[doc = "if(open_eyelink_connection(-1))"]
6845 #[doc = "return -1;"]
6846 #[doc = ""]
6847 #[doc = "set_eyelink_address(\"100.1.1.1\");"]
6848 #[doc = ""]
6849 #[doc = "if (eyelink_open())"]
6850 #[doc = "return -1;"]
6851 #[doc = "\\endcode"]
6852 #[doc = "</pre>"]
6853 #[doc = "\\sa \\c eyelink_open(), \\c eyelink_open_node(), \\c text_to_elinkaddr()"]
6854 pub fn set_eyelink_address(addr: *mut ::std::os::raw::c_char) -> INT16;
6855}
6856extern "C" {
6857 #[doc = " @ingroup priority"]
6858 #[doc = "Changes the multitasking proirity of current application"]
6859 #[doc = "Using THREAD_PRIORITY_ABOVE_NORMAL may reduce latency"]
6860 #[doc = "Reset priority with THREAD_PRIORITY_NORMAL"]
6861 #[doc = "Too high priority will stop the link from functioning!"]
6862 #[doc = "@deprecated This function is depricated. It is left for compatibility reasons."]
6863 #[doc = "The implementation does nothing."]
6864 pub fn set_application_priority(priority: INT32) -> INT32;
6865}
6866extern "C" {
6867 #[doc = " allows messages to operate in loops"]
6868 #[doc = " returns nonzero if app terminated"]
6869 #[doc = " eats key events, places on key queue for getkey()"]
6870 #[doc = " getkey() and echo_key() also call this function"]
6871 #[doc = ""]
6872 #[doc = " calling this in loops allows Windows to process messages"]
6873 #[doc = " returns nonzero if application terminated (ALT-F4 sent to window)"]
6874 #[doc = " set <dialog_hook> to handle of modeless dialog"]
6875 #[doc = " in order to properly handle its messages as well"]
6876 #[doc = "Almost all experiments must run in a deterministic fashion, executing sequentially and in"]
6877 #[doc = "loops instead of the traditional Windows event-processing model. However, Windows messages"]
6878 #[doc = "must still be dispatched for keyboard input and other events. Calling \\c getkey() will dispatch"]
6879 #[doc = "messages and return keys. The \\c message_pump() function also dispatches messages, but does"]
6880 #[doc = "not read the keys. It can also handle messages for a modeless dialog box."]
6881 #[doc = ""]
6882 #[doc = "@return \\c 0 normally, \\c 1 if ALT-F4 or CTRL-C pressed, or if \\c terminal_break() called. Any loops"]
6883 #[doc = "should exit in this case."]
6884 #[doc = ""]
6885 #[doc = "\\b Example:"]
6886 #[doc = "The following two programs works together to show the use of \\c message_pump() function. In this"]
6887 #[doc = "case, writes a message to EDF file when the left mouse button is pressed."]
6888 #[doc = ""]
6889 #[doc = "<pre>"]
6890 #[doc = "\\code"]
6891 #[doc = "#include <eyelink.h>"]
6892 #[doc = ""]
6893 #[doc = "while(1)"]
6894 #[doc = "{"]
6895 #[doc = "..."]
6896 #[doc = ""]
6897 #[doc = "message_pump(NULL);"]
6898 #[doc = "}"]
6899 #[doc = "\\endcode"]
6900 #[doc = ""]
6901 #[doc = "\\code"]
6902 #[doc = ""]
6903 #[doc = "#include <eyelink.h>"]
6904 #[doc = "switch (message)"]
6905 #[doc = "{"]
6906 #[doc = "case WM_KEYDOWN:"]
6907 #[doc = "case WM_CHAR:"]
6908 #[doc = "process_key_messages(hwnd, message, wparam, lparam);"]
6909 #[doc = "break;"]
6910 #[doc = ""]
6911 #[doc = "case WM_LBUTTONDOWN:"]
6912 #[doc = "eyemsg_printf(\"Left button is down\");"]
6913 #[doc = "break;"]
6914 #[doc = "..."]
6915 #[doc = "}"]
6916 #[doc = "\\endcode"]
6917 #[doc = "</pre>"]
6918 #[doc = "\\b Output:"]
6919 #[doc = "<pre>"]
6920 #[doc = "\\code"]
6921 #[doc = "MSG\t11661891 SYNCTIME 1"]
6922 #[doc = "MSG\t11662745 left button is down"]
6923 #[doc = "MSG\t11663048 left button is down"]
6924 #[doc = "BUTTON\t11665520\t4\t1"]
6925 #[doc = "MSG\t11665521 ENDBUTTON 4"]
6926 #[doc = "\\endcode"]
6927 #[doc = "</pre>"]
6928 #[doc = ""]
6929 #[doc = "\\sa \\c pump_delay()"]
6930 pub fn message_pump() -> INT16;
6931}
6932extern "C" {
6933 #[doc = " @ingroup pump"]
6934 #[doc = "Similar to \\c message_pump(), but only processes keypresses."]
6935 #[doc = "This may help reduce latency."]
6936 pub fn key_message_pump() -> INT16;
6937}
6938extern "C" {
6939 #[doc = " Similar to msec_delay(), but allows Widows message process"]
6940 #[doc = " only allows message processing if delay > 20 msec"]
6941 #[doc = " does not process dialog box messages"]
6942 #[doc = "During calls to \\c msec_delay(), Windows is not able to handle messages. One result of this is"]
6943 #[doc = "that windows may not appear. This is the preferred delay function when accurate timing is"]
6944 #[doc = "not needed. It calls \\c message_pump() until the last 20 milliseconds of the delay, allowing"]
6945 #[doc = "Windows to function properly. In rare cases, the delay may be longer than expected. It does"]
6946 #[doc = "not process modeless dialog box messages."]
6947 #[doc = ""]
6948 #[doc = "@param delay Number of milliseconds to delay."]
6949 #[doc = ""]
6950 #[doc = "\\b Example:"]
6951 #[doc = "<pre>"]
6952 #[doc = "\\code"]
6953 #[doc = "#include <eyelink.h>"]
6954 #[doc = ""]
6955 #[doc = "static void end_trial(void)"]
6956 #[doc = "{"]
6957 #[doc = "..."]
6958 #[doc = ""]
6959 #[doc = "end_realtime_mode();"]
6960 #[doc = "pump_delay(100);"]
6961 #[doc = ""]
6962 #[doc = "stop_recording();"]
6963 #[doc = "}"]
6964 #[doc = "\\endcode"]
6965 #[doc = "</pre>"]
6966 #[doc = "\\sa \\c msec_delay() and \\c message_pump()"]
6967 pub fn pump_delay(delay: UINT32);
6968}
6969extern "C" {
6970 #[doc = " Initializes and empties local key queue"]
6971 #[doc = "Initializes the key queue used by \\c getkey(). This should be called at the start of your"]
6972 #[doc = "program. It may be called at any time to get rid any of old keys from the queue."]
6973 #[doc = ""]
6974 #[doc = "\\b Example:"]
6975 #[doc = "<pre>"]
6976 #[doc = "\\code"]
6977 #[doc = ""]
6978 #[doc = "#include <eyelink.h>"]
6979 #[doc = ""]
6980 #[doc = "if (set_eyelink_address(\"100.1.1.7\"))"]
6981 #[doc = "return -1;"]
6982 #[doc = ""]
6983 #[doc = "if(open_eyelink_connection(0))"]
6984 #[doc = "return -1;"]
6985 #[doc = ""]
6986 #[doc = "flush_getkey_queue(); // initialize getkey() system"]
6987 #[doc = ""]
6988 #[doc = "..."]
6989 #[doc = "close_eyelink_connection(); // disconnect from tracker"]
6990 #[doc = "\\endcode"]
6991 #[doc = "</pre>"]
6992 #[doc = "\\sa \\c read_getkey_queue()"]
6993 pub fn flush_getkey_queue();
6994}
6995extern "C" {
6996 #[doc = " Similar to getkey(), but doesnt call message pump"]
6997 #[doc = " Use to build message pump for your own window"]
6998 #[doc = "Reads keys from the key queue. It is similar to \\c getkey(), but does not process Windows"]
6999 #[doc = "messages. This can be used to build key-message handlers in languages other than C."]
7000 #[doc = ""]
7001 #[doc = "@remarks These functions are intended to support languages other than C or C++."]
7002 #[doc = "@return \\c 0 if no key pressed.\\n"]
7003 #[doc = "<tt> JUNK_KEY (1)</tt> if untranslatable key.\\n"]
7004 #[doc = "<tt>TERMINATE_KEY (0x7FFF)</tt> if CTRL-C is pressed, \\c terminal_break() was called, or"]
7005 #[doc = "the program has been terminated with ALT-F4.\\n"]
7006 #[doc = "else, code of key if any key pressed."]
7007 #[doc = ""]
7008 #[doc = "\\sa \\c flush_getkey_queue()"]
7009 pub fn read_getkey_queue() -> UINT16;
7010}
7011extern "C" {
7012 #[doc = " Calls getkey(), also sends keys to tracker for remote control *"]
7013 #[doc = " User implementation allows filtering of keys before sending *"]
7014 #[doc = " returns same codes as getkey() *"]
7015 #[doc = "Checks for Windows keystroke events and dispatches messages; similar to \\c getkey(), but"]
7016 #[doc = "also sends keystroke to tracker."]
7017 #[doc = ""]
7018 #[doc = "@remarks Warning: Under Windows XP, this call will not work in realtime mode at all,"]
7019 #[doc = "and will take several seconds to respond if graphics are being drawn"]
7020 #[doc = "continuously. This function works well in realtime mode under Windows 2000."]
7021 #[doc = "@return \\c 0 if no key pressed, else key code.\\n"]
7022 #[doc = "\\c TERMINATE_KEY if CTRL-C held down or program has been terminated."]
7023 #[doc = ""]
7024 #[doc = "\\b Example:"]
7025 #[doc = "<pre>"]
7026 #[doc = "\\code"]
7027 #[doc = "#include <eyelink.h>"]
7028 #[doc = ""]
7029 #[doc = "eyelink_flush_keybutton();"]
7030 #[doc = "while(getkey());"]
7031 #[doc = ""]
7032 #[doc = "while(eyelink_current_mode() & IN_SETUP_MODE)"]
7033 #[doc = "{"]
7034 #[doc = "int i = eyelink_current_mode();"]
7035 #[doc = ""]
7036 #[doc = "if(i & IN_TARGET_MODE)"]
7037 #[doc = "{"]
7038 #[doc = "..."]
7039 #[doc = "}"]
7040 #[doc = "else if(i & IN_IMAGE_MODE)"]
7041 #[doc = "{"]
7042 #[doc = "..."]
7043 #[doc = "}"]
7044 #[doc = ""]
7045 #[doc = "echo_key();"]
7046 #[doc = "}"]
7047 #[doc = "\\endcode"]
7048 #[doc = "</pre>"]
7049 #[doc = ""]
7050 #[doc = "\\sa \\c eyelink_read_keybutton(), \\c eyelink_send_keybutton() and \\c getkey()"]
7051 pub fn echo_key() -> UINT16;
7052}
7053extern "C" {
7054 #[doc = " EYELINK tracker (MS-DOS) key scan equivalent"]
7055 #[doc = " Processes Windows messages, records key events"]
7056 #[doc = " Returns 0 if no key pressed"]
7057 #[doc = " returns 1-255 for non-extended keys"]
7058 #[doc = " returns 0x##00 for extended keys (##=hex code)"]
7059 #[doc = "A routine for checking for Windows keystroke events, and dispatching Windows messages."]
7060 #[doc = "If no key is pressed or waiting, it returns \\c 0. For a standard ASCII key, a value from"]
7061 #[doc = "\\c 31 to \\c 127 is returned. For extended keys, a special key value is returned. If the"]
7062 #[doc = "program has been terminated by ALT-F4 or a call to \\c terminal_break(), or the \"Ctrl\" and"]
7063 #[doc = "\"C\" keys are held down, the value \\c TERMINATE_KEY is returned. The value <tt>JUNK_KEY (1)</tt>"]
7064 #[doc = "is returned if a non-translatable key is pressed."]
7065 #[doc = "@remarks Warning: This function processes and dispatches any waiting messages. This"]
7066 #[doc = "will allow Windows to perform disk access and negates the purpose of"]
7067 #[doc = "realtime mode. Usually these delays will be only a few milliseconds, but"]
7068 #[doc = "delays over 20 milliseconds have been observed. You may wish to call"]
7069 #[doc = "\\c escape_pressed() or \\c break_pressed() in recording loops instead of \\c getkey()"]
7070 #[doc = "if timing is critical, for example in a gaze-contingent display. Under"]
7071 #[doc = "Windows XP and later, for single core system, these calls will not work in realtime mode at all (although"]
7072 #[doc = "these do work under Windows 2000). Under Windows 95/98/Me, realtime"]
7073 #[doc = "performance is impossible even with this strategy.\\n"]
7074 #[doc = "Some useful keys are defined in core_expt.h, as:\\n"]
7075 #[doc = "\\arg \\c CURS_UP \t\t\\c 0x4800"]
7076 #[doc = "\\arg \\c CURS_DOWN \t\t\\c 0x5000"]
7077 #[doc = "\\arg \\c CURS_LEFT \t\t\\c 0x4B00"]
7078 #[doc = "\\arg \\c CURS_RIGHT \t\t\\c 0x4D00"]
7079 #[doc = "\\arg \\c ESC_KEY \t\t\\c 0x001B"]
7080 #[doc = "\\arg \\c ENTER_KEY \t\t\\c 0x000D"]
7081 #[doc = "\\arg \\c TERMINATE_KEY \t\\c 0x7FFF"]
7082 #[doc = "\\arg \\c JUNK_KEY \t\t\\c 0x0001"]
7083 #[doc = "@return \\c 0 if no key pressed, else key code.\\n"]
7084 #[doc = "\\c TERMINATE_KEY if CTRL-C held down or program has been terminated."]
7085 #[doc = ""]
7086 #[doc = "\\b Example:"]
7087 #[doc = "<pre>"]
7088 #[doc = "\\code"]
7089 #[doc = ""]
7090 #[doc = "#include <eyelink.h>"]
7091 #[doc = "UINT32 delay_time = 5000L; // Set the maximum wait time"]
7092 #[doc = ""]
7093 #[doc = "eyelink_flush_keybuttons(0);"]
7094 #[doc = ""]
7095 #[doc = "delay_time += current_msec();"]
7096 #[doc = "while(1)"]
7097 #[doc = "{"]
7098 #[doc = "if(current_time() > delay_time)"]
7099 #[doc = "{"]
7100 #[doc = "eyemsg_printf(\"WAITKEY TIMEOUT\");"]
7101 #[doc = "break;"]
7102 #[doc = "}"]
7103 #[doc = "key = getkey();"]
7104 #[doc = "if(key) // If key press occurs"]
7105 #[doc = "{"]
7106 #[doc = "if(key < 256 && isprint(key))"]
7107 #[doc = "eyemsg_printf(\"WAITKEY '%c'\", key);"]
7108 #[doc = "else"]
7109 #[doc = "eyemsg_printf(\"WAITKEY 0x%04X\", key);"]
7110 #[doc = "break;"]
7111 #[doc = "}"]
7112 #[doc = "}"]
7113 #[doc = "\\endcode"]
7114 #[doc = "</pre>"]
7115 #[doc = ""]
7116 #[doc = "\\sa \\c break_pressed(), \\c echo_key(), \\c escape_pressed(), \\c eyelink_flush_keybuttons()"]
7117 #[doc = "and \\c eyelink_send_keybutton()"]
7118 pub fn getkey() -> UINT16;
7119}
7120extern "C" {
7121 #[doc = "@ingroup keyinput"]
7122 #[doc = "Same as getkey except it returns the modifier and the key pressed."]
7123 #[doc = "It returns a 32 bit unsigned integer. The first 16 bits are reserved for the modifier and the"]
7124 #[doc = "last 16 bits are reserved for the key values. If there are no modifiers present,"]
7125 #[doc = "the return value of this is the same as getkey()."]
7126 #[doc = "If non null pointer passed in for unicode, the translated key value will be set if a key is preent."]
7127 pub fn getkey_with_mod(unicode: *mut UINT16) -> UINT32;
7128}
7129extern "C" {
7130 #[doc = " link command formatting *"]
7131 #[doc = " use just like printf() *"]
7132 #[doc = " returns command result *"]
7133 #[doc = " allows 500 msec. for command to finish *"]
7134 #[doc = "The EyeLink tracker accepts text commands through the link. These commands may be used"]
7135 #[doc = "to configure the system, open data files, and so on."]
7136 #[doc = ""]
7137 #[doc = "@remarks The function waits up to 500 msec. for a success or failure code to be returned"]
7138 #[doc = "from the tracker, then returns the error code \\c NO_REPLY. If you need more"]
7139 #[doc = "time, use \\c eyelink_timed_command() instead."]
7140 #[doc = "@param fmt Similar to printf(), format string plus arguments."]
7141 #[doc = "@return \\c 0 if successfully executed, else error code."]
7142 #[doc = ""]
7143 #[doc = "\\b Example:"]
7144 #[doc = "<pre>"]
7145 #[doc = "\\code"]
7146 #[doc = ""]
7147 #[doc = "#include <eyelink.h>"]
7148 #[doc = ""]
7149 #[doc = "UINT32 t = current_msec();"]
7150 #[doc = "int i, j;"]
7151 #[doc = ""]
7152 #[doc = "eyecmd_printf(\"draw_box %d %d %d %d 7\", 100, 100, 300, 400);"]
7153 #[doc = ""]
7154 #[doc = "while(current_msec()-t < 1000)"]
7155 #[doc = "{"]
7156 #[doc = "i = eyelink_command_result();"]
7157 #[doc = "j = eyelink_last_message(buf);"]
7158 #[doc = ""]
7159 #[doc = "if (i == OK_RESULT)"]
7160 #[doc = "{"]
7161 #[doc = "eyemsg_printf(\"Command executed successfully: %s\", j?buf:\"\");"]
7162 #[doc = "break;"]
7163 #[doc = "}"]
7164 #[doc = "else if (i!=NO_REPLY)"]
7165 #[doc = "{"]
7166 #[doc = "eyemsg_printf(\"Error in executing command: %s\", j?buf:\"\");"]
7167 #[doc = "break;"]
7168 #[doc = "}"]
7169 #[doc = "}"]
7170 #[doc = "\\endcode"]
7171 #[doc = "</pre>"]
7172 #[doc = "\\b Output:"]
7173 #[doc = "<pre>"]
7174 #[doc = "\\code"]
7175 #[doc = "MSG\t5312110 Command executed successfully: OK"]
7176 #[doc = "\\endcode"]
7177 #[doc = "</pre>"]
7178 #[doc = ""]
7179 #[doc = "\\sa \\c eyemsg_printf(), \\c eyelink_send_command() and \\c eyelink_timed_command()"]
7180 #[doc = ""]
7181 pub fn eyecmd_printf(fmt: *const ::std::os::raw::c_char, ...) -> INT16;
7182}
7183extern "C" {
7184 #[doc = " link message formatting *"]
7185 #[doc = " use just like printf() *"]
7186 #[doc = " returns any send error *"]
7187 #[doc = "This sends a text message to the EyeLink tracker, which timestamps it and writes it to"]
7188 #[doc = "the EDF data file. Messages are useful for recording trial conditions, subject responses,"]
7189 #[doc = "or the time of important events. This function is used with the same formatting methods"]
7190 #[doc = "as printf(), allowing numbers to be included. Avoid end-of-line characters (\"\\n\") at"]
7191 #[doc = "end of messages."]
7192 #[doc = ""]
7193 #[doc = "@param fmt Similar to printf(), format string plus arguments."]
7194 #[doc = "@return \\c 0 if successfully sent to tracker, else error code."]
7195 #[doc = ""]
7196 #[doc = "\\b Example:"]
7197 #[doc = "<pre>"]
7198 #[doc = "\\code"]
7199 #[doc = ""]
7200 #[doc = "#include <eyelink.h>"]
7201 #[doc = "char program_name[100] = \"Windows Sample Experiment 2.0\";"]
7202 #[doc = ""]
7203 #[doc = "eyemsg_printf(\"RECORDED BY %s\", program_name);"]
7204 #[doc = "\\endcode"]
7205 #[doc = "</pre>"]
7206 #[doc = "\\b Output:"]
7207 #[doc = "<pre>"]
7208 #[doc = "\\code"]
7209 #[doc = "MSG\t2248248 RECORDED BY Windows Sample Experiment 2.0"]
7210 #[doc = "\\endcode"]
7211 #[doc = "</pre>"]
7212 #[doc = ""]
7213 #[doc = "\\sa \\c eyecmd_printf()"]
7214 pub fn eyemsg_printf(fmt: *const ::std::os::raw::c_char, ...) -> INT16;
7215}
7216extern "C" {
7217 #[doc = " @ingroup messaging"]
7218 #[doc = "This allows us to send messages to the Eyelink tracker to be logged into"]
7219 #[doc = "the data file with a time offset. Use it just like printf() to format the message text."]
7220 #[doc = ""]
7221 #[doc = "@param exectime time offset that reflects in the message's time stamp"]
7222 #[doc = "@param fmt printf format string"]
7223 #[doc = "@return \\c 0 if OK, else error code."]
7224 #[doc = ""]
7225 #[doc = "\\b Example:"]
7226 #[doc = "<pre>"]
7227 #[doc = "@code"]
7228 #[doc = ""]
7229 #[doc = "if(open_eyelink_connection(0) !=0)"]
7230 #[doc = "return 0;"]
7231 #[doc = "open_data_file(\"msgtest.edf\");"]
7232 #[doc = ""]
7233 #[doc = "eyemsg_printf(\"hello\");"]
7234 #[doc = "msec_delay(100);"]
7235 #[doc = "eyemsg_printf_ex(-100,\"hello1\");"]
7236 #[doc = "msec_delay(100);"]
7237 #[doc = ""]
7238 #[doc = "eyemsg_printf_ex(100,\"hello2\");"]
7239 #[doc = "msec_delay(100);"]
7240 #[doc = "eyemsg_printf(\"hello3\");"]
7241 #[doc = "msec_delay(100);"]
7242 #[doc = "close_data_file();"]
7243 #[doc = "receive_data_file(\"\",\".\",1);"]
7244 #[doc = ""]
7245 #[doc = "@endcode"]
7246 #[doc = "</pre>"]
7247 #[doc = "As you can see in the edf file data generated by the above code, both"]
7248 #[doc = "Message1 and Message2 has the same time stamp and message3 and message4 has the"]
7249 #[doc = "same time stamp."]
7250 #[doc = "<pre>"]
7251 #[doc = "@code"]
7252 #[doc = "MSG 8004932 Message1"]
7253 #[doc = "MSG 8004932 Message2"]
7254 #[doc = "MSG 8005232 Message3"]
7255 #[doc = "MSG 8005232 Message4"]
7256 #[doc = "@endcode"]
7257 #[doc = "</pre>"]
7258 pub fn eyemsg_printf_ex(exectime: UINT32, fmt: *const ::std::os::raw::c_char, ...) -> INT16;
7259}
7260extern "C" {
7261 #[doc = " Start recording with data types requested *"]
7262 #[doc = " Check that all requested link data is arriving *"]
7263 #[doc = " return 0 if OK, else trial exit code *"]
7264 #[doc = "Starts the EyeLink tracker recording, sets up link for data reception if enabled."]
7265 #[doc = ""]
7266 #[doc = "@remarks Recording may take 10 to 30 milliseconds to begin from this command. The function"]
7267 #[doc = "also waits until at least one of all requested link data types have been received."]
7268 #[doc = "If the return value is not zero, return the result as the trial result code."]
7269 #[doc = "@param file_samples If \\c 1, writes samples to EDF file. If \\c 0, disables sample recording."]
7270 #[doc = "@param file_events If \\c 1, writes events to EDF file. If \\c 0, disables event recording."]
7271 #[doc = "@param link_samples If \\c 1, sends samples through link. If \\c 0, disables link sample access."]
7272 #[doc = "@param link_events If \\c 1, sends events through link. If \\c 0, disables link event access."]
7273 #[doc = "@return \\c 0 if successful, else trial return code."]
7274 #[doc = ""]
7275 #[doc = "\\b Example:"]
7276 #[doc = "<pre>"]
7277 #[doc = "\\code"]
7278 #[doc = ""]
7279 #[doc = "#include <eyelink.h>"]
7280 #[doc = ""]
7281 #[doc = "error = start_recording(1,1,0,0);"]
7282 #[doc = "if(error != 0) return error;"]
7283 #[doc = ""]
7284 #[doc = "begin_realtime_mode(100);"]
7285 #[doc = ""]
7286 #[doc = "..."]
7287 #[doc = ""]
7288 #[doc = "while(1)"]
7289 #[doc = "{"]
7290 #[doc = "if((error=check_recording())!=0) return error;"]
7291 #[doc = "..."]
7292 #[doc = "}"]
7293 #[doc = ""]
7294 #[doc = "end_realtime_mode();"]
7295 #[doc = "pump_delay(100);"]
7296 #[doc = "stop_recording();"]
7297 #[doc = ""]
7298 #[doc = "while(getkey()); // dump any accumulated key presses"]
7299 #[doc = ""]
7300 #[doc = "return check_record_exit();"]
7301 #[doc = "\\endcode"]
7302 #[doc = "</pre>"]
7303 #[doc = ""]
7304 #[doc = "\\sa \\c check_record_exit(), \\c check_recording(), \\c eyelink_data_start() and \\c stop_recording()"]
7305 pub fn start_recording(
7306 file_samples: INT16,
7307 file_events: INT16,
7308 link_samples: INT16,
7309 link_events: INT16,
7310 ) -> INT16;
7311}
7312extern "C" {
7313 #[doc = " Check if we are recording: if not, report an error *"]
7314 #[doc = " Also calls record_abort_hide() if recording aborted *"]
7315 #[doc = " Returns 0 if recording in progress *"]
7316 #[doc = " Returns ABORT_EXPT if link disconnected *"]
7317 #[doc = " Handles recors abort menu if trial interrupted *"]
7318 #[doc = " Returns TRIAL_ERROR if other non-recording state *"]
7319 #[doc = " Typical use is *"]
7320 #[doc = " if((error=check_recording())!=0) return error; *"]
7321 #[doc = "Check if we are recording: if not, report an error. Call this function while recording."]
7322 #[doc = "It will return \\c 0 if recording is still in progress, or an error code if not. It will"]
7323 #[doc = "also handle the EyeLink Abort menu by calling \\c record_abort_handler(). Any errors returned"]
7324 #[doc = "by this function should be returned by the trial function. On error, this will disable"]
7325 #[doc = "realtime mode and restore the heuristic."]
7326 #[doc = ""]
7327 #[doc = "@return <tt>TRIAL_OK (0)</tt> if no error.\\n"]
7328 #[doc = "<tt>REPEAT_TRIAL, SKIP_TRIAL, ABORT_EXPT, TRIAL_ERROR</tt> if recording aborted."]
7329 #[doc = ""]
7330 #[doc = "\\b Example: See \\c start_recording()"]
7331 #[doc = ""]
7332 #[doc = "\\sa \\c check_record_exit(), \\c eyelink_abort(), \\c start_recording() and \\c stop_recording()"]
7333 pub fn check_recording() -> INT16;
7334}
7335extern "C" {
7336 #[doc = " halt recording, return when tracker finished mode switch"]
7337 #[doc = "Stops recording, resets EyeLink data mode."]
7338 #[doc = ""]
7339 #[doc = "@remarks Call 50 to 100 msec after an event occurs that ends the trial. This function"]
7340 #[doc = "waits for mode switch before returning."]
7341 #[doc = ""]
7342 #[doc = "\\b Example: See \\c start_recording()"]
7343 #[doc = ""]
7344 #[doc = "\\sa \\c eyelink_data_stop(), \\c set_offline_mode() and \\c start_recording()"]
7345 pub fn stop_recording();
7346}
7347extern "C" {
7348 #[doc = " enter tracker idle mode, wait till finished mode switch *"]
7349 #[doc = "Places EyeLink tracker in off-line (idle) mode."]
7350 #[doc = "Wait till the tracker has finished the mode transition."]
7351 #[doc = ""]
7352 #[doc = "\\b Example:"]
7353 #[doc = "<pre>"]
7354 #[doc = "\\code"]
7355 #[doc = ""]
7356 #[doc = "if(eyelink_is_connected())"]
7357 #[doc = "{"]
7358 #[doc = "set_offline_mode();"]
7359 #[doc = "eyecmd_printf(\"close_data_file\"); // close data file"]
7360 #[doc = "eyelink_close(1); // disconnect from tracker"]
7361 #[doc = "}"]
7362 #[doc = ""]
7363 #[doc = "close_eyelink_system();"]
7364 #[doc = "\\endcode"]
7365 #[doc = "</pre>"]
7366 #[doc = ""]
7367 #[doc = "\\sa \\c eyelink_abort()"]
7368 pub fn set_offline_mode();
7369}
7370extern "C" {
7371 #[doc = " call at end of trial, return result *"]
7372 #[doc = " check if we are in Abort menu after recording stopped *"]
7373 #[doc = " returns trial exit code *"]
7374 #[doc = "Checks if we are in Abort menu after recording stopped and returns trial exit code. Call this"]
7375 #[doc = "function on leaving a trial. It checks if the EyeLink tracker is displaying the Abort menu, and"]
7376 #[doc = "handles it if required. The return value from this function should be returned as the trial"]
7377 #[doc = "result code."]
7378 #[doc = ""]
7379 #[doc = "@return \\c TRIAL_OK if no error.\\n"]
7380 #[doc = "<tt>REPEAT_TRIAL, SKIP_TRIAL, ABORT_EXPT</tt> if Abort menu activated."]
7381 #[doc = ""]
7382 #[doc = "\\b Example: See \\c start_recording()"]
7383 #[doc = ""]
7384 #[doc = "\\sa \\c check_recording(), \\c eyelink_abort(), \\c start_recording() and \\c stop_recording()"]
7385 pub fn check_record_exit() -> INT16;
7386}
7387extern "C" {
7388 #[doc = "CALIBRATION, DRIFT CORRECTION CONTROL"]
7389 #[doc = " Call this to stop calibration/drift correction in progress"]
7390 #[doc = " This could be called from a Windows message handler"]
7391 #[doc = "This function should be called from an message or event handler if an ongoing call to"]
7392 #[doc = "\\c do_drift_correct() or \\c do_tracker_setup() should return immediately."]
7393 #[doc = ""]
7394 #[doc = "\\b Example:"]
7395 #[doc = "<pre>"]
7396 #[doc = "\\code"]
7397 #[doc = "#include <eyelink.h>"]
7398 #[doc = "switch (message)"]
7399 #[doc = "{"]
7400 #[doc = "case WM_KEYDOWN:"]
7401 #[doc = "case WM_CHAR:"]
7402 #[doc = "{"]
7403 #[doc = "UINT16 key = process_key_messages(hwnd, message, wparam, lparam);"]
7404 #[doc = "eyemsg_printf(\"key %d\", key);"]
7405 #[doc = ""]
7406 #[doc = "if (key == 0x5100 && (eyelink_current_mode() & IN_SETUP_MODE))"]
7407 #[doc = "exit_calibration();"]
7408 #[doc = "break;"]
7409 #[doc = "}"]
7410 #[doc = "..."]
7411 #[doc = "}"]
7412 #[doc = "\\endcode"]
7413 #[doc = "</pre>"]
7414 #[doc = ""]
7415 #[doc = "\\sa \\c do_tracker_setup(), \\c do_drift_correct() and \\c eyelink_current_mode()"]
7416 pub fn exit_calibration();
7417}
7418extern "C" {
7419 #[doc = " Starts tracker into Setup Menu. *"]
7420 #[doc = " From this the operator can do camera setup, calibrations, etc. *"]
7421 #[doc = " Pressing ESC on the tracker exits. *"]
7422 #[doc = " Leaving the setup menu on the tracker (ESC) key) also exits. *"]
7423 #[doc = " RETURNS: 0 if OK, 27 if aborted, TERMINATE_KEY if pressed *"]
7424 #[doc = "Switches the EyeLink tracker to the Setup menu, from which camera setup, calibration,"]
7425 #[doc = "validation, drift correction, and configuration may be performed. Pressing the 'ESC' key on"]
7426 #[doc = "the tracker keyboard will exit the Setup menu and return from this function. Calling"]
7427 #[doc = "\\c exit_calibration() from an event handler will cause any call to \\c do_tracker_setup() in"]
7428 #[doc = "progress to return immediately."]
7429 #[doc = ""]
7430 #[doc = "@return Always \\c 0."]
7431 #[doc = ""]
7432 #[doc = "\\b Example:"]
7433 #[doc = "<pre>"]
7434 #[doc = "\\code"]
7435 #[doc = "#include <eyelink.h>"]
7436 #[doc = ""]
7437 #[doc = "COLORREF target_foreground_color = RGB(0,0,0);"]
7438 #[doc = "COLORREF target_background_color = RGB(255,255,255);"]
7439 #[doc = "int i = SCRWIDTH/60; // Selects best size for calibration target"]
7440 #[doc = "int j = SCRWIDTH/300; // Selects size for focal spot in target"]
7441 #[doc = "if(j < 2) j = 2;"]
7442 #[doc = ""]
7443 #[doc = "set_target_size(i, j);"]
7444 #[doc = ""]
7445 #[doc = "set_calibration_colors(target_foreground_color, target_background_color);"]
7446 #[doc = ""]
7447 #[doc = "set_cal_sounds(\"\", \"\", \"\");"]
7448 #[doc = "set_dcorr_sounds(\"\", \"off\", \"off\");"]
7449 #[doc = ""]
7450 #[doc = "do_tracker_setup();"]
7451 #[doc = ""]
7452 #[doc = "..."]
7453 #[doc = "\\endcode"]
7454 #[doc = "</pre>"]
7455 #[doc = ""]
7456 #[doc = "\\sa \\c do_drift_correct(), \\c set_cal_sounds(), \\c set_calibration_colors() and \\c set_target_size()"]
7457 pub fn do_tracker_setup() -> INT16;
7458}
7459extern "C" {
7460 #[doc = "PERFORM DRIFT CORRECTION ON TRACKER"]
7461 #[doc = " Performs a drift correction, with target at (x,y). *"]
7462 #[doc = " If operator aborts with ESC, we assume there's a setup *"]
7463 #[doc = " problem and go to the setup menu (which may clear the *"]
7464 #[doc = " display). Redraw display if needed and repeat the *"]
7465 #[doc = " call to do_drift_correct() in this case. *"]
7466 #[doc = " ARGS: x, y: position of target *"]
7467 #[doc = " draw: draws target if 1, 0 if you draw target first *"]
7468 #[doc = " allow_setup: 0 disables ESC key setup mode entry *"]
7469 #[doc = " RETURNS: 0 if OK, 27 if Setup was called, TERMINATE_KEY if pressed *"]
7470 #[doc = "Performs a drift correction before a trial."]
7471 #[doc = ""]
7472 #[doc = "@remarks When the 'ESC' key is pressed during drift correction, \\c <allow_setup> determines"]
7473 #[doc = "the result. If \\c 1, the EyeLink Setup menu is accessed. This will always clear"]
7474 #[doc = "the display, so redrawing of hidden stimuli may be required. Otherwise, the drift"]
7475 #[doc = "correction is aborted. Calling \\c exit_calibration() from an event handler will cause"]
7476 #[doc = "any call to \\c do_drift_correct() in progress to return immediately. In all cases,"]
7477 #[doc = "the return code will be \\c 27 (\\c ESC_KEY)."]
7478 #[doc = "@param x X Position of drift correction target."]
7479 #[doc = "@param y Y Position of drift correction target."]
7480 #[doc = "@param draw If \\c 1, the drift correction will clear the screen to the target background color,"]
7481 #[doc = "draw the target, and clear the screen again when the drift correction is done."]
7482 #[doc = "If \\c 0, the fixation target must be drawn by the user."]
7483 #[doc = "@param allow_setup If \\c 1, accesses Setup menu before returning, else aborts drift correction."]
7484 #[doc = "@return \\c 0 if successful, \\c 27 if 'ESC' key was pressed to enter Setup menu or abort."]
7485 #[doc = ""]
7486 #[doc = "\\b Example:"]
7487 #[doc = "<pre>"]
7488 #[doc = "\\code"]
7489 #[doc = ""]
7490 #[doc = "#include <eyelink.h>"]
7491 #[doc = ""]
7492 #[doc = "int target_shown = 0;"]
7493 #[doc = "int draw_own_target = 1;"]
7494 #[doc = ""]
7495 #[doc = "while(1)"]
7496 #[doc = "{"]
7497 #[doc = "if(!eyelink_is_connected())"]
7498 #[doc = "return ABORT_EXPT;"]
7499 #[doc = ""]
7500 #[doc = "if (draw_own_target && !target_shown)"]
7501 #[doc = "{"]
7502 #[doc = "target_shown = 1;"]
7503 #[doc = "}"]
7504 #[doc = ""]
7505 #[doc = "error = do_drift_correct(SCRWIDTH/2, SCRHEIGHT/2,"]
7506 #[doc = "draw_own_target, 1);"]
7507 #[doc = ""]
7508 #[doc = "if(error!=27)"]
7509 #[doc = "break;"]
7510 #[doc = "else"]
7511 #[doc = "target_shown = 0;"]
7512 #[doc = "}"]
7513 #[doc = "\\endcode"]
7514 #[doc = "</pre>"]
7515 #[doc = ""]
7516 #[doc = "\\sa \\c do_tracker_setup() and \\c set_dcorr_sounds()"]
7517 pub fn do_drift_correct(x: INT16, y: INT16, draw: INT16, allow_setup: INT16) -> INT16;
7518}
7519extern "C" {
7520 #[doc = " @ingroup setup_eyelink"]
7521 #[doc = "Performs a drift correction before a trial. Same as do_drift_correct() except, this takes the x,y values as float."]
7522 #[doc = ""]
7523 #[doc = "@remarks When the 'ESC' key is pressed during drift correction, \\c <allow_setup> determines"]
7524 #[doc = "the result. If \\c 1, the EyeLink Setup menu is accessed. This will always clear"]
7525 #[doc = "the display, so redrawing of hidden stimuli may be required. Otherwise, the drift"]
7526 #[doc = "correction is aborted. Calling \\c exit_calibration() from an event handler will cause"]
7527 #[doc = "any call to \\c do_drift_correct() in progress to return immediately. In all cases,"]
7528 #[doc = "the return code will be \\c 27 (\\c ESC_KEY)."]
7529 #[doc = "@param x X Position of drift correction target."]
7530 #[doc = "@param y Y Position of drift correction target."]
7531 #[doc = "@param draw If \\c 1, the drift correction will clear the screen to the target background color,"]
7532 #[doc = "draw the target, and clear the screen again when the drift correction is done."]
7533 #[doc = "If \\c 0, the fixation target must be drawn by the user."]
7534 #[doc = "@param allow_setup If \\c 1, accesses Setup menu before returning, else aborts drift correction."]
7535 #[doc = "@return \\c 0 if successful, \\c 27 if 'ESC' key was pressed to enter Setup menu or abort."]
7536 #[doc = ""]
7537 #[doc = "\\b Example:"]
7538 #[doc = "<pre>"]
7539 #[doc = "\\code"]
7540 #[doc = ""]
7541 #[doc = "#include <eyelink.h>"]
7542 #[doc = ""]
7543 #[doc = "int target_shown = 0;"]
7544 #[doc = "int draw_own_target = 1;"]
7545 #[doc = ""]
7546 #[doc = "while(1)"]
7547 #[doc = "{"]
7548 #[doc = "if(!eyelink_is_connected())"]
7549 #[doc = "return ABORT_EXPT;"]
7550 #[doc = ""]
7551 #[doc = "if (draw_own_target && !target_shown)"]
7552 #[doc = "{"]
7553 #[doc = "target_shown = 1;"]
7554 #[doc = "}"]
7555 #[doc = ""]
7556 #[doc = "error = do_drift_correctf(SCRWIDTH/2, SCRHEIGHT/2,"]
7557 #[doc = "draw_own_target, 1);"]
7558 #[doc = ""]
7559 #[doc = "if(error!=27)"]
7560 #[doc = "break;"]
7561 #[doc = "else"]
7562 #[doc = "target_shown = 0;"]
7563 #[doc = "}"]
7564 #[doc = "\\endcode"]
7565 #[doc = "</pre>"]
7566 #[doc = ""]
7567 #[doc = "\\sa \\c do_tracker_setup() and \\c set_dcorr_sounds()"]
7568 pub fn do_drift_correctf(x: f32, y: f32, draw: INT16, allow_setup: INT16) -> INT16;
7569}
7570extern "C" {
7571 #[doc = " (USED BY do_tracker_setup(), YOU DO NOT NEED TO CALL normally *"]
7572 #[doc = " Called for you by do_tracker_setup() and do_drift_correct() * *"]
7573 #[doc = "This function needs some \"helper\" graphics to clear the scren and draw the"]
7574 #[doc = "fixation targets. Since C graphics are compiler-dependent, these are found"]
7575 #[doc = "in other C source files."]
7576 #[doc = ""]
7577 #[doc = "While tracker is in any mode with fixation targets."]
7578 #[doc = "Reproduce targets tracker needs."]
7579 #[doc = "(if local_trigger) Local Spacebar acts as trigger."]
7580 #[doc = "(if local_control) Local keys echoes to tracker."]
7581 #[doc = "@return \\c 0 if OK, \\c 27 if aborted, \\c TERMINATE_KEY if pressed."]
7582 pub fn target_mode_display() -> INT16;
7583}
7584extern "C" {
7585 #[doc = " (USED BY do_tracker_setup(), YOU DO NOT NEED TO CALL normally *"]
7586 #[doc = "This handles display of the EyeLink camera images. While in imaging mode,"]
7587 #[doc = "it contiuously requests and displays the current camera image. It also"]
7588 #[doc = "displays the camera name and threshold setting. Keys on the subject PC"]
7589 #[doc = "keyboard are sent to the tracker, so the experimenter can use it during"]
7590 #[doc = "setup. It will exit when the tracker leaves imaging mode or disconnects."]
7591 #[doc = ""]
7592 #[doc = "@return \\c 0 if OK, \\c TERMINATE_KEY if pressed, \\c -1 if disconnect."]
7593 #[doc = "@remark This function not normally used externally. If you need camera setup"]
7594 #[doc = "use do_tracker_setup() or if you need drift correction use do_drift_correct()"]
7595 pub fn image_mode_display() -> INT16;
7596}
7597extern "C" {
7598 #[doc = " displays general STOP-icon alert box"]
7599 #[doc = " text is formatted via printf-like arguments"]
7600 #[doc = "When an error occurs, a notification must be given to the user. If no alert_printf_hook"]
7601 #[doc = "is set, this function uses the Windows MessageBox() function in windows. On other"]
7602 #[doc = "platforms printf is called."]
7603 #[doc = ""]
7604 #[doc = "@param fmt A printf() formatting string<...>: any arguments required."]
7605 #[doc = ""]
7606 #[doc = "@remark The error message may no showup in certain display environment eg."]
7607 #[doc = "SDL with SDL_FULLSCREEN|SDL_HWSURFACE | SDL_DOUBLEBUF"]
7608 pub fn alert_printf(fmt: *mut ::std::os::raw::c_char, ...);
7609}
7610extern "C" {
7611 #[doc = " THIS ROUTINE MAY NEED TO BE CREATED FOR EACH PLATFORM *"]
7612 #[doc = " This call should be implemented for a standard programming interface *"]
7613 #[doc = " Copies tracker file <src> to local file <dest>. *"]
7614 #[doc = " If specifying full file name, be sure to add \".edf\" *"]
7615 #[doc = " extensions for data files. *"]
7616 #[doc = " If <src> = \"\", tracker will send last opened data file. *"]
7617 #[doc = " If <dest> is NULL or \"\", creates local file with source file name. *"]
7618 #[doc = " Else, creates file using <dest> as name. If <dest_is_path> != 0 *"]
7619 #[doc = " uses source file name but adds <dest> as directory path. *"]
7620 #[doc = " returns: file size if OK, negative = error code *"]
7621 #[doc = "This receives a data file from the EyeLink tracker PC."]
7622 #[doc = "\\param[in] src Name of eye tracker file (including extension). If \"\" (empty string), asks"]
7623 #[doc = "tracker for name of last opened data file."]
7624 #[doc = "\\param[in] dest Name of local file to write to (including extension). This must be a"]
7625 #[doc = "valid file name or directory name."]
7626 #[doc = "\\param[in] dest_is_path If nonzero, appends file name to <dest> as a directory path."]
7627 #[doc = "\\return \\c 0 if file transfer was cancelled.\\n"]
7628 #[doc = "Size of file if successful.\\n"]
7629 #[doc = "\\c -1 if file size is negative.\\n"]
7630 #[doc = "\\c -2 if cannot create local file.\\n"]
7631 #[doc = "\\c -3 if file transfer was cancelled.\\n"]
7632 #[doc = "\\c -4 if file transfer was aborted.\\n"]
7633 #[doc = "\\c -5 if error occurred while writing file.\\n"]
7634 #[doc = "\\c -6 if link was terminated.\\n"]
7635 #[doc = ""]
7636 #[doc = "\\b Example: See \\c open_data_file()"]
7637 #[doc = ""]
7638 #[doc = "\\sa \\c close_data_file() and \\c open_data_file()"]
7639 #[doc = ""]
7640 #[doc = "\\remark If linked against eyelink_exptkit20.lib or w32_dialogs.h is included,"]
7641 #[doc = "the behaviour of this function is receive_data_file_dialog()."]
7642 pub fn receive_data_file(
7643 src: *mut ::std::os::raw::c_char,
7644 dest: *mut ::std::os::raw::c_char,
7645 dest_is_path: INT16,
7646 ) -> INT32;
7647}
7648extern "C" {
7649 #[doc = " exact same as receive_data_file. except the feedback parameters can be used"]
7650 #[doc = " for showing what is the full size of the edf file and howmuch is received so far."]
7651 #[doc = " this function is currently used internally only."]
7652 #[doc = "This receives a data file from the EyeLink tracker PC."]
7653 #[doc = "Exact same as \\c receive_data_file(). except the feedback parameters can be used"]
7654 #[doc = "for showing what is the full size of the edf file and how much is received so far."]
7655 #[doc = "This function is currently used internally only."]
7656 #[doc = ""]
7657 #[doc = "@param[in] src Name of eye tracker file (including extension). If \"\" (empty string), asks"]
7658 #[doc = "tracker for name of last opened data file."]
7659 #[doc = "@param[in] dest Name of local file to write to (including extension). This must be a"]
7660 #[doc = "valid file name or directory name."]
7661 #[doc = "@param[in] dest_is_path If nonzero, appends file name to <dest> as a directory path."]
7662 #[doc = "@param[in] progress A function pointer, that takes size and received size integers."]
7663 #[doc = "This allows, one to display progress bar on edf file transfer."]
7664 #[doc = "@return \\c 0 if file transfer was cancelled.\\n"]
7665 #[doc = "Size of file if successful.\\n"]
7666 #[doc = "\\c -1 if file size is negative.\\n"]
7667 #[doc = "\\c -2 if cannot create local file."]
7668 #[doc = "\\c -3 if file transfer was cancelled"]
7669 #[doc = "\\c -4 if file transfer was aborted"]
7670 #[doc = "\\c -5 if error occurred while writing file"]
7671 #[doc = "\\c -6 if link was terminated"]
7672 #[doc = ""]
7673 #[doc = ""]
7674 #[doc = "\\sa \\c receive_data_file, \\c close_data_file() and \\c open_data_file()"]
7675 pub fn receive_data_file_feedback(
7676 src: *mut ::std::os::raw::c_char,
7677 dest: *mut ::std::os::raw::c_char,
7678 dest_is_path: INT16,
7679 progress: ::std::option::Option<
7680 unsafe extern "C" fn(size: ::std::os::raw::c_uint, received: ::std::os::raw::c_uint),
7681 >,
7682 ) -> INT32;
7683}
7684extern "C" {
7685 pub fn receive_data_file_feedback_v2(
7686 src: *mut ::std::os::raw::c_char,
7687 dest: *mut ::std::os::raw::c_char,
7688 dest_is_path: INT16,
7689 progress: ::std::option::Option<
7690 unsafe extern "C" fn(size: ::std::os::raw::c_uint, received: ::std::os::raw::c_uint),
7691 >,
7692 ) -> INT32;
7693}
7694extern "C" {
7695 #[doc = " @ingroup datafile"]
7696 #[doc = "This function sends a file to the Eyelink tracker. Source destination file name"]
7697 #[doc = "should be given. Using this function, an image or video can be uploaded from the display"]
7698 #[doc = "PC to the host Tracker PC. The image can later be used as a Gaze Cursor Backdrop via a call"]
7699 #[doc = "to eyelink_send_command()."]
7700 #[doc = ""]
7701 #[doc = "@param src Name of local file (including extension)."]
7702 #[doc = "@param dest Name of eye tracker file to write to (including extension)."]
7703 #[doc = "@param dest_is_path If nonzero, appends file name to <dest> as a directory path."]
7704 #[doc = "@param progress A function pointer, that takes size and received size integers."]
7705 #[doc = "This allows, one to display progress bar on file transfer."]
7706 #[doc = ""]
7707 #[doc = "@return Returns \\c size of file if transferred file size is equal to the real file size. \\n"]
7708 #[doc = "\\c -1 if fail to connect tracker ftpd.\\n"]
7709 #[doc = "\\c -2 if fail to open file.\\n"]
7710 #[doc = "\\c -4 if fail to receive reply from tracker ftpd. \\n"]
7711 #[doc = "\\c -5 if transferred file size is unequal to the real file size."]
7712 pub fn send_data_file_feedback(
7713 src: *mut ::std::os::raw::c_char,
7714 dest: *mut ::std::os::raw::c_char,
7715 dest_is_path: INT16,
7716 progress: ::std::option::Option<
7717 unsafe extern "C" fn(size: ::std::os::raw::c_uint, received: ::std::os::raw::c_uint),
7718 >,
7719 ) -> INT32;
7720}
7721extern "C" {
7722 #[doc = " These functions were added as future revisions of EyeLink"]
7723 #[doc = " might require significant time to open and close EDF files"]
7724 #[doc = " Opens EDF file on tracker hard disk"]
7725 #[doc = "Opens an EDF file, closes any existing file."]
7726 #[doc = ""]
7727 #[doc = "@param name Name of data file,which can only use letters(uppercase and lowercase),"]
7728 #[doc = "numbers(0-9),and underscore(appears from 2nd place). Name extension"]
7729 #[doc = "can only be edf."]
7730 #[doc = "@return Returns \\c 0 if success, else error code."]
7731 pub fn open_data_file(name: *mut ::std::os::raw::c_char) -> INT16;
7732}
7733extern "C" {
7734 #[doc = " Closes EDF file on tracker hard disk"]
7735 #[doc = "Closes any open EDF file."]
7736 #[doc = ""]
7737 #[doc = "@return Returns \\c 0 if success, else error code."]
7738 pub fn close_data_file() -> INT16;
7739}
7740extern "C" {
7741 #[doc = " @ingroup keyinput"]
7742 #[doc = "This function tests if the 'ESC' key is held down, and is usually used to break out of"]
7743 #[doc = "nested loops. This does not allow processing of Windows messages, unlike \\c getkey()."]
7744 #[doc = ""]
7745 #[doc = "@remarks Warning: Under Windows XP, this call will not work in realtime mode at all,"]
7746 #[doc = "and will take several seconds to respond if graphics are being drawn"]
7747 #[doc = "continuously. This function works well in realtime mode under Windows 2000."]
7748 #[doc = "@return \\c 1 if 'ESC' key held down; \\c 0 if not."]
7749 #[doc = ""]
7750 #[doc = "\\b Example: See \\c break_pressed()"]
7751 #[doc = ""]
7752 #[doc = "\\sa \\c break_pressed(), \\c getkey() and \\c echo_key()"]
7753 pub fn escape_pressed() -> INT16;
7754}
7755extern "C" {
7756 #[doc = " @ingroup keyinput"]
7757 #[doc = "Tests if the program is being interrupted. You should break out of loops immediately if"]
7758 #[doc = "this function does not return \\c 0, if \\c getkey() return \\c TERMINATE_KEY, or if"]
7759 #[doc = "\\c eyelink_is_connected() returns \\c 0."]
7760 #[doc = ""]
7761 #[doc = "@remarks Warning: Under Windows XP, this call will not work in realtime mode at all, and"]
7762 #[doc = "will take several seconds to respond if graphics are being drawn continuously."]
7763 #[doc = "This function works well in realtime mode under Windows 2000."]
7764 #[doc = "@return \\c 1 if CTRL-C is pressed, \\c terminal_break() was called, or the program has been"]
7765 #[doc = "terminated with ALT-F4; \\c 0 otherwise."]
7766 #[doc = ""]
7767 #[doc = "\\b Example:"]
7768 #[doc = "<pre>"]
7769 #[doc = "\\code"]
7770 #[doc = ""]
7771 #[doc = "#include <eyelink.h>"]
7772 #[doc = ""]
7773 #[doc = "eyelink_flush_keybuttons(0);"]
7774 #[doc = ""]
7775 #[doc = "while(1)"]
7776 #[doc = "{"]
7777 #[doc = "if((error=check_recording())!=0) return error;"]
7778 #[doc = ""]
7779 #[doc = "if(break_pressed())"]
7780 #[doc = "return ABORT_EXPT;"]
7781 #[doc = ""]
7782 #[doc = "if(escape_pressed())"]
7783 #[doc = "return SKIP_TRIAL;"]
7784 #[doc = ""]
7785 #[doc = "..."]
7786 #[doc = "}"]
7787 #[doc = "\\endcode"]
7788 #[doc = "</pre>"]
7789 #[doc = ""]
7790 #[doc = "\\sa \\c echo_key(), \\c escape_pressed() and \\c getkey()"]
7791 pub fn break_pressed() -> INT16;
7792}
7793extern "C" {
7794 #[doc = " ASYNCHRONOUS BREAKOUTS *********/"]
7795 #[doc = " Because Windows is multi-tasking, some other event (i.e. a timer event or"]
7796 #[doc = " ALT-TAB) may affect your application during loops or calibration."]
7797 #[doc = " Your event handlers can call these functions to stop ongoing operations"]
7798 #[doc = ""]
7799 #[doc = " call from Windows event handlers when application must exit"]
7800 #[doc = " forces calibration or drift correction to exit with result=27"]
7801 #[doc = " when <assert> is nonzero, will caused break_pressed() to test true"]
7802 #[doc = " continuously, also causes getkey() to return TERMINATE_KEY"]
7803 #[doc = " If <assert> is 0, will restore break_pressed() and getkey() to normal"]
7804 #[doc = "This function can be called in an event handler to signal that the program is terminating."]
7805 #[doc = "Calling this function with an argument of \\c 1 will cause \\c break_pressed() to return \\c 1, and"]
7806 #[doc = "\\c getkey() to return \\c TERMINATE_KEY. These functions can be re-enabled by calling"]
7807 #[doc = "\\c terminal_break() with an argument of \\c 0."]
7808 #[doc = ""]
7809 #[doc = "@param assert \\c 1 to signal a program break, \\c 0 to reset break."]
7810 #[doc = ""]
7811 #[doc = "\\b Example:"]
7812 #[doc = "<pre>"]
7813 #[doc = "\\code"]
7814 #[doc = ""]
7815 #[doc = "#include <eyelink.h>"]
7816 #[doc = ""]
7817 #[doc = "switch (message)"]
7818 #[doc = "{"]
7819 #[doc = "case WM_CLOSE: // If ALT-F4 pressed, force program to close"]
7820 #[doc = "PostQuitMessage(0);"]
7821 #[doc = "terminal_break(1);// break out of loops"]
7822 #[doc = "break;"]
7823 #[doc = ""]
7824 #[doc = "case WM_DESTROY: // Window being closed by ALT-F4"]
7825 #[doc = "PostQuitMessage( 0 );"]
7826 #[doc = "..."]
7827 #[doc = "terminal_break(1);// break out of loops"]
7828 #[doc = "break;"]
7829 #[doc = ""]
7830 #[doc = "case WM_QUIT: // Needs to break out of any loops"]
7831 #[doc = "terminal_break(1);"]
7832 #[doc = "break;"]
7833 #[doc = "..."]
7834 #[doc = "}"]
7835 #[doc = "\\endcode"]
7836 #[doc = "</pre>"]
7837 #[doc = ""]
7838 #[doc = "\\sa \\c break_pressed() and \\c getkey()"]
7839 pub fn terminal_break(assert: INT16);
7840}
7841extern "C" {
7842 pub fn application_terminated() -> INT16;
7843}
7844extern "C" {
7845 #[doc = " Sets up for realtime execution (minimum delays)"]
7846 #[doc = " This may take some time (assume up to 100 msec)"]
7847 #[doc = " <delay> sets min time so delay may be useful"]
7848 #[doc = " Effects vary by operating system"]
7849 #[doc = " Keyboard, mouse, and sound may be disabled in some OS"]
7850 #[doc = " Has little effect in Win9x/ME"]
7851 #[doc = "Sets the application priority and cleans up pending Windows activity to place the"]
7852 #[doc = "application in realtime mode. This could take up to 100 milliseconds, depending on"]
7853 #[doc = "the operation system, to set the application priority. Use the \\c <delay> value to set"]
7854 #[doc = "the minimum time this function takes, so that this function can act as a useful delay."]
7855 #[doc = ""]
7856 #[doc = "@remarks Warning: Under Windows XP, on single core machines, this call will lock out all"]
7857 #[doc = "keyboard input. The Task Manager will take about 30 seconds to respond to"]
7858 #[doc = "CTRL-ALT-DEL, so press this once and be patient. The keyboard functions well"]
7859 #[doc = "in realtime mode under Windows 2000. This function has little or no effect under"]
7860 #[doc = "Windows 95/98/Me. Keyboard, mouse, and sound may be disabled in some OS."]
7861 #[doc = ""]
7862 #[doc = "@remarks Under Windowns Xp the application need to run under administrator credentials to"]
7863 #[doc = "get the realtime priorities."]
7864 #[doc = ""]
7865 #[doc = "@remarks Under Windows Vista and later, the application need to be run as \"Run as Administrator\""]
7866 #[doc = "to get realtime priorities."]
7867 #[doc = ""]
7868 #[doc = "@remarks Under Linux, the application need to be run as root to get realtime priorities."]
7869 #[doc = ""]
7870 #[doc = "@param delay Minimum delay in milliseconds (should be about 100)."]
7871 #[doc = ""]
7872 #[doc = "\\b Example:"]
7873 #[doc = "<pre>"]
7874 #[doc = "\\code"]
7875 #[doc = "#include <eyelink.h>"]
7876 #[doc = ""]
7877 #[doc = "int error;"]
7878 #[doc = ""]
7879 #[doc = "error = start_recording(1,1,1,1);"]
7880 #[doc = "if(error != 0) return error; // return error code if failed"]
7881 #[doc = ""]
7882 #[doc = "begin_realtime_mode(100);"]
7883 #[doc = ""]
7884 #[doc = "..."]
7885 #[doc = ""]
7886 #[doc = "end_realtime_mode();"]
7887 #[doc = ""]
7888 #[doc = "..."]
7889 #[doc = "\\endcode"]
7890 #[doc = "</pre>"]
7891 #[doc = ""]
7892 #[doc = "\\sa \\c end_realtime_mode()"]
7893 pub fn begin_realtime_mode(delay: UINT32);
7894}
7895extern "C" {
7896 #[doc = " Exits realtime execution mode"]
7897 #[doc = " Typically just lowers priority"]
7898 #[doc = "Returns the application to a priority slightly above normal, to end realtime mode. This"]
7899 #[doc = "function should execute rapidly, but there is the possibility that Windows will allow"]
7900 #[doc = "other tasks to run after this call, causing delays of 1-20 milliseconds."]
7901 #[doc = ""]
7902 #[doc = "@remarks Warning: This function has little or no effect under Windows 95/98/Me."]
7903 #[doc = ""]
7904 #[doc = "\\b Example: See \\c begin_realtime_mode()"]
7905 #[doc = ""]
7906 #[doc = "\\sa \\c begin_realtime_mode()"]
7907 pub fn end_realtime_mode();
7908}
7909extern "C" {
7910 #[doc = " @ingroup priority"]
7911 #[doc = "Raise application priority."]
7912 #[doc = "May interfere with other applications."]
7913 pub fn set_high_priority();
7914}
7915extern "C" {
7916 #[doc = " @ingroup priority"]
7917 #[doc = "Sets application priority to system normal"]
7918 pub fn set_normal_priority();
7919}
7920extern "C" {
7921 #[doc = " @ingroup priority"]
7922 #[doc = "returns whether the current mode is real-time."]
7923 #[doc = ""]
7924 #[doc = "@return \\c 1 if in realtime mode, else \\c 0."]
7925 pub fn in_realtime_mode() -> INT32;
7926}
7927extern "C" {
7928 pub fn eyelink_enable_extended_realtime();
7929}
7930#[doc = "@ingroup display"]
7931#[doc = "\\brief Represents an RGB color."]
7932#[repr(C)]
7933#[derive(Debug, Default, Copy, Clone)]
7934pub struct EYECOLOR {
7935 #[doc = "< Red"]
7936 pub r: byte,
7937 #[doc = "< Green"]
7938 pub g: byte,
7939 #[doc = "< Blue"]
7940 pub b: byte,
7941 pub unused: byte,
7942}
7943#[test]
7944fn bindgen_test_layout_EYECOLOR() {
7945 assert_eq!(
7946 ::std::mem::size_of::<EYECOLOR>(),
7947 4usize,
7948 concat!("Size of: ", stringify!(EYECOLOR))
7949 );
7950 assert_eq!(
7951 ::std::mem::align_of::<EYECOLOR>(),
7952 1usize,
7953 concat!("Alignment of ", stringify!(EYECOLOR))
7954 );
7955 assert_eq!(
7956 unsafe { &(*(::std::ptr::null::<EYECOLOR>())).r as *const _ as usize },
7957 0usize,
7958 concat!(
7959 "Offset of field: ",
7960 stringify!(EYECOLOR),
7961 "::",
7962 stringify!(r)
7963 )
7964 );
7965 assert_eq!(
7966 unsafe { &(*(::std::ptr::null::<EYECOLOR>())).g as *const _ as usize },
7967 1usize,
7968 concat!(
7969 "Offset of field: ",
7970 stringify!(EYECOLOR),
7971 "::",
7972 stringify!(g)
7973 )
7974 );
7975 assert_eq!(
7976 unsafe { &(*(::std::ptr::null::<EYECOLOR>())).b as *const _ as usize },
7977 2usize,
7978 concat!(
7979 "Offset of field: ",
7980 stringify!(EYECOLOR),
7981 "::",
7982 stringify!(b)
7983 )
7984 );
7985 assert_eq!(
7986 unsafe { &(*(::std::ptr::null::<EYECOLOR>())).unused as *const _ as usize },
7987 3usize,
7988 concat!(
7989 "Offset of field: ",
7990 stringify!(EYECOLOR),
7991 "::",
7992 stringify!(unused)
7993 )
7994 );
7995}
7996#[doc = "@ingroup display"]
7997#[doc = "\\brief Represents a palette index."]
7998#[repr(C)]
7999#[derive(Debug, Copy, Clone)]
8000pub struct EYEPALETTE {
8001 #[doc = "< Number of colors in the palette"]
8002 pub ncolors: ::std::os::raw::c_int,
8003 #[doc = "< Actual colors"]
8004 pub colors: *mut EYECOLOR,
8005}
8006#[test]
8007fn bindgen_test_layout_EYEPALETTE() {
8008 assert_eq!(
8009 ::std::mem::size_of::<EYEPALETTE>(),
8010 16usize,
8011 concat!("Size of: ", stringify!(EYEPALETTE))
8012 );
8013 assert_eq!(
8014 ::std::mem::align_of::<EYEPALETTE>(),
8015 8usize,
8016 concat!("Alignment of ", stringify!(EYEPALETTE))
8017 );
8018 assert_eq!(
8019 unsafe { &(*(::std::ptr::null::<EYEPALETTE>())).ncolors as *const _ as usize },
8020 0usize,
8021 concat!(
8022 "Offset of field: ",
8023 stringify!(EYEPALETTE),
8024 "::",
8025 stringify!(ncolors)
8026 )
8027 );
8028 assert_eq!(
8029 unsafe { &(*(::std::ptr::null::<EYEPALETTE>())).colors as *const _ as usize },
8030 8usize,
8031 concat!(
8032 "Offset of field: ",
8033 stringify!(EYEPALETTE),
8034 "::",
8035 stringify!(colors)
8036 )
8037 );
8038}
8039impl Default for EYEPALETTE {
8040 fn default() -> Self {
8041 unsafe { ::std::mem::zeroed() }
8042 }
8043}
8044#[doc = "@ingroup display"]
8045#[doc = "\\brief Represents pixel format of an image or surface."]
8046#[repr(C)]
8047#[derive(Debug, Copy, Clone)]
8048pub struct EYEPIXELFORMAT {
8049 pub colorkey: byte,
8050 pub Rmask: INT32,
8051 pub Gmask: INT32,
8052 pub Bmask: INT32,
8053 pub Amask: INT32,
8054 pub palette: *mut EYEPALETTE,
8055}
8056#[test]
8057fn bindgen_test_layout_EYEPIXELFORMAT() {
8058 assert_eq!(
8059 ::std::mem::size_of::<EYEPIXELFORMAT>(),
8060 32usize,
8061 concat!("Size of: ", stringify!(EYEPIXELFORMAT))
8062 );
8063 assert_eq!(
8064 ::std::mem::align_of::<EYEPIXELFORMAT>(),
8065 8usize,
8066 concat!("Alignment of ", stringify!(EYEPIXELFORMAT))
8067 );
8068 assert_eq!(
8069 unsafe { &(*(::std::ptr::null::<EYEPIXELFORMAT>())).colorkey as *const _ as usize },
8070 0usize,
8071 concat!(
8072 "Offset of field: ",
8073 stringify!(EYEPIXELFORMAT),
8074 "::",
8075 stringify!(colorkey)
8076 )
8077 );
8078 assert_eq!(
8079 unsafe { &(*(::std::ptr::null::<EYEPIXELFORMAT>())).Rmask as *const _ as usize },
8080 4usize,
8081 concat!(
8082 "Offset of field: ",
8083 stringify!(EYEPIXELFORMAT),
8084 "::",
8085 stringify!(Rmask)
8086 )
8087 );
8088 assert_eq!(
8089 unsafe { &(*(::std::ptr::null::<EYEPIXELFORMAT>())).Gmask as *const _ as usize },
8090 8usize,
8091 concat!(
8092 "Offset of field: ",
8093 stringify!(EYEPIXELFORMAT),
8094 "::",
8095 stringify!(Gmask)
8096 )
8097 );
8098 assert_eq!(
8099 unsafe { &(*(::std::ptr::null::<EYEPIXELFORMAT>())).Bmask as *const _ as usize },
8100 12usize,
8101 concat!(
8102 "Offset of field: ",
8103 stringify!(EYEPIXELFORMAT),
8104 "::",
8105 stringify!(Bmask)
8106 )
8107 );
8108 assert_eq!(
8109 unsafe { &(*(::std::ptr::null::<EYEPIXELFORMAT>())).Amask as *const _ as usize },
8110 16usize,
8111 concat!(
8112 "Offset of field: ",
8113 stringify!(EYEPIXELFORMAT),
8114 "::",
8115 stringify!(Amask)
8116 )
8117 );
8118 assert_eq!(
8119 unsafe { &(*(::std::ptr::null::<EYEPIXELFORMAT>())).palette as *const _ as usize },
8120 24usize,
8121 concat!(
8122 "Offset of field: ",
8123 stringify!(EYEPIXELFORMAT),
8124 "::",
8125 stringify!(palette)
8126 )
8127 );
8128}
8129impl Default for EYEPIXELFORMAT {
8130 fn default() -> Self {
8131 unsafe { ::std::mem::zeroed() }
8132 }
8133}
8134#[doc = "@ingroup display"]
8135#[doc = "\\brief Represents a bitmap image"]
8136#[repr(C)]
8137#[derive(Debug, Copy, Clone)]
8138pub struct EYEBITMAP {
8139 #[doc = "< width of the image"]
8140 pub w: INT32,
8141 #[doc = "< height of the image"]
8142 pub h: INT32,
8143 #[doc = "< pitch of image lines. This can be 0. if this is 0, then ((depth+7)/8)*width is used"]
8144 pub pitch: INT32,
8145 #[doc = "< Depth of the image. possible values are 8,15,16,24,32"]
8146 pub depth: INT32,
8147 #[doc = "< uncompressed pixel data"]
8148 pub pixels: *mut ::std::os::raw::c_void,
8149 #[doc = "< pixel format of the image."]
8150 pub format: *mut EYEPIXELFORMAT,
8151}
8152#[test]
8153fn bindgen_test_layout_EYEBITMAP() {
8154 assert_eq!(
8155 ::std::mem::size_of::<EYEBITMAP>(),
8156 32usize,
8157 concat!("Size of: ", stringify!(EYEBITMAP))
8158 );
8159 assert_eq!(
8160 ::std::mem::align_of::<EYEBITMAP>(),
8161 8usize,
8162 concat!("Alignment of ", stringify!(EYEBITMAP))
8163 );
8164 assert_eq!(
8165 unsafe { &(*(::std::ptr::null::<EYEBITMAP>())).w as *const _ as usize },
8166 0usize,
8167 concat!(
8168 "Offset of field: ",
8169 stringify!(EYEBITMAP),
8170 "::",
8171 stringify!(w)
8172 )
8173 );
8174 assert_eq!(
8175 unsafe { &(*(::std::ptr::null::<EYEBITMAP>())).h as *const _ as usize },
8176 4usize,
8177 concat!(
8178 "Offset of field: ",
8179 stringify!(EYEBITMAP),
8180 "::",
8181 stringify!(h)
8182 )
8183 );
8184 assert_eq!(
8185 unsafe { &(*(::std::ptr::null::<EYEBITMAP>())).pitch as *const _ as usize },
8186 8usize,
8187 concat!(
8188 "Offset of field: ",
8189 stringify!(EYEBITMAP),
8190 "::",
8191 stringify!(pitch)
8192 )
8193 );
8194 assert_eq!(
8195 unsafe { &(*(::std::ptr::null::<EYEBITMAP>())).depth as *const _ as usize },
8196 12usize,
8197 concat!(
8198 "Offset of field: ",
8199 stringify!(EYEBITMAP),
8200 "::",
8201 stringify!(depth)
8202 )
8203 );
8204 assert_eq!(
8205 unsafe { &(*(::std::ptr::null::<EYEBITMAP>())).pixels as *const _ as usize },
8206 16usize,
8207 concat!(
8208 "Offset of field: ",
8209 stringify!(EYEBITMAP),
8210 "::",
8211 stringify!(pixels)
8212 )
8213 );
8214 assert_eq!(
8215 unsafe { &(*(::std::ptr::null::<EYEBITMAP>())).format as *const _ as usize },
8216 24usize,
8217 concat!(
8218 "Offset of field: ",
8219 stringify!(EYEBITMAP),
8220 "::",
8221 stringify!(format)
8222 )
8223 );
8224}
8225impl Default for EYEBITMAP {
8226 fn default() -> Self {
8227 unsafe { ::std::mem::zeroed() }
8228 }
8229}
8230pub const IMAGETYPE_JPEG: IMAGETYPE = 0;
8231pub const IMAGETYPE_PNG: IMAGETYPE = 1;
8232pub const IMAGETYPE_GIF: IMAGETYPE = 2;
8233pub const IMAGETYPE_BMP: IMAGETYPE = 3;
8234pub const IMAGETYPE_XPM: IMAGETYPE = 4;
8235#[doc = "@ingroup display"]
8236pub type IMAGETYPE = ::std::os::raw::c_uint;
8237extern "C" {
8238 #[doc = " @ingroup error_reporting"]
8239 #[doc = "Returns error description for given function with error id."]
8240 #[doc = ""]
8241 #[doc = ""]
8242 #[doc = "\\b Example:"]
8243 #[doc = "<pre>"]
8244 #[doc = "@code"]
8245 #[doc = ""]
8246 #[doc = "int rv = open_eyelink_connection(0);"]
8247 #[doc = "if(rv)"]
8248 #[doc = "{"]
8249 #[doc = "char *errmsg = eyelink_get_error(rv,\"open_eyelink_connection\");"]
8250 #[doc = "printf(\"Error: %s \\n\", errmsg); // report the error"]
8251 #[doc = "return -1;"]
8252 #[doc = "}"]
8253 #[doc = ""]
8254 #[doc = "@endcode"]
8255 #[doc = "</pre>"]
8256 #[doc = "@param[in] id Error id"]
8257 #[doc = "@param[in] function_name Name of the function that generated the error id."]
8258 pub fn eyelink_get_error(
8259 id: ::std::os::raw::c_int,
8260 function_name: *mut ::std::os::raw::c_char,
8261 ) -> *mut ::std::os::raw::c_char;
8262}
8263extern "C" {
8264 #[doc = "@}"]
8265 #[doc = "Splice 'path' to 'fname', store in 'ffname'."]
8266 #[doc = "Tries to create valid concatenation."]
8267 #[doc = "If 'fname' starts with '\\', just adds drive from 'path'."]
8268 #[doc = "If 'fname' contains drive specifier, it is not changed."]
8269 pub fn splice_fname(
8270 fname: *mut ::std::os::raw::c_char,
8271 path: *mut ::std::os::raw::c_char,
8272 ffname: *mut ::std::os::raw::c_char,
8273 );
8274}
8275extern "C" {
8276 #[doc = " @ingroup datafile"]
8277 #[doc = "Checks file name for legality."]
8278 #[doc = "Attempts to ensure cross-platform for viewer."]
8279 #[doc = "No spaces allowed as this interferes with messages."]
8280 #[doc = "Assume viewer will translate forward/backward slash."]
8281 #[doc = "Windows: don't allow <>:\"/\\|"]
8282 #[doc = "Also, device names, such as aux, con, lpt1, and prn are not allowed in windows."]
8283 #[doc = "forward slashes is missed."]
8284 pub fn check_filename_characters(name: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
8285}
8286extern "C" {
8287 #[doc = " @ingroup datafile"]
8288 #[doc = "Checks if file and/or path exists."]
8289 #[doc = "@returns \\c 0 if does not exist, \\c 1 if exists, \\c -1 if cannot overwrite."]
8290 pub fn file_exists(path: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
8291}
8292extern "C" {
8293 #[doc = " @ingroup datafile"]
8294 #[doc = "Checks if path exists."]
8295 #[doc = "Will create directory if 'create'."]
8296 #[doc = "Creates directory from last name in 'path', unless ends with '\\' or 'is_dir' nonzero."]
8297 #[doc = "Otherwise, last item is assumed to be filename and is dropped."]
8298 #[doc = ""]
8299 #[doc = "@return \\c 0 if exists, \\c 1 if created, \\c -1 if failed."]
8300 pub fn create_path(
8301 path: *mut ::std::os::raw::c_char,
8302 create: INT16,
8303 is_dir: INT16,
8304 ) -> ::std::os::raw::c_int;
8305}
8306extern "C" {
8307 #[doc = " @ingroup bitmap_save"]
8308 #[doc = "This function saves the entire bitmap as a .BMP, .JPG, .PNG, or .TIF file, and"]
8309 #[doc = "transfers the image to tracker as backdrop for gaze cursors."]
8310 #[doc = ""]
8311 #[doc = "@param hbm Bitmap to save or transfer or both."]
8312 #[doc = "@param xs X position."]
8313 #[doc = "@param ys Y position."]
8314 #[doc = "@param width Width."]
8315 #[doc = "@param height Height."]
8316 #[doc = "@param fname File name to save as. The extension decides the format of the file."]
8317 #[doc = "@param path The directory to which the file will be written."]
8318 #[doc = "@param sv_options If the file exists, it replaces the file unless SV_NOREPLACE is specified."]
8319 #[doc = "@param xd X positon."]
8320 #[doc = "@param yd Y positon."]
8321 #[doc = "@param xferoptions Transfer options set with bitwise OR of the following"]
8322 #[doc = "constants, determines how bitmap is processed:"]
8323 #[doc = "\\arg \\c BX_AVERAGE Averaging combined pixels"]
8324 #[doc = "\\arg \\c BX_DARKEN Choosing darkest and keep thin dark lines."]
8325 #[doc = "\\arg \\c BX_LIGHTEN Choosing darkest and keep thin white lines and control how"]
8326 #[doc = "bitmap size is reduced to fit tracker display."]
8327 #[doc = "\\arg \\c BX_MAXCONTRAST Maximizes contrast for clearest image."]
8328 #[doc = "\\arg \\c BX_NODITHER Disables the dithering of the image."]
8329 #[doc = "\\arg \\c BX_GREYSCALE Converts the image to grayscale (grayscale works"]
8330 #[doc = "best for EyeLink I, text, etc.)."]
8331 #[doc = ""]
8332 #[doc = "\\sa el_bitmap_to_backdrop(), el_bitmap_save(), sdl_bitmap_to_backdrop(),"]
8333 #[doc = "sdl_bitmap_save(),sdl_bitmap_save_and_backdrop, gdi_bitmap_to_backdrop(),"]
8334 #[doc = "gdi_bitmap_save(),gdi_bitmap_save_and_backdrop, bitmap_save(),"]
8335 #[doc = "and bitmap_to_backdrop() for more information."]
8336 #[doc = ""]
8337 #[doc = "@remark This function relies on the writeImageHook set by call to set_write_image_hook()"]
8338 #[doc = "to write the images in different formats. By default, if eyelink_core_graphics library is used,"]
8339 #[doc = "gd library is used to write the images and if eyelink_gdi_graphics is used FreeImage library is used"]
8340 #[doc = "to write the images. If neither one of them is used, call to this function does not write the images unless,"]
8341 #[doc = "set_write_image_hook() is used to set the writeImageHook."]
8342 #[doc = ""]
8343 #[doc = "@remark This function should not be called when timing is critical, as this might take very long to return."]
8344 #[doc = ""]
8345 pub fn el_bitmap_save_and_backdrop(
8346 hbm: *mut EYEBITMAP,
8347 xs: INT16,
8348 ys: INT16,
8349 width: INT16,
8350 height: INT16,
8351 fname: *mut ::std::os::raw::c_char,
8352 path: *mut ::std::os::raw::c_char,
8353 sv_options: INT16,
8354 xd: INT16,
8355 yd: INT16,
8356 xferoptions: UINT16,
8357 ) -> ::std::os::raw::c_int;
8358}
8359extern "C" {
8360 #[doc = " @ingroup bitmap_save"]
8361 #[doc = "This function transfers the bitmap to the tracker PC as backdrop for gaze"]
8362 #[doc = "cursors."]
8363 #[doc = ""]
8364 #[doc = ""]
8365 #[doc = "@param hbm Bitmap to save or transfer or both."]
8366 #[doc = "@param xs X position."]
8367 #[doc = "@param ys Y position."]
8368 #[doc = "@param width Width."]
8369 #[doc = "@param height Height."]
8370 #[doc = "@param xd X positon."]
8371 #[doc = "@param yd Y positon."]
8372 #[doc = "@param xferoptions Transfer options set with bitwise OR of the following"]
8373 #[doc = "constants, determines how bitmap is processed:"]
8374 #[doc = "\\arg \\c BX_AVERAGE Averaging combined pixels"]
8375 #[doc = "\\arg \\c BX_DARKEN Choosing darkest and keep thin dark lines."]
8376 #[doc = "\\arg \\c BX_LIGHTEN Choosing darkest and keep thin white lines and control how"]
8377 #[doc = "bitmap size is reduced to fit tracker display."]
8378 #[doc = "\\arg \\c BX_MAXCONTRAST Maximizes contrast for clearest image."]
8379 #[doc = "\\arg \\c BX_NODITHER Disables the dithering of the image."]
8380 #[doc = "\\arg \\c BX_GREYSCALE Converts the image to grayscale (grayscale works"]
8381 #[doc = "best for EyeLink I, text, etc.)."]
8382 #[doc = ""]
8383 #[doc = "\\sa sdl_bitmap_to_backdrop(), el_bitmap_save_and_backdrop(),"]
8384 #[doc = "sdl_bitmap_save_and_backdrop(), gdi_bitmap_to_backdrop(),"]
8385 #[doc = "gdi_bitmap_save_and_backdrop(),\tand bitmap_to_backdrop() for more information."]
8386 #[doc = ""]
8387 #[doc = "@remark This function should not be called when timing is critical, as this might take very long to return."]
8388 pub fn el_bitmap_to_backdrop(
8389 hbm: *mut EYEBITMAP,
8390 xs: INT16,
8391 ys: INT16,
8392 width: INT16,
8393 height: INT16,
8394 xd: INT16,
8395 yd: INT16,
8396 xferoptions: UINT16,
8397 ) -> ::std::os::raw::c_int;
8398}
8399extern "C" {
8400 #[doc = " @ingroup bitmap_save"]
8401 #[doc = "This function saves the entire bitmap or selected part of a bitmap in an"]
8402 #[doc = "image file (with an extension of .png, .bmp, .jpg, or .tif). It creates"]
8403 #[doc = "the specified file if this file does not exist."]
8404 #[doc = ""]
8405 #[doc = ""]
8406 #[doc = "@param hbm Bitmap to save or transfer or both."]
8407 #[doc = "@param xs X position."]
8408 #[doc = "@param ys Y position."]
8409 #[doc = "@param width Width."]
8410 #[doc = "@param height Height."]
8411 #[doc = "@param fname File name to save as. The extension decides the format of the file."]
8412 #[doc = "@param path The directory to which the file will be written."]
8413 #[doc = "@param sv_options If the file exists, it replaces the file unless SV_NOREPLACE is specified."]
8414 #[doc = ""]
8415 #[doc = "@remark This function relies on the writeImageHook set by call to set_write_image_hook()"]
8416 #[doc = "to write the images in different formats. By default, if eyelink_core_graphics library is used,"]
8417 #[doc = "gd library is used to write the images and if eyelink_gdi_graphics is used FreeImage library is used"]
8418 #[doc = "to write the images. If neither one of them is used, call to this function does not write the images unless,"]
8419 #[doc = "set_write_image_hook() is used to set the writeImageHook."]
8420 #[doc = ""]
8421 #[doc = "@remark This function should not be called when timing is critical, as this might take very long to return."]
8422 pub fn el_bitmap_save(
8423 hbm: *mut EYEBITMAP,
8424 xs: INT16,
8425 ys: INT16,
8426 width: INT16,
8427 height: INT16,
8428 fname: *mut ::std::os::raw::c_char,
8429 path: *mut ::std::os::raw::c_char,
8430 sv_options: INT16,
8431 ) -> ::std::os::raw::c_int;
8432}
8433#[doc = " @ingroup display"]
8434#[doc = "\\brief Keyboard input event structure"]
8435#[repr(C)]
8436#[derive(Debug, Default, Copy, Clone)]
8437pub struct KeyInput {
8438 #[doc = "< The value of type should have value of KEYINPUT_EVENT"]
8439 pub type_: byte,
8440 #[doc = "< KEYDOWN = 1 or KEYUP = 0"]
8441 pub state: byte,
8442 #[doc = "< keys"]
8443 pub key: UINT16,
8444 #[doc = "< modifier"]
8445 pub modifier: UINT16,
8446 #[doc = "< unicode character value of the key"]
8447 pub unicode: UINT16,
8448}
8449#[test]
8450fn bindgen_test_layout_KeyInput() {
8451 assert_eq!(
8452 ::std::mem::size_of::<KeyInput>(),
8453 8usize,
8454 concat!("Size of: ", stringify!(KeyInput))
8455 );
8456 assert_eq!(
8457 ::std::mem::align_of::<KeyInput>(),
8458 2usize,
8459 concat!("Alignment of ", stringify!(KeyInput))
8460 );
8461 assert_eq!(
8462 unsafe { &(*(::std::ptr::null::<KeyInput>())).type_ as *const _ as usize },
8463 0usize,
8464 concat!(
8465 "Offset of field: ",
8466 stringify!(KeyInput),
8467 "::",
8468 stringify!(type_)
8469 )
8470 );
8471 assert_eq!(
8472 unsafe { &(*(::std::ptr::null::<KeyInput>())).state as *const _ as usize },
8473 1usize,
8474 concat!(
8475 "Offset of field: ",
8476 stringify!(KeyInput),
8477 "::",
8478 stringify!(state)
8479 )
8480 );
8481 assert_eq!(
8482 unsafe { &(*(::std::ptr::null::<KeyInput>())).key as *const _ as usize },
8483 2usize,
8484 concat!(
8485 "Offset of field: ",
8486 stringify!(KeyInput),
8487 "::",
8488 stringify!(key)
8489 )
8490 );
8491 assert_eq!(
8492 unsafe { &(*(::std::ptr::null::<KeyInput>())).modifier as *const _ as usize },
8493 4usize,
8494 concat!(
8495 "Offset of field: ",
8496 stringify!(KeyInput),
8497 "::",
8498 stringify!(modifier)
8499 )
8500 );
8501 assert_eq!(
8502 unsafe { &(*(::std::ptr::null::<KeyInput>())).unicode as *const _ as usize },
8503 6usize,
8504 concat!(
8505 "Offset of field: ",
8506 stringify!(KeyInput),
8507 "::",
8508 stringify!(unicode)
8509 )
8510 );
8511}
8512#[doc = " @ingroup display"]
8513#[doc = "\\brief Mouse motion event structure (For future)"]
8514#[repr(C)]
8515#[derive(Debug, Default, Copy, Clone)]
8516pub struct MouseMotionEvent {
8517 #[doc = "< MOUSE_MOTION_INPUT_EVENT"]
8518 pub type_: byte,
8519 #[doc = "< The mouse device index"]
8520 pub which: byte,
8521 #[doc = "< The current button state"]
8522 pub state: byte,
8523 #[doc = "< The X/Y coordinates of the mouse"]
8524 pub x: UINT16,
8525 #[doc = "< The X/Y coordinates of the mouse"]
8526 pub y: UINT16,
8527 #[doc = "< The relative motion in the X direction"]
8528 pub xrel: UINT16,
8529 #[doc = "< The relative motion in the Y direction"]
8530 pub yrel: UINT16,
8531}
8532#[test]
8533fn bindgen_test_layout_MouseMotionEvent() {
8534 assert_eq!(
8535 ::std::mem::size_of::<MouseMotionEvent>(),
8536 12usize,
8537 concat!("Size of: ", stringify!(MouseMotionEvent))
8538 );
8539 assert_eq!(
8540 ::std::mem::align_of::<MouseMotionEvent>(),
8541 2usize,
8542 concat!("Alignment of ", stringify!(MouseMotionEvent))
8543 );
8544 assert_eq!(
8545 unsafe { &(*(::std::ptr::null::<MouseMotionEvent>())).type_ as *const _ as usize },
8546 0usize,
8547 concat!(
8548 "Offset of field: ",
8549 stringify!(MouseMotionEvent),
8550 "::",
8551 stringify!(type_)
8552 )
8553 );
8554 assert_eq!(
8555 unsafe { &(*(::std::ptr::null::<MouseMotionEvent>())).which as *const _ as usize },
8556 1usize,
8557 concat!(
8558 "Offset of field: ",
8559 stringify!(MouseMotionEvent),
8560 "::",
8561 stringify!(which)
8562 )
8563 );
8564 assert_eq!(
8565 unsafe { &(*(::std::ptr::null::<MouseMotionEvent>())).state as *const _ as usize },
8566 2usize,
8567 concat!(
8568 "Offset of field: ",
8569 stringify!(MouseMotionEvent),
8570 "::",
8571 stringify!(state)
8572 )
8573 );
8574 assert_eq!(
8575 unsafe { &(*(::std::ptr::null::<MouseMotionEvent>())).x as *const _ as usize },
8576 4usize,
8577 concat!(
8578 "Offset of field: ",
8579 stringify!(MouseMotionEvent),
8580 "::",
8581 stringify!(x)
8582 )
8583 );
8584 assert_eq!(
8585 unsafe { &(*(::std::ptr::null::<MouseMotionEvent>())).y as *const _ as usize },
8586 6usize,
8587 concat!(
8588 "Offset of field: ",
8589 stringify!(MouseMotionEvent),
8590 "::",
8591 stringify!(y)
8592 )
8593 );
8594 assert_eq!(
8595 unsafe { &(*(::std::ptr::null::<MouseMotionEvent>())).xrel as *const _ as usize },
8596 8usize,
8597 concat!(
8598 "Offset of field: ",
8599 stringify!(MouseMotionEvent),
8600 "::",
8601 stringify!(xrel)
8602 )
8603 );
8604 assert_eq!(
8605 unsafe { &(*(::std::ptr::null::<MouseMotionEvent>())).yrel as *const _ as usize },
8606 10usize,
8607 concat!(
8608 "Offset of field: ",
8609 stringify!(MouseMotionEvent),
8610 "::",
8611 stringify!(yrel)
8612 )
8613 );
8614}
8615#[doc = " @ingroup display"]
8616#[doc = "\\brief Mouse button event structure (For future)"]
8617#[repr(C)]
8618#[derive(Debug, Default, Copy, Clone)]
8619pub struct MouseButtonEvent {
8620 #[doc = "< MOUSE_BUTTON_INPUT_EVENT"]
8621 pub type_: byte,
8622 #[doc = "< The mouse device index"]
8623 pub which: byte,
8624 #[doc = "< The mouse button index"]
8625 pub button: byte,
8626 #[doc = "< BUTTONDOWN = 0 or BUTTONUP = 1"]
8627 pub state: byte,
8628 #[doc = "< The X/Y coordinates of the mouse at press time"]
8629 pub x: UINT16,
8630 #[doc = "< The X/Y coordinates of the mouse at press time"]
8631 pub y: UINT16,
8632}
8633#[test]
8634fn bindgen_test_layout_MouseButtonEvent() {
8635 assert_eq!(
8636 ::std::mem::size_of::<MouseButtonEvent>(),
8637 8usize,
8638 concat!("Size of: ", stringify!(MouseButtonEvent))
8639 );
8640 assert_eq!(
8641 ::std::mem::align_of::<MouseButtonEvent>(),
8642 2usize,
8643 concat!("Alignment of ", stringify!(MouseButtonEvent))
8644 );
8645 assert_eq!(
8646 unsafe { &(*(::std::ptr::null::<MouseButtonEvent>())).type_ as *const _ as usize },
8647 0usize,
8648 concat!(
8649 "Offset of field: ",
8650 stringify!(MouseButtonEvent),
8651 "::",
8652 stringify!(type_)
8653 )
8654 );
8655 assert_eq!(
8656 unsafe { &(*(::std::ptr::null::<MouseButtonEvent>())).which as *const _ as usize },
8657 1usize,
8658 concat!(
8659 "Offset of field: ",
8660 stringify!(MouseButtonEvent),
8661 "::",
8662 stringify!(which)
8663 )
8664 );
8665 assert_eq!(
8666 unsafe { &(*(::std::ptr::null::<MouseButtonEvent>())).button as *const _ as usize },
8667 2usize,
8668 concat!(
8669 "Offset of field: ",
8670 stringify!(MouseButtonEvent),
8671 "::",
8672 stringify!(button)
8673 )
8674 );
8675 assert_eq!(
8676 unsafe { &(*(::std::ptr::null::<MouseButtonEvent>())).state as *const _ as usize },
8677 3usize,
8678 concat!(
8679 "Offset of field: ",
8680 stringify!(MouseButtonEvent),
8681 "::",
8682 stringify!(state)
8683 )
8684 );
8685 assert_eq!(
8686 unsafe { &(*(::std::ptr::null::<MouseButtonEvent>())).x as *const _ as usize },
8687 4usize,
8688 concat!(
8689 "Offset of field: ",
8690 stringify!(MouseButtonEvent),
8691 "::",
8692 stringify!(x)
8693 )
8694 );
8695 assert_eq!(
8696 unsafe { &(*(::std::ptr::null::<MouseButtonEvent>())).y as *const _ as usize },
8697 6usize,
8698 concat!(
8699 "Offset of field: ",
8700 stringify!(MouseButtonEvent),
8701 "::",
8702 stringify!(y)
8703 )
8704 );
8705}
8706#[doc = "@ingroup display"]
8707#[doc = "\\brief Union of all input types."]
8708#[doc = ""]
8709#[doc = "A union that is used by the callback function get_input_key_hook,"]
8710#[doc = "to collect input data. At the moment, it is meant to collect only"]
8711#[doc = "keyboard inputs. In the future this may be used to support mouse inputs as well."]
8712#[repr(C)]
8713#[derive(Copy, Clone)]
8714pub union InputEvent {
8715 pub type_: byte,
8716 pub key: KeyInput,
8717 pub motion: MouseMotionEvent,
8718 pub button: MouseButtonEvent,
8719 _bindgen_union_align: [u16; 6usize],
8720}
8721#[test]
8722fn bindgen_test_layout_InputEvent() {
8723 assert_eq!(
8724 ::std::mem::size_of::<InputEvent>(),
8725 12usize,
8726 concat!("Size of: ", stringify!(InputEvent))
8727 );
8728 assert_eq!(
8729 ::std::mem::align_of::<InputEvent>(),
8730 2usize,
8731 concat!("Alignment of ", stringify!(InputEvent))
8732 );
8733 assert_eq!(
8734 unsafe { &(*(::std::ptr::null::<InputEvent>())).type_ as *const _ as usize },
8735 0usize,
8736 concat!(
8737 "Offset of field: ",
8738 stringify!(InputEvent),
8739 "::",
8740 stringify!(type_)
8741 )
8742 );
8743 assert_eq!(
8744 unsafe { &(*(::std::ptr::null::<InputEvent>())).key as *const _ as usize },
8745 0usize,
8746 concat!(
8747 "Offset of field: ",
8748 stringify!(InputEvent),
8749 "::",
8750 stringify!(key)
8751 )
8752 );
8753 assert_eq!(
8754 unsafe { &(*(::std::ptr::null::<InputEvent>())).motion as *const _ as usize },
8755 0usize,
8756 concat!(
8757 "Offset of field: ",
8758 stringify!(InputEvent),
8759 "::",
8760 stringify!(motion)
8761 )
8762 );
8763 assert_eq!(
8764 unsafe { &(*(::std::ptr::null::<InputEvent>())).button as *const _ as usize },
8765 0usize,
8766 concat!(
8767 "Offset of field: ",
8768 stringify!(InputEvent),
8769 "::",
8770 stringify!(button)
8771 )
8772 );
8773}
8774impl Default for InputEvent {
8775 fn default() -> Self {
8776 unsafe { ::std::mem::zeroed() }
8777 }
8778}
8779#[doc = "@ingroup display"]
8780#[doc = "\\brief Structure used set and get callback functions"]
8781#[doc = ""]
8782#[doc = "Structure used set and get callback functions so that the calibration"]
8783#[doc = "graphics can be drawn."]
8784#[repr(C)]
8785#[derive(Debug, Default, Copy, Clone)]
8786pub struct HOOKFCNS {
8787 #[doc = "This function is called to setup calibration/validation display."]
8788 #[doc = "This function called before any calibration routines are called."]
8789 pub setup_cal_display_hook: ::std::option::Option<unsafe extern "C" fn() -> INT16>,
8790 #[doc = "This is called to release any resources that are not required beyond calibration."]
8791 #[doc = "Beyond this call, no calibration functions will be called."]
8792 pub exit_cal_display_hook: ::std::option::Option<unsafe extern "C" fn()>,
8793 #[doc = "This function is called if abort of record. It is used to hide display from subject."]
8794 pub record_abort_hide_hook: ::std::option::Option<unsafe extern "C" fn()>,
8795 #[doc = "This function is responsible for initializing any resources that are"]
8796 #[doc = "required for camera setup."]
8797 #[doc = ""]
8798 #[doc = "@param width width of the source image to expect."]
8799 #[doc = "@param height height of the source image to expect."]
8800 #[doc = "@return -1 if failed, 0 otherwise."]
8801 pub setup_image_display_hook:
8802 ::std::option::Option<unsafe extern "C" fn(width: INT16, height: INT16) -> INT16>,
8803 #[doc = "This function is called to update any image title change."]
8804 #[doc = "@param threshold if -1 the entire tile is in the title string"]
8805 #[doc = "otherwise, the threshold of the current image."]
8806 #[doc = "@param title if threshold is -1, the title contains the whole title"]
8807 #[doc = "for the image. Otherwise only the camera name is given."]
8808 pub image_title_hook: ::std::option::Option<
8809 unsafe extern "C" fn(threshold: INT16, cam_name: *mut ::std::os::raw::c_char),
8810 >,
8811 #[doc = "This function is called to supply the image line by line from top to bottom."]
8812 #[doc = ""]
8813 #[doc = "@param width width of the picture. Essentially, number of bytes in \\c pixels."]
8814 #[doc = "@param line current line of the image"]
8815 #[doc = "@param totlines total number of lines in the image. This will always equal the height of the image."]
8816 #[doc = "@param pixels pixel data."]
8817 #[doc = ""]
8818 #[doc = "Eg. Say we want to extract pixel at position (20,20) and print it out as rgb values."]
8819 #[doc = ""]
8820 #[doc = "<pre>"]
8821 #[doc = "@code"]
8822 #[doc = "if(line == 20) // y = 20"]
8823 #[doc = "{"]
8824 #[doc = "byte pix = pixels[19];"]
8825 #[doc = "printf(\"RGB %d %d %d\\n\",r[pix],g[pix],b[pix]);"]
8826 #[doc = "}"]
8827 #[doc = "@endcode"]
8828 #[doc = "</pre>"]
8829 #[doc = "@remark certain display draw the image up side down. eg. GDI."]
8830 pub draw_image_line_hook: ::std::option::Option<
8831 unsafe extern "C" fn(width: INT16, line: INT16, totlines: INT16, pixels: *mut byte),
8832 >,
8833 #[doc = "This function is called after setup_image_display and before the first call to"]
8834 #[doc = "draw_image_line. This is responsible to setup the palettes to display the camera"]
8835 #[doc = "image."]
8836 #[doc = ""]
8837 #[doc = "@param ncolors number of colors in the palette."]
8838 #[doc = "@param r red component of rgb."]
8839 #[doc = "@param g blue component of rgb."]
8840 #[doc = "@param b green component of rgb."]
8841 pub set_image_palette_hook: ::std::option::Option<
8842 unsafe extern "C" fn(ncolors: INT16, r: *mut byte, g: *mut byte, b: *mut byte),
8843 >,
8844 #[doc = "This is called to notify that all camera setup things are complete. Any"]
8845 #[doc = "resources that are allocated in setup_image_display can be released in this"]
8846 #[doc = "function."]
8847 pub exit_image_display_hook: ::std::option::Option<unsafe extern "C" fn()>,
8848 #[doc = "Called to clear the calibration display."]
8849 pub clear_cal_display_hook: ::std::option::Option<unsafe extern "C" fn()>,
8850 #[doc = "This function is responsible for erasing the target that was drawn"]
8851 #[doc = "by the last call to draw_cal_target."]
8852 pub erase_cal_target_hook: ::std::option::Option<unsafe extern "C" fn()>,
8853 #[doc = "This function is responsible for the drawing of the target for calibration,validation"]
8854 #[doc = "and drift correct at the given coordinate."]
8855 #[doc = "@param x x coordinate of the target."]
8856 #[doc = "@param y y coordinate of the target."]
8857 #[doc = "@remark The x and y are relative to what is sent to the tracker for the command screen_pixel_coords."]
8858 pub draw_cal_target_hook: ::std::option::Option<unsafe extern "C" fn(x: INT16, y: INT16)>,
8859 #[doc = "This function is called to signal new target."]
8860 pub cal_target_beep_hook: ::std::option::Option<unsafe extern "C" fn()>,
8861 #[doc = "This function is called to signal end of calibration."]
8862 #[doc = "@param error if non zero, then the calibration has error."]
8863 pub cal_done_beep_hook: ::std::option::Option<unsafe extern "C" fn(error: INT16)>,
8864 #[doc = "This function is called to singnal the end of drift correct."]
8865 #[doc = "@param error if non zero, then the drift correction failed."]
8866 pub dc_done_beep_hook: ::std::option::Option<unsafe extern "C" fn(error: INT16)>,
8867 #[doc = "This function is called to signal a new drift correct target."]
8868 pub dc_target_beep_hook: ::std::option::Option<unsafe extern "C" fn()>,
8869 #[doc = "This is called to check for keyboard input."]
8870 #[doc = "In this function:"]
8871 #[doc = "\\arg check if there are any input events"]
8872 #[doc = "\\arg if there are input events, fill key_input and return 1."]
8873 #[doc = "otherwise return 0. If 1 is returned this will be called"]
8874 #[doc = "again to check for more events."]
8875 #[doc = ""]
8876 #[doc = "@param[out] key_input fill in the InputEvent structure to return"]
8877 #[doc = "key,modifier values."]
8878 #[doc = "@return if there is a key, return 1 otherwise return 0."]
8879 #[doc = ""]
8880 #[doc = "@remark Special keys and modifiers should match the following code."]
8881 #[doc = ""]
8882 #[doc = ""]
8883 #[doc = "\\b Special \\b keys:"]
8884 #[doc = "<pre>"]
8885 #[doc = "@code"]
8886 #[doc = ""]
8887 #[doc = "#define F1_KEY 0x3B00"]
8888 #[doc = "#define F2_KEY 0x3C00"]
8889 #[doc = "#define F3_KEY 0x3D00"]
8890 #[doc = "#define F4_KEY 0x3E00"]
8891 #[doc = "#define F5_KEY 0x3F00"]
8892 #[doc = "#define F6_KEY 0x4000"]
8893 #[doc = "#define F7_KEY 0x4100"]
8894 #[doc = "#define F8_KEY 0x4200"]
8895 #[doc = "#define F9_KEY 0x4300"]
8896 #[doc = "#define F10_KEY 0x4400"]
8897 #[doc = ""]
8898 #[doc = "#define PAGE_UP 0x4900"]
8899 #[doc = "#define PAGE_DOWN 0x5100"]
8900 #[doc = "#define CURS_UP 0x4800"]
8901 #[doc = "#define CURS_DOWN 0x5000"]
8902 #[doc = "#define CURS_LEFT 0x4B00"]
8903 #[doc = "#define CURS_RIGHT 0x4D00"]
8904 #[doc = ""]
8905 #[doc = "#define ESC_KEY 0x001B"]
8906 #[doc = "#define ENTER_KEY 0x000D"]
8907 #[doc = ""]
8908 #[doc = "@endcode"]
8909 #[doc = "</pre>"]
8910 #[doc = ""]
8911 #[doc = "Modifier: If you are using SDL you do not need to modify the modifier value as they match the value."]
8912 #[doc = "<pre>"]
8913 #[doc = "@code"]
8914 #[doc = ""]
8915 #[doc = "#define ELKMOD_NONE 0x0000"]
8916 #[doc = "#define ELKMOD_LSHIFT 0x0001"]
8917 #[doc = "#define ELKMOD_RSHIFT 0x0002"]
8918 #[doc = "#define ELKMOD_LCTRL 0x0040"]
8919 #[doc = "#define ELKMOD_RCTRL 0x0080"]
8920 #[doc = "#define ELKMOD_LALT 0x0100"]
8921 #[doc = "#define ELKMOD_RALT 0x0200"]
8922 #[doc = "#define ELKMOD_LMETA 0x0400"]
8923 #[doc = "#define ELKMOD_RMETA 0x0800,"]
8924 #[doc = "#define ELKMOD_NUM 0x1000"]
8925 #[doc = "#define ELKMOD_CAPS 0x2000"]
8926 #[doc = "#define ELKMOD_MODE 0x4000"]
8927 #[doc = ""]
8928 #[doc = "@endcode"]
8929 #[doc = "</pre>"]
8930 pub get_input_key_hook: ::std::option::Option<
8931 unsafe extern "C" fn(event: *mut InputEvent) -> ::std::os::raw::c_short,
8932 >,
8933 #[doc = "This function is called whenever alert_printf is called. In windows, if no"]
8934 #[doc = "callback is set calls MessageBox function. In other platforms, if no call back is set"]
8935 #[doc = "prints out to console."]
8936 pub alert_printf_hook:
8937 ::std::option::Option<unsafe extern "C" fn(arg1: *const ::std::os::raw::c_char)>,
8938}
8939#[test]
8940fn bindgen_test_layout_HOOKFCNS() {
8941 assert_eq!(
8942 ::std::mem::size_of::<HOOKFCNS>(),
8943 136usize,
8944 concat!("Size of: ", stringify!(HOOKFCNS))
8945 );
8946 assert_eq!(
8947 ::std::mem::align_of::<HOOKFCNS>(),
8948 8usize,
8949 concat!("Alignment of ", stringify!(HOOKFCNS))
8950 );
8951 assert_eq!(
8952 unsafe { &(*(::std::ptr::null::<HOOKFCNS>())).setup_cal_display_hook as *const _ as usize },
8953 0usize,
8954 concat!(
8955 "Offset of field: ",
8956 stringify!(HOOKFCNS),
8957 "::",
8958 stringify!(setup_cal_display_hook)
8959 )
8960 );
8961 assert_eq!(
8962 unsafe { &(*(::std::ptr::null::<HOOKFCNS>())).exit_cal_display_hook as *const _ as usize },
8963 8usize,
8964 concat!(
8965 "Offset of field: ",
8966 stringify!(HOOKFCNS),
8967 "::",
8968 stringify!(exit_cal_display_hook)
8969 )
8970 );
8971 assert_eq!(
8972 unsafe { &(*(::std::ptr::null::<HOOKFCNS>())).record_abort_hide_hook as *const _ as usize },
8973 16usize,
8974 concat!(
8975 "Offset of field: ",
8976 stringify!(HOOKFCNS),
8977 "::",
8978 stringify!(record_abort_hide_hook)
8979 )
8980 );
8981 assert_eq!(
8982 unsafe {
8983 &(*(::std::ptr::null::<HOOKFCNS>())).setup_image_display_hook as *const _ as usize
8984 },
8985 24usize,
8986 concat!(
8987 "Offset of field: ",
8988 stringify!(HOOKFCNS),
8989 "::",
8990 stringify!(setup_image_display_hook)
8991 )
8992 );
8993 assert_eq!(
8994 unsafe { &(*(::std::ptr::null::<HOOKFCNS>())).image_title_hook as *const _ as usize },
8995 32usize,
8996 concat!(
8997 "Offset of field: ",
8998 stringify!(HOOKFCNS),
8999 "::",
9000 stringify!(image_title_hook)
9001 )
9002 );
9003 assert_eq!(
9004 unsafe { &(*(::std::ptr::null::<HOOKFCNS>())).draw_image_line_hook as *const _ as usize },
9005 40usize,
9006 concat!(
9007 "Offset of field: ",
9008 stringify!(HOOKFCNS),
9009 "::",
9010 stringify!(draw_image_line_hook)
9011 )
9012 );
9013 assert_eq!(
9014 unsafe { &(*(::std::ptr::null::<HOOKFCNS>())).set_image_palette_hook as *const _ as usize },
9015 48usize,
9016 concat!(
9017 "Offset of field: ",
9018 stringify!(HOOKFCNS),
9019 "::",
9020 stringify!(set_image_palette_hook)
9021 )
9022 );
9023 assert_eq!(
9024 unsafe {
9025 &(*(::std::ptr::null::<HOOKFCNS>())).exit_image_display_hook as *const _ as usize
9026 },
9027 56usize,
9028 concat!(
9029 "Offset of field: ",
9030 stringify!(HOOKFCNS),
9031 "::",
9032 stringify!(exit_image_display_hook)
9033 )
9034 );
9035 assert_eq!(
9036 unsafe { &(*(::std::ptr::null::<HOOKFCNS>())).clear_cal_display_hook as *const _ as usize },
9037 64usize,
9038 concat!(
9039 "Offset of field: ",
9040 stringify!(HOOKFCNS),
9041 "::",
9042 stringify!(clear_cal_display_hook)
9043 )
9044 );
9045 assert_eq!(
9046 unsafe { &(*(::std::ptr::null::<HOOKFCNS>())).erase_cal_target_hook as *const _ as usize },
9047 72usize,
9048 concat!(
9049 "Offset of field: ",
9050 stringify!(HOOKFCNS),
9051 "::",
9052 stringify!(erase_cal_target_hook)
9053 )
9054 );
9055 assert_eq!(
9056 unsafe { &(*(::std::ptr::null::<HOOKFCNS>())).draw_cal_target_hook as *const _ as usize },
9057 80usize,
9058 concat!(
9059 "Offset of field: ",
9060 stringify!(HOOKFCNS),
9061 "::",
9062 stringify!(draw_cal_target_hook)
9063 )
9064 );
9065 assert_eq!(
9066 unsafe { &(*(::std::ptr::null::<HOOKFCNS>())).cal_target_beep_hook as *const _ as usize },
9067 88usize,
9068 concat!(
9069 "Offset of field: ",
9070 stringify!(HOOKFCNS),
9071 "::",
9072 stringify!(cal_target_beep_hook)
9073 )
9074 );
9075 assert_eq!(
9076 unsafe { &(*(::std::ptr::null::<HOOKFCNS>())).cal_done_beep_hook as *const _ as usize },
9077 96usize,
9078 concat!(
9079 "Offset of field: ",
9080 stringify!(HOOKFCNS),
9081 "::",
9082 stringify!(cal_done_beep_hook)
9083 )
9084 );
9085 assert_eq!(
9086 unsafe { &(*(::std::ptr::null::<HOOKFCNS>())).dc_done_beep_hook as *const _ as usize },
9087 104usize,
9088 concat!(
9089 "Offset of field: ",
9090 stringify!(HOOKFCNS),
9091 "::",
9092 stringify!(dc_done_beep_hook)
9093 )
9094 );
9095 assert_eq!(
9096 unsafe { &(*(::std::ptr::null::<HOOKFCNS>())).dc_target_beep_hook as *const _ as usize },
9097 112usize,
9098 concat!(
9099 "Offset of field: ",
9100 stringify!(HOOKFCNS),
9101 "::",
9102 stringify!(dc_target_beep_hook)
9103 )
9104 );
9105 assert_eq!(
9106 unsafe { &(*(::std::ptr::null::<HOOKFCNS>())).get_input_key_hook as *const _ as usize },
9107 120usize,
9108 concat!(
9109 "Offset of field: ",
9110 stringify!(HOOKFCNS),
9111 "::",
9112 stringify!(get_input_key_hook)
9113 )
9114 );
9115 assert_eq!(
9116 unsafe { &(*(::std::ptr::null::<HOOKFCNS>())).alert_printf_hook as *const _ as usize },
9117 128usize,
9118 concat!(
9119 "Offset of field: ",
9120 stringify!(HOOKFCNS),
9121 "::",
9122 stringify!(alert_printf_hook)
9123 )
9124 );
9125}
9126#[doc = " Drift Correct Done error beep"]
9127pub const _EL_CAL_BEEP_EL_DC_DONE_ERR_BEEP: _EL_CAL_BEEP = -2;
9128#[doc = " Calibration Done error beep"]
9129pub const _EL_CAL_BEEP_EL_CAL_DONE_ERR_BEEP: _EL_CAL_BEEP = -1;
9130#[doc = " Calibration Done correct beep"]
9131pub const _EL_CAL_BEEP_EL_CAL_DONE_GOOD_BEEP: _EL_CAL_BEEP = 0;
9132#[doc = " Calibration target present beep"]
9133pub const _EL_CAL_BEEP_EL_CAL_TARG_BEEP: _EL_CAL_BEEP = 1;
9134#[doc = " Drift Correct Done correct beep"]
9135pub const _EL_CAL_BEEP_EL_DC_DONE_GOOD_BEEP: _EL_CAL_BEEP = 2;
9136#[doc = " Drift Correct target present beep"]
9137pub const _EL_CAL_BEEP_EL_DC_TARG_BEEP: _EL_CAL_BEEP = 3;
9138#[doc = "@ingroup display"]
9139#[doc = "\\brief Enum used for calibration beeps"]
9140pub type _EL_CAL_BEEP = ::std::os::raw::c_int;
9141#[doc = "@ingroup display"]
9142#[doc = "\\brief Enum used for calibration beeps"]
9143pub use self::_EL_CAL_BEEP as EL_CAL_BEEP;
9144#[doc = "@ingroup display"]
9145#[doc = "\\brief Structure used set and get callback functions"]
9146#[doc = ""]
9147#[doc = "Structure used set and get callback functions so that the calibration"]
9148#[doc = "graphics can be drawn."]
9149#[repr(C)]
9150#[derive(Debug, Copy, Clone)]
9151pub struct HOOKFCNS2 {
9152 #[doc = "Major version. At the moment the version number must be set to 1"]
9153 pub major: ::std::os::raw::c_int,
9154 #[doc = "Minor version. At the moment the version number must be set to 0"]
9155 pub minor: ::std::os::raw::c_int,
9156 #[doc = "The value set here will be passed to every single call back functions"]
9157 pub userData: *mut ::std::os::raw::c_void,
9158 #[doc = "This function is called to setup calibration/validation display."]
9159 #[doc = "This function called before any calibration routines are called."]
9160 #[doc = "@param userData User context data set on userData field of HOOKFCNS2 set"]
9161 #[doc = "at the time of call to setup_graphic_hook_functions."]
9162 #[doc = ""]
9163 #[doc = "@return 0 upon success."]
9164 pub setup_cal_display_hook:
9165 ::std::option::Option<unsafe extern "C" fn(userData: *mut ::std::os::raw::c_void) -> INT16>,
9166 #[doc = "This is called to release any resources that are not required beyond calibration."]
9167 #[doc = "Beyond this call, no calibration functions will be called."]
9168 #[doc = "@return 0 upon success."]
9169 pub exit_cal_display_hook:
9170 ::std::option::Option<unsafe extern "C" fn(userData: *mut ::std::os::raw::c_void) -> INT16>,
9171 #[doc = "This function is responsible for initializing any resources that are"]
9172 #[doc = "required for camera setup."]
9173 #[doc = ""]
9174 #[doc = "@param userData User context data set on userData field of HOOKFCNS2 set"]
9175 #[doc = "at the time of call to setup_graphic_hook_functions."]
9176 #[doc = ""]
9177 #[doc = "@param width width of the source image to expect."]
9178 #[doc = "@param height height of the source image to expect."]
9179 #[doc = "@return -1 if failed, 0 otherwise."]
9180 pub setup_image_display_hook: ::std::option::Option<
9181 unsafe extern "C" fn(
9182 userData: *mut ::std::os::raw::c_void,
9183 width: INT16,
9184 height: INT16,
9185 ) -> INT16,
9186 >,
9187 #[doc = "This function is called to update any image title change."]
9188 #[doc = "@param threshold if -1 the entire tile is in the title string"]
9189 #[doc = "otherwise, the threshold of the current image."]
9190 #[doc = "@param title if threshold is -1, the title contains the whole title"]
9191 #[doc = "for the image. Otherwise only the camera name is given."]
9192 #[doc = "@return 0 upon success."]
9193 pub image_title_hook: ::std::option::Option<
9194 unsafe extern "C" fn(
9195 userData: *mut ::std::os::raw::c_void,
9196 title: *mut ::std::os::raw::c_char,
9197 ) -> INT16,
9198 >,
9199 #[doc = "This function is called to supply the image."]
9200 #[doc = "@param userData User context data set on userData field of HOOKFCNS2 set"]
9201 #[doc = "at the time of call to setup_graphic_hook_functions."]
9202 #[doc = ""]
9203 #[doc = "@param width width of the picture."]
9204 #[doc = "@param height height of the picture."]
9205 #[doc = "@param pixels pixels pointer to the pixel data. The size of the pixel data can be calculate by width*height*4."]
9206 #[doc = "The image comes in RGBA(network order) format."]
9207 #[doc = "@return 0 upon success."]
9208 pub draw_image: ::std::option::Option<
9209 unsafe extern "C" fn(
9210 userData: *mut ::std::os::raw::c_void,
9211 width: INT16,
9212 height: INT16,
9213 pixels: *mut byte,
9214 ) -> INT16,
9215 >,
9216 #[doc = "This is called to notify that all camera setup things are complete. Any"]
9217 #[doc = "resources that are allocated in setup_image_display can be released in this"]
9218 #[doc = "function."]
9219 #[doc = "@param userData User context data set on userData field of HOOKFCNS2 set"]
9220 #[doc = "at the time of call to setup_graphic_hook_functions."]
9221 #[doc = ""]
9222 #[doc = "@return 0 upon success."]
9223 pub exit_image_display_hook:
9224 ::std::option::Option<unsafe extern "C" fn(userData: *mut ::std::os::raw::c_void) -> INT16>,
9225 #[doc = "Called to clear the calibration display."]
9226 #[doc = "@param userData User context data set on userData field of HOOKFCNS2 set"]
9227 #[doc = "at the time of call to setup_graphic_hook_functions."]
9228 #[doc = ""]
9229 #[doc = "@return 0 upon success."]
9230 pub clear_cal_display_hook:
9231 ::std::option::Option<unsafe extern "C" fn(userData: *mut ::std::os::raw::c_void) -> INT16>,
9232 #[doc = "This function is responsible for erasing the target that was drawn"]
9233 #[doc = "by the last call to draw_cal_target."]
9234 #[doc = "@param userData User context data set on userData field of HOOKFCNS2 set"]
9235 #[doc = "at the time of call to setup_graphic_hook_functions."]
9236 #[doc = ""]
9237 #[doc = "@return 0 upon success."]
9238 pub erase_cal_target_hook:
9239 ::std::option::Option<unsafe extern "C" fn(userData: *mut ::std::os::raw::c_void) -> INT16>,
9240 #[doc = "This function is responsible for the drawing of the target for calibration,validation"]
9241 #[doc = "and drift correct at the given coordinate."]
9242 #[doc = "@param userData User context data set on userData field of HOOKFCNS2 set"]
9243 #[doc = "at the time of call to setup_graphic_hook_functions."]
9244 #[doc = ""]
9245 #[doc = "@param x x coordinate of the target."]
9246 #[doc = "@param y y coordinate of the target."]
9247 #[doc = "@remark The x and y are relative to what is sent to the tracker for the command screen_pixel_coords."]
9248 #[doc = "@return 0 upon success."]
9249 pub draw_cal_target_hook: ::std::option::Option<
9250 unsafe extern "C" fn(userData: *mut ::std::os::raw::c_void, x: f32, y: f32) -> INT16,
9251 >,
9252 #[doc = "@param userData User context data set on userData field of HOOKFCNS2 set"]
9253 #[doc = "at the time of call to setup_graphic_hook_functions."]
9254 #[doc = ""]
9255 #[doc = "This function is called to signal new target."]
9256 #[doc = "@return 0 upon success."]
9257 pub play_target_beep_hook: ::std::option::Option<
9258 unsafe extern "C" fn(
9259 userData: *mut ::std::os::raw::c_void,
9260 beep_type: EL_CAL_BEEP,
9261 ) -> INT16,
9262 >,
9263 #[doc = "This is called to check for keyboard input."]
9264 #[doc = "In this function:"]
9265 #[doc = ""]
9266 #[doc = "\\arg check if there are any input events"]
9267 #[doc = "\\arg if there are input events, fill key_input and return 1."]
9268 #[doc = "otherwise return 0. If 1 is returned this will be called"]
9269 #[doc = "again to check for more events."]
9270 #[doc = ""]
9271 #[doc = "@param[in] userData User context data set on userData field of HOOKFCNS2 set"]
9272 #[doc = "at the time of call to setup_graphic_hook_functions."]
9273 #[doc = ""]
9274 #[doc = "@param[out] key_input fill in the InputEvent structure to return"]
9275 #[doc = "key,modifier values."]
9276 #[doc = "@return if there is a key, return 1 otherwise return 0. return -1 if there is an error."]
9277 #[doc = ""]
9278 #[doc = "@remark Special keys and modifiers should match the following code."]
9279 #[doc = ""]
9280 #[doc = ""]
9281 #[doc = "\\b Special \\b keys:"]
9282 #[doc = "<pre>"]
9283 #[doc = "@code"]
9284 #[doc = ""]
9285 #[doc = "#define F1_KEY 0x3B00"]
9286 #[doc = "#define F2_KEY 0x3C00"]
9287 #[doc = "#define F3_KEY 0x3D00"]
9288 #[doc = "#define F4_KEY 0x3E00"]
9289 #[doc = "#define F5_KEY 0x3F00"]
9290 #[doc = "#define F6_KEY 0x4000"]
9291 #[doc = "#define F7_KEY 0x4100"]
9292 #[doc = "#define F8_KEY 0x4200"]
9293 #[doc = "#define F9_KEY 0x4300"]
9294 #[doc = "#define F10_KEY 0x4400"]
9295 #[doc = ""]
9296 #[doc = "#define PAGE_UP 0x4900"]
9297 #[doc = "#define PAGE_DOWN 0x5100"]
9298 #[doc = "#define CURS_UP 0x4800"]
9299 #[doc = "#define CURS_DOWN 0x5000"]
9300 #[doc = "#define CURS_LEFT 0x4B00"]
9301 #[doc = "#define CURS_RIGHT 0x4D00"]
9302 #[doc = ""]
9303 #[doc = "#define ESC_KEY 0x001B"]
9304 #[doc = "#define ENTER_KEY 0x000D"]
9305 #[doc = ""]
9306 #[doc = "@endcode"]
9307 #[doc = "</pre>"]
9308 #[doc = ""]
9309 #[doc = "Modifier: If you are using SDL you do not need to modify the"]
9310 #[doc = "modifier value as they match the value."]
9311 #[doc = "<pre>"]
9312 #[doc = "@code"]
9313 #[doc = "#define ELKMOD_NONE 0x0000"]
9314 #[doc = "#define ELKMOD_LSHIFT 0x0001"]
9315 #[doc = "#define ELKMOD_RSHIFT 0x0002"]
9316 #[doc = "#define ELKMOD_LCTRL 0x0040"]
9317 #[doc = "#define ELKMOD_RCTRL 0x0080"]
9318 #[doc = "#define ELKMOD_LALT 0x0100"]
9319 #[doc = "#define ELKMOD_RALT 0x0200"]
9320 #[doc = "#define ELKMOD_LMETA 0x0400"]
9321 #[doc = "#define ELKMOD_RMETA 0x0800,"]
9322 #[doc = "#define ELKMOD_NUM 0x1000"]
9323 #[doc = "#define ELKMOD_CAPS 0x2000"]
9324 #[doc = "#define ELKMOD_MODE 0x4000"]
9325 #[doc = ""]
9326 #[doc = "@endcode"]
9327 #[doc = "</pre>"]
9328 pub get_input_key_hook: ::std::option::Option<
9329 unsafe extern "C" fn(
9330 userData: *mut ::std::os::raw::c_void,
9331 event: *mut InputEvent,
9332 ) -> INT16,
9333 >,
9334 #[doc = "This function is called whenever alert_printf is called. In windows, if no"]
9335 #[doc = "callback is set calls MessageBox function. In other platforms, if no call back is set"]
9336 #[doc = "prints out to console."]
9337 pub alert_printf_hook: ::std::option::Option<
9338 unsafe extern "C" fn(
9339 userData: *mut ::std::os::raw::c_void,
9340 msg: *const ::std::os::raw::c_char,
9341 ) -> INT16,
9342 >,
9343 pub reserved1: ::std::os::raw::c_int,
9344 pub reserved2: ::std::os::raw::c_int,
9345 pub reserved3: ::std::os::raw::c_int,
9346 pub reserved4: ::std::os::raw::c_int,
9347}
9348#[test]
9349fn bindgen_test_layout_HOOKFCNS2() {
9350 assert_eq!(
9351 ::std::mem::size_of::<HOOKFCNS2>(),
9352 128usize,
9353 concat!("Size of: ", stringify!(HOOKFCNS2))
9354 );
9355 assert_eq!(
9356 ::std::mem::align_of::<HOOKFCNS2>(),
9357 8usize,
9358 concat!("Alignment of ", stringify!(HOOKFCNS2))
9359 );
9360 assert_eq!(
9361 unsafe { &(*(::std::ptr::null::<HOOKFCNS2>())).major as *const _ as usize },
9362 0usize,
9363 concat!(
9364 "Offset of field: ",
9365 stringify!(HOOKFCNS2),
9366 "::",
9367 stringify!(major)
9368 )
9369 );
9370 assert_eq!(
9371 unsafe { &(*(::std::ptr::null::<HOOKFCNS2>())).minor as *const _ as usize },
9372 4usize,
9373 concat!(
9374 "Offset of field: ",
9375 stringify!(HOOKFCNS2),
9376 "::",
9377 stringify!(minor)
9378 )
9379 );
9380 assert_eq!(
9381 unsafe { &(*(::std::ptr::null::<HOOKFCNS2>())).userData as *const _ as usize },
9382 8usize,
9383 concat!(
9384 "Offset of field: ",
9385 stringify!(HOOKFCNS2),
9386 "::",
9387 stringify!(userData)
9388 )
9389 );
9390 assert_eq!(
9391 unsafe {
9392 &(*(::std::ptr::null::<HOOKFCNS2>())).setup_cal_display_hook as *const _ as usize
9393 },
9394 16usize,
9395 concat!(
9396 "Offset of field: ",
9397 stringify!(HOOKFCNS2),
9398 "::",
9399 stringify!(setup_cal_display_hook)
9400 )
9401 );
9402 assert_eq!(
9403 unsafe { &(*(::std::ptr::null::<HOOKFCNS2>())).exit_cal_display_hook as *const _ as usize },
9404 24usize,
9405 concat!(
9406 "Offset of field: ",
9407 stringify!(HOOKFCNS2),
9408 "::",
9409 stringify!(exit_cal_display_hook)
9410 )
9411 );
9412 assert_eq!(
9413 unsafe {
9414 &(*(::std::ptr::null::<HOOKFCNS2>())).setup_image_display_hook as *const _ as usize
9415 },
9416 32usize,
9417 concat!(
9418 "Offset of field: ",
9419 stringify!(HOOKFCNS2),
9420 "::",
9421 stringify!(setup_image_display_hook)
9422 )
9423 );
9424 assert_eq!(
9425 unsafe { &(*(::std::ptr::null::<HOOKFCNS2>())).image_title_hook as *const _ as usize },
9426 40usize,
9427 concat!(
9428 "Offset of field: ",
9429 stringify!(HOOKFCNS2),
9430 "::",
9431 stringify!(image_title_hook)
9432 )
9433 );
9434 assert_eq!(
9435 unsafe { &(*(::std::ptr::null::<HOOKFCNS2>())).draw_image as *const _ as usize },
9436 48usize,
9437 concat!(
9438 "Offset of field: ",
9439 stringify!(HOOKFCNS2),
9440 "::",
9441 stringify!(draw_image)
9442 )
9443 );
9444 assert_eq!(
9445 unsafe {
9446 &(*(::std::ptr::null::<HOOKFCNS2>())).exit_image_display_hook as *const _ as usize
9447 },
9448 56usize,
9449 concat!(
9450 "Offset of field: ",
9451 stringify!(HOOKFCNS2),
9452 "::",
9453 stringify!(exit_image_display_hook)
9454 )
9455 );
9456 assert_eq!(
9457 unsafe {
9458 &(*(::std::ptr::null::<HOOKFCNS2>())).clear_cal_display_hook as *const _ as usize
9459 },
9460 64usize,
9461 concat!(
9462 "Offset of field: ",
9463 stringify!(HOOKFCNS2),
9464 "::",
9465 stringify!(clear_cal_display_hook)
9466 )
9467 );
9468 assert_eq!(
9469 unsafe { &(*(::std::ptr::null::<HOOKFCNS2>())).erase_cal_target_hook as *const _ as usize },
9470 72usize,
9471 concat!(
9472 "Offset of field: ",
9473 stringify!(HOOKFCNS2),
9474 "::",
9475 stringify!(erase_cal_target_hook)
9476 )
9477 );
9478 assert_eq!(
9479 unsafe { &(*(::std::ptr::null::<HOOKFCNS2>())).draw_cal_target_hook as *const _ as usize },
9480 80usize,
9481 concat!(
9482 "Offset of field: ",
9483 stringify!(HOOKFCNS2),
9484 "::",
9485 stringify!(draw_cal_target_hook)
9486 )
9487 );
9488 assert_eq!(
9489 unsafe { &(*(::std::ptr::null::<HOOKFCNS2>())).play_target_beep_hook as *const _ as usize },
9490 88usize,
9491 concat!(
9492 "Offset of field: ",
9493 stringify!(HOOKFCNS2),
9494 "::",
9495 stringify!(play_target_beep_hook)
9496 )
9497 );
9498 assert_eq!(
9499 unsafe { &(*(::std::ptr::null::<HOOKFCNS2>())).get_input_key_hook as *const _ as usize },
9500 96usize,
9501 concat!(
9502 "Offset of field: ",
9503 stringify!(HOOKFCNS2),
9504 "::",
9505 stringify!(get_input_key_hook)
9506 )
9507 );
9508 assert_eq!(
9509 unsafe { &(*(::std::ptr::null::<HOOKFCNS2>())).alert_printf_hook as *const _ as usize },
9510 104usize,
9511 concat!(
9512 "Offset of field: ",
9513 stringify!(HOOKFCNS2),
9514 "::",
9515 stringify!(alert_printf_hook)
9516 )
9517 );
9518 assert_eq!(
9519 unsafe { &(*(::std::ptr::null::<HOOKFCNS2>())).reserved1 as *const _ as usize },
9520 112usize,
9521 concat!(
9522 "Offset of field: ",
9523 stringify!(HOOKFCNS2),
9524 "::",
9525 stringify!(reserved1)
9526 )
9527 );
9528 assert_eq!(
9529 unsafe { &(*(::std::ptr::null::<HOOKFCNS2>())).reserved2 as *const _ as usize },
9530 116usize,
9531 concat!(
9532 "Offset of field: ",
9533 stringify!(HOOKFCNS2),
9534 "::",
9535 stringify!(reserved2)
9536 )
9537 );
9538 assert_eq!(
9539 unsafe { &(*(::std::ptr::null::<HOOKFCNS2>())).reserved3 as *const _ as usize },
9540 120usize,
9541 concat!(
9542 "Offset of field: ",
9543 stringify!(HOOKFCNS2),
9544 "::",
9545 stringify!(reserved3)
9546 )
9547 );
9548 assert_eq!(
9549 unsafe { &(*(::std::ptr::null::<HOOKFCNS2>())).reserved4 as *const _ as usize },
9550 124usize,
9551 concat!(
9552 "Offset of field: ",
9553 stringify!(HOOKFCNS2),
9554 "::",
9555 stringify!(reserved4)
9556 )
9557 );
9558}
9559impl Default for HOOKFCNS2 {
9560 fn default() -> Self {
9561 unsafe { ::std::mem::zeroed() }
9562 }
9563}
9564extern "C" {
9565 #[doc = " @ingroup display"]
9566 #[doc = "Primary function to setup display graphics hook functions."]
9567 #[doc = ""]
9568 #[doc = "\\b Example:"]
9569 #[doc = "<pre>"]
9570 #[doc = "@code"]
9571 #[doc = "INT16 ELCALLTYPE init_expt_graphics(HWND hwnd, DISPLAYINFO *info)"]
9572 #[doc = "{"]
9573 #[doc = "HOOKFCNS fcns;"]
9574 #[doc = "memset(&fcns,0,sizeof(fcns));"]
9575 #[doc = "fcns.setup_cal_display_hook = setup_cal_display;"]
9576 #[doc = "fcns.exit_cal_display_hook = exit_cal_display;"]
9577 #[doc = "fcns.record_abort_hide_hook = record_abort_hide;"]
9578 #[doc = "fcns.setup_image_display_hook = setup_image_display;"]
9579 #[doc = "fcns.image_title_hook = image_title;"]
9580 #[doc = "fcns.draw_image_line_hook = draw_image_line;"]
9581 #[doc = "fcns.set_image_palette_hook = set_image_palette;"]
9582 #[doc = "fcns.exit_image_display_hook= exit_image_display;"]
9583 #[doc = "fcns.clear_cal_display_hook = clear_cal_display;"]
9584 #[doc = "fcns.erase_cal_target_hook = erase_cal_target;"]
9585 #[doc = "fcns.draw_cal_target_hook = draw_cal_target;"]
9586 #[doc = "fcns.cal_target_beep_hook = cal_target_beep;"]
9587 #[doc = "fcns.cal_done_beep_hook = cal_done_beep;"]
9588 #[doc = "fcns.dc_done_beep_hook = dc_done_beep;"]
9589 #[doc = "fcns.dc_target_beep_hook = dc_target_beep;"]
9590 #[doc = "fcns.get_input_key_hook = get_input_key;"]
9591 #[doc = "fcns.alert_printf_hook = alert_printf_hook;"]
9592 #[doc = ""]
9593 #[doc = "setup_graphic_hook_functions(&fcns);"]
9594 #[doc = ""]
9595 #[doc = "return 0;"]
9596 #[doc = "}"]
9597 #[doc = "@endcode"]
9598 #[doc = "</pre>"]
9599 pub fn setup_graphic_hook_functions(hooks: *mut HOOKFCNS);
9600}
9601extern "C" {
9602 pub fn get_all_hook_functions() -> *mut HOOKFCNS;
9603}
9604extern "C" {
9605 #[doc = " @ingroup display"]
9606 #[doc = "Primary function to setup display graphics hook functions of the second revision of the interface."]
9607 #[doc = "One of the major difference between this and setup_graphic_hook_functions is, this has fewer functions to implement"]
9608 #[doc = "also, takes extra parameters like the major and minor versions for future enhancements."]
9609 #[doc = ""]
9610 #[doc = ""]
9611 #[doc = "\\b Example:"]
9612 #[doc = "<pre>"]
9613 #[doc = "@code"]
9614 #[doc = "INT16 ELCALLTYPE init_expt_graphics(HWND hwnd, DISPLAYINFO *info)"]
9615 #[doc = "{"]
9616 #[doc = "HOOKFCNS2 fcns;"]
9617 #[doc = "memset(&fcns,0,sizeof(fcns));"]
9618 #[doc = "fcns.major = 1;"]
9619 #[doc = "fcns.minor = 0;"]
9620 #[doc = "fcns.userData = ts;"]
9621 #[doc = ""]
9622 #[doc = "fcns.draw_image = draw_image;"]
9623 #[doc = "fcns.exit_image_display_hook= exit_image_display;"]
9624 #[doc = "fcns.setup_image_display_hook = setup_image_display;"]
9625 #[doc = ""]
9626 #[doc = ""]
9627 #[doc = ""]
9628 #[doc = "fcns.setup_cal_display_hook = setup_cal_display;"]
9629 #[doc = "fcns.clear_cal_display_hook = clear_display;"]
9630 #[doc = "fcns.erase_cal_target_hook = clear_display;"]
9631 #[doc = "fcns.draw_cal_target_hook = draw_cal_target;"]
9632 #[doc = "fcns.image_title_hook = image_title;"]
9633 #[doc = ""]
9634 #[doc = "fcns.get_input_key_hook = get_input_key;"]
9635 #[doc = "fcns.alert_printf_hook = alert_printf_hook;"]
9636 #[doc = "return setup_graphic_hook_functions_V2(&fcns);"]
9637 #[doc = "}"]
9638 #[doc = "@endcode"]
9639 #[doc = "</pre>"]
9640 pub fn setup_graphic_hook_functions_V2(hooks: *mut HOOKFCNS2) -> INT16;
9641}
9642extern "C" {
9643 #[doc = " @ingroup display"]
9644 #[doc = "Returns a pointer to HOOKFCNS2, with values that are set by"]
9645 #[doc = "setup_graphic_hook_functions_V2()."]
9646 #[doc = ""]
9647 #[doc = "This function with combination of setup_graphic_hook_functions"]
9648 #[doc = "can be used to over-ride an existing hook function."]
9649 pub fn get_all_hook_functions_V2() -> *mut HOOKFCNS2;
9650}
9651extern "C" {
9652 #[doc = " @ingroup bitmap_save"]
9653 #[doc = "Use this function to set function pointer, so that the call to"]
9654 #[doc = "el_bitmap_save and el_bitmap_save_and_backdrop will use the passed in"]
9655 #[doc = "function to write the image to disk."]
9656 pub fn set_write_image_hook(
9657 hookfn: ::std::option::Option<
9658 unsafe extern "C" fn(
9659 outfilename: *mut ::std::os::raw::c_char,
9660 format: ::std::os::raw::c_int,
9661 bitmap: *mut EYEBITMAP,
9662 ) -> ::std::os::raw::c_int,
9663 >,
9664 options: ::std::os::raw::c_int,
9665 ) -> ::std::os::raw::c_int;
9666}
9667extern "C" {
9668 pub fn eyelink_peep_input_event(
9669 event: *mut InputEvent,
9670 mask: ::std::os::raw::c_int,
9671 ) -> ::std::os::raw::c_int;
9672}
9673extern "C" {
9674 pub fn eyelink_get_input_event(
9675 event: *mut InputEvent,
9676 mask: ::std::os::raw::c_int,
9677 ) -> ::std::os::raw::c_int;
9678}
9679extern "C" {
9680 pub fn eyelink_peep_last_input_event(
9681 event: *mut InputEvent,
9682 mask: ::std::os::raw::c_int,
9683 ) -> ::std::os::raw::c_int;
9684}
9685extern "C" {
9686 pub fn eyelink_flush_input_event();
9687}
9688extern "C" {
9689 #[doc = " @ingroup extra_data"]
9690 #[doc = "Function to initialize the gaze to href and href to gaze mapping."]
9691 #[doc = "This function should be called before calling \\c eyelink_href_to_gaze()"]
9692 #[doc = "or \\c eyelink_gaze_to_href()."]
9693 #[doc = "@param left Left pixel value (normally 0)."]
9694 #[doc = "@param top Top pixel value (normally 0)."]
9695 #[doc = "@param right Right pixel value (width of the display)."]
9696 #[doc = "@param bottom Bottom pixel value (height of the display)."]
9697 #[doc = "@return \\c -1 if the tracker does not support the commands,"]
9698 #[doc = "href_point_eye"]
9699 #[doc = "set_href_point"]
9700 pub fn eyelink_initialize_mapping(left: f32, top: f32, right: f32, bottom: f32) -> INT32;
9701}
9702extern "C" {
9703 #[doc = " @ingroup extra_data"]
9704 #[doc = "Apply href->gaze to point (xp, yp). This function requires HREFPT data in"]
9705 #[doc = "FSAMPLE. The function \\c eyelink_initialize_mapping() should be called"]
9706 #[doc = "before calling this function."]
9707 #[doc = "@param xp X point to apply href->gaze."]
9708 #[doc = "@param yp Y point to apply href->gaze."]
9709 #[doc = "@param sample Sample."]
9710 #[doc = "@return \\c 0 if OK, \\c -1 if there is a math error, \\c -2 if the tracker"]
9711 #[doc = "does not support this operation."]
9712 pub fn eyelink_href_to_gaze(xp: *mut f32, yp: *mut f32, sample: *mut FSAMPLE) -> INT32;
9713}
9714extern "C" {
9715 #[doc = " @ingroup extra_data"]
9716 #[doc = "Apply gaze->href to point (xp, yp). This function requires HREFPT data in"]
9717 #[doc = "FSAMPLE. The function \\c eyelink_initialize_mapping() should be called"]
9718 #[doc = "before calling this function."]
9719 #[doc = "@param xp X point to apply gaze->href."]
9720 #[doc = "@param yp Y point to apply gaze->href."]
9721 #[doc = "@param sample Sample."]
9722 #[doc = "@return \\c 0 if OK, \\c -1 if there is a math error, \\c -2 if the tracker"]
9723 #[doc = "does not support this operation."]
9724 pub fn eyelink_gaze_to_href(xp: *mut f32, yp: *mut f32, sample: *mut FSAMPLE) -> INT32;
9725}
9726extern "C" {
9727 #[doc = " @ingroup extra_data"]
9728 #[doc = "Convenient function to calculate the href angle."]
9729 #[doc = "@param x1 Point 1 x."]
9730 #[doc = "@param y1 Point 1 y."]
9731 #[doc = "@param x2 Point 2 x."]
9732 #[doc = "@param y2 Point 2 y."]
9733 pub fn eyelink_href_angle(x1: f32, y1: f32, x2: f32, y2: f32) -> f32;
9734}
9735extern "C" {
9736 #[doc = " @ingroup extra_data"]
9737 #[doc = "Convenient function to calculate the href resolution."]
9738 #[doc = "@param x X value of point."]
9739 #[doc = "@param y Y value of point."]
9740 #[doc = "@param xres Pointer to return the x resolution."]
9741 #[doc = "@param yres Pointer to return the y resolution."]
9742 pub fn eyelink_href_resolution(x: f32, y: f32, xres: *mut f32, yres: *mut f32);
9743}
9744extern "C" {
9745 #[doc = " @ingroup display"]
9746 #[doc = "\\deprecated Use eyelink_draw_cross_hair() instead."]
9747 #[doc = ""]
9748 #[doc = "Value is image coord scaled so l,t=0, r,b=8192"]
9749 #[doc = "Values may be negative or beyond image limits"]
9750 #[doc = "Value is 0x8000 in X (or L) field if crosshair is not to be drawn"]
9751 #[doc = "Head camera: indexes 0..3 are markers"]
9752 #[doc = "Eye camera:"]
9753 #[doc = "Index 0 is pupil center"]
9754 #[doc = "Index 1 is CR center"]
9755 #[doc = "Index 2 is pupil-limit box left, top"]
9756 #[doc = "Index 3 is pupil-limit box right, bottom"]
9757 #[doc = "@param xhairs_on Set to indicate if xhairs enabled on display (may be \\c NULL)."]
9758 #[doc = "@param x array of 4 to be filled to return x data"]
9759 #[doc = "@param y array of 4 to be filled to return y data"]
9760 #[doc = "@return Channel number (\\c 1 = left, \\c 2 = head, \\c 3 = right)."]
9761 #[doc = ""]
9762 #[doc = ""]
9763 pub fn get_image_xhair_data(
9764 x: *mut INT16,
9765 y: *mut INT16,
9766 xhairs_on: *mut INT16,
9767 ) -> ::std::os::raw::c_int;
9768}
9769extern "C" {
9770 pub fn eyelink_get_extra_raw_values(
9771 s: *mut FSAMPLE,
9772 rv: *mut FSAMPLE_RAW,
9773 ) -> ::std::os::raw::c_int;
9774}
9775extern "C" {
9776 pub fn eyelink_get_extra_raw_values_v2(
9777 s: *mut FSAMPLE,
9778 eye: ::std::os::raw::c_int,
9779 rv: *mut FSAMPLE_RAW,
9780 ) -> ::std::os::raw::c_int;
9781}
9782extern "C" {
9783 #[doc = " @ingroup velocity_acceleration"]
9784 #[doc = "Calculates left x velocity, left y velocity, right x velocity and right y velocity from queue of samples."]
9785 #[doc = "@param[in] slen Sample model to use for velocity calculation. Acceptable models"]
9786 #[doc = "are \\c FIVE_SAMPLE_MODEL, \\c NINE_SAMPLE_MODEL, \\c SEVENTEEN_SAMPLE_MODEL and"]
9787 #[doc = "\\c EL1000_TRACKER_MODEL."]
9788 #[doc = "@param[out] xvel Left and right x velocity."]
9789 #[doc = "Expects an array of 2 elements of floats. The array is filled with left and right"]
9790 #[doc = "velocity values. Upon return of this function xvel[0] contains the left x velocity"]
9791 #[doc = "data and xvel[1] contains right x velocity data. If velocity cannot be calculated"]
9792 #[doc = "for any reason(eg. insufficient samples, no data) MISSING_DATA is filled for the given"]
9793 #[doc = "velocity."]
9794 #[doc = "@param[out] yvel Left and right y velocity."]
9795 #[doc = "Expects an array of 2 elements of floats. The array is filled with left and right"]
9796 #[doc = "velocity values. Upon return of this function yvel[0] contains the left y velocity"]
9797 #[doc = "data and xvel[1] contains right y velocity data. If velocity cannot be calculated"]
9798 #[doc = "for any reason(eg. insufficient samples, no data) MISSING_DATA is filled for the given"]
9799 #[doc = "velocity."]
9800 #[doc = "@param[out] vel_sample Velocity for sample."]
9801 #[doc = "Expects a FSAMPLE structure to fill in the sample, the velocity is calculated for."]
9802 #[doc = ""]
9803 #[doc = "\\b Example:"]
9804 #[doc = "<pre>"]
9805 #[doc = "@code"]
9806 #[doc = "#include <stdio.h>"]
9807 #[doc = "#include <core_expt.h>"]
9808 #[doc = ""]
9809 #[doc = "int main(int argc, char ** argv)"]
9810 #[doc = "{"]
9811 #[doc = "if(open_eyelink_connection(0)) // connect to tracker"]
9812 #[doc = "{"]
9813 #[doc = "return -1;"]
9814 #[doc = "}"]
9815 #[doc = ""]
9816 #[doc = "eyecmd_printf(\"link_sample_data = LEFT,RIGHT,GAZE,GAZERES,AREA,STATUS\"); // tell the tracker to stuff the sample with"]
9817 #[doc = "if(start_recording(0,0,1,0)) // start recording failed."]
9818 #[doc = "{"]
9819 #[doc = "close_eyelink_connection();"]
9820 #[doc = "return -1;"]
9821 #[doc = "}"]
9822 #[doc = ""]
9823 #[doc = "if(!eyelink_wait_for_block_start(100, 1, 0)) // wait for block start"]
9824 #[doc = "{"]
9825 #[doc = "stop_recording();"]
9826 #[doc = "close_eyelink_connection();"]
9827 #[doc = "return -1;"]
9828 #[doc = "}"]
9829 #[doc = "else"]
9830 #[doc = "{"]
9831 #[doc = "UINT32 st = current_time();"]
9832 #[doc = "while(current_time()-st<10000) // record for 10 seconds"]
9833 #[doc = "{"]
9834 #[doc = "FSAMPLE fs;"]
9835 #[doc = "float xvel[2];"]
9836 #[doc = "float yvel[2];"]
9837 #[doc = "if(check_recording()!=0)"]
9838 #[doc = "{"]
9839 #[doc = "close_eyelink_connection();"]
9840 #[doc = "return -4; // recording aborted."]
9841 #[doc = "}"]
9842 #[doc = "eyelink_calculate_velocity_x_y(FIVE_SAMPLE_MODEL,xvel,yvel,&fs);"]
9843 #[doc = "printf(\"%lu %f %f %f %f\\n\",fs.time,xvel[0],yvel[0], xvel[1], yvel[1]);"]
9844 #[doc = "pump_delay(100); // we check the velocity every 100 ms."]
9845 #[doc = "}"]
9846 #[doc = "stop_recording();"]
9847 #[doc = "close_eyelink_connection();"]
9848 #[doc = "return 0;"]
9849 #[doc = "}"]
9850 #[doc = "}"]
9851 #[doc = "@endcode"]
9852 #[doc = "</pre>"]
9853 pub fn eyelink_calculate_velocity_x_y(
9854 slen: ::std::os::raw::c_int,
9855 xvel: *mut f32,
9856 yvel: *mut f32,
9857 vel_sample: *mut FSAMPLE,
9858 ) -> ::std::os::raw::c_int;
9859}
9860extern "C" {
9861 #[doc = " @ingroup velocity_acceleration"]
9862 #[doc = "Calculates overall velocity for left and right eyes separately."]
9863 #[doc = "@param[in] slen Sample model to use for velocity calculation. Acceptable models"]
9864 #[doc = "are \\c FIVE_SAMPLE_MODEL, \\c NINE_SAMPLE_MODEL, \\c SEVENTEEN_SAMPLE_MODEL and"]
9865 #[doc = "\\c EL1000_TRACKER_MODEL."]
9866 #[doc = "@param[out] vel A float array of 2 to fill in the calculated results. Upon return of this function,"]
9867 #[doc = "vel[0] will contain overall velocity for left eye and vel[1] will contain overall velocity"]
9868 #[doc = "for right eye. If velocity cannot be calculated for any reason(eg. insufficient"]
9869 #[doc = "samples, no data) MISSING_DATA is filled for the given velocity."]
9870 #[doc = "@param[out] vel_sample Velocity for sample."]
9871 #[doc = "Expects a FSAMPLE structure to fill in the sample, the velocity is calculated for."]
9872 pub fn eyelink_calculate_velocity(
9873 slen: ::std::os::raw::c_int,
9874 vel: *mut f32,
9875 vel_sample: *mut FSAMPLE,
9876 ) -> ::std::os::raw::c_int;
9877}
9878extern "C" {
9879 #[doc = " @ingroup velocity_acceleration"]
9880 #[doc = "Calculates overall velocity and acceleration for left and right eyes separately."]
9881 #[doc = "@param[in] slen Sample model to use for velocity calculation. Acceptable models"]
9882 #[doc = "are \\c FIVE_SAMPLE_MODEL, \\c NINE_SAMPLE_MODEL, \\c SEVENTEEN_SAMPLE_MODEL and"]
9883 #[doc = "\\c EL1000_TRACKER_MODEL."]
9884 #[doc = "@param[out] vel A float array of 2 to fill in the calculated velocity results. Upon return of this function,"]
9885 #[doc = "vel[0] will contain overall velocity for left eye and vel[1] will contain overall velocity"]
9886 #[doc = "for right eye. If velocity cannot be calculated for any reason(eg. insufficient"]
9887 #[doc = "samples, no data) MISSING_DATA is filled for the given velocity."]
9888 #[doc = "@param[out] acc A float array of 2 to fill in the calculated acceleration results. Upon return of this function,"]
9889 #[doc = "acc[0] will contain overall acceleration for left eye and acc[1] will contain overall acceleration"]
9890 #[doc = "for right eye. If acceleration cannot be calculated for any reason(eg. insufficient"]
9891 #[doc = "samples, no data) MISSING_DATA is filled for the given acceleration."]
9892 #[doc = "@param[out] vel_sample Velocity for sample."]
9893 #[doc = "Expects a FSAMPLE structure to fill in the sample, the velocity is calculated for."]
9894 pub fn eyelink_calculate_overallvelocity_and_acceleration(
9895 slen: ::std::os::raw::c_int,
9896 vel: *mut f32,
9897 acc: *mut f32,
9898 vel_sample: *mut FSAMPLE,
9899 ) -> ::std::os::raw::c_int;
9900}
9901extern "C" {
9902 #[doc = " @ingroup message_file"]
9903 #[doc = "Very similar to eyemsg_printf, with the following features:"]
9904 #[doc = "\\arg Optionally write the timestamped message to file instead of sending over the link to tracker."]
9905 #[doc = "\\arg Optional time of event."]
9906 #[doc = "@param t optional time of event (0 = NOW)"]
9907 #[doc = "@param fmt format messages"]
9908 pub fn timemsg_printf(t: UINT32, fmt: *mut ::std::os::raw::c_char, ...) -> INT16;
9909}
9910extern "C" {
9911 #[doc = " @ingroup message_file"]
9912 #[doc = "Creates message file, once open call to timemsg_printf(), will not send messages to tracker."]
9913 #[doc = "Messages are kept in a queue if the application is in realtime mode, and written to disk on"]
9914 #[doc = "non real-time mode except when close_message_file() is called while in real-time mode."]
9915 #[doc = "@param[in] fname Message file name"]
9916 pub fn open_message_file(fname: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
9917}
9918extern "C" {
9919 #[doc = " @ingroup message_file"]
9920 #[doc = "Flush and close message file, opened by open_message_file."]
9921 pub fn close_message_file();
9922}
9923#[doc = "@}"]
9924pub type CrossHairInfo = _CrossHairInfo;
9925#[doc = " @ingroup display"]
9926#[doc = "\\brief Structure to hold cross hair information."]
9927#[doc = ""]
9928#[doc = "Structure to hold cross hair information that are needed to"]
9929#[doc = "draw the cross hair on camera images."]
9930#[repr(C)]
9931#[derive(Debug, Copy, Clone)]
9932pub struct _CrossHairInfo {
9933 #[doc = "< for the moment this should be set to 1."]
9934 pub majorVersion: ::std::os::raw::c_short,
9935 #[doc = "< for the moment this should be set to 0."]
9936 pub minorVersion: ::std::os::raw::c_short,
9937 #[doc = "Display width of the camera image. This need not to match the"]
9938 #[doc = "size given at setup_image_display_hook"]
9939 pub w: ::std::os::raw::c_int,
9940 #[doc = "Display height of the camera image. This need not to match"]
9941 #[doc = "the size given at setup_image_display_hook"]
9942 pub h: ::std::os::raw::c_int,
9943 #[doc = "Private data used by internals of eyelink_draw_cross_hair."]
9944 #[doc = "This pointer should not be touched externally"]
9945 pub privatedata: *mut ::std::os::raw::c_void,
9946 #[doc = "Attribute to hold any user data. Any data set here"]
9947 #[doc = "untouched by eyelink_draw_cross_hair."]
9948 pub userdata: *mut ::std::os::raw::c_void,
9949 #[doc = "drawLine shoud draw a line from (x1,y1) -> (x2,y2)"]
9950 #[doc = "with the given color"]
9951 #[doc = "@param[in] x1"]
9952 pub drawLine: ::std::option::Option<
9953 unsafe extern "C" fn(
9954 dt: *mut CrossHairInfo,
9955 x1: ::std::os::raw::c_int,
9956 y1: ::std::os::raw::c_int,
9957 x2: ::std::os::raw::c_int,
9958 y2: ::std::os::raw::c_int,
9959 colorindex: ::std::os::raw::c_int,
9960 ),
9961 >,
9962 #[doc = "drawLozenge shoud draw circle if the width and height are equal. otherwise"]
9963 #[doc = "find the smallest width and draw semi-circles on the longest side at both ends and connect"]
9964 #[doc = "the semi circles with lines."]
9965 pub drawLozenge: ::std::option::Option<
9966 unsafe extern "C" fn(
9967 dt: *mut CrossHairInfo,
9968 x: ::std::os::raw::c_int,
9969 y: ::std::os::raw::c_int,
9970 w: ::std::os::raw::c_int,
9971 h: ::std::os::raw::c_int,
9972 colorindex: ::std::os::raw::c_int,
9973 ),
9974 >,
9975 #[doc = "getMouseState shoud fill values for (x,y) with current mouse position and the"]
9976 #[doc = "state = 1 if pressed. the x and y values are respective to top left hand corner of the image"]
9977 pub getMouseState: ::std::option::Option<
9978 unsafe extern "C" fn(
9979 dt: *mut CrossHairInfo,
9980 x: *mut ::std::os::raw::c_int,
9981 y: *mut ::std::os::raw::c_int,
9982 state: *mut ::std::os::raw::c_int,
9983 ),
9984 >,
9985 #[doc = "< for future use"]
9986 pub reserved1: ::std::os::raw::c_int,
9987 #[doc = "< for future use"]
9988 pub reserved2: ::std::os::raw::c_int,
9989 #[doc = "< for future use"]
9990 pub reserved3: ::std::os::raw::c_int,
9991 #[doc = "< for future use"]
9992 pub reserved4: ::std::os::raw::c_int,
9993}
9994#[test]
9995fn bindgen_test_layout__CrossHairInfo() {
9996 assert_eq!(
9997 ::std::mem::size_of::<_CrossHairInfo>(),
9998 72usize,
9999 concat!("Size of: ", stringify!(_CrossHairInfo))
10000 );
10001 assert_eq!(
10002 ::std::mem::align_of::<_CrossHairInfo>(),
10003 8usize,
10004 concat!("Alignment of ", stringify!(_CrossHairInfo))
10005 );
10006 assert_eq!(
10007 unsafe { &(*(::std::ptr::null::<_CrossHairInfo>())).majorVersion as *const _ as usize },
10008 0usize,
10009 concat!(
10010 "Offset of field: ",
10011 stringify!(_CrossHairInfo),
10012 "::",
10013 stringify!(majorVersion)
10014 )
10015 );
10016 assert_eq!(
10017 unsafe { &(*(::std::ptr::null::<_CrossHairInfo>())).minorVersion as *const _ as usize },
10018 2usize,
10019 concat!(
10020 "Offset of field: ",
10021 stringify!(_CrossHairInfo),
10022 "::",
10023 stringify!(minorVersion)
10024 )
10025 );
10026 assert_eq!(
10027 unsafe { &(*(::std::ptr::null::<_CrossHairInfo>())).w as *const _ as usize },
10028 4usize,
10029 concat!(
10030 "Offset of field: ",
10031 stringify!(_CrossHairInfo),
10032 "::",
10033 stringify!(w)
10034 )
10035 );
10036 assert_eq!(
10037 unsafe { &(*(::std::ptr::null::<_CrossHairInfo>())).h as *const _ as usize },
10038 8usize,
10039 concat!(
10040 "Offset of field: ",
10041 stringify!(_CrossHairInfo),
10042 "::",
10043 stringify!(h)
10044 )
10045 );
10046 assert_eq!(
10047 unsafe { &(*(::std::ptr::null::<_CrossHairInfo>())).privatedata as *const _ as usize },
10048 16usize,
10049 concat!(
10050 "Offset of field: ",
10051 stringify!(_CrossHairInfo),
10052 "::",
10053 stringify!(privatedata)
10054 )
10055 );
10056 assert_eq!(
10057 unsafe { &(*(::std::ptr::null::<_CrossHairInfo>())).userdata as *const _ as usize },
10058 24usize,
10059 concat!(
10060 "Offset of field: ",
10061 stringify!(_CrossHairInfo),
10062 "::",
10063 stringify!(userdata)
10064 )
10065 );
10066 assert_eq!(
10067 unsafe { &(*(::std::ptr::null::<_CrossHairInfo>())).drawLine as *const _ as usize },
10068 32usize,
10069 concat!(
10070 "Offset of field: ",
10071 stringify!(_CrossHairInfo),
10072 "::",
10073 stringify!(drawLine)
10074 )
10075 );
10076 assert_eq!(
10077 unsafe { &(*(::std::ptr::null::<_CrossHairInfo>())).drawLozenge as *const _ as usize },
10078 40usize,
10079 concat!(
10080 "Offset of field: ",
10081 stringify!(_CrossHairInfo),
10082 "::",
10083 stringify!(drawLozenge)
10084 )
10085 );
10086 assert_eq!(
10087 unsafe { &(*(::std::ptr::null::<_CrossHairInfo>())).getMouseState as *const _ as usize },
10088 48usize,
10089 concat!(
10090 "Offset of field: ",
10091 stringify!(_CrossHairInfo),
10092 "::",
10093 stringify!(getMouseState)
10094 )
10095 );
10096 assert_eq!(
10097 unsafe { &(*(::std::ptr::null::<_CrossHairInfo>())).reserved1 as *const _ as usize },
10098 56usize,
10099 concat!(
10100 "Offset of field: ",
10101 stringify!(_CrossHairInfo),
10102 "::",
10103 stringify!(reserved1)
10104 )
10105 );
10106 assert_eq!(
10107 unsafe { &(*(::std::ptr::null::<_CrossHairInfo>())).reserved2 as *const _ as usize },
10108 60usize,
10109 concat!(
10110 "Offset of field: ",
10111 stringify!(_CrossHairInfo),
10112 "::",
10113 stringify!(reserved2)
10114 )
10115 );
10116 assert_eq!(
10117 unsafe { &(*(::std::ptr::null::<_CrossHairInfo>())).reserved3 as *const _ as usize },
10118 64usize,
10119 concat!(
10120 "Offset of field: ",
10121 stringify!(_CrossHairInfo),
10122 "::",
10123 stringify!(reserved3)
10124 )
10125 );
10126 assert_eq!(
10127 unsafe { &(*(::std::ptr::null::<_CrossHairInfo>())).reserved4 as *const _ as usize },
10128 68usize,
10129 concat!(
10130 "Offset of field: ",
10131 stringify!(_CrossHairInfo),
10132 "::",
10133 stringify!(reserved4)
10134 )
10135 );
10136}
10137impl Default for _CrossHairInfo {
10138 fn default() -> Self {
10139 unsafe { ::std::mem::zeroed() }
10140 }
10141}
10142extern "C" {
10143 #[doc = " @ingroup display"]
10144 #[doc = "Convenient function to draw cross hair on camera image. It is very tedious to draw and maintain"]
10145 #[doc = "cross hair drawing. This is due to evolving eyelink camera image protocol and the introduction"]
10146 #[doc = "of newer trackers and still single library handle all eyelink trackers. eyelink_draw_cross_hair"]
10147 #[doc = "fixes this issue by allowing the drawing function to draw to the device contexts and does all"]
10148 #[doc = "magic of extracting cursor info from the tracker."]
10149 #[doc = ""]
10150 #[doc = "eyelink_draw_cross_hair calls drawLine(), drawEllipse() and getMouseState() to draw the cross hair."]
10151 #[doc = "eyelink_draw_cross_hair expects both width(w) and height(h) are correct and the function pointers to"]
10152 #[doc = "drawLine, drawEllipse and getMouseState are not NULL."]
10153 #[doc = "@param[in] chi initialized CrossHairInfo structure."]
10154 pub fn eyelink_draw_cross_hair(chi: *mut CrossHairInfo) -> INT32;
10155}
10156extern "C" {
10157 #[doc = "Returns the eyelink_core library version number."]
10158 #[doc = "@param[out] c fills in the version number of th eyelink_core library."]
10159 pub fn eyelink_dll_version(c: *mut ::std::os::raw::c_char);
10160}