typedef struct { } OmtkApplication;
You shouldn't access this structure directly, because it may change.
#define OMTK_EVENT_DID_LAUNCH
This event is called after the application launched. If you want to add documents on start up, do that here.
#define OMTK_EVENT_SHOULD_TERMINATE
This event is called when the user wants to terminate the application. If you return 0 in the callback function, the application will terminate. If you return 1, the application won't terminate.
#define OMTK_EVENT_DID_TERMINATE
This event is called just before the application definitely terminates. You may put some clean up stuff for your application here.
OmtkApplication *omtk_application_get(void);
Returns the OmtkApplication structure. You shouldn't use this function in your application.
void omtk_application_menubar_set(OmtkWidget *menu);
Sets the menubar of the application. menu may not contain any menu items without a submenu (but the submenu can be empty).
If menu is NULL, the menubar will be released. If there's already a menubar it will be released, too.
Example:
OmtkWidget *menu, *test_menu; menu = omtk_menu_create(); test_menu = omtk_menu_create(); omtk_menuitem_submenu_set( \ omtk_menu_item_appendquick(menu, "Test", 0, 0, NULL, NULL), test_menu); omtk_menu_item_appendquick( test_menu, "Item", 0, 0, NULL, NULL); omtk_application_menubar_set(menu);
OmtkWidget *omtk_application_menubar_get(void);
Returns the menubar of the application.
void omtk_application_windowmenu_set(OmtkWidget *menu, int options);
Sets the window menu of the application. omtk will automatically add and remove items from this menu.
options can be:
See examples/templates/mdi/mdi.c for an example.
int omtk_application_launched(void);
Returns 1 if the application launched or 0 if not.
void omtk_application_exit(void);
Terminates the application. Note that your application won't receive an OMTK_EVENT_SHOULD_TERMINATE event.
Added in omtk 0.1.2.
int omtk_application_cb_cut(OmtkEvent *ev); int omtk_application_cb_copy(OmtkEvent *ev); int omtk_application_cb_paste(OmtkEvent *ev); int omtk_application_cb_delete(OmtkEvent *ev); int omtk_application_cb_selectall(OmtkEvent *ev);
Callback functions for the Cut, Copy, Paste and Select All menu items.
See examples/input/input.c for an example.
Zurück zu www.eggdrop.ch | Back to www.eggdrop.ch Last update: 20.02.04 |
Copyright (C) 2004, 2005 by Thomas "tom" Steinacher <tom at eggdrop.ch> |