#include <queue>#include <SDL.h>#include <SDL_thread.h>#include "ctype.h"#include "../events.h"#include "../stack.h"#include "../basegfx.h"#include "../global.h"#include "../errors.h"#include "../messaginghub.h"#include "graphicsqueue.h"#include <iostream>Include dependency graph for events.cpp:

Go to the source code of this file.
Functions | |
| void | setMouseUpdateFlag (const bool *flag) |
| passes a references which' value determines if the mouse cursor is hidden on screen updates | |
| void | mousevisible (int an) |
| int | getmousestatus () |
| int | mouseTranslate (int m) |
| void | setmouseposition (int x, int y) |
| void | setnewmousepointer (void *picture, int hotspotx, int hotspoty) |
| int | mouseinrect (int x1, int y1, int x2, int y2) |
| int | mouseinrect (const tmouserect *rect) |
| int | keypress (void) |
| tkey | r_key (void) |
| int | rp_key (void) |
| void | getkeysyms (tkey *keysym, int *keyprnt) |
| char | skeypress (tkey keynr) |
| void | wait (void) |
| tkey | char2key (int c) |
| int | releasetimeslice (void) |
| void | ndelay (int time) |
| void | starttimer (void) |
| char | time_elapsed (int time) |
| int | processEvents () |
| void | queueOperation (GraphicsQueueOperation *gqo, bool wait, bool forceAsync) |
| bool | processGraphicsQueue () |
| int | eventthread (void *nothing) |
| int | getTicker () |
| int | initializeEventHandling (int(*gamethread)(void *), void *data) |
| void | exit_asc (int returnresult) |
| bool | setEventRouting (bool queue, bool legacy) |
| Defines what happens with the SDL events. | |
| bool | legacyEventSystemActive () |
| bool | getQueuedEvent (SDL_Event &event) |
| if the events are being queue, get one. | |
| bool | peekEvent (SDL_Event &event) |
| gets the next event without removing it from the queue. | |
Variables | |
| volatile tmousesettings | mouseparams |
| SDL_mutex * | keyboardmutex = NULL |
| SDL_mutex * | eventHandlingMutex = NULL |
| SDL_mutex * | eventQueueMutex = NULL |
| SDL_mutex * | graphicsQueueMutex = NULL |
| queue< tkey > | keybuffer_sym |
| queue< Uint32 > | keybuffer_prnt |
| queue< SDL_Event > | eventQueue |
| bool | _queueEvents = true |
| bool | _fillLegacyEventStructures = false |
| volatile bool | eventThreadRunning = false |
| std::list< GraphicsQueueOperation * > | graphicsQueue |
| int | exitprogram = 0 |
| bool | redrawScreen = false |
| const bool | trueflag = true |
| const bool * | mouseUpdateFlag = &trueflag |
| volatile int | ticker = 0 |
| int | tticker = 0 |
| volatile int | closeEventThread = 0 |
| const int | keyTranslationNum = 7 |
| int | keyTranslation [keyTranslationNum][2] |
| bool | syncGraphics = true |
| SigC::Signal1< void, const SDL_Surface * > | postScreenUpdate |
| SDL_Thread * | secondThreadHandle = NULL |
| The handle for the second thread; depending on platform this could be the event handling thread or the game thread. | |
|
|
Definition at line 244 of file events.cpp. References ct_invvalue. Referenced by tdlgengine::addbutton(). |
|
|
Definition at line 538 of file events.cpp. References closeEventThread, eventThreadRunning, getTicker(), processEvents(), processGraphicsQueue(), and ticker. Referenced by initializeEventHandling(). |
|
|
Definition at line 645 of file events.cpp. References closeEventThread. Referenced by main(). |
|
||||||||||||
|
Definition at line 206 of file events.cpp. References keyboardmutex, keybuffer_prnt, keybuffer_sym, releasetimeslice(), and ticker. Referenced by tdialogbox::intedit(), tdialogbox::run(), and tdialogbox::stredit(). |
|
|
Definition at line 79 of file events.cpp. Referenced by tdialogbox::buildgraphics(), tdlgengine::buttonpressed(), tdialogbox::copyvirtualframebuf(), tdialogbox::done(), tdialogbox::execbutton(), tdialogbox::run(), tstringselect::run(), and tdialogbox::showbutton(). |
|
|
if the events are being queue, get one.
Definition at line 690 of file events.cpp. References eventQueue, and eventQueueMutex. Referenced by EventSupplier::PollEvent(), and EventSupplier::WaitEvent(). |
|
|
Definition at line 558 of file events.cpp. Referenced by eventthread(). |
|
||||||||||||
|
Definition at line 593 of file events.cpp. References closeEventThread, eventHandlingMutex, eventQueueMutex, eventthread(), gamethread(), graphicsQueueMutex, keyboardmutex, tmousesettings::xsize, and tmousesettings::ysize. Referenced by main(). |
|
|
Definition at line 146 of file events.cpp. References keyboardmutex, and keybuffer_sym. Referenced by tdialogbox::intedit(), tdialogbox::run(), tdialogbox::stredit(), and trunreplay::wait(). |
|
|
Definition at line 684 of file events.cpp. References _fillLegacyEventStructures. Referenced by choice_dlg(), chooseString(), displaymessage(), viewmessage(), and viewtextquery(). |
|
|
Definition at line 116 of file events.cpp. References tmousesettings::x, and tmousesettings::y. |
|
||||||||||||||||||||
|
Definition at line 108 of file events.cpp. References tmousesettings::x, and tmousesettings::y. |
|
|
Definition at line 84 of file events.cpp. Referenced by processEvents(). |
|
|
|
Definition at line 280 of file events.cpp. References releasetimeslice(), and ticker. |
|
|
gets the next event without removing it from the queue.
Definition at line 703 of file events.cpp. References eventQueue, and eventQueueMutex. Referenced by EventSupplier::PeepEvent(). |
|
|
Definition at line 325 of file events.cpp. References _fillLegacyEventStructures, _queueEvents, ct_altp, ct_shp, ct_stp, eventHandlingMutex, eventQueue, eventQueueMutex, exitprogram, keyboardmutex, keybuffer_prnt, keybuffer_sym, keyTranslation, keyTranslationNum, mouseTranslate(), queueOperation(), redrawScreen, tmousesettings::taste, tmousesettings::x, tmousesettings::x1, tmousesettings::y, and tmousesettings::y1. Referenced by eventthread(). |
|
|
Definition at line 511 of file events.cpp. References GraphicsQueueOperation::execute(), graphicsQueue, and graphicsQueueMutex. Referenced by eventthread(). |
|
||||||||||||||||
|
Definition at line 427 of file events.cpp. References eventThreadRunning, GraphicsQueueOperation::execute(), graphicsQueue, graphicsQueueMutex, and syncGraphics. Referenced by processEvents(), ASC_PG_App::toggleFullscreen(), PG_Application::UpdateRect(), and PG_Application::UpdateRects(). |
|
|
Definition at line 158 of file events.cpp. References keyboardmutex, keybuffer_prnt, keybuffer_sym, releasetimeslice(), and ticker. |
|
|
|
Definition at line 182 of file events.cpp. References keyboardmutex, keybuffer_prnt, keybuffer_sym, releasetimeslice(), and ticker. |
|
||||||||||||
|
Defines what happens with the SDL events.
Definition at line 666 of file events.cpp. References _fillLegacyEventStructures, _queueEvents, eventQueue, and eventQueueMutex. Referenced by ASC_PG_App::enableLegacyEventHandling(), tdialogbox::tdialogbox(), and tdialogbox::~tdialogbox(). |
|
||||||||||||
|
Definition at line 99 of file events.cpp. |
|
|
passes a references which' value determines if the mouse cursor is hidden on screen updates
Definition at line 69 of file events.cpp. References mouseUpdateFlag. Referenced by ASC_PG_App::ASC_PG_App(). |
|
||||||||||||||||
|
Definition at line 104 of file events.cpp. |
|
|
Definition at line 230 of file events.cpp. Referenced by tviewtextwithscrolling::checkscrolling(), CargoGuiFunctions::Movement::execute(), GuiFunctions::Movement::execute(), GuiFunctions::Ascend::execute(), GuiFunctions::Descend::execute(), and researchinfo(). |
|
|
Definition at line 293 of file events.cpp. |
|
|
Definition at line 298 of file events.cpp. |
|
|
Definition at line 239 of file events.cpp. |
|
|
Definition at line 46 of file events.cpp. Referenced by legacyEventSystemActive(), processEvents(), and setEventRouting(). |
|
|
Definition at line 45 of file events.cpp. Referenced by processEvents(), and setEventRouting(). |
|
|
Definition at line 314 of file events.cpp. Referenced by eventthread(), exit_asc(), and initializeEventHandling(). |
|
|
Definition at line 38 of file events.cpp. Referenced by initializeEventHandling(), and processEvents(). |
|
|
Definition at line 44 of file events.cpp. Referenced by getQueuedEvent(), peekEvent(), processEvents(), and setEventRouting(). |
|
|
Definition at line 39 of file events.cpp. Referenced by getQueuedEvent(), initializeEventHandling(), peekEvent(), processEvents(), and setEventRouting(). |
|
|
Definition at line 48 of file events.cpp. Referenced by eventthread(), and queueOperation(). |
|
|
Definition at line 53 of file events.cpp. Referenced by processEvents(). |
|
|
Definition at line 51 of file events.cpp. Referenced by processGraphicsQueue(), and queueOperation(). |
|
|
Definition at line 40 of file events.cpp. Referenced by initializeEventHandling(), processGraphicsQueue(), and queueOperation(). |
|
|
Definition at line 37 of file events.cpp. Referenced by getkeysyms(), initializeEventHandling(), keypress(), processEvents(), r_key(), and rp_key(). |
|
|
Definition at line 43 of file events.cpp. Referenced by getkeysyms(), processEvents(), r_key(), and rp_key(). |
|
|
Definition at line 42 of file events.cpp. Referenced by getkeysyms(), keypress(), processEvents(), r_key(), and rp_key(). |
|
|
Initial value: { { 228, 132 },
{ 246, 148 },
{ 252, 129 },
{ 196, 142 },
{ 214, 153 },
{ 220, 154 },
{ 223, 225 } }
Definition at line 317 of file events.cpp. Referenced by processEvents(). |
|
|
Definition at line 316 of file events.cpp. Referenced by processEvents(). |
|
|
|
Definition at line 67 of file events.cpp. Referenced by InitScreenOp::execute(), UpdateRectsOp::execute(), UpdateRectOp::execute(), and setMouseUpdateFlag(). |
|
|
Definition at line 425 of file events.cpp. Referenced by UpdateRectsOp::execute(), UpdateRectOp::execute(), ReplayRecorder::start(), PG_Application::UpdateRect(), and PG_Application::UpdateRects(). |
|
|
Definition at line 63 of file events.cpp. Referenced by ASC_PG_App::eventIdle(), processEvents(), and releasetimeslice(). |
|
|
The handle for the second thread; depending on platform this could be the event handling thread or the game thread.
Definition at line 589 of file events.cpp. |
|
|
Definition at line 422 of file events.cpp. Referenced by queueOperation(). |
|
|
|
Definition at line 65 of file events.cpp. |
|
|
Definition at line 291 of file events.cpp. Referenced by starttimer(), and time_elapsed(). |
1.4.2