X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Ftoolbar-msw.c;h=07baead187858a602fdd9e4dc39b46ba05dcb282;hb=b9cf241d97711549ddfe1b5ecb3431e6222fad8f;hp=5a4acfd7c412750260f974b79c133e73d31c8e0e;hpb=ea1ea793fe6e244ef5555ed983423a204101af13;p=chise%2Fxemacs-chise.git diff --git a/src/toolbar-msw.c b/src/toolbar-msw.c index 5a4acfd..07baead 100644 --- a/src/toolbar-msw.c +++ b/src/toolbar-msw.c @@ -46,15 +46,7 @@ Boston, MA 02111-1307, USA. */ #define TOOLBAR_ID_BIAS 16 #define TOOLBAR_HANDLE(f,p) \ GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS + p) -#ifndef TB_SETIMAGELIST -#define TB_SETIMAGELIST (WM_USER + 48) -#define TB_GETIMAGELIST (WM_USER + 49) -#define TB_SETDISABLEDIMAGELIST (WM_USER + 54) -#define TB_GETDISABLEDIMAGELIST (WM_USER + 55) -#endif -#ifndef TB_SETPADDING -#define TB_SETPADDING (WM_USER + 87) -#endif + #define MSWINDOWS_BUTTON_SHADOW_THICKNESS 2 #define MSWINDOWS_BLANK_SIZE 5 #define MSWINDOWS_MINIMUM_TOOLBAR_SIZE 8 @@ -131,7 +123,7 @@ mswindows_clear_toolbar (struct frame *f, enum toolbar_pos pos, ShowWindow(toolbarwnd, SW_HIDE); } - FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos)=0; + FRAME_MSWINDOWS_TOOLBAR_CHECKSUM (f, pos) = 0; SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 0); } @@ -223,7 +215,7 @@ mswindows_output_toolbar (struct frame *f, enum toolbar_pos pos) /* remove the old one */ mswindows_clear_toolbar (f, pos, 0); - FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos)=checksum; + FRAME_MSWINDOWS_TOOLBAR_CHECKSUM (f, pos)=checksum; /* build up the data required by win32 fns. */ button_tbl = xnew_array_and_zero (TBBUTTON, nbuttons); @@ -262,7 +254,7 @@ mswindows_output_toolbar (struct frame *f, enum toolbar_pos pos) if (IMAGE_INSTANCEP (instance)) { - struct Lisp_Image_Instance* p = XIMAGE_INSTANCE (instance); + Lisp_Image_Instance* p = XIMAGE_INSTANCE (instance); if (IMAGE_INSTANCE_PIXMAP_TYPE_P (p)) { @@ -384,10 +376,12 @@ mswindows_output_toolbar (struct frame *f, enum toolbar_pos pos) CreateWindowEx ( WS_EX_WINDOWEDGE, TOOLBARCLASSNAME, NULL, - WS_CHILD | WS_VISIBLE + WS_CHILD | (style_3d ? WS_DLGFRAME : 0) - | TBSTYLE_TOOLTIPS | CCS_NORESIZE - | CCS_NOPARENTALIGN | CCS_NODIVIDER, + | TBSTYLE_TOOLTIPS + | CCS_NORESIZE + | CCS_NOPARENTALIGN | CCS_NODIVIDER + | CCS_ADJUSTABLE, x, y, bar_width, bar_height, FRAME_MSWINDOWS_HANDLE (f), (HMENU)(TOOLBAR_ID_BIAS + pos), @@ -573,9 +567,10 @@ static void mswindows_free_frame_toolbars (struct frame *f) { HWND twnd=NULL; -#define DELETE_TOOLBAR(pos) \ - mswindows_clear_toolbar(f, 0, pos); \ - if ((twnd=GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS + pos))) \ +#define DELETE_TOOLBAR(pos) \ + mswindows_clear_toolbar(f, pos, 0); \ + if ((twnd=GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), \ + TOOLBAR_ID_BIAS + pos))) \ DestroyWindow(twnd) DELETE_TOOLBAR(TOP_TOOLBAR); @@ -586,7 +581,7 @@ mswindows_free_frame_toolbars (struct frame *f) } /* map toolbar hwnd to pos*/ -int mswindows_find_toolbar_pos(struct frame* f, HWND ctrl) +static int mswindows_find_toolbar_pos(struct frame* f, HWND ctrl) { int id = GetDlgCtrlID(ctrl); return id ? id - TOOLBAR_ID_BIAS : -1;