Quick links to related issues: X Client | X Window Application | X Windows Client | X Window Clients on Windows
www.LabF.com

LabF XDK - Make Your Own X Applications

LabF office building
   Products   DownloadPrice & OrderSupportCompanyTutorialsSitemap
    Previous | Next

     








 

Making X-Clients - What is in the LabF XDK?

The LabF XDK supplies the following directory and file sets:

  • DLL files
  • LIB files
  • Resource files
  • Template project files
  • Sample project files
  • X11 locale files
  • X11 header files

The directory structure after installation of the LabF XDK is as follows:

home - the directory in which the LabF Xserver (WinaXe, WinaXe Plus or AceaXe Plus) package is installed.

The home directory includes:
- local X and Motif clients executables
- DLL files used as parts of the run-time X environment
- resource files .Xdefaults, .motifbind, and .mwmrc

home\x11\app-defaults - the directory to store resource files for newly developed X applications, x-clients

home\x11\locale – the directory that contains files to support all major European languages, as well as Japanese, Chinese, Korean, and Hebrew

home\XDK\AppWizard - the directory with a standard project template for MS Visual Studio 6.0, XwpXDK

home\XDK\Include - the directory with X11 header files

home\XDK\Lib - the directory with LIB files

home\XDK\projects\Sample20 - a sample project based on Motif

home\XDK\projects\Xclock - a sample project based on Xaw

These file sets are described in detail below.

  • DLL Files

    The LabF XDK contains the following DLL files resided in the home directory of the LabF Xserver package:

    • libice.dll
    • libsm.dll
    • libxp.dll
    • xlib.dll
    • mrm.dll
    • xwpxaw.dll
    • xwpxm.dll
    • xwpxmu.dll
    • xwpxt.dll

    These DLL files are used as parts of the run-time X environment (i.e. where an X client executable should be when it will be running).
     

  • LIB Files

    The LabF XDK contains the following LIB files placed in the home\XDK\Lib directory:

    • libICE.lib
    • libMrm.lib
    • libSM.lib
    • libXI.lib
    • libXIE.lib
    • libXmu.lib
    • libXp.lib
    • Xaw.lib
    • Xlib.lib
    • Xm.lib
    • Xt.lib

    These LIB files are used as parts of the development-time X environment (i.e. while developing an X client). With MS Visual Studio 6.0, you can automatically create LIB files when you are creating corresponding DLL files.

    These libraries are typically located (on UNIX) in the /usr/X11R6/lib directory while the corresponding header files are located in the /usr/X11R6/include directory.
     

  • Resource Files

    Resource files for X applications are binary or text files written in the standard format to describe application options. Some of resource files (e.g., .Xdefaults, .motifbind, and .mwmrc) are placed in the home directory.

    We recommend you to keep resource files for newly developed X applications in the home\x11\app-defaults directory (where the resource file for the xfb application is already placed).
     

  • Project Template

    The LabF XDK contains a standard project template for MS Visual Studio 6.0, XwpXDK. This project is automatically included into the MS Visual Studio environment (i.e. in its template library set) when you install the XDK package.

    You should have MS Visual Studio already installed before installing XDK. You can open and use the standard project as a template project for developing your own X application (e.g., from the XDK/Projects Program Folder of LabF Xserver).

    It operates within the user interface of MS Visual C++ Studio 6.0. You can use it to create an empty X project that has the proper include paths, preprocessor definitions, and link libraries.
     

  • Sample Projects

    The LabF XDK supplies source codes for two X clients, Xclock and Sample20, placed in the home\XDK\projects directory of the LabF Xserver package.

    Xclock is a sample project based on Xaw while Sample20 is a sample project based on Motif. Source codes for both the projects are taken from the open Xfree Toolkit. You can compile and link them to build corresponding executable modules (in the MS Visual Studio 6.0 development-time environment). Then you can run the executables in the run-time environment (by placing them in the home directory or specifying it as the working directory in MS Visual Studio).

    You can study and use these source codes (as well as many others from the open Xfree resources) as template source codes and good examples of X clients modified to run locally for writing your own X application code.
     

  • X11 Locale Files (International Support)

    The LabF XDK includes extensions that support user input of the Euro and Latin-9 currency symbols.

    The LabF XDK provides support for developing and running X-clients using all major European languages, as well as Japanese, Chinese, Korean, and Hebrew. The corresponding files are placed in the home\x11\locale directory of the LabF Xserver (WinaXe, WinaXe Plus or AceaXe Plus) package.

    Locale aliases are supported. You can specify your locale alias in the locale.alias file in the home\x11\locale directory.

    Local X and Motif Clients

    The LabF XDK includes several local X and Motif clients briefly described below. All of them were developed by using the LabF XDK. To run one of these X-clients, click its name on the X-clients Program Folder of the package (when XServer is running) or from the Run menu of XServer. (In these cases, the clients are called with parameters specified by XServer.) Also, you can launch the clients from the Start/Run menu of your system. (In this case, you must specify startup parameters for the invoked X client on the command line.)

    mwm

    mwm is a local implementation of the Motif window manager (based on OpenMotif 2.0). The local mwm program may be useful when XServer is in the Single Window mode (this allows not to use a remote window manager).

    xev

    xev is the X Event Tester. When this X client is running, the xev program creates a window and then asks the X server to send it notices called 'events' whenever anything happens to the window (such as being moved, resized, typed in, clicked in, mouse movements, button clicks, etc.). It is useful for seeing what causes events to occur and to display the information that they contain. For example, you can run xev to obtain the values of keysyms for key presses.

    xkill

    The xkill program is a utility for forcing the X server to close connections to clients. This program is very dangerous, but is useful for aborting programs that have displayed undesired windows on a user's screen. According to its manual, if no resource identifier is given with -id, xkill will display a special cursor as a prompt for the user to select a window to be killed. If a pointer button is pressed over a non-root window, the server will close its connection to the client that created the window.

    xclock

    The xclock program displays the time in analog or digital form. The time is continuously updated at a frequency that may be specified by the user.

    xshowcmap

    The xshowcmap program displays the contents of the currently active colormap in a window (a map of the system colors). The created window shows a square for every color currently defined in the server's active colormap. The number of squares is the number of colormap-cells the server supports.

    xset

    This program is used to set various user preference options of the display. According to its manual, the options control the bell parameters, key click, autorepeat, the turning on/off the keyboard LEDs, the mouse parameters, pixel color values, the screen saver parameters, the font path, Energy Star mode, power management, and many others.

    xfd

    This program is used to displays all the characters in an X font. According to its manual, the characters are displayed in a grid of boxes, each large enough to hold any single character in the font. Individual character metrics (index, width, bearings, ascent and descent) can be displayed at the top of the window by clicking on the desired character.

    xprop

    The xprop utility is for displaying window and font properties in an X server. According to its manual, one window or font is selected using the command line arguments or possibly in the case of an X's window, by clicking on the desired window. A list of properties is then given, possibly with formatting information. Normally each property name is displayed by printing first the property name then its type (if it has one) in parentheses followed by its value.

    xrdb

    The xrdb utility is for controlling the X server resource database. According to its manual, xrdb is used to get or set the contents of the RESOURCE_MANAGER property on the root window of screen 0, or the SCREEN_RESOURCES property on the root window of any or all screens, or everything combined. You would normally run this program from your X startup file.

    Most X clients use the screen-independent resource property, RESOURCE_MANAGER, and the screen-specific resource property, SCREEN_RESOURCES, to get user preferences about color, fonts, and so on for applications. The RESOURCE_MANAGER property is used for resources that apply to all screens of the display. The SCREEN_RESOURCES property on each screen specifies additional (or overriding) resources to be used for that screen. When there is only one screen, SCREEN_RESOURCES is normally not used and all resources are just placed in the RESOURCE_MANAGER property.

    xwininfo

    The xwininfo utility is for displaying information about X's windows. According to its manual, various information is displayed depending on which options are selected. The user has the option of selecting the target window with the mouse or by specifying its window id or name. There are also special options to quickly obtain information on the screen's root window or on parent and/or children windows.

    The stats (default) option causes the display of various attributes pertaining to the location and appearance of the selected window. Information displayed includes the location of the window, its width and height, its depth, border width, class, colormap id if any, map state, backing-store hint, and location of the corners.

    The bits option causes the display of various attributes pertaining to the selected window's raw bits and how the selected window is to be stored. Displayed information includes the selected window's bit gravity, window gravity, backing-store hint, backing-planes value, backing pixel, and whether or not the window has save-under set.

    The metric option causes all individual height, width, and x and y positions to be displayed in millimeters as well as number of pixels, based on what the server thinks the resolution is.

    xlsfonts

    This program is used to display server font list for X. According to its manual, xlsfonts lists the fonts that match the given pattern. The wildcard character '*' may be used to match any sequence of characters (including none), and '?' to match any single character. If no pattern is given, '*' is assumed. The '*' and '?' characters must be quoted to prevent them from being expanded by the shell.

    The l option lists some attributes of the font on one line in addition to its name. The ll option lists font properties in addition to l output. The lll option lists character metrics in addition to ll output.

    xfontsel

    The xfontsel application provides a simple way to display the fonts known to your X server, examine samples of each, and retrieve the X Logical Font Description ("XLFD") full name for a font (i.e., xfontsel is a point & click interface for selecting X11 font names).

    According to its manual, if the pattern option is not specified, all fonts with XLFD 14-part names will be selectable. To work with only a subset of the fonts, you can specify -pattern followed by a partially or fully qualified font name (e.g., "-pattern *medium*" will select that subset of fonts which contain the string "medium" somewhere in their font name). Be careful about escaping wildcard characters in your shell.

    The sample option specifies the sample text to be used to display the selected font if the font is linearly indexed, overriding the default. The sample16 option specifies the sample text to be used to display the selected font if the font is matrix encoded, overriding the default. The noscaled option disables the ability to select scaled fonts at arbitrary pixel or point sizes. This makes it clear which bitmap sizes are advertised by the server, and can avoid an accidental and sometimes prolonged wait for a font to be scaled.

    Clicking any pointer button in one of the XLFD field names will pop up a menu of the currently known possibilities for that field. If previous choices of other fields were made, only values for fonts that matched the previously selected fields will be selectable. To make other values selectable, you must deselect some other field(s) by choosing the '*' entry in that field.

    Scalable fonts come back from the server with zero for the pixel size, point size, and average width fields. Selecting a font name with a zero in these positions results in an implementation-dependent size. Any pixel or point size can be selected to scale the font to a particular size. Any average width can be selected to anamorphically scale the font (although you may find this challenging given the size of the average width menu).

    Clicking the left pointer button in the select widget will cause the currently selected font name to become the PRIMARY text selection as well as the PRIMARY_FONT selection. This then allows you to paste the string into other applications. The select button remains highlighted to remind you of this fact, and de-highlights when some other application takes the PRIMARY selection away.

    For more information, refer to corresponding manuals on these applications.
     

  •    

    > XDK (X Development Kit)
      > Introduction
      > Content
      > Developing X Clients
      > Porting X Clients

      
        Previous | Next      
               
        © LabF. All rights reserved.     Privacy policy     e-mail us at: sales@labf.com