PatchworkOS  10941b4
A non-POSIX operating system.
Loading...
Searching...
No Matches
main.c File Reference
#include <libpatchwork/patchwork.h>
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/defs.h>
#include <time.h>
Include dependency graph for main.c:

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}}
 

Macro Definition Documentation

◆ WINDOW_WIDTH

#define WINDOW_WIDTH   500

Definition at line 9 of file main.c.

◆ WINDOW_HEIGHT

#define WINDOW_HEIGHT   500

Definition at line 10 of file main.c.

Function Documentation

◆ draw_marker()

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

Definition at line 22 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_hand()

static void draw_hand ( drawable_t draw,
point_t  center,
const point_t handPoints,
uint64_t  pointCount,
double  angle,
pixel_t  pixel 
)
static

Definition at line 38 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ procedure()

static uint64_t procedure ( window_t win,
element_t elem,
const event_t event 
)
static

Definition at line 52 of file main.c.

Here is the call graph for this function:

◆ main()

int main ( void  )

Definition at line 118 of file main.c.

Here is the call graph for this function:

Variable Documentation

◆ hourMarker

point_t hourMarker[] = {{-3, 0}, {3, 0}, {2, -30}, {-2, -30}}
static

Definition at line 12 of file main.c.

◆ minuteMarker

point_t minuteMarker[] = {{-1, 0}, {1, 0}, {1, -15}, {-1, -15}}
static

Definition at line 14 of file main.c.

◆ hourHand

point_t hourHand[] = {{-8, 15}, {8, 15}, {6, -50}, {3, -75}, {0, -85}, {-3, -75}, {-6, -50}}
static

Definition at line 16 of file main.c.

◆ minuteHand

point_t minuteHand[] = {{-6, 15}, {6, 15}, {4, -120}, {2, -145}, {0, -155}, {-2, -145}, {-4, -120}}
static

Definition at line 18 of file main.c.

◆ secondHand

point_t secondHand[] = {{-2, 30}, {2, 30}, {2, 0}, {1, -165}, {0, -175}, {-1, -165}, {-2, 0}}
static

Definition at line 20 of file main.c.