?? uicompwinmgr.c
字號:
/* contact - LiPS Address Book Application * * Authors: YE Nan <nan.ye@orange-ftgroup.com> * * This software and associated documentation files (the "Software") * are copyright (C) 2005 LiPS Linux Phone Standards Forum [FranceTelecom] * All Rights Reserved. * * A copyright license is hereby granted for redistribution and use of * the Software in source and binary forms, with or without modification, * provided that the following conditions are met: * - Redistributions of source code must retain the above copyright notice, * this copyright license and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright * notice, this copyright license and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - Neither the name of LiPS nor the names of its Members may be used * to endorse or promote products derived from the Software without * specific prior written permission. * * A patent license for any Necessary Claims owned by Members of LiPS Forum * to make, have made, use, import, offer to sell, lease and sell or otherwise * distribute any implementation compliant with the any specification adopted * by the LiPS Forumcan be obtained from the respective Members on reasonable * and non-discriminatory terms and conditions and under reciprocity, as * regulated in more detail in the Internal Policy of the LiPS Forum. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER, ITS MEMBERS AND CONTRIBUTORS * "AS IS", AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE * AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER, * ITS MEMBERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */#include <stdio.h>#include <gtk/gtk.h>#include <glib.h>#include <gem.h>#include <uicompwinmgr.h>static GHashTable *wins_table = NULL;static gboolean initialized = FALSE;static gboolean ui_comp_winmgr_initialize (void);static void ui_comp_winmgr_finalize (void);static gboolean ui_comp_winmgr_initialize (void){ GemApplication *app = NULL;/* g_print("%s(): entering\n", __FUNCTION__);*/ if (initialized) { return TRUE; } wins_table = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, NULL); app = gem_application_get_instance(); g_signal_connect(G_OBJECT(app), "app_quit", G_CALLBACK(ui_comp_winmgr_finalize), NULL); initialized = TRUE; return TRUE;}static voidui_comp_winmgr_finalize (void){/* g_print("%s(): entering\n", __FUNCTION__);*/ if (initialized == FALSE) { return; } g_hash_table_destroy(wins_table); initialized = FALSE; return;}gbooleanui_comp_winmgr_register_window (UICompWinMgrRegType type, GtkWidget *window){ guint32 *key = NULL; ui_comp_winmgr_initialize(); key = g_new(guint32, 1); *key = type; g_hash_table_replace(wins_table, (gpointer)key, (gpointer)window); return TRUE;}voidui_comp_winmgr_unregister_window (UICompWinMgrRegType type){ g_hash_table_remove(wins_table, &type); return;}/*vi:ts=2:nowrap:ai:expandtab */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -