summaryrefslogtreecommitdiffhomepage
path: root/Kernel/NewKit/ApplicationInterface.hxx
blob: 31da9aa3e691a24d9c8f613a172e05e0e2b98030 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* -------------------------------------------

	Copyright ZKA Technologies

------------------------------------------- */

#pragma once

///
/// @brief Application object, given by the OS to the process. interact with the OS.
/// @file ApplicationInterface.hxx
/// @author Amlal EL Mahrouss
///

#include <NewKit/Defines.hpp>
#include <CFKit/GUIDWrapper.hpp>

/// \brief Application Interface.
/// \author Amlal El Mahrouss
typedef struct _ApplicationInterface final
{
	/// @brief Releases the object exit the process on main object.
	Kernel::Void (*Release)(struct _Application* Self, Kernel::Int32 ExitCode);
	/// @brief Invoke a function from the application object.
	Kernel::IntPtr (*Invoke)(struct _Application* Self, Kernel::Int32 Sel, ...);
	/// @brief Query a new application object from a GUID.
	/// @note this doesn't query a process, it query a registered object withtin that app.
	Kernel::Void (*Query)(struct _Application* Self, Kernel::VoidPtr* Dst, Kernel::SizeT SzDst, Kernel::XRN::GUIDSequence GuidOf);
} ApplicationInterface, *ApplicationInterfaceRef;

#define app_cast reinterpret_cast<ApplicationInterfaceRef>