Main Page   Modules   Data Structures   Globals   Appendix  

Frame
[GUI API]

A frame is an object corresponding to the physical device. More...

Variables: Keys of frame property (common).

MSymbol Mfont
MSymbol Mfont_width
MSymbol Mfont_ascent
MSymbol Mfont_descent

Variables: Keys of frame parameter (X specific).

These are the symbols to use as parameter keys for the function mframe() (which see). They are also keys of a frame property (except for Mwidget).

MSymbol Mdisplay
MSymbol Mscreen
MSymbol Mdrawable
MSymbol Mdepth
MSymbol Mwidget
MSymbol Mcolormap

Typedefs

typedef MFrame MFrame
 Type of frames.


Functions

MFramemframe (MPlist *plist)
 Create a new frame.

void * mframe_get_prop (MFrame *frame, MSymbol key)
 Return property value of frame.


Variables

MFramemframe_default
 The default frame.


Detailed Description

A frame is an object of the type MFrame to hold various information about each physical display/input device. Almost all m17n GUI functions require a pointer to a frame as an argument.

Typedef Documentation

typedef struct MFrame MFrame
 

The type MFrame is for a frame object. Each frame holds various information about the corresponding physical display/input device.

The internal structure of the type MFrame is concealed from application code, and its contents depend on the window system in use. In the m17n-X library, it contains the information about display and screen in the X Window System.


Function Documentation

MFrame* mframe MPlist plist  ) 
 

The mframe() function creates a new frame with parameters listed in plist.

The recognized keys in plist are window system dependent.

The following key is always recognized.

  • Mface, the value type must be (MFace *).

    The value is used as the default face of the frame.

In addition, in the m17n-X library, the following keys are recognized. They are to specify the root window and the depth of drawables that can be used with the frame.

  • Mdrawable, the value type must be Drawable

    A parameter of key Mdisplay must also be specified. The created frame can be used for drawables whose root window and depth are the same as those of the specified drawable on the specified display.

    When this parameter is specified, the parameter of key Mscreen is ignored.

  • Mwidget, the value type must be Widget.

    The created frame can be used for drawables whose root window and depth are the same as those of the specified widget.

    If a parameter of key Mface is not specified, the default face is created from the resources of the widget.

    When this parameter is specified, the parameters of key Mdisplay, Mscreen, Mdrawable, Mdepth are ignored.

  • Mdepth, the value type must be unsigned.

    The created frame can be used for drawables of the specified depth.

  • Mscreen, the value type must be (Screen *).

    The created frame can be used for drawables whose root window is the same as the root window of the specified screen, and depth is the same at the default depth of the screen.

    When this parameter is specified, parameter of key Mdisplay is ignored.

  • Mdisplay, the value type must be (Display *).

    The created frame can be used for drawables whose root window is the same as the root window for the default screen of the display, and depth is the same as the default depth of the screen.

  • Mcolormap, the value type must be (Colormap).

    The created frame uses the specified colormap.

Return value:
If the operation was successful, mframe() returns a pointer to a newly created frame. Otherwise, it returns NULL.

void* mframe_get_prop MFrame frame,
MSymbol  key
 

The mframe_get_prop() function returns a value of property key of frame frame. The valid keys and the corresponding return values are as follows.


	key		type of value	meaning of value
	---             -------------   ----------------
	Mface		MFace *		The default face.

	Mfont		MFont *		The default font.

	Mfont_width	int		Width of the default font.

	Mfont_ascent	int		Ascent of the default font.

	Mfont_descent	int		Descent of the default font.

In the m17n-X library, the followings are also accepted.


	key		type of value	meaning of value
	---             -------------   ----------------
	Mdisplay	Display *	Display associated with the frame.

	Mscreen		int		Screen number of a screen associated
					with the frame.

	Mcolormap	Colormap	Colormap of the frame.

	Mdepth		unsigned		Depth of the frame.


Variable Documentation

MSymbol Mfont
 

MSymbol Mfont_width
 

MSymbol Mfont_ascent
 

MSymbol Mfont_descent
 

MFrame* mframe_default
 

The external variable mframe_default contains a pointer to the default frame that is created by the first call of mframe().

MSymbol Mdisplay
 

MSymbol Mscreen
 

MSymbol Mdrawable
 

MSymbol Mdepth
 

MSymbol Mwidget
 

MSymbol Mcolormap
 


Top of this page

Main Page   Modules   Data Structures   Globals   Appendix  

mulemark mule-aist@m17n.org