wmcliphist: Remove trailing whitespace.
[dockapps.git] / wmcliphist / foodock / README
blob3b51fc102cac74af91ebe2da287b1bfc68927c98
1 DESCRIPTION:
3 libfoodock is a library for creating Gtk WindowMaker dockable applications.
5 void gdk_window_set_icon(main_window->window, icon_window->window, NULL, NULL);
6 won't do the trick. I suspect it sets up wrong WindowGroupHint.
8 If you create an application using gdk_window_set_icon it probably will not
9 useful under WindowMaker.
11 INSTALLATION:
13 make
14 sudo make install
15 (optional) make example
16 (optional) ./example
17 (optional) sudo make uninstall
19 Please notice that make install will copy the library into LIBPATH (see
20 Makefile). foodock.h will not be copied but you need this file to develop
21 applications using libfoodock.
23 PROGRAMMING:
25 libfoodock contains the only function:
26 GtkWidget *foo_create_main_icon_window(GtkWidget *mw, unsigned int s,
27                                        int margc, char *margv[])
29 You *should* do the following:
31 (1) gtk_init
32 (2) w = gtk_window_new
33 (3) gtk_widget_realize(w)       ! Very important !
34 (4) w1 = foo_create_main_icon_window(w, 56, argc, argv);
35 (5) gtk_widget_show(w1)
36 (6) gtk_main
38 Comments:
39 (2) You should create main application window. Please notice that you will not
40 see this window on the screen; it will be hidden. The only purpose of this
41 window is to provide window group.
42 (3) Because we will do some Xlib lowlevel tricks in
43 foo_create_main_icon_window, main window should be realized or
44 GDK_WINDOW_XWINDOW(w->window) will fail.
45 (4) w1 now is pointer to gtk event box. You may think about w1 as about
46 GTK_CONTAINER which represent docked WindowMaker application. You can put
47 anything inside it. "56" is a recommended size of w1 (because standard
48 WindowMaker dock item is 64x64... but you can try 64 or 60 r 50 or 20...).
49 Please notice that w1 will be realised after foo_create_main_icon_window.
50 argc and argv arguments define what WindowMaker will set up after docking as a
51 command for launching your application.
52 (5) After you put anything you want into w1 you should show w1.
54 Please see example.c for working example.
56 AUTHOR:
58 Alexey Vyskubov, <alexey@pepper.spb.ru>
60 ACKNOWLEDGEMENTS:
62 I should thank:
64 1. Owen Taylor <otaylor@redhat.com>, one of Gtk authors. He answered my request
65 in Gtk mailing list: "Use the function: void gdk_window_set_icon". It allows
66 to understand me that there is no way to do dockable application in Gdk/Gtk
67 w/o Xlib (because gdk_window_set_icon doesn't help, and Gtk author didn't
68 recommend anything else).
70 2. David Raufeisen <lamer@fortyoz.org>. He answered my request in Gtk mailing
71 list with working code. Thanks! An idea to use event box was great.