Changeset 4192

Show
Ignore:
Timestamp:
2007年03月14日 21時13分21秒 (1 year ago)
Author:
miyoshi
Message:

* mw32term.h (WM_EMACS_GET_IME_FONT_PROP): Removed.
(WM_EMACS_MODIFY_IME_FONT_PROP): Ditto.
(WM_EMACS_HIDE_TOOLTIP): Packed.
(WM_EMACS_UPDATE_CURSOR): Ditto.

* mw32term.c (get_face_height): Removed.
(mw32_get_ime_font_property): Ditto.
(mw32_process_main_thread_message<WM_EMACS_GET_IME_FONT_PROP>):
Ditto.

* mw32fns.c (get_face_height): New function from `mw32ter.c'.
(mw32_get_ime_font_property): Ditto.
(mw32_WndProc<WM_IME_STARTCOMPOSITION>): Call
mw32_get_ime_font_property().
(mw32_WndProc<WM_EMACS_MODIFY_IME_FONT_PROP>): Removed.

Files:

Legend:

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

    r4190 r4192  
     12007-03-14  MIYOSHI Masanori  <miyoshi@meadowy.org> 
     2 
     3        * mw32term.h (WM_EMACS_GET_IME_FONT_PROP): Removed. 
     4        (WM_EMACS_MODIFY_IME_FONT_PROP): Ditto. 
     5        (WM_EMACS_HIDE_TOOLTIP): Packed. 
     6        (WM_EMACS_UPDATE_CURSOR): Ditto. 
     7 
     8        * mw32term.c (get_face_height): Removed. 
     9        (mw32_get_ime_font_property): Ditto. 
     10        (mw32_process_main_thread_message<WM_EMACS_GET_IME_FONT_PROP>): 
     11        Ditto. 
     12 
     13        * mw32fns.c (get_face_height): New function from `mw32ter.c'. 
     14        (mw32_get_ime_font_property): Ditto. 
     15        (mw32_WndProc<WM_IME_STARTCOMPOSITION>): Call 
     16        mw32_get_ime_font_property(). 
     17        (mw32_WndProc<WM_EMACS_MODIFY_IME_FONT_PROP>): Removed. 
     18 
    1192007-02-10  MIYOSHI Masanori  <miyoshi@meadowy.org> 
    220 
  • trunk/src/mw32fns.c

    r4151 r4192  
    18721872      *width = GetSystemMetrics (SM_CXFULLSCREEN); 
    18731873      *height = GetSystemMetrics (SM_CYFULLSCREEN); 
     1874    } 
     1875} 
     1876 
     1877static Lisp_Object 
     1878get_face_height (Lisp_Object face) 
     1879{ 
     1880  Lisp_Object height = Qnil; 
     1881  extern Lisp_Object QCheight; 
     1882 
     1883  if (!NILP (face) && SYMBOLP (face)) 
     1884    { 
     1885      height = Finternal_get_lisp_face_attribute (face, QCheight, Qnil); 
     1886      if (!INTEGERP (height) && !FLOATP (height)) 
     1887        height = Qnil; 
     1888    } 
     1889  else if (CONSP (face)) 
     1890    { 
     1891      height = get_face_height (XCAR (face)); 
     1892      if (NILP (height)) 
     1893        height = get_face_height (XCDR (face)); 
     1894    } 
     1895  return height; 
     1896} 
     1897 
     1898static void 
     1899mw32_get_ime_font_property (FRAME_PTR f) 
     1900{ 
     1901  /* set logfont for IME */ 
     1902  LOGFONT lf = f->output_data.mw32->ime_logfont; 
     1903 
     1904  if (lf.lfHeight == 0) 
     1905    { 
     1906      extern Lisp_Object Qface, QCheight, Qdefault; 
     1907      Lisp_Object p, face, height; 
     1908 
     1909      if (!NILP (Feolp ())) 
     1910        XSETFASTINT (p, max (XINT (Fline_beginning_position (Qnil)), PT - 1)); 
     1911      else 
     1912        XSETFASTINT (p, PT); 
     1913      face = Fget_text_property (p, Qface, Qnil); 
     1914 
     1915      height = get_face_height (face); 
     1916 
     1917      if (NILP (height)) 
     1918        height = Finternal_get_lisp_face_attribute (Qdefault, QCheight, Qnil); 
     1919      if (INTEGERP (height)) 
     1920        lf.lfHeight = (int) (- XINT (height) 
     1921                             * FRAME_MW32_DISPLAY_INFO (f)->resy / 720); 
     1922      else if (FLOATP (height)) 
     1923        lf.lfHeight = (int) (XFLOATINT (height) * FRAME_LINE_HEIGHT (f)); 
     1924      mw32_set_ime_font (FRAME_MW32_WINDOW (f), &lf); 
    18741925    } 
    18751926} 
     
    23912442      mw32_set_ime_conv_window (hwnd, XWINDOW (f->selected_window)); 
    23922443      f->output_data.mw32->ime_composition_state = 1; 
    2393       POST_THREAD_INFORM_MESSAGE (main_thread_id, WM_EMACS_GET_IME_FONT_PROP, 
    2394                                   (WPARAM) f, (LPARAM) 0); 
    2395       goto dflt; 
    2396  
    2397     case WM_EMACS_MODIFY_IME_FONT_PROP: 
    2398       /* set logfont for IME */ 
    2399       /* f is not current selected frame because running thread here 
    2400          is main thread. Use selected_frame as target frame. */ 
    2401  
    2402       if (!NILP (selected_frame)) 
    2403         { 
    2404           struct frame *f = XFRAME (selected_frame); 
    2405           LOGFONT lf = f->output_data.mw32->ime_logfont; 
    2406           lf.lfHeight = (int) wParam; 
    2407           mw32_set_ime_font (FRAME_MW32_WINDOW (f), &lf); 
    2408         } 
     2444      mw32_get_ime_font_property (f); 
    24092445      goto dflt; 
    24102446 
  • trunk/src/mw32term.c

    r4161 r4192  
    43904390} 
    43914391 
    4392 static Lisp_Object 
    4393 get_face_height (Lisp_Object face) 
    4394 { 
    4395   Lisp_Object height = Qnil; 
    4396   extern Lisp_Object QCheight; 
    4397  
    4398   if (!NILP (face) && SYMBOLP (face)) 
    4399     { 
    4400       height = Finternal_get_lisp_face_attribute (face, QCheight, Qnil); 
    4401       if (!INTEGERP (height) && !FLOATP (height)) 
    4402         height = Qnil; 
    4403     } 
    4404   else if (CONSP (face)) 
    4405     { 
    4406       height = get_face_height (XCAR (face)); 
    4407       if (NILP (height)) 
    4408         height = get_face_height (XCDR (face)); 
    4409     } 
    4410   return height; 
    4411 } 
    4412  
    4413 static void 
    4414 mw32_get_ime_font_property (FRAME_PTR f) 
    4415 { 
    4416   /* set logfont for IME */ 
    4417   LOGFONT lf = f->output_data.mw32->ime_logfont; 
    4418  
    4419   if (lf.lfHeight == 0) 
    4420     { 
    4421       extern Lisp_Object Qface, QCheight, Qdefault; 
    4422       Lisp_Object p, face, height; 
    4423  
    4424       if (!NILP (Feolp ())) 
    4425         XSETFASTINT (p, max (XINT (Fline_beginning_position (Qnil)), PT - 1)); 
    4426       else 
    4427         XSETFASTINT (p, PT); 
    4428       face = Fget_text_property (p, Qface, Qnil); 
    4429  
    4430       height = get_face_height (face); 
    4431  
    4432       if (NILP (height)) 
    4433         height = Finternal_get_lisp_face_attribute (Qdefault, QCheight, Qnil); 
    4434       if (INTEGERP (height)) 
    4435         lf.lfHeight = (int) (- XINT (height) 
    4436                              * FRAME_MW32_DISPLAY_INFO (f)->resy / 720); 
    4437       else if (FLOATP (height)) 
    4438         lf.lfHeight = (int) (XFLOATINT (height) * FRAME_LINE_HEIGHT (f)); 
    4439     } 
    4440  
    4441   SEND_MSGTHREAD_INFORM_MESSAGE (WM_EMACS_MODIFY_IME_FONT_PROP, 
    4442                                  (WPARAM) lf.lfHeight, 0); 
    4443 } 
    4444  
    44454392struct mw32_tool_bar_parm 
    44464393{ 
     
    44744421            mw32_handle_tool_bar_click (tbparm->f, &msg, tbparm->modifier); 
    44754422            xfree (tbparm); 
    4476             break; 
    4477           } 
    4478         case WM_EMACS_GET_IME_FONT_PROP: 
    4479           { 
    4480             FRAME_PTR f = (FRAME_PTR) msg.wParam; 
    4481             mw32_get_ime_font_property (f); 
    44824423            break; 
    44834424          } 
  • trunk/src/mw32term.h

    r4154 r4192  
    842842#define WM_EMACS_TOOL_BAR_UP                    (WM_USER+2024) 
    843843#define WM_EMACS_TOOL_BAR_DOWN                  (WM_USER+2025) 
    844 #define WM_EMACS_GET_IME_FONT_PROP              (WM_USER+2026) 
    845 #define WM_EMACS_MODIFY_IME_FONT_PROP           (WM_USER+2027) 
    846 #define WM_EMACS_HIDE_TOOLTIP                   (WM_USER+2028) 
    847 #define WM_EMACS_UPDATE_CURSOR                  (WM_USER+2029) 
     844#define WM_EMACS_HIDE_TOOLTIP                   (WM_USER+2026) 
     845#define WM_EMACS_UPDATE_CURSOR                  (WM_USER+2027) 
    848846 
    849847#define WM_EMACS_CREATE_FRAME_REPLY             (WM_USER+2050)