~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/programs/wineconsole/winecon_private.h

Version: ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /*
  2  * an application for displaying Win32 console
  3  *
  4  * Copyright 2001 Eric Pouech
  5  *
  6  * This library is free software; you can redistribute it and/or
  7  * modify it under the terms of the GNU Lesser General Public
  8  * License as published by the Free Software Foundation; either
  9  * version 2.1 of the License, or (at your option) any later version.
 10  *
 11  * This library is distributed in the hope that it will be useful,
 12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 14  * Lesser General Public License for more details.
 15  *
 16  * You should have received a copy of the GNU Lesser General Public
 17  * License along with this library; if not, write to the Free Software
 18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 19  */
 20 
 21 #include <stdarg.h>
 22 #include <windef.h>
 23 #include <winbase.h>
 24 #include <wincon.h>
 25 
 26 #include "wineconsole_res.h"
 27 
 28 /* this is the configuration stored & loaded into the registry */
 29 struct config_data {
 30     unsigned    cell_width;     /* width in pixels of a character */
 31     unsigned    cell_height;    /* height in pixels of a character */
 32     int         cursor_size;    /* in % of cell height */
 33     int         cursor_visible;
 34     DWORD       def_attr;
 35     WCHAR       face_name[32];  /* name of font (size is LF_FACESIZE) */
 36     DWORD       font_weight;
 37     DWORD       history_size;   /* number of commands in history buffer */
 38     DWORD       history_nodup;  /* TRUE if commands are not stored twice in buffer */
 39     DWORD       menu_mask;      /* MK_CONTROL MK_SHIFT mask to drive submenu opening */
 40     DWORD       quick_edit;     /* whether mouse ops are sent to app (false) or used for content selection (true) */
 41     unsigned    sb_width;       /* active screen buffer width */
 42     unsigned    sb_height;      /* active screen buffer height */
 43     unsigned    win_width;      /* size (in cells) of visible part of window (width & height) */
 44     unsigned    win_height;
 45     COORD       win_pos;        /* position (in cells) of visible part of screen buffer in window */
 46     BOOL        exit_on_die;    /* whether the wineconsole should quit if server destroys the console */
 47     unsigned    edition_mode;   /* edition mode flavor while line editing */
 48     WCHAR*      registry;       /* <x> part of HKLU\\<x>\\Console where config is read from (NULL if default settings) */
 49 };
 50 
 51 struct inner_data {
 52     struct config_data  curcfg;
 53 
 54     CHAR_INFO*          cells;          /* local copy of cells (sb_width * sb_height) */
 55 
 56     COORD               cursor;         /* position in cells of cursor */
 57 
 58     HANDLE              hConIn;         /* console input handle */
 59     HANDLE              hConOut;        /* screen buffer handle: has to be changed when active sb changes */
 60     HANDLE              hSynchro;       /* waitable handle signalled by server when something in server has been modified */
 61     HWND                hWnd;           /* handle of 'user' window or NULL for 'curses' */
 62     INT                 nCmdShow;       /* argument of WinMain */
 63 
 64     int                 (*fnMainLoop)(struct inner_data* data);
 65     void                (*fnPosCursor)(const struct inner_data* data);
 66     void                (*fnShapeCursor)(struct inner_data* data, int size, int vis, BOOL force);
 67     void                (*fnComputePositions)(struct inner_data* data);
 68     void                (*fnRefresh)(const struct inner_data* data, int tp, int bm);
 69     void                (*fnResizeScreenBuffer)(struct inner_data* data);
 70     void                (*fnSetTitle)(const struct inner_data* data);
 71     void                (*fnScroll)(struct inner_data* data, int pos, BOOL horz);
 72     void                (*fnSetFont)(struct inner_data* data, const WCHAR* font, unsigned height, unsigned weight);
 73     void                (*fnDeleteBackend)(struct inner_data* data);
 74 
 75     void*               private;        /* data part belonging to the choosen backed */
 76 };
 77 
 78 /* from wineconsole.c */
 79 extern void WINECON_Fatal(const char* msg);
 80 extern void WINECON_NotifyWindowChange(struct inner_data* data);
 81 extern int  WINECON_GetHistorySize(HANDLE hConIn);
 82 extern int  WINECON_GetHistoryMode(HANDLE hConIn);
 83 extern BOOL WINECON_GetConsoleTitle(HANDLE hConIn, WCHAR* buffer, size_t len);
 84 extern int  WINECON_GrabChanges(struct inner_data* data);
 85 extern VOID WINECON_SetConfig(struct inner_data* data,
 86                               const struct config_data* cfg);
 87 /* from registry.c */
 88 extern void WINECON_RegLoad(const WCHAR* appname, struct config_data* cfg);
 89 extern void WINECON_RegSave(const struct config_data* cfg);
 90 extern void WINECON_DumpConfig(const char* pfx, const struct config_data* cfg);
 91 
 92 /* backends... */
 93 enum init_return {
 94     init_success, init_failed, init_not_supported
 95 };
 96 extern enum init_return WCUSER_InitBackend(struct inner_data* data);
 97 extern enum init_return WCCURSES_InitBackend(struct inner_data* data);
 98 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.