Example:
/* * This program which should be named "mginit" calls "ServerStartup" * to start the server of MiniGUI-Lite. * * Then it calls "SetDesktopRect" to set the desktop * rectangle of the server. * * "SetDesktopRect" defined as a macro calling "JoinLayer": * * #define SetDesktopRect(lx, ty, rx, by) JoinLayer ("", "", lx, ty, rx, by) */ int MiniGUIMain (int args, const char* arg[]) { if (!ServerStartup ()) { fprintf (stderr, "Can not start mginit.\n"); return 1; } if (SetDesktopRect (0, g_rcScr.bottom - 20 - 20, g_rcScr.right, g_rcScr.bottom) == 0) { fprintf (stderr, "Can not get the required desktop rectangle.\n"); return 1; } if (!InitMiniGUIExt ()) { fprintf (stderr, "Can not init mgext library.\n"); return 1; } /* Enter message loop */ while (GetMessage (&msg, hTaskBar)) { DispatchMessage (&msg); } MiniGUIExtCleanUp (); return 0; }
|
|
Tells clients that they can output to screen now, and notify clients to repaint the whole desktop.
|
|
|
The active client has changed, the client will be the active one.
|
|
|
Disconnecting a new client from the server.
|
|
|
Deleting a new layer.
|
|
|
Joining a client to the layer.
|
|
|
Connecting a new client to the server.
|
|
|
Creating a new layer.
|
|
|
Removing a client from the layer.
|
|
|
The topmost layer has changed, the layer will be the topmost one.
|
|
|
Layer event callback.
|
|
|
Client event callback.
|
|
||||||||||||
|
Tells clients that they can output to screen now.
|
|
|
Returns the client identifier from the process identifier (PID) of a client. This function gets the identifier of the sepcified client from the PID of it.
|
|
|
Tells clients do not draw anything on screen. If the server want to disable output of clients, it can call this function to disable the clients' any drawing output. When the server done, it can call ClientCanDrawNowEx function to tell clients in the topmost layer to repaint themselves. Note that the clients is still running after the server calling this function.
|
|
||||||||||||||||||||
|
Sets the screen rectangle can be used by clients. This function sets the screen rectangle can be used by clients. All clients' drawing will be clipped out of the rectangle. The rectangle set by this function should be a subrectangle of the server's exclusive rectangle defined by SetDesktopRect.
Definition at line 671 of file minigui.h. References TRUE. |
|
|
Sets topmost layer by a client identifier. This function sets the topmost layer by the specified client identifier cli. It will bring the layer contains the client to be the topmost one.
|
|
|
Sets topmost layer. This functions sets the specified layer layer to be the topmost layer.
|
|
|
Tells the clients in the topmost layer to update their windows.
|
|
|
Sets to a function to handle events of layers. When a layer is changing, MiniGUI will call this function to tell you the event and the layer or the client which leads to the event. The event could be one of the following:
The event will be passed through the argument of op, and the pointers to the relevant layer and client will be passed through the argument of layer and client respectively.
|
|
|
Sets to a function to handle a comming in/going away connection of client. When a client is connecting to or disconnecting from the server, MiniGUI will call this function to tell you the event and the client identifier. The event could be one of the following:
The event will be passed through the argument of op, and the client identifier will be passed through the argument of cli. You can get the information of the client by accessing mgClients with cli.
|
1.4.2