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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXEvent.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                         F O X   E v e n t   S t u f f                         *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1997,2012 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (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                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 ********************************************************************************/
00021 #ifndef FXEVENT_H
00022 #define FXEVENT_H
00023 
00024 namespace FX {
00025 
00026 
00028 enum {
00029   SHIFTMASK        = 0x001,           
00030   CAPSLOCKMASK     = 0x002,           
00031   CONTROLMASK      = 0x004,           
00032 #ifdef __APPLE__
00033   ALTMASK          = 0x2000,          
00034   METAMASK         = 0x10,            
00035 #else
00036   ALTMASK          = 0x008,           
00037   METAMASK         = 0x040,           
00038 #endif
00039   NUMLOCKMASK      = 0x010,           
00040   SCROLLLOCKMASK   = 0x0E0,           
00041   LEFTBUTTONMASK   = 0x100,           
00042   MIDDLEBUTTONMASK = 0x200,           
00043   RIGHTBUTTONMASK  = 0x400            
00044   };
00045 
00046 
00048 enum {
00049   LEFTBUTTON       = 1,
00050   MIDDLEBUTTON     = 2,
00051   RIGHTBUTTON      = 3
00052   };
00053 
00054 
00056 enum {
00057   CROSSINGNORMAL,        
00058   CROSSINGGRAB,          
00059   CROSSINGUNGRAB         
00060   };
00061 
00062 
00064 enum {
00065   VISIBILITYTOTAL,
00066   VISIBILITYPARTIAL,
00067   VISIBILITYNONE
00068   };
00069 
00070 
00072 enum {
00073   SEL_NONE,
00074   SEL_KEYPRESS,                 
00075   SEL_KEYRELEASE,               
00076   SEL_LEFTBUTTONPRESS,          
00077   SEL_LEFTBUTTONRELEASE,        
00078   SEL_MIDDLEBUTTONPRESS,        
00079   SEL_MIDDLEBUTTONRELEASE,      
00080   SEL_RIGHTBUTTONPRESS,         
00081   SEL_RIGHTBUTTONRELEASE,       
00082   SEL_MOTION,                   
00083   SEL_ENTER,                    
00084   SEL_LEAVE,                    
00085   SEL_FOCUSIN,                  
00086   SEL_FOCUSOUT,                 
00087   SEL_KEYMAP,
00088   SEL_UNGRABBED,                
00089   SEL_PAINT,                    
00090   SEL_CREATE,
00091   SEL_DESTROY,
00092   SEL_UNMAP,                    
00093   SEL_MAP,                      
00094   SEL_CONFIGURE,                
00095   SEL_SELECTION_LOST,           
00096   SEL_SELECTION_GAINED,         
00097   SEL_SELECTION_REQUEST,        
00098   SEL_RAISED,                   
00099   SEL_LOWERED,                  
00100   SEL_CLOSE,                    
00101   SEL_DELETE,                   
00102   SEL_MINIMIZE,                 
00103   SEL_RESTORE,                  
00104   SEL_MAXIMIZE,                 
00105   SEL_UPDATE,                   
00106   SEL_COMMAND,                  
00107   SEL_CLICKED,                  
00108   SEL_DOUBLECLICKED,            
00109   SEL_TRIPLECLICKED,            
00110   SEL_MOUSEWHEEL,               
00111   SEL_CHANGED,                  
00112   SEL_VERIFY,                   
00113   SEL_DESELECTED,               
00114   SEL_SELECTED,                 
00115   SEL_INSERTED,                 
00116   SEL_REPLACED,                 
00117   SEL_DELETED,                  
00118   SEL_OPENED,                   
00119   SEL_CLOSED,                   
00120   SEL_EXPANDED,                 
00121   SEL_COLLAPSED,                
00122   SEL_BEGINDRAG,                
00123   SEL_ENDDRAG,                  
00124   SEL_DRAGGED,                  
00125   SEL_LASSOED,                  
00126   SEL_TIMEOUT,                  
00127   SEL_SIGNAL,                   
00128   SEL_CLIPBOARD_LOST,           
00129   SEL_CLIPBOARD_GAINED,         
00130   SEL_CLIPBOARD_REQUEST,        
00131   SEL_CHORE,                    
00132   SEL_FOCUS_SELF,               
00133   SEL_FOCUS_RIGHT,              
00134   SEL_FOCUS_LEFT,               
00135   SEL_FOCUS_DOWN,               
00136   SEL_FOCUS_UP,                 
00137   SEL_FOCUS_NEXT,               
00138   SEL_FOCUS_PREV,               
00139   SEL_DND_ENTER,                
00140   SEL_DND_LEAVE,                
00141   SEL_DND_DROP,                 
00142   SEL_DND_MOTION,               
00143   SEL_DND_REQUEST,              
00144   SEL_IO_READ,                  
00145   SEL_IO_WRITE,                 
00146   SEL_IO_EXCEPT,                
00147   SEL_PICKED,                   
00148   SEL_QUERY_TIP,                
00149   SEL_QUERY_HELP,               
00150   SEL_DOCKED,                   
00151   SEL_FLOATED,                  
00152   SEL_SPACEBALLMOTION,          
00153   SEL_SPACEBALLBUTTONPRESS,     
00154   SEL_SPACEBALLBUTTONRELEASE,   
00155   SEL_SESSION_NOTIFY,           
00156   SEL_SESSION_CLOSED,           
00157   SEL_COPYDATA,                 
00158   SEL_IME_START,                
00159   SEL_IME_END,                  
00160   SEL_LAST
00161   };
00162 
00163 
00165 struct FXAPI FXEvent {
00166   FXuint      type;           
00167   FXuint      time;           
00168   FXint       win_x;          
00169   FXint       win_y;          
00170   FXint       root_x;         
00171   FXint       root_y;         
00172   FXint       state;          
00173   FXint       code;           
00174   FXString    text;           
00175   FXint       last_x;         
00176   FXint       last_y;         
00177   FXint       click_x;        
00178   FXint       click_y;        
00179   FXint       rootclick_x;    
00180   FXint       rootclick_y;    
00181   FXuint      click_time;     
00182   FXint       click_button;   
00183   FXint       click_count;    
00184   FXint       values[6];      
00185   FXbool      moved;          
00186   FXRectangle rect;           
00187   FXbool      synthetic;      
00188   FXDragType  target;         
00189 
00191   FXEvent(FXuint t=SEL_NONE){
00192     type=t;
00193     time=0;
00194     win_x=0;
00195     win_y=0;
00196     root_x=0;
00197     root_y=0;
00198     state=0;
00199     code=0;
00200     last_x=0;
00201     last_y=0;
00202     click_x=0;
00203     click_y=0;
00204     rootclick_x=0;
00205     rootclick_y=0;
00206     click_time=0;
00207     click_button=0;
00208     click_count=0;
00209     values[0]=0;
00210     values[1]=0;
00211     values[2]=0;
00212     values[3]=0;
00213     values[4]=0;
00214     values[5]=0;
00215     moved=false;
00216     rect.x=0;
00217     rect.y=0;
00218     rect.w=0;
00219     rect.h=0;
00220     synthetic=false;
00221     target=0;
00222     }
00223   };
00224 
00225 
00226 }
00227 
00228 #endif

Copyright © 1997-2011 Jeroen van der Zijp