9d40713e5ffed3f4b781499a6d98b92d9d82dc8a
[gnokii.git] / include / gsm-bitmaps.h
1 /*
2
3   G N O K I I
4
5   A Linux/Unix toolset and driver for Nokia mobile phones.
6
7   Released under the terms of the GNU GPL, see file COPYING for more details.
8   
9   Functions for manipulating bitmaps
10
11 */
12
13 #ifndef __gsm_bitmaps_h
14 #define __gsm_bitmaps_h
15
16 #include "gsm-sms.h"
17
18 /* Bitmap types. */
19 typedef enum {
20   GSM_None=0,
21   GSM_StartupLogo,      /*size 84*48*/
22   GSM_OperatorLogo,     /*size 72*14*/
23   GSM_CallerLogo,       /*size 72*14*/
24   GSM_PictureImage,     /*size 72*28*/
25   GSM_7110OperatorLogo, /*size 78*21*/
26   GSM_7110StartupLogo,  /*size 96*65*/
27   GSM_6210StartupLogo,  /*size 96*60*/
28   GSM_WelcomeNoteText,
29   GSM_DealerNoteText
30 } GSM_Bitmap_Types;
31
32 #define MAX_BITMAP_TEXT_LENGTH 256
33
34 /* Structure to hold incoming/outgoing bitmaps (and welcome-notes). */
35 typedef struct {
36   u8 height;                /* Bitmap height (pixels) */
37   u8 width;                 /* Bitmap width (pixels) */
38   u16 size;                 /* Bitmap size (bytes) */
39   GSM_Bitmap_Types type;    /* Bitmap type */
40   char netcode[7];          /* Network operator code */
41   char text[MAX_BITMAP_TEXT_LENGTH];   /* Text used for (dealer) welcome-note
42                                           or callergroup name or Picture Image text */
43   unsigned char bitmap[864];           /* Actual Bitmap ((65+7)/8*96=864) */ 
44   unsigned char number;                /* Caller group number */
45   char ringtone;                       /* Ringtone no sent with caller group */
46   bool enabled;                        /* With caller logos = displayed or not */
47   char Sender[GSM_MAX_SENDER_LENGTH+1];/* For Picture Images - number of sender */
48 } GSM_Bitmap;
49
50 void GSM_SetPointBitmap(GSM_Bitmap *bmp, int x, int y);
51 void GSM_ClearPointBitmap(GSM_Bitmap *bmp, int x, int y);
52 bool GSM_IsPointBitmap(GSM_Bitmap *bmp, int x, int y);
53 void GSM_ClearBitmap(GSM_Bitmap *bmp);
54 void GSM_ResizeBitmap(GSM_Bitmap *bitmap, GSM_Bitmap_Types target);
55 void GSM_PrintBitmap(GSM_Bitmap *bitmap);
56 GSM_Error GSM_ReadBitmap(GSM_SMSMessage *message, GSM_Bitmap *bitmap);
57 int GSM_SaveBitmapToSMS(GSM_MultiSMSMessage *SMS, GSM_Bitmap *bitmap,bool ScreenSaver, bool UnicodeText);
58 int GSM_GetBitmapSize(GSM_Bitmap *bitmap);
59
60 #endif