Deleted Added
full compact
eficon.h (329145) eficon.h (346482)
1/* $FreeBSD: stable/11/stand/efi/include/eficon.h 293724 2016-01-12 02:17:39Z smh $ */
1/* $FreeBSD: stable/11/stand/efi/include/eficon.h 346482 2019-04-21 04:26:02Z kevans $ */
2#ifndef _EFI_CON_H
3#define _EFI_CON_H
4
5/*++
6
7Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
8This software and associated documentation (if any) is furnished
9under a license and may only be used or copied in accordance

--- 248 unchanged lines hidden (view full) ---

258#define CHAR_TAB 0x0009
259#define CHAR_LINEFEED 0x000A
260#define CHAR_CARRIAGE_RETURN 0x000D
261
262//
263// Scan codes for base line keys
264//
265
2#ifndef _EFI_CON_H
3#define _EFI_CON_H
4
5/*++
6
7Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
8This software and associated documentation (if any) is furnished
9under a license and may only be used or copied in accordance

--- 248 unchanged lines hidden (view full) ---

258#define CHAR_TAB 0x0009
259#define CHAR_LINEFEED 0x000A
260#define CHAR_CARRIAGE_RETURN 0x000D
261
262//
263// Scan codes for base line keys
264//
265
266#define SCAN_NULL 0x0000
267#define SCAN_UP 0x0001
268#define SCAN_DOWN 0x0002
269#define SCAN_RIGHT 0x0003
270#define SCAN_LEFT 0x0004
271#define SCAN_HOME 0x0005
272#define SCAN_END 0x0006
273#define SCAN_INSERT 0x0007
274#define SCAN_DELETE 0x0008
275#define SCAN_PAGE_UP 0x0009
276#define SCAN_PAGE_DOWN 0x000A
277#define SCAN_F1 0x000B
278#define SCAN_F2 0x000C
279#define SCAN_F3 0x000D
280#define SCAN_F4 0x000E
281#define SCAN_F5 0x000F
282#define SCAN_F6 0x0010
283#define SCAN_F7 0x0011
284#define SCAN_F8 0x0012
285#define SCAN_F9 0x0013
286#define SCAN_F10 0x0014
287#define SCAN_ESC 0x0017
266#define SCAN_NULL 0x0000
267#define SCAN_UP 0x0001
268#define SCAN_DOWN 0x0002
269#define SCAN_RIGHT 0x0003
270#define SCAN_LEFT 0x0004
271#define SCAN_HOME 0x0005
272#define SCAN_END 0x0006
273#define SCAN_INSERT 0x0007
274#define SCAN_DELETE 0x0008
275#define SCAN_PAGE_UP 0x0009
276#define SCAN_PAGE_DOWN 0x000A
277#define SCAN_F1 0x000B
278#define SCAN_F2 0x000C
279#define SCAN_F3 0x000D
280#define SCAN_F4 0x000E
281#define SCAN_F5 0x000F
282#define SCAN_F6 0x0010
283#define SCAN_F7 0x0011
284#define SCAN_F8 0x0012
285#define SCAN_F9 0x0013
286#define SCAN_F10 0x0014
287#define SCAN_ESC 0x0017
288
288
289//
290// EFI Scan code Ex
291//
292#define SCAN_F11 0x0015
293#define SCAN_F12 0x0016
294#define SCAN_F13 0x0068
295#define SCAN_F14 0x0069
296#define SCAN_F15 0x006A
297#define SCAN_F16 0x006B
298#define SCAN_F17 0x006C
299#define SCAN_F18 0x006D
300#define SCAN_F19 0x006E
301#define SCAN_F20 0x006F
302#define SCAN_F21 0x0070
303#define SCAN_F22 0x0071
304#define SCAN_F23 0x0072
305#define SCAN_F24 0x0073
306#define SCAN_MUTE 0x007F
307#define SCAN_VOLUME_UP 0x0080
308#define SCAN_VOLUME_DOWN 0x0081
309#define SCAN_BRIGHTNESS_UP 0x0100
310#define SCAN_BRIGHTNESS_DOWN 0x0101
311#define SCAN_SUSPEND 0x0102
312#define SCAN_HIBERNATE 0x0103
313#define SCAN_TOGGLE_DISPLAY 0x0104
314#define SCAN_RECOVERY 0x0105
315#define SCAN_EJECT 0x0106
316
289typedef
290EFI_STATUS
291(EFIAPI *EFI_INPUT_RESET) (
292 IN struct _SIMPLE_INPUT_INTERFACE *This,
293 IN BOOLEAN ExtendedVerification
294 );
295
296typedef

--- 4 unchanged lines hidden (view full) ---

301 );
302
303typedef struct _SIMPLE_INPUT_INTERFACE {
304 EFI_INPUT_RESET Reset;
305 EFI_INPUT_READ_KEY ReadKeyStroke;
306 EFI_EVENT WaitForKey;
307} SIMPLE_INPUT_INTERFACE;
308
317typedef
318EFI_STATUS
319(EFIAPI *EFI_INPUT_RESET) (
320 IN struct _SIMPLE_INPUT_INTERFACE *This,
321 IN BOOLEAN ExtendedVerification
322 );
323
324typedef

--- 4 unchanged lines hidden (view full) ---

329 );
330
331typedef struct _SIMPLE_INPUT_INTERFACE {
332 EFI_INPUT_RESET Reset;
333 EFI_INPUT_READ_KEY ReadKeyStroke;
334 EFI_EVENT WaitForKey;
335} SIMPLE_INPUT_INTERFACE;
336
337#define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \
338 {0xdd9e7534, 0x7762, 0x4698, {0x8c, 0x14, 0xf5, 0x85, \
339 0x17, 0xa6, 0x25, 0xaa} }
340
341INTERFACE_DECL(_EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL);
342
343typedef UINT8 EFI_KEY_TOGGLE_STATE;
344//
345// Any Shift or Toggle State that is valid should have
346// high order bit set.
347//
348typedef struct EFI_KEY_STATE {
349 UINT32 KeyShiftState;
350 EFI_KEY_TOGGLE_STATE KeyToggleState;
351} EFI_KEY_STATE;
352
353typedef struct {
354 EFI_INPUT_KEY Key;
355 EFI_KEY_STATE KeyState;
356} EFI_KEY_DATA;
357
358//
359// Shift state
360//
361#define EFI_SHIFT_STATE_VALID 0x80000000
362#define EFI_RIGHT_SHIFT_PRESSED 0x00000001
363#define EFI_LEFT_SHIFT_PRESSED 0x00000002
364#define EFI_RIGHT_CONTROL_PRESSED 0x00000004
365#define EFI_LEFT_CONTROL_PRESSED 0x00000008
366#define EFI_RIGHT_ALT_PRESSED 0x00000010
367#define EFI_LEFT_ALT_PRESSED 0x00000020
368#define EFI_RIGHT_LOGO_PRESSED 0x00000040
369#define EFI_LEFT_LOGO_PRESSED 0x00000080
370#define EFI_MENU_KEY_PRESSED 0x00000100
371#define EFI_SYS_REQ_PRESSED 0x00000200
372
373//
374// Toggle state
375//
376#define EFI_TOGGLE_STATE_VALID 0x80
377#define EFI_KEY_STATE_EXPOSED 0x40
378#define EFI_SCROLL_LOCK_ACTIVE 0x01
379#define EFI_NUM_LOCK_ACTIVE 0x02
380#define EFI_CAPS_LOCK_ACTIVE 0x04
381
382//
383// EFI Key Notfication Function
384//
385typedef
386EFI_STATUS
387(EFIAPI *EFI_KEY_NOTIFY_FUNCTION) (
388 IN EFI_KEY_DATA *KeyData
389 );
390
391typedef
392EFI_STATUS
393(EFIAPI *EFI_INPUT_RESET_EX) (
394 IN struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
395 IN BOOLEAN ExtendedVerification
396 )
397/*++
398
399 Routine Description:
400 Reset the input device and optionaly run diagnostics
401
402 Arguments:
403 This - Protocol instance pointer.
404 ExtendedVerification - Driver may perform diagnostics on reset.
405
406 Returns:
407 EFI_SUCCESS - The device was reset.
408 EFI_DEVICE_ERROR - The device is not functioning properly and could
409 not be reset.
410
411--*/
412;
413
414typedef
415EFI_STATUS
416(EFIAPI *EFI_INPUT_READ_KEY_EX) (
417 IN struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
418 OUT EFI_KEY_DATA *KeyData
419 )
420/*++
421
422 Routine Description:
423 Reads the next keystroke from the input device. The WaitForKey Event can
424 be used to test for existance of a keystroke via WaitForEvent () call.
425
426 Arguments:
427 This - Protocol instance pointer.
428 KeyData - A pointer to a buffer that is filled in with the keystroke
429 state data for the key that was pressed.
430
431 Returns:
432 EFI_SUCCESS - The keystroke information was returned.
433 EFI_NOT_READY - There was no keystroke data availiable.
434 EFI_DEVICE_ERROR - The keystroke information was not returned due to
435 hardware errors.
436 EFI_INVALID_PARAMETER - KeyData is NULL.
437--*/
438;
439
440typedef
441EFI_STATUS
442(EFIAPI *EFI_SET_STATE) (
443 IN struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
444 IN EFI_KEY_TOGGLE_STATE *KeyToggleState
445 )
446/*++
447
448 Routine Description:
449 Set certain state for the input device.
450
451 Arguments:
452 This - Protocol instance pointer.
453 KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
454 state for the input device.
455
456 Returns:
457 EFI_SUCCESS - The device state was set successfully.
458 EFI_DEVICE_ERROR - The device is not functioning correctly and could
459 not have the setting adjusted.
460 EFI_UNSUPPORTED - The device does not have the ability to set its state.
461 EFI_INVALID_PARAMETER - KeyToggleState is NULL.
462
463--*/
464;
465
466typedef
467EFI_STATUS
468(EFIAPI *EFI_REGISTER_KEYSTROKE_NOTIFY) (
469 IN struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
470 IN EFI_KEY_DATA *KeyData,
471 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
472 OUT EFI_HANDLE *NotifyHandle
473 )
474/*++
475
476 Routine Description:
477 Register a notification function for a particular keystroke for the input device.
478
479 Arguments:
480 This - Protocol instance pointer.
481 KeyData - A pointer to a buffer that is filled in with the keystroke
482 information data for the key that was pressed.
483 KeyNotificationFunction - Points to the function to be called when the key
484 sequence is typed specified by KeyData.
485 NotifyHandle - Points to the unique handle assigned to the registered notification.
486
487 Returns:
488 EFI_SUCCESS - The notification function was registered successfully.
489 EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
490 EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
491
492--*/
493;
494
495typedef
496EFI_STATUS
497(EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY) (
498 IN struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
499 IN EFI_HANDLE NotificationHandle
500 )
501/*++
502
503 Routine Description:
504 Remove a registered notification function from a particular keystroke.
505
506 Arguments:
507 This - Protocol instance pointer.
508 NotificationHandle - The handle of the notification function being unregistered.
509
510 Returns:
511 EFI_SUCCESS - The notification function was unregistered successfully.
512 EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
513 EFI_NOT_FOUND - Can not find the matching entry in database.
514
515--*/
516;
517
518typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL {
519 EFI_INPUT_RESET_EX Reset;
520 EFI_INPUT_READ_KEY_EX ReadKeyStrokeEx;
521 EFI_EVENT WaitForKeyEx;
522 EFI_SET_STATE SetState;
523 EFI_REGISTER_KEYSTROKE_NOTIFY RegisterKeyNotify;
524 EFI_UNREGISTER_KEYSTROKE_NOTIFY UnregisterKeyNotify;
525} EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL;
526
309#endif
527#endif