Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CFrameComponentsSDL.cpp File Reference
#include "CFrameComponentsSDL.hpp"
#include "core/buildInfo.hpp"
#include "core/file.hpp"
#include "core/paths.hpp"
#include "logs/CLoggerZenity.hpp"
#include "ui/graphics/IGraphics.hpp"
#include "ui/graphics/IImageManager.hpp"
#include "ui/graphicsComp/CEventGraphics.hpp"
#include "ui/openGL/CGraphicsGL.hpp"
#include "ui/resources/funcs.hpp"
#include "utils/stringUtils.hpp"
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_touch.h>
#include <cmath>
#include <cstring>
Include dependency graph for CFrameComponentsSDL.cpp:

Classes

class  CPrvImageManager
 

Macros

#define assert_sdl(res)
 

Functions

static std::shared_ptr< iv::ui::graphics::ImageprvLoadImage (const iv::ui::resources::ImageResource &resource)
 
static void prvEndScreen (SDL_Window **screenWindow, SDL_GLContext *mainContext)
 
static void prvGetPosMouse (double x, double y, uint64_t ySizeScreen, double *xMouse, double *yMouse)
 
static void prvPositionTouchFinger (SDL_TouchFingerEvent *buttonPressed, uint64_t xSizeScreen, uint64_t ySizeScreen, double *x, double *y)
 
static CEventGraphicsprvProcessFingerMotion (SDL_TouchFingerEvent *motion, uint64_t xSizeScreen, uint64_t ySizeScreen, IGraphics *graphicsRef)
 
static CEventGraphics::EMouseEventType prvGetFingerTypeEvent (Uint32 type)
 
static CEventGraphicsprvProcessFingerPulsed (SDL_TouchFingerEvent *buttonPressed, uint64_t xSizeScreen, uint64_t ySizeScreen, IGraphics *graphicsRef)
 
static CEventGraphicsprvProcessMouseMotion (SDL_MouseMotionEvent *motion, uint64_t ySizeScreen, IGraphics *graphicsRef)
 
static CEventGraphics::EMouseEventType prvGetMouseTypeEvent (Uint32 type)
 
static CEventGraphicsprvProcessMousePulsed (const SDL_MouseButtonEvent *buttonPressed, uint64_t ySizeScreen, IGraphics *graphicsRef)
 
static bool prvIsKeySpecialPressed (const SDL_KeyboardEvent *keyPressed, SDL_Keymod maskSpecialKey)
 
static bool prvHasKeyTransformed (const SDL_Keysym *keySym, int32_t *keyTransform)
 
static bool prvIsKeyEndApplication (int32_t keyTransform, bool isShiftPressed, bool isControlPressed, bool isAltPressed)
 
static bool prvProcessKeyDown (const SDL_KeyboardEvent *keyPressed, IGraphics *graphicsRef, CEventGraphics **event)
 

Variables

static const std::string kPrvStrFullScreen = "FULLSCREEN"
 
static constexpr float kPrvPixelsFinger = 2.
 
static constexpr double kPrvRadiusFinger = 16.
 
static constexpr double kPrvRadiusMouse = 2.
 
static constexpr iv::types::milliseconds maxEventDelay {CLIM ? 1000 : 2000}
 

Macro Definition Documentation

◆ assert_sdl

#define assert_sdl ( res)
Value:
IV_ASSERT((res) >= 0, SDL_GetError())
#define IV_ASSERT(expr, assertion_made,...)
Definition assert.hpp:98

Function Documentation

◆ prvEndScreen()

static void prvEndScreen ( SDL_Window ** screenWindow,
SDL_GLContext * mainContext )
static

◆ prvGetFingerTypeEvent()

static CEventGraphics::EMouseEventType prvGetFingerTypeEvent ( Uint32 type)
static

◆ prvGetMouseTypeEvent()

static CEventGraphics::EMouseEventType prvGetMouseTypeEvent ( Uint32 type)
static

◆ prvGetPosMouse()

static void prvGetPosMouse ( double x,
double y,
uint64_t ySizeScreen,
double * xMouse,
double * yMouse )
static

◆ prvHasKeyTransformed()

static bool prvHasKeyTransformed ( const SDL_Keysym * keySym,
int32_t * keyTransform )
static

◆ prvIsKeyEndApplication()

static bool prvIsKeyEndApplication ( int32_t keyTransform,
bool isShiftPressed,
bool isControlPressed,
bool isAltPressed )
static

◆ prvIsKeySpecialPressed()

static bool prvIsKeySpecialPressed ( const SDL_KeyboardEvent * keyPressed,
SDL_Keymod maskSpecialKey )
static

◆ prvLoadImage()

static std::shared_ptr< iv::ui::graphics::Image > prvLoadImage ( const iv::ui::resources::ImageResource & resource)
static

◆ prvPositionTouchFinger()

static void prvPositionTouchFinger ( SDL_TouchFingerEvent * buttonPressed,
uint64_t xSizeScreen,
uint64_t ySizeScreen,
double * x,
double * y )
static

◆ prvProcessFingerMotion()

static CEventGraphics * prvProcessFingerMotion ( SDL_TouchFingerEvent * motion,
uint64_t xSizeScreen,
uint64_t ySizeScreen,
IGraphics * graphicsRef )
static

◆ prvProcessFingerPulsed()

static CEventGraphics * prvProcessFingerPulsed ( SDL_TouchFingerEvent * buttonPressed,
uint64_t xSizeScreen,
uint64_t ySizeScreen,
IGraphics * graphicsRef )
static

◆ prvProcessKeyDown()

static bool prvProcessKeyDown ( const SDL_KeyboardEvent * keyPressed,
IGraphics * graphicsRef,
CEventGraphics ** event )
static

◆ prvProcessMouseMotion()

static CEventGraphics * prvProcessMouseMotion ( SDL_MouseMotionEvent * motion,
uint64_t ySizeScreen,
IGraphics * graphicsRef )
static

◆ prvProcessMousePulsed()

static CEventGraphics * prvProcessMousePulsed ( const SDL_MouseButtonEvent * buttonPressed,
uint64_t ySizeScreen,
IGraphics * graphicsRef )
static

Variable Documentation

◆ kPrvPixelsFinger

float kPrvPixelsFinger = 2.
staticconstexpr

◆ kPrvRadiusFinger

double kPrvRadiusFinger = 16.
staticconstexpr

◆ kPrvRadiusMouse

double kPrvRadiusMouse = 2.
staticconstexpr

◆ kPrvStrFullScreen

const std::string kPrvStrFullScreen = "FULLSCREEN"
static

◆ maxEventDelay

iv::types::milliseconds maxEventDelay {CLIM ? 1000 : 2000}
staticconstexpr