示例#1
0
/*
 Creates main window
*/
void
launcher_create_window (launcher_core_s *launcher_core)
{
	launcher_core->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	gtk_window_set_default_size (GTK_WINDOW(launcher_core->window), launcher_core->width, launcher_core->height);
	gtk_window_set_resizable (GTK_WINDOW(launcher_core->window), TRUE);
	gtk_widget_set_app_paintable (launcher_core->window, TRUE);
	gtk_window_set_decorated (GTK_WINDOW(launcher_core->window), FALSE);
	on_alpha_screen_changed (launcher_core->window, NULL, NULL);
	gtk_window_stick (GTK_WINDOW(launcher_core->window));
	gtk_window_set_keep_below (GTK_WINDOW(launcher_core->window), TRUE);
	gtk_window_set_modal (GTK_WINDOW(launcher_core->window), FALSE);
	gtk_window_set_type_hint (GTK_WINDOW(launcher_core->window), GDK_WINDOW_TYPE_HINT_DOCK);
}
示例#2
0
文件: input_shape_test.c 项目: 8l/x11
int main (int argc, char** argv)
{
	GtkWidget* pWindow = NULL;
	GdkBitmap* pShapeMaskBitmap = NULL;

	gtk_init (&argc, &argv);

	pWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	on_alpha_screen_changed (pWindow, NULL, NULL);
	gtk_widget_set_app_paintable (pWindow, TRUE);
	gtk_window_set_decorated (GTK_WINDOW (pWindow), FALSE);
	gtk_window_set_resizable (GTK_WINDOW (pWindow), TRUE);
	gtk_window_set_title (GTK_WINDOW (pWindow), "gtk+/XShape 1.1 test");
	gtk_widget_set_size_request (pWindow, g_iCurrentWidth, g_iCurrentHeight);
	gtk_widget_add_events (pWindow, GDK_BUTTON_PRESS_MASK);
	gtk_widget_show (pWindow);

	g_signal_connect (G_OBJECT (pWindow),
					  "destroy",
					  G_CALLBACK (gtk_main_quit),
					  NULL);
	g_signal_connect (G_OBJECT (pWindow),
					  "expose-event",
					  G_CALLBACK (on_expose),
					  NULL);
	g_signal_connect (G_OBJECT (pWindow),
					  "configure-event",
					  G_CALLBACK (on_configure),
					  NULL);
	g_signal_connect (G_OBJECT (pWindow),
					  "key-press-event",
					  G_CALLBACK (on_key_press),
					  NULL);
	g_signal_connect (G_OBJECT (pWindow),
					  "button-press-event",
					  G_CALLBACK (on_button_press),
					  NULL);

	update_input_shape (pWindow, g_iCurrentWidth, g_iCurrentHeight);

	gtk_main ();

	return 0;
}
示例#3
0
/*
 Creates the main window, setting size and position
*/
static void
libgadget_sidebar_create_sidebar (sidebar_core_s *core)
{
	/* Create a new window and set all its proprieties */
	core->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	gtk_window_set_default_size (GTK_WINDOW(core->window), core->width, core->height);
	gtk_widget_set_uposition (GTK_WIDGET(core->window), (core->width_desktop - core->width), 0);
	
	/* Set widget's name */
	gtk_widget_set_name (core->window, "main_window");
	
	gtk_window_set_resizable (GTK_WINDOW(core->window), FALSE);
	gtk_widget_set_app_paintable (core->window, TRUE);
	gtk_window_set_decorated (GTK_WINDOW(core->window), FALSE);
	on_alpha_screen_changed (core->window, NULL, NULL);
	
	gtk_window_stick (GTK_WINDOW(core->window));
	gtk_window_set_keep_below (GTK_WINDOW(core->window), TRUE);
	gtk_window_set_modal (GTK_WINDOW(core->window), FALSE);
	gtk_window_set_type_hint (GTK_WINDOW(core->window), GDK_WINDOW_TYPE_HINT_DOCK);

}