קובץ:Xhole.png

תוכן הדף אינו נתמך בשפות אחרות.
מתוך ויקיפדיה, האנציקלופדיה החופשית

Xhole.png(433 × 384 פיקסלים, גודל הקובץ: 8 ק"ב, סוג MIME‏: image/png)

ויקישיתוף זהו קובץ שמקורו במיזם ויקישיתוף. תיאורו בדף תיאור הקובץ המקורי (בעברית) מוצג למטה.

תקציר

תיאור

A window with a hole in the middle. Used to illustrate the X Window shape extension. The decorative frames etc. are generated by twm. The program that creates this window is below; it has been written by User:Tizio, who release it in the public domain. I have took the screenshot myself.

/*
 * xhole.c
 *
 * A sample application using the shape extension.
 * Creates a window with a hole in the middle. Works
 * with twm, fvwm, and mwm, but kde refuses to add
 * a title bar to it.
 * Compile with `gcc xhole.c -o xhole -lX11 -lXext'
 */

#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/extensions/shape.h>

int main(int argc, char* argv[]) {
	Display *d;
	int s;
	Window w;
	Pixmap p;
	GC gw, gp;
	XEvent e;
	int x, y;

	/* open connection with the server */
	d = XOpenDisplay(NULL);
	if (d == NULL) {
		printf("Cannot open display\n");
		exit(1);
	}
	s = DefaultScreen(d);
	gw = DefaultGC(d, s);

	/* create window, select events, map  */
	w = XCreateSimpleWindow(d, RootWindow(d, s), 10, 10, 300, 200, 1,
			BlackPixel(d, s), WhitePixel(d, s));
	XSelectInput(d, w, ExposureMask | KeyPressMask | ButtonPressMask);
	XStoreName(d, w, "XHole");
	XMapWindow(d, w);

	/* create the pixmap that specifies the shape */
	p = XCreatePixmap(d, w, 400, 300, 1);
	gp = XCreateGC(d, p, 0, NULL);
	XSetForeground(d, gp, WhitePixel(d, s));
	XFillRectangle(d, p, gp, 0, 0, 400, 300);
	XSetForeground(d, gp, BlackPixel(d, s));
	XFillArc(d, p, gp, 120, 100, 100, 100, 0, 360*64);

	/* set the pixmap as the new window mask;
	the pixmap is slightly larger than the window
	to allow for the window border and title bar
	(as added by the window manager) to be visible */
	XShapeCombineMask(d, w, ShapeBounding, -20, -50, p, ShapeSet);

	/* event polling loop */
	while (1) {
		XNextEvent(d, &e);
		/* draw or redraw the window */
		if (e.type == Expose) {
			/* not the correct way of drawing text... */
			for (y = 10; y <= 210; y += 11) {
				for (x = 0; x < 300; x += 25) XDrawString(d, w, gw, x, y, "test", 4);
			}
		}

		/* exit on button press */
		if (e.type == ButtonPress)
			break;
	}

	/* close connection to display */
	XCloseDisplay(d);

	return 0;
}

תאריך יצירה ‏2 בינואר 2006‏ (תאריך העלאה מקורי); ‏11 בינואר 2006‏ (last version)
מקור Transferred from en.wikipedia to Commons by User:JohnnyMrNinja using CommonsHelper.
יוצר Tizio at en.wikipedia
אישורים והיתרים
(שימוש חוזר בקובץ זה)
twm is under the MIT License

רישיון

צילום מסך זה אינו מכיל פריטים או חלקים מתוכנה המוגנים בזכויות יוצרים, או שהפריטים המוצגים שוחררו על ידי יוצריהם תחת רישיון חופשי (יש לציינו תחת הודעה זו), ובכך ממלא אחרי הקווים המנחים בוויקישיתוף לגבי צילום מסך.
יש באפשרותך להשתמש בצילום מסך זה בחופשיות בהתאם לרישיון המדובר. רישיון תוכנה חופשית:

קובץ זה נמצא תחת רישיון Expat, הידוע לפעמים בשם רישיון MIT

זכויות יוצרים © היוצר(ים)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The Software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the Software or the use or other dealings in the Software.

למעלה הקובץ: לרישיון MIT יש כמה גרסאות, יכול להיות שתרצה לדייק יותר ברישיון. לחץ {{MIT}} למידע נוסף.

הערה: אם יש בצילום המסך פרטים שאינם תוצר ישיר של קוד התוכנה, כגון טקסט או גרפיקה שאינם חלק מהתוכנה עצמה, חובה לציין בנפרד את הרישיון לפרטים אלו.


Public domain היצירה הזאת שוחררה לנחלת הכלל על־ידי היוצר שלה, Tizio מוויקיפדיה האנגלית. זה תקף בכל העולם.
יש מדינות שבהן הדבר אינו אפשרי על פי חוק, אם כך:
Tizio מעניק לכל אחד את הזכות להשתמש ביצירה הזאת לכל מטרה, ללא שום תנאי, אלא אם כן תנאים כאלה נדרשים לפי החוק.

יומן העלאה מקורי

תיאור הקובץ המקורי נמצא כאן. כל שמות המשתמשים הבאים מתייחסים ל-en.wikipedia.
  • 2006-01-11 20:38 Tizio 433×384×8 (8179 bytes) Cleaner version
  • 2006-01-02 13:08 Tizio 448×387×8 (8253 bytes) A window with a hole in the middle. Used to illustrate the X Window shape extension.

כיתובים

נא להוסיף משפט שמסביר מה הקובץ מייצג

פריטים שמוצגים בקובץ הזה

מוצג

היסטוריית הקובץ

ניתן ללחוץ על תאריך/שעה כדי לראות את הקובץ כפי שנראה באותו זמן.

תאריך/שעהתמונה ממוזערתממדיםמשתמשהערה
נוכחית09:46, 24 ביולי 2008תמונה ממוזערת לגרסה מ־09:46, 24 ביולי 2008‪384 × 433‬ (8 ק"ב)File Upload Bot (Magnus Manske) {{BotMoveToCommons|en.wikipedia}} {{Information |Description={{en|A window with a hole in the middle. Used to illustrate the X Window shape extension. The decorative frames etc. are generated by en:twm. The program that creates this window is below;

אין בוויקיפדיה דפים המשתמשים בקובץ זה.

שימוש גלובלי בקובץ

אתרי הוויקי השונים הבאים משתמשים בקובץ זה: