Changeset 3902

Show
Ignore:
Timestamp:
10/12/05 21:58:53 (3 years ago)
Author:
horiguti
Message:

Make it possible to compile on old versions of VC, maybe.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/ChangeLog.Meadow

    r3901 r3902  
     12005-10-12  Kyotaro HORIGUCHI  <horiguti@meadowy.org> 
     2 
     3        * mw32term.h(SETLAYEREDWINDOWATTRPROC): New typedef. 
     4        (WS_EX_LAYERED): New constant for Win32 API. 
     5        (LWA_ALPHA): New constant for Win32 API. 
     6 
     7        * mw32term.c: Remove include windows.h. 
     8        (mw32_initialize): Setup SetLayeredWindowAttributes() of 
     9        user32.dll. 
     10 
     11        * mw32fns.c: Remove include windows.h. 
     12        (mw32_set_frame_alpha): Return if SetLayeredWindowAttributes 
     13        cannot be used. 
     14 
    1152005-10-12  Kyotaro HORIGUCHI  <horiguti@meadowy.org> 
    216 
  • trunk/src/mw32fns.c

    r3900 r3902  
    2121 
    2222/* MW32 implementation by MIYASHITA Hisashi <himi@meadowy.org> */ 
    23  
    24 /* This is included to use SetLayeredWindowAttributes() */ 
    25 #define _WIN32_WINNT 0x0500 
    26 #include <windows.h> 
    2723 
    2824#include <config.h> 
     
    934930/* defined in mw32term.c */ 
    935931extern void mw32_update_frame_alpha (struct frame *f, int change_style); 
     932extern SETLAYEREDWINDOWATTRPROC SetLayeredWindowAttributes; 
    936933 
    937934static void 
     
    941938  int newalpha_active, newalpha_inactive, newalpha_moving, newalpha; 
    942939  int obj; 
     940 
     941  if (SetLayeredWindowAttributes == NULL) 
     942    return; 
    943943 
    944944  if (NILP (arg)) 
  • trunk/src/mw32term.c

    r3901 r3902  
    3939 
    4040#include <stdio.h> 
    41  
    42 /* This is included to use SetLayeredWindowAttributes() */ 
    43 #define _WIN32_WINNT 0x0500 
    44 #include <windows.h> 
    45 #ifdef WHEEL_PAGESCROLL 
    46 #undef WHEEL_PAGESCROLL 
    47 #endif 
    4841 
    4942#include "lisp.h" 
     
    230223/* last_mouse_motion_message describes the mouse movement last time.  */ 
    231224static MSG last_mouse_motion_message; 
     225 
     226/* Layered Window */ 
     227SETLAYEREDWINDOWATTRPROC SetLayeredWindowAttributes = NULL; 
    232228 
    233229/* Incremented by XTread_socket whenever it really tries to read 
     
    61076103  int argc = 0; 
    61086104  char** argv = 0; 
     6105  HMODULE hUser32; 
    61096106 
    61106107  rif = &mw32_redisplay_interface; 
     
    61896186      = (TrackMouseEvent_Proc) GetProcAddress (user32_lib, "TrackMouseEvent"); 
    61906187  } 
     6188 
     6189  /* Layered Window */ 
     6190  if (hUser32 = LoadLibrary ("USER32.DLL")) 
     6191    { 
     6192      SetLayeredWindowAttributes = (SETLAYEREDWINDOWATTRPROC) 
     6193        GetProcAddress (hUser32, "SetLayeredWindowAttributes"); 
     6194    } 
    61916195} 
    61926196 
  • trunk/src/mw32term.h

    r3899 r3902  
    11611161#define FONT_TYPE_FOR_MULTIBYTE(font, ch) (FONT_TYPE_UNKNOWN) 
    11621162 
     1163/* Layered Window */ 
     1164typedef BOOL (WINAPI *SETLAYEREDWINDOWATTRPROC)(HWND, COLORREF, BYTE, DWORD); 
     1165#define WS_EX_LAYERED   0x00080000 
     1166#define LWA_ALPHA       2 
     1167 
    11631168#endif /* not _MW32TERM_H_ */