mirror of
git://projects.qi-hardware.com/ben-scans.git
synced 2024-11-22 10:40:38 +02:00
edb12b6e95
- solidify/Makefile: added util.o - solidify/util.h, solidify/util.c (draw_circle): wrapper for gdk_draw_arc - solidify/Makefile: added style.o - solidify/style.h, solidify/style.c, solidify/solidify.c (main): GUI style parameters and items - solidify/level.c (scroll_z. scroll_xy, scroll_event, level), solidify/overlap.c (scroll_event, overlap): renamed "da" to "darea", to avoid confusion with "da" for GdkDrawable in style.c - solidify/level.c (r_center, scroll_event): moved center radius calculation to separate function - solidify/level.c (draw_image): renamed to draw_map - solidify/level.c (draw_image): draw an on-screen display (OSD) - solidify/level.c (scroll_z, scroll_xy, expose_event, level): propagate OSD on/off switch - solidify/level.c (scroll_event, motion_notify_event, level): enable OSD when approaching the center circle
32 lines
730 B
C
32 lines
730 B
C
/*
|
|
* util.h - Common utility functions
|
|
*
|
|
* Written 2009 by Werner Almesberger
|
|
* Copyright 2009 by Werner Almesberger
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*/
|
|
|
|
#ifndef UTIL_H
|
|
#define UTIL_H
|
|
|
|
#include <stdlib.h>
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
#define alloc_size(s) \
|
|
({ void *alloc_size_tmp = malloc(s); \
|
|
if (!alloc_size_tmp) \
|
|
abort(); \
|
|
alloc_size_tmp; })
|
|
|
|
#define alloc_type(t) ((t *) alloc_size(sizeof(t)))
|
|
|
|
|
|
void draw_circle(GdkDrawable *da, GdkGC *gc, int x, int y, int r);
|
|
|
|
#endif /* UTIL_H */
|