⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defaultlcdui.h

📁 java 1.1 gemini 08_16
💻 H
📖 第 1 页 / 共 2 页
字号:

/*
 * Return the displayed rgb value of a given rgb pixel in 0xRRGGBB format.
 */

extern int LCDUIgetDisplayColor(int color);


extern void LCDUIgetRGB(int **rgbBuffer, int offset, int scanLength,
			int x, int y, int width, int height, void *img);


/*
 * Draw a line between two points (x1,y1) and (x2,y2).
 */
extern void LCDUIdrawLine(int pixel, short *clip, void *dst, int dotted,
			  int x1, int y1, int x2, int y2);

/*
 * Draw a rectangle at (x,y) with the given width and height.
 */
extern void LCDUIdrawRect(int pixel, short *clip, void *dst, int dotted,
			  int x, int y, int width, int height);

/*
 * Fill a rectangle at (x,y) with the given width and height.
 */
extern void LCDUIfillRect(int pixel, short *clip, void *dst, int dotted,
			  int x, int y, int width, int height);

/*
 * Draw a rectangle at (x,y) with the given width and height. arcWidth and
 * arcHeight, if nonzero, indicate how much of the corners to round off.
 */
extern void LCDUIdrawRoundRect(int pixel, short *clip, void *dst,
			       int dotted,
			       int x, int y, int width, int height,
			       int arcWidth, int arcHeight);

/*
 * Fill a rectangle at (x,y) with the given width and height. arcWidth and
 * arcHeight, if nonzero, indicate how much of the corners to round off.
 */
extern void LCDUIfillRoundRect(int pixel, short *clip, void *dst, 
			       int dotted,
			       int x, int y, int width, int height,
			       int arcWidth, int arcHeight);

/*
 * Draw an elliptical arc centered in the given rectangle.  If filled is
 * true, fill the contents of the arc; otherwise just stroke it.  The
 * portion of the arc to be drawn starts at startAngle (with 0 at the
 * 3 o'clock position) and proceeds counterclockwise by <arcAngle> 
 * degrees.  arcAngle may not be negative.
 */
extern void LCDUIdrawArc(int pixel, short *clip, void *dst, int dotted,
			 int x, int y, int width, int height, 
                         int startAngle, int arcAngle);

/*
 * Fill an elliptical arc centered in the given rectangle.  The
 * portion of the arc to be drawn starts at startAngle (with 0 at the
 * 3 o'clock position) and proceeds counterclockwise by <arcAngle> 
 * degrees.  arcAngle may not be negative.
 */
extern void LCDUIfillArc(int pixel, short *clip, void *dst, int dotted,
			 int x, int y, int width, int height, 
                         int startAngle, int arcAngle);

/*
 * Draw a filled triangle defined by the lines connecting points 
 * (x1,y1), (x2,y2), and (x3,y3).
 */

extern void LCDUIfillTriangle(int pixel, short *clip, void *dst, 
			      int dotted, int x1, int y1, int x2, 
			      int y2, int x3, int y3);


/*
 * Draw the first n characters in chararray, with the anchor point of the
 * entire (sub)string located at x, y.
 */
extern void LCDUIdrawChars(int pixel, short *clip, void *dst, int dotted,
			   FONTPARAMS_PROTO, 
                           int x, int y, int anchor, 
                           const unicode *chararray, int n);

/*
 * Draw the specified region of the given image data,
 * locating its anchor point at x, y
 */
extern void LCDUIdrawRegion(jshort *clip, void *dst, void *img,
                           jint x_dest, jint y_dest, jint anchor,
                           jint x_src, jint y_src,
                           jint width, jint height, 
                           jint transform, jboolean isRegion);

extern void* LCDUIDrawScaled(void *dst, void *img,
                      jint dst_width, jint dst_height, 
					  jint* x_src, jint* y_src,
					  jint* width, jint* height);

/*
 * Draw the given image data, locating its anchor point at x, y
 */
/*2003 0912 Hsu*/ 
extern int 
LCDUIdrawRegionTransform(jshort *clip, void *dst, void *img,
                         jint x_dest, jint y_dest, jint anchor,
                         jint x_src, jint y_src,
                         jint width, jint height, 
                         jint transform, jboolean isRegion);

/*
 * Copy the specified region of the given image data to a new
 * destination, locating its anchor point at x, y.
 */

extern void LCDUIcopyArea(short *clip, void *dst,
			  int x_src, int y_src, int width, int height, 
			  int x_dest, int y_dest, int anchor);


/*
 * Draw the given image, provided as an array of 0xAARRGGBB integers,
 * to the display.  It's upper left corner will be located at (x,y).
 */

extern void LCDUIdrawRGB(jshort *clip, void *dst, jint **rgbData, 
			 jint offset, jint scanlen, jint x, jint y, 
			 jint width, jint height, jboolean processAlpha);


/*
 * Get parameters describing the window system's capabilities
 */
extern void LCDUIgetDisplayParams(int *width, int *height, int *adornedHeight,
                                  int *fg_color,int *eraseColor, int *depth,
                                  int *flags,int *numAlphaLevels);

/*
 * Set the softbuttons to handle the given list of abstract commands.
 */
extern void LCDUIupdateCommandSet(commandStruct *menu, int length);

/*
 * Initialize the menu system
 */
extern void LCDUIinitMenus(void);
extern void LCDUIfinalizeMenus(void);
//extern void LCDUIfinalizeMenus_NonGraphics(void);

/*
 * Handle an input event while the menu system is running
 */
extern int LCDUIhandleMenuEvent(enum KVMEventTypes t, int a, int b);

/*
 * Routines to hide/show the menu
 */
extern void LCDUIpaintMenu(void);
extern void LCDUIdismissMenu(void);

/*
 * Handle an input event while the menu system is running, but
 * without passing it through the event loop
 */
extern jboolean LCDUImenuInternalEvent(int button, KVMEventType *evt);

/*
 * ensure that static variables for the choice group popup menu 
 * are initialized 
 */
extern void LCDUIinitPopupMenu(void);

/*
 * cleanup native data structures related to the popup menu
 */
extern void LCDUIfinalizePopupMenu(void);

/*
 * called to keep the native popup choice group data structure
 * current before painting
 */
extern void LCDUIupdatePopupElements(popupElementStruct *menu, int length, 
			 int selectedIdx, int xTarget, int yTarget,
			 int vWidth, int vHeight, int maxItemWidth,
			 jboolean tickerFlag, jboolean titleFlag);

/*
 * cause the popup choice group to paint itself based on 
 * native data structures, which are kept updated with the
 * <code>LCDUIupdatePopupCommandSet</code> function
 */
extern void LCDUIpaintPopupMenu(void);

/*
 * cause the popup choice group to be removed from the screen
 */
extern void LCDUIdismissPopupMenu(void);

/*
 * handle events while the popup choice group is on screen without
 * passing them through the event loop
 */
extern jboolean LCDUIpopupMenuInternalEvent(int button, KVMEventType *evt);

/*
 * returns the most recently selected element (index) from a popup 
 * choice group
 */
extern int LCDUIgetCurrentPopupSelection(void); 

/*
 * Initialize the phone simulator
 */

extern void LCDUIinitPhoneSim(void);


/*
 * Simulate an incoming phone call
 */

extern void LCDUIincomingCall(void);


/*
 * set a soft button label
 */

/*
 * set vertical scroll properties
 */
extern int LCDUIsetVerticalScroll(int scrollPosition, int scrollProportion);

/*
 * Play the indicated sound.  Return a boolean value to indicate whether
 * a sound was actually emitted.
 */
#define ALERT_INFO         1
#define ALERT_WARNING      2
#define ALERT_ERROR        3
#define ALERT_ALARM        4
#define ALERT_CONFIRMATION 5

/*
 * set input mode
 */
extern void LCDUIsetInputMode(int mode);

/*
 * set vertical scroll properties
 */
extern int LCDUIsetVerticalScroll(int scrollPosition, int scrollProportion);

/*
 * destroy native image resources; called by cleanup handler
 */
extern void LCDUIdestroyNativeImage(void* imagePtr);

/*
 * set the menu mode (fullscreen/normal)
 */
extern void LCDUISetFullScreenMode(int mode);
extern void setScreenMode(jboolean fullscreen);
extern void restoreScreenMode(void);

/*
 * Private initialization and finalization for windows/graphics system
 */
extern void InitializeWindowSystem(void);
extern void FinalizeWindowSystem(void);

/*
 * Private method to set the screen mode for commands and menus.
 */
extern void setCommandsFullScreenMode(int mode);

extern jbyte
adjustToViewableRegion(jint *x_dest, jint *y_dest, jint *x_src, jint *y_src,
			jint *width, jint *height, jshort *clip, jint anchor, jint transform);


/* Sets the top bar to display a trusted MIDlet icon,
 * then calls drawEmulatorScreen to cause an invalidate of 
 * the top bar
 */
extern void LCDUIdrawTrustedIcon(jboolean trusted);

extern void Java_com_sun_midp_midlet_Scheduler_afterDestoryAPP(void);
extern void Java_com_sun_midp_dev_Manager_exitManager(void);

#if USING_JAVAHEAP_AS_IMAGEBUFFER
extern ARRAY instantiateArrayKNI(ARRAY_CLASS arrayClass, long length);
#endif

#ifdef CLDCHI
	#include "ROMStructs.h"
	
	typedef struct Java_javax_microedition_lcdui_Image*	image_class;
	typedef struct Java_javax_microedition_lcdui_Graphics* graphics_class;
	typedef struct Java_javax_microedition_lcdui_Font* font_class;
	typedef struct Java_javax_microedition_lcdui_Command* command_class;
	typedef struct Java_javax_microedition_lcdui_DeviceCaps* devicecaps_class;	
#endif /* CLDCHI */

#endif


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -