//初始化
if(initscr() == NULL) {
perror("initcurs")
exit(EXIT_FAILURE)
}
//設(shè)置模式
cbreak()
noecho()
keypad(stdscr, TRUE)
//建立窗口
win = newwin(h, w, 3, 20)
box(win, 0, 0)
keypad(win, TRUE)
wmove(win, cury, curx)
mvaddstr(16, 1, "Press arrow keys to move the cursor within the window.\n")
mvaddstr(17, 1, "Press q to quit.\n")
refresh()
wrefresh(win)
標(biāo)簽:
EXIT_FAILURE
initcurs
initscr
perror
上傳時(shí)間:
2013-12-20
上傳用戶:FreeSky
width = gdk_pixbuf_animation_get_width(ani)
height = gdk_pixbuf_animation_get_height(ani)
current_frame_list = gdk_pixbuf_animation_get_frames(ani)
pixmap = gdk_pixmap_new(w->window, width, height, -1)
clean_pixmap = gdk_pixmap_new(w->window, width, height, -1)
if (w->style->bg_pixmap[GTK_STATE_NORMAL]) {
GdkPixmap *bg = w->style->bg_pixmap[GTK_STATE_NORMAL]
GdkGC *gc
GdkGCValues values
values.tile = bg
values.fill = GDK_TILED
gc = gdk_gc_new_with_values(w->window, &values,
GDK_GC_FILL|GDK_GC_TILE)
gdk_gc_set_ts_origin(gc,
(w->allocation.width - width)/2,
(w->allocation.height-height)/2)
gdk_draw_rectangle(clean_pixmap,gc, TRUE,
0, 0, width, height)
gdk_gc_destroy(gc)
} else {
gdk_draw_rectangle(clean_pixmap,
w->style->bg_gc[GTK_STATE_NORMAL],
TRUE, 0, 0, width, height)
}
標(biāo)簽:
gdk_pixbuf_animation_get_height
gdk_pixbuf_animation_get_width
ani
height
上傳時(shí)間:
2013-12-26
上傳用戶:thinode