Sponsored Content
Full Discussion: Dummy Questions
Top Forums UNIX for Dummies Questions & Answers Dummy Questions Post 302085450 by slayer666 on Thursday 17th of August 2006 10:21:08 AM
Old 08-17-2006
any idea where can i find basic tutorials ?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Dummy Needs Help

I am ftp-ing (I think) files from one computer to another and I am using the Put command to do this. Is there a way for me to string these commands together and Put several files at once? Thanks, Amy (4 Replies)
Discussion started by: amygdala
4 Replies

2. UNIX for Advanced & Expert Users

Using dummy files

what do you record or look for when using these dummy files to test I/O throughput on disk drives. i have no clue and reading from books sure aint helping much. i know all about the creation and every other thing there is to it but when it comes to actual testing, how do i use them this is... (4 Replies)
Discussion started by: TRUEST
4 Replies

3. UNIX for Dummies Questions & Answers

Unix Dummy

i need to learn unix real quick and i have completely no idea how. could anyone please tell me how to get material to get me going??? I am IT oriented. PLEASE ANY ONE???????????????? :confused: (3 Replies)
Discussion started by: quarmenna
3 Replies

4. Shell Programming and Scripting

Dummy need help :(

This drive me nut, any can show me how to do it ?? str1='Case Modify 10001 20002 30003 40004|Report Create 3417176211|Case Modify 10002 20002 30003 40004' and str2='Case Modify 10001' if str1 ~ str2 then str1='Report Create 3417176211|Case Modify 10002 20002 30003 40004' Thanks, (8 Replies)
Discussion started by: sabercats
8 Replies

5. Shell Programming and Scripting

Dummy questions about how to get the size of a directory by command

Hi, 'ls -ld' is no use .... I want to get the total size of a directory including subdir. Any advice? Thanks in advance (2 Replies)
Discussion started by: GCTEII
2 Replies

6. UNIX for Dummies Questions & Answers

Dummy questions about how to get the size of a directory by command

Hi, 'ls -ld' is no use .... I want to get the total size of a directory. Any advice? Thanks in advance! (4 Replies)
Discussion started by: GCTEII
4 Replies

7. UNIX for Dummies Questions & Answers

more questions froma a dummy

thanks all fro your help on my last question my Unix class is officially my least favorite :( as I am not sure I will ever get it :confused: :eek: . okay so I have a couple more these may seem basic but I had never heard of UNIX untill last week when classes started. first of what does the tty,... (2 Replies)
Discussion started by: cinnamonbear
2 Replies

8. Shell Programming and Scripting

Unix Dummy!

Hi everyone!! i need some help to do the next exercice, if some one can help-me! Perform a script to swap two lines of a file. The name of file as the two line numbers are passed as a parameter. It should be verify that the file exists, have the necessary permits and lines. i try... (3 Replies)
Discussion started by: freixo
3 Replies

9. Homework & Coursework Questions

Print questions from a questions folder in a sequential order

1.) I am to write scripts that will be phasetest folder in the home directory. 2.) The folder should have a set-up,phase and display files I have written a small script which i used to check for the existing users and their password. What I need help with: I have a set of questions in a... (19 Replies)
Discussion started by: moraks007
19 Replies

10. UNIX for Beginners Questions & Answers

Dummy Question

Where can I get UNIX? (1 Reply)
Discussion started by: ciao303
1 Replies
common(3x)						   AfterStep X11 window manager 						common(3x)

NAME
common - common functions used in other examples libAfterImage/tutorials/common.h SYNOPSIS
Generic Xlib related functionality, common for all the tutorials. SEE ALSO
libAfterImage, ASView, ASScale, ASTile, ASMerge, ASGrad, ASFlip, ASText libAfterImage/tutorials/_XA_WM_DELETE_WINDOW NAME_XA_WM_DELETE_WINDOW SYNOPSIS
_XA_WM_DELETE_WINDOW - stores value of X Atom "WM_DELETE_WINDOW". DESCRIPTION
In X all client's top level windows are managed by window manager. That includes moving, resizing, decorating, focusing and closing of windows. Interactions between window manager and client window are governed by ICCCM specification. All the parts of this specification are completely optional, but it is recommended that the following minimum set of hints be supplied for any client window: Window's title(WM_NAME), iconified window title(WM_ICON_NAME), class hint (WM_CLASS) and supported protocols (WM_PROTOCOLS). It is recommended also that WM_DELETE_WINDOW protocol be supported, as otherwise there are no way to safely close client window, but to kill it. All of the above mentioned hints are identified by atoms that have standard preset values, except for WM_DELETE_WINDOW. As the result we need to obtain WM_DELETE_WINDOW atoms ID explicitly. We use _XA_WM_DELETE_WINDOW to store the ID of that atom, so it is accessible anywhere from our application. SOURCE
Atom _XA_WM_DELETE_WINDOW = None; libAfterImage/tutorials/create_top_level_window() NAMEcreate_top_level_window() SYNOPSIS
Window create_top_level_window( ASVisual *asv, Window root, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, unsigned long attr_mask, XSetWindowAttributes *attr, char *app_class ); INPUTS
asv - pointer to valid preinitialized ASVisual structure. root - root window of the screen on which to create window. x, y - desired position of the window width, height - desired window size. border_width - desired initial border width of the window (may not have any effect due to Window Manager intervention. attr_mask - mask of the attributes that has to be set on the window attr - values of the attributes to be set. app_class - title of the application to be used as its window Title and resources class. RETURN VALUE
ID of the created window. DESCRIPTION
create_top_level_window() is autyomating process of creating top level application window. It creates window for specified ASVisual, and then sets up basic ICCCM hints for that window, such as WM_NAME, WM_ICON_NAME, WM_CLASS and WM_PROTOCOLS. SOURCE
Window create_top_level_window( ASVisual *asv, Window root, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, unsigned long attr_mask, XSetWindowAttributes *attr, const char *app_class, const char *app_name ) { Window w = None; #ifndef X_DISPLAY_MISSING char *tmp ; XTextProperty name; XClassHint class1; w = create_visual_window(asv, root, x, y, width, height, border_width, InputOutput, attr_mask, attr ); tmp = (app_name==NULL)?(char*)get_application_name():(char*)app_name; XStringListToTextProperty (&tmp, 1, &name); class1.res_name = tmp; /* for future use */ class1.res_class = (char*)app_class; XSetWMProtocols (asv->dpy, w, &_XA_WM_DELETE_WINDOW, 1); XSetWMProperties (asv->dpy, w, &name, &name, NULL, 0, NULL, NULL, &class1); /* final cleanup */ XFree ((char *) name.value); #endif /* X_DISPLAY_MISSING */ return w; } libAfterImage/tutorials/set_window_background_and_free() NAMEset_window_background_and_free() SYNOPSIS
Pixmap set_window_background_and_free( Window w, Pixmap p ); INPUTS
w - ID of the window background of which we need to set. p - Pixmap to set background to. RETURN VALUE
None on success. Pixmap ID of original Pixmap on failure. DESCRIPTION
set_window_background_and_free() will set window's background to specified Pixmap, Then refresh window contents so that background is drawn by the server, flush all the requests to force it to be sent to server to be processed as fast as possible. NOTES
After Window's background has been set to Pixmap - X server makes hidden copy of this Pixmap for later window refreshing. As the result original Pixmap is no longer needed and can be freed to conserve resources. SOURCE
Pixmap set_window_background_and_free( Window w, Pixmap p ) { #ifndef X_DISPLAY_MISSING if( p != None && w != None ) { Display *dpy = get_default_asvisual()->dpy; if (dpy) { XSetWindowBackgroundPixmap( dpy, w, p ); XClearWindow( dpy, w ); XFlush( dpy ); XFreePixmap( dpy, p ); p = None ; } } #endif /* X_DISPLAY_MISSING */ return p ; } libAfterImage/tutorials/wait_closedown() NAMEwait_closedown() SYNOPSIS
void wait_closedown( Window w ); INPUTS
w - ID of the window from which to wait for events. DESCRIPTION
User action requesting window to be closed is generally received first by Window Manager. Window Manager is then handles it down to the window by sending it ClientMessage event with first 32 bit word of data set to the value of WM_DELETE_WINDOW Atom. Accordingly, all client has to do is wait for such event from X server and, when received, it should destroy its window and generally exit. NOTES
It is recommended that XFlush() is issued right after XDestroyWindow() as Window Manager itself may attempt to do something with the window until it receives DestroyNotify event. SEE ALSO
ICCCM, Window SOURCE
void wait_closedown( Window w ) { #ifndef X_DISPLAY_MISSING Display *dpy = get_default_asvisual()->dpy; if(dpy) { if (w) { XSelectInput (dpy, w, ( StructureNotifyMask | ButtonPressMask| ButtonReleaseMask)); while(w != None) { XEvent event ; XNextEvent (dpy, &event); switch(event.type) { case ClientMessage: if ((event.xclient.format != 32) || (event.xclient.data.l[0] != _XA_WM_DELETE_WINDOW)) break ; case ButtonPress: XDestroyWindow( dpy, w ); XFlush( dpy ); w = None ; break ; } } } XCloseDisplay (dpy); } #endif } 3rd Berkeley Distribution AfterStep v.2.2.11 common(3x)
All times are GMT -4. The time now is 01:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy