|
PatchworkOS
|
#include <libpatchwork/patchwork.h>#include <math.h>#include <stdint.h>#include <stdlib.h>#include <string.h>#include <time.h>Go to the source code of this file.
Macros | |
| #define | WINDOW_WIDTH 500 |
| #define | WINDOW_HEIGHT 500 |
Functions | |
| static void | draw_marker (drawable_t *draw, point_t center, int64_t radius, const point_t *markerPoints, uint64_t pointCount, double angle, pixel_t pixel) |
| static void | draw_hand (drawable_t *draw, point_t center, const point_t *handPoints, uint64_t pointCount, double angle, pixel_t pixel) |
| static uint64_t | procedure (window_t *win, element_t *elem, const event_t *event) |
| int | main (void) |
Variables | |
| static point_t | hourMarker [] = {{-3, 0}, {3, 0}, {2, -30}, {-2, -30}} |
| static point_t | minuteMarker [] = {{-1, 0}, {1, 0}, {1, -15}, {-1, -15}} |
| static point_t | hourHand [] = {{-8, 15}, {8, 15}, {6, -50}, {3, -75}, {0, -85}, {-3, -75}, {-6, -50}} |
| static point_t | minuteHand [] = {{-6, 15}, {6, 15}, {4, -120}, {2, -145}, {0, -155}, {-2, -145}, {-4, -120}} |
| static point_t | secondHand [] = {{-2, 30}, {2, 30}, {2, 0}, {1, -165}, {0, -175}, {-1, -165}, {-2, 0}} |
|
static |
Definition at line 37 of file main.c.
References draw_polygon(), memcpy(), polygon_rotate(), point_t::x, and point_t::y.
Referenced by procedure().
|
static |
Definition at line 21 of file main.c.
References draw_polygon(), memcpy(), polygon_rotate(), point_t::x, and point_t::y.
Referenced by procedure().
| int main | ( | void | ) |
Definition at line 120 of file main.c.
References CLOCKS_NEVER, display_dispatch(), display_free(), display_new(), display_next(), ERR, EXIT_FAILURE, EXIT_SUCCESS, NULL, procedure(), RECT_INIT_DIM, SURFACE_WINDOW, WINDOW_DECO, window_free(), WINDOW_HEIGHT, window_new(), window_set_visible(), and WINDOW_WIDTH.
Definition at line 51 of file main.c.
References theme_color_set_t::backgroundNormal, CLOCKS_PER_SEC, theme_t::deco, display_disconnect(), draw_hand(), draw_marker(), draw_rect(), element_draw_begin(), element_draw_end(), element_get_content_rect(), element_get_theme(), EVENT_TIMER, hourHand, hourMarker, rect_t::left, LEVENT_DEINIT, LEVENT_INIT, LEVENT_QUIT, LEVENT_REDRAW, localtime(), M_PI, minuteHand, minuteMarker, NULL, PIXEL_ARGB, RECT_HEIGHT, RECT_WIDTH, secondHand, theme, time(), TIMER_REPEAT, tm::tm_hour, tm::tm_min, tm::tm_sec, rect_t::top, event_t::type, window_get_display(), and window_set_timer().
|
static |
Definition at line 15 of file main.c.
Referenced by procedure().
|
static |
Definition at line 11 of file main.c.
Referenced by procedure().
|
static |
Definition at line 17 of file main.c.
Referenced by procedure().
|
static |
Definition at line 13 of file main.c.
Referenced by procedure().
|
static |
Definition at line 19 of file main.c.
Referenced by procedure().