?? locale_x11encoding.c
字號:
/* Prints the locale's encoding via libX11. */#include <stdlib.h>#include <stdio.h>#include <assert.h>#include <locale.h>#include <X11/Xlib.h>#include <X11/Xutil.h>int main (int argc, char* argv[]){ Display* display; XTextProperty textprop; char* input; if (argc != 1) exit(1); setlocale(LC_CTYPE,""); display = XOpenDisplay(NULL); if (display == NULL) { fprintf(stderr,"cannot open display\n"); exit(1); } input = ""; if (XmbTextListToTextProperty(display, &input, 1, XTextStyle, &textprop) != Success) { fprintf(stderr,"XmbTextListToTextProperty failed\n"); exit(1); } assert(textprop.format == 8); assert(textprop.nitems == 0); printf("%s\n", XGetAtomName(display, textprop.encoding)); XCloseDisplay(display); exit(0);}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -