1616 02111-1307, USA.
1717*/
1818
19- #if !defined(MAAPI_H )
20- #define MAAPI_H
21-
22- #include <stdint.h>
19+ #pragma once
20+ #include < cstdint>
2321
2422#define EXTENT_Y (e ) ((short )(e))
2523#define EXTENT_X (e ) ((short )((e) >> 16 ))
2624#define TRANS_NONE 0
2725#define FONT_TYPE_SERIF 0
2826#define FONT_TYPE_SANS_SERIF 1
2927#define FONT_TYPE_MONOSPACE 2
30- // same values as tizen enum FontStyle
3128#define FONT_STYLE_NORMAL 0x0001
3229#define FONT_STYLE_BOLD 0x0002
3330#define FONT_STYLE_ITALIC 0x0004
34- #define HANDLE_LOCAL 0
35- #define RES_OUT_OF_MEMORY -1
36- #define RES_BAD_INPUT -2
3731#define RES_OK 1
3832#define HANDLE_SCREEN 0
3933#define RES_FONT_OK 1
40- #define MAK_MENU 293
4134#define EVENT_TYPE_POINTER_PRESSED 8
4235#define EVENT_TYPE_POINTER_RELEASED 9
4336#define EVENT_TYPE_POINTER_DRAGGED 10
4437#define EVENT_TYPE_KEY_PRESSED 11
4538#define EVENT_TYPE_OPTIONS_BOX_BUTTON_CLICKED 41
4639#define EVENT_TYPE_SCREEN_CHANGED 21
4740
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-
5941typedef int MAExtent;
60- typedef void * MAAddress ;
6142typedef intptr_t MAHandle;
6243
6344typedef struct MARect {
@@ -170,7 +151,7 @@ void maDrawText(int left, int top, const char *str, int length);
170151/* *
171152 * Copies the back buffer to the physical screen.
172153 */
173- void maUpdateScreen (void );
154+ void maUpdateScreen ();
174155
175156/* *
176157 * Returns the size in pixels of Latin-1 text as it would appear on-screen.
@@ -181,7 +162,7 @@ MAExtent maGetTextSize(const char *str);
181162 * Returns the screen size.
182163 * Returns the screen size.
183164 */
184- MAExtent maGetScrSize (void );
165+ MAExtent maGetScrSize ();
185166
186167/* *
187168 * 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
231212 * \param width Width, in pixels, of the new image. Must be \> 0.
232213 * \param height Height, in pixels, of the new image. Must be \> 0.
233214 * \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.
235216 */
236217int maCreateDrawableImage (MAHandle placeholder, int width, int height);
237218
238219/* *
239220 * Creates a new placeholder and returns the handle to it.
240221 */
241- MAHandle maCreatePlaceholder (void );
222+ MAHandle maCreatePlaceholder ();
242223
243224/* *
244225 * Releases a handle returned by maCreatePlaceholder().
@@ -264,13 +245,13 @@ void maDestroyPlaceholder(MAHandle handle);
264245 * The destination rectangle is defined as { 0,0, \a srcRect.width, \a srcRect.height }.
265246 * Parts of the destination array that are outside the destination rectangle are not modified.
266247 * 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.
268249 * \param image The handle to the source image.
269250 * \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.
271252 * \param srcRect The portion of the source image to be copied.
272253 */
273- void maGetImageData (MAHandle image , void * dst , const MARect * srcRect , int scanlength );
254+ void maGetImageData (MAHandle image, void *dst, const MARect *srcRect, int scanLength );
274255
275256/* *
276257 * Sets the current draw target.
@@ -287,17 +268,17 @@ MAHandle maSetDrawTarget(MAHandle image);
287268 * Returns the number of milliseconds that has passed since some unknown point in time.
288269 * Accuracy is platform-specific, but should be better than 20 ms.
289270 */
290- int maGetMilliSecondCount (void );
271+ int maGetMilliSecondCount ();
291272
292273/* *
293274 * Shows the virtual keyboard.
294275 */
295- void maShowVirtualKeyboard (void );
276+ void maShowVirtualKeyboard ();
296277
297278/* *
298279 * Hides the virtual keyboard.
299280 */
300- void maHideVirtualKeyboard (void );
281+ void maHideVirtualKeyboard ();
301282
302283/* *
303284 * There is a FIFO buffer that contains up to #EVENT_BUFFER_SIZE events.
@@ -339,4 +320,3 @@ void maPushEvent(MAEvent *event);
339320 */
340321void maWait (int timeout);
341322
342- #endif
0 commit comments