Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

fxpriv.h

00001 /********************************************************************************
00002 *                                                                               *
00003 *              P r i v a t e   I n t e r n a l   F u n c t i o n s              *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2000,2002 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or                 *
00009 * modify it under the terms of the GNU Lesser General Public                    *
00010 * License as published by the Free Software Foundation; either                  *
00011 * version 2.1 of the License, or (at your option) any later version.            *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU             *
00016 * Lesser General Public License for more details.                               *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public              *
00019 * License along with this library; if not, write to the Free Software           *
00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *
00021 *********************************************************************************
00022 * $Id: fxpriv.h,v 1.19 2002/04/03 05:30:45 fox Exp $                            *
00023 ********************************************************************************/
00024 
00025 namespace FX {
00026 
00027 // DND protocol version
00028 #define XDND_PROTOCOL_VERSION   4
00029 
00030 // Definitions for DND messages for Windows
00031 #ifdef WIN32
00032 #define WM_DND_REQUEST          (WM_APP+1)
00033 #define WM_DND_ENTER            (WM_APP+2)
00034 #define WM_DND_LEAVE            (WM_APP+3)
00035 #define WM_DND_POSITION_REJECT  (WM_APP+4)
00036 #define WM_DND_POSITION_COPY    (WM_APP+5)
00037 #define WM_DND_POSITION_MOVE    (WM_APP+6)
00038 #define WM_DND_POSITION_LINK    (WM_APP+7)
00039 #define WM_DND_POSITION_PRIVATE (WM_APP+8)
00040 #define WM_DND_STATUS_REJECT    (WM_APP+9)
00041 #define WM_DND_STATUS_COPY      (WM_APP+10)
00042 #define WM_DND_STATUS_MOVE      (WM_APP+11)
00043 #define WM_DND_STATUS_LINK      (WM_APP+12)
00044 #define WM_DND_STATUS_PRIVATE   (WM_APP+13)
00045 #define WM_DND_DROP             (WM_APP+14)
00046 #define WM_DND_FINISH           (WM_APP+15)
00047 #define WM_DND_REPLY            (WM_APP+16)
00048 #endif
00049 
00050 // Named color
00051 struct FXNamedColor {
00052   const FXchar *name;
00053   FXColor       color;
00054   };
00055 
00056 // List of color names
00057 extern FXAPI const FXNamedColor fxcolornames[];
00058 
00059 
00060 // Number of color names
00061 extern FXAPI const FXuint fxnumcolornames;
00062 
00063 
00064 // Floyd-Steinberg quantization full 24 bpp to less than or equal to 256 colors
00065 extern FXbool fxfsquantize(FXuchar* p8,const FXuchar* p24,FXuchar* rmap,FXuchar* gmap,FXuchar* bmap,FXint& actualcolors,FXint w,FXint h,FXint maxcolors);
00066 
00067 // EZ quantization may be used if w*h<=maxcolors, or if the actual colors used is
00068 // less than maxcolors; using fxezquantize assures that no loss of data occurs
00069 // repeatedly loading and saving the same file!
00070 extern FXbool fxezquantize(FXuchar* p8,const FXuchar* p24,FXuchar* rmap,FXuchar* gmap,FXuchar* bmap,FXint& actualcolors,FXint w,FXint h,FXint maxcolors);
00071 
00072 }
00073 
00074 using namespace FX;
00075 
00076 // X11 helpers
00077 #ifndef WIN32
00078 extern FXAPI Atom fxsendrequest(Display *display,Window window,Atom selection,Atom prop,Atom type,FXuint time);
00079 extern FXAPI Atom fxsendreply(Display *display,Window window,Atom selection,Atom prop,Atom target,FXuint time);
00080 extern FXAPI Atom fxsendtypes(Display *display,Window window,Atom prop,FXDragType* types,FXuint numtypes);
00081 extern FXAPI Atom fxrecvtypes(Display *display,Window window,Atom prop,FXDragType*& types,FXuint& numtypes);
00082 extern FXAPI Atom fxsenddata(Display *display,Window window,Atom prop,Atom type,FXuchar* data,FXuint size);
00083 extern FXAPI Atom fxrecvdata(Display *display,Window window,Atom prop,Atom,FXuchar*& data,FXuint& size);
00084 #endif
00085 
00086 // Windows helpers
00087 #ifdef WIN32
00088 extern FXAPI HANDLE fxsendrequest(HWND window,HWND requestor,WPARAM type);
00089 extern FXAPI HANDLE fxsenddata(HWND window,FXuchar* data,FXuint size);
00090 extern FXAPI HANDLE fxrecvdata(HANDLE hMap,FXuchar*& data,FXuint& size);
00091 extern FXAPI unsigned int fxmodifierkeys();
00092 extern UINT wkbGetCodePage();
00093 extern FXuint wkbMapKeyCode(HWND hWnd, UINT iMsg, WPARAM uVirtKey, LPARAM lParam);
00094 extern FXAPI FXbool wkbTranslateMessage(HWND hWnd, UINT iMsg, WPARAM wParam,LPARAM lParam);
00095 #endif
00096 
00097