src/video/windows/SDL_windowswindow.c
changeset 6430 48d519500f7e
parent 6428 0028fa91dfc6
child 6523 62d0193a7a02
     1.1 --- a/src/video/windows/SDL_windowswindow.c	Fri Sep 14 18:18:38 2012 -0400
     1.2 +++ b/src/video/windows/SDL_windowswindow.c	Sat Sep 15 10:59:39 2012 -0400
     1.3 @@ -324,10 +324,7 @@
     1.4          }
     1.5          SDL_FreeSurface(surface);
     1.6  
     1.7 -/* TODO: create the icon in WinCE (CreateIconFromResource isn't available) */
     1.8 -#ifndef _WIN32_WCE
     1.9          hicon = CreateIconFromResource(icon_bmp, icon_len, TRUE, 0x00030000);
    1.10 -#endif
    1.11      }
    1.12      SDL_RWclose(dst);
    1.13      SDL_stack_free(icon_bmp);
    1.14 @@ -361,11 +358,7 @@
    1.15      rect.top = 0;
    1.16      rect.right = window->w;
    1.17      rect.bottom = window->h;
    1.18 -#ifdef _WIN32_WCE
    1.19 -    menu = FALSE;
    1.20 -#else
    1.21      menu = (style & WS_CHILDWINDOW) ? FALSE : (GetMenu(hwnd) != NULL);
    1.22 -#endif
    1.23      AdjustWindowRectEx(&rect, style, menu, 0);
    1.24      w = (rect.right - rect.left);
    1.25      h = (rect.bottom - rect.top);
    1.26 @@ -387,56 +380,18 @@
    1.27      WIN_SetWindowPositionInternal(_this, window, SWP_NOCOPYBITS | SWP_NOMOVE);
    1.28  }
    1.29  
    1.30 -#ifdef _WIN32_WCE
    1.31 -void WINCE_ShowWindow(_THIS, SDL_Window* window, int visible)
    1.32 -{
    1.33 -    SDL_WindowData* windowdata = (SDL_WindowData*) window->driverdata;
    1.34 -    SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
    1.35 -
    1.36 -    if(visible) {
    1.37 -        if(window->flags & SDL_WINDOW_FULLSCREEN) {
    1.38 -            if(videodata->SHFullScreen)
    1.39 -                videodata->SHFullScreen(windowdata->hwnd, SHFS_HIDETASKBAR | SHFS_HIDESTARTICON | SHFS_HIDESIPBUTTON);
    1.40 -
    1.41 -            ShowWindow(FindWindow(TEXT("HHTaskBar"), NULL), SW_HIDE);
    1.42 -        }
    1.43 -
    1.44 -        ShowWindow(windowdata->hwnd, SW_SHOW);
    1.45 -        SetForegroundWindow(windowdata->hwnd);
    1.46 -    } else {
    1.47 -        ShowWindow(windowdata->hwnd, SW_HIDE);
    1.48 -
    1.49 -        if(window->flags & SDL_WINDOW_FULLSCREEN) {
    1.50 -            if(videodata->SHFullScreen)
    1.51 -                videodata->SHFullScreen(windowdata->hwnd, SHFS_SHOWTASKBAR | SHFS_SHOWSTARTICON | SHFS_SHOWSIPBUTTON);
    1.52 -
    1.53 -            ShowWindow(FindWindow(TEXT("HHTaskBar"), NULL), SW_SHOW);
    1.54 -
    1.55 -        }
    1.56 -    }
    1.57 -}
    1.58 -#endif /* _WIN32_WCE */
    1.59 -
    1.60  void
    1.61  WIN_ShowWindow(_THIS, SDL_Window * window)
    1.62  {
    1.63 -#ifdef _WIN32_WCE
    1.64 -    WINCE_ShowWindow(_this, window, 1);
    1.65 -#else
    1.66      HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
    1.67      ShowWindow(hwnd, SW_SHOW);
    1.68 -#endif
    1.69  }
    1.70  
    1.71  void
    1.72  WIN_HideWindow(_THIS, SDL_Window * window)
    1.73  {
    1.74 -#ifdef _WIN32_WCE
    1.75 -    WINCE_ShowWindow(_this, window, 0);
    1.76 -#else
    1.77      HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
    1.78      ShowWindow(hwnd, SW_HIDE);
    1.79 -#endif
    1.80  }
    1.81  
    1.82  void
    1.83 @@ -457,14 +412,6 @@
    1.84  WIN_MaximizeWindow(_THIS, SDL_Window * window)
    1.85  {
    1.86      HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
    1.87 -
    1.88 -#ifdef _WIN32_WCE
    1.89 -    if((window->flags & SDL_WINDOW_FULLSCREEN) && videodata->SHFullScreen) {
    1.90 -        SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
    1.91 -        videodata->SHFullScreen(hwnd, SHFS_HIDETASKBAR | SHFS_HIDESTARTICON | SHFS_HIDESIPBUTTON);
    1.92 -    }
    1.93 -#endif
    1.94 -
    1.95      ShowWindow(hwnd, SW_MAXIMIZE);
    1.96  }
    1.97  
    1.98 @@ -472,15 +419,7 @@
    1.99  WIN_MinimizeWindow(_THIS, SDL_Window * window)
   1.100  {
   1.101      HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
   1.102 -
   1.103      ShowWindow(hwnd, SW_MINIMIZE);
   1.104 -
   1.105 -#ifdef _WIN32_WCE
   1.106 -    if((window->flags & SDL_WINDOW_FULLSCREEN) && videodata->SHFullScreen) {
   1.107 -        SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
   1.108 -        videodata->SHFullScreen(hwnd, SHFS_SHOWTASKBAR | SHFS_SHOWSTARTICON | SHFS_SHOWSIPBUTTON);
   1.109 -    }
   1.110 -#endif
   1.111  }
   1.112  
   1.113  void
   1.114 @@ -543,11 +482,7 @@
   1.115          rect.top = 0;
   1.116          rect.right = window->windowed.w;
   1.117          rect.bottom = window->windowed.h;
   1.118 -#ifdef _WIN32_WCE
   1.119 -        menu = FALSE;
   1.120 -#else
   1.121          menu = (style & WS_CHILDWINDOW) ? FALSE : (GetMenu(hwnd) != NULL);
   1.122 -#endif
   1.123          AdjustWindowRectEx(&rect, style, menu, 0);
   1.124          w = (rect.right - rect.left);
   1.125          h = (rect.bottom - rect.top);
   1.126 @@ -561,10 +496,6 @@
   1.127  int
   1.128  WIN_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
   1.129  {
   1.130 -#ifdef _WIN32_WCE
   1.131 -    SDL_Unsupported();
   1.132 -    return -1;
   1.133 -#else
   1.134      SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
   1.135      SDL_DisplayData *data = (SDL_DisplayData *) display->driverdata;
   1.136      HDC hdc;
   1.137 @@ -579,16 +510,11 @@
   1.138          DeleteDC(hdc);
   1.139      }
   1.140      return succeeded ? 0 : -1;
   1.141 -#endif
   1.142  }
   1.143  
   1.144  int
   1.145  WIN_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp)
   1.146  {
   1.147 -#ifdef _WIN32_WCE
   1.148 -    SDL_Unsupported();
   1.149 -    return -1;
   1.150 -#else
   1.151      SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
   1.152      SDL_DisplayData *data = (SDL_DisplayData *) display->driverdata;
   1.153      HDC hdc;
   1.154 @@ -603,7 +529,6 @@
   1.155          DeleteDC(hdc);
   1.156      }
   1.157      return succeeded ? 0 : -1;
   1.158 -#endif
   1.159  }
   1.160  
   1.161  void
   1.162 @@ -629,9 +554,6 @@
   1.163      SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
   1.164  
   1.165      if (data) {
   1.166 -#ifdef _WIN32_WCE
   1.167 -        WINCE_ShowWindow(_this, window, 0);
   1.168 -#endif
   1.169          ReleaseDC(data->hwnd, data->hdc);
   1.170          if (data->created) {
   1.171              DestroyWindow(data->hwnd);
   1.172 @@ -675,7 +597,6 @@
   1.173  {
   1.174      HINSTANCE hInstance = GetModuleHandle(NULL);
   1.175      WNDCLASS wce;
   1.176 -    HWND hWndParent = NULL;
   1.177  
   1.178      /* Make sure window isn't created twice. */
   1.179      if (SDL_HelperWindow != NULL) {
   1.180 @@ -695,17 +616,12 @@
   1.181          return -1;
   1.182      }
   1.183  
   1.184 -#ifndef _WIN32_WCE
   1.185 -    /* WinCE doesn't have HWND_MESSAGE */
   1.186 -    hWndParent = HWND_MESSAGE;
   1.187 -#endif
   1.188 -
   1.189      /* Create the window. */
   1.190      SDL_HelperWindow = CreateWindowEx(0, SDL_HelperWindowClassName,
   1.191                                        SDL_HelperWindowName,
   1.192                                        WS_OVERLAPPED, CW_USEDEFAULT,
   1.193                                        CW_USEDEFAULT, CW_USEDEFAULT,
   1.194 -                                      CW_USEDEFAULT, hWndParent, NULL,
   1.195 +                                      CW_USEDEFAULT, HWND_MESSAGE, NULL,
   1.196                                        hInstance, NULL);
   1.197      if (SDL_HelperWindow == NULL) {
   1.198          UnregisterClass(SDL_HelperWindowClassName, hInstance);