Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "SWT/Devel/Gtk/os custom"

< SWT‎ | Devel‎ | Gtk
(Created page with "= TODO = * Move some of the sections from comprehensive guide to this section. (SWT fixed etc..) = os custom = os_custom.h and os_custom.c contain custom functionality for S...")
 
m
 
Line 8: Line 8:
  
 
== Printing in os_custom ==
 
== Printing in os_custom ==
Gtk buffers print statements, as such a printf("... \n"); may not print to screen right away (even with "\n" at the end). To get around this use: [http://openbooks.sourceforge.net/books/wga/gtk-gnome-intro.html#AEN65 gtk logging].  
+
Gtk buffers stdout, including print statements, as such a printf("... \n"); may not print to screen right away (even with "\n" at the end). To get around this use: [http://openbooks.sourceforge.net/books/wga/gtk-gnome-intro.html#AEN65 gtk logging].  
  
 
For example:
 
For example:

Latest revision as of 11:12, 2 June 2016

TODO

  • Move some of the sections from comprehensive guide to this section. (SWT fixed etc..)

os custom

os_custom.h and os_custom.c contain custom functionality for SWT. Mainly the SWT Fixed container that is used to have exact sizing for layouts such as grid, form and other layouts.

We rebuild these files manually after each change. (TODO - link to swtjnibuild be here)

Printing in os_custom

Gtk buffers stdout, including print statements, as such a printf("... \n"); may not print to screen right away (even with "\n" at the end). To get around this use: gtk logging.

For example:

void g_print(const gchar *format, ...);
void g_message(const gchar *format, ...);
void g_warning(const gchar *format, ...);
void g_error(const gchar *format, ...);    // << this terminates the application. Useful if you want to kill the app if certain code runs.

Back to the top