aboutsummaryrefslogtreecommitdiff
path: root/src/draw.h
diff options
context:
space:
mode:
authorfoswret2026-05-20 12:21:51 -0500
committerfoswret2026-05-20 12:21:51 -0500
commit04fc01ab521abf48cede1e64563fd6276e781b24 (patch)
tree2b41708c80466e20d220171cd087a8b5c48e93ef /src/draw.h
parent879425cba4cc5ba85b15a01423ad6e50f526fec8 (diff)
add LANG support
Diffstat (limited to 'src/draw.h')
-rw-r--r--src/draw.h48
1 files changed, 32 insertions, 16 deletions
diff --git a/src/draw.h b/src/draw.h
index 51855bf..9de1ed0 100644
--- a/src/draw.h
+++ b/src/draw.h
@@ -1,4 +1,5 @@
-struct dimensions {
+struct
+dimensions {
int row_count; /* rows */
int column_count; /* columns */
double paper_width; /* paper width */
@@ -14,41 +15,56 @@ struct dimensions {
double header_height;
};
-int fill_bg(cairo_t *c);
+int
+fill_bg(cairo_t *c);
-struct RGB {
+struct
+RGB {
double r;
double g;
double b;
};
-struct month_info {
+struct
+month_info {
int month_position;
int first_day;
int num_of_days;
int minimum_rows;
};
-struct RGB hex_to_rgb(char *str);
+struct
+RGB hex_to_rgb(char *str);
-int set_color(cairo_t *c, char *hex);
+int
+set_color(cairo_t *c, char *hex);
-int draw_text (cairo_t *c, double x, double y, char *font_family, int font_size, char *text);
+int
+draw_text(cairo_t *c, double x, double y, char *font_family, int font_size, char *text);
-int calculate_dimensions(double pw, double ph, struct dimensions *d);
+int
+calculate_dimensions(double pw, double ph, struct dimensions *d);
-int print_dimensions(struct dimensions *d);
+int
+print_dimensions(struct dimensions *d);
-int draw_month_grid (cairo_t *c, struct month_info *m, struct dimensions *d);
+int
+draw_month_grid(cairo_t *c, struct month_info *m, struct dimensions *d);
-int draw_month (cairo_t *c, cairo_t *cd, cairo_surface_t *s, struct month_info *m, struct dimensions *d);
+int
+draw_month(cairo_t *c, cairo_t *cd, cairo_surface_t *s, struct month_info *m, struct dimensions *d);
-int day_of_week (int d, int m, int y);
+int
+day_of_week(int d, int m, int y);
-int draw_month_title(cairo_t *c, struct dimensions *d, char *font_family, int font_size, char *name);
+int
+draw_month_title(cairo_t *c, struct dimensions *d, char *font_family, int font_size, char *name);
-PangoRectangle get_logical_extents (cairo_t *c, char *font_family, int font_size, char *text);
+PangoRectangle
+get_logical_extents(cairo_t *c, char *font_family, int font_size, char *text);
-int calculate_minimum_rows(struct month_info *m, struct dimensions *d);
+int
+calculate_minimum_rows(struct month_info *m, struct dimensions *d);
-int construct_day_box(cairo_t *cd, int month, int day, int week_day);
+int
+construct_day_box(cairo_t *cd, int month, int day, int week_day);