Example:
/* * This program which should be named "mginit" calls "ServerStartup" * to start the server of MiniGUI-Processes. */ int MiniGUIMain (int args, const char* arg[]) { if (!ServerStartup (0, 0, 0)) { fprintf (stderr, "Can not the MiniGUI server: mginit.\n"); return 1; } if (!InitMiniGUIExt ()) { fprintf (stderr, "Can not init mgext library.\n"); return 1; } /* Enter message loop */ while (GetMessage (&msg, HWND_DESKTOP)) { DispatchMessage (&msg); } MiniGUIExtCleanUp (); return 0; }
|
|
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.
|
|
|
Type of layer change event callback. MG_Layer* layer, MG_Client* client)
|
|
|
Type of client event callback.
|
|
|
Disable all clients output.
|
|
|
Returns the client identifier from PID of a client. This function gets the identifier of the sepcified client from the PID of it.
|
|
||||||||||||||||
|
Create a new layer from the server. This function creates a new layer named by layer_name. You should specify the maximal number of topmost frame objects (max_nr_topmosts) and the maximal number of normal frame objects (max_nr_normals) in the new layer. Passing zero to max_nr_topmosts and max_nr_normals will use the default values, and the default values are specified by ServerStartup. Note that the server will create a default layer named "mginit".
|
|
|
Delete a layer from the server. This functions deletes the specified layer layer.
|
|
|
Sets topmost layer from the server. This functions sets the specified layer layer to be the topmost layer.
|
|
||||||||||||||||
|
Initializes the server of MiniGUI-Processes. This function initializes the server, i.e. mginit. It creates the shared resource, the listening socket, the default layer, and other internal objects. Your costomized mginit program should call this function before calling any other function. Note that the default layer created by the server called "mginit" (NAME_DEF_LAYER).
|
|
|
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.
|
|
|
Update topmost layer.
|
|
|
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