Source code of Windows XP (NT5)
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.

149 lines
3.7 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: amcpriv.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef __AMC_PRIV_H__
  11. #define __AMC_PRIV_H__
  12. #pragma once
  13. #ifndef DECLSPEC_UUID
  14. #if _MSC_VER >= 1100
  15. #define DECLSPEC_UUID(x) __declspec(uuid(x))
  16. #else
  17. #define DECLSPEC_UUID(x)
  18. #endif
  19. #endif
  20. #include "ndmgr.h"
  21. //
  22. // TVOWNED_MAGICWORD
  23. //
  24. const COMPONENTID TVOWNED_MAGICWORD = (long)(0x03951589);
  25. #define MMCNODE_NO_CHANGE 0
  26. #define MMCNODE_NAME_CHANGE 1
  27. #define MMCNODE_TARGET_CHANGE 2
  28. //////////////////////////////////////////////////////////////////////////////
  29. //
  30. // SViewUpdateInfo and related defines.
  31. //
  32. typedef CList<HMTNODE, HMTNODE> CHMTNODEList;
  33. struct SViewUpdateInfo
  34. {
  35. SViewUpdateInfo() : newNode(0), insertAfter(0), flag(0) {}
  36. CHMTNODEList path;
  37. HMTNODE newNode;
  38. HMTNODE insertAfter;
  39. DWORD flag;
  40. };
  41. // The following are values of params sent to the views OnUpdate(lHint, pHint)
  42. // lHint will be one of the VIEW_UPDATE_xxx's defined below.
  43. // pHint will be a ptr to SViewUpdateInfo struct.
  44. // VIEW_UPDATE_ADD is sent when a new node needs to be added.
  45. // SViewUpdateInfo.flag - unused
  46. // SViewUpdateInfo.newNode - the new node to be added
  47. // SViewUpdateInfo.path _ the path to the new node's parent node.
  48. //
  49. #define VIEW_UPDATE_ADD 786
  50. // VIEW_UPDATE_SELFORDELETE is sent when a node needs to ABOUT to be deleted.
  51. // SViewUpdateInfo.flag - 0 => delete only child items.
  52. // - DELETE_THIS => delete this item.
  53. // SViewUpdateInfo.newNode - unused
  54. // SViewUpdateInfo.path _ the path to node that is being deleted.
  55. //
  56. #define VIEW_UPDATE_SELFORDELETE 787
  57. // VIEW_UPDATE_DELETE is sent when a node needs to be deleted.
  58. // SViewUpdateInfo.flag - 0 => delete only child items.
  59. // - DELETE_THIS => delete this item.
  60. // SViewUpdateInfo.newNode - unused
  61. // SViewUpdateInfo.path _ the path to the new node's parent node.
  62. //
  63. #define VIEW_UPDATE_DELETE 788
  64. #define VUI_DELETE_THIS 1
  65. #define VUI_DELETE_SETAS_EXPANDABLE 2
  66. // VIEW_UPDATE_DELETE_EMPTY_VIEW is sent after the VIEW_UPDATE_DELETE is sent.
  67. // No parameters.
  68. #define VIEW_UPDATE_DELETE_EMPTY_VIEW 789
  69. // VIEW_UPDATE_MODIFY is sent when a node needs to be modified.
  70. // SViewUpdateInfo.flag - REFRESH_NODE => Only node needs to be refreshed
  71. // REFRESH_RESULTVIEW => Both node and result view need refresh.
  72. // SViewUpdateInfo.newNode - unused
  73. // SViewUpdateInfo.path _ the path to the new node's parent node.
  74. //
  75. #define VIEW_UPDATE_MODIFY 790
  76. #define VUI_REFRESH_NODE 1
  77. #define VIEW_RESELECT 791
  78. // VIEW_UPDATE_TASKPAD_NAVIGATION is sent to refresh the navigation controls of
  79. // all console taskpad views.
  80. // SViewUpdateInfo.flag - unused
  81. // SviewUpdateInfo.newNode - node that needs refreshing (always a taskpad group node)
  82. // SViewUpdateInfo.path - unused
  83. #define VIEW_UPDATE_TASKPAD_NAVIGATION 792
  84. class CSafeGlobalUnlock
  85. {
  86. public:
  87. CSafeGlobalUnlock(HGLOBAL h) : m_h(h)
  88. {
  89. }
  90. ~CSafeGlobalUnlock()
  91. {
  92. ::GlobalUnlock(m_h);
  93. }
  94. private:
  95. HGLOBAL m_h;
  96. };
  97. enum EVerb
  98. {
  99. evNone,
  100. evOpen,
  101. evCut,
  102. evCopy,
  103. evPaste,
  104. evDelete,
  105. evPrint,
  106. evRename,
  107. evRefresh,
  108. evProperties,
  109. // must be last
  110. evMax
  111. };
  112. #define INVALID_COOKIE ((long)-10)
  113. #endif // __AMC_PRIV_H__