does anyone know what this method of defining a function call is called
Hello, :D
In this one c file I am using to learn by example. ;) they have a switch and the function calls written as such. Code:
switch (bgmode) { How would one know when to use a NULL in place for the real type of data that is suppose to be in there, and what are the numbers denoting, and why some are zeros and some are a number and when to know what number to use to in place of the real data type that is suppose to be in there? So I can eliminate some pot shooting until I get it to work, and still not fully understand what I am doing. Code:
feh_wm_set_bg(NULL, NULL, 1, 0, 0, 0, 1); Code:
static void feh_wm_set_bg_scaled(Pixmap pmap, Imlib_Image im, int use_filelist, int x, int y, int w, int h) and why the different numbers? when, where, and why would one use them(these types of function calls)? oh yes this is also being used in conjunction with a link list if that has anything to do with it. |
The functions aren't being defined; they're being called. The definition is in your third bit of code.
NULL is always used for pointers that point to nothing. Pixmap and Imlib_Image are clearly structures of some kind. You should find them defined in one of the program headers. I would guess that Imlib_Image is probably declared in the header that goes with the imlib/imlib2 library. Structures are nearly always handled by declaring a pointer to them rather than declaring the structure itself. I don't know what the integer variable use_filelist stands for, but my guess is that it's a boolean (1 if a file list is used, 0 if it isn't). x,y,w and h are the standard names for the coordinates of windows and other rectangles: x and y coordinate of the top left hand corner, width and height. |
Quote:
|
Quote:
I think I figured it out, finally, while not even looking for it. Code:
//feh_wm_set_bg(NULL, NULL, 0, 0, 0, 0, 1); |
All times are GMT -5. The time now is 12:09 PM. |