Version
menu_open
link
Wwise SDK 2022.1.11
ISourceControlUtilities.h
Go to the documentation of this file.
1 /*******************************************************************************
2 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
3 released in source code form as part of the SDK installer package.
4 
5 Commercial License Usage
6 
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
11 
12 Apache License Usage
13 
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
17 http://www.apache.org/licenses/LICENSE-2.0.
18 
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
23 
24  Copyright (c) 2024 Audiokinetic Inc.
25 *******************************************************************************/
26 
27 /// \file
28 /// Wwise source control plug-in utilities interface, used to create custom dialogs, display the progress dialog, and get
29 /// the registry path needed to save the plug-in configuration.
30 
31 #ifndef _AK_WWISE_ISOURCECONTROLUTILITIES_H
32 #define _AK_WWISE_ISOURCECONTROLUTILITIES_H
33 
35 
38 
39 // Audiokinetic namespace
40 namespace AK
41 {
42  // Audiokinetic Wwise namespace
43  namespace Wwise
44  {
45  /// Wwise source control utilities interface. This interface is provided when the plug-in is initialized.
46  /// With this interface, you can display a progress dialog, create custom dialogs, display message boxes, and
47  /// save the plug-in configuration to the registry.
49  {
50  public:
51  /// Get a pointer to an AK::Wwise::ISourceControlOperationProgress interface, so you can display a simple progress dialog for the operation.
52  /// \warning This function is not thread-safe.
53  /// \return A pointer to an AK::Wwise::ISourceControlOperationProgress interface.
55 
56  /// This function does the same thing as the standard \c MessageBox function, except that this one will
57  /// be displayed with the Wwise UI look and feel.
58  /// \warning This function is not thread-safe.
59  /// \return The window results of the dialog
60  virtual int MessageBox(
61  HWND in_hWnd, ///< The window handle of the dialog
62  LPCWSTR in_pszText, ///< The text to be displayed in the message box
63  LPCWSTR in_pszCaption, ///< The caption of the message box
64  UINT in_uiType ///< The window message box type (e.g. MB_OK)
65  ) = 0;
66 
67  /// This function show a dialog with a edit field and allow the user enter input string
68  /// \warning This function is not thread-safe.
69  /// \return The window results of the dialog: IDOK or IDCANCEL
70  virtual int PromptMessage(
71  HWND in_hWnd, ///< The window handle of the dialog
72  LPCWSTR in_pszText, ///< The text to be displayed in the message box
73  LPCWSTR in_pszCaption, ///< The caption of the message box
74  LPWSTR out_pszInput, ///< The buffer to receive the user input
75  UINT in_uiInputSize, ///< The size of the buffer to receive input
76  bool in_bIsPassword ///< True to hide text; used for passwords
77  ) = 0;
78 
79  /// Show a browse for folder dialog.
80  /// \warning This function is not thread-safe.
81  /// \return The resulting path is set in out_pszChoosenPath
82  /// \return True if user clicked OK, false if user clicked Cancel
84  LPCWSTR in_pszDialogTitle, ///< The dialog title
85  LPWSTR out_pszChoosenPath, ///< The choosen path
86  UINT in_uiChoosenPathSize, ///< The size of the buffer to receive path (out_pszChoosenPath)
87  LPCWSTR in_pszRootPath = NULL ///< The root path for the browse for folder dialog
88  ) = 0;
89 
90  /// This function does the same thing as the CDialog::DoModal function.
91  /// \warning This function is not thread-safe.
92  /// \return The window results of the dialog (e.g. IDOK)
93  virtual INT_PTR CreateModalCustomDialog(
94  ISourceControlDialogBase* in_pDialog ///< A pointer to a dialog class that implements
95  ///< AK::Wwise::ISourceControlDialogBase functions.
96  ) = 0;
97 
98  /// Set DWORD value in user preferences.
99  /// \warning This function is not thread-safe.
101  LPCWSTR in_pszPreference, ///< Name of preference
102  DWORD in_dwValue ///< Value to set in user preferences.
103  ) = 0;
104 
105  /// Get DWORD value in user preferences.
106  /// \warning This function is not thread-safe.
108  LPCWSTR in_pszPreference, ///< Name of preference
109  DWORD& io_dwValue ///< in: value to return if preference is not set; out: changed to user preference value if set
110  ) = 0;
111 
112  /// Set string value in user preferences.
113  /// \warning This function is not thread-safe.
115  LPCWSTR in_pszPreference, ///< Name of preference
116  LPCWSTR in_pszValue ///< Value to set in user preferences.
117  ) = 0;
118 
119  /// Get string value from user preferences.
120  /// \warning This function is not thread-safe.
122  LPCWSTR in_pszPreference, ///< Name of preference
123  LPWSTR io_pszValue, ///< in: value to return if preference is not set; out: changed to user preference value if set
124  DWORD in_dwSize ///< Size of out_pszValue buffer.
125  ) = 0;
126 
127  /// Get the root path for a move operation.
128  /// The input file can either be a work unit or a source file
129  /// \warning This function is not thread-safe.
130  /// \return Nothing as return value. The out_pszRootPath will contain the path.
131  virtual void GetMoveRootPath(
132  LPCWSTR in_pszFullPath, ///< The full path of an audio source or work unit file
133  LPWSTR out_pszRootPath, ///< A pointer to the array that receives the root path
134  UINT in_uiRootPathSize ///< The size of the array that receives the root path
135  ) = 0;
136 
137  /// Create a AK style list control with 3 columns:
138  /// - Filename
139  /// - Status
140  /// - Owner
141  /// You must create a static control in the resources delimitating the region of the list control and
142  /// pass the control ID of it.
143  /// \note DestroyFileStatusListControl must be called when handling WM_DESTROY in WindowProc
144  /// \warning This function is not thread-safe.
146  HWND in_hWndParent, ///< The parent dialog to create the list control
147  UINT in_idStatic, ///< The ID of the placeholder static control, which will also be the ID of the list control after the creation
148  const WCHAR** in_ppFilenameList, ///< The list of files to show in the list
149  unsigned int in_uiFilenameListCount ///< the number of files in the in_ppFilenameList array
150  ) = 0;
151 
152  /// Retrieve if the current operation was marked as to be cancelled.
153  /// \return True if the user requested to cancel the current operation.
154  virtual bool IsCancelRequested() const = 0;
155  };
156  }
157 }
158 
159 #endif // _AK_WWISE_ISOURCECONTROLUTILITIES_H
Audiokinetic namespace.
#define NULL
Definition: AkTypes.h:46
virtual bool ShowBrowseForFolderDialog(LPCWSTR in_pszDialogTitle, LPWSTR out_pszChoosenPath, UINT in_uiChoosenPathSize, LPCWSTR in_pszRootPath=NULL)=0
virtual void GetMoveRootPath(LPCWSTR in_pszFullPath, LPWSTR out_pszRootPath, UINT in_uiRootPathSize)=0
virtual ISourceControlOperationProgress * GetProgressDialog()=0
virtual int PromptMessage(HWND in_hWnd, LPCWSTR in_pszText, LPCWSTR in_pszCaption, LPWSTR out_pszInput, UINT in_uiInputSize, bool in_bIsPassword)=0
virtual void CreateFileStatusListControl(HWND in_hWndParent, UINT in_idStatic, const WCHAR **in_ppFilenameList, unsigned int in_uiFilenameListCount)=0
virtual void SetUserPreferenceDword(LPCWSTR in_pszPreference, DWORD in_dwValue)=0
virtual void GetUserPreferenceDword(LPCWSTR in_pszPreference, DWORD &io_dwValue)=0
virtual void GetUserPreferenceString(LPCWSTR in_pszPreference, LPWSTR io_pszValue, DWORD in_dwSize)=0
virtual INT_PTR CreateModalCustomDialog(ISourceControlDialogBase *in_pDialog)=0
virtual void SetUserPreferenceString(LPCWSTR in_pszPreference, LPCWSTR in_pszValue)=0
virtual bool IsCancelRequested() const =0
virtual int MessageBox(HWND in_hWnd, LPCWSTR in_pszText, LPCWSTR in_pszCaption, UINT in_uiType)=0

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise