本文整理汇总了C++中GDK_NOTE函数的典型用法代码示例。如果您正苦于以下问题:C++ GDK_NOTE函数的具体用法?C++ GDK_NOTE怎么用?C++ GDK_NOTE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GDK_NOTE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: gdk_win32_display_request_selection_notification
static gboolean
gdk_win32_display_request_selection_notification (GdkDisplay *display,
GdkAtom selection)
{
GdkWin32Display *display_win32 = GDK_WIN32_DISPLAY (display);
gboolean ret = FALSE;
GDK_NOTE (DND,
g_print ("gdk_display_request_selection_notification (..., %s)",
gdk_atom_name (selection)));
if (selection == GDK_SELECTION_CLIPBOARD ||
selection == GDK_SELECTION_PRIMARY)
{
if (display_win32->clipboard_hwnd == NULL)
{
if (register_clipboard_notification (display))
GDK_NOTE (DND, g_print (" registered"));
else
GDK_NOTE (DND, g_print (" failed to register"));
}
ret = (display_win32->clipboard_hwnd != NULL);
}
else
{
GDK_NOTE (DND, g_print (" unsupported"));
ret = FALSE;
}
GDK_NOTE (DND, g_print (" -> %s\n", ret ? "TRUE" : "FALSE"));
return ret;
}
开发者ID:nvieirafelipe,项目名称:gtk,代码行数:33,代码来源:gdkdisplay-win32.c
示例2: gdk_win32_display_request_selection_notification
static gboolean
gdk_win32_display_request_selection_notification (GdkDisplay *display,
GdkAtom selection)
{
static HWND hwndViewer = NULL;
gboolean ret = FALSE;
GDK_NOTE (DND,
g_print ("gdk_display_request_selection_notification (..., %s)",
gdk_atom_name (selection)));
if (selection == GDK_SELECTION_CLIPBOARD ||
selection == GDK_SELECTION_PRIMARY)
{
if (!hwndViewer)
{
hwndViewer = _gdk_win32_register_clipboard_notification ();
GDK_NOTE (DND, g_print (" registered"));
}
ret = (hwndViewer != NULL);
}
else
{
GDK_NOTE (DND, g_print (" unsupported"));
ret = FALSE;
}
GDK_NOTE (DND, g_print (" -> %s\n", ret ? "TRUE" : "FALSE"));
return ret;
}
开发者ID:danysan2000,项目名称:gtk,代码行数:31,代码来源:gdkdisplay-win32.c
示例3: gdk_selection_property_get
gint
gdk_selection_property_get(GdkWindow * requestor,
guchar ** data,
GdkAtom * ret_type, gint * ret_format)
{
GdkSelProp *prop;
g_return_val_if_fail(requestor != NULL, 0);
g_return_val_if_fail(GDK_IS_WINDOW(requestor), 0);
if (GDK_DRAWABLE_DESTROYED(requestor))
return 0;
GDK_NOTE(DND, g_print("gdk_selection_property_get: %#x",
GDK_DRAWABLE_XID(requestor)));
prop =
g_hash_table_lookup(sel_prop_table, &GDK_DRAWABLE_XID(requestor));
if (prop == NULL) {
GDK_NOTE(DND, g_print(": NULL\n"));
*data = NULL;
return 0;
}
GDK_NOTE(DND, g_print(": %d bytes\n", prop->length));
*data = g_malloc(prop->length);
if (prop->length > 0)
memmove(*data, prop->data, prop->length);
if (ret_type)
*ret_type = prop->type;
if (ret_format)
*ret_format = prop->format;
return prop->length;
}
开发者ID:My-Source,项目名称:root,代码行数:35,代码来源:gdkselection-win32.c
示例4: _gdk_monitor_init
void
_gdk_monitor_init (void)
{
#ifdef HAVE_MONITOR_INFO
gint i, index;
_gdk_num_monitors = 0;
EnumDisplayMonitors (NULL, NULL, count_monitor, (LPARAM) &_gdk_num_monitors);
_gdk_monitors = g_renew (GdkWin32Monitor, _gdk_monitors, _gdk_num_monitors);
index = 0;
EnumDisplayMonitors (NULL, NULL, enum_monitor, (LPARAM) &index);
_gdk_offset_x = G_MININT;
_gdk_offset_y = G_MININT;
/* Calculate offset */
for (i = 0; i < _gdk_num_monitors; i++)
{
_gdk_offset_x = MAX (_gdk_offset_x, -_gdk_monitors[i].rect.x);
_gdk_offset_y = MAX (_gdk_offset_y, -_gdk_monitors[i].rect.y);
}
GDK_NOTE (MISC, g_print ("Multi-monitor offset: (%d,%d)\n",
_gdk_offset_x, _gdk_offset_y));
/* Translate monitor coords into GDK coordinate space */
for (i = 0; i < _gdk_num_monitors; i++)
{
_gdk_monitors[i].rect.x += _gdk_offset_x;
_gdk_monitors[i].rect.y += _gdk_offset_y;
GDK_NOTE (MISC, g_print ("Monitor %d: %dx%[email protected]%+d%+d\n",
i, _gdk_monitors[i].rect.width,
_gdk_monitors[i].rect.height,
_gdk_monitors[i].rect.x,
_gdk_monitors[i].rect.y));
}
#else
HDC hDC;
_gdk_num_monitors = 1;
_gdk_monitors = g_renew (GdkWin32Monitor, _gdk_monitors, 1);
_gdk_monitors[0].name = g_strdup ("DISPLAY");
hDC = GetDC (NULL);
_gdk_monitors[0].width_mm = GetDeviceCaps (hDC, HORZSIZE);
_gdk_monitors[0].height_mm = GetDeviceCaps (hDC, VERTSIZE);
ReleaseDC (NULL, hDC);
_gdk_monitors[0].rect.x = 0;
_gdk_monitors[0].rect.y = 0;
_gdk_monitors[0].rect.width = GetSystemMetrics (SM_CXSCREEN);
_gdk_monitors[0].rect.height = GetSystemMetrics (SM_CYSCREEN);
_gdk_offset_x = 0;
_gdk_offset_y = 0;
#endif
}
开发者ID:Davletvm,项目名称:gtk,代码行数:57,代码来源:gdkdisplay-win32.c
示例5: _gdk_win32_display_open
GdkDisplay *
_gdk_win32_display_open (const gchar *display_name)
{
GdkWin32Display *win32_display;
GDK_NOTE (MISC, g_print ("gdk_display_open: %s\n", (display_name ? display_name : "NULL")));
if (display_name == NULL ||
g_ascii_strcasecmp (display_name,
gdk_display_get_name (_gdk_display)) == 0)
{
if (_gdk_display != NULL)
{
GDK_NOTE (MISC, g_print ("... return _gdk_display\n"));
return _gdk_display;
}
}
else
{
GDK_NOTE (MISC, g_print ("... return NULL\n"));
return NULL;
}
_gdk_display = g_object_new (GDK_TYPE_WIN32_DISPLAY, NULL);
win32_display = GDK_WIN32_DISPLAY (_gdk_display);
win32_display->screen = g_object_new (GDK_TYPE_WIN32_SCREEN, NULL);
_gdk_events_init (_gdk_display);
_gdk_input_ignore_core = 0;
_gdk_device_manager = g_object_new (GDK_TYPE_DEVICE_MANAGER_WIN32,
NULL);
_gdk_device_manager->display = _gdk_display;
_gdk_drag_init ();
_gdk_drop_init ();
_gdk_display->clipboard = gdk_win32_clipboard_new (_gdk_display);
_gdk_display->primary_clipboard = gdk_clipboard_new (_gdk_display);
/* Precalculate display name */
(void) gdk_display_get_name (_gdk_display);
register_display_change_notification (_gdk_display);
g_signal_emit_by_name (_gdk_display, "opened");
GDK_NOTE (MISC, g_print ("... _gdk_display now set up\n"));
return _gdk_display;
}
开发者ID:sam-m888,项目名称:gtk,代码行数:53,代码来源:gdkdisplay-win32.c
示例6: _gdk_window_move_resize_child
void
_gdk_window_move_resize_child (GdkWindow *window,
gint x,
gint y,
gint width,
gint height)
{
GdkWindowImplWin32 *impl;
GdkWindowObject *obj;
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
obj = GDK_WINDOW_OBJECT (window);
impl = GDK_WINDOW_IMPL_WIN32 (obj->impl);
GDK_NOTE (MISC, g_print ("_gdk_window_move_resize_child: %[email protected]%+d%+d %dx%[email protected]%+d%+d\n",
_gdk_win32_drawable_description (window),
obj->x, obj->y, width, height, x, y));
if (width > 65535 || height > 65535)
{
g_warning ("Native children wider or taller than 65535 pixels are not supported.");
if (width > 65535)
width = 65535;
if (height > 65535)
height = 65535;
}
obj->x = x;
obj->y = y;
obj->width = width;
obj->height = height;
_gdk_win32_window_tmp_unset_parent_bg (window);
_gdk_win32_window_tmp_unset_bg (window, TRUE);
GDK_NOTE (MISC, g_print ("... SetWindowPos(%p,NULL,%d,%d,%d,%d,"
"NOACTIVATE|NOZORDER)\n",
GDK_WINDOW_HWND (window),
obj->x + obj->parent->abs_x, obj->y + obj->parent->abs_y,
width, height));
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
obj->x + obj->parent->abs_x, obj->y + obj->parent->abs_y,
width, height,
SWP_NOACTIVATE | SWP_NOZORDER));
//_gdk_win32_window_tmp_reset_parent_bg (window);
_gdk_win32_window_tmp_reset_bg (window, TRUE);
}
开发者ID:Aridna,项目名称:gtk2,代码行数:52,代码来源:gdkgeometry-win32.c
示例7: gdk_selection_owner_set
gint
gdk_selection_owner_set(GdkWindow * owner,
GdkAtom selection, guint32 time, gint send_event)
{
gchar *sel_name;
HWND xwindow;
GDK_NOTE(DND,
(sel_name = gdk_atom_name(selection),
g_print("gdk_selection_owner_set: %#x %#x (%s)\n",
(owner ? GDK_DRAWABLE_XID(owner) : 0),
selection, sel_name), g_free(sel_name)));
if (selection != gdk_clipboard_atom)
return FALSE;
if (owner != NULL)
xwindow = GDK_DRAWABLE_XID(owner);
else
xwindow = NULL;
GDK_NOTE(DND, g_print("...OpenClipboard(%#x)\n", xwindow));
if (!OpenClipboard(xwindow)) {
WIN32_API_FAILED("OpenClipboard");
return FALSE;
}
GDK_NOTE(DND, g_print("...EmptyClipboard()\n"));
if (!EmptyClipboard()) {
WIN32_API_FAILED("EmptyClipboard");
CloseClipboard();
return FALSE;
}
#if 0
/* No delayed rendering */
if (xwindow != NULL)
SetClipboardData(CF_TEXT, NULL);
#endif
GDK_NOTE(DND, g_print("...CloseClipboard()\n"));
if (!CloseClipboard()) {
WIN32_API_FAILED("CloseClipboard");
return FALSE;
}
if (owner != NULL) {
/* Send ourselves an ersatz selection request message so that
* gdk_property_change will be called to store the clipboard data.
*/
SendMessage(xwindow, gdk_selection_request_msg, selection, 0);
}
return TRUE;
}
开发者ID:My-Source,项目名称:root,代码行数:51,代码来源:gdkselection-win32.c
示例8: primary_source_send
static void
primary_source_send (void *data,
struct gtk_primary_selection_source *source,
const char *mime_type,
int32_t fd)
{
GdkWaylandSelection *wayland_selection = data;
GDK_NOTE (EVENTS,
g_message ("primary source send, source = %p, mime_type = %s, fd = %d",
source, mime_type, fd));
if (!mime_type || !wayland_selection->primary_owner)
{
close (fd);
return;
}
if (!gdk_wayland_selection_request_target (wayland_selection,
wayland_selection->primary_owner,
atoms[ATOM_PRIMARY],
gdk_atom_intern (mime_type, FALSE),
fd))
gdk_wayland_selection_check_write (wayland_selection);
}
开发者ID:endlessm,项目名称:gtk,代码行数:25,代码来源:gdkselection-wayland.c
示例9: data_source_cancelled
static void
data_source_cancelled (void *data,
struct wl_data_source *source)
{
GdkWaylandSelection *wayland_selection = data;
GdkDragContext *context;
GdkDisplay *display;
GdkAtom atom;
GDK_NOTE (EVENTS,
g_message ("data source cancelled, source = %p", source));
display = gdk_display_get_default ();
if (source == wayland_selection->dnd_source)
atom = atoms[ATOM_DND];
else if (source == wayland_selection->clipboard_source)
atom = atoms[ATOM_CLIPBOARD];
else
return;
context = gdk_wayland_drag_context_lookup_by_data_source (source);
if (context)
gdk_drag_context_cancel (context, GDK_DRAG_CANCEL_ERROR);
emit_selection_clear (display, atom);
gdk_selection_owner_set (NULL, atom, GDK_CURRENT_TIME, TRUE);
gdk_wayland_selection_unset_data_source (display, atom);
}
开发者ID:endlessm,项目名称:gtk,代码行数:30,代码来源:gdkselection-wayland.c
示例10: gdk_selection_send_notify
void
gdk_selection_send_notify(guint32 requestor,
GdkAtom selection,
GdkAtom target, GdkAtom property, guint32 time)
{
gchar *sel_name, *tgt_name, *prop_name;
GDK_NOTE(DND,
(sel_name = gdk_atom_name(selection),
tgt_name = gdk_atom_name(target),
prop_name = gdk_atom_name(property),
g_print
("gdk_selection_send_notify: %#x %#x (%s) %#x (%s) %#x (%s)\n",
requestor, selection, sel_name, target, tgt_name, property,
prop_name), g_free(sel_name), g_free(tgt_name),
g_free(prop_name)));
/* Send ourselves a selection clear message so that gtk thinks we don't
* have the selection, and will claim it anew when needed, and
* we thus get a chance to store data in the Windows clipboard.
* Otherwise, if a gtkeditable does a copy to clipboard several times
* only the first one actually gets copied to the Windows clipboard,
* as only he first one causes a call to gdk_property_change.
*
* Hmm, there is something fishy with this. Cut and paste inside the
* same app didn't work, the gtkeditable immediately forgot the
* clipboard contents in gtk_editable_selection_clear as a result of
* this message. OTOH, when I changed gdk_selection_owner_get to
* always return NULL, it works. Sigh.
*/
SendMessage((HWND) requestor, gdk_selection_clear_msg, selection, 0);
}
开发者ID:My-Source,项目名称:root,代码行数:33,代码来源:gdkselection-win32.c
示例11: gdk_window_lookup
GdkWindow *gdk_selection_owner_get(GdkAtom selection)
{
GdkWindow *window;
gchar *sel_name;
#if 0
/* XXX Hmm, gtk selections seem to work best with this. This causes
* gtk to always get the clipboard contents from Windows, and not
* from the editable's own stashed-away copy.
*/
return NULL;
#else
if (selection != gdk_clipboard_atom)
window = NULL;
else {
window = gdk_window_lookup(GetClipboardOwner());
if (window == NULL)
window = (GdkWindow *)GetClipboardOwner();
}
#endif
GDK_NOTE(DND,
(sel_name = gdk_atom_name(selection),
g_print("gdk_selection_owner_get: %#x (%s) = %#x\n",
selection, sel_name,
(window ? GDK_DRAWABLE_XID(window) : 0)),
g_free(sel_name)));
return window;
}
开发者ID:My-Source,项目名称:root,代码行数:31,代码来源:gdkselection-win32.c
示例12: gdk_property_delete
void
gdk_property_delete (GdkWindow *window,
GdkAtom property)
{
g_return_if_fail (!window || GDK_IS_WINDOW (window));
if (!window)
{
GdkScreen *screen = gdk_screen_get_default ();
window = gdk_screen_get_root_window (screen);
GDK_NOTE (MULTIHEAD,
g_message ("gdk_property_delete(): window is NULL\n"));
}
if (GDK_WINDOW_DESTROYED (window))
return;
gi_atom_id_t aid;
GdkDisplay *display = GDK_DISPLAY_OBJECT(_gdk_display);
aid = gdk_x11_atom_to_xatom_for_display (display, property);
gi_delete_property ( GDK_DRAWABLE_GIX_ID (window), aid);
}
开发者ID:grimtraveller,项目名称:netbas,代码行数:25,代码来源:gdkproperty-gix.c
示例13: gdk_parse_args
/**
* gdk_parse_args:
* @argc: the number of command line arguments.
* @argv: (inout) (array length=argc): the array of command line arguments.
*
* Parse command line arguments, and store for future
* use by calls to gdk_display_open().
*
* Any arguments used by GDK are removed from the array and @argc and @argv are
* updated accordingly.
*
* You shouldn’t call this function explicitly if you are using
* gtk_init(), gtk_init_check(), gdk_init(), or gdk_init_check().
*
* Since: 2.2
**/
void
gdk_parse_args (int *argc,
char ***argv)
{
GOptionContext *option_context;
GOptionGroup *option_group;
GError *error = NULL;
if (gdk_initialized)
return;
gdk_pre_parse ();
option_context = g_option_context_new (NULL);
g_option_context_set_ignore_unknown_options (option_context, TRUE);
g_option_context_set_help_enabled (option_context, FALSE);
option_group = g_option_group_new (NULL, NULL, NULL, NULL, NULL);
g_option_context_set_main_group (option_context, option_group);
g_option_group_add_entries (option_group, gdk_args);
if (!g_option_context_parse (option_context, argc, argv, &error))
{
g_warning ("%s", error->message);
g_error_free (error);
}
g_option_context_free (option_context);
GDK_NOTE (MISC, g_message ("progname: \"%s\"", g_get_prgname ()));
}
开发者ID:3v1n0,项目名称:gtk,代码行数:46,代码来源:gdk.c
示例14: inner_display_change_window_procedure
static LRESULT CALLBACK
inner_display_change_window_procedure (HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam)
{
switch (message)
{
case WM_DESTROY:
{
PostQuitMessage (0);
return 0;
}
case WM_DISPLAYCHANGE:
{
_gdk_monitor_init ();
_gdk_root_window_size_init ();
g_signal_emit_by_name (_gdk_screen, "size_changed");
return 0;
}
default:
/* Otherwise call DefWindowProcW(). */
GDK_NOTE (EVENTS, g_print (" DefWindowProcW"));
return DefWindowProc (hwnd, message, wparam, lparam);
}
}
开发者ID:danysan2000,项目名称:gtk,代码行数:27,代码来源:gdkdisplay-win32.c
示例15: inner_display_change_window_procedure
static LRESULT CALLBACK
inner_display_change_window_procedure (HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam)
{
switch (message)
{
case WM_DESTROY:
{
PostQuitMessage (0);
return 0;
}
case WM_DISPLAYCHANGE:
{
GdkWin32Display *win32_display = GDK_WIN32_DISPLAY (_gdk_display);
_gdk_win32_screen_on_displaychange_event (GDK_WIN32_SCREEN (win32_display->screen));
return 0;
}
default:
/* Otherwise call DefWindowProcW(). */
GDK_NOTE (EVENTS, g_print (" DefWindowProcW"));
return DefWindowProc (hwnd, message, wparam, lparam);
}
}
开发者ID:sam-m888,项目名称:gtk,代码行数:26,代码来源:gdkdisplay-win32.c
示例16: _gdk_wayland_display_open
GdkDisplay *
_gdk_wayland_display_open (const gchar *display_name)
{
struct wl_display *wl_display;
GdkDisplay *display;
GdkWaylandDisplay *display_wayland;
GDK_NOTE (MISC, g_message ("opening display %s", display_name ? display_name : ""));
/* If this variable is unset then wayland initialisation will surely
* fail, logging a fatal error in the process. Save ourselves from
* that.
*/
if (g_getenv ("XDG_RUNTIME_DIR") == NULL)
return NULL;
wl_log_set_handler_client (log_handler);
wl_display = wl_display_connect (display_name);
if (!wl_display)
return NULL;
display = g_object_new (GDK_TYPE_WAYLAND_DISPLAY, NULL);
display->device_manager = _gdk_wayland_device_manager_new (display);
display_wayland = GDK_WAYLAND_DISPLAY (display);
display_wayland->wl_display = wl_display;
display_wayland->screen = _gdk_wayland_screen_new (display);
display_wayland->event_source = _gdk_wayland_display_event_source_new (display);
display_wayland->known_globals =
g_hash_table_new_full (NULL, NULL, NULL, g_free);
_gdk_wayland_display_init_cursors (display_wayland);
_gdk_wayland_display_prepare_cursor_themes (display_wayland);
display_wayland->wl_registry = wl_display_get_registry (display_wayland->wl_display);
wl_registry_add_listener (display_wayland->wl_registry, ®istry_listener, display_wayland);
_gdk_wayland_display_async_roundtrip (display_wayland);
/* Wait for initializing to complete. This means waiting for all
* asynchrounous roundtrips that were triggered during initial roundtrip. */
while (g_list_length (display_wayland->async_roundtrips) > 0)
{
if (wl_display_dispatch (display_wayland->wl_display) < 0)
{
g_object_unref (display);
return NULL;
}
}
gdk_input_init (display);
display_wayland->selection = gdk_wayland_selection_new ();
g_signal_emit_by_name (display, "opened");
return display;
}
开发者ID:Premangshu2010,项目名称:gtk,代码行数:60,代码来源:gdkdisplay-wayland.c
示例17: _gdk_windowing_init
void
_gdk_windowing_init (void)
{
gchar buf[10];
if (getenv ("GDK_IGNORE_WINTAB") != NULL)
_gdk_input_ignore_wintab = TRUE;
else if (getenv ("GDK_USE_WINTAB") != NULL)
_gdk_input_ignore_wintab = FALSE;
if (gdk_synchronize)
GdiSetBatchLimit (1);
_gdk_app_hmodule = GetModuleHandle (NULL);
_gdk_display_hdc = CreateDC ("DISPLAY", NULL, NULL, NULL);
_gdk_input_locale = GetKeyboardLayout (0);
_gdk_input_locale_is_ime = ImmIsIME (_gdk_input_locale);
GetLocaleInfo (MAKELCID (LOWORD (_gdk_input_locale), SORT_DEFAULT),
LOCALE_IDEFAULTANSICODEPAGE,
buf, sizeof (buf));
_gdk_input_codepage = atoi (buf);
GDK_NOTE (EVENTS, g_print ("input_locale:%p, codepage:%d\n",
_gdk_input_locale, _gdk_input_codepage));
CoInitialize (NULL);
_gdk_selection = gdk_atom_intern_static_string ("GDK_SELECTION");
_wm_transient_for = gdk_atom_intern_static_string ("WM_TRANSIENT_FOR");
_targets = gdk_atom_intern_static_string ("TARGETS");
_delete = gdk_atom_intern_static_string ("DELETE");
_save_targets = gdk_atom_intern_static_string ("SAVE_TARGETS");
_utf8_string = gdk_atom_intern_static_string ("UTF8_STRING");
_text = gdk_atom_intern_static_string ("TEXT");
_compound_text = gdk_atom_intern_static_string ("COMPOUND_TEXT");
_text_uri_list = gdk_atom_intern_static_string ("text/uri-list");
_text_html = gdk_atom_intern_static_string ("text/html");
_image_png = gdk_atom_intern_static_string ("image/png");
_image_jpeg = gdk_atom_intern_static_string ("image/jpeg");
_image_bmp = gdk_atom_intern_static_string ("image/bmp");
_image_gif = gdk_atom_intern_static_string ("image/gif");
_local_dnd = gdk_atom_intern_static_string ("LocalDndSelection");
_gdk_win32_dropfiles = gdk_atom_intern_static_string ("DROPFILES_DND");
_gdk_ole2_dnd = gdk_atom_intern_static_string ("OLE2_DND");
/* MS Office 2007, at least, offers images in common file formats
* using clipboard format names like "PNG" and "JFIF". So we follow
* the lead and map the GDK target name "image/png" to the clipboard
* format name "PNG" etc.
*/
_cf_png = RegisterClipboardFormat ("PNG");
_cf_jfif = RegisterClipboardFormat ("JFIF");
_cf_gif = RegisterClipboardFormat ("GIF");
_cf_url = RegisterClipboardFormat ("UniformResourceLocatorW");
_cf_html_format = RegisterClipboardFormat ("HTML Format");
_cf_text_html = RegisterClipboardFormat ("text/html");
_gdk_win32_selection_init ();
}
开发者ID:Aridna,项目名称:gtk2,代码行数:60,代码来源:gdkmain-win32.c
示例18: gdk_x11_gl_context_dispose
static void
gdk_x11_gl_context_dispose (GObject *gobject)
{
GdkWaylandGLContext *context_wayland = GDK_WAYLAND_GL_CONTEXT (gobject);
if (context_wayland->egl_context != NULL)
{
GdkGLContext *context = GDK_GL_CONTEXT (gobject);
GdkWindow *window = gdk_gl_context_get_window (context);
GdkDisplay *display = gdk_window_get_display (window);
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
if (eglGetCurrentContext () == context_wayland->egl_context)
eglMakeCurrent(display_wayland->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
EGL_NO_CONTEXT);
GDK_NOTE (OPENGL, g_print ("Destroying EGL context\n"));
eglDestroyContext (display_wayland->egl_display,
context_wayland->egl_context);
context_wayland->egl_context = NULL;
}
G_OBJECT_CLASS (gdk_wayland_gl_context_parent_class)->dispose (gobject);
}
开发者ID:Distrotech,项目名称:gtk,代码行数:25,代码来源:gdkglcontext-wayland.c
示例19: _gdk_win32_display_open
GdkDisplay *
_gdk_win32_display_open (const gchar *display_name)
{
GdkWin32Display *win32_display;
GDK_NOTE (MISC, g_print ("gdk_display_open: %s\n", (display_name ? display_name : "NULL")));
if (display_name == NULL ||
g_ascii_strcasecmp (display_name,
gdk_display_get_name (_gdk_display)) == 0)
{
if (_gdk_display != NULL)
{
GDK_NOTE (MISC, g_print ("... return _gdk_display\n"));
return _gdk_display;
}
}
else
{
GDK_NOTE (MISC, g_print ("... return NULL\n"));
return NULL;
}
_gdk_display = g_object_new (GDK_TYPE_WIN32_DISPLAY, NULL);
win32_display = GDK_WIN32_DISPLAY (_gdk_display);
win32_display->screen = g_object_new (GDK_TYPE_WIN32_SCREEN, NULL);
_gdk_monitor_init ();
_gdk_visual_init (win32_display->screen);
_gdk_screen_init_root_window (GDK_WIN32_SCREEN (win32_display->screen));
_gdk_events_init ();
_gdk_input_init (_gdk_display);
_gdk_dnd_init ();
/* Precalculate display name */
(void) gdk_display_get_name (_gdk_display);
register_display_change_notification (_gdk_display);
g_signal_emit_by_name (_gdk_display, "opened");
GDK_NOTE (MISC, g_print ("... _gdk_display now set up\n"));
return _gdk_display;
}
开发者ID:nvieirafelipe,项目名称:gtk,代码行数:46,代码来源:gdkdisplay-win32.c
示例20: _gdk_x11_device_manager_new
GdkDeviceManager *
_gdk_x11_device_manager_new (GdkDisplay *display)
{
if (!g_getenv ("GDK_CORE_DEVICE_EVENTS"))
{
#ifdef XINPUT_2
int opcode, firstevent, firsterror;
Display *xdisplay;
xdisplay = GDK_DISPLAY_XDISPLAY (display);
if (XQueryExtension (xdisplay, "XInputExtension",
&opcode, &firstevent, &firsterror))
{
int major, minor;
major = 2;
minor = 3;
if (!_gdk_disable_multidevice &&
XIQueryVersion (xdisplay, &major, &minor) != BadRequest)
{
GdkX11DeviceManagerXI2 *device_manager_xi2;
GDK_NOTE (INPUT, g_message ("Creating XI2 device manager"));
device_manager_xi2 = g_object_new (GDK_TYPE_X11_DEVICE_MANAGER_XI2,
"display", display,
"opcode", opcode,
"major", major,
"minor", minor,
NULL);
return GDK_DEVICE_MANAGER (device_manager_xi2);
}
}
#endif /* XINPUT_2 */
}
GDK_NOTE (INPUT, g_message ("Creating core device manager"));
return g_object_new (GDK_TYPE_X11_DEVICE_MANAGER_CORE,
"display", display,
NULL);
}
开发者ID:GYGit,项目名称:gtk,代码行数:45,代码来源:gdkdevicemanager-x11.c
注:本文中的GDK_NOTE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论