handle = OS.gtk_combo_new (); if (handle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (fixedHandle, handle); GtkCombo combo = new GtkCombo (); OS.memmove (combo, handle); entryHandle = combo.entry; listHandle = combo.list;   int  list = OS.gtk_container_get_children (handle); if (list != 0) { int i = 0, count = OS.g_list_length (list); while (i<count) { int  childHandle = OS.g_list_nth_data (list, i); if (childHandle != entryHandle && childHandle != listHandle) { arrowHandle = childHandle; break;
if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) { if ((style & SWT.READ_ONLY) != 0) { handle = OS.gtk_combo_box_new_text (); if (handle == 0) error (SWT.ERROR_NO_HANDLES); } else { handle = OS.gtk_combo_box_entry_new_text (); if (handle == 0) error (SWT.ERROR_NO_HANDLES); entryHandle = OS.gtk_bin_get_child (handle); if (entryHandle == 0) error (SWT.ERROR_NO_HANDLES); } OS.gtk_container_add (fixedHandle, handle); textRenderer = OS.gtk_cell_renderer_text_new (); if (textRenderer == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_cell_layout_clear (handle); OS.gtk_cell_layout_pack_start (handle, textRenderer, true); OS.gtk_cell_layout_set_attributes (handle, textRenderer, OS.text, 0, 0); } else { handle = OS.gtk_combo_new (); if (handle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (fixedHandle, handle); GtkCombo combo = new GtkCombo (); OS.memmove (combo, handle); entryHandle = combo.entry; listHandle = combo.list;   int  list = OS.gtk_container_get_children (handle); if (list != 0) { int i = 0, count = OS.g_list_length (list); while (i<count) { int  childHandle = OS.g_list_nth_data (list, i); if (childHandle != entryHandle && childHandle != listHandle) { arrowHandle = childHandle; break; } i++;
void createHandle (int index) {	state |= HANDLE | MENU;	fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);	if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);	OS.gtk_fixed_set_has_window (fixedHandle, true);	handle = OS.gtk_combo_new ();	if (handle == 0) error (SWT.ERROR_NO_HANDLES);	OS.gtk_container_add (fixedHandle, handle);	GtkCombo combo = new GtkCombo ();	OS.memmove (combo, handle);	entryHandle = combo.entry;	listHandle = combo.list;		/*	* Feature in GTK.  There is no API to query the arrow	* handle from a combo box although it is possible to	* get the list and text field.  The arrow handle is needed	* to hook events.  The fix is to find the first child that is	* not the entry or list and assume this is the arrow handle.	*/	int /*long*/ list = OS.gtk_container_get_children (handle);	if (list != 0) {		int i = 0, count = OS.g_list_length (list);		while (i<count) {			int /*long*/ childHandle = OS.g_list_nth_data (list, i);			if (childHandle != entryHandle && childHandle != listHandle) {				arrowHandle = childHandle;				break;			}			i++;		}		OS.g_list_free (list);	}		boolean editable = (style & SWT.READ_ONLY) == 0;	OS.gtk_editable_set_editable (entryHandle, editable);	OS.gtk_combo_disable_activate (handle);	OS.gtk_combo_set_case_sensitive (handle, true);}