Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
1.9 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. spmenu.h
  5. Abstract:
  6. Public header file for text setup menu support.
  7. Author:
  8. Ted Miller (tedm) 8-September-1993
  9. Revision History:
  10. --*/
  11. #ifndef _SPMENU_
  12. #define _SPMENU_
  13. //
  14. // Define type of routine that is called from within
  15. // SpMnDisplay when the user moves the highlight via
  16. // the up and down arrow keys.
  17. //
  18. typedef
  19. VOID
  20. (*PMENU_CALLBACK_ROUTINE) (
  21. IN ULONG_PTR UserDataOfHighlightedItem
  22. );
  23. //
  24. // Define type of routine that is called from within
  25. // SpMnDisplay when the user selects a menu item by
  26. // the ENTER key.
  27. //
  28. typedef
  29. BOOLEAN
  30. (*PMENU_SELECTION_CALLBACK_ROUTINE) (
  31. IN ULONG_PTR UserData,
  32. IN ULONG Key
  33. );
  34. PVOID
  35. SpMnCreate(
  36. IN ULONG LeftX,
  37. IN ULONG TopY,
  38. IN ULONG Width,
  39. IN ULONG Height
  40. );
  41. VOID
  42. SpMnDestroy(
  43. IN PVOID Menu
  44. );
  45. BOOLEAN
  46. SpMnAddItem(
  47. IN PVOID Menu,
  48. IN PWSTR Text,
  49. IN ULONG LeftX,
  50. IN ULONG Width,
  51. IN BOOLEAN Selectable,
  52. IN ULONG_PTR UserData
  53. );
  54. PWSTR
  55. SpMnGetText(
  56. IN PVOID Menu,
  57. IN ULONG_PTR UserData
  58. );
  59. PWSTR
  60. SpMnGetTextDup(
  61. IN PVOID Menu,
  62. IN ULONG_PTR UserData
  63. );
  64. VOID
  65. SpMnDisplay(
  66. IN PVOID Menu,
  67. IN ULONG_PTR UserDataOfHighlightedItem,
  68. IN BOOLEAN Framed,
  69. IN PULONG ValidKeys,
  70. IN PULONG Mnemonics, OPTIONAL
  71. IN PMENU_CALLBACK_ROUTINE NewHighlightCallback, OPTIONAL
  72. IN PMENU_SELECTION_CALLBACK_ROUTINE ActionCallbackRoutine, OPTIONAL
  73. OUT PULONG KeyPressed,
  74. OUT PULONG_PTR UserDataOfSelectedItem
  75. );
  76. #endif // _SPMENU_