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.
#define EVENT_BUF_SIZE 256 |
Definition at line 34 of file testgesture.c.
#define HEIGHT 480 |
Definition at line 30 of file testgesture.c.
#define VERBOSE 0 |
Definition at line 36 of file testgesture.c.
#define WIDTH 640 |
Definition at line 29 of file testgesture.c.
|
static |
Definition at line 103 of file testgesture.c.
References screen, SDL_fabs, SDL_sqrt, and setpix().
Referenced by drawKnob(), and DrawScreen().
|
static |
Definition at line 120 of file testgesture.c.
References drawCircle(), k, screen, SDL_cosf, and SDL_sinf.
Referenced by DrawScreen().
|
static |
Definition at line 94 of file testgesture.c.
|
static |
Definition at line 128 of file testgesture.c.
References colors, drawCircle(), drawKnob(), EVENT_BUF_SIZE, events, eventWrite, i, knob, NULL, Knob::p, screen, SDL_FillRect, SDL_FINGERDOWN, SDL_FINGERMOTION, SDL_FINGERUP, SDL_GetWindowSurface, SDL_MapRGB, SDL_UpdateWindowSurface, and Point::x.
Referenced by loop().
Definition at line 172 of file testgesture.c.
References Knob::ang, DrawScreen(), EVENT_BUF_SIZE, events, eventWrite, i, knob, SDLTest_CommonState::num_windows, 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(), state, SDLTest_CommonState::windows, Point::x, and Point::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, state, 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, screen, SDL_GetRGB, SDL_MapRGB, and SDL_memcpy.
Referenced by drawCircle(), and drawLine().
|
static |
Definition at line 41 of file testgesture.c.
Referenced by DrawScreen(), MapNto1(), SDL_DitherColors(), SDL_LoadBMP_RW(), SDL_SaveBMP_RW(), and SDL_SetPaletteColors().
|
static |
Definition at line 39 of file testgesture.c.
Referenced by DrawScreen(), IsSDLWindowEventPending(), loop(), SDL_PeepEvents(), UpdateEventsForDeviceRemoval(), and VULKAN_HPP_NAMESPACE::CommandBuffer::waitEvents().
|
static |
Definition at line 40 of file testgesture.c.
Referenced by DrawScreen(), and loop().
Definition at line 55 of file testgesture.c.
Referenced by DrawScreen(), and loop().
|
static |
Definition at line 42 of file testgesture.c.
|
static |
Definition at line 38 of file testgesture.c.