16
16
02111-1307, USA.
17
17
*/
18
18
19
- #if !defined(MAAPI_H )
20
- #define MAAPI_H
21
-
22
- #include <stdint.h>
19
+ #pragma once
20
+ #include < cstdint>
23
21
24
22
#define EXTENT_Y (e ) ((short )(e))
25
23
#define EXTENT_X (e ) ((short )((e) >> 16 ))
26
24
#define TRANS_NONE 0
27
25
#define FONT_TYPE_SERIF 0
28
26
#define FONT_TYPE_SANS_SERIF 1
29
27
#define FONT_TYPE_MONOSPACE 2
30
- // same values as tizen enum FontStyle
31
28
#define FONT_STYLE_NORMAL 0x0001
32
29
#define FONT_STYLE_BOLD 0x0002
33
30
#define FONT_STYLE_ITALIC 0x0004
34
- #define HANDLE_LOCAL 0
35
- #define RES_OUT_OF_MEMORY -1
36
- #define RES_BAD_INPUT -2
37
31
#define RES_OK 1
38
32
#define HANDLE_SCREEN 0
39
33
#define RES_FONT_OK 1
40
- #define MAK_MENU 293
41
34
#define EVENT_TYPE_POINTER_PRESSED 8
42
35
#define EVENT_TYPE_POINTER_RELEASED 9
43
36
#define EVENT_TYPE_POINTER_DRAGGED 10
44
37
#define EVENT_TYPE_KEY_PRESSED 11
45
38
#define EVENT_TYPE_OPTIONS_BOX_BUTTON_CLICKED 41
46
39
#define EVENT_TYPE_SCREEN_CHANGED 21
47
40
48
- #ifndef _WCHAR_DEFINED
49
- #define _WCHAR_DEFINED
50
- typedef wchar_t wchar ;
51
- #endif //_WCHAR_DEFINED
52
-
53
- #ifndef _SYSV_TYPES_DEFINED
54
- #define _SYSV_TYPES_DEFINED
55
- typedef unsigned short ushort ;
56
- typedef unsigned int uint ;
57
- #endif //_SYSV_TYPES_DEFINED
58
-
59
41
typedef int MAExtent;
60
- typedef void * MAAddress ;
61
42
typedef intptr_t MAHandle;
62
43
63
44
typedef struct MARect {
@@ -170,7 +151,7 @@ void maDrawText(int left, int top, const char *str, int length);
170
151
/* *
171
152
* Copies the back buffer to the physical screen.
172
153
*/
173
- void maUpdateScreen (void );
154
+ void maUpdateScreen ();
174
155
175
156
/* *
176
157
* Returns the size in pixels of Latin-1 text as it would appear on-screen.
@@ -181,7 +162,7 @@ MAExtent maGetTextSize(const char *str);
181
162
* Returns the screen size.
182
163
* Returns the screen size.
183
164
*/
184
- MAExtent maGetScrSize (void );
165
+ MAExtent maGetScrSize ();
185
166
186
167
/* *
187
168
* Returns a handle to one of the default fonts of the device, in the style and size you specify.
@@ -231,14 +212,14 @@ void maDrawImageRegion(MAHandle image, const MARect *srcRect, const MAPoint2d *d
231
212
* \param width Width, in pixels, of the new image. Must be \> 0.
232
213
* \param height Height, in pixels, of the new image. Must be \> 0.
233
214
* \see maSetDrawTarget()
234
- * \returns #RES_OK if succeded and #RES_OUT_OF_MEMORY if failed.
215
+ * \returns #RES_OK if succeeded and #RES_OUT_OF_MEMORY if failed.
235
216
*/
236
217
int maCreateDrawableImage (MAHandle placeholder, int width, int height);
237
218
238
219
/* *
239
220
* Creates a new placeholder and returns the handle to it.
240
221
*/
241
- MAHandle maCreatePlaceholder (void );
222
+ MAHandle maCreatePlaceholder ();
242
223
243
224
/* *
244
225
* Releases a handle returned by maCreatePlaceholder().
@@ -264,13 +245,13 @@ void maDestroyPlaceholder(MAHandle handle);
264
245
* The destination rectangle is defined as { 0,0, \a srcRect.width, \a srcRect.height }.
265
246
* Parts of the destination array that are outside the destination rectangle are not modified.
266
247
* If \a srcRect is outside the bounds of the source image,
267
- * or if \a srcRect.width is greater than \a scanlength , a MoSync Panic is thrown.
248
+ * or if \a srcRect.width is greater than \a scanLength , a MoSync Panic is thrown.
268
249
* \param image The handle to the source image.
269
250
* \param dst The address of the destination array.
270
- * \param scanlength The width of the image, in pixels, represented by the destination array.
251
+ * \param scanLength The width of the image, in pixels, represented by the destination array.
271
252
* \param srcRect The portion of the source image to be copied.
272
253
*/
273
- void maGetImageData (MAHandle image , void * dst , const MARect * srcRect , int scanlength );
254
+ void maGetImageData (MAHandle image, void *dst, const MARect *srcRect, int scanLength );
274
255
275
256
/* *
276
257
* Sets the current draw target.
@@ -287,17 +268,17 @@ MAHandle maSetDrawTarget(MAHandle image);
287
268
* Returns the number of milliseconds that has passed since some unknown point in time.
288
269
* Accuracy is platform-specific, but should be better than 20 ms.
289
270
*/
290
- int maGetMilliSecondCount (void );
271
+ int maGetMilliSecondCount ();
291
272
292
273
/* *
293
274
* Shows the virtual keyboard.
294
275
*/
295
- void maShowVirtualKeyboard (void );
276
+ void maShowVirtualKeyboard ();
296
277
297
278
/* *
298
279
* Hides the virtual keyboard.
299
280
*/
300
- void maHideVirtualKeyboard (void );
281
+ void maHideVirtualKeyboard ();
301
282
302
283
/* *
303
284
* There is a FIFO buffer that contains up to #EVENT_BUFFER_SIZE events.
@@ -339,4 +320,3 @@ void maPushEvent(MAEvent *event);
339
320
*/
340
321
void maWait (int timeout);
341
322
342
- #endif
0 commit comments