SDL
2.0
|
Go to the source code of this file.
Data Structures | |
struct | Point |
struct | Knob |
Macros | |
#define | WIDTH 640 |
#define | HEIGHT 480 |
#define | BPP 4 |
#define | EVENT_BUF_SIZE 256 |
#define | VERBOSE 0 |
Functions | |
static void | setpix (SDL_Surface *screen, float _x, float _y, unsigned int col) |
static void | drawLine (SDL_Surface *screen, float x0, float y0, float x1, float y1, unsigned int col) |
static void | drawCircle (SDL_Surface *screen, float x, float y, float r, unsigned int c) |
static void | drawKnob (SDL_Surface *screen, const Knob *k) |
static void | DrawScreen (SDL_Window *window) |
static void | loop (void) |
int | main (int argc, char *argv[]) |
Variables | |
static SDLTest_CommonState * | state |
static SDL_Event | events [EVENT_BUF_SIZE] |
static int | eventWrite |
static int | colors [7] = {0xFF,0xFF00,0xFF0000,0xFFFF00,0x00FFFF,0xFF00FF,0xFFFFFF} |
static int | quitting = 0 |
static Knob | knob = { 0.0f, 0.1f, { 0.0f, 0.0f } } |
#define BPP 4 |
Definition at line 31 of file testgesture.c.
Referenced by setpix().
#define EVENT_BUF_SIZE 256 |
Definition at line 34 of file testgesture.c.
Referenced by DrawScreen(), and loop().
#define HEIGHT 480 |
Definition at line 30 of file testgesture.c.
Referenced by main().
#define VERBOSE 0 |
Definition at line 36 of file testgesture.c.
#define WIDTH 640 |
Definition at line 29 of file testgesture.c.
Referenced by main().
|
static |
Definition at line 103 of file testgesture.c.
References SDL_fabs, SDL_sqrt, and setpix().
Referenced by drawKnob(), and DrawScreen().
|
static |
Definition at line 120 of file testgesture.c.
References Knob::ang, drawCircle(), SDL_Surface::h, Knob::p, Knob::r, SDL_cosf, SDL_sinf, SDL_Surface::w, Point::x, and Point::y.
Referenced by DrawScreen().
|
static |
Definition at line 94 of file testgesture.c.
References SDL_fabs, SDL_max, and setpix().
|
static |
Definition at line 128 of file testgesture.c.
References colors, drawCircle(), drawKnob(), EVENT_BUF_SIZE, eventWrite, SDL_Surface::format, SDL_Surface::h, i, NULL, Knob::p, screen, SDL_FillRect, SDL_FINGERDOWN, SDL_FINGERMOTION, SDL_FINGERUP, SDL_GetWindowSurface, SDL_MapRGB, SDL_UpdateWindowSurface, SDL_Surface::w, and Point::x.
Referenced by loop().
Definition at line 172 of file testgesture.c.
References Knob::ang, SDL_MultiGestureEvent::dDist, SDL_Event::dgesture, DrawScreen(), SDL_MultiGestureEvent::dTheta, SDL_DollarGestureEvent::error, EVENT_BUF_SIZE, eventWrite, SDL_TouchFingerEvent::fingerId, SDL_DollarGestureEvent::gestureId, i, SDL_Event::key, SDL_KeyboardEvent::keysym, SDL_Event::mgesture, SDLTest_CommonState::num_windows, SDL_MultiGestureEvent::numFingers, Knob::p, quitting, Knob::r, SDL_DOLLARGESTURE, SDL_DOLLARRECORD, SDL_FINGERDOWN, SDL_FINGERMOTION, SDL_FINGERUP, SDL_GetNumTouchDevices, SDL_GetNumTouchFingers, SDL_GetTouchDevice, SDL_KEYDOWN, SDL_LoadDollarTemplates, SDL_Log, SDL_MULTIGESTURE, SDL_PollEvent, SDL_PRIs64, SDL_RecordGesture, SDL_RWclose, SDL_RWFromFile, SDL_SaveAllDollarTemplates, SDLK_i, SDLK_l, SDLK_s, SDLK_SPACE, SDLTest_CommonEvent(), SDL_Keysym::sym, SDL_Event::tfinger, SDL_Event::type, SDLTest_CommonState::windows, Point::x, SDL_TouchFingerEvent::x, SDL_MultiGestureEvent::x, Point::y, SDL_TouchFingerEvent::y, and SDL_MultiGestureEvent::y.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 269 of file testgesture.c.
References HEIGHT, loop(), quitting, SDL_INIT_VIDEO, SDL_TRUE, SDLTest_CommonCreateState(), SDLTest_CommonDefaultArgs(), SDLTest_CommonInit(), SDLTest_CommonQuit(), SDLTest_CommonState::skip_renderer, WIDTH, SDLTest_CommonState::window_h, SDLTest_CommonState::window_title, and SDLTest_CommonState::window_w.
|
static |
Definition at line 59 of file testgesture.c.
References BPP, SDL_PixelFormat::BytesPerPixel, SDL_Surface::format, SDL_Surface::h, SDL_Surface::pitch, SDL_Surface::pixels, SDL_GetRGB, SDL_MapRGB, SDL_memcpy, and SDL_Surface::w.
Referenced by drawCircle(), and drawLine().
|
static |
Definition at line 41 of file testgesture.c.
Referenced by DrawScreen(), MapNto1(), SDL_LoadBMP_RW(), and SDL_SaveBMP_RW().
|
static |
Definition at line 39 of file testgesture.c.
Referenced by IsSDLWindowEventPending(), VULKAN_HPP_NAMESPACE::CommandBuffer::operator<(), and UpdateEventsForDeviceRemoval().
|
static |
Definition at line 40 of file testgesture.c.
Referenced by DrawScreen(), and loop().
|
static |
Definition at line 55 of file testgesture.c.
|
static |
Definition at line 42 of file testgesture.c.
|
static |
Definition at line 38 of file testgesture.c.