Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
AG_ICON(3)		     Library Functions Manual		      AG_ICON(3)

NAME
     AG_Icon -- agar icon widget

SYNOPSIS
     #include <agar/core.h>
     #include <agar/gui.h>

DESCRIPTION
     The AG_Icon widget is a simple icon suitable for drag-and-drop.  It is com-
     monly used with AG_Socket(3).

INHERITANCE HIERARCHY
     AG_Object(3)-> AG_Widget(3)-> AG_Icon.

INITIALIZATION
     AG_Icon * AG_IconNew(void *parent, Uint flags)

     AG_Icon * AG_IconFromSurface(AG_Surface *s)

     AG_Icon * AG_IconFromBMP(const char *filename)

     void  AG_IconSetPadding(AG_Icon  *icon,  int  left, int right, int top, int
     bottom)

     void AG_IconSetSurface(AG_Icon *icon, AG_Surface *s)

     void AG_IconSetSurfaceNODUP(AG_Icon *icon, AG_Surface *s)

     void AG_IconSetText(AG_Icon *icon, const char *format, ...)

     void AG_IconSetTextS(AG_Icon *icon, const char *label)

     void AG_IconSetBackgroundFill(AG_Icon *icon, int enable, const AG_Color *c)

     The AG_IconNew()  function  allocates,  initializes,  and	attaches  a  new
     AG_Icon  widget  without  any  associated	surface.  There are currently no
     flags options defined.

     The AG_IconFromSurface() variant also assigns a  surface  s,  and	AG_Icon-
     FromBMP() loads the surface from a bitmap file.

     AG_IconSetPadding() sets the padding around the surface in pixels.

     AG_IconSetSurface()  changes  the	surface  associated  with  an icon.  The
     AG_IconSetSurfaceNODUP() variant does not create a copy of the surface.

     AG_IconSetText() arranges for the specified text string to be displayed un-
     der the icon.

     AG_IconSetBackgroundFill() enables or disables background color fill.

EVENTS
     The AG_Icon widget does not generate any event.

EXAMPLES
     See tests/sockets.c in the Agar source distribution.

SEE ALSO
     AG_Intro(3), AG_Socket(3), AG_Surface(3), AG_Widget(3), AG_Window(3)

HISTORY
     The AG_Icon widget first appeared in Agar 1.3.4.

Agar 1.7			December 21, 2022		      AG_ICON(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=AG_Icon&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help