soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SRealWndHandler-i.h
Go to the documentation of this file.
1/**
2 * @file SRealWndHandler-i.h
3 * @brief Interface for handling real window creation and destruction.
4 * @version v1.0
5 * @author SOUI group
6 * @date 2014/08/14
7 *
8 * This file provides the interface for managing the creation, destruction, and
9 * initialization of real windows.
10 */
11
12#ifndef __SREALWNDHANDLER_I__H__
13#define __SREALWNDHANDLER_I__H__
14#include <interface/obj-ref-i.h>
15
16SNSBEGIN
17
18interface IWindow;
19
20/**
21 * @interface IRealWndHandler
22 * @brief Interface for handling real window operations.
23 *
24 * This interface defines methods for creating, destroying, initializing, and
25 * managing the position of real windows.
26 */
27#undef INTERFACE
28#define INTERFACE IRealWndHandler
29DECLARE_INTERFACE_(IRealWndHandler, IObjRef)
30{
31 /**
32 * @brief Increment the reference count.
33 * @return long - Current reference count.
34 */
35 STDMETHOD_(long, AddRef)(THIS) PURE;
36
37 /**
38 * @brief Decrement the reference count.
39 * @return long - Current reference count.
40 */
41 STDMETHOD_(long, Release)(THIS) PURE;
42
43 /**
44 * @brief Final release of the object.
45 */
46 STDMETHOD_(void, OnFinalRelease)(THIS) PURE;
47
48 /**
49 * @brief Create a real window.
50 * @param pRealWnd - Pointer to the window interface.
51 * @return HWND - Handle to the created window.
52 *
53 * This method is called when a real window is created.
54 */
55 STDMETHOD_(HWND, OnRealWndCreate)(THIS_ IWindow * pRealWnd) PURE;
56
57 /**
58 * @brief Destroy a real window.
59 * @param pRealWnd - Pointer to the window interface.
60 *
61 * This method is called when a real window is destroyed.
62 */
63 STDMETHOD_(void, OnRealWndDestroy)(THIS_ IWindow * pRealWnd) PURE;
64
65 /**
66 * @brief Initialize a real window.
67 * @param pRealWnd - Pointer to the window interface.
68 * @return BOOL - FALSE if the system should handle the initialization, TRUE if the user should handle it.
69 *
70 * This method is called to initialize a real window.
71 */
72 STDMETHOD_(BOOL, OnRealWndInit)(THIS_ IWindow * pRealWnd) PURE;
73
74 /**
75 * @brief Adjust the position of a real window.
76 * @param pRealWnd - Pointer to the window interface.
77 * @param rcWnd - New position and size of the window.
78 * @return BOOL - FALSE if SOUI should handle the position adjustment, TRUE if the user should manage it.
79 *
80 * This method is called to adjust the position and size of a real window.
81 */
82 STDMETHOD_(BOOL, OnRealWndPosition)(THIS_ IWindow * pRealWnd, const RECT *rcWnd) PURE;
83};
84
85SNSEND
86#endif // __SREALWNDHANDLER_I__H__
Interface for reference counting.
Definition obj-ref-i.h:19
Interface for handling real window operations.
long Release() PURE
Decrement the reference count.
void OnFinalRelease() PURE
Final release of the object.
BOOL OnRealWndPosition(IWindow *pRealWnd, const RECT *rcWnd) PURE
Adjust the position of a real window.
HWND OnRealWndCreate(IWindow *pRealWnd) PURE
Create a real window.
long AddRef() PURE
Increment the reference count.
void OnRealWndDestroy(IWindow *pRealWnd) PURE
Destroy a real window.
BOOL OnRealWndInit(IWindow *pRealWnd) PURE
Initialize a real window.