31 #include "awt_Toolkit.h"
32 #include "Hashtable.h"
33
34 #include "java_awt_Frame.h"
35 #include "sun_awt_windows_WFramePeer.h"
36
37
38 /************************************************************************
39 * AwtFrame class
40 */
41
42 #define AWT_FRAME_WINDOW_CLASS_NAME TEXT("SunAwtFrame")
43
44
45 class AwtFrame : public AwtWindow {
46 public:
47 enum FrameExecIds {
48 FRAME_SETMENUBAR
49 };
50
51 /* java.awt.Frame fields and method IDs */
52 static jfieldID undecoratedID;
53
54 /* sun.awt.windows.WEmbeddedFrame fields and method IDs */
55 static jfieldID handleID;
56
57 static jmethodID setExtendedStateMID;
58 static jmethodID getExtendedStateMID;
59
60 /* method id for WEmbeddedFrame.requestActivate() method */
61 static jmethodID activateEmbeddingTopLevelMID;
62
63 AwtFrame();
64 virtual ~AwtFrame();
65
66 virtual void Dispose();
67
68 virtual LPCTSTR GetClassName();
69
70 /* Create a new AwtFrame. This must be run on the main thread. */
127 void SetMaximizedBounds(int x, int y, int w, int h);
128 void ClearMaximizedBounds();
129
130 // returns true if the frame is inputmethod window
131 INLINE BOOL isInputMethodWindow() { return m_isInputMethodWindow; }
132 // adjusts the IME candidate window position if needed
133 void AdjustCandidateWindowPos();
134
135 // invoked on Toolkit thread
136 static jobject _GetBoundsPrivate(void *param);
137
138 // some methods called on Toolkit thread
139 static void _SetState(void *param);
140 static jint _GetState(void *param);
141 static void _SetMaximizedBounds(void *param);
142 static void _ClearMaximizedBounds(void *param);
143 static void _SetMenuBar(void *param);
144 static void _SetIMMOption(void *param);
145 static void _SynthesizeWmActivate(void *param);
146 static void _NotifyModalBlocked(void *param);
147
148 virtual void Reshape(int x, int y, int width, int height);
149
150 virtual BOOL AwtSetActiveWindow(BOOL isMouseEventCause = FALSE, UINT hittest = HTCLIENT);
151
152 void CheckRetainActualFocusedWindow(HWND activatedOpositeHWnd);
153 BOOL CheckActivateActualFocusedWindow(HWND deactivatedOpositeHWnd);
154
155 INLINE HWND GetImeTargetComponent() { return m_imeTargetComponent; }
156 INLINE void SetImeTargetComponent(HWND hwnd) { m_imeTargetComponent = hwnd; }
157
158 protected:
159 /* The frame is undecorated. */
160 BOOL m_isUndecorated;
161
162 private:
163 LRESULT ProxyWindowProc(UINT message, WPARAM wParam, LPARAM lParam, MsgRouting &mr);
164
165 /* The frame's embedding parent (if any) */
166 HWND m_parentWnd;
|
31 #include "awt_Toolkit.h"
32 #include "Hashtable.h"
33
34 #include "java_awt_Frame.h"
35 #include "sun_awt_windows_WFramePeer.h"
36
37
38 /************************************************************************
39 * AwtFrame class
40 */
41
42 #define AWT_FRAME_WINDOW_CLASS_NAME TEXT("SunAwtFrame")
43
44
45 class AwtFrame : public AwtWindow {
46 public:
47 enum FrameExecIds {
48 FRAME_SETMENUBAR
49 };
50
51 static AwtFrame* sm_lwFrameUnderMouse;
52
53 /* java.awt.Frame fields and method IDs */
54 static jfieldID undecoratedID;
55
56 /* sun.awt.windows.WEmbeddedFrame fields and method IDs */
57 static jfieldID handleID;
58
59 static jmethodID setExtendedStateMID;
60 static jmethodID getExtendedStateMID;
61
62 /* method id for WEmbeddedFrame.requestActivate() method */
63 static jmethodID activateEmbeddingTopLevelMID;
64
65 AwtFrame();
66 virtual ~AwtFrame();
67
68 virtual void Dispose();
69
70 virtual LPCTSTR GetClassName();
71
72 /* Create a new AwtFrame. This must be run on the main thread. */
129 void SetMaximizedBounds(int x, int y, int w, int h);
130 void ClearMaximizedBounds();
131
132 // returns true if the frame is inputmethod window
133 INLINE BOOL isInputMethodWindow() { return m_isInputMethodWindow; }
134 // adjusts the IME candidate window position if needed
135 void AdjustCandidateWindowPos();
136
137 // invoked on Toolkit thread
138 static jobject _GetBoundsPrivate(void *param);
139
140 // some methods called on Toolkit thread
141 static void _SetState(void *param);
142 static jint _GetState(void *param);
143 static void _SetMaximizedBounds(void *param);
144 static void _ClearMaximizedBounds(void *param);
145 static void _SetMenuBar(void *param);
146 static void _SetIMMOption(void *param);
147 static void _SynthesizeWmActivate(void *param);
148 static void _NotifyModalBlocked(void *param);
149 static void _SetLwFrameUnderMouse(void* param);
150
151 virtual void Reshape(int x, int y, int width, int height);
152
153 virtual BOOL AwtSetActiveWindow(BOOL isMouseEventCause = FALSE, UINT hittest = HTCLIENT);
154
155 void CheckRetainActualFocusedWindow(HWND activatedOpositeHWnd);
156 BOOL CheckActivateActualFocusedWindow(HWND deactivatedOpositeHWnd);
157
158 INLINE HWND GetImeTargetComponent() { return m_imeTargetComponent; }
159 INLINE void SetImeTargetComponent(HWND hwnd) { m_imeTargetComponent = hwnd; }
160
161 protected:
162 /* The frame is undecorated. */
163 BOOL m_isUndecorated;
164
165 private:
166 LRESULT ProxyWindowProc(UINT message, WPARAM wParam, LPARAM lParam, MsgRouting &mr);
167
168 /* The frame's embedding parent (if any) */
169 HWND m_parentWnd;
|