mframe(3m17n)

πŸ“¦
version 1.8.4 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ mframe β€” it's giving "make me a frame" ✨

okay bestie, this one lives in the m17n Library manual, section 3m17n, and it's called mframe. πŸ’– She's a little constructor function and she is very particular about her parameters, so let's get into it.


πŸŽ€ SYNOPSIS πŸŽ€

MFrame* mframe (MPlist * plist)

🌸 DESCRIPTION 🌸

So basically, mframe() creates a brand new frame. πŸ¦‹ You hand her plist, which is a list of parameters, and heads up β€” that plist is allowed to be NULL. No pressure.

The keys she recognizes inside plist are window system dependent. iykyk. But there's one key that is always recognized, no matter what:

  • Mdevice β€” the value has to be one of Mx, Mgd, or Mnil. That's the whole vibe check.

Let's break down those three options because each one changes everything, fr fr:

  • If the value is Mx, the frame is for the X Window System. The MDrawWindow argument you specify together with the frame must be of type Window. This frame is both readable and writable, which means literally all the GUI functions can be used on it. main character energy. πŸ‘‘
  • If the value is Mgd, the frame is for an image object of the GD library. The MDrawWindow argument specified together with the frame must be of type gdImagePtr. This frame is writable only, so minput_XXX functions can't be used for the frame. Sorry bestie, no reading. 😭
  • If the value is Mnil, the frame is for a null device. The frame is not writable nor readable, so functions mdraw_XXX that require the MDrawWindow argument and functions minput_XXX can't be used for the frame. It's giving... decorative. πŸ’€

And then:

  • Mface β€” the value must be a pointer to MFace. This value is used as the default face of the frame. Cute, we love a default. πŸŽ€

πŸ’… bonus keys (only when Mdevice is Mx) πŸ’…

In addition, if the value of the key Mdevice is Mx, the following keys are recognized. These ones are all about specifying 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. She said "I don't need those, thanks." πŸ™ˆ
  • 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.
  • Mfont β€” the value must be Mx, Mfreetype, or Mxft. The created frame uses the specified font backend. The value Mx instructs to use X core fonts, Mfreetype to use local fonts supported by FreeType fonts, and Mxft to use local fonts via Xft library. You can specify this parameter more than once with different values if you want to use multiple font backends. This is ignored if the specified font backend is not supported on the device. When this parameter is not specified, all font backends supported on the device are used. obsessed. ✨

⭐ RETURN VALUE ⭐

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


Copyright (C) 2001 Information-technology Promotion Agency (IPA)

Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.


and that's the whole page, bestie β€” Version 1.8.4, dated Mon Sep 25 2023, from the mframe(3m17n) girlies themselves. πŸŒˆβœ¨πŸ’– slay, go make some frames. πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from