Example:
/* * This program tries to create a new layer named "vcongui" if * there is no such layer. If there is already a layer named "vcongui", * this program brings the layer to be the topmost one. */ int MiniGUIMain (int args, const char* arg[]) { GHANDLE layer; layer = GetLayerInfo ("vcongui", NULL, NULL, NULL, NULL); if (layer != INV_LAYER_HANDLE) { BringLayer2Topmost (layer); return 0; } if (JoinLayer ("vcongui", "vcongui", 0, 0, 486, 674) == INV_LAYER_HANDLE) { printf ("JoinLayer: invalid layer handle.\n"); return 1; } ... return 0; }
|
|
The default name of the layer.
|
|
|
The name of the self layer.
|
|
|
The name of the self layer.
|
|
|
The name of the topmost layer.
|
|
|
Brings a layer to be the topmost one. This function brings the specified layer handle to be the topmost layer.
|
|
||||||||||||||||||||
|
Gets the desktop rectangle. After joined to a layer, client can call this function to get the actual desktop rect of itself.
|
|
||||||||||||||||||||||||
|
Gets information of a layer. You can get the information of a layer through this function. The information will be returned through the pointer arguments if the specific pointer is not NULL.
|
|
||||||||||||||||||||||||||||
|
Joins to a layer. This function should be called by clients before calling any other MiniGUI functions. You can call GetLayerInfo to get the layer information. If the layer to be joined does not exist, the server, i.e. mginit, will try to create a new one. If you passed a NULL pointer or a null string for layer_name, a new layer will be created as well. For the server of MiniGUI-Lite, this function will ignore the arguments of layer_name and client_name. The rectangle defines a region in the screen, which is exclusively used by the server, no client can output to this exclusive retangle. The server usually calls SetDesktopRect macro, which is defined as the following:
#define SetDesktopRect(lx, ty, rx, by) JoinLayer ("", "", lx, ty, rx, by)
Note that the server can define the exclusive retangle out of the actual screen range.
|
|
|
Sets a client as the ative one. This function sets the specified client active to be the active one. It also bring the layer in which the client lays to be the topmost as well.
|
1.4.2