src/windows/native/sun/windows/awt_Window.h

Print this page




 126         return FALSE;
 127     }
 128 
 129     virtual void Invalidate(RECT* r);
 130     virtual void Show();
 131     virtual void SetResizable(BOOL isResizable);
 132     BOOL IsResizable();
 133     virtual void RecalcNonClient();
 134     virtual void RedrawNonClient();
 135     virtual int  GetScreenImOn();
 136     virtual void CheckIfOnNewScreen();
 137     virtual void Grab();
 138     virtual void Ungrab();
 139     virtual void Ungrab(BOOL doPost);
 140     virtual void SetIconData(JNIEnv* env, jintArray iconData, jint w, jint h,
 141                              jintArray smallIconData, jint smw, jint smh);
 142     virtual void DoUpdateIcon();
 143     INLINE HICON GetHIcon() {return m_hIcon;};
 144     INLINE HICON GetHIconSm() {return m_hIconSm;};
 145     INLINE BOOL IsIconInherited() {return m_iconInherited;};

 146 
 147     /* Post events to the EventQueue */
 148     void SendComponentEvent(jint eventId);
 149     void SendWindowEvent(jint id, HWND opposite = NULL,
 150                          jint oldState = 0, jint newState = 0);
 151 
 152     BOOL IsFocusableWindow();
 153 
 154     /* some helper methods about blocking windows by modal dialogs */
 155     INLINE static HWND GetModalBlocker(HWND window) {
 156         return reinterpret_cast<HWND>(::GetProp(window, ModalBlockerProp));
 157     }
 158     static void SetModalBlocker(HWND window, HWND blocker);
 159     static void SetAndActivateModalBlocker(HWND window, HWND blocker);
 160 
 161     static HWND GetTopmostModalBlocker(HWND window);
 162 
 163     /*
 164      * Windows message handler functions
 165      */


 176     virtual MsgRouting WmSettingChange(UINT wFlag, LPCTSTR pszSection);
 177     virtual MsgRouting WmNcCalcSize(BOOL fCalcValidRects,
 178                                     LPNCCALCSIZE_PARAMS lpncsp, LRESULT& retVal);
 179     virtual MsgRouting WmNcHitTest(UINT x, UINT y, LRESULT& retVal);
 180     virtual MsgRouting WmNcMouseDown(WPARAM hitTest, int x, int y, int button);
 181     virtual MsgRouting WmGetIcon(WPARAM iconType, LRESULT& retVal);
 182     virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
 183     virtual MsgRouting WmWindowPosChanging(LPARAM windowPos);
 184     virtual MsgRouting WmWindowPosChanged(LPARAM windowPos);
 185     virtual MsgRouting WmTimer(UINT_PTR timerID);
 186 
 187     virtual MsgRouting HandleEvent(MSG *msg, BOOL synthetic);
 188     virtual void WindowResized();
 189 
 190     static jboolean _RequestWindowFocus(void *param);
 191 
 192     virtual BOOL AwtSetActiveWindow(BOOL isMouseEventCause = FALSE, UINT hittest = HTCLIENT);
 193 
 194     // Execute on Toolkit only.
 195     INLINE static LRESULT SynthesizeWmActivate(BOOL doActivate, HWND targetHWnd, HWND oppositeHWnd) {

 196         if (doActivate &&
 197             (!::IsWindowVisible(targetHWnd) || ::IsIconic(::GetAncestor(targetHWnd, GA_ROOT))))

 198         {
 199             // The activation is rejected if either:
 200             // - The toplevel is not visible
 201             // - The toplevel (or its embedder) is minimised
 202             return 1;
 203         }
 204         return ::SendMessage(targetHWnd, WM_ACTIVATE,
 205                              MAKEWPARAM(doActivate ? WA_ACTIVE : WA_INACTIVE, FALSE),
 206                              (LPARAM) oppositeHWnd);
 207     }
 208 
 209     void moveToDefaultLocation(); /* moves Window to X,Y specified by Window Manger */
 210 
 211     void UpdateWindow(JNIEnv* env, jintArray data, int width, int height,
 212                       HBITMAP hNewBitmap = NULL);
 213 
 214     INLINE virtual BOOL IsTopLevel() { return TRUE; }
 215     static AwtWindow * GetGrabbedWindow() { return m_grabbedWindow; }
 216 
 217     static void FlashWindowEx(HWND hWnd, UINT count, DWORD timeout, DWORD flags);




 126         return FALSE;
 127     }
 128 
 129     virtual void Invalidate(RECT* r);
 130     virtual void Show();
 131     virtual void SetResizable(BOOL isResizable);
 132     BOOL IsResizable();
 133     virtual void RecalcNonClient();
 134     virtual void RedrawNonClient();
 135     virtual int  GetScreenImOn();
 136     virtual void CheckIfOnNewScreen();
 137     virtual void Grab();
 138     virtual void Ungrab();
 139     virtual void Ungrab(BOOL doPost);
 140     virtual void SetIconData(JNIEnv* env, jintArray iconData, jint w, jint h,
 141                              jintArray smallIconData, jint smw, jint smh);
 142     virtual void DoUpdateIcon();
 143     INLINE HICON GetHIcon() {return m_hIcon;};
 144     INLINE HICON GetHIconSm() {return m_hIconSm;};
 145     INLINE BOOL IsIconInherited() {return m_iconInherited;};
 146     INLINE virtual BOOL IsLightweightFrame() {return FALSE;}
 147 
 148     /* Post events to the EventQueue */
 149     void SendComponentEvent(jint eventId);
 150     void SendWindowEvent(jint id, HWND opposite = NULL,
 151                          jint oldState = 0, jint newState = 0);
 152 
 153     BOOL IsFocusableWindow();
 154 
 155     /* some helper methods about blocking windows by modal dialogs */
 156     INLINE static HWND GetModalBlocker(HWND window) {
 157         return reinterpret_cast<HWND>(::GetProp(window, ModalBlockerProp));
 158     }
 159     static void SetModalBlocker(HWND window, HWND blocker);
 160     static void SetAndActivateModalBlocker(HWND window, HWND blocker);
 161 
 162     static HWND GetTopmostModalBlocker(HWND window);
 163 
 164     /*
 165      * Windows message handler functions
 166      */


 177     virtual MsgRouting WmSettingChange(UINT wFlag, LPCTSTR pszSection);
 178     virtual MsgRouting WmNcCalcSize(BOOL fCalcValidRects,
 179                                     LPNCCALCSIZE_PARAMS lpncsp, LRESULT& retVal);
 180     virtual MsgRouting WmNcHitTest(UINT x, UINT y, LRESULT& retVal);
 181     virtual MsgRouting WmNcMouseDown(WPARAM hitTest, int x, int y, int button);
 182     virtual MsgRouting WmGetIcon(WPARAM iconType, LRESULT& retVal);
 183     virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
 184     virtual MsgRouting WmWindowPosChanging(LPARAM windowPos);
 185     virtual MsgRouting WmWindowPosChanged(LPARAM windowPos);
 186     virtual MsgRouting WmTimer(UINT_PTR timerID);
 187 
 188     virtual MsgRouting HandleEvent(MSG *msg, BOOL synthetic);
 189     virtual void WindowResized();
 190 
 191     static jboolean _RequestWindowFocus(void *param);
 192 
 193     virtual BOOL AwtSetActiveWindow(BOOL isMouseEventCause = FALSE, UINT hittest = HTCLIENT);
 194 
 195     // Execute on Toolkit only.
 196     INLINE static LRESULT SynthesizeWmActivate(BOOL doActivate, HWND targetHWnd, HWND oppositeHWnd) {
 197         AwtWindow *win = static_cast<AwtWindow*>(AwtComponent::GetComponent(targetHWnd));
 198         if (doActivate &&
 199             (!::IsWindowVisible(targetHWnd) || ::IsIconic(::GetAncestor(targetHWnd, GA_ROOT))) &&
 200             (win == NULL || !win->IsLightweightFrame()))
 201         {
 202             // The activation is rejected if either:
 203             // - The toplevel is not visible
 204             // - The toplevel (or its embedder) is minimised
 205             return 1;
 206         }
 207         return ::SendMessage(targetHWnd, WM_ACTIVATE,
 208                              MAKEWPARAM(doActivate ? WA_ACTIVE : WA_INACTIVE, FALSE),
 209                              (LPARAM) oppositeHWnd);
 210     }
 211 
 212     void moveToDefaultLocation(); /* moves Window to X,Y specified by Window Manger */
 213 
 214     void UpdateWindow(JNIEnv* env, jintArray data, int width, int height,
 215                       HBITMAP hNewBitmap = NULL);
 216 
 217     INLINE virtual BOOL IsTopLevel() { return TRUE; }
 218     static AwtWindow * GetGrabbedWindow() { return m_grabbedWindow; }
 219 
 220     static void FlashWindowEx(HWND hWnd, UINT count, DWORD timeout, DWORD flags);