예제 #1
0
파일: object.c 프로젝트: amery/clip-itk
int
clip_GTK_SIGNALNEW(ClipMachine *cm)
{
	long   type = _clip_parnl(cm,1);
	char * sig_name = _clip_parc(cm,2);
	WTypeTable *wt_item;

	CHECKARG(1,NUMERIC_t); CHECKARG(2,CHARACTER_t);

	wt_item = _wtype_table_get_by_clip_type(type);
	if (wt_item)
	{
		ExtraSignalTable *s_table;
		if (wt_item->extra_signal_table == NULL)
		{
			wt_item->extra_signal_table = NEW (ExtraSignalTable);
			s_table = wt_item->extra_signal_table;
		}
		else
		{
			for (s_table = wt_item->extra_signal_table; s_table->next; s_table=s_table->next);
			s_table->next = NEW (ExtraSignalTable);
			s_table = s_table->next;
		}
		s_table->signame = sig_name;
		s_table->sigid = _clip_hashstr(sig_name);
//		s_table->sigfunction = extra_signal_handler;
		s_table->emitsigfunction = ESF(extra_signal_emitter);
	}
	return 0;
err:
	return 1;
}
예제 #2
0
   _clip_mputc(cs->cw->cmachine, &cv, HASH_TIPPRIVATE, tip_private, strlen(tip_private));
   _clip_mputn(cs->cw->cmachine, &cv, HASH_BUTTON, event->button);
   _clip_mputn(cs->cw->cmachine, &cv, HASH_X, event->x);
   _clip_mputn(cs->cw->cmachine, &cv, HASH_Y, event->y);
   _clip_mputn(cs->cw->cmachine, &cv, HASH_XROOT, event->x_root);
   _clip_mputn(cs->cw->cmachine, &cv, HASH_YROOT, event->y_root);
   _clip_mputn(cs->cw->cmachine, &cv, HASH_STATE, event->state);
   FREE_TEXT(tip_text);
   FREE_TEXT(tip_private);
   INVOKESIGHANDLER(widget, cs, cv);
}

/* Signals table */
static SignalTable tips_query_signals[] = {
  /* Emitted when the query is started. */
   {"start-query", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_START_QUERY_SIGNAL},
  /* Emitted when the query is stopped. */
   {"stop-query", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_STOP_QUERY_SIGNAL},
  /* Emitted when a widget is entered by the pointer while the query is in effect. */
   {"widget-entered", GSF(handle_widget_entered_signal),
    ESF(object_emit_signal), GTK_WIDGET_ENTERED_SIGNAL},
  /* Emitted when a widget is selected during a query. */
   {"widget-selected", GSF(handle_widget_selected_signal),
    ESF(object_emit_signal), GTK_WIDGET_SELECTED_SIGNAL},
   {"", NULL, NULL, 0}
};

/**********************************************************/
CLIP_DLLEXPORT GtkType
예제 #3
0
파일: ctree.c 프로젝트: amery/clip-itk
	if (cnewparent) _clip_madd(cs->cw->cmachine, &cv, HASH_NEWPARENT, &cnewparent->obj);
	if (cnewsibling) _clip_madd(cs->cw->cmachine, &cv, HASH_NEWSIBLING, &cnewsibling->obj);
	INVOKESIGHANDLER(widget,cs,cv);
}

gint handle_change_focus_row_expansion_signal (GtkWidget *widget, GtkCTreeExpansionType action, C_signal *cs)
{
	PREPARECV(cs,cv);
	_clip_mputn(cs->cw->cmachine, &cv, HASH_ACTION, action);
	INVOKESIGHANDLER(widget,cs,cv);
}

/* Signals table */
static SignalTable ctree_signals[] =
{
	{"tree-select-row",	GSF( handle_tree_select_row_signal ), ESF( object_emit_signal ), GTK_TREE_SELECT_ROW_SIGNAL},
	{"tree-unselect-row",	GSF( handle_tree_unselect_row_signal ), ESF( object_emit_signal ), GTK_TREE_UNSELECT_ROW_SIGNAL},
	{"tree-expand",		GSF( handle_tree_expand_signal ), ESF( object_emit_signal ), GTK_TREE_EXPAND_SIGNAL},
	{"tree-collapse",	GSF( handle_tree_collapse_signal ), ESF( object_emit_signal ), GTK_TREE_COLLAPSE_SIGNAL},
	{"tree-move",		GSF( handle_tree_move_signal ), ESF( object_emit_signal ), GTK_TREE_MOVE_SIGNAL},
	{"change-focus-row-expansion", 	GSF( handle_change_focus_row_expansion_signal ), ESF( object_emit_signal ), GTK_CHANGE_FOCUS_ROW_EXPANSION_SIGNAL},
	{"", NULL, NULL, 0}
};

/**********************************************************/

/* Register CTree in global table */
CLIP_DLLEXPORT GtkType _gtk_type_ctree() { return GTK_TYPE_CTREE; }
long _clip_type_ctree() { return GTK_WIDGET_CTREE; }
const char * _clip_type_name_ctree() { return "GTK_WIDGET_CTREE"; }
예제 #4
0
#include "ci_clip-gtk2.ch"
#include "ci_clip-gtk2.h"

/*********************** SIGNALS **************************/

/* Signals table */
static    gint
handler_signal(GtkFileChooser * filech, C_signal * cs)
{
   OBJECTPREPARECV(cs, cv);
   OBJECTINVOKESIGHANDLER(cs, cv);
}

static SignalTable file_chooser_signals[] = {
   {"current-folder-changed", GSF(handler_signal), ESF(object_emit_signal),
    GTK_CURRENT_FOLDER_CHANGED_SIGNAL},
   {"file-activated", GSF(handler_signal), ESF(object_emit_signal),
    GTK_FILE_ACTIVATED_SIGNAL},
   {"selection-changed", GSF(handler_signal), ESF(object_emit_signal),
    GTK_SELECTION_CHANGED_SIGNAL},
   {"update-preview", GSF(handler_signal), ESF(object_emit_signal),
    GTK_UPDATE_PREVIEW_SIGNAL},
   {"", NULL, NULL, 0}
};

/**********************************************************/
CLIP_DLLEXPORT GtkType
_gtk_type_file_chooser()
{
   return GTK_TYPE_FILE_CHOOSER;
예제 #5
0
파일: socket.c 프로젝트: amery/clip-itk
    License : (GPL) http://www.itk.ru/clipper/license.html
*/
#include "hashcode.h"
#include "clip.h"
#include "clip-gtkcfg2.h"

#include <gtk/gtk.h>

#include "clip-gtk2.ch"
#include "clip-gtk2.h"

/**********************************************************/
/* Signals table */
static SignalTable socket_signals[] =
{
	{"plug-added",	GSF( widget_signal_handler ),	ESF( object_emit_signal ), GTK_PLUG_ADDED_SIGNAL},
	{"plug-removed",GSF( widget_signal_handler ),	ESF( object_emit_signal ), GTK_PLUG_REMOVED_SIGNAL},
	{"", NULL, NULL, 0}
};

/* Register widget signals table in global table */
CLIP_DLLEXPORT GtkType _gtk_type_socket() { return GTK_TYPE_SOCKET; }
long _clip_type_socket() { return GTK_WIDGET_SOCKET; }
const char * _clip_type_name_socket() { return "GTK_WIDGET_SOCKET"; }

int
clip_INIT___SOCKET(ClipMachine *cm)
{
	_wtype_table_put(_clip_type_socket, _clip_type_name_socket, _gtk_type_socket,  _gtk_type_container, socket_signals);
	return 0;
}
예제 #6
0
파일: menushell.c 프로젝트: amery/clip-itk
static gint handle_activate_current_signal (GtkWidget *widget, gboolean force_hide, C_signal *cs)
{
	PREPARECV(cs,cv);
        _clip_mputl(cs->cw->cmachine, &cv, HASH_FORCEHIDE, force_hide);
        INVOKESIGHANDLER(widget,cs,cv);
}
static gint handle_cycle_focus_signal (GtkWidget *widget, GtkDirectionType direction, C_signal *cs)
{
	PREPARECV(cs,cv);
        _clip_mputn(cs->cw->cmachine, &cv, HASH_DIRECTION, direction);
        INVOKESIGHANDLER(widget,cs,cv);
}

static SignalTable menushell_signals[] =
{
	{"deactivate",		GSF( widget_signal_handler ), ESF( object_emit_signal ), GTK_DEACTIVATE_SIGNAL},
	{"selection-done",	GSF( widget_signal_handler ), ESF( object_emit_signal ), GTK_SELECTION_DONE_SIGNAL},
	{"move-current",	GSF( handle_move_current_signal ), ESF( object_emit_signal ), GTK_MOVE_CURRENT_SIGNAL},
	{"activate-current",	GSF( handle_activate_current_signal ), ESF( object_emit_signal ), GTK_ACTIVATE_CURRENT_SIGNAL},
	{"cycle-focus",		GSF( handle_cycle_focus_signal  ), ESF( object_emit_signal ), GTK_CYCLE_FOCUS_SIGNAL},
	{"cancel",		GSF( widget_signal_handler ), ESF( object_emit_signal ), GTK_CANCEL_SIGNAL},
	{"", NULL, NULL, 0}
};

/* Register menu shell signals table in global table */
CLIP_DLLEXPORT GtkType _gtk_type_menu_shell() { return GTK_TYPE_MENU_SHELL; }
long _clip_type_menu_shell() { return GTK_WIDGET_MENU_SHELL; }
const char * _clip_type_name_menu_shell() { return "GTK_WIDGET_MENU_SHELL"; }

int
clip_INIT___MENU_SHELL(ClipMachine *cm)
예제 #7
0
   GtkScrollType scroll_type = _clip_parni(ClipMachineMemory, 3);

   gfloat    position = _clip_parnd(ClipMachineMemory, 4);

   CHECKOPT(3, NUMERIC_type_of_ClipVarType);
   CHECKOPT(4, NUMERIC_type_of_ClipVarType);
   gtk_signal_emit_by_name(GTK_OBJECT(cwid->widget), signal_name, scroll_type, position, cwid);
   return 0;
 err:
   return 1;
}

/* Signals table */
static SignalTable list_item_signals[] = {
   {"toggle-focus-row", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_TOGGLE_FOCUS_ROW_SIGNAL},
   {"select-all", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_SELECT_ALL_SIGNAL},
   {"unselect-all", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_UNSELECT_ALL_SIGNAL},
   {"undo-selection", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_UNDO_SELECTION_SIGNAL},
   {"start-selection", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_START_SELECTION_SIGNAL},
   {"end-selection", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_END_SELECTION_SIGNAL},
   {"toggle-add-mode", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_TOGGLE_ADD_MODE_SIGNAL},
   {"extend-selection", GSF(handle_extend_selection_signal),
    ESF(emit_extend_selection_signal), GTK_EXTEND_SELECTION_SIGNAL},
예제 #8
0
파일: fontcombo.c 프로젝트: amery/clip-itk
#include "clip-gtkextracfg.h"

#include <gtkextra/gtkextra.h>
#include <string.h>

#include "clip-gtk.ch"
#include "clip-gtk.h"

#include "clip-gtkextra.ch"
#include "clip-gtkextra.h"

/**********************************************************/
/* Signals table */
static SignalTable font_combo_signals[] =
{
	{"changed",		GSF( widget_signal_handler ), ESF( object_emit_signal ), GTK_CHANGED_SIGNAL },
	{"", NULL, NULL, 0}
};

/**********************************************************/

/* Register FontCombo in global table */
CLIP_DLLEXPORT GtkType _gtk_type_font_combo() { return gtk_font_combo_get_type(); }
long _clip_type_font_combo() { return GTK_WIDGET_FONT_COMBO; }
const char * _clip_type_name_font_combo() { return "GTK_WIDGET_FONT_COMBO"; }

int
clip_INIT___FONT_COMBO(ClipMachine *cm)
{
	_wtype_table_put(_clip_type_font_combo, _clip_type_name_font_combo, _gtk_type_font_combo, _gtk_type_toolbar, font_combo_signals);
	return 0;
예제 #9
0
   OBJECTPREPARECV(cs, cv);
   cmodell = _list_get_cobject(cs->co->cmachine, model);
   if (!cmodell)
      cmodell = _register_object(cs->co->cmachine, model, GTK_TYPE_TREE_MODEL, NULL, NULL);
   _clip_madd(cs->co->cmachine, &cv, HASH_TREEMODEL, &cmodell->obj);

   citer = _list_get_cobject(cs->co->cmachine, iter);
   if (!citer)
      citer = _register_object(cs->co->cmachine, iter, GTK_TYPE_TREE_ITER, NULL, NULL);
   _clip_madd(cs->co->cmachine, &cv, HASH_TREEITER, &citer->obj);
   OBJECTINVOKESIGHANDLER(cs, cv);
}

static SignalTable entry_completion_signals[] = {
   {"action-activated", GSF(handle_action_activated_signal),
    ESF(object_emit_signal), GTK_ACTION_ACTIVATED_SIGNAL},
   {"match-selected", GSF(handle_match_selected_signal),
    ESF(object_emit_signal), GTK_MATCH_SELECTED_SIGNAL},
   {"", NULL, NULL, 0}
};

/**********************************************************/
CLIP_DLLEXPORT GtkType
_gtk_type_entry_completion()
{
   return GTK_TYPE_ENTRY_COMPLETION;
}

long
_clip_type_entry_completion()
{
예제 #10
0
    Author  : Alexey M. Tkachenko <*****@*****.**>
    License : (GPL) http://www.itk.ru/clipper/license.html
*/
#include "ci_hashcode.h"
#include "ci_clip.h"
#include "ci_clip-gtkcfg.h"

#include <gtk/gtk.h>

#include "ci_clip-gtk.ch"
#include "ci_clip-gtk.h"

/**********************************************************/
/* Signals table */
static SignalTable tree_item_signals[] = {
   {"collapse", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_COLLAPSE_SIGNAL},
   {"expand", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_EXPAND_SIGNAL},
   {"", NULL, NULL, 0}
};

/* Register item signals table in global table */
CLIP_DLLEXPORT GtkType
_gtk_type_tree_item()
{
   return GTK_TYPE_TREE_ITEM;
}

long
_clip_type_tree_item()
예제 #11
0
#include "ci_clip-gtkextra.ch"
#include "ci_clip-gtkextra.h"

/**********************************************************/
static    gint
handle_changed_signal(GtkWidget * widget, gint row, gint col, C_signal * cs)
{
   PREPARECV(cs, cv);
   _clip_mputn(cs->cw->cmachine, &cv, HASH_ROW, row + 1);
   _clip_mputn(cs->cw->cmachine, &cv, HASH_COL, col + 1);
   INVOKESIGHANDLER(widget, cs, cv);
}

/* Signals table */
static SignalTable toggle_combo_signals[] = {
   {"changed", GSF(handle_changed_signal), ESF(object_emit_signal), GTK_CHANGED_SIGNAL},
   {"", NULL, NULL, 0}
};

/**********************************************************/

/* Register ColorCombo in global table */
CLIP_DLLEXPORT GtkType
_gtk_type_toggle_combo()
{
   return gtk_toggle_combo_get_type();
}

long
_clip_type_toggle_combo()
{
예제 #12
0
파일: item.c 프로젝트: amery/clip-angelo
    Author  : Alexey M. Tkachenko <*****@*****.**>
    License : (GPL) http://www.itk.ru/clipper/license.html
*/
#include "ci_hashcode.h"
#include "ci_clip.h"
#include "ci_clip-gtkcfg2.h"

#include <gtk/gtk.h>

#include "ci_clip-gtk2.ch"
#include "ci_clip-gtk2.h"

/**********************************************************/
/* Signals table */
static SignalTable item_signals[] = {
   {"select", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_SELECT_SIGNAL},
   {"toggle", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_TOGGLE_SIGNAL},
   {"deselect", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_DESELECT_SIGNAL},
   {"", NULL, NULL, 0}
};

/* Register item signals table in global table */
CLIP_DLLEXPORT GtkType
_gtk_type_item()
{
   return GTK_TYPE_ITEM;
}
예제 #13
0
#include "ci_clip-gtk2.ch"
#include "ci_clip-gtk2.h"

/*********************** SIGNALS **************************/

/* Signals table */
static    gint
handle_toggled_signal(GtkToggleAction * action, C_signal * cs)
{
   OBJECTPREPARECV(cs, cv);
   OBJECTINVOKESIGHANDLER(cs, cv);
}

static SignalTable toggle_action_signals[] = {
   {"toggled", GSF(handle_toggled_signal), ESF(object_emit_signal),
    GTK_TOGGLED_SIGNAL},
   {"", NULL, NULL, 0}
};

/**********************************************************/
CLIP_DLLEXPORT GtkType
_gtk_type_toggle_action()
{
   return GTK_TYPE_TOGGLE_ACTION;
}

long
_clip_type_toggle_action()
{
   return GTK_OBJECT_TOGGLE_ACTION;
예제 #14
0
handle_size_allocate_signal(GtkMenuItem * menuitem, gint size_allocate, C_signal * cs)
{
   PREPARECV(cs, cv);
   _clip_mputn(cs->cw->cmachine, &cv, HASH_SIZE_ALLOCATE, size_allocate);
   INVOKESIGHANDLER(GTK_WIDGET(menuitem), cs, cv);
}

static    gint
handle_size_request_signal(GtkMenuItem * menuitem, gpointer data, C_signal * cs)
{
   PREPARECV(cs, cv);
   INVOKESIGHANDLER(GTK_WIDGET(menuitem), cs, cv);
}

static SignalTable menu_item_signals[] = {
   {"activate", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_ACTIVATE_SIGNAL},
   {"activate-item", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_ACTIVATE_ITEM_SIGNAL},
   {"toggle-size-allocate", GSF(handle_size_allocate_signal),
    ESF(object_emit_signal), GTK_TOGGLE_SIZE_ALLOCATE_SIGNAL},
   {"toggle-size-request", GSF(handle_size_request_signal),
    ESF(object_emit_signal), GTK_TOGGLE_SIZE_REQUEST_SIGNAL},
   {"", NULL, NULL, 0}
};

/* Register menu item signals table in global table */
CLIP_DLLEXPORT GtkType
_gtk_type_menu_item()
{
   return GTK_TYPE_MENU_ITEM;
예제 #15
0
파일: list.c 프로젝트: amery/clip-angelo
{
   ClipMachine *ClipMachineMemory = clist->cmachine;

   C_widget *cwid = _fetch_cwidget(ClipMachineMemory, _clip_spar(ClipMachineMemory, 3));

   CHECKARG2(3, MAP_type_of_ClipVarType, NUMERIC_type_of_ClipVarType);
   CHECKCWID(cwid, GTK_IS_WIDGET);
   gtk_signal_emit_by_name(GTK_OBJECT(clist->widget), signal_name, cwid->widget, clist);
   return 0;
 err:
   return 1;
}

/* Signals table */
static SignalTable list_signals[] = {
   {"selection-changed", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_SELECTION_CHANGED_SIGNAL},
   {"select-child", GSF(handle_select_child_signal), ESF(list_emit_signal),
    GTK_SELECT_CHILD_SIGNAL},
   {"unselect-child", GSF(handle_unselect_child_signal),
    ESF(list_emit_signal), GTK_UNSELECT_CHILD_SIGNAL},
   {"", NULL, NULL, 0}
};

/**********************************************************/

/* Register List in global table */
CLIP_DLLEXPORT GtkType
_gtk_type_list()
{
   return GTK_TYPE_LIST;
예제 #16
0
파일: listitem.c 프로젝트: amery/clip-itk
	ClipMachine               *cm = cwid->cmachine;
        GtkScrollType     scroll_type = _clip_parni(cm,3);
        gfloat               position = _clip_parnd(cm,4);
        CHECKOPT(3,NUMERIC_t); CHECKOPT(4,NUMERIC_t);
        gtk_signal_emit_by_name(GTK_OBJECT(cwid->widget),signal_name,
        	scroll_type,position,
        	cwid);
	return 0;
err:
	return 1;
}

/* Signals table */
static SignalTable list_item_signals[] =
{
	{"toggle-focus-row",	GSF( widget_signal_handler ), ESF( object_emit_signal ), GTK_TOGGLE_FOCUS_ROW_SIGNAL },
	{"select-all",		GSF( widget_signal_handler ), ESF( object_emit_signal ), GTK_SELECT_ALL_SIGNAL       },
	{"unselect-all",	GSF( widget_signal_handler ), ESF( object_emit_signal ), GTK_UNSELECT_ALL_SIGNAL     },
	{"undo-selection",	GSF( widget_signal_handler ), ESF( object_emit_signal ), GTK_UNDO_SELECTION_SIGNAL   },
	{"start-selection",	GSF( widget_signal_handler ), ESF( object_emit_signal ), GTK_START_SELECTION_SIGNAL  },
	{"end-selection",	GSF( widget_signal_handler ), ESF( object_emit_signal ), GTK_END_SELECTION_SIGNAL    },
	{"toggle-add-mode",	GSF( widget_signal_handler ), ESF( object_emit_signal ), GTK_TOGGLE_ADD_MODE_SIGNAL  },
	{"extend-selection",	GSF( handle_extend_selection_signal  ), ESF( emit_extend_selection_signal ), GTK_EXTEND_SELECTION_SIGNAL },
	{"scroll-vertical",	GSF( handle_scroll_vertical_signal   ), ESF( emit_scroll_signal ), GTK_SCROLL_VERTICAL_SIGNAL  },
	{"scroll-horizontal",	GSF( handle_scroll_horizontal_signal ), ESF( emit_scroll_signal ), GTK_SCROLL_HORIZONTAL_SIGNAL},
	{"", NULL, NULL, 0}
};

/**********************************************************/

/* Register ListItem in global table */
예제 #17
0
   _clip_mputn(cs->cw->cmachine, &mpage, HASH_DEFAULTTAB, page->default_tab);
   _clip_mputn(cs->cw->cmachine, &mpage, HASH_EXPAND, page->expand);
   _clip_mputn(cs->cw->cmachine, &mpage, HASH_PACK, page->pack);
   _clip_mputn(cs->cw->cmachine, &mpage, HASH_FILL, page->fill);
   _clip_madd(cs->cw->cmachine, &cv, HASH_PAGE, &mpage);
   _clip_mputn(cs->cw->cmachine, &cv, HASH_PAGENUM, page_num + 1);
   ret = handle_signals(GTK_WIDGET(notebook), cs, &cv);
   _clip_destroy(cs->cw->cmachine, &cv);
   _clip_destroy(cs->cw->cmachine, &mpage);
   _clip_destroy(cs->cw->cmachine, &mreq);
   _clip_destroy(cs->cw->cmachine, &mallc);
   return ret;
}

static SignalTable notebook_signals[] = {
   {"switch-page", GSF(handle_switch_page_signal), ESF(object_emit_signal),
    GTK_SWITCH_PAGE_SIGNAL},
   {"", NULL, NULL, 0}
};

/* Register notebook in global table */
CLIP_DLLEXPORT GtkType
_gtk_type_notebook()
{
   return GTK_TYPE_NOTEBOOK;
}

long
_clip_type_notebook()
{
   return GTK_WIDGET_NOTEBOOK;
예제 #18
0
파일: viewport.c 프로젝트: amery/clip-itk
  {
	C_widget *cwid;
	PREPARECV(cs,cv);
	cwid = _list_get_cwidget(cs->cw->cmachine,GTK_WIDGET(hadj));
	if (!cwid) cwid = _register_widget(cs->cw->cmachine,GTK_WIDGET(hadj),NULL);
	if (cwid) _clip_madd(cs->cw->cmachine, &cv, HASH_HADJ, &cwid->obj);
	cwid = _list_get_cwidget(cs->cw->cmachine,GTK_WIDGET(vadj));
	if (!cwid) cwid = _register_widget(cs->cw->cmachine,GTK_WIDGET(vadj),NULL);
	if (cwid) _clip_madd(cs->cw->cmachine, &cv, HASH_VADJ, &cwid->obj);
	INVOKESIGHANDLER(GTK_WIDGET(viewport),cs,cv);
  }

static SignalTable viewport_signals[] =
{
	/* signals */
	{"set-scroll-adjustments",GSF( handler_set_scroll_adjustments ),	ESF( object_emit_signal ), GTK_SET_SCROLL_ADJUSTMENTS_SIGNAL},
	{"", NULL, NULL, 0}
};


/* Register Viewport in global table */
CLIP_DLLEXPORT GtkType _gtk_type_viewport() { return GTK_TYPE_VIEWPORT; }
long _clip_type_viewport() { return GTK_WIDGET_VIEWPORT; }
const char * _clip_type_name_viewport() { return "GTK_WIDGET_VIEWPORT"; }

int
clip_INIT___VIEWPORT(ClipMachine *cm)
{
	//_wtype_table_put(_clip_type_viewport, _clip_type_name_viewport, _gtk_type_viewport, _gtk_type_container, viewport_signals);
	_wtype_table_put(_clip_type_viewport, _clip_type_name_viewport, _gtk_type_viewport, _gtk_type_bin, viewport_signals);
	return 0;
예제 #19
0
    License : (GPL) http://www.itk.ru/clipper/license.html
*/
#include "ci_hashcode.h"
#include "ci_clip.h"
#include "ci_clip-gtkcfg2.h"

#include <gtk/gtk.h>

#include "ci_clip-gtk2.ch"
#include "ci_clip-gtk2.h"

/**********************************************************/
/* Signals table */
static SignalTable calendar_signals[] = {
  /* Emitted when the user clicks a button to change the selected month on a calendar. */
   {"month-changed", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_MONTH_CHANGED_SIGNAL},
  /* Emitted when the user selects a day. */
   {"day-selected", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_DAY_SELECTED_SIGNAL},
   {"day-selected-double-click", GSF(widget_signal_handler),
    ESF(object_emit_signal), GTK_DAY_SELECTED_DOUBLE_CLICK_SIGNAL},
   {"prev-month", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_PREV_MONTH_SIGNAL},
   {"next-month", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_NEXT_MONTH_SIGNAL},
   {"prev-year", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_PREV_YEAR_SIGNAL},
   {"next-year", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_NEXT_YEAR_SIGNAL},
   {"", NULL, NULL, 0}
예제 #20
0
파일: window.c 프로젝트: amery/clip-itk
#include "clip-gtk.h"

/*********************** SIGNALS **************************/
static gint handle_set_focus_signal (GtkWindow *window, GtkWidget *widget, C_signal *cs)
  {
	C_widget *cwid;
	PREPARECV(cs,cv);
	cwid = _list_get_cwidget(cs->cw->cmachine,widget);
	if (!cwid) cwid = _register_widget(cs->cw->cmachine,widget,NULL);
	if (cwid) _clip_madd(cs->cw->cmachine, &cv, HASH_WIDGET, &cwid->obj);
	INVOKESIGHANDLER(widget,cs,cv);
  }

static SignalTable window_signals[] =
{
	{"set-focus",	GSF( handle_set_focus_signal ), ESF( object_emit_signal ), GTK_SET_FOCUS_SIGNAL},
	{"", NULL, NULL, 0}
};

/* Register widget signals table in global table */
CLIP_DLLEXPORT GtkType _gtk_type_window() { return GTK_TYPE_WINDOW; }
long _clip_type_window() { return GTK_WIDGET_WINDOW; }
const char * _clip_type_name_window() { return "GTK_WIDGET_WINDOW"; }

int
clip_INIT___WINDOW(ClipMachine *cm)
{
	_wtype_table_put(_clip_type_window, _clip_type_name_window, _gtk_type_window, _gtk_type_container, window_signals);
	return 0;
}
/**********************************************************/
예제 #21
0
파일: button.c 프로젝트: amery/clip-angelo
    License : (GPL) http://www.itk.ru/clipper/license.html
*/
#include "ci_hashcode.h"
#include "ci_clip.h"
#include "ci_clip-gtkcfg.h"

#include <gtk/gtk.h>

#include "ci_clip-gtk.ch"
#include "ci_clip-gtk.h"

/**********************************************************/
/* Signals table */
static SignalTable button_signals[] = {
    /* Emitted when the button is initially pressed */
    {   "pressed", GSF(widget_signal_handler), ESF(object_emit_signal),
        GTK_PRESSED_SIGNAL
    },
    /* Emitted when a button which is pressed is released,
     * no matter where the mouse cursor is                 */
    {   "released", GSF(widget_signal_handler), ESF(object_emit_signal),
        GTK_RELEASED_SIGNAL
    },
    /* Emitted when a button clicked on by the mouse and the cursor stays on
     * the button. If the cursor is not on the button when the
     * mouse button is released, the signal is not emitted */
    //{"clicked",   GSF( handle_clicked_signal ),   ESF( object_emit_signal ), GTK_CLICKED_SIGNAL},
    {   "clicked", GSF(widget_signal_handler), ESF(object_emit_signal),
        GTK_CLICKED_SIGNAL
    },
    /* Emitted when the mouse cursor enters the region of the button */
예제 #22
0
파일: adjustment.c 프로젝트: amery/clip-itk
    License : (GPL) http://www.itk.ru/clipper/license.html
*/
#include "hashcode.h"
#include "clip.h"
#include "clip-gtkcfg2.h"

#include <gtk/gtk.h>

#include "clip-gtk2.ch"
#include "clip-gtk2.h"

/**********************************************************/
/* Signals table */
static SignalTable adj_signals[] =
{
	{"changed",		GSF( widget_signal_handler ), ESF( object_emit_signal ), GTK_CHANGED_SIGNAL},
	{"value-changed",	GSF( widget_signal_handler ), ESF( object_emit_signal ), GTK_VALUE_CHANGED_SIGNAL},
	{"", NULL, NULL, 0}
};

static SignalTable data_signals[] =
{
	{"disconnect",		GSF( widget_signal_handler ), ESF( object_emit_signal ), GTK_DISCONNECT_SIGNAL},
	{"", NULL, NULL, 0}
};

/**********************************************************/

/* Register adjustment in global table */
CLIP_DLLEXPORT GtkType _gtk_type_adjustment() { return GTK_TYPE_ADJUSTMENT; }
long _clip_type_adjustment() { return GTK_WIDGET_ADJUSTMENT; }
예제 #23
0
파일: notebook.c 프로젝트: amery/clip-itk
	_clip_mputn(cs->cw->cmachine, &mpage, HASH_DEFAULTMENU, page->default_menu);
	_clip_mputn(cs->cw->cmachine, &mpage, HASH_DEFAULTTAB, page->default_tab);
	_clip_mputn(cs->cw->cmachine, &mpage, HASH_EXPAND, page->expand);
	_clip_mputn(cs->cw->cmachine, &mpage, HASH_PACK, page->pack);
	_clip_mputn(cs->cw->cmachine, &mpage, HASH_FILL, page->fill);
	_clip_madd (cs->cw->cmachine, &cv, HASH_PAGE, &mpage);
	_clip_mputn(cs->cw->cmachine, &cv, HASH_PAGENUM, page_num+1);
	ret = handle_signals (GTK_WIDGET(notebook), cs, &cv);
	_clip_destroy(cs->cw->cmachine, &cv); _clip_destroy(cs->cw->cmachine,&mpage);
	_clip_destroy(cs->cw->cmachine,&mreq); _clip_destroy(cs->cw->cmachine,&mallc);
	return ret;
}

static SignalTable notebook_signals[] =
{
	{"change-current-page",	GSF( handle_change_current_page_signal ), ESF( object_emit_signal ), GTK_CHANGE_CURRENT_PAGE_SIGNAL},
	{"move-focus-out",	GSF( handle_move_focus_out_signal ), ESF( object_emit_signal ), GTK_MOVE_FOCUS_OUT_SIGNAL},
	{"select-page",		GSF( handle_select_page_signal ), ESF( object_emit_signal ), GTK_SELECT_PAGE_SIGNAL},
	{"switch-page",		GSF( handle_switch_page_signal ), ESF( object_emit_signal ), GTK_SWITCH_PAGE_SIGNAL},
	{"", NULL, NULL, 0}
};

/* Register notebook in global table */
CLIP_DLLEXPORT GtkType _gtk_type_notebook() { return GTK_TYPE_NOTEBOOK; }
long _clip_type_notebook() { return GTK_WIDGET_NOTEBOOK; }
const char * _clip_type_name_notebook() { return "GTK_WIDGET_NOTEBOOK"; }

int
clip_INIT___NOTEBOOK(ClipMachine *cm)
{
	_wtype_table_put(_clip_type_notebook, _clip_type_name_notebook, _gtk_type_notebook, _gtk_type_container, notebook_signals);
예제 #24
0
handle_activate_signal(GtkUIManager * manager, GtkAction * action, C_signal * cs)
{
   C_object *cact;

   OBJECTPREPARECV(cs, cv);
   cact = _list_get_cobject(cs->co->cmachine, action);
   if (!cact)
      cact = _register_object(cs->co->cmachine, action, GTK_TYPE_ACTION, NULL, NULL);
   if (cact)
      _clip_madd(cs->co->cmachine, &cv, HASH_ACTION, &cact->obj);
   OBJECTINVOKESIGHANDLER(cs, cv);
}

static SignalTable ui_manager_signals[] = {
   {"actions-changed", GSF(handle_actions_changed_signal),
    ESF(object_emit_signal), GTK_ACTIONS_CHANGED_SIGNAL},
   {"add-widget", GSF(handle_add_widget_signal), ESF(object_emit_signal),
    GTK_ADD_WIDGET_SIGNAL},
   {"connect-proxy", GSF(handle_proxy_signal), ESF(object_emit_signal),
    GTK_CONNECT_PROXY_SIGNAL},
   {"disconnect-proxy", GSF(handle_proxy_signal), ESF(object_emit_signal),
    GTK_DISCONNECT_PROXY_SIGNAL},
   {"post-activate", GSF(handle_activate_signal), ESF(object_emit_signal),
    GTK_POST_ACTIVATE_SIGNAL},
   {"pre-activate", GSF(handle_activate_signal), ESF(object_emit_signal),
    GTK_PRE_ACTIVATE_SIGNAL},
   {"", NULL, NULL, 0}
};

/**********************************************************/
CLIP_DLLEXPORT GtkType
예제 #25
0
파일: extext.c 프로젝트: amery/clip-angelo
#include <string.h>

#include "ci_clip-gtk.ch"
#include "ci_clip-gtk.h"
#include "ci_clip-gdk.h"
#include "ci_gtk1extext.h"
#include "ci_bmpxpm.h"

#ifdef OS_CYGWIN
#include "sys\cygwin.h"
#endif

/**********************************************************/
/* Signals table */
static SignalTable extext_signals[] = {
   {"insert-text", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_INSERT_TEXT_SIGNAL},
   {"delete-text", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_DELETE_TEXT_SIGNAL},
   {"changed", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_CHANGED_SIGNAL},
   {"move-to-row", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_MOVE_TO_ROW_SIGNAL},
   {"move-to-column", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_MOVE_TO_COLUMN_SIGNAL},
   {"cut-clipboard", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_CUT_CLIPBOARD_SIGNAL},
   {"copy-clipboard", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_COPY_CLIPBOARD_SIGNAL},
   {"paste-clipboard", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_PASTE_CLIPBOARD_SIGNAL},
예제 #26
0
파일: dialog.c 프로젝트: amery/clip-angelo
{
   ClipMachine *ClipMachineMemory = cidial->cmachine;

   gint      deviceid = _clip_parni(ClipMachineMemory, 3);

   CHECKARG(3, NUMERIC_type_of_ClipVarType);
   gtk_signal_emit_by_name(GTK_OBJECT(cidial->widget), signal_name, deviceid, cidial);
   return 0;
 err:
   return 1;
}

/* Signals table */
static SignalTable input_dialog_signals[] = {
   {"enable-device", GSF(handle_input_dialog_signal),
    ESF(emit_input_dialog_signal), GTK_ENABLE_DEVICE_SIGNAL},
   {"disable-device", GSF(handle_input_dialog_signal),
    ESF(emit_input_dialog_signal), GTK_DISABLE_DEVICE_SIGNAL},
   {"", NULL, NULL, 0}
};

/**********************************************************/

/* Register dialog in global table */
CLIP_DLLEXPORT GtkType
_gtk_type_dialog()
{
   return GTK_TYPE_DIALOG;
}

long
예제 #27
0
    Author  : Alexey M. Tkachenko <*****@*****.**>
    License : (GPL) http://www.itk.ru/clipper/license.html
*/
#include "ci_hashcode.h"
#include "ci_clip.h"
#include "ci_clip-gtkcfg.h"

#include <gtk/gtk.h>

#include "ci_clip-gtk.ch"
#include "ci_clip-gtk.h"

/**********************************************************/
/* Signals table */
static SignalTable adj_signals[] = {
   {"changed", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_CHANGED_SIGNAL},
   {"value-changed", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_VALUE_CHANGED_SIGNAL},
   {"", NULL, NULL, 0}
};

static SignalTable data_signals[] = {
   {"disconnect", GSF(widget_signal_handler), ESF(object_emit_signal),
    GTK_DISCONNECT_SIGNAL},
   {"", NULL, NULL, 0}
};

/**********************************************************/

/* Register adjustment in global table */
예제 #28
0
#include "clip-gtk2.ch"
#include "clip-gtk2.h"

/*********************** SIGNALS **************************/

/* Signals table */
static gint
handle_toggled_signal(GtkToggleAction *action, C_signal *cs)
{
    OBJECTPREPARECV(cs,cv);
    OBJECTINVOKESIGHANDLER(cs,cv);
}
static SignalTable toggle_action_signals[] =
{
    {"toggled",	GSF( handle_toggled_signal ), ESF( object_emit_signal ), GTK_TOGGLED_SIGNAL},
    {"", NULL, NULL, 0}
};

/**********************************************************/
CLIP_DLLEXPORT GtkType _gtk_type_toggle_action() {
    return GTK_TYPE_TOGGLE_ACTION;
}

long _clip_type_toggle_action() {
    return GTK_OBJECT_TOGGLE_ACTION;
}

const char * _clip_type_name_toggle_action()  {
    return "GTK_OBJECT_TOGGLE_ACTION";
}
예제 #29
0
    INVOKESIGHANDLER(GTK_WIDGET(swin),cs,cv);
}

static gint handler_scroll_child_signal (GtkScrolledWindow *swin, GtkScrollType type, gboolean arg2, C_signal *cs)
{
    PREPARECV(cs,cv);
    _clip_mputn(cs->cw->cmachine, &cv, HASH_SCROLLTYPE, type);
    _clip_mputl(cs->cw->cmachine, &cv, HASH_ARG2, arg2);
    INVOKESIGHANDLER(GTK_WIDGET(swin),cs,cv);
}

/* Signals table */
static SignalTable scrolled_window_signals[] =
{
    /* signals */
    {"move-focus-out",GSF( handler_move_focus_out_signal ),	ESF( object_emit_signal ), GTK_MOVE_FOCUS_OUT_SIGNAL},
    {"scroll-child",GSF( handler_scroll_child_signal ),	ESF( object_emit_signal ), GTK_SCROLL_CHILD_SIGNAL},
    {"", NULL, NULL, 0}
};

/**********************************************************/

/* Register scrolled window in global table */
CLIP_DLLEXPORT GtkType _gtk_type_scrolled_window() {
    return GTK_TYPE_SCROLLED_WINDOW;
}
long _clip_type_scrolled_window() {
    return GTK_WIDGET_SCROLLED_WINDOW;
}
const char * _clip_type_name_scrolled_window() {
    return "GTK_WIDGET_SCROLLED_WINDOW";
예제 #30
0
#include "ci_clip.h"
#include "ci_clip-gtkcfg2.h"

#include <gtk/gtk.h>

#include "ci_clip-gtk2.ch"
#include "ci_clip-gtk2.h"

static GtkTreeIter _Iter;

static GtkTreeIter *Iter = &_Iter;

/*********************** SIGNALS **************************/
/* Signals table */
static SignalTable tree_selection_signals[] = {
   {"changed", GSF(object_signal_handler), ESF(object_emit_signal),
    GTK_CHANGED_SIGNAL},
   {"", NULL, NULL, 0}
};

/**********************************************************/
CLIP_DLLEXPORT GtkType
_gtk_type_tree_selection()
{
   return GTK_TYPE_TREE_SELECTION;
}

long
_clip_type_tree_selection()
{
   return GTK_OBJECT_TREE_SELECTION;