Changeset 39418
- Timestamp:
- Mar 1, 2016, 11:31:53 AM (10 years ago)
- Location:
- branches/eam_branches/ohana.20160226/src/kapa2
- Files:
-
- 11 edited
-
include/buttons.h (modified) (12 diffs)
-
include/hms_buttons.h (modified) (2 diffs)
-
include/prototypes.h (modified) (1 diff)
-
include/structures.h (modified) (1 diff)
-
src/ButtonFunctions.c (modified) (7 diffs)
-
src/DrawBitmap.c (modified) (1 diff)
-
src/Image.c (modified) (1 diff)
-
src/PNGit.c (modified) (2 diffs)
-
src/PaintOverlay.c (modified) (1 diff)
-
src/Resize.c (modified) (2 diffs)
-
src/bDrawOverlay.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20160226/src/kapa2/include/buttons.h
r29539 r39418 1 1 #define PS_width 25 2 2 #define PS_height 25 3 static char PS_bits[] = {3 static unsigned char PS_bits[] = { 4 4 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x81, 0x3f, 0x00, 5 5 0x82, 0x67, 0x60, 0x00, 0x02, 0x26, 0x40, 0x00, 0x02, 0x24, 0x40, 0x00, … … 13 13 #define grey_width 25 14 14 #define grey_height 25 15 static char grey_bits[] = {15 static unsigned char grey_bits[] = { 16 16 0x90, 0x40, 0xf7, 0x01, 0x04, 0xaa, 0xad, 0x01, 0x68, 0xd5, 0xfe, 0x01, 17 17 0x82, 0x28, 0xdb, 0x01, 0x10, 0xd2, 0x75, 0x01, 0x40, 0xad, 0xee, 0x01, … … 25 25 #define rainbow_width 25 26 26 #define rainbow_height 25 27 static char rainbow_bits[] = {27 static unsigned char rainbow_bits[] = { 28 28 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 29 29 0x00, 0x80, 0xff, 0x00, 0x00, 0x70, 0x00, 0x01, 0x00, 0x0c, 0x7f, 0x00, … … 37 37 #define recenter_width 25 38 38 #define recenter_height 25 39 static char recenter_bits[] = {39 static unsigned char recenter_bits[] = { 40 40 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 41 41 0x80, 0xef, 0x03, 0x00, 0xe0, 0x00, 0x0e, 0x00, 0x30, 0x00, 0x18, 0x00, … … 49 49 #define heat_width 25 50 50 #define heat_height 25 51 static char heat_bits[] = {51 static unsigned char heat_bits[] = { 52 52 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0xd8, 0x01, 53 53 0x00, 0x0c, 0x37, 0x00, 0xf8, 0xc9, 0x6f, 0x00, 0x0c, 0xde, 0xf0, 0x00, … … 61 61 #define red_width 25 62 62 #define red_height 25 63 static char red_bits[] = {63 static unsigned char red_bits[] = { 64 64 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xfc, 0x03, 0x00, 65 65 0x20, 0x07, 0x06, 0x00, 0xe0, 0x00, 0x0c, 0x00, 0x20, 0x00, 0x08, 0x00, … … 73 73 #define green_width 25 74 74 #define green_height 25 75 static char green_bits[] = {75 static unsigned char green_bits[] = { 76 76 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 77 77 0x00, 0x06, 0x04, 0x00, 0x80, 0x03, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, … … 85 85 #define blue_width 25 86 86 #define blue_height 25 87 static char blue_bits[] = {87 static unsigned char blue_bits[] = { 88 88 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xfe, 0x00, 0x00, 89 89 0xc0, 0x83, 0x07, 0x00, 0xc0, 0x00, 0x0c, 0x00, 0x40, 0x00, 0x08, 0x00, … … 97 97 #define yellow_width 25 98 98 #define yellow_height 25 99 static char yellow_bits[] = {99 static unsigned char yellow_bits[] = { 100 100 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x18, 0x00, 101 101 0x80, 0x01, 0x0c, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x02, 0x02, 0x00, … … 109 109 #define flipx_width 25 110 110 #define flipx_height 25 111 static char flipx_bits[] = {111 static unsigned char flipx_bits[] = { 112 112 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 113 113 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x01, 0x00, 0x80, 0x10, 0x02, 0x00, … … 121 121 #define flipy_width 25 122 122 #define flipy_height 25 123 static char flipy_bits[] = {123 static unsigned char flipy_bits[] = { 124 124 0x00, 0x10, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 125 125 0x00, 0x82, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x80, 0x00, 0x02, 0x00, … … 133 133 #define hex_width 25 134 134 #define hex_height 12 135 static char hex_bits[] = {135 static unsigned char hex_bits[] = { 136 136 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 137 137 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0xf0, 0x00, 0x1e, 0x00, 0x88, 0x00, -
branches/eam_branches/ohana.20160226/src/kapa2/include/hms_buttons.h
r29539 r39418 1 1 #define hms_width 25 2 2 #define hms_height 12 3 static char hms_bits[] = {3 static unsigned char hms_bits[] = { 4 4 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 5 5 0x02, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x1e, 0xef, 0x89, 0x00, … … 8 8 #define ddd_width 25 9 9 #define ddd_height 12 10 static char ddd_bits[] = {10 static unsigned char ddd_bits[] = { 11 11 0x40, 0x80, 0x80, 0x00, 0x40, 0x80, 0x80, 0x00, 0x40, 0x80, 0x80, 0x00, 12 12 0x40, 0x80, 0x80, 0x00, 0x40, 0x80, 0x80, 0x00, 0x5c, 0xb8, 0xb8, 0x00, -
branches/eam_branches/ohana.20160226/src/kapa2/include/prototypes.h
r38986 r39418 172 172 void SetImageSize PROTO((Section *section)); 173 173 174 void InitButtonSize PROTO((Button *button, int width, int height, char *bitmap));174 void InitButtonSize PROTO((Button *button, int width, int height, unsigned char *bitmap)); 175 175 void InitButtonFunc PROTO((Button *button, int (*function)(Graphic *graphic, KapaImageWidget *image))); 176 176 void DrawImage PROTO((KapaImageWidget *image)); 177 177 void DrawButton PROTO((Graphic *graphic, Button *button)); 178 void DrawBitmap PROTO((Graphic *graphic, int x, int y, int dx, int dy, char *bitmap, int mode));178 void DrawBitmap PROTO((Graphic *graphic, int x, int y, int dx, int dy, unsigned char *bitmap, int mode)); 179 179 void CrossHairs PROTO((Graphic *graphic, Picture *image)); 180 180 void hh_hms PROTO((char *line, double ra, double dec, char sep, int Nchar)); -
branches/eam_branches/ohana.20160226/src/kapa2/include/structures.h
r38986 r39418 55 55 int x, y, dx, dy; /* position and size */ 56 56 int width, height; /* size of the bitmap */ 57 char*bitmap; /* picture on button */57 unsigned char *bitmap; /* picture on button */ 58 58 int (*function_1) (); /* mouse_button 1 function */ 59 59 int (*function_2) (); /* mouse_button 2 function */ -
branches/eam_branches/ohana.20160226/src/kapa2/src/ButtonFunctions.c
r29938 r39418 3 3 4 4 int PSfunction (Graphic *graphic, KapaImageWidget *image) { 5 OHANA_UNUSED_PARAM(graphic); 6 OHANA_UNUSED_PARAM(image); 5 7 6 8 int status; … … 11 13 12 14 int PNGfunction (Graphic *graphic, KapaImageWidget *image) { 15 OHANA_UNUSED_PARAM(graphic); 16 OHANA_UNUSED_PARAM(image); 13 17 14 18 int status; … … 19 23 20 24 int JPEGfunction (Graphic *graphic, KapaImageWidget *image) { 25 OHANA_UNUSED_PARAM(graphic); 26 OHANA_UNUSED_PARAM(image); 21 27 22 28 int status; … … 137 143 /*********** overlay_button functions ************/ 138 144 int Overlay0 (Graphic *graphic, KapaImageWidget *image) { 145 OHANA_UNUSED_PARAM(graphic); 139 146 140 147 image[0].overlay[0].active = image[0].overlay[0].active ^ TRUE; … … 145 152 146 153 int Overlay1 (Graphic *graphic, KapaImageWidget *image) { 154 OHANA_UNUSED_PARAM(graphic); 147 155 148 156 image[0].overlay[1].active = image[0].overlay[1].active ^ TRUE; … … 153 161 154 162 int Overlay2 (Graphic *graphic, KapaImageWidget *image) { 163 OHANA_UNUSED_PARAM(graphic); 155 164 156 165 image[0].overlay[2].active = image[0].overlay[2].active ^ TRUE; … … 161 170 162 171 int Overlay3 (Graphic *graphic, KapaImageWidget *image) { 172 OHANA_UNUSED_PARAM(graphic); 163 173 164 174 image[0].overlay[3].active = image[0].overlay[3].active ^ TRUE; -
branches/eam_branches/ohana.20160226/src/kapa2/src/DrawBitmap.c
r13320 r39418 1 1 # include "Ximage.h" 2 2 3 void DrawBitmap (Graphic *graphic, int x, int y, int dx, int dy, char *bitmap, int mode) {3 void DrawBitmap (Graphic *graphic, int x, int y, int dx, int dy, unsigned char *bitmap, int mode) { 4 4 5 5 int i, j, byte_line, byte, bit, flag; -
branches/eam_branches/ohana.20160226/src/kapa2/src/Image.c
r37807 r39418 132 132 } 133 133 134 void InitButtonSize (Button *button, int width, int height, char *bitmap) {134 void InitButtonSize (Button *button, int width, int height, unsigned char *bitmap) { 135 135 button->dx = width + 2; 136 136 button->dy = height + 2; -
branches/eam_branches/ohana.20160226/src/kapa2/src/PNGit.c
r33650 r39418 32 32 } 33 33 34 png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING, (png_voidp) NULL, (png_voidp) NULL, (png_voidp)NULL);34 png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); 35 35 if (!png_ptr) { 36 36 fprintf (stderr, "can't get png structure\n"); … … 42 42 if (!info_ptr) { 43 43 fprintf (stderr, "can't get png info structure\n"); 44 png_destroy_write_struct (&png_ptr, (png_infopp)NULL);44 png_destroy_write_struct (&png_ptr, NULL); 45 45 fclose (f); 46 46 return (TRUE); -
branches/eam_branches/ohana.20160226/src/kapa2/src/PaintOverlay.c
r34088 r39418 34 34 if (X - dX > Xmax) continue; 35 35 if (Y + dY < Ymin) continue; 36 if (Y - dY > Ymax) ;36 if (Y - dY > Ymax) continue; 37 37 38 38 pX = (image[0].picture.flipx) ? -1.0 : +1.0; -
branches/eam_branches/ohana.20160226/src/kapa2/src/Resize.c
r29938 r39418 12 12 13 13 // must scan the message before possible return 14 KiiScanMessage (sock, "% d %d", &NX, &NY);14 KiiScanMessage (sock, "%u %u", &NX, &NY); 15 15 16 16 // XXX keep this min limit (or modify for !USE_XWINDOW)? … … 42 42 // resise the window so the image in the currently active window fills its section 43 43 int ResizeByImage (int sock) { 44 OHANA_UNUSED_PARAM(sock); 44 45 45 46 int i, Nsection; -
branches/eam_branches/ohana.20160226/src/kapa2/src/bDrawOverlay.c
r34088 r39418 44 44 if (X - dX > Xmax) continue; 45 45 if (Y + dY < Ymin) continue; 46 if (Y - dY > Ymax) ;46 if (Y - dY > Ymax) continue; 47 47 48 48 pX = (image[0].picture.flipx) ? -1.0 : +1.0;
Note:
See TracChangeset
for help on using the changeset viewer.
