⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 constants.h

📁 The major functionality added in this release includes: - Rootless mode in X11 - Widget Templt
💻 H
📖 第 1 页 / 共 4 页
字号:
#define PGTH_OPCMD_LONGGROP      0x29   //!< Followed by a 2-byte grop type#define PGTH_OPCMD_LONGGET       0x2A   //!< Followed by a 1-byte var offset#define PGTH_OPCMD_LONGSET       0x2B   //!< Followed by a 1-byte var offset#define PGTH_OPCMD_PROPERTY      0x2C   //!< Followed by 2-byte object code and 2-byte property code#define PGTH_OPCMD_LOCALPROP     0x2D   //!< Followed by 2-byte property code#define PGTH_OPCMD_COLORADD      0x2F   //!< Add two pgcolors, clamping to white#define PGTH_OPCMD_COLORSUB      0x30   //!< Subtract two pgcolors, clamping to black#define PGTH_OPCMD_COLORMULT     0x31   //!< Multiply two pgcolors#define PGTH_OPCMD_COLORDIV      0x32   //!< Divide two pgcolors#define PGTH_OPCMD_QUESTIONCOLON 0x33   //!< The ?: conditional operator from C#define PGTH_OPCMD_EQ            0x34#define PGTH_OPCMD_LT            0x35#define PGTH_OPCMD_GT            0x36#define PGTH_OPCMD_LOGICAL_OR    0x37#define PGTH_OPCMD_LOGICAL_AND   0x38#define PGTH_OPCMD_LOGICAL_NOT   0x39#define PGTH_OPCMD_WIDGET        0x3A   //!< Return a handle to the widget being drawn to#define PGTH_OPCMD_TRAVERSEWGT   0x3B   //!< args: widget, direction, count (same as request)#define PGTH_OPCMD_GETWIDGET     0x3C   //!< args: widget, property; returns value of property#define PGTH_OPCMD_CALL          0x3D   //!< folowed by 2-byte thobj and 2-byte property, args: x,y,w,h#define PGTH_OPCMD_LOCALCALL     0x3E   //!< folowed by 2-byte property, args: x,y,w,h/* NOTE: The next opcmd is the last one, use it for expansion! *//* End fillstyles *///! \}/* End themes *///! \}/******************** Video *//*! * \defgroup gropconst Gropnodes * * Gropnodes are the fundamental unit of rendering in PicoGUI, a single element * in a list of GRaphics OPerations. * * The most frequently used grops should be 7 bits or less to keep theme opcode * size at 8 bits. If it goes over 7 bits, the full 16 bits can be used * for the gropnode type and a 24 bit theme opcode will be used. *  * The LSB (bit 0) is a 'nonvisual' flag indicating it does no rendering, * only setup work. Bit 1 indicates that it is 'unpositioned' (does not use * x,y,w,h parameters) Bits 2 and 3 indicate how many extra parameters are * required. All other bits must be used to uniquely identify the gropnode * type. *  * Sorry if this seems a little paranoid, but the point is to save as much * space as possible in these structures as there will be many copies of them. * * See the Canvas widget documentation for more information on using the * gropnodes directly in a client program. *  * \sa PGCANVAS_GROP *  * \{ */#define PG_GROP_RECT          0x00   #define PG_GROP_FRAME         0x10   #define PG_GROP_SLAB          0x20   #define PG_GROP_BAR           0x30   #define PG_GROP_PIXEL         0x40#define PG_GROP_LINE   	      0x50#define PG_GROP_ELLIPSE       0x60 #define PG_GROP_FELLIPSE      0x70#define PG_GROP_TEXT          0x04   //!< Param: string #define PG_GROP_BITMAP        0x14   //!< Param: bitmap #define PG_GROP_TILEBITMAP    0x24   //!< Param: bitmap #define PG_GROP_FPOLYGON      0x34   //!< Param: array#define PG_GROP_BLUR          0x44   //!< Param: radius#define PG_GROP_PARAGRAPH     0x54   //!< Param: paragraph handle#define PG_GROP_PARAGRAPH_INC 0x64   //!< Param: paragraph handle#define PG_GROP_ROTATEBITMAP  0x74   //!< Param: bitmap #define PG_GROP_TEXTRECT      0x84   //!< Param: string #define PG_GROP_MONOBITMAP  0x94  // Added by kdhong...#define PG_GROP_GRADIENT      0x0C   //!< Param: angle, c1, c2 #define PG_GROP_TEXTGRID      0x1C   //!< Param: string, bufferw, offset#define PG_GROP_NOP           0x03#define PG_GROP_RESETCLIP     0x13   //!< Reset clip to whole divnode#define PG_GROP_SETOFFSET     0x01   //!< this grop's rect sets offset#define PG_GROP_SETCLIP       0x11   //!< this grop's rect sets clipping#define PG_GROP_SETSRC        0x21   //!< this grop's rect sets src_*#define PG_GROP_SETMAPPING    0x05   //!< Param: PG_MAP_* const#define PG_GROP_SETCOLOR      0x07   //!< Param: pgcolor#define PG_GROP_SETFONT       0x17   //!< Param: font#define PG_GROP_SETLGOP       0x27   //!< Param: lgop#define PG_GROP_SETANGLE      0x37   //!< Param: angle in degrees#define PG_GROP_SETCLUT1BPP  0x47	// Added by kdhong Param Bitmap..#define PG_GROP_VIDUPDATE    0x800   //!< Forces a video update//! Video-driver-defined grops are or'ed with this#define PG_GROP_USER     0x1000//! Find any gropnode's number of parameters#define PG_GROPPARAMS(x)   (((x)>>2)&0x03)//! Returns nonzero if the gropnode type specified does not actually draw something, only sets parameters#define PG_GROP_IS_NONVISUAL(x)  ((x)&1)//! Returns nonzero if the gropnode doesn't require position data (x,y,w,h)#define PG_GROP_IS_UNPOSITIONED(x) ((x)&2)/*! * \defgroup gropflags Gropnode flags * \{ *///! The gropnode can be scrolled using the divnode's translation (tx,ty)#define PG_GROPF_TRANSLATE    (1<<0)//! Rendered in incremental updates, not rendered normally#define PG_GROPF_INCREMENTAL  (1<<1)//! Always rendered, but this flag is cleared afterwards#define PG_GROPF_PSEUDOINCREMENTAL (1<<2)//! Always rendered, the gropnode is deleted afterwards#define PG_GROPF_TRANSIENT    (1<<3)//! The primitive's color is taken from its first parameter instead of the value set with PG_GROP_SETCOLOR#define PG_GROPF_COLORED      (1<<4)//! The gropnode is always rendered#define PG_GROPF_UNIVERSAL    (1<<5)//! \}/*! * \defgroup gropmap Coordinate mapping * \sa PG_GROP_SETMAPPING, pgSetMapping * \{ */#define PG_MAP_NONE           0/*! * This grop's width and height define * the virtual width and height of the * divnode, grops are mapped from this * to the real size */#define PG_MAP_SCALE          1      #define PG_MAP_SQUARESCALE    2      //!< Like PG_MAP_SCALE, but constrain the aspect ratio/*! * The virtual coordinates still refer to pixels, but they are centered within the * actual output rectangle. */#define PG_MAP_CENTER         3//! \}/*! * \defgroup lgopconst Logical Operations *  * These constants describe a method of combining * a new primitive with data already on the display *  * \sa pgSetLgop, PG_GROP_SETLGOP * * \{ *//* Logical operations for any primitive */#define PG_LGOP_NULL        0   //!< Don't render the primitive#define PG_LGOP_NONE        1   //!< Copy directly to the screen#define PG_LGOP_OR          2#define PG_LGOP_AND         3#define PG_LGOP_XOR         4#define PG_LGOP_INVERT      5   #define PG_LGOP_INVERT_OR   6   //!< Inverts the source data beforehand#define PG_LGOP_INVERT_AND  7#define PG_LGOP_INVERT_XOR  8#define PG_LGOP_ADD         9#define PG_LGOP_SUBTRACT    10#define PG_LGOP_MULTIPLY    11#define PG_LGOP_STIPPLE     12#define PG_LGOP_ALPHA       13  //!< Alpha blending using colors with the PGCF_ALPHA flag#define PG_LGOP_BLEND		14#define PG_LGOP_BLEND2		15#define PG_LGOPMAX          15  //!< For error-checking//! \}/* End gropnodes *///! \}/*! * \defgroup vidflags Video mode flags *  * Use these with pgSetVideoMode() * \{ */#define PG_VID_FULLSCREEN     0x0001  //!< Deprecated#define PG_VID_DOUBLEBUFFER   0x0002  //!< Deprecated#define PG_VID_ROOTLESS       0x0100#define PG_VID_ROTATE90       0x0004  //!< Rotate flags are mutually exclusive#define PG_VID_ROTATE180      0x0008#define PG_VID_ROTATE270      0x0010#define PG_VID_ROTATEMASK     0x001C  //!< Mask of all rotate flags#define PG_VID_ROTBASE90      0x0020  //!< RotBase flags are mutually exclusive#define PG_VID_ROTBASE180     0x0040#define PG_VID_ROTBASE270     0x0080#define PG_VID_ROTBASEMASK    0x00E0  //!< Mask of all rotation base flags#define PG_FM_SET             0      //!< Sets all flags to specified value#define PG_FM_ON              1      //!< Turns on specified flags#define PG_FM_OFF             2      //!< Turns off specified flags#define PG_FM_TOGGLE          3      //!< Toggles specified flags//! \}/*! * \defgroup bitformat Bitmap format flags * * Used to describe the hardware bitmap format in a pgshmbitmap structure * \{ */#define PG_BITFORMAT_ROTATE90    (1<<0)   //!< Indicates that the bitmap is stored pre-rotated#define PG_BITFORMAT_ROTATE180   (1<<1)#define PG_BITFORMAT_ROTATE270   (1<<2)#define PG_BITFORMAT_GRAYSCALE   (1<<3)   //!< Each pixel only represents intensity#define PG_BITFORMAT_INDEXED     (1<<4)   //!< Each pixel represents a palette index#define PG_BITFORMAT_SYMBOLIC    (1<<5)   //!< Each pixel represents a character or symbol#define PG_BITFORMAT_TRUECOLOR   (1<<6)   //!< Each pixel has red, green, and blue components#define PG_BITFORMAT_ALPHA       (1<<7)   //!< Each pixel also has an alpha channel//! \}/*! * \defgroup drvmsgs Driver messages *  * These flags specify hardware-specific commands that can be * sent from driver to driver or from applciation to driver. * * \{ */#define PGDM_BACKLIGHT        2   //!< Turn the backlight on/off#define PGDM_SOUNDFX          3   //!< Parameter is a PG_SND_* constant#define PGDM_POWER            4   //!< Enter the power mode, PG_POWER_*#define PGDM_SDC_CHAR         5   //!< Send a character to the secondary display channel#define PGDM_BRIGHTNESS       6   //!< Set display brightness, 0x00-0xFF#define PGDM_CONTRAST         7   //!< Set display contrast, 0x00-0xFF#define PGDM_SIGNAL          13   //!< Internal message, sends SIGUSR1/2 to drivers (param is signal)#define PGDM_READY           14   //!< Notify the drivers that the server is completely up#define PG_SND_KEYCLICK       1   //!< Short click#define PG_SND_BEEP           2   //!< Terminal beep#define PG_SND_VISUALBELL     3   //!< Flash the visual bell if available#define PG_SND_ALARM          4#define PG_SND_SHORTBEEP      5   //!< Shorter beep#define PG_POWER_OFF          0   //!< Turn completely off#define PG_POWER_SLEEP       50   //!< Stop CPU, turn off peripherals#define PG_POWER_VIDBLANK    70   //!< Blank the video output#define PG_POWER_FULL       100   //!< Full speed//! \}/******************** Widgets *//* Constants used for rship, the relationship between    a widget and its parent */#define PG_DERIVE_BEFORE_OLD  0    /* Deprecated version of PG_DERIVE_BEFORE */#define PG_DERIVE_AFTER       1#define PG_DERIVE_INSIDE      2#define PG_DERIVE_BEFORE      3/* Constants used in pgTraverseWidget */#define PG_TRAVERSE_CHILDREN  1    //!< Starting with this widget's first child, traverse forward#define PG_TRAVERSE_FORWARD   2#define PG_TRAVERSE_BACKWARD  3    //!< Going backwards is much slower than going forward right now#define PG_TRAVERSE_CONTAINER 4    //!< 'count' is the number of container levels to traverse up#define PG_TRAVERSE_APP       5    //!< Find the root widget owning this app, and traverse 'count' applications forward from it./* Types of widgets (in the same order they are   in the table in widget.c) */#define PG_WIDGET_TOOLBAR         0#define PG_WIDGET_LABEL           1#define PG_WIDGET_SCROLL          2#define PG_WIDGET_INDICATOR       3#define PG_WIDGET_MANAGEDWINDOW   4#define PG_WIDGET_BUTTON          5#define PG_WIDGET_PANEL           6  #define PG_WIDGET_POPUP           7  #define PG_WIDGET_BOX             8#define PG_WIDGET_FIELD           9#define PG_WIDGET_BACKGROUND      10 #define PG_WIDGET_MENUITEM        11    /* A variation on button */#define PG_WIDGET_TERMINAL        12    /* A full terminal emulator */#define PG_WIDGET_CANVAS          13#define PG_WIDGET_CHECKBOX        14    /* Another variation of button */#define PG_WIDGET_FLATBUTTON      15    /* Yet another customized button */#define PG_WIDGET_LISTITEM        16    /* Still yet another... */#define PG_WIDGET_SUBMENUITEM     17    /* Menuitem with a submenu arrow */#define PG_WIDGET_RADIOBUTTON     18    /* Like a check box, but exclusive */#define PG_WIDGET_TEXTBOX         19    /* Client-side text layout */#define PG_WIDGET_PANELBAR        20    /* Draggable bar and container */#define PG_WIDGET_SIMPLEMENU      21    /* create a simple menu from a string or array */#define PG_WIDGET_DIALOGBOX       22    /* A popup with a standard title */#define PG_WIDGET_MESSAGEDIALOG   23    /* A popup that displays a message and gets a response */#define PG_WIDGET_SCROLLBOX       24    /* A box widget including scroll bars */#define PG_WIDGET_TEXTEDIT        25    /* Simple text editor */#define PG_WIDGET_TABPAGE         26    /* A page in a tabbed book */#define PG_WIDGETMAX              26    /* For error checking *//* Widget properties */#define PG_WP_SIZE        1#define PG_WP_SIDE        2#define PG_WP_ALIGN       3#define PG_WP_BGCOLOR     4

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -