electron/atom/browser/ui/message_box.h

43 lines
1.2 KiB
C
Raw Normal View History

// Copyright (c) 2013 GitHub, Inc.
2014-04-25 09:49:37 +00:00
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
2014-03-16 00:58:59 +00:00
#ifndef ATOM_BROWSER_UI_MESSAGE_BOX_H_
#define ATOM_BROWSER_UI_MESSAGE_BOX_H_
#include <string>
#include <vector>
#include "base/callback_forward.h"
namespace atom {
2013-06-07 07:59:12 +00:00
class NativeWindow;
enum MessageBoxType {
MESSAGE_BOX_TYPE_NONE = 0,
MESSAGE_BOX_TYPE_INFORMATION,
MESSAGE_BOX_TYPE_WARNING
};
2013-09-23 09:27:32 +00:00
typedef base::Callback<void(int code)> MessageBoxCallback;
2013-06-07 07:59:12 +00:00
int ShowMessageBox(NativeWindow* parent_window,
MessageBoxType type,
const std::vector<std::string>& buttons,
const std::string& title,
const std::string& message,
const std::string& detail);
void ShowMessageBox(NativeWindow* parent_window,
MessageBoxType type,
const std::vector<std::string>& buttons,
const std::string& title,
const std::string& message,
const std::string& detail,
const MessageBoxCallback& callback);
} // namespace atom
2014-03-16 00:58:59 +00:00
#endif // ATOM_BROWSER_UI_MESSAGE_BOX_H_