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

📄 constants.h

📁 The major functionality added in this release includes: - Rootless mode in X11 - Widget Templt
💻 H
📖 第 1 页 / 共 4 页
字号:
#define PG_WP_COLOR       5#define PG_WP_SIZEMODE    6#define PG_WP_TEXT        7#define PG_WP_FONT        8#define PG_WP_TRANSPARENT 9#define PG_WP_BORDERCOLOR 10#define PG_WP_BITMAP      12#define PG_WP_LGOP        13#define PG_WP_VALUE       14#define PG_WP_BITMASK     15#define PG_WP_BIND        16#define PG_WP_SCROLL_X    17    /* Horizontal and vertical scrolling amount */#define PG_WP_SCROLL_Y    18#define PG_WP_SCROLL      PG_WP_SCROLL_Y   /* For backwards compatibility */#define PG_WP_HOTKEY      19#define PG_WP_EXTDEVENTS  20    /* For buttons, a mask of extra events to send */#define PG_WP_DIRECTION   21#define PG_WP_ABSOLUTEX   22    /* read-only, relative to screen */#define PG_WP_ABSOLUTEY   23#define PG_WP_ON          24    /* on-off state of button/checkbox/etc */#define PG_WP_STATE       25    /* Deprecated! Use PG_WP_THOBJ instead */#define PG_WP_THOBJ       25    /* Set a widget's theme object */#define PG_WP_NAME        26    /* A widget's name (for named containers, etc) */#define PG_WP_PUBLICBOX   27    /* Set to 1 to allow other apps to make widgets				 * in this container */#define PG_WP_DISABLED    28    /* For buttons, grays out text and prevents clicking */#define PG_WP_MARGIN      29    /* For boxes, overrides the default margin */#define PG_WP_TEXTFORMAT  30    /* For the textbox, defines a format for  PG_WP_TEXT */#define PG_WP_TRIGGERMASK 31    /* Mask of extra triggers accepted (self->trigger_mask) */#define PG_WP_HILIGHTED   32    /* Widget property to hilight a widget and all it's children */#define PG_WP_SELECTED    33    /* List property to select a row. */#define PG_WP_SELECTED_HANDLE 34 /* List property to return a handle to the selected row */#define PG_WP_AUTOSCROLL  35    /* For the textbox or terminal, scroll to any new				 * text that's inserted */#define PG_WP_LINES       36    /* Height, in lines */#define PG_WP_PREFERRED_W 37    /* Read only (for now) properties to get any widget's preferred size */#define PG_WP_PREFERRED_H 38#define PG_WP_PANELBAR    39    /* Read-only property for panels returns a handle				 * to its embedded panelbar widget */#define PG_WP_AUTO_ORIENTATION 40 /* Automatically reorient child widgets when PG_WP_SIDE changes */#define PG_WP_THOBJ_BUTTON              41  /* These four theme properties set the theme objects used for the */#define PG_WP_THOBJ_BUTTON_HILIGHT      42  /* three possible states of the button widget. */#define PG_WP_THOBJ_BUTTON_ON           43#define PG_WP_THOBJ_BUTTON_ON_NOHILIGHT 44#define PG_WP_PANELBAR_LABEL  45  /* More read-only panelbar properties to get the built-in panelbar widgets */#define PG_WP_PANELBAR_CLOSE  46#define PG_WP_PANELBAR_ROTATE 47#define PG_WP_PANELBAR_ZOOM   48#define PG_WP_BITMAPSIDE      49#define PG_WP_PASSWORD        50#define PG_WP_HOTKEY_FLAGS    51  /* Keyboard event flags for the hotkey (PG_KF_*) */#define PG_WP_HOTKEY_CONSUME  52  /* Flag indicating whether to consume the key event when a hotkey comes in */#define PG_WP_WIDTH           53  /* A read only property for all widgets (use PG_WP_SIZE to change the size). Always in pixels */#define PG_WP_HEIGHT          54  /* A read only property for all widgets (use PG_WP_SIZE to change the size). Always in pixels */#define PG_WP_SPACING         55  /* Override the normal spacing between buttons */#define PG_WP_MINIMUM         56  /* Used by the panelbar widget to set minimum size */#define PG_WP_MULTILINE       57  /* Turn this off on the textbox widget to get a single line textbox */#define PG_WP_SELECTION       58  /* Selected text in the textedit widget */#define PG_WP_READONLY        59#define PG_WP_INSERTMODE      60  /* Set to a PG_INSERT_* constant, for textbox widget */#define PG_WP_TYPE            61  /* Return the type of the widget (PG_WIDGET_*) */#define PG_WP_TAB             62  /* The tab associated with a tabpage widget */#define PG_WP_TAB_BAR         63  /* The tab bar associated with a tabpage widget *//* Constants for SIZEMODE */#define PG_SZMODE_PIXEL         0#define PG_SZMODE_PERCENT       (1<<2)    /* The DIVNODE_UNIT_PERCENT flag */#define PG_SZMODE_CNTFRACT      (1<<15)   /* The DIVNODE_UNIT_CNTFRACT flag */#define PG_SZMODEMASK           (PG_SZMODE_PERCENT|PG_SZMODE_PIXEL|PG_SZMODE_CNTFRACT)/* Constants for PG_WP_INSERTMODE */#define PG_INSERT_OVERWRITE   0   /* Overwrite the entire contents of the widget (Default) */#define PG_INSERT_APPEND      1   /* Insert at the end of the document */#define PG_INSERT_PREPEND     2   /* Insert at the beginning of the document */#define PG_INSERT_ATCURSOR    3   /* Insert at the cursor */#define PG_INSERTMAX          3   /* For error checking *//* Constants for positioning a popup box */#define PG_POPUP_CENTER   -1#define PG_POPUP_ATCURSOR -2   /* (This also assumes it is a popup menu, and				  uses PGTH_O_POPUP_MENU) */#define PG_POPUP_ATEVENT  -3   /* (This also assumes it is a popup menu, and				  uses PGTH_O_POPUP_MENU) *//* Constants for PG_WP_EXTDEVENTS, to enable extra events */#define PG_EXEV_PNTR_UP    0x0001#define PG_EXEV_PNTR_DOWN  0x0002#define PG_EXEV_NOCLICK    0x0004  /* (ignore clicks) in buttons */#define PG_EXEV_PNTR_MOVE  0x0008#define PG_EXEV_KEY        0x0010  /* Raw key events KEYUP and KEYDOWN */#define PG_EXEV_CHAR       0x0020  /* Processed characters */#define PG_EXEV_TOGGLE     0x0040  /* Clicks toggle the button's state */#define PG_EXEV_EXCLUSIVE  0x0080  /* Button is mutually exclusive */#define PG_EXEV_FOCUS      0x0100  /* We want to receive PG_WE_FOCUS */#define PG_EXEV_NO_HOTSPOT 0x0200  /* Disable hotspot navigation for this button *//* Constants for PG_WP_DIRECTION */#define PG_DIR_HORIZONTAL     0#define PG_DIR_VERTICAL       90#define PG_DIR_ANTIHORIZONTAL 180#define PG_DIR_ANTIVERTICAL   270/******************** Events *//* Events can return various types of data that the client library * will separate out for the app. To indicate a type of encoding, the * PG_WE_* constant is logically or'ed with one of these: */#define PG_EVENTCODING_PARAM    0x000   /* Just a 32-bit parameter */#define PG_EVENTCODING_XY       0x100   /* X,Y coordinates packed into param */#define PG_EVENTCODING_PNTR     0x200   /* Mouse parameters (x,y,btn,chbtn) */#define PG_EVENTCODING_DATA     0x300   /* Arbitrary data block */#define PG_EVENTCODING_KBD      0x400   /* Keyboard params */#define PG_EVENTCODINGMASK      0xF00#define PG_NWE             0x1000       /* Flag indicating a non-widget event *//* Widget events */#define PG_WE_ACTIVATE     0x001 /* Button has been clicked/selected  */#define PG_WE_DEACTIVATE   0x002 /* Sent when the user clicks outside the active popup */#define PG_WE_CLOSE        0x003 /* A top-level widget has closed */#define PG_WE_FOCUS        0x004 /* Sent when a button is focused, only if it has 				  * PG_EXEV_FOCUS. The field widget always sends this. */#define PG_WE_PNTR_DOWN    0x204 /* The "mouse" button is now down */#define PG_WE_PNTR_UP      0x205 /* The "mouse" button is now up */#define PG_WE_PNTR_RELEASE 0x206 /* The "mouse" button was released outside				  * the widget */#define PG_WE_DATA        0x306 /* Widget is streaming data to the app */#define PG_WE_RESIZE      0x107 /* For terminal widgets */#define PG_WE_BUILD       0x108 /* Sent from a canvas, clients can rebuild groplist */#define PG_WE_PNTR_MOVE   0x209 /* The "mouse" moved */#define PG_WE_KBD_CHAR    0x40A /* A focused keyboard character recieved */#define PG_WE_KBD_KEYUP   0x40B /* A focused raw keyup event */#define PG_WE_KBD_KEYDOWN 0x40C /* A focused raw keydown event */#define PG_WE_APPMSG      0x301 /* Messages from another application *//* Non-widget events */#define PG_NWE_THEME_INSERTED 0x1001  /* A theme has been inserted into the theme system, 				       * the parameter is the handle of that theme */#define PG_NWE_THEME_REMOVED  0x1002  /* A theme has been removed the theme system, 				       * the parameter is the handle of that theme.				       * (Note that the handle will be invalid now, but it is				       * provided for comparison if needed.) */#define PG_NWE_INFILTER       0x1302  /* An incoming trigger for a client-side input filter.				       * the data in this case is a pg_client_trigger union *//* 'Triggers' are the notation used to describe events passing between input drivers * and widgets. These constants are used in input filters, and in specifying trigger masks * for the widgets. */#define PG_TRIGGER_TIMER         (1<<0)  /* Timer event from install_timer */#define PG_TRIGGER_PNTR_RELATIVE (1<<1)  /* Specify relative mouse motion and the current button status */#define PG_TRIGGER_ACTIVATE      (1<<3)  /* Sent when it receives focus */#define PG_TRIGGER_DEACTIVATE    (1<<4)  /* Losing focus */#define PG_TRIGGER_KEYUP         (1<<5)  /* Ignores autorepeat, etc. Raw key codes*/#define PG_TRIGGER_KEYDOWN       (1<<6)  /* Ditto. */#define PG_TRIGGER_RELEASE       (1<<7)  /* Mouse up (see note) */#define PG_TRIGGER_UP            (1<<8)  /* Mouse up in specified divnode */#define PG_TRIGGER_DOWN          (1<<9)  /* Mouse down in divnode */#define PG_TRIGGER_MOVE          (1<<10) /* Triggers on any mouse movement in node */#define PG_TRIGGER_ENTER         (1<<11) /* Mouse moves inside widget */#define PG_TRIGGER_LEAVE         (1<<12) /* Mouse moves outside widget */#define PG_TRIGGER_DRAG          (1<<13) /* Mouse move when captured */#define PG_TRIGGER_CHAR          (1<<14) /* A processed ASCII/Unicode character */#define PG_TRIGGER_STREAM        (1<<15) /* Incoming packet (from WRITETO) */#define PG_TRIGGER_KEY_START     (1<<16) /* Sent at the beginning of key propagation */#define PG_TRIGGER_NONTOOLBAR    (1<<17) /* Not really a trigger, but widgets can put this				          * in their trigger mask to request placement in				          * the nontoolbar area when applicable */#define PG_TRIGGER_PNTR_STATUS   (1<<18) /* A driver can send this trigger with the current				          * status of the mouse to have the input filters				          * automatically extrapolate other events. */#define PG_TRIGGER_KEY           (1<<19) /* A driver can send this with a key code when				          * the exact state of the key is unknown, to have				          * KEYUP, KEYDOWN, and CHAR events generated. */#define PG_TRIGGER_SCROLLWHEEL   (1<<20) /* The x,y coordinates passed with this are signed scroll					  * wheel values */#define PG_TRIGGER_TOUCHSCREEN   (1<<21) /* A touchscreen event to be processed by infilter_touchscreen */#define PG_TRIGGER_TS_CALIBRATE  (1<<22) /* Store the touchscreen calibration given in this event */#define PG_TRIGGER_CLOSE         (1<<23) /* Sent by drivers to a managed window when externally closed *//* List of triggers that use the mouse parameters  */#define PG_TRIGGERS_MOUSE        (PG_TRIGGER_PNTR_RELATIVE | PG_TRIGGER_UP | PG_TRIGGER_DOWN | PG_TRIGGER_MOVE |\                                  PG_TRIGGER_DRAG | PG_TRIGGER_PNTR_STATUS | PG_TRIGGER_SCROLLWHEEL | PG_TRIGGER_RELEASE |\                                  PG_TRIGGER_TOUCHSCREEN | PG_TRIGGER_TS_CALIBRATE)/* list of triggers that use keyboard parameters */#define PG_TRIGGERS_KEY          (PG_TRIGGER_KEYUP | PG_TRIGGER_KEYDOWN | PG_TRIGGER_CHAR | PG_TRIGGER_KEY_START |\                                  PG_TRIGGER_KEY )/* Note on PG_TRIGGER_RELEASE:  This is when the mouse was pressed inside   the widget, then released elsewhere.  *//* More flags used in PicoGUI's keyboard triggers to indicate the circumstances * under which a key event is received. */#define PG_KF_FOCUSED           (1<<0)  /* The widget receiving the event is focused */#define PG_KF_CHILD_FOCUSED     (1<<1)  /* Any child widget of this one is focused */#define PG_KF_CONTAINER_FOCUSED (1<<2)  /* Any container of this widget is focused */#define PG_KF_ALWAYS            (1<<3)  /* This is always on */#define PG_KF_APP_TOPMOST       (1<<4)  /* Set if the widget's app is top in "z-order" *//******************** pgcolor flags */#define PGCF_TEXT_ASCII       (0x20 << 24) /* The color is encoded as 0x20BBFFCC, for the					    * background color, foreground color, and ascii					    * character. This is only used by the ncurses					    * driver.					    */#define PGCF_TEXT_ACS         (0x40 << 24) /* This is encoded like PGCF_NCURSES_ASCII,					    * except that an ACS code for special characters					    * is used instead of a normal ASCII code.					    */#define PGCF_ALPHA            (0x80 << 24) /* This indicates an RGB color with an alpha channel,					    * in the format 0xAARRGGBB. Note that the alpha channel					    * loses one bit due to this flag, so only 7 bits of alpha					    * are used.					    * The corresponding hwrcolor has the same format, except that					    * the RGB color is in premul format, i.e. each					    * color has already been multiplied by the alpha channel					    * then divided by 128.					    */  #define PGCF_MASK             (0xFF000000) /* Mask of all color flags *//******************** pgcolors *//* Standard HTML colors */#define PGC_BLACK     0x000000#define PGC_GREEN     0x008000#define PGC_SILVER    0xC0C0C0#define PGC_LIME      0x00FF00#define PGC_GRAY      0x808080#define PGC_OLIVE     0x808000#define PGC_WHITE     0xFFFFFF#define PGC_YELLOW    0xFFFF00#define PGC_MAROON    0x800000#define PGC_NAVY      0x000080#define PGC_RED       0xFF0000#define PGC_BLUE      0x0000FF#define PGC_PURPLE    0x800080#define PGC_TEAL      0x008080#define PGC_FUCHSIA   0xFF00FF#define PGC_AQUA      0x00FFFF/******************** Global resources *//*! * \defgroup res Global resources * * The PicoGUI server contains several objects allocated globally, that * any client may have limited access to. * * \{ */#define PGRES_DEFAULT_FONT              0#define PGRES_STRING_OK                 1#define PGRES_STRING_CANCEL             2#define PGRES_STRING_YES                3#define PGRES_STRING_NO                 4#define PGRES_STRING_SEGFAULT           5#define PGRES_STRING_MATHERR            6#define PGRES_STRING_PGUIERR            7#define PGRES_STRING_PGUIWARN           8#define PGRES_STRING_PGUIERRDLG         9#define PGRES_STRING_PGUICOMPAT         10#define PGRES_DEFAULT_TEXTCOLORS        11#define PGRES_INFILTER_TOUCHSCREEN      12#define PGRES_INFILTER_KEY_PREPROCESS   13   /* The _PREPROCESS filters convert to					      * logical coordinates and do any extra					      * preprocessing before dispatch					      */#define PGRES_INFILTER_PNTR_PREPROCESS  14#define PGRES_INFILTER_MAGIC            15#define PGRES_INFILTER_KEY_DISPATCH     16   /* The _DISPATCH filters only send events					      * to the widgets. Any unused events					      * pass through them.					      */#define PGRES_INFILTER_PNTR_DISPATCH    17#define PGRES_DEFAULT_CURSORBITMAP      18#define PGRES_DEFAULT_CURSORBITMASK     19#define PGRES_BACKGROUND_WIDGET         20#define PGRES_INFILTER_HOTSPOT          21   /* Recieves global hotspot keys after					      * the dispatch, and sends more events					      * back into the front of the pipe.					      */#define PGRES_INFILTER_KEY_ALPHA        22   /* Processes PGKEY_ALPHA */#define PGRES_INFILTER_PNTR_NORMALIZE   23   /* Runs before PGRES_INFILTER_PNTR_PREPROCESS,					      * handles PNTR_STATUS et al before the touchscreen					      * calibrator gets to the events.					      */#define PGRES_NUM                       24   /* Total number of resources *///! \}//! \}#endif /* __H_PG_CONSTANTS *//* The End */

⌨️ 快捷键说明

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