diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-06-19 10:23:24 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-06-19 10:23:24 +0200 |
| commit | 02870242eea8b729b3dbd6d23eb77372f61c6318 (patch) | |
| tree | 1c754a9b01c71b3e68aa795469c30b6c32074e17 /src/drivers/GDI | |
| parent | 232743c3a5d903be813f6c4445f3f96bab25cae0 (diff) | |
Move input method support to Fl_Screen_Driver from Fl_Graphics_Driver
Diffstat (limited to 'src/drivers/GDI')
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Graphics_Driver.H | 1 | ||||
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx | 37 |
2 files changed, 0 insertions, 38 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.H b/src/drivers/GDI/Fl_GDI_Graphics_Driver.H index c916fc65e..49ad98e21 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.H +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.H @@ -143,7 +143,6 @@ protected: void color(uchar r, uchar g, uchar b); void set_color(Fl_Color i, unsigned int c); void free_color(Fl_Color i, int overlay); - void set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win); virtual Fl_Font set_fonts(const char *name); virtual int get_font_sizes(Fl_Font fnum, int*& sizep); virtual const char* get_font_name(Fl_Font fnum, int* ap); diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx index 0bdc53ffe..87adc44f0 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx @@ -245,43 +245,6 @@ void Fl_GDI_Graphics_Driver::XDestroyRegion(Fl_Region r) { } -typedef BOOL(WINAPI* flTypeImmAssociateContextEx)(HWND, HIMC, DWORD); -extern flTypeImmAssociateContextEx flImmAssociateContextEx; -typedef HIMC(WINAPI* flTypeImmGetContext)(HWND); -extern flTypeImmGetContext flImmGetContext; -typedef BOOL(WINAPI* flTypeImmSetCompositionWindow)(HIMC, LPCOMPOSITIONFORM); -extern flTypeImmSetCompositionWindow flImmSetCompositionWindow; -typedef BOOL(WINAPI* flTypeImmReleaseContext)(HWND, HIMC); -extern flTypeImmReleaseContext flImmReleaseContext; - - -void Fl_GDI_Graphics_Driver::set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win) -{ - if (!win) return; - Fl_Window* tw = win->top_window(); - - if (!tw->shown()) - return; - - HIMC himc = flImmGetContext(fl_xid(tw)); - - if (himc) { - COMPOSITIONFORM cfs; - float s = scale(); - cfs.dwStyle = CFS_POINT; - cfs.ptCurrentPos.x = int(X * s); - cfs.ptCurrentPos.y = int(Y * s) - int(tw->labelsize() * s); - // Attempt to have temporary text entered by input method use scaled font. - // Does good, but still not always effective. - Fl_GDI_Font_Descriptor *desc = (Fl_GDI_Font_Descriptor*)font_descriptor(); - if (desc) SelectObject((HDC)gc(), desc->fid); - MapWindowPoints(fl_xid(win), fl_xid(tw), &cfs.ptCurrentPos, 1); - flImmSetCompositionWindow(himc, &cfs); - flImmReleaseContext(fl_xid(tw), himc); - } -} - - void Fl_GDI_Graphics_Driver::scale(float f) { if (f != scale()) { size_ = 0; |
