]> git.kernelconcepts.de Git - metawatch.git/blobdiff - mw_utility.h
Update to spec
[metawatch.git] / mw_utility.h
index 65373601fc3b46643f520d2dbb4ced0d4f67be42..7092818a86b0e8fd0ec1b53c4f684e0d5bf01b28 100644 (file)
@@ -1,7 +1,20 @@
 /*
  * (c) 2011 Siegen, Germany by Nils Faerber <nils.faerber@kernelconcepts.de>
  *
 /*
  * (c) 2011 Siegen, Germany by Nils Faerber <nils.faerber@kernelconcepts.de>
  *
- * license LGPL
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
  */
 
 #ifndef _MW_UTILITY_H
  */
 
 #ifndef _MW_UTILITY_H
@@ -17,12 +30,17 @@ typedef struct {
 typedef enum {
        MW_BLACK = 0,
        MW_WHITE,
 typedef enum {
        MW_BLACK = 0,
        MW_WHITE,
+       MW_TRANSPARENT
 } mw_color;
 
 mw_buffer *mw_alloc_pbuffer(unsigned int res_x, unsigned int res_y, unsigned int bpp);
 
 void mw_free_pbuffer(mw_buffer *mwbuf);
 
 } mw_color;
 
 mw_buffer *mw_alloc_pbuffer(unsigned int res_x, unsigned int res_y, unsigned int bpp);
 
 void mw_free_pbuffer(mw_buffer *mwbuf);
 
+/* makes a buffer for sending to the watch from the drawing buffer */
+unsigned char *mw_make_mw_buffer(mw_buffer *mwbuf, int *buflen);
+unsigned char *mw_make_mw_oled_buffer(mw_buffer *mwbuf, int *buflen);
+
 void mw_dump_mw_buffer(mw_buffer *mwbuf);
 
 
 void mw_dump_mw_buffer(mw_buffer *mwbuf);
 
 
@@ -32,6 +50,12 @@ void mw_buf_clear(mw_buffer *mwbuf, mw_color clr);
 /* draw a single pixel */
 void mw_buf_draw_pixel(mw_buffer *mwbuf, unsigned int x, unsigned int y, mw_color clr);
 
 /* draw a single pixel */
 void mw_buf_draw_pixel(mw_buffer *mwbuf, unsigned int x, unsigned int y, mw_color clr);
 
+void mw_buf_print(mw_buffer *mwbuf, unsigned int x, unsigned int y, char *text, unsigned char fsize, mw_color fgclr, mw_color bgclr);
+
+void mw_buf_draw_line_bresenham(mw_buffer *mwbuf, unsigned int xstart, unsigned int ystart, unsigned int xend, unsigned int yend, mw_color clr);
+
+
+void mw_do_notification(mwdevice_t *mwdevice, char *title, char *text, unsigned char vibrate);
 
 #endif
 
 
 #endif