⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gemskdialog.c.svn-base

📁 一款Linux手机上应用的文件管理器 系统要求就安装Gtk+2.0
💻 SVN-BASE
字号:
/*	libgemwidget - Gtk+ Embedded Widget library * *	Authors: YE Nan <nan.ye@orange-ftgourp.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 <gtk/gtk.h>#include <gpe/gpeskwindow.h>#include <gemskdialog.h>enum {  SK_LEFT = 0,  SK_RIGHT = 1,  SK_MAX = 2};void gem_sk_window_set_dialog (GpeSKWindow *skwindow){	gtk_window_set_type_hint (GTK_WINDOW (skwindow), GDK_WINDOW_TYPE_HINT_DOCK);	gtk_window_set_decorated (GTK_WINDOW (skwindow), FALSE);	gtk_widget_set_size_request (GTK_WIDGET (skwindow), 240, 30);	gtk_window_set_modal (GTK_WINDOW (skwindow), FALSE);	gpe_skwindow_set_softkey_menu (GPE_SKWINDOW (skwindow), SK_LEFT, NULL);	gpe_skwindow_set_softkey_menu (GPE_SKWINDOW (skwindow), SK_RIGHT, NULL);	  gpe_skwindow_set_softkey_label (GPE_SKWINDOW(skwindow), SK_LEFT, "Ok");  gpe_skwindow_set_softkey_label (GPE_SKWINDOW(skwindow), SK_RIGHT, "Cancel");		return;}/*skdialog is put on the bottom of the window. The offset is used to adjust the * dialog position. */void gem_sk_dialog_set_position (GtkWindow *window, GpeSKWindow *skdialog, gint offset){	gint width1,height1,width2,height2;		gtk_window_set_position (GTK_WINDOW (skdialog), GTK_WIN_POS_NONE);				gtk_window_get_size (GTK_WINDOW (skdialog), &width1, &height1);	gtk_window_get_size (GTK_WINDOW (window), &width2, &height2);	gtk_window_move (GTK_WINDOW (skdialog),0, height2-height1-offset);	}void gem_sk_window_set_delete_warning (GpeSKWindow *skdialog, gchar *text){	GtkWidget *label;	GtkWidget *frame;		GdkColor blue;			blue.red = 53199; //14906;  blue.green = 59110; //35980;  blue.blue = 65535; //55769;	gdk_color_parse("white", &blue);	gem_sk_window_set_dialog (skdialog);		gtk_widget_modify_bg (GTK_WIDGET (skdialog), GTK_STATE_NORMAL, &blue);	gtk_container_set_border_width (GTK_CONTAINER (skdialog), 2);		frame = gtk_frame_new (NULL);	gtk_container_add (GTK_CONTAINER (skdialog), frame);		label = gtk_label_new (text);	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);	gtk_container_add (GTK_CONTAINER(frame), label);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -